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