Blame ltmain.sh

Packit 022b05
# ltmain.sh - Provide generalized library-building support services.
Packit 022b05
# NOTE: Changing this file will not affect anything until you rerun configure.
Packit 022b05
#
Packit 022b05
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
Packit 022b05
# Free Software Foundation, Inc.
Packit 022b05
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
Packit 022b05
#
Packit 022b05
# This program is free software; you can redistribute it and/or modify
Packit 022b05
# it under the terms of the GNU General Public License as published by
Packit 022b05
# the Free Software Foundation; either version 2 of the License, or
Packit 022b05
# (at your option) any later version.
Packit 022b05
#
Packit 022b05
# This program is distributed in the hope that it will be useful, but
Packit 022b05
# WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 022b05
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 022b05
# General Public License for more details.
Packit 022b05
#
Packit 022b05
# You should have received a copy of the GNU General Public License
Packit 022b05
# along with this program; if not, write to the Free Software
Packit 022b05
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Packit 022b05
#
Packit 022b05
# As a special exception to the GNU General Public License, if you
Packit 022b05
# distribute this file as part of a program that contains a
Packit 022b05
# configuration script generated by Autoconf, you may include it under
Packit 022b05
# the same distribution terms that you use for the rest of that program.
Packit 022b05
Packit 022b05
basename="s,^.*/,,g"
Packit 022b05
Packit 022b05
# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
Packit 022b05
# is ksh but when the shell is invoked as "sh" and the current value of
Packit 022b05
# the _XPG environment variable is not equal to 1 (one), the special
Packit 022b05
# positional parameter $0, within a function call, is the name of the
Packit 022b05
# function.
Packit 022b05
progpath="$0"
Packit 022b05
Packit 022b05
# The name of this program:
Packit 022b05
progname=`echo "$progpath" | $SED $basename`
Packit 022b05
modename="$progname"
Packit 022b05
Packit 022b05
# Global variables:
Packit 022b05
EXIT_SUCCESS=0
Packit 022b05
EXIT_FAILURE=1
Packit 022b05
Packit 022b05
PROGRAM=ltmain.sh
Packit 022b05
PACKAGE=libtool
Packit 022b05
VERSION="1.5.22 Debian 1.5.22-4"
Packit 022b05
TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)"
Packit 022b05
Packit 022b05
# See if we are running on zsh, and set the options which allow our
Packit 022b05
# commands through without removal of \ escapes.
Packit 022b05
if test -n "${ZSH_VERSION+set}" ; then
Packit 022b05
  setopt NO_GLOB_SUBST
Packit 022b05
fi
Packit 022b05
Packit 022b05
# Check that we have a working $echo.
Packit 022b05
if test "X$1" = X--no-reexec; then
Packit 022b05
  # Discard the --no-reexec flag, and continue.
Packit 022b05
  shift
Packit 022b05
elif test "X$1" = X--fallback-echo; then
Packit 022b05
  # Avoid inline document here, it may be left over
Packit 022b05
  :
Packit 022b05
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
Packit 022b05
  # Yippee, $echo works!
Packit 022b05
  :
Packit 022b05
else
Packit 022b05
  # Restart under the correct shell, and then maybe $echo will work.
Packit 022b05
  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
Packit 022b05
fi
Packit 022b05
Packit 022b05
if test "X$1" = X--fallback-echo; then
Packit 022b05
  # used as fallback echo
Packit 022b05
  shift
Packit 022b05
  cat <
Packit 022b05
$*
Packit 022b05
EOF
Packit 022b05
  exit $EXIT_SUCCESS
Packit 022b05
fi
Packit 022b05
Packit 022b05
default_mode=
Packit 022b05
help="Try \`$progname --help' for more information."
Packit 022b05
magic="%%%MAGIC variable%%%"
Packit 022b05
mkdir="mkdir"
Packit 022b05
mv="mv -f"
Packit 022b05
rm="rm -f"
Packit 022b05
Packit 022b05
# Sed substitution that helps us do robust quoting.  It backslashifies
Packit 022b05
# metacharacters that are still active within double-quoted strings.
Packit 022b05
Xsed="${SED}"' -e 1s/^X//'
Packit 022b05
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
Packit 022b05
# test EBCDIC or ASCII
Packit 022b05
case `echo X|tr X '\101'` in
Packit 022b05
 A) # ASCII based system
Packit 022b05
    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
Packit 022b05
  SP2NL='tr \040 \012'
Packit 022b05
  NL2SP='tr \015\012 \040\040'
Packit 022b05
  ;;
Packit 022b05
 *) # EBCDIC based system
Packit 022b05
  SP2NL='tr \100 \n'
Packit 022b05
  NL2SP='tr \r\n \100\100'
Packit 022b05
  ;;
Packit 022b05
esac
Packit 022b05
Packit 022b05
# NLS nuisances.
Packit 022b05
# Only set LANG and LC_ALL to C if already set.
Packit 022b05
# These must not be set unconditionally because not all systems understand
Packit 022b05
# e.g. LANG=C (notably SCO).
Packit 022b05
# We save the old values to restore during execute mode.
Packit 022b05
if test "${LC_ALL+set}" = set; then
Packit 022b05
  save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
Packit 022b05
fi
Packit 022b05
if test "${LANG+set}" = set; then
Packit 022b05
  save_LANG="$LANG"; LANG=C; export LANG
Packit 022b05
fi
Packit 022b05
Packit 022b05
# Make sure IFS has a sensible default
Packit 022b05
lt_nl='
Packit 022b05
'
Packit 022b05
IFS=" 	$lt_nl"
Packit 022b05
Packit 022b05
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
Packit 022b05
  $echo "$modename: not configured to build any kind of library" 1>&2
Packit 022b05
  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
Packit 022b05
  exit $EXIT_FAILURE
Packit 022b05
fi
Packit 022b05
Packit 022b05
# Global variables.
Packit 022b05
mode=$default_mode
Packit 022b05
nonopt=
Packit 022b05
prev=
Packit 022b05
prevopt=
Packit 022b05
run=
Packit 022b05
show="$echo"
Packit 022b05
show_help=
Packit 022b05
execute_dlfiles=
Packit 022b05
duplicate_deps=no
Packit 022b05
preserve_args=
Packit 022b05
lo2o="s/\\.lo\$/.${objext}/"
Packit 022b05
o2lo="s/\\.${objext}\$/.lo/"
Packit 022b05
Packit 022b05
#####################################
Packit 022b05
# Shell function definitions:
Packit 022b05
# This seems to be the best place for them
Packit 022b05
Packit 022b05
# func_mktempdir [string]
Packit 022b05
# Make a temporary directory that won't clash with other running
Packit 022b05
# libtool processes, and avoids race conditions if possible.  If
Packit 022b05
# given, STRING is the basename for that directory.
Packit 022b05
func_mktempdir ()
Packit 022b05
{
Packit 022b05
    my_template="${TMPDIR-/tmp}/${1-$progname}"
Packit 022b05
Packit 022b05
    if test "$run" = ":"; then
Packit 022b05
      # Return a directory name, but don't create it in dry-run mode
Packit 022b05
      my_tmpdir="${my_template}-$$"
Packit 022b05
    else
Packit 022b05
Packit 022b05
      # If mktemp works, use that first and foremost
Packit 022b05
      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
Packit 022b05
Packit 022b05
      if test ! -d "$my_tmpdir"; then
Packit 022b05
	# Failing that, at least try and use $RANDOM to avoid a race
Packit 022b05
	my_tmpdir="${my_template}-${RANDOM-0}$$"
Packit 022b05
Packit 022b05
	save_mktempdir_umask=`umask`
Packit 022b05
	umask 0077
Packit 022b05
	$mkdir "$my_tmpdir"
Packit 022b05
	umask $save_mktempdir_umask
Packit 022b05
      fi
Packit 022b05
Packit 022b05
      # If we're not in dry-run mode, bomb out on failure
Packit 022b05
      test -d "$my_tmpdir" || {
Packit 022b05
        $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
Packit 022b05
	exit $EXIT_FAILURE
Packit 022b05
      }
Packit 022b05
    fi
Packit 022b05
Packit 022b05
    $echo "X$my_tmpdir" | $Xsed
Packit 022b05
}
Packit 022b05
Packit 022b05
Packit 022b05
# func_win32_libid arg
Packit 022b05
# return the library type of file 'arg'
Packit 022b05
#
Packit 022b05
# Need a lot of goo to handle *both* DLLs and import libs
Packit 022b05
# Has to be a shell function in order to 'eat' the argument
Packit 022b05
# that is supplied when $file_magic_command is called.
Packit 022b05
func_win32_libid ()
Packit 022b05
{
Packit 022b05
  win32_libid_type="unknown"
Packit 022b05
  win32_fileres=`file -L $1 2>/dev/null`
Packit 022b05
  case $win32_fileres in
Packit 022b05
  *ar\ archive\ import\ library*) # definitely import
Packit 022b05
    win32_libid_type="x86 archive import"
Packit 022b05
    ;;
Packit 022b05
  *ar\ archive*) # could be an import, or static
Packit 022b05
    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
Packit 022b05
      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
Packit 022b05
      win32_nmres=`eval $NM -f posix -A $1 | \
Packit 022b05
	$SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'`
Packit 022b05
      case $win32_nmres in
Packit 022b05
      import*)  win32_libid_type="x86 archive import";;
Packit 022b05
      *)        win32_libid_type="x86 archive static";;
Packit 022b05
      esac
Packit 022b05
    fi
Packit 022b05
    ;;
Packit 022b05
  *DLL*)
Packit 022b05
    win32_libid_type="x86 DLL"
Packit 022b05
    ;;
Packit 022b05
  *executable*) # but shell scripts are "executable" too...
Packit 022b05
    case $win32_fileres in
Packit 022b05
    *MS\ Windows\ PE\ Intel*)
Packit 022b05
      win32_libid_type="x86 DLL"
Packit 022b05
      ;;
Packit 022b05
    esac
Packit 022b05
    ;;
Packit 022b05
  esac
Packit 022b05
  $echo $win32_libid_type
Packit 022b05
}
Packit 022b05
Packit 022b05
Packit 022b05
# func_infer_tag arg
Packit 022b05
# Infer tagged configuration to use if any are available and
Packit 022b05
# if one wasn't chosen via the "--tag" command line option.
Packit 022b05
# Only attempt this if the compiler in the base compile
Packit 022b05
# command doesn't match the default compiler.
Packit 022b05
# arg is usually of the form 'gcc ...'
Packit 022b05
func_infer_tag ()
Packit 022b05
{
Packit 022b05
    if test -n "$available_tags" && test -z "$tagname"; then
Packit 022b05
      CC_quoted=
Packit 022b05
      for arg in $CC; do
Packit 022b05
	case $arg in
Packit 022b05
	  *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
Packit 022b05
	  arg="\"$arg\""
Packit 022b05
	  ;;
Packit 022b05
	esac
Packit 022b05
	CC_quoted="$CC_quoted $arg"
Packit 022b05
      done
Packit 022b05
      case $@ in
Packit 022b05
      # Blanks in the command may have been stripped by the calling shell,
Packit 022b05
      # but not from the CC environment variable when configure was run.
Packit 022b05
      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
Packit 022b05
      # Blanks at the start of $base_compile will cause this to fail
Packit 022b05
      # if we don't check for them as well.
Packit 022b05
      *)
Packit 022b05
	for z in $available_tags; do
Packit 022b05
	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
Packit 022b05
	    # Evaluate the configuration.
Packit 022b05
	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
Packit 022b05
	    CC_quoted=
Packit 022b05
	    for arg in $CC; do
Packit 022b05
	    # Double-quote args containing other shell metacharacters.
Packit 022b05
	    case $arg in
Packit 022b05
	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
Packit 022b05
	      arg="\"$arg\""
Packit 022b05
	      ;;
Packit 022b05
	    esac
Packit 022b05
	    CC_quoted="$CC_quoted $arg"
Packit 022b05
	  done
Packit 022b05
	    case "$@ " in
Packit 022b05
	      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
Packit 022b05
	      # The compiler in the base compile command matches
Packit 022b05
	      # the one in the tagged configuration.
Packit 022b05
	      # Assume this is the tagged configuration we want.
Packit 022b05
	      tagname=$z
Packit 022b05
	      break
Packit 022b05
	      ;;
Packit 022b05
	    esac
Packit 022b05
	  fi
Packit 022b05
	done
Packit 022b05
	# If $tagname still isn't set, then no tagged configuration
Packit 022b05
	# was found and let the user know that the "--tag" command
Packit 022b05
	# line option must be used.
Packit 022b05
	if test -z "$tagname"; then
Packit 022b05
	  $echo "$modename: unable to infer tagged configuration"
Packit 022b05
	  $echo "$modename: specify a tag with \`--tag'" 1>&2
Packit 022b05
	  exit $EXIT_FAILURE
Packit 022b05
#        else
Packit 022b05
#          $echo "$modename: using $tagname tagged configuration"
Packit 022b05
	fi
Packit 022b05
	;;
Packit 022b05
      esac
Packit 022b05
    fi
Packit 022b05
}
Packit 022b05
Packit 022b05
Packit 022b05
# func_extract_an_archive dir oldlib
Packit 022b05
func_extract_an_archive ()
Packit 022b05
{
Packit 022b05
    f_ex_an_ar_dir="$1"; shift
Packit 022b05
    f_ex_an_ar_oldlib="$1"
Packit 022b05
Packit 022b05
    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
Packit 022b05
    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
Packit 022b05
    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1;; then
Packit 022b05
     :
Packit 022b05
    else
Packit 022b05
      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
Packit 022b05
      exit $EXIT_FAILURE
Packit 022b05
    fi
Packit 022b05
}
Packit 022b05
Packit 022b05
# func_extract_archives gentop oldlib ...
Packit 022b05
func_extract_archives ()
Packit 022b05
{
Packit 022b05
    my_gentop="$1"; shift
Packit 022b05
    my_oldlibs=${1+"$@"}
Packit 022b05
    my_oldobjs=""
Packit 022b05
    my_xlib=""
Packit 022b05
    my_xabs=""
Packit 022b05
    my_xdir=""
Packit 022b05
    my_status=""
Packit 022b05
Packit 022b05
    $show "${rm}r $my_gentop"
Packit 022b05
    $run ${rm}r "$my_gentop"
Packit 022b05
    $show "$mkdir $my_gentop"
Packit 022b05
    $run $mkdir "$my_gentop"
Packit 022b05
    my_status=$?
Packit 022b05
    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
Packit 022b05
      exit $my_status
Packit 022b05
    fi
Packit 022b05
Packit 022b05
    for my_xlib in $my_oldlibs; do
Packit 022b05
      # Extract the objects.
Packit 022b05
      case $my_xlib in
Packit 022b05
	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
Packit 022b05
	*) my_xabs=`pwd`"/$my_xlib" ;;
Packit 022b05
      esac
Packit 022b05
      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
Packit 022b05
      my_xdir="$my_gentop/$my_xlib"
Packit 022b05
Packit 022b05
      $show "${rm}r $my_xdir"
Packit 022b05
      $run ${rm}r "$my_xdir"
Packit 022b05
      $show "$mkdir $my_xdir"
Packit 022b05
      $run $mkdir "$my_xdir"
Packit 022b05
      exit_status=$?
Packit 022b05
      if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
Packit 022b05
	exit $exit_status
Packit 022b05
      fi
Packit 022b05
      case $host in
Packit 022b05
      *-darwin*)
Packit 022b05
	$show "Extracting $my_xabs"
Packit 022b05
	# Do not bother doing anything if just a dry run
Packit 022b05
	if test -z "$run"; then
Packit 022b05
	  darwin_orig_dir=`pwd`
Packit 022b05
	  cd $my_xdir || exit $?
Packit 022b05
	  darwin_archive=$my_xabs
Packit 022b05
	  darwin_curdir=`pwd`
Packit 022b05
	  darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
Packit 022b05
	  darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
Packit 022b05
	  if test -n "$darwin_arches"; then 
Packit 022b05
	    darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
Packit 022b05
	    darwin_arch=
Packit 022b05
	    $show "$darwin_base_archive has multiple architectures $darwin_arches"
Packit 022b05
	    for darwin_arch in  $darwin_arches ; do
Packit 022b05
	      mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
Packit 022b05
	      lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
Packit 022b05
	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
Packit 022b05
	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
Packit 022b05
	      cd "$darwin_curdir"
Packit 022b05
	      $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
Packit 022b05
	    done # $darwin_arches
Packit 022b05
      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
Packit 022b05
	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
Packit 022b05
	    darwin_file=
Packit 022b05
	    darwin_files=
Packit 022b05
	    for darwin_file in $darwin_filelist; do
Packit 022b05
	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
Packit 022b05
	      lipo -create -output "$darwin_file" $darwin_files
Packit 022b05
	    done # $darwin_filelist
Packit 022b05
	    ${rm}r unfat-$$
Packit 022b05
	    cd "$darwin_orig_dir"
Packit 022b05
	  else
Packit 022b05
	    cd "$darwin_orig_dir"
Packit 022b05
 	    func_extract_an_archive "$my_xdir" "$my_xabs"
Packit 022b05
	  fi # $darwin_arches
Packit 022b05
	fi # $run
Packit 022b05
	;;
Packit 022b05
      *)
Packit 022b05
        func_extract_an_archive "$my_xdir" "$my_xabs"
Packit 022b05
        ;;
Packit 022b05
      esac
Packit 022b05
      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
Packit 022b05
    done
Packit 022b05
    func_extract_archives_result="$my_oldobjs"
Packit 022b05
}
Packit 022b05
# End of Shell function definitions
Packit 022b05
#####################################
Packit 022b05
Packit 022b05
# Darwin sucks
Packit 022b05
eval std_shrext=\"$shrext_cmds\"
Packit 022b05
Packit 022b05
disable_libs=no
Packit 022b05
Packit 022b05
# Parse our command line options once, thoroughly.
Packit 022b05
while test "$#" -gt 0
Packit 022b05
do
Packit 022b05
  arg="$1"
Packit 022b05
  shift
Packit 022b05
Packit 022b05
  case $arg in
Packit 022b05
  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
Packit 022b05
  *) optarg= ;;
Packit 022b05
  esac
Packit 022b05
Packit 022b05
  # If the previous option needs an argument, assign it.
Packit 022b05
  if test -n "$prev"; then
Packit 022b05
    case $prev in
Packit 022b05
    execute_dlfiles)
Packit 022b05
      execute_dlfiles="$execute_dlfiles $arg"
Packit 022b05
      ;;
Packit 022b05
    tag)
Packit 022b05
      tagname="$arg"
Packit 022b05
      preserve_args="${preserve_args}=$arg"
Packit 022b05
Packit 022b05
      # Check whether tagname contains only valid characters
Packit 022b05
      case $tagname in
Packit 022b05
      *[!-_A-Za-z0-9,/]*)
Packit 022b05
	$echo "$progname: invalid tag name: $tagname" 1>&2
Packit 022b05
	exit $EXIT_FAILURE
Packit 022b05
	;;
Packit 022b05
      esac
Packit 022b05
Packit 022b05
      case $tagname in
Packit 022b05
      CC)
Packit 022b05
	# Don't test for the "default" C tag, as we know, it's there, but
Packit 022b05
	# not specially marked.
Packit 022b05
	;;
Packit 022b05
      *)
Packit 022b05
	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
Packit 022b05
	  taglist="$taglist $tagname"
Packit 022b05
	  # Evaluate the configuration.
Packit 022b05
	  eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
Packit 022b05
	else
Packit 022b05
	  $echo "$progname: ignoring unknown tag $tagname" 1>&2
Packit 022b05
	fi
Packit 022b05
	;;
Packit 022b05
      esac
Packit 022b05
      ;;
Packit 022b05
    *)
Packit 022b05
      eval "$prev=\$arg"
Packit 022b05
      ;;
Packit 022b05
    esac
Packit 022b05
Packit 022b05
    prev=
Packit 022b05
    prevopt=
Packit 022b05
    continue
Packit 022b05
  fi
Packit 022b05
Packit 022b05
  # Have we seen a non-optional argument yet?
Packit 022b05
  case $arg in
Packit 022b05
  --help)
Packit 022b05
    show_help=yes
Packit 022b05
    ;;
Packit 022b05
Packit 022b05
  --version)
Packit 022b05
    $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
Packit 022b05
    $echo
Packit 022b05
    $echo "Copyright (C) 2005  Free Software Foundation, Inc."
Packit 022b05
    $echo "This is free software; see the source for copying conditions.  There is NO"
Packit 022b05
    $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
Packit 022b05
    exit $?
Packit 022b05
    ;;
Packit 022b05
Packit 022b05
  --config)
Packit 022b05
    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
Packit 022b05
    # Now print the configurations for the tags.
Packit 022b05
    for tagname in $taglist; do
Packit 022b05
      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
Packit 022b05
    done
Packit 022b05
    exit $?
Packit 022b05
    ;;
Packit 022b05
Packit 022b05
  --debug)
Packit 022b05
    $echo "$progname: enabling shell trace mode"
Packit 022b05
    set -x
Packit 022b05
    preserve_args="$preserve_args $arg"
Packit 022b05
    ;;
Packit 022b05
Packit 022b05
  --dry-run | -n)
Packit 022b05
    run=:
Packit 022b05
    ;;
Packit 022b05
Packit 022b05
  --features)
Packit 022b05
    $echo "host: $host"
Packit 022b05
    if test "$build_libtool_libs" = yes; then
Packit 022b05
      $echo "enable shared libraries"
Packit 022b05
    else
Packit 022b05
      $echo "disable shared libraries"
Packit 022b05
    fi
Packit 022b05
    if test "$build_old_libs" = yes; then
Packit 022b05
      $echo "enable static libraries"
Packit 022b05
    else
Packit 022b05
      $echo "disable static libraries"
Packit 022b05
    fi
Packit 022b05
    exit $?
Packit 022b05
    ;;
Packit 022b05
Packit 022b05
  --finish) mode="finish" ;;
Packit 022b05
Packit 022b05
  --mode) prevopt="--mode" prev=mode ;;
Packit 022b05
  --mode=*) mode="$optarg" ;;
Packit 022b05
Packit 022b05
  --preserve-dup-deps) duplicate_deps="yes" ;;
Packit 022b05
Packit 022b05
  --quiet | --silent)
Packit 022b05
    show=:
Packit 022b05
    preserve_args="$preserve_args $arg"
Packit 022b05
    ;;
Packit 022b05
Packit 022b05
  --tag)
Packit 022b05
    prevopt="--tag"
Packit 022b05
    prev=tag
Packit 022b05
    preserve_args="$preserve_args --tag"
Packit 022b05
    ;;
Packit 022b05
  --tag=*)
Packit 022b05
    set tag "$optarg" ${1+"$@"}
Packit 022b05
    shift
Packit 022b05
    prev=tag
Packit 022b05
    preserve_args="$preserve_args --tag"
Packit 022b05
    ;;
Packit 022b05
Packit 022b05
  -dlopen)
Packit 022b05
    prevopt="-dlopen"
Packit 022b05
    prev=execute_dlfiles
Packit 022b05
    ;;
Packit 022b05
Packit 022b05
  -*)
Packit 022b05
    $echo "$modename: unrecognized option \`$arg'" 1>&2
Packit 022b05
    $echo "$help" 1>&2
Packit 022b05
    exit $EXIT_FAILURE
Packit 022b05
    ;;
Packit 022b05
Packit 022b05
  *)
Packit 022b05
    nonopt="$arg"
Packit 022b05
    break
Packit 022b05
    ;;
Packit 022b05
  esac
Packit 022b05
done
Packit 022b05
Packit 022b05
if test -n "$prevopt"; then
Packit 022b05
  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
Packit 022b05
  $echo "$help" 1>&2
Packit 022b05
  exit $EXIT_FAILURE
Packit 022b05
fi
Packit 022b05
Packit 022b05
case $disable_libs in
Packit 022b05
no) 
Packit 022b05
  ;;
Packit 022b05
shared)
Packit 022b05
  build_libtool_libs=no
Packit 022b05
  build_old_libs=yes
Packit 022b05
  ;;
Packit 022b05
static)
Packit 022b05
  build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
Packit 022b05
  ;;
Packit 022b05
esac
Packit 022b05
Packit 022b05
# If this variable is set in any of the actions, the command in it
Packit 022b05
# will be execed at the end.  This prevents here-documents from being
Packit 022b05
# left over by shells.
Packit 022b05
exec_cmd=
Packit 022b05
Packit 022b05
if test -z "$show_help"; then
Packit 022b05
Packit 022b05
  # Infer the operation mode.
Packit 022b05
  if test -z "$mode"; then
Packit 022b05
    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
Packit 022b05
    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
Packit 022b05
    case $nonopt in
Packit 022b05
    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
Packit 022b05
      mode=link
Packit 022b05
      for arg
Packit 022b05
      do
Packit 022b05
	case $arg in
Packit 022b05
	-c)
Packit 022b05
	   mode=compile
Packit 022b05
	   break
Packit 022b05
	   ;;
Packit 022b05
	esac
Packit 022b05
      done
Packit 022b05
      ;;
Packit 022b05
    *db | *dbx | *strace | *truss)
Packit 022b05
      mode=execute
Packit 022b05
      ;;
Packit 022b05
    *install*|cp|mv)
Packit 022b05
      mode=install
Packit 022b05
      ;;
Packit 022b05
    *rm)
Packit 022b05
      mode=uninstall
Packit 022b05
      ;;
Packit 022b05
    *)
Packit 022b05
      # If we have no mode, but dlfiles were specified, then do execute mode.
Packit 022b05
      test -n "$execute_dlfiles" && mode=execute
Packit 022b05
Packit 022b05
      # Just use the default operation mode.
Packit 022b05
      if test -z "$mode"; then
Packit 022b05
	if test -n "$nonopt"; then
Packit 022b05
	  $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
Packit 022b05
	else
Packit 022b05
	  $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
Packit 022b05
	fi
Packit 022b05
      fi
Packit 022b05
      ;;
Packit 022b05
    esac
Packit 022b05
  fi
Packit 022b05
Packit 022b05
  # Only execute mode is allowed to have -dlopen flags.
Packit 022b05
  if test -n "$execute_dlfiles" && test "$mode" != execute; then
Packit 022b05
    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
Packit 022b05
    $echo "$help" 1>&2
Packit 022b05
    exit $EXIT_FAILURE
Packit 022b05
  fi
Packit 022b05
Packit 022b05
  # Change the help message to a mode-specific one.
Packit 022b05
  generic_help="$help"
Packit 022b05
  help="Try \`$modename --help --mode=$mode' for more information."
Packit 022b05
Packit 022b05
  # These modes are in order of execution frequency so that they run quickly.
Packit 022b05
  case $mode in
Packit 022b05
  # libtool compile mode
Packit 022b05
  compile)
Packit 022b05
    modename="$modename: compile"
Packit 022b05
    # Get the compilation command and the source file.
Packit 022b05
    base_compile=
Packit 022b05
    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
Packit 022b05
    suppress_opt=yes
Packit 022b05
    suppress_output=
Packit 022b05
    arg_mode=normal
Packit 022b05
    libobj=
Packit 022b05
    later=
Packit 022b05
Packit 022b05
    for arg
Packit 022b05
    do
Packit 022b05
      case $arg_mode in
Packit 022b05
      arg  )
Packit 022b05
	# do not "continue".  Instead, add this to base_compile
Packit 022b05
	lastarg="$arg"
Packit 022b05
	arg_mode=normal
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      target )
Packit 022b05
	libobj="$arg"
Packit 022b05
	arg_mode=normal
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      normal )
Packit 022b05
	# Accept any command-line options.
Packit 022b05
	case $arg in
Packit 022b05
	-o)
Packit 022b05
	  if test -n "$libobj" ; then
Packit 022b05
	    $echo "$modename: you cannot specify \`-o' more than once" 1>&2
Packit 022b05
	    exit $EXIT_FAILURE
Packit 022b05
	  fi
Packit 022b05
	  arg_mode=target
Packit 022b05
	  continue
Packit 022b05
	  ;;
Packit 022b05
Packit 022b05
	-static | -prefer-pic | -prefer-non-pic)
Packit 022b05
	  later="$later $arg"
Packit 022b05
	  continue
Packit 022b05
	  ;;
Packit 022b05
Packit 022b05
	-no-suppress)
Packit 022b05
	  suppress_opt=no
Packit 022b05
	  continue
Packit 022b05
	  ;;
Packit 022b05
Packit 022b05
	-Xcompiler)
Packit 022b05
	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
Packit 022b05
	  continue      #  The current "srcfile" will either be retained or
Packit 022b05
	  ;;            #  replaced later.  I would guess that would be a bug.
Packit 022b05
Packit 022b05
	-Wc,*)
Packit 022b05
	  args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
Packit 022b05
	  lastarg=
Packit 022b05
	  save_ifs="$IFS"; IFS=','
Packit 022b05
 	  for arg in $args; do
Packit 022b05
	    IFS="$save_ifs"
Packit 022b05
Packit 022b05
	    # Double-quote args containing other shell metacharacters.
Packit 022b05
	    # Many Bourne shells cannot handle close brackets correctly
Packit 022b05
	    # in scan sets, so we specify it separately.
Packit 022b05
	    case $arg in
Packit 022b05
	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
Packit 022b05
	      arg="\"$arg\""
Packit 022b05
	      ;;
Packit 022b05
	    esac
Packit 022b05
	    lastarg="$lastarg $arg"
Packit 022b05
	  done
Packit 022b05
	  IFS="$save_ifs"
Packit 022b05
	  lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
Packit 022b05
Packit 022b05
	  # Add the arguments to base_compile.
Packit 022b05
	  base_compile="$base_compile $lastarg"
Packit 022b05
	  continue
Packit 022b05
	  ;;
Packit 022b05
Packit 022b05
	* )
Packit 022b05
	  # Accept the current argument as the source file.
Packit 022b05
	  # The previous "srcfile" becomes the current argument.
Packit 022b05
	  #
Packit 022b05
	  lastarg="$srcfile"
Packit 022b05
	  srcfile="$arg"
Packit 022b05
	  ;;
Packit 022b05
	esac  #  case $arg
Packit 022b05
	;;
Packit 022b05
      esac    #  case $arg_mode
Packit 022b05
Packit 022b05
      # Aesthetically quote the previous argument.
Packit 022b05
      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
Packit 022b05
Packit 022b05
      case $lastarg in
Packit 022b05
      # Double-quote args containing other shell metacharacters.
Packit 022b05
      # Many Bourne shells cannot handle close brackets correctly
Packit 022b05
      # in scan sets, and some SunOS ksh mistreat backslash-escaping
Packit 022b05
      # in scan sets (worked around with variable expansion),
Packit 022b05
      # and furthermore cannot handle '|' '&' '(' ')' in scan sets 
Packit 022b05
      # at all, so we specify them separately.
Packit 022b05
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
Packit 022b05
	lastarg="\"$lastarg\""
Packit 022b05
	;;
Packit 022b05
      esac
Packit 022b05
Packit 022b05
      base_compile="$base_compile $lastarg"
Packit 022b05
    done # for arg
Packit 022b05
Packit 022b05
    case $arg_mode in
Packit 022b05
    arg)
Packit 022b05
      $echo "$modename: you must specify an argument for -Xcompile"
Packit 022b05
      exit $EXIT_FAILURE
Packit 022b05
      ;;
Packit 022b05
    target)
Packit 022b05
      $echo "$modename: you must specify a target with \`-o'" 1>&2
Packit 022b05
      exit $EXIT_FAILURE
Packit 022b05
      ;;
Packit 022b05
    *)
Packit 022b05
      # Get the name of the library object.
Packit 022b05
      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
Packit 022b05
      ;;
Packit 022b05
    esac
Packit 022b05
Packit 022b05
    # Recognize several different file suffixes.
Packit 022b05
    # If the user specifies -o file.o, it is replaced with file.lo
Packit 022b05
    xform='[cCFSifmso]'
Packit 022b05
    case $libobj in
Packit 022b05
    *.ada) xform=ada ;;
Packit 022b05
    *.adb) xform=adb ;;
Packit 022b05
    *.ads) xform=ads ;;
Packit 022b05
    *.asm) xform=asm ;;
Packit 022b05
    *.c++) xform=c++ ;;
Packit 022b05
    *.cc) xform=cc ;;
Packit 022b05
    *.ii) xform=ii ;;
Packit 022b05
    *.class) xform=class ;;
Packit 022b05
    *.cpp) xform=cpp ;;
Packit 022b05
    *.cxx) xform=cxx ;;
Packit 022b05
    *.f90) xform=f90 ;;
Packit 022b05
    *.for) xform=for ;;
Packit 022b05
    *.java) xform=java ;;
Packit 022b05
    esac
Packit 022b05
Packit 022b05
    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
Packit 022b05
Packit 022b05
    case $libobj in
Packit 022b05
    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
Packit 022b05
    *)
Packit 022b05
      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
Packit 022b05
      exit $EXIT_FAILURE
Packit 022b05
      ;;
Packit 022b05
    esac
Packit 022b05
Packit 022b05
    func_infer_tag $base_compile
Packit 022b05
Packit 022b05
    for arg in $later; do
Packit 022b05
      case $arg in
Packit 022b05
      -static)
Packit 022b05
	build_old_libs=yes
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -prefer-pic)
Packit 022b05
	pic_mode=yes
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -prefer-non-pic)
Packit 022b05
	pic_mode=no
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
      esac
Packit 022b05
    done
Packit 022b05
Packit 022b05
    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
Packit 022b05
    case $qlibobj in
Packit 022b05
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
Packit 022b05
	qlibobj="\"$qlibobj\"" ;;
Packit 022b05
    esac
Packit 022b05
    test "X$libobj" != "X$qlibobj" \
Packit 022b05
	&& $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' 	&()|`$[]' \
Packit 022b05
	&& $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
Packit 022b05
    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
Packit 022b05
    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
Packit 022b05
    if test "X$xdir" = "X$obj"; then
Packit 022b05
      xdir=
Packit 022b05
    else
Packit 022b05
      xdir=$xdir/
Packit 022b05
    fi
Packit 022b05
    lobj=${xdir}$objdir/$objname
Packit 022b05
Packit 022b05
    if test -z "$base_compile"; then
Packit 022b05
      $echo "$modename: you must specify a compilation command" 1>&2
Packit 022b05
      $echo "$help" 1>&2
Packit 022b05
      exit $EXIT_FAILURE
Packit 022b05
    fi
Packit 022b05
Packit 022b05
    # Delete any leftover library objects.
Packit 022b05
    if test "$build_old_libs" = yes; then
Packit 022b05
      removelist="$obj $lobj $libobj ${libobj}T"
Packit 022b05
    else
Packit 022b05
      removelist="$lobj $libobj ${libobj}T"
Packit 022b05
    fi
Packit 022b05
Packit 022b05
    $run $rm $removelist
Packit 022b05
    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
Packit 022b05
Packit 022b05
    # On Cygwin there's no "real" PIC flag so we must build both object types
Packit 022b05
    case $host_os in
Packit 022b05
    cygwin* | mingw* | pw32* | os2*)
Packit 022b05
      pic_mode=default
Packit 022b05
      ;;
Packit 022b05
    esac
Packit 022b05
    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
Packit 022b05
      # non-PIC code in shared libraries is not supported
Packit 022b05
      pic_mode=default
Packit 022b05
    fi
Packit 022b05
Packit 022b05
    # Calculate the filename of the output object if compiler does
Packit 022b05
    # not support -o with -c
Packit 022b05
    if test "$compiler_c_o" = no; then
Packit 022b05
      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
Packit 022b05
      lockfile="$output_obj.lock"
Packit 022b05
      removelist="$removelist $output_obj $lockfile"
Packit 022b05
      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
Packit 022b05
    else
Packit 022b05
      output_obj=
Packit 022b05
      need_locks=no
Packit 022b05
      lockfile=
Packit 022b05
    fi
Packit 022b05
Packit 022b05
    # Lock this critical section if it is needed
Packit 022b05
    # We use this script file to make the link, it avoids creating a new file
Packit 022b05
    if test "$need_locks" = yes; then
Packit 022b05
      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
Packit 022b05
	$show "Waiting for $lockfile to be removed"
Packit 022b05
	sleep 2
Packit 022b05
      done
Packit 022b05
    elif test "$need_locks" = warn; then
Packit 022b05
      if test -f "$lockfile"; then
Packit 022b05
	$echo "\
Packit 022b05
*** ERROR, $lockfile exists and contains:
Packit 022b05
`cat $lockfile 2>/dev/null`
Packit 022b05
Packit 022b05
This indicates that another process is trying to use the same
Packit 022b05
temporary object file, and libtool could not work around it because
Packit 022b05
your compiler does not support \`-c' and \`-o' together.  If you
Packit 022b05
repeat this compilation, it may succeed, by chance, but you had better
Packit 022b05
avoid parallel builds (make -j) in this platform, or get a better
Packit 022b05
compiler."
Packit 022b05
Packit 022b05
	$run $rm $removelist
Packit 022b05
	exit $EXIT_FAILURE
Packit 022b05
      fi
Packit 022b05
      $echo "$srcfile" > "$lockfile"
Packit 022b05
    fi
Packit 022b05
Packit 022b05
    if test -n "$fix_srcfile_path"; then
Packit 022b05
      eval srcfile=\"$fix_srcfile_path\"
Packit 022b05
    fi
Packit 022b05
    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
Packit 022b05
    case $qsrcfile in
Packit 022b05
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
Packit 022b05
      qsrcfile="\"$qsrcfile\"" ;;
Packit 022b05
    esac
Packit 022b05
Packit 022b05
    $run $rm "$libobj" "${libobj}T"
Packit 022b05
Packit 022b05
    # Create a libtool object file (analogous to a ".la" file),
Packit 022b05
    # but don't create it if we're doing a dry run.
Packit 022b05
    test -z "$run" && cat > ${libobj}T <
Packit 022b05
# $libobj - a libtool object file
Packit 022b05
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
Packit 022b05
#
Packit 022b05
# Please DO NOT delete this file!
Packit 022b05
# It is necessary for linking the library.
Packit 022b05
Packit 022b05
# Name of the PIC object.
Packit 022b05
EOF
Packit 022b05
Packit 022b05
    # Only build a PIC object if we are building libtool libraries.
Packit 022b05
    if test "$build_libtool_libs" = yes; then
Packit 022b05
      # Without this assignment, base_compile gets emptied.
Packit 022b05
      fbsd_hideous_sh_bug=$base_compile
Packit 022b05
Packit 022b05
      if test "$pic_mode" != no; then
Packit 022b05
	command="$base_compile $qsrcfile $pic_flag"
Packit 022b05
      else
Packit 022b05
	# Don't build PIC code
Packit 022b05
	command="$base_compile $qsrcfile"
Packit 022b05
      fi
Packit 022b05
Packit 022b05
      if test ! -d "${xdir}$objdir"; then
Packit 022b05
	$show "$mkdir ${xdir}$objdir"
Packit 022b05
	$run $mkdir ${xdir}$objdir
Packit 022b05
	exit_status=$?
Packit 022b05
	if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
Packit 022b05
	  exit $exit_status
Packit 022b05
	fi
Packit 022b05
      fi
Packit 022b05
Packit 022b05
      if test -z "$output_obj"; then
Packit 022b05
	# Place PIC objects in $objdir
Packit 022b05
	command="$command -o $lobj"
Packit 022b05
      fi
Packit 022b05
Packit 022b05
      $run $rm "$lobj" "$output_obj"
Packit 022b05
Packit 022b05
      $show "$command"
Packit 022b05
      if $run eval "$command"; then :
Packit 022b05
      else
Packit 022b05
	test -n "$output_obj" && $run $rm $removelist
Packit 022b05
	exit $EXIT_FAILURE
Packit 022b05
      fi
Packit 022b05
Packit 022b05
      if test "$need_locks" = warn &&
Packit 022b05
	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
Packit 022b05
	$echo "\
Packit 022b05
*** ERROR, $lockfile contains:
Packit 022b05
`cat $lockfile 2>/dev/null`
Packit 022b05
Packit 022b05
but it should contain:
Packit 022b05
$srcfile
Packit 022b05
Packit 022b05
This indicates that another process is trying to use the same
Packit 022b05
temporary object file, and libtool could not work around it because
Packit 022b05
your compiler does not support \`-c' and \`-o' together.  If you
Packit 022b05
repeat this compilation, it may succeed, by chance, but you had better
Packit 022b05
avoid parallel builds (make -j) in this platform, or get a better
Packit 022b05
compiler."
Packit 022b05
Packit 022b05
	$run $rm $removelist
Packit 022b05
	exit $EXIT_FAILURE
Packit 022b05
      fi
Packit 022b05
Packit 022b05
      # Just move the object if needed, then go on to compile the next one
Packit 022b05
      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
Packit 022b05
	$show "$mv $output_obj $lobj"
Packit 022b05
	if $run $mv $output_obj $lobj; then :
Packit 022b05
	else
Packit 022b05
	  error=$?
Packit 022b05
	  $run $rm $removelist
Packit 022b05
	  exit $error
Packit 022b05
	fi
Packit 022b05
      fi
Packit 022b05
Packit 022b05
      # Append the name of the PIC object to the libtool object file.
Packit 022b05
      test -z "$run" && cat >> ${libobj}T <
Packit 022b05
pic_object='$objdir/$objname'
Packit 022b05
Packit 022b05
EOF
Packit 022b05
Packit 022b05
      # Allow error messages only from the first compilation.
Packit 022b05
      if test "$suppress_opt" = yes; then
Packit 022b05
        suppress_output=' >/dev/null 2>&1'
Packit 022b05
      fi
Packit 022b05
    else
Packit 022b05
      # No PIC object so indicate it doesn't exist in the libtool
Packit 022b05
      # object file.
Packit 022b05
      test -z "$run" && cat >> ${libobj}T <
Packit 022b05
pic_object=none
Packit 022b05
Packit 022b05
EOF
Packit 022b05
    fi
Packit 022b05
Packit 022b05
    # Only build a position-dependent object if we build old libraries.
Packit 022b05
    if test "$build_old_libs" = yes; then
Packit 022b05
      if test "$pic_mode" != yes; then
Packit 022b05
	# Don't build PIC code
Packit 022b05
	command="$base_compile $qsrcfile"
Packit 022b05
      else
Packit 022b05
	command="$base_compile $qsrcfile $pic_flag"
Packit 022b05
      fi
Packit 022b05
      if test "$compiler_c_o" = yes; then
Packit 022b05
	command="$command -o $obj"
Packit 022b05
      fi
Packit 022b05
Packit 022b05
      # Suppress compiler output if we already did a PIC compilation.
Packit 022b05
      command="$command$suppress_output"
Packit 022b05
      $run $rm "$obj" "$output_obj"
Packit 022b05
      $show "$command"
Packit 022b05
      if $run eval "$command"; then :
Packit 022b05
      else
Packit 022b05
	$run $rm $removelist
Packit 022b05
	exit $EXIT_FAILURE
Packit 022b05
      fi
Packit 022b05
Packit 022b05
      if test "$need_locks" = warn &&
Packit 022b05
	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
Packit 022b05
	$echo "\
Packit 022b05
*** ERROR, $lockfile contains:
Packit 022b05
`cat $lockfile 2>/dev/null`
Packit 022b05
Packit 022b05
but it should contain:
Packit 022b05
$srcfile
Packit 022b05
Packit 022b05
This indicates that another process is trying to use the same
Packit 022b05
temporary object file, and libtool could not work around it because
Packit 022b05
your compiler does not support \`-c' and \`-o' together.  If you
Packit 022b05
repeat this compilation, it may succeed, by chance, but you had better
Packit 022b05
avoid parallel builds (make -j) in this platform, or get a better
Packit 022b05
compiler."
Packit 022b05
Packit 022b05
	$run $rm $removelist
Packit 022b05
	exit $EXIT_FAILURE
Packit 022b05
      fi
Packit 022b05
Packit 022b05
      # Just move the object if needed
Packit 022b05
      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
Packit 022b05
	$show "$mv $output_obj $obj"
Packit 022b05
	if $run $mv $output_obj $obj; then :
Packit 022b05
	else
Packit 022b05
	  error=$?
Packit 022b05
	  $run $rm $removelist
Packit 022b05
	  exit $error
Packit 022b05
	fi
Packit 022b05
      fi
Packit 022b05
Packit 022b05
      # Append the name of the non-PIC object the libtool object file.
Packit 022b05
      # Only append if the libtool object file exists.
Packit 022b05
      test -z "$run" && cat >> ${libobj}T <
Packit 022b05
# Name of the non-PIC object.
Packit 022b05
non_pic_object='$objname'
Packit 022b05
Packit 022b05
EOF
Packit 022b05
    else
Packit 022b05
      # Append the name of the non-PIC object the libtool object file.
Packit 022b05
      # Only append if the libtool object file exists.
Packit 022b05
      test -z "$run" && cat >> ${libobj}T <
Packit 022b05
# Name of the non-PIC object.
Packit 022b05
non_pic_object=none
Packit 022b05
Packit 022b05
EOF
Packit 022b05
    fi
Packit 022b05
Packit 022b05
    $run $mv "${libobj}T" "${libobj}"
Packit 022b05
Packit 022b05
    # Unlock the critical section if it was locked
Packit 022b05
    if test "$need_locks" != no; then
Packit 022b05
      $run $rm "$lockfile"
Packit 022b05
    fi
Packit 022b05
Packit 022b05
    exit $EXIT_SUCCESS
Packit 022b05
    ;;
Packit 022b05
Packit 022b05
  # libtool link mode
Packit 022b05
  link | relink)
Packit 022b05
    modename="$modename: link"
Packit 022b05
    case $host in
Packit 022b05
    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
Packit 022b05
      # It is impossible to link a dll without this setting, and
Packit 022b05
      # we shouldn't force the makefile maintainer to figure out
Packit 022b05
      # which system we are compiling for in order to pass an extra
Packit 022b05
      # flag for every libtool invocation.
Packit 022b05
      # allow_undefined=no
Packit 022b05
Packit 022b05
      # FIXME: Unfortunately, there are problems with the above when trying
Packit 022b05
      # to make a dll which has undefined symbols, in which case not
Packit 022b05
      # even a static library is built.  For now, we need to specify
Packit 022b05
      # -no-undefined on the libtool link line when we can be certain
Packit 022b05
      # that all symbols are satisfied, otherwise we get a static library.
Packit 022b05
      allow_undefined=yes
Packit 022b05
      ;;
Packit 022b05
    *)
Packit 022b05
      allow_undefined=yes
Packit 022b05
      ;;
Packit 022b05
    esac
Packit 022b05
    libtool_args="$nonopt"
Packit 022b05
    base_compile="$nonopt $@"
Packit 022b05
    compile_command="$nonopt"
Packit 022b05
    finalize_command="$nonopt"
Packit 022b05
Packit 022b05
    compile_rpath=
Packit 022b05
    finalize_rpath=
Packit 022b05
    compile_shlibpath=
Packit 022b05
    finalize_shlibpath=
Packit 022b05
    convenience=
Packit 022b05
    old_convenience=
Packit 022b05
    deplibs=
Packit 022b05
    old_deplibs=
Packit 022b05
    compiler_flags=
Packit 022b05
    linker_flags=
Packit 022b05
    dllsearchpath=
Packit 022b05
    lib_search_path=`pwd`
Packit 022b05
    inst_prefix_dir=
Packit 022b05
Packit 022b05
    avoid_version=no
Packit 022b05
    dlfiles=
Packit 022b05
    dlprefiles=
Packit 022b05
    dlself=no
Packit 022b05
    export_dynamic=no
Packit 022b05
    export_symbols=
Packit 022b05
    export_symbols_regex=
Packit 022b05
    generated=
Packit 022b05
    libobjs=
Packit 022b05
    ltlibs=
Packit 022b05
    module=no
Packit 022b05
    no_install=no
Packit 022b05
    objs=
Packit 022b05
    non_pic_objects=
Packit 022b05
    notinst_path= # paths that contain not-installed libtool libraries
Packit 022b05
    precious_files_regex=
Packit 022b05
    prefer_static_libs=no
Packit 022b05
    preload=no
Packit 022b05
    prev=
Packit 022b05
    prevarg=
Packit 022b05
    release=
Packit 022b05
    rpath=
Packit 022b05
    xrpath=
Packit 022b05
    perm_rpath=
Packit 022b05
    temp_rpath=
Packit 022b05
    thread_safe=no
Packit 022b05
    vinfo=
Packit 022b05
    vinfo_number=no
Packit 022b05
Packit 022b05
    func_infer_tag $base_compile
Packit 022b05
Packit 022b05
    # We need to know -static, to get the right output filenames.
Packit 022b05
    for arg
Packit 022b05
    do
Packit 022b05
      case $arg in
Packit 022b05
      -all-static | -static)
Packit 022b05
	if test "X$arg" = "X-all-static"; then
Packit 022b05
	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
Packit 022b05
	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
Packit 022b05
	  fi
Packit 022b05
	  if test -n "$link_static_flag"; then
Packit 022b05
	    dlopen_self=$dlopen_self_static
Packit 022b05
	  fi
Packit 022b05
	  prefer_static_libs=yes
Packit 022b05
	else
Packit 022b05
	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
Packit 022b05
	    dlopen_self=$dlopen_self_static
Packit 022b05
	  fi
Packit 022b05
	  prefer_static_libs=built
Packit 022b05
	fi
Packit 022b05
	build_libtool_libs=no
Packit 022b05
	build_old_libs=yes
Packit 022b05
	break
Packit 022b05
	;;
Packit 022b05
      esac
Packit 022b05
    done
Packit 022b05
Packit 022b05
    # See if our shared archives depend on static archives.
Packit 022b05
    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
Packit 022b05
Packit 022b05
    # Go through the arguments, transforming them on the way.
Packit 022b05
    while test "$#" -gt 0; do
Packit 022b05
      arg="$1"
Packit 022b05
      shift
Packit 022b05
      case $arg in
Packit 022b05
      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
Packit 022b05
	qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
Packit 022b05
	;;
Packit 022b05
      *) qarg=$arg ;;
Packit 022b05
      esac
Packit 022b05
      libtool_args="$libtool_args $qarg"
Packit 022b05
Packit 022b05
      # If the previous option needs an argument, assign it.
Packit 022b05
      if test -n "$prev"; then
Packit 022b05
	case $prev in
Packit 022b05
	output)
Packit 022b05
	  compile_command="$compile_command @OUTPUT@"
Packit 022b05
	  finalize_command="$finalize_command @OUTPUT@"
Packit 022b05
	  ;;
Packit 022b05
	esac
Packit 022b05
Packit 022b05
	case $prev in
Packit 022b05
	dlfiles|dlprefiles)
Packit 022b05
	  if test "$preload" = no; then
Packit 022b05
	    # Add the symbol object into the linking commands.
Packit 022b05
	    compile_command="$compile_command @SYMFILE@"
Packit 022b05
	    finalize_command="$finalize_command @SYMFILE@"
Packit 022b05
	    preload=yes
Packit 022b05
	  fi
Packit 022b05
	  case $arg in
Packit 022b05
	  *.la | *.lo) ;;  # We handle these cases below.
Packit 022b05
	  force)
Packit 022b05
	    if test "$dlself" = no; then
Packit 022b05
	      dlself=needless
Packit 022b05
	      export_dynamic=yes
Packit 022b05
	    fi
Packit 022b05
	    prev=
Packit 022b05
	    continue
Packit 022b05
	    ;;
Packit 022b05
	  self)
Packit 022b05
	    if test "$prev" = dlprefiles; then
Packit 022b05
	      dlself=yes
Packit 022b05
	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
Packit 022b05
	      dlself=yes
Packit 022b05
	    else
Packit 022b05
	      dlself=needless
Packit 022b05
	      export_dynamic=yes
Packit 022b05
	    fi
Packit 022b05
	    prev=
Packit 022b05
	    continue
Packit 022b05
	    ;;
Packit 022b05
	  *)
Packit 022b05
	    if test "$prev" = dlfiles; then
Packit 022b05
	      dlfiles="$dlfiles $arg"
Packit 022b05
	    else
Packit 022b05
	      dlprefiles="$dlprefiles $arg"
Packit 022b05
	    fi
Packit 022b05
	    prev=
Packit 022b05
	    continue
Packit 022b05
	    ;;
Packit 022b05
	  esac
Packit 022b05
	  ;;
Packit 022b05
	expsyms)
Packit 022b05
	  export_symbols="$arg"
Packit 022b05
	  if test ! -f "$arg"; then
Packit 022b05
	    $echo "$modename: symbol file \`$arg' does not exist"
Packit 022b05
	    exit $EXIT_FAILURE
Packit 022b05
	  fi
Packit 022b05
	  prev=
Packit 022b05
	  continue
Packit 022b05
	  ;;
Packit 022b05
	expsyms_regex)
Packit 022b05
	  export_symbols_regex="$arg"
Packit 022b05
	  prev=
Packit 022b05
	  continue
Packit 022b05
	  ;;
Packit 022b05
	inst_prefix)
Packit 022b05
	  inst_prefix_dir="$arg"
Packit 022b05
	  prev=
Packit 022b05
	  continue
Packit 022b05
	  ;;
Packit 022b05
	precious_regex)
Packit 022b05
	  precious_files_regex="$arg"
Packit 022b05
	  prev=
Packit 022b05
	  continue
Packit 022b05
	  ;;
Packit 022b05
	release)
Packit 022b05
	  release="-$arg"
Packit 022b05
	  prev=
Packit 022b05
	  continue
Packit 022b05
	  ;;
Packit 022b05
	objectlist)
Packit 022b05
	  if test -f "$arg"; then
Packit 022b05
	    save_arg=$arg
Packit 022b05
	    moreargs=
Packit 022b05
	    for fil in `cat $save_arg`
Packit 022b05
	    do
Packit 022b05
#	      moreargs="$moreargs $fil"
Packit 022b05
	      arg=$fil
Packit 022b05
	      # A libtool-controlled object.
Packit 022b05
Packit 022b05
	      # Check to see that this really is a libtool object.
Packit 022b05
	      if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
Packit 022b05
		pic_object=
Packit 022b05
		non_pic_object=
Packit 022b05
Packit 022b05
		# Read the .lo file
Packit 022b05
		# If there is no directory component, then add one.
Packit 022b05
		case $arg in
Packit 022b05
		*/* | *\\*) . $arg ;;
Packit 022b05
		*) . ./$arg ;;
Packit 022b05
		esac
Packit 022b05
Packit 022b05
		if test -z "$pic_object" || \
Packit 022b05
		   test -z "$non_pic_object" ||
Packit 022b05
		   test "$pic_object" = none && \
Packit 022b05
		   test "$non_pic_object" = none; then
Packit 022b05
		  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
Packit 022b05
		  exit $EXIT_FAILURE
Packit 022b05
		fi
Packit 022b05
Packit 022b05
		# Extract subdirectory from the argument.
Packit 022b05
		xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
Packit 022b05
		if test "X$xdir" = "X$arg"; then
Packit 022b05
		  xdir=
Packit 022b05
		else
Packit 022b05
		  xdir="$xdir/"
Packit 022b05
		fi
Packit 022b05
Packit 022b05
		if test "$pic_object" != none; then
Packit 022b05
		  # Prepend the subdirectory the object is found in.
Packit 022b05
		  pic_object="$xdir$pic_object"
Packit 022b05
Packit 022b05
		  if test "$prev" = dlfiles; then
Packit 022b05
		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
Packit 022b05
		      dlfiles="$dlfiles $pic_object"
Packit 022b05
		      prev=
Packit 022b05
		      continue
Packit 022b05
		    else
Packit 022b05
		      # If libtool objects are unsupported, then we need to preload.
Packit 022b05
		      prev=dlprefiles
Packit 022b05
		    fi
Packit 022b05
		  fi
Packit 022b05
Packit 022b05
		  # CHECK ME:  I think I busted this.  -Ossama
Packit 022b05
		  if test "$prev" = dlprefiles; then
Packit 022b05
		    # Preload the old-style object.
Packit 022b05
		    dlprefiles="$dlprefiles $pic_object"
Packit 022b05
		    prev=
Packit 022b05
		  fi
Packit 022b05
Packit 022b05
		  # A PIC object.
Packit 022b05
		  libobjs="$libobjs $pic_object"
Packit 022b05
		  arg="$pic_object"
Packit 022b05
		fi
Packit 022b05
Packit 022b05
		# Non-PIC object.
Packit 022b05
		if test "$non_pic_object" != none; then
Packit 022b05
		  # Prepend the subdirectory the object is found in.
Packit 022b05
		  non_pic_object="$xdir$non_pic_object"
Packit 022b05
Packit 022b05
		  # A standard non-PIC object
Packit 022b05
		  non_pic_objects="$non_pic_objects $non_pic_object"
Packit 022b05
		  if test -z "$pic_object" || test "$pic_object" = none ; then
Packit 022b05
		    arg="$non_pic_object"
Packit 022b05
		  fi
Packit 022b05
		else
Packit 022b05
		  # If the PIC object exists, use it instead.
Packit 022b05
		  # $xdir was prepended to $pic_object above.
Packit 022b05
		  non_pic_object="$pic_object"
Packit 022b05
		  non_pic_objects="$non_pic_objects $non_pic_object"
Packit 022b05
		fi
Packit 022b05
	      else
Packit 022b05
		# Only an error if not doing a dry-run.
Packit 022b05
		if test -z "$run"; then
Packit 022b05
		  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
Packit 022b05
		  exit $EXIT_FAILURE
Packit 022b05
		else
Packit 022b05
		  # Dry-run case.
Packit 022b05
Packit 022b05
		  # Extract subdirectory from the argument.
Packit 022b05
		  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
Packit 022b05
		  if test "X$xdir" = "X$arg"; then
Packit 022b05
		    xdir=
Packit 022b05
		  else
Packit 022b05
		    xdir="$xdir/"
Packit 022b05
		  fi
Packit 022b05
Packit 022b05
		  pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
Packit 022b05
		  non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
Packit 022b05
		  libobjs="$libobjs $pic_object"
Packit 022b05
		  non_pic_objects="$non_pic_objects $non_pic_object"
Packit 022b05
		fi
Packit 022b05
	      fi
Packit 022b05
	    done
Packit 022b05
	  else
Packit 022b05
	    $echo "$modename: link input file \`$save_arg' does not exist"
Packit 022b05
	    exit $EXIT_FAILURE
Packit 022b05
	  fi
Packit 022b05
	  arg=$save_arg
Packit 022b05
	  prev=
Packit 022b05
	  continue
Packit 022b05
	  ;;
Packit 022b05
	rpath | xrpath)
Packit 022b05
	  # We need an absolute path.
Packit 022b05
	  case $arg in
Packit 022b05
	  [\\/]* | [A-Za-z]:[\\/]*) ;;
Packit 022b05
	  *)
Packit 022b05
	    $echo "$modename: only absolute run-paths are allowed" 1>&2
Packit 022b05
	    exit $EXIT_FAILURE
Packit 022b05
	    ;;
Packit 022b05
	  esac
Packit 022b05
	  if test "$prev" = rpath; then
Packit 022b05
	    case "$rpath " in
Packit 022b05
	    *" $arg "*) ;;
Packit 022b05
	    *) rpath="$rpath $arg" ;;
Packit 022b05
	    esac
Packit 022b05
	  else
Packit 022b05
	    case "$xrpath " in
Packit 022b05
	    *" $arg "*) ;;
Packit 022b05
	    *) xrpath="$xrpath $arg" ;;
Packit 022b05
	    esac
Packit 022b05
	  fi
Packit 022b05
	  prev=
Packit 022b05
	  continue
Packit 022b05
	  ;;
Packit 022b05
	xcompiler)
Packit 022b05
	  compiler_flags="$compiler_flags $qarg"
Packit 022b05
	  prev=
Packit 022b05
	  compile_command="$compile_command $qarg"
Packit 022b05
	  finalize_command="$finalize_command $qarg"
Packit 022b05
	  continue
Packit 022b05
	  ;;
Packit 022b05
	xlinker)
Packit 022b05
	  linker_flags="$linker_flags $qarg"
Packit 022b05
	  compiler_flags="$compiler_flags $wl$qarg"
Packit 022b05
	  prev=
Packit 022b05
	  compile_command="$compile_command $wl$qarg"
Packit 022b05
	  finalize_command="$finalize_command $wl$qarg"
Packit 022b05
	  continue
Packit 022b05
	  ;;
Packit 022b05
	xcclinker)
Packit 022b05
	  linker_flags="$linker_flags $qarg"
Packit 022b05
	  compiler_flags="$compiler_flags $qarg"
Packit 022b05
	  prev=
Packit 022b05
	  compile_command="$compile_command $qarg"
Packit 022b05
	  finalize_command="$finalize_command $qarg"
Packit 022b05
	  continue
Packit 022b05
	  ;;
Packit 022b05
	shrext)
Packit 022b05
  	  shrext_cmds="$arg"
Packit 022b05
	  prev=
Packit 022b05
	  continue
Packit 022b05
	  ;;
Packit 022b05
	darwin_framework|darwin_framework_skip)
Packit 022b05
	  test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
Packit 022b05
	  compile_command="$compile_command $arg"
Packit 022b05
	  finalize_command="$finalize_command $arg"
Packit 022b05
	  prev=
Packit 022b05
	  continue
Packit 022b05
	  ;;
Packit 022b05
	*)
Packit 022b05
	  eval "$prev=\"\$arg\""
Packit 022b05
	  prev=
Packit 022b05
	  continue
Packit 022b05
	  ;;
Packit 022b05
	esac
Packit 022b05
      fi # test -n "$prev"
Packit 022b05
Packit 022b05
      prevarg="$arg"
Packit 022b05
Packit 022b05
      case $arg in
Packit 022b05
      -all-static)
Packit 022b05
	if test -n "$link_static_flag"; then
Packit 022b05
	  compile_command="$compile_command $link_static_flag"
Packit 022b05
	  finalize_command="$finalize_command $link_static_flag"
Packit 022b05
	fi
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -allow-undefined)
Packit 022b05
	# FIXME: remove this flag sometime in the future.
Packit 022b05
	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -avoid-version)
Packit 022b05
	avoid_version=yes
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -dlopen)
Packit 022b05
	prev=dlfiles
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -dlpreopen)
Packit 022b05
	prev=dlprefiles
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -export-dynamic)
Packit 022b05
	export_dynamic=yes
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -export-symbols | -export-symbols-regex)
Packit 022b05
	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
Packit 022b05
	  $echo "$modename: more than one -exported-symbols argument is not allowed"
Packit 022b05
	  exit $EXIT_FAILURE
Packit 022b05
	fi
Packit 022b05
	if test "X$arg" = "X-export-symbols"; then
Packit 022b05
	  prev=expsyms
Packit 022b05
	else
Packit 022b05
	  prev=expsyms_regex
Packit 022b05
	fi
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -framework|-arch|-isysroot)
Packit 022b05
	case " $CC " in
Packit 022b05
	  *" ${arg} ${1} "* | *" ${arg}	${1} "*) 
Packit 022b05
		prev=darwin_framework_skip ;;
Packit 022b05
	  *) compiler_flags="$compiler_flags $arg"
Packit 022b05
	     prev=darwin_framework ;;
Packit 022b05
	esac
Packit 022b05
	compile_command="$compile_command $arg"
Packit 022b05
	finalize_command="$finalize_command $arg"
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -inst-prefix-dir)
Packit 022b05
	prev=inst_prefix
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
Packit 022b05
      # so, if we see these flags be careful not to treat them like -L
Packit 022b05
      -L[A-Z][A-Z]*:*)
Packit 022b05
	case $with_gcc/$host in
Packit 022b05
	no/*-*-irix* | /*-*-irix*)
Packit 022b05
	  compile_command="$compile_command $arg"
Packit 022b05
	  finalize_command="$finalize_command $arg"
Packit 022b05
	  ;;
Packit 022b05
	esac
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -L*)
Packit 022b05
	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
Packit 022b05
	# We need an absolute path.
Packit 022b05
	case $dir in
Packit 022b05
	[\\/]* | [A-Za-z]:[\\/]*) ;;
Packit 022b05
	*)
Packit 022b05
	  absdir=`cd "$dir" && pwd`
Packit 022b05
	  if test -z "$absdir"; then
Packit 022b05
	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
Packit 022b05
	    absdir="$dir"
Packit 022b05
	    notinst_path="$notinst_path $dir"
Packit 022b05
	  fi
Packit 022b05
	  dir="$absdir"
Packit 022b05
	  ;;
Packit 022b05
	esac
Packit 022b05
	case "$deplibs " in
Packit 022b05
	*" -L$dir "*) ;;
Packit 022b05
	*)
Packit 022b05
	  deplibs="$deplibs -L$dir"
Packit 022b05
	  lib_search_path="$lib_search_path $dir"
Packit 022b05
	  ;;
Packit 022b05
	esac
Packit 022b05
	case $host in
Packit 022b05
	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
Packit 022b05
	  testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
Packit 022b05
	  case :$dllsearchpath: in
Packit 022b05
	  *":$dir:"*) ;;
Packit 022b05
	  *) dllsearchpath="$dllsearchpath:$dir";;
Packit 022b05
	  esac
Packit 022b05
	  case :$dllsearchpath: in
Packit 022b05
	  *":$testbindir:"*) ;;
Packit 022b05
	  *) dllsearchpath="$dllsearchpath:$testbindir";;
Packit 022b05
	  esac
Packit 022b05
	  ;;
Packit 022b05
	esac
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -l*)
Packit 022b05
	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
Packit 022b05
	  case $host in
Packit 022b05
	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
Packit 022b05
	    # These systems don't actually have a C or math library (as such)
Packit 022b05
	    continue
Packit 022b05
	    ;;
Packit 022b05
	  *-*-os2*)
Packit 022b05
	    # These systems don't actually have a C library (as such)
Packit 022b05
	    test "X$arg" = "X-lc" && continue
Packit 022b05
	    ;;
Packit 022b05
	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
Packit 022b05
	    # Do not include libc due to us having libc/libc_r.
Packit 022b05
	    test "X$arg" = "X-lc" && continue
Packit 022b05
	    ;;
Packit 022b05
	  *-*-rhapsody* | *-*-darwin1.[012])
Packit 022b05
	    # Rhapsody C and math libraries are in the System framework
Packit 022b05
	    deplibs="$deplibs -framework System"
Packit 022b05
	    continue
Packit 022b05
	    ;;
Packit 022b05
	  *-*-sco3.2v5* | *-*-sco5v6*)
Packit 022b05
	    # Causes problems with __ctype
Packit 022b05
	    test "X$arg" = "X-lc" && continue
Packit 022b05
	    ;;
Packit 022b05
	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
Packit 022b05
	    # Compiler inserts libc in the correct place for threads to work
Packit 022b05
	    test "X$arg" = "X-lc" && continue
Packit 022b05
	    ;;
Packit 022b05
	  esac
Packit 022b05
	elif test "X$arg" = "X-lc_r"; then
Packit 022b05
	 case $host in
Packit 022b05
	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
Packit 022b05
	   # Do not include libc_r directly, use -pthread flag.
Packit 022b05
	   continue
Packit 022b05
	   ;;
Packit 022b05
	 esac
Packit 022b05
	fi
Packit 022b05
	deplibs="$deplibs $arg"
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      # Tru64 UNIX uses -model [arg] to determine the layout of C++
Packit 022b05
      # classes, name mangling, and exception handling.
Packit 022b05
      -model)
Packit 022b05
	compile_command="$compile_command $arg"
Packit 022b05
	compiler_flags="$compiler_flags $arg"
Packit 022b05
	finalize_command="$finalize_command $arg"
Packit 022b05
	prev=xcompiler
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
Packit 022b05
	compiler_flags="$compiler_flags $arg"
Packit 022b05
	compile_command="$compile_command $arg"
Packit 022b05
	finalize_command="$finalize_command $arg"
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -module)
Packit 022b05
	module=yes
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
Packit 022b05
      # -r[0-9][0-9]* specifies the processor on the SGI compiler
Packit 022b05
      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
Packit 022b05
      # +DA*, +DD* enable 64-bit mode on the HP compiler
Packit 022b05
      # -q* pass through compiler args for the IBM compiler
Packit 022b05
      # -m* pass through architecture-specific compiler args for GCC
Packit 022b05
      # -m*, -t[45]*, -txscale* pass through architecture-specific
Packit 022b05
      # compiler args for GCC
Packit 022b05
      # -pg pass through profiling flag for GCC
Packit 022b05
      # @file GCC response files
Packit 022b05
      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \
Packit 022b05
      -t[45]*|-txscale*|@*)
Packit 022b05
Packit 022b05
	# Unknown arguments in both finalize_command and compile_command need
Packit 022b05
	# to be aesthetically quoted because they are evaled later.
Packit 022b05
	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
Packit 022b05
	case $arg in
Packit 022b05
	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
Packit 022b05
	  arg="\"$arg\""
Packit 022b05
	  ;;
Packit 022b05
	esac
Packit 022b05
        compile_command="$compile_command $arg"
Packit 022b05
        finalize_command="$finalize_command $arg"
Packit 022b05
        compiler_flags="$compiler_flags $arg"
Packit 022b05
        continue
Packit 022b05
        ;;
Packit 022b05
Packit 022b05
      -shrext)
Packit 022b05
	prev=shrext
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -no-fast-install)
Packit 022b05
	fast_install=no
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -no-install)
Packit 022b05
	case $host in
Packit 022b05
	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
Packit 022b05
	  # The PATH hackery in wrapper scripts is required on Windows
Packit 022b05
	  # in order for the loader to find any dlls it needs.
Packit 022b05
	  $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
Packit 022b05
	  $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
Packit 022b05
	  fast_install=no
Packit 022b05
	  ;;
Packit 022b05
	*) no_install=yes ;;
Packit 022b05
	esac
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -no-undefined)
Packit 022b05
	allow_undefined=no
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -objectlist)
Packit 022b05
	prev=objectlist
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -o) prev=output ;;
Packit 022b05
Packit 022b05
      -precious-files-regex)
Packit 022b05
	prev=precious_regex
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -release)
Packit 022b05
	prev=release
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -rpath)
Packit 022b05
	prev=rpath
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -R)
Packit 022b05
	prev=xrpath
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -R*)
Packit 022b05
	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
Packit 022b05
	# We need an absolute path.
Packit 022b05
	case $dir in
Packit 022b05
	[\\/]* | [A-Za-z]:[\\/]*) ;;
Packit 022b05
	*)
Packit 022b05
	  $echo "$modename: only absolute run-paths are allowed" 1>&2
Packit 022b05
	  exit $EXIT_FAILURE
Packit 022b05
	  ;;
Packit 022b05
	esac
Packit 022b05
	case "$xrpath " in
Packit 022b05
	*" $dir "*) ;;
Packit 022b05
	*) xrpath="$xrpath $dir" ;;
Packit 022b05
	esac
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -static)
Packit 022b05
	# The effects of -static are defined in a previous loop.
Packit 022b05
	# We used to do the same as -all-static on platforms that
Packit 022b05
	# didn't have a PIC flag, but the assumption that the effects
Packit 022b05
	# would be equivalent was wrong.  It would break on at least
Packit 022b05
	# Digital Unix and AIX.
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -thread-safe)
Packit 022b05
	thread_safe=yes
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -version-info)
Packit 022b05
	prev=vinfo
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
      -version-number)
Packit 022b05
	prev=vinfo
Packit 022b05
	vinfo_number=yes
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -Wc,*)
Packit 022b05
	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
Packit 022b05
	arg=
Packit 022b05
	save_ifs="$IFS"; IFS=','
Packit 022b05
	for flag in $args; do
Packit 022b05
	  IFS="$save_ifs"
Packit 022b05
	  case $flag in
Packit 022b05
	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
Packit 022b05
	    flag="\"$flag\""
Packit 022b05
	    ;;
Packit 022b05
	  esac
Packit 022b05
	  arg="$arg $wl$flag"
Packit 022b05
	  compiler_flags="$compiler_flags $flag"
Packit 022b05
	done
Packit 022b05
	IFS="$save_ifs"
Packit 022b05
	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -Wl,*)
Packit 022b05
	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
Packit 022b05
	arg=
Packit 022b05
	save_ifs="$IFS"; IFS=','
Packit 022b05
	for flag in $args; do
Packit 022b05
	  IFS="$save_ifs"
Packit 022b05
	  case $flag in
Packit 022b05
	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
Packit 022b05
	    flag="\"$flag\""
Packit 022b05
	    ;;
Packit 022b05
	  esac
Packit 022b05
	  arg="$arg $wl$flag"
Packit 022b05
	  compiler_flags="$compiler_flags $wl$flag"
Packit 022b05
	  linker_flags="$linker_flags $flag"
Packit 022b05
	done
Packit 022b05
	IFS="$save_ifs"
Packit 022b05
	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -Xcompiler)
Packit 022b05
	prev=xcompiler
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -Xlinker)
Packit 022b05
	prev=xlinker
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      -XCClinker)
Packit 022b05
	prev=xcclinker
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      # Some other compiler flag.
Packit 022b05
      -* | +*)
Packit 022b05
	# Unknown arguments in both finalize_command and compile_command need
Packit 022b05
	# to be aesthetically quoted because they are evaled later.
Packit 022b05
	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
Packit 022b05
	case $arg in
Packit 022b05
	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
Packit 022b05
	  arg="\"$arg\""
Packit 022b05
	  ;;
Packit 022b05
	esac
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      *.$objext)
Packit 022b05
	# A standard object.
Packit 022b05
	objs="$objs $arg"
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      *.lo)
Packit 022b05
	# A libtool-controlled object.
Packit 022b05
Packit 022b05
	# Check to see that this really is a libtool object.
Packit 022b05
	if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
Packit 022b05
	  pic_object=
Packit 022b05
	  non_pic_object=
Packit 022b05
Packit 022b05
	  # Read the .lo file
Packit 022b05
	  # If there is no directory component, then add one.
Packit 022b05
	  case $arg in
Packit 022b05
	  */* | *\\*) . $arg ;;
Packit 022b05
	  *) . ./$arg ;;
Packit 022b05
	  esac
Packit 022b05
Packit 022b05
	  if test -z "$pic_object" || \
Packit 022b05
	     test -z "$non_pic_object" ||
Packit 022b05
	     test "$pic_object" = none && \
Packit 022b05
	     test "$non_pic_object" = none; then
Packit 022b05
	    $echo "$modename: cannot find name of object for \`$arg'" 1>&2
Packit 022b05
	    exit $EXIT_FAILURE
Packit 022b05
	  fi
Packit 022b05
Packit 022b05
	  # Extract subdirectory from the argument.
Packit 022b05
	  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
Packit 022b05
	  if test "X$xdir" = "X$arg"; then
Packit 022b05
	    xdir=
Packit 022b05
 	  else
Packit 022b05
	    xdir="$xdir/"
Packit 022b05
	  fi
Packit 022b05
Packit 022b05
	  if test "$pic_object" != none; then
Packit 022b05
	    # Prepend the subdirectory the object is found in.
Packit 022b05
	    pic_object="$xdir$pic_object"
Packit 022b05
Packit 022b05
	    if test "$prev" = dlfiles; then
Packit 022b05
	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
Packit 022b05
		dlfiles="$dlfiles $pic_object"
Packit 022b05
		prev=
Packit 022b05
		continue
Packit 022b05
	      else
Packit 022b05
		# If libtool objects are unsupported, then we need to preload.
Packit 022b05
		prev=dlprefiles
Packit 022b05
	      fi
Packit 022b05
	    fi
Packit 022b05
Packit 022b05
	    # CHECK ME:  I think I busted this.  -Ossama
Packit 022b05
	    if test "$prev" = dlprefiles; then
Packit 022b05
	      # Preload the old-style object.
Packit 022b05
	      dlprefiles="$dlprefiles $pic_object"
Packit 022b05
	      prev=
Packit 022b05
	    fi
Packit 022b05
Packit 022b05
	    # A PIC object.
Packit 022b05
	    libobjs="$libobjs $pic_object"
Packit 022b05
	    arg="$pic_object"
Packit 022b05
	  fi
Packit 022b05
Packit 022b05
	  # Non-PIC object.
Packit 022b05
	  if test "$non_pic_object" != none; then
Packit 022b05
	    # Prepend the subdirectory the object is found in.
Packit 022b05
	    non_pic_object="$xdir$non_pic_object"
Packit 022b05
Packit 022b05
	    # A standard non-PIC object
Packit 022b05
	    non_pic_objects="$non_pic_objects $non_pic_object"
Packit 022b05
	    if test -z "$pic_object" || test "$pic_object" = none ; then
Packit 022b05
	      arg="$non_pic_object"
Packit 022b05
	    fi
Packit 022b05
	  else
Packit 022b05
	    # If the PIC object exists, use it instead.
Packit 022b05
	    # $xdir was prepended to $pic_object above.
Packit 022b05
	    non_pic_object="$pic_object"
Packit 022b05
	    non_pic_objects="$non_pic_objects $non_pic_object"
Packit 022b05
	  fi
Packit 022b05
	else
Packit 022b05
	  # Only an error if not doing a dry-run.
Packit 022b05
	  if test -z "$run"; then
Packit 022b05
	    $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
Packit 022b05
	    exit $EXIT_FAILURE
Packit 022b05
	  else
Packit 022b05
	    # Dry-run case.
Packit 022b05
Packit 022b05
	    # Extract subdirectory from the argument.
Packit 022b05
	    xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
Packit 022b05
	    if test "X$xdir" = "X$arg"; then
Packit 022b05
	      xdir=
Packit 022b05
	    else
Packit 022b05
	      xdir="$xdir/"
Packit 022b05
	    fi
Packit 022b05
Packit 022b05
	    pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
Packit 022b05
	    non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
Packit 022b05
	    libobjs="$libobjs $pic_object"
Packit 022b05
	    non_pic_objects="$non_pic_objects $non_pic_object"
Packit 022b05
	  fi
Packit 022b05
	fi
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      *.$libext)
Packit 022b05
	# An archive.
Packit 022b05
	deplibs="$deplibs $arg"
Packit 022b05
	old_deplibs="$old_deplibs $arg"
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      *.la)
Packit 022b05
	# A libtool-controlled library.
Packit 022b05
Packit 022b05
	if test "$prev" = dlfiles; then
Packit 022b05
	  # This library was specified with -dlopen.
Packit 022b05
	  dlfiles="$dlfiles $arg"
Packit 022b05
	  prev=
Packit 022b05
	elif test "$prev" = dlprefiles; then
Packit 022b05
	  # The library was specified with -dlpreopen.
Packit 022b05
	  dlprefiles="$dlprefiles $arg"
Packit 022b05
	  prev=
Packit 022b05
	else
Packit 022b05
	  deplibs="$deplibs $arg"
Packit 022b05
	fi
Packit 022b05
	continue
Packit 022b05
	;;
Packit 022b05
Packit 022b05
      # Some other compiler argument.
Packit 022b05
      *)
Packit 022b05
	# Unknown arguments in both finalize_command and compile_command need
Packit 022b05
	# to be aesthetically quoted because they are evaled later.
Packit 022b05
	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
Packit 022b05
	case $arg in
Packit 022b05
	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
Packit 022b05
	  arg="\"$arg\""
Packit 022b05
	  ;;
Packit 022b05
	esac
Packit 022b05
	;;
Packit 022b05
      esac # arg
Packit 022b05
Packit 022b05
      # Now actually substitute the argument into the commands.
Packit 022b05
      if test -n "$arg"; then
Packit 022b05
	compile_command="$compile_command $arg"
Packit 022b05
	finalize_command="$finalize_command $arg"
Packit 022b05
      fi
Packit 022b05
    done # argument parsing loop
Packit 022b05
Packit 022b05
    if test -n "$prev"; then
Packit 022b05
      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
Packit 022b05
      $echo "$help" 1>&2
Packit 022b05
      exit $EXIT_FAILURE
Packit 022b05
    fi
Packit 022b05
Packit 022b05
    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
Packit 022b05
      eval arg=\"$export_dynamic_flag_spec\"
Packit 022b05
      compile_command="$compile_command $arg"
Packit 022b05
      finalize_command="$finalize_command $arg"
Packit 022b05
    fi
Packit 022b05
Packit 022b05
    oldlibs=
Packit 022b05
    # calculate the name of the file, without its directory
Packit 022b05
    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
Packit 022b05
    libobjs_save="$libobjs"
Packit 022b05
Packit 022b05
    if test -n "$shlibpath_var"; then
Packit 022b05
      # get the directories listed in $shlibpath_var
Packit 022b05
      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
Packit 022b05
    else
Packit 022b05
      shlib_search_path=
Packit 022b05
    fi
Packit 022b05
    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
Packit 022b05
    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
Packit 022b05
Packit 022b05
    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
Packit 022b05
    if test "X$output_objdir" = "X$output"; then
Packit 022b05
      output_objdir="$objdir"
Packit 022b05
    else
Packit 022b05
      output_objdir="$output_objdir/$objdir"
Packit 022b05
    fi
Packit 022b05
    # Create the object directory.
Packit 022b05
    if test ! -d "$output_objdir"; then
Packit 022b05
      $show "$mkdir $output_objdir"
Packit 022b05
      $run $mkdir $output_objdir
Packit 022b05
      exit_status=$?
Packit 022b05
      if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
Packit 022b05
	exit $exit_status
Packit 022b05
      fi
Packit 022b05
    fi
Packit 022b05
Packit 022b05
    # Determine the type of output
Packit 022b05
    case $output in
Packit 022b05
    "")
Packit 022b05
      $echo "$modename: you must specify an output file" 1>&2
Packit 022b05
      $echo "$help" 1>&2
Packit 022b05
      exit $EXIT_FAILURE
Packit 022b05
      ;;
Packit 022b05
    *.$libext) linkmode=oldlib ;;
Packit 022b05
    *.lo | *.$objext) linkmode=obj ;;
Packit 022b05
    *.la) linkmode=lib ;;
Packit 022b05
    *) linkmode=prog ;; # Anything else should be a program.
Packit 022b05
    esac
Packit 022b05
Packit 022b05
    case $host in
Packit 022b05
    *cygwin* | *mingw* | *pw32*)
Packit 022b05
      # don't eliminate duplications in $postdeps and $predeps
Packit 022b05
      duplicate_compiler_generated_deps=yes
Packit 022b05
      ;;
Packit 022b05
    *)
Packit 022b05
      duplicate_compiler_generated_deps=$duplicate_deps
Packit 022b05
      ;;
Packit 022b05
    esac
Packit 022b05
    specialdeplibs=
Packit 022b05
Packit 022b05
    libs=
Packit 022b05
    # Find all interdependent deplibs by searching for libraries
Packit 022b05
    # that are linked more than once (e.g. -la -lb -la)
Packit 022b05
    for deplib in $deplibs; do
Packit 022b05
      if test "X$duplicate_deps" = "Xyes" ; then
Packit 022b05
	case "$libs " in
Packit 022b05
	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
Packit 022b05
	esac
Packit 022b05
      fi
Packit 022b05
      libs="$libs $deplib"
Packit 022b05
    done
Packit 022b05
Packit 022b05
    if test "$linkmode" = lib; then
Packit 022b05
      libs="$predeps $libs $compiler_lib_search_path $postdeps"
Packit 022b05
Packit 022b05
      # Compute libraries that are listed more than once in $predeps
Packit 022b05
      # $postdeps and mark them as special (i.e., whose duplicates are
Packit 022b05
      # not to be eliminated).
Packit 022b05
      pre_post_deps=
Packit 022b05
      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
Packit 022b05
	for pre_post_dep in $predeps $postdeps; do
Packit 022b05
	  case "$pre_post_deps " in
Packit 022b05
	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
Packit 022b05
	  esac
Packit 022b05
	  pre_post_deps="$pre_post_deps $pre_post_dep"
Packit 022b05
	done
Packit 022b05
      fi
Packit 022b05
      pre_post_deps=
Packit 022b05
    fi
Packit 022b05
Packit 022b05
    deplibs=
Packit 022b05
    newdependency_libs=
Packit 022b05
    newlib_search_path=
Packit 022b05
    need_relink=no # whether we're linking any uninstalled libtool libraries
Packit 022b05
    notinst_deplibs= # not-installed libtool libraries
Packit 022b05
    case $linkmode in
Packit 022b05
    lib)
Packit 022b05
	passes="conv link"
Packit 022b05
	for file in $dlfiles $dlprefiles; do
Packit 022b05
	  case $file in
Packit 022b05
	  *.la) ;;
Packit 022b05
	  *)
Packit 022b05
	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
Packit 022b05
	    exit $EXIT_FAILURE
Packit 022b05
	    ;;
Packit 022b05
	  esac
Packit 022b05
	done
Packit 022b05
	;;
Packit 022b05
    prog)
Packit 022b05
	compile_deplibs=
Packit 022b05
	finalize_deplibs=
Packit 022b05
	alldeplibs=no
Packit 022b05
	newdlfiles=
Packit 022b05
	newdlprefiles=
Packit 022b05
	passes="conv scan dlopen dlpreopen link"
Packit 022b05
	;;
Packit 022b05
    *)  passes="conv"
Packit 022b05
	;;
Packit 022b05
    esac
Packit 022b05
    for pass in $passes; do
Packit 022b05
      if test "$linkmode,$pass" = "lib,link" ||
Packit 022b05
	 test "$linkmode,$pass" = "prog,scan"; then
Packit 022b05
	libs="$deplibs"
Packit 022b05
	deplibs=
Packit 022b05
      fi
Packit 022b05
      if test "$linkmode" = prog; then
Packit 022b05
	case $pass in
Packit 022b05
	dlopen) libs="$dlfiles" ;;
Packit 022b05
	dlpreopen) libs="$dlprefiles" ;;
Packit 022b05
	link)
Packit 022b05
	  libs="$deplibs %DEPLIBS%"
Packit 022b05
	  test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
Packit 022b05
	  ;;
Packit 022b05
	esac
Packit 022b05
      fi
Packit 022b05
      if test "$pass" = dlopen; then
Packit 022b05
	# Collect dlpreopened libraries
Packit 022b05
	save_deplibs="$deplibs"
Packit 022b05
	deplibs=
Packit 022b05
      fi
Packit 022b05
      for deplib in $libs; do
Packit 022b05
	lib=
Packit 022b05
	found=no
Packit 022b05
	case $deplib in
Packit 022b05
	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
Packit 022b05
	  if test "$linkmode,$pass" = "prog,link"; then
Packit 022b05
	    compile_deplibs="$deplib $compile_deplibs"
Packit 022b05
	    finalize_deplibs="$deplib $finalize_deplibs"
Packit 022b05
	  else
Packit 022b05
	    compiler_flags="$compiler_flags $deplib"
Packit 022b05
	  fi
Packit 022b05
	  continue
Packit 022b05
	  ;;
Packit 022b05
	-l*)
Packit 022b05
	  if test "$linkmode" != lib && test "$linkmode" != prog; then
Packit 022b05
	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
Packit 022b05
	    continue
Packit 022b05
	  fi
Packit 022b05
	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
Packit 022b05
	  for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
Packit 022b05
	    for search_ext in .la $std_shrext .so .a; do
Packit 022b05
	      # Search the libtool library
Packit 022b05
	      lib="$searchdir/lib${name}${search_ext}"
Packit 022b05
	      if test -f "$lib"; then
Packit 022b05
		if test "$search_ext" = ".la"; then
Packit 022b05
		  found=yes
Packit 022b05
		else
Packit 022b05
		  found=no
Packit 022b05
		fi
Packit 022b05
		break 2
Packit 022b05
	      fi
Packit 022b05
	    done
Packit 022b05
	  done
Packit 022b05
	  if test "$found" != yes; then
Packit 022b05
	    # deplib doesn't seem to be a libtool library
Packit 022b05
	    if test "$linkmode,$pass" = "prog,link"; then
Packit 022b05
	      compile_deplibs="$deplib $compile_deplibs"
Packit 022b05
	      finalize_deplibs="$deplib $finalize_deplibs"
Packit 022b05
	    else
Packit 022b05
	      deplibs="$deplib $deplibs"
Packit 022b05
	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
Packit 022b05
	    fi
Packit 022b05
	    continue
Packit 022b05
	  else # deplib is a libtool library
Packit 022b05
	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
Packit 022b05
	    # We need to do some special things here, and not later.
Packit 022b05
	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
Packit 022b05
	      case " $predeps $postdeps " in
Packit 022b05
	      *" $deplib "*)
Packit 022b05
		if (${SED} -e '2q' $lib |
Packit 022b05
                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
Packit 022b05
		  library_names=
Packit 022b05
		  old_library=
Packit 022b05
		  case $lib in
Packit 022b05
		  */* | *\\*) . $lib ;;
Packit 022b05
		  *) . ./$lib ;;
Packit 022b05
		  esac
Packit 022b05
		  for l in $old_library $library_names; do
Packit 022b05
		    ll="$l"
Packit 022b05
		  done
Packit 022b05
		  if test "X$ll" = "X$old_library" ; then # only static version available
Packit 022b05
		    found=no
Packit 022b05
		    ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
Packit 022b05
		    test "X$ladir" = "X$lib" && ladir="."
Packit 022b05
		    lib=$ladir/$old_library
Packit 022b05
		    if test "$linkmode,$pass" = "prog,link"; then
Packit 022b05
		      compile_deplibs="$deplib $compile_deplibs"
Packit 022b05
		      finalize_deplibs="$deplib $finalize_deplibs"
Packit 022b05
		    else
Packit 022b05
		      deplibs="$deplib $deplibs"
Packit 022b05
		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
Packit 022b05
		    fi
Packit 022b05
		    continue
Packit 022b05
		  fi
Packit 022b05
		fi
Packit 022b05
	        ;;
Packit 022b05
	      *) ;;
Packit 022b05
	      esac
Packit 022b05
	    fi
Packit 022b05
	  fi
Packit 022b05
	  ;; # -l
Packit 022b05
	-L*)
Packit 022b05
	  case $linkmode in
Packit 022b05
	  lib)
Packit 022b05
	    deplibs="$deplib $deplibs"
Packit 022b05
	    test "$pass" = conv && continue
Packit 022b05
	    newdependency_libs="$deplib $newdependency_libs"
Packit 022b05
	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
Packit 022b05
	    ;;
Packit 022b05
	  prog)
Packit 022b05
	    if test "$pass" = conv; then
Packit 022b05
	      deplibs="$deplib $deplibs"
Packit 022b05
	      continue
Packit 022b05
	    fi
Packit 022b05
	    if test "$pass" = scan; then
Packit 022b05
	      deplibs="$deplib $deplibs"
Packit 022b05
	    else
Packit 022b05
	      compile_deplibs="$deplib $compile_deplibs"
Packit 022b05
	      finalize_deplibs="$deplib $finalize_deplibs"
Packit 022b05
	    fi
Packit 022b05
	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
Packit 022b05
	    ;;
Packit 022b05
	  *)
Packit 022b05
	    $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
Packit 022b05
	    ;;
Packit 022b05
	  esac # linkmode
Packit 022b05
	  continue
Packit 022b05
	  ;; # -L
Packit 022b05
	-R*)
Packit 022b05
	  if test "$pass" = link; then
Packit 022b05
	    dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
Packit 022b05
	    # Make sure the xrpath contains only unique directories.
Packit 022b05
	    case "$xrpath " in
Packit 022b05
	    *" $dir "*) ;;
Packit 022b05
	    *) xrpath="$xrpath $dir" ;;
Packit 022b05
	    esac
Packit 022b05
	  fi
Packit 022b05
	  deplibs="$deplib $deplibs"
Packit 022b05
	  continue
Packit 022b05
	  ;;
Packit 022b05
	*.la) lib="$deplib" ;;
Packit 022b05
	*.$libext)
Packit 022b05
	  if test "$pass" = conv; then
Packit 022b05
	    deplibs="$deplib $deplibs"
Packit 022b05
	    continue
Packit 022b05
	  fi
Packit 022b05
	  case $linkmode in
Packit 022b05
	  lib)
Packit 022b05
	    valid_a_lib=no
Packit 022b05
	    case $deplibs_check_method in
Packit 022b05
	      match_pattern*)
Packit 022b05
		set dummy $deplibs_check_method
Packit 022b05
	        match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
Packit 022b05
		if eval $echo \"$deplib\" 2>/dev/null \
Packit 022b05
		    | $SED 10q \
Packit 022b05
		    | $EGREP "$match_pattern_regex" > /dev/null; then
Packit 022b05
		  valid_a_lib=yes
Packit 022b05
		fi
Packit 022b05
		;;
Packit 022b05
	      pass_all)
Packit 022b05
		valid_a_lib=yes
Packit 022b05
		;;
Packit 022b05
            esac
Packit 022b05
	    if test "$valid_a_lib" != yes; then
Packit 022b05
	      $echo
Packit 022b05
	      $echo "*** Warning: Trying to link with static lib archive $deplib."
Packit 022b05
	      $echo "*** I have the capability to make that library automatically link in when"
Packit 022b05
	      $echo "*** you link to this library.  But I can only do this if you have a"
Packit 022b05
	      $echo "*** shared version of the library, which you do not appear to have"
Packit 022b05
	      $echo "*** because the file extensions .$libext of this argument makes me believe"
Packit 022b05
	      $echo "*** that it is just a static archive that I should not used here."
Packit 022b05
	    else
Packit 022b05
	      $echo
Packit 022b05
	      $echo "*** Warning: Linking the shared library $output against the"
Packit 022b05
	      $echo "*** static library $deplib is not portable!"
Packit 022b05
	      deplibs="$deplib $deplibs"
Packit 022b05
	    fi
Packit 022b05
	    continue
Packit 022b05
	    ;;
Packit 022b05
	  prog)
Packit 022b05
	    if test "$pass" != link; then
Packit 022b05
	      deplibs="$deplib $deplibs"
Packit 022b05
	    else
Packit 022b05
	      compile_deplibs="$deplib $compile_deplibs"
Packit 022b05
	      finalize_deplibs="$deplib $finalize_deplibs"
Packit 022b05
	    fi
Packit 022b05
	    continue
Packit 022b05
	    ;;
Packit 022b05
	  esac # linkmode
Packit 022b05
	  ;; # *.$libext
Packit 022b05
	*.lo | *.$objext)
Packit 022b05
	  if test "$pass" = conv; then
Packit 022b05
	    deplibs="$deplib $deplibs"
Packit 022b05
	  elif test "$linkmode" = prog; then
Packit 022b05
	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
Packit 022b05
	      # If there is no dlopen support or we're linking statically,
Packit 022b05
	      # we need to preload.
Packit 022b05
	      newdlprefiles="$newdlprefiles $deplib"
Packit 022b05
	      compile_deplibs="$deplib $compile_deplibs"
Packit 022b05
	      finalize_deplibs="$deplib $finalize_deplibs"
Packit 022b05
	    else
Packit 022b05
	      newdlfiles="$newdlfiles $deplib"
Packit 022b05
	    fi
Packit 022b05
	  fi
Packit 022b05
	  continue
Packit 022b05
	  ;;
Packit 022b05
	%DEPLIBS%)
Packit 022b05
	  alldeplibs=yes
Packit 022b05
	  continue
Packit 022b05
	  ;;
Packit 022b05
	esac # case $deplib
Packit 022b05
	if test "$found" = yes || test -f "$lib"; then :
Packit 022b05
	else
Packit 022b05
	  $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
Packit 022b05
	  exit $EXIT_FAILURE
Packit 022b05
	fi
Packit 022b05
Packit 022b05
	# Check to see that this really is a libtool archive.
Packit 022b05
	if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
Packit 022b05
	else
Packit 022b05
	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
Packit 022b05
	  exit $EXIT_FAILURE
Packit 022b05
	fi
Packit 022b05
Packit 022b05
	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
Packit 022b05
	test "X$ladir" = "X$lib" && ladir="."
Packit 022b05
Packit 022b05
	dlname=
Packit 022b05
	dlopen=
Packit 022b05
	dlpreopen=
Packit 022b05
	libdir=
Packit 022b05
	library_names=
Packit 022b05
	old_library=
Packit 022b05
	# If the library was installed with an old release of libtool,
Packit 022b05
	# it will not redefine variables installed, or shouldnotlink
Packit 022b05
	installed=yes
Packit 022b05
	shouldnotlink=no
Packit 022b05
	avoidtemprpath=
Packit 022b05
Packit 022b05
Packit 022b05
	# Read the .la file
Packit 022b05
	case $lib in
Packit 022b05
	*/* | *\\*) . $lib ;;
Packit 022b05
	*) . ./$lib ;;
Packit 022b05
	esac
Packit 022b05
Packit 022b05
	if test "$linkmode,$pass" = "lib,link" ||
Packit 022b05
	   test "$linkmode,$pass" = "prog,scan" ||
Packit 022b05
	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
Packit 022b05
	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
Packit 022b05
	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
Packit 022b05
	fi
Packit 022b05
Packit 022b05
	if test "$pass" = conv; then
Packit 022b05
	  # Only check for convenience libraries
Packit 022b05
	  deplibs="$lib $deplibs"
Packit 022b05
	  if test -z "$libdir"; then
Packit 022b05
	    if test -z "$old_library"; then
Packit 022b05
	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
Packit 022b05
	      exit $EXIT_FAILURE
Packit 022b05
	    fi
Packit 022b05
	    # It is a libtool convenience library, so add in its objects.
Packit 022b05
	    convenience="$convenience $ladir/$objdir/$old_library"
Packit 022b05
	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
Packit 022b05
	    tmp_libs=
Packit 022b05
	    for deplib in $dependency_libs; do
Packit 022b05
	      deplibs="$deplib $deplibs"
Packit 022b05
              if test "X$duplicate_deps" = "Xyes" ; then
Packit 022b05
	        case "$tmp_libs " in
Packit 022b05
	        *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
Packit 022b05
	        esac
Packit 022b05
              fi
Packit 022b05
	      tmp_libs="$tmp_libs $deplib"
Packit 022b05
	    done
Packit 022b05
	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
Packit 022b05
	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
Packit 022b05
	    exit $EXIT_FAILURE
Packit 022b05
	  fi
Packit 022b05
	  continue
Packit 022b05
	fi # $pass = conv
Packit 022b05
Packit 022b05
Packit 022b05
	# Get the name of the library we link against.
Packit 022b05
	linklib=
Packit 022b05
	for l in $old_library $library_names; do
Packit 022b05
	  linklib="$l"
Packit 022b05
	done
Packit 022b05
	if test -z "$linklib"; then
Packit 022b05
	  $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
Packit 022b05
	  exit $EXIT_FAILURE
Packit 022b05
	fi
Packit 022b05
Packit 022b05
	# This library was specified with -dlopen.
Packit 022b05
	if test "$pass" = dlopen; then
Packit 022b05
	  if test -z "$libdir"; then
Packit 022b05
	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
Packit 022b05
	    exit $EXIT_FAILURE
Packit 022b05
	  fi
Packit 022b05
	  if test -z "$dlname" ||
Packit 022b05
	     test "$dlopen_support" != yes ||
Packit 022b05
	     test "$build_libtool_libs" = no; then
Packit 022b05
	    # If there is no dlname, no dlopen support or we're linking
Packit 022b05
	    # statically, we need to preload.  We also need to preload any
Packit 022b05
	    # dependent libraries so libltdl's deplib preloader doesn't
Packit 022b05
	    # bomb out in the load deplibs phase.
Packit 022b05
	    dlprefiles="$dlprefiles $lib $dependency_libs"
Packit 022b05
	  else
Packit 022b05
	    newdlfiles="$newdlfiles $lib"
Packit 022b05
	  fi
Packit 022b05
	  continue
Packit 022b05
	fi # $pass = dlopen
Packit 022b05
Packit 022b05
	# We need an absolute path.
Packit 022b05
	case $ladir in
Packit 022b05
	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
Packit 022b05
	*)
Packit 022b05
	  abs_ladir=`cd "$ladir" && pwd`
Packit 022b05
	  if test -z "$abs_ladir"; then
Packit 022b05
	    $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
Packit 022b05
	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
Packit 022b05
	    abs_ladir="$ladir"
Packit 022b05
	  fi
Packit 022b05
	  ;;
Packit 022b05
	esac
Packit 022b05
	laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
Packit 022b05
Packit 022b05
	# Find the relevant object directory and library name.
Packit 022b05
	if test "X$installed" = Xyes; then
Packit 022b05
	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
Packit 022b05
	    $echo "$modename: warning: library \`$lib' was moved." 1>&2
Packit 022b05
	    dir="$ladir"
Packit 022b05
	    absdir="$abs_ladir"
Packit 022b05
	    libdir="$abs_ladir"
Packit 022b05
	  else
Packit 022b05
	    dir="$libdir"
Packit 022b05
	    absdir="$libdir"
Packit 022b05
	  fi
Packit 022b05
	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
Packit 022b05
	else
Packit 022b05
	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
Packit 022b05
	    dir="$ladir"
Packit 022b05
	    absdir="$abs_ladir"
Packit 022b05
	    # Remove this search path later
Packit 022b05
	    notinst_path="$notinst_path $abs_ladir"
Packit 022b05
	  else
Packit 022b05
	    dir="$ladir/$objdir"
Packit 022b05
	    absdir="$abs_ladir/$objdir"
Packit 022b05
	    # Remove this search path later
Packit 022b05
	    notinst_path="$notinst_path $abs_ladir"
Packit 022b05
	  fi
Packit 022b05
	fi # $installed = yes
Packit 022b05
	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
Packit 022b05
Packit 022b05
	# This library was specified with -dlpreopen.
Packit 022b05
	if test "$pass" = dlpreopen; then
Packit 022b05
	  if test -z "$libdir"; then
Packit 022b05
	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
Packit 022b05
	    exit $EXIT_FAILURE
Packit 022b05
	  fi
Packit 022b05
	  # Prefer using a static library (so that no silly _DYNAMIC symbols
Packit 022b05
	  # are required to link).
Packit 022b05
	  if test -n "$old_library"; then
Packit 022b05
	    newdlprefiles="$newdlprefiles $dir/$old_library"
Packit 022b05
	  # Otherwise, use the dlname, so that lt_dlopen finds it.
Packit 022b05
	  elif test -n "$dlname"; then
Packit 022b05
	    newdlprefiles="$newdlprefiles $dir/$dlname"
Packit 022b05
	  else
Packit 022b05
	    newdlprefiles="$newdlprefiles $dir/$linklib"
Packit 022b05
	  fi
Packit 022b05
	fi # $pass = dlpreopen
Packit 022b05
Packit 022b05
	if test -z "$libdir"; then
Packit 022b05
	  # Link the convenience library
Packit 022b05
	  if test "$linkmode" = lib; then
Packit 022b05
	    deplibs="$dir/$old_library $deplibs"
Packit 022b05
	  elif test "$linkmode,$pass" = "prog,link"; then
Packit 022b05
	    compile_deplibs="$dir/$old_library $compile_deplibs"
Packit 022b05
	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
Packit 022b05
	  else
Packit 022b05
	    deplibs="$lib $deplibs" # used for prog,scan pass
Packit 022b05
	  fi
Packit 022b05
	  continue
Packit 022b05
	fi
Packit 022b05
Packit 022b05
Packit 022b05
	if test "$linkmode" = prog && test "$pass" != link; then
Packit 022b05
	  newlib_search_path="$newlib_search_path $ladir"
Packit 022b05
	  deplibs="$lib $deplibs"
Packit 022b05
Packit 022b05
	  linkalldeplibs=no
Packit 022b05
	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
Packit 022b05
	     test "$build_libtool_libs" = no; then
Packit 022b05
	    linkalldeplibs=yes
Packit 022b05
	  fi
Packit 022b05
Packit 022b05
	  tmp_libs=
Packit 022b05
	  for deplib in $dependency_libs; do
Packit 022b05
	    case $deplib in
Packit 022b05
	    -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
Packit 022b05
	    esac
Packit 022b05
	    # Need to link against all dependency_libs?
Packit 022b05
	    if test "$linkalldeplibs" = yes; then
Packit 022b05
	      deplibs="$deplib $deplibs"
Packit 022b05
	    else
Packit 022b05
	      # Need to hardcode shared library paths
Packit 022b05
	      # or/and link against static libraries
Packit 022b05
	      newdependency_libs="$deplib $newdependency_libs"
Packit 022b05
	    fi
Packit 022b05
	    if test "X$duplicate_deps" = "Xyes" ; then
Packit 022b05
	      case "$tmp_libs " in
Packit 022b05
	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
Packit 022b05
	      esac
Packit 022b05
	    fi
Packit 022b05
	    tmp_libs="$tmp_libs $deplib"
Packit 022b05
	  done # for deplib
Packit 022b05
	  continue
Packit 022b05
	fi # $linkmode = prog...
Packit 022b05
Packit 022b05
	if test "$linkmode,$pass" = "prog,link"; then
Packit 022b05
	  if test -n "$library_names" &&
Packit 022b05
	     { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
Packit 022b05
	    # We need to hardcode the library path
Packit 022b05
	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
Packit 022b05
	      # Make sure the rpath contains only unique directories.
Packit 022b05
	      case "$temp_rpath " in
Packit 022b05
	      *" $dir "*) ;;
Packit 022b05
	      *" $absdir "*) ;;
Packit 022b05
	      *) temp_rpath="$temp_rpath $absdir" ;;
Packit 022b05
	      esac
Packit 022b05
	    fi
Packit 022b05
Packit 022b05
	    # Hardcode the library path.
Packit 022b05
	    # Skip directories that are in the system default run-time
Packit 022b05
	    # search path.
Packit 022b05
	    case " $sys_lib_dlsearch_path " in
Packit 022b05
	    *" $absdir "*) ;;
Packit 022b05
	    *)
Packit 022b05
	      case "$compile_rpath " in
Packit 022b05
	      *" $absdir "*) ;;
Packit 022b05
	      *) compile_rpath="$compile_rpath $absdir"
Packit 022b05
	      esac
Packit 022b05
	      ;;
Packit 022b05
	    esac
Packit 022b05
	    case " $sys_lib_dlsearch_path " in
Packit 022b05
	    *" $libdir "*) ;;
Packit 022b05
	    *)
Packit 022b05
	      case "$finalize_rpath " in
Packit 022b05
	      *" $libdir "*) ;;
Packit 022b05
	      *) finalize_rpath="$finalize_rpath $libdir"
Packit 022b05
	      esac
Packit 022b05
	      ;;
Packit 022b05
	    esac
Packit 022b05
	  fi # $linkmode,$pass = prog,link...
Packit 022b05
Packit 022b05
	  if test "$alldeplibs" = yes &&
Packit 022b05
	     { test "$deplibs_check_method" = pass_all ||
Packit 022b05
	       { test "$build_libtool_libs" = yes &&
Packit 022b05
		 test -n "$library_names"; }; }; then
Packit 022b05
	    # We only need to search for static libraries
Packit 022b05
	    continue
Packit 022b05
	  fi
Packit 022b05
	fi
Packit 022b05
Packit 022b05
	link_static=no # Whether the deplib will be linked statically
Packit 022b05
	use_static_libs=$prefer_static_libs
Packit 022b05
	if test "$use_static_libs" = built && test "$installed" = yes ; then
Packit 022b05
	  use_static_libs=no
Packit 022b05
	fi
Packit 022b05
	if test -n "$library_names" &&
Packit 022b05
	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
Packit 022b05
	  if test "$installed" = no; then
Packit 022b05
	    notinst_deplibs="$notinst_deplibs $lib"
Packit 022b05
	    need_relink=yes
Packit 022b05
	  fi
Packit 022b05
	  # This is a shared library
Packit 022b05
Packit 022b05
	  # Warn about portability, can't link against -module's on
Packit 022b05
	  # some systems (darwin)
Packit 022b05
	  if test "$shouldnotlink" = yes && test "$pass" = link ; then
Packit 022b05
	    $echo
Packit 022b05
	    if test "$linkmode" = prog; then
Packit 022b05
	      $echo "*** Warning: Linking the executable $output against the loadable module"
Packit 022b05
	    else
Packit 022b05
	      $echo "*** Warning: Linking the shared library $output against the loadable module"
Packit 022b05
	    fi
Packit 022b05
	    $echo "*** $linklib is not portable!"
Packit 022b05
	  fi
Packit 022b05
	  if test "$linkmode" = lib &&
Packit 022b05
	     test "$hardcode_into_libs" = yes; then
Packit 022b05
	    # Hardcode the library path.
Packit 022b05
	    # Skip directories that are in the system default run-time
Packit 022b05
	    # search path.
Packit 022b05
	    case " $sys_lib_dlsearch_path " in
Packit 022b05
	    *" $absdir "*) ;;
Packit 022b05
	    *)
Packit 022b05
	      case "$compile_rpath " in
Packit 022b05
	      *" $absdir "*) ;;
Packit 022b05
	      *) compile_rpath="$compile_rpath $absdir"
Packit 022b05
	      esac
Packit 022b05
	      ;;
Packit 022b05
	    esac
Packit 022b05
	    case " $sys_lib_dlsearch_path " in
Packit 022b05
	    *" $libdir "*) ;;
Packit 022b05
	    *)
Packit 022b05
	      case "$finalize_rpath " in
Packit 022b05
	      *" $libdir "*) ;;
Packit 022b05
	      *) finalize_rpath="$finalize_rpath $libdir"
Packit 022b05
	      esac
Packit 022b05
	      ;;
Packit 022b05
	    esac
Packit 022b05
	  fi
Packit 022b05
Packit 022b05
	  if test -n "$old_archive_from_expsyms_cmds"; then
Packit 022b05
	    # figure out the soname
Packit 022b05
	    set dummy $library_names
Packit 022b05
	    realname="$2"
Packit 022b05
	    shift; shift
Packit 022b05
	    libname=`eval \\$echo \"$libname_spec\"`
Packit 022b05
	    # use dlname if we got it. it's perfectly good, no?
Packit 022b05
	    if test -n "$dlname"; then
Packit 022b05
	      soname="$dlname"
Packit 022b05
	    elif test -n "$soname_spec"; then
Packit 022b05
	      # bleh windows
Packit 022b05
	      case $host in
Packit 022b05
	      *cygwin* | mingw*)
Packit 022b05
		major=`expr $current - $age`
Packit 022b05
		versuffix="-$major"
Packit 022b05
		;;
Packit 022b05
	      esac
Packit 022b05
	      eval soname=\"$soname_spec\"
Packit 022b05
	    else
Packit 022b05
	      soname="$realname"
Packit 022b05
	    fi
Packit 022b05
Packit 022b05
	    # Make a new name for the extract_expsyms_cmds to use
Packit 022b05
	    soroot="$soname"
Packit 022b05
	    soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
Packit 022b05
	    newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
Packit 022b05
Packit 022b05
	    # If the library has no export list, then create one now
Packit 022b05
	    if test -f "$output_objdir/$soname-def"; then :
Packit 022b05
	    else
Packit 022b05
	      $show "extracting exported symbol list from \`$soname'"
Packit 022b05
	      save_ifs="$IFS"; IFS='~'
Packit 022b05
	      cmds=$extract_expsyms_cmds
