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