Blame ltmain.sh

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