Blame ltmain.sh

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