Blame autotools/ltmain.sh

Packit 64f477
# ltmain.sh - Provide generalized library-building support services.
Packit 64f477
# NOTE: Changing this file will not affect anything until you rerun configure.
Packit 64f477
#
Packit 64f477
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
Packit 64f477
# Free Software Foundation, Inc.
Packit 64f477
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
Packit 64f477
#
Packit 64f477
# This program is free software; you can redistribute it and/or modify
Packit 64f477
# it under the terms of the GNU General Public License as published by
Packit 64f477
# the Free Software Foundation; either version 2 of the License, or
Packit 64f477
# (at your option) any later version.
Packit 64f477
#
Packit 64f477
# This program is distributed in the hope that it will be useful, but
Packit 64f477
# WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 64f477
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 64f477
# General Public License for more details.
Packit 64f477
#
Packit 64f477
# You should have received a copy of the GNU General Public License
Packit 64f477
# along with this program; if not, write to the Free Software
Packit 64f477
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Packit 64f477
#
Packit 64f477
# As a special exception to the GNU General Public License, if you
Packit 64f477
# distribute this file as part of a program that contains a
Packit 64f477
# configuration script generated by Autoconf, you may include it under
Packit 64f477
# the same distribution terms that you use for the rest of that program.
Packit 64f477
Packit 64f477
# Check that we have a working $echo.
Packit 64f477
if test "X$1" = X--no-reexec; then
Packit 64f477
  # Discard the --no-reexec flag, and continue.
Packit 64f477
  shift
Packit 64f477
elif test "X$1" = X--fallback-echo; then
Packit 64f477
  # Avoid inline document here, it may be left over
Packit 64f477
  :
Packit 64f477
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
Packit 64f477
  # Yippee, $echo works!
Packit 64f477
  :
Packit 64f477
else
Packit 64f477
  # Restart under the correct shell, and then maybe $echo will work.
Packit 64f477
  exec $SHELL "$0" --no-reexec ${1+"$@"}
Packit 64f477
fi
Packit 64f477
Packit 64f477
if test "X$1" = X--fallback-echo; then
Packit 64f477
  # used as fallback echo
Packit 64f477
  shift
Packit 64f477
  cat <
Packit 64f477
$*
Packit 64f477
EOF
Packit 64f477
  exit 0
Packit 64f477
fi
Packit 64f477
Packit 64f477
# The name of this program.
Packit 64f477
progname=`$echo "$0" | sed 's%^.*/%%'`
Packit 64f477
modename="$progname"
Packit 64f477
Packit 64f477
# Constants.
Packit 64f477
PROGRAM=ltmain.sh
Packit 64f477
PACKAGE=libtool
Packit 64f477
VERSION=1.4.2a
Packit 64f477
TIMESTAMP=" (1.922.2.79 2001/11/28 21:50:31)"
Packit 64f477
Packit 64f477
default_mode=
Packit 64f477
help="Try \`$progname --help' for more information."
Packit 64f477
magic="%%%MAGIC variable%%%"
Packit 64f477
mkdir="mkdir"
Packit 64f477
mv="mv -f"
Packit 64f477
rm="rm -f"
Packit 64f477
Packit 64f477
# Sed substitution that helps us do robust quoting.  It backslashifies
Packit 64f477
# metacharacters that are still active within double-quoted strings.
Packit 64f477
Xsed='sed -e 1s/^X//'
Packit 64f477
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
Packit 64f477
SP2NL='tr \040 \012'
Packit 64f477
NL2SP='tr \015\012 \040\040'
Packit 64f477
Packit 64f477
# NLS nuisances.
Packit 64f477
# Only set LANG and LC_ALL to C if already set.
Packit 64f477
# These must not be set unconditionally because not all systems understand
Packit 64f477
# e.g. LANG=C (notably SCO).
Packit 64f477
# We save the old values to restore during execute mode.
Packit 64f477
if test "${LC_ALL+set}" = set; then
Packit 64f477
  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
Packit 64f477
fi
Packit 64f477
if test "${LANG+set}" = set; then
Packit 64f477
  save_LANG="$LANG"; LANG=C; export LANG
Packit 64f477
fi
Packit 64f477
Packit 64f477
# Make sure IFS has a sensible default
Packit 64f477
: ${IFS=" 	"}
Packit 64f477
Packit 64f477
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
Packit 64f477
  echo "$modename: not configured to build any kind of library" 1>&2
Packit 64f477
  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
Packit 64f477
  exit 1
Packit 64f477
fi
Packit 64f477
Packit 64f477
# Global variables.
Packit 64f477
mode=$default_mode
Packit 64f477
nonopt=
Packit 64f477
prev=
Packit 64f477
prevopt=
Packit 64f477
run=
Packit 64f477
show="$echo"
Packit 64f477
show_help=
Packit 64f477
execute_dlfiles=
Packit 64f477
lo2o="s/\\.lo\$/.${objext}/"
Packit 64f477
o2lo="s/\\.${objext}\$/.lo/"
Packit 64f477
Packit 64f477
# Parse our command line options once, thoroughly.
Packit 64f477
while test $# -gt 0
Packit 64f477
do
Packit 64f477
  arg="$1"
Packit 64f477
  shift
Packit 64f477
Packit 64f477
  case $arg in
Packit 64f477
  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
Packit 64f477
  *) optarg= ;;
Packit 64f477
  esac
Packit 64f477
Packit 64f477
  # If the previous option needs an argument, assign it.
Packit 64f477
  if test -n "$prev"; then
Packit 64f477
    case $prev in
Packit 64f477
    execute_dlfiles)
Packit 64f477
      execute_dlfiles="$execute_dlfiles $arg"
Packit 64f477
      ;;
Packit 64f477
    *)
Packit 64f477
      eval "$prev=\$arg"
Packit 64f477
      ;;
Packit 64f477
    esac
Packit 64f477
Packit 64f477
    prev=
Packit 64f477
    prevopt=
Packit 64f477
    continue
Packit 64f477
  fi
Packit 64f477
Packit 64f477
  # Have we seen a non-optional argument yet?
Packit 64f477
  case $arg in
Packit 64f477
  --help)
Packit 64f477
    show_help=yes
Packit 64f477
    ;;
Packit 64f477
Packit 64f477
  --version)
Packit 64f477
    echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
Packit 64f477
    exit 0
Packit 64f477
    ;;
Packit 64f477
Packit 64f477
  --config)
Packit 64f477
    sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
Packit 64f477
    exit 0
Packit 64f477
    ;;
Packit 64f477
Packit 64f477
  --debug)
Packit 64f477
    echo "$progname: enabling shell trace mode"
Packit 64f477
    set -x
Packit 64f477
    ;;
Packit 64f477
Packit 64f477
  --dry-run | -n)
Packit 64f477
    run=:
Packit 64f477
    ;;
Packit 64f477
Packit 64f477
  --features)
Packit 64f477
    echo "host: $host"
Packit 64f477
    if test "$build_libtool_libs" = yes; then
Packit 64f477
      echo "enable shared libraries"
Packit 64f477
    else
Packit 64f477
      echo "disable shared libraries"
Packit 64f477
    fi
Packit 64f477
    if test "$build_old_libs" = yes; then
Packit 64f477
      echo "enable static libraries"
Packit 64f477
    else
Packit 64f477
      echo "disable static libraries"
Packit 64f477
    fi
Packit 64f477
    exit 0
Packit 64f477
    ;;
Packit 64f477
Packit 64f477
  --finish) mode="finish" ;;
Packit 64f477
Packit 64f477
  --mode) prevopt="--mode" prev=mode ;;
Packit 64f477
  --mode=*) mode="$optarg" ;;
Packit 64f477
Packit 64f477
  --preserve-dup-deps) duplicate_deps="yes" ;;
Packit 64f477
Packit 64f477
  --quiet | --silent)
Packit 64f477
    show=:
Packit 64f477
    ;;
Packit 64f477
Packit 64f477
  -dlopen)
Packit 64f477
    prevopt="-dlopen"
Packit 64f477
    prev=execute_dlfiles
Packit 64f477
    ;;
Packit 64f477
Packit 64f477
  -*)
Packit 64f477
    $echo "$modename: unrecognized option \`$arg'" 1>&2
Packit 64f477
    $echo "$help" 1>&2
Packit 64f477
    exit 1
Packit 64f477
    ;;
Packit 64f477
Packit 64f477
  *)
Packit 64f477
    nonopt="$arg"
Packit 64f477
    break
Packit 64f477
    ;;
Packit 64f477
  esac
Packit 64f477
done
Packit 64f477
Packit 64f477
if test -n "$prevopt"; then
Packit 64f477
  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
Packit 64f477
  $echo "$help" 1>&2
Packit 64f477
  exit 1
Packit 64f477
fi
Packit 64f477
Packit 64f477
# If this variable is set in any of the actions, the command in it
Packit 64f477
# will be execed at the end.  This prevents here-documents from being
Packit 64f477
# left over by shells.
Packit 64f477
exec_cmd=
Packit 64f477
Packit 64f477
if test -z "$show_help"; then
Packit 64f477
Packit 64f477
  # Infer the operation mode.
Packit 64f477
  if test -z "$mode"; then
Packit 64f477
    case $nonopt in
Packit 64f477
    *cc | *++ | gcc* | *-gcc*)
Packit 64f477
      mode=link
Packit 64f477
      for arg
Packit 64f477
      do
Packit 64f477
	case $arg in
Packit 64f477
	-c)
Packit 64f477
	   mode=compile
Packit 64f477
	   break
Packit 64f477
	   ;;
Packit 64f477
	esac
Packit 64f477
      done
Packit 64f477
      ;;
Packit 64f477
    *db | *dbx | *strace | *truss)
Packit 64f477
      mode=execute
Packit 64f477
      ;;
Packit 64f477
    *install*|cp|mv)
Packit 64f477
      mode=install
Packit 64f477
      ;;
Packit 64f477
    *rm)
Packit 64f477
      mode=uninstall
Packit 64f477
      ;;
Packit 64f477
    *)
Packit 64f477
      # If we have no mode, but dlfiles were specified, then do execute mode.
Packit 64f477
      test -n "$execute_dlfiles" && mode=execute
Packit 64f477
Packit 64f477
      # Just use the default operation mode.
Packit 64f477
      if test -z "$mode"; then
Packit 64f477
	if test -n "$nonopt"; then
Packit 64f477
	  $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
Packit 64f477
	else
Packit 64f477
	  $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
Packit 64f477
	fi
Packit 64f477
      fi
Packit 64f477
      ;;
Packit 64f477
    esac
Packit 64f477
  fi
Packit 64f477
Packit 64f477
  # Only execute mode is allowed to have -dlopen flags.
Packit 64f477
  if test -n "$execute_dlfiles" && test "$mode" != execute; then
Packit 64f477
    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
Packit 64f477
    $echo "$help" 1>&2
Packit 64f477
    exit 1
Packit 64f477
  fi
Packit 64f477
Packit 64f477
  # Change the help message to a mode-specific one.
Packit 64f477
  generic_help="$help"
Packit 64f477
  help="Try \`$modename --help --mode=$mode' for more information."
Packit 64f477
Packit 64f477
  # These modes are in order of execution frequency so that they run quickly.
Packit 64f477
  case $mode in
Packit 64f477
  # libtool compile mode
Packit 64f477
  compile)
Packit 64f477
    modename="$modename: compile"
Packit 64f477
    # Get the compilation command and the source file.
Packit 64f477
    base_compile=
Packit 64f477
    prev=
Packit 64f477
    lastarg=
Packit 64f477
    srcfile="$nonopt"
Packit 64f477
    suppress_output=
Packit 64f477
Packit 64f477
    user_target=no
Packit 64f477
    for arg
Packit 64f477
    do
Packit 64f477
      case $prev in
Packit 64f477
      "") ;;
Packit 64f477
      xcompiler)
Packit 64f477
	# Aesthetically quote the previous argument.
Packit 64f477
	prev=
Packit 64f477
	lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
Packit 64f477
Packit 64f477
	case $arg in
Packit 64f477
	# Double-quote args containing other shell metacharacters.
Packit 64f477
	# Many Bourne shells cannot handle close brackets correctly
Packit 64f477
	# in scan sets, so we specify it separately.
Packit 64f477
	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
Packit 64f477
	  arg="\"$arg\""
Packit 64f477
	  ;;
Packit 64f477
	esac
Packit 64f477
Packit 64f477
	# Add the previous argument to base_compile.
Packit 64f477
	if test -z "$base_compile"; then
Packit 64f477
	  base_compile="$lastarg"
Packit 64f477
	else
Packit 64f477
	  base_compile="$base_compile $lastarg"
Packit 64f477
	fi
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
      esac
Packit 64f477
Packit 64f477
      # Accept any command-line options.
Packit 64f477
      case $arg in
Packit 64f477
      -o)
Packit 64f477
	if test "$user_target" != "no"; then
Packit 64f477
	  $echo "$modename: you cannot specify \`-o' more than once" 1>&2
Packit 64f477
	  exit 1
Packit 64f477
	fi
Packit 64f477
	user_target=next
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -static)
Packit 64f477
	build_old_libs=yes
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -prefer-pic)
Packit 64f477
	pic_mode=yes
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -prefer-non-pic)
Packit 64f477
	pic_mode=no
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -Xcompiler)
Packit 64f477
	prev=xcompiler
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -Wc,*)
Packit 64f477
	args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
Packit 64f477
	lastarg=
Packit 64f477
	save_ifs="$IFS"; IFS=','
Packit 64f477
	for arg in $args; do
Packit 64f477
	  IFS="$save_ifs"
Packit 64f477
Packit 64f477
	  # Double-quote args containing other shell metacharacters.
Packit 64f477
	  # Many Bourne shells cannot handle close brackets correctly
Packit 64f477
	  # in scan sets, so we specify it separately.
Packit 64f477
	  case $arg in
Packit 64f477
	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
Packit 64f477
	    arg="\"$arg\""
Packit 64f477
	    ;;
Packit 64f477
	  esac
Packit 64f477
	  lastarg="$lastarg $arg"
Packit 64f477
	done
Packit 64f477
	IFS="$save_ifs"
Packit 64f477
	lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
Packit 64f477
Packit 64f477
	# Add the arguments to base_compile.
Packit 64f477
	if test -z "$base_compile"; then
Packit 64f477
	  base_compile="$lastarg"
Packit 64f477
	else
Packit 64f477
	  base_compile="$base_compile $lastarg"
Packit 64f477
	fi
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
      esac
Packit 64f477
Packit 64f477
      case $user_target in
Packit 64f477
      next)
Packit 64f477
	# The next one is the -o target name
Packit 64f477
	user_target=yes
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
      yes)
Packit 64f477
	# We got the output file
Packit 64f477
	user_target=set
Packit 64f477
	libobj="$arg"
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
      esac
Packit 64f477
Packit 64f477
      # Accept the current argument as the source file.
Packit 64f477
      lastarg="$srcfile"
Packit 64f477
      srcfile="$arg"
Packit 64f477
Packit 64f477
      # Aesthetically quote the previous argument.
Packit 64f477
Packit 64f477
      # Backslashify any backslashes, double quotes, and dollar signs.
Packit 64f477
      # These are the only characters that are still specially
Packit 64f477
      # interpreted inside of double-quoted scrings.
Packit 64f477
      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
Packit 64f477
Packit 64f477
      # Double-quote args containing other shell metacharacters.
Packit 64f477
      # Many Bourne shells cannot handle close brackets correctly
Packit 64f477
      # in scan sets, so we specify it separately.
Packit 64f477
      case $lastarg in
Packit 64f477
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
Packit 64f477
	lastarg="\"$lastarg\""
Packit 64f477
	;;
Packit 64f477
      esac
Packit 64f477
Packit 64f477
      # Add the previous argument to base_compile.
Packit 64f477
      if test -z "$base_compile"; then
Packit 64f477
	base_compile="$lastarg"
Packit 64f477
      else
Packit 64f477
	base_compile="$base_compile $lastarg"
Packit 64f477
      fi
Packit 64f477
    done
Packit 64f477
Packit 64f477
    case $user_target in
Packit 64f477
    set)
Packit 64f477
      ;;
Packit 64f477
    no)
Packit 64f477
      # Get the name of the library object.
Packit 64f477
      libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
Packit 64f477
      ;;
Packit 64f477
    *)
Packit 64f477
      $echo "$modename: you must specify a target with \`-o'" 1>&2
Packit 64f477
      exit 1
Packit 64f477
      ;;
Packit 64f477
    esac
Packit 64f477
Packit 64f477
    # Recognize several different file suffixes.
Packit 64f477
    # If the user specifies -o file.o, it is replaced with file.lo
Packit 64f477
    xform='[cCFSfmso]'
Packit 64f477
    case $libobj in
Packit 64f477
    *.ada) xform=ada ;;
Packit 64f477
    *.adb) xform=adb ;;
Packit 64f477
    *.ads) xform=ads ;;
Packit 64f477
    *.asm) xform=asm ;;
Packit 64f477
    *.c++) xform=c++ ;;
Packit 64f477
    *.cc) xform=cc ;;
Packit 64f477
    *.cpp) xform=cpp ;;
Packit 64f477
    *.cxx) xform=cxx ;;
Packit 64f477
    *.f90) xform=f90 ;;
Packit 64f477
    *.for) xform=for ;;
Packit 64f477
    esac
Packit 64f477
Packit 64f477
    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
Packit 64f477
Packit 64f477
    case $libobj in
Packit 64f477
    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
Packit 64f477
    *)
Packit 64f477
      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
Packit 64f477
      exit 1
Packit 64f477
      ;;
Packit 64f477
    esac
Packit 64f477
Packit 64f477
    if test -z "$base_compile"; then
Packit 64f477
      $echo "$modename: you must specify a compilation command" 1>&2
Packit 64f477
      $echo "$help" 1>&2
Packit 64f477
      exit 1
Packit 64f477
    fi
Packit 64f477
Packit 64f477
    # Delete any leftover library objects.
Packit 64f477
    if test "$build_old_libs" = yes; then
Packit 64f477
      removelist="$obj $libobj"
Packit 64f477
    else
Packit 64f477
      removelist="$libobj"
Packit 64f477
    fi
Packit 64f477
Packit 64f477
    $run $rm $removelist
Packit 64f477
    trap "$run $rm $removelist; exit 1" 1 2 15
Packit 64f477
Packit 64f477
    # On Cygwin there's no "real" PIC flag so we must build both object types
Packit 64f477
    case $host_os in
Packit 64f477
    cygwin* | mingw* | pw32* | os2*)
Packit 64f477
      pic_mode=default
Packit 64f477
      ;;
Packit 64f477
    esac
Packit 64f477
    if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then
Packit 64f477
      # non-PIC code in shared libraries is not supported
Packit 64f477
      pic_mode=default
Packit 64f477
    fi
Packit 64f477
Packit 64f477
    # Calculate the filename of the output object if compiler does
Packit 64f477
    # not support -o with -c
Packit 64f477
    if test "$compiler_c_o" = no; then
Packit 64f477
      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
Packit 64f477
      lockfile="$output_obj.lock"
Packit 64f477
      removelist="$removelist $output_obj $lockfile"
Packit 64f477
      trap "$run $rm $removelist; exit 1" 1 2 15
Packit 64f477
    else
Packit 64f477
      need_locks=no
Packit 64f477
      lockfile=
Packit 64f477
    fi
Packit 64f477
Packit 64f477
    # Lock this critical section if it is needed
Packit 64f477
    # We use this script file to make the link, it avoids creating a new file
Packit 64f477
    if test "$need_locks" = yes; then
Packit 64f477
      until $run ln "$0" "$lockfile" 2>/dev/null; do
Packit 64f477
	$show "Waiting for $lockfile to be removed"
Packit 64f477
	sleep 2
Packit 64f477
      done
Packit 64f477
    elif test "$need_locks" = warn; then
Packit 64f477
      if test -f "$lockfile"; then