Packit 022b05
	      for cmd in $cmds; do
Packit 022b05
		IFS="$save_ifs"
Packit 022b05
		eval cmd=\"$cmd\"
Packit 022b05
		$show "$cmd"
Packit 022b05
		$run eval "$cmd" || exit $?
Packit 022b05
	      done
Packit 022b05
	      IFS="$save_ifs"
Packit 022b05
	    fi
Packit 022b05
Packit 022b05
	    # Create $newlib
Packit 022b05
	    if test -f "$output_objdir/$newlib"; then :; else
Packit 022b05
	      $show "generating import library for \`$soname'"
Packit 022b05
	      save_ifs="$IFS"; IFS='~'
Packit 022b05
	      cmds=$old_archive_from_expsyms_cmds
Packit 022b05
	      for cmd in $cmds; do
Packit 022b05
		IFS="$save_ifs"
Packit 022b05
		eval cmd=\"$cmd\"
Packit 022b05
		$show "$cmd"
Packit 022b05
		$run eval "$cmd" || exit $?
Packit 022b05
	      done
Packit 022b05
	      IFS="$save_ifs"
Packit 022b05
	    fi
Packit 022b05
	    # make sure the library variables are pointing to the new library
Packit 022b05
	    dir=$output_objdir
Packit 022b05
	    linklib=$newlib
Packit 022b05
	  fi # test -n "$old_archive_from_expsyms_cmds"
Packit 022b05
Packit 022b05
	  if test "$linkmode" = prog || test "$mode" != relink; then
Packit 022b05
	    add_shlibpath=
Packit 022b05
	    add_dir=
Packit 022b05
	    add=
Packit 022b05
	    lib_linked=yes
Packit 022b05
	    case $hardcode_action in
Packit 022b05
	    immediate | unsupported)
Packit 022b05
	      if test "$hardcode_direct" = no; then
Packit 022b05
		add="$dir/$linklib"
Packit 022b05
		case $host in
Packit 022b05
		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
Packit 022b05
		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
Packit 022b05
		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
Packit 022b05
		    *-*-unixware7*) add_dir="-L$dir" ;;
Packit 022b05
		  *-*-darwin* )
Packit 022b05
		    # if the lib is a module then we can not link against
Packit 022b05
		    # it, someone is ignoring the new warnings I added
Packit 022b05
		    if /usr/bin/file -L $add 2> /dev/null |
Packit 022b05
                      $EGREP ": [^:]* bundle" >/dev/null ; then
Packit 022b05
		      $echo "** Warning, lib $linklib is a module, not a shared library"
Packit 022b05
		      if test -z "$old_library" ; then
