Normalize line endings
authorJørgen P. Tjernø <jorgen@valvesoftware.com>
Fri Jul 05 12:09:04 2013 -0700 (2013-07-05)
changeset 9b7e3533c9bc9
parent 8 c48562d0ddd6
child 11 8789a8f966d3
Normalize line endings

Fixes issue #75.
createallprojects
creategameprojects
devtools/bin/vpc
thirdparty/protobuf-2.3.0/autogen.sh
thirdparty/protobuf-2.3.0/generate_descriptor_proto.sh
thirdparty/protobuf-2.3.0/gtest/build-aux/ltmain.sh
thirdparty/protobuf-2.3.0/gtest/xcode/Scripts/runtests.sh
thirdparty/protobuf-2.3.0/ltmain.sh
thirdparty/protobuf-2.3.0/src/google/protobuf/compiler/zip_output_unittest.sh
thirdparty/protobuf-2.3.0/src/google/protobuf/io/gzip_stream_unittest.sh
thirdparty/protobuf-2.3.0/vsprojects/convert2008to2005.sh
     1.1 --- a/createallprojects	Fri Jul 05 11:28:48 2013 -0700
     1.2 +++ b/createallprojects	Fri Jul 05 12:09:04 2013 -0700
     1.3 @@ -1,4 +1,4 @@
     1.4 -#!/bin/bash
     1.5 -
     1.6 -devtools/bin/vpc /hl2 /episodic +everything /mksln everything
     1.7 -
     1.8 +#!/bin/bash
     1.9 +
    1.10 +devtools/bin/vpc /hl2 /episodic +everything /mksln everything
    1.11 +
     2.1 --- a/creategameprojects	Fri Jul 05 11:28:48 2013 -0700
     2.2 +++ b/creategameprojects	Fri Jul 05 12:09:04 2013 -0700
     2.3 @@ -1,4 +1,4 @@
     2.4 -#!/bin/bash
     2.5 -
     2.6 -devtools/bin/vpc /hl2 /episodic +game /mksln games
     2.7 -
     2.8 +#!/bin/bash
     2.9 +
    2.10 +devtools/bin/vpc /hl2 /episodic +game /mksln games
    2.11 +
     3.1 --- a/devtools/bin/vpc	Fri Jul 05 11:28:48 2013 -0700
     3.2 +++ b/devtools/bin/vpc	Fri Jul 05 12:09:04 2013 -0700
     3.3 @@ -1,28 +1,28 @@
     3.4 -#!/bin/bash
     3.5 -
     3.6 -OS=`uname`
     3.7 -SCRIPTPATH=`dirname $0`
     3.8 -FORCEARG=""
     3.9 -
    3.10 -case $OS in
    3.11 -"Darwin")
    3.12 -	BINNAME=vpc_osx
    3.13 -	;;
    3.14 -"Linux")
    3.15 -	BINNAME=vpc_linux
    3.16 -	;;
    3.17 -*)
    3.18 -	echo "Couldn't find appropriate VPC binary, fix the script."
    3.19 -	exit -1
    3.20 -	;;
    3.21 -esac
    3.22 -
    3.23 -
    3.24 -if [ $OS == "Darwin" ]; then
    3.25 -	$SCRIPTPATH/$BINNAME [email protected]
    3.26 -elif [ $OS == "Linux" ]; then
    3.27 -	$SCRIPTPATH/$BINNAME [email protected]
    3.28 -else
    3.29 -	echo "Couldn't find appropriate VPC binary, fix the script."
    3.30 -	exit -1
    3.31 -fi
    3.32 +#!/bin/bash
    3.33 +
    3.34 +OS=`uname`
    3.35 +SCRIPTPATH=`dirname $0`
    3.36 +FORCEARG=""
    3.37 +
    3.38 +case $OS in
    3.39 +"Darwin")
    3.40 +	BINNAME=vpc_osx
    3.41 +	;;
    3.42 +"Linux")
    3.43 +	BINNAME=vpc_linux
    3.44 +	;;
    3.45 +*)
    3.46 +	echo "Couldn't find appropriate VPC binary, fix the script."
    3.47 +	exit -1
    3.48 +	;;
    3.49 +esac
    3.50 +
    3.51 +
    3.52 +if [ $OS == "Darwin" ]; then
    3.53 +	$SCRIPTPATH/$BINNAME [email protected]
    3.54 +elif [ $OS == "Linux" ]; then
    3.55 +	$SCRIPTPATH/$BINNAME [email protected]
    3.56 +else
    3.57 +	echo "Couldn't find appropriate VPC binary, fix the script."
    3.58 +	exit -1
    3.59 +fi
     4.1 --- a/thirdparty/protobuf-2.3.0/autogen.sh	Fri Jul 05 11:28:48 2013 -0700
     4.2 +++ b/thirdparty/protobuf-2.3.0/autogen.sh	Fri Jul 05 12:09:04 2013 -0700
     4.3 @@ -1,41 +1,41 @@
     4.4 -#!/bin/sh
     4.5 -
     4.6 -# Run this script to generate the configure script and other files that will
     4.7 -# be included in the distribution.  These files are not checked in because they
     4.8 -# are automatically generated.
     4.9 -
    4.10 -set -e
    4.11 -
    4.12 -# Check that we're being run from the right directory.
    4.13 -if test ! -f src/google/protobuf/stubs/common.h; then
    4.14 -  cat >&2 << __EOF__
    4.15 -Could not find source code.  Make sure you are running this script from the
    4.16 -root of the distribution tree.
    4.17 -__EOF__
    4.18 -  exit 1
    4.19 -fi
    4.20 -
    4.21 -# Check that gtest is present.  Usually it is already there since the
    4.22 -# directory is set up as an SVN external.
    4.23 -if test ! -e gtest; then
    4.24 -  echo "Google Test not present.  Fetching gtest-1.3.0 from the web..."
    4.25 -  curl http://googletest.googlecode.com/files/gtest-1.3.0.tar.bz2 | tar jx
    4.26 -  mv gtest-1.3.0 gtest
    4.27 -fi
    4.28 -
    4.29 -set -ex
    4.30 -
    4.31 -# Temporary hack:  Must change C runtime library to "multi-threaded DLL",
    4.32 -#   otherwise it will be set to "multi-threaded static" when MSVC upgrades
    4.33 -#   the project file to MSVC 2005/2008.  vladl of Google Test says gtest will
    4.34 -#   probably change their default to match, then this will be unnecessary.
    4.35 -#   One of these mappings converts the debug configuration and the other
    4.36 -#   converts the release configuration.  I don't know which is which.
    4.37 -sed -i -e 's/RuntimeLibrary="5"/RuntimeLibrary="3"/g;
    4.38 -           s/RuntimeLibrary="4"/RuntimeLibrary="2"/g;' gtest/msvc/*.vcproj
    4.39 -
    4.40 -# TODO(kenton):  Remove the ",no-obsolete" part and fix the resulting warnings.
    4.41 -autoreconf -f -i -Wall,no-obsolete
    4.42 -
    4.43 -rm -rf autom4te.cache config.h.in~
    4.44 -exit 0
    4.45 +#!/bin/sh
    4.46 +
    4.47 +# Run this script to generate the configure script and other files that will
    4.48 +# be included in the distribution.  These files are not checked in because they
    4.49 +# are automatically generated.
    4.50 +
    4.51 +set -e
    4.52 +
    4.53 +# Check that we're being run from the right directory.
    4.54 +if test ! -f src/google/protobuf/stubs/common.h; then
    4.55 +  cat >&2 << __EOF__
    4.56 +Could not find source code.  Make sure you are running this script from the
    4.57 +root of the distribution tree.
    4.58 +__EOF__
    4.59 +  exit 1
    4.60 +fi
    4.61 +
    4.62 +# Check that gtest is present.  Usually it is already there since the
    4.63 +# directory is set up as an SVN external.
    4.64 +if test ! -e gtest; then
    4.65 +  echo "Google Test not present.  Fetching gtest-1.3.0 from the web..."
    4.66 +  curl http://googletest.googlecode.com/files/gtest-1.3.0.tar.bz2 | tar jx
    4.67 +  mv gtest-1.3.0 gtest
    4.68 +fi
    4.69 +
    4.70 +set -ex
    4.71 +
    4.72 +# Temporary hack:  Must change C runtime library to "multi-threaded DLL",
    4.73 +#   otherwise it will be set to "multi-threaded static" when MSVC upgrades
    4.74 +#   the project file to MSVC 2005/2008.  vladl of Google Test says gtest will
    4.75 +#   probably change their default to match, then this will be unnecessary.
    4.76 +#   One of these mappings converts the debug configuration and the other
    4.77 +#   converts the release configuration.  I don't know which is which.
    4.78 +sed -i -e 's/RuntimeLibrary="5"/RuntimeLibrary="3"/g;
    4.79 +           s/RuntimeLibrary="4"/RuntimeLibrary="2"/g;' gtest/msvc/*.vcproj
    4.80 +
    4.81 +# TODO(kenton):  Remove the ",no-obsolete" part and fix the resulting warnings.
    4.82 +autoreconf -f -i -Wall,no-obsolete
    4.83 +
    4.84 +rm -rf autom4te.cache config.h.in~
    4.85 +exit 0
     5.1 --- a/thirdparty/protobuf-2.3.0/generate_descriptor_proto.sh	Fri Jul 05 11:28:48 2013 -0700
     5.2 +++ b/thirdparty/protobuf-2.3.0/generate_descriptor_proto.sh	Fri Jul 05 12:09:04 2013 -0700
     5.3 @@ -1,33 +1,33 @@
     5.4 -#!/bin/sh
     5.5 -
     5.6 -# Run this script to regenerate descriptor.pb.{h,cc} after the protocol
     5.7 -# compiler changes.  Since these files are compiled into the protocol compiler
     5.8 -# itself, they cannot be generated automatically by a make rule.  "make check"
     5.9 -# will fail if these files do not match what the protocol compiler would
    5.10 -# generate.
    5.11 -#
    5.12 -# HINT:  Flags passed to generate_descriptor_proto.sh will be passed directly
    5.13 -#   to make when building protoc.  This is particularly useful for passing
    5.14 -#   -j4 to run 4 jobs simultaneously.
    5.15 -
    5.16 -if test ! -e src/google/protobuf/stubs/common.h; then
    5.17 -  cat >&2 << __EOF__
    5.18 -Could not find source code.  Make sure you are running this script from the
    5.19 -root of the distribution tree.
    5.20 -__EOF__
    5.21 -  exit 1
    5.22 -fi
    5.23 -
    5.24 -if test ! -e src/Makefile; then
    5.25 -  cat >&2 << __EOF__
    5.26 -Could not find src/Makefile.  You must run ./configure (and perhaps
    5.27 -./autogen.sh) first.
    5.28 -__EOF__
    5.29 -  exit 1
    5.30 -fi
    5.31 -
    5.32 -cd src
    5.33 -make [email protected] protoc &&
    5.34 -  ./protoc --cpp_out=dllexport_decl=LIBPROTOBUF_EXPORT:. google/protobuf/descriptor.proto && \
    5.35 -  ./protoc --cpp_out=dllexport_decl=LIBPROTOC_EXPORT:. google/protobuf/compiler/plugin.proto
    5.36 -cd ..
    5.37 +#!/bin/sh
    5.38 +
    5.39 +# Run this script to regenerate descriptor.pb.{h,cc} after the protocol
    5.40 +# compiler changes.  Since these files are compiled into the protocol compiler
    5.41 +# itself, they cannot be generated automatically by a make rule.  "make check"
    5.42 +# will fail if these files do not match what the protocol compiler would
    5.43 +# generate.
    5.44 +#
    5.45 +# HINT:  Flags passed to generate_descriptor_proto.sh will be passed directly
    5.46 +#   to make when building protoc.  This is particularly useful for passing
    5.47 +#   -j4 to run 4 jobs simultaneously.
    5.48 +
    5.49 +if test ! -e src/google/protobuf/stubs/common.h; then
    5.50 +  cat >&2 << __EOF__
    5.51 +Could not find source code.  Make sure you are running this script from the
    5.52 +root of the distribution tree.
    5.53 +__EOF__
    5.54 +  exit 1
    5.55 +fi
    5.56 +
    5.57 +if test ! -e src/Makefile; then
    5.58 +  cat >&2 << __EOF__
    5.59 +Could not find src/Makefile.  You must run ./configure (and perhaps
    5.60 +./autogen.sh) first.
    5.61 +__EOF__
    5.62 +  exit 1
    5.63 +fi
    5.64 +
    5.65 +cd src
    5.66 +make [email protected] protoc &&
    5.67 +  ./protoc --cpp_out=dllexport_decl=LIBPROTOBUF_EXPORT:. google/protobuf/descriptor.proto && \
    5.68 +  ./protoc --cpp_out=dllexport_decl=LIBPROTOC_EXPORT:. google/protobuf/compiler/plugin.proto
    5.69 +cd ..
     6.1 --- a/thirdparty/protobuf-2.3.0/gtest/build-aux/ltmain.sh	Fri Jul 05 11:28:48 2013 -0700
     6.2 +++ b/thirdparty/protobuf-2.3.0/gtest/build-aux/ltmain.sh	Fri Jul 05 12:09:04 2013 -0700
     6.3 @@ -1,7874 +1,7874 @@
     6.4 -# Generated from ltmain.m4sh.
     6.5 -
     6.6 -# ltmain.sh (GNU libtool) 2.2.4
     6.7 -# Written by Gordon Matzigkeit <[email protected]>, 1996
     6.8 -
     6.9 -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
    6.10 -# This is free software; see the source for copying conditions.  There is NO
    6.11 -# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    6.12 -
    6.13 -# GNU Libtool is free software; you can redistribute it and/or modify
    6.14 -# it under the terms of the GNU General Public License as published by
    6.15 -# the Free Software Foundation; either version 2 of the License, or
    6.16 -# (at your option) any later version.
    6.17 -#
    6.18 -# As a special exception to the GNU General Public License,
    6.19 -# if you distribute this file as part of a program or library that
    6.20 -# is built using GNU Libtool, you may include this file under the
    6.21 -# same distribution terms that you use for the rest of that program.
    6.22 -#
    6.23 -# GNU Libtool is distributed in the hope that it will be useful, but
    6.24 -# WITHOUT ANY WARRANTY; without even the implied warranty of
    6.25 -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    6.26 -# General Public License for more details.
    6.27 -#
    6.28 -# You should have received a copy of the GNU General Public License
    6.29 -# along with GNU Libtool; see the file COPYING.  If not, a copy
    6.30 -# can be downloaded from http://www.gnu.org/licenses/gpl.html,
    6.31 -# or obtained by writing to the Free Software Foundation, Inc.,
    6.32 -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    6.33 -
    6.34 -# Usage: $progname [OPTION]... [MODE-ARG]...
    6.35 -#
    6.36 -# Provide generalized library-building support services.
    6.37 -#
    6.38 -#     --config             show all configuration variables
    6.39 -#     --debug              enable verbose shell tracing
    6.40 -# -n, --dry-run            display commands without modifying any files
    6.41 -#     --features           display basic configuration information and exit
    6.42 -#     --mode=MODE          use operation mode MODE
    6.43 -#     --preserve-dup-deps  don't remove duplicate dependency libraries
    6.44 -#     --quiet, --silent    don't print informational messages
    6.45 -#     --tag=TAG            use configuration variables from tag TAG
    6.46 -# -v, --verbose            print informational messages (default)
    6.47 -#     --version            print version information
    6.48 -# -h, --help               print short or long help message
    6.49 -#
    6.50 -# MODE must be one of the following:
    6.51 -#
    6.52 -#       clean              remove files from the build directory
    6.53 -#       compile            compile a source file into a libtool object
    6.54 -#       execute            automatically set library path, then run a program
    6.55 -#       finish             complete the installation of libtool libraries
    6.56 -#       install            install libraries or executables
    6.57 -#       link               create a library or an executable
    6.58 -#       uninstall          remove libraries from an installed directory
    6.59 -#
    6.60 -# MODE-ARGS vary depending on the MODE.
    6.61 -# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
    6.62 -#
    6.63 -# When reporting a bug, please describe a test case to reproduce it and
    6.64 -# include the following information:
    6.65 -#
    6.66 -#       host-triplet:	$host
    6.67 -#       shell:		$SHELL
    6.68 -#       compiler:		$LTCC
    6.69 -#       compiler flags:		$LTCFLAGS
    6.70 -#       linker:		$LD (gnu? $with_gnu_ld)
    6.71 -#       $progname:		(GNU libtool) 2.2.4
    6.72 -#       automake:		$automake_version
    6.73 -#       autoconf:		$autoconf_version
    6.74 -#
    6.75 -# Report bugs to <[email protected]>.
    6.76 -
    6.77 -PROGRAM=ltmain.sh
    6.78 -PACKAGE=libtool
    6.79 -VERSION=2.2.4
    6.80 -TIMESTAMP=""
    6.81 -package_revision=1.2976
    6.82 -
    6.83 -# Be Bourne compatible
    6.84 -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
    6.85 -  emulate sh
    6.86 -  NULLCMD=:
    6.87 -  # Zsh 3.x and 4.x performs word splitting on ${1+"[email protected]"}, which
    6.88 -  # is contrary to our usage.  Disable this feature.
    6.89 -  alias -g '${1+"[email protected]"}'='"[email protected]"'
    6.90 -  setopt NO_GLOB_SUBST
    6.91 -else
    6.92 -  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
    6.93 -fi
    6.94 -BIN_SH=xpg4; export BIN_SH # for Tru64
    6.95 -DUALCASE=1; export DUALCASE # for MKS sh
    6.96 -
    6.97 -# NLS nuisances: We save the old values to restore during execute mode.
    6.98 -# Only set LANG and LC_ALL to C if already set.
    6.99 -# These must not be set unconditionally because not all systems understand
   6.100 -# e.g. LANG=C (notably SCO).
   6.101 -lt_user_locale=
   6.102 -lt_safe_locale=
   6.103 -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
   6.104 -do
   6.105 -  eval "if test \"\${$lt_var+set}\" = set; then
   6.106 -          save_$lt_var=\$$lt_var
   6.107 -          $lt_var=C
   6.108 -	  export $lt_var
   6.109 -	  lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
   6.110 -	  lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
   6.111 -	fi"
   6.112 -done
   6.113 -
   6.114 -$lt_unset CDPATH
   6.115 -
   6.116 -
   6.117 -
   6.118 -
   6.119 -
   6.120 -: ${CP="cp -f"}
   6.121 -: ${ECHO="echo"}
   6.122 -: ${EGREP="/usr/bin/grep -E"}
   6.123 -: ${FGREP="/usr/bin/grep -F"}
   6.124 -: ${GREP="/usr/bin/grep"}
   6.125 -: ${LN_S="ln -s"}
   6.126 -: ${MAKE="make"}
   6.127 -: ${MKDIR="mkdir"}
   6.128 -: ${MV="mv -f"}
   6.129 -: ${RM="rm -f"}
   6.130 -: ${SED="/opt/local/bin/gsed"}
   6.131 -: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
   6.132 -: ${Xsed="$SED -e 1s/^X//"}
   6.133 -
   6.134 -# Global variables:
   6.135 -EXIT_SUCCESS=0
   6.136 -EXIT_FAILURE=1
   6.137 -EXIT_MISMATCH=63  # $? = 63 is used to indicate version mismatch to missing.
   6.138 -EXIT_SKIP=77	  # $? = 77 is used to indicate a skipped test to automake.
   6.139 -
   6.140 -exit_status=$EXIT_SUCCESS
   6.141 -
   6.142 -# Make sure IFS has a sensible default
   6.143 -lt_nl='
   6.144 -'
   6.145 -IFS=" 	$lt_nl"
   6.146 -
   6.147 -dirname="s,/[^/]*$,,"
   6.148 -basename="s,^.*/,,"
   6.149 -
   6.150 -# func_dirname_and_basename file append nondir_replacement
   6.151 -# perform func_basename and func_dirname in a single function
   6.152 -# call:
   6.153 -#   dirname:  Compute the dirname of FILE.  If nonempty,
   6.154 -#             add APPEND to the result, otherwise set result
   6.155 -#             to NONDIR_REPLACEMENT.
   6.156 -#             value returned in "$func_dirname_result"
   6.157 -#   basename: Compute filename of FILE.
   6.158 -#             value retuned in "$func_basename_result"
   6.159 -# Implementation must be kept synchronized with func_dirname
   6.160 -# and func_basename. For efficiency, we do not delegate to
   6.161 -# those functions but instead duplicate the functionality here.
   6.162 -func_dirname_and_basename ()
   6.163 -{
   6.164 -  # Extract subdirectory from the argument.
   6.165 -  func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
   6.166 -  if test "X$func_dirname_result" = "X${1}"; then
   6.167 -    func_dirname_result="${3}"
   6.168 -  else
   6.169 -    func_dirname_result="$func_dirname_result${2}"
   6.170 -  fi
   6.171 -  func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
   6.172 -}
   6.173 -
   6.174 -# Generated shell functions inserted here.
   6.175 -
   6.176 -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
   6.177 -# is ksh but when the shell is invoked as "sh" and the current value of
   6.178 -# the _XPG environment variable is not equal to 1 (one), the special
   6.179 -# positional parameter $0, within a function call, is the name of the
   6.180 -# function.
   6.181 -progpath="$0"
   6.182 -
   6.183 -# The name of this program:
   6.184 -# In the unlikely event $progname began with a '-', it would play havoc with
   6.185 -# func_echo (imagine progname=-n), so we prepend ./ in that case:
   6.186 -func_dirname_and_basename "$progpath"
   6.187 -progname=$func_basename_result
   6.188 -case $progname in
   6.189 -  -*) progname=./$progname ;;
   6.190 -esac
   6.191 -
   6.192 -# Make sure we have an absolute path for reexecution:
   6.193 -case $progpath in
   6.194 -  [\\/]*|[A-Za-z]:\\*) ;;
   6.195 -  *[\\/]*)
   6.196 -     progdir=$func_dirname_result
   6.197 -     progdir=`cd "$progdir" && pwd`
   6.198 -     progpath="$progdir/$progname"
   6.199 -     ;;
   6.200 -  *)
   6.201 -     save_IFS="$IFS"
   6.202 -     IFS=:
   6.203 -     for progdir in $PATH; do
   6.204 -       IFS="$save_IFS"
   6.205 -       test -x "$progdir/$progname" && break
   6.206 -     done
   6.207 -     IFS="$save_IFS"
   6.208 -     test -n "$progdir" || progdir=`pwd`
   6.209 -     progpath="$progdir/$progname"
   6.210 -     ;;
   6.211 -esac
   6.212 -
   6.213 -# Sed substitution that helps us do robust quoting.  It backslashifies
   6.214 -# metacharacters that are still active within double-quoted strings.
   6.215 -Xsed="${SED}"' -e 1s/^X//'
   6.216 -sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
   6.217 -
   6.218 -# Same as above, but do not quote variable references.
   6.219 -double_quote_subst='s/\(["`\\]\)/\\\1/g'
   6.220 -
   6.221 -# Re-`\' parameter expansions in output of double_quote_subst that were
   6.222 -# `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
   6.223 -# in input to double_quote_subst, that '$' was protected from expansion.
   6.224 -# Since each input `\' is now two `\'s, look for any number of runs of
   6.225 -# four `\'s followed by two `\'s and then a '$'.  `\' that '$'.
   6.226 -bs='\\'
   6.227 -bs2='\\\\'
   6.228 -bs4='\\\\\\\\'
   6.229 -dollar='\$'
   6.230 -sed_double_backslash="\
   6.231 -  s/$bs4/&\\
   6.232 -/g
   6.233 -  s/^$bs2$dollar/$bs&/
   6.234 -  s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
   6.235 -  s/\n//g"
   6.236 -
   6.237 -# Standard options:
   6.238 -opt_dry_run=false
   6.239 -opt_help=false
   6.240 -opt_quiet=false
   6.241 -opt_verbose=false
   6.242 -opt_warning=:
   6.243 -
   6.244 -# func_echo arg...
   6.245 -# Echo program name prefixed message, along with the current mode
   6.246 -# name if it has been set yet.
   6.247 -func_echo ()
   6.248 -{
   6.249 -    $ECHO "$progname${mode+: }$mode: $*"
   6.250 -}
   6.251 -
   6.252 -# func_verbose arg...
   6.253 -# Echo program name prefixed message in verbose mode only.
   6.254 -func_verbose ()
   6.255 -{
   6.256 -    $opt_verbose && func_echo ${1+"[email protected]"}
   6.257 -
   6.258 -    # A bug in bash halts the script if the last line of a function
   6.259 -    # fails when set -e is in force, so we need another command to
   6.260 -    # work around that:
   6.261 -    :
   6.262 -}
   6.263 -
   6.264 -# func_error arg...
   6.265 -# Echo program name prefixed message to standard error.
   6.266 -func_error ()
   6.267 -{
   6.268 -    $ECHO "$progname${mode+: }$mode: "${1+"[email protected]"} 1>&2
   6.269 -}
   6.270 -
   6.271 -# func_warning arg...
   6.272 -# Echo program name prefixed warning message to standard error.
   6.273 -func_warning ()
   6.274 -{
   6.275 -    $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"[email protected]"} 1>&2
   6.276 -
   6.277 -    # bash bug again:
   6.278 -    :
   6.279 -}
   6.280 -
   6.281 -# func_fatal_error arg...
   6.282 -# Echo program name prefixed message to standard error, and exit.
   6.283 -func_fatal_error ()
   6.284 -{
   6.285 -    func_error ${1+"[email protected]"}
   6.286 -    exit $EXIT_FAILURE
   6.287 -}
   6.288 -
   6.289 -# func_fatal_help arg...
   6.290 -# Echo program name prefixed message to standard error, followed by
   6.291 -# a help hint, and exit.
   6.292 -func_fatal_help ()
   6.293 -{
   6.294 -    func_error ${1+"[email protected]"}
   6.295 -    func_fatal_error "$help"
   6.296 -}
   6.297 -help="Try \`$progname --help' for more information."  ## default
   6.298 -
   6.299 -
   6.300 -# func_grep expression filename
   6.301 -# Check whether EXPRESSION matches any line of FILENAME, without output.
   6.302 -func_grep ()
   6.303 -{
   6.304 -    $GREP "$1" "$2" >/dev/null 2>&1
   6.305 -}
   6.306 -
   6.307 -
   6.308 -# func_mkdir_p directory-path
   6.309 -# Make sure the entire path to DIRECTORY-PATH is available.
   6.310 -func_mkdir_p ()
   6.311 -{
   6.312 -    my_directory_path="$1"
   6.313 -    my_dir_list=
   6.314 -
   6.315 -    if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
   6.316 -
   6.317 -      # Protect directory names starting with `-'
   6.318 -      case $my_directory_path in
   6.319 -        -*) my_directory_path="./$my_directory_path" ;;
   6.320 -      esac
   6.321 -
   6.322 -      # While some portion of DIR does not yet exist...
   6.323 -      while test ! -d "$my_directory_path"; do
   6.324 -        # ...make a list in topmost first order.  Use a colon delimited
   6.325 -	# list incase some portion of path contains whitespace.
   6.326 -        my_dir_list="$my_directory_path:$my_dir_list"
   6.327 -
   6.328 -        # If the last portion added has no slash in it, the list is done
   6.329 -        case $my_directory_path in */*) ;; *) break ;; esac
   6.330 -
   6.331 -        # ...otherwise throw away the child directory and loop
   6.332 -        my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
   6.333 -      done
   6.334 -      my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
   6.335 -
   6.336 -      save_mkdir_p_IFS="$IFS"; IFS=':'
   6.337 -      for my_dir in $my_dir_list; do
   6.338 -	IFS="$save_mkdir_p_IFS"
   6.339 -        # mkdir can fail with a `File exist' error if two processes
   6.340 -        # try to create one of the directories concurrently.  Don't
   6.341 -        # stop in that case!
   6.342 -        $MKDIR "$my_dir" 2>/dev/null || :
   6.343 -      done
   6.344 -      IFS="$save_mkdir_p_IFS"
   6.345 -
   6.346 -      # Bail out if we (or some other process) failed to create a directory.
   6.347 -      test -d "$my_directory_path" || \
   6.348 -        func_fatal_error "Failed to create \`$1'"
   6.349 -    fi
   6.350 -}
   6.351 -
   6.352 -
   6.353 -# func_mktempdir [string]
   6.354 -# Make a temporary directory that won't clash with other running
   6.355 -# libtool processes, and avoids race conditions if possible.  If
   6.356 -# given, STRING is the basename for that directory.
   6.357 -func_mktempdir ()
   6.358 -{
   6.359 -    my_template="${TMPDIR-/tmp}/${1-$progname}"
   6.360 -
   6.361 -    if test "$opt_dry_run" = ":"; then
   6.362 -      # Return a directory name, but don't create it in dry-run mode
   6.363 -      my_tmpdir="${my_template}-$$"
   6.364 -    else
   6.365 -
   6.366 -      # If mktemp works, use that first and foremost
   6.367 -      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
   6.368 -
   6.369 -      if test ! -d "$my_tmpdir"; then
   6.370 -        # Failing that, at least try and use $RANDOM to avoid a race
   6.371 -        my_tmpdir="${my_template}-${RANDOM-0}$$"
   6.372 -
   6.373 -        save_mktempdir_umask=`umask`
   6.374 -        umask 0077
   6.375 -        $MKDIR "$my_tmpdir"
   6.376 -        umask $save_mktempdir_umask
   6.377 -      fi
   6.378 -
   6.379 -      # If we're not in dry-run mode, bomb out on failure
   6.380 -      test -d "$my_tmpdir" || \
   6.381 -        func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
   6.382 -    fi
   6.383 -
   6.384 -    $ECHO "X$my_tmpdir" | $Xsed
   6.385 -}
   6.386 -
   6.387 -
   6.388 -# func_quote_for_eval arg
   6.389 -# Aesthetically quote ARG to be evaled later.
   6.390 -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
   6.391 -# is double-quoted, suitable for a subsequent eval, whereas
   6.392 -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
   6.393 -# which are still active within double quotes backslashified.
   6.394 -func_quote_for_eval ()
   6.395 -{
   6.396 -    case $1 in
   6.397 -      *[\\\`\"\$]*)
   6.398 -	func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
   6.399 -      *)
   6.400 -        func_quote_for_eval_unquoted_result="$1" ;;
   6.401 -    esac
   6.402 -
   6.403 -    case $func_quote_for_eval_unquoted_result in
   6.404 -      # Double-quote args containing shell metacharacters to delay
   6.405 -      # word splitting, command substitution and and variable
   6.406 -      # expansion for a subsequent eval.
   6.407 -      # Many Bourne shells cannot handle close brackets correctly
   6.408 -      # in scan sets, so we specify it separately.
   6.409 -      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
   6.410 -        func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
   6.411 -        ;;
   6.412 -      *)
   6.413 -        func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
   6.414 -    esac
   6.415 -}
   6.416 -
   6.417 -
   6.418 -# func_quote_for_expand arg
   6.419 -# Aesthetically quote ARG to be evaled later; same as above,
   6.420 -# but do not quote variable references.
   6.421 -func_quote_for_expand ()
   6.422 -{
   6.423 -    case $1 in
   6.424 -      *[\\\`\"]*)
   6.425 -	my_arg=`$ECHO "X$1" | $Xsed \
   6.426 -	    -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
   6.427 -      *)
   6.428 -        my_arg="$1" ;;
   6.429 -    esac
   6.430 -
   6.431 -    case $my_arg in
   6.432 -      # Double-quote args containing shell metacharacters to delay
   6.433 -      # word splitting and command substitution for a subsequent eval.
   6.434 -      # Many Bourne shells cannot handle close brackets correctly
   6.435 -      # in scan sets, so we specify it separately.
   6.436 -      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
   6.437 -        my_arg="\"$my_arg\""
   6.438 -        ;;
   6.439 -    esac
   6.440 -
   6.441 -    func_quote_for_expand_result="$my_arg"
   6.442 -}
   6.443 -
   6.444 -
   6.445 -# func_show_eval cmd [fail_exp]
   6.446 -# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
   6.447 -# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
   6.448 -# is given, then evaluate it.
   6.449 -func_show_eval ()
   6.450 -{
   6.451 -    my_cmd="$1"
   6.452 -    my_fail_exp="${2-:}"
   6.453 -
   6.454 -    ${opt_silent-false} || {
   6.455 -      func_quote_for_expand "$my_cmd"
   6.456 -      eval "func_echo $func_quote_for_expand_result"
   6.457 -    }
   6.458 -
   6.459 -    if ${opt_dry_run-false}; then :; else
   6.460 -      eval "$my_cmd"
   6.461 -      my_status=$?
   6.462 -      if test "$my_status" -eq 0; then :; else
   6.463 -	eval "(exit $my_status); $my_fail_exp"
   6.464 -      fi
   6.465 -    fi
   6.466 -}
   6.467 -
   6.468 -
   6.469 -# func_show_eval_locale cmd [fail_exp]
   6.470 -# Unless opt_silent is true, then output CMD.  Then, if opt_dryrun is
   6.471 -# not true, evaluate CMD.  If the evaluation of CMD fails, and FAIL_EXP
   6.472 -# is given, then evaluate it.  Use the saved locale for evaluation.
   6.473 -func_show_eval_locale ()
   6.474 -{
   6.475 -    my_cmd="$1"
   6.476 -    my_fail_exp="${2-:}"
   6.477 -
   6.478 -    ${opt_silent-false} || {
   6.479 -      func_quote_for_expand "$my_cmd"
   6.480 -      eval "func_echo $func_quote_for_expand_result"
   6.481 -    }
   6.482 -
   6.483 -    if ${opt_dry_run-false}; then :; else
   6.484 -      eval "$lt_user_locale
   6.485 -	    $my_cmd"
   6.486 -      my_status=$?
   6.487 -      eval "$lt_safe_locale"
   6.488 -      if test "$my_status" -eq 0; then :; else
   6.489 -	eval "(exit $my_status); $my_fail_exp"
   6.490 -      fi
   6.491 -    fi
   6.492 -}
   6.493 -
   6.494 -
   6.495 -
   6.496 -
   6.497 -
   6.498 -# func_version
   6.499 -# Echo version message to standard output and exit.
   6.500 -func_version ()
   6.501 -{
   6.502 -    $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
   6.503 -        s/^# //
   6.504 -	s/^# *$//
   6.505 -        s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
   6.506 -        p
   6.507 -     }' < "$progpath"
   6.508 -     exit $?
   6.509 -}
   6.510 -
   6.511 -# func_usage
   6.512 -# Echo short help message to standard output and exit.
   6.513 -func_usage ()
   6.514 -{
   6.515 -    $SED -n '/^# Usage:/,/# -h/ {
   6.516 -        s/^# //
   6.517 -	s/^# *$//
   6.518 -	s/\$progname/'$progname'/
   6.519 -	p
   6.520 -    }' < "$progpath"
   6.521 -    $ECHO
   6.522 -    $ECHO "run \`$progname --help | more' for full usage"
   6.523 -    exit $?
   6.524 -}
   6.525 -
   6.526 -# func_help
   6.527 -# Echo long help message to standard output and exit.
   6.528 -func_help ()
   6.529 -{
   6.530 -    $SED -n '/^# Usage:/,/# Report bugs to/ {
   6.531 -        s/^# //
   6.532 -	s/^# *$//
   6.533 -	s*\$progname*'$progname'*
   6.534 -	s*\$host*'"$host"'*
   6.535 -	s*\$SHELL*'"$SHELL"'*
   6.536 -	s*\$LTCC*'"$LTCC"'*
   6.537 -	s*\$LTCFLAGS*'"$LTCFLAGS"'*
   6.538 -	s*\$LD*'"$LD"'*
   6.539 -	s/\$with_gnu_ld/'"$with_gnu_ld"'/
   6.540 -	s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
   6.541 -	s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
   6.542 -	p
   6.543 -     }' < "$progpath"
   6.544 -    exit $?
   6.545 -}
   6.546 -
   6.547 -# func_missing_arg argname
   6.548 -# Echo program name prefixed message to standard error and set global
   6.549 -# exit_cmd.
   6.550 -func_missing_arg ()
   6.551 -{
   6.552 -    func_error "missing argument for $1"
   6.553 -    exit_cmd=exit
   6.554 -}
   6.555 -
   6.556 -exit_cmd=:
   6.557 -
   6.558 -
   6.559 -
   6.560 -
   6.561 -
   6.562 -# Check that we have a working $ECHO.
   6.563 -if test "X$1" = X--no-reexec; then
   6.564 -  # Discard the --no-reexec flag, and continue.
   6.565 -  shift
   6.566 -elif test "X$1" = X--fallback-echo; then
   6.567 -  # Avoid inline document here, it may be left over
   6.568 -  :
   6.569 -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
   6.570 -  # Yippee, $ECHO works!
   6.571 -  :
   6.572 -else
   6.573 -  # Restart under the correct shell, and then maybe $ECHO will work.
   6.574 -  exec $SHELL "$progpath" --no-reexec ${1+"[email protected]"}
   6.575 -fi
   6.576 -
   6.577 -if test "X$1" = X--fallback-echo; then
   6.578 -  # used as fallback echo
   6.579 -  shift
   6.580 -  cat <<EOF
   6.581 -$*
   6.582 -EOF
   6.583 -  exit $EXIT_SUCCESS
   6.584 -fi
   6.585 -
   6.586 -magic="%%%MAGIC variable%%%"
   6.587 -magic_exe="%%%MAGIC EXE variable%%%"
   6.588 -
   6.589 -# Global variables.
   6.590 -# $mode is unset
   6.591 -nonopt=
   6.592 -execute_dlfiles=
   6.593 -preserve_args=
   6.594 -lo2o="s/\\.lo\$/.${objext}/"
   6.595 -o2lo="s/\\.${objext}\$/.lo/"
   6.596 -extracted_archives=
   6.597 -extracted_serial=0
   6.598 -
   6.599 -opt_dry_run=false
   6.600 -opt_duplicate_deps=false
   6.601 -opt_silent=false
   6.602 -opt_debug=:
   6.603 -
   6.604 -# If this variable is set in any of the actions, the command in it
   6.605 -# will be execed at the end.  This prevents here-documents from being
   6.606 -# left over by shells.
   6.607 -exec_cmd=
   6.608 -
   6.609 -# func_fatal_configuration arg...
   6.610 -# Echo program name prefixed message to standard error, followed by
   6.611 -# a configuration failure hint, and exit.
   6.612 -func_fatal_configuration ()
   6.613 -{
   6.614 -    func_error ${1+"[email protected]"}
   6.615 -    func_error "See the $PACKAGE documentation for more information."
   6.616 -    func_fatal_error "Fatal configuration error."
   6.617 -}
   6.618 -
   6.619 -
   6.620 -# func_config
   6.621 -# Display the configuration for all the tags in this script.
   6.622 -func_config ()
   6.623 -{
   6.624 -    re_begincf='^# ### BEGIN LIBTOOL'
   6.625 -    re_endcf='^# ### END LIBTOOL'
   6.626 -
   6.627 -    # Default configuration.
   6.628 -    $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
   6.629 -
   6.630 -    # Now print the configurations for the tags.
   6.631 -    for tagname in $taglist; do
   6.632 -      $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
   6.633 -    done
   6.634 -
   6.635 -    exit $?
   6.636 -}
   6.637 -
   6.638 -# func_features
   6.639 -# Display the features supported by this script.
   6.640 -func_features ()
   6.641 -{
   6.642 -    $ECHO "host: $host"
   6.643 -    if test "$build_libtool_libs" = yes; then
   6.644 -      $ECHO "enable shared libraries"
   6.645 -    else
   6.646 -      $ECHO "disable shared libraries"
   6.647 -    fi
   6.648 -    if test "$build_old_libs" = yes; then
   6.649 -      $ECHO "enable static libraries"
   6.650 -    else
   6.651 -      $ECHO "disable static libraries"
   6.652 -    fi
   6.653 -
   6.654 -    exit $?
   6.655 -}
   6.656 -
   6.657 -# func_enable_tag tagname
   6.658 -# Verify that TAGNAME is valid, and either flag an error and exit, or
   6.659 -# enable the TAGNAME tag.  We also add TAGNAME to the global $taglist
   6.660 -# variable here.
   6.661 -func_enable_tag ()
   6.662 -{
   6.663 -  # Global variable:
   6.664 -  tagname="$1"
   6.665 -
   6.666 -  re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
   6.667 -  re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
   6.668 -  sed_extractcf="/$re_begincf/,/$re_endcf/p"
   6.669 -
   6.670 -  # Validate tagname.
   6.671 -  case $tagname in
   6.672 -    *[!-_A-Za-z0-9,/]*)
   6.673 -      func_fatal_error "invalid tag name: $tagname"
   6.674 -      ;;
   6.675 -  esac
   6.676 -
   6.677 -  # Don't test for the "default" C tag, as we know it's
   6.678 -  # there but not specially marked.
   6.679 -  case $tagname in
   6.680 -    CC) ;;
   6.681 -    *)
   6.682 -      if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
   6.683 -	taglist="$taglist $tagname"
   6.684 -
   6.685 -	# Evaluate the configuration.  Be careful to quote the path
   6.686 -	# and the sed script, to avoid splitting on whitespace, but
   6.687 -	# also don't use non-portable quotes within backquotes within
   6.688 -	# quotes we have to do it in 2 steps:
   6.689 -	extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
   6.690 -	eval "$extractedcf"
   6.691 -      else
   6.692 -	func_error "ignoring unknown tag $tagname"
   6.693 -      fi
   6.694 -      ;;
   6.695 -  esac
   6.696 -}
   6.697 -
   6.698 -# Parse options once, thoroughly.  This comes as soon as possible in
   6.699 -# the script to make things like `libtool --version' happen quickly.
   6.700 -{
   6.701 -
   6.702 -  # Shorthand for --mode=foo, only valid as the first argument
   6.703 -  case $1 in
   6.704 -  clean|clea|cle|cl)
   6.705 -    shift; set dummy --mode clean ${1+"[email protected]"}; shift
   6.706 -    ;;
   6.707 -  compile|compil|compi|comp|com|co|c)
   6.708 -    shift; set dummy --mode compile ${1+"[email protected]"}; shift
   6.709 -    ;;
   6.710 -  execute|execut|execu|exec|exe|ex|e)
   6.711 -    shift; set dummy --mode execute ${1+"[email protected]"}; shift
   6.712 -    ;;
   6.713 -  finish|finis|fini|fin|fi|f)
   6.714 -    shift; set dummy --mode finish ${1+"[email protected]"}; shift
   6.715 -    ;;
   6.716 -  install|instal|insta|inst|ins|in|i)
   6.717 -    shift; set dummy --mode install ${1+"[email protected]"}; shift
   6.718 -    ;;
   6.719 -  link|lin|li|l)
   6.720 -    shift; set dummy --mode link ${1+"[email protected]"}; shift
   6.721 -    ;;
   6.722 -  uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
   6.723 -    shift; set dummy --mode uninstall ${1+"[email protected]"}; shift
   6.724 -    ;;
   6.725 -  esac
   6.726 -
   6.727 -  # Parse non-mode specific arguments:
   6.728 -  while test "$#" -gt 0; do
   6.729 -    opt="$1"
   6.730 -    shift
   6.731 -
   6.732 -    case $opt in
   6.733 -      --config)		func_config					;;
   6.734 -
   6.735 -      --debug)		preserve_args="$preserve_args $opt"
   6.736 -			func_echo "enabling shell trace mode"
   6.737 -			opt_debug='set -x'
   6.738 -			$opt_debug
   6.739 -			;;
   6.740 -
   6.741 -      -dlopen)		test "$#" -eq 0 && func_missing_arg "$opt" && break
   6.742 -			execute_dlfiles="$execute_dlfiles $1"
   6.743 -			shift
   6.744 -			;;
   6.745 -
   6.746 -      --dry-run | -n)	opt_dry_run=:					;;
   6.747 -      --features)       func_features					;;
   6.748 -      --finish)		mode="finish"					;;
   6.749 -
   6.750 -      --mode)		test "$#" -eq 0 && func_missing_arg "$opt" && break
   6.751 -			case $1 in
   6.752 -			  # Valid mode arguments:
   6.753 -			  clean)	;;
   6.754 -			  compile)	;;
   6.755 -			  execute)	;;
   6.756 -			  finish)	;;
   6.757 -			  install)	;;
   6.758 -			  link)		;;
   6.759 -			  relink)	;;
   6.760 -			  uninstall)	;;
   6.761 -
   6.762 -			  # Catch anything else as an error
   6.763 -			  *) func_error "invalid argument for $opt"
   6.764 -			     exit_cmd=exit
   6.765 -			     break
   6.766 -			     ;;
   6.767 -		        esac
   6.768 -
   6.769 -			mode="$1"
   6.770 -			shift
   6.771 -			;;
   6.772 -
   6.773 -      --preserve-dup-deps)
   6.774 -			opt_duplicate_deps=:				;;
   6.775 -
   6.776 -      --quiet|--silent)	preserve_args="$preserve_args $opt"
   6.777 -			opt_silent=:
   6.778 -			;;
   6.779 -
   6.780 -      --verbose| -v)	preserve_args="$preserve_args $opt"
   6.781 -			opt_silent=false
   6.782 -			;;
   6.783 -
   6.784 -      --tag)		test "$#" -eq 0 && func_missing_arg "$opt" && break
   6.785 -			preserve_args="$preserve_args $opt $1"
   6.786 -			func_enable_tag "$1"	# tagname is set here
   6.787 -			shift
   6.788 -			;;
   6.789 -
   6.790 -      # Separate optargs to long options:
   6.791 -      -dlopen=*|--mode=*|--tag=*)
   6.792 -			func_opt_split "$opt"
   6.793 -			set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"[email protected]"}
   6.794 -			shift
   6.795 -			;;
   6.796 -
   6.797 -      -\?|-h)		func_usage					;;
   6.798 -      --help)		opt_help=:					;;
   6.799 -      --version)	func_version					;;
   6.800 -
   6.801 -      -*)		func_fatal_help "unrecognized option \`$opt'"	;;
   6.802 -
   6.803 -      *)		nonopt="$opt"
   6.804 -			break
   6.805 -			;;
   6.806 -    esac
   6.807 -  done
   6.808 -
   6.809 -
   6.810 -  case $host in
   6.811 -    *cygwin* | *mingw* | *pw32*)
   6.812 -      # don't eliminate duplications in $postdeps and $predeps
   6.813 -      opt_duplicate_compiler_generated_deps=:
   6.814 -      ;;
   6.815 -    *)
   6.816 -      opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
   6.817 -      ;;
   6.818 -  esac
   6.819 -
   6.820 -  # Having warned about all mis-specified options, bail out if
   6.821 -  # anything was wrong.
   6.822 -  $exit_cmd $EXIT_FAILURE
   6.823 -}
   6.824 -
   6.825 -# func_check_version_match
   6.826 -# Ensure that we are using m4 macros, and libtool script from the same
   6.827 -# release of libtool.
   6.828 -func_check_version_match ()
   6.829 -{
   6.830 -  if test "$package_revision" != "$macro_revision"; then
   6.831 -    if test "$VERSION" != "$macro_version"; then
   6.832 -      if test -z "$macro_version"; then
   6.833 -        cat >&2 <<_LT_EOF
   6.834 -$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
   6.835 -$progname: definition of this LT_INIT comes from an older release.
   6.836 -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
   6.837 -$progname: and run autoconf again.
   6.838 -_LT_EOF
   6.839 -      else
   6.840 -        cat >&2 <<_LT_EOF
   6.841 -$progname: Version mismatch error.  This is $PACKAGE $VERSION, but the
   6.842 -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
   6.843 -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
   6.844 -$progname: and run autoconf again.
   6.845 -_LT_EOF
   6.846 -      fi
   6.847 -    else
   6.848 -      cat >&2 <<_LT_EOF
   6.849 -$progname: Version mismatch error.  This is $PACKAGE $VERSION, revision $package_revision,
   6.850 -$progname: but the definition of this LT_INIT comes from revision $macro_revision.
   6.851 -$progname: You should recreate aclocal.m4 with macros from revision $package_revision
   6.852 -$progname: of $PACKAGE $VERSION and run autoconf again.
   6.853 -_LT_EOF
   6.854 -    fi
   6.855 -
   6.856 -    exit $EXIT_MISMATCH
   6.857 -  fi
   6.858 -}
   6.859 -
   6.860 -
   6.861 -## ----------- ##
   6.862 -##    Main.    ##
   6.863 -## ----------- ##
   6.864 -
   6.865 -$opt_help || {
   6.866 -  # Sanity checks first:
   6.867 -  func_check_version_match
   6.868 -
   6.869 -  if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
   6.870 -    func_fatal_configuration "not configured to build any kind of library"
   6.871 -  fi
   6.872 -
   6.873 -  test -z "$mode" && func_fatal_error "error: you must specify a MODE."
   6.874 -
   6.875 -
   6.876 -  # Darwin sucks
   6.877 -  eval std_shrext=\"$shrext_cmds\"
   6.878 -
   6.879 -
   6.880 -  # Only execute mode is allowed to have -dlopen flags.
   6.881 -  if test -n "$execute_dlfiles" && test "$mode" != execute; then
   6.882 -    func_error "unrecognized option \`-dlopen'"
   6.883 -    $ECHO "$help" 1>&2
   6.884 -    exit $EXIT_FAILURE
   6.885 -  fi
   6.886 -
   6.887 -  # Change the help message to a mode-specific one.
   6.888 -  generic_help="$help"
   6.889 -  help="Try \`$progname --help --mode=$mode' for more information."
   6.890 -}
   6.891 -
   6.892 -
   6.893 -# func_lalib_p file
   6.894 -# True iff FILE is a libtool `.la' library or `.lo' object file.
   6.895 -# This function is only a basic sanity check; it will hardly flush out
   6.896 -# determined imposters.
   6.897 -func_lalib_p ()
   6.898 -{
   6.899 -    $SED -e 4q "$1" 2>/dev/null \
   6.900 -      | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
   6.901 -}
   6.902 -
   6.903 -# func_lalib_unsafe_p file
   6.904 -# True iff FILE is a libtool `.la' library or `.lo' object file.
   6.905 -# This function implements the same check as func_lalib_p without
   6.906 -# resorting to external programs.  To this end, it redirects stdin and
   6.907 -# closes it afterwards, without saving the original file descriptor.
   6.908 -# As a safety measure, use it only where a negative result would be
   6.909 -# fatal anyway.  Works if `file' does not exist.
   6.910 -func_lalib_unsafe_p ()
   6.911 -{
   6.912 -    lalib_p=no
   6.913 -    if test -r "$1" && exec 5<&0 <"$1"; then
   6.914 -	for lalib_p_l in 1 2 3 4
   6.915 -	do
   6.916 -	    read lalib_p_line
   6.917 -	    case "$lalib_p_line" in
   6.918 -		\#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
   6.919 -	    esac
   6.920 -	done
   6.921 -	exec 0<&5 5<&-
   6.922 -    fi
   6.923 -    test "$lalib_p" = yes
   6.924 -}
   6.925 -
   6.926 -# func_ltwrapper_script_p file
   6.927 -# True iff FILE is a libtool wrapper script
   6.928 -# This function is only a basic sanity check; it will hardly flush out
   6.929 -# determined imposters.
   6.930 -func_ltwrapper_script_p ()
   6.931 -{
   6.932 -    func_lalib_p "$1"
   6.933 -}
   6.934 -
   6.935 -# func_ltwrapper_executable_p file
   6.936 -# True iff FILE is a libtool wrapper executable
   6.937 -# This function is only a basic sanity check; it will hardly flush out
   6.938 -# determined imposters.
   6.939 -func_ltwrapper_executable_p ()
   6.940 -{
   6.941 -    func_ltwrapper_exec_suffix=
   6.942 -    case $1 in
   6.943 -    *.exe) ;;
   6.944 -    *) func_ltwrapper_exec_suffix=.exe ;;
   6.945 -    esac
   6.946 -    $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
   6.947 -}
   6.948 -
   6.949 -# func_ltwrapper_scriptname file
   6.950 -# Assumes file is an ltwrapper_executable
   6.951 -# uses $file to determine the appropriate filename for a
   6.952 -# temporary ltwrapper_script.
   6.953 -func_ltwrapper_scriptname ()
   6.954 -{
   6.955 -    func_ltwrapper_scriptname_result=""
   6.956 -    if func_ltwrapper_executable_p "$1"; then
   6.957 -	func_dirname_and_basename "$1" "" "."
   6.958 -	func_stripname '' '.exe' "$func_basename_result"
   6.959 -	func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
   6.960 -    fi
   6.961 -}
   6.962 -
   6.963 -# func_ltwrapper_p file
   6.964 -# True iff FILE is a libtool wrapper script or wrapper executable
   6.965 -# This function is only a basic sanity check; it will hardly flush out
   6.966 -# determined imposters.
   6.967 -func_ltwrapper_p ()
   6.968 -{
   6.969 -    func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
   6.970 -}
   6.971 -
   6.972 -
   6.973 -# func_execute_cmds commands fail_cmd
   6.974 -# Execute tilde-delimited COMMANDS.
   6.975 -# If FAIL_CMD is given, eval that upon failure.
   6.976 -# FAIL_CMD may read-access the current command in variable CMD!
   6.977 -func_execute_cmds ()
   6.978 -{
   6.979 -    $opt_debug
   6.980 -    save_ifs=$IFS; IFS='~'
   6.981 -    for cmd in $1; do
   6.982 -      IFS=$save_ifs
   6.983 -      eval cmd=\"$cmd\"
   6.984 -      func_show_eval "$cmd" "${2-:}"
   6.985 -    done
   6.986 -    IFS=$save_ifs
   6.987 -}
   6.988 -
   6.989 -
   6.990 -# func_source file
   6.991 -# Source FILE, adding directory component if necessary.
   6.992 -# Note that it is not necessary on cygwin/mingw to append a dot to
   6.993 -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
   6.994 -# behavior happens only for exec(3), not for open(2)!  Also, sourcing
   6.995 -# `FILE.' does not work on cygwin managed mounts.
   6.996 -func_source ()
   6.997 -{
   6.998 -    $opt_debug
   6.999 -    case $1 in
  6.1000 -    */* | *\\*)	. "$1" ;;
  6.1001 -    *)		. "./$1" ;;
  6.1002 -    esac
  6.1003 -}
  6.1004 -
  6.1005 -
  6.1006 -# func_infer_tag arg
  6.1007 -# Infer tagged configuration to use if any are available and
  6.1008 -# if one wasn't chosen via the "--tag" command line option.
  6.1009 -# Only attempt this if the compiler in the base compile
  6.1010 -# command doesn't match the default compiler.
  6.1011 -# arg is usually of the form 'gcc ...'
  6.1012 -func_infer_tag ()
  6.1013 -{
  6.1014 -    $opt_debug
  6.1015 -    if test -n "$available_tags" && test -z "$tagname"; then
  6.1016 -      CC_quoted=
  6.1017 -      for arg in $CC; do
  6.1018 -        func_quote_for_eval "$arg"
  6.1019 -	CC_quoted="$CC_quoted $func_quote_for_eval_result"
  6.1020 -      done
  6.1021 -      case [email protected] in
  6.1022 -      # Blanks in the command may have been stripped by the calling shell,
  6.1023 -      # but not from the CC environment variable when configure was run.
  6.1024 -      " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
  6.1025 -      # Blanks at the start of $base_compile will cause this to fail
  6.1026 -      # if we don't check for them as well.
  6.1027 -      *)
  6.1028 -	for z in $available_tags; do
  6.1029 -	  if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
  6.1030 -	    # Evaluate the configuration.
  6.1031 -	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
  6.1032 -	    CC_quoted=
  6.1033 -	    for arg in $CC; do
  6.1034 -	      # Double-quote args containing other shell metacharacters.
  6.1035 -	      func_quote_for_eval "$arg"
  6.1036 -	      CC_quoted="$CC_quoted $func_quote_for_eval_result"
  6.1037 -	    done
  6.1038 -	    case "[email protected] " in
  6.1039 -	      " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
  6.1040 -	      # The compiler in the base compile command matches
  6.1041 -	      # the one in the tagged configuration.
  6.1042 -	      # Assume this is the tagged configuration we want.
  6.1043 -	      tagname=$z
  6.1044 -	      break
  6.1045 -	      ;;
  6.1046 -	    esac
  6.1047 -	  fi
  6.1048 -	done
  6.1049 -	# If $tagname still isn't set, then no tagged configuration
  6.1050 -	# was found and let the user know that the "--tag" command
  6.1051 -	# line option must be used.
  6.1052 -	if test -z "$tagname"; then
  6.1053 -	  func_echo "unable to infer tagged configuration"
  6.1054 -	  func_fatal_error "specify a tag with \`--tag'"
  6.1055 -#	else
  6.1056 -#	  func_verbose "using $tagname tagged configuration"
  6.1057 -	fi
  6.1058 -	;;
  6.1059 -      esac
  6.1060 -    fi
  6.1061 -}
  6.1062 -
  6.1063 -
  6.1064 -
  6.1065 -# func_write_libtool_object output_name pic_name nonpic_name
  6.1066 -# Create a libtool object file (analogous to a ".la" file),
  6.1067 -# but don't create it if we're doing a dry run.
  6.1068 -func_write_libtool_object ()
  6.1069 -{
  6.1070 -    write_libobj=${1}
  6.1071 -    if test "$build_libtool_libs" = yes; then
  6.1072 -      write_lobj=\'${2}\'
  6.1073 -    else
  6.1074 -      write_lobj=none
  6.1075 -    fi
  6.1076 -
  6.1077 -    if test "$build_old_libs" = yes; then
  6.1078 -      write_oldobj=\'${3}\'
  6.1079 -    else
  6.1080 -      write_oldobj=none
  6.1081 -    fi
  6.1082 -
  6.1083 -    $opt_dry_run || {
  6.1084 -      cat >${write_libobj}T <<EOF
  6.1085 -# $write_libobj - a libtool object file
  6.1086 -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
  6.1087 -#
  6.1088 -# Please DO NOT delete this file!
  6.1089 -# It is necessary for linking the library.
  6.1090 -
  6.1091 -# Name of the PIC object.
  6.1092 -pic_object=$write_lobj
  6.1093 -
  6.1094 -# Name of the non-PIC object
  6.1095 -non_pic_object=$write_oldobj
  6.1096 -
  6.1097 -EOF
  6.1098 -      $MV "${write_libobj}T" "${write_libobj}"
  6.1099 -    }
  6.1100 -}
  6.1101 -
  6.1102 -# func_mode_compile arg...
  6.1103 -func_mode_compile ()
  6.1104 -{
  6.1105 -    $opt_debug
  6.1106 -    # Get the compilation command and the source file.
  6.1107 -    base_compile=
  6.1108 -    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
  6.1109 -    suppress_opt=yes
  6.1110 -    suppress_output=
  6.1111 -    arg_mode=normal
  6.1112 -    libobj=
  6.1113 -    later=
  6.1114 -    pie_flag=
  6.1115 -
  6.1116 -    for arg
  6.1117 -    do
  6.1118 -      case $arg_mode in
  6.1119 -      arg  )
  6.1120 -	# do not "continue".  Instead, add this to base_compile
  6.1121 -	lastarg="$arg"
  6.1122 -	arg_mode=normal
  6.1123 -	;;
  6.1124 -
  6.1125 -      target )
  6.1126 -	libobj="$arg"
  6.1127 -	arg_mode=normal
  6.1128 -	continue
  6.1129 -	;;
  6.1130 -
  6.1131 -      normal )
  6.1132 -	# Accept any command-line options.
  6.1133 -	case $arg in
  6.1134 -	-o)
  6.1135 -	  test -n "$libobj" && \
  6.1136 -	    func_fatal_error "you cannot specify \`-o' more than once"
  6.1137 -	  arg_mode=target
  6.1138 -	  continue
  6.1139 -	  ;;
  6.1140 -
  6.1141 -	-pie | -fpie | -fPIE)
  6.1142 -          pie_flag="$pie_flag $arg"
  6.1143 -	  continue
  6.1144 -	  ;;
  6.1145 -
  6.1146 -	-shared | -static | -prefer-pic | -prefer-non-pic)
  6.1147 -	  later="$later $arg"
  6.1148 -	  continue
  6.1149 -	  ;;
  6.1150 -
  6.1151 -	-no-suppress)
  6.1152 -	  suppress_opt=no
  6.1153 -	  continue
  6.1154 -	  ;;
  6.1155 -
  6.1156 -	-Xcompiler)
  6.1157 -	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
  6.1158 -	  continue      #  The current "srcfile" will either be retained or
  6.1159 -	  ;;            #  replaced later.  I would guess that would be a bug.
  6.1160 -
  6.1161 -	-Wc,*)
  6.1162 -	  func_stripname '-Wc,' '' "$arg"
  6.1163 -	  args=$func_stripname_result
  6.1164 -	  lastarg=
  6.1165 -	  save_ifs="$IFS"; IFS=','
  6.1166 -	  for arg in $args; do
  6.1167 -	    IFS="$save_ifs"
  6.1168 -	    func_quote_for_eval "$arg"
  6.1169 -	    lastarg="$lastarg $func_quote_for_eval_result"
  6.1170 -	  done
  6.1171 -	  IFS="$save_ifs"
  6.1172 -	  func_stripname ' ' '' "$lastarg"
  6.1173 -	  lastarg=$func_stripname_result
  6.1174 -
  6.1175 -	  # Add the arguments to base_compile.
  6.1176 -	  base_compile="$base_compile $lastarg"
  6.1177 -	  continue
  6.1178 -	  ;;
  6.1179 -
  6.1180 -	*)
  6.1181 -	  # Accept the current argument as the source file.
  6.1182 -	  # The previous "srcfile" becomes the current argument.
  6.1183 -	  #
  6.1184 -	  lastarg="$srcfile"
  6.1185 -	  srcfile="$arg"
  6.1186 -	  ;;
  6.1187 -	esac  #  case $arg
  6.1188 -	;;
  6.1189 -      esac    #  case $arg_mode
  6.1190 -
  6.1191 -      # Aesthetically quote the previous argument.
  6.1192 -      func_quote_for_eval "$lastarg"
  6.1193 -      base_compile="$base_compile $func_quote_for_eval_result"
  6.1194 -    done # for arg
  6.1195 -
  6.1196 -    case $arg_mode in
  6.1197 -    arg)
  6.1198 -      func_fatal_error "you must specify an argument for -Xcompile"
  6.1199 -      ;;
  6.1200 -    target)
  6.1201 -      func_fatal_error "you must specify a target with \`-o'"
  6.1202 -      ;;
  6.1203 -    *)
  6.1204 -      # Get the name of the library object.
  6.1205 -      test -z "$libobj" && {
  6.1206 -	func_basename "$srcfile"
  6.1207 -	libobj="$func_basename_result"
  6.1208 -      }
  6.1209 -      ;;
  6.1210 -    esac
  6.1211 -
  6.1212 -    # Recognize several different file suffixes.
  6.1213 -    # If the user specifies -o file.o, it is replaced with file.lo
  6.1214 -    case $libobj in
  6.1215 -    *.[cCFSifmso] | \
  6.1216 -    *.ada | *.adb | *.ads | *.asm | \
  6.1217 -    *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
  6.1218 -    *.[fF][09]? | *.for | *.java | *.obj | *.sx)
  6.1219 -      func_xform "$libobj"
  6.1220 -      libobj=$func_xform_result
  6.1221 -      ;;
  6.1222 -    esac
  6.1223 -
  6.1224 -    case $libobj in
  6.1225 -    *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
  6.1226 -    *)
  6.1227 -      func_fatal_error "cannot determine name of library object from \`$libobj'"
  6.1228 -      ;;
  6.1229 -    esac
  6.1230 -
  6.1231 -    func_infer_tag $base_compile
  6.1232 -
  6.1233 -    for arg in $later; do
  6.1234 -      case $arg in
  6.1235 -      -shared)
  6.1236 -	test "$build_libtool_libs" != yes && \
  6.1237 -	  func_fatal_configuration "can not build a shared library"
  6.1238 -	build_old_libs=no
  6.1239 -	continue
  6.1240 -	;;
  6.1241 -
  6.1242 -      -static)
  6.1243 -	build_libtool_libs=no
  6.1244 -	build_old_libs=yes
  6.1245 -	continue
  6.1246 -	;;
  6.1247 -
  6.1248 -      -prefer-pic)
  6.1249 -	pic_mode=yes
  6.1250 -	continue
  6.1251 -	;;
  6.1252 -
  6.1253 -      -prefer-non-pic)
  6.1254 -	pic_mode=no
  6.1255 -	continue
  6.1256 -	;;
  6.1257 -      esac
  6.1258 -    done
  6.1259 -
  6.1260 -    func_quote_for_eval "$libobj"
  6.1261 -    test "X$libobj" != "X$func_quote_for_eval_result" \
  6.1262 -      && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"'	 &()|`$[]' \
  6.1263 -      && func_warning "libobj name \`$libobj' may not contain shell special characters."
  6.1264 -    func_dirname_and_basename "$obj" "/" ""
  6.1265 -    objname="$func_basename_result"
  6.1266 -    xdir="$func_dirname_result"
  6.1267 -    lobj=${xdir}$objdir/$objname
  6.1268 -
  6.1269 -    test -z "$base_compile" && \
  6.1270 -      func_fatal_help "you must specify a compilation command"
  6.1271 -
  6.1272 -    # Delete any leftover library objects.
  6.1273 -    if test "$build_old_libs" = yes; then
  6.1274 -      removelist="$obj $lobj $libobj ${libobj}T"
  6.1275 -    else
  6.1276 -      removelist="$lobj $libobj ${libobj}T"
  6.1277 -    fi
  6.1278 -
  6.1279 -    # On Cygwin there's no "real" PIC flag so we must build both object types
  6.1280 -    case $host_os in
  6.1281 -    cygwin* | mingw* | pw32* | os2*)
  6.1282 -      pic_mode=default
  6.1283 -      ;;
  6.1284 -    esac
  6.1285 -    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
  6.1286 -      # non-PIC code in shared libraries is not supported
  6.1287 -      pic_mode=default
  6.1288 -    fi
  6.1289 -
  6.1290 -    # Calculate the filename of the output object if compiler does
  6.1291 -    # not support -o with -c
  6.1292 -    if test "$compiler_c_o" = no; then
  6.1293 -      output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
  6.1294 -      lockfile="$output_obj.lock"
  6.1295 -    else
  6.1296 -      output_obj=
  6.1297 -      need_locks=no
  6.1298 -      lockfile=
  6.1299 -    fi
  6.1300 -
  6.1301 -    # Lock this critical section if it is needed
  6.1302 -    # We use this script file to make the link, it avoids creating a new file
  6.1303 -    if test "$need_locks" = yes; then
  6.1304 -      until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
  6.1305 -	func_echo "Waiting for $lockfile to be removed"
  6.1306 -	sleep 2
  6.1307 -      done
  6.1308 -    elif test "$need_locks" = warn; then
  6.1309 -      if test -f "$lockfile"; then
  6.1310 -	$ECHO "\
  6.1311 -*** ERROR, $lockfile exists and contains:
  6.1312 -`cat $lockfile 2>/dev/null`
  6.1313 -
  6.1314 -This indicates that another process is trying to use the same
  6.1315 -temporary object file, and libtool could not work around it because
  6.1316 -your compiler does not support \`-c' and \`-o' together.  If you
  6.1317 -repeat this compilation, it may succeed, by chance, but you had better
  6.1318 -avoid parallel builds (make -j) in this platform, or get a better
  6.1319 -compiler."
  6.1320 -
  6.1321 -	$opt_dry_run || $RM $removelist
  6.1322 -	exit $EXIT_FAILURE
  6.1323 -      fi
  6.1324 -      removelist="$removelist $output_obj"
  6.1325 -      $ECHO "$srcfile" > "$lockfile"
  6.1326 -    fi
  6.1327 -
  6.1328 -    $opt_dry_run || $RM $removelist
  6.1329 -    removelist="$removelist $lockfile"
  6.1330 -    trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
  6.1331 -
  6.1332 -    if test -n "$fix_srcfile_path"; then
  6.1333 -      eval srcfile=\"$fix_srcfile_path\"
  6.1334 -    fi
  6.1335 -    func_quote_for_eval "$srcfile"
  6.1336 -    qsrcfile=$func_quote_for_eval_result
  6.1337 -
  6.1338 -    # Only build a PIC object if we are building libtool libraries.
  6.1339 -    if test "$build_libtool_libs" = yes; then
  6.1340 -      # Without this assignment, base_compile gets emptied.
  6.1341 -      fbsd_hideous_sh_bug=$base_compile
  6.1342 -
  6.1343 -      if test "$pic_mode" != no; then
  6.1344 -	command="$base_compile $qsrcfile $pic_flag"
  6.1345 -      else
  6.1346 -	# Don't build PIC code
  6.1347 -	command="$base_compile $qsrcfile"
  6.1348 -      fi
  6.1349 -
  6.1350 -      func_mkdir_p "$xdir$objdir"
  6.1351 -
  6.1352 -      if test -z "$output_obj"; then
  6.1353 -	# Place PIC objects in $objdir
  6.1354 -	command="$command -o $lobj"
  6.1355 -      fi
  6.1356 -
  6.1357 -      func_show_eval_locale "$command"	\
  6.1358 -          'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
  6.1359 -
  6.1360 -      if test "$need_locks" = warn &&
  6.1361 -	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
  6.1362 -	$ECHO "\
  6.1363 -*** ERROR, $lockfile contains:
  6.1364 -`cat $lockfile 2>/dev/null`
  6.1365 -
  6.1366 -but it should contain:
  6.1367 -$srcfile
  6.1368 -
  6.1369 -This indicates that another process is trying to use the same
  6.1370 -temporary object file, and libtool could not work around it because
  6.1371 -your compiler does not support \`-c' and \`-o' together.  If you
  6.1372 -repeat this compilation, it may succeed, by chance, but you had better
  6.1373 -avoid parallel builds (make -j) in this platform, or get a better
  6.1374 -compiler."
  6.1375 -
  6.1376 -	$opt_dry_run || $RM $removelist
  6.1377 -	exit $EXIT_FAILURE
  6.1378 -      fi
  6.1379 -
  6.1380 -      # Just move the object if needed, then go on to compile the next one
  6.1381 -      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
  6.1382 -	func_show_eval '$MV "$output_obj" "$lobj"' \
  6.1383 -	  'error=$?; $opt_dry_run || $RM $removelist; exit $error'
  6.1384 -      fi
  6.1385 -
  6.1386 -      # Allow error messages only from the first compilation.
  6.1387 -      if test "$suppress_opt" = yes; then
  6.1388 -	suppress_output=' >/dev/null 2>&1'
  6.1389 -      fi
  6.1390 -    fi
  6.1391 -
  6.1392 -    # Only build a position-dependent object if we build old libraries.
  6.1393 -    if test "$build_old_libs" = yes; then
  6.1394 -      if test "$pic_mode" != yes; then
  6.1395 -	# Don't build PIC code
  6.1396 -	command="$base_compile $qsrcfile$pie_flag"
  6.1397 -      else
  6.1398 -	command="$base_compile $qsrcfile $pic_flag"
  6.1399 -      fi
  6.1400 -      if test "$compiler_c_o" = yes; then
  6.1401 -	command="$command -o $obj"
  6.1402 -      fi
  6.1403 -
  6.1404 -      # Suppress compiler output if we already did a PIC compilation.
  6.1405 -      command="$command$suppress_output"
  6.1406 -      func_show_eval_locale "$command" \
  6.1407 -        '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
  6.1408 -
  6.1409 -      if test "$need_locks" = warn &&
  6.1410 -	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
  6.1411 -	$ECHO "\
  6.1412 -*** ERROR, $lockfile contains:
  6.1413 -`cat $lockfile 2>/dev/null`
  6.1414 -
  6.1415 -but it should contain:
  6.1416 -$srcfile
  6.1417 -
  6.1418 -This indicates that another process is trying to use the same
  6.1419 -temporary object file, and libtool could not work around it because
  6.1420 -your compiler does not support \`-c' and \`-o' together.  If you
  6.1421 -repeat this compilation, it may succeed, by chance, but you had better
  6.1422 -avoid parallel builds (make -j) in this platform, or get a better
  6.1423 -compiler."
  6.1424 -
  6.1425 -	$opt_dry_run || $RM $removelist
  6.1426 -	exit $EXIT_FAILURE
  6.1427 -      fi
  6.1428 -
  6.1429 -      # Just move the object if needed
  6.1430 -      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
  6.1431 -	func_show_eval '$MV "$output_obj" "$obj"' \
  6.1432 -	  'error=$?; $opt_dry_run || $RM $removelist; exit $error'
  6.1433 -      fi
  6.1434 -    fi
  6.1435 -
  6.1436 -    $opt_dry_run || {
  6.1437 -      func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
  6.1438 -
  6.1439 -      # Unlock the critical section if it was locked
  6.1440 -      if test "$need_locks" != no; then
  6.1441 -	removelist=$lockfile
  6.1442 -        $RM "$lockfile"
  6.1443 -      fi
  6.1444 -    }
  6.1445 -
  6.1446 -    exit $EXIT_SUCCESS
  6.1447 -}
  6.1448 -
  6.1449 -$opt_help || {
  6.1450 -test "$mode" = compile && func_mode_compile ${1+"[email protected]"}
  6.1451 -}
  6.1452 -
  6.1453 -func_mode_help ()
  6.1454 -{
  6.1455 -    # We need to display help for each of the modes.
  6.1456 -    case $mode in
  6.1457 -      "")
  6.1458 -        # Generic help is extracted from the usage comments
  6.1459 -        # at the start of this file.
  6.1460 -        func_help
  6.1461 -        ;;
  6.1462 -
  6.1463 -      clean)
  6.1464 -        $ECHO \
  6.1465 -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
  6.1466 -
  6.1467 -Remove files from the build directory.
  6.1468 -
  6.1469 -RM is the name of the program to use to delete files associated with each FILE
  6.1470 -(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
  6.1471 -to RM.
  6.1472 -
  6.1473 -If FILE is a libtool library, object or program, all the files associated
  6.1474 -with it are deleted. Otherwise, only FILE itself is deleted using RM."
  6.1475 -        ;;
  6.1476 -
  6.1477 -      compile)
  6.1478 -      $ECHO \
  6.1479 -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
  6.1480 -
  6.1481 -Compile a source file into a libtool library object.
  6.1482 -
  6.1483 -This mode accepts the following additional options:
  6.1484 -
  6.1485 -  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
  6.1486 -  -no-suppress      do not suppress compiler output for multiple passes
  6.1487 -  -prefer-pic       try to building PIC objects only
  6.1488 -  -prefer-non-pic   try to building non-PIC objects only
  6.1489 -  -shared           do not build a \`.o' file suitable for static linking
  6.1490 -  -static           only build a \`.o' file suitable for static linking
  6.1491 -
  6.1492 -COMPILE-COMMAND is a command to be used in creating a \`standard' object file
  6.1493 -from the given SOURCEFILE.
  6.1494 -
  6.1495 -The output file name is determined by removing the directory component from
  6.1496 -SOURCEFILE, then substituting the C source code suffix \`.c' with the
  6.1497 -library object suffix, \`.lo'."
  6.1498 -        ;;
  6.1499 -
  6.1500 -      execute)
  6.1501 -        $ECHO \
  6.1502 -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
  6.1503 -
  6.1504 -Automatically set library path, then run a program.
  6.1505 -
  6.1506 -This mode accepts the following additional options:
  6.1507 -
  6.1508 -  -dlopen FILE      add the directory containing FILE to the library path
  6.1509 -
  6.1510 -This mode sets the library path environment variable according to \`-dlopen'
  6.1511 -flags.
  6.1512 -
  6.1513 -If any of the ARGS are libtool executable wrappers, then they are translated
  6.1514 -into their corresponding uninstalled binary, and any of their required library
  6.1515 -directories are added to the library path.
  6.1516 -
  6.1517 -Then, COMMAND is executed, with ARGS as arguments."
  6.1518 -        ;;
  6.1519 -
  6.1520 -      finish)
  6.1521 -        $ECHO \
  6.1522 -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
  6.1523 -
  6.1524 -Complete the installation of libtool libraries.
  6.1525 -
  6.1526 -Each LIBDIR is a directory that contains libtool libraries.
  6.1527 -
  6.1528 -The commands that this mode executes may require superuser privileges.  Use
  6.1529 -the \`--dry-run' option if you just want to see what would be executed."
  6.1530 -        ;;
  6.1531 -
  6.1532 -      install)
  6.1533 -        $ECHO \
  6.1534 -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
  6.1535 -
  6.1536 -Install executables or libraries.
  6.1537 -
  6.1538 -INSTALL-COMMAND is the installation command.  The first component should be
  6.1539 -either the \`install' or \`cp' program.
  6.1540 -
  6.1541 -The following components of INSTALL-COMMAND are treated specially:
  6.1542 -
  6.1543 -  -inst-prefix PREFIX-DIR  Use PREFIX-DIR as a staging area for installation
  6.1544 -
  6.1545 -The rest of the components are interpreted as arguments to that command (only
  6.1546 -BSD-compatible install options are recognized)."
  6.1547 -        ;;
  6.1548 -
  6.1549 -      link)
  6.1550 -        $ECHO \
  6.1551 -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
  6.1552 -
  6.1553 -Link object files or libraries together to form another library, or to
  6.1554 -create an executable program.
  6.1555 -
  6.1556 -LINK-COMMAND is a command using the C compiler that you would use to create
  6.1557 -a program from several object files.
  6.1558 -
  6.1559 -The following components of LINK-COMMAND are treated specially:
  6.1560 -
  6.1561 -  -all-static       do not do any dynamic linking at all
  6.1562 -  -avoid-version    do not add a version suffix if possible
  6.1563 -  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
  6.1564 -  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
  6.1565 -  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
  6.1566 -  -export-symbols SYMFILE
  6.1567 -                    try to export only the symbols listed in SYMFILE
  6.1568 -  -export-symbols-regex REGEX
  6.1569 -                    try to export only the symbols matching REGEX
  6.1570 -  -LLIBDIR          search LIBDIR for required installed libraries
  6.1571 -  -lNAME            OUTPUT-FILE requires the installed library libNAME
  6.1572 -  -module           build a library that can dlopened
  6.1573 -  -no-fast-install  disable the fast-install mode
  6.1574 -  -no-install       link a not-installable executable
  6.1575 -  -no-undefined     declare that a library does not refer to external symbols
  6.1576 -  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
  6.1577 -  -objectlist FILE  Use a list of object files found in FILE to specify objects
  6.1578 -  -precious-files-regex REGEX
  6.1579 -                    don't remove output files matching REGEX
  6.1580 -  -release RELEASE  specify package release information
  6.1581 -  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
  6.1582 -  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
  6.1583 -  -shared           only do dynamic linking of libtool libraries
  6.1584 -  -shrext SUFFIX    override the standard shared library file extension
  6.1585 -  -static           do not do any dynamic linking of uninstalled libtool libraries
  6.1586 -  -static-libtool-libs
  6.1587 -                    do not do any dynamic linking of libtool libraries
  6.1588 -  -version-info CURRENT[:REVISION[:AGE]]
  6.1589 -                    specify library version info [each variable defaults to 0]
  6.1590 -  -weak LIBNAME     declare that the target provides the LIBNAME interface
  6.1591 -
  6.1592 -All other options (arguments beginning with \`-') are ignored.
  6.1593 -
  6.1594 -Every other argument is treated as a filename.  Files ending in \`.la' are
  6.1595 -treated as uninstalled libtool libraries, other files are standard or library
  6.1596 -object files.
  6.1597 -
  6.1598 -If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
  6.1599 -only library objects (\`.lo' files) may be specified, and \`-rpath' is
  6.1600 -required, except when creating a convenience library.
  6.1601 -
  6.1602 -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
  6.1603 -using \`ar' and \`ranlib', or on Windows using \`lib'.
  6.1604 -
  6.1605 -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
  6.1606 -is created, otherwise an executable program is created."
  6.1607 -        ;;
  6.1608 -
  6.1609 -      uninstall)
  6.1610 -        $ECHO \
  6.1611 -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
  6.1612 -
  6.1613 -Remove libraries from an installation directory.
  6.1614 -
  6.1615 -RM is the name of the program to use to delete files associated with each FILE
  6.1616 -(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
  6.1617 -to RM.
  6.1618 -
  6.1619 -If FILE is a libtool library, all the files associated with it are deleted.
  6.1620 -Otherwise, only FILE itself is deleted using RM."
  6.1621 -        ;;
  6.1622 -
  6.1623 -      *)
  6.1624 -        func_fatal_help "invalid operation mode \`$mode'"
  6.1625 -        ;;
  6.1626 -    esac
  6.1627 -
  6.1628 -    $ECHO
  6.1629 -    $ECHO "Try \`$progname --help' for more information about other modes."
  6.1630 -
  6.1631 -    exit $?
  6.1632 -}
  6.1633 -
  6.1634 -  # Now that we've collected a possible --mode arg, show help if necessary
  6.1635 -  $opt_help && func_mode_help
  6.1636 -
  6.1637 -
  6.1638 -# func_mode_execute arg...
  6.1639 -func_mode_execute ()
  6.1640 -{
  6.1641 -    $opt_debug
  6.1642 -    # The first argument is the command name.
  6.1643 -    cmd="$nonopt"
  6.1644 -    test -z "$cmd" && \
  6.1645 -      func_fatal_help "you must specify a COMMAND"
  6.1646 -
  6.1647 -    # Handle -dlopen flags immediately.
  6.1648 -    for file in $execute_dlfiles; do
  6.1649 -      test -f "$file" \
  6.1650 -	|| func_fatal_help "\`$file' is not a file"
  6.1651 -
  6.1652 -      dir=
  6.1653 -      case $file in
  6.1654 -      *.la)
  6.1655 -	# Check to see that this really is a libtool archive.
  6.1656 -	func_lalib_unsafe_p "$file" \
  6.1657 -	  || func_fatal_help "\`$lib' is not a valid libtool archive"
  6.1658 -
  6.1659 -	# Read the libtool library.
  6.1660 -	dlname=
  6.1661 -	library_names=
  6.1662 -	func_source "$file"
  6.1663 -
  6.1664 -	# Skip this library if it cannot be dlopened.
  6.1665 -	if test -z "$dlname"; then
  6.1666 -	  # Warn if it was a shared library.
  6.1667 -	  test -n "$library_names" && \
  6.1668 -	    func_warning "\`$file' was not linked with \`-export-dynamic'"
  6.1669 -	  continue
  6.1670 -	fi
  6.1671 -
  6.1672 -	func_dirname "$file" "" "."
  6.1673 -	dir="$func_dirname_result"
  6.1674 -
  6.1675 -	if test -f "$dir/$objdir/$dlname"; then
  6.1676 -	  dir="$dir/$objdir"
  6.1677 -	else
  6.1678 -	  if test ! -f "$dir/$dlname"; then
  6.1679 -	    func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
  6.1680 -	  fi
  6.1681 -	fi
  6.1682 -	;;
  6.1683 -
  6.1684 -      *.lo)
  6.1685 -	# Just add the directory containing the .lo file.
  6.1686 -	func_dirname "$file" "" "."
  6.1687 -	dir="$func_dirname_result"
  6.1688 -	;;
  6.1689 -
  6.1690 -      *)
  6.1691 -	func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
  6.1692 -	continue
  6.1693 -	;;
  6.1694 -      esac
  6.1695 -
  6.1696 -      # Get the absolute pathname.
  6.1697 -      absdir=`cd "$dir" && pwd`
  6.1698 -      test -n "$absdir" && dir="$absdir"
  6.1699 -
  6.1700 -      # Now add the directory to shlibpath_var.
  6.1701 -      if eval "test -z \"\$$shlibpath_var\""; then
  6.1702 -	eval "$shlibpath_var=\"\$dir\""
  6.1703 -      else
  6.1704 -	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
  6.1705 -      fi
  6.1706 -    done
  6.1707 -
  6.1708 -    # This variable tells wrapper scripts just to set shlibpath_var
  6.1709 -    # rather than running their programs.
  6.1710 -    libtool_execute_magic="$magic"
  6.1711 -
  6.1712 -    # Check if any of the arguments is a wrapper script.
  6.1713 -    args=
  6.1714 -    for file
  6.1715 -    do
  6.1716 -      case $file in
  6.1717 -      -*) ;;
  6.1718 -      *)
  6.1719 -	# Do a test to see if this is really a libtool program.
  6.1720 -	if func_ltwrapper_script_p "$file"; then
  6.1721 -	  func_source "$file"
  6.1722 -	  # Transform arg to wrapped name.
  6.1723 -	  file="$progdir/$program"
  6.1724 -	elif func_ltwrapper_executable_p "$file"; then
  6.1725 -	  func_ltwrapper_scriptname "$file"
  6.1726 -	  func_source "$func_ltwrapper_scriptname_result"
  6.1727 -	  # Transform arg to wrapped name.
  6.1728 -	  file="$progdir/$program"
  6.1729 -	fi
  6.1730 -	;;
  6.1731 -      esac
  6.1732 -      # Quote arguments (to preserve shell metacharacters).
  6.1733 -      func_quote_for_eval "$file"
  6.1734 -      args="$args $func_quote_for_eval_result"
  6.1735 -    done
  6.1736 -
  6.1737 -    if test "X$opt_dry_run" = Xfalse; then
  6.1738 -      if test -n "$shlibpath_var"; then
  6.1739 -	# Export the shlibpath_var.
  6.1740 -	eval "export $shlibpath_var"
  6.1741 -      fi
  6.1742 -
  6.1743 -      # Restore saved environment variables
  6.1744 -      for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
  6.1745 -      do
  6.1746 -	eval "if test \"\${save_$lt_var+set}\" = set; then
  6.1747 -                $lt_var=\$save_$lt_var; export $lt_var
  6.1748 -	      else
  6.1749 -		$lt_unset $lt_var
  6.1750 -	      fi"
  6.1751 -      done
  6.1752 -
  6.1753 -      # Now prepare to actually exec the command.
  6.1754 -      exec_cmd="\$cmd$args"
  6.1755 -    else
  6.1756 -      # Display what would be done.
  6.1757 -      if test -n "$shlibpath_var"; then
  6.1758 -	eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
  6.1759 -	$ECHO "export $shlibpath_var"
  6.1760 -      fi
  6.1761 -      $ECHO "$cmd$args"
  6.1762 -      exit $EXIT_SUCCESS
  6.1763 -    fi
  6.1764 -}
  6.1765 -
  6.1766 -test "$mode" = execute && func_mode_execute ${1+"[email protected]"}
  6.1767 -
  6.1768 -
  6.1769 -# func_mode_finish arg...
  6.1770 -func_mode_finish ()
  6.1771 -{
  6.1772 -    $opt_debug
  6.1773 -    libdirs="$nonopt"
  6.1774 -    admincmds=
  6.1775 -
  6.1776 -    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
  6.1777 -      for dir
  6.1778 -      do
  6.1779 -	libdirs="$libdirs $dir"
  6.1780 -      done
  6.1781 -
  6.1782 -      for libdir in $libdirs; do
  6.1783 -	if test -n "$finish_cmds"; then
  6.1784 -	  # Do each command in the finish commands.
  6.1785 -	  func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
  6.1786 -'"$cmd"'"'
  6.1787 -	fi
  6.1788 -	if test -n "$finish_eval"; then
  6.1789 -	  # Do the single finish_eval.
  6.1790 -	  eval cmds=\"$finish_eval\"
  6.1791 -	  $opt_dry_run || eval "$cmds" || admincmds="$admincmds
  6.1792 -       $cmds"
  6.1793 -	fi
  6.1794 -      done
  6.1795 -    fi
  6.1796 -
  6.1797 -    # Exit here if they wanted silent mode.
  6.1798 -    $opt_silent && exit $EXIT_SUCCESS
  6.1799 -
  6.1800 -    $ECHO "X----------------------------------------------------------------------" | $Xsed
  6.1801 -    $ECHO "Libraries have been installed in:"
  6.1802 -    for libdir in $libdirs; do
  6.1803 -      $ECHO "   $libdir"
  6.1804 -    done
  6.1805 -    $ECHO
  6.1806 -    $ECHO "If you ever happen to want to link against installed libraries"
  6.1807 -    $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
  6.1808 -    $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
  6.1809 -    $ECHO "flag during linking and do at least one of the following:"
  6.1810 -    if test -n "$shlibpath_var"; then
  6.1811 -      $ECHO "   - add LIBDIR to the \`$shlibpath_var' environment variable"
  6.1812 -      $ECHO "     during execution"
  6.1813 -    fi
  6.1814 -    if test -n "$runpath_var"; then
  6.1815 -      $ECHO "   - add LIBDIR to the \`$runpath_var' environment variable"
  6.1816 -      $ECHO "     during linking"
  6.1817 -    fi
  6.1818 -    if test -n "$hardcode_libdir_flag_spec"; then
  6.1819 -      libdir=LIBDIR
  6.1820 -      eval flag=\"$hardcode_libdir_flag_spec\"
  6.1821 -
  6.1822 -      $ECHO "   - use the \`$flag' linker flag"
  6.1823 -    fi
  6.1824 -    if test -n "$admincmds"; then
  6.1825 -      $ECHO "   - have your system administrator run these commands:$admincmds"
  6.1826 -    fi
  6.1827 -    if test -f /etc/ld.so.conf; then
  6.1828 -      $ECHO "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
  6.1829 -    fi
  6.1830 -    $ECHO
  6.1831 -
  6.1832 -    $ECHO "See any operating system documentation about shared libraries for"
  6.1833 -    case $host in
  6.1834 -      solaris2.[6789]|solaris2.1[0-9])
  6.1835 -        $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
  6.1836 -	$ECHO "pages."
  6.1837 -	;;
  6.1838 -      *)
  6.1839 -        $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
  6.1840 -        ;;
  6.1841 -    esac
  6.1842 -    $ECHO "X----------------------------------------------------------------------" | $Xsed
  6.1843 -    exit $EXIT_SUCCESS
  6.1844 -}
  6.1845 -
  6.1846 -test "$mode" = finish && func_mode_finish ${1+"[email protected]"}
  6.1847 -
  6.1848 -
  6.1849 -# func_mode_install arg...
  6.1850 -func_mode_install ()
  6.1851 -{
  6.1852 -    $opt_debug
  6.1853 -    # There may be an optional sh(1) argument at the beginning of
  6.1854 -    # install_prog (especially on Windows NT).
  6.1855 -    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
  6.1856 -       # Allow the use of GNU shtool's install command.
  6.1857 -       $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
  6.1858 -      # Aesthetically quote it.
  6.1859 -      func_quote_for_eval "$nonopt"
  6.1860 -      install_prog="$func_quote_for_eval_result "
  6.1861 -      arg=$1
  6.1862 -      shift
  6.1863 -    else
  6.1864 -      install_prog=
  6.1865 -      arg=$nonopt
  6.1866 -    fi
  6.1867 -
  6.1868 -    # The real first argument should be the name of the installation program.
  6.1869 -    # Aesthetically quote it.
  6.1870 -    func_quote_for_eval "$arg"
  6.1871 -    install_prog="$install_prog$func_quote_for_eval_result"
  6.1872 -
  6.1873 -    # We need to accept at least all the BSD install flags.
  6.1874 -    dest=
  6.1875 -    files=
  6.1876 -    opts=
  6.1877 -    prev=
  6.1878 -    install_type=
  6.1879 -    isdir=no
  6.1880 -    stripme=
  6.1881 -    for arg
  6.1882 -    do
  6.1883 -      if test -n "$dest"; then
  6.1884 -	files="$files $dest"
  6.1885 -	dest=$arg
  6.1886 -	continue
  6.1887 -      fi
  6.1888 -
  6.1889 -      case $arg in
  6.1890 -      -d) isdir=yes ;;
  6.1891 -      -f)
  6.1892 -	case " $install_prog " in
  6.1893 -	*[\\\ /]cp\ *) ;;
  6.1894 -	*) prev=$arg ;;
  6.1895 -	esac
  6.1896 -	;;
  6.1897 -      -g | -m | -o)
  6.1898 -	prev=$arg
  6.1899 -	;;
  6.1900 -      -s)
  6.1901 -	stripme=" -s"
  6.1902 -	continue
  6.1903 -	;;
  6.1904 -      -*)
  6.1905 -	;;
  6.1906 -      *)
  6.1907 -	# If the previous option needed an argument, then skip it.
  6.1908 -	if test -n "$prev"; then
  6.1909 -	  prev=
  6.1910 -	else
  6.1911 -	  dest=$arg
  6.1912 -	  continue
  6.1913 -	fi
  6.1914 -	;;
  6.1915 -      esac
  6.1916 -
  6.1917 -      # Aesthetically quote the argument.
  6.1918 -      func_quote_for_eval "$arg"
  6.1919 -      install_prog="$install_prog $func_quote_for_eval_result"
  6.1920 -    done
  6.1921 -
  6.1922 -    test -z "$install_prog" && \
  6.1923 -      func_fatal_help "you must specify an install program"
  6.1924 -
  6.1925 -    test -n "$prev" && \
  6.1926 -      func_fatal_help "the \`$prev' option requires an argument"
  6.1927 -
  6.1928 -    if test -z "$files"; then
  6.1929 -      if test -z "$dest"; then
  6.1930 -	func_fatal_help "no file or destination specified"
  6.1931 -      else
  6.1932 -	func_fatal_help "you must specify a destination"
  6.1933 -      fi
  6.1934 -    fi
  6.1935 -
  6.1936 -    # Strip any trailing slash from the destination.
  6.1937 -    func_stripname '' '/' "$dest"
  6.1938 -    dest=$func_stripname_result
  6.1939 -
  6.1940 -    # Check to see that the destination is a directory.
  6.1941 -    test -d "$dest" && isdir=yes
  6.1942 -    if test "$isdir" = yes; then
  6.1943 -      destdir="$dest"
  6.1944 -      destname=
  6.1945 -    else
  6.1946 -      func_dirname_and_basename "$dest" "" "."
  6.1947 -      destdir="$func_dirname_result"
  6.1948 -      destname="$func_basename_result"
  6.1949 -
  6.1950 -      # Not a directory, so check to see that there is only one file specified.
  6.1951 -      set dummy $files; shift
  6.1952 -      test "$#" -gt 1 && \
  6.1953 -	func_fatal_help "\`$dest' is not a directory"
  6.1954 -    fi
  6.1955 -    case $destdir in
  6.1956 -    [\\/]* | [A-Za-z]:[\\/]*) ;;
  6.1957 -    *)
  6.1958 -      for file in $files; do
  6.1959 -	case $file in
  6.1960 -	*.lo) ;;
  6.1961 -	*)
  6.1962 -	  func_fatal_help "\`$destdir' must be an absolute directory name"
  6.1963 -	  ;;
  6.1964 -	esac
  6.1965 -      done
  6.1966 -      ;;
  6.1967 -    esac
  6.1968 -
  6.1969 -    # This variable tells wrapper scripts just to set variables rather
  6.1970 -    # than running their programs.
  6.1971 -    libtool_install_magic="$magic"
  6.1972 -
  6.1973 -    staticlibs=
  6.1974 -    future_libdirs=
  6.1975 -    current_libdirs=
  6.1976 -    for file in $files; do
  6.1977 -
  6.1978 -      # Do each installation.
  6.1979 -      case $file in
  6.1980 -      *.$libext)
  6.1981 -	# Do the static libraries later.
  6.1982 -	staticlibs="$staticlibs $file"
  6.1983 -	;;
  6.1984 -
  6.1985 -      *.la)
  6.1986 -	# Check to see that this really is a libtool archive.
  6.1987 -	func_lalib_unsafe_p "$file" \
  6.1988 -	  || func_fatal_help "\`$file' is not a valid libtool archive"
  6.1989 -
  6.1990 -	library_names=
  6.1991 -	old_library=
  6.1992 -	relink_command=
  6.1993 -	func_source "$file"
  6.1994 -
  6.1995 -	# Add the libdir to current_libdirs if it is the destination.
  6.1996 -	if test "X$destdir" = "X$libdir"; then
  6.1997 -	  case "$current_libdirs " in
  6.1998 -	  *" $libdir "*) ;;
  6.1999 -	  *) current_libdirs="$current_libdirs $libdir" ;;
  6.2000 -	  esac
  6.2001 -	else
  6.2002 -	  # Note the libdir as a future libdir.
  6.2003 -	  case "$future_libdirs " in
  6.2004 -	  *" $libdir "*) ;;
  6.2005 -	  *) future_libdirs="$future_libdirs $libdir" ;;
  6.2006 -	  esac
  6.2007 -	fi
  6.2008 -
  6.2009 -	func_dirname "$file" "/" ""
  6.2010 -	dir="$func_dirname_result"
  6.2011 -	dir="$dir$objdir"
  6.2012 -
  6.2013 -	if test -n "$relink_command"; then
  6.2014 -	  # Determine the prefix the user has applied to our future dir.
  6.2015 -	  inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
  6.2016 -
  6.2017 -	  # Don't allow the user to place us outside of our expected
  6.2018 -	  # location b/c this prevents finding dependent libraries that
  6.2019 -	  # are installed to the same prefix.
  6.2020 -	  # At present, this check doesn't affect windows .dll's that
  6.2021 -	  # are installed into $libdir/../bin (currently, that works fine)
  6.2022 -	  # but it's something to keep an eye on.
  6.2023 -	  test "$inst_prefix_dir" = "$destdir" && \
  6.2024 -	    func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
  6.2025 -
  6.2026 -	  if test -n "$inst_prefix_dir"; then
  6.2027 -	    # Stick the inst_prefix_dir data into the link command.
  6.2028 -	    relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@[email protected]%-inst-prefix-dir $inst_prefix_dir%"`
  6.2029 -	  else
  6.2030 -	    relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@[email protected]%%"`
  6.2031 -	  fi
  6.2032 -
  6.2033 -	  func_warning "relinking \`$file'"
  6.2034 -	  func_show_eval "$relink_command" \
  6.2035 -	    'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
  6.2036 -	fi
  6.2037 -
  6.2038 -	# See the names of the shared library.
  6.2039 -	set dummy $library_names; shift
  6.2040 -	if test -n "$1"; then
  6.2041 -	  realname="$1"
  6.2042 -	  shift
  6.2043 -
  6.2044 -	  srcname="$realname"
  6.2045 -	  test -n "$relink_command" && srcname="$realname"T
  6.2046 -
  6.2047 -	  # Install the shared library and build the symlinks.
  6.2048 -	  func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
  6.2049 -	      'exit $?'
  6.2050 -	  tstripme="$stripme"
  6.2051 -	  case $host_os in
  6.2052 -	  cygwin* | mingw* | pw32*)
  6.2053 -	    case $realname in
  6.2054 -	    *.dll.a)
  6.2055 -	      tstripme=""
  6.2056 -	      ;;
  6.2057 -	    esac
  6.2058 -	    ;;
  6.2059 -	  esac
  6.2060 -	  if test -n "$tstripme" && test -n "$striplib"; then
  6.2061 -	    func_show_eval "$striplib $destdir/$realname" 'exit $?'
  6.2062 -	  fi
  6.2063 -
  6.2064 -	  if test "$#" -gt 0; then
  6.2065 -	    # Delete the old symlinks, and create new ones.
  6.2066 -	    # Try `ln -sf' first, because the `ln' binary might depend on
  6.2067 -	    # the symlink we replace!  Solaris /bin/ln does not understand -f,
  6.2068 -	    # so we also need to try rm && ln -s.
  6.2069 -	    for linkname
  6.2070 -	    do
  6.2071 -	      test "$linkname" != "$realname" \
  6.2072 -		&& func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
  6.2073 -	    done
  6.2074 -	  fi
  6.2075 -
  6.2076 -	  # Do each command in the postinstall commands.
  6.2077 -	  lib="$destdir/$realname"
  6.2078 -	  func_execute_cmds "$postinstall_cmds" 'exit $?'
  6.2079 -	fi
  6.2080 -
  6.2081 -	# Install the pseudo-library for information purposes.
  6.2082 -	func_basename "$file"
  6.2083 -	name="$func_basename_result"
  6.2084 -	instname="$dir/$name"i
  6.2085 -	func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
  6.2086 -
  6.2087 -	# Maybe install the static library, too.
  6.2088 -	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
  6.2089 -	;;
  6.2090 -
  6.2091 -      *.lo)
  6.2092 -	# Install (i.e. copy) a libtool object.
  6.2093 -
  6.2094 -	# Figure out destination file name, if it wasn't already specified.
  6.2095 -	if test -n "$destname"; then
  6.2096 -	  destfile="$destdir/$destname"
  6.2097 -	else
  6.2098 -	  func_basename "$file"
  6.2099 -	  destfile="$func_basename_result"
  6.2100 -	  destfile="$destdir/$destfile"
  6.2101 -	fi
  6.2102 -
  6.2103 -	# Deduce the name of the destination old-style object file.
  6.2104 -	case $destfile in
  6.2105 -	*.lo)
  6.2106 -	  func_lo2o "$destfile"
  6.2107 -	  staticdest=$func_lo2o_result
  6.2108 -	  ;;
  6.2109 -	*.$objext)
  6.2110 -	  staticdest="$destfile"
  6.2111 -	  destfile=
  6.2112 -	  ;;
  6.2113 -	*)
  6.2114 -	  func_fatal_help "cannot copy a libtool object to \`$destfile'"
  6.2115 -	  ;;
  6.2116 -	esac
  6.2117 -
  6.2118 -	# Install the libtool object if requested.
  6.2119 -	test -n "$destfile" && \
  6.2120 -	  func_show_eval "$install_prog $file $destfile" 'exit $?'
  6.2121 -
  6.2122 -	# Install the old object if enabled.
  6.2123 -	if test "$build_old_libs" = yes; then
  6.2124 -	  # Deduce the name of the old-style object file.
  6.2125 -	  func_lo2o "$file"
  6.2126 -	  staticobj=$func_lo2o_result
  6.2127 -	  func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
  6.2128 -	fi
  6.2129 -	exit $EXIT_SUCCESS
  6.2130 -	;;
  6.2131 -
  6.2132 -      *)
  6.2133 -	# Figure out destination file name, if it wasn't already specified.
  6.2134 -	if test -n "$destname"; then
  6.2135 -	  destfile="$destdir/$destname"
  6.2136 -	else
  6.2137 -	  func_basename "$file"
  6.2138 -	  destfile="$func_basename_result"
  6.2139 -	  destfile="$destdir/$destfile"
  6.2140 -	fi
  6.2141 -
  6.2142 -	# If the file is missing, and there is a .exe on the end, strip it
  6.2143 -	# because it is most likely a libtool script we actually want to
  6.2144 -	# install
  6.2145 -	stripped_ext=""
  6.2146 -	case $file in
  6.2147 -	  *.exe)
  6.2148 -	    if test ! -f "$file"; then
  6.2149 -	      func_stripname '' '.exe' "$file"
  6.2150 -	      file=$func_stripname_result
  6.2151 -	      stripped_ext=".exe"
  6.2152 -	    fi
  6.2153 -	    ;;
  6.2154 -	esac
  6.2155 -
  6.2156 -	# Do a test to see if this is really a libtool program.
  6.2157 -	case $host in
  6.2158 -	*cygwin*|*mingw*)
  6.2159 -	    if func_ltwrapper_executable_p "$file"; then
  6.2160 -	      func_ltwrapper_scriptname "$file"
  6.2161 -	      wrapper=$func_ltwrapper_scriptname_result
  6.2162 -	    else
  6.2163 -	      func_stripname '' '.exe' "$file"
  6.2164 -	      wrapper=$func_stripname_result
  6.2165 -	    fi
  6.2166 -	    ;;
  6.2167 -	*)
  6.2168 -	    wrapper=$file
  6.2169 -	    ;;
  6.2170 -	esac
  6.2171 -	if func_ltwrapper_script_p "$wrapper"; then
  6.2172 -	  notinst_deplibs=
  6.2173 -	  relink_command=
  6.2174 -
  6.2175 -	  func_source "$wrapper"
  6.2176 -
  6.2177 -	  # Check the variables that should have been set.
  6.2178 -	  test -z "$generated_by_libtool_version" && \
  6.2179 -	    func_fatal_error "invalid libtool wrapper script \`$wrapper'"
  6.2180 -
  6.2181 -	  finalize=yes
  6.2182 -	  for lib in $notinst_deplibs; do
  6.2183 -	    # Check to see that each library is installed.
  6.2184 -	    libdir=
  6.2185 -	    if test -f "$lib"; then
  6.2186 -	      func_source "$lib"
  6.2187 -	    fi
  6.2188 -	    libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
  6.2189 -	    if test -n "$libdir" && test ! -f "$libfile"; then
  6.2190 -	      func_warning "\`$lib' has not been installed in \`$libdir'"
  6.2191 -	      finalize=no
  6.2192 -	    fi
  6.2193 -	  done
  6.2194 -
  6.2195 -	  relink_command=
  6.2196 -	  func_source "$wrapper"
  6.2197 -
  6.2198 -	  outputname=
  6.2199 -	  if test "$fast_install" = no && test -n "$relink_command"; then
  6.2200 -	    $opt_dry_run || {
  6.2201 -	      if test "$finalize" = yes; then
  6.2202 -	        tmpdir=`func_mktempdir`
  6.2203 -		func_basename "$file$stripped_ext"
  6.2204 -		file="$func_basename_result"
  6.2205 -	        outputname="$tmpdir/$file"
  6.2206 -	        # Replace the output file specification.
  6.2207 -	        relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@[email protected]%'"$outputname"'%g'`
  6.2208 -
  6.2209 -	        $opt_silent || {
  6.2210 -	          func_quote_for_expand "$relink_command"
  6.2211 -		  eval "func_echo $func_quote_for_expand_result"
  6.2212 -	        }
  6.2213 -	        if eval "$relink_command"; then :
  6.2214 -	          else
  6.2215 -		  func_error "error: relink \`$file' with the above command before installing it"
  6.2216 -		  $opt_dry_run || ${RM}r "$tmpdir"
  6.2217 -		  continue
  6.2218 -	        fi
  6.2219 -	        file="$outputname"
  6.2220 -	      else
  6.2221 -	        func_warning "cannot relink \`$file'"
  6.2222 -	      fi
  6.2223 -	    }
  6.2224 -	  else
  6.2225 -	    # Install the binary that we compiled earlier.
  6.2226 -	    file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
  6.2227 -	  fi
  6.2228 -	fi
  6.2229 -
  6.2230 -	# remove .exe since cygwin /usr/bin/install will append another
  6.2231 -	# one anyway
  6.2232 -	case $install_prog,$host in
  6.2233 -	*/usr/bin/install*,*cygwin*)
  6.2234 -	  case $file:$destfile in
  6.2235 -	  *.exe:*.exe)
  6.2236 -	    # this is ok
  6.2237 -	    ;;
  6.2238 -	  *.exe:*)
  6.2239 -	    destfile=$destfile.exe
  6.2240 -	    ;;
  6.2241 -	  *:*.exe)
  6.2242 -	    func_stripname '' '.exe' "$destfile"
  6.2243 -	    destfile=$func_stripname_result
  6.2244 -	    ;;
  6.2245 -	  esac
  6.2246 -	  ;;
  6.2247 -	esac
  6.2248 -	func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
  6.2249 -	$opt_dry_run || if test -n "$outputname"; then
  6.2250 -	  ${RM}r "$tmpdir"
  6.2251 -	fi
  6.2252 -	;;
  6.2253 -      esac
  6.2254 -    done
  6.2255 -
  6.2256 -    for file in $staticlibs; do
  6.2257 -      func_basename "$file"
  6.2258 -      name="$func_basename_result"
  6.2259 -
  6.2260 -      # Set up the ranlib parameters.
  6.2261 -      oldlib="$destdir/$name"
  6.2262 -
  6.2263 -      func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
  6.2264 -
  6.2265 -      if test -n "$stripme" && test -n "$old_striplib"; then
  6.2266 -	func_show_eval "$old_striplib $oldlib" 'exit $?'
  6.2267 -      fi
  6.2268 -
  6.2269 -      # Do each command in the postinstall commands.
  6.2270 -      func_execute_cmds "$old_postinstall_cmds" 'exit $?'
  6.2271 -    done
  6.2272 -
  6.2273 -    test -n "$future_libdirs" && \
  6.2274 -      func_warning "remember to run \`$progname --finish$future_libdirs'"
  6.2275 -
  6.2276 -    if test -n "$current_libdirs"; then
  6.2277 -      # Maybe just do a dry run.
  6.2278 -      $opt_dry_run && current_libdirs=" -n$current_libdirs"
  6.2279 -      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
  6.2280 -    else
  6.2281 -      exit $EXIT_SUCCESS
  6.2282 -    fi
  6.2283 -}
  6.2284 -
  6.2285 -test "$mode" = install && func_mode_install ${1+"[email protected]"}
  6.2286 -
  6.2287 -
  6.2288 -# func_generate_dlsyms outputname originator pic_p
  6.2289 -# Extract symbols from dlprefiles and create ${outputname}S.o with
  6.2290 -# a dlpreopen symbol table.
  6.2291 -func_generate_dlsyms ()
  6.2292 -{
  6.2293 -    $opt_debug
  6.2294 -    my_outputname="$1"
  6.2295 -    my_originator="$2"
  6.2296 -    my_pic_p="${3-no}"
  6.2297 -    my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
  6.2298 -    my_dlsyms=
  6.2299 -
  6.2300 -    if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  6.2301 -      if test -n "$NM" && test -n "$global_symbol_pipe"; then
  6.2302 -	my_dlsyms="${my_outputname}S.c"
  6.2303 -      else
  6.2304 -	func_error "not configured to extract global symbols from dlpreopened files"
  6.2305 -      fi
  6.2306 -    fi
  6.2307 -
  6.2308 -    if test -n "$my_dlsyms"; then
  6.2309 -      case $my_dlsyms in
  6.2310 -      "") ;;
  6.2311 -      *.c)
  6.2312 -	# Discover the nlist of each of the dlfiles.
  6.2313 -	nlist="$output_objdir/${my_outputname}.nm"
  6.2314 -
  6.2315 -	func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
  6.2316 -
  6.2317 -	# Parse the name list into a source file.
  6.2318 -	func_verbose "creating $output_objdir/$my_dlsyms"
  6.2319 -
  6.2320 -	$opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
  6.2321 -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
  6.2322 -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
  6.2323 -
  6.2324 -#ifdef __cplusplus
  6.2325 -extern \"C\" {
  6.2326 -#endif
  6.2327 -
  6.2328 -/* External symbol declarations for the compiler. */\
  6.2329 -"
  6.2330 -
  6.2331 -	if test "$dlself" = yes; then
  6.2332 -	  func_verbose "generating symbol list for \`$output'"
  6.2333 -
  6.2334 -	  $opt_dry_run || echo ': @[email protected] ' > "$nlist"
  6.2335 -
  6.2336 -	  # Add our own program objects to the symbol list.
  6.2337 -	  progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  6.2338 -	  for progfile in $progfiles; do
  6.2339 -	    func_verbose "extracting global C symbols from \`$progfile'"
  6.2340 -	    $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
  6.2341 -	  done
  6.2342 -
  6.2343 -	  if test -n "$exclude_expsyms"; then
  6.2344 -	    $opt_dry_run || {
  6.2345 -	      eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
  6.2346 -	      eval '$MV "$nlist"T "$nlist"'
  6.2347 -	    }
  6.2348 -	  fi
  6.2349 -
  6.2350 -	  if test -n "$export_symbols_regex"; then
  6.2351 -	    $opt_dry_run || {
  6.2352 -	      eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
  6.2353 -	      eval '$MV "$nlist"T "$nlist"'
  6.2354 -	    }
  6.2355 -	  fi
  6.2356 -
  6.2357 -	  # Prepare the list of exported symbols
  6.2358 -	  if test -z "$export_symbols"; then
  6.2359 -	    export_symbols="$output_objdir/$outputname.exp"
  6.2360 -	    $opt_dry_run || {
  6.2361 -	      $RM $export_symbols
  6.2362 -	      eval "${SED} -n -e '/^: @[email protected] $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
  6.2363 -	      case $host in
  6.2364 -	      *cygwin* | *mingw* )
  6.2365 -                eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
  6.2366 -                eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
  6.2367 -	        ;;
  6.2368 -	      esac
  6.2369 -	    }
  6.2370 -	  else
  6.2371 -	    $opt_dry_run || {
  6.2372 -	      eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
  6.2373 -	      eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
  6.2374 -	      eval '$MV "$nlist"T "$nlist"'
  6.2375 -	      case $host in
  6.2376 -	        *cygwin | *mingw* )
  6.2377 -	          eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
  6.2378 -	          eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
  6.2379 -	          ;;
  6.2380 -	      esac
  6.2381 -	    }
  6.2382 -	  fi
  6.2383 -	fi
  6.2384 -
  6.2385 -	for dlprefile in $dlprefiles; do
  6.2386 -	  func_verbose "extracting global C symbols from \`$dlprefile'"
  6.2387 -	  func_basename "$dlprefile"
  6.2388 -	  name="$func_basename_result"
  6.2389 -	  $opt_dry_run || {
  6.2390 -	    eval '$ECHO ": $name " >> "$nlist"'
  6.2391 -	    eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
  6.2392 -	  }
  6.2393 -	done
  6.2394 -
  6.2395 -	$opt_dry_run || {
  6.2396 -	  # Make sure we have at least an empty file.
  6.2397 -	  test -f "$nlist" || : > "$nlist"
  6.2398 -
  6.2399 -	  if test -n "$exclude_expsyms"; then
  6.2400 -	    $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
  6.2401 -	    $MV "$nlist"T "$nlist"
  6.2402 -	  fi
  6.2403 -
  6.2404 -	  # Try sorting and uniquifying the output.
  6.2405 -	  if $GREP -v "^: " < "$nlist" |
  6.2406 -	      if sort -k 3 </dev/null >/dev/null 2>&1; then
  6.2407 -		sort -k 3
  6.2408 -	      else
  6.2409 -		sort +2
  6.2410 -	      fi |
  6.2411 -	      uniq > "$nlist"S; then
  6.2412 -	    :
  6.2413 -	  else
  6.2414 -	    $GREP -v "^: " < "$nlist" > "$nlist"S
  6.2415 -	  fi
  6.2416 -
  6.2417 -	  if test -f "$nlist"S; then
  6.2418 -	    eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
  6.2419 -	  else
  6.2420 -	    $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
  6.2421 -	  fi
  6.2422 -
  6.2423 -	  $ECHO >> "$output_objdir/$my_dlsyms" "\
  6.2424 -
  6.2425 -/* The mapping between symbol names and symbols.  */
  6.2426 -typedef struct {
  6.2427 -  const char *name;
  6.2428 -  void *address;
  6.2429 -} lt_dlsymlist;
  6.2430 -"
  6.2431 -	  case $host in
  6.2432 -	  *cygwin* | *mingw* )
  6.2433 -	    $ECHO >> "$output_objdir/$my_dlsyms" "\
  6.2434 -/* DATA imports from DLLs on WIN32 con't be const, because
  6.2435 -   runtime relocations are performed -- see ld's documentation
  6.2436 -   on pseudo-relocs.  */"
  6.2437 -	    lt_dlsym_const= ;;
  6.2438 -	  *osf5*)
  6.2439 -	    echo >> "$output_objdir/$my_dlsyms" "\
  6.2440 -/* This system does not cope well with relocations in const data */"
  6.2441 -	    lt_dlsym_const= ;;
  6.2442 -	  *)
  6.2443 -	    lt_dlsym_const=const ;;
  6.2444 -	  esac
  6.2445 -
  6.2446 -	  $ECHO >> "$output_objdir/$my_dlsyms" "\
  6.2447 -extern $lt_dlsym_const lt_dlsymlist
  6.2448 -lt_${my_prefix}_LTX_preloaded_symbols[];
  6.2449 -$lt_dlsym_const lt_dlsymlist
  6.2450 -lt_${my_prefix}_LTX_preloaded_symbols[] =
  6.2451 -{\
  6.2452 -  { \"$my_originator\", (void *) 0 },"
  6.2453 -
  6.2454 -	  case $need_lib_prefix in
  6.2455 -	  no)
  6.2456 -	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
  6.2457 -	    ;;
  6.2458 -	  *)
  6.2459 -	    eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
  6.2460 -	    ;;
  6.2461 -	  esac
  6.2462 -	  $ECHO >> "$output_objdir/$my_dlsyms" "\
  6.2463 -  {0, (void *) 0}
  6.2464 -};
  6.2465 -
  6.2466 -/* This works around a problem in FreeBSD linker */
  6.2467 -#ifdef FREEBSD_WORKAROUND
  6.2468 -static const void *lt_preloaded_setup() {
  6.2469 -  return lt_${my_prefix}_LTX_preloaded_symbols;
  6.2470 -}
  6.2471 -#endif
  6.2472 -
  6.2473 -#ifdef __cplusplus
  6.2474 -}
  6.2475 -#endif\
  6.2476 -"
  6.2477 -	} # !$opt_dry_run
  6.2478 -
  6.2479 -	pic_flag_for_symtable=
  6.2480 -	case "$compile_command " in
  6.2481 -	*" -static "*) ;;
  6.2482 -	*)
  6.2483 -	  case $host in
  6.2484 -	  # compiling the symbol table file with pic_flag works around
  6.2485 -	  # a FreeBSD bug that causes programs to crash when -lm is
  6.2486 -	  # linked before any other PIC object.  But we must not use
  6.2487 -	  # pic_flag when linking with -static.  The problem exists in
  6.2488 -	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
  6.2489 -	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
  6.2490 -	    pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
  6.2491 -	  *-*-hpux*)
  6.2492 -	    pic_flag_for_symtable=" $pic_flag"  ;;
  6.2493 -	  *)
  6.2494 -	    if test "X$my_pic_p" != Xno; then
  6.2495 -	      pic_flag_for_symtable=" $pic_flag"
  6.2496 -	    fi
  6.2497 -	    ;;
  6.2498 -	  esac
  6.2499 -	  ;;
  6.2500 -	esac
  6.2501 -	symtab_cflags=
  6.2502 -	for arg in $LTCFLAGS; do
  6.2503 -	  case $arg in
  6.2504 -	  -pie | -fpie | -fPIE) ;;
  6.2505 -	  *) symtab_cflags="$symtab_cflags $arg" ;;
  6.2506 -	  esac
  6.2507 -	done
  6.2508 -
  6.2509 -	# Now compile the dynamic symbol file.
  6.2510 -	func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
  6.2511 -
  6.2512 -	# Clean up the generated files.
  6.2513 -	func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
  6.2514 -
  6.2515 -	# Transform the symbol file into the correct name.
  6.2516 -	symfileobj="$output_objdir/${my_outputname}S.$objext"
  6.2517 -	case $host in
  6.2518 -	*cygwin* | *mingw* )
  6.2519 -	  if test -f "$output_objdir/$my_outputname.def"; then
  6.2520 -	    compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@[email protected]%$output_objdir/$my_outputname.def $symfileobj%"`
  6.2521 -	    finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@[email protected]%$output_objdir/$my_outputname.def $symfileobj%"`
  6.2522 -	  else
  6.2523 -	    compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@[email protected]%$symfileobj%"`
  6.2524 -	    finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@[email protected]%$symfileobj%"`
  6.2525 -	  fi
  6.2526 -	  ;;
  6.2527 -	*)
  6.2528 -	  compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@[email protected]%$symfileobj%"`
  6.2529 -	  finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@[email protected]%$symfileobj%"`
  6.2530 -	  ;;
  6.2531 -	esac
  6.2532 -	;;
  6.2533 -      *)
  6.2534 -	func_fatal_error "unknown suffix for \`$my_dlsyms'"
  6.2535 -	;;
  6.2536 -      esac
  6.2537 -    else
  6.2538 -      # We keep going just in case the user didn't refer to
  6.2539 -      # lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
  6.2540 -      # really was required.
  6.2541 -
  6.2542 -      # Nullify the symbol file.
  6.2543 -      compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @[email protected]%%"`
  6.2544 -      finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @[email protected]%%"`
  6.2545 -    fi
  6.2546 -}
  6.2547 -
  6.2548 -# func_win32_libid arg
  6.2549 -# return the library type of file 'arg'
  6.2550 -#
  6.2551 -# Need a lot of goo to handle *both* DLLs and import libs
  6.2552 -# Has to be a shell function in order to 'eat' the argument
  6.2553 -# that is supplied when $file_magic_command is called.
  6.2554 -func_win32_libid ()
  6.2555 -{
  6.2556 -  $opt_debug
  6.2557 -  win32_libid_type="unknown"
  6.2558 -  win32_fileres=`file -L $1 2>/dev/null`
  6.2559 -  case $win32_fileres in
  6.2560 -  *ar\ archive\ import\ library*) # definitely import
  6.2561 -    win32_libid_type="x86 archive import"
  6.2562 -    ;;
  6.2563 -  *ar\ archive*) # could be an import, or static
  6.2564 -    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
  6.2565 -       $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
  6.2566 -      win32_nmres=`eval $NM -f posix -A $1 |
  6.2567 -	$SED -n -e '
  6.2568 -	    1,100{
  6.2569 -		/ I /{
  6.2570 -		    s,.*,import,
  6.2571 -		    p
  6.2572 -		    q
  6.2573 -		}
  6.2574 -	    }'`
  6.2575 -      case $win32_nmres in
  6.2576 -      import*)  win32_libid_type="x86 archive import";;
  6.2577 -      *)        win32_libid_type="x86 archive static";;
  6.2578 -      esac
  6.2579 -    fi
  6.2580 -    ;;
  6.2581 -  *DLL*)
  6.2582 -    win32_libid_type="x86 DLL"
  6.2583 -    ;;
  6.2584 -  *executable*) # but shell scripts are "executable" too...
  6.2585 -    case $win32_fileres in
  6.2586 -    *MS\ Windows\ PE\ Intel*)
  6.2587 -      win32_libid_type="x86 DLL"
  6.2588 -      ;;
  6.2589 -    esac
  6.2590 -    ;;
  6.2591 -  esac
  6.2592 -  $ECHO "$win32_libid_type"
  6.2593 -}
  6.2594 -
  6.2595 -
  6.2596 -
  6.2597 -# func_extract_an_archive dir oldlib
  6.2598 -func_extract_an_archive ()
  6.2599 -{
  6.2600 -    $opt_debug
  6.2601 -    f_ex_an_ar_dir="$1"; shift
  6.2602 -    f_ex_an_ar_oldlib="$1"
  6.2603 -    func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
  6.2604 -    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
  6.2605 -     :
  6.2606 -    else
  6.2607 -      func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
  6.2608 -    fi
  6.2609 -}
  6.2610 -
  6.2611 -
  6.2612 -# func_extract_archives gentop oldlib ...
  6.2613 -func_extract_archives ()
  6.2614 -{
  6.2615 -    $opt_debug
  6.2616 -    my_gentop="$1"; shift
  6.2617 -    my_oldlibs=${1+"[email protected]"}
  6.2618 -    my_oldobjs=""
  6.2619 -    my_xlib=""
  6.2620 -    my_xabs=""
  6.2621 -    my_xdir=""
  6.2622 -
  6.2623 -    for my_xlib in $my_oldlibs; do
  6.2624 -      # Extract the objects.
  6.2625 -      case $my_xlib in
  6.2626 -	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
  6.2627 -	*) my_xabs=`pwd`"/$my_xlib" ;;
  6.2628 -      esac
  6.2629 -      func_basename "$my_xlib"
  6.2630 -      my_xlib="$func_basename_result"
  6.2631 -      my_xlib_u=$my_xlib
  6.2632 -      while :; do
  6.2633 -        case " $extracted_archives " in
  6.2634 -	*" $my_xlib_u "*)
  6.2635 -	  func_arith $extracted_serial + 1
  6.2636 -	  extracted_serial=$func_arith_result
  6.2637 -	  my_xlib_u=lt$extracted_serial-$my_xlib ;;
  6.2638 -	*) break ;;
  6.2639 -	esac
  6.2640 -      done
  6.2641 -      extracted_archives="$extracted_archives $my_xlib_u"
  6.2642 -      my_xdir="$my_gentop/$my_xlib_u"
  6.2643 -
  6.2644 -      func_mkdir_p "$my_xdir"
  6.2645 -
  6.2646 -      case $host in
  6.2647 -      *-darwin*)
  6.2648 -	func_verbose "Extracting $my_xabs"
  6.2649 -	# Do not bother doing anything if just a dry run
  6.2650 -	$opt_dry_run || {
  6.2651 -	  darwin_orig_dir=`pwd`
  6.2652 -	  cd $my_xdir || exit $?
  6.2653 -	  darwin_archive=$my_xabs
  6.2654 -	  darwin_curdir=`pwd`
  6.2655 -	  darwin_base_archive=`basename "$darwin_archive"`
  6.2656 -	  darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
  6.2657 -	  if test -n "$darwin_arches"; then
  6.2658 -	    darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
  6.2659 -	    darwin_arch=
  6.2660 -	    func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
  6.2661 -	    for darwin_arch in  $darwin_arches ; do
  6.2662 -	      func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
  6.2663 -	      $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
  6.2664 -	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
  6.2665 -	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
  6.2666 -	      cd "$darwin_curdir"
  6.2667 -	      $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
  6.2668 -	    done # $darwin_arches
  6.2669 -            ## Okay now we've a bunch of thin objects, gotta fatten them up :)
  6.2670 -	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
  6.2671 -	    darwin_file=
  6.2672 -	    darwin_files=
  6.2673 -	    for darwin_file in $darwin_filelist; do
  6.2674 -	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
  6.2675 -	      $LIPO -create -output "$darwin_file" $darwin_files
  6.2676 -	    done # $darwin_filelist
  6.2677 -	    $RM -rf unfat-$$
  6.2678 -	    cd "$darwin_orig_dir"
  6.2679 -	  else
  6.2680 -	    cd $darwin_orig_dir
  6.2681 -	    func_extract_an_archive "$my_xdir" "$my_xabs"
  6.2682 -	  fi # $darwin_arches
  6.2683 -	} # !$opt_dry_run
  6.2684 -	;;
  6.2685 -      *)
  6.2686 -        func_extract_an_archive "$my_xdir" "$my_xabs"
  6.2687 -	;;
  6.2688 -      esac
  6.2689 -      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
  6.2690 -    done
  6.2691 -
  6.2692 -    func_extract_archives_result="$my_oldobjs"
  6.2693 -}
  6.2694 -
  6.2695 -
  6.2696 -
  6.2697 -# func_emit_wrapper arg
  6.2698 -#
  6.2699 -# emit a libtool wrapper script on stdout
  6.2700 -# don't directly open a file because we may want to
  6.2701 -# incorporate the script contents within a cygwin/mingw
  6.2702 -# wrapper executable.  Must ONLY be called from within
  6.2703 -# func_mode_link because it depends on a number of variable
  6.2704 -# set therein.
  6.2705 -#
  6.2706 -# arg is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
  6.2707 -# variable will take.  If 'yes', then the emitted script
  6.2708 -# will assume that the directory in which it is stored is
  6.2709 -# the '.lib' directory.  This is a cygwin/mingw-specific
  6.2710 -# behavior.
  6.2711 -func_emit_wrapper ()
  6.2712 -{
  6.2713 -	func_emit_wrapper_arg1=no
  6.2714 -	if test -n "$1" ; then
  6.2715 -	  func_emit_wrapper_arg1=$1
  6.2716 -	fi
  6.2717 -
  6.2718 -	$ECHO "\
  6.2719 -#! $SHELL
  6.2720 -
  6.2721 -# $output - temporary wrapper script for $objdir/$outputname
  6.2722 -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
  6.2723 -#
  6.2724 -# The $output program cannot be directly executed until all the libtool
  6.2725 -# libraries that it depends on are installed.
  6.2726 -#
  6.2727 -# This wrapper script should never be moved out of the build directory.
  6.2728 -# If it is, it will not operate correctly.
  6.2729 -
  6.2730 -# Sed substitution that helps us do robust quoting.  It backslashifies
  6.2731 -# metacharacters that are still active within double-quoted strings.
  6.2732 -Xsed='${SED} -e 1s/^X//'
  6.2733 -sed_quote_subst='$sed_quote_subst'
  6.2734 -
  6.2735 -# Be Bourne compatible
  6.2736 -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
  6.2737 -  emulate sh
  6.2738 -  NULLCMD=:
  6.2739 -  # Zsh 3.x and 4.x performs word splitting on \${1+\"\[email protected]\"}, which
  6.2740 -  # is contrary to our usage.  Disable this feature.
  6.2741 -  alias -g '\${1+\"\[email protected]\"}'='\"\[email protected]\"'
  6.2742 -  setopt NO_GLOB_SUBST
  6.2743 -else
  6.2744 -  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
  6.2745 -fi
  6.2746 -BIN_SH=xpg4; export BIN_SH # for Tru64
  6.2747 -DUALCASE=1; export DUALCASE # for MKS sh
  6.2748 -
  6.2749 -# The HP-UX ksh and POSIX shell print the target directory to stdout
  6.2750 -# if CDPATH is set.
  6.2751 -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  6.2752 -
  6.2753 -relink_command=\"$relink_command\"
  6.2754 -
  6.2755 -# This environment variable determines our operation mode.
  6.2756 -if test \"\$libtool_install_magic\" = \"$magic\"; then
  6.2757 -  # install mode needs the following variables:
  6.2758 -  generated_by_libtool_version='$macro_version'
  6.2759 -  notinst_deplibs='$notinst_deplibs'
  6.2760 -else
  6.2761 -  # When we are sourced in execute mode, \$file and \$ECHO are already set.
  6.2762 -  if test \"\$libtool_execute_magic\" != \"$magic\"; then
  6.2763 -    ECHO=\"$qecho\"
  6.2764 -    file=\"\$0\"
  6.2765 -    # Make sure echo works.
  6.2766 -    if test \"X\$1\" = X--no-reexec; then
  6.2767 -      # Discard the --no-reexec flag, and continue.
  6.2768 -      shift
  6.2769 -    elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
  6.2770 -      # Yippee, \$ECHO works!
  6.2771 -      :
  6.2772 -    else
  6.2773 -      # Restart under the correct shell, and then maybe \$ECHO will work.
  6.2774 -      exec $SHELL \"\$0\" --no-reexec \${1+\"\[email protected]\"}
  6.2775 -    fi
  6.2776 -  fi\
  6.2777 -"
  6.2778 -	$ECHO "\
  6.2779 -
  6.2780 -  # Find the directory that this script lives in.
  6.2781 -  thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
  6.2782 -  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
  6.2783 -
  6.2784 -  # Follow symbolic links until we get to the real thisdir.
  6.2785 -  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
  6.2786 -  while test -n \"\$file\"; do
  6.2787 -    destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
  6.2788 -
  6.2789 -    # If there was a directory component, then change thisdir.
  6.2790 -    if test \"x\$destdir\" != \"x\$file\"; then
  6.2791 -      case \"\$destdir\" in
  6.2792 -      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
  6.2793 -      *) thisdir=\"\$thisdir/\$destdir\" ;;
  6.2794 -      esac
  6.2795 -    fi
  6.2796 -
  6.2797 -    file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
  6.2798 -    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
  6.2799 -  done
  6.2800 -
  6.2801 -  # Usually 'no', except on cygwin/mingw when embedded into
  6.2802 -  # the cwrapper.
  6.2803 -  WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1
  6.2804 -  if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
  6.2805 -    # special case for '.'
  6.2806 -    if test \"\$thisdir\" = \".\"; then
  6.2807 -      thisdir=\`pwd\`
  6.2808 -    fi
  6.2809 -    # remove .libs from thisdir
  6.2810 -    case \"\$thisdir\" in
  6.2811 -    *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
  6.2812 -    $objdir )   thisdir=. ;;
  6.2813 -    esac
  6.2814 -  fi
  6.2815 -
  6.2816 -  # Try to get the absolute directory name.
  6.2817 -  absdir=\`cd \"\$thisdir\" && pwd\`
  6.2818 -  test -n \"\$absdir\" && thisdir=\"\$absdir\"
  6.2819 -"
  6.2820 -
  6.2821 -	if test "$fast_install" = yes; then
  6.2822 -	  $ECHO "\
  6.2823 -  program=lt-'$outputname'$exeext
  6.2824 -  progdir=\"\$thisdir/$objdir\"
  6.2825 -
  6.2826 -  if test ! -f \"\$progdir/\$program\" ||
  6.2827 -     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
  6.2828 -       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
  6.2829 -
  6.2830 -    file=\"\$\$-\$program\"
  6.2831 -
  6.2832 -    if test ! -d \"\$progdir\"; then
  6.2833 -      $MKDIR \"\$progdir\"
  6.2834 -    else
  6.2835 -      $RM \"\$progdir/\$file\"
  6.2836 -    fi"
  6.2837 -
  6.2838 -	  $ECHO "\
  6.2839 -
  6.2840 -    # relink executable if necessary
  6.2841 -    if test -n \"\$relink_command\"; then
  6.2842 -      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
  6.2843 -      else
  6.2844 -	$ECHO \"\$relink_command_output\" >&2
  6.2845 -	$RM \"\$progdir/\$file\"
  6.2846 -	exit 1
  6.2847 -      fi
  6.2848 -    fi
  6.2849 -
  6.2850 -    $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
  6.2851 -    { $RM \"\$progdir/\$program\";
  6.2852 -      $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
  6.2853 -    $RM \"\$progdir/\$file\"
  6.2854 -  fi"
  6.2855 -	else
  6.2856 -	  $ECHO "\
  6.2857 -  program='$outputname'
  6.2858 -  progdir=\"\$thisdir/$objdir\"
  6.2859 -"
  6.2860 -	fi
  6.2861 -
  6.2862 -	$ECHO "\
  6.2863 -
  6.2864 -  if test -f \"\$progdir/\$program\"; then"
  6.2865 -
  6.2866 -	# Export our shlibpath_var if we have one.
  6.2867 -	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
  6.2868 -	  $ECHO "\
  6.2869 -    # Add our own library path to $shlibpath_var
  6.2870 -    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
  6.2871 -
  6.2872 -    # Some systems cannot cope with colon-terminated $shlibpath_var
  6.2873 -    # The second colon is a workaround for a bug in BeOS R4 sed
  6.2874 -    $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
  6.2875 -
  6.2876 -    export $shlibpath_var
  6.2877 -"
  6.2878 -	fi
  6.2879 -
  6.2880 -	# fixup the dll searchpath if we need to.
  6.2881 -	if test -n "$dllsearchpath"; then
  6.2882 -	  $ECHO "\
  6.2883 -    # Add the dll search path components to the executable PATH
  6.2884 -    PATH=$dllsearchpath:\$PATH
  6.2885 -"
  6.2886 -	fi
  6.2887 -
  6.2888 -	$ECHO "\
  6.2889 -    if test \"\$libtool_execute_magic\" != \"$magic\"; then
  6.2890 -      # Run the actual program with our arguments.
  6.2891 -"
  6.2892 -	case $host in
  6.2893 -	# Backslashes separate directories on plain windows
  6.2894 -	*-*-mingw | *-*-os2*)
  6.2895 -	  $ECHO "\
  6.2896 -      exec \"\$progdir\\\\\$program\" \${1+\"\[email protected]\"}
  6.2897 -"
  6.2898 -	  ;;
  6.2899 -
  6.2900 -	*)
  6.2901 -	  $ECHO "\
  6.2902 -      exec \"\$progdir/\$program\" \${1+\"\[email protected]\"}
  6.2903 -"
  6.2904 -	  ;;
  6.2905 -	esac
  6.2906 -	$ECHO "\
  6.2907 -      \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
  6.2908 -      exit 1
  6.2909 -    fi
  6.2910 -  else
  6.2911 -    # The program doesn't exist.
  6.2912 -    \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
  6.2913 -    \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
  6.2914 -    $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
  6.2915 -    exit 1
  6.2916 -  fi
  6.2917 -fi\
  6.2918 -"
  6.2919 -}
  6.2920 -# end: func_emit_wrapper
  6.2921 -
  6.2922 -# func_emit_cwrapperexe_src
  6.2923 -# emit the source code for a wrapper executable on stdout
  6.2924 -# Must ONLY be called from within func_mode_link because
  6.2925 -# it depends on a number of variable set therein.
  6.2926 -func_emit_cwrapperexe_src ()
  6.2927 -{
  6.2928 -	cat <<EOF
  6.2929 -
  6.2930 -/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
  6.2931 -   Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
  6.2932 -
  6.2933 -   The $output program cannot be directly executed until all the libtool
  6.2934 -   libraries that it depends on are installed.
  6.2935 -
  6.2936 -   This wrapper executable should never be moved out of the build directory.
  6.2937 -   If it is, it will not operate correctly.
  6.2938 -
  6.2939 -   Currently, it simply execs the wrapper *script* "$SHELL $output",
  6.2940 -   but could eventually absorb all of the scripts functionality and
  6.2941 -   exec $objdir/$outputname directly.
  6.2942 -*/
  6.2943 -EOF
  6.2944 -	    cat <<"EOF"
  6.2945 -#include <stdio.h>
  6.2946 -#include <stdlib.h>
  6.2947 -#ifdef _MSC_VER
  6.2948 -# include <direct.h>
  6.2949 -# include <process.h>
  6.2950 -# include <io.h>
  6.2951 -# define setmode _setmode
  6.2952 -#else
  6.2953 -# include <unistd.h>
  6.2954 -# include <stdint.h>
  6.2955 -# ifdef __CYGWIN__
  6.2956 -#  include <io.h>
  6.2957 -# endif
  6.2958 -#endif
  6.2959 -#include <malloc.h>
  6.2960 -#include <stdarg.h>
  6.2961 -#include <assert.h>
  6.2962 -#include <string.h>
  6.2963 -#include <ctype.h>
  6.2964 -#include <errno.h>
  6.2965 -#include <fcntl.h>
  6.2966 -#include <sys/stat.h>
  6.2967 -
  6.2968 -#if defined(PATH_MAX)
  6.2969 -# define LT_PATHMAX PATH_MAX
  6.2970 -#elif defined(MAXPATHLEN)
  6.2971 -# define LT_PATHMAX MAXPATHLEN
  6.2972 -#else
  6.2973 -# define LT_PATHMAX 1024
  6.2974 -#endif
  6.2975 -
  6.2976 -#ifndef S_IXOTH
  6.2977 -# define S_IXOTH 0
  6.2978 -#endif
  6.2979 -#ifndef S_IXGRP
  6.2980 -# define S_IXGRP 0
  6.2981 -#endif
  6.2982 -
  6.2983 -#ifdef _MSC_VER
  6.2984 -# define S_IXUSR _S_IEXEC
  6.2985 -# define stat _stat
  6.2986 -# ifndef _INTPTR_T_DEFINED
  6.2987 -#  define intptr_t int
  6.2988 -# endif
  6.2989 -#endif
  6.2990 -
  6.2991 -#ifndef DIR_SEPARATOR
  6.2992 -# define DIR_SEPARATOR '/'
  6.2993 -# define PATH_SEPARATOR ':'
  6.2994 -#endif
  6.2995 -
  6.2996 -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
  6.2997 -  defined (__OS2__)
  6.2998 -# define HAVE_DOS_BASED_FILE_SYSTEM
  6.2999 -# define FOPEN_WB "wb"
  6.3000 -# ifndef DIR_SEPARATOR_2
  6.3001 -#  define DIR_SEPARATOR_2 '\\'
  6.3002 -# endif
  6.3003 -# ifndef PATH_SEPARATOR_2
  6.3004 -#  define PATH_SEPARATOR_2 ';'
  6.3005 -# endif
  6.3006 -#endif
  6.3007 -
  6.3008 -#ifndef DIR_SEPARATOR_2
  6.3009 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
  6.3010 -#else /* DIR_SEPARATOR_2 */
  6.3011 -# define IS_DIR_SEPARATOR(ch) \
  6.3012 -	(((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
  6.3013 -#endif /* DIR_SEPARATOR_2 */
  6.3014 -
  6.3015 -#ifndef PATH_SEPARATOR_2
  6.3016 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
  6.3017 -#else /* PATH_SEPARATOR_2 */
  6.3018 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
  6.3019 -#endif /* PATH_SEPARATOR_2 */
  6.3020 -
  6.3021 -#ifdef __CYGWIN__
  6.3022 -# define FOPEN_WB "wb"
  6.3023 -#endif
  6.3024 -
  6.3025 -#ifndef FOPEN_WB
  6.3026 -# define FOPEN_WB "w"
  6.3027 -#endif
  6.3028 -#ifndef _O_BINARY
  6.3029 -# define _O_BINARY 0
  6.3030 -#endif
  6.3031 -
  6.3032 -#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
  6.3033 -#define XFREE(stale) do { \
  6.3034 -  if (stale) { free ((void *) stale); stale = 0; } \
  6.3035 -} while (0)
  6.3036 -
  6.3037 -#undef LTWRAPPER_DEBUGPRINTF
  6.3038 -#if defined DEBUGWRAPPER
  6.3039 -# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
  6.3040 -static void
  6.3041 -ltwrapper_debugprintf (const char *fmt, ...)
  6.3042 -{
  6.3043 -    va_list args;
  6.3044 -    va_start (args, fmt);
  6.3045 -    (void) vfprintf (stderr, fmt, args);
  6.3046 -    va_end (args);
  6.3047 -}
  6.3048 -#else
  6.3049 -# define LTWRAPPER_DEBUGPRINTF(args)
  6.3050 -#endif
  6.3051 -
  6.3052 -const char *program_name = NULL;
  6.3053 -
  6.3054 -void *xmalloc (size_t num);
  6.3055 -char *xstrdup (const char *string);
  6.3056 -const char *base_name (const char *name);
  6.3057 -char *find_executable (const char *wrapper);
  6.3058 -char *chase_symlinks (const char *pathspec);
  6.3059 -int make_executable (const char *path);
  6.3060 -int check_executable (const char *path);
  6.3061 -char *strendzap (char *str, const char *pat);
  6.3062 -void lt_fatal (const char *message, ...);
  6.3063 -
  6.3064 -static const char *script_text =
  6.3065 -EOF
  6.3066 -
  6.3067 -	    func_emit_wrapper yes |
  6.3068 -	        $SED -e 's/\([\\"]\)/\\\1/g' \
  6.3069 -	             -e 's/^/  "/' -e 's/$/\\n"/'
  6.3070 -	    echo ";"
  6.3071 -
  6.3072 -	    cat <<EOF
  6.3073 -const char * MAGIC_EXE = "$magic_exe";
  6.3074 -
  6.3075 -int
  6.3076 -main (int argc, char *argv[])
  6.3077 -{
  6.3078 -  char **newargz;
  6.3079 -  char *tmp_pathspec;
  6.3080 -  char *actual_cwrapper_path;
  6.3081 -  char *shwrapper_name;
  6.3082 -  intptr_t rval = 127;
  6.3083 -  FILE *shwrapper;
  6.3084 -
  6.3085 -  const char *dumpscript_opt = "--lt-dump-script";
  6.3086 -  int i;
  6.3087 -
  6.3088 -  program_name = (char *) xstrdup (base_name (argv[0]));
  6.3089 -  LTWRAPPER_DEBUGPRINTF (("(main) argv[0]      : %s\n", argv[0]));
  6.3090 -  LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
  6.3091 -
  6.3092 -  /* very simple arg parsing; don't want to rely on getopt */
  6.3093 -  for (i = 1; i < argc; i++)
  6.3094 -    {
  6.3095 -      if (strcmp (argv[i], dumpscript_opt) == 0)
  6.3096 -	{
  6.3097 -EOF
  6.3098 -	    case "$host" in
  6.3099 -	      *mingw* | *cygwin* )
  6.3100 -		# make stdout use "unix" line endings
  6.3101 -		echo "          setmode(1,_O_BINARY);"
  6.3102 -		;;
  6.3103 -	      esac
  6.3104 -
  6.3105 -	    cat <<EOF
  6.3106 -	  printf ("%s", script_text);
  6.3107 -	  return 0;
  6.3108 -	}
  6.3109 -    }
  6.3110 -
  6.3111 -  newargz = XMALLOC (char *, argc + 2);
  6.3112 -EOF
  6.3113 -
  6.3114 -	    if test -n "$TARGETSHELL" ; then
  6.3115 -	      # no path translation at all
  6.3116 -	      lt_newargv0=$TARGETSHELL
  6.3117 -	    else
  6.3118 -	      case "$host" in
  6.3119 -		*mingw* )
  6.3120 -		  # awkward: cmd appends spaces to result
  6.3121 -		  lt_sed_strip_trailing_spaces="s/[ ]*\$//"
  6.3122 -		  lt_newargv0=`( cmd //c echo $SHELL | $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo $SHELL`
  6.3123 -		  case $lt_newargv0 in
  6.3124 -		    *.exe | *.EXE) ;;
  6.3125 -		    *) lt_newargv0=$lt_newargv0.exe ;;
  6.3126 -		  esac
  6.3127 -		  ;;
  6.3128 -		* ) lt_newargv0=$SHELL ;;
  6.3129 -	      esac
  6.3130 -	    fi
  6.3131 -
  6.3132 -		cat <<EOF
  6.3133 -  newargz[0] = (char *) xstrdup ("$lt_newargv0");
  6.3134 -EOF
  6.3135 -
  6.3136 -	    cat <<"EOF"
  6.3137 -  tmp_pathspec = find_executable (argv[0]);
  6.3138 -  if (tmp_pathspec == NULL)
  6.3139 -    lt_fatal ("Couldn't find %s", argv[0]);
  6.3140 -  LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
  6.3141 -			  tmp_pathspec));
  6.3142 -
  6.3143 -  actual_cwrapper_path = chase_symlinks (tmp_pathspec);
  6.3144 -  LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
  6.3145 -			  actual_cwrapper_path));
  6.3146 -  XFREE (tmp_pathspec);
  6.3147 -
  6.3148 -  shwrapper_name = (char *) xstrdup (base_name (actual_cwrapper_path));
  6.3149 -  strendzap (actual_cwrapper_path, shwrapper_name);
  6.3150 -
  6.3151 -  /* shwrapper_name transforms */
  6.3152 -  strendzap (shwrapper_name, ".exe");
  6.3153 -  tmp_pathspec = XMALLOC (char, (strlen (shwrapper_name) +
  6.3154 -				 strlen ("_ltshwrapperTMP") + 1));
  6.3155 -  strcpy (tmp_pathspec, shwrapper_name);
  6.3156 -  strcat (tmp_pathspec, "_ltshwrapperTMP");
  6.3157 -  XFREE (shwrapper_name);
  6.3158 -  shwrapper_name = tmp_pathspec;
  6.3159 -  tmp_pathspec = 0;
  6.3160 -  LTWRAPPER_DEBUGPRINTF (("(main) libtool shell wrapper name: %s\n",
  6.3161 -			  shwrapper_name));
  6.3162 -EOF
  6.3163 -
  6.3164 -	    cat <<EOF
  6.3165 -  newargz[1] =
  6.3166 -    XMALLOC (char, (strlen (actual_cwrapper_path) +
  6.3167 -		    strlen ("$objdir") + 1 + strlen (shwrapper_name) + 1));
  6.3168 -  strcpy (newargz[1], actual_cwrapper_path);
  6.3169 -  strcat (newargz[1], "$objdir");
  6.3170 -  strcat (newargz[1], "/");
  6.3171 -  strcat (newargz[1], shwrapper_name);
  6.3172 -EOF
  6.3173 -
  6.3174 -
  6.3175 -	    case $host_os in
  6.3176 -	      mingw*)
  6.3177 -	    cat <<"EOF"
  6.3178 -  {
  6.3179 -    char* p;
  6.3180 -    while ((p = strchr (newargz[1], '\\')) != NULL)
  6.3181 -      {
  6.3182 -	*p = '/';
  6.3183 -      }
  6.3184 -  }
  6.3185 -EOF
  6.3186 -	    ;;
  6.3187 -	    esac
  6.3188 -
  6.3189 -	    cat <<"EOF"
  6.3190 -  XFREE (shwrapper_name);
  6.3191 -  XFREE (actual_cwrapper_path);
  6.3192 -
  6.3193 -  /* always write in binary mode */
  6.3194 -  if ((shwrapper = fopen (newargz[1], FOPEN_WB)) == 0)
  6.3195 -    {
  6.3196 -      lt_fatal ("Could not open %s for writing", newargz[1]);
  6.3197 -    }
  6.3198 -  fprintf (shwrapper, "%s", script_text);
  6.3199 -  fclose (shwrapper);
  6.3200 -
  6.3201 -  make_executable (newargz[1]);
  6.3202 -
  6.3203 -  for (i = 1; i < argc; i++)
  6.3204 -    newargz[i + 1] = xstrdup (argv[i]);
  6.3205 -  newargz[argc + 1] = NULL;
  6.3206 -
  6.3207 -  for (i = 0; i < argc + 1; i++)
  6.3208 -    {
  6.3209 -      LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d]   : %s\n", i, newargz[i]));
  6.3210 -    }
  6.3211 -
  6.3212 -EOF
  6.3213 -
  6.3214 -	    case $host_os in
  6.3215 -	      mingw*)
  6.3216 -		cat <<EOF
  6.3217 -  /* execv doesn't actually work on mingw as expected on unix */
  6.3218 -  rval = _spawnv (_P_WAIT, "$lt_newargv0", (const char * const *) newargz);
  6.3219 -  if (rval == -1)
  6.3220 -    {
  6.3221 -      /* failed to start process */
  6.3222 -      LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"$lt_newargv0\": errno = %d\n", errno));
  6.3223 -      return 127;
  6.3224 -    }
  6.3225 -  return rval;
  6.3226 -}
  6.3227 -EOF
  6.3228 -		;;
  6.3229 -	      *)
  6.3230 -		cat <<EOF
  6.3231 -  execv ("$lt_newargv0", newargz);
  6.3232 -  return rval; /* =127, but avoids unused variable warning */
  6.3233 -}
  6.3234 -EOF
  6.3235 -		;;
  6.3236 -	    esac
  6.3237 -
  6.3238 -	    cat <<"EOF"
  6.3239 -
  6.3240 -void *
  6.3241 -xmalloc (size_t num)
  6.3242 -{
  6.3243 -  void *p = (void *) malloc (num);
  6.3244 -  if (!p)
  6.3245 -    lt_fatal ("Memory exhausted");
  6.3246 -
  6.3247 -  return p;
  6.3248 -}
  6.3249 -
  6.3250 -char *
  6.3251 -xstrdup (const char *string)
  6.3252 -{
  6.3253 -  return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
  6.3254 -			  string) : NULL;
  6.3255 -}
  6.3256 -
  6.3257 -const char *
  6.3258 -base_name (const char *name)
  6.3259 -{
  6.3260 -  const char *base;
  6.3261 -
  6.3262 -#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
  6.3263 -  /* Skip over the disk name in MSDOS pathnames. */
  6.3264 -  if (isalpha ((unsigned char) name[0]) && name[1] == ':')
  6.3265 -    name += 2;
  6.3266 -#endif
  6.3267 -
  6.3268 -  for (base = name; *name; name++)
  6.3269 -    if (IS_DIR_SEPARATOR (*name))
  6.3270 -      base = name + 1;
  6.3271 -  return base;
  6.3272 -}
  6.3273 -
  6.3274 -int
  6.3275 -check_executable (const char *path)
  6.3276 -{
  6.3277 -  struct stat st;
  6.3278 -
  6.3279 -  LTWRAPPER_DEBUGPRINTF (("(check_executable)  : %s\n",
  6.3280 -			  path ? (*path ? path : "EMPTY!") : "NULL!"));
  6.3281 -  if ((!path) || (!*path))
  6.3282 -    return 0;
  6.3283 -
  6.3284 -  if ((stat (path, &st) >= 0)
  6.3285 -      && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
  6.3286 -    return 1;
  6.3287 -  else
  6.3288 -    return 0;
  6.3289 -}
  6.3290 -
  6.3291 -int
  6.3292 -make_executable (const char *path)
  6.3293 -{
  6.3294 -  int rval = 0;
  6.3295 -  struct stat st;
  6.3296 -
  6.3297 -  LTWRAPPER_DEBUGPRINTF (("(make_executable)   : %s\n",
  6.3298 -			  path ? (*path ? path : "EMPTY!") : "NULL!"));
  6.3299 -  if ((!path) || (!*path))
  6.3300 -    return 0;
  6.3301 -
  6.3302 -  if (stat (path, &st) >= 0)
  6.3303 -    {
  6.3304 -      rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
  6.3305 -    }
  6.3306 -  return rval;
  6.3307 -}
  6.3308 -
  6.3309 -/* Searches for the full path of the wrapper.  Returns
  6.3310 -   newly allocated full path name if found, NULL otherwise
  6.3311 -   Does not chase symlinks, even on platforms that support them.
  6.3312 -*/
  6.3313 -char *
  6.3314 -find_executable (const char *wrapper)
  6.3315 -{
  6.3316 -  int has_slash = 0;
  6.3317 -  const char *p;
  6.3318 -  const char *p_next;
  6.3319 -  /* static buffer for getcwd */
  6.3320 -  char tmp[LT_PATHMAX + 1];
  6.3321 -  int tmp_len;
  6.3322 -  char *concat_name;
  6.3323 -
  6.3324 -  LTWRAPPER_DEBUGPRINTF (("(find_executable)   : %s\n",
  6.3325 -			  wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
  6.3326 -
  6.3327 -  if ((wrapper == NULL) || (*wrapper == '\0'))
  6.3328 -    return NULL;
  6.3329 -
  6.3330 -  /* Absolute path? */
  6.3331 -#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
  6.3332 -  if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
  6.3333 -    {
  6.3334 -      concat_name = xstrdup (wrapper);
  6.3335 -      if (check_executable (concat_name))
  6.3336 -	return concat_name;
  6.3337 -      XFREE (concat_name);
  6.3338 -    }
  6.3339 -  else
  6.3340 -    {
  6.3341 -#endif
  6.3342 -      if (IS_DIR_SEPARATOR (wrapper[0]))
  6.3343 -	{
  6.3344 -	  concat_name = xstrdup (wrapper);
  6.3345 -	  if (check_executable (concat_name))
  6.3346 -	    return concat_name;
  6.3347 -	  XFREE (concat_name);
  6.3348 -	}
  6.3349 -#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
  6.3350 -    }
  6.3351 -#endif
  6.3352 -
  6.3353 -  for (p = wrapper; *p; p++)
  6.3354 -    if (*p == '/')
  6.3355 -      {
  6.3356 -	has_slash = 1;
  6.3357 -	break;
  6.3358 -      }
  6.3359 -  if (!has_slash)
  6.3360 -    {
  6.3361 -      /* no slashes; search PATH */
  6.3362 -      const char *path = getenv ("PATH");
  6.3363 -      if (path != NULL)
  6.3364 -	{
  6.3365 -	  for (p = path; *p; p = p_next)
  6.3366 -	    {
  6.3367 -	      const char *q;
  6.3368 -	      size_t p_len;
  6.3369 -	      for (q = p; *q; q++)
  6.3370 -		if (IS_PATH_SEPARATOR (*q))
  6.3371 -		  break;
  6.3372 -	      p_len = q - p;
  6.3373 -	      p_next = (*q == '\0' ? q : q + 1);
  6.3374 -	      if (p_len == 0)
  6.3375 -		{
  6.3376 -		  /* empty path: current directory */
  6.3377 -		  if (getcwd (tmp, LT_PATHMAX) == NULL)
  6.3378 -		    lt_fatal ("getcwd failed");
  6.3379 -		  tmp_len = strlen (tmp);
  6.3380 -		  concat_name =
  6.3381 -		    XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
  6.3382 -		  memcpy (concat_name, tmp, tmp_len);
  6.3383 -		  concat_name[tmp_len] = '/';
  6.3384 -		  strcpy (concat_name + tmp_len + 1, wrapper);
  6.3385 -		}
  6.3386 -	      else
  6.3387 -		{
  6.3388 -		  concat_name =
  6.3389 -		    XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
  6.3390 -		  memcpy (concat_name, p, p_len);
  6.3391 -		  concat_name[p_len] = '/';
  6.3392 -		  strcpy (concat_name + p_len + 1, wrapper);
  6.3393 -		}
  6.3394 -	      if (check_executable (concat_name))
  6.3395 -		return concat_name;
  6.3396 -	      XFREE (concat_name);
  6.3397 -	    }
  6.3398 -	}
  6.3399 -      /* not found in PATH; assume curdir */
  6.3400 -    }
  6.3401 -  /* Relative path | not found in path: prepend cwd */
  6.3402 -  if (getcwd (tmp, LT_PATHMAX) == NULL)
  6.3403 -    lt_fatal ("getcwd failed");
  6.3404 -  tmp_len = strlen (tmp);
  6.3405 -  concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
  6.3406 -  memcpy (concat_name, tmp, tmp_len);
  6.3407 -  concat_name[tmp_len] = '/';
  6.3408 -  strcpy (concat_name + tmp_len + 1, wrapper);
  6.3409 -
  6.3410 -  if (check_executable (concat_name))
  6.3411 -    return concat_name;
  6.3412 -  XFREE (concat_name);
  6.3413 -  return NULL;
  6.3414 -}
  6.3415 -
  6.3416 -char *
  6.3417 -chase_symlinks (const char *pathspec)
  6.3418 -{
  6.3419 -#ifndef S_ISLNK
  6.3420 -  return xstrdup (pathspec);
  6.3421 -#else
  6.3422 -  char buf[LT_PATHMAX];
  6.3423 -  struct stat s;
  6.3424 -  char *tmp_pathspec = xstrdup (pathspec);
  6.3425 -  char *p;
  6.3426 -  int has_symlinks = 0;
  6.3427 -  while (strlen (tmp_pathspec) && !has_symlinks)
  6.3428 -    {
  6.3429 -      LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
  6.3430 -			      tmp_pathspec));
  6.3431 -      if (lstat (tmp_pathspec, &s) == 0)
  6.3432 -	{
  6.3433 -	  if (S_ISLNK (s.st_mode) != 0)
  6.3434 -	    {
  6.3435 -	      has_symlinks = 1;
  6.3436 -	      break;
  6.3437 -	    }
  6.3438 -
  6.3439 -	  /* search backwards for last DIR_SEPARATOR */
  6.3440 -	  p = tmp_pathspec + strlen (tmp_pathspec) - 1;
  6.3441 -	  while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
  6.3442 -	    p--;
  6.3443 -	  if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
  6.3444 -	    {
  6.3445 -	      /* no more DIR_SEPARATORS left */
  6.3446 -	      break;
  6.3447 -	    }
  6.3448 -	  *p = '\0';
  6.3449 -	}
  6.3450 -      else
  6.3451 -	{
  6.3452 -	  char *errstr = strerror (errno);
  6.3453 -	  lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
  6.3454 -	}
  6.3455 -    }
  6.3456 -  XFREE (tmp_pathspec);
  6.3457 -
  6.3458 -  if (!has_symlinks)
  6.3459 -    {
  6.3460 -      return xstrdup (pathspec);
  6.3461 -    }
  6.3462 -
  6.3463 -  tmp_pathspec = realpath (pathspec, buf);
  6.3464 -  if (tmp_pathspec == 0)
  6.3465 -    {
  6.3466 -      lt_fatal ("Could not follow symlinks for %s", pathspec);
  6.3467 -    }
  6.3468 -  return xstrdup (tmp_pathspec);
  6.3469 -#endif
  6.3470 -}
  6.3471 -
  6.3472 -char *
  6.3473 -strendzap (char *str, const char *pat)
  6.3474 -{
  6.3475 -  size_t len, patlen;
  6.3476 -
  6.3477 -  assert (str != NULL);
  6.3478 -  assert (pat != NULL);
  6.3479 -
  6.3480 -  len = strlen (str);
  6.3481 -  patlen = strlen (pat);
  6.3482 -
  6.3483 -  if (patlen <= len)
  6.3484 -    {
  6.3485 -      str += len - patlen;
  6.3486 -      if (strcmp (str, pat) == 0)
  6.3487 -	*str = '\0';
  6.3488 -    }
  6.3489 -  return str;
  6.3490 -}
  6.3491 -
  6.3492 -static void
  6.3493 -lt_error_core (int exit_status, const char *mode,
  6.3494 -	       const char *message, va_list ap)
  6.3495 -{
  6.3496 -  fprintf (stderr, "%s: %s: ", program_name, mode);
  6.3497 -  vfprintf (stderr, message, ap);
  6.3498 -  fprintf (stderr, ".\n");
  6.3499 -
  6.3500 -  if (exit_status >= 0)
  6.3501 -    exit (exit_status);
  6.3502 -}
  6.3503 -
  6.3504 -void
  6.3505 -lt_fatal (const char *message, ...)
  6.3506 -{
  6.3507 -  va_list ap;
  6.3508 -  va_start (ap, message);
  6.3509 -  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
  6.3510 -  va_end (ap);
  6.3511 -}
  6.3512 -EOF
  6.3513 -}
  6.3514 -# end: func_emit_cwrapperexe_src
  6.3515 -
  6.3516 -# func_mode_link arg...
  6.3517 -func_mode_link ()
  6.3518 -{
  6.3519 -    $opt_debug
  6.3520 -    case $host in
  6.3521 -    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
  6.3522 -      # It is impossible to link a dll without this setting, and
  6.3523 -      # we shouldn't force the makefile maintainer to figure out
  6.3524 -      # which system we are compiling for in order to pass an extra
  6.3525 -      # flag for every libtool invocation.
  6.3526 -      # allow_undefined=no
  6.3527 -
  6.3528 -      # FIXME: Unfortunately, there are problems with the above when trying
  6.3529 -      # to make a dll which has undefined symbols, in which case not
  6.3530 -      # even a static library is built.  For now, we need to specify
  6.3531 -      # -no-undefined on the libtool link line when we can be certain
  6.3532 -      # that all symbols are satisfied, otherwise we get a static library.
  6.3533 -      allow_undefined=yes
  6.3534 -      ;;
  6.3535 -    *)
  6.3536 -      allow_undefined=yes
  6.3537 -      ;;
  6.3538 -    esac
  6.3539 -    libtool_args=$nonopt
  6.3540 -    base_compile="$nonopt [email protected]"
  6.3541 -    compile_command=$nonopt
  6.3542 -    finalize_command=$nonopt
  6.3543 -
  6.3544 -    compile_rpath=
  6.3545 -    finalize_rpath=
  6.3546 -    compile_shlibpath=
  6.3547 -    finalize_shlibpath=
  6.3548 -    convenience=
  6.3549 -    old_convenience=
  6.3550 -    deplibs=
  6.3551 -    old_deplibs=
  6.3552 -    compiler_flags=
  6.3553 -    linker_flags=
  6.3554 -    dllsearchpath=
  6.3555 -    lib_search_path=`pwd`
  6.3556 -    inst_prefix_dir=
  6.3557 -    new_inherited_linker_flags=
  6.3558 -
  6.3559 -    avoid_version=no
  6.3560 -    dlfiles=
  6.3561 -    dlprefiles=
  6.3562 -    dlself=no
  6.3563 -    export_dynamic=no
  6.3564 -    export_symbols=
  6.3565 -    export_symbols_regex=
  6.3566 -    generated=
  6.3567 -    libobjs=
  6.3568 -    ltlibs=
  6.3569 -    module=no
  6.3570 -    no_install=no
  6.3571 -    objs=
  6.3572 -    non_pic_objects=
  6.3573 -    precious_files_regex=
  6.3574 -    prefer_static_libs=no
  6.3575 -    preload=no
  6.3576 -    prev=
  6.3577 -    prevarg=
  6.3578 -    release=
  6.3579 -    rpath=
  6.3580 -    xrpath=
  6.3581 -    perm_rpath=
  6.3582 -    temp_rpath=
  6.3583 -    thread_safe=no
  6.3584 -    vinfo=
  6.3585 -    vinfo_number=no
  6.3586 -    weak_libs=
  6.3587 -    single_module="${wl}-single_module"
  6.3588 -    func_infer_tag $base_compile
  6.3589 -
  6.3590 -    # We need to know -static, to get the right output filenames.
  6.3591 -    for arg
  6.3592 -    do
  6.3593 -      case $arg in
  6.3594 -      -shared)
  6.3595 -	test "$build_libtool_libs" != yes && \
  6.3596 -	  func_fatal_configuration "can not build a shared library"
  6.3597 -	build_old_libs=no
  6.3598 -	break
  6.3599 -	;;
  6.3600 -      -all-static | -static | -static-libtool-libs)
  6.3601 -	case $arg in
  6.3602 -	-all-static)
  6.3603 -	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
  6.3604 -	    func_warning "complete static linking is impossible in this configuration"
  6.3605 -	  fi
  6.3606 -	  if test -n "$link_static_flag"; then
  6.3607 -	    dlopen_self=$dlopen_self_static
  6.3608 -	  fi
  6.3609 -	  prefer_static_libs=yes
  6.3610 -	  ;;
  6.3611 -	-static)
  6.3612 -	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
  6.3613 -	    dlopen_self=$dlopen_self_static
  6.3614 -	  fi
  6.3615 -	  prefer_static_libs=built
  6.3616 -	  ;;
  6.3617 -	-static-libtool-libs)
  6.3618 -	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
  6.3619 -	    dlopen_self=$dlopen_self_static
  6.3620 -	  fi
  6.3621 -	  prefer_static_libs=yes
  6.3622 -	  ;;
  6.3623 -	esac
  6.3624 -	build_libtool_libs=no
  6.3625 -	build_old_libs=yes
  6.3626 -	break
  6.3627 -	;;
  6.3628 -      esac
  6.3629 -    done
  6.3630 -
  6.3631 -    # See if our shared archives depend on static archives.
  6.3632 -    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
  6.3633 -
  6.3634 -    # Go through the arguments, transforming them on the way.
  6.3635 -    while test "$#" -gt 0; do
  6.3636 -      arg="$1"
  6.3637 -      shift
  6.3638 -      func_quote_for_eval "$arg"
  6.3639 -      qarg=$func_quote_for_eval_unquoted_result
  6.3640 -      func_append libtool_args " $func_quote_for_eval_result"
  6.3641 -
  6.3642 -      # If the previous option needs an argument, assign it.
  6.3643 -      if test -n "$prev"; then
  6.3644 -	case $prev in
  6.3645 -	output)
  6.3646 -	  func_append compile_command " @[email protected]"
  6.3647 -	  func_append finalize_command " @[email protected]"
  6.3648 -	  ;;
  6.3649 -	esac
  6.3650 -
  6.3651 -	case $prev in
  6.3652 -	dlfiles|dlprefiles)
  6.3653 -	  if test "$preload" = no; then
  6.3654 -	    # Add the symbol object into the linking commands.
  6.3655 -	    func_append compile_command " @[email protected]"
  6.3656 -	    func_append finalize_command " @[email protected]"
  6.3657 -	    preload=yes
  6.3658 -	  fi
  6.3659 -	  case $arg in
  6.3660 -	  *.la | *.lo) ;;  # We handle these cases below.
  6.3661 -	  force)
  6.3662 -	    if test "$dlself" = no; then
  6.3663 -	      dlself=needless
  6.3664 -	      export_dynamic=yes
  6.3665 -	    fi
  6.3666 -	    prev=
  6.3667 -	    continue
  6.3668 -	    ;;
  6.3669 -	  self)
  6.3670 -	    if test "$prev" = dlprefiles; then
  6.3671 -	      dlself=yes
  6.3672 -	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
  6.3673 -	      dlself=yes
  6.3674 -	    else
  6.3675 -	      dlself=needless
  6.3676 -	      export_dynamic=yes
  6.3677 -	    fi
  6.3678 -	    prev=
  6.3679 -	    continue
  6.3680 -	    ;;
  6.3681 -	  *)
  6.3682 -	    if test "$prev" = dlfiles; then
  6.3683 -	      dlfiles="$dlfiles $arg"
  6.3684 -	    else
  6.3685 -	      dlprefiles="$dlprefiles $arg"
  6.3686 -	    fi
  6.3687 -	    prev=
  6.3688 -	    continue
  6.3689 -	    ;;
  6.3690 -	  esac
  6.3691 -	  ;;
  6.3692 -	expsyms)
  6.3693 -	  export_symbols="$arg"
  6.3694 -	  test -f "$arg" \
  6.3695 -	    || func_fatal_error "symbol file \`$arg' does not exist"
  6.3696 -	  prev=
  6.3697 -	  continue
  6.3698 -	  ;;
  6.3699 -	expsyms_regex)
  6.3700 -	  export_symbols_regex="$arg"
  6.3701 -	  prev=
  6.3702 -	  continue
  6.3703 -	  ;;
  6.3704 -	framework)
  6.3705 -	  case $host in
  6.3706 -	    *-*-darwin*)
  6.3707 -	      case "$deplibs " in
  6.3708 -		*" $qarg.ltframework "*) ;;
  6.3709 -		*) deplibs="$deplibs $qarg.ltframework" # this is fixed later
  6.3710 -		   ;;
  6.3711 -	      esac
  6.3712 -	      ;;
  6.3713 -	  esac
  6.3714 -	  prev=
  6.3715 -	  continue
  6.3716 -	  ;;
  6.3717 -	inst_prefix)
  6.3718 -	  inst_prefix_dir="$arg"
  6.3719 -	  prev=
  6.3720 -	  continue
  6.3721 -	  ;;
  6.3722 -	objectlist)
  6.3723 -	  if test -f "$arg"; then
  6.3724 -	    save_arg=$arg
  6.3725 -	    moreargs=
  6.3726 -	    for fil in `cat "$save_arg"`
  6.3727 -	    do
  6.3728 -#	      moreargs="$moreargs $fil"
  6.3729 -	      arg=$fil
  6.3730 -	      # A libtool-controlled object.
  6.3731 -
  6.3732 -	      # Check to see that this really is a libtool object.
  6.3733 -	      if func_lalib_unsafe_p "$arg"; then
  6.3734 -		pic_object=
  6.3735 -		non_pic_object=
  6.3736 -
  6.3737 -		# Read the .lo file
  6.3738 -		func_source "$arg"
  6.3739 -
  6.3740 -		if test -z "$pic_object" ||
  6.3741 -		   test -z "$non_pic_object" ||
  6.3742 -		   test "$pic_object" = none &&
  6.3743 -		   test "$non_pic_object" = none; then
  6.3744 -		  func_fatal_error "cannot find name of object for \`$arg'"
  6.3745 -		fi
  6.3746 -
  6.3747 -		# Extract subdirectory from the argument.
  6.3748 -		func_dirname "$arg" "/" ""
  6.3749 -		xdir="$func_dirname_result"
  6.3750 -
  6.3751 -		if test "$pic_object" != none; then
  6.3752 -		  # Prepend the subdirectory the object is found in.
  6.3753 -		  pic_object="$xdir$pic_object"
  6.3754 -
  6.3755 -		  if test "$prev" = dlfiles; then
  6.3756 -		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
  6.3757 -		      dlfiles="$dlfiles $pic_object"
  6.3758 -		      prev=
  6.3759 -		      continue
  6.3760 -		    else
  6.3761 -		      # If libtool objects are unsupported, then we need to preload.
  6.3762 -		      prev=dlprefiles
  6.3763 -		    fi
  6.3764 -		  fi
  6.3765 -
  6.3766 -		  # CHECK ME:  I think I busted this.  -Ossama
  6.3767 -		  if test "$prev" = dlprefiles; then
  6.3768 -		    # Preload the old-style object.
  6.3769 -		    dlprefiles="$dlprefiles $pic_object"
  6.3770 -		    prev=
  6.3771 -		  fi
  6.3772 -
  6.3773 -		  # A PIC object.
  6.3774 -		  func_append libobjs " $pic_object"
  6.3775 -		  arg="$pic_object"
  6.3776 -		fi
  6.3777 -
  6.3778 -		# Non-PIC object.
  6.3779 -		if test "$non_pic_object" != none; then
  6.3780 -		  # Prepend the subdirectory the object is found in.
  6.3781 -		  non_pic_object="$xdir$non_pic_object"
  6.3782 -
  6.3783 -		  # A standard non-PIC object
  6.3784 -		  func_append non_pic_objects " $non_pic_object"
  6.3785 -		  if test -z "$pic_object" || test "$pic_object" = none ; then
  6.3786 -		    arg="$non_pic_object"
  6.3787 -		  fi
  6.3788 -		else
  6.3789 -		  # If the PIC object exists, use it instead.
  6.3790 -		  # $xdir was prepended to $pic_object above.
  6.3791 -		  non_pic_object="$pic_object"
  6.3792 -		  func_append non_pic_objects " $non_pic_object"
  6.3793 -		fi
  6.3794 -	      else
  6.3795 -		# Only an error if not doing a dry-run.
  6.3796 -		if $opt_dry_run; then
  6.3797 -		  # Extract subdirectory from the argument.
  6.3798 -		  func_dirname "$arg" "/" ""
  6.3799 -		  xdir="$func_dirname_result"
  6.3800 -
  6.3801 -		  func_lo2o "$arg"
  6.3802 -		  pic_object=$xdir$objdir/$func_lo2o_result
  6.3803 -		  non_pic_object=$xdir$func_lo2o_result
  6.3804 -		  func_append libobjs " $pic_object"
  6.3805 -		  func_append non_pic_objects " $non_pic_object"
  6.3806 -	        else
  6.3807 -		  func_fatal_error "\`$arg' is not a valid libtool object"
  6.3808 -		fi
  6.3809 -	      fi
  6.3810 -	    done
  6.3811 -	  else
  6.3812 -	    func_fatal_error "link input file \`$arg' does not exist"
  6.3813 -	  fi
  6.3814 -	  arg=$save_arg
  6.3815 -	  prev=
  6.3816 -	  continue
  6.3817 -	  ;;
  6.3818 -	precious_regex)
  6.3819 -	  precious_files_regex="$arg"
  6.3820 -	  prev=
  6.3821 -	  continue
  6.3822 -	  ;;
  6.3823 -	release)
  6.3824 -	  release="-$arg"
  6.3825 -	  prev=
  6.3826 -	  continue
  6.3827 -	  ;;
  6.3828 -	rpath | xrpath)
  6.3829 -	  # We need an absolute path.
  6.3830 -	  case $arg in
  6.3831 -	  [\\/]* | [A-Za-z]:[\\/]*) ;;
  6.3832 -	  *)
  6.3833 -	    func_fatal_error "only absolute run-paths are allowed"
  6.3834 -	    ;;
  6.3835 -	  esac
  6.3836 -	  if test "$prev" = rpath; then
  6.3837 -	    case "$rpath " in
  6.3838 -	    *" $arg "*) ;;
  6.3839 -	    *) rpath="$rpath $arg" ;;
  6.3840 -	    esac
  6.3841 -	  else
  6.3842 -	    case "$xrpath " in
  6.3843 -	    *" $arg "*) ;;
  6.3844 -	    *) xrpath="$xrpath $arg" ;;
  6.3845 -	    esac
  6.3846 -	  fi
  6.3847 -	  prev=
  6.3848 -	  continue
  6.3849 -	  ;;
  6.3850 -	shrext)
  6.3851 -	  shrext_cmds="$arg"
  6.3852 -	  prev=
  6.3853 -	  continue
  6.3854 -	  ;;
  6.3855 -	weak)
  6.3856 -	  weak_libs="$weak_libs $arg"
  6.3857 -	  prev=
  6.3858 -	  continue
  6.3859 -	  ;;
  6.3860 -	xcclinker)
  6.3861 -	  linker_flags="$linker_flags $qarg"
  6.3862 -	  compiler_flags="$compiler_flags $qarg"
  6.3863 -	  prev=
  6.3864 -	  func_append compile_command " $qarg"
  6.3865 -	  func_append finalize_command " $qarg"
  6.3866 -	  continue
  6.3867 -	  ;;
  6.3868 -	xcompiler)
  6.3869 -	  compiler_flags="$compiler_flags $qarg"
  6.3870 -	  prev=
  6.3871 -	  func_append compile_command " $qarg"
  6.3872 -	  func_append finalize_command " $qarg"
  6.3873 -	  continue
  6.3874 -	  ;;
  6.3875 -	xlinker)
  6.3876 -	  linker_flags="$linker_flags $qarg"
  6.3877 -	  compiler_flags="$compiler_flags $wl$qarg"
  6.3878 -	  prev=
  6.3879 -	  func_append compile_command " $wl$qarg"
  6.3880 -	  func_append finalize_command " $wl$qarg"
  6.3881 -	  continue
  6.3882 -	  ;;
  6.3883 -	*)
  6.3884 -	  eval "$prev=\"\$arg\""
  6.3885 -	  prev=
  6.3886 -	  continue
  6.3887 -	  ;;
  6.3888 -	esac
  6.3889 -      fi # test -n "$prev"
  6.3890 -
  6.3891 -      prevarg="$arg"
  6.3892 -
  6.3893 -      case $arg in
  6.3894 -      -all-static)
  6.3895 -	if test -n "$link_static_flag"; then
  6.3896 -	  # See comment for -static flag below, for more details.
  6.3897 -	  func_append compile_command " $link_static_flag"
  6.3898 -	  func_append finalize_command " $link_static_flag"
  6.3899 -	fi
  6.3900 -	continue
  6.3901 -	;;
  6.3902 -
  6.3903 -      -allow-undefined)
  6.3904 -	# FIXME: remove this flag sometime in the future.
  6.3905 -	func_fatal_error "\`-allow-undefined' must not be used because it is the default"
  6.3906 -	;;
  6.3907 -
  6.3908 -      -avoid-version)
  6.3909 -	avoid_version=yes
  6.3910 -	continue
  6.3911 -	;;
  6.3912 -
  6.3913 -      -dlopen)
  6.3914 -	prev=dlfiles
  6.3915 -	continue
  6.3916 -	;;
  6.3917 -
  6.3918 -      -dlpreopen)
  6.3919 -	prev=dlprefiles
  6.3920 -	continue
  6.3921 -	;;
  6.3922 -
  6.3923 -      -export-dynamic)
  6.3924 -	export_dynamic=yes
  6.3925 -	continue
  6.3926 -	;;
  6.3927 -
  6.3928 -      -export-symbols | -export-symbols-regex)
  6.3929 -	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
  6.3930 -	  func_fatal_error "more than one -exported-symbols argument is not allowed"
  6.3931 -	fi
  6.3932 -	if test "X$arg" = "X-export-symbols"; then
  6.3933 -	  prev=expsyms
  6.3934 -	else
  6.3935 -	  prev=expsyms_regex
  6.3936 -	fi
  6.3937 -	continue
  6.3938 -	;;
  6.3939 -
  6.3940 -      -framework)
  6.3941 -	prev=framework
  6.3942 -	continue
  6.3943 -	;;
  6.3944 -
  6.3945 -      -inst-prefix-dir)
  6.3946 -	prev=inst_prefix
  6.3947 -	continue
  6.3948 -	;;
  6.3949 -
  6.3950 -      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
  6.3951 -      # so, if we see these flags be careful not to treat them like -L
  6.3952 -      -L[A-Z][A-Z]*:*)
  6.3953 -	case $with_gcc/$host in
  6.3954 -	no/*-*-irix* | /*-*-irix*)
  6.3955 -	  func_append compile_command " $arg"
  6.3956 -	  func_append finalize_command " $arg"
  6.3957 -	  ;;
  6.3958 -	esac
  6.3959 -	continue
  6.3960 -	;;
  6.3961 -
  6.3962 -      -L*)
  6.3963 -	func_stripname '-L' '' "$arg"
  6.3964 -	dir=$func_stripname_result
  6.3965 -	# We need an absolute path.
  6.3966 -	case $dir in
  6.3967 -	[\\/]* | [A-Za-z]:[\\/]*) ;;
  6.3968 -	*)
  6.3969 -	  absdir=`cd "$dir" && pwd`
  6.3970 -	  test -z "$absdir" && \
  6.3971 -	    func_fatal_error "cannot determine absolute directory name of \`$dir'"
  6.3972 -	  dir="$absdir"
  6.3973 -	  ;;
  6.3974 -	esac
  6.3975 -	case "$deplibs " in
  6.3976 -	*" -L$dir "*) ;;
  6.3977 -	*)
  6.3978 -	  deplibs="$deplibs -L$dir"
  6.3979 -	  lib_search_path="$lib_search_path $dir"
  6.3980 -	  ;;
  6.3981 -	esac
  6.3982 -	case $host in
  6.3983 -	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
  6.3984 -	  testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
  6.3985 -	  case :$dllsearchpath: in
  6.3986 -	  *":$dir:"*) ;;
  6.3987 -	  *) dllsearchpath="$dllsearchpath:$dir";;
  6.3988 -	  esac
  6.3989 -	  case :$dllsearchpath: in
  6.3990 -	  *":$testbindir:"*) ;;
  6.3991 -	  *) dllsearchpath="$dllsearchpath:$testbindir";;
  6.3992 -	  esac
  6.3993 -	  ;;
  6.3994 -	esac
  6.3995 -	continue
  6.3996 -	;;
  6.3997 -
  6.3998 -      -l*)
  6.3999 -	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
  6.4000 -	  case $host in
  6.4001 -	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
  6.4002 -	    # These systems don't actually have a C or math library (as such)
  6.4003 -	    continue
  6.4004 -	    ;;
  6.4005 -	  *-*-os2*)
  6.4006 -	    # These systems don't actually have a C library (as such)
  6.4007 -	    test "X$arg" = "X-lc" && continue
  6.4008 -	    ;;
  6.4009 -	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
  6.4010 -	    # Do not include libc due to us having libc/libc_r.
  6.4011 -	    test "X$arg" = "X-lc" && continue
  6.4012 -	    ;;
  6.4013 -	  *-*-rhapsody* | *-*-darwin1.[012])
  6.4014 -	    # Rhapsody C and math libraries are in the System framework
  6.4015 -	    deplibs="$deplibs System.ltframework"
  6.4016 -	    continue
  6.4017 -	    ;;
  6.4018 -	  *-*-sco3.2v5* | *-*-sco5v6*)
  6.4019 -	    # Causes problems with __ctype
  6.4020 -	    test "X$arg" = "X-lc" && continue
  6.4021 -	    ;;
  6.4022 -	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
  6.4023 -	    # Compiler inserts libc in the correct place for threads to work
  6.4024 -	    test "X$arg" = "X-lc" && continue
  6.4025 -	    ;;
  6.4026 -	  esac
  6.4027 -	elif test "X$arg" = "X-lc_r"; then
  6.4028 -	 case $host in
  6.4029 -	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
  6.4030 -	   # Do not include libc_r directly, use -pthread flag.
  6.4031 -	   continue
  6.4032 -	   ;;
  6.4033 -	 esac
  6.4034 -	fi
  6.4035 -	deplibs="$deplibs $arg"
  6.4036 -	continue
  6.4037 -	;;
  6.4038 -
  6.4039 -      -module)
  6.4040 -	module=yes
  6.4041 -	continue
  6.4042 -	;;
  6.4043 -
  6.4044 -      # Tru64 UNIX uses -model [arg] to determine the layout of C++
  6.4045 -      # classes, name mangling, and exception handling.
  6.4046 -      # Darwin uses the -arch flag to determine output architecture.
  6.4047 -      -model|-arch|-isysroot)
  6.4048 -	compiler_flags="$compiler_flags $arg"
  6.4049 -	func_append compile_command " $arg"
  6.4050 -	func_append finalize_command " $arg"
  6.4051 -	prev=xcompiler
  6.4052 -	continue
  6.4053 -	;;
  6.4054 -
  6.4055 -      -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
  6.4056 -	compiler_flags="$compiler_flags $arg"
  6.4057 -	func_append compile_command " $arg"
  6.4058 -	func_append finalize_command " $arg"
  6.4059 -	case "$new_inherited_linker_flags " in
  6.4060 -	    *" $arg "*) ;;
  6.4061 -	    * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
  6.4062 -	esac
  6.4063 -	continue
  6.4064 -	;;
  6.4065 -
  6.4066 -      -multi_module)
  6.4067 -	single_module="${wl}-multi_module"
  6.4068 -	continue
  6.4069 -	;;
  6.4070 -
  6.4071 -      -no-fast-install)
  6.4072 -	fast_install=no
  6.4073 -	continue
  6.4074 -	;;
  6.4075 -
  6.4076 -      -no-install)
  6.4077 -	case $host in
  6.4078 -	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
  6.4079 -	  # The PATH hackery in wrapper scripts is required on Windows
  6.4080 -	  # and Darwin in order for the loader to find any dlls it needs.
  6.4081 -	  func_warning "\`-no-install' is ignored for $host"
  6.4082 -	  func_warning "assuming \`-no-fast-install' instead"
  6.4083 -	  fast_install=no
  6.4084 -	  ;;
  6.4085 -	*) no_install=yes ;;
  6.4086 -	esac
  6.4087 -	continue
  6.4088 -	;;
  6.4089 -
  6.4090 -      -no-undefined)
  6.4091 -	allow_undefined=no
  6.4092 -	continue
  6.4093 -	;;
  6.4094 -
  6.4095 -      -objectlist)
  6.4096 -	prev=objectlist
  6.4097 -	continue
  6.4098 -	;;
  6.4099 -
  6.4100 -      -o) prev=output ;;
  6.4101 -
  6.4102 -      -precious-files-regex)
  6.4103 -	prev=precious_regex
  6.4104 -	continue
  6.4105 -	;;
  6.4106 -
  6.4107 -      -release)
  6.4108 -	prev=release
  6.4109 -	continue
  6.4110 -	;;
  6.4111 -
  6.4112 -      -rpath)
  6.4113 -	prev=rpath
  6.4114 -	continue
  6.4115 -	;;
  6.4116 -
  6.4117 -      -R)
  6.4118 -	prev=xrpath
  6.4119 -	continue
  6.4120 -	;;
  6.4121 -
  6.4122 -      -R*)
  6.4123 -	func_stripname '-R' '' "$arg"
  6.4124 -	dir=$func_stripname_result
  6.4125 -	# We need an absolute path.
  6.4126 -	case $dir in
  6.4127 -	[\\/]* | [A-Za-z]:[\\/]*) ;;
  6.4128 -	*)
  6.4129 -	  func_fatal_error "only absolute run-paths are allowed"
  6.4130 -	  ;;
  6.4131 -	esac
  6.4132 -	case "$xrpath " in
  6.4133 -	*" $dir "*) ;;
  6.4134 -	*) xrpath="$xrpath $dir" ;;
  6.4135 -	esac
  6.4136 -	continue
  6.4137 -	;;
  6.4138 -
  6.4139 -      -shared)
  6.4140 -	# The effects of -shared are defined in a previous loop.
  6.4141 -	continue
  6.4142 -	;;
  6.4143 -
  6.4144 -      -shrext)
  6.4145 -	prev=shrext
  6.4146 -	continue
  6.4147 -	;;
  6.4148 -
  6.4149 -      -static | -static-libtool-libs)
  6.4150 -	# The effects of -static are defined in a previous loop.
  6.4151 -	# We used to do the same as -all-static on platforms that
  6.4152 -	# didn't have a PIC flag, but the assumption that the effects
  6.4153 -	# would be equivalent was wrong.  It would break on at least
  6.4154 -	# Digital Unix and AIX.
  6.4155 -	continue
  6.4156 -	;;
  6.4157 -
  6.4158 -      -thread-safe)
  6.4159 -	thread_safe=yes
  6.4160 -	continue
  6.4161 -	;;
  6.4162 -
  6.4163 -      -version-info)
  6.4164 -	prev=vinfo
  6.4165 -	continue
  6.4166 -	;;
  6.4167 -
  6.4168 -      -version-number)
  6.4169 -	prev=vinfo
  6.4170 -	vinfo_number=yes
  6.4171 -	continue
  6.4172 -	;;
  6.4173 -
  6.4174 -      -weak)
  6.4175 -        prev=weak
  6.4176 -	continue
  6.4177 -	;;
  6.4178 -
  6.4179 -      -Wc,*)
  6.4180 -	func_stripname '-Wc,' '' "$arg"
  6.4181 -	args=$func_stripname_result
  6.4182 -	arg=
  6.4183 -	save_ifs="$IFS"; IFS=','
  6.4184 -	for flag in $args; do
  6.4185 -	  IFS="$save_ifs"
  6.4186 -          func_quote_for_eval "$flag"
  6.4187 -	  arg="$arg $wl$func_quote_for_eval_result"
  6.4188 -	  compiler_flags="$compiler_flags $func_quote_for_eval_result"
  6.4189 -	done
  6.4190 -	IFS="$save_ifs"
  6.4191 -	func_stripname ' ' '' "$arg"
  6.4192 -	arg=$func_stripname_result
  6.4193 -	;;
  6.4194 -
  6.4195 -      -Wl,*)
  6.4196 -	func_stripname '-Wl,' '' "$arg"
  6.4197 -	args=$func_stripname_result
  6.4198 -	arg=
  6.4199 -	save_ifs="$IFS"; IFS=','
  6.4200 -	for flag in $args; do
  6.4201 -	  IFS="$save_ifs"
  6.4202 -          func_quote_for_eval "$flag"
  6.4203 -	  arg="$arg $wl$func_quote_for_eval_result"
  6.4204 -	  compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
  6.4205 -	  linker_flags="$linker_flags $func_quote_for_eval_result"
  6.4206 -	done
  6.4207 -	IFS="$save_ifs"
  6.4208 -	func_stripname ' ' '' "$arg"
  6.4209 -	arg=$func_stripname_result
  6.4210 -	;;
  6.4211 -
  6.4212 -      -Xcompiler)
  6.4213 -	prev=xcompiler
  6.4214 -	continue
  6.4215 -	;;
  6.4216 -
  6.4217 -      -Xlinker)
  6.4218 -	prev=xlinker
  6.4219 -	continue
  6.4220 -	;;
  6.4221 -
  6.4222 -      -XCClinker)
  6.4223 -	prev=xcclinker
  6.4224 -	continue
  6.4225 -	;;
  6.4226 -
  6.4227 -      # -msg_* for osf cc
  6.4228 -      -msg_*)
  6.4229 -	func_quote_for_eval "$arg"
  6.4230 -	arg="$func_quote_for_eval_result"
  6.4231 -	;;
  6.4232 -
  6.4233 -      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
  6.4234 -      # -r[0-9][0-9]* specifies the processor on the SGI compiler
  6.4235 -      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
  6.4236 -      # +DA*, +DD* enable 64-bit mode on the HP compiler
  6.4237 -      # -q* pass through compiler args for the IBM compiler
  6.4238 -      # -m*, -t[45]*, -txscale* pass through architecture-specific
  6.4239 -      # compiler args for GCC
  6.4240 -      # -F/path gives path to uninstalled frameworks, gcc on darwin
  6.4241 -      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
  6.4242 -      # @file GCC response files
  6.4243 -      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
  6.4244 -      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
  6.4245 -        func_quote_for_eval "$arg"
  6.4246 -	arg="$func_quote_for_eval_result"
  6.4247 -        func_append compile_command " $arg"
  6.4248 -        func_append finalize_command " $arg"
  6.4249 -        compiler_flags="$compiler_flags $arg"
  6.4250 -        continue
  6.4251 -        ;;
  6.4252 -
  6.4253 -      # Some other compiler flag.
  6.4254 -      -* | +*)
  6.4255 -        func_quote_for_eval "$arg"
  6.4256 -	arg="$func_quote_for_eval_result"
  6.4257 -	;;
  6.4258 -
  6.4259 -      *.$objext)
  6.4260 -	# A standard object.
  6.4261 -	objs="$objs $arg"
  6.4262 -	;;
  6.4263 -
  6.4264 -      *.lo)
  6.4265 -	# A libtool-controlled object.
  6.4266 -
  6.4267 -	# Check to see that this really is a libtool object.
  6.4268 -	if func_lalib_unsafe_p "$arg"; then
  6.4269 -	  pic_object=
  6.4270 -	  non_pic_object=
  6.4271 -
  6.4272 -	  # Read the .lo file
  6.4273 -	  func_source "$arg"
  6.4274 -
  6.4275 -	  if test -z "$pic_object" ||
  6.4276 -	     test -z "$non_pic_object" ||
  6.4277 -	     test "$pic_object" = none &&
  6.4278 -	     test "$non_pic_object" = none; then
  6.4279 -	    func_fatal_error "cannot find name of object for \`$arg'"
  6.4280 -	  fi
  6.4281 -
  6.4282 -	  # Extract subdirectory from the argument.
  6.4283 -	  func_dirname "$arg" "/" ""
  6.4284 -	  xdir="$func_dirname_result"
  6.4285 -
  6.4286 -	  if test "$pic_object" != none; then
  6.4287 -	    # Prepend the subdirectory the object is found in.
  6.4288 -	    pic_object="$xdir$pic_object"
  6.4289 -
  6.4290 -	    if test "$prev" = dlfiles; then
  6.4291 -	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
  6.4292 -		dlfiles="$dlfiles $pic_object"
  6.4293 -		prev=
  6.4294 -		continue
  6.4295 -	      else
  6.4296 -		# If libtool objects are unsupported, then we need to preload.
  6.4297 -		prev=dlprefiles
  6.4298 -	      fi
  6.4299 -	    fi
  6.4300 -
  6.4301 -	    # CHECK ME:  I think I busted this.  -Ossama
  6.4302 -	    if test "$prev" = dlprefiles; then
  6.4303 -	      # Preload the old-style object.
  6.4304 -	      dlprefiles="$dlprefiles $pic_object"
  6.4305 -	      prev=
  6.4306 -	    fi
  6.4307 -
  6.4308 -	    # A PIC object.
  6.4309 -	    func_append libobjs " $pic_object"
  6.4310 -	    arg="$pic_object"
  6.4311 -	  fi
  6.4312 -
  6.4313 -	  # Non-PIC object.
  6.4314 -	  if test "$non_pic_object" != none; then
  6.4315 -	    # Prepend the subdirectory the object is found in.
  6.4316 -	    non_pic_object="$xdir$non_pic_object"
  6.4317 -
  6.4318 -	    # A standard non-PIC object
  6.4319 -	    func_append non_pic_objects " $non_pic_object"
  6.4320 -	    if test -z "$pic_object" || test "$pic_object" = none ; then
  6.4321 -	      arg="$non_pic_object"
  6.4322 -	    fi
  6.4323 -	  else
  6.4324 -	    # If the PIC object exists, use it instead.
  6.4325 -	    # $xdir was prepended to $pic_object above.
  6.4326 -	    non_pic_object="$pic_object"
  6.4327 -	    func_append non_pic_objects " $non_pic_object"
  6.4328 -	  fi
  6.4329 -	else
  6.4330 -	  # Only an error if not doing a dry-run.
  6.4331 -	  if $opt_dry_run; then
  6.4332 -	    # Extract subdirectory from the argument.
  6.4333 -	    func_dirname "$arg" "/" ""
  6.4334 -	    xdir="$func_dirname_result"
  6.4335 -
  6.4336 -	    func_lo2o "$arg"
  6.4337 -	    pic_object=$xdir$objdir/$func_lo2o_result
  6.4338 -	    non_pic_object=$xdir$func_lo2o_result
  6.4339 -	    func_append libobjs " $pic_object"
  6.4340 -	    func_append non_pic_objects " $non_pic_object"
  6.4341 -	  else
  6.4342 -	    func_fatal_error "\`$arg' is not a valid libtool object"
  6.4343 -	  fi
  6.4344 -	fi
  6.4345 -	;;
  6.4346 -
  6.4347 -      *.$libext)
  6.4348 -	# An archive.
  6.4349 -	deplibs="$deplibs $arg"
  6.4350 -	old_deplibs="$old_deplibs $arg"
  6.4351 -	continue
  6.4352 -	;;
  6.4353 -
  6.4354 -      *.la)
  6.4355 -	# A libtool-controlled library.
  6.4356 -
  6.4357 -	if test "$prev" = dlfiles; then
  6.4358 -	  # This library was specified with -dlopen.
  6.4359 -	  dlfiles="$dlfiles $arg"
  6.4360 -	  prev=
  6.4361 -	elif test "$prev" = dlprefiles; then
  6.4362 -	  # The library was specified with -dlpreopen.
  6.4363 -	  dlprefiles="$dlprefiles $arg"
  6.4364 -	  prev=
  6.4365 -	else
  6.4366 -	  deplibs="$deplibs $arg"
  6.4367 -	fi
  6.4368 -	continue
  6.4369 -	;;
  6.4370 -
  6.4371 -      # Some other compiler argument.
  6.4372 -      *)
  6.4373 -	# Unknown arguments in both finalize_command and compile_command need
  6.4374 -	# to be aesthetically quoted because they are evaled later.
  6.4375 -	func_quote_for_eval "$arg"
  6.4376 -	arg="$func_quote_for_eval_result"
  6.4377 -	;;
  6.4378 -      esac # arg
  6.4379 -
  6.4380 -      # Now actually substitute the argument into the commands.
  6.4381 -      if test -n "$arg"; then
  6.4382 -	func_append compile_command " $arg"
  6.4383 -	func_append finalize_command " $arg"
  6.4384 -      fi
  6.4385 -    done # argument parsing loop
  6.4386 -
  6.4387 -    test -n "$prev" && \
  6.4388 -      func_fatal_help "the \`$prevarg' option requires an argument"
  6.4389 -
  6.4390 -    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
  6.4391 -      eval arg=\"$export_dynamic_flag_spec\"
  6.4392 -      func_append compile_command " $arg"
  6.4393 -      func_append finalize_command " $arg"
  6.4394 -    fi
  6.4395 -
  6.4396 -    oldlibs=
  6.4397 -    # calculate the name of the file, without its directory
  6.4398 -    func_basename "$output"
  6.4399 -    outputname="$func_basename_result"
  6.4400 -    libobjs_save="$libobjs"
  6.4401 -
  6.4402 -    if test -n "$shlibpath_var"; then
  6.4403 -      # get the directories listed in $shlibpath_var
  6.4404 -      eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
  6.4405 -    else
  6.4406 -      shlib_search_path=
  6.4407 -    fi
  6.4408 -    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
  6.4409 -    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
  6.4410 -
  6.4411 -    func_dirname "$output" "/" ""
  6.4412 -    output_objdir="$func_dirname_result$objdir"
  6.4413 -    # Create the object directory.
  6.4414 -    func_mkdir_p "$output_objdir"
  6.4415 -
  6.4416 -    # Determine the type of output
  6.4417 -    case $output in
  6.4418 -    "")
  6.4419 -      func_fatal_help "you must specify an output file"
  6.4420 -      ;;
  6.4421 -    *.$libext) linkmode=oldlib ;;
  6.4422 -    *.lo | *.$objext) linkmode=obj ;;
  6.4423 -    *.la) linkmode=lib ;;
  6.4424 -    *) linkmode=prog ;; # Anything else should be a program.
  6.4425 -    esac
  6.4426 -
  6.4427 -    specialdeplibs=
  6.4428 -
  6.4429 -    libs=
  6.4430 -    # Find all interdependent deplibs by searching for libraries
  6.4431 -    # that are linked more than once (e.g. -la -lb -la)
  6.4432 -    for deplib in $deplibs; do
  6.4433 -      if $opt_duplicate_deps ; then
  6.4434 -	case "$libs " in
  6.4435 -	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
  6.4436 -	esac
  6.4437 -      fi
  6.4438 -      libs="$libs $deplib"
  6.4439 -    done
  6.4440 -
  6.4441 -    if test "$linkmode" = lib; then
  6.4442 -      libs="$predeps $libs $compiler_lib_search_path $postdeps"
  6.4443 -
  6.4444 -      # Compute libraries that are listed more than once in $predeps
  6.4445 -      # $postdeps and mark them as special (i.e., whose duplicates are
  6.4446 -      # not to be eliminated).
  6.4447 -      pre_post_deps=
  6.4448 -      if $opt_duplicate_compiler_generated_deps; then
  6.4449 -	for pre_post_dep in $predeps $postdeps; do
  6.4450 -	  case "$pre_post_deps " in
  6.4451 -	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
  6.4452 -	  esac
  6.4453 -	  pre_post_deps="$pre_post_deps $pre_post_dep"
  6.4454 -	done
  6.4455 -      fi
  6.4456 -      pre_post_deps=
  6.4457 -    fi
  6.4458 -
  6.4459 -    deplibs=
  6.4460 -    newdependency_libs=
  6.4461 -    newlib_search_path=
  6.4462 -    need_relink=no # whether we're linking any uninstalled libtool libraries
  6.4463 -    notinst_deplibs= # not-installed libtool libraries
  6.4464 -    notinst_path= # paths that contain not-installed libtool libraries
  6.4465 -
  6.4466 -    case $linkmode in
  6.4467 -    lib)
  6.4468 -	passes="conv dlpreopen link"
  6.4469 -	for file in $dlfiles $dlprefiles; do
  6.4470 -	  case $file in
  6.4471 -	  *.la) ;;
  6.4472 -	  *)
  6.4473 -	    func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
  6.4474 -	    ;;
  6.4475 -	  esac
  6.4476 -	done
  6.4477 -	;;
  6.4478 -    prog)
  6.4479 -	compile_deplibs=
  6.4480 -	finalize_deplibs=
  6.4481 -	alldeplibs=no
  6.4482 -	newdlfiles=
  6.4483 -	newdlprefiles=
  6.4484 -	passes="conv scan dlopen dlpreopen link"
  6.4485 -	;;
  6.4486 -    *)  passes="conv"
  6.4487 -	;;
  6.4488 -    esac
  6.4489 -
  6.4490 -    for pass in $passes; do
  6.4491 -      # The preopen pass in lib mode reverses $deplibs; put it back here
  6.4492 -      # so that -L comes before libs that need it for instance...
  6.4493 -      if test "$linkmode,$pass" = "lib,link"; then
  6.4494 -	## FIXME: Find the place where the list is rebuilt in the wrong
  6.4495 -	##        order, and fix it there properly
  6.4496 -        tmp_deplibs=
  6.4497 -	for deplib in $deplibs; do
  6.4498 -	  tmp_deplibs="$deplib $tmp_deplibs"
  6.4499 -	done
  6.4500 -	deplibs="$tmp_deplibs"
  6.4501 -      fi
  6.4502 -
  6.4503 -      if test "$linkmode,$pass" = "lib,link" ||
  6.4504 -	 test "$linkmode,$pass" = "prog,scan"; then
  6.4505 -	libs="$deplibs"
  6.4506 -	deplibs=
  6.4507 -      fi
  6.4508 -      if test "$linkmode" = prog; then
  6.4509 -	case $pass in
  6.4510 -	dlopen) libs="$dlfiles" ;;
  6.4511 -	dlpreopen) libs="$dlprefiles" ;;
  6.4512 -	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
  6.4513 -	esac
  6.4514 -      fi
  6.4515 -      if test "$linkmode,$pass" = "lib,dlpreopen"; then
  6.4516 -	# Collect and forward deplibs of preopened libtool libs
  6.4517 -	for lib in $dlprefiles; do
  6.4518 -	  # Ignore non-libtool-libs
  6.4519 -	  dependency_libs=
  6.4520 -	  case $lib in
  6.4521 -	  *.la)	func_source "$lib" ;;
  6.4522 -	  esac
  6.4523 -
  6.4524 -	  # Collect preopened libtool deplibs, except any this library
  6.4525 -	  # has declared as weak libs
  6.4526 -	  for deplib in $dependency_libs; do
  6.4527 -            deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
  6.4528 -	    case " $weak_libs " in
  6.4529 -	    *" $deplib_base "*) ;;
  6.4530 -	    *) deplibs="$deplibs $deplib" ;;
  6.4531 -	    esac
  6.4532 -	  done
  6.4533 -	done
  6.4534 -	libs="$dlprefiles"
  6.4535 -      fi
  6.4536 -      if test "$pass" = dlopen; then
  6.4537 -	# Collect dlpreopened libraries
  6.4538 -	save_deplibs="$deplibs"
  6.4539 -	deplibs=
  6.4540 -      fi
  6.4541 -
  6.4542 -      for deplib in $libs; do
  6.4543 -	lib=
  6.4544 -	found=no
  6.4545 -	case $deplib in
  6.4546 -	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
  6.4547 -	  if test "$linkmode,$pass" = "prog,link"; then
  6.4548 -	    compile_deplibs="$deplib $compile_deplibs"
  6.4549 -	    finalize_deplibs="$deplib $finalize_deplibs"
  6.4550 -	  else
  6.4551 -	    compiler_flags="$compiler_flags $deplib"
  6.4552 -	    if test "$linkmode" = lib ; then
  6.4553 -		case "$new_inherited_linker_flags " in
  6.4554 -		    *" $deplib "*) ;;
  6.4555 -		    * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
  6.4556 -		esac
  6.4557 -	    fi
  6.4558 -	  fi
  6.4559 -	  continue
  6.4560 -	  ;;
  6.4561 -	-l*)
  6.4562 -	  if test "$linkmode" != lib && test "$linkmode" != prog; then
  6.4563 -	    func_warning "\`-l' is ignored for archives/objects"
  6.4564 -	    continue
  6.4565 -	  fi
  6.4566 -	  func_stripname '-l' '' "$deplib"
  6.4567 -	  name=$func_stripname_result
  6.4568 -	  if test "$linkmode" = lib; then
  6.4569 -	    searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
  6.4570 -	  else
  6.4571 -	    searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
  6.4572 -	  fi
  6.4573 -	  for searchdir in $searchdirs; do
  6.4574 -	    for search_ext in .la $std_shrext .so .a; do
  6.4575 -	      # Search the libtool library
  6.4576 -	      lib="$searchdir/lib${name}${search_ext}"
  6.4577 -	      if test -f "$lib"; then
  6.4578 -		if test "$search_ext" = ".la"; then
  6.4579 -		  found=yes
  6.4580 -		else
  6.4581 -		  found=no
  6.4582 -		fi
  6.4583 -		break 2
  6.4584 -	      fi
  6.4585 -	    done
  6.4586 -	  done
  6.4587 -	  if test "$found" != yes; then
  6.4588 -	    # deplib doesn't seem to be a libtool library
  6.4589 -	    if test "$linkmode,$pass" = "prog,link"; then
  6.4590 -	      compile_deplibs="$deplib $compile_deplibs"
  6.4591 -	      finalize_deplibs="$deplib $finalize_deplibs"
  6.4592 -	    else
  6.4593 -	      deplibs="$deplib $deplibs"
  6.4594 -	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
  6.4595 -	    fi
  6.4596 -	    continue
  6.4597 -	  else # deplib is a libtool library
  6.4598 -	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
  6.4599 -	    # We need to do some special things here, and not later.
  6.4600 -	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  6.4601 -	      case " $predeps $postdeps " in
  6.4602 -	      *" $deplib "*)
  6.4603 -		if func_lalib_p "$lib"; then
  6.4604 -		  library_names=
  6.4605 -		  old_library=
  6.4606 -		  func_source "$lib"
  6.4607 -		  for l in $old_library $library_names; do
  6.4608 -		    ll="$l"
  6.4609 -		  done
  6.4610 -		  if test "X$ll" = "X$old_library" ; then # only static version available
  6.4611 -		    found=no
  6.4612 -		    func_dirname "$lib" "" "."
  6.4613 -		    ladir="$func_dirname_result"
  6.4614 -		    lib=$ladir/$old_library
  6.4615 -		    if test "$linkmode,$pass" = "prog,link"; then
  6.4616 -		      compile_deplibs="$deplib $compile_deplibs"
  6.4617 -		      finalize_deplibs="$deplib $finalize_deplibs"
  6.4618 -		    else
  6.4619 -		      deplibs="$deplib $deplibs"
  6.4620 -		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
  6.4621 -		    fi
  6.4622 -		    continue
  6.4623 -		  fi
  6.4624 -		fi
  6.4625 -		;;
  6.4626 -	      *) ;;
  6.4627 -	      esac
  6.4628 -	    fi
  6.4629 -	  fi
  6.4630 -	  ;; # -l
  6.4631 -	*.ltframework)
  6.4632 -	  if test "$linkmode,$pass" = "prog,link"; then
  6.4633 -	    compile_deplibs="$deplib $compile_deplibs"
  6.4634 -	    finalize_deplibs="$deplib $finalize_deplibs"
  6.4635 -	  else
  6.4636 -	    deplibs="$deplib $deplibs"
  6.4637 -	    if test "$linkmode" = lib ; then
  6.4638 -		case "$new_inherited_linker_flags " in
  6.4639 -		    *" $deplib "*) ;;
  6.4640 -		    * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
  6.4641 -		esac
  6.4642 -	    fi
  6.4643 -	  fi
  6.4644 -	  continue
  6.4645 -	  ;;
  6.4646 -	-L*)
  6.4647 -	  case $linkmode in
  6.4648 -	  lib)
  6.4649 -	    deplibs="$deplib $deplibs"
  6.4650 -	    test "$pass" = conv && continue
  6.4651 -	    newdependency_libs="$deplib $newdependency_libs"
  6.4652 -	    func_stripname '-L' '' "$deplib"
  6.4653 -	    newlib_search_path="$newlib_search_path $func_stripname_result"
  6.4654 -	    ;;
  6.4655 -	  prog)
  6.4656 -	    if test "$pass" = conv; then
  6.4657 -	      deplibs="$deplib $deplibs"
  6.4658 -	      continue
  6.4659 -	    fi
  6.4660 -	    if test "$pass" = scan; then
  6.4661 -	      deplibs="$deplib $deplibs"
  6.4662 -	    else
  6.4663 -	      compile_deplibs="$deplib $compile_deplibs"
  6.4664 -	      finalize_deplibs="$deplib $finalize_deplibs"
  6.4665 -	    fi
  6.4666 -	    func_stripname '-L' '' "$deplib"
  6.4667 -	    newlib_search_path="$newlib_search_path $func_stripname_result"
  6.4668 -	    ;;
  6.4669 -	  *)
  6.4670 -	    func_warning "\`-L' is ignored for archives/objects"
  6.4671 -	    ;;
  6.4672 -	  esac # linkmode
  6.4673 -	  continue
  6.4674 -	  ;; # -L
  6.4675 -	-R*)
  6.4676 -	  if test "$pass" = link; then
  6.4677 -	    func_stripname '-R' '' "$deplib"
  6.4678 -	    dir=$func_stripname_result
  6.4679 -	    # Make sure the xrpath contains only unique directories.
  6.4680 -	    case "$xrpath " in
  6.4681 -	    *" $dir "*) ;;
  6.4682 -	    *) xrpath="$xrpath $dir" ;;
  6.4683 -	    esac
  6.4684 -	  fi
  6.4685 -	  deplibs="$deplib $deplibs"
  6.4686 -	  continue
  6.4687 -	  ;;
  6.4688 -	*.la) lib="$deplib" ;;
  6.4689 -	*.$libext)
  6.4690 -	  if test "$pass" = conv; then
  6.4691 -	    deplibs="$deplib $deplibs"
  6.4692 -	    continue
  6.4693 -	  fi
  6.4694 -	  case $linkmode in
  6.4695 -	  lib)
  6.4696 -	    # Linking convenience modules into shared libraries is allowed,
  6.4697 -	    # but linking other static libraries is non-portable.
  6.4698 -	    case " $dlpreconveniencelibs " in
  6.4699 -	    *" $deplib "*) ;;
  6.4700 -	    *)
  6.4701 -	      valid_a_lib=no
  6.4702 -	      case $deplibs_check_method in
  6.4703 -		match_pattern*)
  6.4704 -		  set dummy $deplibs_check_method; shift
  6.4705 -		  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
  6.4706 -		  if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
  6.4707 -		    | $EGREP "$match_pattern_regex" > /dev/null; then
  6.4708 -		    valid_a_lib=yes
  6.4709 -		  fi
  6.4710 -		;;
  6.4711 -		pass_all)
  6.4712 -		  valid_a_lib=yes
  6.4713 -		;;
  6.4714 -	      esac
  6.4715 -	      if test "$valid_a_lib" != yes; then
  6.4716 -		$ECHO
  6.4717 -		$ECHO "*** Warning: Trying to link with static lib archive $deplib."
  6.4718 -		$ECHO "*** I have the capability to make that library automatically link in when"
  6.4719 -		$ECHO "*** you link to this library.  But I can only do this if you have a"
  6.4720 -		$ECHO "*** shared version of the library, which you do not appear to have"
  6.4721 -		$ECHO "*** because the file extensions .$libext of this argument makes me believe"
  6.4722 -		$ECHO "*** that it is just a static archive that I should not use here."
  6.4723 -	      else
  6.4724 -		$ECHO
  6.4725 -		$ECHO "*** Warning: Linking the shared library $output against the"
  6.4726 -		$ECHO "*** static library $deplib is not portable!"
  6.4727 -		deplibs="$deplib $deplibs"
  6.4728 -	      fi
  6.4729 -	      ;;
  6.4730 -	    esac
  6.4731 -	    continue
  6.4732 -	    ;;
  6.4733 -	  prog)
  6.4734 -	    if test "$pass" != link; then
  6.4735 -	      deplibs="$deplib $deplibs"
  6.4736 -	    else
  6.4737 -	      compile_deplibs="$deplib $compile_deplibs"
  6.4738 -	      finalize_deplibs="$deplib $finalize_deplibs"
  6.4739 -	    fi
  6.4740 -	    continue
  6.4741 -	    ;;
  6.4742 -	  esac # linkmode
  6.4743 -	  ;; # *.$libext
  6.4744 -	*.lo | *.$objext)
  6.4745 -	  if test "$pass" = conv; then
  6.4746 -	    deplibs="$deplib $deplibs"
  6.4747 -	  elif test "$linkmode" = prog; then
  6.4748 -	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
  6.4749 -	      # If there is no dlopen support or we're linking statically,
  6.4750 -	      # we need to preload.
  6.4751 -	      newdlprefiles="$newdlprefiles $deplib"
  6.4752 -	      compile_deplibs="$deplib $compile_deplibs"
  6.4753 -	      finalize_deplibs="$deplib $finalize_deplibs"
  6.4754 -	    else
  6.4755 -	      newdlfiles="$newdlfiles $deplib"
  6.4756 -	    fi
  6.4757 -	  fi
  6.4758 -	  continue
  6.4759 -	  ;;
  6.4760 -	%DEPLIBS%)
  6.4761 -	  alldeplibs=yes
  6.4762 -	  continue
  6.4763 -	  ;;
  6.4764 -	esac # case $deplib
  6.4765 -
  6.4766 -	if test "$found" = yes || test -f "$lib"; then :
  6.4767 -	else
  6.4768 -	  func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
  6.4769 -	fi
  6.4770 -
  6.4771 -	# Check to see that this really is a libtool archive.
  6.4772 -	func_lalib_unsafe_p "$lib" \
  6.4773 -	  || func_fatal_error "\`$lib' is not a valid libtool archive"
  6.4774 -
  6.4775 -	func_dirname "$lib" "" "."
  6.4776 -	ladir="$func_dirname_result"
  6.4777 -
  6.4778 -	dlname=
  6.4779 -	dlopen=
  6.4780 -	dlpreopen=
  6.4781 -	libdir=
  6.4782 -	library_names=
  6.4783 -	old_library=
  6.4784 -	inherited_linker_flags=
  6.4785 -	# If the library was installed with an old release of libtool,
  6.4786 -	# it will not redefine variables installed, or shouldnotlink
  6.4787 -	installed=yes
  6.4788 -	shouldnotlink=no
  6.4789 -	avoidtemprpath=
  6.4790 -
  6.4791 -
  6.4792 -	# Read the .la file
  6.4793 -	func_source "$lib"
  6.4794 -
  6.4795 -	# Convert "-framework foo" to "foo.ltframework"
  6.4796 -	if test -n "$inherited_linker_flags"; then
  6.4797 -	  tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
  6.4798 -	  for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
  6.4799 -	    case " $new_inherited_linker_flags " in
  6.4800 -	      *" $tmp_inherited_linker_flag "*) ;;
  6.4801 -	      *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
  6.4802 -	    esac
  6.4803 -	  done
  6.4804 -	fi
  6.4805 -	dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
  6.4806 -	if test "$linkmode,$pass" = "lib,link" ||
  6.4807 -	   test "$linkmode,$pass" = "prog,scan" ||
  6.4808 -	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
  6.4809 -	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
  6.4810 -	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
  6.4811 -	fi
  6.4812 -
  6.4813 -	if test "$pass" = conv; then
  6.4814 -	  # Only check for convenience libraries
  6.4815 -	  deplibs="$lib $deplibs"
  6.4816 -	  if test -z "$libdir"; then
  6.4817 -	    if test -z "$old_library"; then
  6.4818 -	      func_fatal_error "cannot find name of link library for \`$lib'"
  6.4819 -	    fi
  6.4820 -	    # It is a libtool convenience library, so add in its objects.
  6.4821 -	    convenience="$convenience $ladir/$objdir/$old_library"
  6.4822 -	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
  6.4823 -	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
  6.4824 -	    func_fatal_error "\`$lib' is not a convenience library"
  6.4825 -	  fi
  6.4826 -	  tmp_libs=
  6.4827 -	  for deplib in $dependency_libs; do
  6.4828 -	    deplibs="$deplib $deplibs"
  6.4829 -	    if $opt_duplicate_deps ; then
  6.4830 -	      case "$tmp_libs " in
  6.4831 -	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
  6.4832 -	      esac
  6.4833 -	    fi
  6.4834 -	    tmp_libs="$tmp_libs $deplib"
  6.4835 -	  done
  6.4836 -	  continue
  6.4837 -	fi # $pass = conv
  6.4838 -
  6.4839 -
  6.4840 -	# Get the name of the library we link against.
  6.4841 -	linklib=
  6.4842 -	for l in $old_library $library_names; do
  6.4843 -	  linklib="$l"
  6.4844 -	done
  6.4845 -	if test -z "$linklib"; then
  6.4846 -	  func_fatal_error "cannot find name of link library for \`$lib'"
  6.4847 -	fi
  6.4848 -
  6.4849 -	# This library was specified with -dlopen.
  6.4850 -	if test "$pass" = dlopen; then
  6.4851 -	  if test -z "$libdir"; then
  6.4852 -	    func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
  6.4853 -	  fi
  6.4854 -	  if test -z "$dlname" ||
  6.4855 -	     test "$dlopen_support" != yes ||
  6.4856 -	     test "$build_libtool_libs" = no; then
  6.4857 -	    # If there is no dlname, no dlopen support or we're linking
  6.4858 -	    # statically, we need to preload.  We also need to preload any
  6.4859 -	    # dependent libraries so libltdl's deplib preloader doesn't
  6.4860 -	    # bomb out in the load deplibs phase.
  6.4861 -	    dlprefiles="$dlprefiles $lib $dependency_libs"
  6.4862 -	  else
  6.4863 -	    newdlfiles="$newdlfiles $lib"
  6.4864 -	  fi
  6.4865 -	  continue
  6.4866 -	fi # $pass = dlopen
  6.4867 -
  6.4868 -	# We need an absolute path.
  6.4869 -	case $ladir in
  6.4870 -	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
  6.4871 -	*)
  6.4872 -	  abs_ladir=`cd "$ladir" && pwd`
  6.4873 -	  if test -z "$abs_ladir"; then
  6.4874 -	    func_warning "cannot determine absolute directory name of \`$ladir'"
  6.4875 -	    func_warning "passing it literally to the linker, although it might fail"
  6.4876 -	    abs_ladir="$ladir"
  6.4877 -	  fi
  6.4878 -	  ;;
  6.4879 -	esac
  6.4880 -	func_basename "$lib"
  6.4881 -	laname="$func_basename_result"
  6.4882 -
  6.4883 -	# Find the relevant object directory and library name.
  6.4884 -	if test "X$installed" = Xyes; then
  6.4885 -	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
  6.4886 -	    func_warning "library \`$lib' was moved."
  6.4887 -	    dir="$ladir"
  6.4888 -	    absdir="$abs_ladir"
  6.4889 -	    libdir="$abs_ladir"
  6.4890 -	  else
  6.4891 -	    dir="$libdir"
  6.4892 -	    absdir="$libdir"
  6.4893 -	  fi
  6.4894 -	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
  6.4895 -	else
  6.4896 -	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
  6.4897 -	    dir="$ladir"
  6.4898 -	    absdir="$abs_ladir"
  6.4899 -	    # Remove this search path later
  6.4900 -	    notinst_path="$notinst_path $abs_ladir"
  6.4901 -	  else
  6.4902 -	    dir="$ladir/$objdir"
  6.4903 -	    absdir="$abs_ladir/$objdir"
  6.4904 -	    # Remove this search path later
  6.4905 -	    notinst_path="$notinst_path $abs_ladir"
  6.4906 -	  fi
  6.4907 -	fi # $installed = yes
  6.4908 -	func_stripname 'lib' '.la' "$laname"
  6.4909 -	name=$func_stripname_result
  6.4910 -
  6.4911 -	# This library was specified with -dlpreopen.
  6.4912 -	if test "$pass" = dlpreopen; then
  6.4913 -	  if test -z "$libdir" && test "$linkmode" = prog; then
  6.4914 -	    func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
  6.4915 -	  fi
  6.4916 -	  # Prefer using a static library (so that no silly _DYNAMIC symbols
  6.4917 -	  # are required to link).
  6.4918 -	  if test -n "$old_library"; then
  6.4919 -	    newdlprefiles="$newdlprefiles $dir/$old_library"
  6.4920 -	    # Keep a list of preopened convenience libraries to check
  6.4921 -	    # that they are being used correctly in the link pass.
  6.4922 -	    test -z "$libdir" && \
  6.4923 -		dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
  6.4924 -	  # Otherwise, use the dlname, so that lt_dlopen finds it.
  6.4925 -	  elif test -n "$dlname"; then
  6.4926 -	    newdlprefiles="$newdlprefiles $dir/$dlname"
  6.4927 -	  else
  6.4928 -	    newdlprefiles="$newdlprefiles $dir/$linklib"
  6.4929 -	  fi
  6.4930 -	fi # $pass = dlpreopen
  6.4931 -
  6.4932 -	if test -z "$libdir"; then
  6.4933 -	  # Link the convenience library
  6.4934 -	  if test "$linkmode" = lib; then
  6.4935 -	    deplibs="$dir/$old_library $deplibs"
  6.4936 -	  elif test "$linkmode,$pass" = "prog,link"; then
  6.4937 -	    compile_deplibs="$dir/$old_library $compile_deplibs"
  6.4938 -	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
  6.4939 -	  else
  6.4940 -	    deplibs="$lib $deplibs" # used for prog,scan pass
  6.4941 -	  fi
  6.4942 -	  continue
  6.4943 -	fi
  6.4944 -
  6.4945 -
  6.4946 -	if test "$linkmode" = prog && test "$pass" != link; then
  6.4947 -	  newlib_search_path="$newlib_search_path $ladir"
  6.4948 -	  deplibs="$lib $deplibs"
  6.4949 -
  6.4950 -	  linkalldeplibs=no
  6.4951 -	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
  6.4952 -	     test "$build_libtool_libs" = no; then
  6.4953 -	    linkalldeplibs=yes
  6.4954 -	  fi
  6.4955 -
  6.4956 -	  tmp_libs=
  6.4957 -	  for deplib in $dependency_libs; do
  6.4958 -	    case $deplib in
  6.4959 -	    -L*) func_stripname '-L' '' "$deplib"
  6.4960 -	         newlib_search_path="$newlib_search_path $func_stripname_result"
  6.4961 -		 ;;
  6.4962 -	    esac
  6.4963 -	    # Need to link against all dependency_libs?
  6.4964 -	    if test "$linkalldeplibs" = yes; then
  6.4965 -	      deplibs="$deplib $deplibs"
  6.4966 -	    else
  6.4967 -	      # Need to hardcode shared library paths
  6.4968 -	      # or/and link against static libraries
  6.4969 -	      newdependency_libs="$deplib $newdependency_libs"
  6.4970 -	    fi
  6.4971 -	    if $opt_duplicate_deps ; then
  6.4972 -	      case "$tmp_libs " in
  6.4973 -	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
  6.4974 -	      esac
  6.4975 -	    fi
  6.4976 -	    tmp_libs="$tmp_libs $deplib"
  6.4977 -	  done # for deplib
  6.4978 -	  continue
  6.4979 -	fi # $linkmode = prog...
  6.4980 -
  6.4981 -	if test "$linkmode,$pass" = "prog,link"; then
  6.4982 -	  if test -n "$library_names" &&
  6.4983 -	     { { test "$prefer_static_libs" = no ||
  6.4984 -	         test "$prefer_static_libs,$installed" = "built,yes"; } ||
  6.4985 -	       test -z "$old_library"; }; then
  6.4986 -	    # We need to hardcode the library path
  6.4987 -	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
  6.4988 -	      # Make sure the rpath contains only unique directories.
  6.4989 -	      case "$temp_rpath:" in
  6.4990 -	      *"$absdir:"*) ;;
  6.4991 -	      *) temp_rpath="$temp_rpath$absdir:" ;;
  6.4992 -	      esac
  6.4993 -	    fi
  6.4994 -
  6.4995 -	    # Hardcode the library path.
  6.4996 -	    # Skip directories that are in the system default run-time
  6.4997 -	    # search path.
  6.4998 -	    case " $sys_lib_dlsearch_path " in
  6.4999 -	    *" $absdir "*) ;;
  6.5000 -	    *)
  6.5001 -	      case "$compile_rpath " in
  6.5002 -	      *" $absdir "*) ;;
  6.5003 -	      *) compile_rpath="$compile_rpath $absdir"
  6.5004 -	      esac
  6.5005 -	      ;;
  6.5006 -	    esac
  6.5007 -	    case " $sys_lib_dlsearch_path " in
  6.5008 -	    *" $libdir "*) ;;
  6.5009 -	    *)
  6.5010 -	      case "$finalize_rpath " in
  6.5011 -	      *" $libdir "*) ;;
  6.5012 -	      *) finalize_rpath="$finalize_rpath $libdir"
  6.5013 -	      esac
  6.5014 -	      ;;
  6.5015 -	    esac
  6.5016 -	  fi # $linkmode,$pass = prog,link...
  6.5017 -
  6.5018 -	  if test "$alldeplibs" = yes &&
  6.5019 -	     { test "$deplibs_check_method" = pass_all ||
  6.5020 -	       { test "$build_libtool_libs" = yes &&
  6.5021 -		 test -n "$library_names"; }; }; then
  6.5022 -	    # We only need to search for static libraries
  6.5023 -	    continue
  6.5024 -	  fi
  6.5025 -	fi
  6.5026 -
  6.5027 -	link_static=no # Whether the deplib will be linked statically
  6.5028 -	use_static_libs=$prefer_static_libs
  6.5029 -	if test "$use_static_libs" = built && test "$installed" = yes; then
  6.5030 -	  use_static_libs=no
  6.5031 -	fi
  6.5032 -	if test -n "$library_names" &&
  6.5033 -	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
  6.5034 -	  case $host in
  6.5035 -	  *cygwin* | *mingw*)
  6.5036 -	      # No point in relinking DLLs because paths are not encoded
  6.5037 -	      notinst_deplibs="$notinst_deplibs $lib"
  6.5038 -	      need_relink=no
  6.5039 -	    ;;
  6.5040 -	  *)
  6.5041 -	    if test "$installed" = no; then
  6.5042 -	      notinst_deplibs="$notinst_deplibs $lib"
  6.5043 -	      need_relink=yes
  6.5044 -	    fi
  6.5045 -	    ;;
  6.5046 -	  esac
  6.5047 -	  # This is a shared library
  6.5048 -
  6.5049 -	  # Warn about portability, can't link against -module's on some
  6.5050 -	  # systems (darwin).  Don't bleat about dlopened modules though!
  6.5051 -	  dlopenmodule=""
  6.5052 -	  for dlpremoduletest in $dlprefiles; do
  6.5053 -	    if test "X$dlpremoduletest" = "X$lib"; then
  6.5054 -	      dlopenmodule="$dlpremoduletest"
  6.5055 -	      break
  6.5056 -	    fi
  6.5057 -	  done
  6.5058 -	  if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
  6.5059 -	    $ECHO
  6.5060 -	    if test "$linkmode" = prog; then
  6.5061 -	      $ECHO "*** Warning: Linking the executable $output against the loadable module"
  6.5062 -	    else
  6.5063 -	      $ECHO "*** Warning: Linking the shared library $output against the loadable module"
  6.5064 -	    fi
  6.5065 -	    $ECHO "*** $linklib is not portable!"
  6.5066 -	  fi
  6.5067 -	  if test "$linkmode" = lib &&
  6.5068 -	     test "$hardcode_into_libs" = yes; then
  6.5069 -	    # Hardcode the library path.
  6.5070 -	    # Skip directories that are in the system default run-time
  6.5071 -	    # search path.
  6.5072 -	    case " $sys_lib_dlsearch_path " in
  6.5073 -	    *" $absdir "*) ;;
  6.5074 -	    *)
  6.5075 -	      case "$compile_rpath " in
  6.5076 -	      *" $absdir "*) ;;
  6.5077 -	      *) compile_rpath="$compile_rpath $absdir"
  6.5078 -	      esac
  6.5079 -	      ;;
  6.5080 -	    esac
  6.5081 -	    case " $sys_lib_dlsearch_path " in
  6.5082 -	    *" $libdir "*) ;;
  6.5083 -	    *)
  6.5084 -	      case "$finalize_rpath " in
  6.5085 -	      *" $libdir "*) ;;
  6.5086 -	      *) finalize_rpath="$finalize_rpath $libdir"
  6.5087 -	      esac
  6.5088 -	      ;;
  6.5089 -	    esac
  6.5090 -	  fi
  6.5091 -
  6.5092 -	  if test -n "$old_archive_from_expsyms_cmds"; then
  6.5093 -	    # figure out the soname
  6.5094 -	    set dummy $library_names
  6.5095 -	    shift
  6.5096 -	    realname="$1"
  6.5097 -	    shift
  6.5098 -	    libname=`eval "\\$ECHO \"$libname_spec\""`
  6.5099 -	    # use dlname if we got it. it's perfectly good, no?
  6.5100 -	    if test -n "$dlname"; then
  6.5101 -	      soname="$dlname"
  6.5102 -	    elif test -n "$soname_spec"; then
  6.5103 -	      # bleh windows
  6.5104 -	      case $host in
  6.5105 -	      *cygwin* | mingw*)
  6.5106 -	        func_arith $current - $age
  6.5107 -		major=$func_arith_result
  6.5108 -		versuffix="-$major"
  6.5109 -		;;
  6.5110 -	      esac
  6.5111 -	      eval soname=\"$soname_spec\"
  6.5112 -	    else
  6.5113 -	      soname="$realname"
  6.5114 -	    fi
  6.5115 -
  6.5116 -	    # Make a new name for the extract_expsyms_cmds to use
  6.5117 -	    soroot="$soname"
  6.5118 -	    func_basename "$soroot"
  6.5119 -	    soname="$func_basename_result"
  6.5120 -	    func_stripname 'lib' '.dll' "$soname"
  6.5121 -	    newlib=libimp-$func_stripname_result.a
  6.5122 -
  6.5123 -	    # If the library has no export list, then create one now
  6.5124 -	    if test -f "$output_objdir/$soname-def"; then :
  6.5125 -	    else
  6.5126 -	      func_verbose "extracting exported symbol list from \`$soname'"
  6.5127 -	      func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
  6.5128 -	    fi
  6.5129 -
  6.5130 -	    # Create $newlib
  6.5131 -	    if test -f "$output_objdir/$newlib"; then :; else
  6.5132 -	      func_verbose "generating import library for \`$soname'"
  6.5133 -	      func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
  6.5134 -	    fi
  6.5135 -	    # make sure the library variables are pointing to the new library
  6.5136 -	    dir=$output_objdir
  6.5137 -	    linklib=$newlib
  6.5138 -	  fi # test -n "$old_archive_from_expsyms_cmds"
  6.5139 -
  6.5140 -	  if test "$linkmode" = prog || test "$mode" != relink; then
  6.5141 -	    add_shlibpath=
  6.5142 -	    add_dir=
  6.5143 -	    add=
  6.5144 -	    lib_linked=yes
  6.5145 -	    case $hardcode_action in
  6.5146 -	    immediate | unsupported)
  6.5147 -	      if test "$hardcode_direct" = no; then
  6.5148 -		add="$dir/$linklib"
  6.5149 -		case $host in
  6.5150 -		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
  6.5151 -		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
  6.5152 -		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
  6.5153 -		    *-*-unixware7*) add_dir="-L$dir" ;;
  6.5154 -		  *-*-darwin* )
  6.5155 -		    # if the lib is a (non-dlopened) module then we can not
  6.5156 -		    # link against it, someone is ignoring the earlier warnings
  6.5157 -		    if /usr/bin/file -L $add 2> /dev/null |
  6.5158 -			 $GREP ": [^:]* bundle" >/dev/null ; then
  6.5159 -		      if test "X$dlopenmodule" != "X$lib"; then
  6.5160 -			$ECHO "*** Warning: lib $linklib is a module, not a shared library"
  6.5161 -			if test -z "$old_library" ; then
  6.5162 -			  $ECHO
  6.5163 -			  $ECHO "*** And there doesn't seem to be a static archive available"
  6.5164 -			  $ECHO "*** The link will probably fail, sorry"
  6.5165 -			else
  6.5166 -			  add="$dir/$old_library"
  6.5167 -			fi
  6.5168 -		      elif test -n "$old_library"; then
  6.5169 -			add="$dir/$old_library"
  6.5170 -		      fi
  6.5171 -		    fi
  6.5172 -		esac
  6.5173 -	      elif test "$hardcode_minus_L" = no; then
  6.5174 -		case $host in
  6.5175 -		*-*-sunos*) add_shlibpath="$dir" ;;
  6.5176 -		esac
  6.5177 -		add_dir="-L$dir"
  6.5178 -		add="-l$name"
  6.5179 -	      elif test "$hardcode_shlibpath_var" = no; then
  6.5180 -		add_shlibpath="$dir"
  6.5181 -		add="-l$name"
  6.5182 -	      else
  6.5183 -		lib_linked=no
  6.5184 -	      fi
  6.5185 -	      ;;
  6.5186 -	    relink)
  6.5187 -	      if test "$hardcode_direct" = yes &&
  6.5188 -	         test "$hardcode_direct_absolute" = no; then
  6.5189 -		add="$dir/$linklib"
  6.5190 -	      elif test "$hardcode_minus_L" = yes; then
  6.5191 -		add_dir="-L$dir"
  6.5192 -		# Try looking first in the location we're being installed to.
  6.5193 -		if test -n "$inst_prefix_dir"; then
  6.5194 -		  case $libdir in
  6.5195 -		    [\\/]*)
  6.5196 -		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
  6.5197 -		      ;;
  6.5198 -		  esac
  6.5199 -		fi
  6.5200 -		add="-l$name"
  6.5201 -	      elif test "$hardcode_shlibpath_var" = yes; then
  6.5202 -		add_shlibpath="$dir"
  6.5203 -		add="-l$name"
  6.5204 -	      else
  6.5205 -		lib_linked=no
  6.5206 -	      fi
  6.5207 -	      ;;
  6.5208 -	    *) lib_linked=no ;;
  6.5209 -	    esac
  6.5210 -
  6.5211 -	    if test "$lib_linked" != yes; then
  6.5212 -	      func_fatal_configuration "unsupported hardcode properties"
  6.5213 -	    fi
  6.5214 -
  6.5215 -	    if test -n "$add_shlibpath"; then
  6.5216 -	      case :$compile_shlibpath: in
  6.5217 -	      *":$add_shlibpath:"*) ;;
  6.5218 -	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
  6.5219 -	      esac
  6.5220 -	    fi
  6.5221 -	    if test "$linkmode" = prog; then
  6.5222 -	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
  6.5223 -	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
  6.5224 -	    else
  6.5225 -	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
  6.5226 -	      test -n "$add" && deplibs="$add $deplibs"
  6.5227 -	      if test "$hardcode_direct" != yes &&
  6.5228 -		 test "$hardcode_minus_L" != yes &&
  6.5229 -		 test "$hardcode_shlibpath_var" = yes; then
  6.5230 -		case :$finalize_shlibpath: in
  6.5231 -		*":$libdir:"*) ;;
  6.5232 -		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
  6.5233 -		esac
  6.5234 -	      fi
  6.5235 -	    fi
  6.5236 -	  fi
  6.5237 -
  6.5238 -	  if test "$linkmode" = prog || test "$mode" = relink; then
  6.5239 -	    add_shlibpath=
  6.5240 -	    add_dir=
  6.5241 -	    add=
  6.5242 -	    # Finalize command for both is simple: just hardcode it.
  6.5243 -	    if test "$hardcode_direct" = yes &&
  6.5244 -	       test "$hardcode_direct_absolute" = no; then
  6.5245 -	      add="$libdir/$linklib"
  6.5246 -	    elif test "$hardcode_minus_L" = yes; then
  6.5247 -	      add_dir="-L$libdir"
  6.5248 -	      add="-l$name"
  6.5249 -	    elif test "$hardcode_shlibpath_var" = yes; then
  6.5250 -	      case :$finalize_shlibpath: in
  6.5251 -	      *":$libdir:"*) ;;
  6.5252 -	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
  6.5253 -	      esac
  6.5254 -	      add="-l$name"
  6.5255 -	    elif test "$hardcode_automatic" = yes; then
  6.5256 -	      if test -n "$inst_prefix_dir" &&
  6.5257 -		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
  6.5258 -		add="$inst_prefix_dir$libdir/$linklib"
  6.5259 -	      else
  6.5260 -		add="$libdir/$linklib"
  6.5261 -	      fi
  6.5262 -	    else
  6.5263 -	      # We cannot seem to hardcode it, guess we'll fake it.
  6.5264 -	      add_dir="-L$libdir"
  6.5265 -	      # Try looking first in the location we're being installed to.
  6.5266 -	      if test -n "$inst_prefix_dir"; then
  6.5267 -		case $libdir in
  6.5268 -		  [\\/]*)
  6.5269 -		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
  6.5270 -		    ;;
  6.5271 -		esac
  6.5272 -	      fi
  6.5273 -	      add="-l$name"
  6.5274 -	    fi
  6.5275 -
  6.5276 -	    if test "$linkmode" = prog; then
  6.5277 -	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
  6.5278 -	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
  6.5279 -	    else
  6.5280 -	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
  6.5281 -	      test -n "$add" && deplibs="$add $deplibs"
  6.5282 -	    fi
  6.5283 -	  fi
  6.5284 -	elif test "$linkmode" = prog; then
  6.5285 -	  # Here we assume that one of hardcode_direct or hardcode_minus_L
  6.5286 -	  # is not unsupported.  This is valid on all known static and
  6.5287 -	  # shared platforms.
  6.5288 -	  if test "$hardcode_direct" != unsupported; then
  6.5289 -	    test -n "$old_library" && linklib="$old_library"
  6.5290 -	    compile_deplibs="$dir/$linklib $compile_deplibs"
  6.5291 -	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
  6.5292 -	  else
  6.5293 -	    compile_deplibs="-l$name -L$dir $compile_deplibs"
  6.5294 -	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
  6.5295 -	  fi
  6.5296 -	elif test "$build_libtool_libs" = yes; then
  6.5297 -	  # Not a shared library
  6.5298 -	  if test "$deplibs_check_method" != pass_all; then
  6.5299 -	    # We're trying link a shared library against a static one
  6.5300 -	    # but the system doesn't support it.
  6.5301 -
  6.5302 -	    # Just print a warning and add the library to dependency_libs so
  6.5303 -	    # that the program can be linked against the static library.
  6.5304 -	    $ECHO
  6.5305 -	    $ECHO "*** Warning: This system can not link to static lib archive $lib."
  6.5306 -	    $ECHO "*** I have the capability to make that library automatically link in when"
  6.5307 -	    $ECHO "*** you link to this library.  But I can only do this if you have a"
  6.5308 -	    $ECHO "*** shared version of the library, which you do not appear to have."
  6.5309 -	    if test "$module" = yes; then
  6.5310 -	      $ECHO "*** But as you try to build a module library, libtool will still create "
  6.5311 -	      $ECHO "*** a static module, that should work as long as the dlopening application"
  6.5312 -	      $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
  6.5313 -	      if test -z "$global_symbol_pipe"; then
  6.5314 -		$ECHO
  6.5315 -		$ECHO "*** However, this would only work if libtool was able to extract symbol"
  6.5316 -		$ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
  6.5317 -		$ECHO "*** not find such a program.  So, this module is probably useless."
  6.5318 -		$ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
  6.5319 -	      fi
  6.5320 -	      if test "$build_old_libs" = no; then
  6.5321 -		build_libtool_libs=module
  6.5322 -		build_old_libs=yes
  6.5323 -	      else
  6.5324 -		build_libtool_libs=no
  6.5325 -	      fi
  6.5326 -	    fi
  6.5327 -	  else
  6.5328 -	    deplibs="$dir/$old_library $deplibs"
  6.5329 -	    link_static=yes
  6.5330 -	  fi
  6.5331 -	fi # link shared/static library?
  6.5332 -
  6.5333 -	if test "$linkmode" = lib; then
  6.5334 -	  if test -n "$dependency_libs" &&
  6.5335 -	     { test "$hardcode_into_libs" != yes ||
  6.5336 -	       test "$build_old_libs" = yes ||
  6.5337 -	       test "$link_static" = yes; }; then
  6.5338 -	    # Extract -R from dependency_libs
  6.5339 -	    temp_deplibs=
  6.5340 -	    for libdir in $dependency_libs; do
  6.5341 -	      case $libdir in
  6.5342 -	      -R*) func_stripname '-R' '' "$libdir"
  6.5343 -	           temp_xrpath=$func_stripname_result
  6.5344 -		   case " $xrpath " in
  6.5345 -		   *" $temp_xrpath "*) ;;
  6.5346 -		   *) xrpath="$xrpath $temp_xrpath";;
  6.5347 -		   esac;;
  6.5348 -	      *) temp_deplibs="$temp_deplibs $libdir";;
  6.5349 -	      esac
  6.5350 -	    done
  6.5351 -	    dependency_libs="$temp_deplibs"
  6.5352 -	  fi
  6.5353 -
  6.5354 -	  newlib_search_path="$newlib_search_path $absdir"
  6.5355 -	  # Link against this library
  6.5356 -	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
  6.5357 -	  # ... and its dependency_libs
  6.5358 -	  tmp_libs=
  6.5359 -	  for deplib in $dependency_libs; do
  6.5360 -	    newdependency_libs="$deplib $newdependency_libs"
  6.5361 -	    if $opt_duplicate_deps ; then
  6.5362 -	      case "$tmp_libs " in
  6.5363 -	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
  6.5364 -	      esac
  6.5365 -	    fi
  6.5366 -	    tmp_libs="$tmp_libs $deplib"
  6.5367 -	  done
  6.5368 -
  6.5369 -	  if test "$link_all_deplibs" != no; then
  6.5370 -	    # Add the search paths of all dependency libraries
  6.5371 -	    for deplib in $dependency_libs; do
  6.5372 -	      case $deplib in
  6.5373 -	      -L*) path="$deplib" ;;
  6.5374 -	      *.la)
  6.5375 -	        func_dirname "$deplib" "" "."
  6.5376 -		dir="$func_dirname_result"
  6.5377 -		# We need an absolute path.
  6.5378 -		case $dir in
  6.5379 -		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
  6.5380 -		*)
  6.5381 -		  absdir=`cd "$dir" && pwd`
  6.5382 -		  if test -z "$absdir"; then
  6.5383 -		    func_warning "cannot determine absolute directory name of \`$dir'"
  6.5384 -		    absdir="$dir"
  6.5385 -		  fi
  6.5386 -		  ;;
  6.5387 -		esac
  6.5388 -		if $GREP "^installed=no" $deplib > /dev/null; then
  6.5389 -		case $host in
  6.5390 -		*-*-darwin*)
  6.5391 -		  depdepl=
  6.5392 -		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
  6.5393 -		  if test -n "$deplibrary_names" ; then
  6.5394 -		    for tmp in $deplibrary_names ; do
  6.5395 -		      depdepl=$tmp
  6.5396 -		    done
  6.5397 -		    if test -f "$absdir/$objdir/$depdepl" ; then
  6.5398 -		      depdepl="$absdir/$objdir/$depdepl"
  6.5399 -		      darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
  6.5400 -                      if test -z "$darwin_install_name"; then
  6.5401 -                          darwin_install_name=`${OTOOL64} -L $depdepl  | awk '{if (NR == 2) {print $1;exit}}'`
  6.5402 -                      fi
  6.5403 -		      compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
  6.5404 -		      linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
  6.5405 -		      path=
  6.5406 -		    fi
  6.5407 -		  fi
  6.5408 -		  ;;
  6.5409 -		*)
  6.5410 -		  path="-L$absdir/$objdir"
  6.5411 -		  ;;
  6.5412 -		esac
  6.5413 -		else
  6.5414 -		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
  6.5415 -		  test -z "$libdir" && \
  6.5416 -		    func_fatal_error "\`$deplib' is not a valid libtool archive"
  6.5417 -		  test "$absdir" != "$libdir" && \
  6.5418 -		    func_warning "\`$deplib' seems to be moved"
  6.5419 -
  6.5420 -		  path="-L$absdir"
  6.5421 -		fi
  6.5422 -		;;
  6.5423 -	      esac
  6.5424 -	      case " $deplibs " in
  6.5425 -	      *" $path "*) ;;
  6.5426 -	      *) deplibs="$path $deplibs" ;;
  6.5427 -	      esac
  6.5428 -	    done
  6.5429 -	  fi # link_all_deplibs != no
  6.5430 -	fi # linkmode = lib
  6.5431 -      done # for deplib in $libs
  6.5432 -      if test "$pass" = link; then
  6.5433 -	if test "$linkmode" = "prog"; then
  6.5434 -	  compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
  6.5435 -	  finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
  6.5436 -	else
  6.5437 -	  compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
  6.5438 -	fi
  6.5439 -      fi
  6.5440 -      dependency_libs="$newdependency_libs"
  6.5441 -      if test "$pass" = dlpreopen; then
  6.5442 -	# Link the dlpreopened libraries before other libraries
  6.5443 -	for deplib in $save_deplibs; do
  6.5444 -	  deplibs="$deplib $deplibs"
  6.5445 -	done
  6.5446 -      fi
  6.5447 -      if test "$pass" != dlopen; then
  6.5448 -	if test "$pass" != conv; then
  6.5449 -	  # Make sure lib_search_path contains only unique directories.
  6.5450 -	  lib_search_path=
  6.5451 -	  for dir in $newlib_search_path; do
  6.5452 -	    case "$lib_search_path " in
  6.5453 -	    *" $dir "*) ;;
  6.5454 -	    *) lib_search_path="$lib_search_path $dir" ;;
  6.5455 -	    esac
  6.5456 -	  done
  6.5457 -	  newlib_search_path=
  6.5458 -	fi
  6.5459 -
  6.5460 -	if test "$linkmode,$pass" != "prog,link"; then
  6.5461 -	  vars="deplibs"
  6.5462 -	else
  6.5463 -	  vars="compile_deplibs finalize_deplibs"
  6.5464 -	fi
  6.5465 -	for var in $vars dependency_libs; do
  6.5466 -	  # Add libraries to $var in reverse order
  6.5467 -	  eval tmp_libs=\"\$$var\"
  6.5468 -	  new_libs=
  6.5469 -	  for deplib in $tmp_libs; do
  6.5470 -	    # FIXME: Pedantically, this is the right thing to do, so
  6.5471 -	    #        that some nasty dependency loop isn't accidentally
  6.5472 -	    #        broken:
  6.5473 -	    #new_libs="$deplib $new_libs"
  6.5474 -	    # Pragmatically, this seems to cause very few problems in
  6.5475 -	    # practice:
  6.5476 -	    case $deplib in
  6.5477 -	    -L*) new_libs="$deplib $new_libs" ;;
  6.5478 -	    -R*) ;;
  6.5479 -	    *)
  6.5480 -	      # And here is the reason: when a library appears more
  6.5481 -	      # than once as an explicit dependence of a library, or
  6.5482 -	      # is implicitly linked in more than once by the
  6.5483 -	      # compiler, it is considered special, and multiple
  6.5484 -	      # occurrences thereof are not removed.  Compare this
  6.5485 -	      # with having the same library being listed as a
  6.5486 -	      # dependency of multiple other libraries: in this case,
  6.5487 -	      # we know (pedantically, we assume) the library does not
  6.5488 -	      # need to be listed more than once, so we keep only the
  6.5489 -	      # last copy.  This is not always right, but it is rare
  6.5490 -	      # enough that we require users that really mean to play
  6.5491 -	      # such unportable linking tricks to link the library
  6.5492 -	      # using -Wl,-lname, so that libtool does not consider it
  6.5493 -	      # for duplicate removal.
  6.5494 -	      case " $specialdeplibs " in
  6.5495 -	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
  6.5496 -	      *)
  6.5497 -		case " $new_libs " in
  6.5498 -		*" $deplib "*) ;;
  6.5499 -		*) new_libs="$deplib $new_libs" ;;
  6.5500 -		esac
  6.5501 -		;;
  6.5502 -	      esac
  6.5503 -	      ;;
  6.5504 -	    esac
  6.5505 -	  done
  6.5506 -	  tmp_libs=
  6.5507 -	  for deplib in $new_libs; do
  6.5508 -	    case $deplib in
  6.5509 -	    -L*)
  6.5510 -	      case " $tmp_libs " in
  6.5511 -	      *" $deplib "*) ;;
  6.5512 -	      *) tmp_libs="$tmp_libs $deplib" ;;
  6.5513 -	      esac
  6.5514 -	      ;;
  6.5515 -	    *) tmp_libs="$tmp_libs $deplib" ;;
  6.5516 -	    esac
  6.5517 -	  done
  6.5518 -	  eval $var=\"$tmp_libs\"
  6.5519 -	done # for var
  6.5520 -      fi
  6.5521 -      # Last step: remove runtime libs from dependency_libs
  6.5522 -      # (they stay in deplibs)
  6.5523 -      tmp_libs=
  6.5524 -      for i in $dependency_libs ; do
  6.5525 -	case " $predeps $postdeps $compiler_lib_search_path " in
  6.5526 -	*" $i "*)
  6.5527 -	  i=""
  6.5528 -	  ;;
  6.5529 -	esac
  6.5530 -	if test -n "$i" ; then
  6.5531 -	  tmp_libs="$tmp_libs $i"
  6.5532 -	fi
  6.5533 -      done
  6.5534 -      dependency_libs=$tmp_libs
  6.5535 -    done # for pass
  6.5536 -    if test "$linkmode" = prog; then
  6.5537 -      dlfiles="$newdlfiles"
  6.5538 -    fi
  6.5539 -    if test "$linkmode" = prog || test "$linkmode" = lib; then
  6.5540 -      dlprefiles="$newdlprefiles"
  6.5541 -    fi
  6.5542 -
  6.5543 -    case $linkmode in
  6.5544 -    oldlib)
  6.5545 -      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  6.5546 -	func_warning "\`-dlopen' is ignored for archives"
  6.5547 -      fi
  6.5548 -
  6.5549 -      case " $deplibs" in
  6.5550 -      *\ -l* | *\ -L*)
  6.5551 -	func_warning "\`-l' and \`-L' are ignored for archives" ;;
  6.5552 -      esac
  6.5553 -
  6.5554 -      test -n "$rpath" && \
  6.5555 -	func_warning "\`-rpath' is ignored for archives"
  6.5556 -
  6.5557 -      test -n "$xrpath" && \
  6.5558 -	func_warning "\`-R' is ignored for archives"
  6.5559 -
  6.5560 -      test -n "$vinfo" && \
  6.5561 -	func_warning "\`-version-info/-version-number' is ignored for archives"
  6.5562 -
  6.5563 -      test -n "$release" && \
  6.5564 -	func_warning "\`-release' is ignored for archives"
  6.5565 -
  6.5566 -      test -n "$export_symbols$export_symbols_regex" && \
  6.5567 -	func_warning "\`-export-symbols' is ignored for archives"
  6.5568 -
  6.5569 -      # Now set the variables for building old libraries.
  6.5570 -      build_libtool_libs=no
  6.5571 -      oldlibs="$output"
  6.5572 -      objs="$objs$old_deplibs"
  6.5573 -      ;;
  6.5574 -
  6.5575 -    lib)
  6.5576 -      # Make sure we only generate libraries of the form `libNAME.la'.
  6.5577 -      case $outputname in
  6.5578 -      lib*)
  6.5579 -	func_stripname 'lib' '.la' "$outputname"
  6.5580 -	name=$func_stripname_result
  6.5581 -	eval shared_ext=\"$shrext_cmds\"
  6.5582 -	eval libname=\"$libname_spec\"
  6.5583 -	;;
  6.5584 -      *)
  6.5585 -	test "$module" = no && \
  6.5586 -	  func_fatal_help "libtool library \`$output' must begin with \`lib'"
  6.5587 -
  6.5588 -	if test "$need_lib_prefix" != no; then
  6.5589 -	  # Add the "lib" prefix for modules if required
  6.5590 -	  func_stripname '' '.la' "$outputname"
  6.5591 -	  name=$func_stripname_result
  6.5592 -	  eval shared_ext=\"$shrext_cmds\"
  6.5593 -	  eval libname=\"$libname_spec\"
  6.5594 -	else
  6.5595 -	  func_stripname '' '.la' "$outputname"
  6.5596 -	  libname=$func_stripname_result
  6.5597 -	fi
  6.5598 -	;;
  6.5599 -      esac
  6.5600 -
  6.5601 -      if test -n "$objs"; then
  6.5602 -	if test "$deplibs_check_method" != pass_all; then
  6.5603 -	  func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
  6.5604 -	else
  6.5605 -	  $ECHO
  6.5606 -	  $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
  6.5607 -	  $ECHO "*** objects $objs is not portable!"
  6.5608 -	  libobjs="$libobjs $objs"
  6.5609 -	fi
  6.5610 -      fi
  6.5611 -
  6.5612 -      test "$dlself" != no && \
  6.5613 -	func_warning "\`-dlopen self' is ignored for libtool libraries"
  6.5614 -
  6.5615 -      set dummy $rpath
  6.5616 -      shift
  6.5617 -      test "$#" -gt 1 && \
  6.5618 -	func_warning "ignoring multiple \`-rpath's for a libtool library"
  6.5619 -
  6.5620 -      install_libdir="$1"
  6.5621 -
  6.5622 -      oldlibs=
  6.5623 -      if test -z "$rpath"; then
  6.5624 -	if test "$build_libtool_libs" = yes; then
  6.5625 -	  # Building a libtool convenience library.
  6.5626 -	  # Some compilers have problems with a `.al' extension so
  6.5627 -	  # convenience libraries should have the same extension an
  6.5628 -	  # archive normally would.
  6.5629 -	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
  6.5630 -	  build_libtool_libs=convenience
  6.5631 -	  build_old_libs=yes
  6.5632 -	fi
  6.5633 -
  6.5634 -	test -n "$vinfo" && \
  6.5635 -	  func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
  6.5636 -
  6.5637 -	test -n "$release" && \
  6.5638 -	  func_warning "\`-release' is ignored for convenience libraries"
  6.5639 -      else
  6.5640 -
  6.5641 -	# Parse the version information argument.
  6.5642 -	save_ifs="$IFS"; IFS=':'
  6.5643 -	set dummy $vinfo 0 0 0
  6.5644 -	shift
  6.5645 -	IFS="$save_ifs"
  6.5646 -
  6.5647 -	test -n "$7" && \
  6.5648 -	  func_fatal_help "too many parameters to \`-version-info'"
  6.5649 -
  6.5650 -	# convert absolute version numbers to libtool ages
  6.5651 -	# this retains compatibility with .la files and attempts
  6.5652 -	# to make the code below a bit more comprehensible
  6.5653 -
  6.5654 -	case $vinfo_number in
  6.5655 -	yes)
  6.5656 -	  number_major="$1"
  6.5657 -	  number_minor="$2"
  6.5658 -	  number_revision="$3"
  6.5659 -	  #
  6.5660 -	  # There are really only two kinds -- those that
  6.5661 -	  # use the current revision as the major version
  6.5662 -	  # and those that subtract age and use age as
  6.5663 -	  # a minor version.  But, then there is irix
  6.5664 -	  # which has an extra 1 added just for fun
  6.5665 -	  #
  6.5666 -	  case $version_type in
  6.5667 -	  darwin|linux|osf|windows|none)
  6.5668 -	    func_arith $number_major + $number_minor
  6.5669 -	    current=$func_arith_result
  6.5670 -	    age="$number_minor"
  6.5671 -	    revision="$number_revision"
  6.5672 -	    ;;
  6.5673 -	  freebsd-aout|freebsd-elf|sunos)
  6.5674 -	    current="$number_major"
  6.5675 -	    revision="$number_minor"
  6.5676 -	    age="0"
  6.5677 -	    ;;
  6.5678 -	  irix|nonstopux)
  6.5679 -	    func_arith $number_major + $number_minor
  6.5680 -	    current=$func_arith_result
  6.5681 -	    age="$number_minor"
  6.5682 -	    revision="$number_minor"
  6.5683 -	    lt_irix_increment=no
  6.5684 -	    ;;
  6.5685 -	  esac
  6.5686 -	  ;;
  6.5687 -	no)
  6.5688 -	  current="$1"
  6.5689 -	  revision="$2"
  6.5690 -	  age="$3"
  6.5691 -	  ;;
  6.5692 -	esac
  6.5693 -
  6.5694 -	# Check that each of the things are valid numbers.
  6.5695 -	case $current in
  6.5696 -	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
  6.5697 -	*)
  6.5698 -	  func_error "CURRENT \`$current' must be a nonnegative integer"
  6.5699 -	  func_fatal_error "\`$vinfo' is not valid version information"
  6.5700 -	  ;;
  6.5701 -	esac
  6.5702 -
  6.5703 -	case $revision in
  6.5704 -	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
  6.5705 -	*)
  6.5706 -	  func_error "REVISION \`$revision' must be a nonnegative integer"
  6.5707 -	  func_fatal_error "\`$vinfo' is not valid version information"
  6.5708 -	  ;;
  6.5709 -	esac
  6.5710 -
  6.5711 -	case $age in
  6.5712 -	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
  6.5713 -	*)
  6.5714 -	  func_error "AGE \`$age' must be a nonnegative integer"
  6.5715 -	  func_fatal_error "\`$vinfo' is not valid version information"
  6.5716 -	  ;;
  6.5717 -	esac
  6.5718 -
  6.5719 -	if test "$age" -gt "$current"; then
  6.5720 -	  func_error "AGE \`$age' is greater than the current interface number \`$current'"
  6.5721 -	  func_fatal_error "\`$vinfo' is not valid version information"
  6.5722 -	fi
  6.5723 -
  6.5724 -	# Calculate the version variables.
  6.5725 -	major=
  6.5726 -	versuffix=
  6.5727 -	verstring=
  6.5728 -	case $version_type in
  6.5729 -	none) ;;
  6.5730 -
  6.5731 -	darwin)
  6.5732 -	  # Like Linux, but with the current version available in
  6.5733 -	  # verstring for coding it into the library header
  6.5734 -	  func_arith $current - $age
  6.5735 -	  major=.$func_arith_result
  6.5736 -	  versuffix="$major.$age.$revision"
  6.5737 -	  # Darwin ld doesn't like 0 for these options...
  6.5738 -	  func_arith $current + 1
  6.5739 -	  minor_current=$func_arith_result
  6.5740 -	  xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
  6.5741 -	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
  6.5742 -	  ;;
  6.5743 -
  6.5744 -	freebsd-aout)
  6.5745 -	  major=".$current"
  6.5746 -	  versuffix=".$current.$revision";
  6.5747 -	  ;;
  6.5748 -
  6.5749 -	freebsd-elf)
  6.5750 -	  major=".$current"
  6.5751 -	  versuffix=".$current"
  6.5752 -	  ;;
  6.5753 -
  6.5754 -	irix | nonstopux)
  6.5755 -	  if test "X$lt_irix_increment" = "Xno"; then
  6.5756 -	    func_arith $current - $age
  6.5757 -	  else
  6.5758 -	    func_arith $current - $age + 1
  6.5759 -	  fi
  6.5760 -	  major=$func_arith_result
  6.5761 -
  6.5762 -	  case $version_type in
  6.5763 -	    nonstopux) verstring_prefix=nonstopux ;;
  6.5764 -	    *)         verstring_prefix=sgi ;;
  6.5765 -	  esac
  6.5766 -	  verstring="$verstring_prefix$major.$revision"
  6.5767 -
  6.5768 -	  # Add in all the interfaces that we are compatible with.
  6.5769 -	  loop=$revision
  6.5770 -	  while test "$loop" -ne 0; do
  6.5771 -	    func_arith $revision - $loop
  6.5772 -	    iface=$func_arith_result
  6.5773 -	    func_arith $loop - 1
  6.5774 -	    loop=$func_arith_result
  6.5775 -	    verstring="$verstring_prefix$major.$iface:$verstring"
  6.5776 -	  done
  6.5777 -
  6.5778 -	  # Before this point, $major must not contain `.'.
  6.5779 -	  major=.$major
  6.5780 -	  versuffix="$major.$revision"
  6.5781 -	  ;;
  6.5782 -
  6.5783 -	linux)
  6.5784 -	  func_arith $current - $age
  6.5785 -	  major=.$func_arith_result
  6.5786 -	  versuffix="$major.$age.$revision"
  6.5787 -	  ;;
  6.5788 -
  6.5789 -	osf)
  6.5790 -	  func_arith $current - $age
  6.5791 -	  major=.$func_arith_result
  6.5792 -	  versuffix=".$current.$age.$revision"
  6.5793 -	  verstring="$current.$age.$revision"
  6.5794 -
  6.5795 -	  # Add in all the interfaces that we are compatible with.
  6.5796 -	  loop=$age
  6.5797 -	  while test "$loop" -ne 0; do
  6.5798 -	    func_arith $current - $loop
  6.5799 -	    iface=$func_arith_result
  6.5800 -	    func_arith $loop - 1
  6.5801 -	    loop=$func_arith_result
  6.5802 -	    verstring="$verstring:${iface}.0"
  6.5803 -	  done
  6.5804 -
  6.5805 -	  # Make executables depend on our current version.
  6.5806 -	  verstring="$verstring:${current}.0"
  6.5807 -	  ;;
  6.5808 -
  6.5809 -	qnx)
  6.5810 -	  major=".$current"
  6.5811 -	  versuffix=".$current"
  6.5812 -	  ;;
  6.5813 -
  6.5814 -	sunos)
  6.5815 -	  major=".$current"
  6.5816 -	  versuffix=".$current.$revision"
  6.5817 -	  ;;
  6.5818 -
  6.5819 -	windows)
  6.5820 -	  # Use '-' rather than '.', since we only want one
  6.5821 -	  # extension on DOS 8.3 filesystems.
  6.5822 -	  func_arith $current - $age
  6.5823 -	  major=$func_arith_result
  6.5824 -	  versuffix="-$major"
  6.5825 -	  ;;
  6.5826 -
  6.5827 -	*)
  6.5828 -	  func_fatal_configuration "unknown library version type \`$version_type'"
  6.5829 -	  ;;
  6.5830 -	esac
  6.5831 -
  6.5832 -	# Clear the version info if we defaulted, and they specified a release.
  6.5833 -	if test -z "$vinfo" && test -n "$release"; then
  6.5834 -	  major=
  6.5835 -	  case $version_type in
  6.5836 -	  darwin)
  6.5837 -	    # we can't check for "0.0" in archive_cmds due to quoting
  6.5838 -	    # problems, so we reset it completely
  6.5839 -	    verstring=
  6.5840 -	    ;;
  6.5841 -	  *)
  6.5842 -	    verstring="0.0"
  6.5843 -	    ;;
  6.5844 -	  esac
  6.5845 -	  if test "$need_version" = no; then
  6.5846 -	    versuffix=
  6.5847 -	  else
  6.5848 -	    versuffix=".0.0"
  6.5849 -	  fi
  6.5850 -	fi
  6.5851 -
  6.5852 -	# Remove version info from name if versioning should be avoided
  6.5853 -	if test "$avoid_version" = yes && test "$need_version" = no; then
  6.5854 -	  major=
  6.5855 -	  versuffix=
  6.5856 -	  verstring=""
  6.5857 -	fi
  6.5858 -
  6.5859 -	# Check to see if the archive will have undefined symbols.
  6.5860 -	if test "$allow_undefined" = yes; then
  6.5861 -	  if test "$allow_undefined_flag" = unsupported; then
  6.5862 -	    func_warning "undefined symbols not allowed in $host shared libraries"
  6.5863 -	    build_libtool_libs=no
  6.5864 -	    build_old_libs=yes
  6.5865 -	  fi
  6.5866 -	else
  6.5867 -	  # Don't allow undefined symbols.
  6.5868 -	  allow_undefined_flag="$no_undefined_flag"
  6.5869 -	fi
  6.5870 -
  6.5871 -      fi
  6.5872 -
  6.5873 -      func_generate_dlsyms "$libname" "$libname" "yes"
  6.5874 -      libobjs="$libobjs $symfileobj"
  6.5875 -      test "X$libobjs" = "X " && libobjs=
  6.5876 -
  6.5877 -      if test "$mode" != relink; then
  6.5878 -	# Remove our outputs, but don't remove object files since they
  6.5879 -	# may have been created when compiling PIC objects.
  6.5880 -	removelist=
  6.5881 -	tempremovelist=`$ECHO "$output_objdir/*"`
  6.5882 -	for p in $tempremovelist; do
  6.5883 -	  case $p in
  6.5884 -	    *.$objext)
  6.5885 -	       ;;
  6.5886 -	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
  6.5887 -	       if test "X$precious_files_regex" != "X"; then
  6.5888 -		 if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
  6.5889 -		 then
  6.5890 -		   continue
  6.5891 -		 fi
  6.5892 -	       fi
  6.5893 -	       removelist="$removelist $p"
  6.5894 -	       ;;
  6.5895 -	    *) ;;
  6.5896 -	  esac
  6.5897 -	done
  6.5898 -	test -n "$removelist" && \
  6.5899 -	  func_show_eval "${RM}r \$removelist"
  6.5900 -      fi
  6.5901 -
  6.5902 -      # Now set the variables for building old libraries.
  6.5903 -      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
  6.5904 -	oldlibs="$oldlibs $output_objdir/$libname.$libext"
  6.5905 -
  6.5906 -	# Transform .lo files to .o files.
  6.5907 -	oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
  6.5908 -      fi
  6.5909 -
  6.5910 -      # Eliminate all temporary directories.
  6.5911 -      #for path in $notinst_path; do
  6.5912 -      #	lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
  6.5913 -      #	deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
  6.5914 -      #	dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
  6.5915 -      #done
  6.5916 -
  6.5917 -      if test -n "$xrpath"; then
  6.5918 -	# If the user specified any rpath flags, then add them.
  6.5919 -	temp_xrpath=
  6.5920 -	for libdir in $xrpath; do
  6.5921 -	  temp_xrpath="$temp_xrpath -R$libdir"
  6.5922 -	  case "$finalize_rpath " in
  6.5923 -	  *" $libdir "*) ;;
  6.5924 -	  *) finalize_rpath="$finalize_rpath $libdir" ;;
  6.5925 -	  esac
  6.5926 -	done
  6.5927 -	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
  6.5928 -	  dependency_libs="$temp_xrpath $dependency_libs"
  6.5929 -	fi
  6.5930 -      fi
  6.5931 -
  6.5932 -      # Make sure dlfiles contains only unique files that won't be dlpreopened
  6.5933 -      old_dlfiles="$dlfiles"
  6.5934 -      dlfiles=
  6.5935 -      for lib in $old_dlfiles; do
  6.5936 -	case " $dlprefiles $dlfiles " in
  6.5937 -	*" $lib "*) ;;
  6.5938 -	*) dlfiles="$dlfiles $lib" ;;
  6.5939 -	esac
  6.5940 -      done
  6.5941 -
  6.5942 -      # Make sure dlprefiles contains only unique files
  6.5943 -      old_dlprefiles="$dlprefiles"
  6.5944 -      dlprefiles=
  6.5945 -      for lib in $old_dlprefiles; do
  6.5946 -	case "$dlprefiles " in
  6.5947 -	*" $lib "*) ;;
  6.5948 -	*) dlprefiles="$dlprefiles $lib" ;;
  6.5949 -	esac
  6.5950 -      done
  6.5951 -
  6.5952 -      if test "$build_libtool_libs" = yes; then
  6.5953 -	if test -n "$rpath"; then
  6.5954 -	  case $host in
  6.5955 -	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
  6.5956 -	    # these systems don't actually have a c library (as such)!
  6.5957 -	    ;;
  6.5958 -	  *-*-rhapsody* | *-*-darwin1.[012])
  6.5959 -	    # Rhapsody C library is in the System framework
  6.5960 -	    deplibs="$deplibs System.ltframework"
  6.5961 -	    ;;
  6.5962 -	  *-*-netbsd*)
  6.5963 -	    # Don't link with libc until the a.out ld.so is fixed.
  6.5964 -	    ;;
  6.5965 -	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
  6.5966 -	    # Do not include libc due to us having libc/libc_r.
  6.5967 -	    ;;
  6.5968 -	  *-*-sco3.2v5* | *-*-sco5v6*)
  6.5969 -	    # Causes problems with __ctype
  6.5970 -	    ;;
  6.5971 -	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
  6.5972 -	    # Compiler inserts libc in the correct place for threads to work
  6.5973 -	    ;;
  6.5974 -	  *)
  6.5975 -	    # Add libc to deplibs on all other systems if necessary.
  6.5976 -	    if test "$build_libtool_need_lc" = "yes"; then
  6.5977 -	      deplibs="$deplibs -lc"
  6.5978 -	    fi
  6.5979 -	    ;;
  6.5980 -	  esac
  6.5981 -	fi
  6.5982 -
  6.5983 -	# Transform deplibs into only deplibs that can be linked in shared.
  6.5984 -	name_save=$name
  6.5985 -	libname_save=$libname
  6.5986 -	release_save=$release
  6.5987 -	versuffix_save=$versuffix
  6.5988 -	major_save=$major
  6.5989 -	# I'm not sure if I'm treating the release correctly.  I think
  6.5990 -	# release should show up in the -l (ie -lgmp5) so we don't want to
  6.5991 -	# add it in twice.  Is that correct?
  6.5992 -	release=""
  6.5993 -	versuffix=""
  6.5994 -	major=""
  6.5995 -	newdeplibs=
  6.5996 -	droppeddeps=no
  6.5997 -	case $deplibs_check_method in
  6.5998 -	pass_all)
  6.5999 -	  # Don't check for shared/static.  Everything works.
  6.6000 -	  # This might be a little naive.  We might want to check
  6.6001 -	  # whether the library exists or not.  But this is on
  6.6002 -	  # osf3 & osf4 and I'm not really sure... Just
  6.6003 -	  # implementing what was already the behavior.
  6.6004 -	  newdeplibs=$deplibs
  6.6005 -	  ;;
  6.6006 -	test_compile)
  6.6007 -	  # This code stresses the "libraries are programs" paradigm to its
  6.6008 -	  # limits. Maybe even breaks it.  We compile a program, linking it
  6.6009 -	  # against the deplibs as a proxy for the library.  Then we can check
  6.6010 -	  # whether they linked in statically or dynamically with ldd.
  6.6011 -	  $opt_dry_run || $RM conftest.c
  6.6012 -	  cat > conftest.c <<EOF
  6.6013 -	  int main() { return 0; }
  6.6014 -EOF
  6.6015 -	  $opt_dry_run || $RM conftest
  6.6016 -	  if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
  6.6017 -	    ldd_output=`ldd conftest`
  6.6018 -	    for i in $deplibs; do
  6.6019 -	      case $i in
  6.6020 -	      -l*)
  6.6021 -		func_stripname -l '' "$i"
  6.6022 -		name=$func_stripname_result
  6.6023 -		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  6.6024 -		  case " $predeps $postdeps " in
  6.6025 -		  *" $i "*)
  6.6026 -		    newdeplibs="$newdeplibs $i"
  6.6027 -		    i=""
  6.6028 -		    ;;
  6.6029 -		  esac
  6.6030 -		fi
  6.6031 -		if test -n "$i" ; then
  6.6032 -		  libname=`eval "\\$ECHO \"$libname_spec\""`
  6.6033 -		  deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
  6.6034 -		  set dummy $deplib_matches; shift
  6.6035 -		  deplib_match=$1
  6.6036 -		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
  6.6037 -		    newdeplibs="$newdeplibs $i"
  6.6038 -		  else
  6.6039 -		    droppeddeps=yes
  6.6040 -		    $ECHO
  6.6041 -		    $ECHO "*** Warning: dynamic linker does not accept needed library $i."
  6.6042 -		    $ECHO "*** I have the capability to make that library automatically link in when"
  6.6043 -		    $ECHO "*** you link to this library.  But I can only do this if you have a"
  6.6044 -		    $ECHO "*** shared version of the library, which I believe you do not have"
  6.6045 -		    $ECHO "*** because a test_compile did reveal that the linker did not use it for"
  6.6046 -		    $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
  6.6047 -		  fi
  6.6048 -		fi
  6.6049 -		;;
  6.6050 -	      *)
  6.6051 -		newdeplibs="$newdeplibs $i"
  6.6052 -		;;
  6.6053 -	      esac
  6.6054 -	    done
  6.6055 -	  else
  6.6056 -	    # Error occurred in the first compile.  Let's try to salvage
  6.6057 -	    # the situation: Compile a separate program for each library.
  6.6058 -	    for i in $deplibs; do
  6.6059 -	      case $i in
  6.6060 -	      -l*)
  6.6061 -		func_stripname -l '' "$i"
  6.6062 -		name=$func_stripname_result
  6.6063 -		$opt_dry_run || $RM conftest
  6.6064 -		if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
  6.6065 -		  ldd_output=`ldd conftest`
  6.6066 -		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  6.6067 -		    case " $predeps $postdeps " in
  6.6068 -		    *" $i "*)
  6.6069 -		      newdeplibs="$newdeplibs $i"
  6.6070 -		      i=""
  6.6071 -		      ;;
  6.6072 -		    esac
  6.6073 -		  fi
  6.6074 -		  if test -n "$i" ; then
  6.6075 -		    libname=`eval "\\$ECHO \"$libname_spec\""`
  6.6076 -		    deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
  6.6077 -		    set dummy $deplib_matches; shift
  6.6078 -		    deplib_match=$1
  6.6079 -		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
  6.6080 -		      newdeplibs="$newdeplibs $i"
  6.6081 -		    else
  6.6082 -		      droppeddeps=yes
  6.6083 -		      $ECHO
  6.6084 -		      $ECHO "*** Warning: dynamic linker does not accept needed library $i."
  6.6085 -		      $ECHO "*** I have the capability to make that library automatically link in when"
  6.6086 -		      $ECHO "*** you link to this library.  But I can only do this if you have a"
  6.6087 -		      $ECHO "*** shared version of the library, which you do not appear to have"
  6.6088 -		      $ECHO "*** because a test_compile did reveal that the linker did not use this one"
  6.6089 -		      $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
  6.6090 -		    fi
  6.6091 -		  fi
  6.6092 -		else
  6.6093 -		  droppeddeps=yes
  6.6094 -		  $ECHO
  6.6095 -		  $ECHO "*** Warning!  Library $i is needed by this library but I was not able to"
  6.6096 -		  $ECHO "*** make it link in!  You will probably need to install it or some"
  6.6097 -		  $ECHO "*** library that it depends on before this library will be fully"
  6.6098 -		  $ECHO "*** functional.  Installing it before continuing would be even better."
  6.6099 -		fi
  6.6100 -		;;
  6.6101 -	      *)
  6.6102 -		newdeplibs="$newdeplibs $i"
  6.6103 -		;;
  6.6104 -	      esac
  6.6105 -	    done
  6.6106 -	  fi
  6.6107 -	  ;;
  6.6108 -	file_magic*)
  6.6109 -	  set dummy $deplibs_check_method; shift
  6.6110 -	  file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
  6.6111 -	  for a_deplib in $deplibs; do
  6.6112 -	    case $a_deplib in
  6.6113 -	    -l*)
  6.6114 -	      func_stripname -l '' "$a_deplib"
  6.6115 -	      name=$func_stripname_result
  6.6116 -	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  6.6117 -		case " $predeps $postdeps " in
  6.6118 -		*" $a_deplib "*)
  6.6119 -		  newdeplibs="$newdeplibs $a_deplib"
  6.6120 -		  a_deplib=""
  6.6121 -		  ;;
  6.6122 -		esac
  6.6123 -	      fi
  6.6124 -	      if test -n "$a_deplib" ; then
  6.6125 -		libname=`eval "\\$ECHO \"$libname_spec\""`
  6.6126 -		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
  6.6127 -		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
  6.6128 -		  for potent_lib in $potential_libs; do
  6.6129 -		      # Follow soft links.
  6.6130 -		      if ls -lLd "$potent_lib" 2>/dev/null |
  6.6131 -			 $GREP " -> " >/dev/null; then
  6.6132 -			continue
  6.6133 -		      fi
  6.6134 -		      # The statement above tries to avoid entering an
  6.6135 -		      # endless loop below, in case of cyclic links.
  6.6136 -		      # We might still enter an endless loop, since a link
  6.6137 -		      # loop can be closed while we follow links,
  6.6138 -		      # but so what?
  6.6139 -		      potlib="$potent_lib"
  6.6140 -		      while test -h "$potlib" 2>/dev/null; do
  6.6141 -			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
  6.6142 -			case $potliblink in
  6.6143 -			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
  6.6144 -			*) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
  6.6145 -			esac
  6.6146 -		      done
  6.6147 -		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
  6.6148 -			 $SED -e 10q |
  6.6149 -			 $EGREP "$file_magic_regex" > /dev/null; then
  6.6150 -			newdeplibs="$newdeplibs $a_deplib"
  6.6151 -			a_deplib=""
  6.6152 -			break 2
  6.6153 -		      fi
  6.6154 -		  done
  6.6155 -		done
  6.6156 -	      fi
  6.6157 -	      if test -n "$a_deplib" ; then
  6.6158 -		droppeddeps=yes
  6.6159 -		$ECHO
  6.6160 -		$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
  6.6161 -		$ECHO "*** I have the capability to make that library automatically link in when"
  6.6162 -		$ECHO "*** you link to this library.  But I can only do this if you have a"
  6.6163 -		$ECHO "*** shared version of the library, which you do not appear to have"
  6.6164 -		$ECHO "*** because I did check the linker path looking for a file starting"
  6.6165 -		if test -z "$potlib" ; then
  6.6166 -		  $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
  6.6167 -		else
  6.6168 -		  $ECHO "*** with $libname and none of the candidates passed a file format test"
  6.6169 -		  $ECHO "*** using a file magic. Last file checked: $potlib"
  6.6170 -		fi
  6.6171 -	      fi
  6.6172 -	      ;;
  6.6173 -	    *)
  6.6174 -	      # Add a -L argument.
  6.6175 -	      newdeplibs="$newdeplibs $a_deplib"
  6.6176 -	      ;;
  6.6177 -	    esac
  6.6178 -	  done # Gone through all deplibs.
  6.6179 -	  ;;
  6.6180 -	match_pattern*)
  6.6181 -	  set dummy $deplibs_check_method; shift
  6.6182 -	  match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
  6.6183 -	  for a_deplib in $deplibs; do
  6.6184 -	    case $a_deplib in
  6.6185 -	    -l*)
  6.6186 -	      func_stripname -l '' "$a_deplib"
  6.6187 -	      name=$func_stripname_result
  6.6188 -	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  6.6189 -		case " $predeps $postdeps " in
  6.6190 -		*" $a_deplib "*)
  6.6191 -		  newdeplibs="$newdeplibs $a_deplib"
  6.6192 -		  a_deplib=""
  6.6193 -		  ;;
  6.6194 -		esac
  6.6195 -	      fi
  6.6196 -	      if test -n "$a_deplib" ; then
  6.6197 -		libname=`eval "\\$ECHO \"$libname_spec\""`
  6.6198 -		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
  6.6199 -		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
  6.6200 -		  for potent_lib in $potential_libs; do
  6.6201 -		    potlib="$potent_lib" # see symlink-check above in file_magic test
  6.6202 -		    if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
  6.6203 -		       $EGREP "$match_pattern_regex" > /dev/null; then
  6.6204 -		      newdeplibs="$newdeplibs $a_deplib"
  6.6205 -		      a_deplib=""
  6.6206 -		      break 2
  6.6207 -		    fi
  6.6208 -		  done
  6.6209 -		done
  6.6210 -	      fi
  6.6211 -	      if test -n "$a_deplib" ; then
  6.6212 -		droppeddeps=yes
  6.6213 -		$ECHO
  6.6214 -		$ECHO "*** Warning: linker path does not have real file for library $a_deplib."
  6.6215 -		$ECHO "*** I have the capability to make that library automatically link in when"
  6.6216 -		$ECHO "*** you link to this library.  But I can only do this if you have a"
  6.6217 -		$ECHO "*** shared version of the library, which you do not appear to have"
  6.6218 -		$ECHO "*** because I did check the linker path looking for a file starting"
  6.6219 -		if test -z "$potlib" ; then
  6.6220 -		  $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
  6.6221 -		else
  6.6222 -		  $ECHO "*** with $libname and none of the candidates passed a file format test"
  6.6223 -		  $ECHO "*** using a regex pattern. Last file checked: $potlib"
  6.6224 -		fi
  6.6225 -	      fi
  6.6226 -	      ;;
  6.6227 -	    *)
  6.6228 -	      # Add a -L argument.
  6.6229 -	      newdeplibs="$newdeplibs $a_deplib"
  6.6230 -	      ;;
  6.6231 -	    esac
  6.6232 -	  done # Gone through all deplibs.
  6.6233 -	  ;;
  6.6234 -	none | unknown | *)
  6.6235 -	  newdeplibs=""
  6.6236 -	  tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
  6.6237 -	      -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
  6.6238 -	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  6.6239 -	    for i in $predeps $postdeps ; do
  6.6240 -	      # can't use Xsed below, because $i might contain '/'
  6.6241 -	      tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
  6.6242 -	    done
  6.6243 -	  fi
  6.6244 -	  if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[	 ]//g' |
  6.6245 -	     $GREP . >/dev/null; then
  6.6246 -	    $ECHO
  6.6247 -	    if test "X$deplibs_check_method" = "Xnone"; then
  6.6248 -	      $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
  6.6249 -	    else
  6.6250 -	      $ECHO "*** Warning: inter-library dependencies are not known to be supported."
  6.6251 -	    fi
  6.6252 -	    $ECHO "*** All declared inter-library dependencies are being dropped."
  6.6253 -	    droppeddeps=yes
  6.6254 -	  fi
  6.6255 -	  ;;
  6.6256 -	esac
  6.6257 -	versuffix=$versuffix_save
  6.6258 -	major=$major_save
  6.6259 -	release=$release_save
  6.6260 -	libname=$libname_save
  6.6261 -	name=$name_save
  6.6262 -
  6.6263 -	case $host in
  6.6264 -	*-*-rhapsody* | *-*-darwin1.[012])
  6.6265 -	  # On Rhapsody replace the C library with the System framework
  6.6266 -	  newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
  6.6267 -	  ;;
  6.6268 -	esac
  6.6269 -
  6.6270 -	if test "$droppeddeps" = yes; then
  6.6271 -	  if test "$module" = yes; then
  6.6272 -	    $ECHO
  6.6273 -	    $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
  6.6274 -	    $ECHO "*** dependencies of module $libname.  Therefore, libtool will create"
  6.6275 -	    $ECHO "*** a static module, that should work as long as the dlopening"
  6.6276 -	    $ECHO "*** application is linked with the -dlopen flag."
  6.6277 -	    if test -z "$global_symbol_pipe"; then
  6.6278 -	      $ECHO
  6.6279 -	      $ECHO "*** However, this would only work if libtool was able to extract symbol"
  6.6280 -	      $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
  6.6281 -	      $ECHO "*** not find such a program.  So, this module is probably useless."
  6.6282 -	      $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
  6.6283 -	    fi
  6.6284 -	    if test "$build_old_libs" = no; then
  6.6285 -	      oldlibs="$output_objdir/$libname.$libext"
  6.6286 -	      build_libtool_libs=module
  6.6287 -	      build_old_libs=yes
  6.6288 -	    else
  6.6289 -	      build_libtool_libs=no
  6.6290 -	    fi
  6.6291 -	  else
  6.6292 -	    $ECHO "*** The inter-library dependencies that have been dropped here will be"
  6.6293 -	    $ECHO "*** automatically added whenever a program is linked with this library"
  6.6294 -	    $ECHO "*** or is declared to -dlopen it."
  6.6295 -
  6.6296 -	    if test "$allow_undefined" = no; then
  6.6297 -	      $ECHO
  6.6298 -	      $ECHO "*** Since this library must not contain undefined symbols,"
  6.6299 -	      $ECHO "*** because either the platform does not support them or"
  6.6300 -	      $ECHO "*** it was explicitly requested with -no-undefined,"
  6.6301 -	      $ECHO "*** libtool will only create a static version of it."
  6.6302 -	      if test "$build_old_libs" = no; then
  6.6303 -		oldlibs="$output_objdir/$libname.$libext"
  6.6304 -		build_libtool_libs=module
  6.6305 -		build_old_libs=yes
  6.6306 -	      else
  6.6307 -		build_libtool_libs=no
  6.6308 -	      fi
  6.6309 -	    fi
  6.6310 -	  fi
  6.6311 -	fi
  6.6312 -	# Done checking deplibs!
  6.6313 -	deplibs=$newdeplibs
  6.6314 -      fi
  6.6315 -      # Time to change all our "foo.ltframework" stuff back to "-framework foo"
  6.6316 -      case $host in
  6.6317 -	*-*-darwin*)
  6.6318 -	  newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
  6.6319 -	  new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
  6.6320 -	  deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
  6.6321 -	  ;;
  6.6322 -      esac
  6.6323 -
  6.6324 -      # move library search paths that coincide with paths to not yet
  6.6325 -      # installed libraries to the beginning of the library search list
  6.6326 -      new_libs=
  6.6327 -      for path in $notinst_path; do
  6.6328 -	case " $new_libs " in
  6.6329 -	*" -L$path/$objdir "*) ;;
  6.6330 -	*)
  6.6331 -	  case " $deplibs " in
  6.6332 -	  *" -L$path/$objdir "*)
  6.6333 -	    new_libs="$new_libs -L$path/$objdir" ;;
  6.6334 -	  esac
  6.6335 -	  ;;
  6.6336 -	esac
  6.6337 -      done
  6.6338 -      for deplib in $deplibs; do
  6.6339 -	case $deplib in
  6.6340 -	-L*)
  6.6341 -	  case " $new_libs " in
  6.6342 -	  *" $deplib "*) ;;
  6.6343 -	  *) new_libs="$new_libs $deplib" ;;
  6.6344 -	  esac
  6.6345 -	  ;;
  6.6346 -	*) new_libs="$new_libs $deplib" ;;
  6.6347 -	esac
  6.6348 -      done
  6.6349 -      deplibs="$new_libs"
  6.6350 -
  6.6351 -      # All the library-specific variables (install_libdir is set above).
  6.6352 -      library_names=
  6.6353 -      old_library=
  6.6354 -      dlname=
  6.6355 -
  6.6356 -      # Test again, we may have decided not to build it any more
  6.6357 -      if test "$build_libtool_libs" = yes; then
  6.6358 -	if test "$hardcode_into_libs" = yes; then
  6.6359 -	  # Hardcode the library paths
  6.6360 -	  hardcode_libdirs=
  6.6361 -	  dep_rpath=
  6.6362 -	  rpath="$finalize_rpath"
  6.6363 -	  test "$mode" != relink && rpath="$compile_rpath$rpath"
  6.6364 -	  for libdir in $rpath; do
  6.6365 -	    if test -n "$hardcode_libdir_flag_spec"; then
  6.6366 -	      if test -n "$hardcode_libdir_separator"; then
  6.6367 -		if test -z "$hardcode_libdirs"; then
  6.6368 -		  hardcode_libdirs="$libdir"
  6.6369 -		else
  6.6370 -		  # Just accumulate the unique libdirs.
  6.6371 -		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
  6.6372 -		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
  6.6373 -		    ;;
  6.6374 -		  *)
  6.6375 -		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
  6.6376 -		    ;;
  6.6377 -		  esac
  6.6378 -		fi
  6.6379 -	      else
  6.6380 -		eval flag=\"$hardcode_libdir_flag_spec\"
  6.6381 -		dep_rpath="$dep_rpath $flag"
  6.6382 -	      fi
  6.6383 -	    elif test -n "$runpath_var"; then
  6.6384 -	      case "$perm_rpath " in
  6.6385 -	      *" $libdir "*) ;;
  6.6386 -	      *) perm_rpath="$perm_rpath $libdir" ;;
  6.6387 -	      esac
  6.6388 -	    fi
  6.6389 -	  done
  6.6390 -	  # Substitute the hardcoded libdirs into the rpath.
  6.6391 -	  if test -n "$hardcode_libdir_separator" &&
  6.6392 -	     test -n "$hardcode_libdirs"; then
  6.6393 -	    libdir="$hardcode_libdirs"
  6.6394 -	    if test -n "$hardcode_libdir_flag_spec_ld"; then
  6.6395 -	      eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
  6.6396 -	    else
  6.6397 -	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
  6.6398 -	    fi
  6.6399 -	  fi
  6.6400 -	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
  6.6401 -	    # We should set the runpath_var.
  6.6402 -	    rpath=
  6.6403 -	    for dir in $perm_rpath; do
  6.6404 -	      rpath="$rpath$dir:"
  6.6405 -	    done
  6.6406 -	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
  6.6407 -	  fi
  6.6408 -	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
  6.6409 -	fi
  6.6410 -
  6.6411 -	shlibpath="$finalize_shlibpath"
  6.6412 -	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
  6.6413 -	if test -n "$shlibpath"; then
  6.6414 -	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
  6.6415 -	fi
  6.6416 -
  6.6417 -	# Get the real and link names of the library.
  6.6418 -	eval shared_ext=\"$shrext_cmds\"
  6.6419 -	eval library_names=\"$library_names_spec\"
  6.6420 -	set dummy $library_names
  6.6421 -	shift
  6.6422 -	realname="$1"
  6.6423 -	shift
  6.6424 -
  6.6425 -	if test -n "$soname_spec"; then
  6.6426 -	  eval soname=\"$soname_spec\"
  6.6427 -	else
  6.6428 -	  soname="$realname"
  6.6429 -	fi
  6.6430 -	if test -z "$dlname"; then
  6.6431 -	  dlname=$soname
  6.6432 -	fi
  6.6433 -
  6.6434 -	lib="$output_objdir/$realname"
  6.6435 -	linknames=
  6.6436 -	for link
  6.6437 -	do
  6.6438 -	  linknames="$linknames $link"
  6.6439 -	done
  6.6440 -
  6.6441 -	# Use standard objects if they are pic
  6.6442 -	test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  6.6443 -	test "X$libobjs" = "X " && libobjs=
  6.6444 -
  6.6445 -	delfiles=
  6.6446 -	if test -n "$export_symbols" && test -n "$include_expsyms"; then
  6.6447 -	  $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
  6.6448 -	  export_symbols="$output_objdir/$libname.uexp"
  6.6449 -	  delfiles="$delfiles $export_symbols"
  6.6450 -	fi
  6.6451 -
  6.6452 -	orig_export_symbols=
  6.6453 -	case $host_os in
  6.6454 -	cygwin* | mingw*)
  6.6455 -	  if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
  6.6456 -	    # exporting using user supplied symfile
  6.6457 -	    if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
  6.6458 -	      # and it's NOT already a .def file. Must figure out
  6.6459 -	      # which of the given symbols are data symbols and tag
  6.6460 -	      # them as such. So, trigger use of export_symbols_cmds.
  6.6461 -	      # export_symbols gets reassigned inside the "prepare
  6.6462 -	      # the list of exported symbols" if statement, so the
  6.6463 -	      # include_expsyms logic still works.
  6.6464 -	      orig_export_symbols="$export_symbols"
  6.6465 -	      export_symbols=
  6.6466 -	      always_export_symbols=yes
  6.6467 -	    fi
  6.6468 -	  fi
  6.6469 -	  ;;
  6.6470 -	esac
  6.6471 -
  6.6472 -	# Prepare the list of exported symbols
  6.6473 -	if test -z "$export_symbols"; then
  6.6474 -	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
  6.6475 -	    func_verbose "generating symbol list for \`$libname.la'"
  6.6476 -	    export_symbols="$output_objdir/$libname.exp"
  6.6477 -	    $opt_dry_run || $RM $export_symbols
  6.6478 -	    cmds=$export_symbols_cmds
  6.6479 -	    save_ifs="$IFS"; IFS='~'
  6.6480 -	    for cmd in $cmds; do
  6.6481 -	      IFS="$save_ifs"
  6.6482 -	      eval cmd=\"$cmd\"
  6.6483 -	      func_len " $cmd"
  6.6484 -	      len=$func_len_result
  6.6485 -	      if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
  6.6486 -		func_show_eval "$cmd" 'exit $?'
  6.6487 -		skipped_export=false
  6.6488 -	      else
  6.6489 -		# The command line is too long to execute in one step.
  6.6490 -		func_verbose "using reloadable object file for export list..."
  6.6491 -		skipped_export=:
  6.6492 -		# Break out early, otherwise skipped_export may be
  6.6493 -		# set to false by a later but shorter cmd.
  6.6494 -		break
  6.6495 -	      fi
  6.6496 -	    done
  6.6497 -	    IFS="$save_ifs"
  6.6498 -	    if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
  6.6499 -	      func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
  6.6500 -	      func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
  6.6501 -	    fi
  6.6502 -	  fi
  6.6503 -	fi
  6.6504 -
  6.6505 -	if test -n "$export_symbols" && test -n "$include_expsyms"; then
  6.6506 -	  tmp_export_symbols="$export_symbols"
  6.6507 -	  test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
  6.6508 -	  $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
  6.6509 -	fi
  6.6510 -
  6.6511 -	if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
  6.6512 -	  # The given exports_symbols file has to be filtered, so filter it.
  6.6513 -	  func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
  6.6514 -	  # FIXME: $output_objdir/$libname.filter potentially contains lots of
  6.6515 -	  # 's' commands which not all seds can handle. GNU sed should be fine
  6.6516 -	  # though. Also, the filter scales superlinearly with the number of
  6.6517 -	  # global variables. join(1) would be nice here, but unfortunately
  6.6518 -	  # isn't a blessed tool.
  6.6519 -	  $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
  6.6520 -	  delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
  6.6521 -	  export_symbols=$output_objdir/$libname.def
  6.6522 -	  $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
  6.6523 -	fi
  6.6524 -
  6.6525 -	tmp_deplibs=
  6.6526 -	for test_deplib in $deplibs; do
  6.6527 -	  case " $convenience " in
  6.6528 -	  *" $test_deplib "*) ;;
  6.6529 -	  *)
  6.6530 -	    tmp_deplibs="$tmp_deplibs $test_deplib"
  6.6531 -	    ;;
  6.6532 -	  esac
  6.6533 -	done
  6.6534 -	deplibs="$tmp_deplibs"
  6.6535 -
  6.6536 -	if test -n "$convenience"; then
  6.6537 -	  if test -n "$whole_archive_flag_spec" &&
  6.6538 -	    test "$compiler_needs_object" = yes &&
  6.6539 -	    test -z "$libobjs"; then
  6.6540 -	    # extract the archives, so we have objects to list.
  6.6541 -	    # TODO: could optimize this to just extract one archive.
  6.6542 -	    whole_archive_flag_spec=
  6.6543 -	  fi
  6.6544 -	  if test -n "$whole_archive_flag_spec"; then
  6.6545 -	    save_libobjs=$libobjs
  6.6546 -	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
  6.6547 -	    test "X$libobjs" = "X " && libobjs=
  6.6548 -	  else
  6.6549 -	    gentop="$output_objdir/${outputname}x"
  6.6550 -	    generated="$generated $gentop"
  6.6551 -
  6.6552 -	    func_extract_archives $gentop $convenience
  6.6553 -	    libobjs="$libobjs $func_extract_archives_result"
  6.6554 -	    test "X$libobjs" = "X " && libobjs=
  6.6555 -	  fi
  6.6556 -	fi
  6.6557 -
  6.6558 -	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
  6.6559 -	  eval flag=\"$thread_safe_flag_spec\"
  6.6560 -	  linker_flags="$linker_flags $flag"
  6.6561 -	fi
  6.6562 -
  6.6563 -	# Make a backup of the uninstalled library when relinking
  6.6564 -	if test "$mode" = relink; then
  6.6565 -	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
  6.6566 -	fi
  6.6567 -
  6.6568 -	# Do each of the archive commands.
  6.6569 -	if test "$module" = yes && test -n "$module_cmds" ; then
  6.6570 -	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
  6.6571 -	    eval test_cmds=\"$module_expsym_cmds\"
  6.6572 -	    cmds=$module_expsym_cmds
  6.6573 -	  else
  6.6574 -	    eval test_cmds=\"$module_cmds\"
  6.6575 -	    cmds=$module_cmds
  6.6576 -	  fi
  6.6577 -	else
  6.6578 -	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
  6.6579 -	    eval test_cmds=\"$archive_expsym_cmds\"
  6.6580 -	    cmds=$archive_expsym_cmds
  6.6581 -	  else
  6.6582 -	    eval test_cmds=\"$archive_cmds\"
  6.6583 -	    cmds=$archive_cmds
  6.6584 -	  fi
  6.6585 -	fi
  6.6586 -
  6.6587 -	if test "X$skipped_export" != "X:" &&
  6.6588 -	   func_len " $test_cmds" &&
  6.6589 -	   len=$func_len_result &&
  6.6590 -	   test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
  6.6591 -	  :
  6.6592 -	else
  6.6593 -	  # The command line is too long to link in one step, link piecewise
  6.6594 -	  # or, if using GNU ld and skipped_export is not :, use a linker
  6.6595 -	  # script.
  6.6596 -
  6.6597 -	  # Save the value of $output and $libobjs because we want to
  6.6598 -	  # use them later.  If we have whole_archive_flag_spec, we
  6.6599 -	  # want to use save_libobjs as it was before
  6.6600 -	  # whole_archive_flag_spec was expanded, because we can't
  6.6601 -	  # assume the linker understands whole_archive_flag_spec.
  6.6602 -	  # This may have to be revisited, in case too many
  6.6603 -	  # convenience libraries get linked in and end up exceeding
  6.6604 -	  # the spec.
  6.6605 -	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
  6.6606 -	    save_libobjs=$libobjs
  6.6607 -	  fi
  6.6608 -	  save_output=$output
  6.6609 -	  output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
  6.6610 -
  6.6611 -	  # Clear the reloadable object creation command queue and
  6.6612 -	  # initialize k to one.
  6.6613 -	  test_cmds=
  6.6614 -	  concat_cmds=
  6.6615 -	  objlist=
  6.6616 -	  last_robj=
  6.6617 -	  k=1
  6.6618 -
  6.6619 -	  if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
  6.6620 -	    output=${output_objdir}/${output_la}.lnkscript
  6.6621 -	    func_verbose "creating GNU ld script: $output"
  6.6622 -	    $ECHO 'INPUT (' > $output
  6.6623 -	    for obj in $save_libobjs
  6.6624 -	    do
  6.6625 -	      $ECHO "$obj" >> $output
  6.6626 -	    done
  6.6627 -	    $ECHO ')' >> $output
  6.6628 -	    delfiles="$delfiles $output"
  6.6629 -	  elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
  6.6630 -	    output=${output_objdir}/${output_la}.lnk
  6.6631 -	    func_verbose "creating linker input file list: $output"
  6.6632 -	    : > $output
  6.6633 -	    set x $save_libobjs
  6.6634 -	    shift
  6.6635 -	    firstobj=
  6.6636 -	    if test "$compiler_needs_object" = yes; then
  6.6637 -	      firstobj="$1 "
  6.6638 -	      shift
  6.6639 -	    fi
  6.6640 -	    for obj
  6.6641 -	    do
  6.6642 -	      $ECHO "$obj" >> $output
  6.6643 -	    done
  6.6644 -	    delfiles="$delfiles $output"
  6.6645 -	    output=$firstobj\"$file_list_spec$output\"
  6.6646 -	  else
  6.6647 -	    if test -n "$save_libobjs"; then
  6.6648 -	      func_verbose "creating reloadable object files..."
  6.6649 -	      output=$output_objdir/$output_la-${k}.$objext
  6.6650 -	      eval test_cmds=\"$reload_cmds\"
  6.6651 -	      func_len " $test_cmds"
  6.6652 -	      len0=$func_len_result
  6.6653 -	      len=$len0
  6.6654 -
  6.6655 -	      # Loop over the list of objects to be linked.
  6.6656 -	      for obj in $save_libobjs
  6.6657 -	      do
  6.6658 -		func_len " $obj"
  6.6659 -		func_arith $len + $func_len_result
  6.6660 -		len=$func_arith_result
  6.6661 -		if test "X$objlist" = X ||
  6.6662 -		   test "$len" -lt "$max_cmd_len"; then
  6.6663 -		  func_append objlist " $obj"
  6.6664 -		else
  6.6665 -		  # The command $test_cmds is almost too long, add a
  6.6666 -		  # command to the queue.
  6.6667 -		  if test "$k" -eq 1 ; then
  6.6668 -		    # The first file doesn't have a previous command to add.
  6.6669 -		    eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
  6.6670 -		  else
  6.6671 -		    # All subsequent reloadable object files will link in
  6.6672 -		    # the last one created.
  6.6673 -		    eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
  6.6674 -		  fi
  6.6675 -		  last_robj=$output_objdir/$output_la-${k}.$objext
  6.6676 -		  func_arith $k + 1
  6.6677 -		  k=$func_arith_result
  6.6678 -		  output=$output_objdir/$output_la-${k}.$objext
  6.6679 -		  objlist=$obj
  6.6680 -		  func_len " $last_robj"
  6.6681 -		  func_arith $len0 + $func_len_result
  6.6682 -		  len=$func_arith_result
  6.6683 -		fi
  6.6684 -	      done
  6.6685 -	      # Handle the remaining objects by creating one last
  6.6686 -	      # reloadable object file.  All subsequent reloadable object
  6.6687 -	      # files will link in the last one created.
  6.6688 -	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
  6.6689 -	      eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
  6.6690 -	      if test -n "$last_robj"; then
  6.6691 -	        eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
  6.6692 -	      fi
  6.6693 -	      delfiles="$delfiles $output"
  6.6694 -
  6.6695 -	    else
  6.6696 -	      output=
  6.6697 -	    fi
  6.6698 -
  6.6699 -	    if ${skipped_export-false}; then
  6.6700 -	      func_verbose "generating symbol list for \`$libname.la'"
  6.6701 -	      export_symbols="$output_objdir/$libname.exp"
  6.6702 -	      $opt_dry_run || $RM $export_symbols
  6.6703 -	      libobjs=$output
  6.6704 -	      # Append the command to create the export file.
  6.6705 -	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
  6.6706 -	      eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
  6.6707 -	      if test -n "$last_robj"; then
  6.6708 -		eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
  6.6709 -	      fi
  6.6710 -	    fi
  6.6711 -
  6.6712 -	    test -n "$save_libobjs" &&
  6.6713 -	      func_verbose "creating a temporary reloadable object file: $output"
  6.6714 -
  6.6715 -	    # Loop through the commands generated above and execute them.
  6.6716 -	    save_ifs="$IFS"; IFS='~'
  6.6717 -	    for cmd in $concat_cmds; do
  6.6718 -	      IFS="$save_ifs"
  6.6719 -	      $opt_silent || {
  6.6720 -		  func_quote_for_expand "$cmd"
  6.6721 -		  eval "func_echo $func_quote_for_expand_result"
  6.6722 -	      }
  6.6723 -	      $opt_dry_run || eval "$cmd" || {
  6.6724 -		lt_exit=$?
  6.6725 -
  6.6726 -		# Restore the uninstalled library and exit
  6.6727 -		if test "$mode" = relink; then
  6.6728 -		  ( cd "$output_objdir" && \
  6.6729 -		    $RM "${realname}T" && \
  6.6730 -		    $MV "${realname}U" "$realname" )
  6.6731 -		fi
  6.6732 -
  6.6733 -		exit $lt_exit
  6.6734 -	      }
  6.6735 -	    done
  6.6736 -	    IFS="$save_ifs"
  6.6737 -
  6.6738 -	    if test -n "$export_symbols_regex" && ${skipped_export-false}; then
  6.6739 -	      func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
  6.6740 -	      func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
  6.6741 -	    fi
  6.6742 -	  fi
  6.6743 -
  6.6744 -          if ${skipped_export-false}; then
  6.6745 -	    if test -n "$export_symbols" && test -n "$include_expsyms"; then
  6.6746 -	      tmp_export_symbols="$export_symbols"
  6.6747 -	      test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
  6.6748 -	      $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
  6.6749 -	    fi
  6.6750 -
  6.6751 -	    if test -n "$orig_export_symbols"; then
  6.6752 -	      # The given exports_symbols file has to be filtered, so filter it.
  6.6753 -	      func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
  6.6754 -	      # FIXME: $output_objdir/$libname.filter potentially contains lots of
  6.6755 -	      # 's' commands which not all seds can handle. GNU sed should be fine
  6.6756 -	      # though. Also, the filter scales superlinearly with the number of
  6.6757 -	      # global variables. join(1) would be nice here, but unfortunately
  6.6758 -	      # isn't a blessed tool.
  6.6759 -	      $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
  6.6760 -	      delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
  6.6761 -	      export_symbols=$output_objdir/$libname.def
  6.6762 -	      $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
  6.6763 -	    fi
  6.6764 -	  fi
  6.6765 -
  6.6766 -	  libobjs=$output
  6.6767 -	  # Restore the value of output.
  6.6768 -	  output=$save_output
  6.6769 -
  6.6770 -	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
  6.6771 -	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
  6.6772 -	    test "X$libobjs" = "X " && libobjs=
  6.6773 -	  fi
  6.6774 -	  # Expand the library linking commands again to reset the
  6.6775 -	  # value of $libobjs for piecewise linking.
  6.6776 -
  6.6777 -	  # Do each of the archive commands.
  6.6778 -	  if test "$module" = yes && test -n "$module_cmds" ; then
  6.6779 -	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
  6.6780 -	      cmds=$module_expsym_cmds
  6.6781 -	    else
  6.6782 -	      cmds=$module_cmds
  6.6783 -	    fi
  6.6784 -	  else
  6.6785 -	    if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
  6.6786 -	      cmds=$archive_expsym_cmds
  6.6787 -	    else
  6.6788 -	      cmds=$archive_cmds
  6.6789 -	    fi
  6.6790 -	  fi
  6.6791 -	fi
  6.6792 -
  6.6793 -	if test -n "$delfiles"; then
  6.6794 -	  # Append the command to remove temporary files to $cmds.
  6.6795 -	  eval cmds=\"\$cmds~\$RM $delfiles\"
  6.6796 -	fi
  6.6797 -
  6.6798 -	# Add any objects from preloaded convenience libraries
  6.6799 -	if test -n "$dlprefiles"; then
  6.6800 -	  gentop="$output_objdir/${outputname}x"
  6.6801 -	  generated="$generated $gentop"
  6.6802 -
  6.6803 -	  func_extract_archives $gentop $dlprefiles
  6.6804 -	  libobjs="$libobjs $func_extract_archives_result"
  6.6805 -	  test "X$libobjs" = "X " && libobjs=
  6.6806 -	fi
  6.6807 -
  6.6808 -	save_ifs="$IFS"; IFS='~'
  6.6809 -	for cmd in $cmds; do
  6.6810 -	  IFS="$save_ifs"
  6.6811 -	  eval cmd=\"$cmd\"
  6.6812 -	  $opt_silent || {
  6.6813 -	    func_quote_for_expand "$cmd"
  6.6814 -	    eval "func_echo $func_quote_for_expand_result"
  6.6815 -	  }
  6.6816 -	  $opt_dry_run || eval "$cmd" || {
  6.6817 -	    lt_exit=$?
  6.6818 -
  6.6819 -	    # Restore the uninstalled library and exit
  6.6820 -	    if test "$mode" = relink; then
  6.6821 -	      ( cd "$output_objdir" && \
  6.6822 -	        $RM "${realname}T" && \
  6.6823 -		$MV "${realname}U" "$realname" )
  6.6824 -	    fi
  6.6825 -
  6.6826 -	    exit $lt_exit
  6.6827 -	  }
  6.6828 -	done
  6.6829 -	IFS="$save_ifs"
  6.6830 -
  6.6831 -	# Restore the uninstalled library and exit
  6.6832 -	if test "$mode" = relink; then
  6.6833 -	  $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
  6.6834 -
  6.6835 -	  if test -n "$convenience"; then
  6.6836 -	    if test -z "$whole_archive_flag_spec"; then
  6.6837 -	      func_show_eval '${RM}r "$gentop"'
  6.6838 -	    fi
  6.6839 -	  fi
  6.6840 -
  6.6841 -	  exit $EXIT_SUCCESS
  6.6842 -	fi
  6.6843 -
  6.6844 -	# Create links to the real library.
  6.6845 -	for linkname in $linknames; do
  6.6846 -	  if test "$realname" != "$linkname"; then
  6.6847 -	    func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
  6.6848 -	  fi
  6.6849 -	done
  6.6850 -
  6.6851 -	# If -module or -export-dynamic was specified, set the dlname.
  6.6852 -	if test "$module" = yes || test "$export_dynamic" = yes; then
  6.6853 -	  # On all known operating systems, these are identical.
  6.6854 -	  dlname="$soname"
  6.6855 -	fi
  6.6856 -      fi
  6.6857 -      ;;
  6.6858 -
  6.6859 -    obj)
  6.6860 -      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  6.6861 -	func_warning "\`-dlopen' is ignored for objects"
  6.6862 -      fi
  6.6863 -
  6.6864 -      case " $deplibs" in
  6.6865 -      *\ -l* | *\ -L*)
  6.6866 -	func_warning "\`-l' and \`-L' are ignored for objects" ;;
  6.6867 -      esac
  6.6868 -
  6.6869 -      test -n "$rpath" && \
  6.6870 -	func_warning "\`-rpath' is ignored for objects"
  6.6871 -
  6.6872 -      test -n "$xrpath" && \
  6.6873 -	func_warning "\`-R' is ignored for objects"
  6.6874 -
  6.6875 -      test -n "$vinfo" && \
  6.6876 -	func_warning "\`-version-info' is ignored for objects"
  6.6877 -
  6.6878 -      test -n "$release" && \
  6.6879 -	func_warning "\`-release' is ignored for objects"
  6.6880 -
  6.6881 -      case $output in
  6.6882 -      *.lo)
  6.6883 -	test -n "$objs$old_deplibs" && \
  6.6884 -	  func_fatal_error "cannot build library object \`$output' from non-libtool objects"
  6.6885 -
  6.6886 -	libobj=$output
  6.6887 -	func_lo2o "$libobj"
  6.6888 -	obj=$func_lo2o_result
  6.6889 -	;;
  6.6890 -      *)
  6.6891 -	libobj=
  6.6892 -	obj="$output"
  6.6893 -	;;
  6.6894 -      esac
  6.6895 -
  6.6896 -      # Delete the old objects.
  6.6897 -      $opt_dry_run || $RM $obj $libobj
  6.6898 -
  6.6899 -      # Objects from convenience libraries.  This assumes
  6.6900 -      # single-version convenience libraries.  Whenever we create
  6.6901 -      # different ones for PIC/non-PIC, this we'll have to duplicate
  6.6902 -      # the extraction.
  6.6903 -      reload_conv_objs=
  6.6904 -      gentop=
  6.6905 -      # reload_cmds runs $LD directly, so let us get rid of
  6.6906 -      # -Wl from whole_archive_flag_spec and hope we can get by with
  6.6907 -      # turning comma into space..
  6.6908 -      wl=
  6.6909 -
  6.6910 -      if test -n "$convenience"; then
  6.6911 -	if test -n "$whole_archive_flag_spec"; then
  6.6912 -	  eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
  6.6913 -	  reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
  6.6914 -	else
  6.6915 -	  gentop="$output_objdir/${obj}x"
  6.6916 -	  generated="$generated $gentop"
  6.6917 -
  6.6918 -	  func_extract_archives $gentop $convenience
  6.6919 -	  reload_conv_objs="$reload_objs $func_extract_archives_result"
  6.6920 -	fi
  6.6921 -      fi
  6.6922 -
  6.6923 -      # Create the old-style object.
  6.6924 -      reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
  6.6925 -
  6.6926 -      output="$obj"
  6.6927 -      func_execute_cmds "$reload_cmds" 'exit $?'
  6.6928 -
  6.6929 -      # Exit if we aren't doing a library object file.
  6.6930 -      if test -z "$libobj"; then
  6.6931 -	if test -n "$gentop"; then
  6.6932 -	  func_show_eval '${RM}r "$gentop"'
  6.6933 -	fi
  6.6934 -
  6.6935 -	exit $EXIT_SUCCESS
  6.6936 -      fi
  6.6937 -
  6.6938 -      if test "$build_libtool_libs" != yes; then
  6.6939 -	if test -n "$gentop"; then
  6.6940 -	  func_show_eval '${RM}r "$gentop"'
  6.6941 -	fi
  6.6942 -
  6.6943 -	# Create an invalid libtool object if no PIC, so that we don't
  6.6944 -	# accidentally link it into a program.
  6.6945 -	# $show "echo timestamp > $libobj"
  6.6946 -	# $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
  6.6947 -	exit $EXIT_SUCCESS
  6.6948 -      fi
  6.6949 -
  6.6950 -      if test -n "$pic_flag" || test "$pic_mode" != default; then
  6.6951 -	# Only do commands if we really have different PIC objects.
  6.6952 -	reload_objs="$libobjs $reload_conv_objs"
  6.6953 -	output="$libobj"
  6.6954 -	func_execute_cmds "$reload_cmds" 'exit $?'
  6.6955 -      fi
  6.6956 -
  6.6957 -      if test -n "$gentop"; then
  6.6958 -	func_show_eval '${RM}r "$gentop"'
  6.6959 -      fi
  6.6960 -
  6.6961 -      exit $EXIT_SUCCESS
  6.6962 -      ;;
  6.6963 -
  6.6964 -    prog)
  6.6965 -      case $host in
  6.6966 -	*cygwin*) func_stripname '' '.exe' "$output"
  6.6967 -	          output=$func_stripname_result.exe;;
  6.6968 -      esac
  6.6969 -      test -n "$vinfo" && \
  6.6970 -	func_warning "\`-version-info' is ignored for programs"
  6.6971 -
  6.6972 -      test -n "$release" && \
  6.6973 -	func_warning "\`-release' is ignored for programs"
  6.6974 -
  6.6975 -      test "$preload" = yes \
  6.6976 -        && test "$dlopen_support" = unknown \
  6.6977 -	&& test "$dlopen_self" = unknown \
  6.6978 -	&& test "$dlopen_self_static" = unknown && \
  6.6979 -	  func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
  6.6980 -
  6.6981 -      case $host in
  6.6982 -      *-*-rhapsody* | *-*-darwin1.[012])
  6.6983 -	# On Rhapsody replace the C library is the System framework
  6.6984 -	compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
  6.6985 -	finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
  6.6986 -	;;
  6.6987 -      esac
  6.6988 -
  6.6989 -      case $host in
  6.6990 -      *-*-darwin*)
  6.6991 -	# Don't allow lazy linking, it breaks C++ global constructors
  6.6992 -	# But is supposedly fixed on 10.4 or later (yay!).
  6.6993 -	if test "$tagname" = CXX ; then
  6.6994 -	  case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
  6.6995 -	    10.[0123])
  6.6996 -	      compile_command="$compile_command ${wl}-bind_at_load"
  6.6997 -	      finalize_command="$finalize_command ${wl}-bind_at_load"
  6.6998 -	    ;;
  6.6999 -	  esac
  6.7000 -	fi
  6.7001 -	# Time to change all our "foo.ltframework" stuff back to "-framework foo"
  6.7002 -	compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
  6.7003 -	finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
  6.7004 -	;;
  6.7005 -      esac
  6.7006 -
  6.7007 -
  6.7008 -      # move library search paths that coincide with paths to not yet
  6.7009 -      # installed libraries to the beginning of the library search list
  6.7010 -      new_libs=
  6.7011 -      for path in $notinst_path; do
  6.7012 -	case " $new_libs " in
  6.7013 -	*" -L$path/$objdir "*) ;;
  6.7014 -	*)
  6.7015 -	  case " $compile_deplibs " in
  6.7016 -	  *" -L$path/$objdir "*)
  6.7017 -	    new_libs="$new_libs -L$path/$objdir" ;;
  6.7018 -	  esac
  6.7019 -	  ;;
  6.7020 -	esac
  6.7021 -      done
  6.7022 -      for deplib in $compile_deplibs; do
  6.7023 -	case $deplib in
  6.7024 -	-L*)
  6.7025 -	  case " $new_libs " in
  6.7026 -	  *" $deplib "*) ;;
  6.7027 -	  *) new_libs="$new_libs $deplib" ;;
  6.7028 -	  esac
  6.7029 -	  ;;
  6.7030 -	*) new_libs="$new_libs $deplib" ;;
  6.7031 -	esac
  6.7032 -      done
  6.7033 -      compile_deplibs="$new_libs"
  6.7034 -
  6.7035 -
  6.7036 -      compile_command="$compile_command $compile_deplibs"
  6.7037 -      finalize_command="$finalize_command $finalize_deplibs"
  6.7038 -
  6.7039 -      if test -n "$rpath$xrpath"; then
  6.7040 -	# If the user specified any rpath flags, then add them.
  6.7041 -	for libdir in $rpath $xrpath; do
  6.7042 -	  # This is the magic to use -rpath.
  6.7043 -	  case "$finalize_rpath " in
  6.7044 -	  *" $libdir "*) ;;
  6.7045 -	  *) finalize_rpath="$finalize_rpath $libdir" ;;
  6.7046 -	  esac
  6.7047 -	done
  6.7048 -      fi
  6.7049 -
  6.7050 -      # Now hardcode the library paths
  6.7051 -      rpath=
  6.7052 -      hardcode_libdirs=
  6.7053 -      for libdir in $compile_rpath $finalize_rpath; do
  6.7054 -	if test -n "$hardcode_libdir_flag_spec"; then
  6.7055 -	  if test -n "$hardcode_libdir_separator"; then
  6.7056 -	    if test -z "$hardcode_libdirs"; then
  6.7057 -	      hardcode_libdirs="$libdir"
  6.7058 -	    else
  6.7059 -	      # Just accumulate the unique libdirs.
  6.7060 -	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
  6.7061 -	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
  6.7062 -		;;
  6.7063 -	      *)
  6.7064 -		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
  6.7065 -		;;
  6.7066 -	      esac
  6.7067 -	    fi
  6.7068 -	  else
  6.7069 -	    eval flag=\"$hardcode_libdir_flag_spec\"
  6.7070 -	    rpath="$rpath $flag"
  6.7071 -	  fi
  6.7072 -	elif test -n "$runpath_var"; then
  6.7073 -	  case "$perm_rpath " in
  6.7074 -	  *" $libdir "*) ;;
  6.7075 -	  *) perm_rpath="$perm_rpath $libdir" ;;
  6.7076 -	  esac
  6.7077 -	fi
  6.7078 -	case $host in
  6.7079 -	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
  6.7080 -	  testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
  6.7081 -	  case :$dllsearchpath: in
  6.7082 -	  *":$libdir:"*) ;;
  6.7083 -	  *) dllsearchpath="$dllsearchpath:$libdir";;
  6.7084 -	  esac
  6.7085 -	  case :$dllsearchpath: in
  6.7086 -	  *":$testbindir:"*) ;;
  6.7087 -	  *) dllsearchpath="$dllsearchpath:$testbindir";;
  6.7088 -	  esac
  6.7089 -	  ;;
  6.7090 -	esac
  6.7091 -      done
  6.7092 -      # Substitute the hardcoded libdirs into the rpath.
  6.7093 -      if test -n "$hardcode_libdir_separator" &&
  6.7094 -	 test -n "$hardcode_libdirs"; then
  6.7095 -	libdir="$hardcode_libdirs"
  6.7096 -	eval rpath=\" $hardcode_libdir_flag_spec\"
  6.7097 -      fi
  6.7098 -      compile_rpath="$rpath"
  6.7099 -
  6.7100 -      rpath=
  6.7101 -      hardcode_libdirs=
  6.7102 -      for libdir in $finalize_rpath; do
  6.7103 -	if test -n "$hardcode_libdir_flag_spec"; then
  6.7104 -	  if test -n "$hardcode_libdir_separator"; then
  6.7105 -	    if test -z "$hardcode_libdirs"; then
  6.7106 -	      hardcode_libdirs="$libdir"
  6.7107 -	    else
  6.7108 -	      # Just accumulate the unique libdirs.
  6.7109 -	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
  6.7110 -	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
  6.7111 -		;;
  6.7112 -	      *)
  6.7113 -		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
  6.7114 -		;;
  6.7115 -	      esac
  6.7116 -	    fi
  6.7117 -	  else
  6.7118 -	    eval flag=\"$hardcode_libdir_flag_spec\"
  6.7119 -	    rpath="$rpath $flag"
  6.7120 -	  fi
  6.7121 -	elif test -n "$runpath_var"; then
  6.7122 -	  case "$finalize_perm_rpath " in
  6.7123 -	  *" $libdir "*) ;;
  6.7124 -	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
  6.7125 -	  esac
  6.7126 -	fi
  6.7127 -      done
  6.7128 -      # Substitute the hardcoded libdirs into the rpath.
  6.7129 -      if test -n "$hardcode_libdir_separator" &&
  6.7130 -	 test -n "$hardcode_libdirs"; then
  6.7131 -	libdir="$hardcode_libdirs"
  6.7132 -	eval rpath=\" $hardcode_libdir_flag_spec\"
  6.7133 -      fi
  6.7134 -      finalize_rpath="$rpath"
  6.7135 -
  6.7136 -      if test -n "$libobjs" && test "$build_old_libs" = yes; then
  6.7137 -	# Transform all the library objects into standard objects.
  6.7138 -	compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  6.7139 -	finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  6.7140 -      fi
  6.7141 -
  6.7142 -      func_generate_dlsyms "$outputname" "@[email protected]" "no"
  6.7143 -
  6.7144 -      # template prelinking step
  6.7145 -      if test -n "$prelink_cmds"; then
  6.7146 -	func_execute_cmds "$prelink_cmds" 'exit $?'
  6.7147 -      fi
  6.7148 -
  6.7149 -      wrappers_required=yes
  6.7150 -      case $host in
  6.7151 -      *cygwin* | *mingw* )
  6.7152 -        if test "$build_libtool_libs" != yes; then
  6.7153 -          wrappers_required=no
  6.7154 -        fi
  6.7155 -        ;;
  6.7156 -      *)
  6.7157 -        if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
  6.7158 -          wrappers_required=no
  6.7159 -        fi
  6.7160 -        ;;
  6.7161 -      esac
  6.7162 -      if test "$wrappers_required" = no; then
  6.7163 -	# Replace the output file specification.
  6.7164 -	compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@[email protected]%'"$output"'%g'`
  6.7165 -	link_command="$compile_command$compile_rpath"
  6.7166 -
  6.7167 -	# We have no uninstalled library dependencies, so finalize right now.
  6.7168 -	exit_status=0
  6.7169 -	func_show_eval "$link_command" 'exit_status=$?'
  6.7170 -
  6.7171 -	# Delete the generated files.
  6.7172 -	if test -f "$output_objdir/${outputname}S.${objext}"; then
  6.7173 -	  func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
  6.7174 -	fi
  6.7175 -
  6.7176 -	exit $exit_status
  6.7177 -      fi
  6.7178 -
  6.7179 -      if test -n "$compile_shlibpath$finalize_shlibpath"; then
  6.7180 -	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
  6.7181 -      fi
  6.7182 -      if test -n "$finalize_shlibpath"; then
  6.7183 -	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
  6.7184 -      fi
  6.7185 -
  6.7186 -      compile_var=
  6.7187 -      finalize_var=
  6.7188 -      if test -n "$runpath_var"; then
  6.7189 -	if test -n "$perm_rpath"; then
  6.7190 -	  # We should set the runpath_var.
  6.7191 -	  rpath=
  6.7192 -	  for dir in $perm_rpath; do
  6.7193 -	    rpath="$rpath$dir:"
  6.7194 -	  done
  6.7195 -	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
  6.7196 -	fi
  6.7197 -	if test -n "$finalize_perm_rpath"; then
  6.7198 -	  # We should set the runpath_var.
  6.7199 -	  rpath=
  6.7200 -	  for dir in $finalize_perm_rpath; do
  6.7201 -	    rpath="$rpath$dir:"
  6.7202 -	  done
  6.7203 -	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
  6.7204 -	fi
  6.7205 -      fi
  6.7206 -
  6.7207 -      if test "$no_install" = yes; then
  6.7208 -	# We don't need to create a wrapper script.
  6.7209 -	link_command="$compile_var$compile_command$compile_rpath"
  6.7210 -	# Replace the output file specification.
  6.7211 -	link_command=`$ECHO "X$link_command" | $Xsed -e 's%@[email protected]%'"$output"'%g'`
  6.7212 -	# Delete the old output file.
  6.7213 -	$opt_dry_run || $RM $output
  6.7214 -	# Link the executable and exit
  6.7215 -	func_show_eval "$link_command" 'exit $?'
  6.7216 -	exit $EXIT_SUCCESS
  6.7217 -      fi
  6.7218 -
  6.7219 -      if test "$hardcode_action" = relink; then
  6.7220 -	# Fast installation is not supported
  6.7221 -	link_command="$compile_var$compile_command$compile_rpath"
  6.7222 -	relink_command="$finalize_var$finalize_command$finalize_rpath"
  6.7223 -
  6.7224 -	func_warning "this platform does not like uninstalled shared libraries"
  6.7225 -	func_warning "\`$output' will be relinked during installation"
  6.7226 -      else
  6.7227 -	if test "$fast_install" != no; then
  6.7228 -	  link_command="$finalize_var$compile_command$finalize_rpath"
  6.7229 -	  if test "$fast_install" = yes; then
  6.7230 -	    relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@[email protected]%\$progdir/\$file%g'`
  6.7231 -	  else
  6.7232 -	    # fast_install is set to needless
  6.7233 -	    relink_command=
  6.7234 -	  fi
  6.7235 -	else
  6.7236 -	  link_command="$compile_var$compile_command$compile_rpath"
  6.7237 -	  relink_command="$finalize_var$finalize_command$finalize_rpath"
  6.7238 -	fi
  6.7239 -      fi
  6.7240 -
  6.7241 -      # Replace the output file specification.
  6.7242 -      link_command=`$ECHO "X$link_command" | $Xsed -e 's%@[email protected]%'"$output_objdir/$outputname"'%g'`
  6.7243 -
  6.7244 -      # Delete the old output files.
  6.7245 -      $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
  6.7246 -
  6.7247 -      func_show_eval "$link_command" 'exit $?'
  6.7248 -
  6.7249 -      # Now create the wrapper script.
  6.7250 -      func_verbose "creating $output"
  6.7251 -
  6.7252 -      # Quote the relink command for shipping.
  6.7253 -      if test -n "$relink_command"; then
  6.7254 -	# Preserve any variables that may affect compiler behavior
  6.7255 -	for var in $variables_saved_for_relink; do
  6.7256 -	  if eval test -z \"\${$var+set}\"; then
  6.7257 -	    relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
  6.7258 -	  elif eval var_value=\$$var; test -z "$var_value"; then
  6.7259 -	    relink_command="$var=; export $var; $relink_command"
  6.7260 -	  else
  6.7261 -	    func_quote_for_eval "$var_value"
  6.7262 -	    relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
  6.7263 -	  fi
  6.7264 -	done
  6.7265 -	relink_command="(cd `pwd`; $relink_command)"
  6.7266 -	relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
  6.7267 -      fi
  6.7268 -
  6.7269 -      # Quote $ECHO for shipping.
  6.7270 -      if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
  6.7271 -	case $progpath in
  6.7272 -	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
  6.7273 -	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
  6.7274 -	esac
  6.7275 -	qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
  6.7276 -      else
  6.7277 -	qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
  6.7278 -      fi
  6.7279 -
  6.7280 -      # Only actually do things if not in dry run mode.
  6.7281 -      $opt_dry_run || {
  6.7282 -	# win32 will think the script is a binary if it has
  6.7283 -	# a .exe suffix, so we strip it off here.
  6.7284 -	case $output in
  6.7285 -	  *.exe) func_stripname '' '.exe' "$output"
  6.7286 -	         output=$func_stripname_result ;;
  6.7287 -	esac
  6.7288 -	# test for cygwin because mv fails w/o .exe extensions
  6.7289 -	case $host in
  6.7290 -	  *cygwin*)
  6.7291 -	    exeext=.exe
  6.7292 -	    func_stripname '' '.exe' "$outputname"
  6.7293 -	    outputname=$func_stripname_result ;;
  6.7294 -	  *) exeext= ;;
  6.7295 -	esac
  6.7296 -	case $host in
  6.7297 -	  *cygwin* | *mingw* )
  6.7298 -	    func_dirname_and_basename "$output" "" "."
  6.7299 -	    output_name=$func_basename_result
  6.7300 -	    output_path=$func_dirname_result
  6.7301 -	    cwrappersource="$output_path/$objdir/lt-$output_name.c"
  6.7302 -	    cwrapper="$output_path/$output_name.exe"
  6.7303 -	    $RM $cwrappersource $cwrapper
  6.7304 -	    trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
  6.7305 -
  6.7306 -	    func_emit_cwrapperexe_src > $cwrappersource
  6.7307 -
  6.7308 -	    # we should really use a build-platform specific compiler
  6.7309 -	    # here, but OTOH, the wrappers (shell script and this C one)
  6.7310 -	    # are only useful if you want to execute the "real" binary.
  6.7311 -	    # Since the "real" binary is built for $host, then this
  6.7312 -	    # wrapper might as well be built for $host, too.
  6.7313 -	    $opt_dry_run || {
  6.7314 -	      $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
  6.7315 -	      $STRIP $cwrapper
  6.7316 -	    }
  6.7317 -
  6.7318 -	    # Now, create the wrapper script for func_source use:
  6.7319 -	    func_ltwrapper_scriptname $cwrapper
  6.7320 -	    $RM $func_ltwrapper_scriptname_result
  6.7321 -	    trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
  6.7322 -	    $opt_dry_run || {
  6.7323 -	      # note: this script will not be executed, so do not chmod.
  6.7324 -	      if test "x$build" = "x$host" ; then
  6.7325 -		$cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
  6.7326 -	      else
  6.7327 -		func_emit_wrapper no > $func_ltwrapper_scriptname_result
  6.7328 -	      fi
  6.7329 -	    }
  6.7330 -	  ;;
  6.7331 -	  * )
  6.7332 -	    $RM $output
  6.7333 -	    trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
  6.7334 -
  6.7335 -	    func_emit_wrapper no > $output
  6.7336 -	    chmod +x $output
  6.7337 -	  ;;
  6.7338 -	esac
  6.7339 -      }
  6.7340 -      exit $EXIT_SUCCESS
  6.7341 -      ;;
  6.7342 -    esac
  6.7343 -
  6.7344 -    # See if we need to build an old-fashioned archive.
  6.7345 -    for oldlib in $oldlibs; do
  6.7346 -
  6.7347 -      if test "$build_libtool_libs" = convenience; then
  6.7348 -	oldobjs="$libobjs_save $symfileobj"
  6.7349 -	addlibs="$convenience"
  6.7350 -	build_libtool_libs=no
  6.7351 -      else
  6.7352 -	if test "$build_libtool_libs" = module; then
  6.7353 -	  oldobjs="$libobjs_save"
  6.7354 -	  build_libtool_libs=no
  6.7355 -	else
  6.7356 -	  oldobjs="$old_deplibs $non_pic_objects"
  6.7357 -	  if test "$preload" = yes && test -f "$symfileobj"; then
  6.7358 -	    oldobjs="$oldobjs $symfileobj"
  6.7359 -	  fi
  6.7360 -	fi
  6.7361 -	addlibs="$old_convenience"
  6.7362 -      fi
  6.7363 -
  6.7364 -      if test -n "$addlibs"; then
  6.7365 -	gentop="$output_objdir/${outputname}x"
  6.7366 -	generated="$generated $gentop"
  6.7367 -
  6.7368 -	func_extract_archives $gentop $addlibs
  6.7369 -	oldobjs="$oldobjs $func_extract_archives_result"
  6.7370 -      fi
  6.7371 -
  6.7372 -      # Do each command in the archive commands.
  6.7373 -      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
  6.7374 -	cmds=$old_archive_from_new_cmds
  6.7375 -      else
  6.7376 -
  6.7377 -	# Add any objects from preloaded convenience libraries
  6.7378 -	if test -n "$dlprefiles"; then
  6.7379 -	  gentop="$output_objdir/${outputname}x"
  6.7380 -	  generated="$generated $gentop"
  6.7381 -
  6.7382 -	  func_extract_archives $gentop $dlprefiles
  6.7383 -	  oldobjs="$oldobjs $func_extract_archives_result"
  6.7384 -	fi
  6.7385 -
  6.7386 -	# POSIX demands no paths to be encoded in archives.  We have
  6.7387 -	# to avoid creating archives with duplicate basenames if we
  6.7388 -	# might have to extract them afterwards, e.g., when creating a
  6.7389 -	# static archive out of a convenience library, or when linking
  6.7390 -	# the entirety of a libtool archive into another (currently
  6.7391 -	# not supported by libtool).
  6.7392 -	if (for obj in $oldobjs
  6.7393 -	    do
  6.7394 -	      func_basename "$obj"
  6.7395 -	      $ECHO "$func_basename_result"
  6.7396 -	    done | sort | sort -uc >/dev/null 2>&1); then
  6.7397 -	  :
  6.7398 -	else
  6.7399 -	  $ECHO "copying selected object files to avoid basename conflicts..."
  6.7400 -	  gentop="$output_objdir/${outputname}x"
  6.7401 -	  generated="$generated $gentop"
  6.7402 -	  func_mkdir_p "$gentop"
  6.7403 -	  save_oldobjs=$oldobjs
  6.7404 -	  oldobjs=
  6.7405 -	  counter=1
  6.7406 -	  for obj in $save_oldobjs
  6.7407 -	  do
  6.7408 -	    func_basename "$obj"
  6.7409 -	    objbase="$func_basename_result"
  6.7410 -	    case " $oldobjs " in
  6.7411 -	    " ") oldobjs=$obj ;;
  6.7412 -	    *[\ /]"$objbase "*)
  6.7413 -	      while :; do
  6.7414 -		# Make sure we don't pick an alternate name that also
  6.7415 -		# overlaps.
  6.7416 -		newobj=lt$counter-$objbase
  6.7417 -		func_arith $counter + 1
  6.7418 -		counter=$func_arith_result
  6.7419 -		case " $oldobjs " in
  6.7420 -		*[\ /]"$newobj "*) ;;
  6.7421 -		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
  6.7422 -		esac
  6.7423 -	      done
  6.7424 -	      func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
  6.7425 -	      oldobjs="$oldobjs $gentop/$newobj"
  6.7426 -	      ;;
  6.7427 -	    *) oldobjs="$oldobjs $obj" ;;
  6.7428 -	    esac
  6.7429 -	  done
  6.7430 -	fi
  6.7431 -	eval cmds=\"$old_archive_cmds\"
  6.7432 -
  6.7433 -	func_len " $cmds"
  6.7434 -	len=$func_len_result
  6.7435 -	if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
  6.7436 -	  cmds=$old_archive_cmds
  6.7437 -	else
  6.7438 -	  # the command line is too long to link in one step, link in parts
  6.7439 -	  func_verbose "using piecewise archive linking..."
  6.7440 -	  save_RANLIB=$RANLIB
  6.7441 -	  RANLIB=:
  6.7442 -	  objlist=
  6.7443 -	  concat_cmds=
  6.7444 -	  save_oldobjs=$oldobjs
  6.7445 -	  oldobjs=
  6.7446 -	  # Is there a better way of finding the last object in the list?
  6.7447 -	  for obj in $save_oldobjs
  6.7448 -	  do
  6.7449 -	    last_oldobj=$obj
  6.7450 -	  done
  6.7451 -	  eval test_cmds=\"$old_archive_cmds\"
  6.7452 -	  func_len " $test_cmds"
  6.7453 -	  len0=$func_len_result
  6.7454 -	  len=$len0
  6.7455 -	  for obj in $save_oldobjs
  6.7456 -	  do
  6.7457 -	    func_len " $obj"
  6.7458 -	    func_arith $len + $func_len_result
  6.7459 -	    len=$func_arith_result
  6.7460 -	    func_append objlist " $obj"
  6.7461 -	    if test "$len" -lt "$max_cmd_len"; then
  6.7462 -	      :
  6.7463 -	    else
  6.7464 -	      # the above command should be used before it gets too long
  6.7465 -	      oldobjs=$objlist
  6.7466 -	      if test "$obj" = "$last_oldobj" ; then
  6.7467 -		RANLIB=$save_RANLIB
  6.7468 -	      fi
  6.7469 -	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
  6.7470 -	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
  6.7471 -	      objlist=
  6.7472 -	      len=$len0
  6.7473 -	    fi
  6.7474 -	  done
  6.7475 -	  RANLIB=$save_RANLIB
  6.7476 -	  oldobjs=$objlist
  6.7477 -	  if test "X$oldobjs" = "X" ; then
  6.7478 -	    eval cmds=\"\$concat_cmds\"
  6.7479 -	  else
  6.7480 -	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
  6.7481 -	  fi
  6.7482 -	fi
  6.7483 -      fi
  6.7484 -      func_execute_cmds "$cmds" 'exit $?'
  6.7485 -    done
  6.7486 -
  6.7487 -    test -n "$generated" && \
  6.7488 -      func_show_eval "${RM}r$generated"
  6.7489 -
  6.7490 -    # Now create the libtool archive.
  6.7491 -    case $output in
  6.7492 -    *.la)
  6.7493 -      old_library=
  6.7494 -      test "$build_old_libs" = yes && old_library="$libname.$libext"
  6.7495 -      func_verbose "creating $output"
  6.7496 -
  6.7497 -      # Preserve any variables that may affect compiler behavior
  6.7498 -      for var in $variables_saved_for_relink; do
  6.7499 -	if eval test -z \"\${$var+set}\"; then
  6.7500 -	  relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
  6.7501 -	elif eval var_value=\$$var; test -z "$var_value"; then
  6.7502 -	  relink_command="$var=; export $var; $relink_command"
  6.7503 -	else
  6.7504 -	  func_quote_for_eval "$var_value"
  6.7505 -	  relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
  6.7506 -	fi
  6.7507 -      done
  6.7508 -      # Quote the link command for shipping.
  6.7509 -      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @[email protected])"
  6.7510 -      relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
  6.7511 -      if test "$hardcode_automatic" = yes ; then
  6.7512 -	relink_command=
  6.7513 -      fi
  6.7514 -
  6.7515 -      # Only create the output if not a dry run.
  6.7516 -      $opt_dry_run || {
  6.7517 -	for installed in no yes; do
  6.7518 -	  if test "$installed" = yes; then
  6.7519 -	    if test -z "$install_libdir"; then
  6.7520 -	      break
  6.7521 -	    fi
  6.7522 -	    output="$output_objdir/$outputname"i
  6.7523 -	    # Replace all uninstalled libtool libraries with the installed ones
  6.7524 -	    newdependency_libs=
  6.7525 -	    for deplib in $dependency_libs; do
  6.7526 -	      case $deplib in
  6.7527 -	      *.la)
  6.7528 -		func_basename "$deplib"
  6.7529 -		name="$func_basename_result"
  6.7530 -		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
  6.7531 -		test -z "$libdir" && \
  6.7532 -		  func_fatal_error "\`$deplib' is not a valid libtool archive"
  6.7533 -		newdependency_libs="$newdependency_libs $libdir/$name"
  6.7534 -		;;
  6.7535 -	      *) newdependency_libs="$newdependency_libs $deplib" ;;
  6.7536 -	      esac
  6.7537 -	    done
  6.7538 -	    dependency_libs="$newdependency_libs"
  6.7539 -	    newdlfiles=
  6.7540 -
  6.7541 -	    for lib in $dlfiles; do
  6.7542 -	      case $lib in
  6.7543 -	      *.la)
  6.7544 -	        func_basename "$lib"
  6.7545 -		name="$func_basename_result"
  6.7546 -		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
  6.7547 -		test -z "$libdir" && \
  6.7548 -		  func_fatal_error "\`$lib' is not a valid libtool archive"
  6.7549 -		newdlfiles="$newdlfiles $libdir/$name"
  6.7550 -		;;
  6.7551 -	      *) newdlfiles="$newdlfiles $lib" ;;
  6.7552 -	      esac
  6.7553 -	    done
  6.7554 -	    dlfiles="$newdlfiles"
  6.7555 -	    newdlprefiles=
  6.7556 -	    for lib in $dlprefiles; do
  6.7557 -	      case $lib in
  6.7558 -	      *.la)
  6.7559 -		# Only pass preopened files to the pseudo-archive (for
  6.7560 -		# eventual linking with the app. that links it) if we
  6.7561 -		# didn't already link the preopened objects directly into
  6.7562 -		# the library:
  6.7563 -		func_basename "$lib"
  6.7564 -		name="$func_basename_result"
  6.7565 -		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
  6.7566 -		test -z "$libdir" && \
  6.7567 -		  func_fatal_error "\`$lib' is not a valid libtool archive"
  6.7568 -		newdlprefiles="$newdlprefiles $libdir/$name"
  6.7569 -		;;
  6.7570 -	      esac
  6.7571 -	    done
  6.7572 -	    dlprefiles="$newdlprefiles"
  6.7573 -	  else
  6.7574 -	    newdlfiles=
  6.7575 -	    for lib in $dlfiles; do
  6.7576 -	      case $lib in
  6.7577 -		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
  6.7578 -		*) abs=`pwd`"/$lib" ;;
  6.7579 -	      esac
  6.7580 -	      newdlfiles="$newdlfiles $abs"
  6.7581 -	    done
  6.7582 -	    dlfiles="$newdlfiles"
  6.7583 -	    newdlprefiles=
  6.7584 -	    for lib in $dlprefiles; do
  6.7585 -	      case $lib in
  6.7586 -		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
  6.7587 -		*) abs=`pwd`"/$lib" ;;
  6.7588 -	      esac
  6.7589 -	      newdlprefiles="$newdlprefiles $abs"
  6.7590 -	    done
  6.7591 -	    dlprefiles="$newdlprefiles"
  6.7592 -	  fi
  6.7593 -	  $RM $output
  6.7594 -	  # place dlname in correct position for cygwin
  6.7595 -	  tdlname=$dlname
  6.7596 -	  case $host,$output,$installed,$module,$dlname in
  6.7597 -	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
  6.7598 -	  esac
  6.7599 -	  $ECHO > $output "\
  6.7600 -# $outputname - a libtool library file
  6.7601 -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
  6.7602 -#
  6.7603 -# Please DO NOT delete this file!
  6.7604 -# It is necessary for linking the library.
  6.7605 -
  6.7606 -# The name that we can dlopen(3).
  6.7607 -dlname='$tdlname'
  6.7608 -
  6.7609 -# Names of this library.
  6.7610 -library_names='$library_names'
  6.7611 -
  6.7612 -# The name of the static archive.
  6.7613 -old_library='$old_library'
  6.7614 -
  6.7615 -# Linker flags that can not go in dependency_libs.
  6.7616 -inherited_linker_flags='$new_inherited_linker_flags'
  6.7617 -
  6.7618 -# Libraries that this one depends upon.
  6.7619 -dependency_libs='$dependency_libs'
  6.7620 -
  6.7621 -# Names of additional weak libraries provided by this library
  6.7622 -weak_library_names='$weak_libs'
  6.7623 -
  6.7624 -# Version information for $libname.
  6.7625 -current=$current
  6.7626 -age=$age
  6.7627 -revision=$revision
  6.7628 -
  6.7629 -# Is this an already installed library?
  6.7630 -installed=$installed
  6.7631 -
  6.7632 -# Should we warn about portability when linking against -modules?
  6.7633 -shouldnotlink=$module
  6.7634 -
  6.7635 -# Files to dlopen/dlpreopen
  6.7636 -dlopen='$dlfiles'
  6.7637 -dlpreopen='$dlprefiles'
  6.7638 -
  6.7639 -# Directory that this library needs to be installed in:
  6.7640 -libdir='$install_libdir'"
  6.7641 -	  if test "$installed" = no && test "$need_relink" = yes; then
  6.7642 -	    $ECHO >> $output "\
  6.7643 -relink_command=\"$relink_command\""
  6.7644 -	  fi
  6.7645 -	done
  6.7646 -      }
  6.7647 -
  6.7648 -      # Do a symbolic link so that the libtool archive can be found in
  6.7649 -      # LD_LIBRARY_PATH before the program is installed.
  6.7650 -      func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
  6.7651 -      ;;
  6.7652 -    esac
  6.7653 -    exit $EXIT_SUCCESS
  6.7654 -}
  6.7655 -
  6.7656 -{ test "$mode" = link || test "$mode" = relink; } &&
  6.7657 -    func_mode_link ${1+"[email protected]"}
  6.7658 -
  6.7659 -
  6.7660 -# func_mode_uninstall arg...
  6.7661 -func_mode_uninstall ()
  6.7662 -{
  6.7663 -    $opt_debug
  6.7664 -    RM="$nonopt"
  6.7665 -    files=
  6.7666 -    rmforce=
  6.7667 -    exit_status=0
  6.7668 -
  6.7669 -    # This variable tells wrapper scripts just to set variables rather
  6.7670 -    # than running their programs.
  6.7671 -    libtool_install_magic="$magic"
  6.7672 -
  6.7673 -    for arg
  6.7674 -    do
  6.7675 -      case $arg in
  6.7676 -      -f) RM="$RM $arg"; rmforce=yes ;;
  6.7677 -      -*) RM="$RM $arg" ;;
  6.7678 -      *) files="$files $arg" ;;
  6.7679 -      esac
  6.7680 -    done
  6.7681 -
  6.7682 -    test -z "$RM" && \
  6.7683 -      func_fatal_help "you must specify an RM program"
  6.7684 -
  6.7685 -    rmdirs=
  6.7686 -
  6.7687 -    origobjdir="$objdir"
  6.7688 -    for file in $files; do
  6.7689 -      func_dirname "$file" "" "."
  6.7690 -      dir="$func_dirname_result"
  6.7691 -      if test "X$dir" = X.; then
  6.7692 -	objdir="$origobjdir"
  6.7693 -      else
  6.7694 -	objdir="$dir/$origobjdir"
  6.7695 -      fi
  6.7696 -      func_basename "$file"