Packit 64f477
	echo "\
Packit 64f477
*** ERROR, $lockfile exists and contains:
Packit 64f477
`cat $lockfile 2>/dev/null`
Packit 64f477
Packit 64f477
This indicates that another process is trying to use the same
Packit 64f477
temporary object file, and libtool could not work around it because
Packit 64f477
your compiler does not support \`-c' and \`-o' together.  If you
Packit 64f477
repeat this compilation, it may succeed, by chance, but you had better
Packit 64f477
avoid parallel builds (make -j) in this platform, or get a better
Packit 64f477
compiler."
Packit 64f477
Packit 64f477
	$run $rm $removelist
Packit 64f477
	exit 1
Packit 64f477
      fi
Packit 64f477
      echo $srcfile > "$lockfile"
Packit 64f477
    fi
Packit 64f477
Packit 64f477
    if test -n "$fix_srcfile_path"; then
Packit 64f477
      eval srcfile=\"$fix_srcfile_path\"
Packit 64f477
    fi
Packit 64f477
Packit 64f477
    # Only build a PIC object if we are building libtool libraries.
Packit 64f477
    if test "$build_libtool_libs" = yes; then
Packit 64f477
      # Without this assignment, base_compile gets emptied.
Packit 64f477
      fbsd_hideous_sh_bug=$base_compile
Packit 64f477
Packit 64f477
      if test "$pic_mode" != no; then
Packit 64f477
	# All platforms use -DPIC, to notify preprocessed assembler code.
Packit 64f477
	command="$base_compile $srcfile $pic_flag -DPIC"
Packit 64f477
      else
Packit 64f477
	# Don't build PIC code
Packit 64f477
	command="$base_compile $srcfile"
Packit 64f477
      fi
Packit 64f477
      if test "$build_old_libs" = yes; then
Packit 64f477
	lo_libobj="$libobj"
Packit 64f477
	dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
Packit 64f477
	if test "X$dir" = "X$libobj"; then
Packit 64f477
	  dir="$objdir"
Packit 64f477
	else
Packit 64f477
	  dir="$dir/$objdir"
Packit 64f477
	fi
Packit 64f477
	libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
Packit 64f477
Packit 64f477
	if test -d "$dir"; then
Packit 64f477
	  $show "$rm $libobj"
Packit 64f477
	  $run $rm $libobj
Packit 64f477
	else
Packit 64f477
	  $show "$mkdir $dir"
Packit 64f477
	  $run $mkdir $dir
Packit 64f477
	  status=$?
Packit 64f477
	  if test $status -ne 0 && test ! -d $dir; then
Packit 64f477
	    exit $status
Packit 64f477
	  fi
Packit 64f477
	fi
Packit 64f477
      fi
Packit 64f477
      if test "$compiler_o_lo" = yes; then
Packit 64f477
	output_obj="$libobj"
Packit 64f477
	command="$command -o $output_obj"
Packit 64f477
      elif test "$compiler_c_o" = yes; then
Packit 64f477
	output_obj="$obj"
Packit 64f477
	command="$command -o $output_obj"
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      $run $rm "$output_obj"
Packit 64f477
      $show "$command"
Packit 64f477
      if $run eval "$command"; then :
Packit 64f477
      else
Packit 64f477
	test -n "$output_obj" && $run $rm $removelist
Packit 64f477
	exit 1
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      if test "$need_locks" = warn &&
Packit 64f477
	 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
Packit 64f477
	echo "\
Packit 64f477
*** ERROR, $lockfile contains:
Packit 64f477
`cat $lockfile 2>/dev/null`
Packit 64f477
Packit 64f477
but it should contain:
Packit 64f477
$srcfile
Packit 64f477
Packit 64f477
This indicates that another process is trying to use the same
Packit 64f477
temporary object file, and libtool could not work around it because
Packit 64f477
your compiler does not support \`-c' and \`-o' together.  If you
Packit 64f477
repeat this compilation, it may succeed, by chance, but you had better
Packit 64f477
avoid parallel builds (make -j) in this platform, or get a better
Packit 64f477
compiler."
Packit 64f477
Packit 64f477
	$run $rm $removelist
Packit 64f477
	exit 1
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      # Just move the object if needed, then go on to compile the next one
Packit 64f477
      if test x"$output_obj" != x"$libobj"; then
Packit 64f477
	$show "$mv $output_obj $libobj"
Packit 64f477
	if $run $mv $output_obj $libobj; then :
Packit 64f477
	else
Packit 64f477
	  error=$?
Packit 64f477
	  $run $rm $removelist
Packit 64f477
	  exit $error
Packit 64f477
	fi
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      # If we have no pic_flag, then copy the object into place and finish.
Packit 64f477
      if (test -z "$pic_flag" || test "$pic_mode" != default) &&
Packit 64f477
	 test "$build_old_libs" = yes; then
Packit 64f477
	# Rename the .lo from within objdir to obj
Packit 64f477
	if test -f $obj; then
Packit 64f477
	  $show $rm $obj
Packit 64f477
	  $run $rm $obj
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	$show "$mv $libobj $obj"
Packit 64f477
	if $run $mv $libobj $obj; then :
Packit 64f477
	else
Packit 64f477
	  error=$?
Packit 64f477
	  $run $rm $removelist
Packit 64f477
	  exit $error
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
Packit 64f477
	if test "X$xdir" = "X$obj"; then
Packit 64f477
	  xdir="."
Packit 64f477
	else
Packit 64f477
	  xdir="$xdir"
Packit 64f477
	fi
Packit 64f477
	baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
Packit 64f477
	libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
Packit 64f477
	# Now arrange that obj and lo_libobj become the same file
Packit 64f477
	$show "(cd $xdir && $LN_S $baseobj $libobj)"
Packit 64f477
	if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
Packit 64f477
	  # Unlock the critical section if it was locked
Packit 64f477
	  if test "$need_locks" != no; then
Packit 64f477
	    $run $rm "$lockfile"
Packit 64f477
	  fi
Packit 64f477
	  exit 0
Packit 64f477
	else
Packit 64f477
	  error=$?
Packit 64f477
	  $run $rm $removelist
Packit 64f477
	  exit $error
Packit 64f477
	fi
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      # Allow error messages only from the first compilation.
Packit 64f477
      suppress_output=' >/dev/null 2>&1'
Packit 64f477
    fi
Packit 64f477
Packit 64f477
    # Only build a position-dependent object if we build old libraries.
Packit 64f477
    if test "$build_old_libs" = yes; then
Packit 64f477
      if test "$pic_mode" != yes; then
Packit 64f477
	# Don't build PIC code
Packit 64f477
	command="$base_compile $srcfile"
Packit 64f477
      else
Packit 64f477
	# All platforms use -DPIC, to notify preprocessed assembler code.
Packit 64f477
	command="$base_compile $srcfile $pic_flag -DPIC"
Packit 64f477
      fi
Packit 64f477
      if test "$compiler_c_o" = yes; then
Packit 64f477
	command="$command -o $obj"
Packit 64f477
	output_obj="$obj"
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      # Suppress compiler output if we already did a PIC compilation.
Packit 64f477
      command="$command$suppress_output"
Packit 64f477
      $run $rm "$output_obj"
Packit 64f477
      $show "$command"
Packit 64f477
      if $run eval "$command"; then :
Packit 64f477
      else
Packit 64f477
	$run $rm $removelist
Packit 64f477
	exit 1
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      if test "$need_locks" = warn &&
Packit 64f477
	 test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
Packit 64f477
	echo "\
Packit 64f477
*** ERROR, $lockfile contains:
Packit 64f477
`cat $lockfile 2>/dev/null`
Packit 64f477
Packit 64f477
but it should contain:
Packit 64f477
$srcfile
Packit 64f477
Packit 64f477
This indicates that another process is trying to use the same
Packit 64f477
temporary object file, and libtool could not work around it because
Packit 64f477
your compiler does not support \`-c' and \`-o' together.  If you
Packit 64f477
repeat this compilation, it may succeed, by chance, but you had better
Packit 64f477
avoid parallel builds (make -j) in this platform, or get a better
Packit 64f477
compiler."
Packit 64f477
Packit 64f477
	$run $rm $removelist
Packit 64f477
	exit 1
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      # Just move the object if needed
Packit 64f477
      if test x"$output_obj" != x"$obj"; then
Packit 64f477
	$show "$mv $output_obj $obj"
Packit 64f477
	if $run $mv $output_obj $obj; then :
Packit 64f477
	else
Packit 64f477
	  error=$?
Packit 64f477
	  $run $rm $removelist
Packit 64f477
	  exit $error
Packit 64f477
	fi
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      # Create an invalid libtool object if no PIC, so that we do not
Packit 64f477
      # accidentally link it into a program.
Packit 64f477
      if test "$build_libtool_libs" != yes; then
Packit 64f477
	$show "echo timestamp > $libobj"
Packit 64f477
	$run eval "echo timestamp > \$libobj" || exit $?
Packit 64f477
      else
Packit 64f477
	# Move the .lo from within objdir
Packit 64f477
	$show "$mv $libobj $lo_libobj"
Packit 64f477
	if $run $mv $libobj $lo_libobj; then :
Packit 64f477
	else
Packit 64f477
	  error=$?
Packit 64f477
	  $run $rm $removelist
Packit 64f477
	  exit $error
Packit 64f477
	fi
Packit 64f477
      fi
Packit 64f477
    fi
Packit 64f477
Packit 64f477
    # Unlock the critical section if it was locked
Packit 64f477
    if test "$need_locks" != no; then
Packit 64f477
      $run $rm "$lockfile"
Packit 64f477
    fi
Packit 64f477
Packit 64f477
    exit 0
Packit 64f477
    ;;
Packit 64f477
Packit 64f477
  # libtool link mode
Packit 64f477
  link | relink)
Packit 64f477
    modename="$modename: link"
Packit 64f477
    case $host in
Packit 64f477
    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
Packit 64f477
      # It is impossible to link a dll without this setting, and
Packit 64f477
      # we shouldn't force the makefile maintainer to figure out
Packit 64f477
      # which system we are compiling for in order to pass an extra
Packit 64f477
      # flag for every libtool invokation.
Packit 64f477
      # allow_undefined=no
Packit 64f477
Packit 64f477
      # FIXME: Unfortunately, there are problems with the above when trying
Packit 64f477
      # to make a dll which has undefined symbols, in which case not
Packit 64f477
      # even a static library is built.  For now, we need to specify
Packit 64f477
      # -no-undefined on the libtool link line when we can be certain
Packit 64f477
      # that all symbols are satisfied, otherwise we get a static library.
Packit 64f477
      allow_undefined=yes
Packit 64f477
      ;;
Packit 64f477
    *)
Packit 64f477
      allow_undefined=yes
Packit 64f477
      ;;
Packit 64f477
    esac
Packit 64f477
    libtool_args="$nonopt"
Packit 64f477
    compile_command="$nonopt"
Packit 64f477
    finalize_command="$nonopt"
Packit 64f477
Packit 64f477
    compile_rpath=
Packit 64f477
    finalize_rpath=
Packit 64f477
    compile_shlibpath=
Packit 64f477
    finalize_shlibpath=
Packit 64f477
    convenience=
Packit 64f477
    old_convenience=
Packit 64f477
    deplibs=
Packit 64f477
    old_deplibs=
Packit 64f477
    compiler_flags=
Packit 64f477
    linker_flags=
Packit 64f477
    dllsearchpath=
Packit 64f477
    lib_search_path=`pwd`
Packit 64f477
Packit 64f477
    avoid_version=no
Packit 64f477
    dlfiles=
Packit 64f477
    dlprefiles=
Packit 64f477
    dlself=no
Packit 64f477
    export_dynamic=no
Packit 64f477
    export_symbols=
Packit 64f477
    export_symbols_regex=
Packit 64f477
    generated=
Packit 64f477
    libobjs=
Packit 64f477
    ltlibs=
Packit 64f477
    module=no
Packit 64f477
    no_install=no
Packit 64f477
    objs=
Packit 64f477
    prefer_static_libs=no
Packit 64f477
    preload=no
Packit 64f477
    prev=
Packit 64f477
    prevarg=
Packit 64f477
    release=
Packit 64f477
    rpath=
Packit 64f477
    xrpath=
Packit 64f477
    perm_rpath=
Packit 64f477
    temp_rpath=
Packit 64f477
    thread_safe=no
Packit 64f477
    vinfo=
Packit 64f477
Packit 64f477
    # We need to know -static, to get the right output filenames.
Packit 64f477
    for arg
Packit 64f477
    do
Packit 64f477
      case $arg in
Packit 64f477
      -all-static | -static)
Packit 64f477
	if test "X$arg" = "X-all-static"; then
Packit 64f477
	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
Packit 64f477
	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
Packit 64f477
	  fi
Packit 64f477
	  if test -n "$link_static_flag"; then
Packit 64f477
	    dlopen_self=$dlopen_self_static
Packit 64f477
	  fi
Packit 64f477
	else
Packit 64f477
	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
Packit 64f477
	    dlopen_self=$dlopen_self_static
Packit 64f477
	  fi
Packit 64f477
	fi
Packit 64f477
	build_libtool_libs=no
Packit 64f477
	build_old_libs=yes
Packit 64f477
	prefer_static_libs=yes
Packit 64f477
	break
Packit 64f477
	;;
Packit 64f477
      esac
Packit 64f477
    done
Packit 64f477
Packit 64f477
    # See if our shared archives depend on static archives.
Packit 64f477
    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
Packit 64f477
Packit 64f477
    # Go through the arguments, transforming them on the way.
Packit 64f477
    while test $# -gt 0; do
Packit 64f477
      arg="$1"
Packit 64f477
      shift
Packit 64f477
      case $arg in
Packit 64f477
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
Packit 64f477
	qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
Packit 64f477
	;;
Packit 64f477
      *) qarg=$arg ;;
Packit 64f477
      esac
Packit 64f477
      libtool_args="$libtool_args $qarg"
Packit 64f477
Packit 64f477
      # If the previous option needs an argument, assign it.
Packit 64f477
      if test -n "$prev"; then
Packit 64f477
	case $prev in
Packit 64f477
	output)
Packit 64f477
	  compile_command="$compile_command @OUTPUT@"
Packit 64f477
	  finalize_command="$finalize_command @OUTPUT@"
Packit 64f477
	  ;;
Packit 64f477
	esac
Packit 64f477
Packit 64f477
	case $prev in
Packit 64f477
	dlfiles|dlprefiles)
Packit 64f477
	  if test "$preload" = no; then
Packit 64f477
	    # Add the symbol object into the linking commands.
Packit 64f477
	    compile_command="$compile_command @SYMFILE@"
Packit 64f477
	    finalize_command="$finalize_command @SYMFILE@"
Packit 64f477
	    preload=yes
Packit 64f477
	  fi
Packit 64f477
	  case $arg in
Packit 64f477
	  *.la | *.lo) ;;  # We handle these cases below.
Packit 64f477
	  force)
Packit 64f477
	    if test "$dlself" = no; then
Packit 64f477
	      dlself=needless
Packit 64f477
	      export_dynamic=yes
Packit 64f477
	    fi
Packit 64f477
	    prev=
Packit 64f477
	    continue
Packit 64f477
	    ;;
Packit 64f477
	  self)
Packit 64f477
	    if test "$prev" = dlprefiles; then
Packit 64f477
	      dlself=yes
Packit 64f477
	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
Packit 64f477
	      dlself=yes
Packit 64f477
	    else
Packit 64f477
	      dlself=needless
Packit 64f477
	      export_dynamic=yes
Packit 64f477
	    fi
Packit 64f477
	    prev=
Packit 64f477
	    continue
Packit 64f477
	    ;;
Packit 64f477
	  *)
Packit 64f477
	    if test "$prev" = dlfiles; then
Packit 64f477
	      dlfiles="$dlfiles $arg"
Packit 64f477
	    else
Packit 64f477
	      dlprefiles="$dlprefiles $arg"
Packit 64f477
	    fi
Packit 64f477
	    prev=
Packit 64f477
	    continue
Packit 64f477
	    ;;
Packit 64f477
	  esac
Packit 64f477
	  ;;
Packit 64f477
	expsyms)
Packit 64f477
	  export_symbols="$arg"
Packit 64f477
	  if test ! -f "$arg"; then
Packit 64f477
	    $echo "$modename: symbol file \`$arg' does not exist"
Packit 64f477
	    exit 1
Packit 64f477
	  fi
Packit 64f477
	  prev=
Packit 64f477
	  continue
Packit 64f477
	  ;;
Packit 64f477
	expsyms_regex)
Packit 64f477
	  export_symbols_regex="$arg"
Packit 64f477
	  prev=
Packit 64f477
	  continue
Packit 64f477
	  ;;
Packit 64f477
	release)
Packit 64f477
	  release="-$arg"
Packit 64f477
	  prev=
Packit 64f477
	  continue
Packit 64f477
	  ;;
Packit 64f477
	rpath | xrpath)
Packit 64f477
	  # We need an absolute path.
Packit 64f477
	  case $arg in
Packit 64f477
	  [\\/]* | [A-Za-z]:[\\/]*) ;;
Packit 64f477
	  *)
Packit 64f477
	    $echo "$modename: only absolute run-paths are allowed" 1>&2
Packit 64f477
	    exit 1
Packit 64f477
	    ;;
Packit 64f477
	  esac
Packit 64f477
	  if test "$prev" = rpath; then
Packit 64f477
	    case "$rpath " in
Packit 64f477
	    *" $arg "*) ;;
Packit 64f477
	    *) rpath="$rpath $arg" ;;
Packit 64f477
	    esac
Packit 64f477
	  else
Packit 64f477
	    case "$xrpath " in
Packit 64f477
	    *" $arg "*) ;;
Packit 64f477
	    *) xrpath="$xrpath $arg" ;;
Packit 64f477
	    esac
Packit 64f477
	  fi
Packit 64f477
	  prev=
Packit 64f477
	  continue
Packit 64f477
	  ;;
Packit 64f477
	xcompiler)
Packit 64f477
	  compiler_flags="$compiler_flags $qarg"
Packit 64f477
	  prev=
Packit 64f477
	  compile_command="$compile_command $qarg"
Packit 64f477
	  finalize_command="$finalize_command $qarg"
Packit 64f477
	  continue
Packit 64f477
	  ;;
Packit 64f477
	xlinker)
Packit 64f477
	  linker_flags="$linker_flags $qarg"
Packit 64f477
	  compiler_flags="$compiler_flags $wl$qarg"
Packit 64f477
	  prev=
Packit 64f477
	  compile_command="$compile_command $wl$qarg"
Packit 64f477
	  finalize_command="$finalize_command $wl$qarg"
Packit 64f477
	  continue
Packit 64f477
	  ;;
Packit 64f477
	*)
Packit 64f477
	  eval "$prev=\"\$arg\""
Packit 64f477
	  prev=
Packit 64f477
	  continue
Packit 64f477
	  ;;
Packit 64f477
	esac
Packit 64f477
      fi # test -n $prev
Packit 64f477
Packit 64f477
      prevarg="$arg"
Packit 64f477
Packit 64f477
      case $arg in
Packit 64f477
      -all-static)
Packit 64f477
	if test -n "$link_static_flag"; then
Packit 64f477
	  compile_command="$compile_command $link_static_flag"
Packit 64f477
	  finalize_command="$finalize_command $link_static_flag"
Packit 64f477
	fi
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -allow-undefined)
Packit 64f477
	# FIXME: remove this flag sometime in the future.
Packit 64f477
	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -avoid-version)
Packit 64f477
	avoid_version=yes
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -dlopen)
Packit 64f477
	prev=dlfiles
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -dlpreopen)
Packit 64f477
	prev=dlprefiles
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -export-dynamic)
Packit 64f477
	export_dynamic=yes
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -export-symbols | -export-symbols-regex)
Packit 64f477
	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
Packit 64f477
	  $echo "$modename: more than one -exported-symbols argument is not allowed"
Packit 64f477
	  exit 1
Packit 64f477
	fi
Packit 64f477
	if test "X$arg" = "X-export-symbols"; then
Packit 64f477
	  prev=expsyms
Packit 64f477
	else
Packit 64f477
	  prev=expsyms_regex
Packit 64f477
	fi
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
Packit 64f477
      # so, if we see these flags be careful not to treat them like -L
Packit 64f477
      -L[A-Z][A-Z]*:*)
Packit 64f477
	case $with_gcc/$host in
Packit 64f477
	no/*-*-irix* | no/*-*-nonstopux*)
Packit 64f477
	  compile_command="$compile_command $arg"
Packit 64f477
	  finalize_command="$finalize_command $arg"
Packit 64f477
	  ;;
Packit 64f477
	esac
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -L*)
Packit 64f477
	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
Packit 64f477
	# We need an absolute path.
Packit 64f477
	case $dir in
Packit 64f477
	[\\/]* | [A-Za-z]:[\\/]*) ;;
Packit 64f477
	*)
Packit 64f477
	  absdir=`cd "$dir" && pwd`
Packit 64f477
	  if test -z "$absdir"; then
Packit 64f477
	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
Packit 64f477
	    exit 1
Packit 64f477
	  fi
Packit 64f477
	  dir="$absdir"
Packit 64f477
	  ;;
Packit 64f477
	esac
Packit 64f477
	case "$deplibs " in
Packit 64f477
	*" -L$dir "*) ;;
Packit 64f477
	*)
Packit 64f477
	  deplibs="$deplibs -L$dir"
Packit 64f477
	  lib_search_path="$lib_search_path $dir"
Packit 64f477
	  ;;
Packit 64f477
	esac
Packit 64f477
	case $host in
Packit 64f477
	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
Packit 64f477
	  case :$dllsearchpath: in
Packit 64f477
	  *":$dir:"*) ;;
Packit 64f477
	  *) dllsearchpath="$dllsearchpath:$dir";;
Packit 64f477
	  esac
Packit 64f477
	  ;;
Packit 64f477
	esac
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -l*)
Packit 64f477
	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
Packit 64f477
	  case $host in
Packit 64f477
	  *-*-cygwin* | *-*-pw32* | *-*-beos*)
Packit 64f477
	    # These systems don't actually have a C or math library (as such)
Packit 64f477
	    continue
Packit 64f477
	    ;;
Packit 64f477
	  *-*-mingw* | *-*-os2*)
Packit 64f477
	    # These systems don't actually have a C library (as such)
Packit 64f477
	    test "X$arg" = "X-lc" && continue
Packit 64f477
	    ;;
Packit 64f477
	  *-*-openbsd* | *-*-freebsd*)
Packit 64f477
	    # Do not include libc due to us having libc/libc_r.
Packit 64f477
	    test "X$arg" = "X-lc" && continue
Packit 64f477
	    ;;
Packit 64f477
	  esac
Packit 64f477
	 elif test "X$arg" = "X-lc_r"; then
Packit 64f477
	  case $host in
Packit 64f477
	 *-*-openbsd* | *-*-freebsd*)
Packit 64f477
	    # Do not include libc_r directly, use -pthread flag.
Packit 64f477
	    continue
Packit 64f477
	    ;;
Packit 64f477
	  esac
Packit 64f477
	fi
Packit 64f477
	deplibs="$deplibs $arg"
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -module)
Packit 64f477
	module=yes
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -no-fast-install)
Packit 64f477
	fast_install=no
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -no-install)
Packit 64f477
	case $host in
Packit 64f477
	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
Packit 64f477
	  # The PATH hackery in wrapper scripts is required on Windows
Packit 64f477
	  # in order for the loader to find any dlls it needs.
Packit 64f477
	  $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
Packit 64f477
	  $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
Packit 64f477
	  fast_install=no
Packit 64f477
	  ;;
Packit 64f477
	*) no_install=yes ;;
Packit 64f477
	esac
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -no-undefined)
Packit 64f477
	allow_undefined=no
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -o) prev=output ;;
Packit 64f477
Packit 64f477
      -release)
Packit 64f477
	prev=release
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -rpath)
Packit 64f477
	prev=rpath
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -R)
Packit 64f477
	prev=xrpath
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -R*)
Packit 64f477
	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
Packit 64f477
	# We need an absolute path.
Packit 64f477
	case $dir in
Packit 64f477
	[\\/]* | [A-Za-z]:[\\/]*) ;;
Packit 64f477
	*)
Packit 64f477
	  $echo "$modename: only absolute run-paths are allowed" 1>&2
Packit 64f477
	  exit 1
Packit 64f477
	  ;;
Packit 64f477
	esac
Packit 64f477
	case "$xrpath " in
Packit 64f477
	*" $dir "*) ;;
Packit 64f477
	*) xrpath="$xrpath $dir" ;;
Packit 64f477
	esac
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -static)
Packit 64f477
	# The effects of -static are defined in a previous loop.
Packit 64f477
	# We used to do the same as -all-static on platforms that
Packit 64f477
	# didn't have a PIC flag, but the assumption that the effects
Packit 64f477
	# would be equivalent was wrong.  It would break on at least
Packit 64f477
	# Digital Unix and AIX.
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -thread-safe)
Packit 64f477
	thread_safe=yes
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -version-info)
Packit 64f477
	prev=vinfo
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -Wc,*)
Packit 64f477
	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
Packit 64f477
	arg=
Packit 64f477
	save_ifs="$IFS"; IFS=','
Packit 64f477
	for flag in $args; do
Packit 64f477
	  IFS="$save_ifs"
Packit 64f477
	  case $flag in
Packit 64f477
	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
Packit 64f477
	    flag="\"$flag\""
Packit 64f477
	    ;;
Packit 64f477
	  esac
Packit 64f477
	  arg="$arg $wl$flag"
Packit 64f477
	  compiler_flags="$compiler_flags $flag"
Packit 64f477
	done
Packit 64f477
	IFS="$save_ifs"
Packit 64f477
	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -Wl,*)
Packit 64f477
	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
Packit 64f477
	arg=
Packit 64f477
	save_ifs="$IFS"; IFS=','
Packit 64f477
	for flag in $args; do
Packit 64f477
	  IFS="$save_ifs"
Packit 64f477
	  case $flag in
Packit 64f477
	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
Packit 64f477
	    flag="\"$flag\""
Packit 64f477
	    ;;
Packit 64f477
	  esac
Packit 64f477
	  arg="$arg $wl$flag"
Packit 64f477
	  compiler_flags="$compiler_flags $wl$flag"
Packit 64f477
	  linker_flags="$linker_flags $flag"
Packit 64f477
	done
Packit 64f477
	IFS="$save_ifs"
Packit 64f477
	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -Xcompiler)
Packit 64f477
	prev=xcompiler
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      -Xlinker)
Packit 64f477
	prev=xlinker
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      # Some other compiler flag.
Packit 64f477
      -* | +*)
Packit 64f477
	# Unknown arguments in both finalize_command and compile_command need
Packit 64f477
	# to be aesthetically quoted because they are evaled later.
Packit 64f477
	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
Packit 64f477
	case $arg in
Packit 64f477
	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
Packit 64f477
	  arg="\"$arg\""
Packit 64f477
	  ;;
Packit 64f477
	esac
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      *.lo | *.$objext)
Packit 64f477
	# A library or standard object.
Packit 64f477
	if test "$prev" = dlfiles; then
Packit 64f477
	  # This file was specified with -dlopen.
Packit 64f477
	  if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
Packit 64f477
	    dlfiles="$dlfiles $arg"
Packit 64f477
	    prev=
Packit 64f477
	    continue
Packit 64f477
	  else
Packit 64f477
	    # If libtool objects are unsupported, then we need to preload.
Packit 64f477
	    prev=dlprefiles
Packit 64f477
	  fi
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	if test "$prev" = dlprefiles; then
Packit 64f477
	  # Preload the old-style object.
Packit 64f477
	  dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
Packit 64f477
	  prev=
Packit 64f477
	else
Packit 64f477
	  case $arg in
Packit 64f477
	  *.lo) libobjs="$libobjs $arg" ;;
Packit 64f477
	  *) objs="$objs $arg" ;;
Packit 64f477
	  esac
Packit 64f477
	fi
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      *.$libext)
Packit 64f477
	# An archive.
Packit 64f477
	deplibs="$deplibs $arg"
Packit 64f477
	old_deplibs="$old_deplibs $arg"
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      *.la)
Packit 64f477
	# A libtool-controlled library.
Packit 64f477
Packit 64f477
	if test "$prev" = dlfiles; then
Packit 64f477
	  # This library was specified with -dlopen.
Packit 64f477
	  dlfiles="$dlfiles $arg"
Packit 64f477
	  prev=
Packit 64f477
	elif test "$prev" = dlprefiles; then
Packit 64f477
	  # The library was specified with -dlpreopen.
Packit 64f477
	  dlprefiles="$dlprefiles $arg"
Packit 64f477
	  prev=
Packit 64f477
	else
Packit 64f477
	  deplibs="$deplibs $arg"
Packit 64f477
	fi
Packit 64f477
	continue
Packit 64f477
	;;
Packit 64f477
Packit 64f477
      # Some other compiler argument.
Packit 64f477
      *)
Packit 64f477
	# Unknown arguments in both finalize_command and compile_command need
Packit 64f477
	# to be aesthetically quoted because they are evaled later.
Packit 64f477
	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
Packit 64f477
	case $arg in
Packit 64f477
	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
Packit 64f477
	  arg="\"$arg\""
Packit 64f477
	  ;;
Packit 64f477
	esac
Packit 64f477
	;;
Packit 64f477
      esac # arg
Packit 64f477
Packit 64f477
      # Now actually substitute the argument into the commands.
Packit 64f477
      if test -n "$arg"; then
Packit 64f477
	compile_command="$compile_command $arg"
Packit 64f477
	finalize_command="$finalize_command $arg"
Packit 64f477
      fi
Packit 64f477
    done # argument parsing loop
Packit 64f477
Packit 64f477
    if test -n "$prev"; then
Packit 64f477
      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
Packit 64f477
      $echo "$help" 1>&2
Packit 64f477
      exit 1
Packit 64f477
    fi
Packit 64f477
Packit 64f477
    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
Packit 64f477
      eval arg=\"$export_dynamic_flag_spec\"
Packit 64f477
      compile_command="$compile_command $arg"
Packit 64f477
      finalize_command="$finalize_command $arg"
Packit 64f477
    fi
Packit 64f477
Packit 64f477
    # calculate the name of the file, without its directory
Packit 64f477
    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
Packit 64f477
    libobjs_save="$libobjs"
Packit 64f477
Packit 64f477
    if test -n "$shlibpath_var"; then
Packit 64f477
      # get the directories listed in $shlibpath_var
Packit 64f477
      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
Packit 64f477
    else
Packit 64f477
      shlib_search_path=
Packit 64f477
    fi
Packit 64f477
    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
Packit 64f477
    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
Packit 64f477
Packit 64f477
    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
Packit 64f477
    if test "X$output_objdir" = "X$output"; then
Packit 64f477
      output_objdir="$objdir"
Packit 64f477
    else
Packit 64f477
      output_objdir="$output_objdir/$objdir"
Packit 64f477
    fi
Packit 64f477
    # Create the object directory.
Packit 64f477
    if test ! -d $output_objdir; then
Packit 64f477
      $show "$mkdir $output_objdir"
Packit 64f477
      $run $mkdir $output_objdir
Packit 64f477
      status=$?
Packit 64f477
      if test $status -ne 0 && test ! -d $output_objdir; then
Packit 64f477
	exit $status
Packit 64f477
      fi
Packit 64f477
    fi
Packit 64f477
Packit 64f477
    # Determine the type of output
Packit 64f477
    case $output in
Packit 64f477
    "")
Packit 64f477
      $echo "$modename: you must specify an output file" 1>&2
Packit 64f477
      $echo "$help" 1>&2
Packit 64f477
      exit 1
Packit 64f477
      ;;
Packit 64f477
    *.$libext) linkmode=oldlib ;;
Packit 64f477
    *.lo | *.$objext) linkmode=obj ;;
Packit 64f477
    *.la) linkmode=lib ;;
Packit 64f477
    *) linkmode=prog ;; # Anything else should be a program.
Packit 64f477
    esac
Packit 64f477
Packit 64f477
    specialdeplibs=
Packit 64f477
    libs=
Packit 64f477
    # Find all interdependent deplibs by searching for libraries
Packit 64f477
    # that are linked more than once (e.g. -la -lb -la)
Packit 64f477
    for deplib in $deplibs; do
Packit 64f477
      if test "X$duplicate_deps" = "Xyes" ; then
Packit 64f477
	case "$libs " in
Packit 64f477
	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
Packit 64f477
	esac
Packit 64f477
      fi
Packit 64f477
      libs="$libs $deplib"
Packit 64f477
    done
Packit 64f477
    deplibs=
Packit 64f477
    newdependency_libs=
Packit 64f477
    newlib_search_path=
Packit 64f477
    need_relink=no # whether we're linking any uninstalled libtool libraries
Packit 64f477
    notinst_deplibs= # not-installed libtool libraries
Packit 64f477
    notinst_path= # paths that contain not-installed libtool libraries
Packit 64f477
    case $linkmode in
Packit 64f477
    lib)
Packit 64f477
	passes="conv link"
Packit 64f477
	for file in $dlfiles $dlprefiles; do
Packit 64f477
	  case $file in
Packit 64f477
	  *.la) ;;
Packit 64f477
	  *)
Packit 64f477
	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
Packit 64f477
	    exit 1
Packit 64f477
	    ;;
Packit 64f477
	  esac
Packit 64f477
	done
Packit 64f477
	;;
Packit 64f477
    prog)
Packit 64f477
	compile_deplibs=
Packit 64f477
	finalize_deplibs=
Packit 64f477
	alldeplibs=no
Packit 64f477
	newdlfiles=
Packit 64f477
	newdlprefiles=
Packit 64f477
	passes="conv scan dlopen dlpreopen link"
Packit 64f477
	;;
Packit 64f477
    *)  passes="conv"
Packit 64f477
	;;
Packit 64f477
    esac
Packit 64f477
    for pass in $passes; do
Packit 64f477
      if test $linkmode = prog; then
Packit 64f477
	# Determine which files to process
Packit 64f477
	case $pass in
Packit 64f477
	dlopen)
Packit 64f477
	  libs="$dlfiles"
Packit 64f477
	  save_deplibs="$deplibs" # Collect dlpreopened libraries
Packit 64f477
	  deplibs=
Packit 64f477
	  ;;
Packit 64f477
	dlpreopen) libs="$dlprefiles" ;;
Packit 64f477
	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
Packit 64f477
	esac
Packit 64f477
      fi
Packit 64f477
      for deplib in $libs; do
Packit 64f477
	lib=
Packit 64f477
	found=no
Packit 64f477
	case $deplib in
Packit 64f477
	-l*)
Packit 64f477
	  if test $linkmode = oldlib && test $linkmode = obj; then
Packit 64f477
	    $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2
Packit 64f477
	    continue
Packit 64f477
	  fi
Packit 64f477
	  if test $pass = conv; then
Packit 64f477
	    deplibs="$deplib $deplibs"
Packit 64f477
	    continue
Packit 64f477
	  fi
Packit 64f477
	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
Packit 64f477
	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
Packit 64f477
	    # Search the libtool library
Packit 64f477
	    lib="$searchdir/lib${name}.la"
Packit 64f477
	    if test -f "$lib"; then
Packit 64f477
	      found=yes
Packit 64f477
	      break
Packit 64f477
	    fi
Packit 64f477
	  done
Packit 64f477
	  if test "$found" != yes; then
Packit 64f477
	    # deplib doesn't seem to be a libtool library
Packit 64f477
	    if test "$linkmode,$pass" = "prog,link"; then
Packit 64f477
	      compile_deplibs="$deplib $compile_deplibs"
Packit 64f477
	      finalize_deplibs="$deplib $finalize_deplibs"
Packit 64f477
	    else
Packit 64f477
	      deplibs="$deplib $deplibs"
Packit 64f477
	      test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs"
Packit 64f477
	    fi
Packit 64f477
	    continue
Packit 64f477
	  fi
Packit 64f477
	  ;; # -l
Packit 64f477
	-L*)
Packit 64f477
	  case $linkmode in
Packit 64f477
	  lib)
Packit 64f477
	    deplibs="$deplib $deplibs"
Packit 64f477
	    test $pass = conv && continue
Packit 64f477
	    newdependency_libs="$deplib $newdependency_libs"
Packit 64f477
	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
Packit 64f477
	    ;;
Packit 64f477
	  prog)
Packit 64f477
	    if test $pass = conv; then
Packit 64f477
	      deplibs="$deplib $deplibs"
Packit 64f477
	      continue
Packit 64f477
	    fi
Packit 64f477
	    if test $pass = scan; then
Packit 64f477
	      deplibs="$deplib $deplibs"
Packit 64f477
	      newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
Packit 64f477
	    else
Packit 64f477
	      compile_deplibs="$deplib $compile_deplibs"
Packit 64f477
	      finalize_deplibs="$deplib $finalize_deplibs"
Packit 64f477
	    fi
Packit 64f477
	    ;;
Packit 64f477
	  *)
Packit 64f477
	    $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2
Packit 64f477
	    ;;
Packit 64f477
	  esac # linkmode
Packit 64f477
	  continue
Packit 64f477
	  ;; # -L
Packit 64f477
	-R*)
Packit 64f477
	  if test $pass = link; then
Packit 64f477
	    dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
Packit 64f477
	    # Make sure the xrpath contains only unique directories.
Packit 64f477
	    case "$xrpath " in
Packit 64f477
	    *" $dir "*) ;;
Packit 64f477
	    *) xrpath="$xrpath $dir" ;;
Packit 64f477
	    esac
Packit 64f477
	  fi
Packit 64f477
	  deplibs="$deplib $deplibs"
Packit 64f477
	  continue
Packit 64f477
	  ;;
Packit 64f477
	*.la) lib="$deplib" ;;
Packit 64f477
	*.$libext)
Packit 64f477
	  if test $pass = conv; then
Packit 64f477
	    deplibs="$deplib $deplibs"
Packit 64f477
	    continue
Packit 64f477
	  fi
Packit 64f477
	  case $linkmode in
Packit 64f477
	  lib)
Packit 64f477
	    if test "$deplibs_check_method" != pass_all; then
Packit 64f477
	      echo
Packit 64f477
	      echo "*** Warning: Trying to link with static lib archive $deplib."
Packit 64f477
	      echo "*** I have the capability to make that library automatically link in when"
Packit 64f477
	      echo "*** you link to this library.  But I can only do this if you have a"
Packit 64f477
	      echo "*** shared version of the library, which you do not appear to have"
Packit 64f477
	      echo "*** because the file extensions .$libext of this argument makes me believe"
Packit 64f477
	      echo "*** that it is just a static archive that I should not used here."
Packit 64f477
	    else
Packit 64f477
	      echo
Packit 64f477
	      echo "*** Warning: Linking the shared library $output against the"
Packit 64f477
	      echo "*** static library $deplib is not portable!"
Packit 64f477
	      deplibs="$deplib $deplibs"
Packit 64f477
	    fi
Packit 64f477
	    continue
Packit 64f477
	    ;;
Packit 64f477
	  prog)
Packit 64f477
	    if test $pass != link; then
Packit 64f477
	      deplibs="$deplib $deplibs"
Packit 64f477
	    else
Packit 64f477
	      compile_deplibs="$deplib $compile_deplibs"
Packit 64f477
	      finalize_deplibs="$deplib $finalize_deplibs"
Packit 64f477
	    fi
Packit 64f477
	    continue
Packit 64f477
	    ;;
Packit 64f477
	  esac # linkmode
Packit 64f477
	  ;; # *.$libext
Packit 64f477
	*.lo | *.$objext)
Packit 64f477
	  if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
Packit 64f477
	    # If there is no dlopen support or we're linking statically,
Packit 64f477
	    # we need to preload.
Packit 64f477
	    newdlprefiles="$newdlprefiles $deplib"
Packit 64f477
	    compile_deplibs="$deplib $compile_deplibs"
Packit 64f477
	    finalize_deplibs="$deplib $finalize_deplibs"
Packit 64f477
	  else
Packit 64f477
	    newdlfiles="$newdlfiles $deplib"
Packit 64f477
	  fi
Packit 64f477
	  continue
Packit 64f477
	  ;;
Packit 64f477
	%DEPLIBS%)
Packit 64f477
	  alldeplibs=yes
Packit 64f477
	  continue
Packit 64f477
	  ;;
Packit 64f477
	esac # case $deplib
Packit 64f477
	if test $found = yes || test -f "$lib"; then :
Packit 64f477
	else
Packit 64f477
	  $echo "$modename: cannot find the library \`$lib'" 1>&2
Packit 64f477
	  exit 1
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	# Check to see that this really is a libtool archive.
Packit 64f477
	if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
Packit 64f477
	else
Packit 64f477
	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
Packit 64f477
	  exit 1
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
Packit 64f477
	test "X$ladir" = "X$lib" && ladir="."
Packit 64f477
Packit 64f477
	dlname=
Packit 64f477
	dlopen=
Packit 64f477
	dlpreopen=
Packit 64f477
	libdir=
Packit 64f477
	library_names=
Packit 64f477
	old_library=
Packit 64f477
	# If the library was installed with an old release of libtool,
Packit 64f477
	# it will not redefine variable installed.
Packit 64f477
	installed=yes
Packit 64f477
Packit 64f477
	# Read the .la file
Packit 64f477
	case $lib in
Packit 64f477
	*/* | *\\*) . $lib ;;
Packit 64f477
	*) . ./$lib ;;
Packit 64f477
	esac
Packit 64f477
Packit 64f477
	if test "$linkmode,$pass" = "lib,link" ||
Packit 64f477
	   test "$linkmode,$pass" = "prog,scan" ||
Packit 64f477
	   { test $linkmode = oldlib && test $linkmode = obj; }; then
Packit 64f477
	   # Add dl[pre]opened files of deplib
Packit 64f477
	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
Packit 64f477
	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	if test $pass = conv; then
Packit 64f477
	  # Only check for convenience libraries
Packit 64f477
	  deplibs="$lib $deplibs"
Packit 64f477
	  if test -z "$libdir"; then
Packit 64f477
	    if test -z "$old_library"; then
Packit 64f477
	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
Packit 64f477
	      exit 1
Packit 64f477
	    fi
Packit 64f477
	    # It is a libtool convenience library, so add in its objects.
Packit 64f477
	    convenience="$convenience $ladir/$objdir/$old_library"
Packit 64f477
	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
Packit 64f477
	    tmp_libs=
Packit 64f477
	    for deplib in $dependency_libs; do
Packit 64f477
	      deplibs="$deplib $deplibs"
Packit 64f477
              if test "X$duplicate_deps" = "Xyes" ; then
Packit 64f477
	        case "$tmp_libs " in
Packit 64f477
	        *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
Packit 64f477
	        esac
Packit 64f477
              fi
Packit 64f477
	      tmp_libs="$tmp_libs $deplib"
Packit 64f477
	    done
Packit 64f477
	  elif test $linkmode != prog && test $linkmode != lib; then
Packit 64f477
	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
Packit 64f477
	    exit 1
Packit 64f477
	  fi
Packit 64f477
	  continue
Packit 64f477
	fi # $pass = conv
Packit 64f477
Packit 64f477
	# Get the name of the library we link against.
Packit 64f477
	linklib=
Packit 64f477
	for l in $old_library $library_names; do
Packit 64f477
	  linklib="$l"
Packit 64f477
	done
Packit 64f477
	if test -z "$linklib"; then
Packit 64f477
	  $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
Packit 64f477
	  exit 1
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	# This library was specified with -dlopen.
Packit 64f477
	if test $pass = dlopen; then
Packit 64f477
	  if test -z "$libdir"; then
Packit 64f477
	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
Packit 64f477
	    exit 1
Packit 64f477
	  fi
Packit 64f477
	  if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
Packit 64f477
	    # If there is no dlname, no dlopen support or we're linking
Packit 64f477
	    # statically, we need to preload.
Packit 64f477
	    dlprefiles="$dlprefiles $lib"
Packit 64f477
	  else
Packit 64f477
	    newdlfiles="$newdlfiles $lib"
Packit 64f477
	  fi
Packit 64f477
	  continue
Packit 64f477
	fi # $pass = dlopen
Packit 64f477
Packit 64f477
	# We need an absolute path.
Packit 64f477
	case $ladir in
Packit 64f477
	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
Packit 64f477
	*)
Packit 64f477
	  abs_ladir=`cd "$ladir" && pwd`
Packit 64f477
	  if test -z "$abs_ladir"; then
Packit 64f477
	    $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
Packit 64f477
	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
Packit 64f477
	    abs_ladir="$ladir"
Packit 64f477
	  fi
Packit 64f477
	  ;;
Packit 64f477
	esac
Packit 64f477
	laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
Packit 64f477
Packit 64f477
	# Find the relevant object directory and library name.
Packit 64f477
	if test "X$installed" = Xyes; then
Packit 64f477
	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
Packit 64f477
	    $echo "$modename: warning: library \`$lib' was moved." 1>&2
Packit 64f477
	    dir="$ladir"
Packit 64f477
	    absdir="$abs_ladir"
Packit 64f477
	    libdir="$abs_ladir"
Packit 64f477
	  else
Packit 64f477
	    dir="$libdir"
Packit 64f477
	    absdir="$libdir"
Packit 64f477
	  fi
Packit 64f477
	else
Packit 64f477
	  dir="$ladir/$objdir"
Packit 64f477
	  absdir="$abs_ladir/$objdir"
Packit 64f477
	  # Remove this search path later
Packit 64f477
	  notinst_path="$notinst_path $abs_ladir"
Packit 64f477
	fi # $installed = yes
Packit 64f477
	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
Packit 64f477
Packit 64f477
	# This library was specified with -dlpreopen.
Packit 64f477
	if test $pass = dlpreopen; then
Packit 64f477
	  if test -z "$libdir"; then
Packit 64f477
	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
Packit 64f477
	    exit 1
Packit 64f477
	  fi
Packit 64f477
	  # Prefer using a static library (so that no silly _DYNAMIC symbols
Packit 64f477
	  # are required to link).
Packit 64f477
	  if test -n "$old_library"; then
Packit 64f477
	    newdlprefiles="$newdlprefiles $dir/$old_library"
Packit 64f477
	  # Otherwise, use the dlname, so that lt_dlopen finds it.
Packit 64f477
	  elif test -n "$dlname"; then
Packit 64f477
	    newdlprefiles="$newdlprefiles $dir/$dlname"
Packit 64f477
	  else
Packit 64f477
	    newdlprefiles="$newdlprefiles $dir/$linklib"
Packit 64f477
	  fi
Packit 64f477
	fi # $pass = dlpreopen
Packit 64f477
Packit 64f477
	if test -z "$libdir"; then
Packit 64f477
	  # Link the convenience library
Packit 64f477
	  if test $linkmode = lib; then
Packit 64f477
	    deplibs="$dir/$old_library $deplibs"
Packit 64f477
	  elif test "$linkmode,$pass" = "prog,link"; then
Packit 64f477
	    compile_deplibs="$dir/$old_library $compile_deplibs"
Packit 64f477
	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
Packit 64f477
	  else
Packit 64f477
	    deplibs="$lib $deplibs"
Packit 64f477
	  fi
Packit 64f477
	  continue
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	if test $linkmode = prog && test $pass != link; then
Packit 64f477
	  newlib_search_path="$newlib_search_path $ladir"
Packit 64f477
	  deplibs="$lib $deplibs"
Packit 64f477
Packit 64f477
	  linkalldeplibs=no
Packit 64f477
	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
Packit 64f477
	     test "$build_libtool_libs" = no; then
Packit 64f477
	    linkalldeplibs=yes
Packit 64f477
	  fi
Packit 64f477
Packit 64f477
	  tmp_libs=
Packit 64f477
	  for deplib in $dependency_libs; do
Packit 64f477
	    case $deplib in
Packit 64f477
	    -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
Packit 64f477
	    esac
Packit 64f477
	    # Need to link against all dependency_libs?
Packit 64f477
	    if test $linkalldeplibs = yes; then
Packit 64f477
	      deplibs="$deplib $deplibs"
Packit 64f477
	    else
Packit 64f477
	      # Need to hardcode shared library paths
Packit 64f477
	      # or/and link against static libraries
Packit 64f477
	      newdependency_libs="$deplib $newdependency_libs"
Packit 64f477
	    fi
Packit 64f477
	    if test "X$duplicate_deps" = "Xyes" ; then
Packit 64f477
	      case "$tmp_libs " in
Packit 64f477
	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
Packit 64f477
	      esac
Packit 64f477
	    fi
Packit 64f477
	    tmp_libs="$tmp_libs $deplib"
Packit 64f477
	  done # for deplib
Packit 64f477
	  continue
Packit 64f477
	fi # $linkmode = prog...
Packit 64f477
Packit 64f477
	link_static=no # Whether the deplib will be linked statically
Packit 64f477
	if test -n "$library_names" &&
Packit 64f477
	   { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
Packit 64f477
	  # Link against this shared library
Packit 64f477
Packit 64f477
	  if test "$linkmode,$pass" = "prog,link" ||
Packit 64f477
	   { test $linkmode = lib && test $hardcode_into_libs = yes; }; then
Packit 64f477
	    # Hardcode the library path.
Packit 64f477
	    # Skip directories that are in the system default run-time
Packit 64f477
	    # search path.
Packit 64f477
	    case " $sys_lib_dlsearch_path " in
Packit 64f477
	    *" $absdir "*) ;;
Packit 64f477
	    *)
Packit 64f477
	      case "$compile_rpath " in
Packit 64f477
	      *" $absdir "*) ;;
Packit 64f477
	      *) compile_rpath="$compile_rpath $absdir"
Packit 64f477
	      esac
Packit 64f477
	      ;;
Packit 64f477
	    esac
Packit 64f477
	    case " $sys_lib_dlsearch_path " in
Packit 64f477
	    *" $libdir "*) ;;
Packit 64f477
	    *)
Packit 64f477
	      case "$finalize_rpath " in
Packit 64f477
	      *" $libdir "*) ;;
Packit 64f477
	      *) finalize_rpath="$finalize_rpath $libdir"
Packit 64f477
	      esac
Packit 64f477
	      ;;
Packit 64f477
	    esac
Packit 64f477
	    if test $linkmode = prog; then
Packit 64f477
	      # We need to hardcode the library path
Packit 64f477
	      if test -n "$shlibpath_var"; then
Packit 64f477
		# Make sure the rpath contains only unique directories.
Packit 64f477
		case "$temp_rpath " in
Packit 64f477
		*" $dir "*) ;;
Packit 64f477
		*" $absdir "*) ;;
Packit 64f477
		*) temp_rpath="$temp_rpath $dir" ;;
Packit 64f477
		esac
Packit 64f477
	      fi
Packit 64f477
	    fi
Packit 64f477
	  fi # $linkmode,$pass = prog,link...
Packit 64f477
Packit 64f477
	  if test "$alldeplibs" = yes &&
Packit 64f477
	     { test "$deplibs_check_method" = pass_all ||
Packit 64f477
	       { test "$build_libtool_libs" = yes &&
Packit 64f477
		 test -n "$library_names"; }; }; then
Packit 64f477
	    # We only need to search for static libraries
Packit 64f477
	    continue
Packit 64f477
	  fi
Packit 64f477
Packit 64f477
	  if test "$installed" = no; then
Packit 64f477
	    notinst_deplibs="$notinst_deplibs $lib"
Packit 64f477
	    need_relink=yes
Packit 64f477
	  fi
Packit 64f477
Packit 64f477
	  if test -n "$old_archive_from_expsyms_cmds"; then
Packit 64f477
	    # figure out the soname
Packit 64f477
	    set dummy $library_names
Packit 64f477
	    realname="$2"
Packit 64f477
	    shift; shift
Packit 64f477
	    libname=`eval \\$echo \"$libname_spec\"`
Packit 64f477
	    # use dlname if we got it. it's perfectly good, no?
Packit 64f477
	    if test -n "$dlname"; then
Packit 64f477
	      soname="$dlname"
Packit 64f477
	    elif test -n "$soname_spec"; then
Packit 64f477
	      # bleh windows
Packit 64f477
	      case $host in
Packit 64f477
	      *cygwin*)
Packit 64f477
		major=`expr $current - $age`
Packit 64f477
		versuffix="-$major"
Packit 64f477
		;;
Packit 64f477
	      esac
Packit 64f477
	      eval soname=\"$soname_spec\"
Packit 64f477
	    else
Packit 64f477
	      soname="$realname"
Packit 64f477
	    fi
Packit 64f477
Packit 64f477
	    # Make a new name for the extract_expsyms_cmds to use
Packit 64f477
	    soroot="$soname"
Packit 64f477
	    soname=`echo $soroot | sed -e 's/^.*\///'`
Packit 64f477
	    newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
Packit 64f477
Packit 64f477
	    # If the library has no export list, then create one now
Packit 64f477
	    if test -f "$output_objdir/$soname-def"; then :
Packit 64f477
	    else
Packit 64f477
	      $show "extracting exported symbol list from \`$soname'"
Packit 64f477
	      save_ifs="$IFS"; IFS='~'
Packit 64f477
	      eval cmds=\"$extract_expsyms_cmds\"
Packit 64f477
	      for cmd in $cmds; do
Packit 64f477
		IFS="$save_ifs"
Packit 64f477
		$show "$cmd"
Packit 64f477
		$run eval "$cmd" || exit $?
Packit 64f477
	      done
Packit 64f477
	      IFS="$save_ifs"
Packit 64f477
	    fi
Packit 64f477
Packit 64f477
	    # Create $newlib
Packit 64f477
	    if test -f "$output_objdir/$newlib"; then :; else
Packit 64f477
	      $show "generating import library for \`$soname'"
Packit 64f477
	      save_ifs="$IFS"; IFS='~'
Packit 64f477
	      eval cmds=\"$old_archive_from_expsyms_cmds\"
Packit 64f477
	      for cmd in $cmds; do
Packit 64f477
		IFS="$save_ifs"
Packit 64f477
		$show "$cmd"
Packit 64f477
		$run eval "$cmd" || exit $?
Packit 64f477
	      done
Packit 64f477
	      IFS="$save_ifs"
Packit 64f477
	    fi
Packit 64f477
	    # make sure the library variables are pointing to the new library
Packit 64f477
	    dir=$output_objdir
Packit 64f477
	    linklib=$newlib
Packit 64f477
	  fi # test -n $old_archive_from_expsyms_cmds
Packit 64f477
Packit 64f477
	  if test $linkmode = prog || test "$mode" != relink; then
Packit 64f477
	    add_shlibpath=
Packit 64f477
	    add_dir=
Packit 64f477
	    add=
Packit 64f477
	    lib_linked=yes
Packit 64f477
	    case $hardcode_action in
Packit 64f477
	    immediate | unsupported)
Packit 64f477
	      if test "$hardcode_direct" = no; then
Packit 64f477
		add="$dir/$linklib"
Packit 64f477
	      elif test "$hardcode_minus_L" = no; then
Packit 64f477
		case $host in
Packit 64f477
		*-*-sunos*) add_shlibpath="$dir" ;;
Packit 64f477
		esac
Packit 64f477
		add_dir="-L$dir"
Packit 64f477
		add="-l$name"
Packit 64f477
	      elif test "$hardcode_shlibpath_var" = no; then
Packit 64f477
		add_shlibpath="$dir"
Packit 64f477
		add="-l$name"
Packit 64f477
	      else
Packit 64f477
		lib_linked=no
Packit 64f477
	      fi
Packit 64f477
	      ;;
Packit 64f477
	    relink)
Packit 64f477
	      if test "$hardcode_direct" = yes; then
Packit 64f477
		add="$dir/$linklib"
Packit 64f477
	      elif test "$hardcode_minus_L" = yes; then
Packit 64f477
		add_dir="-L$dir"
Packit 64f477
		add="-l$name"
Packit 64f477
	      elif test "$hardcode_shlibpath_var" = yes; then
Packit 64f477
		add_shlibpath="$dir"
Packit 64f477
		add="-l$name"
Packit 64f477
	      else
Packit 64f477
		lib_linked=no
Packit 64f477
	      fi
Packit 64f477
	      ;;
Packit 64f477
	    *) lib_linked=no ;;
Packit 64f477
	    esac
Packit 64f477
Packit 64f477
	    if test "$lib_linked" != yes; then
Packit 64f477
	      $echo "$modename: configuration error: unsupported hardcode properties"
Packit 64f477
	      exit 1
Packit 64f477
	    fi
Packit 64f477
Packit 64f477
	    if test -n "$add_shlibpath"; then
Packit 64f477
	      case :$compile_shlibpath: in
Packit 64f477
	      *":$add_shlibpath:"*) ;;
Packit 64f477
	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
Packit 64f477
	      esac
Packit 64f477
	    fi
Packit 64f477
	    if test $linkmode = prog; then
Packit 64f477
	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
Packit 64f477
	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
Packit 64f477
	    else
Packit 64f477
	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
Packit 64f477
	      test -n "$add" && deplibs="$add $deplibs"
Packit 64f477
	      if test "$hardcode_direct" != yes && \
Packit 64f477
		 test "$hardcode_minus_L" != yes && \
Packit 64f477
		 test "$hardcode_shlibpath_var" = yes; then
Packit 64f477
		case :$finalize_shlibpath: in
Packit 64f477
		*":$libdir:"*) ;;
Packit 64f477
		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
Packit 64f477
		esac
Packit 64f477
	      fi
Packit 64f477
	    fi
Packit 64f477
	  fi
Packit 64f477
Packit 64f477
	  if test $linkmode = prog || test "$mode" = relink; then
Packit 64f477
	    add_shlibpath=
Packit 64f477
	    add_dir=
Packit 64f477
	    add=
Packit 64f477
	    # Finalize command for both is simple: just hardcode it.
Packit 64f477
	    if test "$hardcode_direct" = yes; then
Packit 64f477
	      add="$libdir/$linklib"
Packit 64f477
	    elif test "$hardcode_minus_L" = yes; then
Packit 64f477
	      add_dir="-L$libdir"
Packit 64f477
	      add="-l$name"
Packit 64f477
	    elif test "$hardcode_shlibpath_var" = yes; then
Packit 64f477
	      case :$finalize_shlibpath: in
Packit 64f477
	      *":$libdir:"*) ;;
Packit 64f477
	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
Packit 64f477
	      esac
Packit 64f477
	      add="-l$name"
Packit 64f477
	    else
Packit 64f477
	      # We cannot seem to hardcode it, guess we'll fake it.
Packit 64f477
	      add_dir="-L$libdir"
Packit 64f477
	      add="-l$name"
Packit 64f477
	    fi
Packit 64f477
Packit 64f477
	    if test $linkmode = prog; then
Packit 64f477
	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
Packit 64f477
	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
Packit 64f477
	    else
Packit 64f477
	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
Packit 64f477
	      test -n "$add" && deplibs="$add $deplibs"
Packit 64f477
	    fi
Packit 64f477
	  fi
Packit 64f477
	elif test $linkmode = prog; then
Packit 64f477
	  if test "$alldeplibs" = yes &&
Packit 64f477
	     { test "$deplibs_check_method" = pass_all ||
Packit 64f477
	       { test "$build_libtool_libs" = yes &&
Packit 64f477
		 test -n "$library_names"; }; }; then
Packit 64f477
	    # We only need to search for static libraries
Packit 64f477
	    continue
Packit 64f477
	  fi
Packit 64f477
Packit 64f477
	  # Try to link the static library
Packit 64f477
	  # Here we assume that one of hardcode_direct or hardcode_minus_L
Packit 64f477
	  # is not unsupported.  This is valid on all known static and
Packit 64f477
	  # shared platforms.
Packit 64f477
	  if test "$hardcode_direct" != unsupported; then
Packit 64f477
	    test -n "$old_library" && linklib="$old_library"
Packit 64f477
	    compile_deplibs="$dir/$linklib $compile_deplibs"
Packit 64f477
	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
Packit 64f477
	  else
Packit 64f477
	    compile_deplibs="-l$name -L$dir $compile_deplibs"
Packit 64f477
	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
Packit 64f477
	  fi
Packit 64f477
	elif test "$build_libtool_libs" = yes; then
Packit 64f477
	  # Not a shared library
Packit 64f477
	  if test "$deplibs_check_method" != pass_all; then
Packit 64f477
	    # We're trying link a shared library against a static one
Packit 64f477
	    # but the system doesn't support it.
Packit 64f477
Packit 64f477
	    # Just print a warning and add the library to dependency_libs so
Packit 64f477
	    # that the program can be linked against the static library.
Packit 64f477
	    echo
Packit 64f477
	    echo "*** Warning: This system can not link to static lib archive $lib."
Packit 64f477
	    echo "*** I have the capability to make that library automatically link in when"
Packit 64f477
	    echo "*** you link to this library.  But I can only do this if you have a"
Packit 64f477
	    echo "*** shared version of the library, which you do not appear to have."
Packit 64f477
	    if test "$module" = yes; then
Packit 64f477
	      echo "*** But as you try to build a module library, libtool will still create "
Packit 64f477
	      echo "*** a static module, that should work as long as the dlopening application"
Packit 64f477
	      echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
Packit 64f477
	      if test -z "$global_symbol_pipe"; then
Packit 64f477
		echo
Packit 64f477
		echo "*** However, this would only work if libtool was able to extract symbol"
Packit 64f477
		echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
Packit 64f477
		echo "*** not find such a program.  So, this module is probably useless."
Packit 64f477
		echo "*** \`nm' from GNU binutils and a full rebuild may help."
Packit 64f477
	      fi
Packit 64f477
	      if test "$build_old_libs" = no; then
Packit 64f477
		build_libtool_libs=module
Packit 64f477
		build_old_libs=yes
Packit 64f477
	      else
Packit 64f477
		build_libtool_libs=no
Packit 64f477
	      fi
Packit 64f477
	    fi
Packit 64f477
	  else
Packit 64f477
	    convenience="$convenience $dir/$old_library"
Packit 64f477
	    old_convenience="$old_convenience $dir/$old_library"
Packit 64f477
	    deplibs="$dir/$old_library $deplibs"
Packit 64f477
	    link_static=yes
Packit 64f477
	  fi
Packit 64f477
	fi # link shared/static library?
Packit 64f477
Packit 64f477
	if test $linkmode = lib; then
Packit 64f477
	  if test -n "$dependency_libs" &&
Packit 64f477
	     { test $hardcode_into_libs != yes || test $build_old_libs = yes ||
Packit 64f477
	       test $link_static = yes; }; then
Packit 64f477
	    # Extract -R from dependency_libs
Packit 64f477
	    temp_deplibs=
Packit 64f477
	    for libdir in $dependency_libs; do
Packit 64f477
	      case $libdir in
Packit 64f477
	      -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
Packit 64f477
		   case " $xrpath " in
Packit 64f477
		   *" $temp_xrpath "*) ;;
Packit 64f477
		   *) xrpath="$xrpath $temp_xrpath";;
Packit 64f477
		   esac;;
Packit 64f477
	      *) temp_deplibs="$temp_deplibs $libdir";;
Packit 64f477
	      esac
Packit 64f477
	    done
Packit 64f477
	    dependency_libs="$temp_deplibs"
Packit 64f477
	  fi
Packit 64f477
Packit 64f477
	  newlib_search_path="$newlib_search_path $absdir"
Packit 64f477
	  # Link against this library
Packit 64f477
	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
Packit 64f477
	  # ... and its dependency_libs
Packit 64f477
	  tmp_libs=
Packit 64f477
	  for deplib in $dependency_libs; do
Packit 64f477
	    newdependency_libs="$deplib $newdependency_libs"
Packit 64f477
	    if test "X$duplicate_deps" = "Xyes" ; then
Packit 64f477
	      case "$tmp_libs " in
Packit 64f477
	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
Packit 64f477
	      esac
Packit 64f477
	    fi
Packit 64f477
	    tmp_libs="$tmp_libs $deplib"
Packit 64f477
	  done
Packit 64f477
Packit 64f477
	  if test $link_all_deplibs != no; then
Packit 64f477
	    # Add the search paths of all dependency libraries
Packit 64f477
	    for deplib in $dependency_libs; do
Packit 64f477
	      case $deplib in
Packit 64f477
	      -L*) path="$deplib" ;;
Packit 64f477
	      *.la)
Packit 64f477
		dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
Packit 64f477
		test "X$dir" = "X$deplib" && dir="."
Packit 64f477
		# We need an absolute path.
Packit 64f477
		case $dir in
Packit 64f477
		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
Packit 64f477
		*)
Packit 64f477
		  absdir=`cd "$dir" && pwd`
Packit 64f477
		  if test -z "$absdir"; then
Packit 64f477
		    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
Packit 64f477
		    absdir="$dir"
Packit 64f477
		  fi
Packit 64f477
		  ;;
Packit 64f477
		esac
Packit 64f477
		if grep "^installed=no" $deplib > /dev/null; then
Packit 64f477
		  path="-L$absdir/$objdir"
Packit 64f477
		else
Packit 64f477
		  eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
Packit 64f477
		  if test -z "$libdir"; then
Packit 64f477
		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
Packit 64f477
		    exit 1
Packit 64f477
		  fi
Packit 64f477
		  if test "$absdir" != "$libdir"; then
Packit 64f477
		    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
Packit 64f477
		  fi
Packit 64f477
		  path="-L$absdir"
Packit 64f477
		fi
Packit 64f477
		;;
Packit 64f477
	      *) continue ;;
Packit 64f477
	      esac
Packit 64f477
	      case " $deplibs " in
Packit 64f477
	      *" $path "*) ;;
Packit 64f477
	      *) deplibs="$deplibs $path" ;;
Packit 64f477
	      esac
Packit 64f477
	    done
Packit 64f477
	  fi # link_all_deplibs != no
Packit 64f477
	fi # linkmode = lib
Packit 64f477
      done # for deplib in $libs
Packit 64f477
      if test $pass = dlpreopen; then
Packit 64f477
	# Link the dlpreopened libraries before other libraries
Packit 64f477
	for deplib in $save_deplibs; do
Packit 64f477
	  deplibs="$deplib $deplibs"
Packit 64f477
	done
Packit 64f477
      fi
Packit 64f477
      if test $pass != dlopen; then
Packit 64f477
	test $pass != scan && dependency_libs="$newdependency_libs"
Packit 64f477
	if test $pass != conv; then
Packit 64f477
	  # Make sure lib_search_path contains only unique directories.
Packit 64f477
	  lib_search_path=
Packit 64f477
	  for dir in $newlib_search_path; do
Packit 64f477
	    case "$lib_search_path " in
Packit 64f477
	    *" $dir "*) ;;
Packit 64f477
	    *) lib_search_path="$lib_search_path $dir" ;;
Packit 64f477
	    esac
Packit 64f477
	  done
Packit 64f477
	  newlib_search_path=
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	if test "$linkmode,$pass" != "prog,link"; then
Packit 64f477
	  vars="deplibs"
Packit 64f477
	else
Packit 64f477
	  vars="compile_deplibs finalize_deplibs"
Packit 64f477
	fi
Packit 64f477
	for var in $vars dependency_libs; do
Packit 64f477
	  # Add libraries to $var in reverse order
Packit 64f477
	  eval tmp_libs=\"\$$var\"
Packit 64f477
	  new_libs=
Packit 64f477
	  for deplib in $tmp_libs; do
Packit 64f477
	    case $deplib in
Packit 64f477
	    -L*) new_libs="$deplib $new_libs" ;;
Packit 64f477
	    *)
Packit 64f477
	      case " $specialdeplibs " in
Packit 64f477
	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
Packit 64f477
	      *)
Packit 64f477
		case " $new_libs " in
Packit 64f477
		*" $deplib "*) ;;
Packit 64f477
		*) new_libs="$deplib $new_libs" ;;
Packit 64f477
		esac
Packit 64f477
		;;
Packit 64f477
	      esac
Packit 64f477
	      ;;
Packit 64f477
	    esac
Packit 64f477
	  done
Packit 64f477
	  tmp_libs=
Packit 64f477
	  for deplib in $new_libs; do
Packit 64f477
	    case $deplib in
Packit 64f477
	    -L*)
Packit 64f477
	      case " $tmp_libs " in
Packit 64f477
	      *" $deplib "*) ;;
Packit 64f477
	      *) tmp_libs="$tmp_libs $deplib" ;;
Packit 64f477
	      esac
Packit 64f477
	      ;;
Packit 64f477
	    *) tmp_libs="$tmp_libs $deplib" ;;
Packit 64f477
	    esac
Packit 64f477
	  done
Packit 64f477
	  eval $var=\"$tmp_libs\"
Packit 64f477
	done # for var
Packit 64f477
      fi
Packit 64f477
      if test "$pass" = "conv" &&
Packit 64f477
       { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then
Packit 64f477
	libs="$deplibs" # reset libs
Packit 64f477
	deplibs=
Packit 64f477
      fi
Packit 64f477
    done # for pass
Packit 64f477
    if test $linkmode = prog; then
Packit 64f477
      dlfiles="$newdlfiles"
Packit 64f477
      dlprefiles="$newdlprefiles"
Packit 64f477
    fi
Packit 64f477
Packit 64f477
    case $linkmode in
Packit 64f477
    oldlib)
Packit 64f477
      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
Packit 64f477
	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      if test -n "$rpath"; then
Packit 64f477
	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      if test -n "$xrpath"; then
Packit 64f477
	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      if test -n "$vinfo"; then
Packit 64f477
	$echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      if test -n "$release"; then
Packit 64f477
	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
Packit 64f477
	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      # Now set the variables for building old libraries.
Packit 64f477
      build_libtool_libs=no
Packit 64f477
      oldlibs="$output"
Packit 64f477
      objs="$objs$old_deplibs"
Packit 64f477
      ;;
Packit 64f477
Packit 64f477
    lib)
Packit 64f477
      # Make sure we only generate libraries of the form `libNAME.la'.
Packit 64f477
      case $outputname in
Packit 64f477
      lib*)
Packit 64f477
	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
Packit 64f477
	eval libname=\"$libname_spec\"
Packit 64f477
	;;
Packit 64f477
      *)
Packit 64f477
	if test "$module" = no; then
Packit 64f477
	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
Packit 64f477
	  $echo "$help" 1>&2
Packit 64f477
	  exit 1
Packit 64f477
	fi
Packit 64f477
	if test "$need_lib_prefix" != no; then
Packit 64f477
	  # Add the "lib" prefix for modules if required
Packit 64f477
	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
Packit 64f477
	  eval libname=\"$libname_spec\"
Packit 64f477
	else
Packit 64f477
	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
Packit 64f477
	fi
Packit 64f477
	;;
Packit 64f477
      esac
Packit 64f477
Packit 64f477
      if test -n "$objs"; then
Packit 64f477
	if test "$deplibs_check_method" != pass_all; then
Packit 64f477
	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
Packit 64f477
	  exit 1
Packit 64f477
	else
Packit 64f477
	  echo
Packit 64f477
	  echo "*** Warning: Linking the shared library $output against the non-libtool"
Packit 64f477
	  echo "*** objects $objs is not portable!"
Packit 64f477
	  libobjs="$libobjs $objs"
Packit 64f477
	fi
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      if test "$dlself" != no; then
Packit 64f477
	$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      set dummy $rpath
Packit 64f477
      if test $# -gt 2; then
Packit 64f477
	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
Packit 64f477
      fi
Packit 64f477
      install_libdir="$2"
Packit 64f477
Packit 64f477
      oldlibs=
Packit 64f477
      if test -z "$rpath"; then
Packit 64f477
	if test "$build_libtool_libs" = yes; then
Packit 64f477
	  # Building a libtool convenience library.
Packit 64f477
	  libext=al
Packit 64f477
	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
Packit 64f477
	  build_libtool_libs=convenience
Packit 64f477
	  build_old_libs=yes
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	if test -n "$vinfo"; then
Packit 64f477
	  $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	if test -n "$release"; then
Packit 64f477
	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
Packit 64f477
	fi
Packit 64f477
      else
Packit 64f477
Packit 64f477
	# Parse the version information argument.
Packit 64f477
	save_ifs="$IFS"; IFS=':'
Packit 64f477
	set dummy $vinfo 0 0 0
Packit 64f477
	IFS="$save_ifs"
Packit 64f477
Packit 64f477
	if test -n "$8"; then
Packit 64f477
	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
Packit 64f477
	  $echo "$help" 1>&2
Packit 64f477
	  exit 1
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	current="$2"
Packit 64f477
	revision="$3"
Packit 64f477
	age="$4"
Packit 64f477
Packit 64f477
	# Check that each of the things are valid numbers.
Packit 64f477
	case $current in
Packit 64f477
	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
Packit 64f477
	*)
Packit 64f477
	  $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
Packit 64f477
	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
Packit 64f477
	  exit 1
Packit 64f477
	  ;;
Packit 64f477
	esac
Packit 64f477
Packit 64f477
	case $revision in
Packit 64f477
	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
Packit 64f477
	*)
Packit 64f477
	  $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
Packit 64f477
	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
Packit 64f477
	  exit 1
Packit 64f477
	  ;;
Packit 64f477
	esac
Packit 64f477
Packit 64f477
	case $age in
Packit 64f477
	0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
Packit 64f477
	*)
Packit 64f477
	  $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
Packit 64f477
	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
Packit 64f477
	  exit 1
Packit 64f477
	  ;;
Packit 64f477
	esac
Packit 64f477
Packit 64f477
	if test $age -gt $current; then
Packit 64f477
	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
Packit 64f477
	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
Packit 64f477
	  exit 1
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	# Calculate the version variables.
Packit 64f477
	major=
Packit 64f477
	versuffix=
Packit 64f477
	verstring=
Packit 64f477
	case $version_type in
Packit 64f477
	none) ;;
Packit 64f477
Packit 64f477
	darwin)
Packit 64f477
	  # Like Linux, but with the current version available in
Packit 64f477
	  # verstring for coding it into the library header
Packit 64f477
	  major=.`expr $current - $age`
Packit 64f477
	  versuffix="$major.$age.$revision"
Packit 64f477
	  # Darwin ld doesn't like 0 for these options...
Packit 64f477
	  minor_current=`expr $current + 1`
Packit 64f477
	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
Packit 64f477
	  ;;
Packit 64f477
Packit 64f477
	freebsd-aout)
Packit 64f477
	  major=".$current"
Packit 64f477
	  versuffix=".$current.$revision";
Packit 64f477
	  ;;
Packit 64f477
Packit 64f477
	freebsd-elf)
Packit 64f477
	  major=".$current"
Packit 64f477
	  versuffix=".$current";
Packit 64f477
	  ;;
Packit 64f477
Packit 64f477
	irix | nonstopux)
Packit 64f477
	  case $version_type in
Packit 64f477
	    nonstopux) verstring_prefix=nonstopux ;;
Packit 64f477
	    *)         verstring_prefix=sgi ;;
Packit 64f477
	  esac
Packit 64f477
	  verstring="$verstring_prefix$major.$revision"
Packit 64f477
Packit 64f477
	  major=`expr $current - $age + 1`
Packit 64f477
Packit 64f477
	  # Add in all the interfaces that we are compatible with.
Packit 64f477
	  loop=$revision
Packit 64f477
	  while test $loop != 0; do
Packit 64f477
	    iface=`expr $revision - $loop`
Packit 64f477
	    loop=`expr $loop - 1`
Packit 64f477
	    verstring="$verstring_prefix$major.$iface:$verstring"
Packit 64f477
	  done
Packit 64f477
Packit 64f477
	  # Before this point, $major must not contain `.'.
Packit 64f477
	  major=.$major
Packit 64f477
	  versuffix="$major.$revision"
Packit 64f477
	  ;;
Packit 64f477
Packit 64f477
	linux)
Packit 64f477
	  major=.`expr $current - $age`
Packit 64f477
	  versuffix="$major.$age.$revision"
Packit 64f477
	  ;;
Packit 64f477
Packit 64f477
	osf)
Packit 64f477
	  major=`expr $current - $age`
Packit 64f477
	  versuffix=".$current.$age.$revision"
Packit 64f477
	  verstring="$current.$age.$revision"
Packit 64f477
Packit 64f477
	  # Add in all the interfaces that we are compatible with.
Packit 64f477
	  loop=$age
Packit 64f477
	  while test $loop != 0; do
Packit 64f477
	    iface=`expr $current - $loop`
Packit 64f477
	    loop=`expr $loop - 1`
Packit 64f477
	    verstring="$verstring:${iface}.0"
Packit 64f477
	  done
Packit 64f477
Packit 64f477
	  # Make executables depend on our current version.
Packit 64f477
	  verstring="$verstring:${current}.0"
Packit 64f477
	  ;;
Packit 64f477
Packit 64f477
	sunos)
Packit 64f477
	  major=".$current"
Packit 64f477
	  versuffix=".$current.$revision"
Packit 64f477
	  ;;
Packit 64f477
Packit 64f477
	windows)
Packit 64f477
	  # Use '-' rather than '.', since we only want one
Packit 64f477
	  # extension on DOS 8.3 filesystems.
Packit 64f477
	  major=`expr $current - $age`
Packit 64f477
	  versuffix="-$major"
Packit 64f477
	  ;;
Packit 64f477
Packit 64f477
	*)
Packit 64f477
	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
Packit 64f477
	  echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
Packit 64f477
	  exit 1
Packit 64f477
	  ;;
Packit 64f477
	esac
Packit 64f477
Packit 64f477
	# Clear the version info if we defaulted, and they specified a release.
Packit 64f477
	if test -z "$vinfo" && test -n "$release"; then
Packit 64f477
	  major=
Packit 64f477
	  verstring="0.0"
Packit 64f477
	  case $version_type in
Packit 64f477
	  darwin)
Packit 64f477
	    # we can't check for "0.0" in archive_cmds due to quoting
Packit 64f477
	    # problems, so we reset it completely
Packit 64f477
	    verstring=""
Packit 64f477
	    ;;
Packit 64f477
	  *)
Packit 64f477
	    verstring="0.0"
Packit 64f477
	    ;;
Packit 64f477
	  esac
Packit 64f477
	  if test "$need_version" = no; then
Packit 64f477
	    versuffix=
Packit 64f477
	  else
Packit 64f477
	    versuffix=".0.0"
Packit 64f477
	  fi
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	# Remove version info from name if versioning should be avoided
Packit 64f477
	if test "$avoid_version" = yes && test "$need_version" = no; then
Packit 64f477
	  major=
Packit 64f477
	  versuffix=
Packit 64f477
	  verstring=""
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	# Check to see if the archive will have undefined symbols.
Packit 64f477
	if test "$allow_undefined" = yes; then
Packit 64f477
	  if test "$allow_undefined_flag" = unsupported; then
Packit 64f477
	    $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
Packit 64f477
	    build_libtool_libs=no
Packit 64f477
	    build_old_libs=yes
Packit 64f477
	  fi
Packit 64f477
	else
Packit 64f477
	  # Don't allow undefined symbols.
Packit 64f477
	  allow_undefined_flag="$no_undefined_flag"
Packit 64f477
	fi
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      if test "$mode" != relink; then
Packit 64f477
	# Remove our outputs.
Packit 64f477
	$show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
Packit 64f477
	$run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      # Now set the variables for building old libraries.
Packit 64f477
      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
Packit 64f477
	oldlibs="$oldlibs $output_objdir/$libname.$libext"
Packit 64f477
Packit 64f477
	# Transform .lo files to .o files.
Packit 64f477
	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      # Eliminate all temporary directories.
Packit 64f477
      for path in $notinst_path; do
Packit 64f477
	lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`
Packit 64f477
	deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`
Packit 64f477
	dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
Packit 64f477
      done
Packit 64f477
Packit 64f477
      if test -n "$xrpath"; then
Packit 64f477
	# If the user specified any rpath flags, then add them.
Packit 64f477
	temp_xrpath=
Packit 64f477
	for libdir in $xrpath; do
Packit 64f477
	  temp_xrpath="$temp_xrpath -R$libdir"
Packit 64f477
	  case "$finalize_rpath " in
Packit 64f477
	  *" $libdir "*) ;;
Packit 64f477
	  *) finalize_rpath="$finalize_rpath $libdir" ;;
Packit 64f477
	  esac
Packit 64f477
	done
Packit 64f477
	if test $hardcode_into_libs != yes || test $build_old_libs = yes; then
Packit 64f477
	  dependency_libs="$temp_xrpath $dependency_libs"
Packit 64f477
	fi
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      # Make sure dlfiles contains only unique files that won't be dlpreopened
Packit 64f477
      old_dlfiles="$dlfiles"
Packit 64f477
      dlfiles=
Packit 64f477
      for lib in $old_dlfiles; do
Packit 64f477
	case " $dlprefiles $dlfiles " in
Packit 64f477
	*" $lib "*) ;;
Packit 64f477
	*) dlfiles="$dlfiles $lib" ;;
Packit 64f477
	esac
Packit 64f477
      done
Packit 64f477
Packit 64f477
      # Make sure dlprefiles contains only unique files
Packit 64f477
      old_dlprefiles="$dlprefiles"
Packit 64f477
      dlprefiles=
Packit 64f477
      for lib in $old_dlprefiles; do
Packit 64f477
	case "$dlprefiles " in
Packit 64f477
	*" $lib "*) ;;
Packit 64f477
	*) dlprefiles="$dlprefiles $lib" ;;
Packit 64f477
	esac
Packit 64f477
      done
Packit 64f477
Packit 64f477
      if test "$build_libtool_libs" = yes; then
Packit 64f477
	if test -n "$rpath"; then
Packit 64f477
	  case $host in
Packit 64f477
	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
Packit 64f477
	    # these systems don't actually have a c library (as such)!
Packit 64f477
	    ;;
Packit 64f477
	  *-*-rhapsody* | *-*-darwin1.[012])
Packit 64f477
	    # Rhapsody C library is in the System framework
Packit 64f477
	    deplibs="$deplibs -framework System"
Packit 64f477
	    ;;
Packit 64f477
	  *-*-netbsd*)
Packit 64f477
	    # Don't link with libc until the a.out ld.so is fixed.
Packit 64f477
	    ;;
Packit 64f477
	  *-*-openbsd* | *-*-freebsd*)
Packit 64f477
	    # Do not include libc due to us having libc/libc_r.
Packit 64f477
	    ;;
Packit 64f477
	  *)
Packit 64f477
	    # Add libc to deplibs on all other systems if necessary.
Packit 64f477
	    if test $build_libtool_need_lc = "yes"; then
Packit 64f477
	      deplibs="$deplibs -lc"
Packit 64f477
	    fi
Packit 64f477
	    ;;
Packit 64f477
	  esac
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	# Transform deplibs into only deplibs that can be linked in shared.
Packit 64f477
	name_save=$name
Packit 64f477
	libname_save=$libname
Packit 64f477
	release_save=$release
Packit 64f477
	versuffix_save=$versuffix
Packit 64f477
	major_save=$major
Packit 64f477
	# I'm not sure if I'm treating the release correctly.  I think
Packit 64f477
	# release should show up in the -l (ie -lgmp5) so we don't want to
Packit 64f477
	# add it in twice.  Is that correct?
Packit 64f477
	release=""
Packit 64f477
	versuffix=""
Packit 64f477
	major=""
Packit 64f477
	newdeplibs=
Packit 64f477
	droppeddeps=no
Packit 64f477
	case $deplibs_check_method in
Packit 64f477
	pass_all)
Packit 64f477
	  # Don't check for shared/static.  Everything works.
Packit 64f477
	  # This might be a little naive.  We might want to check
Packit 64f477
	  # whether the library exists or not.  But this is on
Packit 64f477
	  # osf3 & osf4 and I'm not really sure... Just
Packit 64f477
	  # implementing what was already the behaviour.
Packit 64f477
	  newdeplibs=$deplibs
Packit 64f477
	  ;;
Packit 64f477
	test_compile)
Packit 64f477
	  # This code stresses the "libraries are programs" paradigm to its
Packit 64f477
	  # limits. Maybe even breaks it.  We compile a program, linking it
Packit 64f477
	  # against the deplibs as a proxy for the library.  Then we can check
Packit 64f477
	  # whether they linked in statically or dynamically with ldd.
Packit 64f477
	  $rm conftest.c
Packit 64f477
	  cat > conftest.c <
Packit 64f477
	  int main() { return 0; }
Packit 64f477
EOF
Packit 64f477
	  $rm conftest
Packit 64f477
	  $CC -o conftest conftest.c $deplibs
Packit 64f477
	  if test $? -eq 0 ; then
Packit 64f477
	    ldd_output=`ldd conftest`
Packit 64f477
	    for i in $deplibs; do
Packit 64f477
	      name="`expr $i : '-l\(.*\)'`"
Packit 64f477
	      # If $name is empty we are operating on a -L argument.
Packit 64f477
	      if test -n "$name" && test "$name" != "0"; then
Packit 64f477
		libname=`eval \\$echo \"$libname_spec\"`
Packit 64f477
		deplib_matches=`eval \\$echo \"$library_names_spec\"`
Packit 64f477
		set dummy $deplib_matches
Packit 64f477
		deplib_match=$2
Packit 64f477
		if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
Packit 64f477
		  newdeplibs="$newdeplibs $i"
Packit 64f477
		else
Packit 64f477
		  droppeddeps=yes
Packit 64f477
		  echo
Packit 64f477
		  echo "*** Warning: dynamic linker does not accept needed library $i."
Packit 64f477
		  echo "*** I have the capability to make that library automatically link in when"
Packit 64f477
		  echo "*** you link to this library.  But I can only do this if you have a"
Packit 64f477
		  echo "*** shared version of the library, which I believe you do not have"
Packit 64f477
		  echo "*** because a test_compile did reveal that the linker did not use it for"
Packit 64f477
		  echo "*** its dynamic dependency list that programs get resolved with at runtime."
Packit 64f477
		fi
Packit 64f477
	      else
Packit 64f477
		newdeplibs="$newdeplibs $i"
Packit 64f477
	      fi
Packit 64f477
	    done
Packit 64f477
	  else
Packit 64f477
	    # Error occured in the first compile.  Let's try to salvage
Packit 64f477
	    # the situation: Compile a separate program for each library.
Packit 64f477
	    for i in $deplibs; do
Packit 64f477
	      name="`expr $i : '-l\(.*\)'`"
Packit 64f477
	     # If $name is empty we are operating on a -L argument.
Packit 64f477
	      if test -n "$name" && test "$name" != "0"; then
Packit 64f477
		$rm conftest
Packit 64f477
		$CC -o conftest conftest.c $i
Packit 64f477
		# Did it work?
Packit 64f477
		if test $? -eq 0 ; then
Packit 64f477
		  ldd_output=`ldd conftest`
Packit 64f477
		  libname=`eval \\$echo \"$libname_spec\"`
Packit 64f477
		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
Packit 64f477
		  set dummy $deplib_matches
Packit 64f477
		  deplib_match=$2
Packit 64f477
		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
Packit 64f477
		    newdeplibs="$newdeplibs $i"
Packit 64f477
		  else
Packit 64f477
		    droppeddeps=yes
Packit 64f477
		    echo
Packit 64f477
		    echo "*** Warning: dynamic linker does not accept needed library $i."
Packit 64f477
		    echo "*** I have the capability to make that library automatically link in when"
Packit 64f477
		    echo "*** you link to this library.  But I can only do this if you have a"
Packit 64f477
		    echo "*** shared version of the library, which you do not appear to have"
Packit 64f477
		    echo "*** because a test_compile did reveal that the linker did not use this one"
Packit 64f477
		    echo "*** as a dynamic dependency that programs can get resolved with at runtime."
Packit 64f477
		  fi
Packit 64f477
		else
Packit 64f477
		  droppeddeps=yes
Packit 64f477
		  echo
Packit 64f477
		  echo "*** Warning!  Library $i is needed by this library but I was not able to"
Packit 64f477
		  echo "***  make it link in!  You will probably need to install it or some"
Packit 64f477
		  echo "*** library that it depends on before this library will be fully"
Packit 64f477
		  echo "*** functional.  Installing it before continuing would be even better."
Packit 64f477
		fi
Packit 64f477
	      else
Packit 64f477
		newdeplibs="$newdeplibs $i"
Packit 64f477
	      fi
Packit 64f477
	    done
Packit 64f477
	  fi
Packit 64f477
	  ;;
Packit 64f477
	file_magic*)
Packit 64f477
	  set dummy $deplibs_check_method
Packit 64f477
	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
Packit 64f477
	  for a_deplib in $deplibs; do
Packit 64f477
	    name="`expr $a_deplib : '-l\(.*\)'`"
Packit 64f477
	    # If $name is empty we are operating on a -L argument.
Packit 64f477
	    if test -n "$name" && test "$name" != "0"; then
Packit 64f477
	      libname=`eval \\$echo \"$libname_spec\"`
Packit 64f477
	      for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
Packit 64f477
		    potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
Packit 64f477
		    for potent_lib in $potential_libs; do
Packit 64f477
		      # Follow soft links.
Packit 64f477
		      if ls -lLd "$potent_lib" 2>/dev/null \
Packit 64f477
			 | grep " -> " >/dev/null; then
Packit 64f477
			continue
Packit 64f477
		      fi
Packit 64f477
		      # The statement above tries to avoid entering an
Packit 64f477
		      # endless loop below, in case of cyclic links.
Packit 64f477
		      # We might still enter an endless loop, since a link
Packit 64f477
		      # loop can be closed while we follow links,
Packit 64f477
		      # but so what?
Packit 64f477
		      potlib="$potent_lib"
Packit 64f477
		      while test -h "$potlib" 2>/dev/null; do
Packit 64f477
			potliblink=`ls -ld $potlib | sed 's/.* -> //'`
Packit 64f477
			case $potliblink in
Packit 64f477
			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
Packit 64f477
			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
Packit 64f477
			esac
Packit 64f477
		      done
Packit 64f477
		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
Packit 64f477
			 | sed 10q \
Packit 64f477
			 | egrep "$file_magic_regex" > /dev/null; then
Packit 64f477
			newdeplibs="$newdeplibs $a_deplib"
Packit 64f477
			a_deplib=""
Packit 64f477
			break 2
Packit 64f477
		      fi
Packit 64f477
		    done
Packit 64f477
	      done
Packit 64f477
	      if test -n "$a_deplib" ; then
Packit 64f477
		droppeddeps=yes
Packit 64f477
		echo
Packit 64f477
		echo "*** Warning: linker path does not have real file for library $a_deplib."
Packit 64f477
		echo "*** I have the capability to make that library automatically link in when"
Packit 64f477
		echo "*** you link to this library.  But I can only do this if you have a"
Packit 64f477
		echo "*** shared version of the library, which you do not appear to have"
Packit 64f477
		echo "*** because I did check the linker path looking for a file starting"
Packit 64f477
		if test -z "$potlib" ; then
Packit 64f477
		  echo "*** with $libname but no candidates were found. (...for file magic test)"
Packit 64f477
		else
Packit 64f477
		  echo "*** with $libname and none of the candidates passed a file format test"
Packit 64f477
		  echo "*** using a file magic. Last file checked: $potlib"
Packit 64f477
		fi
Packit 64f477
	      fi
Packit 64f477
	    else
Packit 64f477
	      # Add a -L argument.
Packit 64f477
	      newdeplibs="$newdeplibs $a_deplib"
Packit 64f477
	    fi
Packit 64f477
	  done # Gone through all deplibs.
Packit 64f477
	  ;;
Packit 64f477
	match_pattern*)
Packit 64f477
	  set dummy $deplibs_check_method
Packit 64f477
	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
Packit 64f477
	  for a_deplib in $deplibs; do
Packit 64f477
	    name="`expr $a_deplib : '-l\(.*\)'`"
Packit 64f477
	    # If $name is empty we are operating on a -L argument.
Packit 64f477
	    if test -n "$name" && test "$name" != "0"; then
Packit 64f477
	      libname=`eval \\$echo \"$libname_spec\"`
Packit 64f477
	      for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
Packit 64f477
		potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
Packit 64f477
		for potent_lib in $potential_libs; do
Packit 64f477
		  potlib="$potent_lib" # see symlink-check below in file_magic test
Packit 64f477
		  if eval echo \"$potent_lib\" 2>/dev/null \
Packit 64f477
		      | sed 10q \
Packit 64f477
		      | egrep "$match_pattern_regex" > /dev/null; then
Packit 64f477
		    newdeplibs="$newdeplibs $a_deplib"
Packit 64f477
		    a_deplib=""
Packit 64f477
		    break 2
Packit 64f477
		  fi
Packit 64f477
		done
Packit 64f477
	      done
Packit 64f477
	      if test -n "$a_deplib" ; then
Packit 64f477
		droppeddeps=yes
Packit 64f477
		echo
Packit 64f477
		echo "*** Warning: linker path does not have real file for library $a_deplib."
Packit 64f477
		echo "*** I have the capability to make that library automatically link in when"
Packit 64f477
		echo "*** you link to this library.  But I can only do this if you have a"
Packit 64f477
		echo "*** shared version of the library, which you do not appear to have"
Packit 64f477
		echo "*** because I did check the linker path looking for a file starting"
Packit 64f477
		if test -z "$potlib" ; then
Packit 64f477
		  echo "*** with $libname but no candidates were found. (...for regex pattern test)"
Packit 64f477
		else
Packit 64f477
		  echo "*** with $libname and none of the candidates passed a file format test"
Packit 64f477
		  echo "*** using a regex pattern. Last file checked: $potlib"
Packit 64f477
		fi
Packit 64f477
	      fi
Packit 64f477
	    else
Packit 64f477
	      # Add a -L argument.
Packit 64f477
	      newdeplibs="$newdeplibs $a_deplib"
Packit 64f477
	    fi
Packit 64f477
	  done # Gone through all deplibs.
Packit 64f477
	  ;;
Packit 64f477
	none | unknown | *)
Packit 64f477
	  newdeplibs=""
Packit 64f477
	  if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
Packit 64f477
	       -e 's/ -[LR][^ ]*//g' -e 's/[ 	]//g' |
Packit 64f477
	     grep . >/dev/null; then
Packit 64f477
	    echo
Packit 64f477
	    if test "X$deplibs_check_method" = "Xnone"; then
Packit 64f477
	      echo "*** Warning: inter-library dependencies are not supported in this platform."
Packit 64f477
	    else
Packit 64f477
	      echo "*** Warning: inter-library dependencies are not known to be supported."
Packit 64f477
	    fi
Packit 64f477
	    echo "*** All declared inter-library dependencies are being dropped."
Packit 64f477
	    droppeddeps=yes
Packit 64f477
	  fi
Packit 64f477
	  ;;
Packit 64f477
	esac
Packit 64f477
	versuffix=$versuffix_save
Packit 64f477
	major=$major_save
Packit 64f477
	release=$release_save
Packit 64f477
	libname=$libname_save
Packit 64f477
	name=$name_save
Packit 64f477
Packit 64f477
	case $host in
Packit 64f477
	*-*-rhapsody* | *-*-darwin1.[012])
Packit 64f477
	  # On Rhapsody replace the C library is the System framework
Packit 64f477
	  newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
Packit 64f477
	  ;;
Packit 64f477
	esac
Packit 64f477
Packit 64f477
	if test "$droppeddeps" = yes; then
Packit 64f477
	  if test "$module" = yes; then
Packit 64f477
	    echo
Packit 64f477
	    echo "*** Warning: libtool could not satisfy all declared inter-library"
Packit 64f477
	    echo "*** dependencies of module $libname.  Therefore, libtool will create"
Packit 64f477
	    echo "*** a static module, that should work as long as the dlopening"
Packit 64f477
	    echo "*** application is linked with the -dlopen flag."
Packit 64f477
	    if test -z "$global_symbol_pipe"; then
Packit 64f477
	      echo
Packit 64f477
	      echo "*** However, this would only work if libtool was able to extract symbol"
Packit 64f477
	      echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
Packit 64f477
	      echo "*** not find such a program.  So, this module is probably useless."
Packit 64f477
	      echo "*** \`nm' from GNU binutils and a full rebuild may help."
Packit 64f477
	    fi
Packit 64f477
	    if test "$build_old_libs" = no; then
Packit 64f477
	      oldlibs="$output_objdir/$libname.$libext"
Packit 64f477
	      build_libtool_libs=module
Packit 64f477
	      build_old_libs=yes
Packit 64f477
	    else
Packit 64f477
	      build_libtool_libs=no
Packit 64f477
	    fi
Packit 64f477
	  else
Packit 64f477
	    echo "*** The inter-library dependencies that have been dropped here will be"
Packit 64f477
	    echo "*** automatically added whenever a program is linked with this library"
Packit 64f477
	    echo "*** or is declared to -dlopen it."
Packit 64f477
Packit 64f477
	    if test $allow_undefined = no; then
Packit 64f477
	      echo
Packit 64f477
	      echo "*** Since this library must not contain undefined symbols,"
Packit 64f477
	      echo "*** because either the platform does not support them or"
Packit 64f477
	      echo "*** it was explicitly requested with -no-undefined,"
Packit 64f477
	      echo "*** libtool will only create a static version of it."
Packit 64f477
	      if test "$build_old_libs" = no; then
Packit 64f477
		oldlibs="$output_objdir/$libname.$libext"
Packit 64f477
		build_libtool_libs=module
Packit 64f477
		build_old_libs=yes
Packit 64f477
	      else
Packit 64f477
		build_libtool_libs=no
Packit 64f477
	      fi
Packit 64f477
	    fi
Packit 64f477
	  fi
Packit 64f477
	fi
Packit 64f477
	# Done checking deplibs!
Packit 64f477
	deplibs=$newdeplibs
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      # All the library-specific variables (install_libdir is set above).
Packit 64f477
      library_names=
Packit 64f477
      old_library=
Packit 64f477
      dlname=
Packit 64f477
Packit 64f477
      # Test again, we may have decided not to build it any more
Packit 64f477
      if test "$build_libtool_libs" = yes; then
Packit 64f477
	if test $hardcode_into_libs = yes; then
Packit 64f477
	  # Hardcode the library paths
Packit 64f477
	  hardcode_libdirs=
Packit 64f477
	  dep_rpath=
Packit 64f477
	  rpath="$finalize_rpath"
Packit 64f477
	  test "$mode" != relink && rpath="$compile_rpath$rpath"
Packit 64f477
	  for libdir in $rpath; do
Packit 64f477
	    if test -n "$hardcode_libdir_flag_spec"; then
Packit 64f477
	      if test -n "$hardcode_libdir_separator"; then
Packit 64f477
		if test -z "$hardcode_libdirs"; then
Packit 64f477
		  hardcode_libdirs="$libdir"
Packit 64f477
		else
Packit 64f477
		  # Just accumulate the unique libdirs.
Packit 64f477
		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
Packit 64f477
		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
Packit 64f477
		    ;;
Packit 64f477
		  *)
Packit 64f477
		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
Packit 64f477
		    ;;
Packit 64f477
		  esac
Packit 64f477
		fi
Packit 64f477
	      else
Packit 64f477
		eval flag=\"$hardcode_libdir_flag_spec\"
Packit 64f477
		dep_rpath="$dep_rpath $flag"
Packit 64f477
	      fi
Packit 64f477
	    elif test -n "$runpath_var"; then
Packit 64f477
	      case "$perm_rpath " in
Packit 64f477
	      *" $libdir "*) ;;
Packit 64f477
	      *) perm_rpath="$perm_rpath $libdir" ;;
Packit 64f477
	      esac
Packit 64f477
	    fi
Packit 64f477
	  done
Packit 64f477
	  # Substitute the hardcoded libdirs into the rpath.
Packit 64f477
	  if test -n "$hardcode_libdir_separator" &&
Packit 64f477
	     test -n "$hardcode_libdirs"; then
Packit 64f477
	    libdir="$hardcode_libdirs"
Packit 64f477
	    eval dep_rpath=\"$hardcode_libdir_flag_spec\"
Packit 64f477
	  fi
Packit 64f477
	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
Packit 64f477
	    # We should set the runpath_var.
Packit 64f477
	    rpath=
Packit 64f477
	    for dir in $perm_rpath; do
Packit 64f477
	      rpath="$rpath$dir:"
Packit 64f477
	    done
Packit 64f477
	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
Packit 64f477
	  fi
Packit 64f477
	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	shlibpath="$finalize_shlibpath"
Packit 64f477
	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
Packit 64f477
	if test -n "$shlibpath"; then
Packit 64f477
	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	# Get the real and link names of the library.
Packit 64f477
	eval library_names=\"$library_names_spec\"
Packit 64f477
	set dummy $library_names
Packit 64f477
	realname="$2"
Packit 64f477
	shift; shift
Packit 64f477
Packit 64f477
	if test -n "$soname_spec"; then
Packit 64f477
	  eval soname=\"$soname_spec\"
Packit 64f477
	else
Packit 64f477
	  soname="$realname"
Packit 64f477
	fi
Packit 64f477
	test -z "$dlname" && dlname=$soname
Packit 64f477
Packit 64f477
	lib="$output_objdir/$realname"
Packit 64f477
	for link
Packit 64f477
	do
Packit 64f477
	  linknames="$linknames $link"
Packit 64f477
	done
Packit 64f477
Packit 64f477
	# Ensure that we have .o objects for linkers which dislike .lo
Packit 64f477
	# (e.g. aix) in case we are running --disable-static
Packit 64f477
	for obj in $libobjs; do
Packit 64f477
	  xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
Packit 64f477
	  if test "X$xdir" = "X$obj"; then
Packit 64f477
	    xdir="."
Packit 64f477
	  else
Packit 64f477
	    xdir="$xdir"
Packit 64f477
	  fi
Packit 64f477
	  baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
Packit 64f477
	  oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
Packit 64f477
	  if test ! -f $xdir/$oldobj; then
Packit 64f477
	    $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
Packit 64f477
	    $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
Packit 64f477
	  fi
Packit 64f477
	done
Packit 64f477
Packit 64f477
	# Use standard objects if they are pic
Packit 64f477
	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
Packit 64f477
Packit 64f477
	# Prepare the list of exported symbols
Packit 64f477
	if test -z "$export_symbols"; then
Packit 64f477
	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
Packit 64f477
	    $show "generating symbol list for \`$libname.la'"
Packit 64f477
	    export_symbols="$output_objdir/$libname.exp"
Packit 64f477
	    $run $rm $export_symbols
Packit 64f477
	    eval cmds=\"$export_symbols_cmds\"
Packit 64f477
	    save_ifs="$IFS"; IFS='~'
Packit 64f477
	    for cmd in $cmds; do
Packit 64f477
	      IFS="$save_ifs"
Packit 64f477
	      $show "$cmd"
Packit 64f477
	      $run eval "$cmd" || exit $?
Packit 64f477
	    done
Packit 64f477
	    IFS="$save_ifs"
Packit 64f477
	    if test -n "$export_symbols_regex"; then
Packit 64f477
	      $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
Packit 64f477
	      $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
Packit 64f477
	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
Packit 64f477
	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
Packit 64f477
	    fi
Packit 64f477
	  fi
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	if test -n "$export_symbols" && test -n "$include_expsyms"; then
Packit 64f477
	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	if test -n "$convenience"; then
Packit 64f477
	  if test -n "$whole_archive_flag_spec"; then
Packit 64f477
	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
Packit 64f477
	  else
Packit 64f477
	    gentop="$output_objdir/${outputname}x"
Packit 64f477
	    $show "${rm}r $gentop"
Packit 64f477
	    $run ${rm}r "$gentop"
Packit 64f477
	    $show "mkdir $gentop"
Packit 64f477
	    $run mkdir "$gentop"
Packit 64f477
	    status=$?
Packit 64f477
	    if test $status -ne 0 && test ! -d "$gentop"; then
Packit 64f477
	      exit $status
Packit 64f477
	    fi
Packit 64f477
	    generated="$generated $gentop"
Packit 64f477
Packit 64f477
	    for xlib in $convenience; do
Packit 64f477
	      # Extract the objects.
Packit 64f477
	      case $xlib in
Packit 64f477
	      [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
Packit 64f477
	      *) xabs=`pwd`"/$xlib" ;;
Packit 64f477
	      esac
Packit 64f477
	      xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
Packit 64f477
	      xdir="$gentop/$xlib"
Packit 64f477
Packit 64f477
	      $show "${rm}r $xdir"
Packit 64f477
	      $run ${rm}r "$xdir"
Packit 64f477
	      $show "mkdir $xdir"
Packit 64f477
	      $run mkdir "$xdir"
Packit 64f477
	      status=$?
Packit 64f477
	      if test $status -ne 0 && test ! -d "$xdir"; then
Packit 64f477
		exit $status
Packit 64f477
	      fi
Packit 64f477
	      $show "(cd $xdir && $AR x $xabs)"
Packit 64f477
	      $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
Packit 64f477
Packit 64f477
	      libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
Packit 64f477
	    done
Packit 64f477
	  fi
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
Packit 64f477
	  eval flag=\"$thread_safe_flag_spec\"
Packit 64f477
	  linker_flags="$linker_flags $flag"
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	# Make a backup of the uninstalled library when relinking
Packit 64f477
	if test "$mode" = relink; then
Packit 64f477
	  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	# Do each of the archive commands.
Packit 64f477
	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
Packit 64f477
	  eval cmds=\"$archive_expsym_cmds\"
Packit 64f477
	else
Packit 64f477
	  eval cmds=\"$archive_cmds\"
Packit 64f477
	fi
Packit 64f477
	save_ifs="$IFS"; IFS='~'
Packit 64f477
	for cmd in $cmds; do
Packit 64f477
	  IFS="$save_ifs"
Packit 64f477
	  $show "$cmd"
