gst-gpac/ltmain.sh
branchtrunk
changeset 942 c93bfa74c71f
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gst-gpac/ltmain.sh	Thu Mar 13 16:29:38 2008 +0000
     1.3 @@ -0,0 +1,6938 @@
     1.4 +# ltmain.sh - Provide generalized library-building support services.
     1.5 +# NOTE: Changing this file will not affect anything until you rerun configure.
     1.6 +#
     1.7 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
     1.8 +# 2007  Free Software Foundation, Inc.
     1.9 +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
    1.10 +#
    1.11 +# This program is free software; you can redistribute it and/or modify
    1.12 +# it under the terms of the GNU General Public License as published by
    1.13 +# the Free Software Foundation; either version 2 of the License, or
    1.14 +# (at your option) any later version.
    1.15 +#
    1.16 +# This program is distributed in the hope that it will be useful, but
    1.17 +# WITHOUT ANY WARRANTY; without even the implied warranty of
    1.18 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.19 +# General Public License for more details.
    1.20 +#
    1.21 +# You should have received a copy of the GNU General Public License
    1.22 +# along with this program; if not, write to the Free Software
    1.23 +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
    1.24 +#
    1.25 +# As a special exception to the GNU General Public License, if you
    1.26 +# distribute this file as part of a program that contains a
    1.27 +# configuration script generated by Autoconf, you may include it under
    1.28 +# the same distribution terms that you use for the rest of that program.
    1.29 +
    1.30 +basename="s,^.*/,,g"
    1.31 +
    1.32 +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
    1.33 +# is ksh but when the shell is invoked as "sh" and the current value of
    1.34 +# the _XPG environment variable is not equal to 1 (one), the special
    1.35 +# positional parameter $0, within a function call, is the name of the
    1.36 +# function.
    1.37 +progpath="$0"
    1.38 +
    1.39 +# The name of this program:
    1.40 +progname=`echo "$progpath" | $SED $basename`
    1.41 +modename="$progname"
    1.42 +
    1.43 +# Global variables:
    1.44 +EXIT_SUCCESS=0
    1.45 +EXIT_FAILURE=1
    1.46 +
    1.47 +PROGRAM=ltmain.sh
    1.48 +PACKAGE=libtool
    1.49 +VERSION="1.5.24 Debian 1.5.24-1ubuntu1"
    1.50 +TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)"
    1.51 +
    1.52 +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
    1.53 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
    1.54 +  emulate sh
    1.55 +  NULLCMD=:
    1.56 +  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
    1.57 +  # is contrary to our usage.  Disable this feature.
    1.58 +  alias -g '${1+"$@"}'='"$@"'
    1.59 +  setopt NO_GLOB_SUBST
    1.60 +else
    1.61 +  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
    1.62 +fi
    1.63 +BIN_SH=xpg4; export BIN_SH # for Tru64
    1.64 +DUALCASE=1; export DUALCASE # for MKS sh
    1.65 +
    1.66 +# Check that we have a working $echo.
    1.67 +if test "X$1" = X--no-reexec; then
    1.68 +  # Discard the --no-reexec flag, and continue.
    1.69 +  shift
    1.70 +elif test "X$1" = X--fallback-echo; then
    1.71 +  # Avoid inline document here, it may be left over
    1.72 +  :
    1.73 +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
    1.74 +  # Yippee, $echo works!
    1.75 +  :
    1.76 +else
    1.77 +  # Restart under the correct shell, and then maybe $echo will work.
    1.78 +  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
    1.79 +fi
    1.80 +
    1.81 +if test "X$1" = X--fallback-echo; then
    1.82 +  # used as fallback echo
    1.83 +  shift
    1.84 +  cat <<EOF
    1.85 +$*
    1.86 +EOF
    1.87 +  exit $EXIT_SUCCESS
    1.88 +fi
    1.89 +
    1.90 +default_mode=
    1.91 +help="Try \`$progname --help' for more information."
    1.92 +magic="%%%MAGIC variable%%%"
    1.93 +mkdir="mkdir"
    1.94 +mv="mv -f"
    1.95 +rm="rm -f"
    1.96 +
    1.97 +# Sed substitution that helps us do robust quoting.  It backslashifies
    1.98 +# metacharacters that are still active within double-quoted strings.
    1.99 +Xsed="${SED}"' -e 1s/^X//'
   1.100 +sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
   1.101 +# test EBCDIC or ASCII
   1.102 +case `echo X|tr X '\101'` in
   1.103 + A) # ASCII based system
   1.104 +    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
   1.105 +  SP2NL='tr \040 \012'
   1.106 +  NL2SP='tr \015\012 \040\040'
   1.107 +  ;;
   1.108 + *) # EBCDIC based system
   1.109 +  SP2NL='tr \100 \n'
   1.110 +  NL2SP='tr \r\n \100\100'
   1.111 +  ;;
   1.112 +esac
   1.113 +
   1.114 +# NLS nuisances.
   1.115 +# Only set LANG and LC_ALL to C if already set.
   1.116 +# These must not be set unconditionally because not all systems understand
   1.117 +# e.g. LANG=C (notably SCO).
   1.118 +# We save the old values to restore during execute mode.
   1.119 +for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
   1.120 +do
   1.121 +  eval "if test \"\${$lt_var+set}\" = set; then
   1.122 +	  save_$lt_var=\$$lt_var
   1.123 +	  $lt_var=C
   1.124 +	  export $lt_var
   1.125 +	fi"
   1.126 +done
   1.127 +
   1.128 +# Make sure IFS has a sensible default
   1.129 +lt_nl='
   1.130 +'
   1.131 +IFS=" 	$lt_nl"
   1.132 +
   1.133 +if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
   1.134 +  $echo "$modename: not configured to build any kind of library" 1>&2
   1.135 +  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
   1.136 +  exit $EXIT_FAILURE
   1.137 +fi
   1.138 +
   1.139 +# Global variables.
   1.140 +mode=$default_mode
   1.141 +nonopt=
   1.142 +prev=
   1.143 +prevopt=
   1.144 +run=
   1.145 +show="$echo"
   1.146 +show_help=
   1.147 +execute_dlfiles=
   1.148 +duplicate_deps=no
   1.149 +preserve_args=
   1.150 +lo2o="s/\\.lo\$/.${objext}/"
   1.151 +o2lo="s/\\.${objext}\$/.lo/"
   1.152 +extracted_archives=
   1.153 +extracted_serial=0
   1.154 +
   1.155 +#####################################
   1.156 +# Shell function definitions:
   1.157 +# This seems to be the best place for them
   1.158 +
   1.159 +# func_mktempdir [string]
   1.160 +# Make a temporary directory that won't clash with other running
   1.161 +# libtool processes, and avoids race conditions if possible.  If
   1.162 +# given, STRING is the basename for that directory.
   1.163 +func_mktempdir ()
   1.164 +{
   1.165 +    my_template="${TMPDIR-/tmp}/${1-$progname}"
   1.166 +
   1.167 +    if test "$run" = ":"; then
   1.168 +      # Return a directory name, but don't create it in dry-run mode
   1.169 +      my_tmpdir="${my_template}-$$"
   1.170 +    else
   1.171 +
   1.172 +      # If mktemp works, use that first and foremost
   1.173 +      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
   1.174 +
   1.175 +      if test ! -d "$my_tmpdir"; then
   1.176 +	# Failing that, at least try and use $RANDOM to avoid a race
   1.177 +	my_tmpdir="${my_template}-${RANDOM-0}$$"
   1.178 +
   1.179 +	save_mktempdir_umask=`umask`
   1.180 +	umask 0077
   1.181 +	$mkdir "$my_tmpdir"
   1.182 +	umask $save_mktempdir_umask
   1.183 +      fi
   1.184 +
   1.185 +      # If we're not in dry-run mode, bomb out on failure
   1.186 +      test -d "$my_tmpdir" || {
   1.187 +        $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
   1.188 +	exit $EXIT_FAILURE
   1.189 +      }
   1.190 +    fi
   1.191 +
   1.192 +    $echo "X$my_tmpdir" | $Xsed
   1.193 +}
   1.194 +
   1.195 +
   1.196 +# func_win32_libid arg
   1.197 +# return the library type of file 'arg'
   1.198 +#
   1.199 +# Need a lot of goo to handle *both* DLLs and import libs
   1.200 +# Has to be a shell function in order to 'eat' the argument
   1.201 +# that is supplied when $file_magic_command is called.
   1.202 +func_win32_libid ()
   1.203 +{
   1.204 +  win32_libid_type="unknown"
   1.205 +  win32_fileres=`file -L $1 2>/dev/null`
   1.206 +  case $win32_fileres in
   1.207 +  *ar\ archive\ import\ library*) # definitely import
   1.208 +    win32_libid_type="x86 archive import"
   1.209 +    ;;
   1.210 +  *ar\ archive*) # could be an import, or static
   1.211 +    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
   1.212 +      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
   1.213 +      win32_nmres=`eval $NM -f posix -A $1 | \
   1.214 +	$SED -n -e '1,100{
   1.215 +		/ I /{
   1.216 +			s,.*,import,
   1.217 +			p
   1.218 +			q
   1.219 +			}
   1.220 +		}'`
   1.221 +      case $win32_nmres in
   1.222 +      import*)  win32_libid_type="x86 archive import";;
   1.223 +      *)        win32_libid_type="x86 archive static";;
   1.224 +      esac
   1.225 +    fi
   1.226 +    ;;
   1.227 +  *DLL*)
   1.228 +    win32_libid_type="x86 DLL"
   1.229 +    ;;
   1.230 +  *executable*) # but shell scripts are "executable" too...
   1.231 +    case $win32_fileres in
   1.232 +    *MS\ Windows\ PE\ Intel*)
   1.233 +      win32_libid_type="x86 DLL"
   1.234 +      ;;
   1.235 +    esac
   1.236 +    ;;
   1.237 +  esac
   1.238 +  $echo $win32_libid_type
   1.239 +}
   1.240 +
   1.241 +
   1.242 +# func_infer_tag arg
   1.243 +# Infer tagged configuration to use if any are available and
   1.244 +# if one wasn't chosen via the "--tag" command line option.
   1.245 +# Only attempt this if the compiler in the base compile
   1.246 +# command doesn't match the default compiler.
   1.247 +# arg is usually of the form 'gcc ...'
   1.248 +func_infer_tag ()
   1.249 +{
   1.250 +    if test -n "$available_tags" && test -z "$tagname"; then
   1.251 +      CC_quoted=
   1.252 +      for arg in $CC; do
   1.253 +	case $arg in
   1.254 +	  *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
   1.255 +	  arg="\"$arg\""
   1.256 +	  ;;
   1.257 +	esac
   1.258 +	CC_quoted="$CC_quoted $arg"
   1.259 +      done
   1.260 +      case $@ in
   1.261 +      # Blanks in the command may have been stripped by the calling shell,
   1.262 +      # but not from the CC environment variable when configure was run.
   1.263 +      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
   1.264 +      # Blanks at the start of $base_compile will cause this to fail
   1.265 +      # if we don't check for them as well.
   1.266 +      *)
   1.267 +	for z in $available_tags; do
   1.268 +	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
   1.269 +	    # Evaluate the configuration.
   1.270 +	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
   1.271 +	    CC_quoted=
   1.272 +	    for arg in $CC; do
   1.273 +	    # Double-quote args containing other shell metacharacters.
   1.274 +	    case $arg in
   1.275 +	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
   1.276 +	      arg="\"$arg\""
   1.277 +	      ;;
   1.278 +	    esac
   1.279 +	    CC_quoted="$CC_quoted $arg"
   1.280 +	  done
   1.281 +	    case "$@ " in
   1.282 +	      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
   1.283 +	      # The compiler in the base compile command matches
   1.284 +	      # the one in the tagged configuration.
   1.285 +	      # Assume this is the tagged configuration we want.
   1.286 +	      tagname=$z
   1.287 +	      break
   1.288 +	      ;;
   1.289 +	    esac
   1.290 +	  fi
   1.291 +	done
   1.292 +	# If $tagname still isn't set, then no tagged configuration
   1.293 +	# was found and let the user know that the "--tag" command
   1.294 +	# line option must be used.
   1.295 +	if test -z "$tagname"; then
   1.296 +	  $echo "$modename: unable to infer tagged configuration"
   1.297 +	  $echo "$modename: specify a tag with \`--tag'" 1>&2
   1.298 +	  exit $EXIT_FAILURE
   1.299 +#        else
   1.300 +#          $echo "$modename: using $tagname tagged configuration"
   1.301 +	fi
   1.302 +	;;
   1.303 +      esac
   1.304 +    fi
   1.305 +}
   1.306 +
   1.307 +
   1.308 +# func_extract_an_archive dir oldlib
   1.309 +func_extract_an_archive ()
   1.310 +{
   1.311 +    f_ex_an_ar_dir="$1"; shift
   1.312 +    f_ex_an_ar_oldlib="$1"
   1.313 +
   1.314 +    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
   1.315 +    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
   1.316 +    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
   1.317 +     :
   1.318 +    else
   1.319 +      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
   1.320 +      exit $EXIT_FAILURE
   1.321 +    fi
   1.322 +}
   1.323 +
   1.324 +# func_extract_archives gentop oldlib ...
   1.325 +func_extract_archives ()
   1.326 +{
   1.327 +    my_gentop="$1"; shift
   1.328 +    my_oldlibs=${1+"$@"}
   1.329 +    my_oldobjs=""
   1.330 +    my_xlib=""
   1.331 +    my_xabs=""
   1.332 +    my_xdir=""
   1.333 +    my_status=""
   1.334 +
   1.335 +    $show "${rm}r $my_gentop"
   1.336 +    $run ${rm}r "$my_gentop"
   1.337 +    $show "$mkdir $my_gentop"
   1.338 +    $run $mkdir "$my_gentop"
   1.339 +    my_status=$?
   1.340 +    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
   1.341 +      exit $my_status
   1.342 +    fi
   1.343 +
   1.344 +    for my_xlib in $my_oldlibs; do
   1.345 +      # Extract the objects.
   1.346 +      case $my_xlib in
   1.347 +	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
   1.348 +	*) my_xabs=`pwd`"/$my_xlib" ;;
   1.349 +      esac
   1.350 +      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
   1.351 +      my_xlib_u=$my_xlib
   1.352 +      while :; do
   1.353 +        case " $extracted_archives " in
   1.354 +	*" $my_xlib_u "*)
   1.355 +	  extracted_serial=`expr $extracted_serial + 1`
   1.356 +	  my_xlib_u=lt$extracted_serial-$my_xlib ;;
   1.357 +	*) break ;;
   1.358 +	esac
   1.359 +      done
   1.360 +      extracted_archives="$extracted_archives $my_xlib_u"
   1.361 +      my_xdir="$my_gentop/$my_xlib_u"
   1.362 +
   1.363 +      $show "${rm}r $my_xdir"
   1.364 +      $run ${rm}r "$my_xdir"
   1.365 +      $show "$mkdir $my_xdir"
   1.366 +      $run $mkdir "$my_xdir"
   1.367 +      exit_status=$?
   1.368 +      if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
   1.369 +	exit $exit_status
   1.370 +      fi
   1.371 +      case $host in
   1.372 +      *-darwin*)
   1.373 +	$show "Extracting $my_xabs"
   1.374 +	# Do not bother doing anything if just a dry run
   1.375 +	if test -z "$run"; then
   1.376 +	  darwin_orig_dir=`pwd`
   1.377 +	  cd $my_xdir || exit $?
   1.378 +	  darwin_archive=$my_xabs
   1.379 +	  darwin_curdir=`pwd`
   1.380 +	  darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
   1.381 +	  darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
   1.382 +	  if test -n "$darwin_arches"; then 
   1.383 +	    darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
   1.384 +	    darwin_arch=
   1.385 +	    $show "$darwin_base_archive has multiple architectures $darwin_arches"
   1.386 +	    for darwin_arch in  $darwin_arches ; do
   1.387 +	      mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
   1.388 +	      lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
   1.389 +	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
   1.390 +	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
   1.391 +	      cd "$darwin_curdir"
   1.392 +	      $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
   1.393 +	    done # $darwin_arches
   1.394 +      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
   1.395 +	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
   1.396 +	    darwin_file=
   1.397 +	    darwin_files=
   1.398 +	    for darwin_file in $darwin_filelist; do
   1.399 +	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
   1.400 +	      lipo -create -output "$darwin_file" $darwin_files
   1.401 +	    done # $darwin_filelist
   1.402 +	    ${rm}r unfat-$$
   1.403 +	    cd "$darwin_orig_dir"
   1.404 +	  else
   1.405 +	    cd "$darwin_orig_dir"
   1.406 + 	    func_extract_an_archive "$my_xdir" "$my_xabs"
   1.407 +	  fi # $darwin_arches
   1.408 +	fi # $run
   1.409 +	;;
   1.410 +      *)
   1.411 +        func_extract_an_archive "$my_xdir" "$my_xabs"
   1.412 +        ;;
   1.413 +      esac
   1.414 +      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
   1.415 +    done
   1.416 +    func_extract_archives_result="$my_oldobjs"
   1.417 +}
   1.418 +# End of Shell function definitions
   1.419 +#####################################
   1.420 +
   1.421 +# Darwin sucks
   1.422 +eval std_shrext=\"$shrext_cmds\"
   1.423 +
   1.424 +disable_libs=no
   1.425 +
   1.426 +# Parse our command line options once, thoroughly.
   1.427 +while test "$#" -gt 0
   1.428 +do
   1.429 +  arg="$1"
   1.430 +  shift
   1.431 +
   1.432 +  case $arg in
   1.433 +  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
   1.434 +  *) optarg= ;;
   1.435 +  esac
   1.436 +
   1.437 +  # If the previous option needs an argument, assign it.
   1.438 +  if test -n "$prev"; then
   1.439 +    case $prev in
   1.440 +    execute_dlfiles)
   1.441 +      execute_dlfiles="$execute_dlfiles $arg"
   1.442 +      ;;
   1.443 +    tag)
   1.444 +      tagname="$arg"
   1.445 +      preserve_args="${preserve_args}=$arg"
   1.446 +
   1.447 +      # Check whether tagname contains only valid characters
   1.448 +      case $tagname in
   1.449 +      *[!-_A-Za-z0-9,/]*)
   1.450 +	$echo "$progname: invalid tag name: $tagname" 1>&2
   1.451 +	exit $EXIT_FAILURE
   1.452 +	;;
   1.453 +      esac
   1.454 +
   1.455 +      case $tagname in
   1.456 +      CC)
   1.457 +	# Don't test for the "default" C tag, as we know, it's there, but
   1.458 +	# not specially marked.
   1.459 +	;;
   1.460 +      *)
   1.461 +	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
   1.462 +	  taglist="$taglist $tagname"
   1.463 +	  # Evaluate the configuration.
   1.464 +	  eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
   1.465 +	else
   1.466 +	  $echo "$progname: ignoring unknown tag $tagname" 1>&2
   1.467 +	fi
   1.468 +	;;
   1.469 +      esac
   1.470 +      ;;
   1.471 +    *)
   1.472 +      eval "$prev=\$arg"
   1.473 +      ;;
   1.474 +    esac
   1.475 +
   1.476 +    prev=
   1.477 +    prevopt=
   1.478 +    continue
   1.479 +  fi
   1.480 +
   1.481 +  # Have we seen a non-optional argument yet?
   1.482 +  case $arg in
   1.483 +  --help)
   1.484 +    show_help=yes
   1.485 +    ;;
   1.486 +
   1.487 +  --version)
   1.488 +    echo "\
   1.489 +$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
   1.490 +
   1.491 +Copyright (C) 2007  Free Software Foundation, Inc.
   1.492 +This is free software; see the source for copying conditions.  There is NO
   1.493 +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
   1.494 +    exit $?
   1.495 +    ;;
   1.496 +
   1.497 +  --config)
   1.498 +    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
   1.499 +    # Now print the configurations for the tags.
   1.500 +    for tagname in $taglist; do
   1.501 +      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
   1.502 +    done
   1.503 +    exit $?
   1.504 +    ;;
   1.505 +
   1.506 +  --debug)
   1.507 +    $echo "$progname: enabling shell trace mode"
   1.508 +    set -x
   1.509 +    preserve_args="$preserve_args $arg"
   1.510 +    ;;
   1.511 +
   1.512 +  --dry-run | -n)
   1.513 +    run=:
   1.514 +    ;;
   1.515 +
   1.516 +  --features)
   1.517 +    $echo "host: $host"
   1.518 +    if test "$build_libtool_libs" = yes; then
   1.519 +      $echo "enable shared libraries"
   1.520 +    else
   1.521 +      $echo "disable shared libraries"
   1.522 +    fi
   1.523 +    if test "$build_old_libs" = yes; then
   1.524 +      $echo "enable static libraries"
   1.525 +    else
   1.526 +      $echo "disable static libraries"
   1.527 +    fi
   1.528 +    exit $?
   1.529 +    ;;
   1.530 +
   1.531 +  --finish) mode="finish" ;;
   1.532 +
   1.533 +  --mode) prevopt="--mode" prev=mode ;;
   1.534 +  --mode=*) mode="$optarg" ;;
   1.535 +
   1.536 +  --preserve-dup-deps) duplicate_deps="yes" ;;
   1.537 +
   1.538 +  --quiet | --silent)
   1.539 +    show=:
   1.540 +    preserve_args="$preserve_args $arg"
   1.541 +    ;;
   1.542 +
   1.543 +  --tag)
   1.544 +    prevopt="--tag"
   1.545 +    prev=tag
   1.546 +    preserve_args="$preserve_args --tag"
   1.547 +    ;;
   1.548 +  --tag=*)
   1.549 +    set tag "$optarg" ${1+"$@"}
   1.550 +    shift
   1.551 +    prev=tag
   1.552 +    preserve_args="$preserve_args --tag"
   1.553 +    ;;
   1.554 +
   1.555 +  -dlopen)
   1.556 +    prevopt="-dlopen"
   1.557 +    prev=execute_dlfiles
   1.558 +    ;;
   1.559 +
   1.560 +  -*)
   1.561 +    $echo "$modename: unrecognized option \`$arg'" 1>&2
   1.562 +    $echo "$help" 1>&2
   1.563 +    exit $EXIT_FAILURE
   1.564 +    ;;
   1.565 +
   1.566 +  *)
   1.567 +    nonopt="$arg"
   1.568 +    break
   1.569 +    ;;
   1.570 +  esac
   1.571 +done
   1.572 +
   1.573 +if test -n "$prevopt"; then
   1.574 +  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
   1.575 +  $echo "$help" 1>&2
   1.576 +  exit $EXIT_FAILURE
   1.577 +fi
   1.578 +
   1.579 +case $disable_libs in
   1.580 +no) 
   1.581 +  ;;
   1.582 +shared)
   1.583 +  build_libtool_libs=no
   1.584 +  build_old_libs=yes
   1.585 +  ;;
   1.586 +static)
   1.587 +  build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
   1.588 +  ;;
   1.589 +esac
   1.590 +
   1.591 +# If this variable is set in any of the actions, the command in it
   1.592 +# will be execed at the end.  This prevents here-documents from being
   1.593 +# left over by shells.
   1.594 +exec_cmd=
   1.595 +
   1.596 +if test -z "$show_help"; then
   1.597 +
   1.598 +  # Infer the operation mode.
   1.599 +  if test -z "$mode"; then
   1.600 +    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
   1.601 +    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
   1.602 +    case $nonopt in
   1.603 +    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
   1.604 +      mode=link
   1.605 +      for arg
   1.606 +      do
   1.607 +	case $arg in
   1.608 +	-c)
   1.609 +	   mode=compile
   1.610 +	   break
   1.611 +	   ;;
   1.612 +	esac
   1.613 +      done
   1.614 +      ;;
   1.615 +    *db | *dbx | *strace | *truss)
   1.616 +      mode=execute
   1.617 +      ;;
   1.618 +    *install*|cp|mv)
   1.619 +      mode=install
   1.620 +      ;;
   1.621 +    *rm)
   1.622 +      mode=uninstall
   1.623 +      ;;
   1.624 +    *)
   1.625 +      # If we have no mode, but dlfiles were specified, then do execute mode.
   1.626 +      test -n "$execute_dlfiles" && mode=execute
   1.627 +
   1.628 +      # Just use the default operation mode.
   1.629 +      if test -z "$mode"; then
   1.630 +	if test -n "$nonopt"; then
   1.631 +	  $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
   1.632 +	else
   1.633 +	  $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
   1.634 +	fi
   1.635 +      fi
   1.636 +      ;;
   1.637 +    esac
   1.638 +  fi
   1.639 +
   1.640 +  # Only execute mode is allowed to have -dlopen flags.
   1.641 +  if test -n "$execute_dlfiles" && test "$mode" != execute; then
   1.642 +    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
   1.643 +    $echo "$help" 1>&2
   1.644 +    exit $EXIT_FAILURE
   1.645 +  fi
   1.646 +
   1.647 +  # Change the help message to a mode-specific one.
   1.648 +  generic_help="$help"
   1.649 +  help="Try \`$modename --help --mode=$mode' for more information."
   1.650 +
   1.651 +  # These modes are in order of execution frequency so that they run quickly.
   1.652 +  case $mode in
   1.653 +  # libtool compile mode
   1.654 +  compile)
   1.655 +    modename="$modename: compile"
   1.656 +    # Get the compilation command and the source file.
   1.657 +    base_compile=
   1.658 +    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
   1.659 +    suppress_opt=yes
   1.660 +    suppress_output=
   1.661 +    arg_mode=normal
   1.662 +    libobj=
   1.663 +    later=
   1.664 +
   1.665 +    for arg
   1.666 +    do
   1.667 +      case $arg_mode in
   1.668 +      arg  )
   1.669 +	# do not "continue".  Instead, add this to base_compile
   1.670 +	lastarg="$arg"
   1.671 +	arg_mode=normal
   1.672 +	;;
   1.673 +
   1.674 +      target )
   1.675 +	libobj="$arg"
   1.676 +	arg_mode=normal
   1.677 +	continue
   1.678 +	;;
   1.679 +
   1.680 +      normal )
   1.681 +	# Accept any command-line options.
   1.682 +	case $arg in
   1.683 +	-o)
   1.684 +	  if test -n "$libobj" ; then
   1.685 +	    $echo "$modename: you cannot specify \`-o' more than once" 1>&2
   1.686 +	    exit $EXIT_FAILURE
   1.687 +	  fi
   1.688 +	  arg_mode=target
   1.689 +	  continue
   1.690 +	  ;;
   1.691 +
   1.692 +	-static | -prefer-pic | -prefer-non-pic)
   1.693 +	  later="$later $arg"
   1.694 +	  continue
   1.695 +	  ;;
   1.696 +
   1.697 +	-no-suppress)
   1.698 +	  suppress_opt=no
   1.699 +	  continue
   1.700 +	  ;;
   1.701 +
   1.702 +	-Xcompiler)
   1.703 +	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
   1.704 +	  continue      #  The current "srcfile" will either be retained or
   1.705 +	  ;;            #  replaced later.  I would guess that would be a bug.
   1.706 +
   1.707 +	-Wc,*)
   1.708 +	  args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
   1.709 +	  lastarg=
   1.710 +	  save_ifs="$IFS"; IFS=','
   1.711 + 	  for arg in $args; do
   1.712 +	    IFS="$save_ifs"
   1.713 +
   1.714 +	    # Double-quote args containing other shell metacharacters.
   1.715 +	    # Many Bourne shells cannot handle close brackets correctly
   1.716 +	    # in scan sets, so we specify it separately.
   1.717 +	    case $arg in
   1.718 +	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
   1.719 +	      arg="\"$arg\""
   1.720 +	      ;;
   1.721 +	    esac
   1.722 +	    lastarg="$lastarg $arg"
   1.723 +	  done
   1.724 +	  IFS="$save_ifs"
   1.725 +	  lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
   1.726 +
   1.727 +	  # Add the arguments to base_compile.
   1.728 +	  base_compile="$base_compile $lastarg"
   1.729 +	  continue
   1.730 +	  ;;
   1.731 +
   1.732 +	* )
   1.733 +	  # Accept the current argument as the source file.
   1.734 +	  # The previous "srcfile" becomes the current argument.
   1.735 +	  #
   1.736 +	  lastarg="$srcfile"
   1.737 +	  srcfile="$arg"
   1.738 +	  ;;
   1.739 +	esac  #  case $arg
   1.740 +	;;
   1.741 +      esac    #  case $arg_mode
   1.742 +
   1.743 +      # Aesthetically quote the previous argument.
   1.744 +      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
   1.745 +
   1.746 +      case $lastarg in
   1.747 +      # Double-quote args containing other shell metacharacters.
   1.748 +      # Many Bourne shells cannot handle close brackets correctly
   1.749 +      # in scan sets, and some SunOS ksh mistreat backslash-escaping
   1.750 +      # in scan sets (worked around with variable expansion),
   1.751 +      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
   1.752 +      # at all, so we specify them separately.
   1.753 +      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
   1.754 +	lastarg="\"$lastarg\""
   1.755 +	;;
   1.756 +      esac
   1.757 +
   1.758 +      base_compile="$base_compile $lastarg"
   1.759 +    done # for arg
   1.760 +
   1.761 +    case $arg_mode in
   1.762 +    arg)
   1.763 +      $echo "$modename: you must specify an argument for -Xcompile"
   1.764 +      exit $EXIT_FAILURE
   1.765 +      ;;
   1.766 +    target)
   1.767 +      $echo "$modename: you must specify a target with \`-o'" 1>&2
   1.768 +      exit $EXIT_FAILURE
   1.769 +      ;;
   1.770 +    *)
   1.771 +      # Get the name of the library object.
   1.772 +      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
   1.773 +      ;;
   1.774 +    esac
   1.775 +
   1.776 +    # Recognize several different file suffixes.
   1.777 +    # If the user specifies -o file.o, it is replaced with file.lo
   1.778 +    xform='[cCFSifmso]'
   1.779 +    case $libobj in
   1.780 +    *.ada) xform=ada ;;
   1.781 +    *.adb) xform=adb ;;
   1.782 +    *.ads) xform=ads ;;
   1.783 +    *.asm) xform=asm ;;
   1.784 +    *.c++) xform=c++ ;;
   1.785 +    *.cc) xform=cc ;;
   1.786 +    *.ii) xform=ii ;;
   1.787 +    *.class) xform=class ;;
   1.788 +    *.cpp) xform=cpp ;;
   1.789 +    *.cxx) xform=cxx ;;
   1.790 +    *.[fF][09]?) xform=[fF][09]. ;;
   1.791 +    *.for) xform=for ;;
   1.792 +    *.java) xform=java ;;
   1.793 +    *.obj) xform=obj ;;
   1.794 +    esac
   1.795 +
   1.796 +    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
   1.797 +
   1.798 +    case $libobj in
   1.799 +    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
   1.800 +    *)
   1.801 +      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
   1.802 +      exit $EXIT_FAILURE
   1.803 +      ;;
   1.804 +    esac
   1.805 +
   1.806 +    func_infer_tag $base_compile
   1.807 +
   1.808 +    for arg in $later; do
   1.809 +      case $arg in
   1.810 +      -static)
   1.811 +	build_old_libs=yes
   1.812 +	continue
   1.813 +	;;
   1.814 +
   1.815 +      -prefer-pic)
   1.816 +	pic_mode=yes
   1.817 +	continue
   1.818 +	;;
   1.819 +
   1.820 +      -prefer-non-pic)
   1.821 +	pic_mode=no
   1.822 +	continue
   1.823 +	;;
   1.824 +      esac
   1.825 +    done
   1.826 +
   1.827 +    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
   1.828 +    case $qlibobj in
   1.829 +      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
   1.830 +	qlibobj="\"$qlibobj\"" ;;
   1.831 +    esac
   1.832 +    test "X$libobj" != "X$qlibobj" \
   1.833 +	&& $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' 	&()|`$[]' \
   1.834 +	&& $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
   1.835 +    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
   1.836 +    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
   1.837 +    if test "X$xdir" = "X$obj"; then
   1.838 +      xdir=
   1.839 +    else
   1.840 +      xdir=$xdir/
   1.841 +    fi
   1.842 +    lobj=${xdir}$objdir/$objname
   1.843 +
   1.844 +    if test -z "$base_compile"; then
   1.845 +      $echo "$modename: you must specify a compilation command" 1>&2
   1.846 +      $echo "$help" 1>&2
   1.847 +      exit $EXIT_FAILURE
   1.848 +    fi
   1.849 +
   1.850 +    # Delete any leftover library objects.
   1.851 +    if test "$build_old_libs" = yes; then
   1.852 +      removelist="$obj $lobj $libobj ${libobj}T"
   1.853 +    else
   1.854 +      removelist="$lobj $libobj ${libobj}T"
   1.855 +    fi
   1.856 +
   1.857 +    $run $rm $removelist
   1.858 +    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
   1.859 +
   1.860 +    # On Cygwin there's no "real" PIC flag so we must build both object types
   1.861 +    case $host_os in
   1.862 +    cygwin* | mingw* | pw32* | os2*)
   1.863 +      pic_mode=default
   1.864 +      ;;
   1.865 +    esac
   1.866 +    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
   1.867 +      # non-PIC code in shared libraries is not supported
   1.868 +      pic_mode=default
   1.869 +    fi
   1.870 +
   1.871 +    # Calculate the filename of the output object if compiler does
   1.872 +    # not support -o with -c
   1.873 +    if test "$compiler_c_o" = no; then
   1.874 +      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
   1.875 +      lockfile="$output_obj.lock"
   1.876 +      removelist="$removelist $output_obj $lockfile"
   1.877 +      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
   1.878 +    else
   1.879 +      output_obj=
   1.880 +      need_locks=no
   1.881 +      lockfile=
   1.882 +    fi
   1.883 +
   1.884 +    # Lock this critical section if it is needed
   1.885 +    # We use this script file to make the link, it avoids creating a new file
   1.886 +    if test "$need_locks" = yes; then
   1.887 +      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
   1.888 +	$show "Waiting for $lockfile to be removed"
   1.889 +	sleep 2
   1.890 +      done
   1.891 +    elif test "$need_locks" = warn; then
   1.892 +      if test -f "$lockfile"; then
   1.893 +	$echo "\
   1.894 +*** ERROR, $lockfile exists and contains:
   1.895 +`cat $lockfile 2>/dev/null`
   1.896 +
   1.897 +This indicates that another process is trying to use the same
   1.898 +temporary object file, and libtool could not work around it because
   1.899 +your compiler does not support \`-c' and \`-o' together.  If you
   1.900 +repeat this compilation, it may succeed, by chance, but you had better
   1.901 +avoid parallel builds (make -j) in this platform, or get a better
   1.902 +compiler."
   1.903 +
   1.904 +	$run $rm $removelist
   1.905 +	exit $EXIT_FAILURE
   1.906 +      fi
   1.907 +      $echo "$srcfile" > "$lockfile"
   1.908 +    fi
   1.909 +
   1.910 +    if test -n "$fix_srcfile_path"; then
   1.911 +      eval srcfile=\"$fix_srcfile_path\"
   1.912 +    fi
   1.913 +    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
   1.914 +    case $qsrcfile in
   1.915 +      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
   1.916 +      qsrcfile="\"$qsrcfile\"" ;;
   1.917 +    esac
   1.918 +
   1.919 +    $run $rm "$libobj" "${libobj}T"
   1.920 +
   1.921 +    # Create a libtool object file (analogous to a ".la" file),
   1.922 +    # but don't create it if we're doing a dry run.
   1.923 +    test -z "$run" && cat > ${libobj}T <<EOF
   1.924 +# $libobj - a libtool object file
   1.925 +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
   1.926 +#
   1.927 +# Please DO NOT delete this file!
   1.928 +# It is necessary for linking the library.
   1.929 +
   1.930 +# Name of the PIC object.
   1.931 +EOF
   1.932 +
   1.933 +    # Only build a PIC object if we are building libtool libraries.
   1.934 +    if test "$build_libtool_libs" = yes; then
   1.935 +      # Without this assignment, base_compile gets emptied.
   1.936 +      fbsd_hideous_sh_bug=$base_compile
   1.937 +
   1.938 +      if test "$pic_mode" != no; then
   1.939 +	command="$base_compile $qsrcfile $pic_flag"
   1.940 +      else
   1.941 +	# Don't build PIC code
   1.942 +	command="$base_compile $qsrcfile"
   1.943 +      fi
   1.944 +
   1.945 +      if test ! -d "${xdir}$objdir"; then
   1.946 +	$show "$mkdir ${xdir}$objdir"
   1.947 +	$run $mkdir ${xdir}$objdir
   1.948 +	exit_status=$?
   1.949 +	if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
   1.950 +	  exit $exit_status
   1.951 +	fi
   1.952 +      fi
   1.953 +
   1.954 +      if test -z "$output_obj"; then
   1.955 +	# Place PIC objects in $objdir
   1.956 +	command="$command -o $lobj"
   1.957 +      fi
   1.958 +
   1.959 +      $run $rm "$lobj" "$output_obj"
   1.960 +
   1.961 +      $show "$command"
   1.962 +      if $run eval "$command"; then :
   1.963 +      else
   1.964 +	test -n "$output_obj" && $run $rm $removelist
   1.965 +	exit $EXIT_FAILURE
   1.966 +      fi
   1.967 +
   1.968 +      if test "$need_locks" = warn &&
   1.969 +	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
   1.970 +	$echo "\
   1.971 +*** ERROR, $lockfile contains:
   1.972 +`cat $lockfile 2>/dev/null`
   1.973 +
   1.974 +but it should contain:
   1.975 +$srcfile
   1.976 +
   1.977 +This indicates that another process is trying to use the same
   1.978 +temporary object file, and libtool could not work around it because
   1.979 +your compiler does not support \`-c' and \`-o' together.  If you
   1.980 +repeat this compilation, it may succeed, by chance, but you had better
   1.981 +avoid parallel builds (make -j) in this platform, or get a better
   1.982 +compiler."
   1.983 +
   1.984 +	$run $rm $removelist
   1.985 +	exit $EXIT_FAILURE
   1.986 +      fi
   1.987 +
   1.988 +      # Just move the object if needed, then go on to compile the next one
   1.989 +      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
   1.990 +	$show "$mv $output_obj $lobj"
   1.991 +	if $run $mv $output_obj $lobj; then :
   1.992 +	else
   1.993 +	  error=$?
   1.994 +	  $run $rm $removelist
   1.995 +	  exit $error
   1.996 +	fi
   1.997 +      fi
   1.998 +
   1.999 +      # Append the name of the PIC object to the libtool object file.
  1.1000 +      test -z "$run" && cat >> ${libobj}T <<EOF
  1.1001 +pic_object='$objdir/$objname'
  1.1002 +
  1.1003 +EOF
  1.1004 +
  1.1005 +      # Allow error messages only from the first compilation.
  1.1006 +      if test "$suppress_opt" = yes; then
  1.1007 +        suppress_output=' >/dev/null 2>&1'
  1.1008 +      fi
  1.1009 +    else
  1.1010 +      # No PIC object so indicate it doesn't exist in the libtool
  1.1011 +      # object file.
  1.1012 +      test -z "$run" && cat >> ${libobj}T <<EOF
  1.1013 +pic_object=none
  1.1014 +
  1.1015 +EOF
  1.1016 +    fi
  1.1017 +
  1.1018 +    # Only build a position-dependent object if we build old libraries.
  1.1019 +    if test "$build_old_libs" = yes; then
  1.1020 +      if test "$pic_mode" != yes; then
  1.1021 +	# Don't build PIC code
  1.1022 +	command="$base_compile $qsrcfile"
  1.1023 +      else
  1.1024 +	command="$base_compile $qsrcfile $pic_flag"
  1.1025 +      fi
  1.1026 +      if test "$compiler_c_o" = yes; then
  1.1027 +	command="$command -o $obj"
  1.1028 +      fi
  1.1029 +
  1.1030 +      # Suppress compiler output if we already did a PIC compilation.
  1.1031 +      command="$command$suppress_output"
  1.1032 +      $run $rm "$obj" "$output_obj"
  1.1033 +      $show "$command"
  1.1034 +      if $run eval "$command"; then :
  1.1035 +      else
  1.1036 +	$run $rm $removelist
  1.1037 +	exit $EXIT_FAILURE
  1.1038 +      fi
  1.1039 +
  1.1040 +      if test "$need_locks" = warn &&
  1.1041 +	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
  1.1042 +	$echo "\
  1.1043 +*** ERROR, $lockfile contains:
  1.1044 +`cat $lockfile 2>/dev/null`
  1.1045 +
  1.1046 +but it should contain:
  1.1047 +$srcfile
  1.1048 +
  1.1049 +This indicates that another process is trying to use the same
  1.1050 +temporary object file, and libtool could not work around it because
  1.1051 +your compiler does not support \`-c' and \`-o' together.  If you
  1.1052 +repeat this compilation, it may succeed, by chance, but you had better
  1.1053 +avoid parallel builds (make -j) in this platform, or get a better
  1.1054 +compiler."
  1.1055 +
  1.1056 +	$run $rm $removelist
  1.1057 +	exit $EXIT_FAILURE
  1.1058 +      fi
  1.1059 +
  1.1060 +      # Just move the object if needed
  1.1061 +      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
  1.1062 +	$show "$mv $output_obj $obj"
  1.1063 +	if $run $mv $output_obj $obj; then :
  1.1064 +	else
  1.1065 +	  error=$?
  1.1066 +	  $run $rm $removelist
  1.1067 +	  exit $error
  1.1068 +	fi
  1.1069 +      fi
  1.1070 +
  1.1071 +      # Append the name of the non-PIC object the libtool object file.
  1.1072 +      # Only append if the libtool object file exists.
  1.1073 +      test -z "$run" && cat >> ${libobj}T <<EOF
  1.1074 +# Name of the non-PIC object.
  1.1075 +non_pic_object='$objname'
  1.1076 +
  1.1077 +EOF
  1.1078 +    else
  1.1079 +      # Append the name of the non-PIC object the libtool object file.
  1.1080 +      # Only append if the libtool object file exists.
  1.1081 +      test -z "$run" && cat >> ${libobj}T <<EOF
  1.1082 +# Name of the non-PIC object.
  1.1083 +non_pic_object=none
  1.1084 +
  1.1085 +EOF
  1.1086 +    fi
  1.1087 +
  1.1088 +    $run $mv "${libobj}T" "${libobj}"
  1.1089 +
  1.1090 +    # Unlock the critical section if it was locked
  1.1091 +    if test "$need_locks" != no; then
  1.1092 +      $run $rm "$lockfile"
  1.1093 +    fi
  1.1094 +
  1.1095 +    exit $EXIT_SUCCESS
  1.1096 +    ;;
  1.1097 +
  1.1098 +  # libtool link mode
  1.1099 +  link | relink)
  1.1100 +    modename="$modename: link"
  1.1101 +    case $host in
  1.1102 +    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
  1.1103 +      # It is impossible to link a dll without this setting, and
  1.1104 +      # we shouldn't force the makefile maintainer to figure out
  1.1105 +      # which system we are compiling for in order to pass an extra
  1.1106 +      # flag for every libtool invocation.
  1.1107 +      # allow_undefined=no
  1.1108 +
  1.1109 +      # FIXME: Unfortunately, there are problems with the above when trying
  1.1110 +      # to make a dll which has undefined symbols, in which case not
  1.1111 +      # even a static library is built.  For now, we need to specify
  1.1112 +      # -no-undefined on the libtool link line when we can be certain
  1.1113 +      # that all symbols are satisfied, otherwise we get a static library.
  1.1114 +      allow_undefined=yes
  1.1115 +      ;;
  1.1116 +    *)
  1.1117 +      allow_undefined=yes
  1.1118 +      ;;
  1.1119 +    esac
  1.1120 +    libtool_args="$nonopt"
  1.1121 +    base_compile="$nonopt $@"
  1.1122 +    compile_command="$nonopt"
  1.1123 +    finalize_command="$nonopt"
  1.1124 +
  1.1125 +    compile_rpath=
  1.1126 +    finalize_rpath=
  1.1127 +    compile_shlibpath=
  1.1128 +    finalize_shlibpath=
  1.1129 +    convenience=
  1.1130 +    old_convenience=
  1.1131 +    deplibs=
  1.1132 +    old_deplibs=
  1.1133 +    compiler_flags=
  1.1134 +    linker_flags=
  1.1135 +    dllsearchpath=
  1.1136 +    lib_search_path=`pwd`
  1.1137 +    inst_prefix_dir=
  1.1138 +
  1.1139 +    avoid_version=no
  1.1140 +    dlfiles=
  1.1141 +    dlprefiles=
  1.1142 +    dlself=no
  1.1143 +    export_dynamic=no
  1.1144 +    export_symbols=
  1.1145 +    export_symbols_regex=
  1.1146 +    generated=
  1.1147 +    libobjs=
  1.1148 +    ltlibs=
  1.1149 +    module=no
  1.1150 +    no_install=no
  1.1151 +    objs=
  1.1152 +    non_pic_objects=
  1.1153 +    notinst_path= # paths that contain not-installed libtool libraries
  1.1154 +    precious_files_regex=
  1.1155 +    prefer_static_libs=no
  1.1156 +    preload=no
  1.1157 +    prev=
  1.1158 +    prevarg=
  1.1159 +    release=
  1.1160 +    rpath=
  1.1161 +    xrpath=
  1.1162 +    perm_rpath=
  1.1163 +    temp_rpath=
  1.1164 +    thread_safe=no
  1.1165 +    vinfo=
  1.1166 +    vinfo_number=no
  1.1167 +
  1.1168 +    func_infer_tag $base_compile
  1.1169 +
  1.1170 +    # We need to know -static, to get the right output filenames.
  1.1171 +    for arg
  1.1172 +    do
  1.1173 +      case $arg in
  1.1174 +      -all-static | -static | -static-libtool-libs)
  1.1175 +	case $arg in
  1.1176 +	-all-static)
  1.1177 +	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
  1.1178 +	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
  1.1179 +	  fi
  1.1180 +	  if test -n "$link_static_flag"; then
  1.1181 +	    dlopen_self=$dlopen_self_static
  1.1182 +	  fi
  1.1183 +	  prefer_static_libs=yes
  1.1184 +	  ;;
  1.1185 +	-static)
  1.1186 +	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
  1.1187 +	    dlopen_self=$dlopen_self_static
  1.1188 +	  fi
  1.1189 +	  prefer_static_libs=built
  1.1190 +	  ;;
  1.1191 +	-static-libtool-libs)
  1.1192 +	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
  1.1193 +	    dlopen_self=$dlopen_self_static
  1.1194 +	  fi
  1.1195 +	  prefer_static_libs=yes
  1.1196 +	  ;;
  1.1197 +	esac
  1.1198 +	build_libtool_libs=no
  1.1199 +	build_old_libs=yes
  1.1200 +	break
  1.1201 +	;;
  1.1202 +      esac
  1.1203 +    done
  1.1204 +
  1.1205 +    # See if our shared archives depend on static archives.
  1.1206 +    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
  1.1207 +
  1.1208 +    # Go through the arguments, transforming them on the way.
  1.1209 +    while test "$#" -gt 0; do
  1.1210 +      arg="$1"
  1.1211 +      shift
  1.1212 +      case $arg in
  1.1213 +      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
  1.1214 +	qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
  1.1215 +	;;
  1.1216 +      *) qarg=$arg ;;
  1.1217 +      esac
  1.1218 +      libtool_args="$libtool_args $qarg"
  1.1219 +
  1.1220 +      # If the previous option needs an argument, assign it.
  1.1221 +      if test -n "$prev"; then
  1.1222 +	case $prev in
  1.1223 +	output)
  1.1224 +	  compile_command="$compile_command @OUTPUT@"
  1.1225 +	  finalize_command="$finalize_command @OUTPUT@"
  1.1226 +	  ;;
  1.1227 +	esac
  1.1228 +
  1.1229 +	case $prev in
  1.1230 +	dlfiles|dlprefiles)
  1.1231 +	  if test "$preload" = no; then
  1.1232 +	    # Add the symbol object into the linking commands.
  1.1233 +	    compile_command="$compile_command @SYMFILE@"
  1.1234 +	    finalize_command="$finalize_command @SYMFILE@"
  1.1235 +	    preload=yes
  1.1236 +	  fi
  1.1237 +	  case $arg in
  1.1238 +	  *.la | *.lo) ;;  # We handle these cases below.
  1.1239 +	  force)
  1.1240 +	    if test "$dlself" = no; then
  1.1241 +	      dlself=needless
  1.1242 +	      export_dynamic=yes
  1.1243 +	    fi
  1.1244 +	    prev=
  1.1245 +	    continue
  1.1246 +	    ;;
  1.1247 +	  self)
  1.1248 +	    if test "$prev" = dlprefiles; then
  1.1249 +	      dlself=yes
  1.1250 +	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
  1.1251 +	      dlself=yes
  1.1252 +	    else
  1.1253 +	      dlself=needless
  1.1254 +	      export_dynamic=yes
  1.1255 +	    fi
  1.1256 +	    prev=
  1.1257 +	    continue
  1.1258 +	    ;;
  1.1259 +	  *)
  1.1260 +	    if test "$prev" = dlfiles; then
  1.1261 +	      dlfiles="$dlfiles $arg"
  1.1262 +	    else
  1.1263 +	      dlprefiles="$dlprefiles $arg"
  1.1264 +	    fi
  1.1265 +	    prev=
  1.1266 +	    continue
  1.1267 +	    ;;
  1.1268 +	  esac
  1.1269 +	  ;;
  1.1270 +	expsyms)
  1.1271 +	  export_symbols="$arg"
  1.1272 +	  if test ! -f "$arg"; then
  1.1273 +	    $echo "$modename: symbol file \`$arg' does not exist"
  1.1274 +	    exit $EXIT_FAILURE
  1.1275 +	  fi
  1.1276 +	  prev=
  1.1277 +	  continue
  1.1278 +	  ;;
  1.1279 +	expsyms_regex)
  1.1280 +	  export_symbols_regex="$arg"
  1.1281 +	  prev=
  1.1282 +	  continue
  1.1283 +	  ;;
  1.1284 +	inst_prefix)
  1.1285 +	  inst_prefix_dir="$arg"
  1.1286 +	  prev=
  1.1287 +	  continue
  1.1288 +	  ;;
  1.1289 +	precious_regex)
  1.1290 +	  precious_files_regex="$arg"
  1.1291 +	  prev=
  1.1292 +	  continue
  1.1293 +	  ;;
  1.1294 +	release)
  1.1295 +	  release="-$arg"
  1.1296 +	  prev=
  1.1297 +	  continue
  1.1298 +	  ;;
  1.1299 +	objectlist)
  1.1300 +	  if test -f "$arg"; then
  1.1301 +	    save_arg=$arg
  1.1302 +	    moreargs=
  1.1303 +	    for fil in `cat $save_arg`
  1.1304 +	    do
  1.1305 +#	      moreargs="$moreargs $fil"
  1.1306 +	      arg=$fil
  1.1307 +	      # A libtool-controlled object.
  1.1308 +
  1.1309 +	      # Check to see that this really is a libtool object.
  1.1310 +	      if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  1.1311 +		pic_object=
  1.1312 +		non_pic_object=
  1.1313 +
  1.1314 +		# Read the .lo file
  1.1315 +		# If there is no directory component, then add one.
  1.1316 +		case $arg in
  1.1317 +		*/* | *\\*) . $arg ;;
  1.1318 +		*) . ./$arg ;;
  1.1319 +		esac
  1.1320 +
  1.1321 +		if test -z "$pic_object" || \
  1.1322 +		   test -z "$non_pic_object" ||
  1.1323 +		   test "$pic_object" = none && \
  1.1324 +		   test "$non_pic_object" = none; then
  1.1325 +		  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
  1.1326 +		  exit $EXIT_FAILURE
  1.1327 +		fi
  1.1328 +
  1.1329 +		# Extract subdirectory from the argument.
  1.1330 +		xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
  1.1331 +		if test "X$xdir" = "X$arg"; then
  1.1332 +		  xdir=
  1.1333 +		else
  1.1334 +		  xdir="$xdir/"
  1.1335 +		fi
  1.1336 +
  1.1337 +		if test "$pic_object" != none; then
  1.1338 +		  # Prepend the subdirectory the object is found in.
  1.1339 +		  pic_object="$xdir$pic_object"
  1.1340 +
  1.1341 +		  if test "$prev" = dlfiles; then
  1.1342 +		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
  1.1343 +		      dlfiles="$dlfiles $pic_object"
  1.1344 +		      prev=
  1.1345 +		      continue
  1.1346 +		    else
  1.1347 +		      # If libtool objects are unsupported, then we need to preload.
  1.1348 +		      prev=dlprefiles
  1.1349 +		    fi
  1.1350 +		  fi
  1.1351 +
  1.1352 +		  # CHECK ME:  I think I busted this.  -Ossama
  1.1353 +		  if test "$prev" = dlprefiles; then
  1.1354 +		    # Preload the old-style object.
  1.1355 +		    dlprefiles="$dlprefiles $pic_object"
  1.1356 +		    prev=
  1.1357 +		  fi
  1.1358 +
  1.1359 +		  # A PIC object.
  1.1360 +		  libobjs="$libobjs $pic_object"
  1.1361 +		  arg="$pic_object"
  1.1362 +		fi
  1.1363 +
  1.1364 +		# Non-PIC object.
  1.1365 +		if test "$non_pic_object" != none; then
  1.1366 +		  # Prepend the subdirectory the object is found in.
  1.1367 +		  non_pic_object="$xdir$non_pic_object"
  1.1368 +
  1.1369 +		  # A standard non-PIC object
  1.1370 +		  non_pic_objects="$non_pic_objects $non_pic_object"
  1.1371 +		  if test -z "$pic_object" || test "$pic_object" = none ; then
  1.1372 +		    arg="$non_pic_object"
  1.1373 +		  fi
  1.1374 +		else
  1.1375 +		  # If the PIC object exists, use it instead.
  1.1376 +		  # $xdir was prepended to $pic_object above.
  1.1377 +		  non_pic_object="$pic_object"
  1.1378 +		  non_pic_objects="$non_pic_objects $non_pic_object"
  1.1379 +		fi
  1.1380 +	      else
  1.1381 +		# Only an error if not doing a dry-run.
  1.1382 +		if test -z "$run"; then
  1.1383 +		  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
  1.1384 +		  exit $EXIT_FAILURE
  1.1385 +		else
  1.1386 +		  # Dry-run case.
  1.1387 +
  1.1388 +		  # Extract subdirectory from the argument.
  1.1389 +		  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
  1.1390 +		  if test "X$xdir" = "X$arg"; then
  1.1391 +		    xdir=
  1.1392 +		  else
  1.1393 +		    xdir="$xdir/"
  1.1394 +		  fi
  1.1395 +
  1.1396 +		  pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
  1.1397 +		  non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
  1.1398 +		  libobjs="$libobjs $pic_object"
  1.1399 +		  non_pic_objects="$non_pic_objects $non_pic_object"
  1.1400 +		fi
  1.1401 +	      fi
  1.1402 +	    done
  1.1403 +	  else
  1.1404 +	    $echo "$modename: link input file \`$save_arg' does not exist"
  1.1405 +	    exit $EXIT_FAILURE
  1.1406 +	  fi
  1.1407 +	  arg=$save_arg
  1.1408 +	  prev=
  1.1409 +	  continue
  1.1410 +	  ;;
  1.1411 +	rpath | xrpath)
  1.1412 +	  # We need an absolute path.
  1.1413 +	  case $arg in
  1.1414 +	  [\\/]* | [A-Za-z]:[\\/]*) ;;
  1.1415 +	  *)
  1.1416 +	    $echo "$modename: only absolute run-paths are allowed" 1>&2
  1.1417 +	    exit $EXIT_FAILURE
  1.1418 +	    ;;
  1.1419 +	  esac
  1.1420 +	  if test "$prev" = rpath; then
  1.1421 +	    case "$rpath " in
  1.1422 +	    *" $arg "*) ;;
  1.1423 +	    *) rpath="$rpath $arg" ;;
  1.1424 +	    esac
  1.1425 +	  else
  1.1426 +	    case "$xrpath " in
  1.1427 +	    *" $arg "*) ;;
  1.1428 +	    *) xrpath="$xrpath $arg" ;;
  1.1429 +	    esac
  1.1430 +	  fi
  1.1431 +	  prev=
  1.1432 +	  continue
  1.1433 +	  ;;
  1.1434 +	xcompiler)
  1.1435 +	  compiler_flags="$compiler_flags $qarg"
  1.1436 +	  prev=
  1.1437 +	  compile_command="$compile_command $qarg"
  1.1438 +	  finalize_command="$finalize_command $qarg"
  1.1439 +	  continue
  1.1440 +	  ;;
  1.1441 +	xlinker)
  1.1442 +	  linker_flags="$linker_flags $qarg"
  1.1443 +	  compiler_flags="$compiler_flags $wl$qarg"
  1.1444 +	  prev=
  1.1445 +	  compile_command="$compile_command $wl$qarg"
  1.1446 +	  finalize_command="$finalize_command $wl$qarg"
  1.1447 +	  continue
  1.1448 +	  ;;
  1.1449 +	xcclinker)
  1.1450 +	  linker_flags="$linker_flags $qarg"
  1.1451 +	  compiler_flags="$compiler_flags $qarg"
  1.1452 +	  prev=
  1.1453 +	  compile_command="$compile_command $qarg"
  1.1454 +	  finalize_command="$finalize_command $qarg"
  1.1455 +	  continue
  1.1456 +	  ;;
  1.1457 +	shrext)
  1.1458 +  	  shrext_cmds="$arg"
  1.1459 +	  prev=
  1.1460 +	  continue
  1.1461 +	  ;;
  1.1462 +	darwin_framework|darwin_framework_skip)
  1.1463 +	  test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
  1.1464 +	  compile_command="$compile_command $arg"
  1.1465 +	  finalize_command="$finalize_command $arg"
  1.1466 +	  prev=
  1.1467 +	  continue
  1.1468 +	  ;;
  1.1469 +	*)
  1.1470 +	  eval "$prev=\"\$arg\""
  1.1471 +	  prev=
  1.1472 +	  continue
  1.1473 +	  ;;
  1.1474 +	esac
  1.1475 +      fi # test -n "$prev"
  1.1476 +
  1.1477 +      prevarg="$arg"
  1.1478 +
  1.1479 +      case $arg in
  1.1480 +      -all-static)
  1.1481 +	if test -n "$link_static_flag"; then
  1.1482 +	  compile_command="$compile_command $link_static_flag"
  1.1483 +	  finalize_command="$finalize_command $link_static_flag"
  1.1484 +	fi
  1.1485 +	continue
  1.1486 +	;;
  1.1487 +
  1.1488 +      -allow-undefined)
  1.1489 +	# FIXME: remove this flag sometime in the future.
  1.1490 +	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
  1.1491 +	continue
  1.1492 +	;;
  1.1493 +
  1.1494 +      -avoid-version)
  1.1495 +	avoid_version=yes
  1.1496 +	continue
  1.1497 +	;;
  1.1498 +
  1.1499 +      -dlopen)
  1.1500 +	prev=dlfiles
  1.1501 +	continue
  1.1502 +	;;
  1.1503 +
  1.1504 +      -dlpreopen)
  1.1505 +	prev=dlprefiles
  1.1506 +	continue
  1.1507 +	;;
  1.1508 +
  1.1509 +      -export-dynamic)
  1.1510 +	export_dynamic=yes
  1.1511 +	continue
  1.1512 +	;;
  1.1513 +
  1.1514 +      -export-symbols | -export-symbols-regex)
  1.1515 +	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
  1.1516 +	  $echo "$modename: more than one -exported-symbols argument is not allowed"
  1.1517 +	  exit $EXIT_FAILURE
  1.1518 +	fi
  1.1519 +	if test "X$arg" = "X-export-symbols"; then
  1.1520 +	  prev=expsyms
  1.1521 +	else
  1.1522 +	  prev=expsyms_regex
  1.1523 +	fi
  1.1524 +	continue
  1.1525 +	;;
  1.1526 +
  1.1527 +      -framework|-arch|-isysroot)
  1.1528 +	case " $CC " in
  1.1529 +	  *" ${arg} ${1} "* | *" ${arg}	${1} "*) 
  1.1530 +		prev=darwin_framework_skip ;;
  1.1531 +	  *) compiler_flags="$compiler_flags $arg"
  1.1532 +	     prev=darwin_framework ;;
  1.1533 +	esac
  1.1534 +	compile_command="$compile_command $arg"
  1.1535 +	finalize_command="$finalize_command $arg"
  1.1536 +	continue
  1.1537 +	;;
  1.1538 +
  1.1539 +      -inst-prefix-dir)
  1.1540 +	prev=inst_prefix
  1.1541 +	continue
  1.1542 +	;;
  1.1543 +
  1.1544 +      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
  1.1545 +      # so, if we see these flags be careful not to treat them like -L
  1.1546 +      -L[A-Z][A-Z]*:*)
  1.1547 +	case $with_gcc/$host in
  1.1548 +	no/*-*-irix* | /*-*-irix*)
  1.1549 +	  compile_command="$compile_command $arg"
  1.1550 +	  finalize_command="$finalize_command $arg"
  1.1551 +	  ;;
  1.1552 +	esac
  1.1553 +	continue
  1.1554 +	;;
  1.1555 +
  1.1556 +      -L*)
  1.1557 +	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
  1.1558 +	# We need an absolute path.
  1.1559 +	case $dir in
  1.1560 +	[\\/]* | [A-Za-z]:[\\/]*) ;;
  1.1561 +	*)
  1.1562 +	  absdir=`cd "$dir" && pwd`
  1.1563 +	  if test -z "$absdir"; then
  1.1564 +	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
  1.1565 +	    absdir="$dir"
  1.1566 +	    notinst_path="$notinst_path $dir"
  1.1567 +	  fi
  1.1568 +	  dir="$absdir"
  1.1569 +	  ;;
  1.1570 +	esac
  1.1571 +	case "$deplibs " in
  1.1572 +	*" -L$dir "*) ;;
  1.1573 +	*)
  1.1574 +	  deplibs="$deplibs -L$dir"
  1.1575 +	  lib_search_path="$lib_search_path $dir"
  1.1576 +	  ;;
  1.1577 +	esac
  1.1578 +	case $host in
  1.1579 +	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
  1.1580 +	  testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
  1.1581 +	  case :$dllsearchpath: in
  1.1582 +	  *":$dir:"*) ;;
  1.1583 +	  *) dllsearchpath="$dllsearchpath:$dir";;
  1.1584 +	  esac
  1.1585 +	  case :$dllsearchpath: in
  1.1586 +	  *":$testbindir:"*) ;;
  1.1587 +	  *) dllsearchpath="$dllsearchpath:$testbindir";;
  1.1588 +	  esac
  1.1589 +	  ;;
  1.1590 +	esac
  1.1591 +	continue
  1.1592 +	;;
  1.1593 +
  1.1594 +      -l*)
  1.1595 +	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
  1.1596 +	  case $host in
  1.1597 +	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
  1.1598 +	    # These systems don't actually have a C or math library (as such)
  1.1599 +	    continue
  1.1600 +	    ;;
  1.1601 +	  *-*-os2*)
  1.1602 +	    # These systems don't actually have a C library (as such)
  1.1603 +	    test "X$arg" = "X-lc" && continue
  1.1604 +	    ;;
  1.1605 +	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
  1.1606 +	    # Do not include libc due to us having libc/libc_r.
  1.1607 +	    test "X$arg" = "X-lc" && continue
  1.1608 +	    ;;
  1.1609 +	  *-*-rhapsody* | *-*-darwin1.[012])
  1.1610 +	    # Rhapsody C and math libraries are in the System framework
  1.1611 +	    deplibs="$deplibs -framework System"
  1.1612 +	    continue
  1.1613 +	    ;;
  1.1614 +	  *-*-sco3.2v5* | *-*-sco5v6*)
  1.1615 +	    # Causes problems with __ctype
  1.1616 +	    test "X$arg" = "X-lc" && continue
  1.1617 +	    ;;
  1.1618 +	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
  1.1619 +	    # Compiler inserts libc in the correct place for threads to work
  1.1620 +	    test "X$arg" = "X-lc" && continue
  1.1621 +	    ;;
  1.1622 +	  esac
  1.1623 +	elif test "X$arg" = "X-lc_r"; then
  1.1624 +	 case $host in
  1.1625 +	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
  1.1626 +	   # Do not include libc_r directly, use -pthread flag.
  1.1627 +	   continue
  1.1628 +	   ;;
  1.1629 +	 esac
  1.1630 +	fi
  1.1631 +	deplibs="$deplibs $arg"
  1.1632 +	continue
  1.1633 +	;;
  1.1634 +
  1.1635 +      # Tru64 UNIX uses -model [arg] to determine the layout of C++
  1.1636 +      # classes, name mangling, and exception handling.
  1.1637 +      -model)
  1.1638 +	compile_command="$compile_command $arg"
  1.1639 +	compiler_flags="$compiler_flags $arg"
  1.1640 +	finalize_command="$finalize_command $arg"
  1.1641 +	prev=xcompiler
  1.1642 +	continue
  1.1643 +	;;
  1.1644 +
  1.1645 +     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
  1.1646 +	compiler_flags="$compiler_flags $arg"
  1.1647 +	compile_command="$compile_command $arg"
  1.1648 +	finalize_command="$finalize_command $arg"
  1.1649 +	continue
  1.1650 +	;;
  1.1651 +
  1.1652 +      -module)
  1.1653 +	module=yes
  1.1654 +	continue
  1.1655 +	;;
  1.1656 +
  1.1657 +      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
  1.1658 +      # -r[0-9][0-9]* specifies the processor on the SGI compiler
  1.1659 +      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
  1.1660 +      # +DA*, +DD* enable 64-bit mode on the HP compiler
  1.1661 +      # -q* pass through compiler args for the IBM compiler
  1.1662 +      # -m* pass through architecture-specific compiler args for GCC
  1.1663 +      # -m*, -t[45]*, -txscale* pass through architecture-specific
  1.1664 +      # compiler args for GCC
  1.1665 +      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
  1.1666 +      # -F/path gives path to uninstalled frameworks, gcc on darwin
  1.1667 +      # @file GCC response files
  1.1668 +      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
  1.1669 +      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
  1.1670 +
  1.1671 +	# Unknown arguments in both finalize_command and compile_command need
  1.1672 +	# to be aesthetically quoted because they are evaled later.
  1.1673 +	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  1.1674 +	case $arg in
  1.1675 +	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
  1.1676 +	  arg="\"$arg\""
  1.1677 +	  ;;
  1.1678 +	esac
  1.1679 +        compile_command="$compile_command $arg"
  1.1680 +        finalize_command="$finalize_command $arg"
  1.1681 +        compiler_flags="$compiler_flags $arg"
  1.1682 +        continue
  1.1683 +        ;;
  1.1684 +
  1.1685 +      -shrext)
  1.1686 +	prev=shrext
  1.1687 +	continue
  1.1688 +	;;
  1.1689 +
  1.1690 +      -no-fast-install)
  1.1691 +	fast_install=no
  1.1692 +	continue
  1.1693 +	;;
  1.1694 +
  1.1695 +      -no-install)
  1.1696 +	case $host in
  1.1697 +	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
  1.1698 +	  # The PATH hackery in wrapper scripts is required on Windows
  1.1699 +	  # and Darwin in order for the loader to find any dlls it needs.
  1.1700 +	  $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
  1.1701 +	  $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
  1.1702 +	  fast_install=no
  1.1703 +	  ;;
  1.1704 +	*) no_install=yes ;;
  1.1705 +	esac
  1.1706 +	continue
  1.1707 +	;;
  1.1708 +
  1.1709 +      -no-undefined)
  1.1710 +	allow_undefined=no
  1.1711 +	continue
  1.1712 +	;;
  1.1713 +
  1.1714 +      -objectlist)
  1.1715 +	prev=objectlist
  1.1716 +	continue
  1.1717 +	;;
  1.1718 +
  1.1719 +      -o) prev=output ;;
  1.1720 +
  1.1721 +      -precious-files-regex)
  1.1722 +	prev=precious_regex
  1.1723 +	continue
  1.1724 +	;;
  1.1725 +
  1.1726 +      -release)
  1.1727 +	prev=release
  1.1728 +	continue
  1.1729 +	;;
  1.1730 +
  1.1731 +      -rpath)
  1.1732 +	prev=rpath
  1.1733 +	continue
  1.1734 +	;;
  1.1735 +
  1.1736 +      -R)
  1.1737 +	prev=xrpath
  1.1738 +	continue
  1.1739 +	;;
  1.1740 +
  1.1741 +      -R*)
  1.1742 +	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
  1.1743 +	# We need an absolute path.
  1.1744 +	case $dir in
  1.1745 +	[\\/]* | [A-Za-z]:[\\/]*) ;;
  1.1746 +	*)
  1.1747 +	  $echo "$modename: only absolute run-paths are allowed" 1>&2
  1.1748 +	  exit $EXIT_FAILURE
  1.1749 +	  ;;
  1.1750 +	esac
  1.1751 +	case "$xrpath " in
  1.1752 +	*" $dir "*) ;;
  1.1753 +	*) xrpath="$xrpath $dir" ;;
  1.1754 +	esac
  1.1755 +	continue
  1.1756 +	;;
  1.1757 +
  1.1758 +      -static | -static-libtool-libs)
  1.1759 +	# The effects of -static are defined in a previous loop.
  1.1760 +	# We used to do the same as -all-static on platforms that
  1.1761 +	# didn't have a PIC flag, but the assumption that the effects
  1.1762 +	# would be equivalent was wrong.  It would break on at least
  1.1763 +	# Digital Unix and AIX.
  1.1764 +	continue
  1.1765 +	;;
  1.1766 +
  1.1767 +      -thread-safe)
  1.1768 +	thread_safe=yes
  1.1769 +	continue
  1.1770 +	;;
  1.1771 +
  1.1772 +      -version-info)
  1.1773 +	prev=vinfo
  1.1774 +	continue
  1.1775 +	;;
  1.1776 +      -version-number)
  1.1777 +	prev=vinfo
  1.1778 +	vinfo_number=yes
  1.1779 +	continue
  1.1780 +	;;
  1.1781 +
  1.1782 +      -Wc,*)
  1.1783 +	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
  1.1784 +	arg=
  1.1785 +	save_ifs="$IFS"; IFS=','
  1.1786 +	for flag in $args; do
  1.1787 +	  IFS="$save_ifs"
  1.1788 +	  case $flag in
  1.1789 +	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
  1.1790 +	    flag="\"$flag\""
  1.1791 +	    ;;
  1.1792 +	  esac
  1.1793 +	  arg="$arg $wl$flag"
  1.1794 +	  compiler_flags="$compiler_flags $flag"
  1.1795 +	done
  1.1796 +	IFS="$save_ifs"
  1.1797 +	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
  1.1798 +	;;
  1.1799 +
  1.1800 +      -Wl,*)
  1.1801 +	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
  1.1802 +	arg=
  1.1803 +	save_ifs="$IFS"; IFS=','
  1.1804 +	for flag in $args; do
  1.1805 +	  IFS="$save_ifs"
  1.1806 +	  case $flag in
  1.1807 +	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
  1.1808 +	    flag="\"$flag\""
  1.1809 +	    ;;
  1.1810 +	  esac
  1.1811 +	  arg="$arg $wl$flag"
  1.1812 +	  compiler_flags="$compiler_flags $wl$flag"
  1.1813 +	  linker_flags="$linker_flags $flag"
  1.1814 +	done
  1.1815 +	IFS="$save_ifs"
  1.1816 +	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
  1.1817 +	;;
  1.1818 +
  1.1819 +      -Xcompiler)
  1.1820 +	prev=xcompiler
  1.1821 +	continue
  1.1822 +	;;
  1.1823 +
  1.1824 +      -Xlinker)
  1.1825 +	prev=xlinker
  1.1826 +	continue
  1.1827 +	;;
  1.1828 +
  1.1829 +      -XCClinker)
  1.1830 +	prev=xcclinker
  1.1831 +	continue
  1.1832 +	;;
  1.1833 +
  1.1834 +      # Some other compiler flag.
  1.1835 +      -* | +*)
  1.1836 +	# Unknown arguments in both finalize_command and compile_command need
  1.1837 +	# to be aesthetically quoted because they are evaled later.
  1.1838 +	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  1.1839 +	case $arg in
  1.1840 +	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
  1.1841 +	  arg="\"$arg\""
  1.1842 +	  ;;
  1.1843 +	esac
  1.1844 +	;;
  1.1845 +
  1.1846 +      *.$objext)
  1.1847 +	# A standard object.
  1.1848 +	objs="$objs $arg"
  1.1849 +	;;
  1.1850 +
  1.1851 +      *.lo)
  1.1852 +	# A libtool-controlled object.
  1.1853 +
  1.1854 +	# Check to see that this really is a libtool object.
  1.1855 +	if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  1.1856 +	  pic_object=
  1.1857 +	  non_pic_object=
  1.1858 +
  1.1859 +	  # Read the .lo file
  1.1860 +	  # If there is no directory component, then add one.
  1.1861 +	  case $arg in
  1.1862 +	  */* | *\\*) . $arg ;;
  1.1863 +	  *) . ./$arg ;;
  1.1864 +	  esac
  1.1865 +
  1.1866 +	  if test -z "$pic_object" || \
  1.1867 +	     test -z "$non_pic_object" ||
  1.1868 +	     test "$pic_object" = none && \
  1.1869 +	     test "$non_pic_object" = none; then
  1.1870 +	    $echo "$modename: cannot find name of object for \`$arg'" 1>&2
  1.1871 +	    exit $EXIT_FAILURE
  1.1872 +	  fi
  1.1873 +
  1.1874 +	  # Extract subdirectory from the argument.
  1.1875 +	  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
  1.1876 +	  if test "X$xdir" = "X$arg"; then
  1.1877 +	    xdir=
  1.1878 + 	  else
  1.1879 +	    xdir="$xdir/"
  1.1880 +	  fi
  1.1881 +
  1.1882 +	  if test "$pic_object" != none; then
  1.1883 +	    # Prepend the subdirectory the object is found in.
  1.1884 +	    pic_object="$xdir$pic_object"
  1.1885 +
  1.1886 +	    if test "$prev" = dlfiles; then
  1.1887 +	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
  1.1888 +		dlfiles="$dlfiles $pic_object"
  1.1889 +		prev=
  1.1890 +		continue
  1.1891 +	      else
  1.1892 +		# If libtool objects are unsupported, then we need to preload.
  1.1893 +		prev=dlprefiles
  1.1894 +	      fi
  1.1895 +	    fi
  1.1896 +
  1.1897 +	    # CHECK ME:  I think I busted this.  -Ossama
  1.1898 +	    if test "$prev" = dlprefiles; then
  1.1899 +	      # Preload the old-style object.
  1.1900 +	      dlprefiles="$dlprefiles $pic_object"
  1.1901 +	      prev=
  1.1902 +	    fi
  1.1903 +
  1.1904 +	    # A PIC object.
  1.1905 +	    libobjs="$libobjs $pic_object"
  1.1906 +	    arg="$pic_object"
  1.1907 +	  fi
  1.1908 +
  1.1909 +	  # Non-PIC object.
  1.1910 +	  if test "$non_pic_object" != none; then
  1.1911 +	    # Prepend the subdirectory the object is found in.
  1.1912 +	    non_pic_object="$xdir$non_pic_object"
  1.1913 +
  1.1914 +	    # A standard non-PIC object
  1.1915 +	    non_pic_objects="$non_pic_objects $non_pic_object"
  1.1916 +	    if test -z "$pic_object" || test "$pic_object" = none ; then
  1.1917 +	      arg="$non_pic_object"
  1.1918 +	    fi
  1.1919 +	  else
  1.1920 +	    # If the PIC object exists, use it instead.
  1.1921 +	    # $xdir was prepended to $pic_object above.
  1.1922 +	    non_pic_object="$pic_object"
  1.1923 +	    non_pic_objects="$non_pic_objects $non_pic_object"
  1.1924 +	  fi
  1.1925 +	else
  1.1926 +	  # Only an error if not doing a dry-run.
  1.1927 +	  if test -z "$run"; then
  1.1928 +	    $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
  1.1929 +	    exit $EXIT_FAILURE
  1.1930 +	  else
  1.1931 +	    # Dry-run case.
  1.1932 +
  1.1933 +	    # Extract subdirectory from the argument.
  1.1934 +	    xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
  1.1935 +	    if test "X$xdir" = "X$arg"; then
  1.1936 +	      xdir=
  1.1937 +	    else
  1.1938 +	      xdir="$xdir/"
  1.1939 +	    fi
  1.1940 +
  1.1941 +	    pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
  1.1942 +	    non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
  1.1943 +	    libobjs="$libobjs $pic_object"
  1.1944 +	    non_pic_objects="$non_pic_objects $non_pic_object"
  1.1945 +	  fi
  1.1946 +	fi
  1.1947 +	;;
  1.1948 +
  1.1949 +      *.$libext)
  1.1950 +	# An archive.
  1.1951 +	deplibs="$deplibs $arg"
  1.1952 +	old_deplibs="$old_deplibs $arg"
  1.1953 +	continue
  1.1954 +	;;
  1.1955 +
  1.1956 +      *.la)
  1.1957 +	# A libtool-controlled library.
  1.1958 +
  1.1959 +	if test "$prev" = dlfiles; then
  1.1960 +	  # This library was specified with -dlopen.
  1.1961 +	  dlfiles="$dlfiles $arg"
  1.1962 +	  prev=
  1.1963 +	elif test "$prev" = dlprefiles; then
  1.1964 +	  # The library was specified with -dlpreopen.
  1.1965 +	  dlprefiles="$dlprefiles $arg"
  1.1966 +	  prev=
  1.1967 +	else
  1.1968 +	  deplibs="$deplibs $arg"
  1.1969 +	fi
  1.1970 +	continue
  1.1971 +	;;
  1.1972 +
  1.1973 +      # Some other compiler argument.
  1.1974 +      *)
  1.1975 +	# Unknown arguments in both finalize_command and compile_command need
  1.1976 +	# to be aesthetically quoted because they are evaled later.
  1.1977 +	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  1.1978 +	case $arg in
  1.1979 +	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
  1.1980 +	  arg="\"$arg\""
  1.1981 +	  ;;
  1.1982 +	esac
  1.1983 +	;;
  1.1984 +      esac # arg
  1.1985 +
  1.1986 +      # Now actually substitute the argument into the commands.
  1.1987 +      if test -n "$arg"; then
  1.1988 +	compile_command="$compile_command $arg"
  1.1989 +	finalize_command="$finalize_command $arg"
  1.1990 +      fi
  1.1991 +    done # argument parsing loop
  1.1992 +
  1.1993 +    if test -n "$prev"; then
  1.1994 +      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
  1.1995 +      $echo "$help" 1>&2
  1.1996 +      exit $EXIT_FAILURE
  1.1997 +    fi
  1.1998 +
  1.1999 +    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
  1.2000 +      eval arg=\"$export_dynamic_flag_spec\"
  1.2001 +      compile_command="$compile_command $arg"
  1.2002 +      finalize_command="$finalize_command $arg"
  1.2003 +    fi
  1.2004 +
  1.2005 +    oldlibs=
  1.2006 +    # calculate the name of the file, without its directory
  1.2007 +    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
  1.2008 +    libobjs_save="$libobjs"
  1.2009 +
  1.2010 +    if test -n "$shlibpath_var"; then
  1.2011 +      # get the directories listed in $shlibpath_var
  1.2012 +      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
  1.2013 +    else
  1.2014 +      shlib_search_path=
  1.2015 +    fi
  1.2016 +    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
  1.2017 +    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
  1.2018 +
  1.2019 +    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
  1.2020 +    if test "X$output_objdir" = "X$output"; then
  1.2021 +      output_objdir="$objdir"
  1.2022 +    else
  1.2023 +      output_objdir="$output_objdir/$objdir"
  1.2024 +    fi
  1.2025 +    # Create the object directory.
  1.2026 +    if test ! -d "$output_objdir"; then
  1.2027 +      $show "$mkdir $output_objdir"
  1.2028 +      $run $mkdir $output_objdir
  1.2029 +      exit_status=$?
  1.2030 +      if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
  1.2031 +	exit $exit_status
  1.2032 +      fi
  1.2033 +    fi
  1.2034 +
  1.2035 +    # Determine the type of output
  1.2036 +    case $output in
  1.2037 +    "")
  1.2038 +      $echo "$modename: you must specify an output file" 1>&2
  1.2039 +      $echo "$help" 1>&2
  1.2040 +      exit $EXIT_FAILURE
  1.2041 +      ;;
  1.2042 +    *.$libext) linkmode=oldlib ;;
  1.2043 +    *.lo | *.$objext) linkmode=obj ;;
  1.2044 +    *.la) linkmode=lib ;;
  1.2045 +    *) linkmode=prog ;; # Anything else should be a program.
  1.2046 +    esac
  1.2047 +
  1.2048 +    case $host in
  1.2049 +    *cygwin* | *mingw* | *pw32*)
  1.2050 +      # don't eliminate duplications in $postdeps and $predeps
  1.2051 +      duplicate_compiler_generated_deps=yes
  1.2052 +      ;;
  1.2053 +    *)
  1.2054 +      duplicate_compiler_generated_deps=$duplicate_deps
  1.2055 +      ;;
  1.2056 +    esac
  1.2057 +    specialdeplibs=
  1.2058 +
  1.2059 +    libs=
  1.2060 +    # Find all interdependent deplibs by searching for libraries
  1.2061 +    # that are linked more than once (e.g. -la -lb -la)
  1.2062 +    for deplib in $deplibs; do
  1.2063 +      if test "X$duplicate_deps" = "Xyes" ; then
  1.2064 +	case "$libs " in
  1.2065 +	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
  1.2066 +	esac
  1.2067 +      fi
  1.2068 +      libs="$libs $deplib"
  1.2069 +    done
  1.2070 +
  1.2071 +    if test "$linkmode" = lib; then
  1.2072 +      libs="$predeps $libs $compiler_lib_search_path $postdeps"
  1.2073 +
  1.2074 +      # Compute libraries that are listed more than once in $predeps
  1.2075 +      # $postdeps and mark them as special (i.e., whose duplicates are
  1.2076 +      # not to be eliminated).
  1.2077 +      pre_post_deps=
  1.2078 +      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
  1.2079 +	for pre_post_dep in $predeps $postdeps; do
  1.2080 +	  case "$pre_post_deps " in
  1.2081 +	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
  1.2082 +	  esac
  1.2083 +	  pre_post_deps="$pre_post_deps $pre_post_dep"
  1.2084 +	done
  1.2085 +      fi
  1.2086 +      pre_post_deps=
  1.2087 +    fi
  1.2088 +
  1.2089 +    deplibs=
  1.2090 +    newdependency_libs=
  1.2091 +    newlib_search_path=
  1.2092 +    need_relink=no # whether we're linking any uninstalled libtool libraries
  1.2093 +    notinst_deplibs= # not-installed libtool libraries
  1.2094 +    case $linkmode in
  1.2095 +    lib)
  1.2096 +	passes="conv link"
  1.2097 +	for file in $dlfiles $dlprefiles; do
  1.2098 +	  case $file in
  1.2099 +	  *.la) ;;
  1.2100 +	  *)
  1.2101 +	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
  1.2102 +	    exit $EXIT_FAILURE
  1.2103 +	    ;;
  1.2104 +	  esac
  1.2105 +	done
  1.2106 +	;;
  1.2107 +    prog)
  1.2108 +	compile_deplibs=
  1.2109 +	finalize_deplibs=
  1.2110 +	alldeplibs=no
  1.2111 +	newdlfiles=
  1.2112 +	newdlprefiles=
  1.2113 +	passes="conv scan dlopen dlpreopen link"
  1.2114 +	;;
  1.2115 +    *)  passes="conv"
  1.2116 +	;;
  1.2117 +    esac
  1.2118 +    for pass in $passes; do
  1.2119 +      if test "$linkmode,$pass" = "lib,link" ||
  1.2120 +	 test "$linkmode,$pass" = "prog,scan"; then
  1.2121 +	libs="$deplibs"
  1.2122 +	deplibs=
  1.2123 +      fi
  1.2124 +      if test "$linkmode" = prog; then
  1.2125 +	case $pass in
  1.2126 +	dlopen) libs="$dlfiles" ;;
  1.2127 +	dlpreopen) libs="$dlprefiles" ;;
  1.2128 +	link)
  1.2129 +	  libs="$deplibs %DEPLIBS%"
  1.2130 +	  test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
  1.2131 +	  ;;
  1.2132 +	esac
  1.2133 +      fi
  1.2134 +      if test "$pass" = dlopen; then
  1.2135 +	# Collect dlpreopened libraries
  1.2136 +	save_deplibs="$deplibs"
  1.2137 +	deplibs=
  1.2138 +      fi
  1.2139 +      for deplib in $libs; do
  1.2140 +	lib=
  1.2141 +	found=no
  1.2142 +	case $deplib in
  1.2143 +	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
  1.2144 +	  if test "$linkmode,$pass" = "prog,link"; then
  1.2145 +	    compile_deplibs="$deplib $compile_deplibs"
  1.2146 +	    finalize_deplibs="$deplib $finalize_deplibs"
  1.2147 +	  else
  1.2148 +	    compiler_flags="$compiler_flags $deplib"
  1.2149 +	  fi
  1.2150 +	  continue
  1.2151 +	  ;;
  1.2152 +	-l*)
  1.2153 +	  if test "$linkmode" != lib && test "$linkmode" != prog; then
  1.2154 +	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
  1.2155 +	    continue
  1.2156 +	  fi
  1.2157 +	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
  1.2158 +	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
  1.2159 +	    for search_ext in .la $std_shrext .so .a; do
  1.2160 +	      # Search the libtool library
  1.2161 +	      lib="$searchdir/lib${name}${search_ext}"
  1.2162 +	      if test -f "$lib"; then
  1.2163 +		if test "$search_ext" = ".la"; then
  1.2164 +		  found=yes
  1.2165 +		else
  1.2166 +		  found=no
  1.2167 +		fi
  1.2168 +		break 2
  1.2169 +	      fi
  1.2170 +	    done
  1.2171 +	  done
  1.2172 +	  if test "$found" != yes; then
  1.2173 +	    # deplib doesn't seem to be a libtool library
  1.2174 +	    if test "$linkmode,$pass" = "prog,link"; then
  1.2175 +	      compile_deplibs="$deplib $compile_deplibs"
  1.2176 +	      finalize_deplibs="$deplib $finalize_deplibs"
  1.2177 +	    else
  1.2178 +	      deplibs="$deplib $deplibs"
  1.2179 +	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
  1.2180 +	    fi
  1.2181 +	    continue
  1.2182 +	  else # deplib is a libtool library
  1.2183 +	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
  1.2184 +	    # We need to do some special things here, and not later.
  1.2185 +	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  1.2186 +	      case " $predeps $postdeps " in
  1.2187 +	      *" $deplib "*)
  1.2188 +		if (${SED} -e '2q' $lib |
  1.2189 +                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  1.2190 +		  library_names=
  1.2191 +		  old_library=
  1.2192 +		  case $lib in
  1.2193 +		  */* | *\\*) . $lib ;;
  1.2194 +		  *) . ./$lib ;;
  1.2195 +		  esac
  1.2196 +		  for l in $old_library $library_names; do
  1.2197 +		    ll="$l"
  1.2198 +		  done
  1.2199 +		  if test "X$ll" = "X$old_library" ; then # only static version available
  1.2200 +		    found=no
  1.2201 +		    ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
  1.2202 +		    test "X$ladir" = "X$lib" && ladir="."
  1.2203 +		    lib=$ladir/$old_library
  1.2204 +		    if test "$linkmode,$pass" = "prog,link"; then
  1.2205 +		      compile_deplibs="$deplib $compile_deplibs"
  1.2206 +		      finalize_deplibs="$deplib $finalize_deplibs"
  1.2207 +		    else
  1.2208 +		      deplibs="$deplib $deplibs"
  1.2209 +		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
  1.2210 +		    fi
  1.2211 +		    continue
  1.2212 +		  fi
  1.2213 +		fi
  1.2214 +	        ;;
  1.2215 +	      *) ;;
  1.2216 +	      esac
  1.2217 +	    fi
  1.2218 +	  fi
  1.2219 +	  ;; # -l
  1.2220 +	-L*)
  1.2221 +	  case $linkmode in
  1.2222 +	  lib)
  1.2223 +	    deplibs="$deplib $deplibs"
  1.2224 +	    test "$pass" = conv && continue
  1.2225 +	    newdependency_libs="$deplib $newdependency_libs"
  1.2226 +	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
  1.2227 +	    ;;
  1.2228 +	  prog)
  1.2229 +	    if test "$pass" = conv; then
  1.2230 +	      deplibs="$deplib $deplibs"
  1.2231 +	      continue
  1.2232 +	    fi
  1.2233 +	    if test "$pass" = scan; then
  1.2234 +	      deplibs="$deplib $deplibs"
  1.2235 +	    else
  1.2236 +	      compile_deplibs="$deplib $compile_deplibs"
  1.2237 +	      finalize_deplibs="$deplib $finalize_deplibs"
  1.2238 +	    fi
  1.2239 +	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
  1.2240 +	    ;;
  1.2241 +	  *)
  1.2242 +	    $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
  1.2243 +	    ;;
  1.2244 +	  esac # linkmode
  1.2245 +	  continue
  1.2246 +	  ;; # -L
  1.2247 +	-R*)
  1.2248 +	  if test "$pass" = link; then
  1.2249 +	    dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
  1.2250 +	    # Make sure the xrpath contains only unique directories.
  1.2251 +	    case "$xrpath " in
  1.2252 +	    *" $dir "*) ;;
  1.2253 +	    *) xrpath="$xrpath $dir" ;;
  1.2254 +	    esac
  1.2255 +	  fi
  1.2256 +	  deplibs="$deplib $deplibs"
  1.2257 +	  continue
  1.2258 +	  ;;
  1.2259 +	*.la) lib="$deplib" ;;
  1.2260 +	*.$libext)
  1.2261 +	  if test "$pass" = conv; then
  1.2262 +	    deplibs="$deplib $deplibs"
  1.2263 +	    continue
  1.2264 +	  fi
  1.2265 +	  case $linkmode in
  1.2266 +	  lib)
  1.2267 +	    valid_a_lib=no
  1.2268 +	    case $deplibs_check_method in
  1.2269 +	      match_pattern*)
  1.2270 +		set dummy $deplibs_check_method
  1.2271 +	        match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
  1.2272 +		if eval $echo \"$deplib\" 2>/dev/null \
  1.2273 +		    | $SED 10q \
  1.2274 +		    | $EGREP "$match_pattern_regex" > /dev/null; then
  1.2275 +		  valid_a_lib=yes
  1.2276 +		fi
  1.2277 +		;;
  1.2278 +	      pass_all)
  1.2279 +		valid_a_lib=yes
  1.2280 +		;;
  1.2281 +            esac
  1.2282 +	    if test "$valid_a_lib" != yes; then
  1.2283 +	      $echo
  1.2284 +	      $echo "*** Warning: Trying to link with static lib archive $deplib."
  1.2285 +	      $echo "*** I have the capability to make that library automatically link in when"
  1.2286 +	      $echo "*** you link to this library.  But I can only do this if you have a"
  1.2287 +	      $echo "*** shared version of the library, which you do not appear to have"
  1.2288 +	      $echo "*** because the file extensions .$libext of this argument makes me believe"
  1.2289 +	      $echo "*** that it is just a static archive that I should not used here."
  1.2290 +	    else
  1.2291 +	      $echo
  1.2292 +	      $echo "*** Warning: Linking the shared library $output against the"
  1.2293 +	      $echo "*** static library $deplib is not portable!"
  1.2294 +	      deplibs="$deplib $deplibs"
  1.2295 +	    fi
  1.2296 +	    continue
  1.2297 +	    ;;
  1.2298 +	  prog)
  1.2299 +	    if test "$pass" != link; then
  1.2300 +	      deplibs="$deplib $deplibs"
  1.2301 +	    else
  1.2302 +	      compile_deplibs="$deplib $compile_deplibs"
  1.2303 +	      finalize_deplibs="$deplib $finalize_deplibs"
  1.2304 +	    fi
  1.2305 +	    continue
  1.2306 +	    ;;
  1.2307 +	  esac # linkmode
  1.2308 +	  ;; # *.$libext
  1.2309 +	*.lo | *.$objext)
  1.2310 +	  if test "$pass" = conv; then
  1.2311 +	    deplibs="$deplib $deplibs"
  1.2312 +	  elif test "$linkmode" = prog; then
  1.2313 +	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
  1.2314 +	      # If there is no dlopen support or we're linking statically,
  1.2315 +	      # we need to preload.
  1.2316 +	      newdlprefiles="$newdlprefiles $deplib"
  1.2317 +	      compile_deplibs="$deplib $compile_deplibs"
  1.2318 +	      finalize_deplibs="$deplib $finalize_deplibs"
  1.2319 +	    else
  1.2320 +	      newdlfiles="$newdlfiles $deplib"
  1.2321 +	    fi
  1.2322 +	  fi
  1.2323 +	  continue
  1.2324 +	  ;;
  1.2325 +	%DEPLIBS%)
  1.2326 +	  alldeplibs=yes
  1.2327 +	  continue
  1.2328 +	  ;;
  1.2329 +	esac # case $deplib
  1.2330 +	if test "$found" = yes || test -f "$lib"; then :
  1.2331 +	else
  1.2332 +	  $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
  1.2333 +	  exit $EXIT_FAILURE
  1.2334 +	fi
  1.2335 +
  1.2336 +	# Check to see that this really is a libtool archive.
  1.2337 +	if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
  1.2338 +	else
  1.2339 +	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
  1.2340 +	  exit $EXIT_FAILURE
  1.2341 +	fi
  1.2342 +
  1.2343 +	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
  1.2344 +	test "X$ladir" = "X$lib" && ladir="."
  1.2345 +
  1.2346 +	dlname=
  1.2347 +	dlopen=
  1.2348 +	dlpreopen=
  1.2349 +	libdir=
  1.2350 +	library_names=
  1.2351 +	old_library=
  1.2352 +	# If the library was installed with an old release of libtool,
  1.2353 +	# it will not redefine variables installed, or shouldnotlink
  1.2354 +	installed=yes
  1.2355 +	shouldnotlink=no
  1.2356 +	avoidtemprpath=
  1.2357 +
  1.2358 +
  1.2359 +	# Read the .la file
  1.2360 +	case $lib in
  1.2361 +	*/* | *\\*) . $lib ;;
  1.2362 +	*) . ./$lib ;;
  1.2363 +	esac
  1.2364 +
  1.2365 +	if test "$linkmode,$pass" = "lib,link" ||
  1.2366 +	   test "$linkmode,$pass" = "prog,scan" ||
  1.2367 +	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
  1.2368 +	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
  1.2369 +	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
  1.2370 +	fi
  1.2371 +
  1.2372 +	if test "$pass" = conv; then
  1.2373 +	  # Only check for convenience libraries
  1.2374 +	  deplibs="$lib $deplibs"
  1.2375 +	  if test -z "$libdir"; then
  1.2376 +	    if test -z "$old_library"; then
  1.2377 +	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
  1.2378 +	      exit $EXIT_FAILURE
  1.2379 +	    fi
  1.2380 +	    # It is a libtool convenience library, so add in its objects.
  1.2381 +	    convenience="$convenience $ladir/$objdir/$old_library"
  1.2382 +	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
  1.2383 +	    tmp_libs=
  1.2384 +	    for deplib in $dependency_libs; do
  1.2385 +	      deplibs="$deplib $deplibs"
  1.2386 +              if test "X$duplicate_deps" = "Xyes" ; then
  1.2387 +	        case "$tmp_libs " in
  1.2388 +	        *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
  1.2389 +	        esac
  1.2390 +              fi
  1.2391 +	      tmp_libs="$tmp_libs $deplib"
  1.2392 +	    done
  1.2393 +	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
  1.2394 +	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
  1.2395 +	    exit $EXIT_FAILURE
  1.2396 +	  fi
  1.2397 +	  continue
  1.2398 +	fi # $pass = conv
  1.2399 +
  1.2400 +
  1.2401 +	# Get the name of the library we link against.
  1.2402 +	linklib=
  1.2403 +	for l in $old_library $library_names; do
  1.2404 +	  linklib="$l"
  1.2405 +	done
  1.2406 +	if test -z "$linklib"; then
  1.2407 +	  $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
  1.2408 +	  exit $EXIT_FAILURE
  1.2409 +	fi
  1.2410 +
  1.2411 +	# This library was specified with -dlopen.
  1.2412 +	if test "$pass" = dlopen; then
  1.2413 +	  if test -z "$libdir"; then
  1.2414 +	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
  1.2415 +	    exit $EXIT_FAILURE
  1.2416 +	  fi
  1.2417 +	  if test -z "$dlname" ||
  1.2418 +	     test "$dlopen_support" != yes ||
  1.2419 +	     test "$build_libtool_libs" = no; then
  1.2420 +	    # If there is no dlname, no dlopen support or we're linking
  1.2421 +	    # statically, we need to preload.  We also need to preload any
  1.2422 +	    # dependent libraries so libltdl's deplib preloader doesn't
  1.2423 +	    # bomb out in the load deplibs phase.
  1.2424 +	    dlprefiles="$dlprefiles $lib $dependency_libs"
  1.2425 +	  else
  1.2426 +	    newdlfiles="$newdlfiles $lib"
  1.2427 +	  fi
  1.2428 +	  continue
  1.2429 +	fi # $pass = dlopen
  1.2430 +
  1.2431 +	# We need an absolute path.
  1.2432 +	case $ladir in
  1.2433 +	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
  1.2434 +	*)
  1.2435 +	  abs_ladir=`cd "$ladir" && pwd`
  1.2436 +	  if test -z "$abs_ladir"; then
  1.2437 +	    $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
  1.2438 +	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
  1.2439 +	    abs_ladir="$ladir"
  1.2440 +	  fi
  1.2441 +	  ;;
  1.2442 +	esac
  1.2443 +	laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
  1.2444 +
  1.2445 +	# Find the relevant object directory and library name.
  1.2446 +	if test "X$installed" = Xyes; then
  1.2447 +	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
  1.2448 +	    $echo "$modename: warning: library \`$lib' was moved." 1>&2
  1.2449 +	    dir="$ladir"
  1.2450 +	    absdir="$abs_ladir"
  1.2451 +	    libdir="$abs_ladir"
  1.2452 +	  else
  1.2453 +	    dir="$libdir"
  1.2454 +	    absdir="$libdir"
  1.2455 +	  fi
  1.2456 +	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
  1.2457 +	else
  1.2458 +	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
  1.2459 +	    dir="$ladir"
  1.2460 +	    absdir="$abs_ladir"
  1.2461 +	    # Remove this search path later
  1.2462 +	    notinst_path="$notinst_path $abs_ladir"
  1.2463 +	  else
  1.2464 +	    dir="$ladir/$objdir"
  1.2465 +	    absdir="$abs_ladir/$objdir"
  1.2466 +	    # Remove this search path later
  1.2467 +	    notinst_path="$notinst_path $abs_ladir"
  1.2468 +	  fi
  1.2469 +	fi # $installed = yes
  1.2470 +	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
  1.2471 +
  1.2472 +	# This library was specified with -dlpreopen.
  1.2473 +	if test "$pass" = dlpreopen; then
  1.2474 +	  if test -z "$libdir"; then
  1.2475 +	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
  1.2476 +	    exit $EXIT_FAILURE
  1.2477 +	  fi
  1.2478 +	  # Prefer using a static library (so that no silly _DYNAMIC symbols
  1.2479 +	  # are required to link).
  1.2480 +	  if test -n "$old_library"; then
  1.2481 +	    newdlprefiles="$newdlprefiles $dir/$old_library"
  1.2482 +	  # Otherwise, use the dlname, so that lt_dlopen finds it.
  1.2483 +	  elif test -n "$dlname"; then
  1.2484 +	    newdlprefiles="$newdlprefiles $dir/$dlname"
  1.2485 +	  else
  1.2486 +	    newdlprefiles="$newdlprefiles $dir/$linklib"
  1.2487 +	  fi
  1.2488 +	fi # $pass = dlpreopen
  1.2489 +
  1.2490 +	if test -z "$libdir"; then
  1.2491 +	  # Link the convenience library
  1.2492 +	  if test "$linkmode" = lib; then
  1.2493 +	    deplibs="$dir/$old_library $deplibs"
  1.2494 +	  elif test "$linkmode,$pass" = "prog,link"; then
  1.2495 +	    compile_deplibs="$dir/$old_library $compile_deplibs"
  1.2496 +	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
  1.2497 +	  else
  1.2498 +	    deplibs="$lib $deplibs" # used for prog,scan pass
  1.2499 +	  fi
  1.2500 +	  continue
  1.2501 +	fi
  1.2502 +
  1.2503 +
  1.2504 +	if test "$linkmode" = prog && test "$pass" != link; then
  1.2505 +	  newlib_search_path="$newlib_search_path $ladir"
  1.2506 +	  deplibs="$lib $deplibs"
  1.2507 +
  1.2508 +	  linkalldeplibs=no
  1.2509 +	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
  1.2510 +	     test "$build_libtool_libs" = no; then
  1.2511 +	    linkalldeplibs=yes
  1.2512 +	  fi
  1.2513 +
  1.2514 +	  tmp_libs=
  1.2515 +	  for deplib in $dependency_libs; do
  1.2516 +	    case $deplib in
  1.2517 +	    -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
  1.2518 +	    esac
  1.2519 +	    # Need to link against all dependency_libs?
  1.2520 +	    if test "$linkalldeplibs" = yes; then
  1.2521 +	      deplibs="$deplib $deplibs"
  1.2522 +	    else
  1.2523 +	      # Need to hardcode shared library paths
  1.2524 +	      # or/and link against static libraries
  1.2525 +	      newdependency_libs="$deplib $newdependency_libs"
  1.2526 +	    fi
  1.2527 +	    if test "X$duplicate_deps" = "Xyes" ; then
  1.2528 +	      case "$tmp_libs " in
  1.2529 +	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
  1.2530 +	      esac
  1.2531 +	    fi
  1.2532 +	    tmp_libs="$tmp_libs $deplib"
  1.2533 +	  done # for deplib
  1.2534 +	  continue
  1.2535 +	fi # $linkmode = prog...
  1.2536 +
  1.2537 +	if test "$linkmode,$pass" = "prog,link"; then
  1.2538 +	  if test -n "$library_names" &&
  1.2539 +	     { { test "$prefer_static_libs" = no ||
  1.2540 +		 test "$prefer_static_libs,$installed" = "built,yes"; } ||
  1.2541 +	       test -z "$old_library"; }; then
  1.2542 +	    # We need to hardcode the library path
  1.2543 +	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
  1.2544 +	      # Make sure the rpath contains only unique directories.
  1.2545 +	      case "$temp_rpath " in
  1.2546 +	      *" $dir "*) ;;
  1.2547 +	      *" $absdir "*) ;;
  1.2548 +	      *) temp_rpath="$temp_rpath $absdir" ;;
  1.2549 +	      esac
  1.2550 +	    fi
  1.2551 +
  1.2552 +	    # Hardcode the library path.
  1.2553 +	    # Skip directories that are in the system default run-time
  1.2554 +	    # search path.
  1.2555 +	    case " $sys_lib_dlsearch_path " in
  1.2556 +	    *" $absdir "*) ;;
  1.2557 +	    *)
  1.2558 +	      case "$compile_rpath " in
  1.2559 +	      *" $absdir "*) ;;
  1.2560 +	      *) compile_rpath="$compile_rpath $absdir"
  1.2561 +	      esac
  1.2562 +	      ;;
  1.2563 +	    esac
  1.2564 +	    case " $sys_lib_dlsearch_path " in
  1.2565 +	    *" $libdir "*) ;;
  1.2566 +	    *)
  1.2567 +	      case "$finalize_rpath " in
  1.2568 +	      *" $libdir "*) ;;
  1.2569 +	      *) finalize_rpath="$finalize_rpath $libdir"
  1.2570 +	      esac
  1.2571 +	      ;;
  1.2572 +	    esac
  1.2573 +	  fi # $linkmode,$pass = prog,link...
  1.2574 +
  1.2575 +	  if test "$alldeplibs" = yes &&
  1.2576 +	     { test "$deplibs_check_method" = pass_all ||
  1.2577 +	       { test "$build_libtool_libs" = yes &&
  1.2578 +		 test -n "$library_names"; }; }; then
  1.2579 +	    # We only need to search for static libraries
  1.2580 +	    continue
  1.2581 +	  fi
  1.2582 +	fi
  1.2583 +
  1.2584 +	link_static=no # Whether the deplib will be linked statically
  1.2585 +	use_static_libs=$prefer_static_libs
  1.2586 +	if test "$use_static_libs" = built && test "$installed" = yes ; then
  1.2587 +	  use_static_libs=no
  1.2588 +	fi
  1.2589 +	if test -n "$library_names" &&
  1.2590 +	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
  1.2591 +	  if test "$installed" = no; then
  1.2592 +	    notinst_deplibs="$notinst_deplibs $lib"
  1.2593 +	    need_relink=yes
  1.2594 +	  fi
  1.2595 +	  # This is a shared library
  1.2596 +
  1.2597 +	  # Warn about portability, can't link against -module's on
  1.2598 +	  # some systems (darwin)
  1.2599 +	  if test "$shouldnotlink" = yes && test "$pass" = link ; then
  1.2600 +	    $echo
  1.2601 +	    if test "$linkmode" = prog; then
  1.2602 +	      $echo "*** Warning: Linking the executable $output against the loadable module"
  1.2603 +	    else
  1.2604 +	      $echo "*** Warning: Linking the shared library $output against the loadable module"
  1.2605 +	    fi
  1.2606 +	    $echo "*** $linklib is not portable!"
  1.2607 +	  fi
  1.2608 +	  if test "$linkmode" = lib &&
  1.2609 +	     test "$hardcode_into_libs" = yes; then
  1.2610 +	    # Hardcode the library path.
  1.2611 +	    # Skip directories that are in the system default run-time
  1.2612 +	    # search path.
  1.2613 +	    case " $sys_lib_dlsearch_path " in
  1.2614 +	    *" $absdir "*) ;;
  1.2615 +	    *)
  1.2616 +	      case "$compile_rpath " in
  1.2617 +	      *" $absdir "*) ;;
  1.2618 +	      *) compile_rpath="$compile_rpath $absdir"
  1.2619 +	      esac
  1.2620 +	      ;;
  1.2621 +	    esac
  1.2622 +	    case " $sys_lib_dlsearch_path " in
  1.2623 +	    *" $libdir "*) ;;
  1.2624 +	    *)
  1.2625 +	      case "$finalize_rpath " in
  1.2626 +	      *" $libdir "*) ;;
  1.2627 +	      *) finalize_rpath="$finalize_rpath $libdir"
  1.2628 +	      esac
  1.2629 +	      ;;
  1.2630 +	    esac
  1.2631 +	  fi
  1.2632 +
  1.2633 +	  if test -n "$old_archive_from_expsyms_cmds"; then
  1.2634 +	    # figure out the soname
  1.2635 +	    set dummy $library_names
  1.2636 +	    realname="$2"
  1.2637 +	    shift; shift
  1.2638 +	    libname=`eval \\$echo \"$libname_spec\"`
  1.2639 +	    # use dlname if we got it. it's perfectly good, no?
  1.2640 +	    if test -n "$dlname"; then
  1.2641 +	      soname="$dlname"
  1.2642 +	    elif test -n "$soname_spec"; then
  1.2643 +	      # bleh windows
  1.2644 +	      case $host in
  1.2645 +	      *cygwin* | mingw*)
  1.2646 +		major=`expr $current - $age`
  1.2647 +		versuffix="-$major"
  1.2648 +		;;
  1.2649 +	      esac
  1.2650 +	      eval soname=\"$soname_spec\"
  1.2651 +	    else
  1.2652 +	      soname="$realname"
  1.2653 +	    fi
  1.2654 +
  1.2655 +	    # Make a new name for the extract_expsyms_cmds to use
  1.2656 +	    soroot="$soname"
  1.2657 +	    soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
  1.2658 +	    newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
  1.2659 +
  1.2660 +	    # If the library has no export list, then create one now
  1.2661 +	    if test -f "$output_objdir/$soname-def"; then :
  1.2662 +	    else
  1.2663 +	      $show "extracting exported symbol list from \`$soname'"
  1.2664 +	      save_ifs="$IFS"; IFS='~'
  1.2665 +	      cmds=$extract_expsyms_cmds
  1.2666 +	      for cmd in $cmds; do
  1.2667 +		IFS="$save_ifs"
  1.2668 +		eval cmd=\"$cmd\"
  1.2669 +		$show "$cmd"
  1.2670 +		$run eval "$cmd" || exit $?
  1.2671 +	      done
  1.2672 +	      IFS="$save_ifs"
  1.2673 +	    fi
  1.2674 +
  1.2675 +	    # Create $newlib
  1.2676 +	    if test -f "$output_objdir/$newlib"; then :; else
  1.2677 +	      $show "generating import library for \`$soname'"
  1.2678 +	      save_ifs="$IFS"; IFS='~'
  1.2679 +	      cmds=$old_archive_from_expsyms_cmds
  1.2680 +	      for cmd in $cmds; do
  1.2681 +		IFS="$save_ifs"
  1.2682 +		eval cmd=\"$cmd\"
  1.2683 +		$show "$cmd"
  1.2684 +		$run eval "$cmd" || exit $?
  1.2685 +	      done
  1.2686 +	      IFS="$save_ifs"
  1.2687 +	    fi
  1.2688 +	    # make sure the library variables are pointing to the new library
  1.2689 +	    dir=$output_objdir
  1.2690 +	    linklib=$newlib
  1.2691 +	  fi # test -n "$old_archive_from_expsyms_cmds"
  1.2692 +
  1.2693 +	  if test "$linkmode" = prog || test "$mode" != relink; then
  1.2694 +	    add_shlibpath=
  1.2695 +	    add_dir=
  1.2696 +	    add=
  1.2697 +	    lib_linked=yes
  1.2698 +	    case $hardcode_action in
  1.2699 +	    immediate | unsupported)
  1.2700 +	      if test "$hardcode_direct" = no; then
  1.2701 +		add="$dir/$linklib"
  1.2702 +		case $host in
  1.2703 +		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
  1.2704 +		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
  1.2705 +		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
  1.2706 +		    *-*-unixware7*) add_dir="-L$dir" ;;
  1.2707 +		  *-*-darwin* )
  1.2708 +		    # if the lib is a module then we can not link against
  1.2709 +		    # it, someone is ignoring the new warnings I added
  1.2710 +		    if /usr/bin/file -L $add 2> /dev/null |
  1.2711 +                      $EGREP ": [^:]* bundle" >/dev/null ; then
  1.2712 +		      $echo "** Warning, lib $linklib is a module, not a shared library"
  1.2713 +		      if test -z "$old_library" ; then
  1.2714 +		        $echo
  1.2715 +		        $echo "** And there doesn't seem to be a static archive available"
  1.2716 +		        $echo "** The link will probably fail, sorry"
  1.2717 +		      else
  1.2718 +		        add="$dir/$old_library"
  1.2719 +		      fi
  1.2720 +		    fi
  1.2721 +		esac
  1.2722 +	      elif test "$hardcode_minus_L" = no; then
  1.2723 +		case $host in
  1.2724 +		*-*-sunos*) add_shlibpath="$dir" ;;
  1.2725 +		esac
  1.2726 +		add_dir="-L$dir"
  1.2727 +		add="-l$name"
  1.2728 +	      elif test "$hardcode_shlibpath_var" = no; then
  1.2729 +		add_shlibpath="$dir"
  1.2730 +		add="-l$name"
  1.2731 +	      else
  1.2732 +		lib_linked=no
  1.2733 +	      fi
  1.2734 +	      ;;
  1.2735 +	    relink)
  1.2736 +	      if test "$hardcode_direct" = yes; then
  1.2737 +		add="$dir/$linklib"
  1.2738 +	      elif test "$hardcode_minus_L" = yes; then
  1.2739 +		add_dir="-L$dir"
  1.2740 +		# Try looking first in the location we're being installed to.
  1.2741 +		if test -n "$inst_prefix_dir"; then
  1.2742 +		  case $libdir in
  1.2743 +		    [\\/]*)
  1.2744 +		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
  1.2745 +		      ;;
  1.2746 +		  esac
  1.2747 +		fi
  1.2748 +		add="-l$name"
  1.2749 +	      elif test "$hardcode_shlibpath_var" = yes; then
  1.2750 +		add_shlibpath="$dir"
  1.2751 +		add="-l$name"
  1.2752 +	      else
  1.2753 +		lib_linked=no
  1.2754 +	      fi
  1.2755 +	      ;;
  1.2756 +	    *) lib_linked=no ;;
  1.2757 +	    esac
  1.2758 +
  1.2759 +	    if test "$lib_linked" != yes; then
  1.2760 +	      $echo "$modename: configuration error: unsupported hardcode properties"
  1.2761 +	      exit $EXIT_FAILURE
  1.2762 +	    fi
  1.2763 +
  1.2764 +	    if test -n "$add_shlibpath"; then
  1.2765 +	      case :$compile_shlibpath: in
  1.2766 +	      *":$add_shlibpath:"*) ;;
  1.2767 +	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
  1.2768 +	      esac
  1.2769 +	    fi
  1.2770 +	    if test "$linkmode" = prog; then
  1.2771 +	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
  1.2772 +	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
  1.2773 +	    else
  1.2774 +	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
  1.2775 +	      test -n "$add" && deplibs="$add $deplibs"
  1.2776 +	      if test "$hardcode_direct" != yes && \
  1.2777 +		 test "$hardcode_minus_L" != yes && \
  1.2778 +		 test "$hardcode_shlibpath_var" = yes; then
  1.2779 +		case :$finalize_shlibpath: in
  1.2780 +		*":$libdir:"*) ;;
  1.2781 +		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
  1.2782 +		esac
  1.2783 +	      fi
  1.2784 +	    fi
  1.2785 +	  fi
  1.2786 +
  1.2787 +	  if test "$linkmode" = prog || test "$mode" = relink; then
  1.2788 +	    add_shlibpath=
  1.2789 +	    add_dir=
  1.2790 +	    add=
  1.2791 +	    # Finalize command for both is simple: just hardcode it.
  1.2792 +	    if test "$hardcode_direct" = yes; then
  1.2793 +	      add="$libdir/$linklib"
  1.2794 +	    elif test "$hardcode_minus_L" = yes; then
  1.2795 +	      add_dir="-L$libdir"
  1.2796 +	      add="-l$name"
  1.2797 +	    elif test "$hardcode_shlibpath_var" = yes; then
  1.2798 +	      case :$finalize_shlibpath: in
  1.2799 +	      *":$libdir:"*) ;;
  1.2800 +	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
  1.2801 +	      esac
  1.2802 +	      add="-l$name"
  1.2803 +	    elif test "$hardcode_automatic" = yes; then
  1.2804 +	      if test -n "$inst_prefix_dir" &&
  1.2805 +		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
  1.2806 +	        add="$inst_prefix_dir$libdir/$linklib"
  1.2807 +	      else
  1.2808 +	        add="$libdir/$linklib"
  1.2809 +	      fi
  1.2810 +	    else
  1.2811 +	      # We cannot seem to hardcode it, guess we'll fake it.
  1.2812 +	      add_dir="-L$libdir"
  1.2813 +	      # Try looking first in the location we're being installed to.
  1.2814 +	      if test -n "$inst_prefix_dir"; then
  1.2815 +		case $libdir in
  1.2816 +		  [\\/]*)
  1.2817 +		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
  1.2818 +		    ;;
  1.2819 +		esac
  1.2820 +	      fi
  1.2821 +	      add="-l$name"
  1.2822 +	    fi
  1.2823 +
  1.2824 +	    if test "$linkmode" = prog; then
  1.2825 +	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
  1.2826 +	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
  1.2827 +	    else
  1.2828 +	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
  1.2829 +	      test -n "$add" && deplibs="$add $deplibs"
  1.2830 +	    fi
  1.2831 +	  fi
  1.2832 +	elif test "$linkmode" = prog; then
  1.2833 +	  # Here we assume that one of hardcode_direct or hardcode_minus_L
  1.2834 +	  # is not unsupported.  This is valid on all known static and
  1.2835 +	  # shared platforms.
  1.2836 +	  if test "$hardcode_direct" != unsupported; then
  1.2837 +	    test -n "$old_library" && linklib="$old_library"
  1.2838 +	    compile_deplibs="$dir/$linklib $compile_deplibs"
  1.2839 +	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
  1.2840 +	  else
  1.2841 +	    compile_deplibs="-l$name -L$dir $compile_deplibs"
  1.2842 +	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
  1.2843 +	  fi
  1.2844 +	elif test "$build_libtool_libs" = yes; then
  1.2845 +	  # Not a shared library
  1.2846 +	  if test "$deplibs_check_method" != pass_all; then
  1.2847 +	    # We're trying link a shared library against a static one
  1.2848 +	    # but the system doesn't support it.
  1.2849 +
  1.2850 +	    # Just print a warning and add the library to dependency_libs so
  1.2851 +	    # that the program can be linked against the static library.
  1.2852 +	    $echo
  1.2853 +	    $echo "*** Warning: This system can not link to static lib archive $lib."
  1.2854 +	    $echo "*** I have the capability to make that library automatically link in when"
  1.2855 +	    $echo "*** you link to this library.  But I can only do this if you have a"
  1.2856 +	    $echo "*** shared version of the library, which you do not appear to have."
  1.2857 +	    if test "$module" = yes; then
  1.2858 +	      $echo "*** But as you try to build a module library, libtool will still create "
  1.2859 +	      $echo "*** a static module, that should work as long as the dlopening application"
  1.2860 +	      $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
  1.2861 +	      if test -z "$global_symbol_pipe"; then
  1.2862 +		$echo
  1.2863 +		$echo "*** However, this would only work if libtool was able to extract symbol"
  1.2864 +		$echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
  1.2865 +		$echo "*** not find such a program.  So, this module is probably useless."
  1.2866 +		$echo "*** \`nm' from GNU binutils and a full rebuild may help."
  1.2867 +	      fi
  1.2868 +	      if test "$build_old_libs" = no; then
  1.2869 +		build_libtool_libs=module
  1.2870 +		build_old_libs=yes
  1.2871 +	      else
  1.2872 +		build_libtool_libs=no
  1.2873 +	      fi
  1.2874 +	    fi
  1.2875 +	  else
  1.2876 +	    deplibs="$dir/$old_library $deplibs"
  1.2877 +	    link_static=yes
  1.2878 +	  fi
  1.2879 +	fi # link shared/static library?
  1.2880 +
  1.2881 +	if test "$linkmode" = lib; then
  1.2882 +	  if test -n "$dependency_libs" &&
  1.2883 +	     { test "$hardcode_into_libs" != yes ||
  1.2884 +	       test "$build_old_libs" = yes ||
  1.2885 +	       test "$link_static" = yes; }; then
  1.2886 +	    # Extract -R from dependency_libs
  1.2887 +	    temp_deplibs=
  1.2888 +	    for libdir in $dependency_libs; do
  1.2889 +	      case $libdir in
  1.2890 +	      -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
  1.2891 +		   case " $xrpath " in
  1.2892 +		   *" $temp_xrpath "*) ;;
  1.2893 +		   *) xrpath="$xrpath $temp_xrpath";;
  1.2894 +		   esac;;
  1.2895 +	      *) temp_deplibs="$temp_deplibs $libdir";;
  1.2896 +	      esac
  1.2897 +	    done
  1.2898 +	    dependency_libs="$temp_deplibs"
  1.2899 +	  fi
  1.2900 +
  1.2901 +	  newlib_search_path="$newlib_search_path $absdir"
  1.2902 +	  # Link against this library
  1.2903 +	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
  1.2904 +	  # ... and its dependency_libs
  1.2905 +	  tmp_libs=
  1.2906 +	  for deplib in $dependency_libs; do
  1.2907 +	    newdependency_libs="$deplib $newdependency_libs"
  1.2908 +	    if test "X$duplicate_deps" = "Xyes" ; then
  1.2909 +	      case "$tmp_libs " in
  1.2910 +	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
  1.2911 +	      esac
  1.2912 +	    fi
  1.2913 +	    tmp_libs="$tmp_libs $deplib"
  1.2914 +	  done
  1.2915 +
  1.2916 +	  if test "$link_all_deplibs" != no; then
  1.2917 +	    # Add the search paths of all dependency libraries
  1.2918 +	    for deplib in $dependency_libs; do
  1.2919 +	      case $deplib in
  1.2920 +	      -L*) path="$deplib" ;;
  1.2921 +	      *.la)
  1.2922 +		dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
  1.2923 +		test "X$dir" = "X$deplib" && dir="."
  1.2924 +		# We need an absolute path.
  1.2925 +		case $dir in
  1.2926 +		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
  1.2927 +		*)
  1.2928 +		  absdir=`cd "$dir" && pwd`
  1.2929 +		  if test -z "$absdir"; then
  1.2930 +		    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
  1.2931 +		    absdir="$dir"
  1.2932 +		  fi
  1.2933 +		  ;;
  1.2934 +		esac
  1.2935 +		if grep "^installed=no" $deplib > /dev/null; then
  1.2936 +		  path="$absdir/$objdir"
  1.2937 +		else
  1.2938 +		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
  1.2939 +		  if test -z "$libdir"; then
  1.2940 +		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
  1.2941 +		    exit $EXIT_FAILURE
  1.2942 +		  fi
  1.2943 +		  if test "$absdir" != "$libdir"; then
  1.2944 +		    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
  1.2945 +		  fi
  1.2946 +		  path="$absdir"
  1.2947 +		fi
  1.2948 +		depdepl=
  1.2949 +		case $host in
  1.2950 +		*-*-darwin*)
  1.2951 +		  # we do not want to link against static libs,
  1.2952 +		  # but need to link against shared
  1.2953 +		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
  1.2954 +		  if test -n "$deplibrary_names" ; then
  1.2955 +		    for tmp in $deplibrary_names ; do
  1.2956 +		      depdepl=$tmp
  1.2957 +		    done
  1.2958 +		    if test -f "$path/$depdepl" ; then
  1.2959 +		      depdepl="$path/$depdepl"
  1.2960 +		    fi
  1.2961 +		    # do not add paths which are already there
  1.2962 +		    case " $newlib_search_path " in
  1.2963 +		    *" $path "*) ;;
  1.2964 +		    *) newlib_search_path="$newlib_search_path $path";;
  1.2965 +		    esac
  1.2966 +		  fi
  1.2967 +		  path=""
  1.2968 +		  ;;
  1.2969 +		*)
  1.2970 +		  path="-L$path"
  1.2971 +		  ;;
  1.2972 +		esac
  1.2973 +		;;
  1.2974 +	      -l*)
  1.2975 +		case $host in
  1.2976 +		*-*-darwin*)
  1.2977 +		  # Again, we only want to link against shared libraries
  1.2978 +		  eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
  1.2979 +		  for tmp in $newlib_search_path ; do
  1.2980 +		    if test -f "$tmp/lib$tmp_libs.dylib" ; then
  1.2981 +		      eval depdepl="$tmp/lib$tmp_libs.dylib"
  1.2982 +		      break
  1.2983 +		    fi
  1.2984 +		  done
  1.2985 +		  path=""
  1.2986 +		  ;;
  1.2987 +		*) continue ;;
  1.2988 +		esac
  1.2989 +		;;
  1.2990 +	      *) continue ;;
  1.2991 +	      esac
  1.2992 +	      case " $deplibs " in
  1.2993 +	      *" $path "*) ;;
  1.2994 +	      *) deplibs="$path $deplibs" ;;
  1.2995 +	      esac
  1.2996 +	      case " $deplibs " in
  1.2997 +	      *" $depdepl "*) ;;
  1.2998 +	      *) deplibs="$depdepl $deplibs" ;;
  1.2999 +	      esac
  1.3000 +	    done
  1.3001 +	  fi # link_all_deplibs != no
  1.3002 +	fi # linkmode = lib
  1.3003 +      done # for deplib in $libs
  1.3004 +      dependency_libs="$newdependency_libs"
  1.3005 +      if test "$pass" = dlpreopen; then
  1.3006 +	# Link the dlpreopened libraries before other libraries
  1.3007 +	for deplib in $save_deplibs; do
  1.3008 +	  deplibs="$deplib $deplibs"
  1.3009 +	done
  1.3010 +      fi
  1.3011 +      if test "$pass" != dlopen; then
  1.3012 +	if test "$pass" != conv; then
  1.3013 +	  # Make sure lib_search_path contains only unique directories.
  1.3014 +	  lib_search_path=
  1.3015 +	  for dir in $newlib_search_path; do
  1.3016 +	    case "$lib_search_path " in
  1.3017 +	    *" $dir "*) ;;
  1.3018 +	    *) lib_search_path="$lib_search_path $dir" ;;
  1.3019 +	    esac
  1.3020 +	  done
  1.3021 +	  newlib_search_path=
  1.3022 +	fi
  1.3023 +
  1.3024 +	if test "$linkmode,$pass" != "prog,link"; then
  1.3025 +	  vars="deplibs"
  1.3026 +	else
  1.3027 +	  vars="compile_deplibs finalize_deplibs"
  1.3028 +	fi
  1.3029 +	for var in $vars dependency_libs; do
  1.3030 +	  # Add libraries to $var in reverse order
  1.3031 +	  eval tmp_libs=\"\$$var\"
  1.3032 +	  new_libs=
  1.3033 +	  for deplib in $tmp_libs; do
  1.3034 +	    # FIXME: Pedantically, this is the right thing to do, so
  1.3035 +	    #        that some nasty dependency loop isn't accidentally
  1.3036 +	    #        broken:
  1.3037 +	    #new_libs="$deplib $new_libs"
  1.3038 +	    # Pragmatically, this seems to cause very few problems in
  1.3039 +	    # practice:
  1.3040 +	    case $deplib in
  1.3041 +	    -L*) new_libs="$deplib $new_libs" ;;
  1.3042 +	    -R*) ;;
  1.3043 +	    *)
  1.3044 +	      # And here is the reason: when a library appears more
  1.3045 +	      # than once as an explicit dependence of a library, or
  1.3046 +	      # is implicitly linked in more than once by the
  1.3047 +	      # compiler, it is considered special, and multiple
  1.3048 +	      # occurrences thereof are not removed.  Compare this
  1.3049 +	      # with having the same library being listed as a
  1.3050 +	      # dependency of multiple other libraries: in this case,
  1.3051 +	      # we know (pedantically, we assume) the library does not
  1.3052 +	      # need to be listed more than once, so we keep only the
  1.3053 +	      # last copy.  This is not always right, but it is rare
  1.3054 +	      # enough that we require users that really mean to play
  1.3055 +	      # such unportable linking tricks to link the library
  1.3056 +	      # using -Wl,-lname, so that libtool does not consider it
  1.3057 +	      # for duplicate removal.
  1.3058 +	      case " $specialdeplibs " in
  1.3059 +	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
  1.3060 +	      *)
  1.3061 +		case " $new_libs " in
  1.3062 +		*" $deplib "*) ;;
  1.3063 +		*) new_libs="$deplib $new_libs" ;;
  1.3064 +		esac
  1.3065 +		;;
  1.3066 +	      esac
  1.3067 +	      ;;
  1.3068 +	    esac
  1.3069 +	  done
  1.3070 +	  tmp_libs=
  1.3071 +	  for deplib in $new_libs; do
  1.3072 +	    case $deplib in
  1.3073 +	    -L*)
  1.3074 +	      case " $tmp_libs " in
  1.3075 +	      *" $deplib "*) ;;
  1.3076 +	      *) tmp_libs="$tmp_libs $deplib" ;;
  1.3077 +	      esac
  1.3078 +	      ;;
  1.3079 +	    *) tmp_libs="$tmp_libs $deplib" ;;
  1.3080 +	    esac
  1.3081 +	  done
  1.3082 +	  eval $var=\"$tmp_libs\"
  1.3083 +	done # for var
  1.3084 +      fi
  1.3085 +      # Last step: remove runtime libs from dependency_libs
  1.3086 +      # (they stay in deplibs)
  1.3087 +      tmp_libs=
  1.3088 +      for i in $dependency_libs ; do
  1.3089 +	case " $predeps $postdeps $compiler_lib_search_path " in
  1.3090 +	*" $i "*)
  1.3091 +	  i=""
  1.3092 +	  ;;
  1.3093 +	esac
  1.3094 +	if test -n "$i" ; then
  1.3095 +	  tmp_libs="$tmp_libs $i"
  1.3096 +	fi
  1.3097 +      done
  1.3098 +      dependency_libs=$tmp_libs
  1.3099 +    done # for pass
  1.3100 +    if test "$linkmode" = prog; then
  1.3101 +      dlfiles="$newdlfiles"
  1.3102 +      dlprefiles="$newdlprefiles"
  1.3103 +    fi
  1.3104 +
  1.3105 +    case $linkmode in
  1.3106 +    oldlib)
  1.3107 +      if test -n "$deplibs"; then
  1.3108 +	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
  1.3109 +      fi
  1.3110 +
  1.3111 +      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  1.3112 +	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
  1.3113 +      fi
  1.3114 +
  1.3115 +      if test -n "$rpath"; then
  1.3116 +	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
  1.3117 +      fi
  1.3118 +
  1.3119 +      if test -n "$xrpath"; then
  1.3120 +	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
  1.3121 +      fi
  1.3122 +
  1.3123 +      if test -n "$vinfo"; then
  1.3124 +	$echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
  1.3125 +      fi
  1.3126 +
  1.3127 +      if test -n "$release"; then
  1.3128 +	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
  1.3129 +      fi
  1.3130 +
  1.3131 +      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
  1.3132 +	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
  1.3133 +      fi
  1.3134 +
  1.3135 +      # Now set the variables for building old libraries.
  1.3136 +      build_libtool_libs=no
  1.3137 +      oldlibs="$output"
  1.3138 +      objs="$objs$old_deplibs"
  1.3139 +      ;;
  1.3140 +
  1.3141 +    lib)
  1.3142 +      # Make sure we only generate libraries of the form `libNAME.la'.
  1.3143 +      case $outputname in
  1.3144 +      lib*)
  1.3145 +	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
  1.3146 +	eval shared_ext=\"$shrext_cmds\"
  1.3147 +	eval libname=\"$libname_spec\"
  1.3148 +	;;
  1.3149 +      *)
  1.3150 +	if test "$module" = no; then
  1.3151 +	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
  1.3152 +	  $echo "$help" 1>&2
  1.3153 +	  exit $EXIT_FAILURE
  1.3154 +	fi
  1.3155 +	if test "$need_lib_prefix" != no; then
  1.3156 +	  # Add the "lib" prefix for modules if required
  1.3157 +	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
  1.3158 +	  eval shared_ext=\"$shrext_cmds\"
  1.3159 +	  eval libname=\"$libname_spec\"
  1.3160 +	else
  1.3161 +	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
  1.3162 +	fi
  1.3163 +	;;
  1.3164 +      esac
  1.3165 +
  1.3166 +      if test -n "$objs"; then
  1.3167 +	if test "$deplibs_check_method" != pass_all; then
  1.3168 +	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
  1.3169 +	  exit $EXIT_FAILURE
  1.3170 +	else
  1.3171 +	  $echo
  1.3172 +	  $echo "*** Warning: Linking the shared library $output against the non-libtool"
  1.3173 +	  $echo "*** objects $objs is not portable!"
  1.3174 +	  libobjs="$libobjs $objs"
  1.3175 +	fi
  1.3176 +      fi
  1.3177 +
  1.3178 +      if test "$dlself" != no; then
  1.3179 +	$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
  1.3180 +      fi
  1.3181 +
  1.3182 +      set dummy $rpath
  1.3183 +      if test "$#" -gt 2; then
  1.3184 +	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
  1.3185 +      fi
  1.3186 +      install_libdir="$2"
  1.3187 +
  1.3188 +      oldlibs=
  1.3189 +      if test -z "$rpath"; then
  1.3190 +	if test "$build_libtool_libs" = yes; then
  1.3191 +	  # Building a libtool convenience library.
  1.3192 +	  # Some compilers have problems with a `.al' extension so
  1.3193 +	  # convenience libraries should have the same extension an
  1.3194 +	  # archive normally would.
  1.3195 +	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
  1.3196 +	  build_libtool_libs=convenience
  1.3197 +	  build_old_libs=yes
  1.3198 +	fi
  1.3199 +
  1.3200 +	if test -n "$vinfo"; then
  1.3201 +	  $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
  1.3202 +	fi
  1.3203 +
  1.3204 +	if test -n "$release"; then
  1.3205 +	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
  1.3206 +	fi
  1.3207 +      else
  1.3208 +
  1.3209 +	# Parse the version information argument.
  1.3210 +	save_ifs="$IFS"; IFS=':'
  1.3211 +	set dummy $vinfo 0 0 0
  1.3212 +	IFS="$save_ifs"
  1.3213 +
  1.3214 +	if test -n "$8"; then
  1.3215 +	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
  1.3216 +	  $echo "$help" 1>&2
  1.3217 +	  exit $EXIT_FAILURE
  1.3218 +	fi
  1.3219 +
  1.3220 +	# convert absolute version numbers to libtool ages
  1.3221 +	# this retains compatibility with .la files and attempts
  1.3222 +	# to make the code below a bit more comprehensible
  1.3223 +
  1.3224 +	case $vinfo_number in
  1.3225 +	yes)
  1.3226 +	  number_major="$2"
  1.3227 +	  number_minor="$3"
  1.3228 +	  number_revision="$4"
  1.3229 +	  #
  1.3230 +	  # There are really only two kinds -- those that
  1.3231 +	  # use the current revision as the major version
  1.3232 +	  # and those that subtract age and use age as
  1.3233 +	  # a minor version.  But, then there is irix
  1.3234 +	  # which has an extra 1 added just for fun
  1.3235 +	  #
  1.3236 +	  case $version_type in
  1.3237 +	  darwin|linux|osf|windows|none)
  1.3238 +	    current=`expr $number_major + $number_minor`
  1.3239 +	    age="$number_minor"
  1.3240 +	    revision="$number_revision"
  1.3241 +	    ;;
  1.3242 +	  freebsd-aout|freebsd-elf|sunos)
  1.3243 +	    current="$number_major"
  1.3244 +	    revision="$number_minor"
  1.3245 +	    age="0"
  1.3246 +	    ;;
  1.3247 +	  irix|nonstopux)
  1.3248 +	    current=`expr $number_major + $number_minor`
  1.3249 +	    age="$number_minor"
  1.3250 +	    revision="$number_minor"
  1.3251 +	    lt_irix_increment=no
  1.3252 +	    ;;
  1.3253 +	  *)
  1.3254 +	    $echo "$modename: unknown library version type \`$version_type'" 1>&2
  1.3255 +	    $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
  1.3256 +	    exit $EXIT_FAILURE
  1.3257 +	    ;;
  1.3258 +	  esac
  1.3259 +	  ;;
  1.3260 +	no)
  1.3261 +	  current="$2"
  1.3262 +	  revision="$3"
  1.3263 +	  age="$4"
  1.3264 +	  ;;
  1.3265 +	esac
  1.3266 +
  1.3267 +	# Check that each of the things are valid numbers.
  1.3268 +	case $current in
  1.3269 +	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]) ;;
  1.3270 +	*)
  1.3271 +	  $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
  1.3272 +	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
  1.3273 +	  exit $EXIT_FAILURE
  1.3274 +	  ;;
  1.3275 +	esac
  1.3276 +
  1.3277 +	case $revision in
  1.3278 +	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]) ;;
  1.3279 +	*)
  1.3280 +	  $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
  1.3281 +	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
  1.3282 +	  exit $EXIT_FAILURE
  1.3283 +	  ;;
  1.3284 +	esac
  1.3285 +
  1.3286 +	case $age in
  1.3287 +	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]) ;;
  1.3288 +	*)
  1.3289 +	  $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
  1.3290 +	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
  1.3291 +	  exit $EXIT_FAILURE
  1.3292 +	  ;;
  1.3293 +	esac
  1.3294 +
  1.3295 +	if test "$age" -gt "$current"; then
  1.3296 +	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
  1.3297 +	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
  1.3298 +	  exit $EXIT_FAILURE
  1.3299 +	fi
  1.3300 +
  1.3301 +	# Calculate the version variables.
  1.3302 +	major=
  1.3303 +	versuffix=
  1.3304 +	verstring=
  1.3305 +	case $version_type in
  1.3306 +	none) ;;
  1.3307 +
  1.3308 +	darwin)
  1.3309 +	  # Like Linux, but with the current version available in
  1.3310 +	  # verstring for coding it into the library header
  1.3311 +	  major=.`expr $current - $age`
  1.3312 +	  versuffix="$major.$age.$revision"
  1.3313 +	  # Darwin ld doesn't like 0 for these options...
  1.3314 +	  minor_current=`expr $current + 1`
  1.3315 +	  xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
  1.3316 +	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
  1.3317 +	  ;;
  1.3318 +
  1.3319 +	freebsd-aout)
  1.3320 +	  major=".$current"
  1.3321 +	  versuffix=".$current.$revision";
  1.3322 +	  ;;
  1.3323 +
  1.3324 +	freebsd-elf)
  1.3325 +	  major=".$current"
  1.3326 +	  versuffix=".$current";
  1.3327 +	  ;;
  1.3328 +
  1.3329 +	irix | nonstopux)
  1.3330 +	  if test "X$lt_irix_increment" = "Xno"; then
  1.3331 +	    major=`expr $current - $age`
  1.3332 +	  else
  1.3333 +	    major=`expr $current - $age + 1`
  1.3334 +	  fi
  1.3335 +	  case $version_type in
  1.3336 +	    nonstopux) verstring_prefix=nonstopux ;;
  1.3337 +	    *)         verstring_prefix=sgi ;;
  1.3338 +	  esac
  1.3339 +	  verstring="$verstring_prefix$major.$revision"
  1.3340 +
  1.3341 +	  # Add in all the interfaces that we are compatible with.
  1.3342 +	  loop=$revision
  1.3343 +	  while test "$loop" -ne 0; do
  1.3344 +	    iface=`expr $revision - $loop`
  1.3345 +	    loop=`expr $loop - 1`
  1.3346 +	    verstring="$verstring_prefix$major.$iface:$verstring"
  1.3347 +	  done
  1.3348 +
  1.3349 +	  # Before this point, $major must not contain `.'.
  1.3350 +	  major=.$major
  1.3351 +	  versuffix="$major.$revision"
  1.3352 +	  ;;
  1.3353 +
  1.3354 +	linux)
  1.3355 +	  major=.`expr $current - $age`
  1.3356 +	  versuffix="$major.$age.$revision"
  1.3357 +	  ;;
  1.3358 +
  1.3359 +	osf)
  1.3360 +	  major=.`expr $current - $age`
  1.3361 +	  versuffix=".$current.$age.$revision"
  1.3362 +	  verstring="$current.$age.$revision"
  1.3363 +
  1.3364 +	  # Add in all the interfaces that we are compatible with.
  1.3365 +	  loop=$age
  1.3366 +	  while test "$loop" -ne 0; do
  1.3367 +	    iface=`expr $current - $loop`
  1.3368 +	    loop=`expr $loop - 1`
  1.3369 +	    verstring="$verstring:${iface}.0"
  1.3370 +	  done
  1.3371 +
  1.3372 +	  # Make executables depend on our current version.
  1.3373 +	  verstring="$verstring:${current}.0"
  1.3374 +	  ;;
  1.3375 +
  1.3376 +	sunos)
  1.3377 +	  major=".$current"
  1.3378 +	  versuffix=".$current.$revision"
  1.3379 +	  ;;
  1.3380 +
  1.3381 +	windows)
  1.3382 +	  # Use '-' rather than '.', since we only want one
  1.3383 +	  # extension on DOS 8.3 filesystems.
  1.3384 +	  major=`expr $current - $age`
  1.3385 +	  versuffix="-$major"
  1.3386 +	  ;;
  1.3387 +
  1.3388 +	*)
  1.3389 +	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
  1.3390 +	  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
  1.3391 +	  exit $EXIT_FAILURE
  1.3392 +	  ;;
  1.3393 +	esac
  1.3394 +
  1.3395 +	# Clear the version info if we defaulted, and they specified a release.
  1.3396 +	if test -z "$vinfo" && test -n "$release"; then
  1.3397 +	  major=
  1.3398 +	  case $version_type in
  1.3399 +	  darwin)
  1.3400 +	    # we can't check for "0.0" in archive_cmds due to quoting
  1.3401 +	    # problems, so we reset it completely
  1.3402 +	    verstring=
  1.3403 +	    ;;
  1.3404 +	  *)
  1.3405 +	    verstring="0.0"
  1.3406 +	    ;;
  1.3407 +	  esac
  1.3408 +	  if test "$need_version" = no; then
  1.3409 +	    versuffix=
  1.3410 +	  else
  1.3411 +	    versuffix=".0.0"
  1.3412 +	  fi
  1.3413 +	fi
  1.3414 +
  1.3415 +	# Remove version info from name if versioning should be avoided
  1.3416 +	if test "$avoid_version" = yes && test "$need_version" = no; then
  1.3417 +	  major=
  1.3418 +	  versuffix=
  1.3419 +	  verstring=""
  1.3420 +	fi
  1.3421 +
  1.3422 +	# Check to see if the archive will have undefined symbols.
  1.3423 +	if test "$allow_undefined" = yes; then
  1.3424 +	  if test "$allow_undefined_flag" = unsupported; then
  1.3425 +	    $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
  1.3426 +	    build_libtool_libs=no
  1.3427 +	    build_old_libs=yes
  1.3428 +	  fi
  1.3429 +	else
  1.3430 +	  # Don't allow undefined symbols.
  1.3431 +	  allow_undefined_flag="$no_undefined_flag"
  1.3432 +	fi
  1.3433 +      fi
  1.3434 +
  1.3435 +      if test "$mode" != relink; then
  1.3436 +	# Remove our outputs, but don't remove object files since they
  1.3437 +	# may have been created when compiling PIC objects.
  1.3438 +	removelist=
  1.3439 +	tempremovelist=`$echo "$output_objdir/*"`
  1.3440 +	for p in $tempremovelist; do
  1.3441 +	  case $p in
  1.3442 +	    *.$objext)
  1.3443 +	       ;;
  1.3444 +	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
  1.3445 +	       if test "X$precious_files_regex" != "X"; then
  1.3446 +	         if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
  1.3447 +	         then
  1.3448 +		   continue
  1.3449 +		 fi
  1.3450 +	       fi
  1.3451 +	       removelist="$removelist $p"
  1.3452 +	       ;;
  1.3453 +	    *) ;;
  1.3454 +	  esac
  1.3455 +	done
  1.3456 +	if test -n "$removelist"; then
  1.3457 +	  $show "${rm}r $removelist"
  1.3458 +	  $run ${rm}r $removelist
  1.3459 +	fi
  1.3460 +      fi
  1.3461 +
  1.3462 +      # Now set the variables for building old libraries.
  1.3463 +      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
  1.3464 +	oldlibs="$oldlibs $output_objdir/$libname.$libext"
  1.3465 +
  1.3466 +	# Transform .lo files to .o files.
  1.3467 +	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
  1.3468 +      fi
  1.3469 +
  1.3470 +      # Eliminate all temporary directories.
  1.3471 +      #for path in $notinst_path; do
  1.3472 +      #	lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
  1.3473 +      #	deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
  1.3474 +      #	dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
  1.3475 +      #done
  1.3476 +
  1.3477 +      if test -n "$xrpath"; then
  1.3478 +	# If the user specified any rpath flags, then add them.
  1.3479 +	temp_xrpath=
  1.3480 +	for libdir in $xrpath; do
  1.3481 +	  temp_xrpath="$temp_xrpath -R$libdir"
  1.3482 +	  case "$finalize_rpath " in
  1.3483 +	  *" $libdir "*) ;;
  1.3484 +	  *) finalize_rpath="$finalize_rpath $libdir" ;;
  1.3485 +	  esac
  1.3486 +	done
  1.3487 +	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
  1.3488 +	  dependency_libs="$temp_xrpath $dependency_libs"
  1.3489 +	fi
  1.3490 +      fi
  1.3491 +
  1.3492 +      # Make sure dlfiles contains only unique files that won't be dlpreopened
  1.3493 +      old_dlfiles="$dlfiles"
  1.3494 +      dlfiles=
  1.3495 +      for lib in $old_dlfiles; do
  1.3496 +	case " $dlprefiles $dlfiles " in
  1.3497 +	*" $lib "*) ;;
  1.3498 +	*) dlfiles="$dlfiles $lib" ;;
  1.3499 +	esac
  1.3500 +      done
  1.3501 +
  1.3502 +      # Make sure dlprefiles contains only unique files
  1.3503 +      old_dlprefiles="$dlprefiles"
  1.3504 +      dlprefiles=
  1.3505 +      for lib in $old_dlprefiles; do
  1.3506 +	case "$dlprefiles " in
  1.3507 +	*" $lib "*) ;;
  1.3508 +	*) dlprefiles="$dlprefiles $lib" ;;
  1.3509 +	esac
  1.3510 +      done
  1.3511 +
  1.3512 +      if test "$build_libtool_libs" = yes; then
  1.3513 +	if test -n "$rpath"; then
  1.3514 +	  case $host in
  1.3515 +	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
  1.3516 +	    # these systems don't actually have a c library (as such)!
  1.3517 +	    ;;
  1.3518 +	  *-*-rhapsody* | *-*-darwin1.[012])
  1.3519 +	    # Rhapsody C library is in the System framework
  1.3520 +	    deplibs="$deplibs -framework System"
  1.3521 +	    ;;
  1.3522 +	  *-*-netbsd*)
  1.3523 +	    # Don't link with libc until the a.out ld.so is fixed.
  1.3524 +	    ;;
  1.3525 +	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
  1.3526 +	    # Do not include libc due to us having libc/libc_r.
  1.3527 +	    ;;
  1.3528 +	  *-*-sco3.2v5* | *-*-sco5v6*)
  1.3529 +	    # Causes problems with __ctype
  1.3530 +	    ;;
  1.3531 +	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
  1.3532 +	    # Compiler inserts libc in the correct place for threads to work
  1.3533 +	    ;;
  1.3534 + 	  *)
  1.3535 +	    # Add libc to deplibs on all other systems if necessary.
  1.3536 +	    if test "$build_libtool_need_lc" = "yes"; then
  1.3537 +	      deplibs="$deplibs -lc"
  1.3538 +	    fi
  1.3539 +	    ;;
  1.3540 +	  esac
  1.3541 +	fi
  1.3542 +
  1.3543 +	# Transform deplibs into only deplibs that can be linked in shared.
  1.3544 +	name_save=$name
  1.3545 +	libname_save=$libname
  1.3546 +	release_save=$release
  1.3547 +	versuffix_save=$versuffix
  1.3548 +	major_save=$major
  1.3549 +	# I'm not sure if I'm treating the release correctly.  I think
  1.3550 +	# release should show up in the -l (ie -lgmp5) so we don't want to
  1.3551 +	# add it in twice.  Is that correct?
  1.3552 +	release=""
  1.3553 +	versuffix=""
  1.3554 +	major=""
  1.3555 +	newdeplibs=
  1.3556 +	droppeddeps=no
  1.3557 +	case $deplibs_check_method in
  1.3558 +	pass_all)
  1.3559 +	  # Don't check for shared/static.  Everything works.
  1.3560 +	  # This might be a little naive.  We might want to check
  1.3561 +	  # whether the library exists or not.  But this is on
  1.3562 +	  # osf3 & osf4 and I'm not really sure... Just
  1.3563 +	  # implementing what was already the behavior.
  1.3564 +	  newdeplibs=$deplibs
  1.3565 +	  ;;
  1.3566 +	test_compile)
  1.3567 +	  # This code stresses the "libraries are programs" paradigm to its
  1.3568 +	  # limits. Maybe even breaks it.  We compile a program, linking it
  1.3569 +	  # against the deplibs as a proxy for the library.  Then we can check
  1.3570 +	  # whether they linked in statically or dynamically with ldd.
  1.3571 +	  $rm conftest.c
  1.3572 +	  cat > conftest.c <<EOF
  1.3573 +	  int main() { return 0; }
  1.3574 +EOF
  1.3575 +	  $rm conftest
  1.3576 +	  if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
  1.3577 +	    ldd_output=`ldd conftest`
  1.3578 +	    for i in $deplibs; do
  1.3579 +	      name=`expr $i : '-l\(.*\)'`
  1.3580 +	      # If $name is empty we are operating on a -L argument.
  1.3581 +              if test "$name" != "" && test "$name" != "0"; then
  1.3582 +		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  1.3583 +		  case " $predeps $postdeps " in
  1.3584 +		  *" $i "*)
  1.3585 +		    newdeplibs="$newdeplibs $i"
  1.3586 +		    i=""
  1.3587 +		    ;;
  1.3588 +		  esac
  1.3589 +	        fi
  1.3590 +		if test -n "$i" ; then
  1.3591 +		  libname=`eval \\$echo \"$libname_spec\"`
  1.3592 +		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
  1.3593 +		  set dummy $deplib_matches
  1.3594 +		  deplib_match=$2
  1.3595 +		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
  1.3596 +		    newdeplibs="$newdeplibs $i"
  1.3597 +		  else
  1.3598 +		    droppeddeps=yes
  1.3599 +		    $echo
  1.3600 +		    $echo "*** Warning: dynamic linker does not accept needed library $i."
  1.3601 +		    $echo "*** I have the capability to make that library automatically link in when"
  1.3602 +		    $echo "*** you link to this library.  But I can only do this if you have a"
  1.3603 +		    $echo "*** shared version of the library, which I believe you do not have"
  1.3604 +		    $echo "*** because a test_compile did reveal that the linker did not use it for"
  1.3605 +		    $echo "*** its dynamic dependency list that programs get resolved with at runtime."
  1.3606 +		  fi
  1.3607 +		fi
  1.3608 +	      else
  1.3609 +		newdeplibs="$newdeplibs $i"
  1.3610 +	      fi
  1.3611 +	    done
  1.3612 +	  else
  1.3613 +	    # Error occurred in the first compile.  Let's try to salvage
  1.3614 +	    # the situation: Compile a separate program for each library.
  1.3615 +	    for i in $deplibs; do
  1.3616 +	      name=`expr $i : '-l\(.*\)'`
  1.3617 +	      # If $name is empty we are operating on a -L argument.
  1.3618 +              if test "$name" != "" && test "$name" != "0"; then
  1.3619 +		$rm conftest
  1.3620 +		if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
  1.3621 +		  ldd_output=`ldd conftest`
  1.3622 +		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  1.3623 +		    case " $predeps $postdeps " in
  1.3624 +		    *" $i "*)
  1.3625 +		      newdeplibs="$newdeplibs $i"
  1.3626 +		      i=""
  1.3627 +		      ;;
  1.3628 +		    esac
  1.3629 +		  fi
  1.3630 +		  if test -n "$i" ; then
  1.3631 +		    libname=`eval \\$echo \"$libname_spec\"`
  1.3632 +		    deplib_matches=`eval \\$echo \"$library_names_spec\"`
  1.3633 +		    set dummy $deplib_matches
  1.3634 +		    deplib_match=$2
  1.3635 +		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
  1.3636 +		      newdeplibs="$newdeplibs $i"
  1.3637 +		    else
  1.3638 +		      droppeddeps=yes
  1.3639 +		      $echo
  1.3640 +		      $echo "*** Warning: dynamic linker does not accept needed library $i."
  1.3641 +		      $echo "*** I have the capability to make that library automatically link in when"
  1.3642 +		      $echo "*** you link to this library.  But I can only do this if you have a"
  1.3643 +		      $echo "*** shared version of the library, which you do not appear to have"
  1.3644 +		      $echo "*** because a test_compile did reveal that the linker did not use this one"
  1.3645 +		      $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
  1.3646 +		    fi
  1.3647 +		  fi
  1.3648 +		else
  1.3649 +		  droppeddeps=yes
  1.3650 +		  $echo
  1.3651 +		  $echo "*** Warning!  Library $i is needed by this library but I was not able to"
  1.3652 +		  $echo "*** make it link in!  You will probably need to install it or some"
  1.3653 +		  $echo "*** library that it depends on before this library will be fully"
  1.3654 +		  $echo "*** functional.  Installing it before continuing would be even better."
  1.3655 +		fi
  1.3656 +	      else
  1.3657 +		newdeplibs="$newdeplibs $i"
  1.3658 +	      fi
  1.3659 +	    done
  1.3660 +	  fi
  1.3661 +	  ;;
  1.3662 +	file_magic*)
  1.3663 +	  set dummy $deplibs_check_method
  1.3664 +	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
  1.3665 +	  for a_deplib in $deplibs; do
  1.3666 +	    name=`expr $a_deplib : '-l\(.*\)'`
  1.3667 +	    # If $name is empty we are operating on a -L argument.
  1.3668 +            if test "$name" != "" && test  "$name" != "0"; then
  1.3669 +	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  1.3670 +		case " $predeps $postdeps " in
  1.3671 +		*" $a_deplib "*)
  1.3672 +		  newdeplibs="$newdeplibs $a_deplib"
  1.3673 +		  a_deplib=""
  1.3674 +		  ;;
  1.3675 +		esac
  1.3676 +	      fi
  1.3677 +	      if test -n "$a_deplib" ; then
  1.3678 +		libname=`eval \\$echo \"$libname_spec\"`
  1.3679 +		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
  1.3680 +		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
  1.3681 +		  for potent_lib in $potential_libs; do
  1.3682 +		      # Follow soft links.
  1.3683 +		      if ls -lLd "$potent_lib" 2>/dev/null \
  1.3684 +			 | grep " -> " >/dev/null; then
  1.3685 +			continue
  1.3686 +		      fi
  1.3687 +		      # The statement above tries to avoid entering an
  1.3688 +		      # endless loop below, in case of cyclic links.
  1.3689 +		      # We might still enter an endless loop, since a link
  1.3690 +		      # loop can be closed while we follow links,
  1.3691 +		      # but so what?
  1.3692 +		      potlib="$potent_lib"
  1.3693 +		      while test -h "$potlib" 2>/dev/null; do
  1.3694 +			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
  1.3695 +			case $potliblink in
  1.3696 +			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
  1.3697 +			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
  1.3698 +			esac
  1.3699 +		      done
  1.3700 +		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
  1.3701 +			 | ${SED} 10q \
  1.3702 +			 | $EGREP "$file_magic_regex" > /dev/null; then
  1.3703 +			newdeplibs="$newdeplibs $a_deplib"
  1.3704 +			a_deplib=""
  1.3705 +			break 2
  1.3706 +		      fi
  1.3707 +		  done
  1.3708 +		done
  1.3709 +	      fi
  1.3710 +	      if test -n "$a_deplib" ; then
  1.3711 +		droppeddeps=yes
  1.3712 +		$echo
  1.3713 +		$echo "*** Warning: linker path does not have real file for library $a_deplib."
  1.3714 +		$echo "*** I have the capability to make that library automatically link in when"
  1.3715 +		$echo "*** you link to this library.  But I can only do this if you have a"
  1.3716 +		$echo "*** shared version of the library, which you do not appear to have"
  1.3717 +		$echo "*** because I did check the linker path looking for a file starting"
  1.3718 +		if test -z "$potlib" ; then
  1.3719 +		  $echo "*** with $libname but no candidates were found. (...for file magic test)"
  1.3720 +		else
  1.3721 +		  $echo "*** with $libname and none of the candidates passed a file format test"
  1.3722 +		  $echo "*** using a file magic. Last file checked: $potlib"
  1.3723 +		fi
  1.3724 +	      fi
  1.3725 +	    else
  1.3726 +	      # Add a -L argument.
  1.3727 +	      newdeplibs="$newdeplibs $a_deplib"
  1.3728 +	    fi
  1.3729 +	  done # Gone through all deplibs.
  1.3730 +	  ;;
  1.3731 +	match_pattern*)
  1.3732 +	  set dummy $deplibs_check_method
  1.3733 +	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
  1.3734 +	  for a_deplib in $deplibs; do
  1.3735 +	    name=`expr $a_deplib : '-l\(.*\)'`
  1.3736 +	    # If $name is empty we are operating on a -L argument.
  1.3737 +	    if test -n "$name" && test "$name" != "0"; then
  1.3738 +	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  1.3739 +		case " $predeps $postdeps " in
  1.3740 +		*" $a_deplib "*)
  1.3741 +		  newdeplibs="$newdeplibs $a_deplib"
  1.3742 +		  a_deplib=""
  1.3743 +		  ;;
  1.3744 +		esac
  1.3745 +	      fi
  1.3746 +	      if test -n "$a_deplib" ; then
  1.3747 +		libname=`eval \\$echo \"$libname_spec\"`
  1.3748 +		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
  1.3749 +		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
  1.3750 +		  for potent_lib in $potential_libs; do
  1.3751 +		    potlib="$potent_lib" # see symlink-check above in file_magic test
  1.3752 +		    if eval $echo \"$potent_lib\" 2>/dev/null \
  1.3753 +		        | ${SED} 10q \
  1.3754 +		        | $EGREP "$match_pattern_regex" > /dev/null; then
  1.3755 +		      newdeplibs="$newdeplibs $a_deplib"
  1.3756 +		      a_deplib=""
  1.3757 +		      break 2
  1.3758 +		    fi
  1.3759 +		  done
  1.3760 +		done
  1.3761 +	      fi
  1.3762 +	      if test -n "$a_deplib" ; then
  1.3763 +		droppeddeps=yes
  1.3764 +		$echo
  1.3765 +		$echo "*** Warning: linker path does not have real file for library $a_deplib."
  1.3766 +		$echo "*** I have the capability to make that library automatically link in when"
  1.3767 +		$echo "*** you link to this library.  But I can only do this if you have a"
  1.3768 +		$echo "*** shared version of the library, which you do not appear to have"
  1.3769 +		$echo "*** because I did check the linker path looking for a file starting"
  1.3770 +		if test -z "$potlib" ; then
  1.3771 +		  $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
  1.3772 +		else
  1.3773 +		  $echo "*** with $libname and none of the candidates passed a file format test"
  1.3774 +		  $echo "*** using a regex pattern. Last file checked: $potlib"
  1.3775 +		fi
  1.3776 +	      fi
  1.3777 +	    else
  1.3778 +	      # Add a -L argument.
  1.3779 +	      newdeplibs="$newdeplibs $a_deplib"
  1.3780 +	    fi
  1.3781 +	  done # Gone through all deplibs.
  1.3782 +	  ;;
  1.3783 +	none | unknown | *)
  1.3784 +	  newdeplibs=""
  1.3785 +	  tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
  1.3786 +	    -e 's/ -[LR][^ ]*//g'`
  1.3787 +	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
  1.3788 +	    for i in $predeps $postdeps ; do
  1.3789 +	      # can't use Xsed below, because $i might contain '/'
  1.3790 +	      tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
  1.3791 +	    done
  1.3792 +	  fi
  1.3793 +	  if $echo "X $tmp_deplibs" | $Xsed -e 's/[ 	]//g' \
  1.3794 +	    | grep . >/dev/null; then
  1.3795 +	    $echo
  1.3796 +	    if test "X$deplibs_check_method" = "Xnone"; then
  1.3797 +	      $echo "*** Warning: inter-library dependencies are not supported in this platform."
  1.3798 +	    else
  1.3799 +	      $echo "*** Warning: inter-library dependencies are not known to be supported."
  1.3800 +	    fi
  1.3801 +	    $echo "*** All declared inter-library dependencies are being dropped."
  1.3802 +	    droppeddeps=yes
  1.3803 +	  fi
  1.3804 +	  ;;
  1.3805 +	esac
  1.3806 +	versuffix=$versuffix_save
  1.3807 +	major=$major_save
  1.3808 +	release=$release_save
  1.3809 +	libname=$libname_save
  1.3810 +	name=$name_save
  1.3811 +
  1.3812 +	case $host in
  1.3813 +	*-*-rhapsody* | *-*-darwin1.[012])
  1.3814 +	  # On Rhapsody replace the C library is the System framework
  1.3815 +	  newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
  1.3816 +	  ;;
  1.3817 +	esac
  1.3818 +
  1.3819 +	if test "$droppeddeps" = yes; then
  1.3820 +	  if test "$module" = yes; then
  1.3821 +	    $echo
  1.3822 +	    $echo "*** Warning: libtool could not satisfy all declared inter-library"
  1.3823 +	    $echo "*** dependencies of module $libname.  Therefore, libtool will create"
  1.3824 +	    $echo "*** a static module, that should work as long as the dlopening"
  1.3825 +	    $echo "*** application is linked with the -dlopen flag."
  1.3826 +	    if test -z "$global_symbol_pipe"; then
  1.3827 +	      $echo
  1.3828 +	      $echo "*** However, this would only work if libtool was able to extract symbol"
  1.3829 +	      $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
  1.3830 +	      $echo "*** not find such a program.  So, this module is probably useless."
  1.3831 +	      $echo "*** \`nm' from GNU binutils and a full rebuild may help."
  1.3832 +	    fi
  1.3833 +	    if test "$build_old_libs" = no; then
  1.3834 +	      oldlibs="$output_objdir/$libname.$libext"
  1.3835 +	      build_libtool_libs=module
  1.3836 +	      build_old_libs=yes
  1.3837 +	    else
  1.3838 +	      build_libtool_libs=no
  1.3839 +	    fi
  1.3840 +	  else
  1.3841 +	    $echo "*** The inter-library dependencies that have been dropped here will be"
  1.3842 +	    $echo "*** automatically added whenever a program is linked with this library"
  1.3843 +	    $echo "*** or is declared to -dlopen it."
  1.3844 +
  1.3845 +	    if test "$allow_undefined" = no; then
  1.3846 +	      $echo
  1.3847 +	      $echo "*** Since this library must not contain undefined symbols,"
  1.3848 +	      $echo "*** because either the platform does not support them or"
  1.3849 +	      $echo "*** it was explicitly requested with -no-undefined,"
  1.3850 +	      $echo "*** libtool will only create a static version of it."
  1.3851 +	      if test "$build_old_libs" = no; then
  1.3852 +		oldlibs="$output_objdir/$libname.$libext"
  1.3853 +		build_libtool_libs=module
  1.3854 +		build_old_libs=yes
  1.3855 +	      else
  1.3856 +		build_libtool_libs=no
  1.3857 +	      fi
  1.3858 +	    fi
  1.3859 +	  fi
  1.3860 +	fi
  1.3861 +	# Done checking deplibs!
  1.3862 +	deplibs=$newdeplibs
  1.3863 +      fi
  1.3864 +
  1.3865 +
  1.3866 +      # move library search paths that coincide with paths to not yet
  1.3867 +      # installed libraries to the beginning of the library search list
  1.3868 +      new_libs=
  1.3869 +      for path in $notinst_path; do
  1.3870 +	case " $new_libs " in
  1.3871 +	*" -L$path/$objdir "*) ;;
  1.3872 +	*)
  1.3873 +	  case " $deplibs " in
  1.3874 +	  *" -L$path/$objdir "*)
  1.3875 +	    new_libs="$new_libs -L$path/$objdir" ;;
  1.3876 +	  esac
  1.3877 +	  ;;
  1.3878 +	esac
  1.3879 +      done
  1.3880 +      for deplib in $deplibs; do
  1.3881 +	case $deplib in
  1.3882 +	-L*)
  1.3883 +	  case " $new_libs " in
  1.3884 +	  *" $deplib "*) ;;
  1.3885 +	  *) new_libs="$new_libs $deplib" ;;
  1.3886 +	  esac
  1.3887 +	  ;;
  1.3888 +	*) new_libs="$new_libs $deplib" ;;
  1.3889 +	esac
  1.3890 +      done
  1.3891 +      deplibs="$new_libs"
  1.3892 +
  1.3893 +
  1.3894 +      # All the library-specific variables (install_libdir is set above).
  1.3895 +      library_names=
  1.3896 +      old_library=
  1.3897 +      dlname=
  1.3898 +
  1.3899 +      # Test again, we may have decided not to build it any more
  1.3900 +      if test "$build_libtool_libs" = yes; then
  1.3901 +	if test "$hardcode_into_libs" = yes; then
  1.3902 +	  # Hardcode the library paths
  1.3903 +	  hardcode_libdirs=
  1.3904 +	  dep_rpath=
  1.3905 +	  rpath="$finalize_rpath"
  1.3906 +	  test "$mode" != relink && rpath="$compile_rpath$rpath"
  1.3907 +	  for libdir in $rpath; do
  1.3908 +	    if test -n "$hardcode_libdir_flag_spec"; then
  1.3909 +	      if test -n "$hardcode_libdir_separator"; then
  1.3910 +		if test -z "$hardcode_libdirs"; then
  1.3911 +		  hardcode_libdirs="$libdir"
  1.3912 +		else
  1.3913 +		  # Just accumulate the unique libdirs.
  1.3914 +		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
  1.3915 +		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
  1.3916 +		    ;;
  1.3917 +		  *)
  1.3918 +		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
  1.3919 +		    ;;
  1.3920 +		  esac
  1.3921 +		fi
  1.3922 +	      else
  1.3923 +		eval flag=\"$hardcode_libdir_flag_spec\"
  1.3924 +		dep_rpath="$dep_rpath $flag"
  1.3925 +	      fi
  1.3926 +	    elif test -n "$runpath_var"; then
  1.3927 +	      case "$perm_rpath " in
  1.3928 +	      *" $libdir "*) ;;
  1.3929 +	      *) perm_rpath="$perm_rpath $libdir" ;;
  1.3930 +	      esac
  1.3931 +	    fi
  1.3932 +	  done
  1.3933 +	  # Substitute the hardcoded libdirs into the rpath.
  1.3934 +	  if test -n "$hardcode_libdir_separator" &&
  1.3935 +	     test -n "$hardcode_libdirs"; then
  1.3936 +	    libdir="$hardcode_libdirs"
  1.3937 +	    if test -n "$hardcode_libdir_flag_spec_ld"; then
  1.3938 +	      case $archive_cmds in
  1.3939 +	      *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
  1.3940 +	      *)      eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
  1.3941 +	      esac
  1.3942 +	    else
  1.3943 +	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
  1.3944 +	    fi
  1.3945 +	  fi
  1.3946 +	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
  1.3947 +	    # We should set the runpath_var.
  1.3948 +	    rpath=
  1.3949 +	    for dir in $perm_rpath; do
  1.3950 +	      rpath="$rpath$dir:"
  1.3951 +	    done
  1.3952 +	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
  1.3953 +	  fi
  1.3954 +	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
  1.3955 +	fi
  1.3956 +
  1.3957 +	shlibpath="$finalize_shlibpath"
  1.3958 +	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
  1.3959 +	if test -n "$shlibpath"; then
  1.3960 +	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
  1.3961 +	fi
  1.3962 +
  1.3963 +	# Get the real and link names of the library.
  1.3964 +	eval shared_ext=\"$shrext_cmds\"
  1.3965 +	eval library_names=\"$library_names_spec\"
  1.3966 +	set dummy $library_names
  1.3967 +	realname="$2"
  1.3968 +	shift; shift
  1.3969 +
  1.3970 +	if test -n "$soname_spec"; then
  1.3971 +	  eval soname=\"$soname_spec\"
  1.3972 +	else
  1.3973 +	  soname="$realname"
  1.3974 +	fi
  1.3975 +	if test -z "$dlname"; then
  1.3976 +	  dlname=$soname
  1.3977 +	fi
  1.3978 +
  1.3979 +	lib="$output_objdir/$realname"
  1.3980 +	linknames=
  1.3981 +	for link
  1.3982 +	do
  1.3983 +	  linknames="$linknames $link"
  1.3984 +	done
  1.3985 +
  1.3986 +	# Use standard objects if they are pic
  1.3987 +	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  1.3988 +
  1.3989 +	# Prepare the list of exported symbols
  1.3990 +	if test -z "$export_symbols"; then
  1.3991 +	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
  1.3992 +	    $show "generating symbol list for \`$libname.la'"
  1.3993 +	    export_symbols="$output_objdir/$libname.exp"
  1.3994 +	    $run $rm $export_symbols
  1.3995 +	    cmds=$export_symbols_cmds
  1.3996 +	    save_ifs="$IFS"; IFS='~'
  1.3997 +	    for cmd in $cmds; do
  1.3998 +	      IFS="$save_ifs"
  1.3999 +	      eval cmd=\"$cmd\"
  1.4000 +	      if len=`expr "X$cmd" : ".*"` &&
  1.4001 +	       test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
  1.4002 +	        $show "$cmd"
  1.4003 +	        $run eval "$cmd" || exit $?
  1.4004 +	        skipped_export=false
  1.4005 +	      else
  1.4006 +	        # The command line is too long to execute in one step.
  1.4007 +	        $show "using reloadable object file for export list..."
  1.4008 +	        skipped_export=:
  1.4009 +		# Break out early, otherwise skipped_export may be
  1.4010 +		# set to false by a later but shorter cmd.
  1.4011 +		break
  1.4012 +	      fi
  1.4013 +	    done
  1.4014 +	    IFS="$save_ifs"
  1.4015 +	    if test -n "$export_symbols_regex"; then
  1.4016 +	      $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
  1.4017 +	      $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
  1.4018 +	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
  1.4019 +	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
  1.4020 +	    fi
  1.4021 +	  fi
  1.4022 +	fi
  1.4023 +
  1.4024 +	if test -n "$export_symbols" && test -n "$include_expsyms"; then
  1.4025 +	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
  1.4026 +	fi
  1.4027 +
  1.4028 +	tmp_deplibs=
  1.4029 +	for test_deplib in $deplibs; do
  1.4030 +		case " $convenience " in
  1.4031 +		*" $test_deplib "*) ;;
  1.4032 +		*)
  1.4033 +			tmp_deplibs="$tmp_deplibs $test_deplib"
  1.4034 +			;;
  1.4035 +		esac
  1.4036 +	done
  1.4037 +	deplibs="$tmp_deplibs"
  1.4038 +
  1.4039 +	if test -n "$convenience"; then
  1.4040 +	  if test -n "$whole_archive_flag_spec"; then
  1.4041 +	    save_libobjs=$libobjs
  1.4042 +	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
  1.4043 +	  else
  1.4044 +	    gentop="$output_objdir/${outputname}x"
  1.4045 +	    generated="$generated $gentop"
  1.4046 +
  1.4047 +	    func_extract_archives $gentop $convenience
  1.4048 +	    libobjs="$libobjs $func_extract_archives_result"
  1.4049 +	  fi
  1.4050 +	fi
  1.4051 +	
  1.4052 +	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
  1.4053 +	  eval flag=\"$thread_safe_flag_spec\"
  1.4054 +	  linker_flags="$linker_flags $flag"
  1.4055 +	fi
  1.4056 +
  1.4057 +	# Make a backup of the uninstalled library when relinking
  1.4058 +	if test "$mode" = relink; then
  1.4059 +	  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
  1.4060 +	fi
  1.4061 +
  1.4062 +	# Do each of the archive commands.
  1.4063 +	if test "$module" = yes && test -n "$module_cmds" ; then
  1.4064 +	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
  1.4065 +	    eval test_cmds=\"$module_expsym_cmds\"
  1.4066 +	    cmds=$module_expsym_cmds
  1.4067 +	  else
  1.4068 +	    eval test_cmds=\"$module_cmds\"
  1.4069 +	    cmds=$module_cmds
  1.4070 +	  fi
  1.4071 +	else
  1.4072 +	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
  1.4073 +	  eval test_cmds=\"$archive_expsym_cmds\"
  1.4074 +	  cmds=$archive_expsym_cmds
  1.4075 +	else
  1.4076 +	  eval test_cmds=\"$archive_cmds\"
  1.4077 +	  cmds=$archive_cmds
  1.4078 +	  fi
  1.4079 +	fi
  1.4080 +
  1.4081 +	if test "X$skipped_export" != "X:" &&
  1.4082 +	   len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
  1.4083 +	   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
  1.4084 +	  :
  1.4085 +	else
  1.4086 +	  # The command line is too long to link in one step, link piecewise.
  1.4087 +	  $echo "creating reloadable object files..."
  1.4088 +
  1.4089 +	  # Save the value of $output and $libobjs because we want to
  1.4090 +	  # use them later.  If we have whole_archive_flag_spec, we
  1.4091 +	  # want to use save_libobjs as it was before
  1.4092 +	  # whole_archive_flag_spec was expanded, because we can't
  1.4093 +	  # assume the linker understands whole_archive_flag_spec.
  1.4094 +	  # This may have to be revisited, in case too many
  1.4095 +	  # convenience libraries get linked in and end up exceeding
  1.4096 +	  # the spec.
  1.4097 +	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
  1.4098 +	    save_libobjs=$libobjs
  1.4099 +	  fi
  1.4100 +	  save_output=$output
  1.4101 +	  output_la=`$echo "X$output" | $Xsed -e "$basename"`
  1.4102 +
  1.4103 +	  # Clear the reloadable object creation command queue and
  1.4104 +	  # initialize k to one.
  1.4105 +	  test_cmds=
  1.4106 +	  concat_cmds=
  1.4107 +	  objlist=
  1.4108 +	  delfiles=
  1.4109 +	  last_robj=
  1.4110 +	  k=1
  1.4111 +	  output=$output_objdir/$output_la-${k}.$objext
  1.4112 +	  # Loop over the list of objects to be linked.
  1.4113 +	  for obj in $save_libobjs
  1.4114 +	  do
  1.4115 +	    eval test_cmds=\"$reload_cmds $objlist $last_robj\"
  1.4116 +	    if test "X$objlist" = X ||
  1.4117 +	       { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
  1.4118 +		 test "$len" -le "$max_cmd_len"; }; then
  1.4119 +	      objlist="$objlist $obj"
  1.4120 +	    else
  1.4121 +	      # The command $test_cmds is almost too long, add a
  1.4122 +	      # command to the queue.
  1.4123 +	      if test "$k" -eq 1 ; then
  1.4124 +		# The first file doesn't have a previous command to add.
  1.4125 +		eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
  1.4126 +	      else
  1.4127 +		# All subsequent reloadable object files will link in
  1.4128 +		# the last one created.
  1.4129 +		eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
  1.4130 +	      fi
  1.4131 +	      last_robj=$output_objdir/$output_la-${k}.$objext
  1.4132 +	      k=`expr $k + 1`
  1.4133 +	      output=$output_objdir/$output_la-${k}.$objext
  1.4134 +	      objlist=$obj
  1.4135 +	      len=1
  1.4136 +	    fi
  1.4137 +	  done
  1.4138 +	  # Handle the remaining objects by creating one last
  1.4139 +	  # reloadable object file.  All subsequent reloadable object
  1.4140 +	  # files will link in the last one created.
  1.4141 +	  test -z "$concat_cmds" || concat_cmds=$concat_cmds~
  1.4142 +	  eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
  1.4143 +
  1.4144 +	  if ${skipped_export-false}; then
  1.4145 +	    $show "generating symbol list for \`$libname.la'"
  1.4146 +	    export_symbols="$output_objdir/$libname.exp"
  1.4147 +	    $run $rm $export_symbols
  1.4148 +	    libobjs=$output
  1.4149 +	    # Append the command to create the export file.
  1.4150 +	    eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
  1.4151 +          fi
  1.4152 +
  1.4153 +	  # Set up a command to remove the reloadable object files
  1.4154 +	  # after they are used.
  1.4155 +	  i=0
  1.4156 +	  while test "$i" -lt "$k"
  1.4157 +	  do
  1.4158 +	    i=`expr $i + 1`
  1.4159 +	    delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
  1.4160 +	  done
  1.4161 +
  1.4162 +	  $echo "creating a temporary reloadable object file: $output"
  1.4163 +
  1.4164 +	  # Loop through the commands generated above and execute them.
  1.4165 +	  save_ifs="$IFS"; IFS='~'
  1.4166 +	  for cmd in $concat_cmds; do
  1.4167 +	    IFS="$save_ifs"
  1.4168 +	    $show "$cmd"
  1.4169 +	    $run eval "$cmd" || exit $?
  1.4170 +	  done
  1.4171 +	  IFS="$save_ifs"
  1.4172 +
  1.4173 +	  libobjs=$output
  1.4174 +	  # Restore the value of output.
  1.4175 +	  output=$save_output
  1.4176 +
  1.4177 +	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
  1.4178 +	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
  1.4179 +	  fi
  1.4180 +	  # Expand the library linking commands again to reset the
  1.4181 +	  # value of $libobjs for piecewise linking.
  1.4182 +
  1.4183 +	  # Do each of the archive commands.
  1.4184 +	  if test "$module" = yes && test -n "$module_cmds" ; then
  1.4185 +	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
  1.4186 +	      cmds=$module_expsym_cmds
  1.4187 +	    else
  1.4188 +	      cmds=$module_cmds
  1.4189 +	    fi
  1.4190 +	  else
  1.4191 +	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
  1.4192 +	    cmds=$archive_expsym_cmds
  1.4193 +	  else
  1.4194 +	    cmds=$archive_cmds
  1.4195 +	    fi
  1.4196 +	  fi
  1.4197 +
  1.4198 +	  # Append the command to remove the reloadable object files
  1.4199 +	  # to the just-reset $cmds.
  1.4200 +	  eval cmds=\"\$cmds~\$rm $delfiles\"
  1.4201 +	fi
  1.4202 +	save_ifs="$IFS"; IFS='~'
  1.4203 +	for cmd in $cmds; do
  1.4204 +	  IFS="$save_ifs"
  1.4205 +	  eval cmd=\"$cmd\"
  1.4206 +	  $show "$cmd"
  1.4207 +	  $run eval "$cmd" || {
  1.4208 +	    lt_exit=$?
  1.4209 +
  1.4210 +	    # Restore the uninstalled library and exit
  1.4211 +	    if test "$mode" = relink; then
  1.4212 +	      $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
  1.4213 +	    fi
  1.4214 +
  1.4215 +	    exit $lt_exit
  1.4216 +	  }
  1.4217 +	done
  1.4218 +	IFS="$save_ifs"
  1.4219 +
  1.4220 +	# Restore the uninstalled library and exit
  1.4221 +	if test "$mode" = relink; then
  1.4222 +	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
  1.4223 +
  1.4224 +	  if test -n "$convenience"; then
  1.4225 +	    if test -z "$whole_archive_flag_spec"; then
  1.4226 +	      $show "${rm}r $gentop"
  1.4227 +	      $run ${rm}r "$gentop"
  1.4228 +	    fi
  1.4229 +	  fi
  1.4230 +
  1.4231 +	  exit $EXIT_SUCCESS
  1.4232 +	fi
  1.4233 +
  1.4234 +	# Create links to the real library.
  1.4235 +	for linkname in $linknames; do
  1.4236 +	  if test "$realname" != "$linkname"; then
  1.4237 +	    $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
  1.4238 +	    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
  1.4239 +	  fi
  1.4240 +	done
  1.4241 +
  1.4242 +	# If -module or -export-dynamic was specified, set the dlname.
  1.4243 +	if test "$module" = yes || test "$export_dynamic" = yes; then
  1.4244 +	  # On all known operating systems, these are identical.
  1.4245 +	  dlname="$soname"
  1.4246 +	fi
  1.4247 +      fi
  1.4248 +      ;;
  1.4249 +
  1.4250 +    obj)
  1.4251 +      if test -n "$deplibs"; then
  1.4252 +	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
  1.4253 +      fi
  1.4254 +
  1.4255 +      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  1.4256 +	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
  1.4257 +      fi
  1.4258 +
  1.4259 +      if test -n "$rpath"; then
  1.4260 +	$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
  1.4261 +      fi
  1.4262 +
  1.4263 +      if test -n "$xrpath"; then
  1.4264 +	$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
  1.4265 +      fi
  1.4266 +
  1.4267 +      if test -n "$vinfo"; then
  1.4268 +	$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
  1.4269 +      fi
  1.4270 +
  1.4271 +      if test -n "$release"; then
  1.4272 +	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
  1.4273 +      fi
  1.4274 +
  1.4275 +      case $output in
  1.4276 +      *.lo)
  1.4277 +	if test -n "$objs$old_deplibs"; then
  1.4278 +	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
  1.4279 +	  exit $EXIT_FAILURE
  1.4280 +	fi
  1.4281 +	libobj="$output"
  1.4282 +	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
  1.4283 +	;;
  1.4284 +      *)
  1.4285 +	libobj=
  1.4286 +	obj="$output"
  1.4287 +	;;
  1.4288 +      esac
  1.4289 +
  1.4290 +      # Delete the old objects.
  1.4291 +      $run $rm $obj $libobj
  1.4292 +
  1.4293 +      # Objects from convenience libraries.  This assumes
  1.4294 +      # single-version convenience libraries.  Whenever we create
  1.4295 +      # different ones for PIC/non-PIC, this we'll have to duplicate
  1.4296 +      # the extraction.
  1.4297 +      reload_conv_objs=
  1.4298 +      gentop=
  1.4299 +      # reload_cmds runs $LD directly, so let us get rid of
  1.4300 +      # -Wl from whole_archive_flag_spec and hope we can get by with
  1.4301 +      # turning comma into space..
  1.4302 +      wl=
  1.4303 +
  1.4304 +      if test -n "$convenience"; then
  1.4305 +	if test -n "$whole_archive_flag_spec"; then
  1.4306 +	  eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
  1.4307 +	  reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
  1.4308 +	else
  1.4309 +	  gentop="$output_objdir/${obj}x"
  1.4310 +	  generated="$generated $gentop"
  1.4311 +
  1.4312 +	  func_extract_archives $gentop $convenience
  1.4313 +	  reload_conv_objs="$reload_objs $func_extract_archives_result"
  1.4314 +	fi
  1.4315 +      fi
  1.4316 +
  1.4317 +      # Create the old-style object.
  1.4318 +      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
  1.4319 +
  1.4320 +      output="$obj"
  1.4321 +      cmds=$reload_cmds
  1.4322 +      save_ifs="$IFS"; IFS='~'
  1.4323 +      for cmd in $cmds; do
  1.4324 +	IFS="$save_ifs"
  1.4325 +	eval cmd=\"$cmd\"
  1.4326 +	$show "$cmd"
  1.4327 +	$run eval "$cmd" || exit $?
  1.4328 +      done
  1.4329 +      IFS="$save_ifs"
  1.4330 +
  1.4331 +      # Exit if we aren't doing a library object file.
  1.4332 +      if test -z "$libobj"; then
  1.4333 +	if test -n "$gentop"; then
  1.4334 +	  $show "${rm}r $gentop"
  1.4335 +	  $run ${rm}r $gentop
  1.4336 +	fi
  1.4337 +
  1.4338 +	exit $EXIT_SUCCESS
  1.4339 +      fi
  1.4340 +
  1.4341 +      if test "$build_libtool_libs" != yes; then
  1.4342 +	if test -n "$gentop"; then
  1.4343 +	  $show "${rm}r $gentop"
  1.4344 +	  $run ${rm}r $gentop
  1.4345 +	fi
  1.4346 +
  1.4347 +	# Create an invalid libtool object if no PIC, so that we don't
  1.4348 +	# accidentally link it into a program.
  1.4349 +	# $show "echo timestamp > $libobj"
  1.4350 +	# $run eval "echo timestamp > $libobj" || exit $?
  1.4351 +	exit $EXIT_SUCCESS
  1.4352 +      fi
  1.4353 +
  1.4354 +      if test -n "$pic_flag" || test "$pic_mode" != default; then
  1.4355 +	# Only do commands if we really have different PIC objects.
  1.4356 +	reload_objs="$libobjs $reload_conv_objs"
  1.4357 +	output="$libobj"
  1.4358 +	cmds=$reload_cmds
  1.4359 +	save_ifs="$IFS"; IFS='~'
  1.4360 +	for cmd in $cmds; do
  1.4361 +	  IFS="$save_ifs"
  1.4362 +	  eval cmd=\"$cmd\"
  1.4363 +	  $show "$cmd"
  1.4364 +	  $run eval "$cmd" || exit $?
  1.4365 +	done
  1.4366 +	IFS="$save_ifs"
  1.4367 +      fi
  1.4368 +
  1.4369 +      if test -n "$gentop"; then
  1.4370 +	$show "${rm}r $gentop"
  1.4371 +	$run ${rm}r $gentop
  1.4372 +      fi
  1.4373 +
  1.4374 +      exit $EXIT_SUCCESS
  1.4375 +      ;;
  1.4376 +
  1.4377 +    prog)
  1.4378 +      case $host in
  1.4379 +	*cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
  1.4380 +      esac
  1.4381 +      if test -n "$vinfo"; then
  1.4382 +	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
  1.4383 +      fi
  1.4384 +
  1.4385 +      if test -n "$release"; then
  1.4386 +	$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
  1.4387 +      fi
  1.4388 +
  1.4389 +      if test "$preload" = yes; then
  1.4390 +	if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
  1.4391 +	   test "$dlopen_self_static" = unknown; then
  1.4392 +	  $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
  1.4393 +	fi
  1.4394 +      fi
  1.4395 +
  1.4396 +      case $host in
  1.4397 +      *-*-rhapsody* | *-*-darwin1.[012])
  1.4398 +	# On Rhapsody replace the C library is the System framework
  1.4399 +	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
  1.4400 +	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
  1.4401 +	;;
  1.4402 +      esac
  1.4403 +
  1.4404 +      case $host in
  1.4405 +      *darwin*)
  1.4406 +        # Don't allow lazy linking, it breaks C++ global constructors
  1.4407 +        if test "$tagname" = CXX ; then
  1.4408 +        compile_command="$compile_command ${wl}-bind_at_load"
  1.4409 +        finalize_command="$finalize_command ${wl}-bind_at_load"
  1.4410 +        fi
  1.4411 +        ;;
  1.4412 +      esac
  1.4413 +
  1.4414 +
  1.4415 +      # move library search paths that coincide with paths to not yet
  1.4416 +      # installed libraries to the beginning of the library search list
  1.4417 +      new_libs=
  1.4418 +      for path in $notinst_path; do
  1.4419 +	case " $new_libs " in
  1.4420 +	*" -L$path/$objdir "*) ;;
  1.4421 +	*)
  1.4422 +	  case " $compile_deplibs " in
  1.4423 +	  *" -L$path/$objdir "*)
  1.4424 +	    new_libs="$new_libs -L$path/$objdir" ;;
  1.4425 +	  esac
  1.4426 +	  ;;
  1.4427 +	esac
  1.4428 +      done
  1.4429 +      for deplib in $compile_deplibs; do
  1.4430 +	case $deplib in
  1.4431 +	-L*)
  1.4432 +	  case " $new_libs " in
  1.4433 +	  *" $deplib "*) ;;
  1.4434 +	  *) new_libs="$new_libs $deplib" ;;
  1.4435 +	  esac
  1.4436 +	  ;;
  1.4437 +	*) new_libs="$new_libs $deplib" ;;
  1.4438 +	esac
  1.4439 +      done
  1.4440 +      compile_deplibs="$new_libs"
  1.4441 +
  1.4442 +
  1.4443 +      compile_command="$compile_command $compile_deplibs"
  1.4444 +      finalize_command="$finalize_command $finalize_deplibs"
  1.4445 +
  1.4446 +      if test -n "$rpath$xrpath"; then
  1.4447 +	# If the user specified any rpath flags, then add them.
  1.4448 +	for libdir in $rpath $xrpath; do
  1.4449 +	  # This is the magic to use -rpath.
  1.4450 +	  case "$finalize_rpath " in
  1.4451 +	  *" $libdir "*) ;;
  1.4452 +	  *) finalize_rpath="$finalize_rpath $libdir" ;;
  1.4453 +	  esac
  1.4454 +	done
  1.4455 +      fi
  1.4456 +
  1.4457 +      # Now hardcode the library paths
  1.4458 +      rpath=
  1.4459 +      hardcode_libdirs=
  1.4460 +      for libdir in $compile_rpath $finalize_rpath; do
  1.4461 +	if test -n "$hardcode_libdir_flag_spec"; then
  1.4462 +	  if test -n "$hardcode_libdir_separator"; then
  1.4463 +	    if test -z "$hardcode_libdirs"; then
  1.4464 +	      hardcode_libdirs="$libdir"
  1.4465 +	    else
  1.4466 +	      # Just accumulate the unique libdirs.
  1.4467 +	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
  1.4468 +	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
  1.4469 +		;;
  1.4470 +	      *)
  1.4471 +		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
  1.4472 +		;;
  1.4473 +	      esac
  1.4474 +	    fi
  1.4475 +	  else
  1.4476 +	    eval flag=\"$hardcode_libdir_flag_spec\"
  1.4477 +	    rpath="$rpath $flag"
  1.4478 +	  fi
  1.4479 +	elif test -n "$runpath_var"; then
  1.4480 +	  case "$perm_rpath " in
  1.4481 +	  *" $libdir "*) ;;
  1.4482 +	  *) perm_rpath="$perm_rpath $libdir" ;;
  1.4483 +	  esac
  1.4484 +	fi
  1.4485 +	case $host in
  1.4486 +	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
  1.4487 +	  testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
  1.4488 +	  case :$dllsearchpath: in
  1.4489 +	  *":$libdir:"*) ;;
  1.4490 +	  *) dllsearchpath="$dllsearchpath:$libdir";;
  1.4491 +	  esac
  1.4492 +	  case :$dllsearchpath: in
  1.4493 +	  *":$testbindir:"*) ;;
  1.4494 +	  *) dllsearchpath="$dllsearchpath:$testbindir";;
  1.4495 +	  esac
  1.4496 +	  ;;
  1.4497 +	esac
  1.4498 +      done
  1.4499 +      # Substitute the hardcoded libdirs into the rpath.
  1.4500 +      if test -n "$hardcode_libdir_separator" &&
  1.4501 +	 test -n "$hardcode_libdirs"; then
  1.4502 +	libdir="$hardcode_libdirs"
  1.4503 +	eval rpath=\" $hardcode_libdir_flag_spec\"
  1.4504 +      fi
  1.4505 +      compile_rpath="$rpath"
  1.4506 +
  1.4507 +      rpath=
  1.4508 +      hardcode_libdirs=
  1.4509 +      for libdir in $finalize_rpath; do
  1.4510 +	if test -n "$hardcode_libdir_flag_spec"; then
  1.4511 +	  if test -n "$hardcode_libdir_separator"; then
  1.4512 +	    if test -z "$hardcode_libdirs"; then
  1.4513 +	      hardcode_libdirs="$libdir"
  1.4514 +	    else
  1.4515 +	      # Just accumulate the unique libdirs.
  1.4516 +	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
  1.4517 +	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
  1.4518 +		;;
  1.4519 +	      *)
  1.4520 +		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
  1.4521 +		;;
  1.4522 +	      esac
  1.4523 +	    fi
  1.4524 +	  else
  1.4525 +	    eval flag=\"$hardcode_libdir_flag_spec\"
  1.4526 +	    rpath="$rpath $flag"
  1.4527 +	  fi
  1.4528 +	elif test -n "$runpath_var"; then
  1.4529 +	  case "$finalize_perm_rpath " in
  1.4530 +	  *" $libdir "*) ;;
  1.4531 +	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
  1.4532 +	  esac
  1.4533 +	fi
  1.4534 +      done
  1.4535 +      # Substitute the hardcoded libdirs into the rpath.
  1.4536 +      if test -n "$hardcode_libdir_separator" &&
  1.4537 +	 test -n "$hardcode_libdirs"; then
  1.4538 +	libdir="$hardcode_libdirs"
  1.4539 +	eval rpath=\" $hardcode_libdir_flag_spec\"
  1.4540 +      fi
  1.4541 +      finalize_rpath="$rpath"
  1.4542 +
  1.4543 +      if test -n "$libobjs" && test "$build_old_libs" = yes; then
  1.4544 +	# Transform all the library objects into standard objects.
  1.4545 +	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  1.4546 +	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  1.4547 +      fi
  1.4548 +
  1.4549 +      dlsyms=
  1.4550 +      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  1.4551 +	if test -n "$NM" && test -n "$global_symbol_pipe"; then
  1.4552 +	  dlsyms="${outputname}S.c"
  1.4553 +	else
  1.4554 +	  $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
  1.4555 +	fi
  1.4556 +      fi
  1.4557 +
  1.4558 +      if test -n "$dlsyms"; then
  1.4559 +	case $dlsyms in
  1.4560 +	"") ;;
  1.4561 +	*.c)
  1.4562 +	  # Discover the nlist of each of the dlfiles.
  1.4563 +	  nlist="$output_objdir/${outputname}.nm"
  1.4564 +
  1.4565 +	  $show "$rm $nlist ${nlist}S ${nlist}T"
  1.4566 +	  $run $rm "$nlist" "${nlist}S" "${nlist}T"
  1.4567 +
  1.4568 +	  # Parse the name list into a source file.
  1.4569 +	  $show "creating $output_objdir/$dlsyms"
  1.4570 +
  1.4571 +	  test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
  1.4572 +/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
  1.4573 +/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
  1.4574 +
  1.4575 +#ifdef __cplusplus
  1.4576 +extern \"C\" {
  1.4577 +#endif
  1.4578 +
  1.4579 +/* Prevent the only kind of declaration conflicts we can make. */
  1.4580 +#define lt_preloaded_symbols some_other_symbol
  1.4581 +
  1.4582 +/* External symbol declarations for the compiler. */\
  1.4583 +"
  1.4584 +
  1.4585 +	  if test "$dlself" = yes; then
  1.4586 +	    $show "generating symbol list for \`$output'"
  1.4587 +
  1.4588 +	    test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
  1.4589 +
  1.4590 +	    # Add our own program objects to the symbol list.
  1.4591 +	    progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  1.4592 +	    for arg in $progfiles; do
  1.4593 +	      $show "extracting global C symbols from \`$arg'"
  1.4594 +	      $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
  1.4595 +	    done
  1.4596 +
  1.4597 +	    if test -n "$exclude_expsyms"; then
  1.4598 +	      $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
  1.4599 +	      $run eval '$mv "$nlist"T "$nlist"'
  1.4600 +	    fi
  1.4601 +
  1.4602 +	    if test -n "$export_symbols_regex"; then
  1.4603 +	      $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
  1.4604 +	      $run eval '$mv "$nlist"T "$nlist"'
  1.4605 +	    fi
  1.4606 +
  1.4607 +	    # Prepare the list of exported symbols
  1.4608 +	    if test -z "$export_symbols"; then
  1.4609 +	      export_symbols="$output_objdir/$outputname.exp"
  1.4610 +	      $run $rm $export_symbols
  1.4611 +	      $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
  1.4612 +              case $host in
  1.4613 +              *cygwin* | *mingw* )
  1.4614 +	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
  1.4615 +		$run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
  1.4616 +                ;;
  1.4617 +              esac
  1.4618 +	    else
  1.4619 +	      $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
  1.4620 +	      $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
  1.4621 +	      $run eval 'mv "$nlist"T "$nlist"'
  1.4622 +              case $host in
  1.4623 +              *cygwin* | *mingw* )
  1.4624 +	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
  1.4625 +		$run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
  1.4626 +                ;;
  1.4627 +              esac
  1.4628 +	    fi
  1.4629 +	  fi
  1.4630 +
  1.4631 +	  for arg in $dlprefiles; do
  1.4632 +	    $show "extracting global C symbols from \`$arg'"
  1.4633 +	    name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
  1.4634 +	    $run eval '$echo ": $name " >> "$nlist"'
  1.4635 +	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
  1.4636 +	  done
  1.4637 +
  1.4638 +	  if test -z "$run"; then
  1.4639 +	    # Make sure we have at least an empty file.
  1.4640 +	    test -f "$nlist" || : > "$nlist"
  1.4641 +
  1.4642 +	    if test -n "$exclude_expsyms"; then
  1.4643 +	      $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
  1.4644 +	      $mv "$nlist"T "$nlist"
  1.4645 +	    fi
  1.4646 +
  1.4647 +	    # Try sorting and uniquifying the output.
  1.4648 +	    if grep -v "^: " < "$nlist" |
  1.4649 +		if sort -k 3 </dev/null >/dev/null 2>&1; then
  1.4650 +		  sort -k 3
  1.4651 +		else
  1.4652 +		  sort +2
  1.4653 +		fi |
  1.4654 +		uniq > "$nlist"S; then
  1.4655 +	      :
  1.4656 +	    else
  1.4657 +	      grep -v "^: " < "$nlist" > "$nlist"S
  1.4658 +	    fi
  1.4659 +
  1.4660 +	    if test -f "$nlist"S; then
  1.4661 +	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
  1.4662 +	    else
  1.4663 +	      $echo '/* NONE */' >> "$output_objdir/$dlsyms"
  1.4664 +	    fi
  1.4665 +
  1.4666 +	    $echo >> "$output_objdir/$dlsyms" "\
  1.4667 +
  1.4668 +#undef lt_preloaded_symbols
  1.4669 +
  1.4670 +#if defined (__STDC__) && __STDC__
  1.4671 +# define lt_ptr void *
  1.4672 +#else
  1.4673 +# define lt_ptr char *
  1.4674 +# define const
  1.4675 +#endif
  1.4676 +
  1.4677 +/* The mapping between symbol names and symbols. */
  1.4678 +"
  1.4679 +
  1.4680 +	    case $host in
  1.4681 +	    *cygwin* | *mingw* )
  1.4682 +	  $echo >> "$output_objdir/$dlsyms" "\
  1.4683 +/* DATA imports from DLLs on WIN32 can't be const, because
  1.4684 +   runtime relocations are performed -- see ld's documentation
  1.4685 +   on pseudo-relocs */
  1.4686 +struct {
  1.4687 +"
  1.4688 +	      ;;
  1.4689 +	    * )
  1.4690 +	  $echo >> "$output_objdir/$dlsyms" "\
  1.4691 +const struct {
  1.4692 +"
  1.4693 +	      ;;
  1.4694 +	    esac
  1.4695 +
  1.4696 +
  1.4697 +	  $echo >> "$output_objdir/$dlsyms" "\
  1.4698 +  const char *name;
  1.4699 +  lt_ptr address;
  1.4700 +}
  1.4701 +lt_preloaded_symbols[] =
  1.4702 +{\
  1.4703 +"
  1.4704 +
  1.4705 +	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
  1.4706 +
  1.4707 +	    $echo >> "$output_objdir/$dlsyms" "\
  1.4708 +  {0, (lt_ptr) 0}
  1.4709 +};
  1.4710 +
  1.4711 +/* This works around a problem in FreeBSD linker */
  1.4712 +#ifdef FREEBSD_WORKAROUND
  1.4713 +static const void *lt_preloaded_setup() {
  1.4714 +  return lt_preloaded_symbols;
  1.4715 +}
  1.4716 +#endif
  1.4717 +
  1.4718 +#ifdef __cplusplus
  1.4719 +}
  1.4720 +#endif\
  1.4721 +"
  1.4722 +	  fi
  1.4723 +
  1.4724 +	  pic_flag_for_symtable=
  1.4725 +	  case $host in
  1.4726 +	  # compiling the symbol table file with pic_flag works around
  1.4727 +	  # a FreeBSD bug that causes programs to crash when -lm is
  1.4728 +	  # linked before any other PIC object.  But we must not use
  1.4729 +	  # pic_flag when linking with -static.  The problem exists in
  1.4730 +	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
  1.4731 +	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
  1.4732 +	    case "$compile_command " in
  1.4733 +	    *" -static "*) ;;
  1.4734 +	    *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
  1.4735 +	    esac;;
  1.4736 +	  *-*-hpux*)
  1.4737 +	    case "$compile_command " in
  1.4738 +	    *" -static "*) ;;
  1.4739 +	    *) pic_flag_for_symtable=" $pic_flag";;
  1.4740 +	    esac
  1.4741 +	  esac
  1.4742 +
  1.4743 +	  # Now compile the dynamic symbol file.
  1.4744 +	  $show "(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
  1.4745 +	  $run eval '(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
  1.4746 +
  1.4747 +	  # Clean up the generated files.
  1.4748 +	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
  1.4749 +	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
  1.4750 +
  1.4751 +	  # Transform the symbol file into the correct name.
  1.4752 +          case $host in
  1.4753 +          *cygwin* | *mingw* )
  1.4754 +            if test -f "$output_objdir/${outputname}.def" ; then
  1.4755 +              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
  1.4756 +              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
  1.4757 +            else
  1.4758 +              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
  1.4759 +              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
  1.4760 +             fi
  1.4761 +            ;;
  1.4762 +          * )
  1.4763 +            compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
  1.4764 +            finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
  1.4765 +            ;;
  1.4766 +          esac
  1.4767 +	  ;;
  1.4768 +	*)
  1.4769 +	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
  1.4770 +	  exit $EXIT_FAILURE
  1.4771 +	  ;;
  1.4772 +	esac
  1.4773 +      else
  1.4774 +	# We keep going just in case the user didn't refer to
  1.4775 +	# lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
  1.4776 +	# really was required.
  1.4777 +
  1.4778 +	# Nullify the symbol file.
  1.4779 +	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
  1.4780 +	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
  1.4781 +      fi
  1.4782 +
  1.4783 +      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
  1.4784 +	# Replace the output file specification.
  1.4785 +	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
  1.4786 +	link_command="$compile_command$compile_rpath"
  1.4787 +
  1.4788 +	# We have no uninstalled library dependencies, so finalize right now.
  1.4789 +	$show "$link_command"
  1.4790 +	$run eval "$link_command"
  1.4791 +	exit_status=$?
  1.4792 +
  1.4793 +	# Delete the generated files.
  1.4794 +	if test -n "$dlsyms"; then
  1.4795 +	  $show "$rm $output_objdir/${outputname}S.${objext}"
  1.4796 +	  $run $rm "$output_objdir/${outputname}S.${objext}"
  1.4797 +	fi
  1.4798 +
  1.4799 +	exit $exit_status
  1.4800 +      fi
  1.4801 +
  1.4802 +      if test -n "$shlibpath_var"; then
  1.4803 +	# We should set the shlibpath_var
  1.4804 +	rpath=
  1.4805 +	for dir in $temp_rpath; do
  1.4806 +	  case $dir in
  1.4807 +	  [\\/]* | [A-Za-z]:[\\/]*)
  1.4808 +	    # Absolute path.
  1.4809 +	    rpath="$rpath$dir:"
  1.4810 +	    ;;
  1.4811 +	  *)
  1.4812 +	    # Relative path: add a thisdir entry.
  1.4813 +	    rpath="$rpath\$thisdir/$dir:"
  1.4814 +	    ;;
  1.4815 +	  esac
  1.4816 +	done
  1.4817 +	temp_rpath="$rpath"
  1.4818 +      fi
  1.4819 +
  1.4820 +      if test -n "$compile_shlibpath$finalize_shlibpath"; then
  1.4821 +	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
  1.4822 +      fi
  1.4823 +      if test -n "$finalize_shlibpath"; then
  1.4824 +	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
  1.4825 +      fi
  1.4826 +
  1.4827 +      compile_var=
  1.4828 +      finalize_var=
  1.4829 +      if test -n "$runpath_var"; then
  1.4830 +	if test -n "$perm_rpath"; then
  1.4831 +	  # We should set the runpath_var.
  1.4832 +	  rpath=
  1.4833 +	  for dir in $perm_rpath; do
  1.4834 +	    rpath="$rpath$dir:"
  1.4835 +	  done
  1.4836 +	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
  1.4837 +	fi
  1.4838 +	if test -n "$finalize_perm_rpath"; then
  1.4839 +	  # We should set the runpath_var.
  1.4840 +	  rpath=
  1.4841 +	  for dir in $finalize_perm_rpath; do
  1.4842 +	    rpath="$rpath$dir:"
  1.4843 +	  done
  1.4844 +	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
  1.4845 +	fi
  1.4846 +      fi
  1.4847 +
  1.4848 +      if test "$no_install" = yes; then
  1.4849 +	# We don't need to create a wrapper script.
  1.4850 +	link_command="$compile_var$compile_command$compile_rpath"
  1.4851 +	# Replace the output file specification.
  1.4852 +	link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
  1.4853 +	# Delete the old output file.
  1.4854 +	$run $rm $output
  1.4855 +	# Link the executable and exit
  1.4856 +	$show "$link_command"
  1.4857 +	$run eval "$link_command" || exit $?
  1.4858 +	exit $EXIT_SUCCESS
  1.4859 +      fi
  1.4860 +
  1.4861 +      if test "$hardcode_action" = relink; then
  1.4862 +	# Fast installation is not supported
  1.4863 +	link_command="$compile_var$compile_command$compile_rpath"
  1.4864 +	relink_command="$finalize_var$finalize_command$finalize_rpath"
  1.4865 +
  1.4866 +	$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
  1.4867 +	$echo "$modename: \`$output' will be relinked during installation" 1>&2
  1.4868 +      else
  1.4869 +	if test "$fast_install" != no; then
  1.4870 +	  link_command="$finalize_var$compile_command$finalize_rpath"
  1.4871 +	  if test "$fast_install" = yes; then
  1.4872 +	    relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
  1.4873 +	  else
  1.4874 +	    # fast_install is set to needless
  1.4875 +	    relink_command=
  1.4876 +	  fi
  1.4877 +	else
  1.4878 +	  link_command="$compile_var$compile_command$compile_rpath"
  1.4879 +	  relink_command="$finalize_var$finalize_command$finalize_rpath"
  1.4880 +	fi
  1.4881 +      fi
  1.4882 +
  1.4883 +      # Replace the output file specification.
  1.4884 +      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
  1.4885 +
  1.4886 +      # Delete the old output files.
  1.4887 +      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
  1.4888 +
  1.4889 +      $show "$link_command"
  1.4890 +      $run eval "$link_command" || exit $?
  1.4891 +
  1.4892 +      # Now create the wrapper script.
  1.4893 +      $show "creating $output"
  1.4894 +
  1.4895 +      # Quote the relink command for shipping.
  1.4896 +      if test -n "$relink_command"; then
  1.4897 +	# Preserve any variables that may affect compiler behavior
  1.4898 +	for var in $variables_saved_for_relink; do
  1.4899 +	  if eval test -z \"\${$var+set}\"; then
  1.4900 +	    relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
  1.4901 +	  elif eval var_value=\$$var; test -z "$var_value"; then
  1.4902 +	    relink_command="$var=; export $var; $relink_command"
  1.4903 +	  else
  1.4904 +	    var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
  1.4905 +	    relink_command="$var=\"$var_value\"; export $var; $relink_command"
  1.4906 +	  fi
  1.4907 +	done
  1.4908 +	relink_command="(cd `pwd`; $relink_command)"
  1.4909 +	relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
  1.4910 +      fi
  1.4911 +
  1.4912 +      # Quote $echo for shipping.
  1.4913 +      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
  1.4914 +	case $progpath in
  1.4915 +	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
  1.4916 +	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
  1.4917 +	esac
  1.4918 +	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
  1.4919 +      else
  1.4920 +	qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
  1.4921 +      fi
  1.4922 +
  1.4923 +      # Only actually do things if our run command is non-null.
  1.4924 +      if test -z "$run"; then
  1.4925 +	# win32 will think the script is a binary if it has
  1.4926 +	# a .exe suffix, so we strip it off here.
  1.4927 +	case $output in
  1.4928 +	  *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
  1.4929 +	esac
  1.4930 +	# test for cygwin because mv fails w/o .exe extensions
  1.4931 +	case $host in
  1.4932 +	  *cygwin*)
  1.4933 +	    exeext=.exe
  1.4934 +	    outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
  1.4935 +	  *) exeext= ;;
  1.4936 +	esac
  1.4937 +	case $host in
  1.4938 +	  *cygwin* | *mingw* )
  1.4939 +            output_name=`basename $output`
  1.4940 +            output_path=`dirname $output`
  1.4941 +            cwrappersource="$output_path/$objdir/lt-$output_name.c"
  1.4942 +            cwrapper="$output_path/$output_name.exe"
  1.4943 +            $rm $cwrappersource $cwrapper
  1.4944 +            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
  1.4945 +
  1.4946 +	    cat > $cwrappersource <<EOF
  1.4947 +
  1.4948 +/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
  1.4949 +   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
  1.4950 +
  1.4951 +   The $output program cannot be directly executed until all the libtool
  1.4952 +   libraries that it depends on are installed.
  1.4953 +
  1.4954 +   This wrapper executable should never be moved out of the build directory.
  1.4955 +   If it is, it will not operate correctly.
  1.4956 +
  1.4957 +   Currently, it simply execs the wrapper *script* "/bin/sh $output",
  1.4958 +   but could eventually absorb all of the scripts functionality and
  1.4959 +   exec $objdir/$outputname directly.
  1.4960 +*/
  1.4961 +EOF
  1.4962 +	    cat >> $cwrappersource<<"EOF"
  1.4963 +#include <stdio.h>
  1.4964 +#include <stdlib.h>
  1.4965 +#include <unistd.h>
  1.4966 +#include <malloc.h>
  1.4967 +#include <stdarg.h>
  1.4968 +#include <assert.h>
  1.4969 +#include <string.h>
  1.4970 +#include <ctype.h>
  1.4971 +#include <sys/stat.h>
  1.4972 +
  1.4973 +#if defined(PATH_MAX)
  1.4974 +# define LT_PATHMAX PATH_MAX
  1.4975 +#elif defined(MAXPATHLEN)
  1.4976 +# define LT_PATHMAX MAXPATHLEN
  1.4977 +#else
  1.4978 +# define LT_PATHMAX 1024
  1.4979 +#endif
  1.4980 +
  1.4981 +#ifndef DIR_SEPARATOR
  1.4982 +# define DIR_SEPARATOR '/'
  1.4983 +# define PATH_SEPARATOR ':'
  1.4984 +#endif
  1.4985 +
  1.4986 +#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
  1.4987 +  defined (__OS2__)
  1.4988 +# define HAVE_DOS_BASED_FILE_SYSTEM
  1.4989 +# ifndef DIR_SEPARATOR_2
  1.4990 +#  define DIR_SEPARATOR_2 '\\'
  1.4991 +# endif
  1.4992 +# ifndef PATH_SEPARATOR_2
  1.4993 +#  define PATH_SEPARATOR_2 ';'
  1.4994 +# endif
  1.4995 +#endif
  1.4996 +
  1.4997 +#ifndef DIR_SEPARATOR_2
  1.4998 +# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
  1.4999 +#else /* DIR_SEPARATOR_2 */
  1.5000 +# define IS_DIR_SEPARATOR(ch) \
  1.5001 +        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
  1.5002 +#endif /* DIR_SEPARATOR_2 */
  1.5003 +
  1.5004 +#ifndef PATH_SEPARATOR_2
  1.5005 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
  1.5006 +#else /* PATH_SEPARATOR_2 */
  1.5007 +# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
  1.5008 +#endif /* PATH_SEPARATOR_2 */
  1.5009 +
  1.5010 +#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
  1.5011 +#define XFREE(stale) do { \
  1.5012 +  if (stale) { free ((void *) stale); stale = 0; } \
  1.5013 +} while (0)
  1.5014 +
  1.5015 +/* -DDEBUG is fairly common in CFLAGS.  */
  1.5016 +#undef DEBUG
  1.5017 +#if defined DEBUGWRAPPER
  1.5018 +# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
  1.5019 +#else
  1.5020 +# define DEBUG(format, ...)
  1.5021 +#endif
  1.5022 +
  1.5023 +const char *program_name = NULL;
  1.5024 +
  1.5025 +void * xmalloc (size_t num);
  1.5026 +char * xstrdup (const char *string);
  1.5027 +const char * base_name (const char *name);
  1.5028 +char * find_executable(const char *wrapper);
  1.5029 +int    check_executable(const char *path);
  1.5030 +char * strendzap(char *str, const char *pat);
  1.5031 +void lt_fatal (const char *message, ...);
  1.5032 +
  1.5033 +int
  1.5034 +main (int argc, char *argv[])
  1.5035 +{
  1.5036 +  char **newargz;
  1.5037 +  int i;
  1.5038 +
  1.5039 +  program_name = (char *) xstrdup (base_name (argv[0]));
  1.5040 +  DEBUG("(main) argv[0]      : %s\n",argv[0]);
  1.5041 +  DEBUG("(main) program_name : %s\n",program_name);
  1.5042 +  newargz = XMALLOC(char *, argc+2);
  1.5043 +EOF
  1.5044 +
  1.5045 +            cat >> $cwrappersource <<EOF
  1.5046 +  newargz[0] = (char *) xstrdup("$SHELL");
  1.5047 +EOF
  1.5048 +
  1.5049 +            cat >> $cwrappersource <<"EOF"
  1.5050 +  newargz[1] = find_executable(argv[0]);
  1.5051 +  if (newargz[1] == NULL)
  1.5052 +    lt_fatal("Couldn't find %s", argv[0]);
  1.5053 +  DEBUG("(main) found exe at : %s\n",newargz[1]);
  1.5054 +  /* we know the script has the same name, without the .exe */
  1.5055 +  /* so make sure newargz[1] doesn't end in .exe */
  1.5056 +  strendzap(newargz[1],".exe");
  1.5057 +  for (i = 1; i < argc; i++)
  1.5058 +    newargz[i+1] = xstrdup(argv[i]);
  1.5059 +  newargz[argc+1] = NULL;
  1.5060 +
  1.5061 +  for (i=0; i<argc+1; i++)
  1.5062 +  {
  1.5063 +    DEBUG("(main) newargz[%d]   : %s\n",i,newargz[i]);
  1.5064 +    ;
  1.5065 +  }
  1.5066 +
  1.5067 +EOF
  1.5068 +
  1.5069 +            case $host_os in
  1.5070 +              mingw*)
  1.5071 +                cat >> $cwrappersource <<EOF
  1.5072 +  execv("$SHELL",(char const **)newargz);
  1.5073 +EOF
  1.5074 +              ;;
  1.5075 +              *)
  1.5076 +                cat >> $cwrappersource <<EOF
  1.5077 +  execv("$SHELL",newargz);
  1.5078 +EOF
  1.5079 +              ;;
  1.5080 +            esac
  1.5081 +
  1.5082 +            cat >> $cwrappersource <<"EOF"
  1.5083 +  return 127;
  1.5084 +}
  1.5085 +
  1.5086 +void *
  1.5087 +xmalloc (size_t num)
  1.5088 +{
  1.5089 +  void * p = (void *) malloc (num);
  1.5090 +  if (!p)
  1.5091 +    lt_fatal ("Memory exhausted");
  1.5092 +
  1.5093 +  return p;
  1.5094 +}
  1.5095 +
  1.5096 +char *
  1.5097 +xstrdup (const char *string)
  1.5098 +{
  1.5099 +  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
  1.5100 +;
  1.5101 +}
  1.5102 +
  1.5103 +const char *
  1.5104 +base_name (const char *name)
  1.5105 +{
  1.5106 +  const char *base;
  1.5107 +
  1.5108 +#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
  1.5109 +  /* Skip over the disk name in MSDOS pathnames. */
  1.5110 +  if (isalpha ((unsigned char)name[0]) && name[1] == ':')
  1.5111 +    name += 2;
  1.5112 +#endif
  1.5113 +
  1.5114 +  for (base = name; *name; name++)
  1.5115 +    if (IS_DIR_SEPARATOR (*name))
  1.5116 +      base = name + 1;
  1.5117 +  return base;
  1.5118 +}
  1.5119 +
  1.5120 +int
  1.5121 +check_executable(const char * path)
  1.5122 +{
  1.5123 +  struct stat st;
  1.5124 +
  1.5125 +  DEBUG("(check_executable)  : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
  1.5126 +  if ((!path) || (!*path))
  1.5127 +    return 0;
  1.5128 +
  1.5129 +  if ((stat (path, &st) >= 0) &&
  1.5130 +      (
  1.5131 +        /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
  1.5132 +#if defined (S_IXOTH)
  1.5133 +       ((st.st_mode & S_IXOTH) == S_IXOTH) ||
  1.5134 +#endif
  1.5135 +#if defined (S_IXGRP)
  1.5136 +       ((st.st_mode & S_IXGRP) == S_IXGRP) ||
  1.5137 +#endif
  1.5138 +       ((st.st_mode & S_IXUSR) == S_IXUSR))
  1.5139 +      )
  1.5140 +    return 1;
  1.5141 +  else
  1.5142 +    return 0;
  1.5143 +}
  1.5144 +
  1.5145 +/* Searches for the full path of the wrapper.  Returns
  1.5146 +   newly allocated full path name if found, NULL otherwise */
  1.5147 +char *
  1.5148 +find_executable (const char* wrapper)
  1.5149 +{
  1.5150 +  int has_slash = 0;
  1.5151 +  const char* p;
  1.5152 +  const char* p_next;
  1.5153 +  /* static buffer for getcwd */
  1.5154 +  char tmp[LT_PATHMAX + 1];
  1.5155 +  int tmp_len;
  1.5156 +  char* concat_name;
  1.5157 +
  1.5158 +  DEBUG("(find_executable)  : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
  1.5159 +
  1.5160 +  if ((wrapper == NULL) || (*wrapper == '\0'))
  1.5161 +    return NULL;
  1.5162 +
  1.5163 +  /* Absolute path? */
  1.5164 +#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
  1.5165 +  if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
  1.5166 +  {
  1.5167 +    concat_name = xstrdup (wrapper);
  1.5168 +    if (check_executable(concat_name))
  1.5169 +      return concat_name;
  1.5170 +    XFREE(concat_name);
  1.5171 +  }
  1.5172 +  else
  1.5173 +  {
  1.5174 +#endif
  1.5175 +    if (IS_DIR_SEPARATOR (wrapper[0]))
  1.5176 +    {
  1.5177 +      concat_name = xstrdup (wrapper);
  1.5178 +      if (check_executable(concat_name))
  1.5179 +        return concat_name;
  1.5180 +      XFREE(concat_name);
  1.5181 +    }
  1.5182 +#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
  1.5183 +  }
  1.5184 +#endif
  1.5185 +
  1.5186 +  for (p = wrapper; *p; p++)
  1.5187 +    if (*p == '/')
  1.5188 +    {
  1.5189 +      has_slash = 1;
  1.5190 +      break;
  1.5191 +    }
  1.5192 +  if (!has_slash)
  1.5193 +  {
  1.5194 +    /* no slashes; search PATH */
  1.5195 +    const char* path = getenv ("PATH");
  1.5196 +    if (path != NULL)
  1.5197 +    {
  1.5198 +      for (p = path; *p; p = p_next)
  1.5199 +      {
  1.5200 +        const char* q;
  1.5201 +        size_t p_len;
  1.5202 +        for (q = p; *q; q++)
  1.5203 +          if (IS_PATH_SEPARATOR(*q))
  1.5204 +            break;
  1.5205 +        p_len = q - p;
  1.5206 +        p_next = (*q == '\0' ? q : q + 1);
  1.5207 +        if (p_len == 0)
  1.5208 +        {
  1.5209 +          /* empty path: current directory */
  1.5210 +          if (getcwd (tmp, LT_PATHMAX) == NULL)
  1.5211 +            lt_fatal ("getcwd failed");
  1.5212 +          tmp_len = strlen(tmp);
  1.5213 +          concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
  1.5214 +          memcpy (concat_name, tmp, tmp_len);
  1.5215 +          concat_name[tmp_len] = '/';
  1.5216 +          strcpy (concat_name + tmp_len + 1, wrapper);
  1.5217 +        }
  1.5218 +        else
  1.5219 +        {
  1.5220 +          concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
  1.5221 +          memcpy (concat_name, p, p_len);
  1.5222 +          concat_name[p_len] = '/';
  1.5223 +          strcpy (concat_name + p_len + 1, wrapper);
  1.5224 +        }
  1.5225 +        if (check_executable(concat_name))
  1.5226 +          return concat_name;
  1.5227 +        XFREE(concat_name);
  1.5228 +      }
  1.5229 +    }
  1.5230 +    /* not found in PATH; assume curdir */
  1.5231 +  }
  1.5232 +  /* Relative path | not found in path: prepend cwd */
  1.5233 +  if (getcwd (tmp, LT_PATHMAX) == NULL)
  1.5234 +    lt_fatal ("getcwd failed");
  1.5235 +  tmp_len = strlen(tmp);
  1.5236 +  concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
  1.5237 +  memcpy (concat_name, tmp, tmp_len);
  1.5238 +  concat_name[tmp_len] = '/';
  1.5239 +  strcpy (concat_name + tmp_len + 1, wrapper);
  1.5240 +
  1.5241 +  if (check_executable(concat_name))
  1.5242 +    return concat_name;
  1.5243 +  XFREE(concat_name);
  1.5244 +  return NULL;
  1.5245 +}
  1.5246 +
  1.5247 +char *
  1.5248 +strendzap(char *str, const char *pat)
  1.5249 +{
  1.5250 +  size_t len, patlen;
  1.5251 +
  1.5252 +  assert(str != NULL);
  1.5253 +  assert(pat != NULL);
  1.5254 +
  1.5255 +  len = strlen(str);
  1.5256 +  patlen = strlen(pat);
  1.5257 +
  1.5258 +  if (patlen <= len)
  1.5259 +  {
  1.5260 +    str += len - patlen;
  1.5261 +    if (strcmp(str, pat) == 0)
  1.5262 +      *str = '\0';
  1.5263 +  }
  1.5264 +  return str;
  1.5265 +}
  1.5266 +
  1.5267 +static void
  1.5268 +lt_error_core (int exit_status, const char * mode,
  1.5269 +          const char * message, va_list ap)
  1.5270 +{
  1.5271 +  fprintf (stderr, "%s: %s: ", program_name, mode);
  1.5272 +  vfprintf (stderr, message, ap);
  1.5273 +  fprintf (stderr, ".\n");
  1.5274 +
  1.5275 +  if (exit_status >= 0)
  1.5276 +    exit (exit_status);
  1.5277 +}
  1.5278 +
  1.5279 +void
  1.5280 +lt_fatal (const char *message, ...)
  1.5281 +{
  1.5282 +  va_list ap;
  1.5283 +  va_start (ap, message);
  1.5284 +  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
  1.5285 +  va_end (ap);
  1.5286 +}
  1.5287 +EOF
  1.5288 +          # we should really use a build-platform specific compiler
  1.5289 +          # here, but OTOH, the wrappers (shell script and this C one)
  1.5290 +          # are only useful if you want to execute the "real" binary.
  1.5291 +          # Since the "real" binary is built for $host, then this
  1.5292 +          # wrapper might as well be built for $host, too.
  1.5293 +          $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
  1.5294 +          ;;
  1.5295 +        esac
  1.5296 +        $rm $output
  1.5297 +        trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
  1.5298 +
  1.5299 +	$echo > $output "\
  1.5300 +#! $SHELL
  1.5301 +
  1.5302 +# $output - temporary wrapper script for $objdir/$outputname
  1.5303 +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
  1.5304 +#
  1.5305 +# The $output program cannot be directly executed until all the libtool
  1.5306 +# libraries that it depends on are installed.
  1.5307 +#
  1.5308 +# This wrapper script should never be moved out of the build directory.
  1.5309 +# If it is, it will not operate correctly.
  1.5310 +
  1.5311 +# Sed substitution that helps us do robust quoting.  It backslashifies
  1.5312 +# metacharacters that are still active within double-quoted strings.
  1.5313 +Xsed='${SED} -e 1s/^X//'
  1.5314 +sed_quote_subst='$sed_quote_subst'
  1.5315 +
  1.5316 +# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
  1.5317 +if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
  1.5318 +  emulate sh
  1.5319 +  NULLCMD=:
  1.5320 +  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
  1.5321 +  # is contrary to our usage.  Disable this feature.
  1.5322 +  alias -g '\${1+\"\$@\"}'='\"\$@\"'
  1.5323 +  setopt NO_GLOB_SUBST
  1.5324 +else
  1.5325 +  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
  1.5326 +fi
  1.5327 +BIN_SH=xpg4; export BIN_SH # for Tru64
  1.5328 +DUALCASE=1; export DUALCASE # for MKS sh
  1.5329 +
  1.5330 +# The HP-UX ksh and POSIX shell print the target directory to stdout
  1.5331 +# if CDPATH is set.
  1.5332 +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
  1.5333 +
  1.5334 +relink_command=\"$relink_command\"
  1.5335 +
  1.5336 +# This environment variable determines our operation mode.
  1.5337 +if test \"\$libtool_install_magic\" = \"$magic\"; then
  1.5338 +  # install mode needs the following variable:
  1.5339 +  notinst_deplibs='$notinst_deplibs'
  1.5340 +else
  1.5341 +  # When we are sourced in execute mode, \$file and \$echo are already set.
  1.5342 +  if test \"\$libtool_execute_magic\" != \"$magic\"; then
  1.5343 +    echo=\"$qecho\"
  1.5344 +    file=\"\$0\"
  1.5345 +    # Make sure echo works.
  1.5346 +    if test \"X\$1\" = X--no-reexec; then
  1.5347 +      # Discard the --no-reexec flag, and continue.
  1.5348 +      shift
  1.5349 +    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
  1.5350 +      # Yippee, \$echo works!
  1.5351 +      :
  1.5352 +    else
  1.5353 +      # Restart under the correct shell, and then maybe \$echo will work.
  1.5354 +      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
  1.5355 +    fi
  1.5356 +  fi\
  1.5357 +"
  1.5358 +	$echo >> $output "\
  1.5359 +
  1.5360 +  # Find the directory that this script lives in.
  1.5361 +  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
  1.5362 +  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
  1.5363 +
  1.5364 +  # Follow symbolic links until we get to the real thisdir.
  1.5365 +  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
  1.5366 +  while test -n \"\$file\"; do
  1.5367 +    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
  1.5368 +
  1.5369 +    # If there was a directory component, then change thisdir.
  1.5370 +    if test \"x\$destdir\" != \"x\$file\"; then
  1.5371 +      case \"\$destdir\" in
  1.5372 +      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
  1.5373 +      *) thisdir=\"\$thisdir/\$destdir\" ;;
  1.5374 +      esac
  1.5375 +    fi
  1.5376 +
  1.5377 +    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
  1.5378 +    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
  1.5379 +  done
  1.5380 +
  1.5381 +  # Try to get the absolute directory name.
  1.5382 +  absdir=\`cd \"\$thisdir\" && pwd\`
  1.5383 +  test -n \"\$absdir\" && thisdir=\"\$absdir\"
  1.5384 +"
  1.5385 +
  1.5386 +	if test "$fast_install" = yes; then
  1.5387 +	  $echo >> $output "\
  1.5388 +  program=lt-'$outputname'$exeext
  1.5389 +  progdir=\"\$thisdir/$objdir\"
  1.5390 +
  1.5391 +  if test ! -f \"\$progdir/\$program\" || \\
  1.5392 +     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
  1.5393 +       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
  1.5394 +
  1.5395 +    file=\"\$\$-\$program\"
  1.5396 +
  1.5397 +    if test ! -d \"\$progdir\"; then
  1.5398 +      $mkdir \"\$progdir\"
  1.5399 +    else
  1.5400 +      $rm \"\$progdir/\$file\"
  1.5401 +    fi"
  1.5402 +
  1.5403 +	  $echo >> $output "\
  1.5404 +
  1.5405 +    # relink executable if necessary
  1.5406 +    if test -n \"\$relink_command\"; then
  1.5407 +      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
  1.5408 +      else
  1.5409 +	$echo \"\$relink_command_output\" >&2
  1.5410 +	$rm \"\$progdir/\$file\"
  1.5411 +	exit $EXIT_FAILURE
  1.5412 +      fi
  1.5413 +    fi
  1.5414 +
  1.5415 +    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
  1.5416 +    { $rm \"\$progdir/\$program\";
  1.5417 +      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
  1.5418 +    $rm \"\$progdir/\$file\"
  1.5419 +  fi"
  1.5420 +	else
  1.5421 +	  $echo >> $output "\
  1.5422 +  program='$outputname'
  1.5423 +  progdir=\"\$thisdir/$objdir\"
  1.5424 +"
  1.5425 +	fi
  1.5426 +
  1.5427 +	$echo >> $output "\
  1.5428 +
  1.5429 +  if test -f \"\$progdir/\$program\"; then"
  1.5430 +
  1.5431 +	# Export our shlibpath_var if we have one.
  1.5432 +	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
  1.5433 +	  $echo >> $output "\
  1.5434 +    # Add our own library path to $shlibpath_var
  1.5435 +    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
  1.5436 +
  1.5437 +    # Some systems cannot cope with colon-terminated $shlibpath_var
  1.5438 +    # The second colon is a workaround for a bug in BeOS R4 sed
  1.5439 +    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
  1.5440 +
  1.5441 +    export $shlibpath_var
  1.5442 +"
  1.5443 +	fi
  1.5444 +
  1.5445 +	# fixup the dll searchpath if we need to.
  1.5446 +	if test -n "$dllsearchpath"; then
  1.5447 +	  $echo >> $output "\
  1.5448 +    # Add the dll search path components to the executable PATH
  1.5449 +    PATH=$dllsearchpath:\$PATH
  1.5450 +"
  1.5451 +	fi
  1.5452 +
  1.5453 +	$echo >> $output "\
  1.5454 +    if test \"\$libtool_execute_magic\" != \"$magic\"; then
  1.5455 +      # Run the actual program with our arguments.
  1.5456 +"
  1.5457 +	case $host in
  1.5458 +	# Backslashes separate directories on plain windows
  1.5459 +	*-*-mingw | *-*-os2*)
  1.5460 +	  $echo >> $output "\
  1.5461 +      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
  1.5462 +"
  1.5463 +	  ;;
  1.5464 +
  1.5465 +	*)
  1.5466 +	  $echo >> $output "\
  1.5467 +      exec \"\$progdir/\$program\" \${1+\"\$@\"}
  1.5468 +"
  1.5469 +	  ;;
  1.5470 +	esac
  1.5471 +	$echo >> $output "\
  1.5472 +      \$echo \"\$0: cannot exec \$program \$*\"
  1.5473 +      exit $EXIT_FAILURE
  1.5474 +    fi
  1.5475 +  else
  1.5476 +    # The program doesn't exist.
  1.5477 +    \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
  1.5478 +    \$echo \"This script is just a wrapper for \$program.\" 1>&2
  1.5479 +    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
  1.5480 +    exit $EXIT_FAILURE
  1.5481 +  fi
  1.5482 +fi\
  1.5483 +"
  1.5484 +	chmod +x $output
  1.5485 +      fi
  1.5486 +      exit $EXIT_SUCCESS
  1.5487 +      ;;
  1.5488 +    esac
  1.5489 +
  1.5490 +    # See if we need to build an old-fashioned archive.
  1.5491 +    for oldlib in $oldlibs; do
  1.5492 +
  1.5493 +      if test "$build_libtool_libs" = convenience; then
  1.5494 +	oldobjs="$libobjs_save"
  1.5495 +	addlibs="$convenience"
  1.5496 +	build_libtool_libs=no
  1.5497 +      else
  1.5498 +	if test "$build_libtool_libs" = module; then
  1.5499 +	  oldobjs="$libobjs_save"
  1.5500 +	  build_libtool_libs=no
  1.5501 +	else
  1.5502 +	  oldobjs="$old_deplibs $non_pic_objects"
  1.5503 +	fi
  1.5504 +	addlibs="$old_convenience"
  1.5505 +      fi
  1.5506 +
  1.5507 +      if test -n "$addlibs"; then
  1.5508 +	gentop="$output_objdir/${outputname}x"
  1.5509 +	generated="$generated $gentop"
  1.5510 +
  1.5511 +	func_extract_archives $gentop $addlibs
  1.5512 +	oldobjs="$oldobjs $func_extract_archives_result"
  1.5513 +      fi
  1.5514 +
  1.5515 +      # Do each command in the archive commands.
  1.5516 +      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
  1.5517 +       cmds=$old_archive_from_new_cmds
  1.5518 +      else
  1.5519 +	# POSIX demands no paths to be encoded in archives.  We have
  1.5520 +	# to avoid creating archives with duplicate basenames if we
  1.5521 +	# might have to extract them afterwards, e.g., when creating a
  1.5522 +	# static archive out of a convenience library, or when linking
  1.5523 +	# the entirety of a libtool archive into another (currently
  1.5524 +	# not supported by libtool).
  1.5525 +	if (for obj in $oldobjs
  1.5526 +	    do
  1.5527 +	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
  1.5528 +	    done | sort | sort -uc >/dev/null 2>&1); then
  1.5529 +	  :
  1.5530 +	else
  1.5531 +	  $echo "copying selected object files to avoid basename conflicts..."
  1.5532 +
  1.5533 +	  if test -z "$gentop"; then
  1.5534 +	    gentop="$output_objdir/${outputname}x"
  1.5535 +	    generated="$generated $gentop"
  1.5536 +
  1.5537 +	    $show "${rm}r $gentop"
  1.5538 +	    $run ${rm}r "$gentop"
  1.5539 +	    $show "$mkdir $gentop"
  1.5540 +	    $run $mkdir "$gentop"
  1.5541 +	    exit_status=$?
  1.5542 +	    if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
  1.5543 +	      exit $exit_status
  1.5544 +	    fi
  1.5545 +	  fi
  1.5546 +
  1.5547 +	  save_oldobjs=$oldobjs
  1.5548 +	  oldobjs=
  1.5549 +	  counter=1
  1.5550 +	  for obj in $save_oldobjs
  1.5551 +	  do
  1.5552 +	    objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
  1.5553 +	    case " $oldobjs " in
  1.5554 +	    " ") oldobjs=$obj ;;
  1.5555 +	    *[\ /]"$objbase "*)
  1.5556 +	      while :; do
  1.5557 +		# Make sure we don't pick an alternate name that also
  1.5558 +		# overlaps.
  1.5559 +		newobj=lt$counter-$objbase
  1.5560 +		counter=`expr $counter + 1`
  1.5561 +		case " $oldobjs " in
  1.5562 +		*[\ /]"$newobj "*) ;;
  1.5563 +		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
  1.5564 +		esac
  1.5565 +	      done
  1.5566 +	      $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
  1.5567 +	      $run ln "$obj" "$gentop/$newobj" ||
  1.5568 +	      $run cp "$obj" "$gentop/$newobj"
  1.5569 +	      oldobjs="$oldobjs $gentop/$newobj"
  1.5570 +	      ;;
  1.5571 +	    *) oldobjs="$oldobjs $obj" ;;
  1.5572 +	    esac
  1.5573 +	  done
  1.5574 +	fi
  1.5575 +
  1.5576 +	eval cmds=\"$old_archive_cmds\"
  1.5577 +
  1.5578 +	if len=`expr "X$cmds" : ".*"` &&
  1.5579 +	     test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
  1.5580 +	  cmds=$old_archive_cmds
  1.5581 +	else
  1.5582 +	  # the command line is too long to link in one step, link in parts
  1.5583 +	  $echo "using piecewise archive linking..."
  1.5584 +	  save_RANLIB=$RANLIB
  1.5585 +	  RANLIB=:
  1.5586 +	  objlist=
  1.5587 +	  concat_cmds=
  1.5588 +	  save_oldobjs=$oldobjs
  1.5589 +
  1.5590 +	  # Is there a better way of finding the last object in the list?
  1.5591 +	  for obj in $save_oldobjs
  1.5592 +	  do
  1.5593 +	    last_oldobj=$obj
  1.5594 +	  done
  1.5595 +	  for obj in $save_oldobjs
  1.5596 +	  do
  1.5597 +	    oldobjs="$objlist $obj"
  1.5598 +	    objlist="$objlist $obj"
  1.5599 +	    eval test_cmds=\"$old_archive_cmds\"
  1.5600 +	    if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
  1.5601 +	       test "$len" -le "$max_cmd_len"; then
  1.5602 +	      :
  1.5603 +	    else
  1.5604 +	      # the above command should be used before it gets too long
  1.5605 +	      oldobjs=$objlist
  1.5606 +	      if test "$obj" = "$last_oldobj" ; then
  1.5607 +	        RANLIB=$save_RANLIB
  1.5608 +	      fi
  1.5609 +	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
  1.5610 +	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
  1.5611 +	      objlist=
  1.5612 +	    fi
  1.5613 +	  done
  1.5614 +	  RANLIB=$save_RANLIB
  1.5615 +	  oldobjs=$objlist
  1.5616 +	  if test "X$oldobjs" = "X" ; then
  1.5617 +	    eval cmds=\"\$concat_cmds\"
  1.5618 +	  else
  1.5619 +	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
  1.5620 +	  fi
  1.5621 +	fi
  1.5622 +      fi
  1.5623 +      save_ifs="$IFS"; IFS='~'
  1.5624 +      for cmd in $cmds; do
  1.5625 +        eval cmd=\"$cmd\"
  1.5626 +	IFS="$save_ifs"
  1.5627 +	$show "$cmd"
  1.5628 +	$run eval "$cmd" || exit $?
  1.5629 +      done
  1.5630 +      IFS="$save_ifs"
  1.5631 +    done
  1.5632 +
  1.5633 +    if test -n "$generated"; then
  1.5634 +      $show "${rm}r$generated"
  1.5635 +      $run ${rm}r$generated
  1.5636 +    fi
  1.5637 +
  1.5638 +    # Now create the libtool archive.
  1.5639 +    case $output in
  1.5640 +    *.la)
  1.5641 +      old_library=
  1.5642 +      test "$build_old_libs" = yes && old_library="$libname.$libext"
  1.5643 +      $show "creating $output"
  1.5644 +
  1.5645 +      # Preserve any variables that may affect compiler behavior
  1.5646 +      for var in $variables_saved_for_relink; do
  1.5647 +	if eval test -z \"\${$var+set}\"; then
  1.5648 +	  relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
  1.5649 +	elif eval var_value=\$$var; test -z "$var_value"; then
  1.5650 +	  relink_command="$var=; export $var; $relink_command"
  1.5651 +	else
  1.5652 +	  var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
  1.5653 +	  relink_command="$var=\"$var_value\"; export $var; $relink_command"
  1.5654 +	fi
  1.5655 +      done
  1.5656 +      # Quote the link command for shipping.
  1.5657 +      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
  1.5658 +      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
  1.5659 +      if test "$hardcode_automatic" = yes ; then
  1.5660 +	relink_command=
  1.5661 +      fi
  1.5662 +
  1.5663 +
  1.5664 +      # Only create the output if not a dry run.
  1.5665 +      if test -z "$run"; then
  1.5666 +	for installed in no yes; do
  1.5667 +	  if test "$installed" = yes; then
  1.5668 +	    if test -z "$install_libdir"; then
  1.5669 +	      break
  1.5670 +	    fi
  1.5671 +	    output="$output_objdir/$outputname"i
  1.5672 +	    # Replace all uninstalled libtool libraries with the installed ones
  1.5673 +	    newdependency_libs=
  1.5674 +	    for deplib in $dependency_libs; do
  1.5675 +	      case $deplib in
  1.5676 +	      *.la)
  1.5677 +		name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
  1.5678 +		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
  1.5679 +		if test -z "$libdir"; then
  1.5680 +		  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
  1.5681 +		  exit $EXIT_FAILURE
  1.5682 +		fi
  1.5683 +		newdependency_libs="$newdependency_libs $libdir/$name"
  1.5684 +		;;
  1.5685 +	      *) newdependency_libs="$newdependency_libs $deplib" ;;
  1.5686 +	      esac
  1.5687 +	    done
  1.5688 +	    dependency_libs="$newdependency_libs"
  1.5689 +	    newdlfiles=
  1.5690 +	    for lib in $dlfiles; do
  1.5691 +	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
  1.5692 +	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
  1.5693 +	      if test -z "$libdir"; then
  1.5694 +		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
  1.5695 +		exit $EXIT_FAILURE
  1.5696 +	      fi
  1.5697 +	      newdlfiles="$newdlfiles $libdir/$name"
  1.5698 +	    done
  1.5699 +	    dlfiles="$newdlfiles"
  1.5700 +	    newdlprefiles=
  1.5701 +	    for lib in $dlprefiles; do
  1.5702 +	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
  1.5703 +	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
  1.5704 +	      if test -z "$libdir"; then
  1.5705 +		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
  1.5706 +		exit $EXIT_FAILURE
  1.5707 +	      fi
  1.5708 +	      newdlprefiles="$newdlprefiles $libdir/$name"
  1.5709 +	    done
  1.5710 +	    dlprefiles="$newdlprefiles"
  1.5711 +	  else
  1.5712 +	    newdlfiles=
  1.5713 +	    for lib in $dlfiles; do
  1.5714 +	      case $lib in
  1.5715 +		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
  1.5716 +		*) abs=`pwd`"/$lib" ;;
  1.5717 +	      esac
  1.5718 +	      newdlfiles="$newdlfiles $abs"
  1.5719 +	    done
  1.5720 +	    dlfiles="$newdlfiles"
  1.5721 +	    newdlprefiles=
  1.5722 +	    for lib in $dlprefiles; do
  1.5723 +	      case $lib in
  1.5724 +		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
  1.5725 +		*) abs=`pwd`"/$lib" ;;
  1.5726 +	      esac
  1.5727 +	      newdlprefiles="$newdlprefiles $abs"
  1.5728 +	    done
  1.5729 +	    dlprefiles="$newdlprefiles"
  1.5730 +	  fi
  1.5731 +	  $rm $output
  1.5732 +	  # place dlname in correct position for cygwin
  1.5733 +	  tdlname=$dlname
  1.5734 +	  case $host,$output,$installed,$module,$dlname in
  1.5735 +	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
  1.5736 +	  esac
  1.5737 +	  $echo > $output "\
  1.5738 +# $outputname - a libtool library file
  1.5739 +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
  1.5740 +#
  1.5741 +# Please DO NOT delete this file!
  1.5742 +# It is necessary for linking the library.
  1.5743 +
  1.5744 +# The name that we can dlopen(3).
  1.5745 +dlname='$tdlname'
  1.5746 +
  1.5747 +# Names of this library.
  1.5748 +library_names='$library_names'
  1.5749 +
  1.5750 +# The name of the static archive.
  1.5751 +old_library='$old_library'
  1.5752 +
  1.5753 +# Libraries that this one depends upon.
  1.5754 +dependency_libs='$dependency_libs'
  1.5755 +
  1.5756 +# Version information for $libname.
  1.5757 +current=$current
  1.5758 +age=$age
  1.5759 +revision=$revision
  1.5760 +
  1.5761 +# Is this an already installed library?
  1.5762 +installed=$installed
  1.5763 +
  1.5764 +# Should we warn about portability when linking against -modules?
  1.5765 +shouldnotlink=$module
  1.5766 +
  1.5767 +# Files to dlopen/dlpreopen
  1.5768 +dlopen='$dlfiles'
  1.5769 +dlpreopen='$dlprefiles'
  1.5770 +
  1.5771 +# Directory that this library needs to be installed in:
  1.5772 +libdir='$install_libdir'"
  1.5773 +	  if test "$installed" = no && test "$need_relink" = yes; then
  1.5774 +	    $echo >> $output "\
  1.5775 +relink_command=\"$relink_command\""
  1.5776 +	  fi
  1.5777 +	done
  1.5778 +      fi
  1.5779 +
  1.5780 +      # Do a symbolic link so that the libtool archive can be found in
  1.5781 +      # LD_LIBRARY_PATH before the program is installed.
  1.5782 +      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
  1.5783 +      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
  1.5784 +      ;;
  1.5785 +    esac
  1.5786 +    exit $EXIT_SUCCESS
  1.5787 +    ;;
  1.5788 +
  1.5789 +  # libtool install mode
  1.5790 +  install)
  1.5791 +    modename="$modename: install"
  1.5792 +
  1.5793 +    # There may be an optional sh(1) argument at the beginning of
  1.5794 +    # install_prog (especially on Windows NT).
  1.5795 +    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
  1.5796 +       # Allow the use of GNU shtool's install command.
  1.5797 +       $echo "X$nonopt" | grep shtool > /dev/null; then
  1.5798 +      # Aesthetically quote it.
  1.5799 +      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
  1.5800 +      case $arg in
  1.5801 +      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
  1.5802 +	arg="\"$arg\""
  1.5803 +	;;
  1.5804 +      esac
  1.5805 +      install_prog="$arg "
  1.5806 +      arg="$1"
  1.5807 +      shift
  1.5808 +    else
  1.5809 +      install_prog=
  1.5810 +      arg=$nonopt
  1.5811 +    fi
  1.5812 +
  1.5813 +    # The real first argument should be the name of the installation program.
  1.5814 +    # Aesthetically quote it.
  1.5815 +    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  1.5816 +    case $arg in
  1.5817 +    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
  1.5818 +      arg="\"$arg\""
  1.5819 +      ;;
  1.5820 +    esac
  1.5821 +    install_prog="$install_prog$arg"
  1.5822 +
  1.5823 +    # We need to accept at least all the BSD install flags.
  1.5824 +    dest=
  1.5825 +    files=
  1.5826 +    opts=
  1.5827 +    prev=
  1.5828 +    install_type=
  1.5829 +    isdir=no
  1.5830 +    stripme=
  1.5831 +    for arg
  1.5832 +    do
  1.5833 +      if test -n "$dest"; then
  1.5834 +	files="$files $dest"
  1.5835 +	dest=$arg
  1.5836 +	continue
  1.5837 +      fi
  1.5838 +
  1.5839 +      case $arg in
  1.5840 +      -d) isdir=yes ;;
  1.5841 +      -f) 
  1.5842 +      	case " $install_prog " in
  1.5843 +	*[\\\ /]cp\ *) ;;
  1.5844 +	*) prev=$arg ;;
  1.5845 +	esac
  1.5846 +	;;
  1.5847 +      -g | -m | -o) prev=$arg ;;
  1.5848 +      -s)
  1.5849 +	stripme=" -s"
  1.5850 +	continue
  1.5851 +	;;
  1.5852 +      -*)
  1.5853 +	;;
  1.5854 +      *)
  1.5855 +	# If the previous option needed an argument, then skip it.
  1.5856 +	if test -n "$prev"; then
  1.5857 +	  prev=
  1.5858 +	else
  1.5859 +	  dest=$arg
  1.5860 +	  continue
  1.5861 +	fi
  1.5862 +	;;
  1.5863 +      esac
  1.5864 +
  1.5865 +      # Aesthetically quote the argument.
  1.5866 +      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  1.5867 +      case $arg in
  1.5868 +      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
  1.5869 +	arg="\"$arg\""
  1.5870 +	;;
  1.5871 +      esac
  1.5872 +      install_prog="$install_prog $arg"
  1.5873 +    done
  1.5874 +
  1.5875 +    if test -z "$install_prog"; then
  1.5876 +      $echo "$modename: you must specify an install program" 1>&2
  1.5877 +      $echo "$help" 1>&2
  1.5878 +      exit $EXIT_FAILURE
  1.5879 +    fi
  1.5880 +
  1.5881 +    if test -n "$prev"; then
  1.5882 +      $echo "$modename: the \`$prev' option requires an argument" 1>&2
  1.5883 +      $echo "$help" 1>&2
  1.5884 +      exit $EXIT_FAILURE
  1.5885 +    fi
  1.5886 +
  1.5887 +    if test -z "$files"; then
  1.5888 +      if test -z "$dest"; then
  1.5889 +	$echo "$modename: no file or destination specified" 1>&2
  1.5890 +      else
  1.5891 +	$echo "$modename: you must specify a destination" 1>&2
  1.5892 +      fi
  1.5893 +      $echo "$help" 1>&2
  1.5894 +      exit $EXIT_FAILURE
  1.5895 +    fi
  1.5896 +
  1.5897 +    # Strip any trailing slash from the destination.
  1.5898 +    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
  1.5899 +
  1.5900 +    # Check to see that the destination is a directory.
  1.5901 +    test -d "$dest" && isdir=yes
  1.5902 +    if test "$isdir" = yes; then
  1.5903 +      destdir="$dest"
  1.5904 +      destname=
  1.5905 +    else
  1.5906 +      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
  1.5907 +      test "X$destdir" = "X$dest" && destdir=.
  1.5908 +      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
  1.5909 +
  1.5910 +      # Not a directory, so check to see that there is only one file specified.
  1.5911 +      set dummy $files
  1.5912 +      if test "$#" -gt 2; then
  1.5913 +	$echo "$modename: \`$dest' is not a directory" 1>&2
  1.5914 +	$echo "$help" 1>&2
  1.5915 +	exit $EXIT_FAILURE
  1.5916 +      fi
  1.5917 +    fi
  1.5918 +    case $destdir in
  1.5919 +    [\\/]* | [A-Za-z]:[\\/]*) ;;
  1.5920 +    *)
  1.5921 +      for file in $files; do
  1.5922 +	case $file in
  1.5923 +	*.lo) ;;
  1.5924 +	*)
  1.5925 +	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
  1.5926 +	  $echo "$help" 1>&2
  1.5927 +	  exit $EXIT_FAILURE
  1.5928 +	  ;;
  1.5929 +	esac
  1.5930 +      done
  1.5931 +      ;;
  1.5932 +    esac
  1.5933 +
  1.5934 +    # This variable tells wrapper scripts just to set variables rather
  1.5935 +    # than running their programs.
  1.5936 +    libtool_install_magic="$magic"
  1.5937 +
  1.5938 +    staticlibs=
  1.5939 +    future_libdirs=
  1.5940 +    current_libdirs=
  1.5941 +    for file in $files; do
  1.5942 +
  1.5943 +      # Do each installation.
  1.5944 +      case $file in
  1.5945 +      *.$libext)
  1.5946 +	# Do the static libraries later.
  1.5947 +	staticlibs="$staticlibs $file"
  1.5948 +	;;
  1.5949 +
  1.5950 +      *.la)
  1.5951 +	# Check to see that this really is a libtool archive.
  1.5952 +	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
  1.5953 +	else
  1.5954 +	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
  1.5955 +	  $echo "$help" 1>&2
  1.5956 +	  exit $EXIT_FAILURE
  1.5957 +	fi
  1.5958 +
  1.5959 +	library_names=
  1.5960 +	old_library=
  1.5961 +	relink_command=
  1.5962 +	# If there is no directory component, then add one.
  1.5963 +	case $file in
  1.5964 +	*/* | *\\*) . $file ;;
  1.5965 +	*) . ./$file ;;
  1.5966 +	esac
  1.5967 +
  1.5968 +	# Add the libdir to current_libdirs if it is the destination.
  1.5969 +	if test "X$destdir" = "X$libdir"; then
  1.5970 +	  case "$current_libdirs " in
  1.5971 +	  *" $libdir "*) ;;
  1.5972 +	  *) current_libdirs="$current_libdirs $libdir" ;;
  1.5973 +	  esac
  1.5974 +	else
  1.5975 +	  # Note the libdir as a future libdir.
  1.5976 +	  case "$future_libdirs " in
  1.5977 +	  *" $libdir "*) ;;
  1.5978 +	  *) future_libdirs="$future_libdirs $libdir" ;;
  1.5979 +	  esac
  1.5980 +	fi
  1.5981 +
  1.5982 +	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
  1.5983 +	test "X$dir" = "X$file/" && dir=
  1.5984 +	dir="$dir$objdir"
  1.5985 +
  1.5986 +	if test -n "$relink_command"; then
  1.5987 +	  # Determine the prefix the user has applied to our future dir.
  1.5988 +	  inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
  1.5989 +
  1.5990 +	  # Don't allow the user to place us outside of our expected
  1.5991 +	  # location b/c this prevents finding dependent libraries that
  1.5992 +	  # are installed to the same prefix.
  1.5993 +	  # At present, this check doesn't affect windows .dll's that
  1.5994 +	  # are installed into $libdir/../bin (currently, that works fine)
  1.5995 +	  # but it's something to keep an eye on.
  1.5996 +	  if test "$inst_prefix_dir" = "$destdir"; then
  1.5997 +	    $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
  1.5998 +	    exit $EXIT_FAILURE
  1.5999 +	  fi
  1.6000 +
  1.6001 +	  if test -n "$inst_prefix_dir"; then
  1.6002 +	    # Stick the inst_prefix_dir data into the link command.
  1.6003 +	    relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
  1.6004 +	  else
  1.6005 +	    relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
  1.6006 +	  fi
  1.6007 +
  1.6008 +	  $echo "$modename: warning: relinking \`$file'" 1>&2
  1.6009 +	  $show "$relink_command"
  1.6010 +	  if $run eval "$relink_command"; then :
  1.6011 +	  else
  1.6012 +	    $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
  1.6013 +	    exit $EXIT_FAILURE
  1.6014 +	  fi
  1.6015 +	fi
  1.6016 +
  1.6017 +	# See the names of the shared library.
  1.6018 +	set dummy $library_names
  1.6019 +	if test -n "$2"; then
  1.6020 +	  realname="$2"
  1.6021 +	  shift
  1.6022 +	  shift
  1.6023 +
  1.6024 +	  srcname="$realname"
  1.6025 +	  test -n "$relink_command" && srcname="$realname"T
  1.6026 +
  1.6027 +	  # Install the shared library and build the symlinks.
  1.6028 +	  $show "$install_prog $dir/$srcname $destdir/$realname"
  1.6029 +	  $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
  1.6030 +	  if test -n "$stripme" && test -n "$striplib"; then
  1.6031 +	    $show "$striplib $destdir/$realname"
  1.6032 +	    $run eval "$striplib $destdir/$realname" || exit $?
  1.6033 +	  fi
  1.6034 +
  1.6035 +	  if test "$#" -gt 0; then
  1.6036 +	    # Delete the old symlinks, and create new ones.
  1.6037 +	    # Try `ln -sf' first, because the `ln' binary might depend on
  1.6038 +	    # the symlink we replace!  Solaris /bin/ln does not understand -f,
  1.6039 +	    # so we also need to try rm && ln -s.
  1.6040 +	    for linkname
  1.6041 +	    do
  1.6042 +	      if test "$linkname" != "$realname"; then
  1.6043 +                $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
  1.6044 +                $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
  1.6045 +	      fi
  1.6046 +	    done
  1.6047 +	  fi
  1.6048 +
  1.6049 +	  # Do each command in the postinstall commands.
  1.6050 +	  lib="$destdir/$realname"
  1.6051 +	  cmds=$postinstall_cmds
  1.6052 +	  save_ifs="$IFS"; IFS='~'
  1.6053 +	  for cmd in $cmds; do
  1.6054 +	    IFS="$save_ifs"
  1.6055 +	    eval cmd=\"$cmd\"
  1.6056 +	    $show "$cmd"
  1.6057 +	    $run eval "$cmd" || {
  1.6058 +	      lt_exit=$?
  1.6059 +
  1.6060 +	      # Restore the uninstalled library and exit
  1.6061 +	      if test "$mode" = relink; then
  1.6062 +		$run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
  1.6063 +	      fi
  1.6064 +
  1.6065 +	      exit $lt_exit
  1.6066 +	    }
  1.6067 +	  done
  1.6068 +	  IFS="$save_ifs"
  1.6069 +	fi
  1.6070 +
  1.6071 +	# Install the pseudo-library for information purposes.
  1.6072 +	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  1.6073 +	instname="$dir/$name"i
  1.6074 +	$show "$install_prog $instname $destdir/$name"
  1.6075 +	$run eval "$install_prog $instname $destdir/$name" || exit $?
  1.6076 +
  1.6077 +	# Maybe install the static library, too.
  1.6078 +	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
  1.6079 +	;;
  1.6080 +
  1.6081 +      *.lo)
  1.6082 +	# Install (i.e. copy) a libtool object.
  1.6083 +
  1.6084 +	# Figure out destination file name, if it wasn't already specified.
  1.6085 +	if test -n "$destname"; then
  1.6086 +	  destfile="$destdir/$destname"
  1.6087 +	else
  1.6088 +	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  1.6089 +	  destfile="$destdir/$destfile"
  1.6090 +	fi
  1.6091 +
  1.6092 +	# Deduce the name of the destination old-style object file.
  1.6093 +	case $destfile in
  1.6094 +	*.lo)
  1.6095 +	  staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
  1.6096 +	  ;;
  1.6097 +	*.$objext)
  1.6098 +	  staticdest="$destfile"
  1.6099 +	  destfile=
  1.6100 +	  ;;
  1.6101 +	*)
  1.6102 +	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
  1.6103 +	  $echo "$help" 1>&2
  1.6104 +	  exit $EXIT_FAILURE
  1.6105 +	  ;;
  1.6106 +	esac
  1.6107 +
  1.6108 +	# Install the libtool object if requested.
  1.6109 +	if test -n "$destfile"; then
  1.6110 +	  $show "$install_prog $file $destfile"
  1.6111 +	  $run eval "$install_prog $file $destfile" || exit $?
  1.6112 +	fi
  1.6113 +
  1.6114 +	# Install the old object if enabled.
  1.6115 +	if test "$build_old_libs" = yes; then
  1.6116 +	  # Deduce the name of the old-style object file.
  1.6117 +	  staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
  1.6118 +
  1.6119 +	  $show "$install_prog $staticobj $staticdest"
  1.6120 +	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
  1.6121 +	fi
  1.6122 +	exit $EXIT_SUCCESS
  1.6123 +	;;
  1.6124 +
  1.6125 +      *)
  1.6126 +	# Figure out destination file name, if it wasn't already specified.
  1.6127 +	if test -n "$destname"; then
  1.6128 +	  destfile="$destdir/$destname"
  1.6129 +	else
  1.6130 +	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  1.6131 +	  destfile="$destdir/$destfile"
  1.6132 +	fi
  1.6133 +
  1.6134 +	# If the file is missing, and there is a .exe on the end, strip it
  1.6135 +	# because it is most likely a libtool script we actually want to
  1.6136 +	# install
  1.6137 +	stripped_ext=""
  1.6138 +	case $file in
  1.6139 +	  *.exe)
  1.6140 +	    if test ! -f "$file"; then
  1.6141 +	      file=`$echo $file|${SED} 's,.exe$,,'`
  1.6142 +	      stripped_ext=".exe"
  1.6143 +	    fi
  1.6144 +	    ;;
  1.6145 +	esac
  1.6146 +
  1.6147 +	# Do a test to see if this is really a libtool program.
  1.6148 +	case $host in
  1.6149 +	*cygwin*|*mingw*)
  1.6150 +	    wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
  1.6151 +	    ;;
  1.6152 +	*)
  1.6153 +	    wrapper=$file
  1.6154 +	    ;;
  1.6155 +	esac
  1.6156 +	if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
  1.6157 +	  notinst_deplibs=
  1.6158 +	  relink_command=
  1.6159 +
  1.6160 +	  # Note that it is not necessary on cygwin/mingw to append a dot to
  1.6161 +	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
  1.6162 +	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
  1.6163 +	  # `FILE.' does not work on cygwin managed mounts.
  1.6164 +	  #
  1.6165 +	  # If there is no directory component, then add one.
  1.6166 +	  case $wrapper in
  1.6167 +	  */* | *\\*) . ${wrapper} ;;
  1.6168 +	  *) . ./${wrapper} ;;
  1.6169 +	  esac
  1.6170 +
  1.6171 +	  # Check the variables that should have been set.
  1.6172 +	  if test -z "$notinst_deplibs"; then
  1.6173 +	    $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
  1.6174 +	    exit $EXIT_FAILURE
  1.6175 +	  fi
  1.6176 +
  1.6177 +	  finalize=yes
  1.6178 +	  for lib in $notinst_deplibs; do
  1.6179 +	    # Check to see that each library is installed.
  1.6180 +	    libdir=
  1.6181 +	    if test -f "$lib"; then
  1.6182 +	      # If there is no directory component, then add one.
  1.6183 +	      case $lib in
  1.6184 +	      */* | *\\*) . $lib ;;
  1.6185 +	      *) . ./$lib ;;
  1.6186 +	      esac
  1.6187 +	    fi
  1.6188 +	    libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
  1.6189 +	    if test -n "$libdir" && test ! -f "$libfile"; then
  1.6190 +	      $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
  1.6191 +	      finalize=no
  1.6192 +	    fi
  1.6193 +	  done
  1.6194 +
  1.6195 +	  relink_command=
  1.6196 +	  # Note that it is not necessary on cygwin/mingw to append a dot to
  1.6197 +	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
  1.6198 +	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
  1.6199 +	  # `FILE.' does not work on cygwin managed mounts.
  1.6200 +	  #
  1.6201 +	  # If there is no directory component, then add one.
  1.6202 +	  case $wrapper in
  1.6203 +	  */* | *\\*) . ${wrapper} ;;
  1.6204 +	  *) . ./${wrapper} ;;
  1.6205 +	  esac
  1.6206 +
  1.6207 +	  outputname=
  1.6208 +	  if test "$fast_install" = no && test -n "$relink_command"; then
  1.6209 +	    if test "$finalize" = yes && test -z "$run"; then
  1.6210 +	      tmpdir=`func_mktempdir`
  1.6211 +	      file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
  1.6212 +	      outputname="$tmpdir/$file"
  1.6213 +	      # Replace the output file specification.
  1.6214 +	      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
  1.6215 +
  1.6216 +	      $show "$relink_command"
  1.6217 +	      if $run eval "$relink_command"; then :
  1.6218 +	      else
  1.6219 +		$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
  1.6220 +		${rm}r "$tmpdir"
  1.6221 +		continue
  1.6222 +	      fi
  1.6223 +	      file="$outputname"
  1.6224 +	    else
  1.6225 +	      $echo "$modename: warning: cannot relink \`$file'" 1>&2
  1.6226 +	    fi
  1.6227 +	  else
  1.6228 +	    # Install the binary that we compiled earlier.
  1.6229 +	    file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
  1.6230 +	  fi
  1.6231 +	fi
  1.6232 +
  1.6233 +	# remove .exe since cygwin /usr/bin/install will append another
  1.6234 +	# one anyway 
  1.6235 +	case $install_prog,$host in
  1.6236 +	*/usr/bin/install*,*cygwin*)
  1.6237 +	  case $file:$destfile in
  1.6238 +	  *.exe:*.exe)
  1.6239 +	    # this is ok
  1.6240 +	    ;;
  1.6241 +	  *.exe:*)
  1.6242 +	    destfile=$destfile.exe
  1.6243 +	    ;;
  1.6244 +	  *:*.exe)
  1.6245 +	    destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
  1.6246 +	    ;;
  1.6247 +	  esac
  1.6248 +	  ;;
  1.6249 +	esac
  1.6250 +	$show "$install_prog$stripme $file $destfile"
  1.6251 +	$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
  1.6252 +	test -n "$outputname" && ${rm}r "$tmpdir"
  1.6253 +	;;
  1.6254 +      esac
  1.6255 +    done
  1.6256 +
  1.6257 +    for file in $staticlibs; do
  1.6258 +      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  1.6259 +
  1.6260 +      # Set up the ranlib parameters.
  1.6261 +      oldlib="$destdir/$name"
  1.6262 +
  1.6263 +      $show "$install_prog $file $oldlib"
  1.6264 +      $run eval "$install_prog \$file \$oldlib" || exit $?
  1.6265 +
  1.6266 +      if test -n "$stripme" && test -n "$old_striplib"; then
  1.6267 +	$show "$old_striplib $oldlib"
  1.6268 +	$run eval "$old_striplib $oldlib" || exit $?
  1.6269 +      fi
  1.6270 +
  1.6271 +      # Do each command in the postinstall commands.
  1.6272 +      cmds=$old_postinstall_cmds
  1.6273 +      save_ifs="$IFS"; IFS='~'
  1.6274 +      for cmd in $cmds; do
  1.6275 +	IFS="$save_ifs"
  1.6276 +	eval cmd=\"$cmd\"
  1.6277 +	$show "$cmd"
  1.6278 +	$run eval "$cmd" || exit $?
  1.6279 +      done
  1.6280 +      IFS="$save_ifs"
  1.6281 +    done
  1.6282 +
  1.6283 +    if test -n "$future_libdirs"; then
  1.6284 +      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
  1.6285 +    fi
  1.6286 +
  1.6287 +    if test -n "$current_libdirs"; then
  1.6288 +      # Maybe just do a dry run.
  1.6289 +      test -n "$run" && current_libdirs=" -n$current_libdirs"
  1.6290 +      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
  1.6291 +    else
  1.6292 +      exit $EXIT_SUCCESS
  1.6293 +    fi
  1.6294 +    ;;
  1.6295 +
  1.6296 +  # libtool finish mode
  1.6297 +  finish)
  1.6298 +    modename="$modename: finish"
  1.6299 +    libdirs="$nonopt"
  1.6300 +    admincmds=
  1.6301 +
  1.6302 +    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
  1.6303 +      for dir
  1.6304 +      do
  1.6305 +	libdirs="$libdirs $dir"
  1.6306 +      done
  1.6307 +
  1.6308 +      for libdir in $libdirs; do
  1.6309 +	if test -n "$finish_cmds"; then
  1.6310 +	  # Do each command in the finish commands.
  1.6311 +	  cmds=$finish_cmds
  1.6312 +	  save_ifs="$IFS"; IFS='~'
  1.6313 +	  for cmd in $cmds; do
  1.6314 +	    IFS="$save_ifs"
  1.6315 +	    eval cmd=\"$cmd\"
  1.6316 +	    $show "$cmd"
  1.6317 +	    $run eval "$cmd" || admincmds="$admincmds
  1.6318 +       $cmd"
  1.6319 +	  done
  1.6320 +	  IFS="$save_ifs"
  1.6321 +	fi
  1.6322 +	if test -n "$finish_eval"; then
  1.6323 +	  # Do the single finish_eval.
  1.6324 +	  eval cmds=\"$finish_eval\"
  1.6325 +	  $run eval "$cmds" || admincmds="$admincmds
  1.6326 +       $cmds"
  1.6327 +	fi
  1.6328 +      done
  1.6329 +    fi
  1.6330 +
  1.6331 +    # Exit here if they wanted silent mode.
  1.6332 +    test "$show" = : && exit $EXIT_SUCCESS
  1.6333 +
  1.6334 +    $echo "X----------------------------------------------------------------------" | $Xsed
  1.6335 +    $echo "Libraries have been installed in:"
  1.6336 +    for libdir in $libdirs; do
  1.6337 +      $echo "   $libdir"
  1.6338 +    done
  1.6339 +    $echo
  1.6340 +    $echo "If you ever happen to want to link against installed libraries"
  1.6341 +    $echo "in a given directory, LIBDIR, you must either use libtool, and"
  1.6342 +    $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
  1.6343 +    $echo "flag during linking and do at least one of the following:"
  1.6344 +    if test -n "$shlibpath_var"; then
  1.6345 +      $echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
  1.6346 +      $echo "     during execution"
  1.6347 +    fi
  1.6348 +    if test -n "$runpath_var"; then
  1.6349 +      $echo "   - add LIBDIR to the \`$runpath_var' environment variable"
  1.6350 +      $echo "     during linking"
  1.6351 +    fi
  1.6352 +    if test -n "$hardcode_libdir_flag_spec"; then
  1.6353 +      libdir=LIBDIR
  1.6354 +      eval flag=\"$hardcode_libdir_flag_spec\"
  1.6355 +
  1.6356 +      $echo "   - use the \`$flag' linker flag"
  1.6357 +    fi
  1.6358 +    if test -n "$admincmds"; then
  1.6359 +      $echo "   - have your system administrator run these commands:$admincmds"
  1.6360 +    fi
  1.6361 +    if test -f /etc/ld.so.conf; then
  1.6362 +      $echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
  1.6363 +    fi
  1.6364 +    $echo
  1.6365 +    $echo "See any operating system documentation about shared libraries for"
  1.6366 +    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
  1.6367 +    $echo "X----------------------------------------------------------------------" | $Xsed
  1.6368 +    exit $EXIT_SUCCESS
  1.6369 +    ;;
  1.6370 +
  1.6371 +  # libtool execute mode
  1.6372 +  execute)
  1.6373 +    modename="$modename: execute"
  1.6374 +
  1.6375 +    # The first argument is the command name.
  1.6376 +    cmd="$nonopt"
  1.6377 +    if test -z "$cmd"; then
  1.6378 +      $echo "$modename: you must specify a COMMAND" 1>&2
  1.6379 +      $echo "$help"
  1.6380 +      exit $EXIT_FAILURE
  1.6381 +    fi
  1.6382 +
  1.6383 +    # Handle -dlopen flags immediately.
  1.6384 +    for file in $execute_dlfiles; do
  1.6385 +      if test ! -f "$file"; then
  1.6386 +	$echo "$modename: \`$file' is not a file" 1>&2
  1.6387 +	$echo "$help" 1>&2
  1.6388 +	exit $EXIT_FAILURE
  1.6389 +      fi
  1.6390 +
  1.6391 +      dir=
  1.6392 +      case $file in
  1.6393 +      *.la)
  1.6394 +	# Check to see that this really is a libtool archive.
  1.6395 +	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
  1.6396 +	else
  1.6397 +	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
  1.6398 +	  $echo "$help" 1>&2
  1.6399 +	  exit $EXIT_FAILURE
  1.6400 +	fi
  1.6401 +
  1.6402 +	# Read the libtool library.
  1.6403 +	dlname=
  1.6404 +	library_names=
  1.6405 +
  1.6406 +	# If there is no directory component, then add one.
  1.6407 +	case $file in
  1.6408 +	*/* | *\\*) . $file ;;
  1.6409 +	*) . ./$file ;;
  1.6410 +	esac
  1.6411 +
  1.6412 +	# Skip this library if it cannot be dlopened.
  1.6413 +	if test -z "$dlname"; then
  1.6414 +	  # Warn if it was a shared library.
  1.6415 +	  test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
  1.6416 +	  continue
  1.6417 +	fi
  1.6418 +
  1.6419 +	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
  1.6420 +	test "X$dir" = "X$file" && dir=.
  1.6421 +
  1.6422 +	if test -f "$dir/$objdir/$dlname"; then
  1.6423 +	  dir="$dir/$objdir"
  1.6424 +	else
  1.6425 +	  if test ! -f "$dir/$dlname"; then
  1.6426 +	    $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
  1.6427 +	    exit $EXIT_FAILURE
  1.6428 +	  fi
  1.6429 +	fi
  1.6430 +	;;
  1.6431 +
  1.6432 +      *.lo)
  1.6433 +	# Just add the directory containing the .lo file.
  1.6434 +	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
  1.6435 +	test "X$dir" = "X$file" && dir=.
  1.6436 +	;;
  1.6437 +
  1.6438 +      *)
  1.6439 +	$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
  1.6440 +	continue
  1.6441 +	;;
  1.6442 +      esac
  1.6443 +
  1.6444 +      # Get the absolute pathname.
  1.6445 +      absdir=`cd "$dir" && pwd`
  1.6446 +      test -n "$absdir" && dir="$absdir"
  1.6447 +
  1.6448 +      # Now add the directory to shlibpath_var.
  1.6449 +      if eval "test -z \"\$$shlibpath_var\""; then
  1.6450 +	eval "$shlibpath_var=\"\$dir\""
  1.6451 +      else
  1.6452 +	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
  1.6453 +      fi
  1.6454 +    done
  1.6455 +
  1.6456 +    # This variable tells wrapper scripts just to set shlibpath_var
  1.6457 +    # rather than running their programs.
  1.6458 +    libtool_execute_magic="$magic"
  1.6459 +
  1.6460 +    # Check if any of the arguments is a wrapper script.
  1.6461 +    args=
  1.6462 +    for file
  1.6463 +    do
  1.6464 +      case $file in
  1.6465 +      -*) ;;
  1.6466 +      *)
  1.6467 +	# Do a test to see if this is really a libtool program.
  1.6468 +	if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  1.6469 +	  # If there is no directory component, then add one.
  1.6470 +	  case $file in
  1.6471 +	  */* | *\\*) . $file ;;
  1.6472 +	  *) . ./$file ;;
  1.6473 +	  esac
  1.6474 +
  1.6475 +	  # Transform arg to wrapped name.
  1.6476 +	  file="$progdir/$program"
  1.6477 +	fi
  1.6478 +	;;
  1.6479 +      esac
  1.6480 +      # Quote arguments (to preserve shell metacharacters).
  1.6481 +      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
  1.6482 +      args="$args \"$file\""
  1.6483 +    done
  1.6484 +
  1.6485 +    if test -z "$run"; then
  1.6486 +      if test -n "$shlibpath_var"; then
  1.6487 +	# Export the shlibpath_var.
  1.6488 +	eval "export $shlibpath_var"
  1.6489 +      fi
  1.6490 +
  1.6491 +      # Restore saved environment variables
  1.6492 +      for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
  1.6493 +      do
  1.6494 +	eval "if test \"\${save_$lt_var+set}\" = set; then
  1.6495 +		$lt_var=\$save_$lt_var; export $lt_var
  1.6496 +	      fi"
  1.6497 +      done
  1.6498 +
  1.6499 +      # Now prepare to actually exec the command.
  1.6500 +      exec_cmd="\$cmd$args"
  1.6501 +    else
  1.6502 +      # Display what would be done.
  1.6503 +      if test -n "$shlibpath_var"; then
  1.6504 +	eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
  1.6505 +	$echo "export $shlibpath_var"
  1.6506 +      fi
  1.6507 +      $echo "$cmd$args"
  1.6508 +      exit $EXIT_SUCCESS
  1.6509 +    fi
  1.6510 +    ;;
  1.6511 +
  1.6512 +  # libtool clean and uninstall mode
  1.6513 +  clean | uninstall)
  1.6514 +    modename="$modename: $mode"
  1.6515 +    rm="$nonopt"
  1.6516 +    files=
  1.6517 +    rmforce=
  1.6518 +    exit_status=0
  1.6519 +
  1.6520 +    # This variable tells wrapper scripts just to set variables rather
  1.6521 +    # than running their programs.
  1.6522 +    libtool_install_magic="$magic"
  1.6523 +
  1.6524 +    for arg
  1.6525 +    do
  1.6526 +      case $arg in
  1.6527 +      -f) rm="$rm $arg"; rmforce=yes ;;
  1.6528 +      -*) rm="$rm $arg" ;;
  1.6529 +      *) files="$files $arg" ;;
  1.6530 +      esac
  1.6531 +    done
  1.6532 +
  1.6533 +    if test -z "$rm"; then
  1.6534 +      $echo "$modename: you must specify an RM program" 1>&2
  1.6535 +      $echo "$help" 1>&2
  1.6536 +      exit $EXIT_FAILURE
  1.6537 +    fi
  1.6538 +
  1.6539 +    rmdirs=
  1.6540 +
  1.6541 +    origobjdir="$objdir"
  1.6542 +    for file in $files; do
  1.6543 +      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
  1.6544 +      if test "X$dir" = "X$file"; then
  1.6545 +	dir=.
  1.6546 +	objdir="$origobjdir"
  1.6547 +      else
  1.6548 +	objdir="$dir/$origobjdir"
  1.6549 +      fi
  1.6550 +      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  1.6551 +      test "$mode" = uninstall && objdir="$dir"
  1.6552 +
  1.6553 +      # Remember objdir for removal later, being careful to avoid duplicates
  1.6554 +      if test "$mode" = clean; then
  1.6555 +	case " $rmdirs " in
  1.6556 +	  *" $objdir "*) ;;
  1.6557 +	  *) rmdirs="$rmdirs $objdir" ;;
  1.6558 +	esac
  1.6559 +      fi
  1.6560 +
  1.6561 +      # Don't error if the file doesn't exist and rm -f was used.
  1.6562 +      if (test -L "$file") >/dev/null 2>&1 \
  1.6563 +	|| (test -h "$file") >/dev/null 2>&1 \
  1.6564 +	|| test -f "$file"; then
  1.6565 +	:
  1.6566 +      elif test -d "$file"; then
  1.6567 +	exit_status=1
  1.6568 +	continue
  1.6569 +      elif test "$rmforce" = yes; then
  1.6570 +	continue
  1.6571 +      fi
  1.6572 +
  1.6573 +      rmfiles="$file"
  1.6574 +
  1.6575 +      case $name in
  1.6576 +      *.la)
  1.6577 +	# Possibly a libtool archive, so verify it.
  1.6578 +	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  1.6579 +	  . $dir/$name
  1.6580 +
  1.6581 +	  # Delete the libtool libraries and symlinks.
  1.6582 +	  for n in $library_names; do
  1.6583 +	    rmfiles="$rmfiles $objdir/$n"
  1.6584 +	  done
  1.6585 +	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
  1.6586 +
  1.6587 +	  case "$mode" in
  1.6588 +	  clean)
  1.6589 +	    case "  $library_names " in
  1.6590 +	    # "  " in the beginning catches empty $dlname
  1.6591 +	    *" $dlname "*) ;;
  1.6592 +	    *) rmfiles="$rmfiles $objdir/$dlname" ;;
  1.6593 +	    esac
  1.6594 +	     test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
  1.6595 +	    ;;
  1.6596 +	  uninstall)
  1.6597 +	    if test -n "$library_names"; then
  1.6598 +	      # Do each command in the postuninstall commands.
  1.6599 +	      cmds=$postuninstall_cmds
  1.6600 +	      save_ifs="$IFS"; IFS='~'
  1.6601 +	      for cmd in $cmds; do
  1.6602 +		IFS="$save_ifs"
  1.6603 +		eval cmd=\"$cmd\"
  1.6604 +		$show "$cmd"
  1.6605 +		$run eval "$cmd"
  1.6606 +		if test "$?" -ne 0 && test "$rmforce" != yes; then
  1.6607 +		  exit_status=1
  1.6608 +		fi
  1.6609 +	      done
  1.6610 +	      IFS="$save_ifs"
  1.6611 +	    fi
  1.6612 +
  1.6613 +	    if test -n "$old_library"; then
  1.6614 +	      # Do each command in the old_postuninstall commands.
  1.6615 +	      cmds=$old_postuninstall_cmds
  1.6616 +	      save_ifs="$IFS"; IFS='~'
  1.6617 +	      for cmd in $cmds; do
  1.6618 +		IFS="$save_ifs"
  1.6619 +		eval cmd=\"$cmd\"
  1.6620 +		$show "$cmd"
  1.6621 +		$run eval "$cmd"
  1.6622 +		if test "$?" -ne 0 && test "$rmforce" != yes; then
  1.6623 +		  exit_status=1
  1.6624 +		fi
  1.6625 +	      done
  1.6626 +	      IFS="$save_ifs"
  1.6627 +	    fi
  1.6628 +	    # FIXME: should reinstall the best remaining shared library.
  1.6629 +	    ;;
  1.6630 +	  esac
  1.6631 +	fi
  1.6632 +	;;
  1.6633 +
  1.6634 +      *.lo)
  1.6635 +	# Possibly a libtool object, so verify it.
  1.6636 +	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  1.6637 +
  1.6638 +	  # Read the .lo file
  1.6639 +	  . $dir/$name
  1.6640 +
  1.6641 +	  # Add PIC object to the list of files to remove.
  1.6642 +	  if test -n "$pic_object" \
  1.6643 +	     && test "$pic_object" != none; then
  1.6644 +	    rmfiles="$rmfiles $dir/$pic_object"
  1.6645 +	  fi
  1.6646 +
  1.6647 +	  # Add non-PIC object to the list of files to remove.
  1.6648 +	  if test -n "$non_pic_object" \
  1.6649 +	     && test "$non_pic_object" != none; then
  1.6650 +	    rmfiles="$rmfiles $dir/$non_pic_object"
  1.6651 +	  fi
  1.6652 +	fi
  1.6653 +	;;
  1.6654 +
  1.6655 +      *)
  1.6656 +	if test "$mode" = clean ; then
  1.6657 +	  noexename=$name
  1.6658 +	  case $file in
  1.6659 +	  *.exe)
  1.6660 +	    file=`$echo $file|${SED} 's,.exe$,,'`
  1.6661 +	    noexename=`$echo $name|${SED} 's,.exe$,,'`
  1.6662 +	    # $file with .exe has already been added to rmfiles,
  1.6663 +	    # add $file without .exe
  1.6664 +	    rmfiles="$rmfiles $file"
  1.6665 +	    ;;
  1.6666 +	  esac
  1.6667 +	  # Do a test to see if this is a libtool program.
  1.6668 +	  if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  1.6669 +	    relink_command=
  1.6670 +	    . $dir/$noexename
  1.6671 +
  1.6672 +	    # note $name still contains .exe if it was in $file originally
  1.6673 +	    # as does the version of $file that was added into $rmfiles
  1.6674 +	    rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
  1.6675 +	    if test "$fast_install" = yes && test -n "$relink_command"; then
  1.6676 +	      rmfiles="$rmfiles $objdir/lt-$name"
  1.6677 +	    fi
  1.6678 +	    if test "X$noexename" != "X$name" ; then
  1.6679 +	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
  1.6680 +	    fi
  1.6681 +	  fi
  1.6682 +	fi
  1.6683 +	;;
  1.6684 +      esac
  1.6685 +      $show "$rm $rmfiles"
  1.6686 +      $run $rm $rmfiles || exit_status=1
  1.6687 +    done
  1.6688 +    objdir="$origobjdir"
  1.6689 +
  1.6690 +    # Try to remove the ${objdir}s in the directories where we deleted files
  1.6691 +    for dir in $rmdirs; do
  1.6692 +      if test -d "$dir"; then
  1.6693 +	$show "rmdir $dir"
  1.6694 +	$run rmdir $dir >/dev/null 2>&1
  1.6695 +      fi
  1.6696 +    done
  1.6697 +
  1.6698 +    exit $exit_status
  1.6699 +    ;;
  1.6700 +
  1.6701 +  "")
  1.6702 +    $echo "$modename: you must specify a MODE" 1>&2
  1.6703 +    $echo "$generic_help" 1>&2
  1.6704 +    exit $EXIT_FAILURE
  1.6705 +    ;;
  1.6706 +  esac
  1.6707 +
  1.6708 +  if test -z "$exec_cmd"; then
  1.6709 +    $echo "$modename: invalid operation mode \`$mode'" 1>&2
  1.6710 +    $echo "$generic_help" 1>&2
  1.6711 +    exit $EXIT_FAILURE
  1.6712 +  fi
  1.6713 +fi # test -z "$show_help"
  1.6714 +
  1.6715 +if test -n "$exec_cmd"; then
  1.6716 +  eval exec $exec_cmd
  1.6717 +  exit $EXIT_FAILURE
  1.6718 +fi
  1.6719 +
  1.6720 +# We need to display help for each of the modes.
  1.6721 +case $mode in
  1.6722 +"") $echo \
  1.6723 +"Usage: $modename [OPTION]... [MODE-ARG]...
  1.6724 +
  1.6725 +Provide generalized library-building support services.
  1.6726 +
  1.6727 +    --config          show all configuration variables
  1.6728 +    --debug           enable verbose shell tracing
  1.6729 +-n, --dry-run         display commands without modifying any files
  1.6730 +    --features        display basic configuration information and exit
  1.6731 +    --finish          same as \`--mode=finish'
  1.6732 +    --help            display this help message and exit
  1.6733 +    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
  1.6734 +    --quiet           same as \`--silent'
  1.6735 +    --silent          don't print informational messages
  1.6736 +    --tag=TAG         use configuration variables from tag TAG
  1.6737 +    --version         print version information
  1.6738 +
  1.6739 +MODE must be one of the following:
  1.6740 +
  1.6741 +      clean           remove files from the build directory
  1.6742 +      compile         compile a source file into a libtool object
  1.6743 +      execute         automatically set library path, then run a program
  1.6744 +      finish          complete the installation of libtool libraries
  1.6745 +      install         install libraries or executables
  1.6746 +      link            create a library or an executable
  1.6747 +      uninstall       remove libraries from an installed directory
  1.6748 +
  1.6749 +MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
  1.6750 +a more detailed description of MODE.
  1.6751 +
  1.6752 +Report bugs to <bug-libtool@gnu.org>."
  1.6753 +  exit $EXIT_SUCCESS
  1.6754 +  ;;
  1.6755 +
  1.6756 +clean)
  1.6757 +  $echo \
  1.6758 +"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
  1.6759 +
  1.6760 +Remove files from the build directory.
  1.6761 +
  1.6762 +RM is the name of the program to use to delete files associated with each FILE
  1.6763 +(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
  1.6764 +to RM.
  1.6765 +
  1.6766 +If FILE is a libtool library, object or program, all the files associated
  1.6767 +with it are deleted. Otherwise, only FILE itself is deleted using RM."
  1.6768 +  ;;
  1.6769 +
  1.6770 +compile)
  1.6771 +  $echo \
  1.6772 +"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
  1.6773 +
  1.6774 +Compile a source file into a libtool library object.
  1.6775 +
  1.6776 +This mode accepts the following additional options:
  1.6777 +
  1.6778 +  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
  1.6779 +  -prefer-pic       try to building PIC objects only
  1.6780 +  -prefer-non-pic   try to building non-PIC objects only
  1.6781 +  -static           always build a \`.o' file suitable for static linking
  1.6782 +
  1.6783 +COMPILE-COMMAND is a command to be used in creating a \`standard' object file
  1.6784 +from the given SOURCEFILE.
  1.6785 +
  1.6786 +The output file name is determined by removing the directory component from
  1.6787 +SOURCEFILE, then substituting the C source code suffix \`.c' with the
  1.6788 +library object suffix, \`.lo'."
  1.6789 +  ;;
  1.6790 +
  1.6791 +execute)
  1.6792 +  $echo \
  1.6793 +"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
  1.6794 +
  1.6795 +Automatically set library path, then run a program.
  1.6796 +
  1.6797 +This mode accepts the following additional options:
  1.6798 +
  1.6799 +  -dlopen FILE      add the directory containing FILE to the library path
  1.6800 +
  1.6801 +This mode sets the library path environment variable according to \`-dlopen'
  1.6802 +flags.
  1.6803 +
  1.6804 +If any of the ARGS are libtool executable wrappers, then they are translated
  1.6805 +into their corresponding uninstalled binary, and any of their required library
  1.6806 +directories are added to the library path.
  1.6807 +
  1.6808 +Then, COMMAND is executed, with ARGS as arguments."
  1.6809 +  ;;
  1.6810 +
  1.6811 +finish)
  1.6812 +  $echo \
  1.6813 +"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
  1.6814 +
  1.6815 +Complete the installation of libtool libraries.
  1.6816 +
  1.6817 +Each LIBDIR is a directory that contains libtool libraries.
  1.6818 +
  1.6819 +The commands that this mode executes may require superuser privileges.  Use
  1.6820 +the \`--dry-run' option if you just want to see what would be executed."
  1.6821 +  ;;
  1.6822 +
  1.6823 +install)
  1.6824 +  $echo \
  1.6825 +"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
  1.6826 +
  1.6827 +Install executables or libraries.
  1.6828 +
  1.6829 +INSTALL-COMMAND is the installation command.  The first component should be
  1.6830 +either the \`install' or \`cp' program.
  1.6831 +
  1.6832 +The rest of the components are interpreted as arguments to that command (only
  1.6833 +BSD-compatible install options are recognized)."
  1.6834 +  ;;
  1.6835 +
  1.6836 +link)
  1.6837 +  $echo \
  1.6838 +"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
  1.6839 +
  1.6840 +Link object files or libraries together to form another library, or to
  1.6841 +create an executable program.
  1.6842 +
  1.6843 +LINK-COMMAND is a command using the C compiler that you would use to create
  1.6844 +a program from several object files.
  1.6845 +
  1.6846 +The following components of LINK-COMMAND are treated specially:
  1.6847 +
  1.6848 +  -all-static       do not do any dynamic linking at all
  1.6849 +  -avoid-version    do not add a version suffix if possible
  1.6850 +  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
  1.6851 +  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
  1.6852 +  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
  1.6853 +  -export-symbols SYMFILE
  1.6854 +                    try to export only the symbols listed in SYMFILE
  1.6855 +  -export-symbols-regex REGEX
  1.6856 +                    try to export only the symbols matching REGEX
  1.6857 +  -LLIBDIR          search LIBDIR for required installed libraries
  1.6858 +  -lNAME            OUTPUT-FILE requires the installed library libNAME
  1.6859 +  -module           build a library that can dlopened
  1.6860 +  -no-fast-install  disable the fast-install mode
  1.6861 +  -no-install       link a not-installable executable
  1.6862 +  -no-undefined     declare that a library does not refer to external symbols
  1.6863 +  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
  1.6864 +  -objectlist FILE  Use a list of object files found in FILE to specify objects
  1.6865 +  -precious-files-regex REGEX
  1.6866 +                    don't remove output files matching REGEX
  1.6867 +  -release RELEASE  specify package release information
  1.6868 +  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
  1.6869 +  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
  1.6870 +  -static           do not do any dynamic linking of uninstalled libtool libraries
  1.6871 +  -static-libtool-libs
  1.6872 +                    do not do any dynamic linking of libtool libraries
  1.6873 +  -version-info CURRENT[:REVISION[:AGE]]
  1.6874 +                    specify library version info [each variable defaults to 0]
  1.6875 +
  1.6876 +All other options (arguments beginning with \`-') are ignored.
  1.6877 +
  1.6878 +Every other argument is treated as a filename.  Files ending in \`.la' are
  1.6879 +treated as uninstalled libtool libraries, other files are standard or library
  1.6880 +object files.
  1.6881 +
  1.6882 +If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
  1.6883 +only library objects (\`.lo' files) may be specified, and \`-rpath' is
  1.6884 +required, except when creating a convenience library.
  1.6885 +
  1.6886 +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
  1.6887 +using \`ar' and \`ranlib', or on Windows using \`lib'.
  1.6888 +
  1.6889 +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
  1.6890 +is created, otherwise an executable program is created."
  1.6891 +  ;;
  1.6892 +
  1.6893 +uninstall)
  1.6894 +  $echo \
  1.6895 +"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
  1.6896 +
  1.6897 +Remove libraries from an installation directory.
  1.6898 +
  1.6899 +RM is the name of the program to use to delete files associated with each FILE
  1.6900 +(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
  1.6901 +to RM.
  1.6902 +
  1.6903 +If FILE is a libtool library, all the files associated with it are deleted.
  1.6904 +Otherwise, only FILE itself is deleted using RM."
  1.6905 +  ;;
  1.6906 +
  1.6907 +*)
  1.6908 +  $echo "$modename: invalid operation mode \`$mode'" 1>&2
  1.6909 +  $echo "$help" 1>&2
  1.6910 +  exit $EXIT_FAILURE
  1.6911 +  ;;
  1.6912 +esac
  1.6913 +
  1.6914 +$echo
  1.6915 +$echo "Try \`$modename --help' for more information about other modes."
  1.6916 +
  1.6917 +exit $?
  1.6918 +
  1.6919 +# The TAGs below are defined such that we never get into a situation
  1.6920 +# in which we disable both kinds of libraries.  Given conflicting
  1.6921 +# choices, we go for a static library, that is the most portable,
  1.6922 +# since we can't tell whether shared libraries were disabled because
  1.6923 +# the user asked for that or because the platform doesn't support
  1.6924 +# them.  This is particularly important on AIX, because we don't
  1.6925 +# support having both static and shared libraries enabled at the same
  1.6926 +# time on that platform, so we default to a shared-only configuration.
  1.6927 +# If a disable-shared tag is given, we'll fallback to a static-only
  1.6928 +# configuration.  But we'll never go from static-only to shared-only.
  1.6929 +
  1.6930 +# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
  1.6931 +disable_libs=shared
  1.6932 +# ### END LIBTOOL TAG CONFIG: disable-shared
  1.6933 +
  1.6934 +# ### BEGIN LIBTOOL TAG CONFIG: disable-static
  1.6935 +disable_libs=static
  1.6936 +# ### END LIBTOOL TAG CONFIG: disable-static
  1.6937 +
  1.6938 +# Local Variables:
  1.6939 +# mode:shell-script
  1.6940 +# sh-indentation:2
  1.6941 +# End: