1#! /bin/sh
2
3# libtoolT - Provide generalized library-building support services.
4# Generated automatically by  (GNU jsonevt 0.1.0)
5# NOTE: Changes made to this file will be lost: look at ltmain.sh.
6#
7# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
8# Free Software Foundation, Inc.
9#
10# This file is part of GNU Libtool:
11# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
12#
13# This program is free software; you can redistribute it and/or modify
14# it under the terms of the GNU General Public License as published by
15# the Free Software Foundation; either version 2 of the License, or
16# (at your option) any later version.
17#
18# This program is distributed in the hope that it will be useful, but
19# WITHOUT ANY WARRANTY; without even the implied warranty of
20# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21# General Public License for more details.
22#
23# You should have received a copy of the GNU General Public License
24# along with this program; if not, write to the Free Software
25# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26#
27# As a special exception to the GNU General Public License, if you
28# distribute this file as part of a program that contains a
29# configuration script generated by Autoconf, you may include it under
30# the same distribution terms that you use for the rest of that program.
31
32# A sed program that does not truncate output.
33SED="/bin/sed"
34
35# Sed that helps us avoid accidentally triggering echo(1) options like -n.
36Xsed="/bin/sed -e 1s/^X//"
37
38# The HP-UX ksh and POSIX shell print the target directory to stdout
39# if CDPATH is set.
40(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
41
42# The names of the tagged configurations supported by this script.
43available_tags=" CXX F77"
44
45# ### BEGIN LIBTOOL CONFIG
46
47# Libtool was configured on host cuberat.owensnet.com:
48
49# Shell to use when invoking shell scripts.
50SHELL="/bin/sh"
51
52# Whether or not to build shared libraries.
53build_libtool_libs=yes
54
55# Whether or not to build static libraries.
56build_old_libs=yes
57
58# Whether or not to add -lc for building shared libraries.
59build_libtool_need_lc=no
60
61# Whether or not to disallow shared libs when runtime libs are static
62allow_libtool_libs_with_static_runtimes=no
63
64# Whether or not to optimize for fast installation.
65fast_install=yes
66
67# The host system.
68host_alias=
69host=i686-pc-linux-gnu
70host_os=linux-gnu
71
72# The build system.
73build_alias=
74build=i686-pc-linux-gnu
75build_os=linux-gnu
76
77# An echo program that does not interpret backslashes.
78echo="echo"
79
80# The archiver.
81AR="ar"
82AR_FLAGS="cru"
83
84# A C compiler.
85LTCC="gcc"
86
87# LTCC compiler flags.
88LTCFLAGS="-g -O2"
89
90# A language-specific compiler.
91CC="gcc"
92
93# Is the compiler the GNU C compiler?
94with_gcc=yes
95
96# An ERE matcher.
97EGREP="/bin/grep -E"
98
99# The linker used to build libraries.
100LD="/usr/bin/ld"
101
102# Whether we need hard or soft links.
103LN_S="ln -s"
104
105# A BSD-compatible nm program.
106NM="/usr/bin/nm -B"
107
108# A symbol stripping program
109STRIP="strip"
110
111# Used to examine libraries when file_magic_cmd begins "file"
112MAGIC_CMD=file
113
114# Used on cygwin: DLL creation program.
115DLLTOOL="dlltool"
116
117# Used on cygwin: object dumper.
118OBJDUMP="objdump"
119
120# Used on cygwin: assembler.
121AS="as"
122
123# The name of the directory that contains temporary libtool files.
124objdir=.libs
125
126# How to create reloadable object files.
127reload_flag=" -r"
128reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
129
130# How to pass a linker flag through the compiler.
131wl="-Wl,"
132
133# Object file suffix (normally "o").
134objext="o"
135
136# Old archive suffix (normally "a").
137libext="a"
138
139# Shared library suffix (normally ".so").
140shrext_cmds='.so'
141
142# Executable file suffix (normally "").
143exeext=""
144
145# Additional compiler flags for building library objects.
146pic_flag=" -fPIC -DPIC"
147pic_mode=default
148
149# What is the maximum length of a command?
150max_cmd_len=1966080
151
152# Does compiler simultaneously support -c and -o options?
153compiler_c_o="yes"
154
155# Must we lock files when doing compilation?
156need_locks="no"
157
158# Do we need the lib prefix for modules?
159need_lib_prefix=no
160
161# Do we need a version for libraries?
162need_version=no
163
164# Whether dlopen is supported.
165dlopen_support=unknown
166
167# Whether dlopen of programs is supported.
168dlopen_self=unknown
169
170# Whether dlopen of statically linked programs is supported.
171dlopen_self_static=unknown
172
173# Compiler flag to prevent dynamic linking.
174link_static_flag="-static"
175
176# Compiler flag to turn off builtin functions.
177no_builtin_flag=" -fno-builtin"
178
179# Compiler flag to allow reflexive dlopens.
180export_dynamic_flag_spec="\${wl}--export-dynamic"
181
182# Compiler flag to generate shared objects directly from archives.
183whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
184
185# Compiler flag to generate thread-safe objects.
186thread_safe_flag_spec=""
187
188# Library versioning type.
189version_type=linux
190
191# Format of library name prefix.
192libname_spec="lib\$name"
193
194# List of archive names.  First name is the real one, the rest are links.
195# The last name is the one that the linker finds with -lNAME.
196library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
197
198# The coded name of the library, if different from the real name.
199soname_spec="\${libname}\${release}\${shared_ext}\$major"
200
201# Commands used to build and install an old-style archive.
202RANLIB="ranlib"
203old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
204old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
205old_postuninstall_cmds=""
206
207# Create an old-style archive from a shared archive.
208old_archive_from_new_cmds=""
209
210# Create a temporary old-style archive to link instead of a shared archive.
211old_archive_from_expsyms_cmds=""
212
213# Commands used to build and install a shared archive.
214archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
215archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
216  cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
217  \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
218	  \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
219postinstall_cmds=""
220postuninstall_cmds=""
221
222# Commands used to build a loadable module (assumed same as above if empty)
223module_cmds=""
224module_expsym_cmds=""
225
226# Commands to strip libraries.
227old_striplib="strip --strip-debug"
228striplib="strip --strip-unneeded"
229
230# Dependencies to place before the objects being linked to create a
231# shared library.
232predep_objects=""
233
234# Dependencies to place after the objects being linked to create a
235# shared library.
236postdep_objects=""
237
238# Dependencies to place before the objects being linked to create a
239# shared library.
240predeps=""
241
242# Dependencies to place after the objects being linked to create a
243# shared library.
244postdeps=""
245
246# The directories searched by this compiler when creating a shared
247# library
248compiler_lib_search_dirs=""
249
250# The library search path used internally by the compiler when linking
251# a shared library.
252compiler_lib_search_path=""
253
254# Method to check whether dependent libraries are shared objects.
255deplibs_check_method="pass_all"
256
257# Command to use when deplibs_check_method == file_magic.
258file_magic_cmd="\$MAGIC_CMD"
259
260# Flag that allows shared libraries with undefined symbols to be built.
261allow_undefined_flag=""
262
263# Flag that forces no undefined symbols.
264no_undefined_flag=""
265
266# Commands used to finish a libtool library installation in a directory.
267finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
268
269# Same as above, but a single script fragment to be evaled but not shown.
270finish_eval=""
271
272# Take the output of nm and produce a listing of raw symbols and C names.
273global_symbol_pipe="sed -n -e 's/^.*[ 	]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ 	][ 	]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
274
275# Transform the output of nm in a proper C declaration
276global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
277
278# Transform the output of nm in a C name address pair
279global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/  {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/  {\"\\2\", (lt_ptr) \\&\\2},/p'"
280
281# This is the shared library runtime path variable.
282runpath_var=LD_RUN_PATH
283
284# This is the shared library path variable.
285shlibpath_var=LD_LIBRARY_PATH
286
287# Is shlibpath searched before the hard-coded library search path?
288shlibpath_overrides_runpath=no
289
290# How to hardcode a shared library path into an executable.
291hardcode_action=immediate
292
293# Whether we should hardcode library paths into libraries.
294hardcode_into_libs=yes
295
296# Flag to hardcode $libdir into a binary during linking.
297# This must work even if $libdir does not exist.
298hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
299
300# If ld is used when linking, flag to hardcode $libdir into
301# a binary during linking. This must work even if $libdir does
302# not exist.
303hardcode_libdir_flag_spec_ld=""
304
305# Whether we need a single -rpath flag with a separated argument.
306hardcode_libdir_separator=""
307
308# Set to yes if using DIR/libNAME during linking hardcodes DIR into the
309# resulting binary.
310hardcode_direct=no
311
312# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
313# resulting binary.
314hardcode_minus_L=no
315
316# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
317# the resulting binary.
318hardcode_shlibpath_var=unsupported
319
320# Set to yes if building a shared library automatically hardcodes DIR into the library
321# and all subsequent libraries and executables linked against it.
322hardcode_automatic=no
323
324# Variables whose values should be saved in libtool wrapper scripts and
325# restored at relink time.
326variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
327
328# Whether libtool must link a program against all its dependency libraries.
329link_all_deplibs=unknown
330
331# Compile-time system search path for libraries
332sys_lib_search_path_spec="/usr/lib /lib /usr/local/lib"
333
334# Run-time system search path for libraries
335sys_lib_dlsearch_path_spec="/usr/lib /lib /usr/local/lib /usr/local/mysql/lib/mysql /usr/lib/qt-3.3/lib /usr/lib/xulrunner-1.9 "
336
337# Fix the shell variable $srcfile for the compiler.
338fix_srcfile_path=""
339
340# Set to yes if exported symbols are required.
341always_export_symbols=no
342
343# The commands to list exported symbols.
344export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
345
346# The commands to extract the exported symbol list from a shared archive.
347extract_expsyms_cmds=""
348
349# Symbols that should not be listed in the preloaded symbols.
350exclude_expsyms="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*"
351
352# Symbols that must always be exported.
353include_expsyms=""
354
355# ### END LIBTOOL CONFIG
356
357# ltmain.sh - Provide generalized library-building support services.
358# NOTE: Changing this file will not affect anything until you rerun configure.
359#
360# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
361# 2007, 2008  Free Software Foundation, Inc.
362# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
363#
364# This program is free software; you can redistribute it and/or modify
365# it under the terms of the GNU General Public License as published by
366# the Free Software Foundation; either version 2 of the License, or
367# (at your option) any later version.
368#
369# This program is distributed in the hope that it will be useful, but
370# WITHOUT ANY WARRANTY; without even the implied warranty of
371# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
372# General Public License for more details.
373#
374# You should have received a copy of the GNU General Public License
375# along with this program; if not, write to the Free Software
376# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
377#
378# As a special exception to the GNU General Public License, if you
379# distribute this file as part of a program that contains a
380# configuration script generated by Autoconf, you may include it under
381# the same distribution terms that you use for the rest of that program.
382
383basename="s,^.*/,,g"
384
385# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
386# is ksh but when the shell is invoked as "sh" and the current value of
387# the _XPG environment variable is not equal to 1 (one), the special
388# positional parameter $0, within a function call, is the name of the
389# function.
390progpath="$0"
391
392# The name of this program:
393progname=`echo "$progpath" | $SED $basename`
394modename="$progname"
395
396# Global variables:
397EXIT_SUCCESS=0
398EXIT_FAILURE=1
399
400PROGRAM=ltmain.sh
401PACKAGE=libtool
402VERSION=1.5.26
403TIMESTAMP=" (1.1220.2.493 2008/02/01 16:58:18)"
404
405# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
406if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
407  emulate sh
408  NULLCMD=:
409  # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
410  # is contrary to our usage.  Disable this feature.
411  alias -g '${1+"$@"}'='"$@"'
412  setopt NO_GLOB_SUBST
413else
414  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
415fi
416BIN_SH=xpg4; export BIN_SH # for Tru64
417DUALCASE=1; export DUALCASE # for MKS sh
418
419# Check that we have a working $echo.
420if test "X$1" = X--no-reexec; then
421  # Discard the --no-reexec flag, and continue.
422  shift
423elif test "X$1" = X--fallback-echo; then
424  # Avoid inline document here, it may be left over
425  :
426elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
427  # Yippee, $echo works!
428  :
429else
430  # Restart under the correct shell, and then maybe $echo will work.
431  exec $SHELL "$progpath" --no-reexec ${1+"$@"}
432fi
433
434if test "X$1" = X--fallback-echo; then
435  # used as fallback echo
436  shift
437  cat <<EOF
438$*
439EOF
440  exit $EXIT_SUCCESS
441fi
442
443default_mode=
444help="Try \`$progname --help' for more information."
445magic="%%%MAGIC variable%%%"
446mkdir="mkdir"
447mv="mv -f"
448rm="rm -f"
449
450# Sed substitution that helps us do robust quoting.  It backslashifies
451# metacharacters that are still active within double-quoted strings.
452Xsed="${SED}"' -e 1s/^X//'
453sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
454# test EBCDIC or ASCII
455case `echo X|tr X '\101'` in
456 A) # ASCII based system
457    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
458  SP2NL='tr \040 \012'
459  NL2SP='tr \015\012 \040\040'
460  ;;
461 *) # EBCDIC based system
462  SP2NL='tr \100 \n'
463  NL2SP='tr \r\n \100\100'
464  ;;
465esac
466
467# NLS nuisances.
468# Only set LANG and LC_ALL to C if already set.
469# These must not be set unconditionally because not all systems understand
470# e.g. LANG=C (notably SCO).
471# We save the old values to restore during execute mode.
472lt_env=
473for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
474do
475  eval "if test \"\${$lt_var+set}\" = set; then
476	  save_$lt_var=\$$lt_var
477	  lt_env=\"$lt_var=\$$lt_var \$lt_env\"
478	  $lt_var=C
479	  export $lt_var
480	fi"
481done
482
483if test -n "$lt_env"; then
484  lt_env="env $lt_env"
485fi
486
487# Make sure IFS has a sensible default
488lt_nl='
489'
490IFS=" 	$lt_nl"
491
492if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
493  $echo "$modename: not configured to build any kind of library" 1>&2
494  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
495  exit $EXIT_FAILURE
496fi
497
498# Global variables.
499mode=$default_mode
500nonopt=
501prev=
502prevopt=
503run=
504show="$echo"
505show_help=
506execute_dlfiles=
507duplicate_deps=no
508preserve_args=
509lo2o="s/\\.lo\$/.${objext}/"
510o2lo="s/\\.${objext}\$/.lo/"
511extracted_archives=
512extracted_serial=0
513
514#####################################
515# Shell function definitions:
516# This seems to be the best place for them
517
518# func_mktempdir [string]
519# Make a temporary directory that won't clash with other running
520# libtool processes, and avoids race conditions if possible.  If
521# given, STRING is the basename for that directory.
522func_mktempdir ()
523{
524    my_template="${TMPDIR-/tmp}/${1-$progname}"
525
526    if test "$run" = ":"; then
527      # Return a directory name, but don't create it in dry-run mode
528      my_tmpdir="${my_template}-$$"
529    else
530
531      # If mktemp works, use that first and foremost
532      my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
533
534      if test ! -d "$my_tmpdir"; then
535	# Failing that, at least try and use $RANDOM to avoid a race
536	my_tmpdir="${my_template}-${RANDOM-0}$$"
537
538	save_mktempdir_umask=`umask`
539	umask 0077
540	$mkdir "$my_tmpdir"
541	umask $save_mktempdir_umask
542      fi
543
544      # If we're not in dry-run mode, bomb out on failure
545      test -d "$my_tmpdir" || {
546        $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
547	exit $EXIT_FAILURE
548      }
549    fi
550
551    $echo "X$my_tmpdir" | $Xsed
552}
553
554
555# func_win32_libid arg
556# return the library type of file 'arg'
557#
558# Need a lot of goo to handle *both* DLLs and import libs
559# Has to be a shell function in order to 'eat' the argument
560# that is supplied when $file_magic_command is called.
561func_win32_libid ()
562{
563  win32_libid_type="unknown"
564  win32_fileres=`file -L $1 2>/dev/null`
565  case $win32_fileres in
566  *ar\ archive\ import\ library*) # definitely import
567    win32_libid_type="x86 archive import"
568    ;;
569  *ar\ archive*) # could be an import, or static
570    if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
571      $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
572      win32_nmres=`eval $NM -f posix -A $1 | \
573	$SED -n -e '1,100{
574		/ I /{
575			s,.*,import,
576			p
577			q
578			}
579		}'`
580      case $win32_nmres in
581      import*)  win32_libid_type="x86 archive import";;
582      *)        win32_libid_type="x86 archive static";;
583      esac
584    fi
585    ;;
586  *DLL*)
587    win32_libid_type="x86 DLL"
588    ;;
589  *executable*) # but shell scripts are "executable" too...
590    case $win32_fileres in
591    *MS\ Windows\ PE\ Intel*)
592      win32_libid_type="x86 DLL"
593      ;;
594    esac
595    ;;
596  esac
597  $echo $win32_libid_type
598}
599
600
601# func_infer_tag arg
602# Infer tagged configuration to use if any are available and
603# if one wasn't chosen via the "--tag" command line option.
604# Only attempt this if the compiler in the base compile
605# command doesn't match the default compiler.
606# arg is usually of the form 'gcc ...'
607func_infer_tag ()
608{
609    if test -n "$available_tags" && test -z "$tagname"; then
610      CC_quoted=
611      for arg in $CC; do
612	case $arg in
613	  *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
614	  arg="\"$arg\""
615	  ;;
616	esac
617	CC_quoted="$CC_quoted $arg"
618      done
619      case $@ in
620      # Blanks in the command may have been stripped by the calling shell,
621      # but not from the CC environment variable when configure was run.
622      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
623      # Blanks at the start of $base_compile will cause this to fail
624      # if we don't check for them as well.
625      *)
626	for z in $available_tags; do
627	  if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
628	    # Evaluate the configuration.
629	    eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
630	    CC_quoted=
631	    for arg in $CC; do
632	    # Double-quote args containing other shell metacharacters.
633	    case $arg in
634	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
635	      arg="\"$arg\""
636	      ;;
637	    esac
638	    CC_quoted="$CC_quoted $arg"
639	  done
640	    case "$@ " in
641	      " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
642	      # The compiler in the base compile command matches
643	      # the one in the tagged configuration.
644	      # Assume this is the tagged configuration we want.
645	      tagname=$z
646	      break
647	      ;;
648	    esac
649	  fi
650	done
651	# If $tagname still isn't set, then no tagged configuration
652	# was found and let the user know that the "--tag" command
653	# line option must be used.
654	if test -z "$tagname"; then
655	  $echo "$modename: unable to infer tagged configuration"
656	  $echo "$modename: specify a tag with \`--tag'" 1>&2
657	  exit $EXIT_FAILURE
658#        else
659#          $echo "$modename: using $tagname tagged configuration"
660	fi
661	;;
662      esac
663    fi
664}
665
666
667# func_extract_an_archive dir oldlib
668func_extract_an_archive ()
669{
670    f_ex_an_ar_dir="$1"; shift
671    f_ex_an_ar_oldlib="$1"
672
673    $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
674    $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
675    if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
676     :
677    else
678      $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
679      exit $EXIT_FAILURE
680    fi
681}
682
683# func_extract_archives gentop oldlib ...
684func_extract_archives ()
685{
686    my_gentop="$1"; shift
687    my_oldlibs=${1+"$@"}
688    my_oldobjs=""
689    my_xlib=""
690    my_xabs=""
691    my_xdir=""
692    my_status=""
693
694    $show "${rm}r $my_gentop"
695    $run ${rm}r "$my_gentop"
696    $show "$mkdir $my_gentop"
697    $run $mkdir "$my_gentop"
698    my_status=$?
699    if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
700      exit $my_status
701    fi
702
703    for my_xlib in $my_oldlibs; do
704      # Extract the objects.
705      case $my_xlib in
706	[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
707	*) my_xabs=`pwd`"/$my_xlib" ;;
708      esac
709      my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
710      my_xlib_u=$my_xlib
711      while :; do
712        case " $extracted_archives " in
713	*" $my_xlib_u "*)
714	  extracted_serial=`expr $extracted_serial + 1`
715	  my_xlib_u=lt$extracted_serial-$my_xlib ;;
716	*) break ;;
717	esac
718      done
719      extracted_archives="$extracted_archives $my_xlib_u"
720      my_xdir="$my_gentop/$my_xlib_u"
721
722      $show "${rm}r $my_xdir"
723      $run ${rm}r "$my_xdir"
724      $show "$mkdir $my_xdir"
725      $run $mkdir "$my_xdir"
726      exit_status=$?
727      if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
728	exit $exit_status
729      fi
730      case $host in
731      *-darwin*)
732	$show "Extracting $my_xabs"
733	# Do not bother doing anything if just a dry run
734	if test -z "$run"; then
735	  darwin_orig_dir=`pwd`
736	  cd $my_xdir || exit $?
737	  darwin_archive=$my_xabs
738	  darwin_curdir=`pwd`
739	  darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
740	  darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
741	  if test -n "$darwin_arches"; then
742	    darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
743	    darwin_arch=
744	    $show "$darwin_base_archive has multiple architectures $darwin_arches"
745	    for darwin_arch in  $darwin_arches ; do
746	      mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
747	      lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
748	      cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
749	      func_extract_an_archive "`pwd`" "${darwin_base_archive}"
750	      cd "$darwin_curdir"
751	      $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
752	    done # $darwin_arches
753      ## Okay now we have a bunch of thin objects, gotta fatten them up :)
754	    darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
755	    darwin_file=
756	    darwin_files=
757	    for darwin_file in $darwin_filelist; do
758	      darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
759	      lipo -create -output "$darwin_file" $darwin_files
760	    done # $darwin_filelist
761	    ${rm}r unfat-$$
762	    cd "$darwin_orig_dir"
763	  else
764	    cd "$darwin_orig_dir"
765 	    func_extract_an_archive "$my_xdir" "$my_xabs"
766	  fi # $darwin_arches
767	fi # $run
768	;;
769      *)
770        func_extract_an_archive "$my_xdir" "$my_xabs"
771        ;;
772      esac
773      my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
774    done
775    func_extract_archives_result="$my_oldobjs"
776}
777# End of Shell function definitions
778#####################################
779
780# Darwin sucks
781eval std_shrext=\"$shrext_cmds\"
782
783disable_libs=no
784
785# Parse our command line options once, thoroughly.
786while test "$#" -gt 0
787do
788  arg="$1"
789  shift
790
791  case $arg in
792  -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
793  *) optarg= ;;
794  esac
795
796  # If the previous option needs an argument, assign it.
797  if test -n "$prev"; then
798    case $prev in
799    execute_dlfiles)
800      execute_dlfiles="$execute_dlfiles $arg"
801      ;;
802    tag)
803      tagname="$arg"
804      preserve_args="${preserve_args}=$arg"
805
806      # Check whether tagname contains only valid characters
807      case $tagname in
808      *[!-_A-Za-z0-9,/]*)
809	$echo "$progname: invalid tag name: $tagname" 1>&2
810	exit $EXIT_FAILURE
811	;;
812      esac
813
814      case $tagname in
815      CC)
816	# Don't test for the "default" C tag, as we know, it's there, but
817	# not specially marked.
818	;;
819      *)
820	if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
821	  taglist="$taglist $tagname"
822	  # Evaluate the configuration.
823	  eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
824	else
825	  $echo "$progname: ignoring unknown tag $tagname" 1>&2
826	fi
827	;;
828      esac
829      ;;
830    *)
831      eval "$prev=\$arg"
832      ;;
833    esac
834
835    prev=
836    prevopt=
837    continue
838  fi
839
840  # Have we seen a non-optional argument yet?
841  case $arg in
842  --help)
843    show_help=yes
844    ;;
845
846  --version)
847    echo "\
848$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
849
850Copyright (C) 2008  Free Software Foundation, Inc.
851This is free software; see the source for copying conditions.  There is NO
852warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
853    exit $?
854    ;;
855
856  --config)
857    ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
858    # Now print the configurations for the tags.
859    for tagname in $taglist; do
860      ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
861    done
862    exit $?
863    ;;
864
865  --debug)
866    $echo "$progname: enabling shell trace mode"
867    set -x
868    preserve_args="$preserve_args $arg"
869    ;;
870
871  --dry-run | -n)
872    run=:
873    ;;
874
875  --features)
876    $echo "host: $host"
877    if test "$build_libtool_libs" = yes; then
878      $echo "enable shared libraries"
879    else
880      $echo "disable shared libraries"
881    fi
882    if test "$build_old_libs" = yes; then
883      $echo "enable static libraries"
884    else
885      $echo "disable static libraries"
886    fi
887    exit $?
888    ;;
889
890  --finish) mode="finish" ;;
891
892  --mode) prevopt="--mode" prev=mode ;;
893  --mode=*) mode="$optarg" ;;
894
895  --preserve-dup-deps) duplicate_deps="yes" ;;
896
897  --quiet | --silent)
898    show=:
899    preserve_args="$preserve_args $arg"
900    ;;
901
902  --tag)
903    prevopt="--tag"
904    prev=tag
905    preserve_args="$preserve_args --tag"
906    ;;
907  --tag=*)
908    set tag "$optarg" ${1+"$@"}
909    shift
910    prev=tag
911    preserve_args="$preserve_args --tag"
912    ;;
913
914  -dlopen)
915    prevopt="-dlopen"
916    prev=execute_dlfiles
917    ;;
918
919  -*)
920    $echo "$modename: unrecognized option \`$arg'" 1>&2
921    $echo "$help" 1>&2
922    exit $EXIT_FAILURE
923    ;;
924
925  *)
926    nonopt="$arg"
927    break
928    ;;
929  esac
930done
931
932if test -n "$prevopt"; then
933  $echo "$modename: option \`$prevopt' requires an argument" 1>&2
934  $echo "$help" 1>&2
935  exit $EXIT_FAILURE
936fi
937
938case $disable_libs in
939no)
940  ;;
941shared)
942  build_libtool_libs=no
943  build_old_libs=yes
944  ;;
945static)
946  build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
947  ;;
948esac
949
950# If this variable is set in any of the actions, the command in it
951# will be execed at the end.  This prevents here-documents from being
952# left over by shells.
953exec_cmd=
954
955if test -z "$show_help"; then
956
957  # Infer the operation mode.
958  if test -z "$mode"; then
959    $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
960    $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
961    case $nonopt in
962    *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
963      mode=link
964      for arg
965      do
966	case $arg in
967	-c)
968	   mode=compile
969	   break
970	   ;;
971	esac
972      done
973      ;;
974    *db | *dbx | *strace | *truss)
975      mode=execute
976      ;;
977    *install*|cp|mv)
978      mode=install
979      ;;
980    *rm)
981      mode=uninstall
982      ;;
983    *)
984      # If we have no mode, but dlfiles were specified, then do execute mode.
985      test -n "$execute_dlfiles" && mode=execute
986
987      # Just use the default operation mode.
988      if test -z "$mode"; then
989	if test -n "$nonopt"; then
990	  $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
991	else
992	  $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
993	fi
994      fi
995      ;;
996    esac
997  fi
998
999  # Only execute mode is allowed to have -dlopen flags.
1000  if test -n "$execute_dlfiles" && test "$mode" != execute; then
1001    $echo "$modename: unrecognized option \`-dlopen'" 1>&2
1002    $echo "$help" 1>&2
1003    exit $EXIT_FAILURE
1004  fi
1005
1006  # Change the help message to a mode-specific one.
1007  generic_help="$help"
1008  help="Try \`$modename --help --mode=$mode' for more information."
1009
1010  # These modes are in order of execution frequency so that they run quickly.
1011  case $mode in
1012  # libtool compile mode
1013  compile)
1014    modename="$modename: compile"
1015    # Get the compilation command and the source file.
1016    base_compile=
1017    srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
1018    suppress_opt=yes
1019    suppress_output=
1020    arg_mode=normal
1021    libobj=
1022    later=
1023
1024    for arg
1025    do
1026      case $arg_mode in
1027      arg  )
1028	# do not "continue".  Instead, add this to base_compile
1029	lastarg="$arg"
1030	arg_mode=normal
1031	;;
1032
1033      target )
1034	libobj="$arg"
1035	arg_mode=normal
1036	continue
1037	;;
1038
1039      normal )
1040	# Accept any command-line options.
1041	case $arg in
1042	-o)
1043	  if test -n "$libobj" ; then
1044	    $echo "$modename: you cannot specify \`-o' more than once" 1>&2
1045	    exit $EXIT_FAILURE
1046	  fi
1047	  arg_mode=target
1048	  continue
1049	  ;;
1050
1051	-static | -prefer-pic | -prefer-non-pic)
1052	  later="$later $arg"
1053	  continue
1054	  ;;
1055
1056	-no-suppress)
1057	  suppress_opt=no
1058	  continue
1059	  ;;
1060
1061	-Xcompiler)
1062	  arg_mode=arg  #  the next one goes into the "base_compile" arg list
1063	  continue      #  The current "srcfile" will either be retained or
1064	  ;;            #  replaced later.  I would guess that would be a bug.
1065
1066	-Wc,*)
1067	  args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
1068	  lastarg=
1069	  save_ifs="$IFS"; IFS=','
1070 	  for arg in $args; do
1071	    IFS="$save_ifs"
1072
1073	    # Double-quote args containing other shell metacharacters.
1074	    # Many Bourne shells cannot handle close brackets correctly
1075	    # in scan sets, so we specify it separately.
1076	    case $arg in
1077	      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
1078	      arg="\"$arg\""
1079	      ;;
1080	    esac
1081	    lastarg="$lastarg $arg"
1082	  done
1083	  IFS="$save_ifs"
1084	  lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
1085
1086	  # Add the arguments to base_compile.
1087	  base_compile="$base_compile $lastarg"
1088	  continue
1089	  ;;
1090
1091	* )
1092	  # Accept the current argument as the source file.
1093	  # The previous "srcfile" becomes the current argument.
1094	  #
1095	  lastarg="$srcfile"
1096	  srcfile="$arg"
1097	  ;;
1098	esac  #  case $arg
1099	;;
1100      esac    #  case $arg_mode
1101
1102      # Aesthetically quote the previous argument.
1103      lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
1104
1105      case $lastarg in
1106      # Double-quote args containing other shell metacharacters.
1107      # Many Bourne shells cannot handle close brackets correctly
1108      # in scan sets, and some SunOS ksh mistreat backslash-escaping
1109      # in scan sets (worked around with variable expansion),
1110      # and furthermore cannot handle '|' '&' '(' ')' in scan sets
1111      # at all, so we specify them separately.
1112      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
1113	lastarg="\"$lastarg\""
1114	;;
1115      esac
1116
1117      base_compile="$base_compile $lastarg"
1118    done # for arg
1119
1120    case $arg_mode in
1121    arg)
1122      $echo "$modename: you must specify an argument for -Xcompile"
1123      exit $EXIT_FAILURE
1124      ;;
1125    target)
1126      $echo "$modename: you must specify a target with \`-o'" 1>&2
1127      exit $EXIT_FAILURE
1128      ;;
1129    *)
1130      # Get the name of the library object.
1131      [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
1132      ;;
1133    esac
1134
1135    # Recognize several different file suffixes.
1136    # If the user specifies -o file.o, it is replaced with file.lo
1137    xform='[cCFSifmso]'
1138    case $libobj in
1139    *.ada) xform=ada ;;
1140    *.adb) xform=adb ;;
1141    *.ads) xform=ads ;;
1142    *.asm) xform=asm ;;
1143    *.c++) xform=c++ ;;
1144    *.cc) xform=cc ;;
1145    *.ii) xform=ii ;;
1146    *.class) xform=class ;;
1147    *.cpp) xform=cpp ;;
1148    *.cxx) xform=cxx ;;
1149    *.[fF][09]?) xform=[fF][09]. ;;
1150    *.for) xform=for ;;
1151    *.java) xform=java ;;
1152    *.obj) xform=obj ;;
1153    *.sx) xform=sx ;;
1154    esac
1155
1156    libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
1157
1158    case $libobj in
1159    *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
1160    *)
1161      $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
1162      exit $EXIT_FAILURE
1163      ;;
1164    esac
1165
1166    func_infer_tag $base_compile
1167
1168    for arg in $later; do
1169      case $arg in
1170      -static)
1171	build_old_libs=yes
1172	continue
1173	;;
1174
1175      -prefer-pic)
1176	pic_mode=yes
1177	continue
1178	;;
1179
1180      -prefer-non-pic)
1181	pic_mode=no
1182	continue
1183	;;
1184      esac
1185    done
1186
1187    qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
1188    case $qlibobj in
1189      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
1190	qlibobj="\"$qlibobj\"" ;;
1191    esac
1192    test "X$libobj" != "X$qlibobj" \
1193	&& $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' 	&()|`$[]' \
1194	&& $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
1195    objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
1196    xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
1197    if test "X$xdir" = "X$obj"; then
1198      xdir=
1199    else
1200      xdir=$xdir/
1201    fi
1202    lobj=${xdir}$objdir/$objname
1203
1204    if test -z "$base_compile"; then
1205      $echo "$modename: you must specify a compilation command" 1>&2
1206      $echo "$help" 1>&2
1207      exit $EXIT_FAILURE
1208    fi
1209
1210    # Delete any leftover library objects.
1211    if test "$build_old_libs" = yes; then
1212      removelist="$obj $lobj $libobj ${libobj}T"
1213    else
1214      removelist="$lobj $libobj ${libobj}T"
1215    fi
1216
1217    $run $rm $removelist
1218    trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1219
1220    # On Cygwin there's no "real" PIC flag so we must build both object types
1221    case $host_os in
1222    cygwin* | mingw* | pw32* | os2*)
1223      pic_mode=default
1224      ;;
1225    esac
1226    if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
1227      # non-PIC code in shared libraries is not supported
1228      pic_mode=default
1229    fi
1230
1231    # Calculate the filename of the output object if compiler does
1232    # not support -o with -c
1233    if test "$compiler_c_o" = no; then
1234      output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
1235      lockfile="$output_obj.lock"
1236      removelist="$removelist $output_obj $lockfile"
1237      trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1238    else
1239      output_obj=
1240      need_locks=no
1241      lockfile=
1242    fi
1243
1244    # Lock this critical section if it is needed
1245    # We use this script file to make the link, it avoids creating a new file
1246    if test "$need_locks" = yes; then
1247      until $run ln "$progpath" "$lockfile" 2>/dev/null; do
1248	$show "Waiting for $lockfile to be removed"
1249	sleep 2
1250      done
1251    elif test "$need_locks" = warn; then
1252      if test -f "$lockfile"; then
1253	$echo "\
1254*** ERROR, $lockfile exists and contains:
1255`cat $lockfile 2>/dev/null`
1256
1257This indicates that another process is trying to use the same
1258temporary object file, and libtool could not work around it because
1259your compiler does not support \`-c' and \`-o' together.  If you
1260repeat this compilation, it may succeed, by chance, but you had better
1261avoid parallel builds (make -j) in this platform, or get a better
1262compiler."
1263
1264	$run $rm $removelist
1265	exit $EXIT_FAILURE
1266      fi
1267      $echo "$srcfile" > "$lockfile"
1268    fi
1269
1270    if test -n "$fix_srcfile_path"; then
1271      eval srcfile=\"$fix_srcfile_path\"
1272    fi
1273    qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
1274    case $qsrcfile in
1275      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
1276      qsrcfile="\"$qsrcfile\"" ;;
1277    esac
1278
1279    $run $rm "$libobj" "${libobj}T"
1280
1281    # Create a libtool object file (analogous to a ".la" file),
1282    # but don't create it if we're doing a dry run.
1283    test -z "$run" && cat > ${libobj}T <<EOF
1284# $libobj - a libtool object file
1285# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
1286#
1287# Please DO NOT delete this file!
1288# It is necessary for linking the library.
1289
1290# Name of the PIC object.
1291EOF
1292
1293    # Only build a PIC object if we are building libtool libraries.
1294    if test "$build_libtool_libs" = yes; then
1295      # Without this assignment, base_compile gets emptied.
1296      fbsd_hideous_sh_bug=$base_compile
1297
1298      if test "$pic_mode" != no; then
1299	command="$base_compile $qsrcfile $pic_flag"
1300      else
1301	# Don't build PIC code
1302	command="$base_compile $qsrcfile"
1303      fi
1304
1305      if test ! -d "${xdir}$objdir"; then
1306	$show "$mkdir ${xdir}$objdir"
1307	$run $mkdir ${xdir}$objdir
1308	exit_status=$?
1309	if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
1310	  exit $exit_status
1311	fi
1312      fi
1313
1314      if test -z "$output_obj"; then
1315	# Place PIC objects in $objdir
1316	command="$command -o $lobj"
1317      fi
1318
1319      $run $rm "$lobj" "$output_obj"
1320
1321      $show "$command"
1322      if $run eval $lt_env "$command"; then :
1323      else
1324	test -n "$output_obj" && $run $rm $removelist
1325	exit $EXIT_FAILURE
1326      fi
1327
1328      if test "$need_locks" = warn &&
1329	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1330	$echo "\
1331*** ERROR, $lockfile contains:
1332`cat $lockfile 2>/dev/null`
1333
1334but it should contain:
1335$srcfile
1336
1337This indicates that another process is trying to use the same
1338temporary object file, and libtool could not work around it because
1339your compiler does not support \`-c' and \`-o' together.  If you
1340repeat this compilation, it may succeed, by chance, but you had better
1341avoid parallel builds (make -j) in this platform, or get a better
1342compiler."
1343
1344	$run $rm $removelist
1345	exit $EXIT_FAILURE
1346      fi
1347
1348      # Just move the object if needed, then go on to compile the next one
1349      if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
1350	$show "$mv $output_obj $lobj"
1351	if $run $mv $output_obj $lobj; then :
1352	else
1353	  error=$?
1354	  $run $rm $removelist
1355	  exit $error
1356	fi
1357      fi
1358
1359      # Append the name of the PIC object to the libtool object file.
1360      test -z "$run" && cat >> ${libobj}T <<EOF
1361pic_object='$objdir/$objname'
1362
1363EOF
1364
1365      # Allow error messages only from the first compilation.
1366      if test "$suppress_opt" = yes; then
1367        suppress_output=' >/dev/null 2>&1'
1368      fi
1369    else
1370      # No PIC object so indicate it doesn't exist in the libtool
1371      # object file.
1372      test -z "$run" && cat >> ${libobj}T <<EOF
1373pic_object=none
1374
1375EOF
1376    fi
1377
1378    # Only build a position-dependent object if we build old libraries.
1379    if test "$build_old_libs" = yes; then
1380      if test "$pic_mode" != yes; then
1381	# Don't build PIC code
1382	command="$base_compile $qsrcfile"
1383      else
1384	command="$base_compile $qsrcfile $pic_flag"
1385      fi
1386      if test "$compiler_c_o" = yes; then
1387	command="$command -o $obj"
1388      fi
1389
1390      # Suppress compiler output if we already did a PIC compilation.
1391      command="$command$suppress_output"
1392      $run $rm "$obj" "$output_obj"
1393      $show "$command"
1394      if $run eval $lt_env "$command"; then :
1395      else
1396	$run $rm $removelist
1397	exit $EXIT_FAILURE
1398      fi
1399
1400      if test "$need_locks" = warn &&
1401	 test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1402	$echo "\
1403*** ERROR, $lockfile contains:
1404`cat $lockfile 2>/dev/null`
1405
1406but it should contain:
1407$srcfile
1408
1409This indicates that another process is trying to use the same
1410temporary object file, and libtool could not work around it because
1411your compiler does not support \`-c' and \`-o' together.  If you
1412repeat this compilation, it may succeed, by chance, but you had better
1413avoid parallel builds (make -j) in this platform, or get a better
1414compiler."
1415
1416	$run $rm $removelist
1417	exit $EXIT_FAILURE
1418      fi
1419
1420      # Just move the object if needed
1421      if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1422	$show "$mv $output_obj $obj"
1423	if $run $mv $output_obj $obj; then :
1424	else
1425	  error=$?
1426	  $run $rm $removelist
1427	  exit $error
1428	fi
1429      fi
1430
1431      # Append the name of the non-PIC object the libtool object file.
1432      # Only append if the libtool object file exists.
1433      test -z "$run" && cat >> ${libobj}T <<EOF
1434# Name of the non-PIC object.
1435non_pic_object='$objname'
1436
1437EOF
1438    else
1439      # Append the name of the non-PIC object the libtool object file.
1440      # Only append if the libtool object file exists.
1441      test -z "$run" && cat >> ${libobj}T <<EOF
1442# Name of the non-PIC object.
1443non_pic_object=none
1444
1445EOF
1446    fi
1447
1448    $run $mv "${libobj}T" "${libobj}"
1449
1450    # Unlock the critical section if it was locked
1451    if test "$need_locks" != no; then
1452      $run $rm "$lockfile"
1453    fi
1454
1455    exit $EXIT_SUCCESS
1456    ;;
1457
1458  # libtool link mode
1459  link | relink)
1460    modename="$modename: link"
1461    case $host in
1462    *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1463      # It is impossible to link a dll without this setting, and
1464      # we shouldn't force the makefile maintainer to figure out
1465      # which system we are compiling for in order to pass an extra
1466      # flag for every libtool invocation.
1467      # allow_undefined=no
1468
1469      # FIXME: Unfortunately, there are problems with the above when trying
1470      # to make a dll which has undefined symbols, in which case not
1471      # even a static library is built.  For now, we need to specify
1472      # -no-undefined on the libtool link line when we can be certain
1473      # that all symbols are satisfied, otherwise we get a static library.
1474      allow_undefined=yes
1475      ;;
1476    *)
1477      allow_undefined=yes
1478      ;;
1479    esac
1480    libtool_args="$nonopt"
1481    base_compile="$nonopt $@"
1482    compile_command="$nonopt"
1483    finalize_command="$nonopt"
1484
1485    compile_rpath=
1486    finalize_rpath=
1487    compile_shlibpath=
1488    finalize_shlibpath=
1489    convenience=
1490    old_convenience=
1491    deplibs=
1492    old_deplibs=
1493    compiler_flags=
1494    linker_flags=
1495    dllsearchpath=
1496    lib_search_path=`pwd`
1497    inst_prefix_dir=
1498
1499    avoid_version=no
1500    dlfiles=
1501    dlprefiles=
1502    dlself=no
1503    export_dynamic=no
1504    export_symbols=
1505    export_symbols_regex=
1506    generated=
1507    libobjs=
1508    ltlibs=
1509    module=no
1510    no_install=no
1511    objs=
1512    non_pic_objects=
1513    notinst_path= # paths that contain not-installed libtool libraries
1514    precious_files_regex=
1515    prefer_static_libs=no
1516    preload=no
1517    prev=
1518    prevarg=
1519    release=
1520    rpath=
1521    xrpath=
1522    perm_rpath=
1523    temp_rpath=
1524    thread_safe=no
1525    vinfo=
1526    vinfo_number=no
1527    single_module="${wl}-single_module"
1528
1529    func_infer_tag $base_compile
1530
1531    # We need to know -static, to get the right output filenames.
1532    for arg
1533    do
1534      case $arg in
1535      -all-static | -static | -static-libtool-libs)
1536	case $arg in
1537	-all-static)
1538	  if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1539	    $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1540	  fi
1541	  if test -n "$link_static_flag"; then
1542	    dlopen_self=$dlopen_self_static
1543	  fi
1544	  prefer_static_libs=yes
1545	  ;;
1546	-static)
1547	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
1548	    dlopen_self=$dlopen_self_static
1549	  fi
1550	  prefer_static_libs=built
1551	  ;;
1552	-static-libtool-libs)
1553	  if test -z "$pic_flag" && test -n "$link_static_flag"; then
1554	    dlopen_self=$dlopen_self_static
1555	  fi
1556	  prefer_static_libs=yes
1557	  ;;
1558	esac
1559	build_libtool_libs=no
1560	build_old_libs=yes
1561	break
1562	;;
1563      esac
1564    done
1565
1566    # See if our shared archives depend on static archives.
1567    test -n "$old_archive_from_new_cmds" && build_old_libs=yes
1568
1569    # Go through the arguments, transforming them on the way.
1570    while test "$#" -gt 0; do
1571      arg="$1"
1572      shift
1573      case $arg in
1574      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
1575	qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1576	;;
1577      *) qarg=$arg ;;
1578      esac
1579      libtool_args="$libtool_args $qarg"
1580
1581      # If the previous option needs an argument, assign it.
1582      if test -n "$prev"; then
1583	case $prev in
1584	output)
1585	  compile_command="$compile_command @OUTPUT@"
1586	  finalize_command="$finalize_command @OUTPUT@"
1587	  ;;
1588	esac
1589
1590	case $prev in
1591	dlfiles|dlprefiles)
1592	  if test "$preload" = no; then
1593	    # Add the symbol object into the linking commands.
1594	    compile_command="$compile_command @SYMFILE@"
1595	    finalize_command="$finalize_command @SYMFILE@"
1596	    preload=yes
1597	  fi
1598	  case $arg in
1599	  *.la | *.lo) ;;  # We handle these cases below.
1600	  force)
1601	    if test "$dlself" = no; then
1602	      dlself=needless
1603	      export_dynamic=yes
1604	    fi
1605	    prev=
1606	    continue
1607	    ;;
1608	  self)
1609	    if test "$prev" = dlprefiles; then
1610	      dlself=yes
1611	    elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
1612	      dlself=yes
1613	    else
1614	      dlself=needless
1615	      export_dynamic=yes
1616	    fi
1617	    prev=
1618	    continue
1619	    ;;
1620	  *)
1621	    if test "$prev" = dlfiles; then
1622	      dlfiles="$dlfiles $arg"
1623	    else
1624	      dlprefiles="$dlprefiles $arg"
1625	    fi
1626	    prev=
1627	    continue
1628	    ;;
1629	  esac
1630	  ;;
1631	expsyms)
1632	  export_symbols="$arg"
1633	  if test ! -f "$arg"; then
1634	    $echo "$modename: symbol file \`$arg' does not exist"
1635	    exit $EXIT_FAILURE
1636	  fi
1637	  prev=
1638	  continue
1639	  ;;
1640	expsyms_regex)
1641	  export_symbols_regex="$arg"
1642	  prev=
1643	  continue
1644	  ;;
1645	inst_prefix)
1646	  inst_prefix_dir="$arg"
1647	  prev=
1648	  continue
1649	  ;;
1650	precious_regex)
1651	  precious_files_regex="$arg"
1652	  prev=
1653	  continue
1654	  ;;
1655	release)
1656	  release="-$arg"
1657	  prev=
1658	  continue
1659	  ;;
1660	objectlist)
1661	  if test -f "$arg"; then
1662	    save_arg=$arg
1663	    moreargs=
1664	    for fil in `cat $save_arg`
1665	    do
1666#	      moreargs="$moreargs $fil"
1667	      arg=$fil
1668	      # A libtool-controlled object.
1669
1670	      # Check to see that this really is a libtool object.
1671	      if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1672		pic_object=
1673		non_pic_object=
1674
1675		# Read the .lo file
1676		# If there is no directory component, then add one.
1677		case $arg in
1678		*/* | *\\*) . $arg ;;
1679		*) . ./$arg ;;
1680		esac
1681
1682		if test -z "$pic_object" || \
1683		   test -z "$non_pic_object" ||
1684		   test "$pic_object" = none && \
1685		   test "$non_pic_object" = none; then
1686		  $echo "$modename: cannot find name of object for \`$arg'" 1>&2
1687		  exit $EXIT_FAILURE
1688		fi
1689
1690		# Extract subdirectory from the argument.
1691		xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1692		if test "X$xdir" = "X$arg"; then
1693		  xdir=
1694		else
1695		  xdir="$xdir/"
1696		fi
1697
1698		if test "$pic_object" != none; then
1699		  # Prepend the subdirectory the object is found in.
1700		  pic_object="$xdir$pic_object"
1701
1702		  if test "$prev" = dlfiles; then
1703		    if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1704		      dlfiles="$dlfiles $pic_object"
1705		      prev=
1706		      continue
1707		    else
1708		      # If libtool objects are unsupported, then we need to preload.
1709		      prev=dlprefiles
1710		    fi
1711		  fi
1712
1713		  # CHECK ME:  I think I busted this.  -Ossama
1714		  if test "$prev" = dlprefiles; then
1715		    # Preload the old-style object.
1716		    dlprefiles="$dlprefiles $pic_object"
1717		    prev=
1718		  fi
1719
1720		  # A PIC object.
1721		  libobjs="$libobjs $pic_object"
1722		  arg="$pic_object"
1723		fi
1724
1725		# Non-PIC object.
1726		if test "$non_pic_object" != none; then
1727		  # Prepend the subdirectory the object is found in.
1728		  non_pic_object="$xdir$non_pic_object"
1729
1730		  # A standard non-PIC object
1731		  non_pic_objects="$non_pic_objects $non_pic_object"
1732		  if test -z "$pic_object" || test "$pic_object" = none ; then
1733		    arg="$non_pic_object"
1734		  fi
1735		else
1736		  # If the PIC object exists, use it instead.
1737		  # $xdir was prepended to $pic_object above.
1738		  non_pic_object="$pic_object"
1739		  non_pic_objects="$non_pic_objects $non_pic_object"
1740		fi
1741	      else
1742		# Only an error if not doing a dry-run.
1743		if test -z "$run"; then
1744		  $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1745		  exit $EXIT_FAILURE
1746		else
1747		  # Dry-run case.
1748
1749		  # Extract subdirectory from the argument.
1750		  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1751		  if test "X$xdir" = "X$arg"; then
1752		    xdir=
1753		  else
1754		    xdir="$xdir/"
1755		  fi
1756
1757		  pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1758		  non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1759		  libobjs="$libobjs $pic_object"
1760		  non_pic_objects="$non_pic_objects $non_pic_object"
1761		fi
1762	      fi
1763	    done
1764	  else
1765	    $echo "$modename: link input file \`$save_arg' does not exist"
1766	    exit $EXIT_FAILURE
1767	  fi
1768	  arg=$save_arg
1769	  prev=
1770	  continue
1771	  ;;
1772	rpath | xrpath)
1773	  # We need an absolute path.
1774	  case $arg in
1775	  [\\/]* | [A-Za-z]:[\\/]*) ;;
1776	  *)
1777	    $echo "$modename: only absolute run-paths are allowed" 1>&2
1778	    exit $EXIT_FAILURE
1779	    ;;
1780	  esac
1781	  if test "$prev" = rpath; then
1782	    case "$rpath " in
1783	    *" $arg "*) ;;
1784	    *) rpath="$rpath $arg" ;;
1785	    esac
1786	  else
1787	    case "$xrpath " in
1788	    *" $arg "*) ;;
1789	    *) xrpath="$xrpath $arg" ;;
1790	    esac
1791	  fi
1792	  prev=
1793	  continue
1794	  ;;
1795	xcompiler)
1796	  compiler_flags="$compiler_flags $qarg"
1797	  prev=
1798	  compile_command="$compile_command $qarg"
1799	  finalize_command="$finalize_command $qarg"
1800	  continue
1801	  ;;
1802	xlinker)
1803	  linker_flags="$linker_flags $qarg"
1804	  compiler_flags="$compiler_flags $wl$qarg"
1805	  prev=
1806	  compile_command="$compile_command $wl$qarg"
1807	  finalize_command="$finalize_command $wl$qarg"
1808	  continue
1809	  ;;
1810	xcclinker)
1811	  linker_flags="$linker_flags $qarg"
1812	  compiler_flags="$compiler_flags $qarg"
1813	  prev=
1814	  compile_command="$compile_command $qarg"
1815	  finalize_command="$finalize_command $qarg"
1816	  continue
1817	  ;;
1818	shrext)
1819  	  shrext_cmds="$arg"
1820	  prev=
1821	  continue
1822	  ;;
1823	darwin_framework|darwin_framework_skip)
1824	  test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
1825	  compile_command="$compile_command $arg"
1826	  finalize_command="$finalize_command $arg"
1827	  prev=
1828	  continue
1829	  ;;
1830	*)
1831	  eval "$prev=\"\$arg\""
1832	  prev=
1833	  continue
1834	  ;;
1835	esac
1836      fi # test -n "$prev"
1837
1838      prevarg="$arg"
1839
1840      case $arg in
1841      -all-static)
1842	if test -n "$link_static_flag"; then
1843	  compile_command="$compile_command $link_static_flag"
1844	  finalize_command="$finalize_command $link_static_flag"
1845	fi
1846	continue
1847	;;
1848
1849      -allow-undefined)
1850	# FIXME: remove this flag sometime in the future.
1851	$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1852	continue
1853	;;
1854
1855      -avoid-version)
1856	avoid_version=yes
1857	continue
1858	;;
1859
1860      -dlopen)
1861	prev=dlfiles
1862	continue
1863	;;
1864
1865      -dlpreopen)
1866	prev=dlprefiles
1867	continue
1868	;;
1869
1870      -export-dynamic)
1871	export_dynamic=yes
1872	continue
1873	;;
1874
1875      -export-symbols | -export-symbols-regex)
1876	if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1877	  $echo "$modename: more than one -exported-symbols argument is not allowed"
1878	  exit $EXIT_FAILURE
1879	fi
1880	if test "X$arg" = "X-export-symbols"; then
1881	  prev=expsyms
1882	else
1883	  prev=expsyms_regex
1884	fi
1885	continue
1886	;;
1887
1888      -framework|-arch|-isysroot)
1889	case " $CC " in
1890	  *" ${arg} ${1} "* | *" ${arg}	${1} "*)
1891		prev=darwin_framework_skip ;;
1892	  *) compiler_flags="$compiler_flags $arg"
1893	     prev=darwin_framework ;;
1894	esac
1895	compile_command="$compile_command $arg"
1896	finalize_command="$finalize_command $arg"
1897	continue
1898	;;
1899
1900      -inst-prefix-dir)
1901	prev=inst_prefix
1902	continue
1903	;;
1904
1905      # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1906      # so, if we see these flags be careful not to treat them like -L
1907      -L[A-Z][A-Z]*:*)
1908	case $with_gcc/$host in
1909	no/*-*-irix* | /*-*-irix*)
1910	  compile_command="$compile_command $arg"
1911	  finalize_command="$finalize_command $arg"
1912	  ;;
1913	esac
1914	continue
1915	;;
1916
1917      -L*)
1918	dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1919	# We need an absolute path.
1920	case $dir in
1921	[\\/]* | [A-Za-z]:[\\/]*) ;;
1922	*)
1923	  absdir=`cd "$dir" && pwd`
1924	  if test -z "$absdir"; then
1925	    $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1926	    absdir="$dir"
1927	    notinst_path="$notinst_path $dir"
1928	  fi
1929	  dir="$absdir"
1930	  ;;
1931	esac
1932	case "$deplibs " in
1933	*" -L$dir "*) ;;
1934	*)
1935	  deplibs="$deplibs -L$dir"
1936	  lib_search_path="$lib_search_path $dir"
1937	  ;;
1938	esac
1939	case $host in
1940	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1941	  testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
1942	  case :$dllsearchpath: in
1943	  *":$dir:"*) ;;
1944	  *) dllsearchpath="$dllsearchpath:$dir";;
1945	  esac
1946	  case :$dllsearchpath: in
1947	  *":$testbindir:"*) ;;
1948	  *) dllsearchpath="$dllsearchpath:$testbindir";;
1949	  esac
1950	  ;;
1951	esac
1952	continue
1953	;;
1954
1955      -l*)
1956	if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
1957	  case $host in
1958	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
1959	    # These systems don't actually have a C or math library (as such)
1960	    continue
1961	    ;;
1962	  *-*-os2*)
1963	    # These systems don't actually have a C library (as such)
1964	    test "X$arg" = "X-lc" && continue
1965	    ;;
1966	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1967	    # Do not include libc due to us having libc/libc_r.
1968	    test "X$arg" = "X-lc" && continue
1969	    ;;
1970	  *-*-rhapsody* | *-*-darwin1.[012])
1971	    # Rhapsody C and math libraries are in the System framework
1972	    deplibs="$deplibs -framework System"
1973	    continue
1974	    ;;
1975	  *-*-sco3.2v5* | *-*-sco5v6*)
1976	    # Causes problems with __ctype
1977	    test "X$arg" = "X-lc" && continue
1978	    ;;
1979	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
1980	    # Compiler inserts libc in the correct place for threads to work
1981	    test "X$arg" = "X-lc" && continue
1982	    ;;
1983	  esac
1984	elif test "X$arg" = "X-lc_r"; then
1985	 case $host in
1986	 *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1987	   # Do not include libc_r directly, use -pthread flag.
1988	   continue
1989	   ;;
1990	 esac
1991	fi
1992	deplibs="$deplibs $arg"
1993	continue
1994	;;
1995
1996      # Tru64 UNIX uses -model [arg] to determine the layout of C++
1997      # classes, name mangling, and exception handling.
1998      -model)
1999	compile_command="$compile_command $arg"
2000	compiler_flags="$compiler_flags $arg"
2001	finalize_command="$finalize_command $arg"
2002	prev=xcompiler
2003	continue
2004	;;
2005
2006     -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
2007	compiler_flags="$compiler_flags $arg"
2008	compile_command="$compile_command $arg"
2009	finalize_command="$finalize_command $arg"
2010	continue
2011	;;
2012
2013      -multi_module)
2014	single_module="${wl}-multi_module"
2015	continue
2016	;;
2017
2018      -module)
2019	module=yes
2020	continue
2021	;;
2022
2023      # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
2024      # -r[0-9][0-9]* specifies the processor on the SGI compiler
2025      # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
2026      # +DA*, +DD* enable 64-bit mode on the HP compiler
2027      # -q* pass through compiler args for the IBM compiler
2028      # -m* pass through architecture-specific compiler args for GCC
2029      # -m*, -t[45]*, -txscale* pass through architecture-specific
2030      # compiler args for GCC
2031      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
2032      # -F/path gives path to uninstalled frameworks, gcc on darwin
2033      # @file GCC response files
2034      -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
2035      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
2036
2037	# Unknown arguments in both finalize_command and compile_command need
2038	# to be aesthetically quoted because they are evaled later.
2039	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2040	case $arg in
2041	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
2042	  arg="\"$arg\""
2043	  ;;
2044	esac
2045        compile_command="$compile_command $arg"
2046        finalize_command="$finalize_command $arg"
2047        compiler_flags="$compiler_flags $arg"
2048        continue
2049        ;;
2050
2051      -shrext)
2052	prev=shrext
2053	continue
2054	;;
2055
2056      -no-fast-install)
2057	fast_install=no
2058	continue
2059	;;
2060
2061      -no-install)
2062	case $host in
2063	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
2064	  # The PATH hackery in wrapper scripts is required on Windows
2065	  # and Darwin in order for the loader to find any dlls it needs.
2066	  $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
2067	  $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
2068	  fast_install=no
2069	  ;;
2070	*) no_install=yes ;;
2071	esac
2072	continue
2073	;;
2074
2075      -no-undefined)
2076	allow_undefined=no
2077	continue
2078	;;
2079
2080      -objectlist)
2081	prev=objectlist
2082	continue
2083	;;
2084
2085      -o) prev=output ;;
2086
2087      -precious-files-regex)
2088	prev=precious_regex
2089	continue
2090	;;
2091
2092      -release)
2093	prev=release
2094	continue
2095	;;
2096
2097      -rpath)
2098	prev=rpath
2099	continue
2100	;;
2101
2102      -R)
2103	prev=xrpath
2104	continue
2105	;;
2106
2107      -R*)
2108	dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
2109	# We need an absolute path.
2110	case $dir in
2111	[\\/]* | [A-Za-z]:[\\/]*) ;;
2112	*)
2113	  $echo "$modename: only absolute run-paths are allowed" 1>&2
2114	  exit $EXIT_FAILURE
2115	  ;;
2116	esac
2117	case "$xrpath " in
2118	*" $dir "*) ;;
2119	*) xrpath="$xrpath $dir" ;;
2120	esac
2121	continue
2122	;;
2123
2124      -static | -static-libtool-libs)
2125	# The effects of -static are defined in a previous loop.
2126	# We used to do the same as -all-static on platforms that
2127	# didn't have a PIC flag, but the assumption that the effects
2128	# would be equivalent was wrong.  It would break on at least
2129	# Digital Unix and AIX.
2130	continue
2131	;;
2132
2133      -thread-safe)
2134	thread_safe=yes
2135	continue
2136	;;
2137
2138      -version-info)
2139	prev=vinfo
2140	continue
2141	;;
2142      -version-number)
2143	prev=vinfo
2144	vinfo_number=yes
2145	continue
2146	;;
2147
2148      -Wc,*)
2149	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
2150	arg=
2151	save_ifs="$IFS"; IFS=','
2152	for flag in $args; do
2153	  IFS="$save_ifs"
2154	  case $flag in
2155	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
2156	    flag="\"$flag\""
2157	    ;;
2158	  esac
2159	  arg="$arg $wl$flag"
2160	  compiler_flags="$compiler_flags $flag"
2161	done
2162	IFS="$save_ifs"
2163	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
2164	;;
2165
2166      -Wl,*)
2167	args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
2168	arg=
2169	save_ifs="$IFS"; IFS=','
2170	for flag in $args; do
2171	  IFS="$save_ifs"
2172	  case $flag in
2173	    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
2174	    flag="\"$flag\""
2175	    ;;
2176	  esac
2177	  arg="$arg $wl$flag"
2178	  compiler_flags="$compiler_flags $wl$flag"
2179	  linker_flags="$linker_flags $flag"
2180	done
2181	IFS="$save_ifs"
2182	arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
2183	;;
2184
2185      -Xcompiler)
2186	prev=xcompiler
2187	continue
2188	;;
2189
2190      -Xlinker)
2191	prev=xlinker
2192	continue
2193	;;
2194
2195      -XCClinker)
2196	prev=xcclinker
2197	continue
2198	;;
2199
2200      # Some other compiler flag.
2201      -* | +*)
2202	# Unknown arguments in both finalize_command and compile_command need
2203	# to be aesthetically quoted because they are evaled later.
2204	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2205	case $arg in
2206	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
2207	  arg="\"$arg\""
2208	  ;;
2209	esac
2210	;;
2211
2212      *.$objext)
2213	# A standard object.
2214	objs="$objs $arg"
2215	;;
2216
2217      *.lo)
2218	# A libtool-controlled object.
2219
2220	# Check to see that this really is a libtool object.
2221	if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
2222	  pic_object=
2223	  non_pic_object=
2224
2225	  # Read the .lo file
2226	  # If there is no directory component, then add one.
2227	  case $arg in
2228	  */* | *\\*) . $arg ;;
2229	  *) . ./$arg ;;
2230	  esac
2231
2232	  if test -z "$pic_object" || \
2233	     test -z "$non_pic_object" ||
2234	     test "$pic_object" = none && \
2235	     test "$non_pic_object" = none; then
2236	    $echo "$modename: cannot find name of object for \`$arg'" 1>&2
2237	    exit $EXIT_FAILURE
2238	  fi
2239
2240	  # Extract subdirectory from the argument.
2241	  xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
2242	  if test "X$xdir" = "X$arg"; then
2243	    xdir=
2244 	  else
2245	    xdir="$xdir/"
2246	  fi
2247
2248	  if test "$pic_object" != none; then
2249	    # Prepend the subdirectory the object is found in.
2250	    pic_object="$xdir$pic_object"
2251
2252	    if test "$prev" = dlfiles; then
2253	      if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
2254		dlfiles="$dlfiles $pic_object"
2255		prev=
2256		continue
2257	      else
2258		# If libtool objects are unsupported, then we need to preload.
2259		prev=dlprefiles
2260	      fi
2261	    fi
2262
2263	    # CHECK ME:  I think I busted this.  -Ossama
2264	    if test "$prev" = dlprefiles; then
2265	      # Preload the old-style object.
2266	      dlprefiles="$dlprefiles $pic_object"
2267	      prev=
2268	    fi
2269
2270	    # A PIC object.
2271	    libobjs="$libobjs $pic_object"
2272	    arg="$pic_object"
2273	  fi
2274
2275	  # Non-PIC object.
2276	  if test "$non_pic_object" != none; then
2277	    # Prepend the subdirectory the object is found in.
2278	    non_pic_object="$xdir$non_pic_object"
2279
2280	    # A standard non-PIC object
2281	    non_pic_objects="$non_pic_objects $non_pic_object"
2282	    if test -z "$pic_object" || test "$pic_object" = none ; then
2283	      arg="$non_pic_object"
2284	    fi
2285	  else
2286	    # If the PIC object exists, use it instead.
2287	    # $xdir was prepended to $pic_object above.
2288	    non_pic_object="$pic_object"
2289	    non_pic_objects="$non_pic_objects $non_pic_object"
2290	  fi
2291	else
2292	  # Only an error if not doing a dry-run.
2293	  if test -z "$run"; then
2294	    $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
2295	    exit $EXIT_FAILURE
2296	  else
2297	    # Dry-run case.
2298
2299	    # Extract subdirectory from the argument.
2300	    xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
2301	    if test "X$xdir" = "X$arg"; then
2302	      xdir=
2303	    else
2304	      xdir="$xdir/"
2305	    fi
2306
2307	    pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
2308	    non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
2309	    libobjs="$libobjs $pic_object"
2310	    non_pic_objects="$non_pic_objects $non_pic_object"
2311	  fi
2312	fi
2313	;;
2314
2315      *.$libext)
2316	# An archive.
2317	deplibs="$deplibs $arg"
2318	old_deplibs="$old_deplibs $arg"
2319	continue
2320	;;
2321
2322      *.la)
2323	# A libtool-controlled library.
2324
2325	if test "$prev" = dlfiles; then
2326	  # This library was specified with -dlopen.
2327	  dlfiles="$dlfiles $arg"
2328	  prev=
2329	elif test "$prev" = dlprefiles; then
2330	  # The library was specified with -dlpreopen.
2331	  dlprefiles="$dlprefiles $arg"
2332	  prev=
2333	else
2334	  deplibs="$deplibs $arg"
2335	fi
2336	continue
2337	;;
2338
2339      # Some other compiler argument.
2340      *)
2341	# Unknown arguments in both finalize_command and compile_command need
2342	# to be aesthetically quoted because they are evaled later.
2343	arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2344	case $arg in
2345	*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
2346	  arg="\"$arg\""
2347	  ;;
2348	esac
2349	;;
2350      esac # arg
2351
2352      # Now actually substitute the argument into the commands.
2353      if test -n "$arg"; then
2354	compile_command="$compile_command $arg"
2355	finalize_command="$finalize_command $arg"
2356      fi
2357    done # argument parsing loop
2358
2359    if test -n "$prev"; then
2360      $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
2361      $echo "$help" 1>&2
2362      exit $EXIT_FAILURE
2363    fi
2364
2365    if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
2366      eval arg=\"$export_dynamic_flag_spec\"
2367      compile_command="$compile_command $arg"
2368      finalize_command="$finalize_command $arg"
2369    fi
2370
2371    oldlibs=
2372    # calculate the name of the file, without its directory
2373    outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
2374    libobjs_save="$libobjs"
2375
2376    if test -n "$shlibpath_var"; then
2377      # get the directories listed in $shlibpath_var
2378      eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
2379    else
2380      shlib_search_path=
2381    fi
2382    eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
2383    eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
2384
2385    output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2386    if test "X$output_objdir" = "X$output"; then
2387      output_objdir="$objdir"
2388    else
2389      output_objdir="$output_objdir/$objdir"
2390    fi
2391    # Create the object directory.
2392    if test ! -d "$output_objdir"; then
2393      $show "$mkdir $output_objdir"
2394      $run $mkdir $output_objdir
2395      exit_status=$?
2396      if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
2397	exit $exit_status
2398      fi
2399    fi
2400
2401    # Determine the type of output
2402    case $output in
2403    "")
2404      $echo "$modename: you must specify an output file" 1>&2
2405      $echo "$help" 1>&2
2406      exit $EXIT_FAILURE
2407      ;;
2408    *.$libext) linkmode=oldlib ;;
2409    *.lo | *.$objext) linkmode=obj ;;
2410    *.la) linkmode=lib ;;
2411    *) linkmode=prog ;; # Anything else should be a program.
2412    esac
2413
2414    case $host in
2415    *cygwin* | *mingw* | *pw32*)
2416      # don't eliminate duplications in $postdeps and $predeps
2417      duplicate_compiler_generated_deps=yes
2418      ;;
2419    *)
2420      duplicate_compiler_generated_deps=$duplicate_deps
2421      ;;
2422    esac
2423    specialdeplibs=
2424
2425    libs=
2426    # Find all interdependent deplibs by searching for libraries
2427    # that are linked more than once (e.g. -la -lb -la)
2428    for deplib in $deplibs; do
2429      if test "X$duplicate_deps" = "Xyes" ; then
2430	case "$libs " in
2431	*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2432	esac
2433      fi
2434      libs="$libs $deplib"
2435    done
2436
2437    if test "$linkmode" = lib; then
2438      libs="$predeps $libs $compiler_lib_search_path $postdeps"
2439
2440      # Compute libraries that are listed more than once in $predeps
2441      # $postdeps and mark them as special (i.e., whose duplicates are
2442      # not to be eliminated).
2443      pre_post_deps=
2444      if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
2445	for pre_post_dep in $predeps $postdeps; do
2446	  case "$pre_post_deps " in
2447	  *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
2448	  esac
2449	  pre_post_deps="$pre_post_deps $pre_post_dep"
2450	done
2451      fi
2452      pre_post_deps=
2453    fi
2454
2455    deplibs=
2456    newdependency_libs=
2457    newlib_search_path=
2458    need_relink=no # whether we're linking any uninstalled libtool libraries
2459    notinst_deplibs= # not-installed libtool libraries
2460    case $linkmode in
2461    lib)
2462	passes="conv link"
2463	for file in $dlfiles $dlprefiles; do
2464	  case $file in
2465	  *.la) ;;
2466	  *)
2467	    $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
2468	    exit $EXIT_FAILURE
2469	    ;;
2470	  esac
2471	done
2472	;;
2473    prog)
2474	compile_deplibs=
2475	finalize_deplibs=
2476	alldeplibs=no
2477	newdlfiles=
2478	newdlprefiles=
2479	passes="conv scan dlopen dlpreopen link"
2480	;;
2481    *)  passes="conv"
2482	;;
2483    esac
2484    for pass in $passes; do
2485      if test "$linkmode,$pass" = "lib,link" ||
2486	 test "$linkmode,$pass" = "prog,scan"; then
2487	libs="$deplibs"
2488	deplibs=
2489      fi
2490      if test "$linkmode" = prog; then
2491	case $pass in
2492	dlopen) libs="$dlfiles" ;;
2493	dlpreopen) libs="$dlprefiles" ;;
2494	link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
2495	esac
2496      fi
2497      if test "$pass" = dlopen; then
2498	# Collect dlpreopened libraries
2499	save_deplibs="$deplibs"
2500	deplibs=
2501      fi
2502      for deplib in $libs; do
2503	lib=
2504	found=no
2505	case $deplib in
2506	-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
2507	  if test "$linkmode,$pass" = "prog,link"; then
2508	    compile_deplibs="$deplib $compile_deplibs"
2509	    finalize_deplibs="$deplib $finalize_deplibs"
2510	  else
2511	    compiler_flags="$compiler_flags $deplib"
2512	  fi
2513	  continue
2514	  ;;
2515	-l*)
2516	  if test "$linkmode" != lib && test "$linkmode" != prog; then
2517	    $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2518	    continue
2519	  fi
2520	  name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2521	  if test "$linkmode" = lib; then
2522	    searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
2523	  else
2524	    searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
2525	  fi
2526	  for searchdir in $searchdirs; do
2527	    for search_ext in .la $std_shrext .so .a; do
2528	      # Search the libtool library
2529	      lib="$searchdir/lib${name}${search_ext}"
2530	      if test -f "$lib"; then
2531		if test "$search_ext" = ".la"; then
2532		  found=yes
2533		else
2534		  found=no
2535		fi
2536		break 2
2537	      fi
2538	    done
2539	  done
2540	  if test "$found" != yes; then
2541	    # deplib doesn't seem to be a libtool library
2542	    if test "$linkmode,$pass" = "prog,link"; then
2543	      compile_deplibs="$deplib $compile_deplibs"
2544	      finalize_deplibs="$deplib $finalize_deplibs"
2545	    else
2546	      deplibs="$deplib $deplibs"
2547	      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2548	    fi
2549	    continue
2550	  else # deplib is a libtool library
2551	    # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
2552	    # We need to do some special things here, and not later.
2553	    if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
2554	      case " $predeps $postdeps " in
2555	      *" $deplib "*)
2556		if (${SED} -e '2q' $lib |
2557                    grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
2558		  library_names=
2559		  old_library=
2560		  case $lib in
2561		  */* | *\\*) . $lib ;;
2562		  *) . ./$lib ;;
2563		  esac
2564		  for l in $old_library $library_names; do
2565		    ll="$l"
2566		  done
2567		  if test "X$ll" = "X$old_library" ; then # only static version available
2568		    found=no
2569		    ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2570		    test "X$ladir" = "X$lib" && ladir="."
2571		    lib=$ladir/$old_library
2572		    if test "$linkmode,$pass" = "prog,link"; then
2573		      compile_deplibs="$deplib $compile_deplibs"
2574		      finalize_deplibs="$deplib $finalize_deplibs"
2575		    else
2576		      deplibs="$deplib $deplibs"
2577		      test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2578		    fi
2579		    continue
2580		  fi
2581		fi
2582	        ;;
2583	      *) ;;
2584	      esac
2585	    fi
2586	  fi
2587	  ;; # -l
2588	-L*)
2589	  case $linkmode in
2590	  lib)
2591	    deplibs="$deplib $deplibs"
2592	    test "$pass" = conv && continue
2593	    newdependency_libs="$deplib $newdependency_libs"
2594	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2595	    ;;
2596	  prog)
2597	    if test "$pass" = conv; then
2598	      deplibs="$deplib $deplibs"
2599	      continue
2600	    fi
2601	    if test "$pass" = scan; then
2602	      deplibs="$deplib $deplibs"
2603	    else
2604	      compile_deplibs="$deplib $compile_deplibs"
2605	      finalize_deplibs="$deplib $finalize_deplibs"
2606	    fi
2607	    newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2608	    ;;
2609	  *)
2610	    $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
2611	    ;;
2612	  esac # linkmode
2613	  continue
2614	  ;; # -L
2615	-R*)
2616	  if test "$pass" = link; then
2617	    dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
2618	    # Make sure the xrpath contains only unique directories.
2619	    case "$xrpath " in
2620	    *" $dir "*) ;;
2621	    *) xrpath="$xrpath $dir" ;;
2622	    esac
2623	  fi
2624	  deplibs="$deplib $deplibs"
2625	  continue
2626	  ;;
2627	*.la) lib="$deplib" ;;
2628	*.$libext)
2629	  if test "$pass" = conv; then
2630	    deplibs="$deplib $deplibs"
2631	    continue
2632	  fi
2633	  case $linkmode in
2634	  lib)
2635	    valid_a_lib=no
2636	    case $deplibs_check_method in
2637	      match_pattern*)
2638		set dummy $deplibs_check_method
2639	        match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2640		if eval $echo \"$deplib\" 2>/dev/null \
2641		    | $SED 10q \
2642		    | $EGREP "$match_pattern_regex" > /dev/null; then
2643		  valid_a_lib=yes
2644		fi
2645		;;
2646	      pass_all)
2647		valid_a_lib=yes
2648		;;
2649            esac
2650	    if test "$valid_a_lib" != yes; then
2651	      $echo
2652	      $echo "*** Warning: Trying to link with static lib archive $deplib."
2653	      $echo "*** I have the capability to make that library automatically link in when"
2654	      $echo "*** you link to this library.  But I can only do this if you have a"
2655	      $echo "*** shared version of the library, which you do not appear to have"
2656	      $echo "*** because the file extensions .$libext of this argument makes me believe"
2657	      $echo "*** that it is just a static archive that I should not used here."
2658	    else
2659	      $echo
2660	      $echo "*** Warning: Linking the shared library $output against the"
2661	      $echo "*** static library $deplib is not portable!"
2662	      deplibs="$deplib $deplibs"
2663	    fi
2664	    continue
2665	    ;;
2666	  prog)
2667	    if test "$pass" != link; then
2668	      deplibs="$deplib $deplibs"
2669	    else
2670	      compile_deplibs="$deplib $compile_deplibs"
2671	      finalize_deplibs="$deplib $finalize_deplibs"
2672	    fi
2673	    continue
2674	    ;;
2675	  esac # linkmode
2676	  ;; # *.$libext
2677	*.lo | *.$objext)
2678	  if test "$pass" = conv; then
2679	    deplibs="$deplib $deplibs"
2680	  elif test "$linkmode" = prog; then
2681	    if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
2682	      # If there is no dlopen support or we're linking statically,
2683	      # we need to preload.
2684	      newdlprefiles="$newdlprefiles $deplib"
2685	      compile_deplibs="$deplib $compile_deplibs"
2686	      finalize_deplibs="$deplib $finalize_deplibs"
2687	    else
2688	      newdlfiles="$newdlfiles $deplib"
2689	    fi
2690	  fi
2691	  continue
2692	  ;;
2693	%DEPLIBS%)
2694	  alldeplibs=yes
2695	  continue
2696	  ;;
2697	esac # case $deplib
2698	if test "$found" = yes || test -f "$lib"; then :
2699	else
2700	  $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
2701	  exit $EXIT_FAILURE
2702	fi
2703
2704	# Check to see that this really is a libtool archive.
2705	if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
2706	else
2707	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2708	  exit $EXIT_FAILURE
2709	fi
2710
2711	ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2712	test "X$ladir" = "X$lib" && ladir="."
2713
2714	dlname=
2715	dlopen=
2716	dlpreopen=
2717	libdir=
2718	library_names=
2719	old_library=
2720	# If the library was installed with an old release of libtool,
2721	# it will not redefine variables installed, or shouldnotlink
2722	installed=yes
2723	shouldnotlink=no
2724	avoidtemprpath=
2725
2726
2727	# Read the .la file
2728	case $lib in
2729	*/* | *\\*) . $lib ;;
2730	*) . ./$lib ;;
2731	esac
2732
2733	if test "$linkmode,$pass" = "lib,link" ||
2734	   test "$linkmode,$pass" = "prog,scan" ||
2735	   { test "$linkmode" != prog && test "$linkmode" != lib; }; then
2736	  test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
2737	  test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
2738	fi
2739
2740	if test "$pass" = conv; then
2741	  # Only check for convenience libraries
2742	  deplibs="$lib $deplibs"
2743	  if test -z "$libdir"; then
2744	    if test -z "$old_library"; then
2745	      $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2746	      exit $EXIT_FAILURE
2747	    fi
2748	    # It is a libtool convenience library, so add in its objects.
2749	    convenience="$convenience $ladir/$objdir/$old_library"
2750	    old_convenience="$old_convenience $ladir/$objdir/$old_library"
2751	    tmp_libs=
2752	    for deplib in $dependency_libs; do
2753	      deplibs="$deplib $deplibs"
2754              if test "X$duplicate_deps" = "Xyes" ; then
2755	        case "$tmp_libs " in
2756	        *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2757	        esac
2758              fi
2759	      tmp_libs="$tmp_libs $deplib"
2760	    done
2761	  elif test "$linkmode" != prog && test "$linkmode" != lib; then
2762	    $echo "$modename: \`$lib' is not a convenience library" 1>&2
2763	    exit $EXIT_FAILURE
2764	  fi
2765	  continue
2766	fi # $pass = conv
2767
2768
2769	# Get the name of the library we link against.
2770	linklib=
2771	for l in $old_library $library_names; do
2772	  linklib="$l"
2773	done
2774	if test -z "$linklib"; then
2775	  $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2776	  exit $EXIT_FAILURE
2777	fi
2778
2779	# This library was specified with -dlopen.
2780	if test "$pass" = dlopen; then
2781	  if test -z "$libdir"; then
2782	    $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2783	    exit $EXIT_FAILURE
2784	  fi
2785	  if test -z "$dlname" ||
2786	     test "$dlopen_support" != yes ||
2787	     test "$build_libtool_libs" = no; then
2788	    # If there is no dlname, no dlopen support or we're linking
2789	    # statically, we need to preload.  We also need to preload any
2790	    # dependent libraries so libltdl's deplib preloader doesn't
2791	    # bomb out in the load deplibs phase.
2792	    dlprefiles="$dlprefiles $lib $dependency_libs"
2793	  else
2794	    newdlfiles="$newdlfiles $lib"
2795	  fi
2796	  continue
2797	fi # $pass = dlopen
2798
2799	# We need an absolute path.
2800	case $ladir in
2801	[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
2802	*)
2803	  abs_ladir=`cd "$ladir" && pwd`
2804	  if test -z "$abs_ladir"; then
2805	    $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
2806	    $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
2807	    abs_ladir="$ladir"
2808	  fi
2809	  ;;
2810	esac
2811	laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
2812
2813	# Find the relevant object directory and library name.
2814	if test "X$installed" = Xyes; then
2815	  if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2816	    $echo "$modename: warning: library \`$lib' was moved." 1>&2
2817	    dir="$ladir"
2818	    absdir="$abs_ladir"
2819	    libdir="$abs_ladir"
2820	  else
2821	    dir="$libdir"
2822	    absdir="$libdir"
2823	  fi
2824	  test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
2825	else
2826	  if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2827	    dir="$ladir"
2828	    absdir="$abs_ladir"
2829	    # Remove this search path later
2830	    notinst_path="$notinst_path $abs_ladir"
2831	  else
2832	    dir="$ladir/$objdir"
2833	    absdir="$abs_ladir/$objdir"
2834	    # Remove this search path later
2835	    notinst_path="$notinst_path $abs_ladir"
2836	  fi
2837	fi # $installed = yes
2838	name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2839
2840	# This library was specified with -dlpreopen.
2841	if test "$pass" = dlpreopen; then
2842	  if test -z "$libdir"; then
2843	    $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2844	    exit $EXIT_FAILURE
2845	  fi
2846	  # Prefer using a static library (so that no silly _DYNAMIC symbols
2847	  # are required to link).
2848	  if test -n "$old_library"; then
2849	    newdlprefiles="$newdlprefiles $dir/$old_library"
2850	  # Otherwise, use the dlname, so that lt_dlopen finds it.
2851	  elif test -n "$dlname"; then
2852	    newdlprefiles="$newdlprefiles $dir/$dlname"
2853	  else
2854	    newdlprefiles="$newdlprefiles $dir/$linklib"
2855	  fi
2856	fi # $pass = dlpreopen
2857
2858	if test -z "$libdir"; then
2859	  # Link the convenience library
2860	  if test "$linkmode" = lib; then
2861	    deplibs="$dir/$old_library $deplibs"
2862	  elif test "$linkmode,$pass" = "prog,link"; then
2863	    compile_deplibs="$dir/$old_library $compile_deplibs"
2864	    finalize_deplibs="$dir/$old_library $finalize_deplibs"
2865	  else
2866	    deplibs="$lib $deplibs" # used for prog,scan pass
2867	  fi
2868	  continue
2869	fi
2870
2871
2872	if test "$linkmode" = prog && test "$pass" != link; then
2873	  newlib_search_path="$newlib_search_path $ladir"
2874	  deplibs="$lib $deplibs"
2875
2876	  linkalldeplibs=no
2877	  if test "$link_all_deplibs" != no || test -z "$library_names" ||
2878	     test "$build_libtool_libs" = no; then
2879	    linkalldeplibs=yes
2880	  fi
2881
2882	  tmp_libs=
2883	  for deplib in $dependency_libs; do
2884	    case $deplib in
2885	    -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2886	    esac
2887	    # Need to link against all dependency_libs?
2888	    if test "$linkalldeplibs" = yes; then
2889	      deplibs="$deplib $deplibs"
2890	    else
2891	      # Need to hardcode shared library paths
2892	      # or/and link against static libraries
2893	      newdependency_libs="$deplib $newdependency_libs"
2894	    fi
2895	    if test "X$duplicate_deps" = "Xyes" ; then
2896	      case "$tmp_libs " in
2897	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2898	      esac
2899	    fi
2900	    tmp_libs="$tmp_libs $deplib"
2901	  done # for deplib
2902	  continue
2903	fi # $linkmode = prog...
2904
2905	if test "$linkmode,$pass" = "prog,link"; then
2906	  if test -n "$library_names" &&
2907	     { { test "$prefer_static_libs" = no ||
2908		 test "$prefer_static_libs,$installed" = "built,yes"; } ||
2909	       test -z "$old_library"; }; then
2910	    # We need to hardcode the library path
2911	    if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2912	      # Make sure the rpath contains only unique directories.
2913	      case "$temp_rpath " in
2914	      *" $dir "*) ;;
2915	      *" $absdir "*) ;;
2916	      *) temp_rpath="$temp_rpath $absdir" ;;
2917	      esac
2918	    fi
2919
2920	    # Hardcode the library path.
2921	    # Skip directories that are in the system default run-time
2922	    # search path.
2923	    case " $sys_lib_dlsearch_path " in
2924	    *" $absdir "*) ;;
2925	    *)
2926	      case "$compile_rpath " in
2927	      *" $absdir "*) ;;
2928	      *) compile_rpath="$compile_rpath $absdir"
2929	      esac
2930	      ;;
2931	    esac
2932	    case " $sys_lib_dlsearch_path " in
2933	    *" $libdir "*) ;;
2934	    *)
2935	      case "$finalize_rpath " in
2936	      *" $libdir "*) ;;
2937	      *) finalize_rpath="$finalize_rpath $libdir"
2938	      esac
2939	      ;;
2940	    esac
2941	  fi # $linkmode,$pass = prog,link...
2942
2943	  if test "$alldeplibs" = yes &&
2944	     { test "$deplibs_check_method" = pass_all ||
2945	       { test "$build_libtool_libs" = yes &&
2946		 test -n "$library_names"; }; }; then
2947	    # We only need to search for static libraries
2948	    continue
2949	  fi
2950	fi
2951
2952	link_static=no # Whether the deplib will be linked statically
2953	use_static_libs=$prefer_static_libs
2954	if test "$use_static_libs" = built && test "$installed" = yes ; then
2955	  use_static_libs=no
2956	fi
2957	if test -n "$library_names" &&
2958	   { test "$use_static_libs" = no || test -z "$old_library"; }; then
2959	  if test "$installed" = no; then
2960	    notinst_deplibs="$notinst_deplibs $lib"
2961	    need_relink=yes
2962	  fi
2963	  # This is a shared library
2964
2965	  # Warn about portability, can't link against -module's on
2966	  # some systems (darwin)
2967	  if test "$shouldnotlink" = yes && test "$pass" = link ; then
2968	    $echo
2969	    if test "$linkmode" = prog; then
2970	      $echo "*** Warning: Linking the executable $output against the loadable module"
2971	    else
2972	      $echo "*** Warning: Linking the shared library $output against the loadable module"
2973	    fi
2974	    $echo "*** $linklib is not portable!"
2975	  fi
2976	  if test "$linkmode" = lib &&
2977	     test "$hardcode_into_libs" = yes; then
2978	    # Hardcode the library path.
2979	    # Skip directories that are in the system default run-time
2980	    # search path.
2981	    case " $sys_lib_dlsearch_path " in
2982	    *" $absdir "*) ;;
2983	    *)
2984	      case "$compile_rpath " in
2985	      *" $absdir "*) ;;
2986	      *) compile_rpath="$compile_rpath $absdir"
2987	      esac
2988	      ;;
2989	    esac
2990	    case " $sys_lib_dlsearch_path " in
2991	    *" $libdir "*) ;;
2992	    *)
2993	      case "$finalize_rpath " in
2994	      *" $libdir "*) ;;
2995	      *) finalize_rpath="$finalize_rpath $libdir"
2996	      esac
2997	      ;;
2998	    esac
2999	  fi
3000
3001	  if test -n "$old_archive_from_expsyms_cmds"; then
3002	    # figure out the soname
3003	    set dummy $library_names
3004	    realname="$2"
3005	    shift; shift
3006	    libname=`eval \\$echo \"$libname_spec\"`
3007	    # use dlname if we got it. it's perfectly good, no?
3008	    if test -n "$dlname"; then
3009	      soname="$dlname"
3010	    elif test -n "$soname_spec"; then
3011	      # bleh windows
3012	      case $host in
3013	      *cygwin* | mingw*)
3014		major=`expr $current - $age`
3015		versuffix="-$major"
3016		;;
3017	      esac
3018	      eval soname=\"$soname_spec\"
3019	    else
3020	      soname="$realname"
3021	    fi
3022
3023	    # Make a new name for the extract_expsyms_cmds to use
3024	    soroot="$soname"
3025	    soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
3026	    newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
3027
3028	    # If the library has no export list, then create one now
3029	    if test -f "$output_objdir/$soname-def"; then :
3030	    else
3031	      $show "extracting exported symbol list from \`$soname'"
3032	      save_ifs="$IFS"; IFS='~'
3033	      cmds=$extract_expsyms_cmds
3034	      for cmd in $cmds; do
3035		IFS="$save_ifs"
3036		eval cmd=\"$cmd\"
3037		$show "$cmd"
3038		$run eval "$cmd" || exit $?
3039	      done
3040	      IFS="$save_ifs"
3041	    fi
3042
3043	    # Create $newlib
3044	    if test -f "$output_objdir/$newlib"; then :; else
3045	      $show "generating import library for \`$soname'"
3046	      save_ifs="$IFS"; IFS='~'
3047	      cmds=$old_archive_from_expsyms_cmds
3048	      for cmd in $cmds; do
3049		IFS="$save_ifs"
3050		eval cmd=\"$cmd\"
3051		$show "$cmd"
3052		$run eval "$cmd" || exit $?
3053	      done
3054	      IFS="$save_ifs"
3055	    fi
3056	    # make sure the library variables are pointing to the new library
3057	    dir=$output_objdir
3058	    linklib=$newlib
3059	  fi # test -n "$old_archive_from_expsyms_cmds"
3060
3061	  if test "$linkmode" = prog || test "$mode" != relink; then
3062	    add_shlibpath=
3063	    add_dir=
3064	    add=
3065	    lib_linked=yes
3066	    case $hardcode_action in
3067	    immediate | unsupported)
3068	      if test "$hardcode_direct" = no; then
3069		add="$dir/$linklib"
3070		case $host in
3071		  *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
3072		  *-*-sysv4*uw2*) add_dir="-L$dir" ;;
3073		  *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
3074		    *-*-unixware7*) add_dir="-L$dir" ;;
3075		  *-*-darwin* )
3076		    # if the lib is a module then we can not link against
3077		    # it, someone is ignoring the new warnings I added
3078		    if /usr/bin/file -L $add 2> /dev/null |
3079                      $EGREP ": [^:]* bundle" >/dev/null ; then
3080		      $echo "** Warning, lib $linklib is a module, not a shared library"
3081		      if test -z "$old_library" ; then
3082		        $echo
3083		        $echo "** And there doesn't seem to be a static archive available"
3084		        $echo "** The link will probably fail, sorry"
3085		      else
3086		        add="$dir/$old_library"
3087		      fi
3088		    fi
3089		esac
3090	      elif test "$hardcode_minus_L" = no; then
3091		case $host in
3092		*-*-sunos*) add_shlibpath="$dir" ;;
3093		esac
3094		add_dir="-L$dir"
3095		add="-l$name"
3096	      elif test "$hardcode_shlibpath_var" = no; then
3097		add_shlibpath="$dir"
3098		add="-l$name"
3099	      else
3100		lib_linked=no
3101	      fi
3102	      ;;
3103	    relink)
3104	      if test "$hardcode_direct" = yes; then
3105		add="$dir/$linklib"
3106	      elif test "$hardcode_minus_L" = yes; then
3107		add_dir="-L$dir"
3108		# Try looking first in the location we're being installed to.
3109		if test -n "$inst_prefix_dir"; then
3110		  case $libdir in
3111		    [\\/]*)
3112		      add_dir="$add_dir -L$inst_prefix_dir$libdir"
3113		      ;;
3114		  esac
3115		fi
3116		add="-l$name"
3117	      elif test "$hardcode_shlibpath_var" = yes; then
3118		add_shlibpath="$dir"
3119		add="-l$name"
3120	      else
3121		lib_linked=no
3122	      fi
3123	      ;;
3124	    *) lib_linked=no ;;
3125	    esac
3126
3127	    if test "$lib_linked" != yes; then
3128	      $echo "$modename: configuration error: unsupported hardcode properties"
3129	      exit $EXIT_FAILURE
3130	    fi
3131
3132	    if test -n "$add_shlibpath"; then
3133	      case :$compile_shlibpath: in
3134	      *":$add_shlibpath:"*) ;;
3135	      *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
3136	      esac
3137	    fi
3138	    if test "$linkmode" = prog; then
3139	      test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
3140	      test -n "$add" && compile_deplibs="$add $compile_deplibs"
3141	    else
3142	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
3143	      test -n "$add" && deplibs="$add $deplibs"
3144	      if test "$hardcode_direct" != yes && \
3145		 test "$hardcode_minus_L" != yes && \
3146		 test "$hardcode_shlibpath_var" = yes; then
3147		case :$finalize_shlibpath: in
3148		*":$libdir:"*) ;;
3149		*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
3150		esac
3151	      fi
3152	    fi
3153	  fi
3154
3155	  if test "$linkmode" = prog || test "$mode" = relink; then
3156	    add_shlibpath=
3157	    add_dir=
3158	    add=
3159	    # Finalize command for both is simple: just hardcode it.
3160	    if test "$hardcode_direct" = yes; then
3161	      add="$libdir/$linklib"
3162	    elif test "$hardcode_minus_L" = yes; then
3163	      add_dir="-L$libdir"
3164	      add="-l$name"
3165	    elif test "$hardcode_shlibpath_var" = yes; then
3166	      case :$finalize_shlibpath: in
3167	      *":$libdir:"*) ;;
3168	      *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
3169	      esac
3170	      add="-l$name"
3171	    elif test "$hardcode_automatic" = yes; then
3172	      if test -n "$inst_prefix_dir" &&
3173		 test -f "$inst_prefix_dir$libdir/$linklib" ; then
3174	        add="$inst_prefix_dir$libdir/$linklib"
3175	      else
3176	        add="$libdir/$linklib"
3177	      fi
3178	    else
3179	      # We cannot seem to hardcode it, guess we'll fake it.
3180	      add_dir="-L$libdir"
3181	      # Try looking first in the location we're being installed to.
3182	      if test -n "$inst_prefix_dir"; then
3183		case $libdir in
3184		  [\\/]*)
3185		    add_dir="$add_dir -L$inst_prefix_dir$libdir"
3186		    ;;
3187		esac
3188	      fi
3189	      add="-l$name"
3190	    fi
3191
3192	    if test "$linkmode" = prog; then
3193	      test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
3194	      test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
3195	    else
3196	      test -n "$add_dir" && deplibs="$add_dir $deplibs"
3197	      test -n "$add" && deplibs="$add $deplibs"
3198	    fi
3199	  fi
3200	elif test "$linkmode" = prog; then
3201	  # Here we assume that one of hardcode_direct or hardcode_minus_L
3202	  # is not unsupported.  This is valid on all known static and
3203	  # shared platforms.
3204	  if test "$hardcode_direct" != unsupported; then
3205	    test -n "$old_library" && linklib="$old_library"
3206	    compile_deplibs="$dir/$linklib $compile_deplibs"
3207	    finalize_deplibs="$dir/$linklib $finalize_deplibs"
3208	  else
3209	    compile_deplibs="-l$name -L$dir $compile_deplibs"
3210	    finalize_deplibs="-l$name -L$dir $finalize_deplibs"
3211	  fi
3212	elif test "$build_libtool_libs" = yes; then
3213	  # Not a shared library
3214	  if test "$deplibs_check_method" != pass_all; then
3215	    # We're trying link a shared library against a static one
3216	    # but the system doesn't support it.
3217
3218	    # Just print a warning and add the library to dependency_libs so
3219	    # that the program can be linked against the static library.
3220	    $echo
3221	    $echo "*** Warning: This system can not link to static lib archive $lib."
3222	    $echo "*** I have the capability to make that library automatically link in when"
3223	    $echo "*** you link to this library.  But I can only do this if you have a"
3224	    $echo "*** shared version of the library, which you do not appear to have."
3225	    if test "$module" = yes; then
3226	      $echo "*** But as you try to build a module library, libtool will still create "
3227	      $echo "*** a static module, that should work as long as the dlopening application"
3228	      $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
3229	      if test -z "$global_symbol_pipe"; then
3230		$echo
3231		$echo "*** However, this would only work if libtool was able to extract symbol"
3232		$echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3233		$echo "*** not find such a program.  So, this module is probably useless."
3234		$echo "*** \`nm' from GNU binutils and a full rebuild may help."
3235	      fi
3236	      if test "$build_old_libs" = no; then
3237		build_libtool_libs=module
3238		build_old_libs=yes
3239	      else
3240		build_libtool_libs=no
3241	      fi
3242	    fi
3243	  else
3244	    deplibs="$dir/$old_library $deplibs"
3245	    link_static=yes
3246	  fi
3247	fi # link shared/static library?
3248
3249	if test "$linkmode" = lib; then
3250	  if test -n "$dependency_libs" &&
3251	     { test "$hardcode_into_libs" != yes ||
3252	       test "$build_old_libs" = yes ||
3253	       test "$link_static" = yes; }; then
3254	    # Extract -R from dependency_libs
3255	    temp_deplibs=
3256	    for libdir in $dependency_libs; do
3257	      case $libdir in
3258	      -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
3259		   case " $xrpath " in
3260		   *" $temp_xrpath "*) ;;
3261		   *) xrpath="$xrpath $temp_xrpath";;
3262		   esac;;
3263	      *) temp_deplibs="$temp_deplibs $libdir";;
3264	      esac
3265	    done
3266	    dependency_libs="$temp_deplibs"
3267	  fi
3268
3269	  newlib_search_path="$newlib_search_path $absdir"
3270	  # Link against this library
3271	  test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
3272	  # ... and its dependency_libs
3273	  tmp_libs=
3274	  for deplib in $dependency_libs; do
3275	    newdependency_libs="$deplib $newdependency_libs"
3276	    if test "X$duplicate_deps" = "Xyes" ; then
3277	      case "$tmp_libs " in
3278	      *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
3279	      esac
3280	    fi
3281	    tmp_libs="$tmp_libs $deplib"
3282	  done
3283
3284	  if test "$link_all_deplibs" != no; then
3285	    # Add the search paths of all dependency libraries
3286	    for deplib in $dependency_libs; do
3287	      case $deplib in
3288	      -L*) path="$deplib" ;;
3289	      *.la)
3290		dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
3291		test "X$dir" = "X$deplib" && dir="."
3292		# We need an absolute path.
3293		case $dir in
3294		[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
3295		*)
3296		  absdir=`cd "$dir" && pwd`
3297		  if test -z "$absdir"; then
3298		    $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
3299		    absdir="$dir"
3300		  fi
3301		  ;;
3302		esac
3303		if grep "^installed=no" $deplib > /dev/null; then
3304		  path="$absdir/$objdir"
3305		else
3306		  eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
3307		  if test -z "$libdir"; then
3308		    $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
3309		    exit $EXIT_FAILURE
3310		  fi
3311		  if test "$absdir" != "$libdir"; then
3312		    $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
3313		  fi
3314		  path="$absdir"
3315		fi
3316		depdepl=
3317		case $host in
3318		*-*-darwin*)
3319		  # we do not want to link against static libs,
3320		  # but need to link against shared
3321		  eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
3322		  eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
3323		  if test -n "$deplibrary_names" ; then
3324		    for tmp in $deplibrary_names ; do
3325		      depdepl=$tmp
3326		    done
3327		    if test -f "$deplibdir/$depdepl" ; then
3328		      depdepl="$deplibdir/$depdepl"
3329	      	    elif test -f "$path/$depdepl" ; then
3330		      depdepl="$path/$depdepl"
3331		    else
3332		      # Can't find it, oh well...
3333		      depdepl=
3334		    fi
3335		    # do not add paths which are already there
3336		    case " $newlib_search_path " in
3337		    *" $path "*) ;;
3338		    *) newlib_search_path="$newlib_search_path $path";;
3339		    esac
3340		  fi
3341		  path=""
3342		  ;;
3343		*)
3344		  path="-L$path"
3345		  ;;
3346		esac
3347		;;
3348	      -l*)
3349		case $host in
3350		*-*-darwin*)
3351		  # Again, we only want to link against shared libraries
3352		  eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
3353		  for tmp in $newlib_search_path ; do
3354		    if test -f "$tmp/lib$tmp_libs.dylib" ; then
3355		      eval depdepl="$tmp/lib$tmp_libs.dylib"
3356		      break
3357		    fi
3358		  done
3359		  path=""
3360		  ;;
3361		*) continue ;;
3362		esac
3363		;;
3364	      *) continue ;;
3365	      esac
3366	      case " $deplibs " in
3367	      *" $path "*) ;;
3368	      *) deplibs="$path $deplibs" ;;
3369	      esac
3370	      case " $deplibs " in
3371	      *" $depdepl "*) ;;
3372	      *) deplibs="$depdepl $deplibs" ;;
3373	      esac
3374	    done
3375	  fi # link_all_deplibs != no
3376	fi # linkmode = lib
3377      done # for deplib in $libs
3378      dependency_libs="$newdependency_libs"
3379      if test "$pass" = dlpreopen; then
3380	# Link the dlpreopened libraries before other libraries
3381	for deplib in $save_deplibs; do
3382	  deplibs="$deplib $deplibs"
3383	done
3384      fi
3385      if test "$pass" != dlopen; then
3386	if test "$pass" != conv; then
3387	  # Make sure lib_search_path contains only unique directories.
3388	  lib_search_path=
3389	  for dir in $newlib_search_path; do
3390	    case "$lib_search_path " in
3391	    *" $dir "*) ;;
3392	    *) lib_search_path="$lib_search_path $dir" ;;
3393	    esac
3394	  done
3395	  newlib_search_path=
3396	fi
3397
3398	if test "$linkmode,$pass" != "prog,link"; then
3399	  vars="deplibs"
3400	else
3401	  vars="compile_deplibs finalize_deplibs"
3402	fi
3403	for var in $vars dependency_libs; do
3404	  # Add libraries to $var in reverse order
3405	  eval tmp_libs=\"\$$var\"
3406	  new_libs=
3407	  for deplib in $tmp_libs; do
3408	    # FIXME: Pedantically, this is the right thing to do, so
3409	    #        that some nasty dependency loop isn't accidentally
3410	    #        broken:
3411	    #new_libs="$deplib $new_libs"
3412	    # Pragmatically, this seems to cause very few problems in
3413	    # practice:
3414	    case $deplib in
3415	    -L*) new_libs="$deplib $new_libs" ;;
3416	    -R*) ;;
3417	    *)
3418	      # And here is the reason: when a library appears more
3419	      # than once as an explicit dependence of a library, or
3420	      # is implicitly linked in more than once by the
3421	      # compiler, it is considered special, and multiple
3422	      # occurrences thereof are not removed.  Compare this
3423	      # with having the same library being listed as a
3424	      # dependency of multiple other libraries: in this case,
3425	      # we know (pedantically, we assume) the library does not
3426	      # need to be listed more than once, so we keep only the
3427	      # last copy.  This is not always right, but it is rare
3428	      # enough that we require users that really mean to play
3429	      # such unportable linking tricks to link the library
3430	      # using -Wl,-lname, so that libtool does not consider it
3431	      # for duplicate removal.
3432	      case " $specialdeplibs " in
3433	      *" $deplib "*) new_libs="$deplib $new_libs" ;;
3434	      *)
3435		case " $new_libs " in
3436		*" $deplib "*) ;;
3437		*) new_libs="$deplib $new_libs" ;;
3438		esac
3439		;;
3440	      esac
3441	      ;;
3442	    esac
3443	  done
3444	  tmp_libs=
3445	  for deplib in $new_libs; do
3446	    case $deplib in
3447	    -L*)
3448	      case " $tmp_libs " in
3449	      *" $deplib "*) ;;
3450	      *) tmp_libs="$tmp_libs $deplib" ;;
3451	      esac
3452	      ;;
3453	    *) tmp_libs="$tmp_libs $deplib" ;;
3454	    esac
3455	  done
3456	  eval $var=\"$tmp_libs\"
3457	done # for var
3458      fi
3459      # Last step: remove runtime libs from dependency_libs
3460      # (they stay in deplibs)
3461      tmp_libs=
3462      for i in $dependency_libs ; do
3463	case " $predeps $postdeps $compiler_lib_search_path " in
3464	*" $i "*)
3465	  i=""
3466	  ;;
3467	esac
3468	if test -n "$i" ; then
3469	  tmp_libs="$tmp_libs $i"
3470	fi
3471      done
3472      dependency_libs=$tmp_libs
3473    done # for pass
3474    if test "$linkmode" = prog; then
3475      dlfiles="$newdlfiles"
3476      dlprefiles="$newdlprefiles"
3477    fi
3478
3479    case $linkmode in
3480    oldlib)
3481      case " $deplibs" in
3482      *\ -l* | *\ -L*)
3483	$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;;
3484      esac
3485
3486      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3487	$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3488      fi
3489
3490      if test -n "$rpath"; then
3491	$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3492      fi
3493
3494      if test -n "$xrpath"; then
3495	$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
3496      fi
3497
3498      if test -n "$vinfo"; then
3499	$echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
3500      fi
3501
3502      if test -n "$release"; then
3503	$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
3504      fi
3505
3506      if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
3507	$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
3508      fi
3509
3510      # Now set the variables for building old libraries.
3511      build_libtool_libs=no
3512      oldlibs="$output"
3513      objs="$objs$old_deplibs"
3514      ;;
3515
3516    lib)
3517      # Make sure we only generate libraries of the form `libNAME.la'.
3518      case $outputname in
3519      lib*)
3520	name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3521	eval shared_ext=\"$shrext_cmds\"
3522	eval libname=\"$libname_spec\"
3523	;;
3524      *)
3525	if test "$module" = no; then
3526	  $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3527	  $echo "$help" 1>&2
3528	  exit $EXIT_FAILURE
3529	fi
3530	if test "$need_lib_prefix" != no; then
3531	  # Add the "lib" prefix for modules if required
3532	  name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3533	  eval shared_ext=\"$shrext_cmds\"
3534	  eval libname=\"$libname_spec\"
3535	else
3536	  libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3537	fi
3538	;;
3539      esac
3540
3541      if test -n "$objs"; then
3542	if test "$deplibs_check_method" != pass_all; then
3543	  $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
3544	  exit $EXIT_FAILURE
3545	else
3546	  $echo
3547	  $echo "*** Warning: Linking the shared library $output against the non-libtool"
3548	  $echo "*** objects $objs is not portable!"
3549	  libobjs="$libobjs $objs"
3550	fi
3551      fi
3552
3553      if test "$dlself" != no; then
3554	$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
3555      fi
3556
3557      set dummy $rpath
3558      if test "$#" -gt 2; then
3559	$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
3560      fi
3561      install_libdir="$2"
3562
3563      oldlibs=
3564      if test -z "$rpath"; then
3565	if test "$build_libtool_libs" = yes; then
3566	  # Building a libtool convenience library.
3567	  # Some compilers have problems with a `.al' extension so
3568	  # convenience libraries should have the same extension an
3569	  # archive normally would.
3570	  oldlibs="$output_objdir/$libname.$libext $oldlibs"
3571	  build_libtool_libs=convenience
3572	  build_old_libs=yes
3573	fi
3574
3575	if test -n "$vinfo"; then
3576	  $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
3577	fi
3578
3579	if test -n "$release"; then
3580	  $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
3581	fi
3582      else
3583
3584	# Parse the version information argument.
3585	save_ifs="$IFS"; IFS=':'
3586	set dummy $vinfo 0 0 0
3587	IFS="$save_ifs"
3588
3589	if test -n "$8"; then
3590	  $echo "$modename: too many parameters to \`-version-info'" 1>&2
3591	  $echo "$help" 1>&2
3592	  exit $EXIT_FAILURE
3593	fi
3594
3595	# convert absolute version numbers to libtool ages
3596	# this retains compatibility with .la files and attempts
3597	# to make the code below a bit more comprehensible
3598
3599	case $vinfo_number in
3600	yes)
3601	  number_major="$2"
3602	  number_minor="$3"
3603	  number_revision="$4"
3604	  #
3605	  # There are really only two kinds -- those that
3606	  # use the current revision as the major version
3607	  # and those that subtract age and use age as
3608	  # a minor version.  But, then there is irix
3609	  # which has an extra 1 added just for fun
3610	  #
3611	  case $version_type in
3612	  darwin|linux|osf|windows|none)
3613	    current=`expr $number_major + $number_minor`
3614	    age="$number_minor"
3615	    revision="$number_revision"
3616	    ;;
3617	  freebsd-aout|freebsd-elf|sunos)
3618	    current="$number_major"
3619	    revision="$number_minor"
3620	    age="0"
3621	    ;;
3622	  irix|nonstopux)
3623	    current=`expr $number_major + $number_minor`
3624	    age="$number_minor"
3625	    revision="$number_minor"
3626	    lt_irix_increment=no
3627	    ;;
3628	  esac
3629	  ;;
3630	no)
3631	  current="$2"
3632	  revision="$3"
3633	  age="$4"
3634	  ;;
3635	esac
3636
3637	# Check that each of the things are valid numbers.
3638	case $current in
3639	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]) ;;
3640	*)
3641	  $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
3642	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3643	  exit $EXIT_FAILURE
3644	  ;;
3645	esac
3646
3647	case $revision in
3648	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]) ;;
3649	*)
3650	  $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
3651	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3652	  exit $EXIT_FAILURE
3653	  ;;
3654	esac
3655
3656	case $age in
3657	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]) ;;
3658	*)
3659	  $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
3660	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3661	  exit $EXIT_FAILURE
3662	  ;;
3663	esac
3664
3665	if test "$age" -gt "$current"; then
3666	  $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3667	  $echo "$modename: \`$vinfo' is not valid version information" 1>&2
3668	  exit $EXIT_FAILURE
3669	fi
3670
3671	# Calculate the version variables.
3672	major=
3673	versuffix=
3674	verstring=
3675	case $version_type in
3676	none) ;;
3677
3678	darwin)
3679	  # Like Linux, but with the current version available in
3680	  # verstring for coding it into the library header
3681	  major=.`expr $current - $age`
3682	  versuffix="$major.$age.$revision"
3683	  # Darwin ld doesn't like 0 for these options...
3684	  minor_current=`expr $current + 1`
3685	  xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
3686	  verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
3687	  ;;
3688
3689	freebsd-aout)
3690	  major=".$current"
3691	  versuffix=".$current.$revision";
3692	  ;;
3693
3694	freebsd-elf)
3695	  major=".$current"
3696	  versuffix=".$current";
3697	  ;;
3698
3699	irix | nonstopux)
3700	  if test "X$lt_irix_increment" = "Xno"; then
3701	    major=`expr $current - $age`
3702	  else
3703	    major=`expr $current - $age + 1`
3704	  fi
3705	  case $version_type in
3706	    nonstopux) verstring_prefix=nonstopux ;;
3707	    *)         verstring_prefix=sgi ;;
3708	  esac
3709	  verstring="$verstring_prefix$major.$revision"
3710
3711	  # Add in all the interfaces that we are compatible with.
3712	  loop=$revision
3713	  while test "$loop" -ne 0; do
3714	    iface=`expr $revision - $loop`
3715	    loop=`expr $loop - 1`
3716	    verstring="$verstring_prefix$major.$iface:$verstring"
3717	  done
3718
3719	  # Before this point, $major must not contain `.'.
3720	  major=.$major
3721	  versuffix="$major.$revision"
3722	  ;;
3723
3724	linux)
3725	  major=.`expr $current - $age`
3726	  versuffix="$major.$age.$revision"
3727	  ;;
3728
3729	osf)
3730	  major=.`expr $current - $age`
3731	  versuffix=".$current.$age.$revision"
3732	  verstring="$current.$age.$revision"
3733
3734	  # Add in all the interfaces that we are compatible with.
3735	  loop=$age
3736	  while test "$loop" -ne 0; do
3737	    iface=`expr $current - $loop`
3738	    loop=`expr $loop - 1`
3739	    verstring="$verstring:${iface}.0"
3740	  done
3741
3742	  # Make executables depend on our current version.
3743	  verstring="$verstring:${current}.0"
3744	  ;;
3745
3746	sunos)
3747	  major=".$current"
3748	  versuffix=".$current.$revision"
3749	  ;;
3750
3751	windows)
3752	  # Use '-' rather than '.', since we only want one
3753	  # extension on DOS 8.3 filesystems.
3754	  major=`expr $current - $age`
3755	  versuffix="-$major"
3756	  ;;
3757
3758	*)
3759	  $echo "$modename: unknown library version type \`$version_type'" 1>&2
3760	  $echo "Fatal configuration error.  See the $PACKAGE docs for more information." 1>&2
3761	  exit $EXIT_FAILURE
3762	  ;;
3763	esac
3764
3765	# Clear the version info if we defaulted, and they specified a release.
3766	if test -z "$vinfo" && test -n "$release"; then
3767	  major=
3768	  case $version_type in
3769	  darwin)
3770	    # we can't check for "0.0" in archive_cmds due to quoting
3771	    # problems, so we reset it completely
3772	    verstring=
3773	    ;;
3774	  *)
3775	    verstring="0.0"
3776	    ;;
3777	  esac
3778	  if test "$need_version" = no; then
3779	    versuffix=
3780	  else
3781	    versuffix=".0.0"
3782	  fi
3783	fi
3784
3785	# Remove version info from name if versioning should be avoided
3786	if test "$avoid_version" = yes && test "$need_version" = no; then
3787	  major=
3788	  versuffix=
3789	  verstring=""
3790	fi
3791
3792	# Check to see if the archive will have undefined symbols.
3793	if test "$allow_undefined" = yes; then
3794	  if test "$allow_undefined_flag" = unsupported; then
3795	    $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
3796	    build_libtool_libs=no
3797	    build_old_libs=yes
3798	  fi
3799	else
3800	  # Don't allow undefined symbols.
3801	  allow_undefined_flag="$no_undefined_flag"
3802	fi
3803      fi
3804
3805      if test "$mode" != relink; then
3806	# Remove our outputs, but don't remove object files since they
3807	# may have been created when compiling PIC objects.
3808	removelist=
3809	tempremovelist=`$echo "$output_objdir/*"`
3810	for p in $tempremovelist; do
3811	  case $p in
3812	    *.$objext)
3813	       ;;
3814	    $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
3815	       if test "X$precious_files_regex" != "X"; then
3816	         if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
3817	         then
3818		   continue
3819		 fi
3820	       fi
3821	       removelist="$removelist $p"
3822	       ;;
3823	    *) ;;
3824	  esac
3825	done
3826	if test -n "$removelist"; then
3827	  $show "${rm}r $removelist"
3828	  $run ${rm}r $removelist
3829	fi
3830      fi
3831
3832      # Now set the variables for building old libraries.
3833      if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
3834	oldlibs="$oldlibs $output_objdir/$libname.$libext"
3835
3836	# Transform .lo files to .o files.
3837	oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
3838      fi
3839
3840      # Eliminate all temporary directories.
3841      #for path in $notinst_path; do
3842      #	lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
3843      #	deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
3844      #	dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
3845      #done
3846
3847      if test -n "$xrpath"; then
3848	# If the user specified any rpath flags, then add them.
3849	temp_xrpath=
3850	for libdir in $xrpath; do
3851	  temp_xrpath="$temp_xrpath -R$libdir"
3852	  case "$finalize_rpath " in
3853	  *" $libdir "*) ;;
3854	  *) finalize_rpath="$finalize_rpath $libdir" ;;
3855	  esac
3856	done
3857	if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
3858	  dependency_libs="$temp_xrpath $dependency_libs"
3859	fi
3860      fi
3861
3862      # Make sure dlfiles contains only unique files that won't be dlpreopened
3863      old_dlfiles="$dlfiles"
3864      dlfiles=
3865      for lib in $old_dlfiles; do
3866	case " $dlprefiles $dlfiles " in
3867	*" $lib "*) ;;
3868	*) dlfiles="$dlfiles $lib" ;;
3869	esac
3870      done
3871
3872      # Make sure dlprefiles contains only unique files
3873      old_dlprefiles="$dlprefiles"
3874      dlprefiles=
3875      for lib in $old_dlprefiles; do
3876	case "$dlprefiles " in
3877	*" $lib "*) ;;
3878	*) dlprefiles="$dlprefiles $lib" ;;
3879	esac
3880      done
3881
3882      if test "$build_libtool_libs" = yes; then
3883	if test -n "$rpath"; then
3884	  case $host in
3885	  *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
3886	    # these systems don't actually have a c library (as such)!
3887	    ;;
3888	  *-*-rhapsody* | *-*-darwin1.[012])
3889	    # Rhapsody C library is in the System framework
3890	    deplibs="$deplibs -framework System"
3891	    ;;
3892	  *-*-netbsd*)
3893	    # Don't link with libc until the a.out ld.so is fixed.
3894	    ;;
3895	  *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
3896	    # Do not include libc due to us having libc/libc_r.
3897	    ;;
3898	  *-*-sco3.2v5* | *-*-sco5v6*)
3899	    # Causes problems with __ctype
3900	    ;;
3901	  *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
3902	    # Compiler inserts libc in the correct place for threads to work
3903	    ;;
3904 	  *)
3905	    # Add libc to deplibs on all other systems if necessary.
3906	    if test "$build_libtool_need_lc" = "yes"; then
3907	      deplibs="$deplibs -lc"
3908	    fi
3909	    ;;
3910	  esac
3911	fi
3912
3913	# Transform deplibs into only deplibs that can be linked in shared.
3914	name_save=$name
3915	libname_save=$libname
3916	release_save=$release
3917	versuffix_save=$versuffix
3918	major_save=$major
3919	# I'm not sure if I'm treating the release correctly.  I think
3920	# release should show up in the -l (ie -lgmp5) so we don't want to
3921	# add it in twice.  Is that correct?
3922	release=""
3923	versuffix=""
3924	major=""
3925	newdeplibs=
3926	droppeddeps=no
3927	case $deplibs_check_method in
3928	pass_all)
3929	  # Don't check for shared/static.  Everything works.
3930	  # This might be a little naive.  We might want to check
3931	  # whether the library exists or not.  But this is on
3932	  # osf3 & osf4 and I'm not really sure... Just
3933	  # implementing what was already the behavior.
3934	  newdeplibs=$deplibs
3935	  ;;
3936	test_compile)
3937	  # This code stresses the "libraries are programs" paradigm to its
3938	  # limits. Maybe even breaks it.  We compile a program, linking it
3939	  # against the deplibs as a proxy for the library.  Then we can check
3940	  # whether they linked in statically or dynamically with ldd.
3941	  $rm conftest.c
3942	  cat > conftest.c <<EOF
3943	  int main() { return 0; }
3944EOF
3945	  $rm conftest
3946	  if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
3947	    ldd_output=`ldd conftest`
3948	    for i in $deplibs; do
3949	      name=`expr $i : '-l\(.*\)'`
3950	      # If $name is empty we are operating on a -L argument.
3951              if test "$name" != "" && test "$name" != "0"; then
3952		if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3953		  case " $predeps $postdeps " in
3954		  *" $i "*)
3955		    newdeplibs="$newdeplibs $i"
3956		    i=""
3957		    ;;
3958		  esac
3959	        fi
3960		if test -n "$i" ; then
3961		  libname=`eval \\$echo \"$libname_spec\"`
3962		  deplib_matches=`eval \\$echo \"$library_names_spec\"`
3963		  set dummy $deplib_matches
3964		  deplib_match=$2
3965		  if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3966		    newdeplibs="$newdeplibs $i"
3967		  else
3968		    droppeddeps=yes
3969		    $echo
3970		    $echo "*** Warning: dynamic linker does not accept needed library $i."
3971		    $echo "*** I have the capability to make that library automatically link in when"
3972		    $echo "*** you link to this library.  But I can only do this if you have a"
3973		    $echo "*** shared version of the library, which I believe you do not have"
3974		    $echo "*** because a test_compile did reveal that the linker did not use it for"
3975		    $echo "*** its dynamic dependency list that programs get resolved with at runtime."
3976		  fi
3977		fi
3978	      else
3979		newdeplibs="$newdeplibs $i"
3980	      fi
3981	    done
3982	  else
3983	    # Error occurred in the first compile.  Let's try to salvage
3984	    # the situation: Compile a separate program for each library.
3985	    for i in $deplibs; do
3986	      name=`expr $i : '-l\(.*\)'`
3987	      # If $name is empty we are operating on a -L argument.
3988              if test "$name" != "" && test "$name" != "0"; then
3989		$rm conftest
3990		if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
3991		  ldd_output=`ldd conftest`
3992		  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3993		    case " $predeps $postdeps " in
3994		    *" $i "*)
3995		      newdeplibs="$newdeplibs $i"
3996		      i=""
3997		      ;;
3998		    esac
3999		  fi
4000		  if test -n "$i" ; then
4001		    libname=`eval \\$echo \"$libname_spec\"`
4002		    deplib_matches=`eval \\$echo \"$library_names_spec\"`
4003		    set dummy $deplib_matches
4004		    deplib_match=$2
4005		    if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
4006		      newdeplibs="$newdeplibs $i"
4007		    else
4008		      droppeddeps=yes
4009		      $echo
4010		      $echo "*** Warning: dynamic linker does not accept needed library $i."
4011		      $echo "*** I have the capability to make that library automatically link in when"
4012		      $echo "*** you link to this library.  But I can only do this if you have a"
4013		      $echo "*** shared version of the library, which you do not appear to have"
4014		      $echo "*** because a test_compile did reveal that the linker did not use this one"
4015		      $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
4016		    fi
4017		  fi
4018		else
4019		  droppeddeps=yes
4020		  $echo
4021		  $echo "*** Warning!  Library $i is needed by this library but I was not able to"
4022		  $echo "*** make it link in!  You will probably need to install it or some"
4023		  $echo "*** library that it depends on before this library will be fully"
4024		  $echo "*** functional.  Installing it before continuing would be even better."
4025		fi
4026	      else
4027		newdeplibs="$newdeplibs $i"
4028	      fi
4029	    done
4030	  fi
4031	  ;;
4032	file_magic*)
4033	  set dummy $deplibs_check_method
4034	  file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
4035	  for a_deplib in $deplibs; do
4036	    name=`expr $a_deplib : '-l\(.*\)'`
4037	    # If $name is empty we are operating on a -L argument.
4038            if test "$name" != "" && test  "$name" != "0"; then
4039	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
4040		case " $predeps $postdeps " in
4041		*" $a_deplib "*)
4042		  newdeplibs="$newdeplibs $a_deplib"
4043		  a_deplib=""
4044		  ;;
4045		esac
4046	      fi
4047	      if test -n "$a_deplib" ; then
4048		libname=`eval \\$echo \"$libname_spec\"`
4049		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
4050		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
4051		  for potent_lib in $potential_libs; do
4052		      # Follow soft links.
4053		      if ls -lLd "$potent_lib" 2>/dev/null \
4054			 | grep " -> " >/dev/null; then
4055			continue
4056		      fi
4057		      # The statement above tries to avoid entering an
4058		      # endless loop below, in case of cyclic links.
4059		      # We might still enter an endless loop, since a link
4060		      # loop can be closed while we follow links,
4061		      # but so what?
4062		      potlib="$potent_lib"
4063		      while test -h "$potlib" 2>/dev/null; do
4064			potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
4065			case $potliblink in
4066			[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
4067			*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
4068			esac
4069		      done
4070		      if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
4071			 | ${SED} 10q \
4072			 | $EGREP "$file_magic_regex" > /dev/null; then
4073			newdeplibs="$newdeplibs $a_deplib"
4074			a_deplib=""
4075			break 2
4076		      fi
4077		  done
4078		done
4079	      fi
4080	      if test -n "$a_deplib" ; then
4081		droppeddeps=yes
4082		$echo
4083		$echo "*** Warning: linker path does not have real file for library $a_deplib."
4084		$echo "*** I have the capability to make that library automatically link in when"
4085		$echo "*** you link to this library.  But I can only do this if you have a"
4086		$echo "*** shared version of the library, which you do not appear to have"
4087		$echo "*** because I did check the linker path looking for a file starting"
4088		if test -z "$potlib" ; then
4089		  $echo "*** with $libname but no candidates were found. (...for file magic test)"
4090		else
4091		  $echo "*** with $libname and none of the candidates passed a file format test"
4092		  $echo "*** using a file magic. Last file checked: $potlib"
4093		fi
4094	      fi
4095	    else
4096	      # Add a -L argument.
4097	      newdeplibs="$newdeplibs $a_deplib"
4098	    fi
4099	  done # Gone through all deplibs.
4100	  ;;
4101	match_pattern*)
4102	  set dummy $deplibs_check_method
4103	  match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
4104	  for a_deplib in $deplibs; do
4105	    name=`expr $a_deplib : '-l\(.*\)'`
4106	    # If $name is empty we are operating on a -L argument.
4107	    if test -n "$name" && test "$name" != "0"; then
4108	      if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
4109		case " $predeps $postdeps " in
4110		*" $a_deplib "*)
4111		  newdeplibs="$newdeplibs $a_deplib"
4112		  a_deplib=""
4113		  ;;
4114		esac
4115	      fi
4116	      if test -n "$a_deplib" ; then
4117		libname=`eval \\$echo \"$libname_spec\"`
4118		for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
4119		  potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
4120		  for potent_lib in $potential_libs; do
4121		    potlib="$potent_lib" # see symlink-check above in file_magic test
4122		    if eval $echo \"$potent_lib\" 2>/dev/null \
4123		        | ${SED} 10q \
4124		        | $EGREP "$match_pattern_regex" > /dev/null; then
4125		      newdeplibs="$newdeplibs $a_deplib"
4126		      a_deplib=""
4127		      break 2
4128		    fi
4129		  done
4130		done
4131	      fi
4132	      if test -n "$a_deplib" ; then
4133		droppeddeps=yes
4134		$echo
4135		$echo "*** Warning: linker path does not have real file for library $a_deplib."
4136		$echo "*** I have the capability to make that library automatically link in when"
4137		$echo "*** you link to this library.  But I can only do this if you have a"
4138		$echo "*** shared version of the library, which you do not appear to have"
4139		$echo "*** because I did check the linker path looking for a file starting"
4140		if test -z "$potlib" ; then
4141		  $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
4142		else
4143		  $echo "*** with $libname and none of the candidates passed a file format test"
4144		  $echo "*** using a regex pattern. Last file checked: $potlib"
4145		fi
4146	      fi
4147	    else
4148	      # Add a -L argument.
4149	      newdeplibs="$newdeplibs $a_deplib"
4150	    fi
4151	  done # Gone through all deplibs.
4152	  ;;
4153	none | unknown | *)
4154	  newdeplibs=""
4155	  tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
4156	    -e 's/ -[LR][^ ]*//g'`
4157	  if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
4158	    for i in $predeps $postdeps ; do
4159	      # can't use Xsed below, because $i might contain '/'
4160	      tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
4161	    done
4162	  fi
4163	  if $echo "X $tmp_deplibs" | $Xsed -e 's/[ 	]//g' \
4164	    | grep . >/dev/null; then
4165	    $echo
4166	    if test "X$deplibs_check_method" = "Xnone"; then
4167	      $echo "*** Warning: inter-library dependencies are not supported in this platform."
4168	    else
4169	      $echo "*** Warning: inter-library dependencies are not known to be supported."
4170	    fi
4171	    $echo "*** All declared inter-library dependencies are being dropped."
4172	    droppeddeps=yes
4173	  fi
4174	  ;;
4175	esac
4176	versuffix=$versuffix_save
4177	major=$major_save
4178	release=$release_save
4179	libname=$libname_save
4180	name=$name_save
4181
4182	case $host in
4183	*-*-rhapsody* | *-*-darwin1.[012])
4184	  # On Rhapsody replace the C library is the System framework
4185	  newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
4186	  ;;
4187	esac
4188
4189	if test "$droppeddeps" = yes; then
4190	  if test "$module" = yes; then
4191	    $echo
4192	    $echo "*** Warning: libtool could not satisfy all declared inter-library"
4193	    $echo "*** dependencies of module $libname.  Therefore, libtool will create"
4194	    $echo "*** a static module, that should work as long as the dlopening"
4195	    $echo "*** application is linked with the -dlopen flag."
4196	    if test -z "$global_symbol_pipe"; then
4197	      $echo
4198	      $echo "*** However, this would only work if libtool was able to extract symbol"
4199	      $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
4200	      $echo "*** not find such a program.  So, this module is probably useless."
4201	      $echo "*** \`nm' from GNU binutils and a full rebuild may help."
4202	    fi
4203	    if test "$build_old_libs" = no; then
4204	      oldlibs="$output_objdir/$libname.$libext"
4205	      build_libtool_libs=module
4206	      build_old_libs=yes
4207	    else
4208	      build_libtool_libs=no
4209	    fi
4210	  else
4211	    $echo "*** The inter-library dependencies that have been dropped here will be"
4212	    $echo "*** automatically added whenever a program is linked with this library"
4213	    $echo "*** or is declared to -dlopen it."
4214
4215	    if test "$allow_undefined" = no; then
4216	      $echo
4217	      $echo "*** Since this library must not contain undefined symbols,"
4218	      $echo "*** because either the platform does not support them or"
4219	      $echo "*** it was explicitly requested with -no-undefined,"
4220	      $echo "*** libtool will only create a static version of it."
4221	      if test "$build_old_libs" = no; then
4222		oldlibs="$output_objdir/$libname.$libext"
4223		build_libtool_libs=module
4224		build_old_libs=yes
4225	      else
4226		build_libtool_libs=no
4227	      fi
4228	    fi
4229	  fi
4230	fi
4231	# Done checking deplibs!
4232	deplibs=$newdeplibs
4233      fi
4234
4235
4236      # move library search paths that coincide with paths to not yet
4237      # installed libraries to the beginning of the library search list
4238      new_libs=
4239      for path in $notinst_path; do
4240	case " $new_libs " in
4241	*" -L$path/$objdir "*) ;;
4242	*)
4243	  case " $deplibs " in
4244	  *" -L$path/$objdir "*)
4245	    new_libs="$new_libs -L$path/$objdir" ;;
4246	  esac
4247	  ;;
4248	esac
4249      done
4250      for deplib in $deplibs; do
4251	case $deplib in
4252	-L*)
4253	  case " $new_libs " in
4254	  *" $deplib "*) ;;
4255	  *) new_libs="$new_libs $deplib" ;;
4256	  esac
4257	  ;;
4258	*) new_libs="$new_libs $deplib" ;;
4259	esac
4260      done
4261      deplibs="$new_libs"
4262
4263
4264      # All the library-specific variables (install_libdir is set above).
4265      library_names=
4266      old_library=
4267      dlname=
4268
4269      # Test again, we may have decided not to build it any more
4270      if test "$build_libtool_libs" = yes; then
4271	if test "$hardcode_into_libs" = yes; then
4272	  # Hardcode the library paths
4273	  hardcode_libdirs=
4274	  dep_rpath=
4275	  rpath="$finalize_rpath"
4276	  test "$mode" != relink && rpath="$compile_rpath$rpath"
4277	  for libdir in $rpath; do
4278	    if test -n "$hardcode_libdir_flag_spec"; then
4279	      if test -n "$hardcode_libdir_separator"; then
4280		if test -z "$hardcode_libdirs"; then
4281		  hardcode_libdirs="$libdir"
4282		else
4283		  # Just accumulate the unique libdirs.
4284		  case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4285		  *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4286		    ;;
4287		  *)
4288		    hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4289		    ;;
4290		  esac
4291		fi
4292	      else
4293		eval flag=\"$hardcode_libdir_flag_spec\"
4294		dep_rpath="$dep_rpath $flag"
4295	      fi
4296	    elif test -n "$runpath_var"; then
4297	      case "$perm_rpath " in
4298	      *" $libdir "*) ;;
4299	      *) perm_rpath="$perm_rpath $libdir" ;;
4300	      esac
4301	    fi
4302	  done
4303	  # Substitute the hardcoded libdirs into the rpath.
4304	  if test -n "$hardcode_libdir_separator" &&
4305	     test -n "$hardcode_libdirs"; then
4306	    libdir="$hardcode_libdirs"
4307	    if test -n "$hardcode_libdir_flag_spec_ld"; then
4308	      case $archive_cmds in
4309	      *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
4310	      *)      eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
4311	      esac
4312	    else
4313	      eval dep_rpath=\"$hardcode_libdir_flag_spec\"
4314	    fi
4315	  fi
4316	  if test -n "$runpath_var" && test -n "$perm_rpath"; then
4317	    # We should set the runpath_var.
4318	    rpath=
4319	    for dir in $perm_rpath; do
4320	      rpath="$rpath$dir:"
4321	    done
4322	    eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
4323	  fi
4324	  test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
4325	fi
4326
4327	shlibpath="$finalize_shlibpath"
4328	test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
4329	if test -n "$shlibpath"; then
4330	  eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
4331	fi
4332
4333	# Get the real and link names of the library.
4334	eval shared_ext=\"$shrext_cmds\"
4335	eval library_names=\"$library_names_spec\"
4336	set dummy $library_names
4337	realname="$2"
4338	shift; shift
4339
4340	if test -n "$soname_spec"; then
4341	  eval soname=\"$soname_spec\"
4342	else
4343	  soname="$realname"
4344	fi
4345	if test -z "$dlname"; then
4346	  dlname=$soname
4347	fi
4348
4349	lib="$output_objdir/$realname"
4350	linknames=
4351	for link
4352	do
4353	  linknames="$linknames $link"
4354	done
4355
4356	# Use standard objects if they are pic
4357	test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4358
4359	# Prepare the list of exported symbols
4360	if test -z "$export_symbols"; then
4361	  if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
4362	    $show "generating symbol list for \`$libname.la'"
4363	    export_symbols="$output_objdir/$libname.exp"
4364	    $run $rm $export_symbols
4365	    cmds=$export_symbols_cmds
4366	    save_ifs="$IFS"; IFS='~'
4367	    for cmd in $cmds; do
4368	      IFS="$save_ifs"
4369	      eval cmd=\"$cmd\"
4370	      if len=`expr "X$cmd" : ".*"` &&
4371	       test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
4372	        $show "$cmd"
4373	        $run eval "$cmd" || exit $?
4374	        skipped_export=false
4375	      else
4376	        # The command line is too long to execute in one step.
4377	        $show "using reloadable object file for export list..."
4378	        skipped_export=:
4379		# Break out early, otherwise skipped_export may be
4380		# set to false by a later but shorter cmd.
4381		break
4382	      fi
4383	    done
4384	    IFS="$save_ifs"
4385	    if test -n "$export_symbols_regex"; then
4386	      $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
4387	      $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
4388	      $show "$mv \"${export_symbols}T\" \"$export_symbols\""
4389	      $run eval '$mv "${export_symbols}T" "$export_symbols"'
4390	    fi
4391	  fi
4392	fi
4393
4394	if test -n "$export_symbols" && test -n "$include_expsyms"; then
4395	  $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
4396	fi
4397
4398	tmp_deplibs=
4399	for test_deplib in $deplibs; do
4400		case " $convenience " in
4401		*" $test_deplib "*) ;;
4402		*)
4403			tmp_deplibs="$tmp_deplibs $test_deplib"
4404			;;
4405		esac
4406	done
4407	deplibs="$tmp_deplibs"
4408
4409	if test -n "$convenience"; then
4410	  if test -n "$whole_archive_flag_spec"; then
4411	    save_libobjs=$libobjs
4412	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4413	  else
4414	    gentop="$output_objdir/${outputname}x"
4415	    generated="$generated $gentop"
4416
4417	    func_extract_archives $gentop $convenience
4418	    libobjs="$libobjs $func_extract_archives_result"
4419	  fi
4420	fi
4421
4422	if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4423	  eval flag=\"$thread_safe_flag_spec\"
4424	  linker_flags="$linker_flags $flag"
4425	fi
4426
4427	# Make a backup of the uninstalled library when relinking
4428	if test "$mode" = relink; then
4429	  $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
4430	fi
4431
4432	# Do each of the archive commands.
4433	if test "$module" = yes && test -n "$module_cmds" ; then
4434	  if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4435	    eval test_cmds=\"$module_expsym_cmds\"
4436	    cmds=$module_expsym_cmds
4437	  else
4438	    eval test_cmds=\"$module_cmds\"
4439	    cmds=$module_cmds
4440	  fi
4441	else
4442	if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4443	  eval test_cmds=\"$archive_expsym_cmds\"
4444	  cmds=$archive_expsym_cmds
4445	else
4446	  eval test_cmds=\"$archive_cmds\"
4447	  cmds=$archive_cmds
4448	  fi
4449	fi
4450
4451	if test "X$skipped_export" != "X:" &&
4452	   len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4453	   test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
4454	  :
4455	else
4456	  # The command line is too long to link in one step, link piecewise.
4457	  $echo "creating reloadable object files..."
4458
4459	  # Save the value of $output and $libobjs because we want to
4460	  # use them later.  If we have whole_archive_flag_spec, we
4461	  # want to use save_libobjs as it was before
4462	  # whole_archive_flag_spec was expanded, because we can't
4463	  # assume the linker understands whole_archive_flag_spec.
4464	  # This may have to be revisited, in case too many
4465	  # convenience libraries get linked in and end up exceeding
4466	  # the spec.
4467	  if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
4468	    save_libobjs=$libobjs
4469	  fi
4470	  save_output=$output
4471	  output_la=`$echo "X$output" | $Xsed -e "$basename"`
4472
4473	  # Clear the reloadable object creation command queue and
4474	  # initialize k to one.
4475	  test_cmds=
4476	  concat_cmds=
4477	  objlist=
4478	  delfiles=
4479	  last_robj=
4480	  k=1
4481	  output=$output_objdir/$output_la-${k}.$objext
4482	  # Loop over the list of objects to be linked.
4483	  for obj in $save_libobjs
4484	  do
4485	    eval test_cmds=\"$reload_cmds $objlist $last_robj\"
4486	    if test "X$objlist" = X ||
4487	       { len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4488		 test "$len" -le "$max_cmd_len"; }; then
4489	      objlist="$objlist $obj"
4490	    else
4491	      # The command $test_cmds is almost too long, add a
4492	      # command to the queue.
4493	      if test "$k" -eq 1 ; then
4494		# The first file doesn't have a previous command to add.
4495		eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
4496	      else
4497		# All subsequent reloadable object files will link in
4498		# the last one created.
4499		eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
4500	      fi
4501	      last_robj=$output_objdir/$output_la-${k}.$objext
4502	      k=`expr $k + 1`
4503	      output=$output_objdir/$output_la-${k}.$objext
4504	      objlist=$obj
4505	      len=1
4506	    fi
4507	  done
4508	  # Handle the remaining objects by creating one last
4509	  # reloadable object file.  All subsequent reloadable object
4510	  # files will link in the last one created.
4511	  test -z "$concat_cmds" || concat_cmds=$concat_cmds~
4512	  eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
4513
4514	  if ${skipped_export-false}; then
4515	    $show "generating symbol list for \`$libname.la'"
4516	    export_symbols="$output_objdir/$libname.exp"
4517	    $run $rm $export_symbols
4518	    libobjs=$output
4519	    # Append the command to create the export file.
4520	    eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
4521          fi
4522
4523	  # Set up a command to remove the reloadable object files
4524	  # after they are used.
4525	  i=0
4526	  while test "$i" -lt "$k"
4527	  do
4528	    i=`expr $i + 1`
4529	    delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
4530	  done
4531
4532	  $echo "creating a temporary reloadable object file: $output"
4533
4534	  # Loop through the commands generated above and execute them.
4535	  save_ifs="$IFS"; IFS='~'
4536	  for cmd in $concat_cmds; do
4537	    IFS="$save_ifs"
4538	    $show "$cmd"
4539	    $run eval "$cmd" || exit $?
4540	  done
4541	  IFS="$save_ifs"
4542
4543	  libobjs=$output
4544	  # Restore the value of output.
4545	  output=$save_output
4546
4547	  if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
4548	    eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4549	  fi
4550	  # Expand the library linking commands again to reset the
4551	  # value of $libobjs for piecewise linking.
4552
4553	  # Do each of the archive commands.
4554	  if test "$module" = yes && test -n "$module_cmds" ; then
4555	    if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4556	      cmds=$module_expsym_cmds
4557	    else
4558	      cmds=$module_cmds
4559	    fi
4560	  else
4561	  if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4562	    cmds=$archive_expsym_cmds
4563	  else
4564	    cmds=$archive_cmds
4565	    fi
4566	  fi
4567
4568	  # Append the command to remove the reloadable object files
4569	  # to the just-reset $cmds.
4570	  eval cmds=\"\$cmds~\$rm $delfiles\"
4571	fi
4572	save_ifs="$IFS"; IFS='~'
4573	for cmd in $cmds; do
4574	  IFS="$save_ifs"
4575	  eval cmd=\"$cmd\"
4576	  $show "$cmd"
4577	  $run eval "$cmd" || {
4578	    lt_exit=$?
4579
4580	    # Restore the uninstalled library and exit
4581	    if test "$mode" = relink; then
4582	      $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
4583	    fi
4584
4585	    exit $lt_exit
4586	  }
4587	done
4588	IFS="$save_ifs"
4589
4590	# Restore the uninstalled library and exit
4591	if test "$mode" = relink; then
4592	  $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
4593
4594	  if test -n "$convenience"; then
4595	    if test -z "$whole_archive_flag_spec"; then
4596	      $show "${rm}r $gentop"
4597	      $run ${rm}r "$gentop"
4598	    fi
4599	  fi
4600
4601	  exit $EXIT_SUCCESS
4602	fi
4603
4604	# Create links to the real library.
4605	for linkname in $linknames; do
4606	  if test "$realname" != "$linkname"; then
4607	    $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
4608	    $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
4609	  fi
4610	done
4611
4612	# If -module or -export-dynamic was specified, set the dlname.
4613	if test "$module" = yes || test "$export_dynamic" = yes; then
4614	  # On all known operating systems, these are identical.
4615	  dlname="$soname"
4616	fi
4617      fi
4618      ;;
4619
4620    obj)
4621      case " $deplibs" in
4622      *\ -l* | *\ -L*)
4623	$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;;
4624      esac
4625
4626      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4627	$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4628      fi
4629
4630      if test -n "$rpath"; then
4631	$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4632      fi
4633
4634      if test -n "$xrpath"; then
4635	$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
4636      fi
4637
4638      if test -n "$vinfo"; then
4639	$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
4640      fi
4641
4642      if test -n "$release"; then
4643	$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
4644      fi
4645
4646      case $output in
4647      *.lo)
4648	if test -n "$objs$old_deplibs"; then
4649	  $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4650	  exit $EXIT_FAILURE
4651	fi
4652	libobj="$output"
4653	obj=`$echo "X$output" | $Xsed -e "$lo2o"`
4654	;;
4655      *)
4656	libobj=
4657	obj="$output"
4658	;;
4659      esac
4660
4661      # Delete the old objects.
4662      $run $rm $obj $libobj
4663
4664      # Objects from convenience libraries.  This assumes
4665      # single-version convenience libraries.  Whenever we create
4666      # different ones for PIC/non-PIC, this we'll have to duplicate
4667      # the extraction.
4668      reload_conv_objs=
4669      gentop=
4670      # reload_cmds runs $LD directly, so let us get rid of
4671      # -Wl from whole_archive_flag_spec and hope we can get by with
4672      # turning comma into space..
4673      wl=
4674
4675      if test -n "$convenience"; then
4676	if test -n "$whole_archive_flag_spec"; then
4677	  eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
4678	  reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
4679	else
4680	  gentop="$output_objdir/${obj}x"
4681	  generated="$generated $gentop"
4682
4683	  func_extract_archives $gentop $convenience
4684	  reload_conv_objs="$reload_objs $func_extract_archives_result"
4685	fi
4686      fi
4687
4688      # Create the old-style object.
4689      reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
4690
4691      output="$obj"
4692      cmds=$reload_cmds
4693      save_ifs="$IFS"; IFS='~'
4694      for cmd in $cmds; do
4695	IFS="$save_ifs"
4696	eval cmd=\"$cmd\"
4697	$show "$cmd"
4698	$run eval "$cmd" || exit $?
4699      done
4700      IFS="$save_ifs"
4701
4702      # Exit if we aren't doing a library object file.
4703      if test -z "$libobj"; then
4704	if test -n "$gentop"; then
4705	  $show "${rm}r $gentop"
4706	  $run ${rm}r $gentop
4707	fi
4708
4709	exit $EXIT_SUCCESS
4710      fi
4711
4712      if test "$build_libtool_libs" != yes; then
4713	if test -n "$gentop"; then
4714	  $show "${rm}r $gentop"
4715	  $run ${rm}r $gentop
4716	fi
4717
4718	# Create an invalid libtool object if no PIC, so that we don't
4719	# accidentally link it into a program.
4720	# $show "echo timestamp > $libobj"
4721	# $run eval "echo timestamp > $libobj" || exit $?
4722	exit $EXIT_SUCCESS
4723      fi
4724
4725      if test -n "$pic_flag" || test "$pic_mode" != default; then
4726	# Only do commands if we really have different PIC objects.
4727	reload_objs="$libobjs $reload_conv_objs"
4728	output="$libobj"
4729	cmds=$reload_cmds
4730	save_ifs="$IFS"; IFS='~'
4731	for cmd in $cmds; do
4732	  IFS="$save_ifs"
4733	  eval cmd=\"$cmd\"
4734	  $show "$cmd"
4735	  $run eval "$cmd" || exit $?
4736	done
4737	IFS="$save_ifs"
4738      fi
4739
4740      if test -n "$gentop"; then
4741	$show "${rm}r $gentop"
4742	$run ${rm}r $gentop
4743      fi
4744
4745      exit $EXIT_SUCCESS
4746      ;;
4747
4748    prog)
4749      case $host in
4750	*cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
4751      esac
4752      if test -n "$vinfo"; then
4753	$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
4754      fi
4755
4756      if test -n "$release"; then
4757	$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
4758      fi
4759
4760      if test "$preload" = yes; then
4761	if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
4762	   test "$dlopen_self_static" = unknown; then
4763	  $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
4764	fi
4765      fi
4766
4767      case $host in
4768      *-*-rhapsody* | *-*-darwin1.[012])
4769	# On Rhapsody replace the C library is the System framework
4770	compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4771	finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4772	;;
4773      esac
4774
4775      case $host in
4776      *darwin*)
4777        # Don't allow lazy linking, it breaks C++ global constructors
4778        if test "$tagname" = CXX ; then
4779        compile_command="$compile_command ${wl}-bind_at_load"
4780        finalize_command="$finalize_command ${wl}-bind_at_load"
4781        fi
4782        ;;
4783      esac
4784
4785
4786      # move library search paths that coincide with paths to not yet
4787      # installed libraries to the beginning of the library search list
4788      new_libs=
4789      for path in $notinst_path; do
4790	case " $new_libs " in
4791	*" -L$path/$objdir "*) ;;
4792	*)
4793	  case " $compile_deplibs " in
4794	  *" -L$path/$objdir "*)
4795	    new_libs="$new_libs -L$path/$objdir" ;;
4796	  esac
4797	  ;;
4798	esac
4799      done
4800      for deplib in $compile_deplibs; do
4801	case $deplib in
4802	-L*)
4803	  case " $new_libs " in
4804	  *" $deplib "*) ;;
4805	  *) new_libs="$new_libs $deplib" ;;
4806	  esac
4807	  ;;
4808	*) new_libs="$new_libs $deplib" ;;
4809	esac
4810      done
4811      compile_deplibs="$new_libs"
4812
4813
4814      compile_command="$compile_command $compile_deplibs"
4815      finalize_command="$finalize_command $finalize_deplibs"
4816
4817      if test -n "$rpath$xrpath"; then
4818	# If the user specified any rpath flags, then add them.
4819	for libdir in $rpath $xrpath; do
4820	  # This is the magic to use -rpath.
4821	  case "$finalize_rpath " in
4822	  *" $libdir "*) ;;
4823	  *) finalize_rpath="$finalize_rpath $libdir" ;;
4824	  esac
4825	done
4826      fi
4827
4828      # Now hardcode the library paths
4829      rpath=
4830      hardcode_libdirs=
4831      for libdir in $compile_rpath $finalize_rpath; do
4832	if test -n "$hardcode_libdir_flag_spec"; then
4833	  if test -n "$hardcode_libdir_separator"; then
4834	    if test -z "$hardcode_libdirs"; then
4835	      hardcode_libdirs="$libdir"
4836	    else
4837	      # Just accumulate the unique libdirs.
4838	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4839	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4840		;;
4841	      *)
4842		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4843		;;
4844	      esac
4845	    fi
4846	  else
4847	    eval flag=\"$hardcode_libdir_flag_spec\"
4848	    rpath="$rpath $flag"
4849	  fi
4850	elif test -n "$runpath_var"; then
4851	  case "$perm_rpath " in
4852	  *" $libdir "*) ;;
4853	  *) perm_rpath="$perm_rpath $libdir" ;;
4854	  esac
4855	fi
4856	case $host in
4857	*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
4858	  testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
4859	  case :$dllsearchpath: in
4860	  *":$libdir:"*) ;;
4861	  *) dllsearchpath="$dllsearchpath:$libdir";;
4862	  esac
4863	  case :$dllsearchpath: in
4864	  *":$testbindir:"*) ;;
4865	  *) dllsearchpath="$dllsearchpath:$testbindir";;
4866	  esac
4867	  ;;
4868	esac
4869      done
4870      # Substitute the hardcoded libdirs into the rpath.
4871      if test -n "$hardcode_libdir_separator" &&
4872	 test -n "$hardcode_libdirs"; then
4873	libdir="$hardcode_libdirs"
4874	eval rpath=\" $hardcode_libdir_flag_spec\"
4875      fi
4876      compile_rpath="$rpath"
4877
4878      rpath=
4879      hardcode_libdirs=
4880      for libdir in $finalize_rpath; do
4881	if test -n "$hardcode_libdir_flag_spec"; then
4882	  if test -n "$hardcode_libdir_separator"; then
4883	    if test -z "$hardcode_libdirs"; then
4884	      hardcode_libdirs="$libdir"
4885	    else
4886	      # Just accumulate the unique libdirs.
4887	      case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4888	      *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4889		;;
4890	      *)
4891		hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4892		;;
4893	      esac
4894	    fi
4895	  else
4896	    eval flag=\"$hardcode_libdir_flag_spec\"
4897	    rpath="$rpath $flag"
4898	  fi
4899	elif test -n "$runpath_var"; then
4900	  case "$finalize_perm_rpath " in
4901	  *" $libdir "*) ;;
4902	  *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
4903	  esac
4904	fi
4905      done
4906      # Substitute the hardcoded libdirs into the rpath.
4907      if test -n "$hardcode_libdir_separator" &&
4908	 test -n "$hardcode_libdirs"; then
4909	libdir="$hardcode_libdirs"
4910	eval rpath=\" $hardcode_libdir_flag_spec\"
4911      fi
4912      finalize_rpath="$rpath"
4913
4914      if test -n "$libobjs" && test "$build_old_libs" = yes; then
4915	# Transform all the library objects into standard objects.
4916	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4917	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4918      fi
4919
4920      dlsyms=
4921      if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4922	if test -n "$NM" && test -n "$global_symbol_pipe"; then
4923	  dlsyms="${outputname}S.c"
4924	else
4925	  $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
4926	fi
4927      fi
4928
4929      if test -n "$dlsyms"; then
4930	case $dlsyms in
4931	"") ;;
4932	*.c)
4933	  # Discover the nlist of each of the dlfiles.
4934	  nlist="$output_objdir/${outputname}.nm"
4935
4936	  $show "$rm $nlist ${nlist}S ${nlist}T"
4937	  $run $rm "$nlist" "${nlist}S" "${nlist}T"
4938
4939	  # Parse the name list into a source file.
4940	  $show "creating $output_objdir/$dlsyms"
4941
4942	  test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
4943/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
4944/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
4945
4946#ifdef __cplusplus
4947extern \"C\" {
4948#endif
4949
4950/* Prevent the only kind of declaration conflicts we can make. */
4951#define lt_preloaded_symbols some_other_symbol
4952
4953/* External symbol declarations for the compiler. */\
4954"
4955
4956	  if test "$dlself" = yes; then
4957	    $show "generating symbol list for \`$output'"
4958
4959	    test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
4960
4961	    # Add our own program objects to the symbol list.
4962	    progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4963	    for arg in $progfiles; do
4964	      $show "extracting global C symbols from \`$arg'"
4965	      $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4966	    done
4967
4968	    if test -n "$exclude_expsyms"; then
4969	      $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4970	      $run eval '$mv "$nlist"T "$nlist"'
4971	    fi
4972
4973	    if test -n "$export_symbols_regex"; then
4974	      $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4975	      $run eval '$mv "$nlist"T "$nlist"'
4976	    fi
4977
4978	    # Prepare the list of exported symbols
4979	    if test -z "$export_symbols"; then
4980	      export_symbols="$output_objdir/$outputname.exp"
4981	      $run $rm $export_symbols
4982	      $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4983              case $host in
4984              *cygwin* | *mingw* )
4985	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4986		$run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
4987                ;;
4988              esac
4989	    else
4990	      $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4991	      $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4992	      $run eval 'mv "$nlist"T "$nlist"'
4993              case $host in
4994              *cygwin* | *mingw* )
4995	        $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4996		$run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
4997                ;;
4998              esac
4999	    fi
5000	  fi
5001
5002	  for arg in $dlprefiles; do
5003	    $show "extracting global C symbols from \`$arg'"
5004	    name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
5005	    $run eval '$echo ": $name " >> "$nlist"'
5006	    $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
5007	  done
5008
5009	  if test -z "$run"; then
5010	    # Make sure we have at least an empty file.
5011	    test -f "$nlist" || : > "$nlist"
5012
5013	    if test -n "$exclude_expsyms"; then
5014	      $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
5015	      $mv "$nlist"T "$nlist"
5016	    fi
5017
5018	    # Try sorting and uniquifying the output.
5019	    if grep -v "^: " < "$nlist" |
5020		if sort -k 3 </dev/null >/dev/null 2>&1; then
5021		  sort -k 3
5022		else
5023		  sort +2
5024		fi |
5025		uniq > "$nlist"S; then
5026	      :
5027	    else
5028	      grep -v "^: " < "$nlist" > "$nlist"S
5029	    fi
5030
5031	    if test -f "$nlist"S; then
5032	      eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
5033	    else
5034	      $echo '/* NONE */' >> "$output_objdir/$dlsyms"
5035	    fi
5036
5037	    $echo >> "$output_objdir/$dlsyms" "\
5038
5039#undef lt_preloaded_symbols
5040
5041#if defined (__STDC__) && __STDC__
5042# define lt_ptr void *
5043#else
5044# define lt_ptr char *
5045# define const
5046#endif
5047
5048/* The mapping between symbol names and symbols. */
5049"
5050
5051	    case $host in
5052	    *cygwin* | *mingw* )
5053	  $echo >> "$output_objdir/$dlsyms" "\
5054/* DATA imports from DLLs on WIN32 can't be const, because
5055   runtime relocations are performed -- see ld's documentation
5056   on pseudo-relocs */
5057struct {
5058"
5059	      ;;
5060	    * )
5061	  $echo >> "$output_objdir/$dlsyms" "\
5062const struct {
5063"
5064	      ;;
5065	    esac
5066
5067
5068	  $echo >> "$output_objdir/$dlsyms" "\
5069  const char *name;
5070  lt_ptr address;
5071}
5072lt_preloaded_symbols[] =
5073{\
5074"
5075
5076	    eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
5077
5078	    $echo >> "$output_objdir/$dlsyms" "\
5079  {0, (lt_ptr) 0}
5080};
5081
5082/* This works around a problem in FreeBSD linker */
5083#ifdef FREEBSD_WORKAROUND
5084static const void *lt_preloaded_setup() {
5085  return lt_preloaded_symbols;
5086}
5087#endif
5088
5089#ifdef __cplusplus
5090}
5091#endif\
5092"
5093	  fi
5094
5095	  pic_flag_for_symtable=
5096	  case $host in
5097	  # compiling the symbol table file with pic_flag works around
5098	  # a FreeBSD bug that causes programs to crash when -lm is
5099	  # linked before any other PIC object.  But we must not use
5100	  # pic_flag when linking with -static.  The problem exists in
5101	  # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
5102	  *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
5103	    case "$compile_command " in
5104	    *" -static "*) ;;
5105	    *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
5106	    esac;;
5107	  *-*-hpux*)
5108	    case "$compile_command " in
5109	    *" -static "*) ;;
5110	    *) pic_flag_for_symtable=" $pic_flag";;
5111	    esac
5112	  esac
5113
5114	  # Now compile the dynamic symbol file.
5115	  $show "(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
5116	  $run eval '(cd $output_objdir && $LTCC  $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
5117
5118	  # Clean up the generated files.
5119	  $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
5120	  $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
5121
5122	  # Transform the symbol file into the correct name.
5123          case $host in
5124          *cygwin* | *mingw* )
5125            if test -f "$output_objdir/${outputname}.def" ; then
5126              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
5127              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
5128            else
5129              compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5130              finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5131             fi
5132            ;;
5133          * )
5134            compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5135            finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5136            ;;
5137          esac
5138	  ;;
5139	*)
5140	  $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
5141	  exit $EXIT_FAILURE
5142	  ;;
5143	esac
5144      else
5145	# We keep going just in case the user didn't refer to
5146	# lt_preloaded_symbols.  The linker will fail if global_symbol_pipe
5147	# really was required.
5148
5149	# Nullify the symbol file.
5150	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
5151	finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
5152      fi
5153
5154      if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
5155	# Replace the output file specification.
5156	compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
5157	link_command="$compile_command$compile_rpath"
5158
5159	# We have no uninstalled library dependencies, so finalize right now.
5160	$show "$link_command"
5161	$run eval "$link_command"
5162	exit_status=$?
5163
5164	# Delete the generated files.
5165	if test -n "$dlsyms"; then
5166	  $show "$rm $output_objdir/${outputname}S.${objext}"
5167	  $run $rm "$output_objdir/${outputname}S.${objext}"
5168	fi
5169
5170	exit $exit_status
5171      fi
5172
5173      if test -n "$shlibpath_var"; then
5174	# We should set the shlibpath_var
5175	rpath=
5176	for dir in $temp_rpath; do
5177	  case $dir in
5178	  [\\/]* | [A-Za-z]:[\\/]*)
5179	    # Absolute path.
5180	    rpath="$rpath$dir:"
5181	    ;;
5182	  *)
5183	    # Relative path: add a thisdir entry.
5184	    rpath="$rpath\$thisdir/$dir:"
5185	    ;;
5186	  esac
5187	done
5188	temp_rpath="$rpath"
5189      fi
5190
5191      if test -n "$compile_shlibpath$finalize_shlibpath"; then
5192	compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
5193      fi
5194      if test -n "$finalize_shlibpath"; then
5195	finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
5196      fi
5197
5198      compile_var=
5199      finalize_var=
5200      if test -n "$runpath_var"; then
5201	if test -n "$perm_rpath"; then
5202	  # We should set the runpath_var.
5203	  rpath=
5204	  for dir in $perm_rpath; do
5205	    rpath="$rpath$dir:"
5206	  done
5207	  compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
5208	fi
5209	if test -n "$finalize_perm_rpath"; then
5210	  # We should set the runpath_var.
5211	  rpath=
5212	  for dir in $finalize_perm_rpath; do
5213	    rpath="$rpath$dir:"
5214	  done
5215	  finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
5216	fi
5217      fi
5218
5219      if test "$no_install" = yes; then
5220	# We don't need to create a wrapper script.
5221	link_command="$compile_var$compile_command$compile_rpath"
5222	# Replace the output file specification.
5223	link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
5224	# Delete the old output file.
5225	$run $rm $output
5226	# Link the executable and exit
5227	$show "$link_command"
5228	$run eval "$link_command" || exit $?
5229	exit $EXIT_SUCCESS
5230      fi
5231
5232      if test "$hardcode_action" = relink; then
5233	# Fast installation is not supported
5234	link_command="$compile_var$compile_command$compile_rpath"
5235	relink_command="$finalize_var$finalize_command$finalize_rpath"
5236
5237	$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
5238	$echo "$modename: \`$output' will be relinked during installation" 1>&2
5239      else
5240	if test "$fast_install" != no; then
5241	  link_command="$finalize_var$compile_command$finalize_rpath"
5242	  if test "$fast_install" = yes; then
5243	    relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
5244	  else
5245	    # fast_install is set to needless
5246	    relink_command=
5247	  fi
5248	else
5249	  link_command="$compile_var$compile_command$compile_rpath"
5250	  relink_command="$finalize_var$finalize_command$finalize_rpath"
5251	fi
5252      fi
5253
5254      # Replace the output file specification.
5255      link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
5256
5257      # Delete the old output files.
5258      $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
5259
5260      $show "$link_command"
5261      $run eval "$link_command" || exit $?
5262
5263      # Now create the wrapper script.
5264      $show "creating $output"
5265
5266      # Quote the relink command for shipping.
5267      if test -n "$relink_command"; then
5268	# Preserve any variables that may affect compiler behavior
5269	for var in $variables_saved_for_relink; do
5270	  if eval test -z \"\${$var+set}\"; then
5271	    relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5272	  elif eval var_value=\$$var; test -z "$var_value"; then
5273	    relink_command="$var=; export $var; $relink_command"
5274	  else
5275	    var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5276	    relink_command="$var=\"$var_value\"; export $var; $relink_command"
5277	  fi
5278	done
5279	relink_command="(cd `pwd`; $relink_command)"
5280	relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
5281      fi
5282
5283      # Quote $echo for shipping.
5284      if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
5285	case $progpath in
5286	[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
5287	*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
5288	esac
5289	qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
5290      else
5291	qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
5292      fi
5293
5294      # Only actually do things if our run command is non-null.
5295      if test -z "$run"; then
5296	# win32 will think the script is a binary if it has
5297	# a .exe suffix, so we strip it off here.
5298	case $output in
5299	  *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
5300	esac
5301	# test for cygwin because mv fails w/o .exe extensions
5302	case $host in
5303	  *cygwin*)
5304	    exeext=.exe
5305	    outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
5306	  *) exeext= ;;
5307	esac
5308	case $host in
5309	  *cygwin* | *mingw* )
5310            output_name=`basename $output`
5311            output_path=`dirname $output`
5312            cwrappersource="$output_path/$objdir/lt-$output_name.c"
5313            cwrapper="$output_path/$output_name.exe"
5314            $rm $cwrappersource $cwrapper
5315            trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
5316
5317	    cat > $cwrappersource <<EOF
5318
5319/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
5320   Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5321
5322   The $output program cannot be directly executed until all the libtool
5323   libraries that it depends on are installed.
5324
5325   This wrapper executable should never be moved out of the build directory.
5326   If it is, it will not operate correctly.
5327
5328   Currently, it simply execs the wrapper *script* "/bin/sh $output",
5329   but could eventually absorb all of the scripts functionality and
5330   exec $objdir/$outputname directly.
5331*/
5332EOF
5333	    cat >> $cwrappersource<<"EOF"
5334#include <stdio.h>
5335#include <stdlib.h>
5336#include <unistd.h>
5337#include <malloc.h>
5338#include <stdarg.h>
5339#include <assert.h>
5340#include <string.h>
5341#include <ctype.h>
5342#include <sys/stat.h>
5343
5344#if defined(PATH_MAX)
5345# define LT_PATHMAX PATH_MAX
5346#elif defined(MAXPATHLEN)
5347# define LT_PATHMAX MAXPATHLEN
5348#else
5349# define LT_PATHMAX 1024
5350#endif
5351
5352#ifndef DIR_SEPARATOR
5353# define DIR_SEPARATOR '/'
5354# define PATH_SEPARATOR ':'
5355#endif
5356
5357#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
5358  defined (__OS2__)
5359# define HAVE_DOS_BASED_FILE_SYSTEM
5360# ifndef DIR_SEPARATOR_2
5361#  define DIR_SEPARATOR_2 '\\'
5362# endif
5363# ifndef PATH_SEPARATOR_2
5364#  define PATH_SEPARATOR_2 ';'
5365# endif
5366#endif
5367
5368#ifndef DIR_SEPARATOR_2
5369# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
5370#else /* DIR_SEPARATOR_2 */
5371# define IS_DIR_SEPARATOR(ch) \
5372        (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
5373#endif /* DIR_SEPARATOR_2 */
5374
5375#ifndef PATH_SEPARATOR_2
5376# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
5377#else /* PATH_SEPARATOR_2 */
5378# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
5379#endif /* PATH_SEPARATOR_2 */
5380
5381#define XMALLOC(type, num)      ((type *) xmalloc ((num) * sizeof(type)))
5382#define XFREE(stale) do { \
5383  if (stale) { free ((void *) stale); stale = 0; } \
5384} while (0)
5385
5386/* -DDEBUG is fairly common in CFLAGS.  */
5387#undef DEBUG
5388#if defined DEBUGWRAPPER
5389# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
5390#else
5391# define DEBUG(format, ...)
5392#endif
5393
5394const char *program_name = NULL;
5395
5396void * xmalloc (size_t num);
5397char * xstrdup (const char *string);
5398const char * base_name (const char *name);
5399char * find_executable(const char *wrapper);
5400int    check_executable(const char *path);
5401char * strendzap(char *str, const char *pat);
5402void lt_fatal (const char *message, ...);
5403
5404int
5405main (int argc, char *argv[])
5406{
5407  char **newargz;
5408  int i;
5409
5410  program_name = (char *) xstrdup (base_name (argv[0]));
5411  DEBUG("(main) argv[0]      : %s\n",argv[0]);
5412  DEBUG("(main) program_name : %s\n",program_name);
5413  newargz = XMALLOC(char *, argc+2);
5414EOF
5415
5416            cat >> $cwrappersource <<EOF
5417  newargz[0] = (char *) xstrdup("$SHELL");
5418EOF
5419
5420            cat >> $cwrappersource <<"EOF"
5421  newargz[1] = find_executable(argv[0]);
5422  if (newargz[1] == NULL)
5423    lt_fatal("Couldn't find %s", argv[0]);
5424  DEBUG("(main) found exe at : %s\n",newargz[1]);
5425  /* we know the script has the same name, without the .exe */
5426  /* so make sure newargz[1] doesn't end in .exe */
5427  strendzap(newargz[1],".exe");
5428  for (i = 1; i < argc; i++)
5429    newargz[i+1] = xstrdup(argv[i]);
5430  newargz[argc+1] = NULL;
5431
5432  for (i=0; i<argc+1; i++)
5433  {
5434    DEBUG("(main) newargz[%d]   : %s\n",i,newargz[i]);
5435    ;
5436  }
5437
5438EOF
5439
5440            case $host_os in
5441              mingw*)
5442                cat >> $cwrappersource <<EOF
5443  execv("$SHELL",(char const **)newargz);
5444EOF
5445              ;;
5446              *)
5447                cat >> $cwrappersource <<EOF
5448  execv("$SHELL",newargz);
5449EOF
5450              ;;
5451            esac
5452
5453            cat >> $cwrappersource <<"EOF"
5454  return 127;
5455}
5456
5457void *
5458xmalloc (size_t num)
5459{
5460  void * p = (void *) malloc (num);
5461  if (!p)
5462    lt_fatal ("Memory exhausted");
5463
5464  return p;
5465}
5466
5467char *
5468xstrdup (const char *string)
5469{
5470  return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
5471;
5472}
5473
5474const char *
5475base_name (const char *name)
5476{
5477  const char *base;
5478
5479#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5480  /* Skip over the disk name in MSDOS pathnames. */
5481  if (isalpha ((unsigned char)name[0]) && name[1] == ':')
5482    name += 2;
5483#endif
5484
5485  for (base = name; *name; name++)
5486    if (IS_DIR_SEPARATOR (*name))
5487      base = name + 1;
5488  return base;
5489}
5490
5491int
5492check_executable(const char * path)
5493{
5494  struct stat st;
5495
5496  DEBUG("(check_executable)  : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
5497  if ((!path) || (!*path))
5498    return 0;
5499
5500  if ((stat (path, &st) >= 0) &&
5501      (
5502        /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
5503#if defined (S_IXOTH)
5504       ((st.st_mode & S_IXOTH) == S_IXOTH) ||
5505#endif
5506#if defined (S_IXGRP)
5507       ((st.st_mode & S_IXGRP) == S_IXGRP) ||
5508#endif
5509       ((st.st_mode & S_IXUSR) == S_IXUSR))
5510      )
5511    return 1;
5512  else
5513    return 0;
5514}
5515
5516/* Searches for the full path of the wrapper.  Returns
5517   newly allocated full path name if found, NULL otherwise */
5518char *
5519find_executable (const char* wrapper)
5520{
5521  int has_slash = 0;
5522  const char* p;
5523  const char* p_next;
5524  /* static buffer for getcwd */
5525  char tmp[LT_PATHMAX + 1];
5526  int tmp_len;
5527  char* concat_name;
5528
5529  DEBUG("(find_executable)  : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
5530
5531  if ((wrapper == NULL) || (*wrapper == '\0'))
5532    return NULL;
5533
5534  /* Absolute path? */
5535#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5536  if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
5537  {
5538    concat_name = xstrdup (wrapper);
5539    if (check_executable(concat_name))
5540      return concat_name;
5541    XFREE(concat_name);
5542  }
5543  else
5544  {
5545#endif
5546    if (IS_DIR_SEPARATOR (wrapper[0]))
5547    {
5548      concat_name = xstrdup (wrapper);
5549      if (check_executable(concat_name))
5550        return concat_name;
5551      XFREE(concat_name);
5552    }
5553#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5554  }
5555#endif
5556
5557  for (p = wrapper; *p; p++)
5558    if (*p == '/')
5559    {
5560      has_slash = 1;
5561      break;
5562    }
5563  if (!has_slash)
5564  {
5565    /* no slashes; search PATH */
5566    const char* path = getenv ("PATH");
5567    if (path != NULL)
5568    {
5569      for (p = path; *p; p = p_next)
5570      {
5571        const char* q;
5572        size_t p_len;
5573        for (q = p; *q; q++)
5574          if (IS_PATH_SEPARATOR(*q))
5575            break;
5576        p_len = q - p;
5577        p_next = (*q == '\0' ? q : q + 1);
5578        if (p_len == 0)
5579        {
5580          /* empty path: current directory */
5581          if (getcwd (tmp, LT_PATHMAX) == NULL)
5582            lt_fatal ("getcwd failed");
5583          tmp_len = strlen(tmp);
5584          concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5585          memcpy (concat_name, tmp, tmp_len);
5586          concat_name[tmp_len] = '/';
5587          strcpy (concat_name + tmp_len + 1, wrapper);
5588        }
5589        else
5590        {
5591          concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
5592          memcpy (concat_name, p, p_len);
5593          concat_name[p_len] = '/';
5594          strcpy (concat_name + p_len + 1, wrapper);
5595        }
5596        if (check_executable(concat_name))
5597          return concat_name;
5598        XFREE(concat_name);
5599      }
5600    }
5601    /* not found in PATH; assume curdir */
5602  }
5603  /* Relative path | not found in path: prepend cwd */
5604  if (getcwd (tmp, LT_PATHMAX) == NULL)
5605    lt_fatal ("getcwd failed");
5606  tmp_len = strlen(tmp);
5607  concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5608  memcpy (concat_name, tmp, tmp_len);
5609  concat_name[tmp_len] = '/';
5610  strcpy (concat_name + tmp_len + 1, wrapper);
5611
5612  if (check_executable(concat_name))
5613    return concat_name;
5614  XFREE(concat_name);
5615  return NULL;
5616}
5617
5618char *
5619strendzap(char *str, const char *pat)
5620{
5621  size_t len, patlen;
5622
5623  assert(str != NULL);
5624  assert(pat != NULL);
5625
5626  len = strlen(str);
5627  patlen = strlen(pat);
5628
5629  if (patlen <= len)
5630  {
5631    str += len - patlen;
5632    if (strcmp(str, pat) == 0)
5633      *str = '\0';
5634  }
5635  return str;
5636}
5637
5638static void
5639lt_error_core (int exit_status, const char * mode,
5640          const char * message, va_list ap)
5641{
5642  fprintf (stderr, "%s: %s: ", program_name, mode);
5643  vfprintf (stderr, message, ap);
5644  fprintf (stderr, ".\n");
5645
5646  if (exit_status >= 0)
5647    exit (exit_status);
5648}
5649
5650void
5651lt_fatal (const char *message, ...)
5652{
5653  va_list ap;
5654  va_start (ap, message);
5655  lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
5656  va_end (ap);
5657}
5658EOF
5659          # we should really use a build-platform specific compiler
5660          # here, but OTOH, the wrappers (shell script and this C one)
5661          # are only useful if you want to execute the "real" binary.
5662          # Since the "real" binary is built for $host, then this
5663          # wrapper might as well be built for $host, too.
5664          $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
5665          ;;
5666        esac
5667        $rm $output
5668        trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
5669
5670	$echo > $output "\
5671#! $SHELL
5672
5673# $output - temporary wrapper script for $objdir/$outputname
5674# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5675#
5676# The $output program cannot be directly executed until all the libtool
5677# libraries that it depends on are installed.
5678#
5679# This wrapper script should never be moved out of the build directory.
5680# If it is, it will not operate correctly.
5681
5682# Sed substitution that helps us do robust quoting.  It backslashifies
5683# metacharacters that are still active within double-quoted strings.
5684Xsed='${SED} -e 1s/^X//'
5685sed_quote_subst='$sed_quote_subst'
5686
5687# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
5688if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
5689  emulate sh
5690  NULLCMD=:
5691  # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
5692  # is contrary to our usage.  Disable this feature.
5693  alias -g '\${1+\"\$@\"}'='\"\$@\"'
5694  setopt NO_GLOB_SUBST
5695else
5696  case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
5697fi
5698BIN_SH=xpg4; export BIN_SH # for Tru64
5699DUALCASE=1; export DUALCASE # for MKS sh
5700
5701# The HP-UX ksh and POSIX shell print the target directory to stdout
5702# if CDPATH is set.
5703(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5704
5705relink_command=\"$relink_command\"
5706
5707# This environment variable determines our operation mode.
5708if test \"\$libtool_install_magic\" = \"$magic\"; then
5709  # install mode needs the following variable:
5710  notinst_deplibs='$notinst_deplibs'
5711else
5712  # When we are sourced in execute mode, \$file and \$echo are already set.
5713  if test \"\$libtool_execute_magic\" != \"$magic\"; then
5714    echo=\"$qecho\"
5715    file=\"\$0\"
5716    # Make sure echo works.
5717    if test \"X\$1\" = X--no-reexec; then
5718      # Discard the --no-reexec flag, and continue.
5719      shift
5720    elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
5721      # Yippee, \$echo works!
5722      :
5723    else
5724      # Restart under the correct shell, and then maybe \$echo will work.
5725      exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
5726    fi
5727  fi\
5728"
5729	$echo >> $output "\
5730
5731  # Find the directory that this script lives in.
5732  thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
5733  test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5734
5735  # Follow symbolic links until we get to the real thisdir.
5736  file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
5737  while test -n \"\$file\"; do
5738    destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
5739
5740    # If there was a directory component, then change thisdir.
5741    if test \"x\$destdir\" != \"x\$file\"; then
5742      case \"\$destdir\" in
5743      [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5744      *) thisdir=\"\$thisdir/\$destdir\" ;;
5745      esac
5746    fi
5747
5748    file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
5749    file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
5750  done
5751
5752  # Try to get the absolute directory name.
5753  absdir=\`cd \"\$thisdir\" && pwd\`
5754  test -n \"\$absdir\" && thisdir=\"\$absdir\"
5755"
5756
5757	if test "$fast_install" = yes; then
5758	  $echo >> $output "\
5759  program=lt-'$outputname'$exeext
5760  progdir=\"\$thisdir/$objdir\"
5761
5762  if test ! -f \"\$progdir/\$program\" || \\
5763     { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
5764       test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5765
5766    file=\"\$\$-\$program\"
5767
5768    if test ! -d \"\$progdir\"; then
5769      $mkdir \"\$progdir\"
5770    else
5771      $rm \"\$progdir/\$file\"
5772    fi"
5773
5774	  $echo >> $output "\
5775
5776    # relink executable if necessary
5777    if test -n \"\$relink_command\"; then
5778      if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5779      else
5780	$echo \"\$relink_command_output\" >&2
5781	$rm \"\$progdir/\$file\"
5782	exit $EXIT_FAILURE
5783      fi
5784    fi
5785
5786    $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5787    { $rm \"\$progdir/\$program\";
5788      $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5789    $rm \"\$progdir/\$file\"
5790  fi"
5791	else
5792	  $echo >> $output "\
5793  program='$outputname'
5794  progdir=\"\$thisdir/$objdir\"
5795"
5796	fi
5797
5798	$echo >> $output "\
5799
5800  if test -f \"\$progdir/\$program\"; then"
5801
5802	# Export our shlibpath_var if we have one.
5803	if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5804	  $echo >> $output "\
5805    # Add our own library path to $shlibpath_var
5806    $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5807
5808    # Some systems cannot cope with colon-terminated $shlibpath_var
5809    # The second colon is a workaround for a bug in BeOS R4 sed
5810    $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
5811
5812    export $shlibpath_var
5813"
5814	fi
5815
5816	# fixup the dll searchpath if we need to.
5817	if test -n "$dllsearchpath"; then
5818	  $echo >> $output "\
5819    # Add the dll search path components to the executable PATH
5820    PATH=$dllsearchpath:\$PATH
5821"
5822	fi
5823
5824	$echo >> $output "\
5825    if test \"\$libtool_execute_magic\" != \"$magic\"; then
5826      # Run the actual program with our arguments.
5827"
5828	case $host in
5829	# Backslashes separate directories on plain windows
5830	*-*-mingw | *-*-os2*)
5831	  $echo >> $output "\
5832      exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
5833"
5834	  ;;
5835
5836	*)
5837	  $echo >> $output "\
5838      exec \"\$progdir/\$program\" \${1+\"\$@\"}
5839"
5840	  ;;
5841	esac
5842	$echo >> $output "\
5843      \$echo \"\$0: cannot exec \$program \$*\"
5844      exit $EXIT_FAILURE
5845    fi
5846  else
5847    # The program doesn't exist.
5848    \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
5849    \$echo \"This script is just a wrapper for \$program.\" 1>&2
5850    $echo \"See the $PACKAGE documentation for more information.\" 1>&2
5851    exit $EXIT_FAILURE
5852  fi
5853fi\
5854"
5855	chmod +x $output
5856      fi
5857      exit $EXIT_SUCCESS
5858      ;;
5859    esac
5860
5861    # See if we need to build an old-fashioned archive.
5862    for oldlib in $oldlibs; do
5863
5864      if test "$build_libtool_libs" = convenience; then
5865	oldobjs="$libobjs_save"
5866	addlibs="$convenience"
5867	build_libtool_libs=no
5868      else
5869	if test "$build_libtool_libs" = module; then
5870	  oldobjs="$libobjs_save"
5871	  build_libtool_libs=no
5872	else
5873	  oldobjs="$old_deplibs $non_pic_objects"
5874	fi
5875	addlibs="$old_convenience"
5876      fi
5877
5878      if test -n "$addlibs"; then
5879	gentop="$output_objdir/${outputname}x"
5880	generated="$generated $gentop"
5881
5882	func_extract_archives $gentop $addlibs
5883	oldobjs="$oldobjs $func_extract_archives_result"
5884      fi
5885
5886      # Do each command in the archive commands.
5887      if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5888       cmds=$old_archive_from_new_cmds
5889      else
5890	# POSIX demands no paths to be encoded in archives.  We have
5891	# to avoid creating archives with duplicate basenames if we
5892	# might have to extract them afterwards, e.g., when creating a
5893	# static archive out of a convenience library, or when linking
5894	# the entirety of a libtool archive into another (currently
5895	# not supported by libtool).
5896	if (for obj in $oldobjs
5897	    do
5898	      $echo "X$obj" | $Xsed -e 's%^.*/%%'
5899	    done | sort | sort -uc >/dev/null 2>&1); then
5900	  :
5901	else
5902	  $echo "copying selected object files to avoid basename conflicts..."
5903
5904	  if test -z "$gentop"; then
5905	    gentop="$output_objdir/${outputname}x"
5906	    generated="$generated $gentop"
5907
5908	    $show "${rm}r $gentop"
5909	    $run ${rm}r "$gentop"
5910	    $show "$mkdir $gentop"
5911	    $run $mkdir "$gentop"
5912	    exit_status=$?
5913	    if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
5914	      exit $exit_status
5915	    fi
5916	  fi
5917
5918	  save_oldobjs=$oldobjs
5919	  oldobjs=
5920	  counter=1
5921	  for obj in $save_oldobjs
5922	  do
5923	    objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
5924	    case " $oldobjs " in
5925	    " ") oldobjs=$obj ;;
5926	    *[\ /]"$objbase "*)
5927	      while :; do
5928		# Make sure we don't pick an alternate name that also
5929		# overlaps.
5930		newobj=lt$counter-$objbase
5931		counter=`expr $counter + 1`
5932		case " $oldobjs " in
5933		*[\ /]"$newobj "*) ;;
5934		*) if test ! -f "$gentop/$newobj"; then break; fi ;;
5935		esac
5936	      done
5937	      $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
5938	      $run ln "$obj" "$gentop/$newobj" ||
5939	      $run cp "$obj" "$gentop/$newobj"
5940	      oldobjs="$oldobjs $gentop/$newobj"
5941	      ;;
5942	    *) oldobjs="$oldobjs $obj" ;;
5943	    esac
5944	  done
5945	fi
5946
5947	eval cmds=\"$old_archive_cmds\"
5948
5949	if len=`expr "X$cmds" : ".*"` &&
5950	     test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5951	  cmds=$old_archive_cmds
5952	else
5953	  # the command line is too long to link in one step, link in parts
5954	  $echo "using piecewise archive linking..."
5955	  save_RANLIB=$RANLIB
5956	  RANLIB=:
5957	  objlist=
5958	  concat_cmds=
5959	  save_oldobjs=$oldobjs
5960
5961	  # Is there a better way of finding the last object in the list?
5962	  for obj in $save_oldobjs
5963	  do
5964	    last_oldobj=$obj
5965	  done
5966	  for obj in $save_oldobjs
5967	  do
5968	    oldobjs="$objlist $obj"
5969	    objlist="$objlist $obj"
5970	    eval test_cmds=\"$old_archive_cmds\"
5971	    if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
5972	       test "$len" -le "$max_cmd_len"; then
5973	      :
5974	    else
5975	      # the above command should be used before it gets too long
5976	      oldobjs=$objlist
5977	      if test "$obj" = "$last_oldobj" ; then
5978	        RANLIB=$save_RANLIB
5979	      fi
5980	      test -z "$concat_cmds" || concat_cmds=$concat_cmds~
5981	      eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
5982	      objlist=
5983	    fi
5984	  done
5985	  RANLIB=$save_RANLIB
5986	  oldobjs=$objlist
5987	  if test "X$oldobjs" = "X" ; then
5988	    eval cmds=\"\$concat_cmds\"
5989	  else
5990	    eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
5991	  fi
5992	fi
5993      fi
5994      save_ifs="$IFS"; IFS='~'
5995      for cmd in $cmds; do
5996        eval cmd=\"$cmd\"
5997	IFS="$save_ifs"
5998	$show "$cmd"
5999	$run eval "$cmd" || exit $?
6000      done
6001      IFS="$save_ifs"
6002    done
6003
6004    if test -n "$generated"; then
6005      $show "${rm}r$generated"
6006      $run ${rm}r$generated
6007    fi
6008
6009    # Now create the libtool archive.
6010    case $output in
6011    *.la)
6012      old_library=
6013      test "$build_old_libs" = yes && old_library="$libname.$libext"
6014      $show "creating $output"
6015
6016      # Preserve any variables that may affect compiler behavior
6017      for var in $variables_saved_for_relink; do
6018	if eval test -z \"\${$var+set}\"; then
6019	  relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
6020	elif eval var_value=\$$var; test -z "$var_value"; then
6021	  relink_command="$var=; export $var; $relink_command"
6022	else
6023	  var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
6024	  relink_command="$var=\"$var_value\"; export $var; $relink_command"
6025	fi
6026      done
6027      # Quote the link command for shipping.
6028      relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
6029      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
6030      if test "$hardcode_automatic" = yes ; then
6031	relink_command=
6032      fi
6033
6034
6035      # Only create the output if not a dry run.
6036      if test -z "$run"; then
6037	for installed in no yes; do
6038	  if test "$installed" = yes; then
6039	    if test -z "$install_libdir"; then
6040	      break
6041	    fi
6042	    output="$output_objdir/$outputname"i
6043	    # Replace all uninstalled libtool libraries with the installed ones
6044	    newdependency_libs=
6045	    for deplib in $dependency_libs; do
6046	      case $deplib in
6047	      *.la)
6048		name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
6049		eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
6050		if test -z "$libdir"; then
6051		  $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
6052		  exit $EXIT_FAILURE
6053		fi
6054		newdependency_libs="$newdependency_libs $libdir/$name"
6055		;;
6056	      *) newdependency_libs="$newdependency_libs $deplib" ;;
6057	      esac
6058	    done
6059	    dependency_libs="$newdependency_libs"
6060	    newdlfiles=
6061	    for lib in $dlfiles; do
6062	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
6063	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
6064	      if test -z "$libdir"; then
6065		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6066		exit $EXIT_FAILURE
6067	      fi
6068	      newdlfiles="$newdlfiles $libdir/$name"
6069	    done
6070	    dlfiles="$newdlfiles"
6071	    newdlprefiles=
6072	    for lib in $dlprefiles; do
6073	      name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
6074	      eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
6075	      if test -z "$libdir"; then
6076		$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6077		exit $EXIT_FAILURE
6078	      fi
6079	      newdlprefiles="$newdlprefiles $libdir/$name"
6080	    done
6081	    dlprefiles="$newdlprefiles"
6082	  else
6083	    newdlfiles=
6084	    for lib in $dlfiles; do
6085	      case $lib in
6086		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
6087		*) abs=`pwd`"/$lib" ;;
6088	      esac
6089	      newdlfiles="$newdlfiles $abs"
6090	    done
6091	    dlfiles="$newdlfiles"
6092	    newdlprefiles=
6093	    for lib in $dlprefiles; do
6094	      case $lib in
6095		[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
6096		*) abs=`pwd`"/$lib" ;;
6097	      esac
6098	      newdlprefiles="$newdlprefiles $abs"
6099	    done
6100	    dlprefiles="$newdlprefiles"
6101	  fi
6102	  $rm $output
6103	  # place dlname in correct position for cygwin
6104	  tdlname=$dlname
6105	  case $host,$output,$installed,$module,$dlname in
6106	    *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
6107	  esac
6108	  $echo > $output "\
6109# $outputname - a libtool library file
6110# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
6111#
6112# Please DO NOT delete this file!
6113# It is necessary for linking the library.
6114
6115# The name that we can dlopen(3).
6116dlname='$tdlname'
6117
6118# Names of this library.
6119library_names='$library_names'
6120
6121# The name of the static archive.
6122old_library='$old_library'
6123
6124# Libraries that this one depends upon.
6125dependency_libs='$dependency_libs'
6126
6127# Version information for $libname.
6128current=$current
6129age=$age
6130revision=$revision
6131
6132# Is this an already installed library?
6133installed=$installed
6134
6135# Should we warn about portability when linking against -modules?
6136shouldnotlink=$module
6137
6138# Files to dlopen/dlpreopen
6139dlopen='$dlfiles'
6140dlpreopen='$dlprefiles'
6141
6142# Directory that this library needs to be installed in:
6143libdir='$install_libdir'"
6144	  if test "$installed" = no && test "$need_relink" = yes; then
6145	    $echo >> $output "\
6146relink_command=\"$relink_command\""
6147	  fi
6148	done
6149      fi
6150
6151      # Do a symbolic link so that the libtool archive can be found in
6152      # LD_LIBRARY_PATH before the program is installed.
6153      $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
6154      $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
6155      ;;
6156    esac
6157    exit $EXIT_SUCCESS
6158    ;;
6159
6160  # libtool install mode
6161  install)
6162    modename="$modename: install"
6163
6164    # There may be an optional sh(1) argument at the beginning of
6165    # install_prog (especially on Windows NT).
6166    if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
6167       # Allow the use of GNU shtool's install command.
6168       $echo "X$nonopt" | grep shtool > /dev/null; then
6169      # Aesthetically quote it.
6170      arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
6171      case $arg in
6172      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
6173	arg="\"$arg\""
6174	;;
6175      esac
6176      install_prog="$arg "
6177      arg="$1"
6178      shift
6179    else
6180      install_prog=
6181      arg=$nonopt
6182    fi
6183
6184    # The real first argument should be the name of the installation program.
6185    # Aesthetically quote it.
6186    arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
6187    case $arg in
6188    *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
6189      arg="\"$arg\""
6190      ;;
6191    esac
6192    install_prog="$install_prog$arg"
6193
6194    # We need to accept at least all the BSD install flags.
6195    dest=
6196    files=
6197    opts=
6198    prev=
6199    install_type=
6200    isdir=no
6201    stripme=
6202    for arg
6203    do
6204      if test -n "$dest"; then
6205	files="$files $dest"
6206	dest=$arg
6207	continue
6208      fi
6209
6210      case $arg in
6211      -d) isdir=yes ;;
6212      -f)
6213      	case " $install_prog " in
6214	*[\\\ /]cp\ *) ;;
6215	*) prev=$arg ;;
6216	esac
6217	;;
6218      -g | -m | -o) prev=$arg ;;
6219      -s)
6220	stripme=" -s"
6221	continue
6222	;;
6223      -*)
6224	;;
6225      *)
6226	# If the previous option needed an argument, then skip it.
6227	if test -n "$prev"; then
6228	  prev=
6229	else
6230	  dest=$arg
6231	  continue
6232	fi
6233	;;
6234      esac
6235
6236      # Aesthetically quote the argument.
6237      arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
6238      case $arg in
6239      *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \	]*|*]*|"")
6240	arg="\"$arg\""
6241	;;
6242      esac
6243      install_prog="$install_prog $arg"
6244    done
6245
6246    if test -z "$install_prog"; then
6247      $echo "$modename: you must specify an install program" 1>&2
6248      $echo "$help" 1>&2
6249      exit $EXIT_FAILURE
6250    fi
6251
6252    if test -n "$prev"; then
6253      $echo "$modename: the \`$prev' option requires an argument" 1>&2
6254      $echo "$help" 1>&2
6255      exit $EXIT_FAILURE
6256    fi
6257
6258    if test -z "$files"; then
6259      if test -z "$dest"; then
6260	$echo "$modename: no file or destination specified" 1>&2
6261      else
6262	$echo "$modename: you must specify a destination" 1>&2
6263      fi
6264      $echo "$help" 1>&2
6265      exit $EXIT_FAILURE
6266    fi
6267
6268    # Strip any trailing slash from the destination.
6269    dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
6270
6271    # Check to see that the destination is a directory.
6272    test -d "$dest" && isdir=yes
6273    if test "$isdir" = yes; then
6274      destdir="$dest"
6275      destname=
6276    else
6277      destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
6278      test "X$destdir" = "X$dest" && destdir=.
6279      destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
6280
6281      # Not a directory, so check to see that there is only one file specified.
6282      set dummy $files
6283      if test "$#" -gt 2; then
6284	$echo "$modename: \`$dest' is not a directory" 1>&2
6285	$echo "$help" 1>&2
6286	exit $EXIT_FAILURE
6287      fi
6288    fi
6289    case $destdir in
6290    [\\/]* | [A-Za-z]:[\\/]*) ;;
6291    *)
6292      for file in $files; do
6293	case $file in
6294	*.lo) ;;
6295	*)
6296	  $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
6297	  $echo "$help" 1>&2
6298	  exit $EXIT_FAILURE
6299	  ;;
6300	esac
6301      done
6302      ;;
6303    esac
6304
6305    # This variable tells wrapper scripts just to set variables rather
6306    # than running their programs.
6307    libtool_install_magic="$magic"
6308
6309    staticlibs=
6310    future_libdirs=
6311    current_libdirs=
6312    for file in $files; do
6313
6314      # Do each installation.
6315      case $file in
6316      *.$libext)
6317	# Do the static libraries later.
6318	staticlibs="$staticlibs $file"
6319	;;
6320
6321      *.la)
6322	# Check to see that this really is a libtool archive.
6323	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
6324	else
6325	  $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
6326	  $echo "$help" 1>&2
6327	  exit $EXIT_FAILURE
6328	fi
6329
6330	library_names=
6331	old_library=
6332	relink_command=
6333	# If there is no directory component, then add one.
6334	case $file in
6335	*/* | *\\*) . $file ;;
6336	*) . ./$file ;;
6337	esac
6338
6339	# Add the libdir to current_libdirs if it is the destination.
6340	if test "X$destdir" = "X$libdir"; then
6341	  case "$current_libdirs " in
6342	  *" $libdir "*) ;;
6343	  *) current_libdirs="$current_libdirs $libdir" ;;
6344	  esac
6345	else
6346	  # Note the libdir as a future libdir.
6347	  case "$future_libdirs " in
6348	  *" $libdir "*) ;;
6349	  *) future_libdirs="$future_libdirs $libdir" ;;
6350	  esac
6351	fi
6352
6353	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
6354	test "X$dir" = "X$file/" && dir=
6355	dir="$dir$objdir"
6356
6357	if test -n "$relink_command"; then
6358	  # Determine the prefix the user has applied to our future dir.
6359	  inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
6360
6361	  # Don't allow the user to place us outside of our expected
6362	  # location b/c this prevents finding dependent libraries that
6363	  # are installed to the same prefix.
6364	  # At present, this check doesn't affect windows .dll's that
6365	  # are installed into $libdir/../bin (currently, that works fine)
6366	  # but it's something to keep an eye on.
6367	  if test "$inst_prefix_dir" = "$destdir"; then
6368	    $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
6369	    exit $EXIT_FAILURE
6370	  fi
6371
6372	  if test -n "$inst_prefix_dir"; then
6373	    # Stick the inst_prefix_dir data into the link command.
6374	    relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
6375	  else
6376	    relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
6377	  fi
6378
6379	  $echo "$modename: warning: relinking \`$file'" 1>&2
6380	  $show "$relink_command"
6381	  if $run eval "$relink_command"; then :
6382	  else
6383	    $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6384	    exit $EXIT_FAILURE
6385	  fi
6386	fi
6387
6388	# See the names of the shared library.
6389	set dummy $library_names
6390	if test -n "$2"; then
6391	  realname="$2"
6392	  shift
6393	  shift
6394
6395	  srcname="$realname"
6396	  test -n "$relink_command" && srcname="$realname"T
6397
6398	  # Install the shared library and build the symlinks.
6399	  $show "$install_prog $dir/$srcname $destdir/$realname"
6400	  $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
6401	  if test -n "$stripme" && test -n "$striplib"; then
6402	    $show "$striplib $destdir/$realname"
6403	    $run eval "$striplib $destdir/$realname" || exit $?
6404	  fi
6405
6406	  if test "$#" -gt 0; then
6407	    # Delete the old symlinks, and create new ones.
6408	    # Try `ln -sf' first, because the `ln' binary might depend on
6409	    # the symlink we replace!  Solaris /bin/ln does not understand -f,
6410	    # so we also need to try rm && ln -s.
6411	    for linkname
6412	    do
6413	      if test "$linkname" != "$realname"; then
6414                $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
6415                $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
6416	      fi
6417	    done
6418	  fi
6419
6420	  # Do each command in the postinstall commands.
6421	  lib="$destdir/$realname"
6422	  cmds=$postinstall_cmds
6423	  save_ifs="$IFS"; IFS='~'
6424	  for cmd in $cmds; do
6425	    IFS="$save_ifs"
6426	    eval cmd=\"$cmd\"
6427	    $show "$cmd"
6428	    $run eval "$cmd" || {
6429	      lt_exit=$?
6430
6431	      # Restore the uninstalled library and exit
6432	      if test "$mode" = relink; then
6433		$run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
6434	      fi
6435
6436	      exit $lt_exit
6437	    }
6438	  done
6439	  IFS="$save_ifs"
6440	fi
6441
6442	# Install the pseudo-library for information purposes.
6443	name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6444	instname="$dir/$name"i
6445	$show "$install_prog $instname $destdir/$name"
6446	$run eval "$install_prog $instname $destdir/$name" || exit $?
6447
6448	# Maybe install the static library, too.
6449	test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
6450	;;
6451
6452      *.lo)
6453	# Install (i.e. copy) a libtool object.
6454
6455	# Figure out destination file name, if it wasn't already specified.
6456	if test -n "$destname"; then
6457	  destfile="$destdir/$destname"
6458	else
6459	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6460	  destfile="$destdir/$destfile"
6461	fi
6462
6463	# Deduce the name of the destination old-style object file.
6464	case $destfile in
6465	*.lo)
6466	  staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
6467	  ;;
6468	*.$objext)
6469	  staticdest="$destfile"
6470	  destfile=
6471	  ;;
6472	*)
6473	  $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
6474	  $echo "$help" 1>&2
6475	  exit $EXIT_FAILURE
6476	  ;;
6477	esac
6478
6479	# Install the libtool object if requested.
6480	if test -n "$destfile"; then
6481	  $show "$install_prog $file $destfile"
6482	  $run eval "$install_prog $file $destfile" || exit $?
6483	fi
6484
6485	# Install the old object if enabled.
6486	if test "$build_old_libs" = yes; then
6487	  # Deduce the name of the old-style object file.
6488	  staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
6489
6490	  $show "$install_prog $staticobj $staticdest"
6491	  $run eval "$install_prog \$staticobj \$staticdest" || exit $?
6492	fi
6493	exit $EXIT_SUCCESS
6494	;;
6495
6496      *)
6497	# Figure out destination file name, if it wasn't already specified.
6498	if test -n "$destname"; then
6499	  destfile="$destdir/$destname"
6500	else
6501	  destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6502	  destfile="$destdir/$destfile"
6503	fi
6504
6505	# If the file is missing, and there is a .exe on the end, strip it
6506	# because it is most likely a libtool script we actually want to
6507	# install
6508	stripped_ext=""
6509	case $file in
6510	  *.exe)
6511	    if test ! -f "$file"; then
6512	      file=`$echo $file|${SED} 's,.exe$,,'`
6513	      stripped_ext=".exe"
6514	    fi
6515	    ;;
6516	esac
6517
6518	# Do a test to see if this is really a libtool program.
6519	case $host in
6520	*cygwin*|*mingw*)
6521	    wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
6522	    ;;
6523	*)
6524	    wrapper=$file
6525	    ;;
6526	esac
6527	if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
6528	  notinst_deplibs=
6529	  relink_command=
6530
6531	  # Note that it is not necessary on cygwin/mingw to append a dot to
6532	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
6533	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
6534	  # `FILE.' does not work on cygwin managed mounts.
6535	  #
6536	  # If there is no directory component, then add one.
6537	  case $wrapper in
6538	  */* | *\\*) . ${wrapper} ;;
6539	  *) . ./${wrapper} ;;
6540	  esac
6541
6542	  # Check the variables that should have been set.
6543	  if test -z "$notinst_deplibs"; then
6544	    $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
6545	    exit $EXIT_FAILURE
6546	  fi
6547
6548	  finalize=yes
6549	  for lib in $notinst_deplibs; do
6550	    # Check to see that each library is installed.
6551	    libdir=
6552	    if test -f "$lib"; then
6553	      # If there is no directory component, then add one.
6554	      case $lib in
6555	      */* | *\\*) . $lib ;;
6556	      *) . ./$lib ;;
6557	      esac
6558	    fi
6559	    libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
6560	    if test -n "$libdir" && test ! -f "$libfile"; then
6561	      $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
6562	      finalize=no
6563	    fi
6564	  done
6565
6566	  relink_command=
6567	  # Note that it is not necessary on cygwin/mingw to append a dot to
6568	  # foo even if both foo and FILE.exe exist: automatic-append-.exe
6569	  # behavior happens only for exec(3), not for open(2)!  Also, sourcing
6570	  # `FILE.' does not work on cygwin managed mounts.
6571	  #
6572	  # If there is no directory component, then add one.
6573	  case $wrapper in
6574	  */* | *\\*) . ${wrapper} ;;
6575	  *) . ./${wrapper} ;;
6576	  esac
6577
6578	  outputname=
6579	  if test "$fast_install" = no && test -n "$relink_command"; then
6580	    if test "$finalize" = yes && test -z "$run"; then
6581	      tmpdir=`func_mktempdir`
6582	      file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6583	      outputname="$tmpdir/$file"
6584	      # Replace the output file specification.
6585	      relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
6586
6587	      $show "$relink_command"
6588	      if $run eval "$relink_command"; then :
6589	      else
6590		$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6591		${rm}r "$tmpdir"
6592		continue
6593	      fi
6594	      file="$outputname"
6595	    else
6596	      $echo "$modename: warning: cannot relink \`$file'" 1>&2
6597	    fi
6598	  else
6599	    # Install the binary that we compiled earlier.
6600	    file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
6601	  fi
6602	fi
6603
6604	# remove .exe since cygwin /usr/bin/install will append another
6605	# one anyway
6606	case $install_prog,$host in
6607	*/usr/bin/install*,*cygwin*)
6608	  case $file:$destfile in
6609	  *.exe:*.exe)
6610	    # this is ok
6611	    ;;
6612	  *.exe:*)
6613	    destfile=$destfile.exe
6614	    ;;
6615	  *:*.exe)
6616	    destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
6617	    ;;
6618	  esac
6619	  ;;
6620	esac
6621	$show "$install_prog$stripme $file $destfile"
6622	$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
6623	test -n "$outputname" && ${rm}r "$tmpdir"
6624	;;
6625      esac
6626    done
6627
6628    for file in $staticlibs; do
6629      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6630
6631      # Set up the ranlib parameters.
6632      oldlib="$destdir/$name"
6633
6634      $show "$install_prog $file $oldlib"
6635      $run eval "$install_prog \$file \$oldlib" || exit $?
6636
6637      if test -n "$stripme" && test -n "$old_striplib"; then
6638	$show "$old_striplib $oldlib"
6639	$run eval "$old_striplib $oldlib" || exit $?
6640      fi
6641
6642      # Do each command in the postinstall commands.
6643      cmds=$old_postinstall_cmds
6644      save_ifs="$IFS"; IFS='~'
6645      for cmd in $cmds; do
6646	IFS="$save_ifs"
6647	eval cmd=\"$cmd\"
6648	$show "$cmd"
6649	$run eval "$cmd" || exit $?
6650      done
6651      IFS="$save_ifs"
6652    done
6653
6654    if test -n "$future_libdirs"; then
6655      $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
6656    fi
6657
6658    if test -n "$current_libdirs"; then
6659      # Maybe just do a dry run.
6660      test -n "$run" && current_libdirs=" -n$current_libdirs"
6661      exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
6662    else
6663      exit $EXIT_SUCCESS
6664    fi
6665    ;;
6666
6667  # libtool finish mode
6668  finish)
6669    modename="$modename: finish"
6670    libdirs="$nonopt"
6671    admincmds=
6672
6673    if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
6674      for dir
6675      do
6676	libdirs="$libdirs $dir"
6677      done
6678
6679      for libdir in $libdirs; do
6680	if test -n "$finish_cmds"; then
6681	  # Do each command in the finish commands.
6682	  cmds=$finish_cmds
6683	  save_ifs="$IFS"; IFS='~'
6684	  for cmd in $cmds; do
6685	    IFS="$save_ifs"
6686	    eval cmd=\"$cmd\"
6687	    $show "$cmd"
6688	    $run eval "$cmd" || admincmds="$admincmds
6689       $cmd"
6690	  done
6691	  IFS="$save_ifs"
6692	fi
6693	if test -n "$finish_eval"; then
6694	  # Do the single finish_eval.
6695	  eval cmds=\"$finish_eval\"
6696	  $run eval "$cmds" || admincmds="$admincmds
6697       $cmds"
6698	fi
6699      done
6700    fi
6701
6702    # Exit here if they wanted silent mode.
6703    test "$show" = : && exit $EXIT_SUCCESS
6704
6705    $echo "X----------------------------------------------------------------------" | $Xsed
6706    $echo "Libraries have been installed in:"
6707    for libdir in $libdirs; do
6708      $echo "   $libdir"
6709    done
6710    $echo
6711    $echo "If you ever happen to want to link against installed libraries"
6712    $echo "in a given directory, LIBDIR, you must either use libtool, and"
6713    $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
6714    $echo "flag during linking and do at least one of the following:"
6715    if test -n "$shlibpath_var"; then
6716      $echo "   - add LIBDIR to the \`$shlibpath_var' environment variable"
6717      $echo "     during execution"
6718    fi
6719    if test -n "$runpath_var"; then
6720      $echo "   - add LIBDIR to the \`$runpath_var' environment variable"
6721      $echo "     during linking"
6722    fi
6723    if test -n "$hardcode_libdir_flag_spec"; then
6724      libdir=LIBDIR
6725      eval flag=\"$hardcode_libdir_flag_spec\"
6726
6727      $echo "   - use the \`$flag' linker flag"
6728    fi
6729    if test -n "$admincmds"; then
6730      $echo "   - have your system administrator run these commands:$admincmds"
6731    fi
6732    if test -f /etc/ld.so.conf; then
6733      $echo "   - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
6734    fi
6735    $echo
6736    $echo "See any operating system documentation about shared libraries for"
6737    $echo "more information, such as the ld(1) and ld.so(8) manual pages."
6738    $echo "X----------------------------------------------------------------------" | $Xsed
6739    exit $EXIT_SUCCESS
6740    ;;
6741
6742  # libtool execute mode
6743  execute)
6744    modename="$modename: execute"
6745
6746    # The first argument is the command name.
6747    cmd="$nonopt"
6748    if test -z "$cmd"; then
6749      $echo "$modename: you must specify a COMMAND" 1>&2
6750      $echo "$help"
6751      exit $EXIT_FAILURE
6752    fi
6753
6754    # Handle -dlopen flags immediately.
6755    for file in $execute_dlfiles; do
6756      if test ! -f "$file"; then
6757	$echo "$modename: \`$file' is not a file" 1>&2
6758	$echo "$help" 1>&2
6759	exit $EXIT_FAILURE
6760      fi
6761
6762      dir=
6763      case $file in
6764      *.la)
6765	# Check to see that this really is a libtool archive.
6766	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
6767	else
6768	  $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6769	  $echo "$help" 1>&2
6770	  exit $EXIT_FAILURE
6771	fi
6772
6773	# Read the libtool library.
6774	dlname=
6775	library_names=
6776
6777	# If there is no directory component, then add one.
6778	case $file in
6779	*/* | *\\*) . $file ;;
6780	*) . ./$file ;;
6781	esac
6782
6783	# Skip this library if it cannot be dlopened.
6784	if test -z "$dlname"; then
6785	  # Warn if it was a shared library.
6786	  test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
6787	  continue
6788	fi
6789
6790	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6791	test "X$dir" = "X$file" && dir=.
6792
6793	if test -f "$dir/$objdir/$dlname"; then
6794	  dir="$dir/$objdir"
6795	else
6796	  if test ! -f "$dir/$dlname"; then
6797	    $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6798	    exit $EXIT_FAILURE
6799	  fi
6800	fi
6801	;;
6802
6803      *.lo)
6804	# Just add the directory containing the .lo file.
6805	dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6806	test "X$dir" = "X$file" && dir=.
6807	;;
6808
6809      *)
6810	$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
6811	continue
6812	;;
6813      esac
6814
6815      # Get the absolute pathname.
6816      absdir=`cd "$dir" && pwd`
6817      test -n "$absdir" && dir="$absdir"
6818
6819      # Now add the directory to shlibpath_var.
6820      if eval "test -z \"\$$shlibpath_var\""; then
6821	eval "$shlibpath_var=\"\$dir\""
6822      else
6823	eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
6824      fi
6825    done
6826
6827    # This variable tells wrapper scripts just to set shlibpath_var
6828    # rather than running their programs.
6829    libtool_execute_magic="$magic"
6830
6831    # Check if any of the arguments is a wrapper script.
6832    args=
6833    for file
6834    do
6835      case $file in
6836      -*) ;;
6837      *)
6838	# Do a test to see if this is really a libtool program.
6839	if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6840	  # If there is no directory component, then add one.
6841	  case $file in
6842	  */* | *\\*) . $file ;;
6843	  *) . ./$file ;;
6844	  esac
6845
6846	  # Transform arg to wrapped name.
6847	  file="$progdir/$program"
6848	fi
6849	;;
6850      esac
6851      # Quote arguments (to preserve shell metacharacters).
6852      file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
6853      args="$args \"$file\""
6854    done
6855
6856    if test -z "$run"; then
6857      if test -n "$shlibpath_var"; then
6858	# Export the shlibpath_var.
6859	eval "export $shlibpath_var"
6860      fi
6861
6862      # Restore saved environment variables
6863      for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
6864      do
6865	eval "if test \"\${save_$lt_var+set}\" = set; then
6866		$lt_var=\$save_$lt_var; export $lt_var
6867	      fi"
6868      done
6869
6870      # Now prepare to actually exec the command.
6871      exec_cmd="\$cmd$args"
6872    else
6873      # Display what would be done.
6874      if test -n "$shlibpath_var"; then
6875	eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
6876	$echo "export $shlibpath_var"
6877      fi
6878      $echo "$cmd$args"
6879      exit $EXIT_SUCCESS
6880    fi
6881    ;;
6882
6883  # libtool clean and uninstall mode
6884  clean | uninstall)
6885    modename="$modename: $mode"
6886    rm="$nonopt"
6887    files=
6888    rmforce=
6889    exit_status=0
6890
6891    # This variable tells wrapper scripts just to set variables rather
6892    # than running their programs.
6893    libtool_install_magic="$magic"
6894
6895    for arg
6896    do
6897      case $arg in
6898      -f) rm="$rm $arg"; rmforce=yes ;;
6899      -*) rm="$rm $arg" ;;
6900      *) files="$files $arg" ;;
6901      esac
6902    done
6903
6904    if test -z "$rm"; then
6905      $echo "$modename: you must specify an RM program" 1>&2
6906      $echo "$help" 1>&2
6907      exit $EXIT_FAILURE
6908    fi
6909
6910    rmdirs=
6911
6912    origobjdir="$objdir"
6913    for file in $files; do
6914      dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6915      if test "X$dir" = "X$file"; then
6916	dir=.
6917	objdir="$origobjdir"
6918      else
6919	objdir="$dir/$origobjdir"
6920      fi
6921      name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6922      test "$mode" = uninstall && objdir="$dir"
6923
6924      # Remember objdir for removal later, being careful to avoid duplicates
6925      if test "$mode" = clean; then
6926	case " $rmdirs " in
6927	  *" $objdir "*) ;;
6928	  *) rmdirs="$rmdirs $objdir" ;;
6929	esac
6930      fi
6931
6932      # Don't error if the file doesn't exist and rm -f was used.
6933      if (test -L "$file") >/dev/null 2>&1 \
6934	|| (test -h "$file") >/dev/null 2>&1 \
6935	|| test -f "$file"; then
6936	:
6937      elif test -d "$file"; then
6938	exit_status=1
6939	continue
6940      elif test "$rmforce" = yes; then
6941	continue
6942      fi
6943
6944      rmfiles="$file"
6945
6946      case $name in
6947      *.la)
6948	# Possibly a libtool archive, so verify it.
6949	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6950	  . $dir/$name
6951
6952	  # Delete the libtool libraries and symlinks.
6953	  for n in $library_names; do
6954	    rmfiles="$rmfiles $objdir/$n"
6955	  done
6956	  test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
6957
6958	  case "$mode" in
6959	  clean)
6960	    case "  $library_names " in
6961	    # "  " in the beginning catches empty $dlname
6962	    *" $dlname "*) ;;
6963	    *) rmfiles="$rmfiles $objdir/$dlname" ;;
6964	    esac
6965	     test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
6966	    ;;
6967	  uninstall)
6968	    if test -n "$library_names"; then
6969	      # Do each command in the postuninstall commands.
6970	      cmds=$postuninstall_cmds
6971	      save_ifs="$IFS"; IFS='~'
6972	      for cmd in $cmds; do
6973		IFS="$save_ifs"
6974		eval cmd=\"$cmd\"
6975		$show "$cmd"
6976		$run eval "$cmd"
6977		if test "$?" -ne 0 && test "$rmforce" != yes; then
6978		  exit_status=1
6979		fi
6980	      done
6981	      IFS="$save_ifs"
6982	    fi
6983
6984	    if test -n "$old_library"; then
6985	      # Do each command in the old_postuninstall commands.
6986	      cmds=$old_postuninstall_cmds
6987	      save_ifs="$IFS"; IFS='~'
6988	      for cmd in $cmds; do
6989		IFS="$save_ifs"
6990		eval cmd=\"$cmd\"
6991		$show "$cmd"
6992		$run eval "$cmd"
6993		if test "$?" -ne 0 && test "$rmforce" != yes; then
6994		  exit_status=1
6995		fi
6996	      done
6997	      IFS="$save_ifs"
6998	    fi
6999	    # FIXME: should reinstall the best remaining shared library.
7000	    ;;
7001	  esac
7002	fi
7003	;;
7004
7005      *.lo)
7006	# Possibly a libtool object, so verify it.
7007	if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
7008
7009	  # Read the .lo file
7010	  . $dir/$name
7011
7012	  # Add PIC object to the list of files to remove.
7013	  if test -n "$pic_object" \
7014	     && test "$pic_object" != none; then
7015	    rmfiles="$rmfiles $dir/$pic_object"
7016	  fi
7017
7018	  # Add non-PIC object to the list of files to remove.
7019	  if test -n "$non_pic_object" \
7020	     && test "$non_pic_object" != none; then
7021	    rmfiles="$rmfiles $dir/$non_pic_object"
7022	  fi
7023	fi
7024	;;
7025
7026      *)
7027	if test "$mode" = clean ; then
7028	  noexename=$name
7029	  case $file in
7030	  *.exe)
7031	    file=`$echo $file|${SED} 's,.exe$,,'`
7032	    noexename=`$echo $name|${SED} 's,.exe$,,'`
7033	    # $file with .exe has already been added to rmfiles,
7034	    # add $file without .exe
7035	    rmfiles="$rmfiles $file"
7036	    ;;
7037	  esac
7038	  # Do a test to see if this is a libtool program.
7039	  if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
7040	    relink_command=
7041	    . $dir/$noexename
7042
7043	    # note $name still contains .exe if it was in $file originally
7044	    # as does the version of $file that was added into $rmfiles
7045	    rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
7046	    if test "$fast_install" = yes && test -n "$relink_command"; then
7047	      rmfiles="$rmfiles $objdir/lt-$name"
7048	    fi
7049	    if test "X$noexename" != "X$name" ; then
7050	      rmfiles="$rmfiles $objdir/lt-${noexename}.c"
7051	    fi
7052	  fi
7053	fi
7054	;;
7055      esac
7056      $show "$rm $rmfiles"
7057      $run $rm $rmfiles || exit_status=1
7058    done
7059    objdir="$origobjdir"
7060
7061    # Try to remove the ${objdir}s in the directories where we deleted files
7062    for dir in $rmdirs; do
7063      if test -d "$dir"; then
7064	$show "rmdir $dir"
7065	$run rmdir $dir >/dev/null 2>&1
7066      fi
7067    done
7068
7069    exit $exit_status
7070    ;;
7071
7072  "")
7073    $echo "$modename: you must specify a MODE" 1>&2
7074    $echo "$generic_help" 1>&2
7075    exit $EXIT_FAILURE
7076    ;;
7077  esac
7078
7079  if test -z "$exec_cmd"; then
7080    $echo "$modename: invalid operation mode \`$mode'" 1>&2
7081    $echo "$generic_help" 1>&2
7082    exit $EXIT_FAILURE
7083  fi
7084fi # test -z "$show_help"
7085
7086if test -n "$exec_cmd"; then
7087  eval exec $exec_cmd
7088  exit $EXIT_FAILURE
7089fi
7090
7091# We need to display help for each of the modes.
7092case $mode in
7093"") $echo \
7094"Usage: $modename [OPTION]... [MODE-ARG]...
7095
7096Provide generalized library-building support services.
7097
7098    --config          show all configuration variables
7099    --debug           enable verbose shell tracing
7100-n, --dry-run         display commands without modifying any files
7101    --features        display basic configuration information and exit
7102    --finish          same as \`--mode=finish'
7103    --help            display this help message and exit
7104    --mode=MODE       use operation mode MODE [default=inferred from MODE-ARGS]
7105    --quiet           same as \`--silent'
7106    --silent          don't print informational messages
7107    --tag=TAG         use configuration variables from tag TAG
7108    --version         print version information
7109
7110MODE must be one of the following:
7111
7112      clean           remove files from the build directory
7113      compile         compile a source file into a libtool object
7114      execute         automatically set library path, then run a program
7115      finish          complete the installation of libtool libraries
7116      install         install libraries or executables
7117      link            create a library or an executable
7118      uninstall       remove libraries from an installed directory
7119
7120MODE-ARGS vary depending on the MODE.  Try \`$modename --help --mode=MODE' for
7121a more detailed description of MODE.
7122
7123Report bugs to <bug-libtool@gnu.org>."
7124  exit $EXIT_SUCCESS
7125  ;;
7126
7127clean)
7128  $echo \
7129"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
7130
7131Remove files from the build directory.
7132
7133RM is the name of the program to use to delete files associated with each FILE
7134(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
7135to RM.
7136
7137If FILE is a libtool library, object or program, all the files associated
7138with it are deleted. Otherwise, only FILE itself is deleted using RM."
7139  ;;
7140
7141compile)
7142  $echo \
7143"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
7144
7145Compile a source file into a libtool library object.
7146
7147This mode accepts the following additional options:
7148
7149  -o OUTPUT-FILE    set the output file name to OUTPUT-FILE
7150  -prefer-pic       try to building PIC objects only
7151  -prefer-non-pic   try to building non-PIC objects only
7152  -static           always build a \`.o' file suitable for static linking
7153
7154COMPILE-COMMAND is a command to be used in creating a \`standard' object file
7155from the given SOURCEFILE.
7156
7157The output file name is determined by removing the directory component from
7158SOURCEFILE, then substituting the C source code suffix \`.c' with the
7159library object suffix, \`.lo'."
7160  ;;
7161
7162execute)
7163  $echo \
7164"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
7165
7166Automatically set library path, then run a program.
7167
7168This mode accepts the following additional options:
7169
7170  -dlopen FILE      add the directory containing FILE to the library path
7171
7172This mode sets the library path environment variable according to \`-dlopen'
7173flags.
7174
7175If any of the ARGS are libtool executable wrappers, then they are translated
7176into their corresponding uninstalled binary, and any of their required library
7177directories are added to the library path.
7178
7179Then, COMMAND is executed, with ARGS as arguments."
7180  ;;
7181
7182finish)
7183  $echo \
7184"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
7185
7186Complete the installation of libtool libraries.
7187
7188Each LIBDIR is a directory that contains libtool libraries.
7189
7190The commands that this mode executes may require superuser privileges.  Use
7191the \`--dry-run' option if you just want to see what would be executed."
7192  ;;
7193
7194install)
7195  $echo \
7196"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
7197
7198Install executables or libraries.
7199
7200INSTALL-COMMAND is the installation command.  The first component should be
7201either the \`install' or \`cp' program.
7202
7203The rest of the components are interpreted as arguments to that command (only
7204BSD-compatible install options are recognized)."
7205  ;;
7206
7207link)
7208  $echo \
7209"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
7210
7211Link object files or libraries together to form another library, or to
7212create an executable program.
7213
7214LINK-COMMAND is a command using the C compiler that you would use to create
7215a program from several object files.
7216
7217The following components of LINK-COMMAND are treated specially:
7218
7219  -all-static       do not do any dynamic linking at all
7220  -avoid-version    do not add a version suffix if possible
7221  -dlopen FILE      \`-dlpreopen' FILE if it cannot be dlopened at runtime
7222  -dlpreopen FILE   link in FILE and add its symbols to lt_preloaded_symbols
7223  -export-dynamic   allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
7224  -export-symbols SYMFILE
7225                    try to export only the symbols listed in SYMFILE
7226  -export-symbols-regex REGEX
7227                    try to export only the symbols matching REGEX
7228  -LLIBDIR          search LIBDIR for required installed libraries
7229  -lNAME            OUTPUT-FILE requires the installed library libNAME
7230  -module           build a library that can dlopened
7231  -no-fast-install  disable the fast-install mode
7232  -no-install       link a not-installable executable
7233  -no-undefined     declare that a library does not refer to external symbols
7234  -o OUTPUT-FILE    create OUTPUT-FILE from the specified objects
7235  -objectlist FILE  Use a list of object files found in FILE to specify objects
7236  -precious-files-regex REGEX
7237                    don't remove output files matching REGEX
7238  -release RELEASE  specify package release information
7239  -rpath LIBDIR     the created library will eventually be installed in LIBDIR
7240  -R[ ]LIBDIR       add LIBDIR to the runtime path of programs and libraries
7241  -static           do not do any dynamic linking of uninstalled libtool libraries
7242  -static-libtool-libs
7243                    do not do any dynamic linking of libtool libraries
7244  -version-info CURRENT[:REVISION[:AGE]]
7245                    specify library version info [each variable defaults to 0]
7246
7247All other options (arguments beginning with \`-') are ignored.
7248
7249Every other argument is treated as a filename.  Files ending in \`.la' are
7250treated as uninstalled libtool libraries, other files are standard or library
7251object files.
7252
7253If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
7254only library objects (\`.lo' files) may be specified, and \`-rpath' is
7255required, except when creating a convenience library.
7256
7257If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
7258using \`ar' and \`ranlib', or on Windows using \`lib'.
7259
7260If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
7261is created, otherwise an executable program is created."
7262  ;;
7263
7264uninstall)
7265  $echo \
7266"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
7267
7268Remove libraries from an installation directory.
7269
7270RM is the name of the program to use to delete files associated with each FILE
7271(typically \`/bin/rm').  RM-OPTIONS are options (such as \`-f') to be passed
7272to RM.
7273
7274If FILE is a libtool library, all the files associated with it are deleted.
7275Otherwise, only FILE itself is deleted using RM."
7276  ;;
7277
7278*)
7279  $echo "$modename: invalid operation mode \`$mode'" 1>&2
7280  $echo "$help" 1>&2
7281  exit $EXIT_FAILURE
7282  ;;
7283esac
7284
7285$echo
7286$echo "Try \`$modename --help' for more information about other modes."
7287
7288exit $?
7289
7290# The TAGs below are defined such that we never get into a situation
7291# in which we disable both kinds of libraries.  Given conflicting
7292# choices, we go for a static library, that is the most portable,
7293# since we can't tell whether shared libraries were disabled because
7294# the user asked for that or because the platform doesn't support
7295# them.  This is particularly important on AIX, because we don't
7296# support having both static and shared libraries enabled at the same
7297# time on that platform, so we default to a shared-only configuration.
7298# If a disable-shared tag is given, we'll fallback to a static-only
7299# configuration.  But we'll never go from static-only to shared-only.
7300
7301# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
7302disable_libs=shared
7303# ### END LIBTOOL TAG CONFIG: disable-shared
7304
7305# ### BEGIN LIBTOOL TAG CONFIG: disable-static
7306disable_libs=static
7307# ### END LIBTOOL TAG CONFIG: disable-static
7308
7309# Local Variables:
7310# mode:shell-script
7311# sh-indentation:2
7312# End:
7313# ### BEGIN LIBTOOL TAG CONFIG: CXX
7314
7315# Libtool was configured on host cuberat.owensnet.com:
7316
7317# Shell to use when invoking shell scripts.
7318SHELL="/bin/sh"
7319
7320# Whether or not to build shared libraries.
7321build_libtool_libs=yes
7322
7323# Whether or not to build static libraries.
7324build_old_libs=yes
7325
7326# Whether or not to add -lc for building shared libraries.
7327build_libtool_need_lc=no
7328
7329# Whether or not to disallow shared libs when runtime libs are static
7330allow_libtool_libs_with_static_runtimes=no
7331
7332# Whether or not to optimize for fast installation.
7333fast_install=yes
7334
7335# The host system.
7336host_alias=
7337host=i686-pc-linux-gnu
7338host_os=linux-gnu
7339
7340# The build system.
7341build_alias=
7342build=i686-pc-linux-gnu
7343build_os=linux-gnu
7344
7345# An echo program that does not interpret backslashes.
7346echo="echo"
7347
7348# The archiver.
7349AR="ar"
7350AR_FLAGS="cru"
7351
7352# A C compiler.
7353LTCC="gcc"
7354
7355# LTCC compiler flags.
7356LTCFLAGS="-g -O2"
7357
7358# A language-specific compiler.
7359CC="g++"
7360
7361# Is the compiler the GNU C compiler?
7362with_gcc=yes
7363
7364# An ERE matcher.
7365EGREP="/bin/grep -E"
7366
7367# The linker used to build libraries.
7368LD="/usr/bin/ld"
7369
7370# Whether we need hard or soft links.
7371LN_S="ln -s"
7372
7373# A BSD-compatible nm program.
7374NM="/usr/bin/nm -B"
7375
7376# A symbol stripping program
7377STRIP="strip"
7378
7379# Used to examine libraries when file_magic_cmd begins "file"
7380MAGIC_CMD=file
7381
7382# Used on cygwin: DLL creation program.
7383DLLTOOL="dlltool"
7384
7385# Used on cygwin: object dumper.
7386OBJDUMP="objdump"
7387
7388# Used on cygwin: assembler.
7389AS="as"
7390
7391# The name of the directory that contains temporary libtool files.
7392objdir=.libs
7393
7394# How to create reloadable object files.
7395reload_flag=" -r"
7396reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
7397
7398# How to pass a linker flag through the compiler.
7399wl="-Wl,"
7400
7401# Object file suffix (normally "o").
7402objext="o"
7403
7404# Old archive suffix (normally "a").
7405libext="a"
7406
7407# Shared library suffix (normally ".so").
7408shrext_cmds='.so'
7409
7410# Executable file suffix (normally "").
7411exeext=""
7412
7413# Additional compiler flags for building library objects.
7414pic_flag=" -fPIC -DPIC"
7415pic_mode=default
7416
7417# What is the maximum length of a command?
7418max_cmd_len=1966080
7419
7420# Does compiler simultaneously support -c and -o options?
7421compiler_c_o="yes"
7422
7423# Must we lock files when doing compilation?
7424need_locks="no"
7425
7426# Do we need the lib prefix for modules?
7427need_lib_prefix=no
7428
7429# Do we need a version for libraries?
7430need_version=no
7431
7432# Whether dlopen is supported.
7433dlopen_support=unknown
7434
7435# Whether dlopen of programs is supported.
7436dlopen_self=unknown
7437
7438# Whether dlopen of statically linked programs is supported.
7439dlopen_self_static=unknown
7440
7441# Compiler flag to prevent dynamic linking.
7442link_static_flag="-static"
7443
7444# Compiler flag to turn off builtin functions.
7445no_builtin_flag=" -fno-builtin"
7446
7447# Compiler flag to allow reflexive dlopens.
7448export_dynamic_flag_spec="\${wl}--export-dynamic"
7449
7450# Compiler flag to generate shared objects directly from archives.
7451whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
7452
7453# Compiler flag to generate thread-safe objects.
7454thread_safe_flag_spec=""
7455
7456# Library versioning type.
7457version_type=linux
7458
7459# Format of library name prefix.
7460libname_spec="lib\$name"
7461
7462# List of archive names.  First name is the real one, the rest are links.
7463# The last name is the one that the linker finds with -lNAME.
7464library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
7465
7466# The coded name of the library, if different from the real name.
7467soname_spec="\${libname}\${release}\${shared_ext}\$major"
7468
7469# Commands used to build and install an old-style archive.
7470RANLIB="ranlib"
7471old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
7472old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
7473old_postuninstall_cmds=""
7474
7475# Create an old-style archive from a shared archive.
7476old_archive_from_new_cmds=""
7477
7478# Create a temporary old-style archive to link instead of a shared archive.
7479old_archive_from_expsyms_cmds=""
7480
7481# Commands used to build and install a shared archive.
7482archive_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
7483archive_expsym_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib"
7484postinstall_cmds=""
7485postuninstall_cmds=""
7486
7487# Commands used to build a loadable module (assumed same as above if empty)
7488module_cmds=""
7489module_expsym_cmds=""
7490
7491# Commands to strip libraries.
7492old_striplib="strip --strip-debug"
7493striplib="strip --strip-unneeded"
7494
7495# Dependencies to place before the objects being linked to create a
7496# shared library.
7497predep_objects="/usr/lib/gcc/i386-redhat-linux/4.3.2/../../../crti.o /usr/lib/gcc/i386-redhat-linux/4.3.2/crtbeginS.o"
7498
7499# Dependencies to place after the objects being linked to create a
7500# shared library.
7501postdep_objects="/usr/lib/gcc/i386-redhat-linux/4.3.2/crtendS.o /usr/lib/gcc/i386-redhat-linux/4.3.2/../../../crtn.o"
7502
7503# Dependencies to place before the objects being linked to create a
7504# shared library.
7505predeps=""
7506
7507# Dependencies to place after the objects being linked to create a
7508# shared library.
7509postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s"
7510
7511# The directories searched by this compiler when creating a shared
7512# library
7513compiler_lib_search_dirs="/usr/lib/gcc/i386-redhat-linux/4.3.2 /usr/lib/gcc/i386-redhat-linux/4.3.2 /usr/lib/gcc/i386-redhat-linux/4.3.2/../../.."
7514
7515# The library search path used internally by the compiler when linking
7516# a shared library.
7517compiler_lib_search_path="-L/usr/lib/gcc/i386-redhat-linux/4.3.2 -L/usr/lib/gcc/i386-redhat-linux/4.3.2 -L/usr/lib/gcc/i386-redhat-linux/4.3.2/../../.."
7518
7519# Method to check whether dependent libraries are shared objects.
7520deplibs_check_method="pass_all"
7521
7522# Command to use when deplibs_check_method == file_magic.
7523file_magic_cmd="\$MAGIC_CMD"
7524
7525# Flag that allows shared libraries with undefined symbols to be built.
7526allow_undefined_flag=""
7527
7528# Flag that forces no undefined symbols.
7529no_undefined_flag=""
7530
7531# Commands used to finish a libtool library installation in a directory.
7532finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
7533
7534# Same as above, but a single script fragment to be evaled but not shown.
7535finish_eval=""
7536
7537# Take the output of nm and produce a listing of raw symbols and C names.
7538global_symbol_pipe="sed -n -e 's/^.*[ 	]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ 	][ 	]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
7539
7540# Transform the output of nm in a proper C declaration
7541global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
7542
7543# Transform the output of nm in a C name address pair
7544global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/  {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/  {\"\\2\", (lt_ptr) \\&\\2},/p'"
7545
7546# This is the shared library runtime path variable.
7547runpath_var=LD_RUN_PATH
7548
7549# This is the shared library path variable.
7550shlibpath_var=LD_LIBRARY_PATH
7551
7552# Is shlibpath searched before the hard-coded library search path?
7553shlibpath_overrides_runpath=no
7554
7555# How to hardcode a shared library path into an executable.
7556hardcode_action=immediate
7557
7558# Whether we should hardcode library paths into libraries.
7559hardcode_into_libs=yes
7560
7561# Flag to hardcode $libdir into a binary during linking.
7562# This must work even if $libdir does not exist.
7563hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
7564
7565# If ld is used when linking, flag to hardcode $libdir into
7566# a binary during linking. This must work even if $libdir does
7567# not exist.
7568hardcode_libdir_flag_spec_ld=""
7569
7570# Whether we need a single -rpath flag with a separated argument.
7571hardcode_libdir_separator=""
7572
7573# Set to yes if using DIR/libNAME during linking hardcodes DIR into the
7574# resulting binary.
7575hardcode_direct=no
7576
7577# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7578# resulting binary.
7579hardcode_minus_L=no
7580
7581# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7582# the resulting binary.
7583hardcode_shlibpath_var=unsupported
7584
7585# Set to yes if building a shared library automatically hardcodes DIR into the library
7586# and all subsequent libraries and executables linked against it.
7587hardcode_automatic=no
7588
7589# Variables whose values should be saved in libtool wrapper scripts and
7590# restored at relink time.
7591variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7592
7593# Whether libtool must link a program against all its dependency libraries.
7594link_all_deplibs=unknown
7595
7596# Compile-time system search path for libraries
7597sys_lib_search_path_spec="/usr/lib /lib /usr/local/lib"
7598
7599# Run-time system search path for libraries
7600sys_lib_dlsearch_path_spec="/usr/lib /lib /usr/local/lib /usr/local/mysql/lib/mysql /usr/lib/qt-3.3/lib /usr/lib/xulrunner-1.9 "
7601
7602# Fix the shell variable $srcfile for the compiler.
7603fix_srcfile_path=""
7604
7605# Set to yes if exported symbols are required.
7606always_export_symbols=no
7607
7608# The commands to list exported symbols.
7609export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
7610
7611# The commands to extract the exported symbol list from a shared archive.
7612extract_expsyms_cmds=""
7613
7614# Symbols that should not be listed in the preloaded symbols.
7615exclude_expsyms="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*"
7616
7617# Symbols that must always be exported.
7618include_expsyms=""
7619
7620# ### END LIBTOOL TAG CONFIG: CXX
7621
7622# ### BEGIN LIBTOOL TAG CONFIG: F77
7623
7624# Libtool was configured on host cuberat.owensnet.com:
7625
7626# Shell to use when invoking shell scripts.
7627SHELL="/bin/sh"
7628
7629# Whether or not to build shared libraries.
7630build_libtool_libs=yes
7631
7632# Whether or not to build static libraries.
7633build_old_libs=yes
7634
7635# Whether or not to add -lc for building shared libraries.
7636build_libtool_need_lc=no
7637
7638# Whether or not to disallow shared libs when runtime libs are static
7639allow_libtool_libs_with_static_runtimes=no
7640
7641# Whether or not to optimize for fast installation.
7642fast_install=yes
7643
7644# The host system.
7645host_alias=
7646host=i686-pc-linux-gnu
7647host_os=linux-gnu
7648
7649# The build system.
7650build_alias=
7651build=i686-pc-linux-gnu
7652build_os=linux-gnu
7653
7654# An echo program that does not interpret backslashes.
7655echo="echo"
7656
7657# The archiver.
7658AR="ar"
7659AR_FLAGS="cru"
7660
7661# A C compiler.
7662LTCC="gcc"
7663
7664# LTCC compiler flags.
7665LTCFLAGS="-g -O2"
7666
7667# A language-specific compiler.
7668CC="gfortran"
7669
7670# Is the compiler the GNU C compiler?
7671with_gcc=yes
7672
7673# An ERE matcher.
7674EGREP="/bin/grep -E"
7675
7676# The linker used to build libraries.
7677LD="/usr/bin/ld"
7678
7679# Whether we need hard or soft links.
7680LN_S="ln -s"
7681
7682# A BSD-compatible nm program.
7683NM="/usr/bin/nm -B"
7684
7685# A symbol stripping program
7686STRIP="strip"
7687
7688# Used to examine libraries when file_magic_cmd begins "file"
7689MAGIC_CMD=file
7690
7691# Used on cygwin: DLL creation program.
7692DLLTOOL="dlltool"
7693
7694# Used on cygwin: object dumper.
7695OBJDUMP="objdump"
7696
7697# Used on cygwin: assembler.
7698AS="as"
7699
7700# The name of the directory that contains temporary libtool files.
7701objdir=.libs
7702
7703# How to create reloadable object files.
7704reload_flag=" -r"
7705reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
7706
7707# How to pass a linker flag through the compiler.
7708wl="-Wl,"
7709
7710# Object file suffix (normally "o").
7711objext="o"
7712
7713# Old archive suffix (normally "a").
7714libext="a"
7715
7716# Shared library suffix (normally ".so").
7717shrext_cmds='.so'
7718
7719# Executable file suffix (normally "").
7720exeext=""
7721
7722# Additional compiler flags for building library objects.
7723pic_flag=" -fPIC"
7724pic_mode=default
7725
7726# What is the maximum length of a command?
7727max_cmd_len=1966080
7728
7729# Does compiler simultaneously support -c and -o options?
7730compiler_c_o="yes"
7731
7732# Must we lock files when doing compilation?
7733need_locks="no"
7734
7735# Do we need the lib prefix for modules?
7736need_lib_prefix=no
7737
7738# Do we need a version for libraries?
7739need_version=no
7740
7741# Whether dlopen is supported.
7742dlopen_support=unknown
7743
7744# Whether dlopen of programs is supported.
7745dlopen_self=unknown
7746
7747# Whether dlopen of statically linked programs is supported.
7748dlopen_self_static=unknown
7749
7750# Compiler flag to prevent dynamic linking.
7751link_static_flag="-static"
7752
7753# Compiler flag to turn off builtin functions.
7754no_builtin_flag=""
7755
7756# Compiler flag to allow reflexive dlopens.
7757export_dynamic_flag_spec="\${wl}--export-dynamic"
7758
7759# Compiler flag to generate shared objects directly from archives.
7760whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
7761
7762# Compiler flag to generate thread-safe objects.
7763thread_safe_flag_spec=""
7764
7765# Library versioning type.
7766version_type=linux
7767
7768# Format of library name prefix.
7769libname_spec="lib\$name"
7770
7771# List of archive names.  First name is the real one, the rest are links.
7772# The last name is the one that the linker finds with -lNAME.
7773library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
7774
7775# The coded name of the library, if different from the real name.
7776soname_spec="\${libname}\${release}\${shared_ext}\$major"
7777
7778# Commands used to build and install an old-style archive.
7779RANLIB="ranlib"
7780old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
7781old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
7782old_postuninstall_cmds=""
7783
7784# Create an old-style archive from a shared archive.
7785old_archive_from_new_cmds=""
7786
7787# Create a temporary old-style archive to link instead of a shared archive.
7788old_archive_from_expsyms_cmds=""
7789
7790# Commands used to build and install a shared archive.
7791archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
7792archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
7793  cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
7794  \$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
7795	  \$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
7796postinstall_cmds=""
7797postuninstall_cmds=""
7798
7799# Commands used to build a loadable module (assumed same as above if empty)
7800module_cmds=""
7801module_expsym_cmds=""
7802
7803# Commands to strip libraries.
7804old_striplib="strip --strip-debug"
7805striplib="strip --strip-unneeded"
7806
7807# Dependencies to place before the objects being linked to create a
7808# shared library.
7809predep_objects=""
7810
7811# Dependencies to place after the objects being linked to create a
7812# shared library.
7813postdep_objects=""
7814
7815# Dependencies to place before the objects being linked to create a
7816# shared library.
7817predeps=""
7818
7819# Dependencies to place after the objects being linked to create a
7820# shared library.
7821postdeps=""
7822
7823# The directories searched by this compiler when creating a shared
7824# library
7825compiler_lib_search_dirs=""
7826
7827# The library search path used internally by the compiler when linking
7828# a shared library.
7829compiler_lib_search_path=""
7830
7831# Method to check whether dependent libraries are shared objects.
7832deplibs_check_method="pass_all"
7833
7834# Command to use when deplibs_check_method == file_magic.
7835file_magic_cmd="\$MAGIC_CMD"
7836
7837# Flag that allows shared libraries with undefined symbols to be built.
7838allow_undefined_flag=""
7839
7840# Flag that forces no undefined symbols.
7841no_undefined_flag=""
7842
7843# Commands used to finish a libtool library installation in a directory.
7844finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
7845
7846# Same as above, but a single script fragment to be evaled but not shown.
7847finish_eval=""
7848
7849# Take the output of nm and produce a listing of raw symbols and C names.
7850global_symbol_pipe="sed -n -e 's/^.*[ 	]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ 	][ 	]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
7851
7852# Transform the output of nm in a proper C declaration
7853global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
7854
7855# Transform the output of nm in a C name address pair
7856global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/  {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/  {\"\\2\", (lt_ptr) \\&\\2},/p'"
7857
7858# This is the shared library runtime path variable.
7859runpath_var=LD_RUN_PATH
7860
7861# This is the shared library path variable.
7862shlibpath_var=LD_LIBRARY_PATH
7863
7864# Is shlibpath searched before the hard-coded library search path?
7865shlibpath_overrides_runpath=no
7866
7867# How to hardcode a shared library path into an executable.
7868hardcode_action=immediate
7869
7870# Whether we should hardcode library paths into libraries.
7871hardcode_into_libs=yes
7872
7873# Flag to hardcode $libdir into a binary during linking.
7874# This must work even if $libdir does not exist.
7875hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
7876
7877# If ld is used when linking, flag to hardcode $libdir into
7878# a binary during linking. This must work even if $libdir does
7879# not exist.
7880hardcode_libdir_flag_spec_ld=""
7881
7882# Whether we need a single -rpath flag with a separated argument.
7883hardcode_libdir_separator=""
7884
7885# Set to yes if using DIR/libNAME during linking hardcodes DIR into the
7886# resulting binary.
7887hardcode_direct=no
7888
7889# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7890# resulting binary.
7891hardcode_minus_L=no
7892
7893# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7894# the resulting binary.
7895hardcode_shlibpath_var=unsupported
7896
7897# Set to yes if building a shared library automatically hardcodes DIR into the library
7898# and all subsequent libraries and executables linked against it.
7899hardcode_automatic=no
7900
7901# Variables whose values should be saved in libtool wrapper scripts and
7902# restored at relink time.
7903variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7904
7905# Whether libtool must link a program against all its dependency libraries.
7906link_all_deplibs=unknown
7907
7908# Compile-time system search path for libraries
7909sys_lib_search_path_spec="/usr/lib /lib /usr/local/lib"
7910
7911# Run-time system search path for libraries
7912sys_lib_dlsearch_path_spec="/usr/lib /lib /usr/local/lib /usr/local/mysql/lib/mysql /usr/lib/qt-3.3/lib /usr/lib/xulrunner-1.9 "
7913
7914# Fix the shell variable $srcfile for the compiler.
7915fix_srcfile_path=""
7916
7917# Set to yes if exported symbols are required.
7918always_export_symbols=no
7919
7920# The commands to list exported symbols.
7921export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
7922
7923# The commands to extract the exported symbol list from a shared archive.
7924extract_expsyms_cmds=""
7925
7926# Symbols that should not be listed in the preloaded symbols.
7927exclude_expsyms="_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*"
7928
7929# Symbols that must always be exported.
7930include_expsyms=""
7931
7932# ### END LIBTOOL TAG CONFIG: F77
7933
7934