Packit 64f477
	  $run eval "$cmd" || exit $?
Packit 64f477
	done
Packit 64f477
	IFS="$save_ifs"
Packit 64f477
Packit 64f477
	# Restore the uninstalled library and exit
Packit 64f477
	if test "$mode" = relink; then
Packit 64f477
	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
Packit 64f477
	  exit 0
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	# Create links to the real library.
Packit 64f477
	for linkname in $linknames; do
Packit 64f477
	  if test "$realname" != "$linkname"; then
Packit 64f477
	    $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
Packit 64f477
	    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
Packit 64f477
	  fi
Packit 64f477
	done
Packit 64f477
Packit 64f477
	# If -module or -export-dynamic was specified, set the dlname.
Packit 64f477
	if test "$module" = yes || test "$export_dynamic" = yes; then
Packit 64f477
	  # On all known operating systems, these are identical.
Packit 64f477
	  dlname="$soname"
Packit 64f477
	fi
Packit 64f477
      fi
Packit 64f477
      ;;
Packit 64f477
Packit 64f477
    obj)
Packit 64f477
      if test -n "$deplibs"; then
Packit 64f477
	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
Packit 64f477
	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      if test -n "$rpath"; then
Packit 64f477
	$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      if test -n "$xrpath"; then
Packit 64f477
	$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      if test -n "$vinfo"; then
Packit 64f477
	$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      if test -n "$release"; then
Packit 64f477
	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      case $output in
Packit 64f477
      *.lo)
Packit 64f477
	if test -n "$objs$old_deplibs"; then
Packit 64f477
	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
Packit 64f477
	  exit 1
Packit 64f477
	fi
Packit 64f477
	libobj="$output"
Packit 64f477
	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
Packit 64f477
	;;
Packit 64f477
      *)
Packit 64f477
	libobj=
Packit 64f477
	obj="$output"
Packit 64f477
	;;
Packit 64f477
      esac
Packit 64f477
Packit 64f477
      # Delete the old objects.
Packit 64f477
      $run $rm $obj $libobj
Packit 64f477
Packit 64f477
      # Objects from convenience libraries.  This assumes
Packit 64f477
      # single-version convenience libraries.  Whenever we create
Packit 64f477
      # different ones for PIC/non-PIC, this we'll have to duplicate
Packit 64f477
      # the extraction.
Packit 64f477
      reload_conv_objs=
Packit 64f477
      gentop=
Packit 64f477
      # reload_cmds runs $LD directly, so let us get rid of
Packit 64f477
      # -Wl from whole_archive_flag_spec
Packit 64f477
      wl=
Packit 64f477
Packit 64f477
      if test -n "$convenience"; then
Packit 64f477
	if test -n "$whole_archive_flag_spec"; then
Packit 64f477
	  eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
Packit 64f477
	else
Packit 64f477
	  gentop="$output_objdir/${obj}x"
Packit 64f477
	  $show "${rm}r $gentop"
Packit 64f477
	  $run ${rm}r "$gentop"
Packit 64f477
	  $show "mkdir $gentop"
Packit 64f477
	  $run mkdir "$gentop"
Packit 64f477
	  status=$?
Packit 64f477
	  if test $status -ne 0 && test ! -d "$gentop"; then
Packit 64f477
	    exit $status
Packit 64f477
	  fi
Packit 64f477
	  generated="$generated $gentop"
Packit 64f477
Packit 64f477
	  for xlib in $convenience; do
Packit 64f477
	    # Extract the objects.
Packit 64f477
	    case $xlib in
Packit 64f477
	    [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
Packit 64f477
	    *) xabs=`pwd`"/$xlib" ;;
Packit 64f477
	    esac
Packit 64f477
	    xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
Packit 64f477
	    xdir="$gentop/$xlib"
Packit 64f477
Packit 64f477
	    $show "${rm}r $xdir"
Packit 64f477
	    $run ${rm}r "$xdir"
Packit 64f477
	    $show "mkdir $xdir"
Packit 64f477
	    $run mkdir "$xdir"
Packit 64f477
	    status=$?
Packit 64f477
	    if test $status -ne 0 && test ! -d "$xdir"; then
Packit 64f477
	      exit $status
Packit 64f477
	    fi
Packit 64f477
	    $show "(cd $xdir && $AR x $xabs)"
Packit 64f477
	    $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
Packit 64f477
Packit 64f477
	    reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
Packit 64f477
	  done
Packit 64f477
	fi
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      # Create the old-style object.
Packit 64f477
      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
Packit 64f477
Packit 64f477
      output="$obj"
Packit 64f477
      eval cmds=\"$reload_cmds\"
Packit 64f477
      save_ifs="$IFS"; IFS='~'
Packit 64f477
      for cmd in $cmds; do
Packit 64f477
	IFS="$save_ifs"
Packit 64f477
	$show "$cmd"
Packit 64f477
	$run eval "$cmd" || exit $?
Packit 64f477
      done
Packit 64f477
      IFS="$save_ifs"
Packit 64f477
Packit 64f477
      # Exit if we aren't doing a library object file.
Packit 64f477
      if test -z "$libobj"; then
Packit 64f477
	if test -n "$gentop"; then
Packit 64f477
	  $show "${rm}r $gentop"
Packit 64f477
	  $run ${rm}r $gentop
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	exit 0
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      if test "$build_libtool_libs" != yes; then
Packit 64f477
	if test -n "$gentop"; then
Packit 64f477
	  $show "${rm}r $gentop"
Packit 64f477
	  $run ${rm}r $gentop
Packit 64f477
	fi
Packit 64f477
Packit 64f477
	# Create an invalid libtool object if no PIC, so that we don't
Packit 64f477
	# accidentally link it into a program.
Packit 64f477
	$show "echo timestamp > $libobj"
Packit 64f477
	$run eval "echo timestamp > $libobj" || exit $?
Packit 64f477
	exit 0
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      if test -n "$pic_flag" || test "$pic_mode" != default; then
Packit 64f477
	# Only do commands if we really have different PIC objects.
Packit 64f477
	reload_objs="$libobjs $reload_conv_objs"
Packit 64f477
	output="$libobj"
Packit 64f477
	eval cmds=\"$reload_cmds\"
Packit 64f477
	save_ifs="$IFS"; IFS='~'
Packit 64f477
	for cmd in $cmds; do
Packit 64f477
	  IFS="$save_ifs"
Packit 64f477
	  $show "$cmd"
Packit 64f477
	  $run eval "$cmd" || exit $?
Packit 64f477
	done
Packit 64f477
	IFS="$save_ifs"
Packit 64f477
      else
Packit 64f477
	# Just create a symlink.
Packit 64f477
	$show $rm $libobj
Packit 64f477
	$run $rm $libobj
Packit 64f477
	xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
Packit 64f477
	if test "X$xdir" = "X$libobj"; then
Packit 64f477
	  xdir="."
Packit 64f477
	else
Packit 64f477
	  xdir="$xdir"
Packit 64f477
	fi
Packit 64f477
	baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
Packit 64f477
	oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
Packit 64f477
	$show "(cd $xdir && $LN_S $oldobj $baseobj)"
Packit 64f477
	$run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      if test -n "$gentop"; then
Packit 64f477
	$show "${rm}r $gentop"
Packit 64f477
	$run ${rm}r $gentop
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      exit 0
Packit 64f477
      ;;
Packit 64f477
Packit 64f477
    prog)
Packit 64f477
      case $host in
Packit 64f477
	*cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
Packit 64f477
      esac
Packit 64f477
      if test -n "$vinfo"; then
Packit 64f477
	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      if test -n "$release"; then
Packit 64f477
	$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      if test "$preload" = yes; then
Packit 64f477
	if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
Packit 64f477
	   test "$dlopen_self_static" = unknown; then
Packit 64f477
	  $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
Packit 64f477
	fi
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      case $host in
Packit 64f477
      *-*-rhapsody* | *-*-darwin1.[012])
Packit 64f477
	# On Rhapsody replace the C library is the System framework
Packit 64f477
	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
Packit 64f477
	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
Packit 64f477
	;;
Packit 64f477
      esac
Packit 64f477
Packit 64f477
      compile_command="$compile_command $compile_deplibs"
Packit 64f477
      finalize_command="$finalize_command $finalize_deplibs"
Packit 64f477
Packit 64f477
      if test -n "$rpath$xrpath"; then
Packit 64f477
	# If the user specified any rpath flags, then add them.
Packit 64f477
	for libdir in $rpath $xrpath; do
Packit 64f477
	  # This is the magic to use -rpath.
Packit 64f477
	  case "$finalize_rpath " in
Packit 64f477
	  *" $libdir "*) ;;
Packit 64f477
	  *) finalize_rpath="$finalize_rpath $libdir" ;;
Packit 64f477
	  esac
Packit 64f477
	done
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      # Now hardcode the library paths
Packit 64f477
      rpath=
Packit 64f477
      hardcode_libdirs=
Packit 64f477
      for libdir in $compile_rpath $finalize_rpath; do
Packit 64f477
	if test -n "$hardcode_libdir_flag_spec"; then
Packit 64f477
	  if test -n "$hardcode_libdir_separator"; then
Packit 64f477
	    if test -z "$hardcode_libdirs"; then
Packit 64f477
	      hardcode_libdirs="$libdir"
Packit 64f477
	    else
Packit 64f477
	      # Just accumulate the unique libdirs.
Packit 64f477
	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
Packit 64f477
	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
Packit 64f477
		;;
Packit 64f477
	      *)
Packit 64f477
		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
Packit 64f477
		;;
Packit 64f477
	      esac
Packit 64f477
	    fi
Packit 64f477
	  else
Packit 64f477
	    eval flag=\"$hardcode_libdir_flag_spec\"
Packit 64f477
	    rpath="$rpath $flag"
Packit 64f477
	  fi
Packit 64f477
	elif test -n "$runpath_var"; then
Packit 64f477
	  case "$perm_rpath " in
Packit 64f477
	  *" $libdir "*) ;;
Packit 64f477
	  *) perm_rpath="$perm_rpath $libdir" ;;
Packit 64f477
	  esac
Packit 64f477
	fi
Packit 64f477
	case $host in
Packit 64f477
	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
Packit 64f477
	  case :$dllsearchpath: in
Packit 64f477
	  *":$libdir:"*) ;;
Packit 64f477
	  *) dllsearchpath="$dllsearchpath:$libdir";;
Packit 64f477
	  esac
Packit 64f477
	  ;;
Packit 64f477
	esac
Packit 64f477
      done
Packit 64f477
      # Substitute the hardcoded libdirs into the rpath.
Packit 64f477
      if test -n "$hardcode_libdir_separator" &&
Packit 64f477
	 test -n "$hardcode_libdirs"; then
Packit 64f477
	libdir="$hardcode_libdirs"
Packit 64f477
	eval rpath=\" $hardcode_libdir_flag_spec\"
Packit 64f477
      fi
Packit 64f477
      compile_rpath="$rpath"
Packit 64f477
Packit 64f477
      rpath=
Packit 64f477
      hardcode_libdirs=
Packit 64f477
      for libdir in $finalize_rpath; do
Packit 64f477
	if test -n "$hardcode_libdir_flag_spec"; then
Packit 64f477
	  if test -n "$hardcode_libdir_separator"; then
Packit 64f477
	    if test -z "$hardcode_libdirs"; then
Packit 64f477
	      hardcode_libdirs="$libdir"
Packit 64f477
	    else
Packit 64f477
	      # Just accumulate the unique libdirs.
Packit 64f477
	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
Packit 64f477
	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
Packit 64f477
		;;
Packit 64f477
	      *)
Packit 64f477
		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
Packit 64f477
		;;
Packit 64f477
	      esac
Packit 64f477
	    fi
Packit 64f477
	  else
Packit 64f477
	    eval flag=\"$hardcode_libdir_flag_spec\"
Packit 64f477
	    rpath="$rpath $flag"
Packit 64f477
	  fi
Packit 64f477
	elif test -n "$runpath_var"; then
Packit 64f477
	  case "$finalize_perm_rpath " in
Packit 64f477
	  *" $libdir "*) ;;
Packit 64f477
	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
Packit 64f477
	  esac
Packit 64f477
	fi
Packit 64f477
      done
Packit 64f477
      # Substitute the hardcoded libdirs into the rpath.
Packit 64f477
      if test -n "$hardcode_libdir_separator" &&
Packit 64f477
	 test -n "$hardcode_libdirs"; then
Packit 64f477
	libdir="$hardcode_libdirs"
Packit 64f477
	eval rpath=\" $hardcode_libdir_flag_spec\"
Packit 64f477
      fi
Packit 64f477
      finalize_rpath="$rpath"
Packit 64f477
Packit 64f477
      if test -n "$libobjs" && test "$build_old_libs" = yes; then
Packit 64f477
	# Transform all the library objects into standard objects.
Packit 64f477
	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
Packit 64f477
	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      dlsyms=
Packit 64f477
      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
Packit 64f477
	if test -n "$NM" && test -n "$global_symbol_pipe"; then
Packit 64f477
	  dlsyms="${outputname}S.c"
Packit 64f477
	else
Packit 64f477
	  $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
Packit 64f477
	fi
Packit 64f477
      fi
Packit 64f477
Packit 64f477
      if test -n "$dlsyms"; then
Packit 64f477
	case $dlsyms in
Packit 64f477
	"") ;;
Packit 64f477
	*.c)
Packit 64f477
	  # Discover the nlist of each of the dlfiles.
Packit 64f477
	  nlist="$output_objdir/${outputname}.nm"
Packit 64f477
Packit 64f477
	  $show "$rm $nlist ${nlist}S ${nlist}T"
Packit 64f477
	  $run $rm "$nlist" "${nlist}S" "${nlist}T"
Packit 64f477
Packit 64f477
	  # Parse the name list into a source file.
Packit 64f477
	  $show "creating $output_objdir/$dlsyms"
Packit 64f477
Packit 64f477
	  test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
Packit 64f477
/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
Packit 64f477
/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
Packit 64f477
Packit 64f477
#ifdef __cplusplus
Packit 64f477
extern \"C\" {
Packit 64f477
#endif
Packit 64f477
Packit 64f477
/* Prevent the only kind of declaration conflicts we can make. */
Packit 64f477
#define lt_preloaded_symbols some_other_symbol
Packit 64f477
Packit 64f477
/* External symbol declarations for the compiler. */\
Packit 64f477
"
Packit 64f477
Packit 64f477
	  if test "$dlself" = yes; then
Packit 64f477
	    $show "generating symbol list for \`$output'"
Packit 64f477
Packit 64f477
	    test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
Packit 64f477
Packit 64f477
	    # Add our own program objects to the symbol list.
Packit 64f477
	    progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
Packit 64f477
	    for arg in $progfiles; do
Packit 64f477
	      $show "extracting global C symbols from \`$arg'"
Packit 64f477
	      $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
Packit 64f477
	    done
Packit 64f477
Packit 64f477
	    if test -n "$exclude_expsyms"; then
Packit 64f477
	      $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
Packit 64f477
	      $run eval '$mv "$nlist"T "$nlist"'
Packit 64f477
	    fi
Packit 64f477
Packit 64f477
	    if test -n "$export_symbols_regex"; then
Packit 64f477
	      $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
Packit 64f477
	      $run eval '$mv "$nlist"T "$nlist"'
Packit 64f477
	    fi
Packit 64f477
Packit 64f477
	    # Prepare the list of exported symbols
Packit 64f477
	    if test -z "$export_symbols"; then
Packit 64f477
	      export_symbols="$output_objdir/$output.exp"
Packit 64f477
	      $run $rm $export_symbols
Packit 64f477
	      $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
Packit 64f477
	    else
Packit 64f477
	      $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
Packit 64f477
	      $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
Packit 64f477
	      $run eval 'mv "$nlist"T "$nlist"'
Packit 64f477
	    fi
Packit 64f477
	  fi
Packit 64f477
Packit 64f477
	  for arg in $dlprefiles; do
Packit 64f477
	    $show "extracting global C symbols from \`$arg'"
Packit 64f477
	    name=`echo "$arg" | sed -e 's%^.*/%%'`
Packit 64f477
	    $run eval 'echo ": $name " >> "$nlist"'
Packit 64f477
	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
Packit 64f477
	  done
Packit 64f477
Packit 64f477
	  if test -z "$run"; then
Packit 64f477
	    # Make sure we have at least an empty file.
Packit 64f477
	    test -f "$nlist" || : > "$nlist"
Packit 64f477
Packit 64f477
	    if test -n "$exclude_expsyms"; then
Packit 64f477
	      egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
Packit 64f477
	      $mv "$nlist"T "$nlist"
Packit 64f477
	    fi
Packit 64f477
Packit 64f477
	    # Try sorting and uniquifying the output.
Packit 64f477
	    if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
Packit 64f477
	      :
Packit 64f477
	    else
Packit 64f477
	      grep -v "^: " < "$nlist" > "$nlist"S
Packit 64f477
	    fi
Packit 64f477
Packit 64f477
	    if test -f "$nlist"S; then
Packit 64f477
	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
Packit 64f477
	    else
Packit 64f477
	      echo '/* NONE */' >> "$output_objdir/$dlsyms"
Packit 64f477
	    fi
Packit 64f477
Packit 64f477
	    $echo >> "$output_objdir/$dlsyms" "\
Packit 64f477
Packit 64f477
#undef lt_preloaded_symbols
Packit 64f477
Packit 64f477
#if defined (__STDC__) && __STDC__
Packit 64f477
# define lt_ptr void *
Packit 64f477
#else
Packit 64f477
# define lt_ptr char *
Packit 64f477
# define const
Packit 64f477
#endif
Packit 64f477
Packit 64f477
/* The mapping between symbol names and symbols. */
Packit 64f477
const struct {
Packit 64f477
  const char *name;
Packit 64f477
  lt_ptr address;
Packit 64f477
}
Packit 64f477
lt_preloaded_symbols[] =
Packit 64f477
{\
Packit 64f477
"
Packit 64f477
Packit 64f477
	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
Packit 64f477
Packit 64f477
	    $echo >> "$output_objdir/$dlsyms" "\
Packit