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