Blame config/ltmain.sh

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