ltmain.sh
changeset 0 74212992fb08
child 1 cf2af46e9e2a
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/ltmain.sh	Thu Apr 26 16:45:43 2001 +0000
     1.3 @@ -0,0 +1,4024 @@
     1.4 +# ltmain.sh - Provide generalized library-building support services.
     1.5 +# NOTE: Changing this file will not affect anything until you rerun ltconfig.
     1.6 +#
     1.7 +# Copyright (C) 1996-1999 Free Software Foundation, Inc.
     1.8 +# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
     1.9 +#
    1.10 +# This program is free software; you can redistribute it and/or modify
    1.11 +# it under the terms of the GNU General Public License as published by
    1.12 +# the Free Software Foundation; either version 2 of the License, or
    1.13 +# (at your option) any later version.
    1.14 +#
    1.15 +# This program is distributed in the hope that it will be useful, but
    1.16 +# WITHOUT ANY WARRANTY; without even the implied warranty of
    1.17 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    1.18 +# General Public License for more details.
    1.19 +#
    1.20 +# You should have received a copy of the GNU General Public License
    1.21 +# along with this program; if not, write to the Free Software
    1.22 +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
    1.23 +#
    1.24 +# As a special exception to the GNU General Public License, if you
    1.25 +# distribute this file as part of a program that contains a
    1.26 +# configuration script generated by Autoconf, you may include it under
    1.27 +# the same distribution terms that you use for the rest of that program.
    1.28 +
    1.29 +# Check that we have a working $echo.
    1.30 +if test "X$1" = X--no-reexec; then
    1.31 +  # Discard the --no-reexec flag, and continue.
    1.32 +  shift
    1.33 +elif test "X$1" = X--fallback-echo; then
    1.34 +  # Avoid inline document here, it may be left over
    1.35 +  :
    1.36 +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
    1.37 +  # Yippee, $echo works!
    1.38 +  :
    1.39 +else
    1.40 +  # Restart under the correct shell, and then maybe $echo will work.
    1.41 +  exec $SHELL "$0" --no-reexec ${1+"$@"}
    1.42 +fi
    1.43 +
    1.44 +if test "X$1" = X--fallback-echo; then
    1.45 +  # used as fallback echo
    1.46 +  shift
    1.47 +  cat <<EOF
    1.48 +$*
    1.49 +EOF
    1.50 +  exit 0
    1.51 +fi
    1.52 +
    1.53 +# The name of this program.
    1.54 +progname=`$echo "$0" | sed 's%^.*/%%'`
    1.55 +modename="$progname"
    1.56 +
    1.57 +# Constants.
    1.58 +PROGRAM=ltmain.sh
    1.59 +PACKAGE=libtool
    1.60 +VERSION=1.3.5
    1.61 +TIMESTAMP=" (1.385.2.206 2000/05/27 11:12:27)"
    1.62 +
    1.63 +default_mode=
    1.64 +help="Try \`$progname --help' for more information."
    1.65 +magic="%%%MAGIC variable%%%"
    1.66 +mkdir="mkdir"
    1.67 +mv="mv -f"
    1.68 +rm="rm -f"
    1.69 +
    1.70 +# Sed substitution that helps us do robust quoting.  It backslashifies
    1.71 +# metacharacters that are still active within double-quoted strings.
    1.72 +Xsed='sed -e 1s/^X//'
    1.73 +sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
    1.74 +SP2NL='tr \040 \012'
    1.75 +NL2SP='tr \015\012 \040\040'
    1.76 +
    1.77 +# NLS nuisances.
    1.78 +# Only set LANG and LC_ALL to C if already set.
    1.79 +# These must not be set unconditionally because not all systems understand
    1.80 +# e.g. LANG=C (notably SCO).
    1.81 +# We save the old values to restore during execute mode.
    1.82 +if test "${LC_ALL+set}" = set; then
    1.83 +  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
    1.84 +fi
    1.85 +if test "${LANG+set}" = set; then
    1.86 +  save_LANG="$LANG"; LANG=C; export LANG
    1.87 +fi
    1.88 +
    1.89 +if test "$LTCONFIG_VERSION" != "$VERSION"; then
    1.90 +  echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
    1.91 +  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
    1.92 +  exit 1
    1.93 +fi
    1.94 +
    1.95 +if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
    1.96 +  echo "$modename: not configured to build any kind of library" 1>&2
    1.97 +  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
    1.98 +  exit 1
    1.99 +fi
   1.100 +
   1.101 +# Global variables.
   1.102 +mode=$default_mode
   1.103 +nonopt=
   1.104 +prev=
   1.105 +prevopt=
   1.106 +run=
   1.107 +show="$echo"
   1.108 +show_help=
   1.109 +execute_dlfiles=
   1.110 +lo2o="s/\\.lo\$/.${objext}/"
   1.111 +o2lo="s/\\.${objext}\$/.lo/"
   1.112 +
   1.113 +# Parse our command line options once, thoroughly.
   1.114 +while test $# -gt 0
   1.115 +do
   1.116 +  arg="$1"
   1.117 +  shift
   1.118 +
   1.119 +  case "$arg" in
   1.120 +  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
   1.121 +  *) optarg= ;;
   1.122 +  esac
   1.123 +
   1.124 +  # If the previous option needs an argument, assign it.
   1.125 +  if test -n "$prev"; then
   1.126 +    case "$prev" in
   1.127 +    execute_dlfiles)
   1.128 +      eval "$prev=\"\$$prev \$arg\""
   1.129 +      ;;
   1.130 +    *)
   1.131 +      eval "$prev=\$arg"
   1.132 +      ;;
   1.133 +    esac
   1.134 +
   1.135 +    prev=
   1.136 +    prevopt=
   1.137 +    continue
   1.138 +  fi
   1.139 +
   1.140 +  # Have we seen a non-optional argument yet?
   1.141 +  case "$arg" in
   1.142 +  --help)
   1.143 +    show_help=yes
   1.144 +    ;;
   1.145 +
   1.146 +  --version)
   1.147 +    echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
   1.148 +    exit 0
   1.149 +    ;;
   1.150 +
   1.151 +  --config)
   1.152 +    sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0
   1.153 +    exit 0
   1.154 +    ;;
   1.155 +
   1.156 +  --debug)
   1.157 +    echo "$progname: enabling shell trace mode"
   1.158 +    set -x
   1.159 +    ;;
   1.160 +
   1.161 +  --dry-run | -n)
   1.162 +    run=:
   1.163 +    ;;
   1.164 +
   1.165 +  --features)
   1.166 +    echo "host: $host"
   1.167 +    if test "$build_libtool_libs" = yes; then
   1.168 +      echo "enable shared libraries"
   1.169 +    else
   1.170 +      echo "disable shared libraries"
   1.171 +    fi
   1.172 +    if test "$build_old_libs" = yes; then
   1.173 +      echo "enable static libraries"
   1.174 +    else
   1.175 +      echo "disable static libraries"
   1.176 +    fi
   1.177 +    exit 0
   1.178 +    ;;
   1.179 +
   1.180 +  --finish) mode="finish" ;;
   1.181 +
   1.182 +  --mode) prevopt="--mode" prev=mode ;;
   1.183 +  --mode=*) mode="$optarg" ;;
   1.184 +
   1.185 +  --quiet | --silent)
   1.186 +    show=:
   1.187 +    ;;
   1.188 +
   1.189 +  -dlopen)
   1.190 +    prevopt="-dlopen"
   1.191 +    prev=execute_dlfiles
   1.192 +    ;;
   1.193 +
   1.194 +  -*)
   1.195 +    $echo "$modename: unrecognized option \`$arg'" 1>&2
   1.196 +    $echo "$help" 1>&2
   1.197 +    exit 1
   1.198 +    ;;
   1.199 +
   1.200 +  *)
   1.201 +    nonopt="$arg"
   1.202 +    break
   1.203 +    ;;
   1.204 +  esac
   1.205 +done
   1.206 +
   1.207 +if test -n "$prevopt"; then
   1.208 +  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
   1.209 +  $echo "$help" 1>&2
   1.210 +  exit 1
   1.211 +fi
   1.212 +
   1.213 +if test -z "$show_help"; then
   1.214 +
   1.215 +  # Infer the operation mode.
   1.216 +  if test -z "$mode"; then
   1.217 +    case "$nonopt" in
   1.218 +    *cc | *++ | gcc* | *-gcc*)
   1.219 +      mode=link
   1.220 +      for arg
   1.221 +      do
   1.222 +	case "$arg" in
   1.223 +	-c)
   1.224 +	   mode=compile
   1.225 +	   break
   1.226 +	   ;;
   1.227 +	esac
   1.228 +      done
   1.229 +      ;;
   1.230 +    *db | *dbx | *strace | *truss)
   1.231 +      mode=execute
   1.232 +      ;;
   1.233 +    *install*|cp|mv)
   1.234 +      mode=install
   1.235 +      ;;
   1.236 +    *rm)
   1.237 +      mode=uninstall
   1.238 +      ;;
   1.239 +    *)
   1.240 +      # If we have no mode, but dlfiles were specified, then do execute mode.
   1.241 +      test -n "$execute_dlfiles" && mode=execute
   1.242 +
   1.243 +      # Just use the default operation mode.
   1.244 +      if test -z "$mode"; then
   1.245 +	if test -n "$nonopt"; then
   1.246 +	  $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
   1.247 +	else
   1.248 +	  $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
   1.249 +	fi
   1.250 +      fi
   1.251 +      ;;
   1.252 +    esac
   1.253 +  fi
   1.254 +
   1.255 +  # Only execute mode is allowed to have -dlopen flags.
   1.256 +  if test -n "$execute_dlfiles" && test "$mode" != execute; then
   1.257 +    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
   1.258 +    $echo "$help" 1>&2
   1.259 +    exit 1
   1.260 +  fi
   1.261 +
   1.262 +  # Change the help message to a mode-specific one.
   1.263 +  generic_help="$help"
   1.264 +  help="Try \`$modename --help --mode=$mode' for more information."
   1.265 +
   1.266 +  # These modes are in order of execution frequency so that they run quickly.
   1.267 +  case "$mode" in
   1.268 +  # libtool compile mode
   1.269 +  compile)
   1.270 +    modename="$modename: compile"
   1.271 +    # Get the compilation command and the source file.
   1.272 +    base_compile=
   1.273 +    lastarg=
   1.274 +    srcfile="$nonopt"
   1.275 +    suppress_output=
   1.276 +
   1.277 +    user_target=no
   1.278 +    for arg
   1.279 +    do
   1.280 +      # Accept any command-line options.
   1.281 +      case "$arg" in
   1.282 +      -o)
   1.283 +	if test "$user_target" != "no"; then
   1.284 +	  $echo "$modename: you cannot specify \`-o' more than once" 1>&2
   1.285 +	  exit 1
   1.286 +	fi
   1.287 +	user_target=next
   1.288 +	;;
   1.289 +
   1.290 +      -static)
   1.291 +	build_old_libs=yes
   1.292 +	continue
   1.293 +	;;
   1.294 +      esac
   1.295 +
   1.296 +      case "$user_target" in
   1.297 +      next)
   1.298 +	# The next one is the -o target name
   1.299 +	user_target=yes
   1.300 +	continue
   1.301 +	;;
   1.302 +      yes)
   1.303 +	# We got the output file
   1.304 +	user_target=set
   1.305 +	libobj="$arg"
   1.306 +	continue
   1.307 +	;;
   1.308 +      esac
   1.309 +
   1.310 +      # Accept the current argument as the source file.
   1.311 +      lastarg="$srcfile"
   1.312 +      srcfile="$arg"
   1.313 +
   1.314 +      # Aesthetically quote the previous argument.
   1.315 +
   1.316 +      # Backslashify any backslashes, double quotes, and dollar signs.
   1.317 +      # These are the only characters that are still specially
   1.318 +      # interpreted inside of double-quoted scrings.
   1.319 +      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
   1.320 +
   1.321 +      # Double-quote args containing other shell metacharacters.
   1.322 +      # Many Bourne shells cannot handle close brackets correctly in scan
   1.323 +      # sets, so we specify it separately.
   1.324 +      case "$lastarg" in
   1.325 +      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
   1.326 +	lastarg="\"$lastarg\""
   1.327 +	;;
   1.328 +      esac
   1.329 +
   1.330 +      # Add the previous argument to base_compile.
   1.331 +      if test -z "$base_compile"; then
   1.332 +	base_compile="$lastarg"
   1.333 +      else
   1.334 +	base_compile="$base_compile $lastarg"
   1.335 +      fi
   1.336 +    done
   1.337 +
   1.338 +    case "$user_target" in
   1.339 +    set)
   1.340 +      ;;
   1.341 +    no)
   1.342 +      # Get the name of the library object.
   1.343 +      libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
   1.344 +      ;;
   1.345 +    *)
   1.346 +      $echo "$modename: you must specify a target with \`-o'" 1>&2
   1.347 +      exit 1
   1.348 +      ;;
   1.349 +    esac
   1.350 +
   1.351 +    # Recognize several different file suffixes.
   1.352 +    # If the user specifies -o file.o, it is replaced with file.lo
   1.353 +    xform='[cCFSfmso]'
   1.354 +    case "$libobj" in
   1.355 +    *.ada) xform=ada ;;
   1.356 +    *.adb) xform=adb ;;
   1.357 +    *.ads) xform=ads ;;
   1.358 +    *.asm) xform=asm ;;
   1.359 +    *.c++) xform=c++ ;;
   1.360 +    *.cc) xform=cc ;;
   1.361 +    *.cpp) xform=cpp ;;
   1.362 +    *.cxx) xform=cxx ;;
   1.363 +    *.f90) xform=f90 ;;
   1.364 +    *.for) xform=for ;;
   1.365 +    esac
   1.366 +
   1.367 +    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
   1.368 +
   1.369 +    case "$libobj" in
   1.370 +    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
   1.371 +    *)
   1.372 +      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
   1.373 +      exit 1
   1.374 +      ;;
   1.375 +    esac
   1.376 +
   1.377 +    if test -z "$base_compile"; then
   1.378 +      $echo "$modename: you must specify a compilation command" 1>&2
   1.379 +      $echo "$help" 1>&2
   1.380 +      exit 1
   1.381 +    fi
   1.382 +
   1.383 +    # Delete any leftover library objects.
   1.384 +    if test "$build_old_libs" = yes; then
   1.385 +      removelist="$obj $libobj"
   1.386 +    else
   1.387 +      removelist="$libobj"
   1.388 +    fi
   1.389 +
   1.390 +    $run $rm $removelist
   1.391 +    trap "$run $rm $removelist; exit 1" 1 2 15
   1.392 +
   1.393 +    # Calculate the filename of the output object if compiler does
   1.394 +    # not support -o with -c
   1.395 +    if test "$compiler_c_o" = no; then
   1.396 +      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext}
   1.397 +      lockfile="$output_obj.lock"
   1.398 +      removelist="$removelist $output_obj $lockfile"
   1.399 +      trap "$run $rm $removelist; exit 1" 1 2 15
   1.400 +    else
   1.401 +      need_locks=no
   1.402 +      lockfile=
   1.403 +    fi
   1.404 +
   1.405 +    # Lock this critical section if it is needed
   1.406 +    # We use this script file to make the link, it avoids creating a new file
   1.407 +    if test "$need_locks" = yes; then
   1.408 +      until ln "$0" "$lockfile" 2>/dev/null; do
   1.409 +	$show "Waiting for $lockfile to be removed"
   1.410 +	sleep 2
   1.411 +      done
   1.412 +    elif test "$need_locks" = warn; then
   1.413 +      if test -f "$lockfile"; then
   1.414 +	echo "\
   1.415 +*** ERROR, $lockfile exists and contains:
   1.416 +`cat $lockfile 2>/dev/null`
   1.417 +
   1.418 +This indicates that another process is trying to use the same
   1.419 +temporary object file, and libtool could not work around it because
   1.420 +your compiler does not support \`-c' and \`-o' together.  If you
   1.421 +repeat this compilation, it may succeed, by chance, but you had better
   1.422 +avoid parallel builds (make -j) in this platform, or get a better
   1.423 +compiler."
   1.424 +
   1.425 +	$run $rm $removelist
   1.426 +	exit 1
   1.427 +      fi
   1.428 +      echo $srcfile > "$lockfile"
   1.429 +    fi
   1.430 +
   1.431 +    if test -n "$fix_srcfile_path"; then
   1.432 +      eval srcfile=\"$fix_srcfile_path\"
   1.433 +    fi
   1.434 +
   1.435 +    # Only build a PIC object if we are building libtool libraries.
   1.436 +    if test "$build_libtool_libs" = yes; then
   1.437 +      # Without this assignment, base_compile gets emptied.
   1.438 +      fbsd_hideous_sh_bug=$base_compile
   1.439 +
   1.440 +      # All platforms use -DPIC, to notify preprocessed assembler code.
   1.441 +      command="$base_compile $srcfile $pic_flag -DPIC"
   1.442 +      if test "$build_old_libs" = yes; then
   1.443 +	lo_libobj="$libobj"
   1.444 +	dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
   1.445 +	if test "X$dir" = "X$libobj"; then
   1.446 +	  dir="$objdir"
   1.447 +	else
   1.448 +	  dir="$dir/$objdir"
   1.449 +	fi
   1.450 +	libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
   1.451 +
   1.452 +	if test -d "$dir"; then
   1.453 +	  $show "$rm $libobj"
   1.454 +	  $run $rm $libobj
   1.455 +	else
   1.456 +	  $show "$mkdir $dir"
   1.457 +	  $run $mkdir $dir
   1.458 +	  status=$?
   1.459 +	  if test $status -ne 0 && test ! -d $dir; then
   1.460 +	    exit $status
   1.461 +	  fi
   1.462 +	fi
   1.463 +      fi
   1.464 +      if test "$compiler_o_lo" = yes; then
   1.465 +	output_obj="$libobj"
   1.466 +	command="$command -o $output_obj"
   1.467 +      elif test "$compiler_c_o" = yes; then
   1.468 +	output_obj="$obj"
   1.469 +	command="$command -o $output_obj"
   1.470 +      fi
   1.471 +
   1.472 +      $run $rm "$output_obj"
   1.473 +      $show "$command"
   1.474 +      if $run eval "$command"; then :
   1.475 +      else
   1.476 +	test -n "$output_obj" && $run $rm $removelist
   1.477 +	exit 1
   1.478 +      fi
   1.479 +
   1.480 +      if test "$need_locks" = warn &&
   1.481 +	 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
   1.482 +	echo "\
   1.483 +*** ERROR, $lockfile contains:
   1.484 +`cat $lockfile 2>/dev/null`
   1.485 +
   1.486 +but it should contain:
   1.487 +$srcfile
   1.488 +
   1.489 +This indicates that another process is trying to use the same
   1.490 +temporary object file, and libtool could not work around it because
   1.491 +your compiler does not support \`-c' and \`-o' together.  If you
   1.492 +repeat this compilation, it may succeed, by chance, but you had better
   1.493 +avoid parallel builds (make -j) in this platform, or get a better
   1.494 +compiler."
   1.495 +
   1.496 +	$run $rm $removelist
   1.497 +	exit 1
   1.498 +      fi
   1.499 +
   1.500 +      # Just move the object if needed, then go on to compile the next one
   1.501 +      if test x"$output_obj" != x"$libobj"; then
   1.502 +	$show "$mv $output_obj $libobj"
   1.503 +	if $run $mv $output_obj $libobj; then :
   1.504 +	else
   1.505 +	  error=$?
   1.506 +	  $run $rm $removelist
   1.507 +	  exit $error
   1.508 +	fi
   1.509 +      fi
   1.510 +
   1.511 +      # If we have no pic_flag, then copy the object into place and finish.
   1.512 +      if test -z "$pic_flag" && test "$build_old_libs" = yes; then
   1.513 +	# Rename the .lo from within objdir to obj
   1.514 +	if test -f $obj; then
   1.515 +	  $show $rm $obj
   1.516 +	  $run $rm $obj
   1.517 +	fi
   1.518 +
   1.519 +	$show "$mv $libobj $obj"
   1.520 +	if $run $mv $libobj $obj; then :
   1.521 +	else
   1.522 +	  error=$?
   1.523 +	  $run $rm $removelist
   1.524 +	  exit $error
   1.525 +	fi
   1.526 +
   1.527 +	xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
   1.528 +	if test "X$xdir" = "X$obj"; then
   1.529 +	  xdir="."
   1.530 +	else
   1.531 +	  xdir="$xdir"
   1.532 +	fi
   1.533 +	baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
   1.534 +	libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
   1.535 +	# Now arrange that obj and lo_libobj become the same file
   1.536 +	$show "(cd $xdir && $LN_S $baseobj $libobj)"
   1.537 +	if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
   1.538 +	  exit 0
   1.539 +	else
   1.540 +	  error=$?
   1.541 +	  $run $rm $removelist
   1.542 +	  exit $error
   1.543 +	fi
   1.544 +      fi
   1.545 +
   1.546 +      # Allow error messages only from the first compilation.
   1.547 +      suppress_output=' >/dev/null 2>&1'
   1.548 +    fi
   1.549 +
   1.550 +    # Only build a position-dependent object if we build old libraries.
   1.551 +    if test "$build_old_libs" = yes; then
   1.552 +      command="$base_compile $srcfile"
   1.553 +      if test "$compiler_c_o" = yes; then
   1.554 +	command="$command -o $obj"
   1.555 +	output_obj="$obj"
   1.556 +      fi
   1.557 +
   1.558 +      # Suppress compiler output if we already did a PIC compilation.
   1.559 +      command="$command$suppress_output"
   1.560 +      $run $rm "$output_obj"
   1.561 +      $show "$command"
   1.562 +      if $run eval "$command"; then :
   1.563 +      else
   1.564 +	$run $rm $removelist
   1.565 +	exit 1
   1.566 +      fi
   1.567 +
   1.568 +      if test "$need_locks" = warn &&
   1.569 +	 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
   1.570 +	echo "\
   1.571 +*** ERROR, $lockfile contains:
   1.572 +`cat $lockfile 2>/dev/null`
   1.573 +
   1.574 +but it should contain:
   1.575 +$srcfile
   1.576 +
   1.577 +This indicates that another process is trying to use the same
   1.578 +temporary object file, and libtool could not work around it because
   1.579 +your compiler does not support \`-c' and \`-o' together.  If you
   1.580 +repeat this compilation, it may succeed, by chance, but you had better
   1.581 +avoid parallel builds (make -j) in this platform, or get a better
   1.582 +compiler."
   1.583 +
   1.584 +	$run $rm $removelist
   1.585 +	exit 1
   1.586 +      fi
   1.587 +
   1.588 +      # Just move the object if needed
   1.589 +      if test x"$output_obj" != x"$obj"; then
   1.590 +	$show "$mv $output_obj $obj"
   1.591 +	if $run $mv $output_obj $obj; then :
   1.592 +	else
   1.593 +	  error=$?
   1.594 +	  $run $rm $removelist
   1.595 +	  exit $error
   1.596 +	fi
   1.597 +      fi
   1.598 +
   1.599 +      # Create an invalid libtool object if no PIC, so that we do not
   1.600 +      # accidentally link it into a program.
   1.601 +      if test "$build_libtool_libs" != yes; then
   1.602 +	$show "echo timestamp > $libobj"
   1.603 +	$run eval "echo timestamp > \$libobj" || exit $?
   1.604 +      else
   1.605 +	# Move the .lo from within objdir
   1.606 +	$show "$mv $libobj $lo_libobj"
   1.607 +	if $run $mv $libobj $lo_libobj; then :
   1.608 +	else
   1.609 +	  error=$?
   1.610 +	  $run $rm $removelist
   1.611 +	  exit $error
   1.612 +	fi
   1.613 +      fi
   1.614 +    fi
   1.615 +
   1.616 +    # Unlock the critical section if it was locked
   1.617 +    if test "$need_locks" != no; then
   1.618 +      $rm "$lockfile"
   1.619 +    fi
   1.620 +
   1.621 +    exit 0
   1.622 +    ;;
   1.623 +
   1.624 +  # libtool link mode
   1.625 +  link)
   1.626 +    modename="$modename: link"
   1.627 +    case "$host" in
   1.628 +    *-*-cygwin* | *-*-mingw* | *-*-os2*)
   1.629 +      # It is impossible to link a dll without this setting, and
   1.630 +      # we shouldn't force the makefile maintainer to figure out
   1.631 +      # which system we are compiling for in order to pass an extra
   1.632 +      # flag for every libtool invokation.
   1.633 +      # allow_undefined=no
   1.634 +
   1.635 +      # FIXME: Unfortunately, there are problems with the above when trying
   1.636 +      # to make a dll which has undefined symbols, in which case not
   1.637 +      # even a static library is built.  For now, we need to specify
   1.638 +      # -no-undefined on the libtool link line when we can be certain
   1.639 +      # that all symbols are satisfied, otherwise we get a static library.
   1.640 +      allow_undefined=yes
   1.641 +
   1.642 +      # This is a source program that is used to create dlls on Windows
   1.643 +      # Don't remove nor modify the starting and closing comments
   1.644 +# /* ltdll.c starts here */
   1.645 +# #define WIN32_LEAN_AND_MEAN
   1.646 +# #include <windows.h>
   1.647 +# #undef WIN32_LEAN_AND_MEAN
   1.648 +# #include <stdio.h>
   1.649 +#
   1.650 +# #ifndef __CYGWIN__
   1.651 +# #  ifdef __CYGWIN32__
   1.652 +# #    define __CYGWIN__ __CYGWIN32__
   1.653 +# #  endif
   1.654 +# #endif
   1.655 +#
   1.656 +# #ifdef __cplusplus
   1.657 +# extern "C" {
   1.658 +# #endif
   1.659 +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
   1.660 +# #ifdef __cplusplus
   1.661 +# }
   1.662 +# #endif
   1.663 +#
   1.664 +# #ifdef __CYGWIN__
   1.665 +# #include <cygwin/cygwin_dll.h>
   1.666 +# DECLARE_CYGWIN_DLL( DllMain );
   1.667 +# #endif
   1.668 +# HINSTANCE __hDllInstance_base;
   1.669 +#
   1.670 +# BOOL APIENTRY
   1.671 +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
   1.672 +# {
   1.673 +#   __hDllInstance_base = hInst;
   1.674 +#   return TRUE;
   1.675 +# }
   1.676 +# /* ltdll.c ends here */
   1.677 +      # This is a source program that is used to create import libraries
   1.678 +      # on Windows for dlls which lack them. Don't remove nor modify the
   1.679 +      # starting and closing comments
   1.680 +# /* impgen.c starts here */
   1.681 +# /*   Copyright (C) 1999 Free Software Foundation, Inc.
   1.682 +# 
   1.683 +#  This file is part of GNU libtool.
   1.684 +# 
   1.685 +#  This program is free software; you can redistribute it and/or modify
   1.686 +#  it under the terms of the GNU General Public License as published by
   1.687 +#  the Free Software Foundation; either version 2 of the License, or
   1.688 +#  (at your option) any later version.
   1.689 +# 
   1.690 +#  This program is distributed in the hope that it will be useful,
   1.691 +#  but WITHOUT ANY WARRANTY; without even the implied warranty of
   1.692 +#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   1.693 +#  GNU General Public License for more details.
   1.694 +# 
   1.695 +#  You should have received a copy of the GNU General Public License
   1.696 +#  along with this program; if not, write to the Free Software
   1.697 +#  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
   1.698 +#  */
   1.699 +# 
   1.700 +#  #include <stdio.h>		/* for printf() */
   1.701 +#  #include <unistd.h>		/* for open(), lseek(), read() */
   1.702 +#  #include <fcntl.h>		/* for O_RDONLY, O_BINARY */
   1.703 +#  #include <string.h>		/* for strdup() */
   1.704 +# 
   1.705 +#  static unsigned int
   1.706 +#  pe_get16 (fd, offset)
   1.707 +#       int fd;
   1.708 +#       int offset;
   1.709 +#  {
   1.710 +#    unsigned char b[2];
   1.711 +#    lseek (fd, offset, SEEK_SET);
   1.712 +#    read (fd, b, 2);
   1.713 +#    return b[0] + (b[1]<<8);
   1.714 +#  }
   1.715 +# 
   1.716 +#  static unsigned int
   1.717 +#  pe_get32 (fd, offset)
   1.718 +#      int fd;
   1.719 +#      int offset;
   1.720 +#  {
   1.721 +#    unsigned char b[4];
   1.722 +#    lseek (fd, offset, SEEK_SET);
   1.723 +#    read (fd, b, 4);
   1.724 +#    return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
   1.725 +#  }
   1.726 +# 
   1.727 +#  static unsigned int
   1.728 +#  pe_as32 (ptr)
   1.729 +#       void *ptr;
   1.730 +#  {
   1.731 +#    unsigned char *b = ptr;
   1.732 +#    return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
   1.733 +#  }
   1.734 +# 
   1.735 +#  int
   1.736 +#  main (argc, argv)
   1.737 +#      int argc;
   1.738 +#      char *argv[];
   1.739 +#  {
   1.740 +#      int dll;
   1.741 +#      unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
   1.742 +#      unsigned long export_rva, export_size, nsections, secptr, expptr;
   1.743 +#      unsigned long name_rvas, nexp;
   1.744 +#      unsigned char *expdata, *erva;
   1.745 +#      char *filename, *dll_name;
   1.746 +# 
   1.747 +#      filename = argv[1];
   1.748 +# 
   1.749 +#      dll = open(filename, O_RDONLY|O_BINARY);
   1.750 +#      if (!dll)
   1.751 +#  	return 1;
   1.752 +# 
   1.753 +#      dll_name = filename;
   1.754 +#    
   1.755 +#      for (i=0; filename[i]; i++)
   1.756 +#  	if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
   1.757 +#  	    dll_name = filename + i +1;
   1.758 +# 
   1.759 +#      pe_header_offset = pe_get32 (dll, 0x3c);
   1.760 +#      opthdr_ofs = pe_header_offset + 4 + 20;
   1.761 +#      num_entries = pe_get32 (dll, opthdr_ofs + 92);
   1.762 +# 
   1.763 +#      if (num_entries < 1) /* no exports */
   1.764 +#  	return 1;
   1.765 +# 
   1.766 +#      export_rva = pe_get32 (dll, opthdr_ofs + 96);
   1.767 +#      export_size = pe_get32 (dll, opthdr_ofs + 100);
   1.768 +#      nsections = pe_get16 (dll, pe_header_offset + 4 +2);
   1.769 +#      secptr = (pe_header_offset + 4 + 20 +
   1.770 +#  	      pe_get16 (dll, pe_header_offset + 4 + 16));
   1.771 +# 
   1.772 +#      expptr = 0;
   1.773 +#      for (i = 0; i < nsections; i++)
   1.774 +#      {
   1.775 +#  	char sname[8];
   1.776 +#  	unsigned long secptr1 = secptr + 40 * i;
   1.777 +#  	unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
   1.778 +#  	unsigned long vsize = pe_get32 (dll, secptr1 + 16);
   1.779 +#  	unsigned long fptr = pe_get32 (dll, secptr1 + 20);
   1.780 +#  	lseek(dll, secptr1, SEEK_SET);
   1.781 +#  	read(dll, sname, 8);
   1.782 +#  	if (vaddr <= export_rva && vaddr+vsize > export_rva)
   1.783 +#  	{
   1.784 +#  	    expptr = fptr + (export_rva - vaddr);
   1.785 +#  	    if (export_rva + export_size > vaddr + vsize)
   1.786 +#  		export_size = vsize - (export_rva - vaddr);
   1.787 +#  	    break;
   1.788 +#  	}
   1.789 +#      }
   1.790 +# 
   1.791 +#      expdata = (unsigned char*)malloc(export_size);
   1.792 +#      lseek (dll, expptr, SEEK_SET);
   1.793 +#      read (dll, expdata, export_size);
   1.794 +#      erva = expdata - export_rva;
   1.795 +# 
   1.796 +#      nexp = pe_as32 (expdata+24);
   1.797 +#      name_rvas = pe_as32 (expdata+32);
   1.798 +# 
   1.799 +#      printf ("EXPORTS\n");
   1.800 +#      for (i = 0; i<nexp; i++)
   1.801 +#      {
   1.802 +#  	unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
   1.803 +#  	printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
   1.804 +#      }
   1.805 +# 
   1.806 +#      return 0;
   1.807 +#  }
   1.808 +# /* impgen.c ends here */
   1.809 +      ;;
   1.810 +    *)
   1.811 +      allow_undefined=yes
   1.812 +      ;;
   1.813 +    esac
   1.814 +    compile_command="$nonopt"
   1.815 +    finalize_command="$nonopt"
   1.816 +
   1.817 +    compile_rpath=
   1.818 +    finalize_rpath=
   1.819 +    compile_shlibpath=
   1.820 +    finalize_shlibpath=
   1.821 +    convenience=
   1.822 +    old_convenience=
   1.823 +    deplibs=
   1.824 +    linkopts=
   1.825 +
   1.826 +    if test -n "$shlibpath_var"; then
   1.827 +      # get the directories listed in $shlibpath_var
   1.828 +      eval lib_search_path=\`\$echo \"X \${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
   1.829 +    else
   1.830 +      lib_search_path=
   1.831 +    fi
   1.832 +    # now prepend the system-specific ones
   1.833 +    eval lib_search_path=\"$sys_lib_search_path_spec\$lib_search_path\"
   1.834 +    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
   1.835 +    
   1.836 +    avoid_version=no
   1.837 +    dlfiles=
   1.838 +    dlprefiles=
   1.839 +    dlself=no
   1.840 +    export_dynamic=no
   1.841 +    export_symbols=
   1.842 +    export_symbols_regex=
   1.843 +    generated=
   1.844 +    libobjs=
   1.845 +    link_against_libtool_libs=
   1.846 +    ltlibs=
   1.847 +    module=no
   1.848 +    objs=
   1.849 +    prefer_static_libs=no
   1.850 +    preload=no
   1.851 +    prev=
   1.852 +    prevarg=
   1.853 +    release=
   1.854 +    rpath=
   1.855 +    xrpath=
   1.856 +    perm_rpath=
   1.857 +    temp_rpath=
   1.858 +    thread_safe=no
   1.859 +    vinfo=
   1.860 +
   1.861 +    # We need to know -static, to get the right output filenames.
   1.862 +    for arg
   1.863 +    do
   1.864 +      case "$arg" in
   1.865 +      -all-static | -static)
   1.866 +	if test "X$arg" = "X-all-static"; then
   1.867 +	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
   1.868 +	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
   1.869 +	  fi
   1.870 +	  if test -n "$link_static_flag"; then
   1.871 +	    dlopen_self=$dlopen_self_static
   1.872 +	  fi
   1.873 +	else
   1.874 +	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
   1.875 +	    dlopen_self=$dlopen_self_static
   1.876 +	  fi
   1.877 +	fi
   1.878 +	build_libtool_libs=no
   1.879 +	build_old_libs=yes
   1.880 +	prefer_static_libs=yes
   1.881 +	break
   1.882 +	;;
   1.883 +      esac
   1.884 +    done
   1.885 +
   1.886 +    # See if our shared archives depend on static archives.
   1.887 +    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
   1.888 +
   1.889 +    # Go through the arguments, transforming them on the way.
   1.890 +    while test $# -gt 0; do
   1.891 +      arg="$1"
   1.892 +      shift
   1.893 +
   1.894 +      # If the previous option needs an argument, assign it.
   1.895 +      if test -n "$prev"; then
   1.896 +	case "$prev" in
   1.897 +	output)
   1.898 +	  compile_command="$compile_command @OUTPUT@"
   1.899 +	  finalize_command="$finalize_command @OUTPUT@"
   1.900 +	  ;;
   1.901 +	esac
   1.902 +
   1.903 +	case "$prev" in
   1.904 +	dlfiles|dlprefiles)
   1.905 +	  if test "$preload" = no; then
   1.906 +	    # Add the symbol object into the linking commands.
   1.907 +	    compile_command="$compile_command @SYMFILE@"
   1.908 +	    finalize_command="$finalize_command @SYMFILE@"
   1.909 +	    preload=yes
   1.910 +	  fi
   1.911 +	  case "$arg" in
   1.912 +	  *.la | *.lo) ;;  # We handle these cases below.
   1.913 +	  force)
   1.914 +	    if test "$dlself" = no; then
   1.915 +	      dlself=needless
   1.916 +	      export_dynamic=yes
   1.917 +	    fi
   1.918 +	    prev=
   1.919 +	    continue
   1.920 +	    ;;
   1.921 +	  self)
   1.922 +	    if test "$prev" = dlprefiles; then
   1.923 +	      dlself=yes
   1.924 +	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
   1.925 +	      dlself=yes
   1.926 +	    else
   1.927 +	      dlself=needless
   1.928 +	      export_dynamic=yes
   1.929 +	    fi
   1.930 +	    prev=
   1.931 +	    continue
   1.932 +	    ;;
   1.933 +	  *)
   1.934 +	    if test "$prev" = dlfiles; then
   1.935 +	      dlfiles="$dlfiles $arg"
   1.936 +	    else
   1.937 +	      dlprefiles="$dlprefiles $arg"
   1.938 +	    fi
   1.939 +	    prev=
   1.940 +	    ;;
   1.941 +	  esac
   1.942 +	  ;;
   1.943 +	expsyms)
   1.944 +	  export_symbols="$arg"
   1.945 +	  if test ! -f "$arg"; then
   1.946 +	    $echo "$modename: symbol file \`$arg' does not exist"
   1.947 +	    exit 1
   1.948 +	  fi
   1.949 +	  prev=
   1.950 +	  continue
   1.951 +	  ;;
   1.952 +	expsyms_regex)
   1.953 +	  export_symbols_regex="$arg"
   1.954 +	  prev=
   1.955 +	  continue
   1.956 +	  ;;
   1.957 +	release)
   1.958 +	  release="-$arg"
   1.959 +	  prev=
   1.960 +	  continue
   1.961 +	  ;;
   1.962 +	rpath | xrpath)
   1.963 +	  # We need an absolute path.
   1.964 +	  case "$arg" in
   1.965 +	  [\\/]* | [A-Za-z]:[\\/]*) ;;
   1.966 +	  *)
   1.967 +	    $echo "$modename: only absolute run-paths are allowed" 1>&2
   1.968 +	    exit 1
   1.969 +	    ;;
   1.970 +	  esac
   1.971 +	  if test "$prev" = rpath; then
   1.972 +	    case "$rpath " in
   1.973 +	    *" $arg "*) ;;
   1.974 +	    *) rpath="$rpath $arg" ;;
   1.975 +	    esac
   1.976 +	  else
   1.977 +	    case "$xrpath " in
   1.978 +	    *" $arg "*) ;;
   1.979 +	    *) xrpath="$xrpath $arg" ;;
   1.980 +	    esac
   1.981 +	  fi
   1.982 +	  prev=
   1.983 +	  continue
   1.984 +	  ;;
   1.985 +	*)
   1.986 +	  eval "$prev=\"\$arg\""
   1.987 +	  prev=
   1.988 +	  continue
   1.989 +	  ;;
   1.990 +	esac
   1.991 +      fi
   1.992 +
   1.993 +      prevarg="$arg"
   1.994 +
   1.995 +      case "$arg" in
   1.996 +      -all-static)
   1.997 +	if test -n "$link_static_flag"; then
   1.998 +	  compile_command="$compile_command $link_static_flag"
   1.999 +	  finalize_command="$finalize_command $link_static_flag"
  1.1000 +	fi
  1.1001 +	continue
  1.1002 +	;;
  1.1003 +
  1.1004 +      -allow-undefined)
  1.1005 +	# FIXME: remove this flag sometime in the future.
  1.1006 +	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
  1.1007 +	continue
  1.1008 +	;;
  1.1009 +
  1.1010 +      -avoid-version)
  1.1011 +	avoid_version=yes
  1.1012 +	continue
  1.1013 +	;;
  1.1014 +
  1.1015 +      -dlopen)
  1.1016 +	prev=dlfiles
  1.1017 +	continue
  1.1018 +	;;
  1.1019 +
  1.1020 +      -dlpreopen)
  1.1021 +	prev=dlprefiles
  1.1022 +	continue
  1.1023 +	;;
  1.1024 +
  1.1025 +      -export-dynamic)
  1.1026 +	export_dynamic=yes
  1.1027 +	continue
  1.1028 +	;;
  1.1029 +
  1.1030 +      -export-symbols | -export-symbols-regex)
  1.1031 +	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
  1.1032 +	  $echo "$modename: not more than one -exported-symbols argument allowed"
  1.1033 +	  exit 1
  1.1034 +	fi
  1.1035 +	if test "X$arg" = "X-export-symbols"; then
  1.1036 +	  prev=expsyms
  1.1037 +	else
  1.1038 +	  prev=expsyms_regex
  1.1039 +	fi
  1.1040 +	continue
  1.1041 +	;;
  1.1042 +
  1.1043 +      -L*)
  1.1044 +	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
  1.1045 +	# We need an absolute path.
  1.1046 +	case "$dir" in
  1.1047 +	[\\/]* | [A-Za-z]:[\\/]*) ;;
  1.1048 +	*)
  1.1049 +	  absdir=`cd "$dir" && pwd`
  1.1050 +	  if test -z "$absdir"; then
  1.1051 +	    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
  1.1052 +	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
  1.1053 +	    absdir="$dir"
  1.1054 +	  fi
  1.1055 +	  dir="$absdir"
  1.1056 +	  ;;
  1.1057 +	esac
  1.1058 +	case " $deplibs " in
  1.1059 +	*" $arg "*) ;;
  1.1060 +	*) deplibs="$deplibs $arg";;
  1.1061 +	esac
  1.1062 +	case " $lib_search_path " in
  1.1063 +	*" $dir "*) ;;
  1.1064 +	*) lib_search_path="$lib_search_path $dir";;
  1.1065 +	esac
  1.1066 +	case "$host" in
  1.1067 +	*-*-cygwin* | *-*-mingw* | *-*-os2*)
  1.1068 +	  dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
  1.1069 +	  case ":$dllsearchpath:" in
  1.1070 +	  ::) dllsearchpath="$dllsearchdir";;
  1.1071 +	  *":$dllsearchdir:"*) ;;
  1.1072 +	  *) dllsearchpath="$dllsearchpath:$dllsearchdir";;
  1.1073 +	  esac
  1.1074 +	  ;;
  1.1075 +	esac
  1.1076 +	;;
  1.1077 +
  1.1078 +      -l*)
  1.1079 +	if test "$arg" = "-lc"; then
  1.1080 +	  case "$host" in
  1.1081 +	  *-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos* |*-*-freebsd* )
  1.1082 +	    # These systems don't actually have c library (as such)
  1.1083 +	    continue
  1.1084 +	    ;;
  1.1085 +	  esac
  1.1086 +	elif test "$arg" = "-lm"; then
  1.1087 +	  case "$host" in
  1.1088 +	  *-*-cygwin* | *-*-beos*)
  1.1089 +	    # These systems don't actually have math library (as such)
  1.1090 +	    continue
  1.1091 +	    ;;
  1.1092 +	  esac
  1.1093 +	fi
  1.1094 +	deplibs="$deplibs $arg"
  1.1095 +	;;
  1.1096 +
  1.1097 +      -module)
  1.1098 +	module=yes
  1.1099 +	continue
  1.1100 +	;;
  1.1101 +
  1.1102 +      -no-undefined)
  1.1103 +	allow_undefined=no
  1.1104 +	continue
  1.1105 +	;;
  1.1106 +
  1.1107 +      -o) prev=output ;;
  1.1108 +
  1.1109 +      -release)
  1.1110 +	prev=release
  1.1111 +	continue
  1.1112 +	;;
  1.1113 +
  1.1114 +      -rpath)
  1.1115 +	prev=rpath
  1.1116 +	continue
  1.1117 +	;;
  1.1118 +
  1.1119 +      -R)
  1.1120 +	prev=xrpath
  1.1121 +	continue
  1.1122 +	;;
  1.1123 +
  1.1124 +      -R*)
  1.1125 +	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
  1.1126 +	# We need an absolute path.
  1.1127 +	case "$dir" in
  1.1128 +	[\\/]* | [A-Za-z]:[\\/]*) ;;
  1.1129 +	*)
  1.1130 +	  $echo "$modename: only absolute run-paths are allowed" 1>&2
  1.1131 +	  exit 1
  1.1132 +	  ;;
  1.1133 +	esac
  1.1134 +	case "$xrpath " in
  1.1135 +	*" $dir "*) ;;
  1.1136 +	*) xrpath="$xrpath $dir" ;;
  1.1137 +	esac
  1.1138 +	continue
  1.1139 +	;;
  1.1140 +
  1.1141 +      -static)
  1.1142 +	# If we have no pic_flag, then this is the same as -all-static.
  1.1143 +	if test -z "$pic_flag" && test -n "$link_static_flag"; then
  1.1144 +	  compile_command="$compile_command $link_static_flag"
  1.1145 +	  finalize_command="$finalize_command $link_static_flag"
  1.1146 +	fi
  1.1147 +	continue
  1.1148 +	;;
  1.1149 +
  1.1150 +      -thread-safe)
  1.1151 +	thread_safe=yes
  1.1152 +	continue
  1.1153 +	;;
  1.1154 +
  1.1155 +      -version-info)
  1.1156 +	prev=vinfo
  1.1157 +	continue
  1.1158 +	;;
  1.1159 +
  1.1160 +      # Some other compiler flag.
  1.1161 +      -* | +*)
  1.1162 +	# Unknown arguments in both finalize_command and compile_command need
  1.1163 +	# to be aesthetically quoted because they are evaled later.
  1.1164 +	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  1.1165 +	case "$arg" in
  1.1166 +	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
  1.1167 +	  arg="\"$arg\""
  1.1168 +	  ;;
  1.1169 +	esac
  1.1170 +	;;
  1.1171 +
  1.1172 +      *.o | *.obj | *.a | *.lib)
  1.1173 +	# A standard object.
  1.1174 +	objs="$objs $arg"
  1.1175 +	;;
  1.1176 +
  1.1177 +      *.lo)
  1.1178 +	# A library object.
  1.1179 +	if test "$prev" = dlfiles; then
  1.1180 +	  dlfiles="$dlfiles $arg"
  1.1181 +	  if test "$build_libtool_libs" = yes && test "$dlopen" = yes; then
  1.1182 +	    prev=
  1.1183 +	    continue
  1.1184 +	  else
  1.1185 +	    # If libtool objects are unsupported, then we need to preload.
  1.1186 +	    prev=dlprefiles
  1.1187 +	  fi
  1.1188 +	fi
  1.1189 +
  1.1190 +	if test "$prev" = dlprefiles; then
  1.1191 +	  # Preload the old-style object.
  1.1192 +	  dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
  1.1193 +	  prev=
  1.1194 +	fi
  1.1195 +	libobjs="$libobjs $arg"
  1.1196 +	;;
  1.1197 +
  1.1198 +      *.la)
  1.1199 +	# A libtool-controlled library.
  1.1200 +
  1.1201 +	dlname=
  1.1202 +	libdir=
  1.1203 +	library_names=
  1.1204 +	old_library=
  1.1205 +
  1.1206 +	# Check to see that this really is a libtool archive.
  1.1207 +	if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
  1.1208 +	else
  1.1209 +	  $echo "$modename: \`$arg' is not a valid libtool archive" 1>&2
  1.1210 +	  exit 1
  1.1211 +	fi
  1.1212 +
  1.1213 +	# If the library was installed with an old release of libtool,
  1.1214 +	# it will not redefine variable installed.
  1.1215 +	installed=yes
  1.1216 +
  1.1217 +	# Read the .la file
  1.1218 +	# If there is no directory component, then add one.
  1.1219 +	case "$arg" in
  1.1220 +	*/* | *\\*) . $arg ;;
  1.1221 +	*) . ./$arg ;;
  1.1222 +	esac
  1.1223 +
  1.1224 +	# Get the name of the library we link against.
  1.1225 +	linklib=
  1.1226 +	for l in $old_library $library_names; do
  1.1227 +	  linklib="$l"
  1.1228 +	done
  1.1229 +
  1.1230 +	if test -z "$linklib"; then
  1.1231 +	  $echo "$modename: cannot find name of link library for \`$arg'" 1>&2
  1.1232 +	  exit 1
  1.1233 +	fi
  1.1234 +
  1.1235 +	# Find the relevant object directory and library name.
  1.1236 +	name=`$echo "X$arg" | $Xsed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
  1.1237 +
  1.1238 +	if test "X$installed" = Xyes; then
  1.1239 +	  dir="$libdir"
  1.1240 +	else
  1.1241 +	  dir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
  1.1242 +	  if test "X$dir" = "X$arg"; then
  1.1243 +	    dir="$objdir"
  1.1244 +	  else
  1.1245 +	    dir="$dir/$objdir"
  1.1246 +	  fi
  1.1247 +	fi
  1.1248 +
  1.1249 +	if test -n "$dependency_libs"; then
  1.1250 +	  # Extract -R and -L from dependency_libs
  1.1251 +	  temp_deplibs=
  1.1252 +	  for deplib in $dependency_libs; do
  1.1253 +	    case "$deplib" in
  1.1254 +	    -R*) temp_xrpath=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
  1.1255 +		 case " $rpath $xrpath " in
  1.1256 +		 *" $temp_xrpath "*) ;;
  1.1257 +		 *) xrpath="$xrpath $temp_xrpath";;
  1.1258 +		 esac;;
  1.1259 +	    -L*) case "$compile_command $temp_deplibs " in
  1.1260 +		 *" $deplib "*) ;;
  1.1261 +		 *) temp_deplibs="$temp_deplibs $deplib";;
  1.1262 +		 esac
  1.1263 +		 temp_dir=`$echo "X$deplib" | $Xsed -e 's/^-L//'`
  1.1264 +		 case " $lib_search_path " in
  1.1265 +		 *" $temp_dir "*) ;;
  1.1266 +		 *) lib_search_path="$lib_search_path $temp_dir";;
  1.1267 +		 esac
  1.1268 +		 ;;
  1.1269 +	    *) temp_deplibs="$temp_deplibs $deplib";;
  1.1270 +	    esac
  1.1271 +	  done
  1.1272 +	  dependency_libs="$temp_deplibs"
  1.1273 +	fi
  1.1274 +
  1.1275 +	if test -z "$libdir"; then
  1.1276 +	  # It is a libtool convenience library, so add in its objects.
  1.1277 +	  convenience="$convenience $dir/$old_library"
  1.1278 +	  old_convenience="$old_convenience $dir/$old_library"
  1.1279 +	  deplibs="$deplibs$dependency_libs"
  1.1280 +	  compile_command="$compile_command $dir/$old_library$dependency_libs"
  1.1281 +	  finalize_command="$finalize_command $dir/$old_library$dependency_libs"
  1.1282 +	  continue
  1.1283 +	fi
  1.1284 +
  1.1285 +	# This library was specified with -dlopen.
  1.1286 +	if test "$prev" = dlfiles; then
  1.1287 +	  dlfiles="$dlfiles $arg"
  1.1288 +	  if test -z "$dlname" || test "$dlopen" != yes || test "$build_libtool_libs" = no; then
  1.1289 +	    # If there is no dlname, no dlopen support or we're linking statically,
  1.1290 +	    # we need to preload.
  1.1291 +	    prev=dlprefiles
  1.1292 +	  else
  1.1293 +	    # We should not create a dependency on this library, but we
  1.1294 +	    # may need any libraries it requires.
  1.1295 +	    compile_command="$compile_command$dependency_libs"
  1.1296 +	    finalize_command="$finalize_command$dependency_libs"
  1.1297 +	    prev=
  1.1298 +	    continue
  1.1299 +	  fi
  1.1300 +	fi
  1.1301 +
  1.1302 +	# The library was specified with -dlpreopen.
  1.1303 +	if test "$prev" = dlprefiles; then
  1.1304 +	  # Prefer using a static library (so that no silly _DYNAMIC symbols
  1.1305 +	  # are required to link).
  1.1306 +	  if test -n "$old_library"; then
  1.1307 +	    dlprefiles="$dlprefiles $dir/$old_library"
  1.1308 +	  else
  1.1309 +	    dlprefiles="$dlprefiles $dir/$linklib"
  1.1310 +	  fi
  1.1311 +	  prev=
  1.1312 +	fi
  1.1313 +
  1.1314 +	if test -n "$library_names" &&
  1.1315 +	   { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
  1.1316 +	  link_against_libtool_libs="$link_against_libtool_libs $arg"
  1.1317 +	  if test -n "$shlibpath_var"; then
  1.1318 +	    # Make sure the rpath contains only unique directories.
  1.1319 +	    case "$temp_rpath " in
  1.1320 +	    *" $dir "*) ;;
  1.1321 +	    *) temp_rpath="$temp_rpath $dir" ;;
  1.1322 +	    esac
  1.1323 +	  fi
  1.1324 +
  1.1325 +	  # We need an absolute path.
  1.1326 +	  case "$dir" in
  1.1327 +	  [\\/] | [A-Za-z]:[\\/]*) absdir="$dir" ;;
  1.1328 +	  *)
  1.1329 +	    absdir=`cd "$dir" && pwd`
  1.1330 +	    if test -z "$absdir"; then
  1.1331 +	      $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
  1.1332 +	      $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
  1.1333 +	      absdir="$dir"
  1.1334 +	    fi
  1.1335 +	    ;;
  1.1336 +	  esac
  1.1337 +	  
  1.1338 +	  # This is the magic to use -rpath.
  1.1339 +	  # Skip directories that are in the system default run-time
  1.1340 +	  # search path, unless they have been requested with -R.
  1.1341 +	  case " $sys_lib_dlsearch_path " in
  1.1342 +	  *" $absdir "*) ;;
  1.1343 +	  *)
  1.1344 +	    case "$compile_rpath " in
  1.1345 +	    *" $absdir "*) ;;
  1.1346 +	    *) compile_rpath="$compile_rpath $absdir" 
  1.1347 +	    esac
  1.1348 +	    ;;
  1.1349 +	  esac
  1.1350 +
  1.1351 +	  case " $sys_lib_dlsearch_path " in
  1.1352 +	  *" $libdir "*) ;;
  1.1353 +	  *)
  1.1354 +	    case "$finalize_rpath " in
  1.1355 +	    *" $libdir "*) ;;
  1.1356 +	    *) finalize_rpath="$finalize_rpath $libdir"
  1.1357 +	    esac
  1.1358 +	    ;;
  1.1359 +	  esac
  1.1360 +
  1.1361 +	  lib_linked=yes
  1.1362 +	  case "$hardcode_action" in
  1.1363 +	  immediate | unsupported)
  1.1364 +	    if test "$hardcode_direct" = no; then
  1.1365 +	      compile_command="$compile_command $dir/$linklib"
  1.1366 +	      deplibs="$deplibs $dir/$linklib"
  1.1367 +	      case "$host" in
  1.1368 +	      *-*-cygwin* | *-*-mingw* | *-*-os2*)
  1.1369 +		dllsearchdir=`cd "$dir" && pwd || echo "$dir"`
  1.1370 +		if test -n "$dllsearchpath"; then
  1.1371 +		  dllsearchpath="$dllsearchpath:$dllsearchdir"
  1.1372 +		else
  1.1373 +		  dllsearchpath="$dllsearchdir"
  1.1374 +		fi
  1.1375 +		;;
  1.1376 +	      esac
  1.1377 +	    elif test "$hardcode_minus_L" = no; then
  1.1378 +	      case "$host" in
  1.1379 +	      *-*-sunos*)
  1.1380 +		compile_shlibpath="$compile_shlibpath$dir:"
  1.1381 +		;;
  1.1382 +	      esac
  1.1383 +	      case "$compile_command " in
  1.1384 +	      *" -L$dir "*) ;;
  1.1385 +	      *) compile_command="$compile_command -L$dir";;
  1.1386 +	      esac
  1.1387 +	      compile_command="$compile_command -l$name"
  1.1388 +	      deplibs="$deplibs -L$dir -l$name"
  1.1389 +	    elif test "$hardcode_shlibpath_var" = no; then
  1.1390 +	      case ":$compile_shlibpath:" in
  1.1391 +	      *":$dir:"*) ;;
  1.1392 +	      *) compile_shlibpath="$compile_shlibpath$dir:";;
  1.1393 +	      esac
  1.1394 +	      compile_command="$compile_command -l$name"
  1.1395 +	      deplibs="$deplibs -l$name"
  1.1396 +	    else
  1.1397 +	      lib_linked=no
  1.1398 +	    fi
  1.1399 +	    ;;
  1.1400 +
  1.1401 +	  relink)
  1.1402 +	    if test "$hardcode_direct" = yes; then
  1.1403 +	      compile_command="$compile_command $absdir/$linklib"
  1.1404 +	      deplibs="$deplibs $absdir/$linklib"
  1.1405 +	    elif test "$hardcode_minus_L" = yes; then
  1.1406 +	      case "$compile_command " in
  1.1407 +	      *" -L$absdir "*) ;;
  1.1408 +	      *) compile_command="$compile_command -L$absdir";;
  1.1409 +	      esac
  1.1410 +	      compile_command="$compile_command -l$name"
  1.1411 +	      deplibs="$deplibs -L$absdir -l$name"
  1.1412 +	    elif test "$hardcode_shlibpath_var" = yes; then
  1.1413 +	      case ":$compile_shlibpath:" in
  1.1414 +	      *":$absdir:"*) ;;
  1.1415 +	      *) compile_shlibpath="$compile_shlibpath$absdir:";;
  1.1416 +	      esac
  1.1417 +	      compile_command="$compile_command -l$name"
  1.1418 +	      deplibs="$deplibs -l$name"
  1.1419 +	    else
  1.1420 +	      lib_linked=no
  1.1421 +	    fi
  1.1422 +	    ;;
  1.1423 +
  1.1424 +	  *)
  1.1425 +	    lib_linked=no
  1.1426 +	    ;;
  1.1427 +	  esac
  1.1428 +
  1.1429 +	  if test "$lib_linked" != yes; then
  1.1430 +	    $echo "$modename: configuration error: unsupported hardcode properties"
  1.1431 +	    exit 1
  1.1432 +	  fi
  1.1433 +
  1.1434 +	  # Finalize command for both is simple: just hardcode it.
  1.1435 +	  if test "$hardcode_direct" = yes; then
  1.1436 +	    finalize_command="$finalize_command $libdir/$linklib"
  1.1437 +	  elif test "$hardcode_minus_L" = yes; then
  1.1438 +	    case "$finalize_command " in
  1.1439 +	    *" -L$libdir "*) ;;
  1.1440 +	    *) finalize_command="$finalize_command -L$libdir";;
  1.1441 +	    esac
  1.1442 +	    finalize_command="$finalize_command -l$name"
  1.1443 +	  elif test "$hardcode_shlibpath_var" = yes; then
  1.1444 +	    case ":$finalize_shlibpath:" in
  1.1445 +	    *":$libdir:"*) ;;
  1.1446 +	    *) finalize_shlibpath="$finalize_shlibpath$libdir:";;
  1.1447 +	    esac
  1.1448 +	    finalize_command="$finalize_command -l$name"
  1.1449 +	  else
  1.1450 +	    # We cannot seem to hardcode it, guess we'll fake it.
  1.1451 +	    case "$finalize_command " in
  1.1452 +	    *" -L$dir "*) ;;
  1.1453 +	    *) finalize_command="$finalize_command -L$libdir";;
  1.1454 +	    esac
  1.1455 +	    finalize_command="$finalize_command -l$name"
  1.1456 +	  fi
  1.1457 +	else
  1.1458 +	  # Transform directly to old archives if we don't build new libraries.
  1.1459 +	  if test -n "$pic_flag" && test -z "$old_library"; then
  1.1460 +	    $echo "$modename: cannot find static library for \`$arg'" 1>&2
  1.1461 +	    exit 1
  1.1462 +	  fi
  1.1463 +
  1.1464 +	  # Here we assume that one of hardcode_direct or hardcode_minus_L
  1.1465 +	  # is not unsupported.  This is valid on all known static and
  1.1466 +	  # shared platforms.
  1.1467 +	  if test "$hardcode_direct" != unsupported; then
  1.1468 +	    test -n "$old_library" && linklib="$old_library"
  1.1469 +	    compile_command="$compile_command $dir/$linklib"
  1.1470 +	    finalize_command="$finalize_command $dir/$linklib"
  1.1471 +	  else
  1.1472 +	    case "$compile_command " in
  1.1473 +	    *" -L$dir "*) ;;
  1.1474 +	    *) compile_command="$compile_command -L$dir";;
  1.1475 +	    esac
  1.1476 +	    compile_command="$compile_command -l$name"
  1.1477 +	    case "$finalize_command " in
  1.1478 +	    *" -L$dir "*) ;;
  1.1479 +	    *) finalize_command="$finalize_command -L$dir";;
  1.1480 +	    esac
  1.1481 +	    finalize_command="$finalize_command -l$name"
  1.1482 +	  fi
  1.1483 +	fi
  1.1484 +
  1.1485 +	# Add in any libraries that this one depends upon.
  1.1486 +	compile_command="$compile_command$dependency_libs"
  1.1487 +	finalize_command="$finalize_command$dependency_libs"
  1.1488 +	continue
  1.1489 +	;;
  1.1490 +
  1.1491 +      # Some other compiler argument.
  1.1492 +      *)
  1.1493 +	# Unknown arguments in both finalize_command and compile_command need
  1.1494 +	# to be aesthetically quoted because they are evaled later.
  1.1495 +	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  1.1496 +	case "$arg" in
  1.1497 +	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
  1.1498 +	  arg="\"$arg\""
  1.1499 +	  ;;
  1.1500 +	esac
  1.1501 +	;;
  1.1502 +      esac
  1.1503 +
  1.1504 +      # Now actually substitute the argument into the commands.
  1.1505 +      if test -n "$arg"; then
  1.1506 +	compile_command="$compile_command $arg"
  1.1507 +	finalize_command="$finalize_command $arg"
  1.1508 +      fi
  1.1509 +    done
  1.1510 +
  1.1511 +    if test -n "$prev"; then
  1.1512 +      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
  1.1513 +      $echo "$help" 1>&2
  1.1514 +      exit 1
  1.1515 +    fi
  1.1516 +
  1.1517 +    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
  1.1518 +      eval arg=\"$export_dynamic_flag_spec\"
  1.1519 +      compile_command="$compile_command $arg"
  1.1520 +      finalize_command="$finalize_command $arg"
  1.1521 +    fi
  1.1522 +
  1.1523 +    oldlibs=
  1.1524 +    # calculate the name of the file, without its directory
  1.1525 +    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
  1.1526 +    libobjs_save="$libobjs"
  1.1527 +
  1.1528 +    case "$output" in
  1.1529 +    "")
  1.1530 +      $echo "$modename: you must specify an output file" 1>&2
  1.1531 +      $echo "$help" 1>&2
  1.1532 +      exit 1
  1.1533 +      ;;
  1.1534 +
  1.1535 +    *.a | *.lib)
  1.1536 +      if test -n "$link_against_libtool_libs"; then
  1.1537 +	$echo "$modename: error: cannot link libtool libraries into archives" 1>&2
  1.1538 +	exit 1
  1.1539 +      fi
  1.1540 +
  1.1541 +      if test -n "$deplibs"; then
  1.1542 +	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
  1.1543 +      fi
  1.1544 +
  1.1545 +      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  1.1546 +	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
  1.1547 +      fi
  1.1548 +
  1.1549 +      if test -n "$rpath"; then
  1.1550 +	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
  1.1551 +      fi
  1.1552 +
  1.1553 +      if test -n "$xrpath"; then
  1.1554 +	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
  1.1555 +      fi
  1.1556 +
  1.1557 +      if test -n "$vinfo"; then
  1.1558 +	$echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
  1.1559 +      fi
  1.1560 +
  1.1561 +      if test -n "$release"; then
  1.1562 +	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
  1.1563 +      fi
  1.1564 +
  1.1565 +      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
  1.1566 +	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
  1.1567 +      fi
  1.1568 +
  1.1569 +      # Now set the variables for building old libraries.
  1.1570 +      build_libtool_libs=no
  1.1571 +      oldlibs="$output"
  1.1572 +      ;;
  1.1573 +
  1.1574 +    *.la)
  1.1575 +      # Make sure we only generate libraries of the form `libNAME.la'.
  1.1576 +      case "$outputname" in
  1.1577 +      lib*)
  1.1578 +	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
  1.1579 +	eval libname=\"$libname_spec\"
  1.1580 +	;;
  1.1581 +      *)
  1.1582 +	if test "$module" = no; then
  1.1583 +	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
  1.1584 +	  $echo "$help" 1>&2
  1.1585 +	  exit 1
  1.1586 +	fi
  1.1587 +	if test "$need_lib_prefix" != no; then
  1.1588 +	  # Add the "lib" prefix for modules if required
  1.1589 +	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
  1.1590 +	  eval libname=\"$libname_spec\"
  1.1591 +	else
  1.1592 +	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
  1.1593 +	fi
  1.1594 +	;;
  1.1595 +      esac
  1.1596 +
  1.1597 +      output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
  1.1598 +      if test "X$output_objdir" = "X$output"; then
  1.1599 +	output_objdir="$objdir"
  1.1600 +      else
  1.1601 +	output_objdir="$output_objdir/$objdir"
  1.1602 +      fi
  1.1603 +
  1.1604 +      if test -n "$objs"; then
  1.1605 +	$echo "$modename: cannot build libtool library \`$output' from non-libtool objects:$objs" 2>&1
  1.1606 +	exit 1
  1.1607 +      fi
  1.1608 +
  1.1609 +      # How the heck are we supposed to write a wrapper for a shared library?
  1.1610 +      if test -n "$link_against_libtool_libs"; then
  1.1611 +	 $echo "$modename: error: cannot link shared libraries into libtool libraries" 1>&2
  1.1612 +	 exit 1
  1.1613 +      fi
  1.1614 +
  1.1615 +      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  1.1616 +	$echo "$modename: warning: \`-dlopen' is ignored for libtool libraries" 1>&2
  1.1617 +      fi
  1.1618 +
  1.1619 +      set dummy $rpath
  1.1620 +      if test $# -gt 2; then
  1.1621 +	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
  1.1622 +      fi
  1.1623 +      install_libdir="$2"
  1.1624 +
  1.1625 +      oldlibs=
  1.1626 +      if test -z "$rpath"; then
  1.1627 +	if test "$build_libtool_libs" = yes; then
  1.1628 +	  # Building a libtool convenience library.
  1.1629 +	  libext=al
  1.1630 +	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
  1.1631 +	  build_libtool_libs=convenience
  1.1632 +	  build_old_libs=yes
  1.1633 +	fi
  1.1634 +	dependency_libs="$deplibs"
  1.1635 +
  1.1636 +	if test -n "$vinfo"; then
  1.1637 +	  $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
  1.1638 +	fi
  1.1639 +
  1.1640 +	if test -n "$release"; then
  1.1641 +	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
  1.1642 +	fi
  1.1643 +      else
  1.1644 +
  1.1645 +	# Parse the version information argument.
  1.1646 +	IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=':'
  1.1647 +	set dummy $vinfo 0 0 0
  1.1648 +	IFS="$save_ifs"
  1.1649 +
  1.1650 +	if test -n "$8"; then
  1.1651 +	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
  1.1652 +	  $echo "$help" 1>&2
  1.1653 +	  exit 1
  1.1654 +	fi
  1.1655 +
  1.1656 +	current="$2"
  1.1657 +	revision="$3"
  1.1658 +	age="$4"
  1.1659 +
  1.1660 +	# Check that each of the things are valid numbers.
  1.1661 +	case "$current" in
  1.1662 +	0 | [1-9] | [1-9][0-9]*) ;;
  1.1663 +	*)
  1.1664 +	  $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
  1.1665 +	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
  1.1666 +	  exit 1
  1.1667 +	  ;;
  1.1668 +	esac
  1.1669 +
  1.1670 +	case "$revision" in
  1.1671 +	0 | [1-9] | [1-9][0-9]*) ;;
  1.1672 +	*)
  1.1673 +	  $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
  1.1674 +	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
  1.1675 +	  exit 1
  1.1676 +	  ;;
  1.1677 +	esac
  1.1678 +
  1.1679 +	case "$age" in
  1.1680 +	0 | [1-9] | [1-9][0-9]*) ;;
  1.1681 +	*)
  1.1682 +	  $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
  1.1683 +	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
  1.1684 +	  exit 1
  1.1685 +	  ;;
  1.1686 +	esac
  1.1687 +
  1.1688 +	if test $age -gt $current; then
  1.1689 +	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
  1.1690 +	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
  1.1691 +	  exit 1
  1.1692 +	fi
  1.1693 +
  1.1694 +	# Calculate the version variables.
  1.1695 +	major=
  1.1696 +	versuffix=
  1.1697 +	verstring=
  1.1698 +	case "$version_type" in
  1.1699 +	none) ;;
  1.1700 +
  1.1701 +	irix)
  1.1702 +	  major=`expr $current - $age + 1`
  1.1703 +	  versuffix="$major.$revision"
  1.1704 +	  verstring="sgi$major.$revision"
  1.1705 +
  1.1706 +	  # Add in all the interfaces that we are compatible with.
  1.1707 +	  loop=$revision
  1.1708 +	  while test $loop != 0; do
  1.1709 +	    iface=`expr $revision - $loop`
  1.1710 +	    loop=`expr $loop - 1`
  1.1711 +	    verstring="sgi$major.$iface:$verstring"
  1.1712 +	  done
  1.1713 +	  ;;
  1.1714 +
  1.1715 +	linux)
  1.1716 +	  major=.`expr $current - $age`
  1.1717 +	  versuffix="$major.$age.$revision"
  1.1718 +	  ;;
  1.1719 +
  1.1720 +	osf)
  1.1721 +	  major=`expr $current - $age`
  1.1722 +	  versuffix=".$current.$age.$revision"
  1.1723 +	  verstring="$current.$age.$revision"
  1.1724 +
  1.1725 +	  # Add in all the interfaces that we are compatible with.
  1.1726 +	  loop=$age
  1.1727 +	  while test $loop != 0; do
  1.1728 +	    iface=`expr $current - $loop`
  1.1729 +	    loop=`expr $loop - 1`
  1.1730 +	    verstring="$verstring:${iface}.0"
  1.1731 +	  done
  1.1732 +
  1.1733 +	  # Make executables depend on our current version.
  1.1734 +	  verstring="$verstring:${current}.0"
  1.1735 +	  ;;
  1.1736 +
  1.1737 +	sunos)
  1.1738 +	  major=".$current"
  1.1739 +	  versuffix=".$current.$revision"
  1.1740 +	  ;;
  1.1741 +
  1.1742 +	freebsd-aout)
  1.1743 +	  major=".$current"
  1.1744 +	  versuffix=".$current.$revision";
  1.1745 +	  ;;
  1.1746 +
  1.1747 +	freebsd-elf)
  1.1748 +	  major=".$current"
  1.1749 +	  versuffix=".$current";
  1.1750 +	  ;;
  1.1751 +
  1.1752 +	windows)
  1.1753 +	  # Like Linux, but with '-' rather than '.', since we only
  1.1754 +	  # want one extension on Windows 95.
  1.1755 +	  major=`expr $current - $age`
  1.1756 +	  versuffix="-$major-$age-$revision"
  1.1757 +	  ;;
  1.1758 +
  1.1759 +	*)
  1.1760 +	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
  1.1761 +	  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
  1.1762 +	  exit 1
  1.1763 +	  ;;
  1.1764 +	esac
  1.1765 +
  1.1766 +	# Clear the version info if we defaulted, and they specified a release.
  1.1767 +	if test -z "$vinfo" && test -n "$release"; then
  1.1768 +	  major=
  1.1769 +	  verstring="0.0"
  1.1770 +	  if test "$need_version" = no; then
  1.1771 +	    versuffix=
  1.1772 +	  else
  1.1773 +	    versuffix=".0.0"
  1.1774 +	  fi
  1.1775 +	fi
  1.1776 +
  1.1777 +	# Remove version info from name if versioning should be avoided
  1.1778 +	if test "$avoid_version" = yes && test "$need_version" = no; then
  1.1779 +	  major=
  1.1780 +	  versuffix=
  1.1781 +	  verstring=""
  1.1782 +	fi
  1.1783 +	
  1.1784 +	# Check to see if the archive will have undefined symbols.
  1.1785 +	if test "$allow_undefined" = yes; then
  1.1786 +	  if test "$allow_undefined_flag" = unsupported; then
  1.1787 +	    $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
  1.1788 +	    build_libtool_libs=no
  1.1789 +	    build_old_libs=yes
  1.1790 +	  fi
  1.1791 +	else
  1.1792 +	  # Don't allow undefined symbols.
  1.1793 +	  allow_undefined_flag="$no_undefined_flag"
  1.1794 +	fi
  1.1795 +
  1.1796 +	dependency_libs="$deplibs"
  1.1797 +	case "$host" in
  1.1798 +	*-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos* | *-*-freebsd* )
  1.1799 +	  # these systems don't actually have a c library (as such)!
  1.1800 +	  ;;
  1.1801 +        *-*-rhapsody*)
  1.1802 +	  # rhapsody is a little odd...
  1.1803 +	  deplibs="$deplibs -framework System"
  1.1804 +	  ;;
  1.1805 +	*)
  1.1806 +	  # Add libc to deplibs on all other systems.
  1.1807 +	  deplibs="$deplibs -lc"
  1.1808 +	  ;;
  1.1809 +	esac
  1.1810 +      fi
  1.1811 +
  1.1812 +      # Create the output directory, or remove our outputs if we need to.
  1.1813 +      if test -d $output_objdir; then
  1.1814 +	$show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
  1.1815 +	$run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
  1.1816 +      else
  1.1817 +	$show "$mkdir $output_objdir"
  1.1818 +	$run $mkdir $output_objdir
  1.1819 +	status=$?
  1.1820 +	if test $status -ne 0 && test ! -d $output_objdir; then
  1.1821 +	  exit $status
  1.1822 +	fi
  1.1823 +      fi
  1.1824 +
  1.1825 +      # Now set the variables for building old libraries.
  1.1826 +      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
  1.1827 +	oldlibs="$oldlibs $output_objdir/$libname.$libext"
  1.1828 +
  1.1829 +	# Transform .lo files to .o files.
  1.1830 +	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
  1.1831 +      fi
  1.1832 +
  1.1833 +      if test "$build_libtool_libs" = yes; then
  1.1834 +	# Transform deplibs into only deplibs that can be linked in shared.
  1.1835 +	name_save=$name
  1.1836 +	libname_save=$libname
  1.1837 +	release_save=$release
  1.1838 +	versuffix_save=$versuffix
  1.1839 +	major_save=$major
  1.1840 +	# I'm not sure if I'm treating the release correctly.  I think
  1.1841 +	# release should show up in the -l (ie -lgmp5) so we don't want to
  1.1842 +	# add it in twice.  Is that correct?
  1.1843 +	release=""
  1.1844 +	versuffix=""
  1.1845 +	major=""
  1.1846 +	newdeplibs=
  1.1847 +	droppeddeps=no
  1.1848 +	case "$deplibs_check_method" in
  1.1849 +	pass_all)
  1.1850 +	  # Don't check for shared/static.  Everything works.
  1.1851 +	  # This might be a little naive.  We might want to check
  1.1852 +	  # whether the library exists or not.  But this is on
  1.1853 +	  # osf3 & osf4 and I'm not really sure... Just
  1.1854 +	  # implementing what was already the behaviour.
  1.1855 +	  newdeplibs=$deplibs
  1.1856 +	  ;;
  1.1857 +	test_compile)
  1.1858 +	  # This code stresses the "libraries are programs" paradigm to its
  1.1859 +	  # limits. Maybe even breaks it.  We compile a program, linking it
  1.1860 +	  # against the deplibs as a proxy for the library.  Then we can check
  1.1861 +	  # whether they linked in statically or dynamically with ldd.
  1.1862 +	  $rm conftest.c
  1.1863 +	  cat > conftest.c <<EOF
  1.1864 +	  int main() { return 0; }
  1.1865 +EOF
  1.1866 +	  $rm conftest
  1.1867 +	  $CC -o conftest conftest.c $deplibs
  1.1868 +	  if test $? -eq 0 ; then
  1.1869 +	    ldd_output=`ldd conftest`
  1.1870 +	    for i in $deplibs; do
  1.1871 +	      name="`expr $i : '-l\(.*\)'`"
  1.1872 +	      # If $name is empty we are operating on a -L argument.
  1.1873 +	      if test "$name" != "" ; then
  1.1874 +		libname=`eval \\$echo \"$libname_spec\"`
  1.1875 +		deplib_matches=`eval \\$echo \"$library_names_spec\"`
  1.1876 +		set dummy $deplib_matches
  1.1877 +		deplib_match=$2
  1.1878 +		if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
  1.1879 +		  newdeplibs="$newdeplibs $i"
  1.1880 +		else
  1.1881 +		  droppeddeps=yes
  1.1882 +		  echo
  1.1883 +		  echo "*** Warning: This library needs some functionality provided by $i."
  1.1884 +		  echo "*** I have the capability to make that library automatically link in when"
  1.1885 +		  echo "*** you link to this library.  But I can only do this if you have a"
  1.1886 +		  echo "*** shared version of the library, which you do not appear to have."
  1.1887 +		fi
  1.1888 +	      else
  1.1889 +		newdeplibs="$newdeplibs $i"
  1.1890 +	      fi
  1.1891 +	    done
  1.1892 +	  else
  1.1893 +	    # Error occured in the first compile.  Let's try to salvage the situation:
  1.1894 +	    # Compile a seperate program for each library.
  1.1895 +	    for i in $deplibs; do
  1.1896 +	      name="`expr $i : '-l\(.*\)'`"
  1.1897 +	     # If $name is empty we are operating on a -L argument.
  1.1898 +	      if test "$name" != "" ; then
  1.1899 +		$rm conftest
  1.1900 +		$CC -o conftest conftest.c $i
  1.1901 +		# Did it work?
  1.1902 +		if test $? -eq 0 ; then
  1.1903 +		  ldd_output=`ldd conftest`
  1.1904 +		  libname=`eval \\$echo \"$libname_spec\"`
  1.1905 +		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
  1.1906 +		  set dummy $deplib_matches
  1.1907 +		  deplib_match=$2
  1.1908 +		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
  1.1909 +		    newdeplibs="$newdeplibs $i"
  1.1910 +		  else
  1.1911 +		    droppeddeps=yes
  1.1912 +		    echo
  1.1913 +		    echo "*** Warning: This library needs some functionality provided by $i."
  1.1914 +		    echo "*** I have the capability to make that library automatically link in when"
  1.1915 +		    echo "*** you link to this library.  But I can only do this if you have a"
  1.1916 +		    echo "*** shared version of the library, which you do not appear to have."
  1.1917 +		  fi
  1.1918 +		else
  1.1919 +		  droppeddeps=yes
  1.1920 +		  echo
  1.1921 +		  echo "*** Warning!  Library $i is needed by this library but I was not able to"
  1.1922 +		  echo "***  make it link in!  You will probably need to install it or some"
  1.1923 +		  echo "*** library that it depends on before this library will be fully"
  1.1924 +		  echo "*** functional.  Installing it before continuing would be even better."
  1.1925 +		fi
  1.1926 +	      else
  1.1927 +		newdeplibs="$newdeplibs $i"
  1.1928 +	      fi
  1.1929 +	    done
  1.1930 +	  fi
  1.1931 +	  ;;
  1.1932 +	file_magic*)
  1.1933 +	  set dummy $deplibs_check_method
  1.1934 +	  file_magic_regex="`expr \"$deplibs_check_method\" : \"$2 \(.*\)\"`"
  1.1935 +	  for a_deplib in $deplibs; do
  1.1936 +	    name="`expr $a_deplib : '-l\(.*\)'`"
  1.1937 +	    # If $name is empty we are operating on a -L argument.
  1.1938 +	    if test "$name" != "" ; then
  1.1939 +	      libname=`eval \\$echo \"$libname_spec\"`
  1.1940 +	      for i in $lib_search_path; do
  1.1941 +		    potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
  1.1942 +		    for potent_lib in $potential_libs; do
  1.1943 +		      # Follow soft links.
  1.1944 +		      if ls -lLd "$potent_lib" 2>/dev/null \
  1.1945 +			 | grep " -> " >/dev/null; then
  1.1946 +			continue 
  1.1947 +		      fi
  1.1948 +		      # The statement above tries to avoid entering an
  1.1949 +		      # endless loop below, in case of cyclic links.
  1.1950 +		      # We might still enter an endless loop, since a link
  1.1951 +		      # loop can be closed while we follow links,
  1.1952 +		      # but so what?
  1.1953 +		      potlib="$potent_lib"
  1.1954 +		      while test -h "$potlib" 2>/dev/null; do
  1.1955 +			potliblink=`ls -ld $potlib | sed 's/.* -> //'`
  1.1956 +			case "$potliblink" in
  1.1957 +			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
  1.1958 +			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
  1.1959 +			esac
  1.1960 +		      done
  1.1961 +		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
  1.1962 +			 | sed 10q \
  1.1963 +			 | egrep "$file_magic_regex" > /dev/null; then
  1.1964 +			newdeplibs="$newdeplibs $a_deplib"
  1.1965 +			a_deplib=""
  1.1966 +			break 2
  1.1967 +		      fi
  1.1968 +		    done
  1.1969 +	      done
  1.1970 +	      if test -n "$a_deplib" ; then
  1.1971 +		droppeddeps=yes
  1.1972 +		echo
  1.1973 +		echo "*** Warning: This library needs some functionality provided by $a_deplib."
  1.1974 +		echo "*** I have the capability to make that library automatically link in when"
  1.1975 +		echo "*** you link to this library.  But I can only do this if you have a"
  1.1976 +		echo "*** shared version of the library, which you do not appear to have."
  1.1977 +	      fi
  1.1978 +	    else
  1.1979 +	      # Add a -L argument.
  1.1980 +	      newdeplibs="$newdeplibs $a_deplib"
  1.1981 +	    fi
  1.1982 +	  done # Gone through all deplibs.
  1.1983 +	  ;;
  1.1984 +	none | unknown | *)
  1.1985 +	  newdeplibs=""
  1.1986 +	  if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
  1.1987 +	       -e 's/ -[LR][^ ]*//g' -e 's/[ 	]//g' |
  1.1988 +	     grep . >/dev/null; then
  1.1989 +	    echo
  1.1990 +	    if test "X$deplibs_check_method" = "Xnone"; then
  1.1991 +	      echo "*** Warning: inter-library dependencies are not supported in this platform."
  1.1992 +	    else
  1.1993 +	      echo "*** Warning: inter-library dependencies are not known to be supported."
  1.1994 +	    fi
  1.1995 +	    echo "*** All declared inter-library dependencies are being dropped."
  1.1996 +	    droppeddeps=yes
  1.1997 +	  fi
  1.1998 +	  ;;
  1.1999 +	esac
  1.2000 +	versuffix=$versuffix_save
  1.2001 +	major=$major_save
  1.2002 +	release=$release_save
  1.2003 +	libname=$libname_save
  1.2004 +	name=$name_save
  1.2005 +
  1.2006 +	if test "$droppeddeps" = yes; then
  1.2007 +	  if test "$module" = yes; then
  1.2008 +	    echo
  1.2009 +	    echo "*** Warning: libtool could not satisfy all declared inter-library"
  1.2010 +	    echo "*** dependencies of module $libname.  Therefore, libtool will create"
  1.2011 +	    echo "*** a static module, that should work as long as the dlopening"
  1.2012 +	    echo "*** application is linked with the -dlopen flag."
  1.2013 +	    if test -z "$global_symbol_pipe"; then
  1.2014 +	      echo
  1.2015 +	      echo "*** However, this would only work if libtool was able to extract symbol"
  1.2016 +	      echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
  1.2017 +	      echo "*** not find such a program.  So, this module is probably useless."
  1.2018 +	      echo "*** \`nm' from GNU binutils and a full rebuild may help."
  1.2019 +	    fi
  1.2020 +	    if test "$build_old_libs" = no; then
  1.2021 +	      oldlibs="$output_objdir/$libname.$libext"
  1.2022 +	      build_libtool_libs=module
  1.2023 +	      build_old_libs=yes
  1.2024 +	    else
  1.2025 +	      build_libtool_libs=no
  1.2026 +	    fi
  1.2027 +	  else
  1.2028 +	    echo "*** The inter-library dependencies that have been dropped here will be"
  1.2029 +	    echo "*** automatically added whenever a program is linked with this library"
  1.2030 +	    echo "*** or is declared to -dlopen it."
  1.2031 +	  fi
  1.2032 +	fi
  1.2033 +	# Done checking deplibs!
  1.2034 +	deplibs=$newdeplibs
  1.2035 +      fi
  1.2036 +
  1.2037 +      # All the library-specific variables (install_libdir is set above).
  1.2038 +      library_names=
  1.2039 +      old_library=
  1.2040 +      dlname=
  1.2041 +      
  1.2042 +      # Test again, we may have decided not to build it any more
  1.2043 +      if test "$build_libtool_libs" = yes; then
  1.2044 +	# Get the real and link names of the library.
  1.2045 +	eval library_names=\"$library_names_spec\"
  1.2046 +	set dummy $library_names
  1.2047 +	realname="$2"
  1.2048 +	shift; shift
  1.2049 +
  1.2050 +	if test -n "$soname_spec"; then
  1.2051 +	  eval soname=\"$soname_spec\"
  1.2052 +	else
  1.2053 +	  soname="$realname"
  1.2054 +	fi
  1.2055 +
  1.2056 +	lib="$output_objdir/$realname"
  1.2057 +	for link
  1.2058 +	do
  1.2059 +	  linknames="$linknames $link"
  1.2060 +	done
  1.2061 +
  1.2062 +	# Ensure that we have .o objects for linkers which dislike .lo
  1.2063 +	# (e.g. aix) in case we are running --disable-static
  1.2064 +	for obj in $libobjs; do
  1.2065 +	  xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
  1.2066 +	  if test "X$xdir" = "X$obj"; then
  1.2067 +	    xdir="."
  1.2068 +	  else
  1.2069 +	    xdir="$xdir"
  1.2070 +	  fi
  1.2071 +	  baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
  1.2072 +	  oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
  1.2073 +	  if test ! -f $xdir/$oldobj; then
  1.2074 +	    $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
  1.2075 +	    $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
  1.2076 +	  fi
  1.2077 +	done
  1.2078 +
  1.2079 +	# Use standard objects if they are pic
  1.2080 +	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  1.2081 +
  1.2082 +	# Prepare the list of exported symbols
  1.2083 +	if test -z "$export_symbols"; then
  1.2084 +	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
  1.2085 +	    $show "generating symbol list for \`$libname.la'"
  1.2086 +	    export_symbols="$output_objdir/$libname.exp"
  1.2087 +	    $run $rm $export_symbols
  1.2088 +	    eval cmds=\"$export_symbols_cmds\"
  1.2089 +	    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
  1.2090 +	    for cmd in $cmds; do
  1.2091 +	      IFS="$save_ifs"
  1.2092 +	      $show "$cmd"
  1.2093 +	      $run eval "$cmd" || exit $?
  1.2094 +	    done
  1.2095 +	    IFS="$save_ifs"
  1.2096 +	    if test -n "$export_symbols_regex"; then
  1.2097 +	      $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
  1.2098 +	      $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
  1.2099 +	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
  1.2100 +	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
  1.2101 +	    fi
  1.2102 +	  fi
  1.2103 +	fi
  1.2104 +
  1.2105 +	if test -n "$export_symbols" && test -n "$include_expsyms"; then
  1.2106 +	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
  1.2107 +	fi
  1.2108 +
  1.2109 +	if test -n "$convenience"; then
  1.2110 +	  if test -n "$whole_archive_flag_spec"; then
  1.2111 +	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
  1.2112 +	  else
  1.2113 +	    gentop="$output_objdir/${outputname}x"
  1.2114 +	    $show "${rm}r $gentop"
  1.2115 +	    $run ${rm}r "$gentop"
  1.2116 +	    $show "mkdir $gentop"
  1.2117 +	    $run mkdir "$gentop"
  1.2118 +	    status=$?
  1.2119 +	    if test $status -ne 0 && test ! -d "$gentop"; then
  1.2120 +	      exit $status
  1.2121 +	    fi
  1.2122 +	    generated="$generated $gentop"
  1.2123 +
  1.2124 +	    for xlib in $convenience; do
  1.2125 +	      # Extract the objects.
  1.2126 +	      case "$xlib" in
  1.2127 +	      [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
  1.2128 +	      *) xabs=`pwd`"/$xlib" ;;
  1.2129 +	      esac
  1.2130 +	      xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
  1.2131 +	      xdir="$gentop/$xlib"
  1.2132 +
  1.2133 +	      $show "${rm}r $xdir"
  1.2134 +	      $run ${rm}r "$xdir"
  1.2135 +	      $show "mkdir $xdir"
  1.2136 +	      $run mkdir "$xdir"
  1.2137 +	      status=$?
  1.2138 +	      if test $status -ne 0 && test ! -d "$xdir"; then
  1.2139 +		exit $status
  1.2140 +	      fi
  1.2141 +	      $show "(cd $xdir && $AR x $xabs)"
  1.2142 +	      $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
  1.2143 +
  1.2144 +	      libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
  1.2145 +	    done
  1.2146 +	  fi
  1.2147 +	fi
  1.2148 +
  1.2149 +	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
  1.2150 +	  eval flag=\"$thread_safe_flag_spec\"
  1.2151 +	  linkopts="$linkopts $flag"
  1.2152 +	fi
  1.2153 +
  1.2154 +	# Do each of the archive commands.
  1.2155 +	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
  1.2156 +	  eval cmds=\"$archive_expsym_cmds\"
  1.2157 +	else
  1.2158 +	  eval cmds=\"$archive_cmds\"
  1.2159 +	fi
  1.2160 +	IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
  1.2161 +	for cmd in $cmds; do
  1.2162 +	  IFS="$save_ifs"
  1.2163 +	  $show "$cmd"
  1.2164 +	  $run eval "$cmd" || exit $?
  1.2165 +	done
  1.2166 +	IFS="$save_ifs"
  1.2167 +
  1.2168 +	# Create links to the real library.
  1.2169 +	for linkname in $linknames; do
  1.2170 +	  if test "$realname" != "$linkname"; then
  1.2171 +	    $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
  1.2172 +	    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
  1.2173 +	  fi
  1.2174 +	done
  1.2175 +
  1.2176 +	# If -module or -export-dynamic was specified, set the dlname.
  1.2177 +	if test "$module" = yes || test "$export_dynamic" = yes; then
  1.2178 +	  # On all known operating systems, these are identical.
  1.2179 +	  dlname="$soname"
  1.2180 +	fi
  1.2181 +      fi
  1.2182 +      ;;
  1.2183 +
  1.2184 +    *.lo | *.o | *.obj)
  1.2185 +      if test -n "$link_against_libtool_libs"; then
  1.2186 +	$echo "$modename: error: cannot link libtool libraries into objects" 1>&2
  1.2187 +	exit 1
  1.2188 +      fi
  1.2189 +
  1.2190 +      if test -n "$deplibs"; then
  1.2191 +	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
  1.2192 +      fi
  1.2193 +
  1.2194 +      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  1.2195 +	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
  1.2196 +      fi
  1.2197 +
  1.2198 +      if test -n "$rpath"; then
  1.2199 +	$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
  1.2200 +      fi
  1.2201 +
  1.2202 +      if test -n "$xrpath"; then
  1.2203 +	$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
  1.2204 +      fi
  1.2205 +
  1.2206 +      if test -n "$vinfo"; then
  1.2207 +	$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
  1.2208 +      fi
  1.2209 +
  1.2210 +      if test -n "$release"; then
  1.2211 +	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
  1.2212 +      fi
  1.2213 +
  1.2214 +      case "$output" in
  1.2215 +      *.lo)
  1.2216 +	if test -n "$objs"; then
  1.2217 +	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
  1.2218 +	  exit 1
  1.2219 +	fi
  1.2220 +	libobj="$output"
  1.2221 +	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
  1.2222 +	;;
  1.2223 +      *)
  1.2224 +	libobj=
  1.2225 +	obj="$output"
  1.2226 +	;;
  1.2227 +      esac
  1.2228 +
  1.2229 +      # Delete the old objects.
  1.2230 +      $run $rm $obj $libobj
  1.2231 +
  1.2232 +      # Objects from convenience libraries.  This assumes
  1.2233 +      # single-version convenience libraries.  Whenever we create
  1.2234 +      # different ones for PIC/non-PIC, this we'll have to duplicate
  1.2235 +      # the extraction.
  1.2236 +      reload_conv_objs=
  1.2237 +      gentop=
  1.2238 +      # reload_cmds runs $LD directly, so let us get rid of
  1.2239 +      # -Wl from whole_archive_flag_spec
  1.2240 +      wl= 
  1.2241 +
  1.2242 +      if test -n "$convenience"; then
  1.2243 +	if test -n "$whole_archive_flag_spec"; then
  1.2244 +	  eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
  1.2245 +	else
  1.2246 +	  gentop="$output_objdir/${obj}x"
  1.2247 +	  $show "${rm}r $gentop"
  1.2248 +	  $run ${rm}r "$gentop"
  1.2249 +	  $show "mkdir $gentop"
  1.2250 +	  $run mkdir "$gentop"
  1.2251 +	  status=$?
  1.2252 +	  if test $status -ne 0 && test ! -d "$gentop"; then
  1.2253 +	    exit $status
  1.2254 +	  fi
  1.2255 +	  generated="$generated $gentop"
  1.2256 +
  1.2257 +	  for xlib in $convenience; do
  1.2258 +	    # Extract the objects.
  1.2259 +	    case "$xlib" in
  1.2260 +	    [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
  1.2261 +	    *) xabs=`pwd`"/$xlib" ;;
  1.2262 +	    esac
  1.2263 +	    xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
  1.2264 +	    xdir="$gentop/$xlib"
  1.2265 +
  1.2266 +	    $show "${rm}r $xdir"
  1.2267 +	    $run ${rm}r "$xdir"
  1.2268 +	    $show "mkdir $xdir"
  1.2269 +	    $run mkdir "$xdir"
  1.2270 +	    status=$?
  1.2271 +	    if test $status -ne 0 && test ! -d "$xdir"; then
  1.2272 +	      exit $status
  1.2273 +	    fi
  1.2274 +	    $show "(cd $xdir && $AR x $xabs)"
  1.2275 +	    $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
  1.2276 +
  1.2277 +	    reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
  1.2278 +	  done
  1.2279 +	fi
  1.2280 +      fi
  1.2281 +
  1.2282 +      # Create the old-style object.
  1.2283 +      reload_objs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs"
  1.2284 +
  1.2285 +      output="$obj"
  1.2286 +      eval cmds=\"$reload_cmds\"
  1.2287 +      IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
  1.2288 +      for cmd in $cmds; do
  1.2289 +	IFS="$save_ifs"
  1.2290 +	$show "$cmd"
  1.2291 +	$run eval "$cmd" || exit $?
  1.2292 +      done
  1.2293 +      IFS="$save_ifs"
  1.2294 +
  1.2295 +      # Exit if we aren't doing a library object file.
  1.2296 +      if test -z "$libobj"; then
  1.2297 +	if test -n "$gentop"; then
  1.2298 +	  $show "${rm}r $gentop"
  1.2299 +	  $run ${rm}r $gentop
  1.2300 +	fi
  1.2301 +
  1.2302 +	exit 0
  1.2303 +      fi
  1.2304 +
  1.2305 +      if test "$build_libtool_libs" != yes; then
  1.2306 +	if test -n "$gentop"; then
  1.2307 +	  $show "${rm}r $gentop"
  1.2308 +	  $run ${rm}r $gentop
  1.2309 +	fi
  1.2310 +
  1.2311 +	# Create an invalid libtool object if no PIC, so that we don't
  1.2312 +	# accidentally link it into a program.
  1.2313 +	$show "echo timestamp > $libobj"
  1.2314 +	$run eval "echo timestamp > $libobj" || exit $?
  1.2315 +	exit 0
  1.2316 +      fi
  1.2317 +
  1.2318 +      if test -n "$pic_flag"; then
  1.2319 +	# Only do commands if we really have different PIC objects.
  1.2320 +	reload_objs="$libobjs $reload_conv_objs"
  1.2321 +	output="$libobj"
  1.2322 +	eval cmds=\"$reload_cmds\"
  1.2323 +	IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
  1.2324 +	for cmd in $cmds; do
  1.2325 +	  IFS="$save_ifs"
  1.2326 +	  $show "$cmd"
  1.2327 +	  $run eval "$cmd" || exit $?
  1.2328 +	done
  1.2329 +	IFS="$save_ifs"
  1.2330 +      else
  1.2331 +	# Just create a symlink.
  1.2332 +	$show $rm $libobj
  1.2333 +	$run $rm $libobj
  1.2334 +	xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
  1.2335 +	if test "X$xdir" = "X$libobj"; then
  1.2336 +	  xdir="."
  1.2337 +	else
  1.2338 +	  xdir="$xdir"
  1.2339 +	fi
  1.2340 +	baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
  1.2341 +	oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
  1.2342 +	$show "(cd $xdir && $LN_S $oldobj $baseobj)"
  1.2343 +	$run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
  1.2344 +      fi
  1.2345 +
  1.2346 +      if test -n "$gentop"; then
  1.2347 +	$show "${rm}r $gentop"
  1.2348 +	$run ${rm}r $gentop
  1.2349 +      fi
  1.2350 +
  1.2351 +      exit 0
  1.2352 +      ;;
  1.2353 +
  1.2354 +    # Anything else should be a program.
  1.2355 +    *)
  1.2356 +      if test -n "$vinfo"; then
  1.2357 +	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
  1.2358 +      fi
  1.2359 +
  1.2360 +      if test -n "$release"; then
  1.2361 +	$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
  1.2362 +      fi
  1.2363 +
  1.2364 +      if test "$preload" = yes; then
  1.2365 +	if test "$dlopen" = unknown && test "$dlopen_self" = unknown &&
  1.2366 +	   test "$dlopen_self_static" = unknown; then
  1.2367 +	  $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
  1.2368 +	fi 
  1.2369 +      fi
  1.2370 +    
  1.2371 +      if test -n "$rpath$xrpath"; then
  1.2372 +	# If the user specified any rpath flags, then add them.
  1.2373 +	for libdir in $rpath $xrpath; do
  1.2374 +	  # This is the magic to use -rpath.
  1.2375 +	  case "$compile_rpath " in
  1.2376 +	  *" $libdir "*) ;;
  1.2377 +	  *) compile_rpath="$compile_rpath $libdir" ;;
  1.2378 +	  esac
  1.2379 +	  case "$finalize_rpath " in
  1.2380 +	  *" $libdir "*) ;;
  1.2381 +	  *) finalize_rpath="$finalize_rpath $libdir" ;;
  1.2382 +	  esac
  1.2383 +	done
  1.2384 +      fi
  1.2385 +
  1.2386 +      # Now hardcode the library paths
  1.2387 +      rpath=
  1.2388 +      hardcode_libdirs=
  1.2389 +      for libdir in $compile_rpath $finalize_rpath; do
  1.2390 +	if test -n "$hardcode_libdir_flag_spec"; then
  1.2391 +	  if test -n "$hardcode_libdir_separator"; then
  1.2392 +	    if test -z "$hardcode_libdirs"; then
  1.2393 +	      hardcode_libdirs="$libdir"
  1.2394 +	    else
  1.2395 +	      # Just accumulate the unique libdirs.
  1.2396 +	      case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
  1.2397 +	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
  1.2398 +		;;
  1.2399 +	      *)
  1.2400 +		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
  1.2401 +		;;
  1.2402 +	      esac
  1.2403 +	    fi
  1.2404 +	  else
  1.2405 +	    eval flag=\"$hardcode_libdir_flag_spec\"
  1.2406 +	    rpath="$rpath $flag"
  1.2407 +	  fi
  1.2408 +	elif test -n "$runpath_var"; then
  1.2409 +	  case "$perm_rpath " in
  1.2410 +	  *" $libdir "*) ;;
  1.2411 +	  *) perm_rpath="$perm_rpath $libdir" ;;
  1.2412 +	  esac
  1.2413 +	fi
  1.2414 +      done
  1.2415 +      # Substitute the hardcoded libdirs into the rpath.
  1.2416 +      if test -n "$hardcode_libdir_separator" &&
  1.2417 +	 test -n "$hardcode_libdirs"; then
  1.2418 +	libdir="$hardcode_libdirs"
  1.2419 +	eval rpath=\" $hardcode_libdir_flag_spec\"
  1.2420 +      fi
  1.2421 +      compile_rpath="$rpath"
  1.2422 +
  1.2423 +      rpath=
  1.2424 +      hardcode_libdirs=
  1.2425 +      for libdir in $finalize_rpath; do
  1.2426 +	if test -n "$hardcode_libdir_flag_spec"; then
  1.2427 +	  if test -n "$hardcode_libdir_separator"; then
  1.2428 +	    if test -z "$hardcode_libdirs"; then
  1.2429 +	      hardcode_libdirs="$libdir"
  1.2430 +	    else
  1.2431 +	      # Just accumulate the unique libdirs.
  1.2432 +	      case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
  1.2433 +	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
  1.2434 +		;;
  1.2435 +	      *)
  1.2436 +		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
  1.2437 +		;;
  1.2438 +	      esac
  1.2439 +	    fi
  1.2440 +	  else
  1.2441 +	    eval flag=\"$hardcode_libdir_flag_spec\"
  1.2442 +	    rpath="$rpath $flag"
  1.2443 +	  fi
  1.2444 +	elif test -n "$runpath_var"; then
  1.2445 +	  case "$finalize_perm_rpath " in
  1.2446 +	  *" $libdir "*) ;;
  1.2447 +	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
  1.2448 +	  esac
  1.2449 +	fi
  1.2450 +      done
  1.2451 +      # Substitute the hardcoded libdirs into the rpath.
  1.2452 +      if test -n "$hardcode_libdir_separator" &&
  1.2453 +	 test -n "$hardcode_libdirs"; then
  1.2454 +	libdir="$hardcode_libdirs"
  1.2455 +	eval rpath=\" $hardcode_libdir_flag_spec\"
  1.2456 +      fi
  1.2457 +      finalize_rpath="$rpath"
  1.2458 +
  1.2459 +      output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
  1.2460 +      if test "X$output_objdir" = "X$output"; then
  1.2461 +	output_objdir="$objdir"
  1.2462 +      else
  1.2463 +	output_objdir="$output_objdir/$objdir"
  1.2464 +      fi
  1.2465 +
  1.2466 +      # Create the binary in the object directory, then wrap it.
  1.2467 +      if test ! -d $output_objdir; then
  1.2468 +	$show "$mkdir $output_objdir"
  1.2469 +	$run $mkdir $output_objdir
  1.2470 +	status=$?
  1.2471 +	if test $status -ne 0 && test ! -d $output_objdir; then
  1.2472 +	  exit $status
  1.2473 +	fi
  1.2474 +      fi
  1.2475 +
  1.2476 +      if test -n "$libobjs" && test "$build_old_libs" = yes; then
  1.2477 +	# Transform all the library objects into standard objects.
  1.2478 +	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  1.2479 +	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  1.2480 +      fi
  1.2481 +
  1.2482 +      dlsyms=
  1.2483 +      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
  1.2484 +	if test -n "$NM" && test -n "$global_symbol_pipe"; then
  1.2485 +	  dlsyms="${outputname}S.c"
  1.2486 +	else
  1.2487 +	  $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
  1.2488 +	fi
  1.2489 +      fi
  1.2490 +
  1.2491 +      if test -n "$dlsyms"; then
  1.2492 +	case "$dlsyms" in
  1.2493 +	"") ;;
  1.2494 +	*.c)
  1.2495 +	  # Discover the nlist of each of the dlfiles.
  1.2496 +	  nlist="$output_objdir/${outputname}.nm"
  1.2497 +
  1.2498 +	  $show "$rm $nlist ${nlist}S ${nlist}T"
  1.2499 +	  $run $rm "$nlist" "${nlist}S" "${nlist}T"
  1.2500 +
  1.2501 +	  # Parse the name list into a source file.
  1.2502 +	  $show "creating $output_objdir/$dlsyms"
  1.2503 +
  1.2504 +	  test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
  1.2505 +/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
  1.2506 +/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
  1.2507 +
  1.2508 +#ifdef __cplusplus
  1.2509 +extern \"C\" {
  1.2510 +#endif
  1.2511 +
  1.2512 +/* Prevent the only kind of declaration conflicts we can make. */
  1.2513 +#define lt_preloaded_symbols some_other_symbol
  1.2514 +
  1.2515 +/* External symbol declarations for the compiler. */\
  1.2516 +"
  1.2517 +
  1.2518 +	  if test "$dlself" = yes; then
  1.2519 +	    $show "generating symbol list for \`$output'"
  1.2520 +
  1.2521 +	    test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
  1.2522 +
  1.2523 +	    # Add our own program objects to the symbol list.
  1.2524 +	    progfiles=`$echo "X$objs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
  1.2525 +	    for arg in $progfiles; do
  1.2526 +	      $show "extracting global C symbols from \`$arg'"
  1.2527 +	      $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
  1.2528 +	    done
  1.2529 +
  1.2530 +	    if test -n "$exclude_expsyms"; then
  1.2531 +	      $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
  1.2532 +	      $run eval '$mv "$nlist"T "$nlist"'
  1.2533 +	    fi
  1.2534 +	    
  1.2535 +	    if test -n "$export_symbols_regex"; then
  1.2536 +	      $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
  1.2537 +	      $run eval '$mv "$nlist"T "$nlist"'
  1.2538 +	    fi
  1.2539 +
  1.2540 +	    # Prepare the list of exported symbols
  1.2541 +	    if test -z "$export_symbols"; then
  1.2542 +	      export_symbols="$output_objdir/$output.exp"
  1.2543 +	      $run $rm $export_symbols
  1.2544 +	      $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
  1.2545 +	    else
  1.2546 +	      $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
  1.2547 +	      $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
  1.2548 +	      $run eval 'mv "$nlist"T "$nlist"'
  1.2549 +	    fi
  1.2550 +	  fi
  1.2551 +
  1.2552 +	  for arg in $dlprefiles; do
  1.2553 +	    $show "extracting global C symbols from \`$arg'"
  1.2554 +	    name=`echo "$arg" | sed -e 's%^.*/%%'`
  1.2555 +	    $run eval 'echo ": $name " >> "$nlist"'
  1.2556 +	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
  1.2557 +	  done
  1.2558 +
  1.2559 +	  if test -z "$run"; then
  1.2560 +	    # Make sure we have at least an empty file.
  1.2561 +	    test -f "$nlist" || : > "$nlist"
  1.2562 +
  1.2563 +	    if test -n "$exclude_expsyms"; then
  1.2564 +	      egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
  1.2565 +	      $mv "$nlist"T "$nlist"
  1.2566 +	    fi
  1.2567 +
  1.2568 +	    # Try sorting and uniquifying the output.
  1.2569 +	    if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
  1.2570 +	      :
  1.2571 +	    else
  1.2572 +	      grep -v "^: " < "$nlist" > "$nlist"S
  1.2573 +	    fi
  1.2574 +
  1.2575 +	    if test -f "$nlist"S; then
  1.2576 +	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
  1.2577 +	    else
  1.2578 +	      echo '/* NONE */' >> "$output_objdir/$dlsyms"
  1.2579 +	    fi
  1.2580 +
  1.2581 +	    $echo >> "$output_objdir/$dlsyms" "\
  1.2582 +
  1.2583 +#undef lt_preloaded_symbols
  1.2584 +
  1.2585 +#if defined (__STDC__) && __STDC__
  1.2586 +# define lt_ptr_t void *
  1.2587 +#else
  1.2588 +# define lt_ptr_t char *
  1.2589 +# define const
  1.2590 +#endif
  1.2591 +
  1.2592 +/* The mapping between symbol names and symbols. */
  1.2593 +const struct {
  1.2594 +  const char *name;
  1.2595 +  lt_ptr_t address;
  1.2596 +}
  1.2597 +lt_preloaded_symbols[] =
  1.2598 +{\
  1.2599 +"
  1.2600 +
  1.2601 +	    sed -n -e 's/^: \([^ ]*\) $/  {\"\1\", (lt_ptr_t) 0},/p' \
  1.2602 +		-e 's/^. \([^ ]*\) \([^ ]*\)$/  {"\2", (lt_ptr_t) \&\2},/p' \
  1.2603 +		  < "$nlist" >> "$output_objdir/$dlsyms"
  1.2604 +
  1.2605 +	    $echo >> "$output_objdir/$dlsyms" "\
  1.2606 +  {0, (lt_ptr_t) 0}
  1.2607 +};
  1.2608 +
  1.2609 +/* This works around a problem in FreeBSD linker */
  1.2610 +#ifdef FREEBSD_WORKAROUND
  1.2611 +static const void *lt_preloaded_setup() {
  1.2612 +  return lt_preloaded_symbols;
  1.2613 +}
  1.2614 +#endif
  1.2615 +
  1.2616 +#ifdef __cplusplus
  1.2617 +}
  1.2618 +#endif\
  1.2619 +"
  1.2620 +	  fi
  1.2621 +
  1.2622 +	  pic_flag_for_symtable=
  1.2623 +	  case "$host" in
  1.2624 +	  # compiling the symbol table file with pic_flag works around
  1.2625 +	  # a FreeBSD bug that causes programs to crash when -lm is
  1.2626 +	  # linked before any other PIC object.  But we must not use
  1.2627 +	  # pic_flag when linking with -static.  The problem exists in
  1.2628 +	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
  1.2629 +	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
  1.2630 +	    case "$compile_command " in
  1.2631 +	    *" -static "*) ;;
  1.2632 +	    *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
  1.2633 +	    esac;;
  1.2634 +	  *-*-hpux*)
  1.2635 +	    case "$compile_command " in
  1.2636 +	    *" -static "*) ;;
  1.2637 +	    *) pic_flag_for_symtable=" $pic_flag -DPIC";;
  1.2638 +	    esac
  1.2639 +	  esac
  1.2640 +
  1.2641 +	  # Now compile the dynamic symbol file.
  1.2642 +	  $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
  1.2643 +	  $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
  1.2644 +
  1.2645 +	  # Clean up the generated files.
  1.2646 +	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
  1.2647 +	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
  1.2648 +
  1.2649 +	  # Transform the symbol file into the correct name.
  1.2650 +	  compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
  1.2651 +	  finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
  1.2652 +	  ;;
  1.2653 +	*)
  1.2654 +	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
  1.2655 +	  exit 1
  1.2656 +	  ;;
  1.2657 +	esac
  1.2658 +      else
  1.2659 +	# We keep going just in case the user didn't refer to
  1.2660 +	# lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
  1.2661 +	# really was required.
  1.2662 +
  1.2663 +	# Nullify the symbol file.
  1.2664 +	compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
  1.2665 +	finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
  1.2666 +      fi
  1.2667 +
  1.2668 +      if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
  1.2669 +	# Replace the output file specification.
  1.2670 +	compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
  1.2671 +	link_command="$compile_command$compile_rpath"
  1.2672 +
  1.2673 +	# We have no uninstalled library dependencies, so finalize right now.
  1.2674 +	$show "$link_command"
  1.2675 +	$run eval "$link_command"
  1.2676 +	status=$?
  1.2677 +	
  1.2678 +	# Delete the generated files.
  1.2679 +	if test -n "$dlsyms"; then
  1.2680 +	  $show "$rm $output_objdir/${outputname}S.${objext}"
  1.2681 +	  $run $rm "$output_objdir/${outputname}S.${objext}"
  1.2682 +	fi
  1.2683 +
  1.2684 +	exit $status
  1.2685 +      fi
  1.2686 +
  1.2687 +      if test -n "$shlibpath_var"; then
  1.2688 +	# We should set the shlibpath_var
  1.2689 +	rpath=
  1.2690 +	for dir in $temp_rpath; do
  1.2691 +	  case "$dir" in
  1.2692 +	  [\\/]* | [A-Za-z]:[\\/]*)
  1.2693 +	    # Absolute path.
  1.2694 +	    rpath="$rpath$dir:"
  1.2695 +	    ;;
  1.2696 +	  *)
  1.2697 +	    # Relative path: add a thisdir entry.
  1.2698 +	    rpath="$rpath\$thisdir/$dir:"
  1.2699 +	    ;;
  1.2700 +	  esac
  1.2701 +	done
  1.2702 +	temp_rpath="$rpath"
  1.2703 +      fi
  1.2704 +
  1.2705 +      if test -n "$compile_shlibpath$finalize_shlibpath"; then
  1.2706 +	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
  1.2707 +      fi
  1.2708 +      if test -n "$finalize_shlibpath"; then
  1.2709 +	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
  1.2710 +      fi
  1.2711 +
  1.2712 +      compile_var=
  1.2713 +      finalize_var=
  1.2714 +      if test -n "$runpath_var"; then
  1.2715 +	if test -n "$perm_rpath"; then
  1.2716 +	  # We should set the runpath_var.
  1.2717 +	  rpath=
  1.2718 +	  for dir in $perm_rpath; do
  1.2719 +	    rpath="$rpath$dir:"
  1.2720 +	  done
  1.2721 +	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
  1.2722 +	fi
  1.2723 +	if test -n "$finalize_perm_rpath"; then
  1.2724 +	  # We should set the runpath_var.
  1.2725 +	  rpath=
  1.2726 +	  for dir in $finalize_perm_rpath; do
  1.2727 +	    rpath="$rpath$dir:"
  1.2728 +	  done
  1.2729 +	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
  1.2730 +	fi
  1.2731 +      fi
  1.2732 +
  1.2733 +      if test "$hardcode_action" = relink; then
  1.2734 +	# Fast installation is not supported
  1.2735 +	link_command="$compile_var$compile_command$compile_rpath"
  1.2736 +	relink_command="$finalize_var$finalize_command$finalize_rpath"
  1.2737 +	
  1.2738 +	$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
  1.2739 +	$echo "$modename: \`$output' will be relinked during installation" 1>&2
  1.2740 +      else
  1.2741 +	if test "$fast_install" != no; then
  1.2742 +	  link_command="$finalize_var$compile_command$finalize_rpath"
  1.2743 +	  if test "$fast_install" = yes; then
  1.2744 +	    relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
  1.2745 +	  else
  1.2746 +	    # fast_install is set to needless
  1.2747 +	    relink_command=
  1.2748 +	  fi
  1.2749 +	else
  1.2750 +	  link_command="$compile_var$compile_command$compile_rpath"
  1.2751 +	  relink_command="$finalize_var$finalize_command$finalize_rpath"
  1.2752 +	fi
  1.2753 +      fi
  1.2754 +
  1.2755 +      # Replace the output file specification.
  1.2756 +      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
  1.2757 +      
  1.2758 +      # Delete the old output files.
  1.2759 +      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
  1.2760 +
  1.2761 +      $show "$link_command"
  1.2762 +      $run eval "$link_command" || exit $?
  1.2763 +
  1.2764 +      # Now create the wrapper script.
  1.2765 +      $show "creating $output"
  1.2766 +
  1.2767 +      # Quote the relink command for shipping.
  1.2768 +      if test -n "$relink_command"; then
  1.2769 +	relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
  1.2770 +      fi
  1.2771 +
  1.2772 +      # Quote $echo for shipping.
  1.2773 +      if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
  1.2774 +	case "$0" in
  1.2775 +	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
  1.2776 +	*) qecho="$SHELL `pwd`/$0 --fallback-echo";;
  1.2777 +	esac
  1.2778 +	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
  1.2779 +      else
  1.2780 +	qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
  1.2781 +      fi
  1.2782 +
  1.2783 +      # Only actually do things if our run command is non-null.
  1.2784 +      if test -z "$run"; then
  1.2785 +	# win32 will think the script is a binary if it has
  1.2786 +	# a .exe suffix, so we strip it off here.
  1.2787 +	case $output in
  1.2788 +	  *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
  1.2789 +	esac
  1.2790 +	$rm $output
  1.2791 +	trap "$rm $output; exit 1" 1 2 15
  1.2792 +
  1.2793 +	$echo > $output "\
  1.2794 +#! $SHELL
  1.2795 +
  1.2796 +# $output - temporary wrapper script for $objdir/$outputname
  1.2797 +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
  1.2798 +#
  1.2799 +# The $output program cannot be directly executed until all the libtool
  1.2800 +# libraries that it depends on are installed.
  1.2801 +#
  1.2802 +# This wrapper script should never be moved out of the build directory.
  1.2803 +# If it is, it will not operate correctly.
  1.2804 +
  1.2805 +# Sed substitution that helps us do robust quoting.  It backslashifies
  1.2806 +# metacharacters that are still active within double-quoted strings.
  1.2807 +Xsed='sed -e 1s/^X//'
  1.2808 +sed_quote_subst='$sed_quote_subst'
  1.2809 +
  1.2810 +# The HP-UX ksh and POSIX shell print the target directory to stdout
  1.2811 +# if CDPATH is set.
  1.2812 +if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
  1.2813 +
  1.2814 +relink_command=\"$relink_command\"
  1.2815 +
  1.2816 +# This environment variable determines our operation mode.
  1.2817 +if test \"\$libtool_install_magic\" = \"$magic\"; then
  1.2818 +  # install mode needs the following variable:
  1.2819 +  link_against_libtool_libs='$link_against_libtool_libs'
  1.2820 +else
  1.2821 +  # When we are sourced in execute mode, \$file and \$echo are already set.
  1.2822 +  if test \"\$libtool_execute_magic\" != \"$magic\"; then
  1.2823 +    echo=\"$qecho\"
  1.2824 +    file=\"\$0\"
  1.2825 +    # Make sure echo works.
  1.2826 +    if test \"X\$1\" = X--no-reexec; then
  1.2827 +      # Discard the --no-reexec flag, and continue.
  1.2828 +      shift
  1.2829 +    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
  1.2830 +      # Yippee, \$echo works!
  1.2831 +      :
  1.2832 +    else
  1.2833 +      # Restart under the correct shell, and then maybe \$echo will work.
  1.2834 +      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
  1.2835 +    fi
  1.2836 +  fi\
  1.2837 +"
  1.2838 +	$echo >> $output "\
  1.2839 +
  1.2840 +  # Find the directory that this script lives in.
  1.2841 +  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
  1.2842 +  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
  1.2843 +
  1.2844 +  # Follow symbolic links until we get to the real thisdir.
  1.2845 +  file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
  1.2846 +  while test -n \"\$file\"; do
  1.2847 +    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
  1.2848 +
  1.2849 +    # If there was a directory component, then change thisdir.
  1.2850 +    if test \"x\$destdir\" != \"x\$file\"; then
  1.2851 +      case \"\$destdir\" in
  1.2852 +      [\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;;
  1.2853 +      *) thisdir=\"\$thisdir/\$destdir\" ;;
  1.2854 +      esac
  1.2855 +    fi
  1.2856 +
  1.2857 +    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
  1.2858 +    file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
  1.2859 +  done
  1.2860 +
  1.2861 +  # Try to get the absolute directory name.
  1.2862 +  absdir=\`cd \"\$thisdir\" && pwd\`
  1.2863 +  test -n \"\$absdir\" && thisdir=\"\$absdir\"
  1.2864 +"
  1.2865 +
  1.2866 +	if test "$fast_install" = yes; then
  1.2867 +	  echo >> $output "\
  1.2868 +  program=lt-'$outputname'
  1.2869 +  progdir=\"\$thisdir/$objdir\"
  1.2870 +  
  1.2871 +  if test ! -f \"\$progdir/\$program\" || \\
  1.2872 +     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
  1.2873 +       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
  1.2874 +
  1.2875 +    file=\"\$\$-\$program\"
  1.2876 +
  1.2877 +    if test ! -d \"\$progdir\"; then
  1.2878 +      $mkdir \"\$progdir\"
  1.2879 +    else
  1.2880 +      $rm \"\$progdir/\$file\"
  1.2881 +    fi"
  1.2882 +
  1.2883 +	  echo >> $output "\
  1.2884 +
  1.2885 +    # relink executable if necessary
  1.2886 +    if test -n \"\$relink_command\"; then
  1.2887 +      if (cd \"\$thisdir\" && eval \$relink_command); then :
  1.2888 +      else
  1.2889 +	$rm \"\$progdir/\$file\"
  1.2890 +	exit 1
  1.2891 +      fi
  1.2892 +    fi
  1.2893 +
  1.2894 +    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
  1.2895 +    { $rm \"\$progdir/\$program\";
  1.2896 +      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
  1.2897 +    $rm \"\$progdir/\$file\"
  1.2898 +  fi"
  1.2899 +	else
  1.2900 +	  echo >> $output "\
  1.2901 +  program='$outputname'
  1.2902 +  progdir=\"\$thisdir/$objdir\"
  1.2903 +"
  1.2904 +	fi
  1.2905 +
  1.2906 +	echo >> $output "\
  1.2907 +
  1.2908 +  if test -f \"\$progdir/\$program\"; then"
  1.2909 +
  1.2910 +	# Export our shlibpath_var if we have one.
  1.2911 +	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
  1.2912 +	  $echo >> $output "\
  1.2913 +    # Add our own library path to $shlibpath_var
  1.2914 +    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
  1.2915 +
  1.2916 +    # Some systems cannot cope with colon-terminated $shlibpath_var
  1.2917 +    # The second colon is a workaround for a bug in BeOS R4 sed
  1.2918 +    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
  1.2919 +
  1.2920 +    export $shlibpath_var
  1.2921 +"
  1.2922 +	fi
  1.2923 +
  1.2924 +	# fixup the dll searchpath if we need to.
  1.2925 +	if test -n "$dllsearchpath"; then
  1.2926 +	  $echo >> $output "\
  1.2927 +    # Add the dll search path components to the executable PATH
  1.2928 +    PATH=$dllsearchpath:\$PATH
  1.2929 +"
  1.2930 +	fi
  1.2931 +
  1.2932 +	$echo >> $output "\
  1.2933 +    if test \"\$libtool_execute_magic\" != \"$magic\"; then
  1.2934 +      # Run the actual program with our arguments.
  1.2935 +"
  1.2936 +	case $host in
  1.2937 +	  # win32 systems need to use the prog path for dll
  1.2938 +	  # lookup to work
  1.2939 +	*-*-cygwin*)
  1.2940 +	  $echo >> $output "\
  1.2941 +      exec \$progdir/\$program \${1+\"\$@\"}
  1.2942 +"
  1.2943 +	  ;;
  1.2944 +
  1.2945 +	# Backslashes separate directories on plain windows
  1.2946 +	*-*-mingw | *-*-os2*)
  1.2947 +	  $echo >> $output "\
  1.2948 +      exec \$progdir\\\\\$program \${1+\"\$@\"}
  1.2949 +"
  1.2950 +	  ;;
  1.2951 +
  1.2952 +	*)
  1.2953 +	  $echo >> $output "\
  1.2954 +      # Export the path to the program.
  1.2955 +      PATH=\"\$progdir:\$PATH\"
  1.2956 +      export PATH
  1.2957 +
  1.2958 +      exec \$program \${1+\"\$@\"}
  1.2959 +"
  1.2960 +	  ;;
  1.2961 +	esac
  1.2962 +	$echo >> $output "\
  1.2963 +      \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
  1.2964 +      exit 1
  1.2965 +    fi
  1.2966 +  else
  1.2967 +    # The program doesn't exist.
  1.2968 +    \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
  1.2969 +    \$echo \"This script is just a wrapper for \$program.\" 1>&2
  1.2970 +    echo \"See the $PACKAGE documentation for more information.\" 1>&2
  1.2971 +    exit 1
  1.2972 +  fi
  1.2973 +fi\
  1.2974 +"
  1.2975 +	chmod +x $output
  1.2976 +      fi
  1.2977 +      exit 0
  1.2978 +      ;;
  1.2979 +    esac
  1.2980 +
  1.2981 +    # See if we need to build an old-fashioned archive.
  1.2982 +    for oldlib in $oldlibs; do
  1.2983 +
  1.2984 +      if test "$build_libtool_libs" = convenience; then
  1.2985 +	oldobjs="$libobjs_save"
  1.2986 +	addlibs="$convenience"
  1.2987 +	build_libtool_libs=no
  1.2988 +      else
  1.2989 +	if test "$build_libtool_libs" = module; then
  1.2990 +	  oldobjs="$libobjs_save"
  1.2991 +	  build_libtool_libs=no
  1.2992 +	else
  1.2993 +	  oldobjs="$objs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
  1.2994 +	fi
  1.2995 +	addlibs="$old_convenience"
  1.2996 +      fi
  1.2997 +
  1.2998 +      if test -n "$addlibs"; then
  1.2999 +	gentop="$output_objdir/${outputname}x"
  1.3000 +	$show "${rm}r $gentop"
  1.3001 +	$run ${rm}r "$gentop"
  1.3002 +	$show "mkdir $gentop"
  1.3003 +	$run mkdir "$gentop"
  1.3004 +	status=$?
  1.3005 +	if test $status -ne 0 && test ! -d "$gentop"; then
  1.3006 +	  exit $status
  1.3007 +	fi
  1.3008 +	generated="$generated $gentop"
  1.3009 +	  
  1.3010 +	# Add in members from convenience archives.
  1.3011 +	for xlib in $addlibs; do
  1.3012 +	  # Extract the objects.
  1.3013 +	  case "$xlib" in
  1.3014 +	  [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
  1.3015 +	  *) xabs=`pwd`"/$xlib" ;;
  1.3016 +	  esac
  1.3017 +	  xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
  1.3018 +	  xdir="$gentop/$xlib"
  1.3019 +
  1.3020 +	  $show "${rm}r $xdir"
  1.3021 +	  $run ${rm}r "$xdir"
  1.3022 +	  $show "mkdir $xdir"
  1.3023 +	  $run mkdir "$xdir"
  1.3024 +	  status=$?
  1.3025 +	  if test $status -ne 0 && test ! -d "$xdir"; then
  1.3026 +	    exit $status
  1.3027 +	  fi
  1.3028 +	  $show "(cd $xdir && $AR x $xabs)"
  1.3029 +	  $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
  1.3030 +
  1.3031 +	  oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
  1.3032 +	done
  1.3033 +      fi
  1.3034 +
  1.3035 +      # Do each command in the archive commands.
  1.3036 +      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
  1.3037 +	eval cmds=\"$old_archive_from_new_cmds\"
  1.3038 +      else
  1.3039 +	# Ensure that we have .o objects in place in case we decided
  1.3040 +	# not to build a shared library, and have fallen back to building
  1.3041 +	# static libs even though --disable-static was passed!
  1.3042 +	for oldobj in $oldobjs; do
  1.3043 +	  if test ! -f $oldobj; then
  1.3044 +	    xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
  1.3045 +	    if test "X$xdir" = "X$oldobj"; then
  1.3046 +	      xdir="."
  1.3047 +	    else
  1.3048 +	      xdir="$xdir"
  1.3049 +	    fi
  1.3050 +	    baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
  1.3051 +	    obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
  1.3052 +	    $show "(cd $xdir && ${LN_S} $obj $baseobj)"
  1.3053 +	    $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
  1.3054 +	  fi
  1.3055 +	done
  1.3056 +
  1.3057 +	eval cmds=\"$old_archive_cmds\"
  1.3058 +      fi
  1.3059 +      IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
  1.3060 +      for cmd in $cmds; do
  1.3061 +	IFS="$save_ifs"
  1.3062 +	$show "$cmd"
  1.3063 +	$run eval "$cmd" || exit $?
  1.3064 +      done
  1.3065 +      IFS="$save_ifs"
  1.3066 +    done
  1.3067 +
  1.3068 +    if test -n "$generated"; then
  1.3069 +      $show "${rm}r$generated"
  1.3070 +      $run ${rm}r$generated
  1.3071 +    fi
  1.3072 +
  1.3073 +    # Now create the libtool archive.
  1.3074 +    case "$output" in
  1.3075 +    *.la)
  1.3076 +      old_library=
  1.3077 +      test "$build_old_libs" = yes && old_library="$libname.$libext"
  1.3078 +      $show "creating $output"
  1.3079 +
  1.3080 +      if test -n "$xrpath"; then
  1.3081 +	temp_xrpath=
  1.3082 +	for libdir in $xrpath; do
  1.3083 +	  temp_xrpath="$temp_xrpath -R$libdir"
  1.3084 +	done
  1.3085 +	dependency_libs="$temp_xrpath $dependency_libs"
  1.3086 +      fi
  1.3087 +
  1.3088 +      # Only create the output if not a dry run.
  1.3089 +      if test -z "$run"; then
  1.3090 +	for installed in no yes; do
  1.3091 +	  if test "$installed" = yes; then
  1.3092 +	    if test -z "$install_libdir"; then
  1.3093 +	      break
  1.3094 +	    fi
  1.3095 +	    output="$output_objdir/$outputname"i
  1.3096 +	  fi
  1.3097 +	  $rm $output
  1.3098 +	  $echo > $output "\
  1.3099 +# $outputname - a libtool library file
  1.3100 +# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
  1.3101 +#
  1.3102 +# Please DO NOT delete this file!
  1.3103 +# It is necessary for linking the library.
  1.3104 +
  1.3105 +# The name that we can dlopen(3).
  1.3106 +dlname='$dlname'
  1.3107 +
  1.3108 +# Names of this library.
  1.3109 +library_names='$library_names'
  1.3110 +
  1.3111 +# The name of the static archive.
  1.3112 +old_library='$old_library'
  1.3113 +
  1.3114 +# Libraries that this one depends upon.
  1.3115 +dependency_libs='$dependency_libs'
  1.3116 +
  1.3117 +# Version information for $libname.
  1.3118 +current=$current
  1.3119 +age=$age
  1.3120 +revision=$revision
  1.3121 +
  1.3122 +# Is this an already installed library?
  1.3123 +installed=$installed
  1.3124 +
  1.3125 +# Directory that this library needs to be installed in:
  1.3126 +libdir='$install_libdir'\
  1.3127 +"
  1.3128 +	done
  1.3129 +      fi
  1.3130 +
  1.3131 +      # Do a symbolic link so that the libtool archive can be found in
  1.3132 +      # LD_LIBRARY_PATH before the program is installed.
  1.3133 +      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
  1.3134 +      $run eval "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" || exit $?
  1.3135 +      ;;
  1.3136 +    esac
  1.3137 +    exit 0
  1.3138 +    ;;
  1.3139 +
  1.3140 +  # libtool install mode
  1.3141 +  install)
  1.3142 +    modename="$modename: install"
  1.3143 +
  1.3144 +    # There may be an optional sh(1) argument at the beginning of
  1.3145 +    # install_prog (especially on Windows NT).
  1.3146 +    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then
  1.3147 +      # Aesthetically quote it.
  1.3148 +      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
  1.3149 +      case "$arg" in
  1.3150 +      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
  1.3151 +	arg="\"$arg\""
  1.3152 +	;;
  1.3153 +      esac
  1.3154 +      install_prog="$arg "
  1.3155 +      arg="$1"
  1.3156 +      shift
  1.3157 +    else
  1.3158 +      install_prog=
  1.3159 +      arg="$nonopt"
  1.3160 +    fi
  1.3161 +
  1.3162 +    # The real first argument should be the name of the installation program.
  1.3163 +    # Aesthetically quote it.
  1.3164 +    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  1.3165 +    case "$arg" in
  1.3166 +    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
  1.3167 +      arg="\"$arg\""
  1.3168 +      ;;
  1.3169 +    esac
  1.3170 +    install_prog="$install_prog$arg"
  1.3171 +
  1.3172 +    # We need to accept at least all the BSD install flags.
  1.3173 +    dest=
  1.3174 +    files=
  1.3175 +    opts=
  1.3176 +    prev=
  1.3177 +    install_type=
  1.3178 +    isdir=no
  1.3179 +    stripme=
  1.3180 +    for arg
  1.3181 +    do
  1.3182 +      if test -n "$dest"; then
  1.3183 +	files="$files $dest"
  1.3184 +	dest="$arg"
  1.3185 +	continue
  1.3186 +      fi
  1.3187 +
  1.3188 +      case "$arg" in
  1.3189 +      -d) isdir=yes ;;
  1.3190 +      -f) prev="-f" ;;
  1.3191 +      -g) prev="-g" ;;
  1.3192 +      -m) prev="-m" ;;
  1.3193 +      -o) prev="-o" ;;
  1.3194 +      -s)
  1.3195 +	stripme=" -s"
  1.3196 +	continue
  1.3197 +	;;
  1.3198 +      -*) ;;
  1.3199 +
  1.3200 +      *)
  1.3201 +	# If the previous option needed an argument, then skip it.
  1.3202 +	if test -n "$prev"; then
  1.3203 +	  prev=
  1.3204 +	else
  1.3205 +	  dest="$arg"
  1.3206 +	  continue
  1.3207 +	fi
  1.3208 +	;;
  1.3209 +      esac
  1.3210 +
  1.3211 +      # Aesthetically quote the argument.
  1.3212 +      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
  1.3213 +      case "$arg" in
  1.3214 +      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*)
  1.3215 +	arg="\"$arg\""
  1.3216 +	;;
  1.3217 +      esac
  1.3218 +      install_prog="$install_prog $arg"
  1.3219 +    done
  1.3220 +
  1.3221 +    if test -z "$install_prog"; then
  1.3222 +      $echo "$modename: you must specify an install program" 1>&2
  1.3223 +      $echo "$help" 1>&2
  1.3224 +      exit 1
  1.3225 +    fi
  1.3226 +
  1.3227 +    if test -n "$prev"; then
  1.3228 +      $echo "$modename: the \`$prev' option requires an argument" 1>&2
  1.3229 +      $echo "$help" 1>&2
  1.3230 +      exit 1
  1.3231 +    fi
  1.3232 +
  1.3233 +    if test -z "$files"; then
  1.3234 +      if test -z "$dest"; then
  1.3235 +	$echo "$modename: no file or destination specified" 1>&2
  1.3236 +      else
  1.3237 +	$echo "$modename: you must specify a destination" 1>&2
  1.3238 +      fi
  1.3239 +      $echo "$help" 1>&2
  1.3240 +      exit 1
  1.3241 +    fi
  1.3242 +
  1.3243 +    # Strip any trailing slash from the destination.
  1.3244 +    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
  1.3245 +
  1.3246 +    # Check to see that the destination is a directory.
  1.3247 +    test -d "$dest" && isdir=yes
  1.3248 +    if test "$isdir" = yes; then
  1.3249 +      destdir="$dest"
  1.3250 +      destname=
  1.3251 +    else
  1.3252 +      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
  1.3253 +      test "X$destdir" = "X$dest" && destdir=.
  1.3254 +      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
  1.3255 +
  1.3256 +      # Not a directory, so check to see that there is only one file specified.
  1.3257 +      set dummy $files
  1.3258 +      if test $# -gt 2; then
  1.3259 +	$echo "$modename: \`$dest' is not a directory" 1>&2
  1.3260 +	$echo "$help" 1>&2
  1.3261 +	exit 1
  1.3262 +      fi
  1.3263 +    fi
  1.3264 +    case "$destdir" in
  1.3265 +    [\\/]* | [A-Za-z]:[\\/]*) ;;
  1.3266 +    *)
  1.3267 +      for file in $files; do
  1.3268 +	case "$file" in
  1.3269 +	*.lo) ;;
  1.3270 +	*)
  1.3271 +	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
  1.3272 +	  $echo "$help" 1>&2
  1.3273 +	  exit 1
  1.3274 +	  ;;
  1.3275 +	esac
  1.3276 +      done
  1.3277 +      ;;
  1.3278 +    esac
  1.3279 +
  1.3280 +    # This variable tells wrapper scripts just to set variables rather
  1.3281 +    # than running their programs.
  1.3282 +    libtool_install_magic="$magic"
  1.3283 +
  1.3284 +    staticlibs=
  1.3285 +    future_libdirs=
  1.3286 +    current_libdirs=
  1.3287 +    for file in $files; do
  1.3288 +
  1.3289 +      # Do each installation.
  1.3290 +      case "$file" in
  1.3291 +      *.a | *.lib)
  1.3292 +	# Do the static libraries later.
  1.3293 +	staticlibs="$staticlibs $file"
  1.3294 +	;;
  1.3295 +
  1.3296 +      *.la)
  1.3297 +	# Check to see that this really is a libtool archive.
  1.3298 +	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
  1.3299 +	else
  1.3300 +	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
  1.3301 +	  $echo "$help" 1>&2
  1.3302 +	  exit 1
  1.3303 +	fi
  1.3304 +
  1.3305 +	library_names=
  1.3306 +	old_library=
  1.3307 +	# If there is no directory component, then add one.
  1.3308 +	case "$file" in
  1.3309 +	*/* | *\\*) . $file ;;
  1.3310 +	*) . ./$file ;;
  1.3311 +	esac
  1.3312 +
  1.3313 +	# Add the libdir to current_libdirs if it is the destination.
  1.3314 +	if test "X$destdir" = "X$libdir"; then
  1.3315 +	  case "$current_libdirs " in
  1.3316 +	  *" $libdir "*) ;;
  1.3317 +	  *) current_libdirs="$current_libdirs $libdir" ;;
  1.3318 +	  esac
  1.3319 +	else
  1.3320 +	  # Note the libdir as a future libdir.
  1.3321 +	  case "$future_libdirs " in
  1.3322 +	  *" $libdir "*) ;;
  1.3323 +	  *) future_libdirs="$future_libdirs $libdir" ;;
  1.3324 +	  esac
  1.3325 +	fi
  1.3326 +
  1.3327 +	dir="`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/"
  1.3328 +	test "X$dir" = "X$file/" && dir=
  1.3329 +	dir="$dir$objdir"
  1.3330 +
  1.3331 +	# See the names of the shared library.
  1.3332 +	set dummy $library_names
  1.3333 +	if test -n "$2"; then
  1.3334 +	  realname="$2"
  1.3335 +	  shift
  1.3336 +	  shift
  1.3337 +
  1.3338 +	  # Install the shared library and build the symlinks.
  1.3339 +	  $show "$install_prog $dir/$realname $destdir/$realname"
  1.3340 +	  $run eval "$install_prog $dir/$realname $destdir/$realname" || exit $?
  1.3341 +
  1.3342 +	  if test $# -gt 0; then
  1.3343 +	    # Delete the old symlinks, and create new ones.
  1.3344 +	    for linkname
  1.3345 +	    do
  1.3346 +	      if test "$linkname" != "$realname"; then
  1.3347 +		$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
  1.3348 +		$run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
  1.3349 +	      fi
  1.3350 +	    done
  1.3351 +	  fi
  1.3352 +
  1.3353 +	  # Do each command in the postinstall commands.
  1.3354 +	  lib="$destdir/$realname"
  1.3355 +	  eval cmds=\"$postinstall_cmds\"
  1.3356 +	  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
  1.3357 +	  for cmd in $cmds; do
  1.3358 +	    IFS="$save_ifs"
  1.3359 +	    $show "$cmd"
  1.3360 +	    $run eval "$cmd" || exit $?
  1.3361 +	  done
  1.3362 +	  IFS="$save_ifs"
  1.3363 +	fi
  1.3364 +
  1.3365 +	# Install the pseudo-library for information purposes.
  1.3366 +	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  1.3367 +	instname="$dir/$name"i
  1.3368 +	$show "$install_prog $instname $destdir/$name"
  1.3369 +	$run eval "$install_prog $instname $destdir/$name" || exit $?
  1.3370 +
  1.3371 +	# Maybe install the static library, too.
  1.3372 +	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
  1.3373 +	;;
  1.3374 +
  1.3375 +      *.lo)
  1.3376 +	# Install (i.e. copy) a libtool object.
  1.3377 +
  1.3378 +	# Figure out destination file name, if it wasn't already specified.
  1.3379 +	if test -n "$destname"; then
  1.3380 +	  destfile="$destdir/$destname"
  1.3381 +	else
  1.3382 +	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  1.3383 +	  destfile="$destdir/$destfile"
  1.3384 +	fi
  1.3385 +
  1.3386 +	# Deduce the name of the destination old-style object file.
  1.3387 +	case "$destfile" in
  1.3388 +	*.lo)
  1.3389 +	  staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
  1.3390 +	  ;;
  1.3391 +	*.o | *.obj)
  1.3392 +	  staticdest="$destfile"
  1.3393 +	  destfile=
  1.3394 +	  ;;
  1.3395 +	*)
  1.3396 +	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
  1.3397 +	  $echo "$help" 1>&2
  1.3398 +	  exit 1
  1.3399 +	  ;;
  1.3400 +	esac
  1.3401 +
  1.3402 +	# Install the libtool object if requested.
  1.3403 +	if test -n "$destfile"; then
  1.3404 +	  $show "$install_prog $file $destfile"
  1.3405 +	  $run eval "$install_prog $file $destfile" || exit $?
  1.3406 +	fi
  1.3407 +
  1.3408 +	# Install the old object if enabled.
  1.3409 +	if test "$build_old_libs" = yes; then
  1.3410 +	  # Deduce the name of the old-style object file.
  1.3411 +	  staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
  1.3412 +
  1.3413 +	  $show "$install_prog $staticobj $staticdest"
  1.3414 +	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
  1.3415 +	fi
  1.3416 +	exit 0
  1.3417 +	;;
  1.3418 +
  1.3419 +      *)
  1.3420 +	# Figure out destination file name, if it wasn't already specified.
  1.3421 +	if test -n "$destname"; then
  1.3422 +	  destfile="$destdir/$destname"
  1.3423 +	else
  1.3424 +	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  1.3425 +	  destfile="$destdir/$destfile"
  1.3426 +	fi
  1.3427 +
  1.3428 +	# Do a test to see if this is really a libtool program.
  1.3429 +	if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  1.3430 +	  link_against_libtool_libs=
  1.3431 +	  relink_command=
  1.3432 +
  1.3433 +	  # If there is no directory component, then add one.
  1.3434 +	  case "$file" in
  1.3435 +	  */* | *\\*) . $file ;;
  1.3436 +	  *) . ./$file ;;
  1.3437 +	  esac
  1.3438 +
  1.3439 +	  # Check the variables that should have been set.
  1.3440 +	  if test -z "$link_against_libtool_libs"; then
  1.3441 +	    $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
  1.3442 +	    exit 1
  1.3443 +	  fi
  1.3444 +
  1.3445 +	  finalize=yes
  1.3446 +	  for lib in $link_against_libtool_libs; do
  1.3447 +	    # Check to see that each library is installed.
  1.3448 +	    libdir=
  1.3449 +	    if test -f "$lib"; then
  1.3450 +	      # If there is no directory component, then add one.
  1.3451 +	      case "$lib" in
  1.3452 +	      */* | *\\*) . $lib ;;
  1.3453 +	      *) . ./$lib ;;
  1.3454 +	      esac
  1.3455 +	    fi
  1.3456 +	    libfile="$libdir/`$echo "X$lib" | $Xsed -e 's%^.*/%%g'`"
  1.3457 +	    if test -n "$libdir" && test ! -f "$libfile"; then
  1.3458 +	      $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
  1.3459 +	      finalize=no
  1.3460 +	    fi
  1.3461 +	  done
  1.3462 +
  1.3463 +	  outputname=
  1.3464 +	  if test "$fast_install" = no && test -n "$relink_command"; then
  1.3465 +	    if test "$finalize" = yes && test -z "$run"; then
  1.3466 +	      tmpdir="/tmp"
  1.3467 +	      test -n "$TMPDIR" && tmpdir="$TMPDIR"
  1.3468 +	      tmpdir="$tmpdir/libtool-$$"
  1.3469 +	      if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
  1.3470 +	      else
  1.3471 +		$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
  1.3472 +		continue
  1.3473 +	      fi
  1.3474 +	      outputname="$tmpdir/$file"
  1.3475 +	      # Replace the output file specification.
  1.3476 +	      relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
  1.3477 +
  1.3478 +	      $show "$relink_command"
  1.3479 +	      if $run eval "$relink_command"; then :
  1.3480 +	      else
  1.3481 +		$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
  1.3482 +		${rm}r "$tmpdir"
  1.3483 +		continue
  1.3484 +	      fi
  1.3485 +	      file="$outputname"
  1.3486 +	    else
  1.3487 +	      $echo "$modename: warning: cannot relink \`$file'" 1>&2
  1.3488 +	    fi
  1.3489 +	  else
  1.3490 +	    # Install the binary that we compiled earlier.
  1.3491 +	    file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
  1.3492 +	  fi
  1.3493 +	fi
  1.3494 +
  1.3495 +	$show "$install_prog$stripme $file $destfile"
  1.3496 +	$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
  1.3497 +	test -n "$outputname" && ${rm}r "$tmpdir"
  1.3498 +	;;
  1.3499 +      esac
  1.3500 +    done
  1.3501 +
  1.3502 +    for file in $staticlibs; do
  1.3503 +      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  1.3504 +
  1.3505 +      # Set up the ranlib parameters.
  1.3506 +      oldlib="$destdir/$name"
  1.3507 +
  1.3508 +      $show "$install_prog $file $oldlib"
  1.3509 +      $run eval "$install_prog \$file \$oldlib" || exit $?
  1.3510 +
  1.3511 +      # Do each command in the postinstall commands.
  1.3512 +      eval cmds=\"$old_postinstall_cmds\"
  1.3513 +      IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
  1.3514 +      for cmd in $cmds; do
  1.3515 +	IFS="$save_ifs"
  1.3516 +	$show "$cmd"
  1.3517 +	$run eval "$cmd" || exit $?
  1.3518 +      done
  1.3519 +      IFS="$save_ifs"
  1.3520 +    done
  1.3521 +
  1.3522 +    if test -n "$future_libdirs"; then
  1.3523 +      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
  1.3524 +    fi
  1.3525 +
  1.3526 +    if test -n "$current_libdirs"; then
  1.3527 +      # Maybe just do a dry run.
  1.3528 +      test -n "$run" && current_libdirs=" -n$current_libdirs"
  1.3529 +      exec $SHELL $0 --finish$current_libdirs
  1.3530 +      exit 1
  1.3531 +    fi
  1.3532 +
  1.3533 +    exit 0
  1.3534 +    ;;
  1.3535 +
  1.3536 +  # libtool finish mode
  1.3537 +  finish)
  1.3538 +    modename="$modename: finish"
  1.3539 +    libdirs="$nonopt"
  1.3540 +    admincmds=
  1.3541 +
  1.3542 +    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
  1.3543 +      for dir
  1.3544 +      do
  1.3545 +	libdirs="$libdirs $dir"
  1.3546 +      done
  1.3547 +
  1.3548 +      for libdir in $libdirs; do
  1.3549 +	if test -n "$finish_cmds"; then
  1.3550 +	  # Do each command in the finish commands.
  1.3551 +	  eval cmds=\"$finish_cmds\"
  1.3552 +	  IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
  1.3553 +	  for cmd in $cmds; do
  1.3554 +	    IFS="$save_ifs"
  1.3555 +	    $show "$cmd"
  1.3556 +	    $run eval "$cmd" || admincmds="$admincmds
  1.3557 +       $cmd"
  1.3558 +	  done
  1.3559 +	  IFS="$save_ifs"
  1.3560 +	fi
  1.3561 +	if test -n "$finish_eval"; then
  1.3562 +	  # Do the single finish_eval.
  1.3563 +	  eval cmds=\"$finish_eval\"
  1.3564 +	  $run eval "$cmds" || admincmds="$admincmds
  1.3565 +       $cmds"
  1.3566 +	fi
  1.3567 +      done
  1.3568 +    fi
  1.3569 +
  1.3570 +    # Exit here if they wanted silent mode.
  1.3571 +    test "$show" = : && exit 0
  1.3572 +
  1.3573 +    echo "----------------------------------------------------------------------"
  1.3574 +    echo "Libraries have been installed in:"
  1.3575 +    for libdir in $libdirs; do
  1.3576 +      echo "   $libdir"
  1.3577 +    done
  1.3578 +    echo
  1.3579 +    echo "If you ever happen to want to link against installed libraries"
  1.3580 +    echo "in a given directory, LIBDIR, you must either use libtool, and"
  1.3581 +    echo "specify the full pathname of the library, or use \`-LLIBDIR'"
  1.3582 +    echo "flag during linking and do at least one of the following:"
  1.3583 +    if test -n "$shlibpath_var"; then
  1.3584 +      echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
  1.3585 +      echo "     during execution"
  1.3586 +    fi
  1.3587 +    if test -n "$runpath_var"; then
  1.3588 +      echo "   - add LIBDIR to the \`$runpath_var' environment variable"
  1.3589 +      echo "     during linking"
  1.3590 +    fi
  1.3591 +    if test -n "$hardcode_libdir_flag_spec"; then
  1.3592 +      libdir=LIBDIR
  1.3593 +      eval flag=\"$hardcode_libdir_flag_spec\"
  1.3594 +
  1.3595 +      echo "   - use the \`$flag' linker flag"
  1.3596 +    fi
  1.3597 +    if test -n "$admincmds"; then
  1.3598 +      echo "   - have your system administrator run these commands:$admincmds"
  1.3599 +    fi
  1.3600 +    if test -f /etc/ld.so.conf; then
  1.3601 +      echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
  1.3602 +    fi
  1.3603 +    echo
  1.3604 +    echo "See any operating system documentation about shared libraries for"
  1.3605 +    echo "more information, such as the ld(1) and ld.so(8) manual pages."
  1.3606 +    echo "----------------------------------------------------------------------"
  1.3607 +    exit 0
  1.3608 +    ;;
  1.3609 +
  1.3610 +  # libtool execute mode
  1.3611 +  execute)
  1.3612 +    modename="$modename: execute"
  1.3613 +
  1.3614 +    # The first argument is the command name.
  1.3615 +    cmd="$nonopt"
  1.3616 +    if test -z "$cmd"; then
  1.3617 +      $echo "$modename: you must specify a COMMAND" 1>&2
  1.3618 +      $echo "$help"
  1.3619 +      exit 1
  1.3620 +    fi
  1.3621 +
  1.3622 +    # Handle -dlopen flags immediately.
  1.3623 +    for file in $execute_dlfiles; do
  1.3624 +      if test ! -f "$file"; then
  1.3625 +	$echo "$modename: \`$file' is not a file" 1>&2
  1.3626 +	$echo "$help" 1>&2
  1.3627 +	exit 1
  1.3628 +      fi
  1.3629 +
  1.3630 +      dir=
  1.3631 +      case "$file" in
  1.3632 +      *.la)
  1.3633 +	# Check to see that this really is a libtool archive.
  1.3634 +	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
  1.3635 +	else
  1.3636 +	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
  1.3637 +	  $echo "$help" 1>&2
  1.3638 +	  exit 1
  1.3639 +	fi
  1.3640 +
  1.3641 +	# Read the libtool library.
  1.3642 +	dlname=
  1.3643 +	library_names=
  1.3644 +
  1.3645 +	# If there is no directory component, then add one.
  1.3646 +	case "$file" in
  1.3647 +	*/* | *\\*) . $file ;;
  1.3648 +	*) . ./$file ;;
  1.3649 +	esac
  1.3650 +
  1.3651 +	# Skip this library if it cannot be dlopened.
  1.3652 +	if test -z "$dlname"; then
  1.3653 +	  # Warn if it was a shared library.
  1.3654 +	  test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
  1.3655 +	  continue
  1.3656 +	fi
  1.3657 +
  1.3658 +	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
  1.3659 +	test "X$dir" = "X$file" && dir=.
  1.3660 +
  1.3661 +	if test -f "$dir/$objdir/$dlname"; then
  1.3662 +	  dir="$dir/$objdir"
  1.3663 +	else
  1.3664 +	  $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
  1.3665 +	  exit 1
  1.3666 +	fi
  1.3667 +	;;
  1.3668 +
  1.3669 +      *.lo)
  1.3670 +	# Just add the directory containing the .lo file.
  1.3671 +	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
  1.3672 +	test "X$dir" = "X$file" && dir=.
  1.3673 +	;;
  1.3674 +
  1.3675 +      *)
  1.3676 +	$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
  1.3677 +	continue
  1.3678 +	;;
  1.3679 +      esac
  1.3680 +
  1.3681 +      # Get the absolute pathname.
  1.3682 +      absdir=`cd "$dir" && pwd`
  1.3683 +      test -n "$absdir" && dir="$absdir"
  1.3684 +
  1.3685 +      # Now add the directory to shlibpath_var.
  1.3686 +      if eval "test -z \"\$$shlibpath_var\""; then
  1.3687 +	eval "$shlibpath_var=\"\$dir\""
  1.3688 +      else
  1.3689 +	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
  1.3690 +      fi
  1.3691 +    done
  1.3692 +
  1.3693 +    # This variable tells wrapper scripts just to set shlibpath_var
  1.3694 +    # rather than running their programs.
  1.3695 +    libtool_execute_magic="$magic"
  1.3696 +
  1.3697 +    # Check if any of the arguments is a wrapper script.
  1.3698 +    args=
  1.3699 +    for file
  1.3700 +    do
  1.3701 +      case "$file" in
  1.3702 +      -*) ;;
  1.3703 +      *)
  1.3704 +	# Do a test to see if this is really a libtool program.
  1.3705 +	if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  1.3706 +	  # If there is no directory component, then add one.
  1.3707 +	  case "$file" in
  1.3708 +	  */* | *\\*) . $file ;;
  1.3709 +	  *) . ./$file ;;
  1.3710 +	  esac
  1.3711 +
  1.3712 +	  # Transform arg to wrapped name.
  1.3713 +	  file="$progdir/$program"
  1.3714 +	fi
  1.3715 +	;;
  1.3716 +      esac
  1.3717 +      # Quote arguments (to preserve shell metacharacters).
  1.3718 +      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
  1.3719 +      args="$args \"$file\""
  1.3720 +    done
  1.3721 +
  1.3722 +    if test -z "$run"; then
  1.3723 +      if test -n "$shlibpath_var"; then
  1.3724 +        # Export the shlibpath_var.
  1.3725 +        eval "export $shlibpath_var"
  1.3726 +      fi
  1.3727 +
  1.3728 +      # Restore saved enviroment variables
  1.3729 +      if test "${save_LC_ALL+set}" = set; then
  1.3730 +	LC_ALL="$save_LC_ALL"; export LC_ALL
  1.3731 +      fi
  1.3732 +      if test "${save_LANG+set}" = set; then
  1.3733 +	LANG="$save_LANG"; export LANG
  1.3734 +      fi
  1.3735 +
  1.3736 +      # Now actually exec the command.
  1.3737 +      eval "exec \$cmd$args"
  1.3738 +
  1.3739 +      $echo "$modename: cannot exec \$cmd$args"
  1.3740 +      exit 1
  1.3741 +    else
  1.3742 +      # Display what would be done.
  1.3743 +      if test -n "$shlibpath_var"; then
  1.3744 +        eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
  1.3745 +        $echo "export $shlibpath_var"
  1.3746 +      fi
  1.3747 +      $echo "$cmd$args"
  1.3748 +      exit 0
  1.3749 +    fi
  1.3750 +    ;;
  1.3751 +
  1.3752 +  # libtool uninstall mode
  1.3753 +  uninstall)
  1.3754 +    modename="$modename: uninstall"
  1.3755 +    rm="$nonopt"
  1.3756 +    files=
  1.3757 +
  1.3758 +    for arg
  1.3759 +    do
  1.3760 +      case "$arg" in
  1.3761 +      -*) rm="$rm $arg" ;;
  1.3762 +      *) files="$files $arg" ;;
  1.3763 +      esac
  1.3764 +    done
  1.3765 +
  1.3766 +    if test -z "$rm"; then
  1.3767 +      $echo "$modename: you must specify an RM program" 1>&2
  1.3768 +      $echo "$help" 1>&2
  1.3769 +      exit 1
  1.3770 +    fi
  1.3771 +
  1.3772 +    for file in $files; do
  1.3773 +      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
  1.3774 +      test "X$dir" = "X$file" && dir=.
  1.3775 +      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
  1.3776 +
  1.3777 +      rmfiles="$file"
  1.3778 +
  1.3779 +      case "$name" in
  1.3780 +      *.la)
  1.3781 +	# Possibly a libtool archive, so verify it.
  1.3782 +	if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
  1.3783 +	  . $dir/$name
  1.3784 +
  1.3785 +	  # Delete the libtool libraries and symlinks.
  1.3786 +	  for n in $library_names; do
  1.3787 +	    rmfiles="$rmfiles $dir/$n"
  1.3788 +	  done
  1.3789 +	  test -n "$old_library" && rmfiles="$rmfiles $dir/$old_library"
  1.3790 +
  1.3791 +	  $show "$rm $rmfiles"
  1.3792 +	  $run $rm $rmfiles
  1.3793 +
  1.3794 +	  if test -n "$library_names"; then
  1.3795 +	    # Do each command in the postuninstall commands.
  1.3796 +	    eval cmds=\"$postuninstall_cmds\"
  1.3797 +	    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
  1.3798 +	    for cmd in $cmds; do
  1.3799 +	      IFS="$save_ifs"
  1.3800 +	      $show "$cmd"
  1.3801 +	      $run eval "$cmd"
  1.3802 +	    done
  1.3803 +	    IFS="$save_ifs"
  1.3804 +	  fi
  1.3805 +
  1.3806 +	  if test -n "$old_library"; then
  1.3807 +	    # Do each command in the old_postuninstall commands.
  1.3808 +	    eval cmds=\"$old_postuninstall_cmds\"
  1.3809 +	    IFS="${IFS= 	}"; save_ifs="$IFS"; IFS='~'
  1.3810 +	    for cmd in $cmds; do
  1.3811 +	      IFS="$save_ifs"
  1.3812 +	      $show "$cmd"
  1.3813 +	      $run eval "$cmd"
  1.3814 +	    done
  1.3815 +	    IFS="$save_ifs"
  1.3816 +	  fi
  1.3817 +
  1.3818 +	  # FIXME: should reinstall the best remaining shared library.
  1.3819 +	fi
  1.3820 +	;;
  1.3821 +
  1.3822 +      *.lo)
  1.3823 +	if test "$build_old_libs" = yes; then
  1.3824 +	  oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
  1.3825 +	  rmfiles="$rmfiles $dir/$oldobj"
  1.3826 +	fi
  1.3827 +	$show "$rm $rmfiles"
  1.3828 +	$run $rm $rmfiles
  1.3829 +	;;
  1.3830 +
  1.3831 +      *)
  1.3832 +	$show "$rm $rmfiles"
  1.3833 +	$run $rm $rmfiles
  1.3834 +	;;
  1.3835 +      esac
  1.3836 +    done
  1.3837 +    exit 0
  1.3838 +    ;;
  1.3839 +
  1.3840 +  "")
  1.3841 +    $echo "$modename: you must specify a MODE" 1>&2
  1.3842 +    $echo "$generic_help" 1>&2
  1.3843 +    exit 1
  1.3844 +    ;;
  1.3845 +  esac
  1.3846 +
  1.3847 +  $echo "$modename: invalid operation mode \`$mode'" 1>&2
  1.3848 +  $echo "$generic_help" 1>&2
  1.3849 +  exit 1
  1.3850 +fi # test -z "$show_help"
  1.3851 +
  1.3852 +# We need to display help for each of the modes.
  1.3853 +case "$mode" in
  1.3854 +"") $echo \
  1.3855 +"Usage: $modename [OPTION]... [MODE-ARG]...
  1.3856 +
  1.3857 +Provide generalized library-building support services.
  1.3858 +
  1.3859 +    --config          show all configuration variables
  1.3860 +    --debug           enable verbose shell tracing
  1.3861 +-n, --dry-run         display commands without modifying any files
  1.3862 +    --features        display basic configuration information and exit
  1.3863 +    --finish          same as \`--mode=finish'
  1.3864 +    --help            display this help message and exit
  1.3865 +    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
  1.3866 +    --quiet           same as \`--silent'
  1.3867 +    --silent          don't print informational messages
  1.3868 +    --version         print version information
  1.3869 +
  1.3870 +MODE must be one of the following:
  1.3871 +
  1.3872 +      compile         compile a source file into a libtool object
  1.3873 +      execute         automatically set library path, then run a program
  1.3874 +      finish          complete the installation of libtool libraries
  1.3875 +      install         install libraries or executables
  1.3876 +      link            create a library or an executable
  1.3877 +      uninstall       remove libraries from an installed directory
  1.3878 +
  1.3879 +MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
  1.3880 +a more detailed description of MODE."
  1.3881 +  exit 0
  1.3882 +  ;;
  1.3883 +
  1.3884 +compile)
  1.3885 +  $echo \
  1.3886 +"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
  1.3887 +
  1.3888 +Compile a source file into a libtool library object.
  1.3889 +
  1.3890 +This mode accepts the following additional options:
  1.3891 +
  1.3892 +  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
  1.3893 +  -static           always build a \`.o' file suitable for static linking
  1.3894 +
  1.3895 +COMPILE-COMMAND is a command to be used in creating a \`standard' object file
  1.3896 +from the given SOURCEFILE.
  1.3897 +
  1.3898 +The output file name is determined by removing the directory component from
  1.3899 +SOURCEFILE, then substituting the C source code suffix \`.c' with the
  1.3900 +library object suffix, \`.lo'."
  1.3901 +  ;;
  1.3902 +
  1.3903 +execute)
  1.3904 +  $echo \
  1.3905 +"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
  1.3906 +
  1.3907 +Automatically set library path, then run a program.
  1.3908 +
  1.3909 +This mode accepts the following additional options:
  1.3910 +
  1.3911 +  -dlopen FILE      add the directory containing FILE to the library path
  1.3912 +
  1.3913 +This mode sets the library path environment variable according to \`-dlopen'
  1.3914 +flags.
  1.3915 +
  1.3916 +If any of the ARGS are libtool executable wrappers, then they are translated
  1.3917 +into their corresponding uninstalled binary, and any of their required library
  1.3918 +directories are added to the library path.
  1.3919 +
  1.3920 +Then, COMMAND is executed, with ARGS as arguments."
  1.3921 +  ;;
  1.3922 +
  1.3923 +finish)
  1.3924 +  $echo \
  1.3925 +"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
  1.3926 +
  1.3927 +Complete the installation of libtool libraries.
  1.3928 +
  1.3929 +Each LIBDIR is a directory that contains libtool libraries.
  1.3930 +
  1.3931 +The commands that this mode executes may require superuser privileges.  Use
  1.3932 +the \`--dry-run' option if you just want to see what would be executed."
  1.3933 +  ;;
  1.3934 +
  1.3935 +install)
  1.3936 +  $echo \
  1.3937 +"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
  1.3938 +
  1.3939 +Install executables or libraries.
  1.3940 +
  1.3941 +INSTALL-COMMAND is the installation command.  The first component should be
  1.3942 +either the \`install' or \`cp' program.
  1.3943 +
  1.3944 +The rest of the components are interpreted as arguments to that command (only
  1.3945 +BSD-compatible install options are recognized)."
  1.3946 +  ;;
  1.3947 +
  1.3948 +link)
  1.3949 +  $echo \
  1.3950 +"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
  1.3951 +
  1.3952 +Link object files or libraries together to form another library, or to
  1.3953 +create an executable program.
  1.3954 +
  1.3955 +LINK-COMMAND is a command using the C compiler that you would use to create
  1.3956 +a program from several object files.
  1.3957 +
  1.3958 +The following components of LINK-COMMAND are treated specially:
  1.3959 +
  1.3960 +  -all-static       do not do any dynamic linking at all
  1.3961 +  -avoid-version    do not add a version suffix if possible
  1.3962 +  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
  1.3963 +  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
  1.3964 +  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
  1.3965 +  -export-symbols SYMFILE
  1.3966 +		    try to export only the symbols listed in SYMFILE
  1.3967 +  -export-symbols-regex REGEX
  1.3968 +		    try to export only the symbols matching REGEX
  1.3969 +  -LLIBDIR          search LIBDIR for required installed libraries
  1.3970 +  -lNAME            OUTPUT-FILE requires the installed library libNAME
  1.3971 +  -module           build a library that can dlopened
  1.3972 +  -no-undefined     declare that a library does not refer to external symbols
  1.3973 +  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
  1.3974 +  -release RELEASE  specify package release information
  1.3975 +  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
  1.3976 +  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
  1.3977 +  -static           do not do any dynamic linking of libtool libraries
  1.3978 +  -version-info CURRENT[:REVISION[:AGE]]
  1.3979 +		    specify library version info [each variable defaults to 0]
  1.3980 +
  1.3981 +All other options (arguments beginning with \`-') are ignored.
  1.3982 +
  1.3983 +Every other argument is treated as a filename.  Files ending in \`.la' are
  1.3984 +treated as uninstalled libtool libraries, other files are standard or library
  1.3985 +object files.
  1.3986 +
  1.3987 +If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
  1.3988 +only library objects (\`.lo' files) may be specified, and \`-rpath' is
  1.3989 +required, except when creating a convenience library.
  1.3990 +
  1.3991 +If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
  1.3992 +using \`ar' and \`ranlib', or on Windows using \`lib'.
  1.3993 +
  1.3994 +If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
  1.3995 +is created, otherwise an executable program is created."
  1.3996 +  ;;
  1.3997 +
  1.3998 +uninstall)
  1.3999 +  $echo \
  1.4000 +"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
  1.4001 +
  1.4002 +Remove libraries from an installation directory.
  1.4003 +
  1.4004 +RM is the name of the program to use to delete files associated with each FILE
  1.4005 +(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
  1.4006 +to RM.
  1.4007 +
  1.4008 +If FILE is a libtool library, all the files associated with it are deleted.
  1.4009 +Otherwise, only FILE itself is deleted using RM."
  1.4010 +  ;;
  1.4011 +
  1.4012 +*)
  1.4013 +  $echo "$modename: invalid operation mode \`$mode'" 1>&2
  1.4014 +  $echo "$help" 1>&2
  1.4015 +  exit 1
  1.4016 +  ;;
  1.4017 +esac
  1.4018 +
  1.4019 +echo
  1.4020 +$echo "Try \`$modename --help' for more information about other modes."
  1.4021 +
  1.4022 +exit 0
  1.4023 +
  1.4024 +# Local Variables:
  1.4025 +# mode:shell-script
  1.4026 +# sh-indentation:2
  1.4027 +# End: