3
# libtoolT - Provide generalized library-building support services.
4
# Generated automatically by (GNU brasero 0.8.2)
5
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
7
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
8
# Free Software Foundation, Inc.
10
# This file is part of GNU Libtool:
11
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
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.
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.
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.
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.
32
# A sed program that does not truncate output.
35
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
36
Xsed="/bin/sed -e 1s/^X//"
38
# The HP-UX ksh and POSIX shell print the target directory to stdout
40
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
42
# The names of the tagged configurations supported by this script.
43
available_tags=" CXX F77"
45
# ### BEGIN LIBTOOL CONFIG
47
# Libtool was configured on host localhost.localdomain:
49
# Shell to use when invoking shell scripts.
52
# Whether or not to build shared libraries.
53
build_libtool_libs=yes
55
# Whether or not to build static libraries.
58
# Whether or not to add -lc for building shared libraries.
59
build_libtool_need_lc=no
61
# Whether or not to disallow shared libs when runtime libs are static
62
allow_libtool_libs_with_static_runtimes=no
64
# Whether or not to optimize for fast installation.
69
host=i686-pc-linux-gnu
74
build=i686-pc-linux-gnu
77
# An echo program that does not interpret backslashes.
87
# LTCC compiler flags.
90
# A language-specific compiler.
93
# Is the compiler the GNU C compiler?
99
# The linker used to build libraries.
102
# Whether we need hard or soft links.
105
# A BSD-compatible nm program.
108
# A symbol stripping program
111
# Used to examine libraries when file_magic_cmd begins "file"
114
# Used on cygwin: DLL creation program.
117
# Used on cygwin: object dumper.
120
# Used on cygwin: assembler.
123
# The name of the directory that contains temporary libtool files.
126
# How to create reloadable object files.
128
reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
130
# How to pass a linker flag through the compiler.
133
# Object file suffix (normally "o").
136
# Old archive suffix (normally "a").
139
# Shared library suffix (normally ".so").
142
# Executable file suffix (normally "").
145
# Additional compiler flags for building library objects.
146
pic_flag=" -fPIC -DPIC"
149
# What is the maximum length of a command?
152
# Does compiler simultaneously support -c and -o options?
155
# Must we lock files when doing compilation?
158
# Do we need the lib prefix for modules?
161
# Do we need a version for libraries?
164
# Whether dlopen is supported.
165
dlopen_support=unknown
167
# Whether dlopen of programs is supported.
170
# Whether dlopen of statically linked programs is supported.
171
dlopen_self_static=unknown
173
# Compiler flag to prevent dynamic linking.
174
link_static_flag="-static"
176
# Compiler flag to turn off builtin functions.
177
no_builtin_flag=" -fno-builtin"
179
# Compiler flag to allow reflexive dlopens.
180
export_dynamic_flag_spec="\${wl}--export-dynamic"
182
# Compiler flag to generate shared objects directly from archives.
183
whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
185
# Compiler flag to generate thread-safe objects.
186
thread_safe_flag_spec=""
188
# Library versioning type.
191
# Format of library name prefix.
192
libname_spec="lib\$name"
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.
196
library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
198
# The coded name of the library, if different from the real name.
199
soname_spec="\${libname}\${release}\${shared_ext}\$major"
201
# Commands used to build and install an old-style archive.
203
old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
204
old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
205
old_postuninstall_cmds=""
207
# Create an old-style archive from a shared archive.
208
old_archive_from_new_cmds=""
210
# Create a temporary old-style archive to link instead of a shared archive.
211
old_archive_from_expsyms_cmds=""
213
# Commands used to build and install a shared archive.
214
archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
215
archive_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"
220
postuninstall_cmds=""
222
# Commands used to build a loadable module (assumed same as above if empty)
224
module_expsym_cmds=""
226
# Commands to strip libraries.
227
old_striplib="strip --strip-debug"
228
striplib="strip --strip-unneeded"
230
# Dependencies to place before the objects being linked to create a
234
# Dependencies to place after the objects being linked to create a
238
# Dependencies to place before the objects being linked to create a
242
# Dependencies to place after the objects being linked to create a
246
# The library search path used internally by the compiler when linking
248
compiler_lib_search_path=""
250
# Method to check whether dependent libraries are shared objects.
251
deplibs_check_method="pass_all"
253
# Command to use when deplibs_check_method == file_magic.
254
file_magic_cmd="\$MAGIC_CMD"
256
# Flag that allows shared libraries with undefined symbols to be built.
257
allow_undefined_flag=""
259
# Flag that forces no undefined symbols.
262
# Commands used to finish a libtool library installation in a directory.
263
finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
265
# Same as above, but a single script fragment to be evaled but not shown.
268
# Take the output of nm and produce a listing of raw symbols and C names.
269
global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
271
# Transform the output of nm in a proper C declaration
272
global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
274
# Transform the output of nm in a C name address pair
275
global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
277
# This is the shared library runtime path variable.
278
runpath_var=LD_RUN_PATH
280
# This is the shared library path variable.
281
shlibpath_var=LD_LIBRARY_PATH
283
# Is shlibpath searched before the hard-coded library search path?
284
shlibpath_overrides_runpath=no
286
# How to hardcode a shared library path into an executable.
287
hardcode_action=immediate
289
# Whether we should hardcode library paths into libraries.
290
hardcode_into_libs=yes
292
# Flag to hardcode $libdir into a binary during linking.
293
# This must work even if $libdir does not exist.
294
hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
296
# If ld is used when linking, flag to hardcode $libdir into
297
# a binary during linking. This must work even if $libdir does
299
hardcode_libdir_flag_spec_ld=""
301
# Whether we need a single -rpath flag with a separated argument.
302
hardcode_libdir_separator=""
304
# Set to yes if using DIR/libNAME during linking hardcodes DIR into the
308
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
312
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
313
# the resulting binary.
314
hardcode_shlibpath_var=unsupported
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.
318
hardcode_automatic=no
320
# Variables whose values should be saved in libtool wrapper scripts and
321
# restored at relink time.
322
variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
324
# Whether libtool must link a program against all its dependency libraries.
325
link_all_deplibs=unknown
327
# Compile-time system search path for libraries
328
sys_lib_search_path_spec="/usr/lib /lib /usr/local/lib"
330
# Run-time system search path for libraries
331
sys_lib_dlsearch_path_spec="/usr/lib /lib /usr/lib/atlas /usr/lib/mysql /usr/lib/qt-3.3/lib /usr/lib/wine/ /usr/lib/xulrunner-1.9 "
333
# Fix the shell variable $srcfile for the compiler.
336
# Set to yes if exported symbols are required.
337
always_export_symbols=no
339
# The commands to list exported symbols.
340
export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
342
# The commands to extract the exported symbol list from a shared archive.
343
extract_expsyms_cmds=""
345
# Symbols that should not be listed in the preloaded symbols.
346
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
348
# Symbols that must always be exported.
351
# ### END LIBTOOL CONFIG
353
# ltmain.sh - Provide generalized library-building support services.
354
# NOTE: Changing this file will not affect anything until you rerun configure.
356
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
357
# 2007 Free Software Foundation, Inc.
358
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
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.
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.
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.
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.
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
388
# The name of this program:
389
progname=`echo "$progpath" | $SED $basename`
399
TIMESTAMP=" (1.1220.2.456 2007/06/24 02:25:32)"
401
# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
402
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
405
# Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
406
# is contrary to our usage. Disable this feature.
407
alias -g '${1+"$@"}'='"$@"'
410
case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
412
BIN_SH=xpg4; export BIN_SH # for Tru64
413
DUALCASE=1; export DUALCASE # for MKS sh
415
# Check that we have a working $echo.
416
if test "X$1" = X--no-reexec; then
417
# Discard the --no-reexec flag, and continue.
419
elif test "X$1" = X--fallback-echo; then
420
# Avoid inline document here, it may be left over
422
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
423
# Yippee, $echo works!
426
# Restart under the correct shell, and then maybe $echo will work.
427
exec $SHELL "$progpath" --no-reexec ${1+"$@"}
430
if test "X$1" = X--fallback-echo; then
431
# used as fallback echo
440
help="Try \`$progname --help' for more information."
441
magic="%%%MAGIC variable%%%"
446
# Sed substitution that helps us do robust quoting. It backslashifies
447
# metacharacters that are still active within double-quoted strings.
448
Xsed="${SED}"' -e 1s/^X//'
449
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
450
# test EBCDIC or ASCII
451
case `echo X|tr X '\101'` in
452
A) # ASCII based system
453
# \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
455
NL2SP='tr \015\012 \040\040'
457
*) # EBCDIC based system
459
NL2SP='tr \r\n \100\100'
464
# Only set LANG and LC_ALL to C if already set.
465
# These must not be set unconditionally because not all systems understand
466
# e.g. LANG=C (notably SCO).
467
# We save the old values to restore during execute mode.
468
for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
470
eval "if test \"\${$lt_var+set}\" = set; then
471
save_$lt_var=\$$lt_var
477
# Make sure IFS has a sensible default
482
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
483
$echo "$modename: not configured to build any kind of library" 1>&2
484
$echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
499
lo2o="s/\\.lo\$/.${objext}/"
500
o2lo="s/\\.${objext}\$/.lo/"
504
#####################################
505
# Shell function definitions:
506
# This seems to be the best place for them
508
# func_mktempdir [string]
509
# Make a temporary directory that won't clash with other running
510
# libtool processes, and avoids race conditions if possible. If
511
# given, STRING is the basename for that directory.
514
my_template="${TMPDIR-/tmp}/${1-$progname}"
516
if test "$run" = ":"; then
517
# Return a directory name, but don't create it in dry-run mode
518
my_tmpdir="${my_template}-$$"
521
# If mktemp works, use that first and foremost
522
my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
524
if test ! -d "$my_tmpdir"; then
525
# Failing that, at least try and use $RANDOM to avoid a race
526
my_tmpdir="${my_template}-${RANDOM-0}$$"
528
save_mktempdir_umask=`umask`
531
umask $save_mktempdir_umask
534
# If we're not in dry-run mode, bomb out on failure
535
test -d "$my_tmpdir" || {
536
$echo "cannot create temporary directory \`$my_tmpdir'" 1>&2
541
$echo "X$my_tmpdir" | $Xsed
545
# func_win32_libid arg
546
# return the library type of file 'arg'
548
# Need a lot of goo to handle *both* DLLs and import libs
549
# Has to be a shell function in order to 'eat' the argument
550
# that is supplied when $file_magic_command is called.
553
win32_libid_type="unknown"
554
win32_fileres=`file -L $1 2>/dev/null`
555
case $win32_fileres in
556
*ar\ archive\ import\ library*) # definitely import
557
win32_libid_type="x86 archive import"
559
*ar\ archive*) # could be an import, or static
560
if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
561
$EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
562
win32_nmres=`eval $NM -f posix -A $1 | \
571
import*) win32_libid_type="x86 archive import";;
572
*) win32_libid_type="x86 archive static";;
577
win32_libid_type="x86 DLL"
579
*executable*) # but shell scripts are "executable" too...
580
case $win32_fileres in
581
*MS\ Windows\ PE\ Intel*)
582
win32_libid_type="x86 DLL"
587
$echo $win32_libid_type
592
# Infer tagged configuration to use if any are available and
593
# if one wasn't chosen via the "--tag" command line option.
594
# Only attempt this if the compiler in the base compile
595
# command doesn't match the default compiler.
596
# arg is usually of the form 'gcc ...'
599
if test -n "$available_tags" && test -z "$tagname"; then
603
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
607
CC_quoted="$CC_quoted $arg"
610
# Blanks in the command may have been stripped by the calling shell,
611
# but not from the CC environment variable when configure was run.
612
" $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
613
# Blanks at the start of $base_compile will cause this to fail
614
# if we don't check for them as well.
616
for z in $available_tags; do
617
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
618
# Evaluate the configuration.
619
eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
622
# Double-quote args containing other shell metacharacters.
624
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
628
CC_quoted="$CC_quoted $arg"
631
" $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
632
# The compiler in the base compile command matches
633
# the one in the tagged configuration.
634
# Assume this is the tagged configuration we want.
641
# If $tagname still isn't set, then no tagged configuration
642
# was found and let the user know that the "--tag" command
643
# line option must be used.
644
if test -z "$tagname"; then
645
$echo "$modename: unable to infer tagged configuration"
646
$echo "$modename: specify a tag with \`--tag'" 1>&2
649
# $echo "$modename: using $tagname tagged configuration"
657
# func_extract_an_archive dir oldlib
658
func_extract_an_archive ()
660
f_ex_an_ar_dir="$1"; shift
661
f_ex_an_ar_oldlib="$1"
663
$show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)"
664
$run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $?
665
if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
668
$echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2
673
# func_extract_archives gentop oldlib ...
674
func_extract_archives ()
676
my_gentop="$1"; shift
684
$show "${rm}r $my_gentop"
685
$run ${rm}r "$my_gentop"
686
$show "$mkdir $my_gentop"
687
$run $mkdir "$my_gentop"
689
if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then
693
for my_xlib in $my_oldlibs; do
694
# Extract the objects.
696
[\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
697
*) my_xabs=`pwd`"/$my_xlib" ;;
699
my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'`
702
case " $extracted_archives " in
704
extracted_serial=`expr $extracted_serial + 1`
705
my_xlib_u=lt$extracted_serial-$my_xlib ;;
709
extracted_archives="$extracted_archives $my_xlib_u"
710
my_xdir="$my_gentop/$my_xlib_u"
712
$show "${rm}r $my_xdir"
713
$run ${rm}r "$my_xdir"
714
$show "$mkdir $my_xdir"
715
$run $mkdir "$my_xdir"
717
if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then
722
$show "Extracting $my_xabs"
723
# Do not bother doing anything if just a dry run
724
if test -z "$run"; then
725
darwin_orig_dir=`pwd`
726
cd $my_xdir || exit $?
727
darwin_archive=$my_xabs
729
darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'`
730
darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null`
731
if test -n "$darwin_arches"; then
732
darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'`
734
$show "$darwin_base_archive has multiple architectures $darwin_arches"
735
for darwin_arch in $darwin_arches ; do
736
mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
737
lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
738
cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
739
func_extract_an_archive "`pwd`" "${darwin_base_archive}"
741
$rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
742
done # $darwin_arches
743
## Okay now we have a bunch of thin objects, gotta fatten them up :)
744
darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP`
747
for darwin_file in $darwin_filelist; do
748
darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
749
lipo -create -output "$darwin_file" $darwin_files
750
done # $darwin_filelist
752
cd "$darwin_orig_dir"
754
cd "$darwin_orig_dir"
755
func_extract_an_archive "$my_xdir" "$my_xabs"
760
func_extract_an_archive "$my_xdir" "$my_xabs"
763
my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
765
func_extract_archives_result="$my_oldobjs"
767
# End of Shell function definitions
768
#####################################
771
eval std_shrext=\"$shrext_cmds\"
775
# Parse our command line options once, thoroughly.
776
while test "$#" -gt 0
782
-*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
786
# If the previous option needs an argument, assign it.
787
if test -n "$prev"; then
790
execute_dlfiles="$execute_dlfiles $arg"
794
preserve_args="${preserve_args}=$arg"
796
# Check whether tagname contains only valid characters
799
$echo "$progname: invalid tag name: $tagname" 1>&2
806
# Don't test for the "default" C tag, as we know, it's there, but
807
# not specially marked.
810
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
811
taglist="$taglist $tagname"
812
# Evaluate the configuration.
813
eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
815
$echo "$progname: ignoring unknown tag $tagname" 1>&2
830
# Have we seen a non-optional argument yet?
838
$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP
840
Copyright (C) 2007 Free Software Foundation, Inc.
841
This is free software; see the source for copying conditions. There is NO
842
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
847
${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
848
# Now print the configurations for the tags.
849
for tagname in $taglist; do
850
${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
856
$echo "$progname: enabling shell trace mode"
858
preserve_args="$preserve_args $arg"
867
if test "$build_libtool_libs" = yes; then
868
$echo "enable shared libraries"
870
$echo "disable shared libraries"
872
if test "$build_old_libs" = yes; then
873
$echo "enable static libraries"
875
$echo "disable static libraries"
880
--finish) mode="finish" ;;
882
--mode) prevopt="--mode" prev=mode ;;
883
--mode=*) mode="$optarg" ;;
885
--preserve-dup-deps) duplicate_deps="yes" ;;
889
preserve_args="$preserve_args $arg"
895
preserve_args="$preserve_args --tag"
898
set tag "$optarg" ${1+"$@"}
901
preserve_args="$preserve_args --tag"
910
$echo "$modename: unrecognized option \`$arg'" 1>&2
922
if test -n "$prevopt"; then
923
$echo "$modename: option \`$prevopt' requires an argument" 1>&2
928
case $disable_libs in
932
build_libtool_libs=no
936
build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
940
# If this variable is set in any of the actions, the command in it
941
# will be execed at the end. This prevents here-documents from being
942
# left over by shells.
945
if test -z "$show_help"; then
947
# Infer the operation mode.
948
if test -z "$mode"; then
949
$echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
950
$echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2
952
*cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
964
*db | *dbx | *strace | *truss)
974
# If we have no mode, but dlfiles were specified, then do execute mode.
975
test -n "$execute_dlfiles" && mode=execute
977
# Just use the default operation mode.
978
if test -z "$mode"; then
979
if test -n "$nonopt"; then
980
$echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
982
$echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
989
# Only execute mode is allowed to have -dlopen flags.
990
if test -n "$execute_dlfiles" && test "$mode" != execute; then
991
$echo "$modename: unrecognized option \`-dlopen'" 1>&2
996
# Change the help message to a mode-specific one.
998
help="Try \`$modename --help --mode=$mode' for more information."
1000
# These modes are in order of execution frequency so that they run quickly.
1002
# libtool compile mode
1004
modename="$modename: compile"
1005
# Get the compilation command and the source file.
1007
srcfile="$nonopt" # always keep a non-empty value in "srcfile"
1018
# do not "continue". Instead, add this to base_compile
1030
# Accept any command-line options.
1033
if test -n "$libobj" ; then
1034
$echo "$modename: you cannot specify \`-o' more than once" 1>&2
1041
-static | -prefer-pic | -prefer-non-pic)
1052
arg_mode=arg # the next one goes into the "base_compile" arg list
1053
continue # The current "srcfile" will either be retained or
1054
;; # replaced later. I would guess that would be a bug.
1057
args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
1059
save_ifs="$IFS"; IFS=','
1060
for arg in $args; do
1063
# Double-quote args containing other shell metacharacters.
1064
# Many Bourne shells cannot handle close brackets correctly
1065
# in scan sets, so we specify it separately.
1067
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1071
lastarg="$lastarg $arg"
1074
lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
1076
# Add the arguments to base_compile.
1077
base_compile="$base_compile $lastarg"
1082
# Accept the current argument as the source file.
1083
# The previous "srcfile" becomes the current argument.
1090
esac # case $arg_mode
1092
# Aesthetically quote the previous argument.
1093
lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
1096
# Double-quote args containing other shell metacharacters.
1097
# Many Bourne shells cannot handle close brackets correctly
1098
# in scan sets, and some SunOS ksh mistreat backslash-escaping
1099
# in scan sets (worked around with variable expansion),
1100
# and furthermore cannot handle '|' '&' '(' ')' in scan sets
1101
# at all, so we specify them separately.
1102
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1103
lastarg="\"$lastarg\""
1107
base_compile="$base_compile $lastarg"
1112
$echo "$modename: you must specify an argument for -Xcompile"
1116
$echo "$modename: you must specify a target with \`-o'" 1>&2
1120
# Get the name of the library object.
1121
[ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
1125
# Recognize several different file suffixes.
1126
# If the user specifies -o file.o, it is replaced with file.lo
1136
*.class) xform=class ;;
1139
*.[fF][09]?) xform=[fF][09]. ;;
1141
*.java) xform=java ;;
1145
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
1148
*.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
1150
$echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
1155
func_infer_tag $base_compile
1157
for arg in $later; do
1176
qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"`
1178
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1179
qlibobj="\"$qlibobj\"" ;;
1181
test "X$libobj" != "X$qlibobj" \
1182
&& $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \
1183
&& $echo "$modename: libobj name \`$libobj' may not contain shell special characters."
1184
objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
1185
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
1186
if test "X$xdir" = "X$obj"; then
1191
lobj=${xdir}$objdir/$objname
1193
if test -z "$base_compile"; then
1194
$echo "$modename: you must specify a compilation command" 1>&2
1199
# Delete any leftover library objects.
1200
if test "$build_old_libs" = yes; then
1201
removelist="$obj $lobj $libobj ${libobj}T"
1203
removelist="$lobj $libobj ${libobj}T"
1206
$run $rm $removelist
1207
trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1209
# On Cygwin there's no "real" PIC flag so we must build both object types
1211
cygwin* | mingw* | pw32* | os2*)
1215
if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
1216
# non-PIC code in shared libraries is not supported
1220
# Calculate the filename of the output object if compiler does
1221
# not support -o with -c
1222
if test "$compiler_c_o" = no; then
1223
output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
1224
lockfile="$output_obj.lock"
1225
removelist="$removelist $output_obj $lockfile"
1226
trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1233
# Lock this critical section if it is needed
1234
# We use this script file to make the link, it avoids creating a new file
1235
if test "$need_locks" = yes; then
1236
until $run ln "$progpath" "$lockfile" 2>/dev/null; do
1237
$show "Waiting for $lockfile to be removed"
1240
elif test "$need_locks" = warn; then
1241
if test -f "$lockfile"; then
1243
*** ERROR, $lockfile exists and contains:
1244
`cat $lockfile 2>/dev/null`
1246
This indicates that another process is trying to use the same
1247
temporary object file, and libtool could not work around it because
1248
your compiler does not support \`-c' and \`-o' together. If you
1249
repeat this compilation, it may succeed, by chance, but you had better
1250
avoid parallel builds (make -j) in this platform, or get a better
1253
$run $rm $removelist
1256
$echo "$srcfile" > "$lockfile"
1259
if test -n "$fix_srcfile_path"; then
1260
eval srcfile=\"$fix_srcfile_path\"
1262
qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"`
1264
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1265
qsrcfile="\"$qsrcfile\"" ;;
1268
$run $rm "$libobj" "${libobj}T"
1270
# Create a libtool object file (analogous to a ".la" file),
1271
# but don't create it if we're doing a dry run.
1272
test -z "$run" && cat > ${libobj}T <<EOF
1273
# $libobj - a libtool object file
1274
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
1276
# Please DO NOT delete this file!
1277
# It is necessary for linking the library.
1279
# Name of the PIC object.
1282
# Only build a PIC object if we are building libtool libraries.
1283
if test "$build_libtool_libs" = yes; then
1284
# Without this assignment, base_compile gets emptied.
1285
fbsd_hideous_sh_bug=$base_compile
1287
if test "$pic_mode" != no; then
1288
command="$base_compile $qsrcfile $pic_flag"
1290
# Don't build PIC code
1291
command="$base_compile $qsrcfile"
1294
if test ! -d "${xdir}$objdir"; then
1295
$show "$mkdir ${xdir}$objdir"
1296
$run $mkdir ${xdir}$objdir
1298
if test "$exit_status" -ne 0 && test ! -d "${xdir}$objdir"; then
1303
if test -z "$output_obj"; then
1304
# Place PIC objects in $objdir
1305
command="$command -o $lobj"
1308
$run $rm "$lobj" "$output_obj"
1311
if $run eval "$command"; then :
1313
test -n "$output_obj" && $run $rm $removelist
1317
if test "$need_locks" = warn &&
1318
test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1320
*** ERROR, $lockfile contains:
1321
`cat $lockfile 2>/dev/null`
1323
but it should contain:
1326
This indicates that another process is trying to use the same
1327
temporary object file, and libtool could not work around it because
1328
your compiler does not support \`-c' and \`-o' together. If you
1329
repeat this compilation, it may succeed, by chance, but you had better
1330
avoid parallel builds (make -j) in this platform, or get a better
1333
$run $rm $removelist
1337
# Just move the object if needed, then go on to compile the next one
1338
if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
1339
$show "$mv $output_obj $lobj"
1340
if $run $mv $output_obj $lobj; then :
1343
$run $rm $removelist
1348
# Append the name of the PIC object to the libtool object file.
1349
test -z "$run" && cat >> ${libobj}T <<EOF
1350
pic_object='$objdir/$objname'
1354
# Allow error messages only from the first compilation.
1355
if test "$suppress_opt" = yes; then
1356
suppress_output=' >/dev/null 2>&1'
1359
# No PIC object so indicate it doesn't exist in the libtool
1361
test -z "$run" && cat >> ${libobj}T <<EOF
1367
# Only build a position-dependent object if we build old libraries.
1368
if test "$build_old_libs" = yes; then
1369
if test "$pic_mode" != yes; then
1370
# Don't build PIC code
1371
command="$base_compile $qsrcfile"
1373
command="$base_compile $qsrcfile $pic_flag"
1375
if test "$compiler_c_o" = yes; then
1376
command="$command -o $obj"
1379
# Suppress compiler output if we already did a PIC compilation.
1380
command="$command$suppress_output"
1381
$run $rm "$obj" "$output_obj"
1383
if $run eval "$command"; then :
1385
$run $rm $removelist
1389
if test "$need_locks" = warn &&
1390
test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1392
*** ERROR, $lockfile contains:
1393
`cat $lockfile 2>/dev/null`
1395
but it should contain:
1398
This indicates that another process is trying to use the same
1399
temporary object file, and libtool could not work around it because
1400
your compiler does not support \`-c' and \`-o' together. If you
1401
repeat this compilation, it may succeed, by chance, but you had better
1402
avoid parallel builds (make -j) in this platform, or get a better
1405
$run $rm $removelist
1409
# Just move the object if needed
1410
if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1411
$show "$mv $output_obj $obj"
1412
if $run $mv $output_obj $obj; then :
1415
$run $rm $removelist
1420
# Append the name of the non-PIC object the libtool object file.
1421
# Only append if the libtool object file exists.
1422
test -z "$run" && cat >> ${libobj}T <<EOF
1423
# Name of the non-PIC object.
1424
non_pic_object='$objname'
1428
# Append the name of the non-PIC object the libtool object file.
1429
# Only append if the libtool object file exists.
1430
test -z "$run" && cat >> ${libobj}T <<EOF
1431
# Name of the non-PIC object.
1437
$run $mv "${libobj}T" "${libobj}"
1439
# Unlock the critical section if it was locked
1440
if test "$need_locks" != no; then
1441
$run $rm "$lockfile"
1449
modename="$modename: link"
1451
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1452
# It is impossible to link a dll without this setting, and
1453
# we shouldn't force the makefile maintainer to figure out
1454
# which system we are compiling for in order to pass an extra
1455
# flag for every libtool invocation.
1456
# allow_undefined=no
1458
# FIXME: Unfortunately, there are problems with the above when trying
1459
# to make a dll which has undefined symbols, in which case not
1460
# even a static library is built. For now, we need to specify
1461
# -no-undefined on the libtool link line when we can be certain
1462
# that all symbols are satisfied, otherwise we get a static library.
1469
libtool_args="$nonopt"
1470
base_compile="$nonopt $@"
1471
compile_command="$nonopt"
1472
finalize_command="$nonopt"
1485
lib_search_path=`pwd`
1494
export_symbols_regex=
1502
notinst_path= # paths that contain not-installed libtool libraries
1503
precious_files_regex=
1504
prefer_static_libs=no
1517
func_infer_tag $base_compile
1519
# We need to know -static, to get the right output filenames.
1523
-all-static | -static | -static-libtool-libs)
1526
if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1527
$echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1529
if test -n "$link_static_flag"; then
1530
dlopen_self=$dlopen_self_static
1532
prefer_static_libs=yes
1535
if test -z "$pic_flag" && test -n "$link_static_flag"; then
1536
dlopen_self=$dlopen_self_static
1538
prefer_static_libs=built
1540
-static-libtool-libs)
1541
if test -z "$pic_flag" && test -n "$link_static_flag"; then
1542
dlopen_self=$dlopen_self_static
1544
prefer_static_libs=yes
1547
build_libtool_libs=no
1554
# See if our shared archives depend on static archives.
1555
test -n "$old_archive_from_new_cmds" && build_old_libs=yes
1557
# Go through the arguments, transforming them on the way.
1558
while test "$#" -gt 0; do
1562
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1563
qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1567
libtool_args="$libtool_args $qarg"
1569
# If the previous option needs an argument, assign it.
1570
if test -n "$prev"; then
1573
compile_command="$compile_command @OUTPUT@"
1574
finalize_command="$finalize_command @OUTPUT@"
1580
if test "$preload" = no; then
1581
# Add the symbol object into the linking commands.
1582
compile_command="$compile_command @SYMFILE@"
1583
finalize_command="$finalize_command @SYMFILE@"
1587
*.la | *.lo) ;; # We handle these cases below.
1589
if test "$dlself" = no; then
1597
if test "$prev" = dlprefiles; then
1599
elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
1609
if test "$prev" = dlfiles; then
1610
dlfiles="$dlfiles $arg"
1612
dlprefiles="$dlprefiles $arg"
1620
export_symbols="$arg"
1621
if test ! -f "$arg"; then
1622
$echo "$modename: symbol file \`$arg' does not exist"
1629
export_symbols_regex="$arg"
1634
inst_prefix_dir="$arg"
1639
precious_files_regex="$arg"
1649
if test -f "$arg"; then
1652
for fil in `cat $save_arg`
1654
# moreargs="$moreargs $fil"
1656
# A libtool-controlled object.
1658
# Check to see that this really is a libtool object.
1659
if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1664
# If there is no directory component, then add one.
1666
*/* | *\\*) . $arg ;;
1670
if test -z "$pic_object" || \
1671
test -z "$non_pic_object" ||
1672
test "$pic_object" = none && \
1673
test "$non_pic_object" = none; then
1674
$echo "$modename: cannot find name of object for \`$arg'" 1>&2
1678
# Extract subdirectory from the argument.
1679
xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1680
if test "X$xdir" = "X$arg"; then
1686
if test "$pic_object" != none; then
1687
# Prepend the subdirectory the object is found in.
1688
pic_object="$xdir$pic_object"
1690
if test "$prev" = dlfiles; then
1691
if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1692
dlfiles="$dlfiles $pic_object"
1696
# If libtool objects are unsupported, then we need to preload.
1701
# CHECK ME: I think I busted this. -Ossama
1702
if test "$prev" = dlprefiles; then
1703
# Preload the old-style object.
1704
dlprefiles="$dlprefiles $pic_object"
1709
libobjs="$libobjs $pic_object"
1714
if test "$non_pic_object" != none; then
1715
# Prepend the subdirectory the object is found in.
1716
non_pic_object="$xdir$non_pic_object"
1718
# A standard non-PIC object
1719
non_pic_objects="$non_pic_objects $non_pic_object"
1720
if test -z "$pic_object" || test "$pic_object" = none ; then
1721
arg="$non_pic_object"
1724
# If the PIC object exists, use it instead.
1725
# $xdir was prepended to $pic_object above.
1726
non_pic_object="$pic_object"
1727
non_pic_objects="$non_pic_objects $non_pic_object"
1730
# Only an error if not doing a dry-run.
1731
if test -z "$run"; then
1732
$echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1737
# Extract subdirectory from the argument.
1738
xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1739
if test "X$xdir" = "X$arg"; then
1745
pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1746
non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1747
libobjs="$libobjs $pic_object"
1748
non_pic_objects="$non_pic_objects $non_pic_object"
1753
$echo "$modename: link input file \`$save_arg' does not exist"
1761
# We need an absolute path.
1763
[\\/]* | [A-Za-z]:[\\/]*) ;;
1765
$echo "$modename: only absolute run-paths are allowed" 1>&2
1769
if test "$prev" = rpath; then
1772
*) rpath="$rpath $arg" ;;
1777
*) xrpath="$xrpath $arg" ;;
1784
compiler_flags="$compiler_flags $qarg"
1786
compile_command="$compile_command $qarg"
1787
finalize_command="$finalize_command $qarg"
1791
linker_flags="$linker_flags $qarg"
1792
compiler_flags="$compiler_flags $wl$qarg"
1794
compile_command="$compile_command $wl$qarg"
1795
finalize_command="$finalize_command $wl$qarg"
1799
linker_flags="$linker_flags $qarg"
1800
compiler_flags="$compiler_flags $qarg"
1802
compile_command="$compile_command $qarg"
1803
finalize_command="$finalize_command $qarg"
1811
darwin_framework|darwin_framework_skip)
1812
test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg"
1813
compile_command="$compile_command $arg"
1814
finalize_command="$finalize_command $arg"
1819
eval "$prev=\"\$arg\""
1824
fi # test -n "$prev"
1830
if test -n "$link_static_flag"; then
1831
compile_command="$compile_command $link_static_flag"
1832
finalize_command="$finalize_command $link_static_flag"
1838
# FIXME: remove this flag sometime in the future.
1839
$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1863
-export-symbols | -export-symbols-regex)
1864
if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1865
$echo "$modename: more than one -exported-symbols argument is not allowed"
1868
if test "X$arg" = "X-export-symbols"; then
1876
-framework|-arch|-isysroot)
1878
*" ${arg} ${1} "* | *" ${arg} ${1} "*)
1879
prev=darwin_framework_skip ;;
1880
*) compiler_flags="$compiler_flags $arg"
1881
prev=darwin_framework ;;
1883
compile_command="$compile_command $arg"
1884
finalize_command="$finalize_command $arg"
1893
# The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1894
# so, if we see these flags be careful not to treat them like -L
1896
case $with_gcc/$host in
1897
no/*-*-irix* | /*-*-irix*)
1898
compile_command="$compile_command $arg"
1899
finalize_command="$finalize_command $arg"
1906
dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1907
# We need an absolute path.
1909
[\\/]* | [A-Za-z]:[\\/]*) ;;
1911
absdir=`cd "$dir" && pwd`
1912
if test -z "$absdir"; then
1913
$echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1915
notinst_path="$notinst_path $dir"
1923
deplibs="$deplibs -L$dir"
1924
lib_search_path="$lib_search_path $dir"
1928
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1929
testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'`
1930
case :$dllsearchpath: in
1932
*) dllsearchpath="$dllsearchpath:$dir";;
1934
case :$dllsearchpath: in
1935
*":$testbindir:"*) ;;
1936
*) dllsearchpath="$dllsearchpath:$testbindir";;
1944
if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
1946
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*)
1947
# These systems don't actually have a C or math library (as such)
1951
# These systems don't actually have a C library (as such)
1952
test "X$arg" = "X-lc" && continue
1954
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1955
# Do not include libc due to us having libc/libc_r.
1956
test "X$arg" = "X-lc" && continue
1958
*-*-rhapsody* | *-*-darwin1.[012])
1959
# Rhapsody C and math libraries are in the System framework
1960
deplibs="$deplibs -framework System"
1963
*-*-sco3.2v5* | *-*-sco5v6*)
1964
# Causes problems with __ctype
1965
test "X$arg" = "X-lc" && continue
1967
*-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
1968
# Compiler inserts libc in the correct place for threads to work
1969
test "X$arg" = "X-lc" && continue
1972
elif test "X$arg" = "X-lc_r"; then
1974
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
1975
# Do not include libc_r directly, use -pthread flag.
1980
deplibs="$deplibs $arg"
1984
# Tru64 UNIX uses -model [arg] to determine the layout of C++
1985
# classes, name mangling, and exception handling.
1987
compile_command="$compile_command $arg"
1988
compiler_flags="$compiler_flags $arg"
1989
finalize_command="$finalize_command $arg"
1994
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
1995
compiler_flags="$compiler_flags $arg"
1996
compile_command="$compile_command $arg"
1997
finalize_command="$finalize_command $arg"
2006
# -64, -mips[0-9] enable 64-bit mode on the SGI compiler
2007
# -r[0-9][0-9]* specifies the processor on the SGI compiler
2008
# -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
2009
# +DA*, +DD* enable 64-bit mode on the HP compiler
2010
# -q* pass through compiler args for the IBM compiler
2011
# -m* pass through architecture-specific compiler args for GCC
2012
# -m*, -t[45]*, -txscale* pass through architecture-specific
2013
# compiler args for GCC
2014
# -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
2015
# -F/path gives path to uninstalled frameworks, gcc on darwin
2016
# @file GCC response files
2017
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
2018
-t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
2020
# Unknown arguments in both finalize_command and compile_command need
2021
# to be aesthetically quoted because they are evaled later.
2022
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2024
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2028
compile_command="$compile_command $arg"
2029
finalize_command="$finalize_command $arg"
2030
compiler_flags="$compiler_flags $arg"
2046
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*)
2047
# The PATH hackery in wrapper scripts is required on Windows
2048
# and Darwin in order for the loader to find any dlls it needs.
2049
$echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
2050
$echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
2053
*) no_install=yes ;;
2070
-precious-files-regex)
2091
dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
2092
# We need an absolute path.
2094
[\\/]* | [A-Za-z]:[\\/]*) ;;
2096
$echo "$modename: only absolute run-paths are allowed" 1>&2
2102
*) xrpath="$xrpath $dir" ;;
2107
-static | -static-libtool-libs)
2108
# The effects of -static are defined in a previous loop.
2109
# We used to do the same as -all-static on platforms that
2110
# didn't have a PIC flag, but the assumption that the effects
2111
# would be equivalent was wrong. It would break on at least
2112
# Digital Unix and AIX.
2132
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
2134
save_ifs="$IFS"; IFS=','
2135
for flag in $args; do
2138
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2143
compiler_flags="$compiler_flags $flag"
2146
arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
2150
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
2152
save_ifs="$IFS"; IFS=','
2153
for flag in $args; do
2156
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2161
compiler_flags="$compiler_flags $wl$flag"
2162
linker_flags="$linker_flags $flag"
2165
arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
2183
# Some other compiler flag.
2185
# Unknown arguments in both finalize_command and compile_command need
2186
# to be aesthetically quoted because they are evaled later.
2187
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2189
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2196
# A standard object.
2201
# A libtool-controlled object.
2203
# Check to see that this really is a libtool object.
2204
if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
2209
# If there is no directory component, then add one.
2211
*/* | *\\*) . $arg ;;
2215
if test -z "$pic_object" || \
2216
test -z "$non_pic_object" ||
2217
test "$pic_object" = none && \
2218
test "$non_pic_object" = none; then
2219
$echo "$modename: cannot find name of object for \`$arg'" 1>&2
2223
# Extract subdirectory from the argument.
2224
xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
2225
if test "X$xdir" = "X$arg"; then
2231
if test "$pic_object" != none; then
2232
# Prepend the subdirectory the object is found in.
2233
pic_object="$xdir$pic_object"
2235
if test "$prev" = dlfiles; then
2236
if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
2237
dlfiles="$dlfiles $pic_object"
2241
# If libtool objects are unsupported, then we need to preload.
2246
# CHECK ME: I think I busted this. -Ossama
2247
if test "$prev" = dlprefiles; then
2248
# Preload the old-style object.
2249
dlprefiles="$dlprefiles $pic_object"
2254
libobjs="$libobjs $pic_object"
2259
if test "$non_pic_object" != none; then
2260
# Prepend the subdirectory the object is found in.
2261
non_pic_object="$xdir$non_pic_object"
2263
# A standard non-PIC object
2264
non_pic_objects="$non_pic_objects $non_pic_object"
2265
if test -z "$pic_object" || test "$pic_object" = none ; then
2266
arg="$non_pic_object"
2269
# If the PIC object exists, use it instead.
2270
# $xdir was prepended to $pic_object above.
2271
non_pic_object="$pic_object"
2272
non_pic_objects="$non_pic_objects $non_pic_object"
2275
# Only an error if not doing a dry-run.
2276
if test -z "$run"; then
2277
$echo "$modename: \`$arg' is not a valid libtool object" 1>&2
2282
# Extract subdirectory from the argument.
2283
xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
2284
if test "X$xdir" = "X$arg"; then
2290
pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
2291
non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
2292
libobjs="$libobjs $pic_object"
2293
non_pic_objects="$non_pic_objects $non_pic_object"
2300
deplibs="$deplibs $arg"
2301
old_deplibs="$old_deplibs $arg"
2306
# A libtool-controlled library.
2308
if test "$prev" = dlfiles; then
2309
# This library was specified with -dlopen.
2310
dlfiles="$dlfiles $arg"
2312
elif test "$prev" = dlprefiles; then
2313
# The library was specified with -dlpreopen.
2314
dlprefiles="$dlprefiles $arg"
2317
deplibs="$deplibs $arg"
2322
# Some other compiler argument.
2324
# Unknown arguments in both finalize_command and compile_command need
2325
# to be aesthetically quoted because they are evaled later.
2326
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2328
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2335
# Now actually substitute the argument into the commands.
2336
if test -n "$arg"; then
2337
compile_command="$compile_command $arg"
2338
finalize_command="$finalize_command $arg"
2340
done # argument parsing loop
2342
if test -n "$prev"; then
2343
$echo "$modename: the \`$prevarg' option requires an argument" 1>&2
2348
if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
2349
eval arg=\"$export_dynamic_flag_spec\"
2350
compile_command="$compile_command $arg"
2351
finalize_command="$finalize_command $arg"
2355
# calculate the name of the file, without its directory
2356
outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
2357
libobjs_save="$libobjs"
2359
if test -n "$shlibpath_var"; then
2360
# get the directories listed in $shlibpath_var
2361
eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
2365
eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
2366
eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
2368
output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2369
if test "X$output_objdir" = "X$output"; then
2370
output_objdir="$objdir"
2372
output_objdir="$output_objdir/$objdir"
2374
# Create the object directory.
2375
if test ! -d "$output_objdir"; then
2376
$show "$mkdir $output_objdir"
2377
$run $mkdir $output_objdir
2379
if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then
2384
# Determine the type of output
2387
$echo "$modename: you must specify an output file" 1>&2
2391
*.$libext) linkmode=oldlib ;;
2392
*.lo | *.$objext) linkmode=obj ;;
2393
*.la) linkmode=lib ;;
2394
*) linkmode=prog ;; # Anything else should be a program.
2398
*cygwin* | *mingw* | *pw32*)
2399
# don't eliminate duplications in $postdeps and $predeps
2400
duplicate_compiler_generated_deps=yes
2403
duplicate_compiler_generated_deps=$duplicate_deps
2409
# Find all interdependent deplibs by searching for libraries
2410
# that are linked more than once (e.g. -la -lb -la)
2411
for deplib in $deplibs; do
2412
if test "X$duplicate_deps" = "Xyes" ; then
2414
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2417
libs="$libs $deplib"
2420
if test "$linkmode" = lib; then
2421
libs="$predeps $libs $compiler_lib_search_path $postdeps"
2423
# Compute libraries that are listed more than once in $predeps
2424
# $postdeps and mark them as special (i.e., whose duplicates are
2425
# not to be eliminated).
2427
if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
2428
for pre_post_dep in $predeps $postdeps; do
2429
case "$pre_post_deps " in
2430
*" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
2432
pre_post_deps="$pre_post_deps $pre_post_dep"
2441
need_relink=no # whether we're linking any uninstalled libtool libraries
2442
notinst_deplibs= # not-installed libtool libraries
2446
for file in $dlfiles $dlprefiles; do
2450
$echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
2462
passes="conv scan dlopen dlpreopen link"
2467
for pass in $passes; do
2468
if test "$linkmode,$pass" = "lib,link" ||
2469
test "$linkmode,$pass" = "prog,scan"; then
2473
if test "$linkmode" = prog; then
2475
dlopen) libs="$dlfiles" ;;
2476
dlpreopen) libs="$dlprefiles" ;;
2477
link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
2480
if test "$pass" = dlopen; then
2481
# Collect dlpreopened libraries
2482
save_deplibs="$deplibs"
2485
for deplib in $libs; do
2489
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
2490
if test "$linkmode,$pass" = "prog,link"; then
2491
compile_deplibs="$deplib $compile_deplibs"
2492
finalize_deplibs="$deplib $finalize_deplibs"
2494
compiler_flags="$compiler_flags $deplib"
2499
if test "$linkmode" != lib && test "$linkmode" != prog; then
2500
$echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2503
name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2504
for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
2505
for search_ext in .la $std_shrext .so .a; do
2506
# Search the libtool library
2507
lib="$searchdir/lib${name}${search_ext}"
2508
if test -f "$lib"; then
2509
if test "$search_ext" = ".la"; then
2518
if test "$found" != yes; then
2519
# deplib doesn't seem to be a libtool library
2520
if test "$linkmode,$pass" = "prog,link"; then
2521
compile_deplibs="$deplib $compile_deplibs"
2522
finalize_deplibs="$deplib $finalize_deplibs"
2524
deplibs="$deplib $deplibs"
2525
test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2528
else # deplib is a libtool library
2529
# If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
2530
# We need to do some special things here, and not later.
2531
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
2532
case " $predeps $postdeps " in
2534
if (${SED} -e '2q' $lib |
2535
grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
2539
*/* | *\\*) . $lib ;;
2542
for l in $old_library $library_names; do
2545
if test "X$ll" = "X$old_library" ; then # only static version available
2547
ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2548
test "X$ladir" = "X$lib" && ladir="."
2549
lib=$ladir/$old_library
2550
if test "$linkmode,$pass" = "prog,link"; then
2551
compile_deplibs="$deplib $compile_deplibs"
2552
finalize_deplibs="$deplib $finalize_deplibs"
2554
deplibs="$deplib $deplibs"
2555
test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2569
deplibs="$deplib $deplibs"
2570
test "$pass" = conv && continue
2571
newdependency_libs="$deplib $newdependency_libs"
2572
newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2575
if test "$pass" = conv; then
2576
deplibs="$deplib $deplibs"
2579
if test "$pass" = scan; then
2580
deplibs="$deplib $deplibs"
2582
compile_deplibs="$deplib $compile_deplibs"
2583
finalize_deplibs="$deplib $finalize_deplibs"
2585
newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2588
$echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
2594
if test "$pass" = link; then
2595
dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
2596
# Make sure the xrpath contains only unique directories.
2599
*) xrpath="$xrpath $dir" ;;
2602
deplibs="$deplib $deplibs"
2605
*.la) lib="$deplib" ;;
2607
if test "$pass" = conv; then
2608
deplibs="$deplib $deplibs"
2614
case $deplibs_check_method in
2616
set dummy $deplibs_check_method
2617
match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2618
if eval $echo \"$deplib\" 2>/dev/null \
2620
| $EGREP "$match_pattern_regex" > /dev/null; then
2628
if test "$valid_a_lib" != yes; then
2630
$echo "*** Warning: Trying to link with static lib archive $deplib."
2631
$echo "*** I have the capability to make that library automatically link in when"
2632
$echo "*** you link to this library. But I can only do this if you have a"
2633
$echo "*** shared version of the library, which you do not appear to have"
2634
$echo "*** because the file extensions .$libext of this argument makes me believe"
2635
$echo "*** that it is just a static archive that I should not used here."
2638
$echo "*** Warning: Linking the shared library $output against the"
2639
$echo "*** static library $deplib is not portable!"
2640
deplibs="$deplib $deplibs"
2645
if test "$pass" != link; then
2646
deplibs="$deplib $deplibs"
2648
compile_deplibs="$deplib $compile_deplibs"
2649
finalize_deplibs="$deplib $finalize_deplibs"
2656
if test "$pass" = conv; then
2657
deplibs="$deplib $deplibs"
2658
elif test "$linkmode" = prog; then
2659
if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
2660
# If there is no dlopen support or we're linking statically,
2661
# we need to preload.
2662
newdlprefiles="$newdlprefiles $deplib"
2663
compile_deplibs="$deplib $compile_deplibs"
2664
finalize_deplibs="$deplib $finalize_deplibs"
2666
newdlfiles="$newdlfiles $deplib"
2676
if test "$found" = yes || test -f "$lib"; then :
2678
$echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2
2682
# Check to see that this really is a libtool archive.
2683
if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
2685
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2689
ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2690
test "X$ladir" = "X$lib" && ladir="."
2698
# If the library was installed with an old release of libtool,
2699
# it will not redefine variables installed, or shouldnotlink
2707
*/* | *\\*) . $lib ;;
2711
if test "$linkmode,$pass" = "lib,link" ||
2712
test "$linkmode,$pass" = "prog,scan" ||
2713
{ test "$linkmode" != prog && test "$linkmode" != lib; }; then
2714
test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
2715
test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
2718
if test "$pass" = conv; then
2719
# Only check for convenience libraries
2720
deplibs="$lib $deplibs"
2721
if test -z "$libdir"; then
2722
if test -z "$old_library"; then
2723
$echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2726
# It is a libtool convenience library, so add in its objects.
2727
convenience="$convenience $ladir/$objdir/$old_library"
2728
old_convenience="$old_convenience $ladir/$objdir/$old_library"
2730
for deplib in $dependency_libs; do
2731
deplibs="$deplib $deplibs"
2732
if test "X$duplicate_deps" = "Xyes" ; then
2733
case "$tmp_libs " in
2734
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2737
tmp_libs="$tmp_libs $deplib"
2739
elif test "$linkmode" != prog && test "$linkmode" != lib; then
2740
$echo "$modename: \`$lib' is not a convenience library" 1>&2
2747
# Get the name of the library we link against.
2749
for l in $old_library $library_names; do
2752
if test -z "$linklib"; then
2753
$echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2757
# This library was specified with -dlopen.
2758
if test "$pass" = dlopen; then
2759
if test -z "$libdir"; then
2760
$echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2763
if test -z "$dlname" ||
2764
test "$dlopen_support" != yes ||
2765
test "$build_libtool_libs" = no; then
2766
# If there is no dlname, no dlopen support or we're linking
2767
# statically, we need to preload. We also need to preload any
2768
# dependent libraries so libltdl's deplib preloader doesn't
2769
# bomb out in the load deplibs phase.
2770
dlprefiles="$dlprefiles $lib $dependency_libs"
2772
newdlfiles="$newdlfiles $lib"
2777
# We need an absolute path.
2779
[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
2781
abs_ladir=`cd "$ladir" && pwd`
2782
if test -z "$abs_ladir"; then
2783
$echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
2784
$echo "$modename: passing it literally to the linker, although it might fail" 1>&2
2789
laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
2791
# Find the relevant object directory and library name.
2792
if test "X$installed" = Xyes; then
2793
if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2794
$echo "$modename: warning: library \`$lib' was moved." 1>&2
2802
test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
2804
if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2807
# Remove this search path later
2808
notinst_path="$notinst_path $abs_ladir"
2810
dir="$ladir/$objdir"
2811
absdir="$abs_ladir/$objdir"
2812
# Remove this search path later
2813
notinst_path="$notinst_path $abs_ladir"
2815
fi # $installed = yes
2816
name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2818
# This library was specified with -dlpreopen.
2819
if test "$pass" = dlpreopen; then
2820
if test -z "$libdir"; then
2821
$echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2824
# Prefer using a static library (so that no silly _DYNAMIC symbols
2825
# are required to link).
2826
if test -n "$old_library"; then
2827
newdlprefiles="$newdlprefiles $dir/$old_library"
2828
# Otherwise, use the dlname, so that lt_dlopen finds it.
2829
elif test -n "$dlname"; then
2830
newdlprefiles="$newdlprefiles $dir/$dlname"
2832
newdlprefiles="$newdlprefiles $dir/$linklib"
2834
fi # $pass = dlpreopen
2836
if test -z "$libdir"; then
2837
# Link the convenience library
2838
if test "$linkmode" = lib; then
2839
deplibs="$dir/$old_library $deplibs"
2840
elif test "$linkmode,$pass" = "prog,link"; then
2841
compile_deplibs="$dir/$old_library $compile_deplibs"
2842
finalize_deplibs="$dir/$old_library $finalize_deplibs"
2844
deplibs="$lib $deplibs" # used for prog,scan pass
2850
if test "$linkmode" = prog && test "$pass" != link; then
2851
newlib_search_path="$newlib_search_path $ladir"
2852
deplibs="$lib $deplibs"
2855
if test "$link_all_deplibs" != no || test -z "$library_names" ||
2856
test "$build_libtool_libs" = no; then
2861
for deplib in $dependency_libs; do
2863
-L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2865
# Need to link against all dependency_libs?
2866
if test "$linkalldeplibs" = yes; then
2867
deplibs="$deplib $deplibs"
2869
# Need to hardcode shared library paths
2870
# or/and link against static libraries
2871
newdependency_libs="$deplib $newdependency_libs"
2873
if test "X$duplicate_deps" = "Xyes" ; then
2874
case "$tmp_libs " in
2875
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2878
tmp_libs="$tmp_libs $deplib"
2881
fi # $linkmode = prog...
2883
if test "$linkmode,$pass" = "prog,link"; then
2884
if test -n "$library_names" &&
2885
{ { test "$prefer_static_libs" = no ||
2886
test "$prefer_static_libs,$installed" = "built,yes"; } ||
2887
test -z "$old_library"; }; then
2888
# We need to hardcode the library path
2889
if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
2890
# Make sure the rpath contains only unique directories.
2891
case "$temp_rpath " in
2894
*) temp_rpath="$temp_rpath $absdir" ;;
2898
# Hardcode the library path.
2899
# Skip directories that are in the system default run-time
2901
case " $sys_lib_dlsearch_path " in
2904
case "$compile_rpath " in
2906
*) compile_rpath="$compile_rpath $absdir"
2910
case " $sys_lib_dlsearch_path " in
2913
case "$finalize_rpath " in
2915
*) finalize_rpath="$finalize_rpath $libdir"
2919
fi # $linkmode,$pass = prog,link...
2921
if test "$alldeplibs" = yes &&
2922
{ test "$deplibs_check_method" = pass_all ||
2923
{ test "$build_libtool_libs" = yes &&
2924
test -n "$library_names"; }; }; then
2925
# We only need to search for static libraries
2930
link_static=no # Whether the deplib will be linked statically
2931
use_static_libs=$prefer_static_libs
2932
if test "$use_static_libs" = built && test "$installed" = yes ; then
2935
if test -n "$library_names" &&
2936
{ test "$use_static_libs" = no || test -z "$old_library"; }; then
2937
if test "$installed" = no; then
2938
notinst_deplibs="$notinst_deplibs $lib"
2941
# This is a shared library
2943
# Warn about portability, can't link against -module's on
2944
# some systems (darwin)
2945
if test "$shouldnotlink" = yes && test "$pass" = link ; then
2947
if test "$linkmode" = prog; then
2948
$echo "*** Warning: Linking the executable $output against the loadable module"
2950
$echo "*** Warning: Linking the shared library $output against the loadable module"
2952
$echo "*** $linklib is not portable!"
2954
if test "$linkmode" = lib &&
2955
test "$hardcode_into_libs" = yes; then
2956
# Hardcode the library path.
2957
# Skip directories that are in the system default run-time
2959
case " $sys_lib_dlsearch_path " in
2962
case "$compile_rpath " in
2964
*) compile_rpath="$compile_rpath $absdir"
2968
case " $sys_lib_dlsearch_path " in
2971
case "$finalize_rpath " in
2973
*) finalize_rpath="$finalize_rpath $libdir"
2979
if test -n "$old_archive_from_expsyms_cmds"; then
2980
# figure out the soname
2981
set dummy $library_names
2984
libname=`eval \\$echo \"$libname_spec\"`
2985
# use dlname if we got it. it's perfectly good, no?
2986
if test -n "$dlname"; then
2988
elif test -n "$soname_spec"; then
2992
major=`expr $current - $age`
2996
eval soname=\"$soname_spec\"
3001
# Make a new name for the extract_expsyms_cmds to use
3003
soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
3004
newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
3006
# If the library has no export list, then create one now
3007
if test -f "$output_objdir/$soname-def"; then :
3009
$show "extracting exported symbol list from \`$soname'"
3010
save_ifs="$IFS"; IFS='~'
3011
cmds=$extract_expsyms_cmds
3012
for cmd in $cmds; do
3016
$run eval "$cmd" || exit $?
3022
if test -f "$output_objdir/$newlib"; then :; else
3023
$show "generating import library for \`$soname'"
3024
save_ifs="$IFS"; IFS='~'
3025
cmds=$old_archive_from_expsyms_cmds
3026
for cmd in $cmds; do
3030
$run eval "$cmd" || exit $?
3034
# make sure the library variables are pointing to the new library
3037
fi # test -n "$old_archive_from_expsyms_cmds"
3039
if test "$linkmode" = prog || test "$mode" != relink; then
3044
case $hardcode_action in
3045
immediate | unsupported)
3046
if test "$hardcode_direct" = no; then
3049
*-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
3050
*-*-sysv4*uw2*) add_dir="-L$dir" ;;
3051
*-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
3052
*-*-unixware7*) add_dir="-L$dir" ;;
3054
# if the lib is a module then we can not link against
3055
# it, someone is ignoring the new warnings I added
3056
if /usr/bin/file -L $add 2> /dev/null |
3057
$EGREP ": [^:]* bundle" >/dev/null ; then
3058
$echo "** Warning, lib $linklib is a module, not a shared library"
3059
if test -z "$old_library" ; then
3061
$echo "** And there doesn't seem to be a static archive available"
3062
$echo "** The link will probably fail, sorry"
3064
add="$dir/$old_library"
3068
elif test "$hardcode_minus_L" = no; then
3070
*-*-sunos*) add_shlibpath="$dir" ;;
3074
elif test "$hardcode_shlibpath_var" = no; then
3075
add_shlibpath="$dir"
3082
if test "$hardcode_direct" = yes; then
3084
elif test "$hardcode_minus_L" = yes; then
3086
# Try looking first in the location we're being installed to.
3087
if test -n "$inst_prefix_dir"; then
3090
add_dir="$add_dir -L$inst_prefix_dir$libdir"
3095
elif test "$hardcode_shlibpath_var" = yes; then
3096
add_shlibpath="$dir"
3105
if test "$lib_linked" != yes; then
3106
$echo "$modename: configuration error: unsupported hardcode properties"
3110
if test -n "$add_shlibpath"; then
3111
case :$compile_shlibpath: in
3112
*":$add_shlibpath:"*) ;;
3113
*) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
3116
if test "$linkmode" = prog; then
3117
test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
3118
test -n "$add" && compile_deplibs="$add $compile_deplibs"
3120
test -n "$add_dir" && deplibs="$add_dir $deplibs"
3121
test -n "$add" && deplibs="$add $deplibs"
3122
if test "$hardcode_direct" != yes && \
3123
test "$hardcode_minus_L" != yes && \
3124
test "$hardcode_shlibpath_var" = yes; then
3125
case :$finalize_shlibpath: in
3127
*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
3133
if test "$linkmode" = prog || test "$mode" = relink; then
3137
# Finalize command for both is simple: just hardcode it.
3138
if test "$hardcode_direct" = yes; then
3139
add="$libdir/$linklib"
3140
elif test "$hardcode_minus_L" = yes; then
3143
elif test "$hardcode_shlibpath_var" = yes; then
3144
case :$finalize_shlibpath: in
3146
*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
3149
elif test "$hardcode_automatic" = yes; then
3150
if test -n "$inst_prefix_dir" &&
3151
test -f "$inst_prefix_dir$libdir/$linklib" ; then
3152
add="$inst_prefix_dir$libdir/$linklib"
3154
add="$libdir/$linklib"
3157
# We cannot seem to hardcode it, guess we'll fake it.
3159
# Try looking first in the location we're being installed to.
3160
if test -n "$inst_prefix_dir"; then
3163
add_dir="$add_dir -L$inst_prefix_dir$libdir"
3170
if test "$linkmode" = prog; then
3171
test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
3172
test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
3174
test -n "$add_dir" && deplibs="$add_dir $deplibs"
3175
test -n "$add" && deplibs="$add $deplibs"
3178
elif test "$linkmode" = prog; then
3179
# Here we assume that one of hardcode_direct or hardcode_minus_L
3180
# is not unsupported. This is valid on all known static and
3182
if test "$hardcode_direct" != unsupported; then
3183
test -n "$old_library" && linklib="$old_library"
3184
compile_deplibs="$dir/$linklib $compile_deplibs"
3185
finalize_deplibs="$dir/$linklib $finalize_deplibs"
3187
compile_deplibs="-l$name -L$dir $compile_deplibs"
3188
finalize_deplibs="-l$name -L$dir $finalize_deplibs"
3190
elif test "$build_libtool_libs" = yes; then
3191
# Not a shared library
3192
if test "$deplibs_check_method" != pass_all; then
3193
# We're trying link a shared library against a static one
3194
# but the system doesn't support it.
3196
# Just print a warning and add the library to dependency_libs so
3197
# that the program can be linked against the static library.
3199
$echo "*** Warning: This system can not link to static lib archive $lib."
3200
$echo "*** I have the capability to make that library automatically link in when"
3201
$echo "*** you link to this library. But I can only do this if you have a"
3202
$echo "*** shared version of the library, which you do not appear to have."
3203
if test "$module" = yes; then
3204
$echo "*** But as you try to build a module library, libtool will still create "
3205
$echo "*** a static module, that should work as long as the dlopening application"
3206
$echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
3207
if test -z "$global_symbol_pipe"; then
3209
$echo "*** However, this would only work if libtool was able to extract symbol"
3210
$echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3211
$echo "*** not find such a program. So, this module is probably useless."
3212
$echo "*** \`nm' from GNU binutils and a full rebuild may help."
3214
if test "$build_old_libs" = no; then
3215
build_libtool_libs=module
3218
build_libtool_libs=no
3222
deplibs="$dir/$old_library $deplibs"
3225
fi # link shared/static library?
3227
if test "$linkmode" = lib; then
3228
if test -n "$dependency_libs" &&
3229
{ test "$hardcode_into_libs" != yes ||
3230
test "$build_old_libs" = yes ||
3231
test "$link_static" = yes; }; then
3232
# Extract -R from dependency_libs
3234
for libdir in $dependency_libs; do
3236
-R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
3238
*" $temp_xrpath "*) ;;
3239
*) xrpath="$xrpath $temp_xrpath";;
3241
*) temp_deplibs="$temp_deplibs $libdir";;
3244
dependency_libs="$temp_deplibs"
3247
newlib_search_path="$newlib_search_path $absdir"
3248
# Link against this library
3249
test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
3250
# ... and its dependency_libs
3252
for deplib in $dependency_libs; do
3253
newdependency_libs="$deplib $newdependency_libs"
3254
if test "X$duplicate_deps" = "Xyes" ; then
3255
case "$tmp_libs " in
3256
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
3259
tmp_libs="$tmp_libs $deplib"
3262
if test "$link_all_deplibs" != no; then
3263
# Add the search paths of all dependency libraries
3264
for deplib in $dependency_libs; do
3266
-L*) path="$deplib" ;;
3268
dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
3269
test "X$dir" = "X$deplib" && dir="."
3270
# We need an absolute path.
3272
[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
3274
absdir=`cd "$dir" && pwd`
3275
if test -z "$absdir"; then
3276
$echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
3281
if grep "^installed=no" $deplib > /dev/null; then
3282
path="$absdir/$objdir"
3284
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
3285
if test -z "$libdir"; then
3286
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
3289
if test "$absdir" != "$libdir"; then
3290
$echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
3297
# we do not want to link against static libs,
3298
# but need to link against shared
3299
eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
3300
if test -n "$deplibrary_names" ; then
3301
for tmp in $deplibrary_names ; do
3304
if test -f "$path/$depdepl" ; then
3305
depdepl="$path/$depdepl"
3307
# do not add paths which are already there
3308
case " $newlib_search_path " in
3310
*) newlib_search_path="$newlib_search_path $path";;
3323
# Again, we only want to link against shared libraries
3324
eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
3325
for tmp in $newlib_search_path ; do
3326
if test -f "$tmp/lib$tmp_libs.dylib" ; then
3327
eval depdepl="$tmp/lib$tmp_libs.dylib"
3338
case " $deplibs " in
3340
*) deplibs="$path $deplibs" ;;
3342
case " $deplibs " in
3344
*) deplibs="$depdepl $deplibs" ;;
3347
fi # link_all_deplibs != no
3349
done # for deplib in $libs
3350
dependency_libs="$newdependency_libs"
3351
if test "$pass" = dlpreopen; then
3352
# Link the dlpreopened libraries before other libraries
3353
for deplib in $save_deplibs; do
3354
deplibs="$deplib $deplibs"
3357
if test "$pass" != dlopen; then
3358
if test "$pass" != conv; then
3359
# Make sure lib_search_path contains only unique directories.
3361
for dir in $newlib_search_path; do
3362
case "$lib_search_path " in
3364
*) lib_search_path="$lib_search_path $dir" ;;
3370
if test "$linkmode,$pass" != "prog,link"; then
3373
vars="compile_deplibs finalize_deplibs"
3375
for var in $vars dependency_libs; do
3376
# Add libraries to $var in reverse order
3377
eval tmp_libs=\"\$$var\"
3379
for deplib in $tmp_libs; do
3380
# FIXME: Pedantically, this is the right thing to do, so
3381
# that some nasty dependency loop isn't accidentally
3383
#new_libs="$deplib $new_libs"
3384
# Pragmatically, this seems to cause very few problems in
3387
-L*) new_libs="$deplib $new_libs" ;;
3390
# And here is the reason: when a library appears more
3391
# than once as an explicit dependence of a library, or
3392
# is implicitly linked in more than once by the
3393
# compiler, it is considered special, and multiple
3394
# occurrences thereof are not removed. Compare this
3395
# with having the same library being listed as a
3396
# dependency of multiple other libraries: in this case,
3397
# we know (pedantically, we assume) the library does not
3398
# need to be listed more than once, so we keep only the
3399
# last copy. This is not always right, but it is rare
3400
# enough that we require users that really mean to play
3401
# such unportable linking tricks to link the library
3402
# using -Wl,-lname, so that libtool does not consider it
3403
# for duplicate removal.
3404
case " $specialdeplibs " in
3405
*" $deplib "*) new_libs="$deplib $new_libs" ;;
3407
case " $new_libs " in
3409
*) new_libs="$deplib $new_libs" ;;
3417
for deplib in $new_libs; do
3420
case " $tmp_libs " in
3422
*) tmp_libs="$tmp_libs $deplib" ;;
3425
*) tmp_libs="$tmp_libs $deplib" ;;
3428
eval $var=\"$tmp_libs\"
3431
# Last step: remove runtime libs from dependency_libs
3432
# (they stay in deplibs)
3434
for i in $dependency_libs ; do
3435
case " $predeps $postdeps $compiler_lib_search_path " in
3440
if test -n "$i" ; then
3441
tmp_libs="$tmp_libs $i"
3444
dependency_libs=$tmp_libs
3446
if test "$linkmode" = prog; then
3447
dlfiles="$newdlfiles"
3448
dlprefiles="$newdlprefiles"
3453
if test -n "$deplibs"; then
3454
$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
3457
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3458
$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3461
if test -n "$rpath"; then
3462
$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3465
if test -n "$xrpath"; then
3466
$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
3469
if test -n "$vinfo"; then
3470
$echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
3473
if test -n "$release"; then
3474
$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
3477
if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
3478
$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
3481
# Now set the variables for building old libraries.
3482
build_libtool_libs=no
3484
objs="$objs$old_deplibs"
3488
# Make sure we only generate libraries of the form `libNAME.la'.
3491
name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3492
eval shared_ext=\"$shrext_cmds\"
3493
eval libname=\"$libname_spec\"
3496
if test "$module" = no; then
3497
$echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3501
if test "$need_lib_prefix" != no; then
3502
# Add the "lib" prefix for modules if required
3503
name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3504
eval shared_ext=\"$shrext_cmds\"
3505
eval libname=\"$libname_spec\"
3507
libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3512
if test -n "$objs"; then
3513
if test "$deplibs_check_method" != pass_all; then
3514
$echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
3518
$echo "*** Warning: Linking the shared library $output against the non-libtool"
3519
$echo "*** objects $objs is not portable!"
3520
libobjs="$libobjs $objs"
3524
if test "$dlself" != no; then
3525
$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
3529
if test "$#" -gt 2; then
3530
$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
3535
if test -z "$rpath"; then
3536
if test "$build_libtool_libs" = yes; then
3537
# Building a libtool convenience library.
3538
# Some compilers have problems with a `.al' extension so
3539
# convenience libraries should have the same extension an
3540
# archive normally would.
3541
oldlibs="$output_objdir/$libname.$libext $oldlibs"
3542
build_libtool_libs=convenience
3546
if test -n "$vinfo"; then
3547
$echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
3550
if test -n "$release"; then
3551
$echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
3555
# Parse the version information argument.
3556
save_ifs="$IFS"; IFS=':'
3557
set dummy $vinfo 0 0 0
3560
if test -n "$8"; then
3561
$echo "$modename: too many parameters to \`-version-info'" 1>&2
3566
# convert absolute version numbers to libtool ages
3567
# this retains compatibility with .la files and attempts
3568
# to make the code below a bit more comprehensible
3570
case $vinfo_number in
3574
number_revision="$4"
3576
# There are really only two kinds -- those that
3577
# use the current revision as the major version
3578
# and those that subtract age and use age as
3579
# a minor version. But, then there is irix
3580
# which has an extra 1 added just for fun
3582
case $version_type in
3583
darwin|linux|osf|windows|none)
3584
current=`expr $number_major + $number_minor`
3586
revision="$number_revision"
3588
freebsd-aout|freebsd-elf|sunos)
3589
current="$number_major"
3590
revision="$number_minor"
3594
current=`expr $number_major + $number_minor`
3596
revision="$number_minor"
3597
lt_irix_increment=no
3608
# Check that each of the things are valid numbers.
3610
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]) ;;
3612
$echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2
3613
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
3619
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]) ;;
3621
$echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2
3622
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
3628
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]) ;;
3630
$echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2
3631
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
3636
if test "$age" -gt "$current"; then
3637
$echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3638
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
3642
# Calculate the version variables.
3646
case $version_type in
3650
# Like Linux, but with the current version available in
3651
# verstring for coding it into the library header
3652
major=.`expr $current - $age`
3653
versuffix="$major.$age.$revision"
3654
# Darwin ld doesn't like 0 for these options...
3655
minor_current=`expr $current + 1`
3656
xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
3657
verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
3662
versuffix=".$current.$revision";
3667
versuffix=".$current";
3671
if test "X$lt_irix_increment" = "Xno"; then
3672
major=`expr $current - $age`
3674
major=`expr $current - $age + 1`
3676
case $version_type in
3677
nonstopux) verstring_prefix=nonstopux ;;
3678
*) verstring_prefix=sgi ;;
3680
verstring="$verstring_prefix$major.$revision"
3682
# Add in all the interfaces that we are compatible with.
3684
while test "$loop" -ne 0; do
3685
iface=`expr $revision - $loop`
3686
loop=`expr $loop - 1`
3687
verstring="$verstring_prefix$major.$iface:$verstring"
3690
# Before this point, $major must not contain `.'.
3692
versuffix="$major.$revision"
3696
major=.`expr $current - $age`
3697
versuffix="$major.$age.$revision"
3701
major=.`expr $current - $age`
3702
versuffix=".$current.$age.$revision"
3703
verstring="$current.$age.$revision"
3705
# Add in all the interfaces that we are compatible with.
3707
while test "$loop" -ne 0; do
3708
iface=`expr $current - $loop`
3709
loop=`expr $loop - 1`
3710
verstring="$verstring:${iface}.0"
3713
# Make executables depend on our current version.
3714
verstring="$verstring:${current}.0"
3719
versuffix=".$current.$revision"
3723
# Use '-' rather than '.', since we only want one
3724
# extension on DOS 8.3 filesystems.
3725
major=`expr $current - $age`
3730
$echo "$modename: unknown library version type \`$version_type'" 1>&2
3731
$echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3736
# Clear the version info if we defaulted, and they specified a release.
3737
if test -z "$vinfo" && test -n "$release"; then
3739
case $version_type in
3741
# we can't check for "0.0" in archive_cmds due to quoting
3742
# problems, so we reset it completely
3749
if test "$need_version" = no; then
3756
# Remove version info from name if versioning should be avoided
3757
if test "$avoid_version" = yes && test "$need_version" = no; then
3763
# Check to see if the archive will have undefined symbols.
3764
if test "$allow_undefined" = yes; then
3765
if test "$allow_undefined_flag" = unsupported; then
3766
$echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
3767
build_libtool_libs=no
3771
# Don't allow undefined symbols.
3772
allow_undefined_flag="$no_undefined_flag"
3776
if test "$mode" != relink; then
3777
# Remove our outputs, but don't remove object files since they
3778
# may have been created when compiling PIC objects.
3780
tempremovelist=`$echo "$output_objdir/*"`
3781
for p in $tempremovelist; do
3785
$output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
3786
if test "X$precious_files_regex" != "X"; then
3787
if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
3792
removelist="$removelist $p"
3797
if test -n "$removelist"; then
3798
$show "${rm}r $removelist"
3799
$run ${rm}r $removelist
3803
# Now set the variables for building old libraries.
3804
if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
3805
oldlibs="$oldlibs $output_objdir/$libname.$libext"
3807
# Transform .lo files to .o files.
3808
oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
3811
# Eliminate all temporary directories.
3812
#for path in $notinst_path; do
3813
# lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"`
3814
# deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"`
3815
# dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"`
3818
if test -n "$xrpath"; then
3819
# If the user specified any rpath flags, then add them.
3821
for libdir in $xrpath; do
3822
temp_xrpath="$temp_xrpath -R$libdir"
3823
case "$finalize_rpath " in
3825
*) finalize_rpath="$finalize_rpath $libdir" ;;
3828
if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
3829
dependency_libs="$temp_xrpath $dependency_libs"
3833
# Make sure dlfiles contains only unique files that won't be dlpreopened
3834
old_dlfiles="$dlfiles"
3836
for lib in $old_dlfiles; do
3837
case " $dlprefiles $dlfiles " in
3839
*) dlfiles="$dlfiles $lib" ;;
3843
# Make sure dlprefiles contains only unique files
3844
old_dlprefiles="$dlprefiles"
3846
for lib in $old_dlprefiles; do
3847
case "$dlprefiles " in
3849
*) dlprefiles="$dlprefiles $lib" ;;
3853
if test "$build_libtool_libs" = yes; then
3854
if test -n "$rpath"; then
3856
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
3857
# these systems don't actually have a c library (as such)!
3859
*-*-rhapsody* | *-*-darwin1.[012])
3860
# Rhapsody C library is in the System framework
3861
deplibs="$deplibs -framework System"
3864
# Don't link with libc until the a.out ld.so is fixed.
3866
*-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
3867
# Do not include libc due to us having libc/libc_r.
3869
*-*-sco3.2v5* | *-*-sco5v6*)
3870
# Causes problems with __ctype
3872
*-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
3873
# Compiler inserts libc in the correct place for threads to work
3876
# Add libc to deplibs on all other systems if necessary.
3877
if test "$build_libtool_need_lc" = "yes"; then
3878
deplibs="$deplibs -lc"
3884
# Transform deplibs into only deplibs that can be linked in shared.
3886
libname_save=$libname
3887
release_save=$release
3888
versuffix_save=$versuffix
3890
# I'm not sure if I'm treating the release correctly. I think
3891
# release should show up in the -l (ie -lgmp5) so we don't want to
3892
# add it in twice. Is that correct?
3898
case $deplibs_check_method in
3900
# Don't check for shared/static. Everything works.
3901
# This might be a little naive. We might want to check
3902
# whether the library exists or not. But this is on
3903
# osf3 & osf4 and I'm not really sure... Just
3904
# implementing what was already the behavior.
3908
# This code stresses the "libraries are programs" paradigm to its
3909
# limits. Maybe even breaks it. We compile a program, linking it
3910
# against the deplibs as a proxy for the library. Then we can check
3911
# whether they linked in statically or dynamically with ldd.
3913
cat > conftest.c <<EOF
3914
int main() { return 0; }
3917
if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
3918
ldd_output=`ldd conftest`
3919
for i in $deplibs; do
3920
name=`expr $i : '-l\(.*\)'`
3921
# If $name is empty we are operating on a -L argument.
3922
if test "$name" != "" && test "$name" != "0"; then
3923
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3924
case " $predeps $postdeps " in
3926
newdeplibs="$newdeplibs $i"
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
3936
if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3937
newdeplibs="$newdeplibs $i"
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 I believe you do not have"
3945
$echo "*** because a test_compile did reveal that the linker did not use it for"
3946
$echo "*** its dynamic dependency list that programs get resolved with at runtime."
3950
newdeplibs="$newdeplibs $i"
3954
# Error occurred in the first compile. Let's try to salvage
3955
# the situation: Compile a separate program for each library.
3956
for i in $deplibs; do
3957
name=`expr $i : '-l\(.*\)'`
3958
# If $name is empty we are operating on a -L argument.
3959
if test "$name" != "" && test "$name" != "0"; then
3961
if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
3962
ldd_output=`ldd conftest`
3963
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3964
case " $predeps $postdeps " in
3966
newdeplibs="$newdeplibs $i"
3971
if test -n "$i" ; then
3972
libname=`eval \\$echo \"$libname_spec\"`
3973
deplib_matches=`eval \\$echo \"$library_names_spec\"`
3974
set dummy $deplib_matches
3976
if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3977
newdeplibs="$newdeplibs $i"
3981
$echo "*** Warning: dynamic linker does not accept needed library $i."
3982
$echo "*** I have the capability to make that library automatically link in when"
3983
$echo "*** you link to this library. But I can only do this if you have a"
3984
$echo "*** shared version of the library, which you do not appear to have"
3985
$echo "*** because a test_compile did reveal that the linker did not use this one"
3986
$echo "*** as a dynamic dependency that programs can get resolved with at runtime."
3992
$echo "*** Warning! Library $i is needed by this library but I was not able to"
3993
$echo "*** make it link in! You will probably need to install it or some"
3994
$echo "*** library that it depends on before this library will be fully"
3995
$echo "*** functional. Installing it before continuing would be even better."
3998
newdeplibs="$newdeplibs $i"
4004
set dummy $deplibs_check_method
4005
file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
4006
for a_deplib in $deplibs; do
4007
name=`expr $a_deplib : '-l\(.*\)'`
4008
# If $name is empty we are operating on a -L argument.
4009
if test "$name" != "" && test "$name" != "0"; then
4010
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
4011
case " $predeps $postdeps " in
4013
newdeplibs="$newdeplibs $a_deplib"
4018
if test -n "$a_deplib" ; then
4019
libname=`eval \\$echo \"$libname_spec\"`
4020
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
4021
potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
4022
for potent_lib in $potential_libs; do
4023
# Follow soft links.
4024
if ls -lLd "$potent_lib" 2>/dev/null \
4025
| grep " -> " >/dev/null; then
4028
# The statement above tries to avoid entering an
4029
# endless loop below, in case of cyclic links.
4030
# We might still enter an endless loop, since a link
4031
# loop can be closed while we follow links,
4033
potlib="$potent_lib"
4034
while test -h "$potlib" 2>/dev/null; do
4035
potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
4037
[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
4038
*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
4041
if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
4043
| $EGREP "$file_magic_regex" > /dev/null; then
4044
newdeplibs="$newdeplibs $a_deplib"
4051
if test -n "$a_deplib" ; then
4054
$echo "*** Warning: linker path does not have real file for library $a_deplib."
4055
$echo "*** I have the capability to make that library automatically link in when"
4056
$echo "*** you link to this library. But I can only do this if you have a"
4057
$echo "*** shared version of the library, which you do not appear to have"
4058
$echo "*** because I did check the linker path looking for a file starting"
4059
if test -z "$potlib" ; then
4060
$echo "*** with $libname but no candidates were found. (...for file magic test)"
4062
$echo "*** with $libname and none of the candidates passed a file format test"
4063
$echo "*** using a file magic. Last file checked: $potlib"
4067
# Add a -L argument.
4068
newdeplibs="$newdeplibs $a_deplib"
4070
done # Gone through all deplibs.
4073
set dummy $deplibs_check_method
4074
match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
4075
for a_deplib in $deplibs; do
4076
name=`expr $a_deplib : '-l\(.*\)'`
4077
# If $name is empty we are operating on a -L argument.
4078
if test -n "$name" && test "$name" != "0"; then
4079
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
4080
case " $predeps $postdeps " in
4082
newdeplibs="$newdeplibs $a_deplib"
4087
if test -n "$a_deplib" ; then
4088
libname=`eval \\$echo \"$libname_spec\"`
4089
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
4090
potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
4091
for potent_lib in $potential_libs; do
4092
potlib="$potent_lib" # see symlink-check above in file_magic test
4093
if eval $echo \"$potent_lib\" 2>/dev/null \
4095
| $EGREP "$match_pattern_regex" > /dev/null; then
4096
newdeplibs="$newdeplibs $a_deplib"
4103
if test -n "$a_deplib" ; then
4106
$echo "*** Warning: linker path does not have real file for library $a_deplib."
4107
$echo "*** I have the capability to make that library automatically link in when"
4108
$echo "*** you link to this library. But I can only do this if you have a"
4109
$echo "*** shared version of the library, which you do not appear to have"
4110
$echo "*** because I did check the linker path looking for a file starting"
4111
if test -z "$potlib" ; then
4112
$echo "*** with $libname but no candidates were found. (...for regex pattern test)"
4114
$echo "*** with $libname and none of the candidates passed a file format test"
4115
$echo "*** using a regex pattern. Last file checked: $potlib"
4119
# Add a -L argument.
4120
newdeplibs="$newdeplibs $a_deplib"
4122
done # Gone through all deplibs.
4126
tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
4127
-e 's/ -[LR][^ ]*//g'`
4128
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
4129
for i in $predeps $postdeps ; do
4130
# can't use Xsed below, because $i might contain '/'
4131
tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
4134
if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
4135
| grep . >/dev/null; then
4137
if test "X$deplibs_check_method" = "Xnone"; then
4138
$echo "*** Warning: inter-library dependencies are not supported in this platform."
4140
$echo "*** Warning: inter-library dependencies are not known to be supported."
4142
$echo "*** All declared inter-library dependencies are being dropped."
4147
versuffix=$versuffix_save
4149
release=$release_save
4150
libname=$libname_save
4154
*-*-rhapsody* | *-*-darwin1.[012])
4155
# On Rhapsody replace the C library is the System framework
4156
newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
4160
if test "$droppeddeps" = yes; then
4161
if test "$module" = yes; then
4163
$echo "*** Warning: libtool could not satisfy all declared inter-library"
4164
$echo "*** dependencies of module $libname. Therefore, libtool will create"
4165
$echo "*** a static module, that should work as long as the dlopening"
4166
$echo "*** application is linked with the -dlopen flag."
4167
if test -z "$global_symbol_pipe"; then
4169
$echo "*** However, this would only work if libtool was able to extract symbol"
4170
$echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
4171
$echo "*** not find such a program. So, this module is probably useless."
4172
$echo "*** \`nm' from GNU binutils and a full rebuild may help."
4174
if test "$build_old_libs" = no; then
4175
oldlibs="$output_objdir/$libname.$libext"
4176
build_libtool_libs=module
4179
build_libtool_libs=no
4182
$echo "*** The inter-library dependencies that have been dropped here will be"
4183
$echo "*** automatically added whenever a program is linked with this library"
4184
$echo "*** or is declared to -dlopen it."
4186
if test "$allow_undefined" = no; then
4188
$echo "*** Since this library must not contain undefined symbols,"
4189
$echo "*** because either the platform does not support them or"
4190
$echo "*** it was explicitly requested with -no-undefined,"
4191
$echo "*** libtool will only create a static version of it."
4192
if test "$build_old_libs" = no; then
4193
oldlibs="$output_objdir/$libname.$libext"
4194
build_libtool_libs=module
4197
build_libtool_libs=no
4202
# Done checking deplibs!
4207
# move library search paths that coincide with paths to not yet
4208
# installed libraries to the beginning of the library search list
4210
for path in $notinst_path; do
4211
case " $new_libs " in
4212
*" -L$path/$objdir "*) ;;
4214
case " $deplibs " in
4215
*" -L$path/$objdir "*)
4216
new_libs="$new_libs -L$path/$objdir" ;;
4221
for deplib in $deplibs; do
4224
case " $new_libs " in
4226
*) new_libs="$new_libs $deplib" ;;
4229
*) new_libs="$new_libs $deplib" ;;
4235
# All the library-specific variables (install_libdir is set above).
4240
# Test again, we may have decided not to build it any more
4241
if test "$build_libtool_libs" = yes; then
4242
if test "$hardcode_into_libs" = yes; then
4243
# Hardcode the library paths
4246
rpath="$finalize_rpath"
4247
test "$mode" != relink && rpath="$compile_rpath$rpath"
4248
for libdir in $rpath; do
4249
if test -n "$hardcode_libdir_flag_spec"; then
4250
if test -n "$hardcode_libdir_separator"; then
4251
if test -z "$hardcode_libdirs"; then
4252
hardcode_libdirs="$libdir"
4254
# Just accumulate the unique libdirs.
4255
case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4256
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4259
hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4264
eval flag=\"$hardcode_libdir_flag_spec\"
4265
dep_rpath="$dep_rpath $flag"
4267
elif test -n "$runpath_var"; then
4268
case "$perm_rpath " in
4270
*) perm_rpath="$perm_rpath $libdir" ;;
4274
# Substitute the hardcoded libdirs into the rpath.
4275
if test -n "$hardcode_libdir_separator" &&
4276
test -n "$hardcode_libdirs"; then
4277
libdir="$hardcode_libdirs"
4278
if test -n "$hardcode_libdir_flag_spec_ld"; then
4279
case $archive_cmds in
4280
*\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;;
4281
*) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;;
4284
eval dep_rpath=\"$hardcode_libdir_flag_spec\"
4287
if test -n "$runpath_var" && test -n "$perm_rpath"; then
4288
# We should set the runpath_var.
4290
for dir in $perm_rpath; do
4293
eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
4295
test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
4298
shlibpath="$finalize_shlibpath"
4299
test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
4300
if test -n "$shlibpath"; then
4301
eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
4304
# Get the real and link names of the library.
4305
eval shared_ext=\"$shrext_cmds\"
4306
eval library_names=\"$library_names_spec\"
4307
set dummy $library_names
4311
if test -n "$soname_spec"; then
4312
eval soname=\"$soname_spec\"
4316
if test -z "$dlname"; then
4320
lib="$output_objdir/$realname"
4324
linknames="$linknames $link"
4327
# Use standard objects if they are pic
4328
test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4330
# Prepare the list of exported symbols
4331
if test -z "$export_symbols"; then
4332
if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
4333
$show "generating symbol list for \`$libname.la'"
4334
export_symbols="$output_objdir/$libname.exp"
4335
$run $rm $export_symbols
4336
cmds=$export_symbols_cmds
4337
save_ifs="$IFS"; IFS='~'
4338
for cmd in $cmds; do
4341
if len=`expr "X$cmd" : ".*"` &&
4342
test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
4344
$run eval "$cmd" || exit $?
4345
skipped_export=false
4347
# The command line is too long to execute in one step.
4348
$show "using reloadable object file for export list..."
4350
# Break out early, otherwise skipped_export may be
4351
# set to false by a later but shorter cmd.
4356
if test -n "$export_symbols_regex"; then
4357
$show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
4358
$run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
4359
$show "$mv \"${export_symbols}T\" \"$export_symbols\""
4360
$run eval '$mv "${export_symbols}T" "$export_symbols"'
4365
if test -n "$export_symbols" && test -n "$include_expsyms"; then
4366
$run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
4370
for test_deplib in $deplibs; do
4371
case " $convenience " in
4372
*" $test_deplib "*) ;;
4374
tmp_deplibs="$tmp_deplibs $test_deplib"
4378
deplibs="$tmp_deplibs"
4380
if test -n "$convenience"; then
4381
if test -n "$whole_archive_flag_spec"; then
4382
save_libobjs=$libobjs
4383
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4385
gentop="$output_objdir/${outputname}x"
4386
generated="$generated $gentop"
4388
func_extract_archives $gentop $convenience
4389
libobjs="$libobjs $func_extract_archives_result"
4393
if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4394
eval flag=\"$thread_safe_flag_spec\"
4395
linker_flags="$linker_flags $flag"
4398
# Make a backup of the uninstalled library when relinking
4399
if test "$mode" = relink; then
4400
$run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
4403
# Do each of the archive commands.
4404
if test "$module" = yes && test -n "$module_cmds" ; then
4405
if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4406
eval test_cmds=\"$module_expsym_cmds\"
4407
cmds=$module_expsym_cmds
4409
eval test_cmds=\"$module_cmds\"
4413
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4414
eval test_cmds=\"$archive_expsym_cmds\"
4415
cmds=$archive_expsym_cmds
4417
eval test_cmds=\"$archive_cmds\"
4422
if test "X$skipped_export" != "X:" &&
4423
len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4424
test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
4427
# The command line is too long to link in one step, link piecewise.
4428
$echo "creating reloadable object files..."
4430
# Save the value of $output and $libobjs because we want to
4431
# use them later. If we have whole_archive_flag_spec, we
4432
# want to use save_libobjs as it was before
4433
# whole_archive_flag_spec was expanded, because we can't
4434
# assume the linker understands whole_archive_flag_spec.
4435
# This may have to be revisited, in case too many
4436
# convenience libraries get linked in and end up exceeding
4438
if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
4439
save_libobjs=$libobjs
4442
output_la=`$echo "X$output" | $Xsed -e "$basename"`
4444
# Clear the reloadable object creation command queue and
4445
# initialize k to one.
4452
output=$output_objdir/$output_la-${k}.$objext
4453
# Loop over the list of objects to be linked.
4454
for obj in $save_libobjs
4456
eval test_cmds=\"$reload_cmds $objlist $last_robj\"
4457
if test "X$objlist" = X ||
4458
{ len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
4459
test "$len" -le "$max_cmd_len"; }; then
4460
objlist="$objlist $obj"
4462
# The command $test_cmds is almost too long, add a
4463
# command to the queue.
4464
if test "$k" -eq 1 ; then
4465
# The first file doesn't have a previous command to add.
4466
eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
4468
# All subsequent reloadable object files will link in
4469
# the last one created.
4470
eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
4472
last_robj=$output_objdir/$output_la-${k}.$objext
4474
output=$output_objdir/$output_la-${k}.$objext
4479
# Handle the remaining objects by creating one last
4480
# reloadable object file. All subsequent reloadable object
4481
# files will link in the last one created.
4482
test -z "$concat_cmds" || concat_cmds=$concat_cmds~
4483
eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
4485
if ${skipped_export-false}; then
4486
$show "generating symbol list for \`$libname.la'"
4487
export_symbols="$output_objdir/$libname.exp"
4488
$run $rm $export_symbols
4490
# Append the command to create the export file.
4491
eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
4494
# Set up a command to remove the reloadable object files
4495
# after they are used.
4497
while test "$i" -lt "$k"
4500
delfiles="$delfiles $output_objdir/$output_la-${i}.$objext"
4503
$echo "creating a temporary reloadable object file: $output"
4505
# Loop through the commands generated above and execute them.
4506
save_ifs="$IFS"; IFS='~'
4507
for cmd in $concat_cmds; do
4510
$run eval "$cmd" || exit $?
4515
# Restore the value of output.
4518
if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
4519
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4521
# Expand the library linking commands again to reset the
4522
# value of $libobjs for piecewise linking.
4524
# Do each of the archive commands.
4525
if test "$module" = yes && test -n "$module_cmds" ; then
4526
if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4527
cmds=$module_expsym_cmds
4532
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4533
cmds=$archive_expsym_cmds
4539
# Append the command to remove the reloadable object files
4540
# to the just-reset $cmds.
4541
eval cmds=\"\$cmds~\$rm $delfiles\"
4543
save_ifs="$IFS"; IFS='~'
4544
for cmd in $cmds; do
4548
$run eval "$cmd" || {
4551
# Restore the uninstalled library and exit
4552
if test "$mode" = relink; then
4553
$run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
4561
# Restore the uninstalled library and exit
4562
if test "$mode" = relink; then
4563
$run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
4565
if test -n "$convenience"; then
4566
if test -z "$whole_archive_flag_spec"; then
4567
$show "${rm}r $gentop"
4568
$run ${rm}r "$gentop"
4575
# Create links to the real library.
4576
for linkname in $linknames; do
4577
if test "$realname" != "$linkname"; then
4578
$show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
4579
$run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
4583
# If -module or -export-dynamic was specified, set the dlname.
4584
if test "$module" = yes || test "$export_dynamic" = yes; then
4585
# On all known operating systems, these are identical.
4592
if test -n "$deplibs"; then
4593
$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
4596
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4597
$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4600
if test -n "$rpath"; then
4601
$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4604
if test -n "$xrpath"; then
4605
$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
4608
if test -n "$vinfo"; then
4609
$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
4612
if test -n "$release"; then
4613
$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
4618
if test -n "$objs$old_deplibs"; then
4619
$echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4623
obj=`$echo "X$output" | $Xsed -e "$lo2o"`
4631
# Delete the old objects.
4632
$run $rm $obj $libobj
4634
# Objects from convenience libraries. This assumes
4635
# single-version convenience libraries. Whenever we create
4636
# different ones for PIC/non-PIC, this we'll have to duplicate
4640
# reload_cmds runs $LD directly, so let us get rid of
4641
# -Wl from whole_archive_flag_spec and hope we can get by with
4642
# turning comma into space..
4645
if test -n "$convenience"; then
4646
if test -n "$whole_archive_flag_spec"; then
4647
eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
4648
reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
4650
gentop="$output_objdir/${obj}x"
4651
generated="$generated $gentop"
4653
func_extract_archives $gentop $convenience
4654
reload_conv_objs="$reload_objs $func_extract_archives_result"
4658
# Create the old-style object.
4659
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
4663
save_ifs="$IFS"; IFS='~'
4664
for cmd in $cmds; do
4668
$run eval "$cmd" || exit $?
4672
# Exit if we aren't doing a library object file.
4673
if test -z "$libobj"; then
4674
if test -n "$gentop"; then
4675
$show "${rm}r $gentop"
4682
if test "$build_libtool_libs" != yes; then
4683
if test -n "$gentop"; then
4684
$show "${rm}r $gentop"
4688
# Create an invalid libtool object if no PIC, so that we don't
4689
# accidentally link it into a program.
4690
# $show "echo timestamp > $libobj"
4691
# $run eval "echo timestamp > $libobj" || exit $?
4695
if test -n "$pic_flag" || test "$pic_mode" != default; then
4696
# Only do commands if we really have different PIC objects.
4697
reload_objs="$libobjs $reload_conv_objs"
4700
save_ifs="$IFS"; IFS='~'
4701
for cmd in $cmds; do
4705
$run eval "$cmd" || exit $?
4710
if test -n "$gentop"; then
4711
$show "${rm}r $gentop"
4720
*cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
4722
if test -n "$vinfo"; then
4723
$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
4726
if test -n "$release"; then
4727
$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
4730
if test "$preload" = yes; then
4731
if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
4732
test "$dlopen_self_static" = unknown; then
4733
$echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
4738
*-*-rhapsody* | *-*-darwin1.[012])
4739
# On Rhapsody replace the C library is the System framework
4740
compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4741
finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4747
# Don't allow lazy linking, it breaks C++ global constructors
4748
if test "$tagname" = CXX ; then
4749
compile_command="$compile_command ${wl}-bind_at_load"
4750
finalize_command="$finalize_command ${wl}-bind_at_load"
4756
# move library search paths that coincide with paths to not yet
4757
# installed libraries to the beginning of the library search list
4759
for path in $notinst_path; do
4760
case " $new_libs " in
4761
*" -L$path/$objdir "*) ;;
4763
case " $compile_deplibs " in
4764
*" -L$path/$objdir "*)
4765
new_libs="$new_libs -L$path/$objdir" ;;
4770
for deplib in $compile_deplibs; do
4773
case " $new_libs " in
4775
*) new_libs="$new_libs $deplib" ;;
4778
*) new_libs="$new_libs $deplib" ;;
4781
compile_deplibs="$new_libs"
4784
compile_command="$compile_command $compile_deplibs"
4785
finalize_command="$finalize_command $finalize_deplibs"
4787
if test -n "$rpath$xrpath"; then
4788
# If the user specified any rpath flags, then add them.
4789
for libdir in $rpath $xrpath; do
4790
# This is the magic to use -rpath.
4791
case "$finalize_rpath " in
4793
*) finalize_rpath="$finalize_rpath $libdir" ;;
4798
# Now hardcode the library paths
4801
for libdir in $compile_rpath $finalize_rpath; do
4802
if test -n "$hardcode_libdir_flag_spec"; then
4803
if test -n "$hardcode_libdir_separator"; then
4804
if test -z "$hardcode_libdirs"; then
4805
hardcode_libdirs="$libdir"
4807
# Just accumulate the unique libdirs.
4808
case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4809
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4812
hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4817
eval flag=\"$hardcode_libdir_flag_spec\"
4818
rpath="$rpath $flag"
4820
elif test -n "$runpath_var"; then
4821
case "$perm_rpath " in
4823
*) perm_rpath="$perm_rpath $libdir" ;;
4827
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
4828
testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'`
4829
case :$dllsearchpath: in
4831
*) dllsearchpath="$dllsearchpath:$libdir";;
4833
case :$dllsearchpath: in
4834
*":$testbindir:"*) ;;
4835
*) dllsearchpath="$dllsearchpath:$testbindir";;
4840
# Substitute the hardcoded libdirs into the rpath.
4841
if test -n "$hardcode_libdir_separator" &&
4842
test -n "$hardcode_libdirs"; then
4843
libdir="$hardcode_libdirs"
4844
eval rpath=\" $hardcode_libdir_flag_spec\"
4846
compile_rpath="$rpath"
4850
for libdir in $finalize_rpath; do
4851
if test -n "$hardcode_libdir_flag_spec"; then
4852
if test -n "$hardcode_libdir_separator"; then
4853
if test -z "$hardcode_libdirs"; then
4854
hardcode_libdirs="$libdir"
4856
# Just accumulate the unique libdirs.
4857
case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4858
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4861
hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4866
eval flag=\"$hardcode_libdir_flag_spec\"
4867
rpath="$rpath $flag"
4869
elif test -n "$runpath_var"; then
4870
case "$finalize_perm_rpath " in
4872
*) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
4876
# Substitute the hardcoded libdirs into the rpath.
4877
if test -n "$hardcode_libdir_separator" &&
4878
test -n "$hardcode_libdirs"; then
4879
libdir="$hardcode_libdirs"
4880
eval rpath=\" $hardcode_libdir_flag_spec\"
4882
finalize_rpath="$rpath"
4884
if test -n "$libobjs" && test "$build_old_libs" = yes; then
4885
# Transform all the library objects into standard objects.
4886
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4887
finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4891
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4892
if test -n "$NM" && test -n "$global_symbol_pipe"; then
4893
dlsyms="${outputname}S.c"
4895
$echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
4899
if test -n "$dlsyms"; then
4903
# Discover the nlist of each of the dlfiles.
4904
nlist="$output_objdir/${outputname}.nm"
4906
$show "$rm $nlist ${nlist}S ${nlist}T"
4907
$run $rm "$nlist" "${nlist}S" "${nlist}T"
4909
# Parse the name list into a source file.
4910
$show "creating $output_objdir/$dlsyms"
4912
test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
4913
/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
4914
/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
4920
/* Prevent the only kind of declaration conflicts we can make. */
4921
#define lt_preloaded_symbols some_other_symbol
4923
/* External symbol declarations for the compiler. */\
4926
if test "$dlself" = yes; then
4927
$show "generating symbol list for \`$output'"
4929
test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
4931
# Add our own program objects to the symbol list.
4932
progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4933
for arg in $progfiles; do
4934
$show "extracting global C symbols from \`$arg'"
4935
$run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4938
if test -n "$exclude_expsyms"; then
4939
$run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4940
$run eval '$mv "$nlist"T "$nlist"'
4943
if test -n "$export_symbols_regex"; then
4944
$run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4945
$run eval '$mv "$nlist"T "$nlist"'
4948
# Prepare the list of exported symbols
4949
if test -z "$export_symbols"; then
4950
export_symbols="$output_objdir/$outputname.exp"
4951
$run $rm $export_symbols
4952
$run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4954
*cygwin* | *mingw* )
4955
$run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4956
$run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
4960
$run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
4961
$run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
4962
$run eval 'mv "$nlist"T "$nlist"'
4964
*cygwin* | *mingw* )
4965
$run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
4966
$run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
4972
for arg in $dlprefiles; do
4973
$show "extracting global C symbols from \`$arg'"
4974
name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4975
$run eval '$echo ": $name " >> "$nlist"'
4976
$run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4979
if test -z "$run"; then
4980
# Make sure we have at least an empty file.
4981
test -f "$nlist" || : > "$nlist"
4983
if test -n "$exclude_expsyms"; then
4984
$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4985
$mv "$nlist"T "$nlist"
4988
# Try sorting and uniquifying the output.
4989
if grep -v "^: " < "$nlist" |
4990
if sort -k 3 </dev/null >/dev/null 2>&1; then
4995
uniq > "$nlist"S; then
4998
grep -v "^: " < "$nlist" > "$nlist"S
5001
if test -f "$nlist"S; then
5002
eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
5004
$echo '/* NONE */' >> "$output_objdir/$dlsyms"
5007
$echo >> "$output_objdir/$dlsyms" "\
5009
#undef lt_preloaded_symbols
5011
#if defined (__STDC__) && __STDC__
5012
# define lt_ptr void *
5014
# define lt_ptr char *
5018
/* The mapping between symbol names and symbols. */
5022
*cygwin* | *mingw* )
5023
$echo >> "$output_objdir/$dlsyms" "\
5024
/* DATA imports from DLLs on WIN32 can't be const, because
5025
runtime relocations are performed -- see ld's documentation
5031
$echo >> "$output_objdir/$dlsyms" "\
5038
$echo >> "$output_objdir/$dlsyms" "\
5042
lt_preloaded_symbols[] =
5046
eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
5048
$echo >> "$output_objdir/$dlsyms" "\
5052
/* This works around a problem in FreeBSD linker */
5053
#ifdef FREEBSD_WORKAROUND
5054
static const void *lt_preloaded_setup() {
5055
return lt_preloaded_symbols;
5065
pic_flag_for_symtable=
5067
# compiling the symbol table file with pic_flag works around
5068
# a FreeBSD bug that causes programs to crash when -lm is
5069
# linked before any other PIC object. But we must not use
5070
# pic_flag when linking with -static. The problem exists in
5071
# FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
5072
*-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
5073
case "$compile_command " in
5075
*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
5078
case "$compile_command " in
5080
*) pic_flag_for_symtable=" $pic_flag";;
5084
# Now compile the dynamic symbol file.
5085
$show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
5086
$run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
5088
# Clean up the generated files.
5089
$show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
5090
$run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
5092
# Transform the symbol file into the correct name.
5094
*cygwin* | *mingw* )
5095
if test -f "$output_objdir/${outputname}.def" ; then
5096
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
5097
finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP`
5099
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5100
finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5104
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5105
finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP`
5110
$echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
5115
# We keep going just in case the user didn't refer to
5116
# lt_preloaded_symbols. The linker will fail if global_symbol_pipe
5117
# really was required.
5119
# Nullify the symbol file.
5120
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
5121
finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP`
5124
if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
5125
# Replace the output file specification.
5126
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP`
5127
link_command="$compile_command$compile_rpath"
5129
# We have no uninstalled library dependencies, so finalize right now.
5130
$show "$link_command"
5131
$run eval "$link_command"
5134
# Delete the generated files.
5135
if test -n "$dlsyms"; then
5136
$show "$rm $output_objdir/${outputname}S.${objext}"
5137
$run $rm "$output_objdir/${outputname}S.${objext}"
5143
if test -n "$shlibpath_var"; then
5144
# We should set the shlibpath_var
5146
for dir in $temp_rpath; do
5148
[\\/]* | [A-Za-z]:[\\/]*)
5153
# Relative path: add a thisdir entry.
5154
rpath="$rpath\$thisdir/$dir:"
5161
if test -n "$compile_shlibpath$finalize_shlibpath"; then
5162
compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
5164
if test -n "$finalize_shlibpath"; then
5165
finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
5170
if test -n "$runpath_var"; then
5171
if test -n "$perm_rpath"; then
5172
# We should set the runpath_var.
5174
for dir in $perm_rpath; do
5177
compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
5179
if test -n "$finalize_perm_rpath"; then
5180
# We should set the runpath_var.
5182
for dir in $finalize_perm_rpath; do
5185
finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
5189
if test "$no_install" = yes; then
5190
# We don't need to create a wrapper script.
5191
link_command="$compile_var$compile_command$compile_rpath"
5192
# Replace the output file specification.
5193
link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
5194
# Delete the old output file.
5196
# Link the executable and exit
5197
$show "$link_command"
5198
$run eval "$link_command" || exit $?
5202
if test "$hardcode_action" = relink; then
5203
# Fast installation is not supported
5204
link_command="$compile_var$compile_command$compile_rpath"
5205
relink_command="$finalize_var$finalize_command$finalize_rpath"
5207
$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
5208
$echo "$modename: \`$output' will be relinked during installation" 1>&2
5210
if test "$fast_install" != no; then
5211
link_command="$finalize_var$compile_command$finalize_rpath"
5212
if test "$fast_install" = yes; then
5213
relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP`
5215
# fast_install is set to needless
5219
link_command="$compile_var$compile_command$compile_rpath"
5220
relink_command="$finalize_var$finalize_command$finalize_rpath"
5224
# Replace the output file specification.
5225
link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
5227
# Delete the old output files.
5228
$run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
5230
$show "$link_command"
5231
$run eval "$link_command" || exit $?
5233
# Now create the wrapper script.
5234
$show "creating $output"
5236
# Quote the relink command for shipping.
5237
if test -n "$relink_command"; then
5238
# Preserve any variables that may affect compiler behavior
5239
for var in $variables_saved_for_relink; do
5240
if eval test -z \"\${$var+set}\"; then
5241
relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5242
elif eval var_value=\$$var; test -z "$var_value"; then
5243
relink_command="$var=; export $var; $relink_command"
5245
var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5246
relink_command="$var=\"$var_value\"; export $var; $relink_command"
5249
relink_command="(cd `pwd`; $relink_command)"
5250
relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
5253
# Quote $echo for shipping.
5254
if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
5256
[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
5257
*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
5259
qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
5261
qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
5264
# Only actually do things if our run command is non-null.
5265
if test -z "$run"; then
5266
# win32 will think the script is a binary if it has
5267
# a .exe suffix, so we strip it off here.
5269
*.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
5271
# test for cygwin because mv fails w/o .exe extensions
5275
outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
5279
*cygwin* | *mingw* )
5280
output_name=`basename $output`
5281
output_path=`dirname $output`
5282
cwrappersource="$output_path/$objdir/lt-$output_name.c"
5283
cwrapper="$output_path/$output_name.exe"
5284
$rm $cwrappersource $cwrapper
5285
trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
5287
cat > $cwrappersource <<EOF
5289
/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
5290
Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5292
The $output program cannot be directly executed until all the libtool
5293
libraries that it depends on are installed.
5295
This wrapper executable should never be moved out of the build directory.
5296
If it is, it will not operate correctly.
5298
Currently, it simply execs the wrapper *script* "/bin/sh $output",
5299
but could eventually absorb all of the scripts functionality and
5300
exec $objdir/$outputname directly.
5303
cat >> $cwrappersource<<"EOF"
5312
#include <sys/stat.h>
5314
#if defined(PATH_MAX)
5315
# define LT_PATHMAX PATH_MAX
5316
#elif defined(MAXPATHLEN)
5317
# define LT_PATHMAX MAXPATHLEN
5319
# define LT_PATHMAX 1024
5322
#ifndef DIR_SEPARATOR
5323
# define DIR_SEPARATOR '/'
5324
# define PATH_SEPARATOR ':'
5327
#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
5329
# define HAVE_DOS_BASED_FILE_SYSTEM
5330
# ifndef DIR_SEPARATOR_2
5331
# define DIR_SEPARATOR_2 '\\'
5333
# ifndef PATH_SEPARATOR_2
5334
# define PATH_SEPARATOR_2 ';'
5338
#ifndef DIR_SEPARATOR_2
5339
# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
5340
#else /* DIR_SEPARATOR_2 */
5341
# define IS_DIR_SEPARATOR(ch) \
5342
(((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
5343
#endif /* DIR_SEPARATOR_2 */
5345
#ifndef PATH_SEPARATOR_2
5346
# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
5347
#else /* PATH_SEPARATOR_2 */
5348
# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
5349
#endif /* PATH_SEPARATOR_2 */
5351
#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
5352
#define XFREE(stale) do { \
5353
if (stale) { free ((void *) stale); stale = 0; } \
5356
/* -DDEBUG is fairly common in CFLAGS. */
5358
#if defined DEBUGWRAPPER
5359
# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__)
5361
# define DEBUG(format, ...)
5364
const char *program_name = NULL;
5366
void * xmalloc (size_t num);
5367
char * xstrdup (const char *string);
5368
const char * base_name (const char *name);
5369
char * find_executable(const char *wrapper);
5370
int check_executable(const char *path);
5371
char * strendzap(char *str, const char *pat);
5372
void lt_fatal (const char *message, ...);
5375
main (int argc, char *argv[])
5380
program_name = (char *) xstrdup (base_name (argv[0]));
5381
DEBUG("(main) argv[0] : %s\n",argv[0]);
5382
DEBUG("(main) program_name : %s\n",program_name);
5383
newargz = XMALLOC(char *, argc+2);
5386
cat >> $cwrappersource <<EOF
5387
newargz[0] = (char *) xstrdup("$SHELL");
5390
cat >> $cwrappersource <<"EOF"
5391
newargz[1] = find_executable(argv[0]);
5392
if (newargz[1] == NULL)
5393
lt_fatal("Couldn't find %s", argv[0]);
5394
DEBUG("(main) found exe at : %s\n",newargz[1]);
5395
/* we know the script has the same name, without the .exe */
5396
/* so make sure newargz[1] doesn't end in .exe */
5397
strendzap(newargz[1],".exe");
5398
for (i = 1; i < argc; i++)
5399
newargz[i+1] = xstrdup(argv[i]);
5400
newargz[argc+1] = NULL;
5402
for (i=0; i<argc+1; i++)
5404
DEBUG("(main) newargz[%d] : %s\n",i,newargz[i]);
5412
cat >> $cwrappersource <<EOF
5413
execv("$SHELL",(char const **)newargz);
5417
cat >> $cwrappersource <<EOF
5418
execv("$SHELL",newargz);
5423
cat >> $cwrappersource <<"EOF"
5428
xmalloc (size_t num)
5430
void * p = (void *) malloc (num);
5432
lt_fatal ("Memory exhausted");
5438
xstrdup (const char *string)
5440
return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
5445
base_name (const char *name)
5449
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5450
/* Skip over the disk name in MSDOS pathnames. */
5451
if (isalpha ((unsigned char)name[0]) && name[1] == ':')
5455
for (base = name; *name; name++)
5456
if (IS_DIR_SEPARATOR (*name))
5462
check_executable(const char * path)
5466
DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!");
5467
if ((!path) || (!*path))
5470
if ((stat (path, &st) >= 0) &&
5472
/* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */
5473
#if defined (S_IXOTH)
5474
((st.st_mode & S_IXOTH) == S_IXOTH) ||
5476
#if defined (S_IXGRP)
5477
((st.st_mode & S_IXGRP) == S_IXGRP) ||
5479
((st.st_mode & S_IXUSR) == S_IXUSR))
5486
/* Searches for the full path of the wrapper. Returns
5487
newly allocated full path name if found, NULL otherwise */
5489
find_executable (const char* wrapper)
5494
/* static buffer for getcwd */
5495
char tmp[LT_PATHMAX + 1];
5499
DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!");
5501
if ((wrapper == NULL) || (*wrapper == '\0'))
5504
/* Absolute path? */
5505
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5506
if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':')
5508
concat_name = xstrdup (wrapper);
5509
if (check_executable(concat_name))
5516
if (IS_DIR_SEPARATOR (wrapper[0]))
5518
concat_name = xstrdup (wrapper);
5519
if (check_executable(concat_name))
5523
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5527
for (p = wrapper; *p; p++)
5535
/* no slashes; search PATH */
5536
const char* path = getenv ("PATH");
5539
for (p = path; *p; p = p_next)
5543
for (q = p; *q; q++)
5544
if (IS_PATH_SEPARATOR(*q))
5547
p_next = (*q == '\0' ? q : q + 1);
5550
/* empty path: current directory */
5551
if (getcwd (tmp, LT_PATHMAX) == NULL)
5552
lt_fatal ("getcwd failed");
5553
tmp_len = strlen(tmp);
5554
concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5555
memcpy (concat_name, tmp, tmp_len);
5556
concat_name[tmp_len] = '/';
5557
strcpy (concat_name + tmp_len + 1, wrapper);
5561
concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1);
5562
memcpy (concat_name, p, p_len);
5563
concat_name[p_len] = '/';
5564
strcpy (concat_name + p_len + 1, wrapper);
5566
if (check_executable(concat_name))
5571
/* not found in PATH; assume curdir */
5573
/* Relative path | not found in path: prepend cwd */
5574
if (getcwd (tmp, LT_PATHMAX) == NULL)
5575
lt_fatal ("getcwd failed");
5576
tmp_len = strlen(tmp);
5577
concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1);
5578
memcpy (concat_name, tmp, tmp_len);
5579
concat_name[tmp_len] = '/';
5580
strcpy (concat_name + tmp_len + 1, wrapper);
5582
if (check_executable(concat_name))
5589
strendzap(char *str, const char *pat)
5593
assert(str != NULL);
5594
assert(pat != NULL);
5597
patlen = strlen(pat);
5601
str += len - patlen;
5602
if (strcmp(str, pat) == 0)
5609
lt_error_core (int exit_status, const char * mode,
5610
const char * message, va_list ap)
5612
fprintf (stderr, "%s: %s: ", program_name, mode);
5613
vfprintf (stderr, message, ap);
5614
fprintf (stderr, ".\n");
5616
if (exit_status >= 0)
5621
lt_fatal (const char *message, ...)
5624
va_start (ap, message);
5625
lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
5629
# we should really use a build-platform specific compiler
5630
# here, but OTOH, the wrappers (shell script and this C one)
5631
# are only useful if you want to execute the "real" binary.
5632
# Since the "real" binary is built for $host, then this
5633
# wrapper might as well be built for $host, too.
5634
$run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource
5638
trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
5643
# $output - temporary wrapper script for $objdir/$outputname
5644
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5646
# The $output program cannot be directly executed until all the libtool
5647
# libraries that it depends on are installed.
5649
# This wrapper script should never be moved out of the build directory.
5650
# If it is, it will not operate correctly.
5652
# Sed substitution that helps us do robust quoting. It backslashifies
5653
# metacharacters that are still active within double-quoted strings.
5654
Xsed='${SED} -e 1s/^X//'
5655
sed_quote_subst='$sed_quote_subst'
5657
# Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE).
5658
if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
5661
# Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
5662
# is contrary to our usage. Disable this feature.
5663
alias -g '\${1+\"\$@\"}'='\"\$@\"'
5664
setopt NO_GLOB_SUBST
5666
case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
5668
BIN_SH=xpg4; export BIN_SH # for Tru64
5669
DUALCASE=1; export DUALCASE # for MKS sh
5671
# The HP-UX ksh and POSIX shell print the target directory to stdout
5673
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5675
relink_command=\"$relink_command\"
5677
# This environment variable determines our operation mode.
5678
if test \"\$libtool_install_magic\" = \"$magic\"; then
5679
# install mode needs the following variable:
5680
notinst_deplibs='$notinst_deplibs'
5682
# When we are sourced in execute mode, \$file and \$echo are already set.
5683
if test \"\$libtool_execute_magic\" != \"$magic\"; then
5686
# Make sure echo works.
5687
if test \"X\$1\" = X--no-reexec; then
5688
# Discard the --no-reexec flag, and continue.
5690
elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
5691
# Yippee, \$echo works!
5694
# Restart under the correct shell, and then maybe \$echo will work.
5695
exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
5701
# Find the directory that this script lives in.
5702
thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
5703
test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5705
# Follow symbolic links until we get to the real thisdir.
5706
file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
5707
while test -n \"\$file\"; do
5708
destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
5710
# If there was a directory component, then change thisdir.
5711
if test \"x\$destdir\" != \"x\$file\"; then
5712
case \"\$destdir\" in
5713
[\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5714
*) thisdir=\"\$thisdir/\$destdir\" ;;
5718
file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
5719
file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
5722
# Try to get the absolute directory name.
5723
absdir=\`cd \"\$thisdir\" && pwd\`
5724
test -n \"\$absdir\" && thisdir=\"\$absdir\"
5727
if test "$fast_install" = yes; then
5729
program=lt-'$outputname'$exeext
5730
progdir=\"\$thisdir/$objdir\"
5732
if test ! -f \"\$progdir/\$program\" || \\
5733
{ file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
5734
test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5736
file=\"\$\$-\$program\"
5738
if test ! -d \"\$progdir\"; then
5739
$mkdir \"\$progdir\"
5741
$rm \"\$progdir/\$file\"
5746
# relink executable if necessary
5747
if test -n \"\$relink_command\"; then
5748
if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5750
$echo \"\$relink_command_output\" >&2
5751
$rm \"\$progdir/\$file\"
5756
$mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5757
{ $rm \"\$progdir/\$program\";
5758
$mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5759
$rm \"\$progdir/\$file\"
5763
program='$outputname'
5764
progdir=\"\$thisdir/$objdir\"
5770
if test -f \"\$progdir/\$program\"; then"
5772
# Export our shlibpath_var if we have one.
5773
if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5775
# Add our own library path to $shlibpath_var
5776
$shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5778
# Some systems cannot cope with colon-terminated $shlibpath_var
5779
# The second colon is a workaround for a bug in BeOS R4 sed
5780
$shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
5782
export $shlibpath_var
5786
# fixup the dll searchpath if we need to.
5787
if test -n "$dllsearchpath"; then
5789
# Add the dll search path components to the executable PATH
5790
PATH=$dllsearchpath:\$PATH
5795
if test \"\$libtool_execute_magic\" != \"$magic\"; then
5796
# Run the actual program with our arguments.
5799
# Backslashes separate directories on plain windows
5800
*-*-mingw | *-*-os2*)
5802
exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
5808
exec \"\$progdir/\$program\" \${1+\"\$@\"}
5813
\$echo \"\$0: cannot exec \$program \$*\"
5817
# The program doesn't exist.
5818
\$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
5819
\$echo \"This script is just a wrapper for \$program.\" 1>&2
5820
$echo \"See the $PACKAGE documentation for more information.\" 1>&2
5831
# See if we need to build an old-fashioned archive.
5832
for oldlib in $oldlibs; do
5834
if test "$build_libtool_libs" = convenience; then
5835
oldobjs="$libobjs_save"
5836
addlibs="$convenience"
5837
build_libtool_libs=no
5839
if test "$build_libtool_libs" = module; then
5840
oldobjs="$libobjs_save"
5841
build_libtool_libs=no
5843
oldobjs="$old_deplibs $non_pic_objects"
5845
addlibs="$old_convenience"
5848
if test -n "$addlibs"; then
5849
gentop="$output_objdir/${outputname}x"
5850
generated="$generated $gentop"
5852
func_extract_archives $gentop $addlibs
5853
oldobjs="$oldobjs $func_extract_archives_result"
5856
# Do each command in the archive commands.
5857
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5858
cmds=$old_archive_from_new_cmds
5860
# POSIX demands no paths to be encoded in archives. We have
5861
# to avoid creating archives with duplicate basenames if we
5862
# might have to extract them afterwards, e.g., when creating a
5863
# static archive out of a convenience library, or when linking
5864
# the entirety of a libtool archive into another (currently
5865
# not supported by libtool).
5866
if (for obj in $oldobjs
5868
$echo "X$obj" | $Xsed -e 's%^.*/%%'
5869
done | sort | sort -uc >/dev/null 2>&1); then
5872
$echo "copying selected object files to avoid basename conflicts..."
5874
if test -z "$gentop"; then
5875
gentop="$output_objdir/${outputname}x"
5876
generated="$generated $gentop"
5878
$show "${rm}r $gentop"
5879
$run ${rm}r "$gentop"
5880
$show "$mkdir $gentop"
5881
$run $mkdir "$gentop"
5883
if test "$exit_status" -ne 0 && test ! -d "$gentop"; then
5888
save_oldobjs=$oldobjs
5891
for obj in $save_oldobjs
5893
objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
5894
case " $oldobjs " in
5895
" ") oldobjs=$obj ;;
5898
# Make sure we don't pick an alternate name that also
5900
newobj=lt$counter-$objbase
5901
counter=`expr $counter + 1`
5902
case " $oldobjs " in
5903
*[\ /]"$newobj "*) ;;
5904
*) if test ! -f "$gentop/$newobj"; then break; fi ;;
5907
$show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
5908
$run ln "$obj" "$gentop/$newobj" ||
5909
$run cp "$obj" "$gentop/$newobj"
5910
oldobjs="$oldobjs $gentop/$newobj"
5912
*) oldobjs="$oldobjs $obj" ;;
5917
eval cmds=\"$old_archive_cmds\"
5919
if len=`expr "X$cmds" : ".*"` &&
5920
test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5921
cmds=$old_archive_cmds
5923
# the command line is too long to link in one step, link in parts
5924
$echo "using piecewise archive linking..."
5929
save_oldobjs=$oldobjs
5931
# Is there a better way of finding the last object in the list?
5932
for obj in $save_oldobjs
5936
for obj in $save_oldobjs
5938
oldobjs="$objlist $obj"
5939
objlist="$objlist $obj"
5940
eval test_cmds=\"$old_archive_cmds\"
5941
if len=`expr "X$test_cmds" : ".*" 2>/dev/null` &&
5942
test "$len" -le "$max_cmd_len"; then
5945
# the above command should be used before it gets too long
5947
if test "$obj" = "$last_oldobj" ; then
5950
test -z "$concat_cmds" || concat_cmds=$concat_cmds~
5951
eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
5957
if test "X$oldobjs" = "X" ; then
5958
eval cmds=\"\$concat_cmds\"
5960
eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
5964
save_ifs="$IFS"; IFS='~'
5965
for cmd in $cmds; do
5969
$run eval "$cmd" || exit $?
5974
if test -n "$generated"; then
5975
$show "${rm}r$generated"
5976
$run ${rm}r$generated
5979
# Now create the libtool archive.
5983
test "$build_old_libs" = yes && old_library="$libname.$libext"
5984
$show "creating $output"
5986
# Preserve any variables that may affect compiler behavior
5987
for var in $variables_saved_for_relink; do
5988
if eval test -z \"\${$var+set}\"; then
5989
relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5990
elif eval var_value=\$$var; test -z "$var_value"; then
5991
relink_command="$var=; export $var; $relink_command"
5993
var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5994
relink_command="$var=\"$var_value\"; export $var; $relink_command"
5997
# Quote the link command for shipping.
5998
relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
5999
relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP`
6000
if test "$hardcode_automatic" = yes ; then
6005
# Only create the output if not a dry run.
6006
if test -z "$run"; then
6007
for installed in no yes; do
6008
if test "$installed" = yes; then
6009
if test -z "$install_libdir"; then
6012
output="$output_objdir/$outputname"i
6013
# Replace all uninstalled libtool libraries with the installed ones
6015
for deplib in $dependency_libs; do
6018
name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
6019
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
6020
if test -z "$libdir"; then
6021
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
6024
newdependency_libs="$newdependency_libs $libdir/$name"
6026
*) newdependency_libs="$newdependency_libs $deplib" ;;
6029
dependency_libs="$newdependency_libs"
6031
for lib in $dlfiles; do
6032
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
6033
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
6034
if test -z "$libdir"; then
6035
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6038
newdlfiles="$newdlfiles $libdir/$name"
6040
dlfiles="$newdlfiles"
6042
for lib in $dlprefiles; do
6043
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
6044
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
6045
if test -z "$libdir"; then
6046
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6049
newdlprefiles="$newdlprefiles $libdir/$name"
6051
dlprefiles="$newdlprefiles"
6054
for lib in $dlfiles; do
6056
[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
6057
*) abs=`pwd`"/$lib" ;;
6059
newdlfiles="$newdlfiles $abs"
6061
dlfiles="$newdlfiles"
6063
for lib in $dlprefiles; do
6065
[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
6066
*) abs=`pwd`"/$lib" ;;
6068
newdlprefiles="$newdlprefiles $abs"
6070
dlprefiles="$newdlprefiles"
6073
# place dlname in correct position for cygwin
6075
case $host,$output,$installed,$module,$dlname in
6076
*cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
6079
# $outputname - a libtool library file
6080
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
6082
# Please DO NOT delete this file!
6083
# It is necessary for linking the library.
6085
# The name that we can dlopen(3).
6088
# Names of this library.
6089
library_names='$library_names'
6091
# The name of the static archive.
6092
old_library='$old_library'
6094
# Libraries that this one depends upon.
6095
dependency_libs='$dependency_libs'
6097
# Version information for $libname.
6102
# Is this an already installed library?
6103
installed=$installed
6105
# Should we warn about portability when linking against -modules?
6106
shouldnotlink=$module
6108
# Files to dlopen/dlpreopen
6110
dlpreopen='$dlprefiles'
6112
# Directory that this library needs to be installed in:
6113
libdir='$install_libdir'"
6114
if test "$installed" = no && test "$need_relink" = yes; then
6116
relink_command=\"$relink_command\""
6121
# Do a symbolic link so that the libtool archive can be found in
6122
# LD_LIBRARY_PATH before the program is installed.
6123
$show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
6124
$run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
6130
# libtool install mode
6132
modename="$modename: install"
6134
# There may be an optional sh(1) argument at the beginning of
6135
# install_prog (especially on Windows NT).
6136
if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
6137
# Allow the use of GNU shtool's install command.
6138
$echo "X$nonopt" | grep shtool > /dev/null; then
6139
# Aesthetically quote it.
6140
arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
6142
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
6146
install_prog="$arg "
6154
# The real first argument should be the name of the installation program.
6155
# Aesthetically quote it.
6156
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
6158
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
6162
install_prog="$install_prog$arg"
6164
# We need to accept at least all the BSD install flags.
6174
if test -n "$dest"; then
6175
files="$files $dest"
6183
case " $install_prog " in
6188
-g | -m | -o) prev=$arg ;;
6196
# If the previous option needed an argument, then skip it.
6197
if test -n "$prev"; then
6206
# Aesthetically quote the argument.
6207
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
6209
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
6213
install_prog="$install_prog $arg"
6216
if test -z "$install_prog"; then
6217
$echo "$modename: you must specify an install program" 1>&2
6222
if test -n "$prev"; then
6223
$echo "$modename: the \`$prev' option requires an argument" 1>&2
6228
if test -z "$files"; then
6229
if test -z "$dest"; then
6230
$echo "$modename: no file or destination specified" 1>&2
6232
$echo "$modename: you must specify a destination" 1>&2
6238
# Strip any trailing slash from the destination.
6239
dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
6241
# Check to see that the destination is a directory.
6242
test -d "$dest" && isdir=yes
6243
if test "$isdir" = yes; then
6247
destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
6248
test "X$destdir" = "X$dest" && destdir=.
6249
destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
6251
# Not a directory, so check to see that there is only one file specified.
6253
if test "$#" -gt 2; then
6254
$echo "$modename: \`$dest' is not a directory" 1>&2
6260
[\\/]* | [A-Za-z]:[\\/]*) ;;
6262
for file in $files; do
6266
$echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
6275
# This variable tells wrapper scripts just to set variables rather
6276
# than running their programs.
6277
libtool_install_magic="$magic"
6282
for file in $files; do
6284
# Do each installation.
6287
# Do the static libraries later.
6288
staticlibs="$staticlibs $file"
6292
# Check to see that this really is a libtool archive.
6293
if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
6295
$echo "$modename: \`$file' is not a valid libtool archive" 1>&2
6303
# If there is no directory component, then add one.
6305
*/* | *\\*) . $file ;;
6309
# Add the libdir to current_libdirs if it is the destination.
6310
if test "X$destdir" = "X$libdir"; then
6311
case "$current_libdirs " in
6313
*) current_libdirs="$current_libdirs $libdir" ;;
6316
# Note the libdir as a future libdir.
6317
case "$future_libdirs " in
6319
*) future_libdirs="$future_libdirs $libdir" ;;
6323
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
6324
test "X$dir" = "X$file/" && dir=
6327
if test -n "$relink_command"; then
6328
# Determine the prefix the user has applied to our future dir.
6329
inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
6331
# Don't allow the user to place us outside of our expected
6332
# location b/c this prevents finding dependent libraries that
6333
# are installed to the same prefix.
6334
# At present, this check doesn't affect windows .dll's that
6335
# are installed into $libdir/../bin (currently, that works fine)
6336
# but it's something to keep an eye on.
6337
if test "$inst_prefix_dir" = "$destdir"; then
6338
$echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
6342
if test -n "$inst_prefix_dir"; then
6343
# Stick the inst_prefix_dir data into the link command.
6344
relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP`
6346
relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP`
6349
$echo "$modename: warning: relinking \`$file'" 1>&2
6350
$show "$relink_command"
6351
if $run eval "$relink_command"; then :
6353
$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6358
# See the names of the shared library.
6359
set dummy $library_names
6360
if test -n "$2"; then
6366
test -n "$relink_command" && srcname="$realname"T
6368
# Install the shared library and build the symlinks.
6369
$show "$install_prog $dir/$srcname $destdir/$realname"
6370
$run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
6371
if test -n "$stripme" && test -n "$striplib"; then
6372
$show "$striplib $destdir/$realname"
6373
$run eval "$striplib $destdir/$realname" || exit $?
6376
if test "$#" -gt 0; then
6377
# Delete the old symlinks, and create new ones.
6378
# Try `ln -sf' first, because the `ln' binary might depend on
6379
# the symlink we replace! Solaris /bin/ln does not understand -f,
6380
# so we also need to try rm && ln -s.
6383
if test "$linkname" != "$realname"; then
6384
$show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
6385
$run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })"
6390
# Do each command in the postinstall commands.
6391
lib="$destdir/$realname"
6392
cmds=$postinstall_cmds
6393
save_ifs="$IFS"; IFS='~'
6394
for cmd in $cmds; do
6398
$run eval "$cmd" || {
6401
# Restore the uninstalled library and exit
6402
if test "$mode" = relink; then
6403
$run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)'
6412
# Install the pseudo-library for information purposes.
6413
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6414
instname="$dir/$name"i
6415
$show "$install_prog $instname $destdir/$name"
6416
$run eval "$install_prog $instname $destdir/$name" || exit $?
6418
# Maybe install the static library, too.
6419
test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
6423
# Install (i.e. copy) a libtool object.
6425
# Figure out destination file name, if it wasn't already specified.
6426
if test -n "$destname"; then
6427
destfile="$destdir/$destname"
6429
destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6430
destfile="$destdir/$destfile"
6433
# Deduce the name of the destination old-style object file.
6436
staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
6439
staticdest="$destfile"
6443
$echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
6449
# Install the libtool object if requested.
6450
if test -n "$destfile"; then
6451
$show "$install_prog $file $destfile"
6452
$run eval "$install_prog $file $destfile" || exit $?
6455
# Install the old object if enabled.
6456
if test "$build_old_libs" = yes; then
6457
# Deduce the name of the old-style object file.
6458
staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
6460
$show "$install_prog $staticobj $staticdest"
6461
$run eval "$install_prog \$staticobj \$staticdest" || exit $?
6467
# Figure out destination file name, if it wasn't already specified.
6468
if test -n "$destname"; then
6469
destfile="$destdir/$destname"
6471
destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6472
destfile="$destdir/$destfile"
6475
# If the file is missing, and there is a .exe on the end, strip it
6476
# because it is most likely a libtool script we actually want to
6481
if test ! -f "$file"; then
6482
file=`$echo $file|${SED} 's,.exe$,,'`
6488
# Do a test to see if this is really a libtool program.
6491
wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
6497
if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
6501
# Note that it is not necessary on cygwin/mingw to append a dot to
6502
# foo even if both foo and FILE.exe exist: automatic-append-.exe
6503
# behavior happens only for exec(3), not for open(2)! Also, sourcing
6504
# `FILE.' does not work on cygwin managed mounts.
6506
# If there is no directory component, then add one.
6508
*/* | *\\*) . ${wrapper} ;;
6509
*) . ./${wrapper} ;;
6512
# Check the variables that should have been set.
6513
if test -z "$notinst_deplibs"; then
6514
$echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
6519
for lib in $notinst_deplibs; do
6520
# Check to see that each library is installed.
6522
if test -f "$lib"; then
6523
# If there is no directory component, then add one.
6525
*/* | *\\*) . $lib ;;
6529
libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
6530
if test -n "$libdir" && test ! -f "$libfile"; then
6531
$echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
6537
# Note that it is not necessary on cygwin/mingw to append a dot to
6538
# foo even if both foo and FILE.exe exist: automatic-append-.exe
6539
# behavior happens only for exec(3), not for open(2)! Also, sourcing
6540
# `FILE.' does not work on cygwin managed mounts.
6542
# If there is no directory component, then add one.
6544
*/* | *\\*) . ${wrapper} ;;
6545
*) . ./${wrapper} ;;
6549
if test "$fast_install" = no && test -n "$relink_command"; then
6550
if test "$finalize" = yes && test -z "$run"; then
6551
tmpdir=`func_mktempdir`
6552
file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6553
outputname="$tmpdir/$file"
6554
# Replace the output file specification.
6555
relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP`
6557
$show "$relink_command"
6558
if $run eval "$relink_command"; then :
6560
$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6566
$echo "$modename: warning: cannot relink \`$file'" 1>&2
6569
# Install the binary that we compiled earlier.
6570
file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
6574
# remove .exe since cygwin /usr/bin/install will append another
6576
case $install_prog,$host in
6577
*/usr/bin/install*,*cygwin*)
6578
case $file:$destfile in
6583
destfile=$destfile.exe
6586
destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
6591
$show "$install_prog$stripme $file $destfile"
6592
$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
6593
test -n "$outputname" && ${rm}r "$tmpdir"
6598
for file in $staticlibs; do
6599
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6601
# Set up the ranlib parameters.
6602
oldlib="$destdir/$name"
6604
$show "$install_prog $file $oldlib"
6605
$run eval "$install_prog \$file \$oldlib" || exit $?
6607
if test -n "$stripme" && test -n "$old_striplib"; then
6608
$show "$old_striplib $oldlib"
6609
$run eval "$old_striplib $oldlib" || exit $?
6612
# Do each command in the postinstall commands.
6613
cmds=$old_postinstall_cmds
6614
save_ifs="$IFS"; IFS='~'
6615
for cmd in $cmds; do
6619
$run eval "$cmd" || exit $?
6624
if test -n "$future_libdirs"; then
6625
$echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
6628
if test -n "$current_libdirs"; then
6629
# Maybe just do a dry run.
6630
test -n "$run" && current_libdirs=" -n$current_libdirs"
6631
exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
6637
# libtool finish mode
6639
modename="$modename: finish"
6643
if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
6646
libdirs="$libdirs $dir"
6649
for libdir in $libdirs; do
6650
if test -n "$finish_cmds"; then
6651
# Do each command in the finish commands.
6653
save_ifs="$IFS"; IFS='~'
6654
for cmd in $cmds; do
6658
$run eval "$cmd" || admincmds="$admincmds
6663
if test -n "$finish_eval"; then
6664
# Do the single finish_eval.
6665
eval cmds=\"$finish_eval\"
6666
$run eval "$cmds" || admincmds="$admincmds
6672
# Exit here if they wanted silent mode.
6673
test "$show" = : && exit $EXIT_SUCCESS
6675
$echo "X----------------------------------------------------------------------" | $Xsed
6676
$echo "Libraries have been installed in:"
6677
for libdir in $libdirs; do
6681
$echo "If you ever happen to want to link against installed libraries"
6682
$echo "in a given directory, LIBDIR, you must either use libtool, and"
6683
$echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
6684
$echo "flag during linking and do at least one of the following:"
6685
if test -n "$shlibpath_var"; then
6686
$echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
6687
$echo " during execution"
6689
if test -n "$runpath_var"; then
6690
$echo " - add LIBDIR to the \`$runpath_var' environment variable"
6691
$echo " during linking"
6693
if test -n "$hardcode_libdir_flag_spec"; then
6695
eval flag=\"$hardcode_libdir_flag_spec\"
6697
$echo " - use the \`$flag' linker flag"
6699
if test -n "$admincmds"; then
6700
$echo " - have your system administrator run these commands:$admincmds"
6702
if test -f /etc/ld.so.conf; then
6703
$echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
6706
$echo "See any operating system documentation about shared libraries for"
6707
$echo "more information, such as the ld(1) and ld.so(8) manual pages."
6708
$echo "X----------------------------------------------------------------------" | $Xsed
6712
# libtool execute mode
6714
modename="$modename: execute"
6716
# The first argument is the command name.
6718
if test -z "$cmd"; then
6719
$echo "$modename: you must specify a COMMAND" 1>&2
6724
# Handle -dlopen flags immediately.
6725
for file in $execute_dlfiles; do
6726
if test ! -f "$file"; then
6727
$echo "$modename: \`$file' is not a file" 1>&2
6735
# Check to see that this really is a libtool archive.
6736
if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
6738
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6743
# Read the libtool library.
6747
# If there is no directory component, then add one.
6749
*/* | *\\*) . $file ;;
6753
# Skip this library if it cannot be dlopened.
6754
if test -z "$dlname"; then
6755
# Warn if it was a shared library.
6756
test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
6760
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6761
test "X$dir" = "X$file" && dir=.
6763
if test -f "$dir/$objdir/$dlname"; then
6766
if test ! -f "$dir/$dlname"; then
6767
$echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6774
# Just add the directory containing the .lo file.
6775
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6776
test "X$dir" = "X$file" && dir=.
6780
$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
6785
# Get the absolute pathname.
6786
absdir=`cd "$dir" && pwd`
6787
test -n "$absdir" && dir="$absdir"
6789
# Now add the directory to shlibpath_var.
6790
if eval "test -z \"\$$shlibpath_var\""; then
6791
eval "$shlibpath_var=\"\$dir\""
6793
eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
6797
# This variable tells wrapper scripts just to set shlibpath_var
6798
# rather than running their programs.
6799
libtool_execute_magic="$magic"
6801
# Check if any of the arguments is a wrapper script.
6808
# Do a test to see if this is really a libtool program.
6809
if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6810
# If there is no directory component, then add one.
6812
*/* | *\\*) . $file ;;
6816
# Transform arg to wrapped name.
6817
file="$progdir/$program"
6821
# Quote arguments (to preserve shell metacharacters).
6822
file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
6823
args="$args \"$file\""
6826
if test -z "$run"; then
6827
if test -n "$shlibpath_var"; then
6828
# Export the shlibpath_var.
6829
eval "export $shlibpath_var"
6832
# Restore saved environment variables
6833
for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
6835
eval "if test \"\${save_$lt_var+set}\" = set; then
6836
$lt_var=\$save_$lt_var; export $lt_var
6840
# Now prepare to actually exec the command.
6841
exec_cmd="\$cmd$args"
6843
# Display what would be done.
6844
if test -n "$shlibpath_var"; then
6845
eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
6846
$echo "export $shlibpath_var"
6853
# libtool clean and uninstall mode
6855
modename="$modename: $mode"
6861
# This variable tells wrapper scripts just to set variables rather
6862
# than running their programs.
6863
libtool_install_magic="$magic"
6868
-f) rm="$rm $arg"; rmforce=yes ;;
6869
-*) rm="$rm $arg" ;;
6870
*) files="$files $arg" ;;
6874
if test -z "$rm"; then
6875
$echo "$modename: you must specify an RM program" 1>&2
6882
origobjdir="$objdir"
6883
for file in $files; do
6884
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6885
if test "X$dir" = "X$file"; then
6887
objdir="$origobjdir"
6889
objdir="$dir/$origobjdir"
6891
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6892
test "$mode" = uninstall && objdir="$dir"
6894
# Remember objdir for removal later, being careful to avoid duplicates
6895
if test "$mode" = clean; then
6898
*) rmdirs="$rmdirs $objdir" ;;
6902
# Don't error if the file doesn't exist and rm -f was used.
6903
if (test -L "$file") >/dev/null 2>&1 \
6904
|| (test -h "$file") >/dev/null 2>&1 \
6905
|| test -f "$file"; then
6907
elif test -d "$file"; then
6910
elif test "$rmforce" = yes; then
6918
# Possibly a libtool archive, so verify it.
6919
if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6922
# Delete the libtool libraries and symlinks.
6923
for n in $library_names; do
6924
rmfiles="$rmfiles $objdir/$n"
6926
test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
6930
case " $library_names " in
6931
# " " in the beginning catches empty $dlname
6933
*) rmfiles="$rmfiles $objdir/$dlname" ;;
6935
test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
6938
if test -n "$library_names"; then
6939
# Do each command in the postuninstall commands.
6940
cmds=$postuninstall_cmds
6941
save_ifs="$IFS"; IFS='~'
6942
for cmd in $cmds; do
6947
if test "$?" -ne 0 && test "$rmforce" != yes; then
6954
if test -n "$old_library"; then
6955
# Do each command in the old_postuninstall commands.
6956
cmds=$old_postuninstall_cmds
6957
save_ifs="$IFS"; IFS='~'
6958
for cmd in $cmds; do
6963
if test "$?" -ne 0 && test "$rmforce" != yes; then
6969
# FIXME: should reinstall the best remaining shared library.
6976
# Possibly a libtool object, so verify it.
6977
if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6982
# Add PIC object to the list of files to remove.
6983
if test -n "$pic_object" \
6984
&& test "$pic_object" != none; then
6985
rmfiles="$rmfiles $dir/$pic_object"
6988
# Add non-PIC object to the list of files to remove.
6989
if test -n "$non_pic_object" \
6990
&& test "$non_pic_object" != none; then
6991
rmfiles="$rmfiles $dir/$non_pic_object"
6997
if test "$mode" = clean ; then
7001
file=`$echo $file|${SED} 's,.exe$,,'`
7002
noexename=`$echo $name|${SED} 's,.exe$,,'`
7003
# $file with .exe has already been added to rmfiles,
7004
# add $file without .exe
7005
rmfiles="$rmfiles $file"
7008
# Do a test to see if this is a libtool program.
7009
if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
7013
# note $name still contains .exe if it was in $file originally
7014
# as does the version of $file that was added into $rmfiles
7015
rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
7016
if test "$fast_install" = yes && test -n "$relink_command"; then
7017
rmfiles="$rmfiles $objdir/lt-$name"
7019
if test "X$noexename" != "X$name" ; then
7020
rmfiles="$rmfiles $objdir/lt-${noexename}.c"
7026
$show "$rm $rmfiles"
7027
$run $rm $rmfiles || exit_status=1
7029
objdir="$origobjdir"
7031
# Try to remove the ${objdir}s in the directories where we deleted files
7032
for dir in $rmdirs; do
7033
if test -d "$dir"; then
7035
$run rmdir $dir >/dev/null 2>&1
7043
$echo "$modename: you must specify a MODE" 1>&2
7044
$echo "$generic_help" 1>&2
7049
if test -z "$exec_cmd"; then
7050
$echo "$modename: invalid operation mode \`$mode'" 1>&2
7051
$echo "$generic_help" 1>&2
7054
fi # test -z "$show_help"
7056
if test -n "$exec_cmd"; then
7061
# We need to display help for each of the modes.
7064
"Usage: $modename [OPTION]... [MODE-ARG]...
7066
Provide generalized library-building support services.
7068
--config show all configuration variables
7069
--debug enable verbose shell tracing
7070
-n, --dry-run display commands without modifying any files
7071
--features display basic configuration information and exit
7072
--finish same as \`--mode=finish'
7073
--help display this help message and exit
7074
--mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
7075
--quiet same as \`--silent'
7076
--silent don't print informational messages
7077
--tag=TAG use configuration variables from tag TAG
7078
--version print version information
7080
MODE must be one of the following:
7082
clean remove files from the build directory
7083
compile compile a source file into a libtool object
7084
execute automatically set library path, then run a program
7085
finish complete the installation of libtool libraries
7086
install install libraries or executables
7087
link create a library or an executable
7088
uninstall remove libraries from an installed directory
7090
MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
7091
a more detailed description of MODE.
7093
Report bugs to <bug-libtool@gnu.org>."
7099
"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
7101
Remove files from the build directory.
7103
RM is the name of the program to use to delete files associated with each FILE
7104
(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
7107
If FILE is a libtool library, object or program, all the files associated
7108
with it are deleted. Otherwise, only FILE itself is deleted using RM."
7113
"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
7115
Compile a source file into a libtool library object.
7117
This mode accepts the following additional options:
7119
-o OUTPUT-FILE set the output file name to OUTPUT-FILE
7120
-prefer-pic try to building PIC objects only
7121
-prefer-non-pic try to building non-PIC objects only
7122
-static always build a \`.o' file suitable for static linking
7124
COMPILE-COMMAND is a command to be used in creating a \`standard' object file
7125
from the given SOURCEFILE.
7127
The output file name is determined by removing the directory component from
7128
SOURCEFILE, then substituting the C source code suffix \`.c' with the
7129
library object suffix, \`.lo'."
7134
"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
7136
Automatically set library path, then run a program.
7138
This mode accepts the following additional options:
7140
-dlopen FILE add the directory containing FILE to the library path
7142
This mode sets the library path environment variable according to \`-dlopen'
7145
If any of the ARGS are libtool executable wrappers, then they are translated
7146
into their corresponding uninstalled binary, and any of their required library
7147
directories are added to the library path.
7149
Then, COMMAND is executed, with ARGS as arguments."
7154
"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
7156
Complete the installation of libtool libraries.
7158
Each LIBDIR is a directory that contains libtool libraries.
7160
The commands that this mode executes may require superuser privileges. Use
7161
the \`--dry-run' option if you just want to see what would be executed."
7166
"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
7168
Install executables or libraries.
7170
INSTALL-COMMAND is the installation command. The first component should be
7171
either the \`install' or \`cp' program.
7173
The rest of the components are interpreted as arguments to that command (only
7174
BSD-compatible install options are recognized)."
7179
"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
7181
Link object files or libraries together to form another library, or to
7182
create an executable program.
7184
LINK-COMMAND is a command using the C compiler that you would use to create
7185
a program from several object files.
7187
The following components of LINK-COMMAND are treated specially:
7189
-all-static do not do any dynamic linking at all
7190
-avoid-version do not add a version suffix if possible
7191
-dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
7192
-dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
7193
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
7194
-export-symbols SYMFILE
7195
try to export only the symbols listed in SYMFILE
7196
-export-symbols-regex REGEX
7197
try to export only the symbols matching REGEX
7198
-LLIBDIR search LIBDIR for required installed libraries
7199
-lNAME OUTPUT-FILE requires the installed library libNAME
7200
-module build a library that can dlopened
7201
-no-fast-install disable the fast-install mode
7202
-no-install link a not-installable executable
7203
-no-undefined declare that a library does not refer to external symbols
7204
-o OUTPUT-FILE create OUTPUT-FILE from the specified objects
7205
-objectlist FILE Use a list of object files found in FILE to specify objects
7206
-precious-files-regex REGEX
7207
don't remove output files matching REGEX
7208
-release RELEASE specify package release information
7209
-rpath LIBDIR the created library will eventually be installed in LIBDIR
7210
-R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
7211
-static do not do any dynamic linking of uninstalled libtool libraries
7212
-static-libtool-libs
7213
do not do any dynamic linking of libtool libraries
7214
-version-info CURRENT[:REVISION[:AGE]]
7215
specify library version info [each variable defaults to 0]
7217
All other options (arguments beginning with \`-') are ignored.
7219
Every other argument is treated as a filename. Files ending in \`.la' are
7220
treated as uninstalled libtool libraries, other files are standard or library
7223
If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
7224
only library objects (\`.lo' files) may be specified, and \`-rpath' is
7225
required, except when creating a convenience library.
7227
If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
7228
using \`ar' and \`ranlib', or on Windows using \`lib'.
7230
If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
7231
is created, otherwise an executable program is created."
7236
"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
7238
Remove libraries from an installation directory.
7240
RM is the name of the program to use to delete files associated with each FILE
7241
(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
7244
If FILE is a libtool library, all the files associated with it are deleted.
7245
Otherwise, only FILE itself is deleted using RM."
7249
$echo "$modename: invalid operation mode \`$mode'" 1>&2
7256
$echo "Try \`$modename --help' for more information about other modes."
7260
# The TAGs below are defined such that we never get into a situation
7261
# in which we disable both kinds of libraries. Given conflicting
7262
# choices, we go for a static library, that is the most portable,
7263
# since we can't tell whether shared libraries were disabled because
7264
# the user asked for that or because the platform doesn't support
7265
# them. This is particularly important on AIX, because we don't
7266
# support having both static and shared libraries enabled at the same
7267
# time on that platform, so we default to a shared-only configuration.
7268
# If a disable-shared tag is given, we'll fallback to a static-only
7269
# configuration. But we'll never go from static-only to shared-only.
7271
# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
7273
# ### END LIBTOOL TAG CONFIG: disable-shared
7275
# ### BEGIN LIBTOOL TAG CONFIG: disable-static
7277
# ### END LIBTOOL TAG CONFIG: disable-static
7283
# ### BEGIN LIBTOOL TAG CONFIG: CXX
7285
# Libtool was configured on host localhost.localdomain:
7287
# Shell to use when invoking shell scripts.
7290
# Whether or not to build shared libraries.
7291
build_libtool_libs=yes
7293
# Whether or not to build static libraries.
7296
# Whether or not to add -lc for building shared libraries.
7297
build_libtool_need_lc=no
7299
# Whether or not to disallow shared libs when runtime libs are static
7300
allow_libtool_libs_with_static_runtimes=no
7302
# Whether or not to optimize for fast installation.
7307
host=i686-pc-linux-gnu
7312
build=i686-pc-linux-gnu
7315
# An echo program that does not interpret backslashes.
7325
# LTCC compiler flags.
7328
# A language-specific compiler.
7331
# Is the compiler the GNU C compiler?
7335
EGREP="/bin/grep -E"
7337
# The linker used to build libraries.
7340
# Whether we need hard or soft links.
7343
# A BSD-compatible nm program.
7346
# A symbol stripping program
7349
# Used to examine libraries when file_magic_cmd begins "file"
7352
# Used on cygwin: DLL creation program.
7355
# Used on cygwin: object dumper.
7358
# Used on cygwin: assembler.
7361
# The name of the directory that contains temporary libtool files.
7364
# How to create reloadable object files.
7366
reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
7368
# How to pass a linker flag through the compiler.
7371
# Object file suffix (normally "o").
7374
# Old archive suffix (normally "a").
7377
# Shared library suffix (normally ".so").
7380
# Executable file suffix (normally "").
7383
# Additional compiler flags for building library objects.
7384
pic_flag=" -fPIC -DPIC"
7387
# What is the maximum length of a command?
7390
# Does compiler simultaneously support -c and -o options?
7393
# Must we lock files when doing compilation?
7396
# Do we need the lib prefix for modules?
7399
# Do we need a version for libraries?
7402
# Whether dlopen is supported.
7403
dlopen_support=unknown
7405
# Whether dlopen of programs is supported.
7408
# Whether dlopen of statically linked programs is supported.
7409
dlopen_self_static=unknown
7411
# Compiler flag to prevent dynamic linking.
7412
link_static_flag="-static"
7414
# Compiler flag to turn off builtin functions.
7415
no_builtin_flag=" -fno-builtin"
7417
# Compiler flag to allow reflexive dlopens.
7418
export_dynamic_flag_spec="\${wl}--export-dynamic"
7420
# Compiler flag to generate shared objects directly from archives.
7421
whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
7423
# Compiler flag to generate thread-safe objects.
7424
thread_safe_flag_spec=""
7426
# Library versioning type.
7429
# Format of library name prefix.
7430
libname_spec="lib\$name"
7432
# List of archive names. First name is the real one, the rest are links.
7433
# The last name is the one that the linker finds with -lNAME.
7434
library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
7436
# The coded name of the library, if different from the real name.
7437
soname_spec="\${libname}\${release}\${shared_ext}\$major"
7439
# Commands used to build and install an old-style archive.
7441
old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
7442
old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
7443
old_postuninstall_cmds=""
7445
# Create an old-style archive from a shared archive.
7446
old_archive_from_new_cmds=""
7448
# Create a temporary old-style archive to link instead of a shared archive.
7449
old_archive_from_expsyms_cmds=""
7451
# Commands used to build and install a shared archive.
7452
archive_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
7453
archive_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"
7455
postuninstall_cmds=""
7457
# Commands used to build a loadable module (assumed same as above if empty)
7459
module_expsym_cmds=""
7461
# Commands to strip libraries.
7462
old_striplib="strip --strip-debug"
7463
striplib="strip --strip-unneeded"
7465
# Dependencies to place before the objects being linked to create a
7467
predep_objects="/usr/lib/gcc/i386-redhat-linux/4.3.0/../../../crti.o /usr/lib/gcc/i386-redhat-linux/4.3.0/crtbeginS.o"
7469
# Dependencies to place after the objects being linked to create a
7471
postdep_objects="/usr/lib/gcc/i386-redhat-linux/4.3.0/crtendS.o /usr/lib/gcc/i386-redhat-linux/4.3.0/../../../crtn.o"
7473
# Dependencies to place before the objects being linked to create a
7477
# Dependencies to place after the objects being linked to create a
7479
postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s"
7481
# The library search path used internally by the compiler when linking
7483
compiler_lib_search_path="-L/usr/lib/gcc/i386-redhat-linux/4.3.0 -L/usr/lib/gcc/i386-redhat-linux/4.3.0 -L/usr/lib/gcc/i386-redhat-linux/4.3.0/../../.."
7485
# Method to check whether dependent libraries are shared objects.
7486
deplibs_check_method="pass_all"
7488
# Command to use when deplibs_check_method == file_magic.
7489
file_magic_cmd="\$MAGIC_CMD"
7491
# Flag that allows shared libraries with undefined symbols to be built.
7492
allow_undefined_flag=""
7494
# Flag that forces no undefined symbols.
7495
no_undefined_flag=""
7497
# Commands used to finish a libtool library installation in a directory.
7498
finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
7500
# Same as above, but a single script fragment to be evaled but not shown.
7503
# Take the output of nm and produce a listing of raw symbols and C names.
7504
global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
7506
# Transform the output of nm in a proper C declaration
7507
global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
7509
# Transform the output of nm in a C name address pair
7510
global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
7512
# This is the shared library runtime path variable.
7513
runpath_var=LD_RUN_PATH
7515
# This is the shared library path variable.
7516
shlibpath_var=LD_LIBRARY_PATH
7518
# Is shlibpath searched before the hard-coded library search path?
7519
shlibpath_overrides_runpath=no
7521
# How to hardcode a shared library path into an executable.
7522
hardcode_action=immediate
7524
# Whether we should hardcode library paths into libraries.
7525
hardcode_into_libs=yes
7527
# Flag to hardcode $libdir into a binary during linking.
7528
# This must work even if $libdir does not exist.
7529
hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
7531
# If ld is used when linking, flag to hardcode $libdir into
7532
# a binary during linking. This must work even if $libdir does
7534
hardcode_libdir_flag_spec_ld=""
7536
# Whether we need a single -rpath flag with a separated argument.
7537
hardcode_libdir_separator=""
7539
# Set to yes if using DIR/libNAME during linking hardcodes DIR into the
7543
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7547
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7548
# the resulting binary.
7549
hardcode_shlibpath_var=unsupported
7551
# Set to yes if building a shared library automatically hardcodes DIR into the library
7552
# and all subsequent libraries and executables linked against it.
7553
hardcode_automatic=no
7555
# Variables whose values should be saved in libtool wrapper scripts and
7556
# restored at relink time.
7557
variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7559
# Whether libtool must link a program against all its dependency libraries.
7560
link_all_deplibs=unknown
7562
# Compile-time system search path for libraries
7563
sys_lib_search_path_spec="/usr/lib /lib /usr/local/lib"
7565
# Run-time system search path for libraries
7566
sys_lib_dlsearch_path_spec="/usr/lib /lib /usr/lib/atlas /usr/lib/mysql /usr/lib/qt-3.3/lib /usr/lib/wine/ /usr/lib/xulrunner-1.9 "
7568
# Fix the shell variable $srcfile for the compiler.
7571
# Set to yes if exported symbols are required.
7572
always_export_symbols=no
7574
# The commands to list exported symbols.
7575
export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
7577
# The commands to extract the exported symbol list from a shared archive.
7578
extract_expsyms_cmds=""
7580
# Symbols that should not be listed in the preloaded symbols.
7583
# Symbols that must always be exported.
7586
# ### END LIBTOOL TAG CONFIG: CXX
7588
# ### BEGIN LIBTOOL TAG CONFIG: F77
7590
# Libtool was configured on host localhost.localdomain:
7592
# Shell to use when invoking shell scripts.
7595
# Whether or not to build shared libraries.
7596
build_libtool_libs=yes
7598
# Whether or not to build static libraries.
7601
# Whether or not to add -lc for building shared libraries.
7602
build_libtool_need_lc=no
7604
# Whether or not to disallow shared libs when runtime libs are static
7605
allow_libtool_libs_with_static_runtimes=no
7607
# Whether or not to optimize for fast installation.
7612
host=i686-pc-linux-gnu
7617
build=i686-pc-linux-gnu
7620
# An echo program that does not interpret backslashes.
7630
# LTCC compiler flags.
7633
# A language-specific compiler.
7636
# Is the compiler the GNU C compiler?
7640
EGREP="/bin/grep -E"
7642
# The linker used to build libraries.
7645
# Whether we need hard or soft links.
7648
# A BSD-compatible nm program.
7651
# A symbol stripping program
7654
# Used to examine libraries when file_magic_cmd begins "file"
7657
# Used on cygwin: DLL creation program.
7660
# Used on cygwin: object dumper.
7663
# Used on cygwin: assembler.
7666
# The name of the directory that contains temporary libtool files.
7669
# How to create reloadable object files.
7671
reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
7673
# How to pass a linker flag through the compiler.
7676
# Object file suffix (normally "o").
7679
# Old archive suffix (normally "a").
7682
# Shared library suffix (normally ".so").
7685
# Executable file suffix (normally "").
7688
# Additional compiler flags for building library objects.
7692
# What is the maximum length of a command?
7695
# Does compiler simultaneously support -c and -o options?
7698
# Must we lock files when doing compilation?
7701
# Do we need the lib prefix for modules?
7704
# Do we need a version for libraries?
7707
# Whether dlopen is supported.
7708
dlopen_support=unknown
7710
# Whether dlopen of programs is supported.
7713
# Whether dlopen of statically linked programs is supported.
7714
dlopen_self_static=unknown
7716
# Compiler flag to prevent dynamic linking.
7717
link_static_flag="-static"
7719
# Compiler flag to turn off builtin functions.
7722
# Compiler flag to allow reflexive dlopens.
7723
export_dynamic_flag_spec="\${wl}--export-dynamic"
7725
# Compiler flag to generate shared objects directly from archives.
7726
whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
7728
# Compiler flag to generate thread-safe objects.
7729
thread_safe_flag_spec=""
7731
# Library versioning type.
7734
# Format of library name prefix.
7735
libname_spec="lib\$name"
7737
# List of archive names. First name is the real one, the rest are links.
7738
# The last name is the one that the linker finds with -lNAME.
7739
library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
7741
# The coded name of the library, if different from the real name.
7742
soname_spec="\${libname}\${release}\${shared_ext}\$major"
7744
# Commands used to build and install an old-style archive.
7746
old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs~\$RANLIB \$oldlib"
7747
old_postinstall_cmds="chmod 644 \$oldlib~\$RANLIB \$oldlib"
7748
old_postuninstall_cmds=""
7750
# Create an old-style archive from a shared archive.
7751
old_archive_from_new_cmds=""
7753
# Create a temporary old-style archive to link instead of a shared archive.
7754
old_archive_from_expsyms_cmds=""
7756
# Commands used to build and install a shared archive.
7757
archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
7758
archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
7759
cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
7760
\$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
7761
\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
7763
postuninstall_cmds=""
7765
# Commands used to build a loadable module (assumed same as above if empty)
7767
module_expsym_cmds=""
7769
# Commands to strip libraries.
7770
old_striplib="strip --strip-debug"
7771
striplib="strip --strip-unneeded"
7773
# Dependencies to place before the objects being linked to create a
7777
# Dependencies to place after the objects being linked to create a
7781
# Dependencies to place before the objects being linked to create a
7785
# Dependencies to place after the objects being linked to create a
7789
# The library search path used internally by the compiler when linking
7791
compiler_lib_search_path=""
7793
# Method to check whether dependent libraries are shared objects.
7794
deplibs_check_method="pass_all"
7796
# Command to use when deplibs_check_method == file_magic.
7797
file_magic_cmd="\$MAGIC_CMD"
7799
# Flag that allows shared libraries with undefined symbols to be built.
7800
allow_undefined_flag=""
7802
# Flag that forces no undefined symbols.
7803
no_undefined_flag=""
7805
# Commands used to finish a libtool library installation in a directory.
7806
finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
7808
# Same as above, but a single script fragment to be evaled but not shown.
7811
# Take the output of nm and produce a listing of raw symbols and C names.
7812
global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2 \\2/p'"
7814
# Transform the output of nm in a proper C declaration
7815
global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
7817
# Transform the output of nm in a C name address pair
7818
global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
7820
# This is the shared library runtime path variable.
7821
runpath_var=LD_RUN_PATH
7823
# This is the shared library path variable.
7824
shlibpath_var=LD_LIBRARY_PATH
7826
# Is shlibpath searched before the hard-coded library search path?
7827
shlibpath_overrides_runpath=no
7829
# How to hardcode a shared library path into an executable.
7830
hardcode_action=immediate
7832
# Whether we should hardcode library paths into libraries.
7833
hardcode_into_libs=yes
7835
# Flag to hardcode $libdir into a binary during linking.
7836
# This must work even if $libdir does not exist.
7837
hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
7839
# If ld is used when linking, flag to hardcode $libdir into
7840
# a binary during linking. This must work even if $libdir does
7842
hardcode_libdir_flag_spec_ld=""
7844
# Whether we need a single -rpath flag with a separated argument.
7845
hardcode_libdir_separator=""
7847
# Set to yes if using DIR/libNAME during linking hardcodes DIR into the
7851
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7855
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7856
# the resulting binary.
7857
hardcode_shlibpath_var=unsupported
7859
# Set to yes if building a shared library automatically hardcodes DIR into the library
7860
# and all subsequent libraries and executables linked against it.
7861
hardcode_automatic=no
7863
# Variables whose values should be saved in libtool wrapper scripts and
7864
# restored at relink time.
7865
variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7867
# Whether libtool must link a program against all its dependency libraries.
7868
link_all_deplibs=unknown
7870
# Compile-time system search path for libraries
7871
sys_lib_search_path_spec="/usr/lib /lib /usr/local/lib"
7873
# Run-time system search path for libraries
7874
sys_lib_dlsearch_path_spec="/usr/lib /lib /usr/lib/atlas /usr/lib/mysql /usr/lib/qt-3.3/lib /usr/lib/wine/ /usr/lib/xulrunner-1.9 "
7876
# Fix the shell variable $srcfile for the compiler.
7879
# Set to yes if exported symbols are required.
7880
always_export_symbols=no
7882
# The commands to list exported symbols.
7883
export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
7885
# The commands to extract the exported symbol list from a shared archive.
7886
extract_expsyms_cmds=""
7888
# Symbols that should not be listed in the preloaded symbols.
7889
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
7891
# Symbols that must always be exported.
7894
# ### END LIBTOOL TAG CONFIG: F77