Packit 022b05
		        $echo
Packit 022b05
		        $echo "** And there doesn't seem to be a static archive available"
Packit 022b05
		        $echo "** The link will probably fail, sorry"
Packit 022b05
		      else
Packit 022b05
		        add="$dir/$old_library"
Packit 022b05
		      fi
Packit 022b05
		    fi
Packit 022b05
		esac
Packit 022b05
	      elif test "$hardcode_minus_L" = no; then
Packit 022b05
		case $host in
Packit 022b05
		*-*-sunos*) add_shlibpath="$dir" ;;
Packit 022b05
		esac
Packit 022b05
		add_dir="-L$dir"
Packit 022b05
		add="-l$name"
Packit 022b05
	      elif test "$hardcode_shlibpath_var" = no; then
Packit 022b05
		add_shlibpath="$dir"
Packit 022b05
		add="-l$name"
Packit 022b05
	      else
Packit 022b05
		lib_linked=no
Packit 022b05
	      fi
Packit 022b05
	      ;;
Packit 022b05
	    relink)
Packit 022b05
	      if test "$hardcode_direct" = yes; then
Packit 022b05
		add="$dir/$linklib"
Packit 022b05
	      elif test "$hardcode_minus_L" = yes; then
Packit 022b05
		add_dir="-L$dir"
Packit 022b05
		# Try looking first in the location we're being installed to.
Packit 022b05
		if test -n "$inst_prefix_dir"; then
Packit 022b05
		  case $libdir in
Packit 022b05
		    [\\/]*)
Packit 022b05
		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
Packit 022b05
		      ;;
Packit 022b05
		  esac
Packit 022b05
		fi
Packit 022b05
		add="-l$name"
Packit 022b05
	      elif test "$hardcode_shlibpath_var" = yes; then
Packit 022b05
		add_shlibpath="$dir"
Packit 022b05
		add="-l$name"
Packit 022b05
	      else
Packit 022b05
		lib_linked=no
Packit 022b05
	      fi
Packit 022b05
	      ;;
Packit 022b05
	    *) lib_linked=no ;;
Packit 022b05
	    esac
Packit 022b05
Packit 022b05
	    if test "$lib_linked" != yes; then
Packit 022b05
	      $echo "$modename: configuration error: unsupported hardcode properties"
Packit 022b05
	      exit $EXIT_FAILURE
Packit 022b05
	    fi
Packit 022b05
Packit 022b05
	    if test -n "$add_shlibpath"; then
Packit 022b05
	      case :$compile_shlibpath: in
Packit 022b05
	      *":$add_shlibpath:"*) ;;
Packit 022b05
	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
Packit 022b05
	      esac
Packit 022b05
	    fi
Packit 022b05
	    if test "$linkmode" = prog; then
Packit 022b05
	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
Packit 022b05
	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
Packit 022b05
	    else
Packit 022b05
	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
Packit 022b05
	      test -n "$add" && deplibs="$add $deplibs"
Packit 022b05
	      if test "$hardcode_direct" != yes && \
Packit 022b05
		 test "$hardcode_minus_L" != yes && \
Packit 022b05
		 test "$hardcode_shlibpath_var" = yes; then
Packit 022b05
		case :$finalize_shlibpath: in
Packit 022b05
		*":$libdir:"*) ;;
Packit 022b05
		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
Packit 022b05
		esac
Packit 022b05
	      fi
Packit 022b05
	    fi
Packit 022b05
	  fi
Packit 022b05
Packit 022b05
	  if test "$linkmode" = prog || test "$mode" = relink; then
Packit 022b05
	    add_shlibpath=
Packit 022b05
	    add_dir=
Packit 022b05
	    add=
Packit 022b05
	    # Finalize command for both is simple: just hardcode it.
Packit 022b05
	    if test "$hardcode_direct" = yes; then
Packit 022b05
	      add="$libdir/$linklib"
Packit 022b05
	    elif test "$hardcode_minus_L" = yes; then
Packit 022b05
	      add_dir="-L$libdir"
Packit 022b05
	      add="-l$name"
Packit 022b05
	    elif test "$hardcode_shlibpath_var" = yes; then
Packit 022b05
	      case :$finalize_shlibpath: in
Packit 022b05
	      *":$libdir:"*) ;;
Packit 022b05
	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
Packit 022b05
	      esac
Packit 022b05
	      add="-l$name"
Packit 022b05
	    elif test "$hardcode_automatic" = yes; then
Packit 022b05
	      if test -n "$inst_prefix_dir" &&
Packit 022b05
		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
Packit 022b05
	        add="$inst_prefix_dir$libdir/$linklib"
Packit 022b05
	      else
Packit 022b05
	        add="$libdir/$linklib"
Packit 022b05
	      fi
Packit 022b05
	    else
Packit 022b05
	      # We cannot seem to hardcode it, guess we'll fake it.
Packit 022b05
	      add_dir="-L$libdir"
Packit 022b05
	      # Try looking first in the location we're being installed to.
Packit 022b05
	      if test -n "$inst_prefix_dir"; then
Packit 022b05
		case $libdir in
Packit 022b05
		  [\\/]*)
Packit 022b05
		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
Packit 022b05
		    ;;
Packit 022b05
		esac
Packit 022b05
	      fi
Packit 022b05
	      add="-l$name"
Packit 022b05
	    fi
Packit 022b05
Packit 022b05
	    if test "$linkmode" = prog; then
Packit 022b05
	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
Packit 022b05
	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
Packit 022b05
	    else
Packit 022b05
	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
Packit 022b05
	      test -n "$add" && deplibs="$add $deplibs"
Packit 022b05
	    fi
Packit 022b05
	  fi
Packit 022b05
	elif test "$linkmode" = prog; then
Packit 022b05
	  # Here we assume that one of hardcode_direct or hardcode_minus_L
Packit 022b05
	  # is not unsupported.  This is valid on all known static and
Packit 022b05
	  # shared platforms.
Packit 022b05
	  if test "$hardcode_direct" != unsupported; then
Packit 022b05
	    test -n "$old_library" && linklib="$old_library"
Packit 022b05
	    compile_deplibs="$dir/$linklib $compile_deplibs"
Packit 022b05
	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
Packit 022b05
	  else
Packit 022b05
	    compile_deplibs="-l$name -L$dir $compile_deplibs"
Packit 022b05
	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
Packit 022b05
	  fi
Packit 022b05
	elif test "$build_libtool_libs" = yes; then
Packit 022b05
	  # Not a shared library
Packit 022b05
	  if test "$deplibs_check_method" != pass_all; then
Packit 022b05
	    # We're trying link a shared library against a static one
Packit 022b05
	    # but the system doesn't support it.
Packit 022b05
Packit 022b05
	    # Just print a warning and add the library to dependency_libs so
Packit 022b05
	    # that the program can be linked against the static library.
Packit 022b05
	    $echo
Packit 022b05
	    $echo "*** Warning: This system can not link to static lib archive $lib."
Packit 022b05
	    $echo "*** I have the capability to make that library automatically link in when"
Packit 022b05
	    $echo "*** you link to this library.  But I can only do this if you have a"
Packit 022b05
	    $echo "*** shared version of the library, which you do not appear to have."
Packit 022b05
	    if test "$module" = yes; then
Packit 022b05
	      $echo "*** But as you try to build a module library, libtool will still create "
Packit 022b05
	      $echo "*** a static module, that should work as long as the dlopening application"
Packit 022b05
	      $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
Packit 022b05
	      if test -z "$global_symbol_pipe"; then
Packit 022b05
		$echo
Packit 022b05
		$echo "*** However, this would only work if libtool was able to extract symbol"
Packit 022b05
		$echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
Packit 022b05
		$echo "*** not find such a program.  So, this module is probably useless."
Packit 022b05
		$echo "*** \`nm' from GNU binutils and a full rebuild may help."
Packit 022b05
	      fi
Packit 022b05
	      if test "$build_old_libs" = no; then
Packit 022b05
		build_libtool_libs=module
Packit 022b05
		build_old_libs=yes
Packit 022b05
	      else
Packit 022b05
		build_libtool_libs=no
Packit 022b05
	      fi
Packit 022b05
	    fi
Packit 022b05
	  else
Packit 022b05
	    deplibs="$dir/$old_library $deplibs"
Packit 022b05
	    link_static=yes
Packit 022b05
	  fi
Packit 022b05
	fi # link shared/static library?
Packit 022b05
Packit 022b05
	if test "$linkmode" = lib; then
Packit 022b05
	  if test -n "$dependency_libs" &&
Packit 022b05
	     { test "$hardcode_into_libs" != yes ||
Packit 022b05
	       test "$build_old_libs" = yes ||
Packit 022b05
	       test "$link_static" = yes; }; then
Packit 022b05
	    # Extract -R from dependency_libs
Packit 022b05
	    temp_deplibs=
Packit 022b05
	    for libdir in $dependency_libs; do
Packit 022b05
	      case $libdir in
Packit 022b05
	      -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
Packit 022b05
		   case " $xrpath " in
Packit 022b05
		   *" $temp_xrpath "*) ;;
Packit 022b05
		   *) xrpath="$xrpath $temp_xrpath";;
Packit 022b05
		   esac;;
Packit 022b05
	      *) temp_deplibs="$temp_deplibs $libdir";;
Packit 022b05
	      esac
Packit 022b05
	    done
Packit 022b05
	    dependency_libs="$temp_deplibs"
Packit 022b05
	  fi
Packit 022b05
Packit 022b05
	  newlib_search_path="$newlib_search_path $absdir"
Packit 022b05
	  # Link against this library
Packit 022b05
	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
Packit 022b05
	  # ... and its dependency_libs
Packit 022b05
	  tmp_libs=
Packit 022b05
	  for deplib in $dependency_libs; do
Packit 022b05
	    newdependency_libs="$deplib $newdependency_libs"
Packit 022b05
	    if test "X$duplicate_deps" = "Xyes" ; then
Packit 022b05
	      case "$tmp_libs " in
Packit 022b05
	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
Packit 022b05
	      esac
Packit 022b05
	    fi
Packit 022b05
	    tmp_libs="$tmp_libs $deplib"
Packit 022b05
	  done
Packit 022b05
Packit 022b05
	  if test "$link_all_deplibs" != no; then
Packit 022b05
	    # Add the search paths of all dependency libraries
Packit 022b05
	    for deplib in $dependency_libs; do
Packit 022b05
	      case $deplib in
Packit 022b05
	      -L*) path="$deplib" ;;
Packit 022b05
	      *.la)
Packit 022b05
		dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
Packit 022b05
		test "X$dir" = "X$deplib" && dir="."
Packit 022b05
		# We need an absolute path.
Packit 022b05
		case $dir in
Packit 022b05
		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
Packit 022b05
		*)
Packit 022b05
		  absdir=`cd "$dir" && pwd`
Packit 022b05
		  if test -z "$absdir"; then
Packit 022b05
		    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
Packit 022b05
		    absdir="$dir"
Packit 022b05
		  fi
Packit 022b05
		  ;;
Packit 022b05
		esac
Packit 022b05
		if grep "^installed=no" $deplib > /dev/null; then
Packit 022b05
		  path="$absdir/$objdir"
Packit 022b05
		else
Packit 022b05
		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
Packit 022b05
		  if test -z "$libdir"; then
Packit 022b05
		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
Packit 022b05
		    exit $EXIT_FAILURE
Packit 022b05
		  fi
Packit 022b05
		  if test "$absdir" != "$libdir"; then
Packit 022b05
		    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
Packit 022b05
		  fi
Packit 022b05
		  path="$absdir"
Packit 022b05
		fi
Packit 022b05
		depdepl=
Packit 022b05
		case $host in
Packit 022b05
		*-*-darwin*)
Packit 022b05
		  # we do not want to link against static libs,
Packit 022b05
		  # but need to link against shared
Packit 022b05
		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
Packit 022b05
		  if test -n "$deplibrary_names" ; then
Packit 022b05
		    for tmp in $deplibrary_names ; do
Packit 022b05
		      depdepl=$tmp
Packit 022b05
		    done
Packit 022b05
		    if test -f "$path/$depdepl" ; then
Packit 022b05
		      depdepl="$path/$depdepl"
Packit 022b05
		    fi
Packit 022b05
		    # do not add paths which are already there
Packit 022b05
		    case " $newlib_search_path " in
Packit 022b05
		    *" $path "*) ;;
Packit 022b05
		    *) newlib_search_path="$newlib_search_path $path";;
Packit 022b05
		    esac
Packit 022b05
		  fi
Packit 022b05
		  path=""
Packit 022b05
		  ;;
Packit 022b05
		*)
Packit 022b05
		  path="-L$path"
Packit 022b05
		  ;;
Packit 022b05
		esac
Packit 022b05
		;;
Packit 022b05
	      -l*)
Packit 022b05
		case $host in
Packit 022b05
		*-*-darwin*)
Packit 022b05
		  # Again, we only want to link against shared libraries
Packit 022b05
		  eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
Packit 022b05
		  for tmp in $newlib_search_path ; do
Packit 022b05
		    if test -f "$tmp/lib$tmp_libs.dylib" ; then
Packit 022b05
		      eval depdepl="$tmp/lib$tmp_libs.dylib"
Packit 022b05
		      break
Packit 022b05
		    fi
Packit 022b05
		  done
Packit 022b05
		  path=""
Packit 022b05
		  ;;
Packit 022b05
		*) continue ;;
Packit 022b05
		esac
Packit 022b05
		;;
Packit 022b05
	      *) continue ;;
Packit 022b05
	      esac
Packit 022b05
	      case " $deplibs " in
Packit 022b05
	      *" $path "*) ;;
Packit 022b05
	      *) deplibs="$path $deplibs" ;;
Packit 022b05
	      esac
Packit 022b05
	      case " $deplibs " in
Packit 022b05
	      *" $depdepl "*) ;;
Packit 022b05
	      *) deplibs="$depdepl $deplibs" ;;
Packit 022b05
	      esac
Packit 022b05
	    done
Packit 022b05
	  fi # link_all_deplibs != no
Packit 022b05
	fi # linkmode = lib
Packit 022b05
      done # for deplib in $libs
Packit 022b05
      dependency_libs="$newdependency_libs"
Packit 022b05
      if test "$pass" = dlpreopen; then
Packit 022b05
	# Link the dlpreopened libraries before other libraries
Packit 022b05
	for deplib in $save_deplibs; do
Packit 022b05
	  deplibs="$deplib $deplibs"
Packit 022b05
	done
Packit 022b05
      fi
Packit 022b05
      if test "$pass" != dlopen; then
Packit 022b05
	if test "$pass" != conv; then
Packit 022b05
	  # Make sure lib_search_path contains only unique directories.
Packit 022b05
	  lib_search_path=
Packit 022b05
	  for dir in $newlib_search_path; do
Packit 022b05
	    case "$lib_search_path " in
Packit 022b05
	    *" $dir "*) ;;
Packit 022b05
	    *) lib_search_path="$lib_search_path $dir" ;;
Packit 022b05
	    esac
Packit 022b05
	  done
Packit 022b05
	  newlib_search_path=
Packit 022b05
	fi
Packit 022b05
Packit 022b05
	if test "$linkmode,$pass" != "prog,link"; then
Packit 022b05
	  vars="deplibs"
Packit 022b05
	else
Packit 022b05
	  vars="compile_deplibs finalize_deplibs"
Packit 022b05
	fi
Packit 022b05
	for var in $vars dependency_libs; do
Packit 022b05
	  # Add libraries to $var in reverse order
Packit 022b05
	  eval tmp_libs=\"\$$var\"
Packit 022b05
	  new_libs=
Packit 022b05
	  for deplib in $tmp_libs; do
Packit 022b05
	    # FIXME: Pedantically, this is the right thing to do, so
Packit 022b05
	    #        that some nasty dependency loop isn't accidentally
Packit 022b05
	    #        broken:
Packit 022b05
	    #new_libs="$deplib $new_libs"
Packit 022b05
	    # Pragmatically, this seems to cause very few problems in
Packit 022b05
	    # practice:
Packit 022b05
	    case $deplib in
Packit 022b05
	    -L*) new_libs="$deplib $new_libs" ;;
Packit 022b05
	    -R*) ;;
Packit 022b05
	    *)
Packit 022b05
	      # And here is the reason: when a library appears more
Packit 022b05
	      # than once as an explicit dependence of a library, or
Packit 022b05
	      # is implicitly linked in more than once by the
Packit 022b05
	      # compiler, it is considered special, and multiple
Packit 022b05
	      # occurrences thereof are not removed.  Compare this
Packit 022b05
	      # with having the same library being listed as a
Packit 022b05
	      # dependency of multiple other libraries: in this case,
Packit 022b05
	      # we know (pedantically, we assume) the library does not
Packit 022b05
	      # need to be listed more than once, so we keep only the
Packit 022b05
	      # last copy.  This is not always right, but it is rare
Packit 022b05
	      # enough that we require users that really mean to play
Packit 022b05
	      # such unportable linking tricks to link the library
Packit 022b05
	      # using -Wl,-lname, so that libtool does not consider it
Packit 022b05
	      # for duplicate removal.
Packit 022b05
	      case " $specialdeplibs " in
Packit 022b05
	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
Packit 022b05
	      *)
Packit 022b05
		case " $new_libs " in
Packit 022b05
		*" $deplib "*) ;;
Packit 022b05
		*) new_libs="$deplib $new_libs" ;;
Packit 022b05
		esac
Packit 022b05
		;;
Packit 022b05
	      esac
Packit 022b05
	      ;;
Packit 022b05
	    esac
Packit 022b05
	  done
Packit 022b05
	  tmp_libs=
Packit 022b05
	  for deplib in $new_libs; do
Packit 022b05
	    case $deplib in
Packit 022b05
	    -L*)
Packit 022b05
	      case " $tmp_libs " in
Packit 022b05
	      *" $deplib "*) ;;
Packit 022b05
	      *) tmp_libs="$tmp_libs $deplib" ;;
Packit 022b05
	      esac
Packit 022b05
	      ;;
Packit 022b05
	    *) tmp_libs="$tmp_libs $deplib" ;;
Packit 022b05
	    esac
Packit 022b05
	  done
Packit 022b05
	  eval $var=\"$tmp_libs\"
Packit 022b05
	done # for var
Packit 022b05
      fi
Packit 022b05
      # Last step: remove runtime libs from dependency_libs
Packit 022b05
      # (they stay in deplibs)
Packit 022b05
      tmp_libs=
Packit 022b05
      for i in $dependency_libs ; do
Packit 022b05
	case " $predeps $postdeps $compiler_lib_search_path " in
Packit 022b05
	*" $i "*)
Packit 022b05
	  i=""
Packit 022b05
	  ;;
Packit 022b05
	esac
Packit 022b05
	if test -n "$i" ; then
Packit 022b05
	  tmp_libs="$tmp_libs $i"
Packit 022b05
	fi
Packit 022b05
      done
Packit 022b05
      dependency_libs=$tmp_libs
Packit 022b05
    done # for pass
Packit 022b05
    if test "$linkmode" = prog; then
Packit 022b05
      dlfiles="$newdlfiles"
Packit 022b05
      dlprefiles="$newdlprefiles"
Packit 022b05
    fi
Packit 022b05
Packit 022b05
    case $linkmode in
Packit 022b05
    oldlib)
Packit 022b05
      if test -n "$deplibs"; then
Packit 022b05
	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
Packit 022b05
      fi
Packit 022b05
Packit 022b05
      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
Packit 022b05
	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
Packit 022b05
      fi
Packit 022b05
Packit 022b05
      if test -n "$rpath"; then
Packit 022b05
	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
Packit 022b05
      fi
Packit 022b05
Packit 022b05
      if test -n "$xrpath"; then
Packit 022b05
	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
Packit 022b05
      fi
Packit 022b05
Packit 022b05
      if test -n "$vinfo"; then
Packit 022b05
	$echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
Packit 022b05
      fi
Packit 022b05
Packit 022b05
      if test -n "$release"; then
Packit 022b05
	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
Packit 022b05
      fi
Packit 022b05
Packit 022b05
      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
Packit 022b05
	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
Packit 022b05
      fi
Packit 022b05
Packit 022b05
      # Now set the variables for building old libraries.
Packit 022b05
      build_libtool_libs=no
Packit 022b05
      oldlibs="$output"
Packit 022b05
      objs="$objs$old_deplibs"
Packit 022b05
      ;;
Packit 022b05
Packit 022b05
    lib)
Packit 022b05
      # Make sure we only generate libraries of the form `libNAME.la'.
Packit 022b05
      case $outputname in
Packit 022b05
      lib*)
Packit 022b05
	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
Packit 022b05
	eval shared_ext=\"$shrext_cmds\"
Packit 022b05
	eval libname=\"$libname_spec\"
Packit 022b05
	;;
Packit 022b05
      *)
Packit 022b05
	if test "$module" = no; then
Packit 022b05
	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
Packit 022b05
	  $echo "$help" 1>&2
Packit 022b05
	  exit $EXIT_FAILURE
Packit 022b05
	fi
Packit 022b05
	if test "$need_lib_prefix" != no; then
Packit 022b05
	  # Add the "lib" prefix for modules if required
Packit 022b05
	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
Packit 022b05
	  eval shared_ext=\"$shrext_cmds\"
Packit 022b05
	  eval libname=\"$libname_spec\"
Packit 022b05
	else
Packit 022b05
	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
Packit 022b05
	fi
Packit 022b05
	;;
Packit 022b05
      esac
Packit 022b05
Packit 022b05
      if test -n "$objs"; then
Packit 022b05
	if test "$deplibs_check_method" != pass_all; then
Packit 022b05
	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
Packit 022b05
	  exit $EXIT_FAILURE
Packit 022b05
	else
Packit 022b05
	  $echo
Packit 022b05
	  $echo "*** Warning: Linking the shared library $output against the non-libtool"
Packit 022b05
	  $echo "*** objects $objs is not portable!"
Packit 022b05
	  libobjs="$libobjs $objs"
Packit 022b05
	fi
Packit 022b05
      fi
Packit 022b05
Packit 022b05
      if test "$dlself" != no; then
Packit 022b05
	$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
Packit 022b05
      fi
Packit 022b05
Packit 022b05
      set dummy $rpath
Packit 022b05
      if test "$#" -gt 2; then
Packit 022b05
	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
Packit 022b05
      fi
Packit 022b05
      install_libdir="$2"
Packit 022b05
Packit 022b05
      oldlibs=
Packit 022b05
      if test -z "$rpath"; then
Packit 022b05
	if test "$build_libtool_libs" = yes; then
Packit 022b05
	  # Building a libtool convenience library.
Packit 022b05
	  # Some compilers have problems with a `.al' extension so
Packit 022b05
	  # convenience libraries should have the same extension an
Packit 022b05
	  # archive normally would.
Packit 022b05
	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
Packit 022b05
	  build_libtool_libs=convenience
Packit 022b05
	  build_old_libs=yes
Packit 022b05
	fi
Packit 022b05
Packit 022b05
	if test -n "$vinfo"; then
Packit 022b05
	  $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
Packit 022b05
	fi
Packit 022b05
Packit 022b05
	if test -n "$release"; then
Packit 022b05
	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
Packit 022b05
	fi
Packit 022b05
      else
Packit 022b05
Packit 022b05
	# Parse the version information argument.
Packit 022b05
	save_ifs="$IFS"; IFS=':'
Packit 022b05
	set dummy $vinfo 0 0 0
Packit 022b05
	IFS="$save_ifs"
Packit 022b05
Packit 022b05
	if test -n "$8"; then
Packit 022b05
	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
Packit 022b05
	  $echo "$help" 1>&2
Packit 022b05
	  exit $EXIT_FAILURE
Packit 022b05
	fi
Packit 022b05
Packit 022b05
	# convert absolute version numbers to libtool ages
Packit 022b05
	# this retains compatibility with .la files and attempts
Packit 022b05
	# to make the code below a bit more comprehensible
Packit 022b05
Packit 022b05
	case $vinfo_number in
Packit 022b05
	yes)
Packit 022b05
	  number_major="$2"
Packit 022b05
	  number_minor="$3"
Packit 022b05
	  number_revision="$4"
Packit 022b05
	  #
Packit 022b05
	  # There are really only two kinds -- those that
Packit 022b05
	  # use the current revision as the major version
Packit 022b05
	  # and those that subtract age and use age as
Packit 022b05
	  # a minor version.  But, then there is irix
Packit 022b05
	  # which has an extra 1 added just for fun
Packit 022b05
	  #
Packit 022b05
	  case $version_type in
Packit 022b05
	  darwin|linux|osf|windows)
Packit 022b05
	    current=`expr $number_major + $number_minor`
Packit 022b05
	    age="$number_minor"
Packit 022b05
	    revision="$number_revision"
Packit 022b05
	    ;;
Packit 022b05
	  freebsd-aout|freebsd-elf|sunos)
Packit 022b05
	    current="$number_major"
Packit 022b05
	    revision="$number_minor"
Packit 022b05
	    age="0"
Packit 022b05
	    ;;
Packit 022b05
	  irix|nonstopux)
Packit 022b05
	    current=`expr $number_major + $number_minor - 1`
Packit 022b05
	    age="$number_minor"
Packit 022b05
	    revision="$number_minor"
Packit 022b05
	    ;;
Packit 022b05
	  *)
Packit 022b05
	    $echo "$modename: unknown library version type \`$version_type'" 1>&2
Packit 022b05
	    $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
Packit 022b05
	    exit $EXIT_FAILURE
Packit 022b05
	    ;;
Packit 022b05
	  esac
Packit 022b05
	  ;;
Packit 022b05
	no)
Packit 022b05
	  current="$2"
Packit 022b05
	  revision="$3"
Packit 022b05
	  age="$4"
Packit 022b05
	  ;;
Packit 022b05
	esac
Packit 022b05
Packit 022b05
	# Check that each of the things are valid numbers.
Packit 022b05
	case $current in
Packit 022b05
	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
Packit 022b05
	*)
Packit 022b05
	  $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
Packit 022b05
	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
Packit 022b05
	  exit $EXIT_FAILURE
Packit 022b05
	  ;;
Packit 022b05
	esac
Packit 022b05
Packit 022b05
	case $revision in
Packit 022b05
	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
Packit 022b05
	*)
Packit 022b05
	  $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
Packit 022b05
	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
Packit 022b05
	  exit $EXIT_FAILURE
Packit 022b05
	  ;;
Packit 022b05
	esac
Packit 022b05
Packit 022b05
	case $age in
Packit 022b05
	0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
Packit 022b05
	*)
Packit 022b05
	  $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
Packit 022b05
	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
Packit 022b05
	  exit $EXIT_FAILURE
Packit 022b05
	  ;;
Packit 022b05
	esac
Packit 022b05
Packit 022b05
	if test "$age" -gt "$current"; then
Packit 022b05
	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
Packit 022b05
	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
Packit 022b05
	  exit $EXIT_FAILURE
Packit 022b05
	fi
Packit 022b05
Packit 022b05
	# Calculate the version variables.
Packit 022b05
	major=
Packit 022b05
	versuffix=
Packit 022b05
	verstring=
Packit 022b05
	case $version_type in
Packit 022b05
	none) ;;
Packit 022b05
Packit 022b05
	darwin)
Packit 022b05
	  # Like Linux, but with the current version available in
Packit 022b05
	  # verstring for coding it into the library header
Packit 022b05
	  major=.`expr $current - $age`
Packit 022b05
	  versuffix="$major.$age.$revision"
Packit 022b05
	  # Darwin ld doesn't like 0 for these options...
Packit 022b05
	  minor_current=`expr $current + 1`
Packit 022b05
	  verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
Packit 022b05
	  ;;
Packit 022b05
Packit 022b05
	freebsd-aout)
Packit 022b05
	  major=".$current"
Packit 022b05
	  versuffix=".$current.$revision";
Packit 022b05
	  ;;
Packit 022b05
Packit 022b05
	freebsd-elf)
Packit 022b05
	  major=".$current"
Packit 022b05
	  versuffix=".$current";
Packit 022b05
	  ;;
Packit 022b05
Packit 022b05
	irix | nonstopux)
Packit 022b05
	  major=`expr $current - $age + 1`
Packit 022b05
Packit 022b05
	  case $version_type in
Packit 022b05
	    nonstopux) verstring_prefix=nonstopux ;;
Packit 022b05
	    *)         verstring_prefix=sgi ;;
Packit 022b05
	  esac
Packit 022b05
	  verstring="$verstring_prefix$major.$revision"
Packit 022b05
Packit 022b05
	  # Add in all the interfaces that we are compatible with.
Packit 022b05
	  loop=$revision
Packit 022b05
	  while test "$loop" -ne 0; do
Packit 022b05
	    iface=`expr $revision - $loop`
Packit 022b05
	    loop=`expr $loop - 1`
Packit 022b05
	    verstring="$verstring_prefix$major.$iface:$verstring"
Packit 022b05
	  done
Packit 022b05
Packit 022b05
	  # Before this point, $major must not contain `.'.
Packit 022b05
	  major=.$major
Packit 022b05
	  versuffix="$major.$revision"
Packit 022b05
	  ;;
Packit 022b05
Packit 022b05
	linux)
Packit 022b05
	  major=.`expr $current - $age`
Packit 022b05
	  versuffix="$major.$age.$revision"
Packit 022b05
	  ;;
Packit 022b05
Packit 022b05
	osf)
Packit 022b05
	  major=.`expr $current - $age`
Packit 022b05
	  versuffix=".$current.$age.$revision"
Packit 022b05
	  verstring="$current.$age.$revision"
Packit 022b05
Packit 022b05
	  # Add in all the interfaces that we are compatible with.
Packit 022b05
	  loop=$age
Packit 022b05
	  while test "$loop" -ne 0; do
Packit 022b05
	    iface=`expr $current - $loop`
Packit 022b05
	    loop=`expr $loop - 1`
Packit 022b05
	    verstring="$verstring:${iface}.0"
Packit 022b05
	  done
Packit 022b05
Packit 022b05
	  # Make executables depend on our current version.
Packit 022b05
	  verstring="$verstring:${current}.0"
Packit 022b05
	  ;;
Packit 022b05
Packit 022b05
	sunos)
Packit 022b05
	  major=".$current"
Packit 022b05
	  versuffix=".$current.$revision"
Packit 022b05
	  ;;
Packit 022b05
Packit 022b05
	windows)
Packit 022b05
	  # Use '-' rather than '.', since we only want one
Packit 022b05
	  # extension on DOS 8.3 filesystems.
Packit 022b05
	  major=`expr $current - $age`
Packit 022b05
	  versuffix="-$major"
Packit 022b05
	  ;;
Packit 022b05
Packit 022b05
	*)
Packit 022b05
	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
Packit 022b05
	  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
Packit 022b05
	  exit $EXIT_FAILURE
Packit 022b05
	  ;;
Packit 022b05
	esac
Packit 022b05
Packit 022b05
	# Clear the version info if we defaulted, and they specified a release.
Packit 022b05
	if test -z "$vinfo" && test -n "$release"; then
Packit 022b05
	  major=
Packit 022b05
	  case $version_type in
Packit 022b05
	  darwin)
Packit 022b05
	    # we can't check for "0.0" in archive_cmds due to quoting
Packit 022b05
	    # problems, so we reset it completely
Packit 022b05
	    verstring=
Packit 022b05
	    ;;
Packit 022b05
	  *)
Packit 022b05
	    verstring="0.0"
Packit 022b05
	    ;;
Packit 022b05
	  esac
Packit 022b05
	  if test "$need_version" = no; then
Packit 022b05
	    versuffix=
Packit 022b05
	  else
Packit 022b05
	    versuffix=".0.0"
Packit 022b05
	  fi
Packit 022b05
	fi
Packit 022b05
Packit 022b05
	# Remove version info from name if versioning should be avoided
Packit 022b05
	if test "$avoid_version" = yes && test "$need_version" = no; then
Packit 022b05
	  major=
Packit 022b05
	  versuffix=
Packit 022b05
	  verstring=""
Packit 022b05
	fi
Packit 022b05
Packit 022b05
	# Check to see if the archive will have undefined symbols.
Packit 022b05
	if test "$allow_undefined" = yes; then
Packit 022b05
	  if test "$allow_undefined_flag" = unsupported; then
Packit 022b05
	    $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
Packit 022b05
	    build_libtool_libs=no
Packit 022b05
	    build_old_libs=yes
Packit 022b05
	  fi
Packit 022b05
	else
Packit 022b05
	  # Don't allow undefined symbols.
Packit 022b05
	  allow_undefined_flag="$no_undefined_flag"
Packit 022b05
	fi
Packit 022b05
      fi
Packit 022b05
Packit 022b05
      if test "$mode" != relink; then
Packit