3
# libtoolT - Provide generalized library-building support services.
4
# Generated automatically by (GNU librcc 0.1.0)
5
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
7
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 s/^X//"
38
# The HP-UX ksh and POSIX shell print the target directory to stdout
40
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
42
# The names of the tagged configurations supported by this script.
45
# ### BEGIN LIBTOOL CONFIG
47
# Libtool was configured on host Suren:
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
71
# An echo program that does not interpret backslashes.
81
# A language-specific compiler.
84
# Is the compiler the GNU C compiler?
90
# The linker used to build libraries.
93
# Whether we need hard or soft links.
96
# A BSD-compatible nm program.
99
# A symbol stripping program
102
# Used to examine libraries when file_magic_cmd begins "file"
105
# Used on cygwin: DLL creation program.
108
# Used on cygwin: object dumper.
111
# Used on cygwin: assembler.
114
# The name of the directory that contains temporary libtool files.
117
# How to create reloadable object files.
119
reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
121
# How to pass a linker flag through the compiler.
124
# Object file suffix (normally "o").
127
# Old archive suffix (normally "a").
130
# Shared library suffix (normally ".so").
133
# Executable file suffix (normally "").
136
# Additional compiler flags for building library objects.
137
pic_flag=" -fPIC -DPIC"
140
# What is the maximum length of a command?
143
# Does compiler simultaneously support -c and -o options?
146
# Must we lock files when doing compilation ?
149
# Do we need the lib prefix for modules?
152
# Do we need a version for libraries?
155
# Whether dlopen is supported.
156
dlopen_support=unknown
158
# Whether dlopen of programs is supported.
161
# Whether dlopen of statically linked programs is supported.
162
dlopen_self_static=unknown
164
# Compiler flag to prevent dynamic linking.
165
link_static_flag="-static"
167
# Compiler flag to turn off builtin functions.
168
no_builtin_flag=" -fno-builtin"
170
# Compiler flag to allow reflexive dlopens.
171
export_dynamic_flag_spec="\${wl}--export-dynamic"
173
# Compiler flag to generate shared objects directly from archives.
174
whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
176
# Compiler flag to generate thread-safe objects.
177
thread_safe_flag_spec=""
179
# Library versioning type.
182
# Format of library name prefix.
183
libname_spec="lib\$name"
185
# List of archive names. First name is the real one, the rest are links.
186
# The last name is the one that the linker finds with -lNAME.
187
library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
189
# The coded name of the library, if different from the real name.
190
soname_spec="\${libname}\${release}\${shared_ext}\$major"
192
# Commands used to build and install an old-style archive.
194
old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
195
old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
196
old_postuninstall_cmds=""
198
# Create an old-style archive from a shared archive.
199
old_archive_from_new_cmds=""
201
# Create a temporary old-style archive to link instead of a shared archive.
202
old_archive_from_expsyms_cmds=""
204
# Commands used to build and install a shared archive.
205
archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
206
archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$output_objdir/\$libname.ver~
207
cat \$export_symbols | sed -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >> \$output_objdir/\$libname.ver~
208
\$echo \\\"local: *; };\\\" >> \$output_objdir/\$libname.ver~
209
\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-version-script \${wl}\$output_objdir/\$libname.ver -o \$lib"
211
postuninstall_cmds=""
213
# Commands used to build a loadable module (assumed same as above if empty)
215
module_expsym_cmds=""
217
# Commands to strip libraries.
218
old_striplib="strip --strip-debug"
219
striplib="strip --strip-unneeded"
221
# Dependencies to place before the objects being linked to create a
225
# Dependencies to place after the objects being linked to create a
229
# Dependencies to place before the objects being linked to create a
233
# Dependencies to place after the objects being linked to create a
237
# The library search path used internally by the compiler when linking
239
compiler_lib_search_path=""
241
# Method to check whether dependent libraries are shared objects.
242
deplibs_check_method="pass_all"
244
# Command to use when deplibs_check_method == file_magic.
245
file_magic_cmd="\$MAGIC_CMD"
247
# Flag that allows shared libraries with undefined symbols to be built.
248
allow_undefined_flag=""
250
# Flag that forces no undefined symbols.
253
# Commands used to finish a libtool library installation in a directory.
254
finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
256
# Same as above, but a single script fragment to be evaled but not shown.
259
# Take the output of nm and produce a listing of raw symbols and C names.
260
global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
262
# Transform the output of nm in a proper C declaration
263
global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
265
# Transform the output of nm in a C name address pair
266
global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
268
# This is the shared library runtime path variable.
269
runpath_var=LD_RUN_PATH
271
# This is the shared library path variable.
272
shlibpath_var=LD_LIBRARY_PATH
274
# Is shlibpath searched before the hard-coded library search path?
275
shlibpath_overrides_runpath=no
277
# How to hardcode a shared library path into an executable.
278
hardcode_action=immediate
280
# Whether we should hardcode library paths into libraries.
281
hardcode_into_libs=yes
283
# Flag to hardcode $libdir into a binary during linking.
284
# This must work even if $libdir does not exist.
285
hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
287
# If ld is used when linking, flag to hardcode $libdir into
288
# a binary during linking. This must work even if $libdir does
290
hardcode_libdir_flag_spec_ld=""
292
# Whether we need a single -rpath flag with a separated argument.
293
hardcode_libdir_separator=""
295
# Set to yes if using DIR/libNAME during linking hardcodes DIR into the
299
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
303
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
304
# the resulting binary.
305
hardcode_shlibpath_var=unsupported
307
# Set to yes if building a shared library automatically hardcodes DIR into the library
308
# and all subsequent libraries and executables linked against it.
309
hardcode_automatic=no
311
# Variables whose values should be saved in libtool wrapper scripts and
312
# restored at relink time.
313
variables_saved_for_relink="PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
315
# Whether libtool must link a program against all its dependency libraries.
316
link_all_deplibs=unknown
318
# Compile-time system search path for libraries
319
sys_lib_search_path_spec="/lib /usr/lib /usr/X11R6/lib /usr/local/lib /usr/X11R6/lib /usr/lib/qt3/lib /root/opccli/libopc"
321
# Run-time system search path for libraries
322
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib /usr/X11R6/lib /usr/lib/qt3/lib /root/opccli/libopc"
324
# Fix the shell variable $srcfile for the compiler.
327
# Set to yes if exported symbols are required.
328
always_export_symbols=no
330
# The commands to list exported symbols.
331
export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
333
# The commands to extract the exported symbol list from a shared archive.
334
extract_expsyms_cmds=""
336
# Symbols that should not be listed in the preloaded symbols.
337
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
339
# Symbols that must always be exported.
342
# ### END LIBTOOL CONFIG
344
# ltmain.sh - Provide generalized library-building support services.
345
# NOTE: Changing this file will not affect anything until you rerun configure.
347
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
348
# Free Software Foundation, Inc.
349
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
351
# This program is free software; you can redistribute it and/or modify
352
# it under the terms of the GNU General Public License as published by
353
# the Free Software Foundation; either version 2 of the License, or
354
# (at your option) any later version.
356
# This program is distributed in the hope that it will be useful, but
357
# WITHOUT ANY WARRANTY; without even the implied warranty of
358
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
359
# General Public License for more details.
361
# You should have received a copy of the GNU General Public License
362
# along with this program; if not, write to the Free Software
363
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
365
# As a special exception to the GNU General Public License, if you
366
# distribute this file as part of a program that contains a
367
# configuration script generated by Autoconf, you may include it under
368
# the same distribution terms that you use for the rest of that program.
372
# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
373
# is ksh but when the shell is invoked as "sh" and the current value of
374
# the _XPG environment variable is not equal to 1 (one), the special
375
# positional parameter $0, within a function call, is the name of the
379
# define SED for historic ltconfig's generated by Libtool 1.3
380
test -z "$SED" && SED=sed
382
# The name of this program:
383
progname=`echo "$progpath" | $SED $basename`
393
TIMESTAMP=" (1.1220.2.95 2004/04/11 05:50:42)"
396
# Check that we have a working $echo.
397
if test "X$1" = X--no-reexec; then
398
# Discard the --no-reexec flag, and continue.
400
elif test "X$1" = X--fallback-echo; then
401
# Avoid inline document here, it may be left over
403
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
404
# Yippee, $echo works!
407
# Restart under the correct shell, and then maybe $echo will work.
408
exec $SHELL "$progpath" --no-reexec ${1+"$@"}
411
if test "X$1" = X--fallback-echo; then
412
# used as fallback echo
421
help="Try \`$progname --help' for more information."
422
magic="%%%MAGIC variable%%%"
427
# Sed substitution that helps us do robust quoting. It backslashifies
428
# metacharacters that are still active within double-quoted strings.
429
Xsed="${SED}"' -e 1s/^X//'
430
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
431
# test EBCDIC or ASCII
432
case `echo A|tr A '\301'` in
433
A) # EBCDIC based system
434
SP2NL="tr '\100' '\n'"
435
NL2SP="tr '\r\n' '\100\100'"
437
*) # Assume ASCII based system
438
SP2NL="tr '\040' '\012'"
439
NL2SP="tr '\015\012' '\040\040'"
444
# Only set LANG and LC_ALL to C if already set.
445
# These must not be set unconditionally because not all systems understand
446
# e.g. LANG=C (notably SCO).
447
# We save the old values to restore during execute mode.
448
if test "${LC_ALL+set}" = set; then
449
save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
451
if test "${LANG+set}" = set; then
452
save_LANG="$LANG"; LANG=C; export LANG
455
# Make sure IFS has a sensible default
459
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
460
$echo "$modename: not configured to build any kind of library" 1>&2
461
$echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
474
lo2o="s/\\.lo\$/.${objext}/"
475
o2lo="s/\\.${objext}\$/.lo/"
477
#####################################
478
# Shell function definitions:
479
# This seems to be the best place for them
481
# func_win32_libid arg
482
# return the library type of file 'arg'
484
# Need a lot of goo to handle *both* DLLs and import libs
485
# Has to be a shell function in order to 'eat' the argument
486
# that is supplied when $file_magic_command is called.
487
func_win32_libid () {
488
win32_libid_type="unknown"
489
win32_fileres=`file -L $1 2>/dev/null`
490
case $win32_fileres in
491
*ar\ archive\ import\ library*) # definitely import
492
win32_libid_type="x86 archive import"
494
*ar\ archive*) # could be an import, or static
495
if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
496
$EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
497
win32_nmres=`eval $NM -f posix -A $1 | \
498
sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
499
if test "X$win32_nmres" = "Ximport" ; then
500
win32_libid_type="x86 archive import"
502
win32_libid_type="x86 archive static"
507
win32_libid_type="x86 DLL"
509
*executable*) # but shell scripts are "executable" too...
510
case $win32_fileres in
511
*MS\ Windows\ PE\ Intel*)
512
win32_libid_type="x86 DLL"
517
$echo $win32_libid_type
522
# Infer tagged configuration to use if any are available and
523
# if one wasn't chosen via the "--tag" command line option.
524
# Only attempt this if the compiler in the base compile
525
# command doesn't match the default compiler.
526
# arg is usually of the form 'gcc ...'
528
if test -n "$available_tags" && test -z "$tagname"; then
532
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
536
CC_quoted="$CC_quoted $arg"
539
# Blanks in the command may have been stripped by the calling shell,
540
# but not from the CC environment variable when configure was run.
541
" $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
542
# Blanks at the start of $base_compile will cause this to fail
543
# if we don't check for them as well.
545
for z in $available_tags; do
546
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
547
# Evaluate the configuration.
548
eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
551
# Double-quote args containing other shell metacharacters.
553
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
557
CC_quoted="$CC_quoted $arg"
560
" $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
561
# The compiler in the base compile command matches
562
# the one in the tagged configuration.
563
# Assume this is the tagged configuration we want.
570
# If $tagname still isn't set, then no tagged configuration
571
# was found and let the user know that the "--tag" command
572
# line option must be used.
573
if test -z "$tagname"; then
574
$echo "$modename: unable to infer tagged configuration"
575
$echo "$modename: specify a tag with \`--tag'" 1>&2
578
# $echo "$modename: using $tagname tagged configuration"
584
# End of Shell function definitions
585
#####################################
588
#eval std_shrext=\"$shrext_cmds\"
590
# And fixing for Darwin sucks for everybody else
591
if test -z "$shrext_cmds" && test -n "$shrext"; then
592
eval shrext_cmds=\"$shrext\"
594
eval std_shrext=\"$shrext_cmds\"
596
# This value is evaluated to 32768, so place it here as a compatilibity hack
597
# because older libtool.m4 didn't define this variable
598
test -z "$max_cmd_len" && max_cmd_len=32768
600
# Parse our command line options once, thoroughly.
601
while test "$#" -gt 0
607
-*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
611
# If the previous option needs an argument, assign it.
612
if test -n "$prev"; then
615
execute_dlfiles="$execute_dlfiles $arg"
619
preserve_args="${preserve_args}=$arg"
621
# Check whether tagname contains only valid characters
624
$echo "$progname: invalid tag name: $tagname" 1>&2
631
# Don't test for the "default" C tag, as we know, it's there, but
632
# not specially marked.
635
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
636
taglist="$taglist $tagname"
637
# Evaluate the configuration.
638
eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
640
$echo "$progname: ignoring unknown tag $tagname" 1>&2
655
# Have we seen a non-optional argument yet?
662
$echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
664
$echo "Copyright (C) 2003 Free Software Foundation, Inc."
665
$echo "This is free software; see the source for copying conditions. There is NO"
666
$echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
671
${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
672
# Now print the configurations for the tags.
673
for tagname in $taglist; do
674
${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
680
$echo "$progname: enabling shell trace mode"
682
preserve_args="$preserve_args $arg"
691
if test "$build_libtool_libs" = yes; then
692
$echo "enable shared libraries"
694
$echo "disable shared libraries"
696
if test "$build_old_libs" = yes; then
697
$echo "enable static libraries"
699
$echo "disable static libraries"
704
--finish) mode="finish" ;;
706
--mode) prevopt="--mode" prev=mode ;;
707
--mode=*) mode="$optarg" ;;
709
--preserve-dup-deps) duplicate_deps="yes" ;;
713
preserve_args="$preserve_args $arg"
716
--tag) prevopt="--tag" prev=tag ;;
718
set tag "$optarg" ${1+"$@"}
721
preserve_args="$preserve_args --tag"
730
$echo "$modename: unrecognized option \`$arg'" 1>&2
742
if test -n "$prevopt"; then
743
$echo "$modename: option \`$prevopt' requires an argument" 1>&2
748
# If this variable is set in any of the actions, the command in it
749
# will be execed at the end. This prevents here-documents from being
750
# left over by shells.
753
if test -z "$show_help"; then
755
# Infer the operation mode.
756
if test -z "$mode"; then
757
$echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
758
$echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
760
*cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
772
*db | *dbx | *strace | *truss)
782
# If we have no mode, but dlfiles were specified, then do execute mode.
783
test -n "$execute_dlfiles" && mode=execute
785
# Just use the default operation mode.
786
if test -z "$mode"; then
787
if test -n "$nonopt"; then
788
$echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
790
$echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
797
# Only execute mode is allowed to have -dlopen flags.
798
if test -n "$execute_dlfiles" && test "$mode" != execute; then
799
$echo "$modename: unrecognized option \`-dlopen'" 1>&2
804
# Change the help message to a mode-specific one.
806
help="Try \`$modename --help --mode=$mode' for more information."
808
# These modes are in order of execution frequency so that they run quickly.
810
# libtool compile mode
812
modename="$modename: compile"
813
# Get the compilation command and the source file.
815
srcfile="$nonopt" # always keep a non-empty value in "srcfile"
826
# do not "continue". Instead, add this to base_compile
838
# Accept any command-line options.
841
if test -n "$libobj" ; then
842
$echo "$modename: you cannot specify \`-o' more than once" 1>&2
849
-static | -prefer-pic | -prefer-non-pic)
860
arg_mode=arg # the next one goes into the "base_compile" arg list
861
continue # The current "srcfile" will either be retained or
862
;; # replaced later. I would guess that would be a bug.
865
args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
867
save_ifs="$IFS"; IFS=','
871
# Double-quote args containing other shell metacharacters.
872
# Many Bourne shells cannot handle close brackets correctly
873
# in scan sets, so we specify it separately.
875
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
879
lastarg="$lastarg $arg"
882
lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
884
# Add the arguments to base_compile.
885
base_compile="$base_compile $lastarg"
890
# Accept the current argument as the source file.
891
# The previous "srcfile" becomes the current argument.
898
esac # case $arg_mode
900
# Aesthetically quote the previous argument.
901
lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
904
# Double-quote args containing other shell metacharacters.
905
# Many Bourne shells cannot handle close brackets correctly
906
# in scan sets, so we specify it separately.
907
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
908
lastarg="\"$lastarg\""
912
base_compile="$base_compile $lastarg"
917
$echo "$modename: you must specify an argument for -Xcompile"
921
$echo "$modename: you must specify a target with \`-o'" 1>&2
925
# Get the name of the library object.
926
[ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
930
# Recognize several different file suffixes.
931
# If the user specifies -o file.o, it is replaced with file.lo
941
*.class) xform=class ;;
946
*.java) xform=java ;;
949
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
952
*.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
954
$echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
959
func_infer_tag $base_compile
961
for arg in $later; do
980
objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
981
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
982
if test "X$xdir" = "X$obj"; then
987
lobj=${xdir}$objdir/$objname
989
if test -z "$base_compile"; then
990
$echo "$modename: you must specify a compilation command" 1>&2
995
# Delete any leftover library objects.
996
if test "$build_old_libs" = yes; then
997
removelist="$obj $lobj $libobj ${libobj}T"
999
removelist="$lobj $libobj ${libobj}T"
1002
$run $rm $removelist
1003
trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1005
# On Cygwin there's no "real" PIC flag so we must build both object types
1007
cygwin* | mingw* | pw32* | os2*)
1011
if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
1012
# non-PIC code in shared libraries is not supported
1016
# Calculate the filename of the output object if compiler does
1017
# not support -o with -c
1018
if test "$compiler_c_o" = no; then
1019
output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
1020
lockfile="$output_obj.lock"
1021
removelist="$removelist $output_obj $lockfile"
1022
trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
1029
# Lock this critical section if it is needed
1030
# We use this script file to make the link, it avoids creating a new file
1031
if test "$need_locks" = yes; then
1032
until $run ln "$progpath" "$lockfile" 2>/dev/null; do
1033
$show "Waiting for $lockfile to be removed"
1036
elif test "$need_locks" = warn; then
1037
if test -f "$lockfile"; then
1039
*** ERROR, $lockfile exists and contains:
1040
`cat $lockfile 2>/dev/null`
1042
This indicates that another process is trying to use the same
1043
temporary object file, and libtool could not work around it because
1044
your compiler does not support \`-c' and \`-o' together. If you
1045
repeat this compilation, it may succeed, by chance, but you had better
1046
avoid parallel builds (make -j) in this platform, or get a better
1049
$run $rm $removelist
1052
$echo $srcfile > "$lockfile"
1055
if test -n "$fix_srcfile_path"; then
1056
eval srcfile=\"$fix_srcfile_path\"
1059
$run $rm "$libobj" "${libobj}T"
1061
# Create a libtool object file (analogous to a ".la" file),
1062
# but don't create it if we're doing a dry run.
1063
test -z "$run" && cat > ${libobj}T <<EOF
1064
# $libobj - a libtool object file
1065
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
1067
# Please DO NOT delete this file!
1068
# It is necessary for linking the library.
1070
# Name of the PIC object.
1073
# Only build a PIC object if we are building libtool libraries.
1074
if test "$build_libtool_libs" = yes; then
1075
# Without this assignment, base_compile gets emptied.
1076
fbsd_hideous_sh_bug=$base_compile
1078
if test "$pic_mode" != no; then
1079
command="$base_compile $srcfile $pic_flag"
1081
# Don't build PIC code
1082
command="$base_compile $srcfile"
1085
if test ! -d "${xdir}$objdir"; then
1086
$show "$mkdir ${xdir}$objdir"
1087
$run $mkdir ${xdir}$objdir
1089
if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
1094
if test -z "$output_obj"; then
1095
# Place PIC objects in $objdir
1096
command="$command -o $lobj"
1099
$run $rm "$lobj" "$output_obj"
1102
if $run eval "$command"; then :
1104
test -n "$output_obj" && $run $rm $removelist
1108
if test "$need_locks" = warn &&
1109
test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1111
*** ERROR, $lockfile contains:
1112
`cat $lockfile 2>/dev/null`
1114
but it should contain:
1117
This indicates that another process is trying to use the same
1118
temporary object file, and libtool could not work around it because
1119
your compiler does not support \`-c' and \`-o' together. If you
1120
repeat this compilation, it may succeed, by chance, but you had better
1121
avoid parallel builds (make -j) in this platform, or get a better
1124
$run $rm $removelist
1128
# Just move the object if needed, then go on to compile the next one
1129
if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
1130
$show "$mv $output_obj $lobj"
1131
if $run $mv $output_obj $lobj; then :
1134
$run $rm $removelist
1139
# Append the name of the PIC object to the libtool object file.
1140
test -z "$run" && cat >> ${libobj}T <<EOF
1141
pic_object='$objdir/$objname'
1145
# Allow error messages only from the first compilation.
1146
if test "$suppress_opt" = yes; then
1147
suppress_output=' >/dev/null 2>&1'
1150
# No PIC object so indicate it doesn't exist in the libtool
1152
test -z "$run" && cat >> ${libobj}T <<EOF
1158
# Only build a position-dependent object if we build old libraries.
1159
if test "$build_old_libs" = yes; then
1160
if test "$pic_mode" != yes; then
1161
# Don't build PIC code
1162
command="$base_compile $srcfile"
1164
command="$base_compile $srcfile $pic_flag"
1166
if test "$compiler_c_o" = yes; then
1167
command="$command -o $obj"
1170
# Suppress compiler output if we already did a PIC compilation.
1171
command="$command$suppress_output"
1172
$run $rm "$obj" "$output_obj"
1174
if $run eval "$command"; then :
1176
$run $rm $removelist
1180
if test "$need_locks" = warn &&
1181
test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
1183
*** ERROR, $lockfile contains:
1184
`cat $lockfile 2>/dev/null`
1186
but it should contain:
1189
This indicates that another process is trying to use the same
1190
temporary object file, and libtool could not work around it because
1191
your compiler does not support \`-c' and \`-o' together. If you
1192
repeat this compilation, it may succeed, by chance, but you had better
1193
avoid parallel builds (make -j) in this platform, or get a better
1196
$run $rm $removelist
1200
# Just move the object if needed
1201
if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
1202
$show "$mv $output_obj $obj"
1203
if $run $mv $output_obj $obj; then :
1206
$run $rm $removelist
1211
# Append the name of the non-PIC object the libtool object file.
1212
# Only append if the libtool object file exists.
1213
test -z "$run" && cat >> ${libobj}T <<EOF
1214
# Name of the non-PIC object.
1215
non_pic_object='$objname'
1219
# Append the name of the non-PIC object the libtool object file.
1220
# Only append if the libtool object file exists.
1221
test -z "$run" && cat >> ${libobj}T <<EOF
1222
# Name of the non-PIC object.
1228
$run $mv "${libobj}T" "${libobj}"
1230
# Unlock the critical section if it was locked
1231
if test "$need_locks" != no; then
1232
$run $rm "$lockfile"
1240
modename="$modename: link"
1242
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1243
# It is impossible to link a dll without this setting, and
1244
# we shouldn't force the makefile maintainer to figure out
1245
# which system we are compiling for in order to pass an extra
1246
# flag for every libtool invocation.
1247
# allow_undefined=no
1249
# FIXME: Unfortunately, there are problems with the above when trying
1250
# to make a dll which has undefined symbols, in which case not
1251
# even a static library is built. For now, we need to specify
1252
# -no-undefined on the libtool link line when we can be certain
1253
# that all symbols are satisfied, otherwise we get a static library.
1260
libtool_args="$nonopt"
1261
base_compile="$nonopt $@"
1262
compile_command="$nonopt"
1263
finalize_command="$nonopt"
1276
lib_search_path=`pwd`
1285
export_symbols_regex=
1293
precious_files_regex=
1294
prefer_static_libs=no
1307
func_infer_tag $base_compile
1309
# We need to know -static, to get the right output filenames.
1313
-all-static | -static)
1314
if test "X$arg" = "X-all-static"; then
1315
if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1316
$echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1318
if test -n "$link_static_flag"; then
1319
dlopen_self=$dlopen_self_static
1322
if test -z "$pic_flag" && test -n "$link_static_flag"; then
1323
dlopen_self=$dlopen_self_static
1326
build_libtool_libs=no
1328
prefer_static_libs=yes
1334
# See if our shared archives depend on static archives.
1335
test -n "$old_archive_from_new_cmds" && build_old_libs=yes
1337
# Go through the arguments, transforming them on the way.
1338
while test "$#" -gt 0; do
1342
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1343
qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1347
libtool_args="$libtool_args $qarg"
1349
# If the previous option needs an argument, assign it.
1350
if test -n "$prev"; then
1353
compile_command="$compile_command @OUTPUT@"
1354
finalize_command="$finalize_command @OUTPUT@"
1360
if test "$preload" = no; then
1361
# Add the symbol object into the linking commands.
1362
compile_command="$compile_command @SYMFILE@"
1363
finalize_command="$finalize_command @SYMFILE@"
1367
*.la | *.lo) ;; # We handle these cases below.
1369
if test "$dlself" = no; then
1377
if test "$prev" = dlprefiles; then
1379
elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
1389
if test "$prev" = dlfiles; then
1390
dlfiles="$dlfiles $arg"
1392
dlprefiles="$dlprefiles $arg"
1400
export_symbols="$arg"
1401
if test ! -f "$arg"; then
1402
$echo "$modename: symbol file \`$arg' does not exist"
1409
export_symbols_regex="$arg"
1414
inst_prefix_dir="$arg"
1419
precious_files_regex="$arg"
1429
if test -f "$arg"; then
1432
for fil in `cat $save_arg`
1434
# moreargs="$moreargs $fil"
1436
# A libtool-controlled object.
1438
# Check to see that this really is a libtool object.
1439
if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1444
# If there is no directory component, then add one.
1446
*/* | *\\*) . $arg ;;
1450
if test -z "$pic_object" || \
1451
test -z "$non_pic_object" ||
1452
test "$pic_object" = none && \
1453
test "$non_pic_object" = none; then
1454
$echo "$modename: cannot find name of object for \`$arg'" 1>&2
1458
# Extract subdirectory from the argument.
1459
xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1460
if test "X$xdir" = "X$arg"; then
1466
if test "$pic_object" != none; then
1467
# Prepend the subdirectory the object is found in.
1468
pic_object="$xdir$pic_object"
1470
if test "$prev" = dlfiles; then
1471
if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1472
dlfiles="$dlfiles $pic_object"
1476
# If libtool objects are unsupported, then we need to preload.
1481
# CHECK ME: I think I busted this. -Ossama
1482
if test "$prev" = dlprefiles; then
1483
# Preload the old-style object.
1484
dlprefiles="$dlprefiles $pic_object"
1489
libobjs="$libobjs $pic_object"
1494
if test "$non_pic_object" != none; then
1495
# Prepend the subdirectory the object is found in.
1496
non_pic_object="$xdir$non_pic_object"
1498
# A standard non-PIC object
1499
non_pic_objects="$non_pic_objects $non_pic_object"
1500
if test -z "$pic_object" || test "$pic_object" = none ; then
1501
arg="$non_pic_object"
1505
# Only an error if not doing a dry-run.
1506
if test -z "$run"; then
1507
$echo "$modename: \`$arg' is not a valid libtool object" 1>&2
1512
# Extract subdirectory from the argument.
1513
xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1514
if test "X$xdir" = "X$arg"; then
1520
pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
1521
non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
1522
libobjs="$libobjs $pic_object"
1523
non_pic_objects="$non_pic_objects $non_pic_object"
1528
$echo "$modename: link input file \`$save_arg' does not exist"
1536
# We need an absolute path.
1538
[\\/]* | [A-Za-z]:[\\/]*) ;;
1540
$echo "$modename: only absolute run-paths are allowed" 1>&2
1544
if test "$prev" = rpath; then
1547
*) rpath="$rpath $arg" ;;
1552
*) xrpath="$xrpath $arg" ;;
1559
compiler_flags="$compiler_flags $qarg"
1561
compile_command="$compile_command $qarg"
1562
finalize_command="$finalize_command $qarg"
1566
linker_flags="$linker_flags $qarg"
1567
compiler_flags="$compiler_flags $wl$qarg"
1569
compile_command="$compile_command $wl$qarg"
1570
finalize_command="$finalize_command $wl$qarg"
1574
linker_flags="$linker_flags $qarg"
1575
compiler_flags="$compiler_flags $qarg"
1577
compile_command="$compile_command $qarg"
1578
finalize_command="$finalize_command $qarg"
1587
eval "$prev=\"\$arg\""
1592
fi # test -n "$prev"
1598
if test -n "$link_static_flag"; then
1599
compile_command="$compile_command $link_static_flag"
1600
finalize_command="$finalize_command $link_static_flag"
1606
# FIXME: remove this flag sometime in the future.
1607
$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1631
-export-symbols | -export-symbols-regex)
1632
if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1633
$echo "$modename: more than one -exported-symbols argument is not allowed"
1636
if test "X$arg" = "X-export-symbols"; then
1649
# The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
1650
# so, if we see these flags be careful not to treat them like -L
1652
case $with_gcc/$host in
1653
no/*-*-irix* | /*-*-irix*)
1654
compile_command="$compile_command $arg"
1655
finalize_command="$finalize_command $arg"
1662
dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1663
# We need an absolute path.
1665
[\\/]* | [A-Za-z]:[\\/]*) ;;
1667
absdir=`cd "$dir" && pwd`
1668
if test -z "$absdir"; then
1669
$echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1678
deplibs="$deplibs -L$dir"
1679
lib_search_path="$lib_search_path $dir"
1683
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1684
case :$dllsearchpath: in
1686
*) dllsearchpath="$dllsearchpath:$dir";;
1694
if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
1696
*-*-cygwin* | *-*-pw32* | *-*-beos*)
1697
# These systems don't actually have a C or math library (as such)
1700
*-*-mingw* | *-*-os2*)
1701
# These systems don't actually have a C library (as such)
1702
test "X$arg" = "X-lc" && continue
1704
*-*-openbsd* | *-*-freebsd*)
1705
# Do not include libc due to us having libc/libc_r.
1706
test "X$arg" = "X-lc" && continue
1708
*-*-rhapsody* | *-*-darwin1.[012])
1709
# Rhapsody C and math libraries are in the System framework
1710
deplibs="$deplibs -framework System"
1713
elif test "X$arg" = "X-lc_r"; then
1715
*-*-openbsd* | *-*-freebsd*)
1716
# Do not include libc_r directly, use -pthread flag.
1721
deplibs="$deplibs $arg"
1725
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
1726
deplibs="$deplibs $arg"
1735
# gcc -m* arguments should be passed to the linker via $compiler_flags
1736
# in order to pass architecture information to the linker
1737
# (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo
1738
# but this is not reliable with gcc because gcc may use -mfoo to
1739
# select a different linker, different libraries, etc, while
1740
# -Wl,-mfoo simply passes -mfoo to the linker.
1742
# Unknown arguments in both finalize_command and compile_command need
1743
# to be aesthetically quoted because they are evaled later.
1744
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1746
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1750
compile_command="$compile_command $arg"
1751
finalize_command="$finalize_command $arg"
1752
if test "$with_gcc" = "yes" ; then
1753
compiler_flags="$compiler_flags $arg"
1770
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
1771
# The PATH hackery in wrapper scripts is required on Windows
1772
# in order for the loader to find any dlls it needs.
1773
$echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1774
$echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1777
*) no_install=yes ;;
1794
-precious-files-regex)
1815
dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1816
# We need an absolute path.
1818
[\\/]* | [A-Za-z]:[\\/]*) ;;
1820
$echo "$modename: only absolute run-paths are allowed" 1>&2
1826
*) xrpath="$xrpath $dir" ;;
1832
# The effects of -static are defined in a previous loop.
1833
# We used to do the same as -all-static on platforms that
1834
# didn't have a PIC flag, but the assumption that the effects
1835
# would be equivalent was wrong. It would break on at least
1836
# Digital Unix and AIX.
1856
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
1858
save_ifs="$IFS"; IFS=','
1859
for flag in $args; do
1862
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1867
compiler_flags="$compiler_flags $flag"
1870
arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1874
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
1876
save_ifs="$IFS"; IFS=','
1877
for flag in $args; do
1880
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1885
compiler_flags="$compiler_flags $wl$flag"
1886
linker_flags="$linker_flags $flag"
1889
arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1907
# Some other compiler flag.
1909
# Unknown arguments in both finalize_command and compile_command need
1910
# to be aesthetically quoted because they are evaled later.
1911
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1913
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1920
# A standard object.
1925
# A libtool-controlled object.
1927
# Check to see that this really is a libtool object.
1928
if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
1933
# If there is no directory component, then add one.
1935
*/* | *\\*) . $arg ;;
1939
if test -z "$pic_object" || \
1940
test -z "$non_pic_object" ||
1941
test "$pic_object" = none && \
1942
test "$non_pic_object" = none; then
1943
$echo "$modename: cannot find name of object for \`$arg'" 1>&2
1947
# Extract subdirectory from the argument.
1948
xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
1949
if test "X$xdir" = "X$arg"; then
1955
if test "$pic_object" != none; then
1956
# Prepend the subdirectory the object is found in.
1957
pic_object="$xdir$pic_object"
1959
if test "$prev" = dlfiles; then
1960
if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1961
dlfiles="$dlfiles $pic_object"
1965
# If libtool objects are unsupported, then we need to preload.
1970
# CHECK ME: I think I busted this. -Ossama
1971
if test "$prev" = dlprefiles; then
1972
# Preload the old-style object.
1973
dlprefiles="$dlprefiles $pic_object"
1978
libobjs="$libobjs $pic_object"
1983
if test "$non_pic_object" != none; then
1984
# Prepend the subdirectory the object is found in.
1985
non_pic_object="$xdir$non_pic_object"
1987
# A standard non-PIC object
1988
non_pic_objects="$non_pic_objects $non_pic_object"
1989
if test -z "$pic_object" || test "$pic_object" = none ; then
1990
arg="$non_pic_object"
1994
# Only an error if not doing a dry-run.
1995
if test -z "$run"; then
1996
$echo "$modename: \`$arg' is not a valid libtool object" 1>&2
2001
# Extract subdirectory from the argument.
2002
xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
2003
if test "X$xdir" = "X$arg"; then
2009
pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
2010
non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
2011
libobjs="$libobjs $pic_object"
2012
non_pic_objects="$non_pic_objects $non_pic_object"
2019
deplibs="$deplibs $arg"
2020
old_deplibs="$old_deplibs $arg"
2025
# A libtool-controlled library.
2027
if test "$prev" = dlfiles; then
2028
# This library was specified with -dlopen.
2029
dlfiles="$dlfiles $arg"
2031
elif test "$prev" = dlprefiles; then
2032
# The library was specified with -dlpreopen.
2033
dlprefiles="$dlprefiles $arg"
2036
deplibs="$deplibs $arg"
2041
# Some other compiler argument.
2043
# Unknown arguments in both finalize_command and compile_command need
2044
# to be aesthetically quoted because they are evaled later.
2045
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
2047
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
2054
# Now actually substitute the argument into the commands.
2055
if test -n "$arg"; then
2056
compile_command="$compile_command $arg"
2057
finalize_command="$finalize_command $arg"
2059
done # argument parsing loop
2061
if test -n "$prev"; then
2062
$echo "$modename: the \`$prevarg' option requires an argument" 1>&2
2067
if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
2068
eval arg=\"$export_dynamic_flag_spec\"
2069
compile_command="$compile_command $arg"
2070
finalize_command="$finalize_command $arg"
2074
# calculate the name of the file, without its directory
2075
outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
2076
libobjs_save="$libobjs"
2078
if test -n "$shlibpath_var"; then
2079
# get the directories listed in $shlibpath_var
2080
eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
2084
eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
2085
eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
2087
output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
2088
if test "X$output_objdir" = "X$output"; then
2089
output_objdir="$objdir"
2091
output_objdir="$output_objdir/$objdir"
2093
# Create the object directory.
2094
if test ! -d "$output_objdir"; then
2095
$show "$mkdir $output_objdir"
2096
$run $mkdir $output_objdir
2098
if test "$status" -ne 0 && test ! -d "$output_objdir"; then
2103
# Determine the type of output
2106
$echo "$modename: you must specify an output file" 1>&2
2110
*.$libext) linkmode=oldlib ;;
2111
*.lo | *.$objext) linkmode=obj ;;
2112
*.la) linkmode=lib ;;
2113
*) linkmode=prog ;; # Anything else should be a program.
2117
*cygwin* | *mingw* | *pw32*)
2118
# don't eliminate duplications in $postdeps and $predeps
2119
duplicate_compiler_generated_deps=yes
2122
duplicate_compiler_generated_deps=$duplicate_deps
2128
# Find all interdependent deplibs by searching for libraries
2129
# that are linked more than once (e.g. -la -lb -la)
2130
for deplib in $deplibs; do
2131
if test "X$duplicate_deps" = "Xyes" ; then
2133
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2136
libs="$libs $deplib"
2139
if test "$linkmode" = lib; then
2140
libs="$predeps $libs $compiler_lib_search_path $postdeps"
2142
# Compute libraries that are listed more than once in $predeps
2143
# $postdeps and mark them as special (i.e., whose duplicates are
2144
# not to be eliminated).
2146
if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
2147
for pre_post_dep in $predeps $postdeps; do
2148
case "$pre_post_deps " in
2149
*" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
2151
pre_post_deps="$pre_post_deps $pre_post_dep"
2160
need_relink=no # whether we're linking any uninstalled libtool libraries
2161
notinst_deplibs= # not-installed libtool libraries
2162
notinst_path= # paths that contain not-installed libtool libraries
2166
for file in $dlfiles $dlprefiles; do
2170
$echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
2182
passes="conv scan dlopen dlpreopen link"
2187
for pass in $passes; do
2188
if test "$linkmode,$pass" = "lib,link" ||
2189
test "$linkmode,$pass" = "prog,scan"; then
2193
if test "$linkmode" = prog; then
2195
dlopen) libs="$dlfiles" ;;
2196
dlpreopen) libs="$dlprefiles" ;;
2197
link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
2200
if test "$pass" = dlopen; then
2201
# Collect dlpreopened libraries
2202
save_deplibs="$deplibs"
2205
for deplib in $libs; do
2209
-mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
2210
if test "$linkmode,$pass" = "prog,link"; then
2211
compile_deplibs="$deplib $compile_deplibs"
2212
finalize_deplibs="$deplib $finalize_deplibs"
2214
deplibs="$deplib $deplibs"
2219
if test "$linkmode" != lib && test "$linkmode" != prog; then
2220
$echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
2223
if test "$pass" = conv; then
2224
deplibs="$deplib $deplibs"
2227
name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
2228
for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
2229
for search_ext in .la $std_shrext .so .a; do
2230
# Search the libtool library
2231
lib="$searchdir/lib${name}${search_ext}"
2232
if test -f "$lib"; then
2233
if test "$search_ext" = ".la"; then
2242
if test "$found" != yes; then
2243
# deplib doesn't seem to be a libtool library
2244
if test "$linkmode,$pass" = "prog,link"; then
2245
compile_deplibs="$deplib $compile_deplibs"
2246
finalize_deplibs="$deplib $finalize_deplibs"
2248
deplibs="$deplib $deplibs"
2249
test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2252
else # deplib is a libtool library
2253
# If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
2254
# We need to do some special things here, and not later.
2255
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
2256
case " $predeps $postdeps " in
2258
if (${SED} -e '2q' $lib |
2259
grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
2263
*/* | *\\*) . $lib ;;
2266
for l in $old_library $library_names; do
2269
if test "X$ll" = "X$old_library" ; then # only static version available
2271
ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2272
test "X$ladir" = "X$lib" && ladir="."
2273
lib=$ladir/$old_library
2274
if test "$linkmode,$pass" = "prog,link"; then
2275
compile_deplibs="$deplib $compile_deplibs"
2276
finalize_deplibs="$deplib $finalize_deplibs"
2278
deplibs="$deplib $deplibs"
2279
test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
2293
deplibs="$deplib $deplibs"
2294
test "$pass" = conv && continue
2295
newdependency_libs="$deplib $newdependency_libs"
2296
newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2299
if test "$pass" = conv; then
2300
deplibs="$deplib $deplibs"
2303
if test "$pass" = scan; then
2304
deplibs="$deplib $deplibs"
2306
compile_deplibs="$deplib $compile_deplibs"
2307
finalize_deplibs="$deplib $finalize_deplibs"
2309
newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
2312
$echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
2318
if test "$pass" = link; then
2319
dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
2320
# Make sure the xrpath contains only unique directories.
2323
*) xrpath="$xrpath $dir" ;;
2326
deplibs="$deplib $deplibs"
2329
*.la) lib="$deplib" ;;
2331
if test "$pass" = conv; then
2332
deplibs="$deplib $deplibs"
2337
if test "$deplibs_check_method" != pass_all; then
2339
$echo "*** Warning: Trying to link with static lib archive $deplib."
2340
$echo "*** I have the capability to make that library automatically link in when"
2341
$echo "*** you link to this library. But I can only do this if you have a"
2342
$echo "*** shared version of the library, which you do not appear to have"
2343
$echo "*** because the file extensions .$libext of this argument makes me believe"
2344
$echo "*** that it is just a static archive that I should not used here."
2347
$echo "*** Warning: Linking the shared library $output against the"
2348
$echo "*** static library $deplib is not portable!"
2349
deplibs="$deplib $deplibs"
2354
if test "$pass" != link; then
2355
deplibs="$deplib $deplibs"
2357
compile_deplibs="$deplib $compile_deplibs"
2358
finalize_deplibs="$deplib $finalize_deplibs"
2365
if test "$pass" = conv; then
2366
deplibs="$deplib $deplibs"
2367
elif test "$linkmode" = prog; then
2368
if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
2369
# If there is no dlopen support or we're linking statically,
2370
# we need to preload.
2371
newdlprefiles="$newdlprefiles $deplib"
2372
compile_deplibs="$deplib $compile_deplibs"
2373
finalize_deplibs="$deplib $finalize_deplibs"
2375
newdlfiles="$newdlfiles $deplib"
2385
if test "$found" = yes || test -f "$lib"; then :
2387
$echo "$modename: cannot find the library \`$lib'" 1>&2
2391
# Check to see that this really is a libtool archive.
2392
if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
2394
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
2398
ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
2399
test "X$ladir" = "X$lib" && ladir="."
2407
# If the library was installed with an old release of libtool,
2408
# it will not redefine variables installed, or shouldnotlink
2414
*/* | *\\*) . $lib ;;
2418
if test "$linkmode,$pass" = "lib,link" ||
2419
test "$linkmode,$pass" = "prog,scan" ||
2420
{ test "$linkmode" != prog && test "$linkmode" != lib; }; then
2421
test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
2422
test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
2425
if test "$pass" = conv; then
2426
# Only check for convenience libraries
2427
deplibs="$lib $deplibs"
2428
if test -z "$libdir"; then
2429
if test -z "$old_library"; then
2430
$echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2433
# It is a libtool convenience library, so add in its objects.
2434
convenience="$convenience $ladir/$objdir/$old_library"
2435
old_convenience="$old_convenience $ladir/$objdir/$old_library"
2437
for deplib in $dependency_libs; do
2438
deplibs="$deplib $deplibs"
2439
if test "X$duplicate_deps" = "Xyes" ; then
2440
case "$tmp_libs " in
2441
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2444
tmp_libs="$tmp_libs $deplib"
2446
elif test "$linkmode" != prog && test "$linkmode" != lib; then
2447
$echo "$modename: \`$lib' is not a convenience library" 1>&2
2454
# Get the name of the library we link against.
2456
for l in $old_library $library_names; do
2459
if test -z "$linklib"; then
2460
$echo "$modename: cannot find name of link library for \`$lib'" 1>&2
2464
# This library was specified with -dlopen.
2465
if test "$pass" = dlopen; then
2466
if test -z "$libdir"; then
2467
$echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
2470
if test -z "$dlname" ||
2471
test "$dlopen_support" != yes ||
2472
test "$build_libtool_libs" = no; then
2473
# If there is no dlname, no dlopen support or we're linking
2474
# statically, we need to preload. We also need to preload any
2475
# dependent libraries so libltdl's deplib preloader doesn't
2476
# bomb out in the load deplibs phase.
2477
dlprefiles="$dlprefiles $lib $dependency_libs"
2479
newdlfiles="$newdlfiles $lib"
2484
# We need an absolute path.
2486
[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
2488
abs_ladir=`cd "$ladir" && pwd`
2489
if test -z "$abs_ladir"; then
2490
$echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
2491
$echo "$modename: passing it literally to the linker, although it might fail" 1>&2
2496
laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
2498
# Find the relevant object directory and library name.
2499
if test "X$installed" = Xyes; then
2500
if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
2501
$echo "$modename: warning: library \`$lib' was moved." 1>&2
2510
dir="$ladir/$objdir"
2511
absdir="$abs_ladir/$objdir"
2512
# Remove this search path later
2513
notinst_path="$notinst_path $abs_ladir"
2514
fi # $installed = yes
2515
name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2517
# This library was specified with -dlpreopen.
2518
if test "$pass" = dlpreopen; then
2519
if test -z "$libdir"; then
2520
$echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
2523
# Prefer using a static library (so that no silly _DYNAMIC symbols
2524
# are required to link).
2525
if test -n "$old_library"; then
2526
newdlprefiles="$newdlprefiles $dir/$old_library"
2527
# Otherwise, use the dlname, so that lt_dlopen finds it.
2528
elif test -n "$dlname"; then
2529
newdlprefiles="$newdlprefiles $dir/$dlname"
2531
newdlprefiles="$newdlprefiles $dir/$linklib"
2533
fi # $pass = dlpreopen
2535
if test -z "$libdir"; then
2536
# Link the convenience library
2537
if test "$linkmode" = lib; then
2538
deplibs="$dir/$old_library $deplibs"
2539
elif test "$linkmode,$pass" = "prog,link"; then
2540
compile_deplibs="$dir/$old_library $compile_deplibs"
2541
finalize_deplibs="$dir/$old_library $finalize_deplibs"
2543
deplibs="$lib $deplibs" # used for prog,scan pass
2549
if test "$linkmode" = prog && test "$pass" != link; then
2550
newlib_search_path="$newlib_search_path $ladir"
2551
deplibs="$lib $deplibs"
2554
if test "$link_all_deplibs" != no || test -z "$library_names" ||
2555
test "$build_libtool_libs" = no; then
2560
for deplib in $dependency_libs; do
2562
-L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
2564
# Need to link against all dependency_libs?
2565
if test "$linkalldeplibs" = yes; then
2566
deplibs="$deplib $deplibs"
2568
# Need to hardcode shared library paths
2569
# or/and link against static libraries
2570
newdependency_libs="$deplib $newdependency_libs"
2572
if test "X$duplicate_deps" = "Xyes" ; then
2573
case "$tmp_libs " in
2574
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2577
tmp_libs="$tmp_libs $deplib"
2580
fi # $linkmode = prog...
2582
if test "$linkmode,$pass" = "prog,link"; then
2583
if test -n "$library_names" &&
2584
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then
2585
# We need to hardcode the library path
2586
if test -n "$shlibpath_var"; then
2587
# Make sure the rpath contains only unique directories.
2588
case "$temp_rpath " in
2591
*) temp_rpath="$temp_rpath $dir" ;;
2595
# Hardcode the library path.
2596
# Skip directories that are in the system default run-time
2598
case " $sys_lib_dlsearch_path " in
2601
case "$compile_rpath " in
2603
*) compile_rpath="$compile_rpath $absdir"
2607
case " $sys_lib_dlsearch_path " in
2610
case "$finalize_rpath " in
2612
*) finalize_rpath="$finalize_rpath $libdir"
2616
fi # $linkmode,$pass = prog,link...
2618
if test "$alldeplibs" = yes &&
2619
{ test "$deplibs_check_method" = pass_all ||
2620
{ test "$build_libtool_libs" = yes &&
2621
test -n "$library_names"; }; }; then
2622
# We only need to search for static libraries
2627
link_static=no # Whether the deplib will be linked statically
2628
if test -n "$library_names" &&
2629
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then
2630
if test "$installed" = no; then
2631
notinst_deplibs="$notinst_deplibs $lib"
2634
# This is a shared library
2636
# Warn about portability, can't link against -module's on
2637
# some systems (darwin)
2638
if test "$shouldnotlink" = yes && test "$pass" = link ; then
2640
if test "$linkmode" = prog; then
2641
$echo "*** Warning: Linking the executable $output against the loadable module"
2643
$echo "*** Warning: Linking the shared library $output against the loadable module"
2645
$echo "*** $linklib is not portable!"
2647
if test "$linkmode" = lib &&
2648
test "$hardcode_into_libs" = yes; then
2649
# Hardcode the library path.
2650
# Skip directories that are in the system default run-time
2652
case " $sys_lib_dlsearch_path " in
2655
case "$compile_rpath " in
2657
*) compile_rpath="$compile_rpath $absdir"
2661
case " $sys_lib_dlsearch_path " in
2664
case "$finalize_rpath " in
2666
*) finalize_rpath="$finalize_rpath $libdir"
2672
if test -n "$old_archive_from_expsyms_cmds"; then
2673
# figure out the soname
2674
set dummy $library_names
2677
libname=`eval \\$echo \"$libname_spec\"`
2678
# use dlname if we got it. it's perfectly good, no?
2679
if test -n "$dlname"; then
2681
elif test -n "$soname_spec"; then
2685
major=`expr $current - $age`
2689
eval soname=\"$soname_spec\"
2694
# Make a new name for the extract_expsyms_cmds to use
2696
soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
2697
newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
2699
# If the library has no export list, then create one now
2700
if test -f "$output_objdir/$soname-def"; then :
2702
$show "extracting exported symbol list from \`$soname'"
2703
save_ifs="$IFS"; IFS='~'
2704
cmds=$extract_expsyms_cmds
2705
for cmd in $cmds; do
2709
$run eval "$cmd" || exit $?
2715
if test -f "$output_objdir/$newlib"; then :; else
2716
$show "generating import library for \`$soname'"
2717
save_ifs="$IFS"; IFS='~'
2718
cmds=$old_archive_from_expsyms_cmds
2719
for cmd in $cmds; do
2723
$run eval "$cmd" || exit $?
2727
# make sure the library variables are pointing to the new library
2730
fi # test -n "$old_archive_from_expsyms_cmds"
2732
if test "$linkmode" = prog || test "$mode" != relink; then
2737
case $hardcode_action in
2738
immediate | unsupported)
2739
if test "$hardcode_direct" = no; then
2742
*-*-sco3.2v5* ) add_dir="-L$dir" ;;
2744
# if the lib is a module then we can not link against
2745
# it, someone is ignoring the new warnings I added
2746
if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
2747
$echo "** Warning, lib $linklib is a module, not a shared library"
2748
if test -z "$old_library" ; then
2750
$echo "** And there doesn't seem to be a static archive available"
2751
$echo "** The link will probably fail, sorry"
2753
add="$dir/$old_library"
2757
elif test "$hardcode_minus_L" = no; then
2759
*-*-sunos*) add_shlibpath="$dir" ;;
2763
elif test "$hardcode_shlibpath_var" = no; then
2764
add_shlibpath="$dir"
2771
if test "$hardcode_direct" = yes; then
2773
elif test "$hardcode_minus_L" = yes; then
2775
# Try looking first in the location we're being installed to.
2776
if test -n "$inst_prefix_dir"; then
2779
add_dir="$add_dir -L$inst_prefix_dir$libdir"
2784
elif test "$hardcode_shlibpath_var" = yes; then
2785
add_shlibpath="$dir"
2794
if test "$lib_linked" != yes; then
2795
$echo "$modename: configuration error: unsupported hardcode properties"
2799
if test -n "$add_shlibpath"; then
2800
case :$compile_shlibpath: in
2801
*":$add_shlibpath:"*) ;;
2802
*) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
2805
if test "$linkmode" = prog; then
2806
test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
2807
test -n "$add" && compile_deplibs="$add $compile_deplibs"
2809
test -n "$add_dir" && deplibs="$add_dir $deplibs"
2810
test -n "$add" && deplibs="$add $deplibs"
2811
if test "$hardcode_direct" != yes && \
2812
test "$hardcode_minus_L" != yes && \
2813
test "$hardcode_shlibpath_var" = yes; then
2814
case :$finalize_shlibpath: in
2816
*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2822
if test "$linkmode" = prog || test "$mode" = relink; then
2826
# Finalize command for both is simple: just hardcode it.
2827
if test "$hardcode_direct" = yes; then
2828
add="$libdir/$linklib"
2829
elif test "$hardcode_minus_L" = yes; then
2832
elif test "$hardcode_shlibpath_var" = yes; then
2833
case :$finalize_shlibpath: in
2835
*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2838
elif test "$hardcode_automatic" = yes; then
2839
if test -n "$inst_prefix_dir" &&
2840
test -f "$inst_prefix_dir$libdir/$linklib" ; then
2841
add="$inst_prefix_dir$libdir/$linklib"
2843
add="$libdir/$linklib"
2846
# We cannot seem to hardcode it, guess we'll fake it.
2848
# Try looking first in the location we're being installed to.
2849
if test -n "$inst_prefix_dir"; then
2852
add_dir="$add_dir -L$inst_prefix_dir$libdir"
2859
if test "$linkmode" = prog; then
2860
test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
2861
test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
2863
test -n "$add_dir" && deplibs="$add_dir $deplibs"
2864
test -n "$add" && deplibs="$add $deplibs"
2867
elif test "$linkmode" = prog; then
2868
# Here we assume that one of hardcode_direct or hardcode_minus_L
2869
# is not unsupported. This is valid on all known static and
2871
if test "$hardcode_direct" != unsupported; then
2872
test -n "$old_library" && linklib="$old_library"
2873
compile_deplibs="$dir/$linklib $compile_deplibs"
2874
finalize_deplibs="$dir/$linklib $finalize_deplibs"
2876
compile_deplibs="-l$name -L$dir $compile_deplibs"
2877
finalize_deplibs="-l$name -L$dir $finalize_deplibs"
2879
elif test "$build_libtool_libs" = yes; then
2880
# Not a shared library
2881
if test "$deplibs_check_method" != pass_all; then
2882
# We're trying link a shared library against a static one
2883
# but the system doesn't support it.
2885
# Just print a warning and add the library to dependency_libs so
2886
# that the program can be linked against the static library.
2888
$echo "*** Warning: This system can not link to static lib archive $lib."
2889
$echo "*** I have the capability to make that library automatically link in when"
2890
$echo "*** you link to this library. But I can only do this if you have a"
2891
$echo "*** shared version of the library, which you do not appear to have."
2892
if test "$module" = yes; then
2893
$echo "*** But as you try to build a module library, libtool will still create "
2894
$echo "*** a static module, that should work as long as the dlopening application"
2895
$echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
2896
if test -z "$global_symbol_pipe"; then
2898
$echo "*** However, this would only work if libtool was able to extract symbol"
2899
$echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2900
$echo "*** not find such a program. So, this module is probably useless."
2901
$echo "*** \`nm' from GNU binutils and a full rebuild may help."
2903
if test "$build_old_libs" = no; then
2904
build_libtool_libs=module
2907
build_libtool_libs=no
2911
convenience="$convenience $dir/$old_library"
2912
old_convenience="$old_convenience $dir/$old_library"
2913
deplibs="$dir/$old_library $deplibs"
2916
fi # link shared/static library?
2918
if test "$linkmode" = lib; then
2919
if test -n "$dependency_libs" &&
2920
{ test "$hardcode_into_libs" != yes ||
2921
test "$build_old_libs" = yes ||
2922
test "$link_static" = yes; }; then
2923
# Extract -R from dependency_libs
2925
for libdir in $dependency_libs; do
2927
-R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
2929
*" $temp_xrpath "*) ;;
2930
*) xrpath="$xrpath $temp_xrpath";;
2932
*) temp_deplibs="$temp_deplibs $libdir";;
2935
dependency_libs="$temp_deplibs"
2938
newlib_search_path="$newlib_search_path $absdir"
2939
# Link against this library
2940
test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
2941
# ... and its dependency_libs
2943
for deplib in $dependency_libs; do
2944
newdependency_libs="$deplib $newdependency_libs"
2945
if test "X$duplicate_deps" = "Xyes" ; then
2946
case "$tmp_libs " in
2947
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2950
tmp_libs="$tmp_libs $deplib"
2953
if test "$link_all_deplibs" != no; then
2954
# Add the search paths of all dependency libraries
2955
for deplib in $dependency_libs; do
2957
-L*) path="$deplib" ;;
2959
dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
2960
test "X$dir" = "X$deplib" && dir="."
2961
# We need an absolute path.
2963
[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
2965
absdir=`cd "$dir" && pwd`
2966
if test -z "$absdir"; then
2967
$echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
2972
if grep "^installed=no" $deplib > /dev/null; then
2973
path="$absdir/$objdir"
2975
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2976
if test -z "$libdir"; then
2977
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
2980
if test "$absdir" != "$libdir"; then
2981
$echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
2988
# we do not want to link against static libs,
2989
# but need to link against shared
2990
eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
2991
if test -n "$deplibrary_names" ; then
2992
for tmp in $deplibrary_names ; do
2995
if test -f "$path/$depdepl" ; then
2996
depdepl="$path/$depdepl"
2998
# do not add paths which are already there
2999
case " $newlib_search_path " in
3001
*) newlib_search_path="$newlib_search_path $path";;
3014
# Again, we only want to link against shared libraries
3015
eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
3016
for tmp in $newlib_search_path ; do
3017
if test -f "$tmp/lib$tmp_libs.dylib" ; then
3018
eval depdepl="$tmp/lib$tmp_libs.dylib"
3029
case " $deplibs " in
3031
*) deplibs="$depdepl $deplibs" ;;
3033
case " $deplibs " in
3035
*) deplibs="$deplibs $path" ;;
3038
fi # link_all_deplibs != no
3040
done # for deplib in $libs
3041
dependency_libs="$newdependency_libs"
3042
if test "$pass" = dlpreopen; then
3043
# Link the dlpreopened libraries before other libraries
3044
for deplib in $save_deplibs; do
3045
deplibs="$deplib $deplibs"
3048
if test "$pass" != dlopen; then
3049
if test "$pass" != conv; then
3050
# Make sure lib_search_path contains only unique directories.
3052
for dir in $newlib_search_path; do
3053
case "$lib_search_path " in
3055
*) lib_search_path="$lib_search_path $dir" ;;
3061
if test "$linkmode,$pass" != "prog,link"; then
3064
vars="compile_deplibs finalize_deplibs"
3066
for var in $vars dependency_libs; do
3067
# Add libraries to $var in reverse order
3068
eval tmp_libs=\"\$$var\"
3070
for deplib in $tmp_libs; do
3071
# FIXME: Pedantically, this is the right thing to do, so
3072
# that some nasty dependency loop isn't accidentally
3074
#new_libs="$deplib $new_libs"
3075
# Pragmatically, this seems to cause very few problems in
3078
-L*) new_libs="$deplib $new_libs" ;;
3081
# And here is the reason: when a library appears more
3082
# than once as an explicit dependence of a library, or
3083
# is implicitly linked in more than once by the
3084
# compiler, it is considered special, and multiple
3085
# occurrences thereof are not removed. Compare this
3086
# with having the same library being listed as a
3087
# dependency of multiple other libraries: in this case,
3088
# we know (pedantically, we assume) the library does not
3089
# need to be listed more than once, so we keep only the
3090
# last copy. This is not always right, but it is rare
3091
# enough that we require users that really mean to play
3092
# such unportable linking tricks to link the library
3093
# using -Wl,-lname, so that libtool does not consider it
3094
# for duplicate removal.
3095
case " $specialdeplibs " in
3096
*" $deplib "*) new_libs="$deplib $new_libs" ;;
3098
case " $new_libs " in
3100
*) new_libs="$deplib $new_libs" ;;
3108
for deplib in $new_libs; do
3111
case " $tmp_libs " in
3113
*) tmp_libs="$tmp_libs $deplib" ;;
3116
*) tmp_libs="$tmp_libs $deplib" ;;
3119
eval $var=\"$tmp_libs\"
3122
# Last step: remove runtime libs from dependency_libs
3123
# (they stay in deplibs)
3125
for i in $dependency_libs ; do
3126
case " $predeps $postdeps $compiler_lib_search_path " in
3131
if test -n "$i" ; then
3132
tmp_libs="$tmp_libs $i"
3135
dependency_libs=$tmp_libs
3137
if test "$linkmode" = prog; then
3138
dlfiles="$newdlfiles"
3139
dlprefiles="$newdlprefiles"
3144
if test -n "$deplibs"; then
3145
$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
3148
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3149
$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
3152
if test -n "$rpath"; then
3153
$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
3156
if test -n "$xrpath"; then
3157
$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
3160
if test -n "$vinfo"; then
3161
$echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
3164
if test -n "$release"; then
3165
$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
3168
if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
3169
$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
3172
# Now set the variables for building old libraries.
3173
build_libtool_libs=no
3175
objs="$objs$old_deplibs"
3179
# Make sure we only generate libraries of the form `libNAME.la'.
3182
name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
3183
eval shared_ext=\"$shrext_cmds\"
3184
eval libname=\"$libname_spec\"
3187
if test "$module" = no; then
3188
$echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
3192
if test "$need_lib_prefix" != no; then
3193
# Add the "lib" prefix for modules if required
3194
name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3195
eval shared_ext=\"$shrext_cmds\"
3196
eval libname=\"$libname_spec\"
3198
libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
3203
if test -n "$objs"; then
3204
if test "$deplibs_check_method" != pass_all; then
3205
$echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
3209
$echo "*** Warning: Linking the shared library $output against the non-libtool"
3210
$echo "*** objects $objs is not portable!"
3211
libobjs="$libobjs $objs"
3215
if test "$dlself" != no; then
3216
$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
3220
if test "$#" -gt 2; then
3221
$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
3226
if test -z "$rpath"; then
3227
if test "$build_libtool_libs" = yes; then
3228
# Building a libtool convenience library.
3229
# Some compilers have problems with a `.al' extension so
3230
# convenience libraries should have the same extension an
3231
# archive normally would.
3232
oldlibs="$output_objdir/$libname.$libext $oldlibs"
3233
build_libtool_libs=convenience
3237
if test -n "$vinfo"; then
3238
$echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
3241
if test -n "$release"; then
3242
$echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
3246
# Parse the version information argument.
3247
save_ifs="$IFS"; IFS=':'
3248
set dummy $vinfo 0 0 0
3251
if test -n "$8"; then
3252
$echo "$modename: too many parameters to \`-version-info'" 1>&2
3257
# convert absolute version numbers to libtool ages
3258
# this retains compatibility with .la files and attempts
3259
# to make the code below a bit more comprehensible
3261
case $vinfo_number in
3265
number_revision="$4"
3267
# There are really only two kinds -- those that
3268
# use the current revision as the major version
3269
# and those that subtract age and use age as
3270
# a minor version. But, then there is irix
3271
# which has an extra 1 added just for fun
3273
case $version_type in
3274
darwin|linux|osf|windows)
3275
current=`expr $number_major + $number_minor`
3277
revision="$number_revision"
3279
freebsd-aout|freebsd-elf|sunos)
3280
current="$number_major"
3281
revision="$number_minor"
3285
current=`expr $number_major + $number_minor - 1`
3287
revision="$number_minor"
3298
# Check that each of the things are valid numbers.
3302
$echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
3303
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
3311
$echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
3312
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
3320
$echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
3321
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
3326
if test "$age" -gt "$current"; then
3327
$echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
3328
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
3332
# Calculate the version variables.
3336
case $version_type in
3340
# Like Linux, but with the current version available in
3341
# verstring for coding it into the library header
3342
major=.`expr $current - $age`
3343
versuffix="$major.$age.$revision"
3344
# Darwin ld doesn't like 0 for these options...
3345
minor_current=`expr $current + 1`
3346
verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
3351
versuffix=".$current.$revision";
3356
versuffix=".$current";
3360
major=`expr $current - $age + 1`
3362
case $version_type in
3363
nonstopux) verstring_prefix=nonstopux ;;
3364
*) verstring_prefix=sgi ;;
3366
verstring="$verstring_prefix$major.$revision"
3368
# Add in all the interfaces that we are compatible with.
3370
while test "$loop" -ne 0; do
3371
iface=`expr $revision - $loop`
3372
loop=`expr $loop - 1`
3373
verstring="$verstring_prefix$major.$iface:$verstring"
3376
# Before this point, $major must not contain `.'.
3378
versuffix="$major.$revision"
3382
major=.`expr $current - $age`
3383
versuffix="$major.$age.$revision"
3387
major=.`expr $current - $age`
3388
versuffix=".$current.$age.$revision"
3389
verstring="$current.$age.$revision"
3391
# Add in all the interfaces that we are compatible with.
3393
while test "$loop" -ne 0; do
3394
iface=`expr $current - $loop`
3395
loop=`expr $loop - 1`
3396
verstring="$verstring:${iface}.0"
3399
# Make executables depend on our current version.
3400
verstring="$verstring:${current}.0"
3405
versuffix=".$current.$revision"
3409
# Use '-' rather than '.', since we only want one
3410
# extension on DOS 8.3 filesystems.
3411
major=`expr $current - $age`
3416
$echo "$modename: unknown library version type \`$version_type'" 1>&2
3417
$echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
3422
# Clear the version info if we defaulted, and they specified a release.
3423
if test -z "$vinfo" && test -n "$release"; then
3425
case $version_type in
3427
# we can't check for "0.0" in archive_cmds due to quoting
3428
# problems, so we reset it completely
3435
if test "$need_version" = no; then
3442
# Remove version info from name if versioning should be avoided
3443
if test "$avoid_version" = yes && test "$need_version" = no; then
3449
# Check to see if the archive will have undefined symbols.
3450
if test "$allow_undefined" = yes; then
3451
if test "$allow_undefined_flag" = unsupported; then
3452
$echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
3453
build_libtool_libs=no
3457
# Don't allow undefined symbols.
3458
allow_undefined_flag="$no_undefined_flag"
3462
if test "$mode" != relink; then
3463
# Remove our outputs, but don't remove object files since they
3464
# may have been created when compiling PIC objects.
3466
tempremovelist=`$echo "$output_objdir/*"`
3467
for p in $tempremovelist; do
3471
$output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
3472
if test "X$precious_files_regex" != "X"; then
3473
if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
3478
removelist="$removelist $p"
3483
if test -n "$removelist"; then
3484
$show "${rm}r $removelist"
3485
$run ${rm}r $removelist
3489
# Now set the variables for building old libraries.
3490
if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
3491
oldlibs="$oldlibs $output_objdir/$libname.$libext"
3493
# Transform .lo files to .o files.
3494
oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
3497
# Eliminate all temporary directories.
3498
for path in $notinst_path; do
3499
lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
3500
deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
3501
dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
3504
if test -n "$xrpath"; then
3505
# If the user specified any rpath flags, then add them.
3507
for libdir in $xrpath; do
3508
temp_xrpath="$temp_xrpath -R$libdir"
3509
case "$finalize_rpath " in
3511
*) finalize_rpath="$finalize_rpath $libdir" ;;
3514
if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
3515
dependency_libs="$temp_xrpath $dependency_libs"
3519
# Make sure dlfiles contains only unique files that won't be dlpreopened
3520
old_dlfiles="$dlfiles"
3522
for lib in $old_dlfiles; do
3523
case " $dlprefiles $dlfiles " in
3525
*) dlfiles="$dlfiles $lib" ;;
3529
# Make sure dlprefiles contains only unique files
3530
old_dlprefiles="$dlprefiles"
3532
for lib in $old_dlprefiles; do
3533
case "$dlprefiles " in
3535
*) dlprefiles="$dlprefiles $lib" ;;
3539
if test "$build_libtool_libs" = yes; then
3540
if test -n "$rpath"; then
3542
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
3543
# these systems don't actually have a c library (as such)!
3545
*-*-rhapsody* | *-*-darwin1.[012])
3546
# Rhapsody C library is in the System framework
3547
deplibs="$deplibs -framework System"
3550
# Don't link with libc until the a.out ld.so is fixed.
3552
*-*-openbsd* | *-*-freebsd*)
3553
# Do not include libc due to us having libc/libc_r.
3554
test "X$arg" = "X-lc" && continue
3557
# Add libc to deplibs on all other systems if necessary.
3558
if test "$build_libtool_need_lc" = "yes"; then
3559
deplibs="$deplibs -lc"
3565
# Transform deplibs into only deplibs that can be linked in shared.
3567
libname_save=$libname
3568
release_save=$release
3569
versuffix_save=$versuffix
3571
# I'm not sure if I'm treating the release correctly. I think
3572
# release should show up in the -l (ie -lgmp5) so we don't want to
3573
# add it in twice. Is that correct?
3579
case $deplibs_check_method in
3581
# Don't check for shared/static. Everything works.
3582
# This might be a little naive. We might want to check
3583
# whether the library exists or not. But this is on
3584
# osf3 & osf4 and I'm not really sure... Just
3585
# implementing what was already the behavior.
3589
# This code stresses the "libraries are programs" paradigm to its
3590
# limits. Maybe even breaks it. We compile a program, linking it
3591
# against the deplibs as a proxy for the library. Then we can check
3592
# whether they linked in statically or dynamically with ldd.
3594
cat > conftest.c <<EOF
3595
int main() { return 0; }
3598
$LTCC -o conftest conftest.c $deplibs
3599
if test "$?" -eq 0 ; then
3600
ldd_output=`ldd conftest`
3601
for i in $deplibs; do
3602
name="`expr $i : '-l\(.*\)'`"
3603
# If $name is empty we are operating on a -L argument.
3604
if test "$name" != "" && test "$name" -ne "0"; then
3605
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3606
case " $predeps $postdeps " in
3608
newdeplibs="$newdeplibs $i"
3613
if test -n "$i" ; then
3614
libname=`eval \\$echo \"$libname_spec\"`
3615
deplib_matches=`eval \\$echo \"$library_names_spec\"`
3616
set dummy $deplib_matches
3618
if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3619
newdeplibs="$newdeplibs $i"
3623
$echo "*** Warning: dynamic linker does not accept needed library $i."
3624
$echo "*** I have the capability to make that library automatically link in when"
3625
$echo "*** you link to this library. But I can only do this if you have a"
3626
$echo "*** shared version of the library, which I believe you do not have"
3627
$echo "*** because a test_compile did reveal that the linker did not use it for"
3628
$echo "*** its dynamic dependency list that programs get resolved with at runtime."
3632
newdeplibs="$newdeplibs $i"
3636
# Error occurred in the first compile. Let's try to salvage
3637
# the situation: Compile a separate program for each library.
3638
for i in $deplibs; do
3639
name="`expr $i : '-l\(.*\)'`"
3640
# If $name is empty we are operating on a -L argument.
3641
if test "$name" != "" && test "$name" != "0"; then
3643
$LTCC -o conftest conftest.c $i
3645
if test "$?" -eq 0 ; then
3646
ldd_output=`ldd conftest`
3647
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3648
case " $predeps $postdeps " in
3650
newdeplibs="$newdeplibs $i"
3655
if test -n "$i" ; then
3656
libname=`eval \\$echo \"$libname_spec\"`
3657
deplib_matches=`eval \\$echo \"$library_names_spec\"`
3658
set dummy $deplib_matches
3660
if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
3661
newdeplibs="$newdeplibs $i"
3665
$echo "*** Warning: dynamic linker does not accept needed library $i."
3666
$echo "*** I have the capability to make that library automatically link in when"
3667
$echo "*** you link to this library. But I can only do this if you have a"
3668
$echo "*** shared version of the library, which you do not appear to have"
3669
$echo "*** because a test_compile did reveal that the linker did not use this one"
3670
$echo "*** as a dynamic dependency that programs can get resolved with at runtime."
3676
$echo "*** Warning! Library $i is needed by this library but I was not able to"
3677
$echo "*** make it link in! You will probably need to install it or some"
3678
$echo "*** library that it depends on before this library will be fully"
3679
$echo "*** functional. Installing it before continuing would be even better."
3682
newdeplibs="$newdeplibs $i"
3688
set dummy $deplibs_check_method
3689
file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3690
for a_deplib in $deplibs; do
3691
name="`expr $a_deplib : '-l\(.*\)'`"
3692
# If $name is empty we are operating on a -L argument.
3693
if test "$name" != "" && test "$name" != "0"; then
3694
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3695
case " $predeps $postdeps " in
3697
newdeplibs="$newdeplibs $a_deplib"
3702
if test -n "$a_deplib" ; then
3703
libname=`eval \\$echo \"$libname_spec\"`
3704
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3705
potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
3706
for potent_lib in $potential_libs; do
3707
# Follow soft links.
3708
if ls -lLd "$potent_lib" 2>/dev/null \
3709
| grep " -> " >/dev/null; then
3712
# The statement above tries to avoid entering an
3713
# endless loop below, in case of cyclic links.
3714
# We might still enter an endless loop, since a link
3715
# loop can be closed while we follow links,
3717
potlib="$potent_lib"
3718
while test -h "$potlib" 2>/dev/null; do
3719
potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
3721
[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
3722
*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
3725
if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
3727
| $EGREP "$file_magic_regex" > /dev/null; then
3728
newdeplibs="$newdeplibs $a_deplib"
3735
if test -n "$a_deplib" ; then
3738
$echo "*** Warning: linker path does not have real file for library $a_deplib."
3739
$echo "*** I have the capability to make that library automatically link in when"
3740
$echo "*** you link to this library. But I can only do this if you have a"
3741
$echo "*** shared version of the library, which you do not appear to have"
3742
$echo "*** because I did check the linker path looking for a file starting"
3743
if test -z "$potlib" ; then
3744
$echo "*** with $libname but no candidates were found. (...for file magic test)"
3746
$echo "*** with $libname and none of the candidates passed a file format test"
3747
$echo "*** using a file magic. Last file checked: $potlib"
3751
# Add a -L argument.
3752
newdeplibs="$newdeplibs $a_deplib"
3754
done # Gone through all deplibs.
3757
set dummy $deplibs_check_method
3758
match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
3759
for a_deplib in $deplibs; do
3760
name="`expr $a_deplib : '-l\(.*\)'`"
3761
# If $name is empty we are operating on a -L argument.
3762
if test -n "$name" && test "$name" != "0"; then
3763
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3764
case " $predeps $postdeps " in
3766
newdeplibs="$newdeplibs $a_deplib"
3771
if test -n "$a_deplib" ; then
3772
libname=`eval \\$echo \"$libname_spec\"`
3773
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
3774
potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
3775
for potent_lib in $potential_libs; do
3776
potlib="$potent_lib" # see symlink-check above in file_magic test
3777
if eval $echo \"$potent_lib\" 2>/dev/null \
3779
| $EGREP "$match_pattern_regex" > /dev/null; then
3780
newdeplibs="$newdeplibs $a_deplib"
3787
if test -n "$a_deplib" ; then
3790
$echo "*** Warning: linker path does not have real file for library $a_deplib."
3791
$echo "*** I have the capability to make that library automatically link in when"
3792
$echo "*** you link to this library. But I can only do this if you have a"
3793
$echo "*** shared version of the library, which you do not appear to have"
3794
$echo "*** because I did check the linker path looking for a file starting"
3795
if test -z "$potlib" ; then
3796
$echo "*** with $libname but no candidates were found. (...for regex pattern test)"
3798
$echo "*** with $libname and none of the candidates passed a file format test"
3799
$echo "*** using a regex pattern. Last file checked: $potlib"
3803
# Add a -L argument.
3804
newdeplibs="$newdeplibs $a_deplib"
3806
done # Gone through all deplibs.
3810
tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
3811
-e 's/ -[LR][^ ]*//g'`
3812
if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
3813
for i in $predeps $postdeps ; do
3814
# can't use Xsed below, because $i might contain '/'
3815
tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
3818
if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
3819
| grep . >/dev/null; then
3821
if test "X$deplibs_check_method" = "Xnone"; then
3822
$echo "*** Warning: inter-library dependencies are not supported in this platform."
3824
$echo "*** Warning: inter-library dependencies are not known to be supported."
3826
$echo "*** All declared inter-library dependencies are being dropped."
3831
versuffix=$versuffix_save
3833
release=$release_save
3834
libname=$libname_save
3838
*-*-rhapsody* | *-*-darwin1.[012])
3839
# On Rhapsody replace the C library is the System framework
3840
newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
3844
if test "$droppeddeps" = yes; then
3845
if test "$module" = yes; then
3847
$echo "*** Warning: libtool could not satisfy all declared inter-library"
3848
$echo "*** dependencies of module $libname. Therefore, libtool will create"
3849
$echo "*** a static module, that should work as long as the dlopening"
3850
$echo "*** application is linked with the -dlopen flag."
3851
if test -z "$global_symbol_pipe"; then
3853
$echo "*** However, this would only work if libtool was able to extract symbol"
3854
$echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
3855
$echo "*** not find such a program. So, this module is probably useless."
3856
$echo "*** \`nm' from GNU binutils and a full rebuild may help."
3858
if test "$build_old_libs" = no; then
3859
oldlibs="$output_objdir/$libname.$libext"
3860
build_libtool_libs=module
3863
build_libtool_libs=no
3866
$echo "*** The inter-library dependencies that have been dropped here will be"
3867
$echo "*** automatically added whenever a program is linked with this library"
3868
$echo "*** or is declared to -dlopen it."
3870
if test "$allow_undefined" = no; then
3872
$echo "*** Since this library must not contain undefined symbols,"
3873
$echo "*** because either the platform does not support them or"
3874
$echo "*** it was explicitly requested with -no-undefined,"
3875
$echo "*** libtool will only create a static version of it."
3876
if test "$build_old_libs" = no; then
3877
oldlibs="$output_objdir/$libname.$libext"
3878
build_libtool_libs=module
3881
build_libtool_libs=no
3886
# Done checking deplibs!
3890
# All the library-specific variables (install_libdir is set above).
3895
# Test again, we may have decided not to build it any more
3896
if test "$build_libtool_libs" = yes; then
3897
if test "$hardcode_into_libs" = yes; then
3898
# Hardcode the library paths
3901
rpath="$finalize_rpath"
3902
test "$mode" != relink && rpath="$compile_rpath$rpath"
3903
for libdir in $rpath; do
3904
if test -n "$hardcode_libdir_flag_spec"; then
3905
if test -n "$hardcode_libdir_separator"; then
3906
if test -z "$hardcode_libdirs"; then
3907
hardcode_libdirs="$libdir"
3909
# Just accumulate the unique libdirs.
3910
case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
3911
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3914
hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3919
eval flag=\"$hardcode_libdir_flag_spec\"
3920
dep_rpath="$dep_rpath $flag"
3922
elif test -n "$runpath_var"; then
3923
case "$perm_rpath " in
3925
*) perm_rpath="$perm_rpath $libdir" ;;
3929
# Substitute the hardcoded libdirs into the rpath.
3930
if test -n "$hardcode_libdir_separator" &&
3931
test -n "$hardcode_libdirs"; then
3932
libdir="$hardcode_libdirs"
3933
if test -n "$hardcode_libdir_flag_spec_ld"; then
3934
eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
3936
eval dep_rpath=\"$hardcode_libdir_flag_spec\"
3939
if test -n "$runpath_var" && test -n "$perm_rpath"; then
3940
# We should set the runpath_var.
3942
for dir in $perm_rpath; do
3945
eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
3947
test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
3950
shlibpath="$finalize_shlibpath"
3951
test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
3952
if test -n "$shlibpath"; then
3953
eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
3956
# Get the real and link names of the library.
3957
eval shared_ext=\"$shrext_cmds\"
3958
eval library_names=\"$library_names_spec\"
3959
set dummy $library_names
3963
if test -n "$soname_spec"; then
3964
eval soname=\"$soname_spec\"
3968
if test -z "$dlname"; then
3972
lib="$output_objdir/$realname"
3975
linknames="$linknames $link"
3978
# Use standard objects if they are pic
3979
test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3981
# Prepare the list of exported symbols
3982
if test -z "$export_symbols"; then
3983
if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
3984
$show "generating symbol list for \`$libname.la'"
3985
export_symbols="$output_objdir/$libname.exp"
3986
$run $rm $export_symbols
3987
cmds=$export_symbols_cmds
3988
save_ifs="$IFS"; IFS='~'
3989
for cmd in $cmds; do
3992
if len=`expr "X$cmd" : ".*"` &&
3993
test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
3995
$run eval "$cmd" || exit $?
3996
skipped_export=false
3998
# The command line is too long to execute in one step.
3999
$show "using reloadable object file for export list..."
4004
if test -n "$export_symbols_regex"; then
4005
$show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
4006
$run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
4007
$show "$mv \"${export_symbols}T\" \"$export_symbols\""
4008
$run eval '$mv "${export_symbols}T" "$export_symbols"'
4013
if test -n "$export_symbols" && test -n "$include_expsyms"; then
4014
$run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
4019
for test_deplib in $deplibs; do
4020
case " $convenience " in
4021
*" $test_deplib "*) ;;
4023
if test -n "$inst_prefix_dir" && (echo "$test_deplib" | grep -- "$inst_prefix_dir" >/dev/null); then
4024
inst_prefix_arg="$test_deplib"
4026
tmp_deplibs="$tmp_deplibs $test_deplib"
4031
deplibs="$tmp_deplibs"
4032
if test -n "$inst_prefix_arg"; then
4033
deplibs="$inst_prefix_arg $deplibs"
4036
if test -n "$convenience"; then
4037
if test -n "$whole_archive_flag_spec"; then
4038
save_libobjs=$libobjs
4039
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4041
gentop="$output_objdir/${outputname}x"
4042
$show "${rm}r $gentop"
4043
$run ${rm}r "$gentop"
4044
$show "$mkdir $gentop"
4045
$run $mkdir "$gentop"
4047
if test "$status" -ne 0 && test ! -d "$gentop"; then
4050
generated="$generated $gentop"
4052
for xlib in $convenience; do
4053
# Extract the objects.
4055
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
4056
*) xabs=`pwd`"/$xlib" ;;
4058
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
4059
xdir="$gentop/$xlib"
4061
$show "${rm}r $xdir"
4063
$show "$mkdir $xdir"
4066
if test "$status" -ne 0 && test ! -d "$xdir"; then
4069
# We will extract separately just the conflicting names and we will no
4070
# longer touch any unique names. It is faster to leave these extract
4071
# automatically by $AR in one run.
4072
$show "(cd $xdir && $AR x $xabs)"
4073
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
4074
if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
4077
$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
4078
$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
4079
$AR t "$xabs" | sort | uniq -cd | while read -r count name
4082
while test "$i" -le "$count"
4084
# Put our $i before any first dot (extension)
4085
# Never overwrite any file
4087
while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
4089
name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
4091
$show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
4092
$run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
4098
libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
4103
if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
4104
eval flag=\"$thread_safe_flag_spec\"
4105
linker_flags="$linker_flags $flag"
4108
# Make a backup of the uninstalled library when relinking
4109
if test "$mode" = relink; then
4110
$run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
4113
# Do each of the archive commands.
4114
if test "$module" = yes && test -n "$module_cmds" ; then
4115
if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4116
eval test_cmds=\"$module_expsym_cmds\"
4117
cmds=$module_expsym_cmds
4119
eval test_cmds=\"$module_cmds\"
4123
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4124
eval test_cmds=\"$archive_expsym_cmds\"
4125
cmds=$archive_expsym_cmds
4127
eval test_cmds=\"$archive_cmds\"
4132
if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
4133
test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
4136
# The command line is too long to link in one step, link piecewise.
4137
$echo "creating reloadable object files..."
4139
# Save the value of $output and $libobjs because we want to
4140
# use them later. If we have whole_archive_flag_spec, we
4141
# want to use save_libobjs as it was before
4142
# whole_archive_flag_spec was expanded, because we can't
4143
# assume the linker understands whole_archive_flag_spec.
4144
# This may have to be revisited, in case too many
4145
# convenience libraries get linked in and end up exceeding
4147
if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
4148
save_libobjs=$libobjs
4152
# Clear the reloadable object creation command queue and
4153
# initialize k to one.
4160
output=$output_objdir/$save_output-${k}.$objext
4161
# Loop over the list of objects to be linked.
4162
for obj in $save_libobjs
4164
eval test_cmds=\"$reload_cmds $objlist $last_robj\"
4165
if test "X$objlist" = X ||
4166
{ len=`expr "X$test_cmds" : ".*"` &&
4167
test "$len" -le "$max_cmd_len"; }; then
4168
objlist="$objlist $obj"
4170
# The command $test_cmds is almost too long, add a
4171
# command to the queue.
4172
if test "$k" -eq 1 ; then
4173
# The first file doesn't have a previous command to add.
4174
eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
4176
# All subsequent reloadable object files will link in
4177
# the last one created.
4178
eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
4180
last_robj=$output_objdir/$save_output-${k}.$objext
4182
output=$output_objdir/$save_output-${k}.$objext
4187
# Handle the remaining objects by creating one last
4188
# reloadable object file. All subsequent reloadable object
4189
# files will link in the last one created.
4190
test -z "$concat_cmds" || concat_cmds=$concat_cmds~
4191
eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
4193
if ${skipped_export-false}; then
4194
$show "generating symbol list for \`$libname.la'"
4195
export_symbols="$output_objdir/$libname.exp"
4196
$run $rm $export_symbols
4198
# Append the command to create the export file.
4199
eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
4202
# Set up a command to remove the reloadale object files
4203
# after they are used.
4205
while test "$i" -lt "$k"
4208
delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
4211
$echo "creating a temporary reloadable object file: $output"
4213
# Loop through the commands generated above and execute them.
4214
save_ifs="$IFS"; IFS='~'
4215
for cmd in $concat_cmds; do
4218
$run eval "$cmd" || exit $?
4223
# Restore the value of output.
4226
if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
4227
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
4229
# Expand the library linking commands again to reset the
4230
# value of $libobjs for piecewise linking.
4232
# Do each of the archive commands.
4233
if test "$module" = yes && test -n "$module_cmds" ; then
4234
if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
4235
cmds=$module_expsym_cmds
4240
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
4241
cmds=$archive_expsym_cmds
4247
# Append the command to remove the reloadable object files
4248
# to the just-reset $cmds.
4249
eval cmds=\"\$cmds~\$rm $delfiles\"
4251
save_ifs="$IFS"; IFS='~'
4252
for cmd in $cmds; do
4256
$run eval "$cmd" || exit $?
4260
# Restore the uninstalled library and exit
4261
if test "$mode" = relink; then
4262
$run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
4266
# Create links to the real library.
4267
for linkname in $linknames; do
4268
if test "$realname" != "$linkname"; then
4269
$show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
4270
$run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
4274
# If -module or -export-dynamic was specified, set the dlname.
4275
if test "$module" = yes || test "$export_dynamic" = yes; then
4276
# On all known operating systems, these are identical.
4283
if test -n "$deplibs"; then
4284
$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
4287
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4288
$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
4291
if test -n "$rpath"; then
4292
$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
4295
if test -n "$xrpath"; then
4296
$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
4299
if test -n "$vinfo"; then
4300
$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
4303
if test -n "$release"; then
4304
$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
4309
if test -n "$objs$old_deplibs"; then
4310
$echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
4314
obj=`$echo "X$output" | $Xsed -e "$lo2o"`
4322
# Delete the old objects.
4323
$run $rm $obj $libobj
4325
# Objects from convenience libraries. This assumes
4326
# single-version convenience libraries. Whenever we create
4327
# different ones for PIC/non-PIC, this we'll have to duplicate
4331
# reload_cmds runs $LD directly, so let us get rid of
4332
# -Wl from whole_archive_flag_spec
4335
if test -n "$convenience"; then
4336
if test -n "$whole_archive_flag_spec"; then
4337
eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
4339
gentop="$output_objdir/${obj}x"
4340
$show "${rm}r $gentop"
4341
$run ${rm}r "$gentop"
4342
$show "$mkdir $gentop"
4343
$run $mkdir "$gentop"
4345
if test "$status" -ne 0 && test ! -d "$gentop"; then
4348
generated="$generated $gentop"
4350
for xlib in $convenience; do
4351
# Extract the objects.
4353
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
4354
*) xabs=`pwd`"/$xlib" ;;
4356
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
4357
xdir="$gentop/$xlib"
4359
$show "${rm}r $xdir"
4361
$show "$mkdir $xdir"
4364
if test "$status" -ne 0 && test ! -d "$xdir"; then
4367
# We will extract separately just the conflicting names and we will no
4368
# longer touch any unique names. It is faster to leave these extract
4369
# automatically by $AR in one run.
4370
$show "(cd $xdir && $AR x $xabs)"
4371
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
4372
if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
4375
$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
4376
$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
4377
$AR t "$xabs" | sort | uniq -cd | while read -r count name
4380
while test "$i" -le "$count"
4382
# Put our $i before any first dot (extension)
4383
# Never overwrite any file
4385
while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
4387
name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
4389
$show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
4390
$run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
4396
reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
4401
# Create the old-style object.
4402
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
4406
save_ifs="$IFS"; IFS='~'
4407
for cmd in $cmds; do
4411
$run eval "$cmd" || exit $?
4415
# Exit if we aren't doing a library object file.
4416
if test -z "$libobj"; then
4417
if test -n "$gentop"; then
4418
$show "${rm}r $gentop"
4425
if test "$build_libtool_libs" != yes; then
4426
if test -n "$gentop"; then
4427
$show "${rm}r $gentop"
4431
# Create an invalid libtool object if no PIC, so that we don't
4432
# accidentally link it into a program.
4433
# $show "echo timestamp > $libobj"
4434
# $run eval "echo timestamp > $libobj" || exit $?
4438
if test -n "$pic_flag" || test "$pic_mode" != default; then
4439
# Only do commands if we really have different PIC objects.
4440
reload_objs="$libobjs $reload_conv_objs"
4443
save_ifs="$IFS"; IFS='~'
4444
for cmd in $cmds; do
4448
$run eval "$cmd" || exit $?
4453
if test -n "$gentop"; then
4454
$show "${rm}r $gentop"
4463
*cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
4465
if test -n "$vinfo"; then
4466
$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
4469
if test -n "$release"; then
4470
$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
4473
if test "$preload" = yes; then
4474
if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
4475
test "$dlopen_self_static" = unknown; then
4476
$echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
4481
*-*-rhapsody* | *-*-darwin1.[012])
4482
# On Rhapsody replace the C library is the System framework
4483
compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4484
finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
4490
# Don't allow lazy linking, it breaks C++ global constructors
4491
if test "$tagname" = CXX ; then
4492
compile_command="$compile_command ${wl}-bind_at_load"
4493
finalize_command="$finalize_command ${wl}-bind_at_load"
4498
compile_command="$compile_command $compile_deplibs"
4499
finalize_command="$finalize_command $finalize_deplibs"
4501
if test -n "$rpath$xrpath"; then
4502
# If the user specified any rpath flags, then add them.
4503
for libdir in $rpath $xrpath; do
4504
# This is the magic to use -rpath.
4505
case "$finalize_rpath " in
4507
*) finalize_rpath="$finalize_rpath $libdir" ;;
4512
# Now hardcode the library paths
4515
for libdir in $compile_rpath $finalize_rpath; do
4516
if test -n "$hardcode_libdir_flag_spec"; then
4517
if test -n "$hardcode_libdir_separator"; then
4518
if test -z "$hardcode_libdirs"; then
4519
hardcode_libdirs="$libdir"
4521
# Just accumulate the unique libdirs.
4522
case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4523
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4526
hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4531
eval flag=\"$hardcode_libdir_flag_spec\"
4532
rpath="$rpath $flag"
4534
elif test -n "$runpath_var"; then
4535
case "$perm_rpath " in
4537
*) perm_rpath="$perm_rpath $libdir" ;;
4541
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
4542
case :$dllsearchpath: in
4544
*) dllsearchpath="$dllsearchpath:$libdir";;
4549
# Substitute the hardcoded libdirs into the rpath.
4550
if test -n "$hardcode_libdir_separator" &&
4551
test -n "$hardcode_libdirs"; then
4552
libdir="$hardcode_libdirs"
4553
eval rpath=\" $hardcode_libdir_flag_spec\"
4555
compile_rpath="$rpath"
4559
for libdir in $finalize_rpath; do
4560
if test -n "$hardcode_libdir_flag_spec"; then
4561
if test -n "$hardcode_libdir_separator"; then
4562
if test -z "$hardcode_libdirs"; then
4563
hardcode_libdirs="$libdir"
4565
# Just accumulate the unique libdirs.
4566
case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
4567
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
4570
hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
4575
eval flag=\"$hardcode_libdir_flag_spec\"
4576
rpath="$rpath $flag"
4578
elif test -n "$runpath_var"; then
4579
case "$finalize_perm_rpath " in
4581
*) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
4585
# Substitute the hardcoded libdirs into the rpath.
4586
if test -n "$hardcode_libdir_separator" &&
4587
test -n "$hardcode_libdirs"; then
4588
libdir="$hardcode_libdirs"
4589
eval rpath=\" $hardcode_libdir_flag_spec\"
4591
finalize_rpath="$rpath"
4593
if test -n "$libobjs" && test "$build_old_libs" = yes; then
4594
# Transform all the library objects into standard objects.
4595
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4596
finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4600
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
4601
if test -n "$NM" && test -n "$global_symbol_pipe"; then
4602
dlsyms="${outputname}S.c"
4604
$echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
4608
if test -n "$dlsyms"; then
4612
# Discover the nlist of each of the dlfiles.
4613
nlist="$output_objdir/${outputname}.nm"
4615
$show "$rm $nlist ${nlist}S ${nlist}T"
4616
$run $rm "$nlist" "${nlist}S" "${nlist}T"
4618
# Parse the name list into a source file.
4619
$show "creating $output_objdir/$dlsyms"
4621
test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
4622
/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
4623
/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
4629
/* Prevent the only kind of declaration conflicts we can make. */
4630
#define lt_preloaded_symbols some_other_symbol
4632
/* External symbol declarations for the compiler. */\
4635
if test "$dlself" = yes; then
4636
$show "generating symbol list for \`$output'"
4638
test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
4640
# Add our own program objects to the symbol list.
4641
progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
4642
for arg in $progfiles; do
4643
$show "extracting global C symbols from \`$arg'"
4644
$run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4647
if test -n "$exclude_expsyms"; then
4648
$run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
4649
$run eval '$mv "$nlist"T "$nlist"'
4652
if test -n "$export_symbols_regex"; then
4653
$run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
4654
$run eval '$mv "$nlist"T "$nlist"'
4657
# Prepare the list of exported symbols
4658
if test -z "$export_symbols"; then
4659
export_symbols="$output_objdir/$output.exp"
4660
$run $rm $export_symbols
4661
$run eval "${SED} -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
4663
$run eval "${SED} -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
4664
$run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
4665
$run eval 'mv "$nlist"T "$nlist"'
4669
for arg in $dlprefiles; do
4670
$show "extracting global C symbols from \`$arg'"
4671
name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
4672
$run eval '$echo ": $name " >> "$nlist"'
4673
$run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
4676
if test -z "$run"; then
4677
# Make sure we have at least an empty file.
4678
test -f "$nlist" || : > "$nlist"
4680
if test -n "$exclude_expsyms"; then
4681
$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
4682
$mv "$nlist"T "$nlist"
4685
# Try sorting and uniquifying the output.
4686
if grep -v "^: " < "$nlist" |
4687
if sort -k 3 </dev/null >/dev/null 2>&1; then
4692
uniq > "$nlist"S; then
4695
grep -v "^: " < "$nlist" > "$nlist"S
4698
if test -f "$nlist"S; then
4699
eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
4701
$echo '/* NONE */' >> "$output_objdir/$dlsyms"
4704
$echo >> "$output_objdir/$dlsyms" "\
4706
#undef lt_preloaded_symbols
4708
#if defined (__STDC__) && __STDC__
4709
# define lt_ptr void *
4711
# define lt_ptr char *
4715
/* The mapping between symbol names and symbols. */
4720
lt_preloaded_symbols[] =
4724
eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
4726
$echo >> "$output_objdir/$dlsyms" "\
4730
/* This works around a problem in FreeBSD linker */
4731
#ifdef FREEBSD_WORKAROUND
4732
static const void *lt_preloaded_setup() {
4733
return lt_preloaded_symbols;
4743
pic_flag_for_symtable=
4745
# compiling the symbol table file with pic_flag works around
4746
# a FreeBSD bug that causes programs to crash when -lm is
4747
# linked before any other PIC object. But we must not use
4748
# pic_flag when linking with -static. The problem exists in
4749
# FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
4750
*-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
4751
case "$compile_command " in
4753
*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
4756
case "$compile_command " in
4758
*) pic_flag_for_symtable=" $pic_flag";;
4762
# Now compile the dynamic symbol file.
4763
$show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
4764
$run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
4766
# Clean up the generated files.
4767
$show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
4768
$run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
4770
# Transform the symbol file into the correct name.
4771
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4772
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
4775
$echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
4780
# We keep going just in case the user didn't refer to
4781
# lt_preloaded_symbols. The linker will fail if global_symbol_pipe
4782
# really was required.
4784
# Nullify the symbol file.
4785
compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
4786
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
4789
if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
4790
# Replace the output file specification.
4791
compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4792
link_command="$compile_command$compile_rpath"
4794
# We have no uninstalled library dependencies, so finalize right now.
4795
$show "$link_command"
4796
$run eval "$link_command"
4799
# Delete the generated files.
4800
if test -n "$dlsyms"; then
4801
$show "$rm $output_objdir/${outputname}S.${objext}"
4802
$run $rm "$output_objdir/${outputname}S.${objext}"
4808
if test -n "$shlibpath_var"; then
4809
# We should set the shlibpath_var
4811
for dir in $temp_rpath; do
4813
[\\/]* | [A-Za-z]:[\\/]*)
4818
# Relative path: add a thisdir entry.
4819
rpath="$rpath\$thisdir/$dir:"
4826
if test -n "$compile_shlibpath$finalize_shlibpath"; then
4827
compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
4829
if test -n "$finalize_shlibpath"; then
4830
finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
4835
if test -n "$runpath_var"; then
4836
if test -n "$perm_rpath"; then
4837
# We should set the runpath_var.
4839
for dir in $perm_rpath; do
4842
compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
4844
if test -n "$finalize_perm_rpath"; then
4845
# We should set the runpath_var.
4847
for dir in $finalize_perm_rpath; do
4850
finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
4854
if test "$no_install" = yes; then
4855
# We don't need to create a wrapper script.
4856
link_command="$compile_var$compile_command$compile_rpath"
4857
# Replace the output file specification.
4858
link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
4859
# Delete the old output file.
4861
# Link the executable and exit
4862
$show "$link_command"
4863
$run eval "$link_command" || exit $?
4867
if test "$hardcode_action" = relink; then
4868
# Fast installation is not supported
4869
link_command="$compile_var$compile_command$compile_rpath"
4870
relink_command="$finalize_var$finalize_command$finalize_rpath"
4872
$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
4873
$echo "$modename: \`$output' will be relinked during installation" 1>&2
4875
if test "$fast_install" != no; then
4876
link_command="$finalize_var$compile_command$finalize_rpath"
4877
if test "$fast_install" = yes; then
4878
relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
4880
# fast_install is set to needless
4884
link_command="$compile_var$compile_command$compile_rpath"
4885
relink_command="$finalize_var$finalize_command$finalize_rpath"
4889
# Replace the output file specification.
4890
link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
4892
# Delete the old output files.
4893
$run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
4895
$show "$link_command"
4896
$run eval "$link_command" || exit $?
4898
# Now create the wrapper script.
4899
$show "creating $output"
4901
# Quote the relink command for shipping.
4902
if test -n "$relink_command"; then
4903
# Preserve any variables that may affect compiler behavior
4904
for var in $variables_saved_for_relink; do
4905
if eval test -z \"\${$var+set}\"; then
4906
relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
4907
elif eval var_value=\$$var; test -z "$var_value"; then
4908
relink_command="$var=; export $var; $relink_command"
4910
var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
4911
relink_command="$var=\"$var_value\"; export $var; $relink_command"
4914
relink_command="(cd `pwd`; $relink_command)"
4915
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
4918
# Quote $echo for shipping.
4919
if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
4921
[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
4922
*) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
4924
qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
4926
qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
4929
# Only actually do things if our run command is non-null.
4930
if test -z "$run"; then
4931
# win32 will think the script is a binary if it has
4932
# a .exe suffix, so we strip it off here.
4934
*.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
4936
# test for cygwin because mv fails w/o .exe extensions
4940
outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
4944
*cygwin* | *mingw* )
4945
cwrappersource=`$echo ${objdir}/lt-${output}.c`
4946
cwrapper=`$echo ${output}.exe`
4947
$rm $cwrappersource $cwrapper
4948
trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
4950
cat > $cwrappersource <<EOF
4952
/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
4953
Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
4955
The $output program cannot be directly executed until all the libtool
4956
libraries that it depends on are installed.
4958
This wrapper executable should never be moved out of the build directory.
4959
If it is, it will not operate correctly.
4961
Currently, it simply execs the wrapper *script* "/bin/sh $output",
4962
but could eventually absorb all of the scripts functionality and
4963
exec $objdir/$outputname directly.
4966
cat >> $cwrappersource<<"EOF"
4974
#if defined(PATH_MAX)
4975
# define LT_PATHMAX PATH_MAX
4976
#elif defined(MAXPATHLEN)
4977
# define LT_PATHMAX MAXPATHLEN
4979
# define LT_PATHMAX 1024
4982
#ifndef DIR_SEPARATOR
4983
#define DIR_SEPARATOR '/'
4986
#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
4988
#define HAVE_DOS_BASED_FILE_SYSTEM
4989
#ifndef DIR_SEPARATOR_2
4990
#define DIR_SEPARATOR_2 '\\'
4994
#ifndef DIR_SEPARATOR_2
4995
# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
4996
#else /* DIR_SEPARATOR_2 */
4997
# define IS_DIR_SEPARATOR(ch) \
4998
(((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
4999
#endif /* DIR_SEPARATOR_2 */
5001
#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
5002
#define XFREE(stale) do { \
5003
if (stale) { free ((void *) stale); stale = 0; } \
5006
const char *program_name = NULL;
5008
void * xmalloc (size_t num);
5009
char * xstrdup (const char *string);
5010
char * basename (const char *name);
5011
char * fnqualify(const char *path);
5012
char * strendzap(char *str, const char *pat);
5013
void lt_fatal (const char *message, ...);
5016
main (int argc, char *argv[])
5021
program_name = (char *) xstrdup ((char *) basename (argv[0]));
5022
newargz = XMALLOC(char *, argc+2);
5025
cat >> $cwrappersource <<EOF
5026
newargz[0] = "$SHELL";
5029
cat >> $cwrappersource <<"EOF"
5030
newargz[1] = fnqualify(argv[0]);
5031
/* we know the script has the same name, without the .exe */
5032
/* so make sure newargz[1] doesn't end in .exe */
5033
strendzap(newargz[1],".exe");
5034
for (i = 1; i < argc; i++)
5035
newargz[i+1] = xstrdup(argv[i]);
5036
newargz[argc+1] = NULL;
5039
cat >> $cwrappersource <<EOF
5040
execv("$SHELL",newargz);
5043
cat >> $cwrappersource <<"EOF"
5047
xmalloc (size_t num)
5049
void * p = (void *) malloc (num);
5051
lt_fatal ("Memory exhausted");
5057
xstrdup (const char *string)
5059
return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
5064
basename (const char *name)
5068
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5069
/* Skip over the disk name in MSDOS pathnames. */
5070
if (isalpha (name[0]) && name[1] == ':')
5074
for (base = name; *name; name++)
5075
if (IS_DIR_SEPARATOR (*name))
5077
return (char *) base;
5081
fnqualify(const char *path)
5085
char tmp[LT_PATHMAX + 1];
5087
assert(path != NULL);
5089
/* Is it qualified already? */
5090
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
5091
if (isalpha (path[0]) && path[1] == ':')
5092
return xstrdup (path);
5094
if (IS_DIR_SEPARATOR (path[0]))
5095
return xstrdup (path);
5097
/* prepend the current directory */
5098
/* doesn't handle '~' */
5099
if (getcwd (tmp, LT_PATHMAX) == NULL)
5100
lt_fatal ("getcwd failed");
5101
size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
5102
p = XMALLOC(char, size);
5103
sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
5108
strendzap(char *str, const char *pat)
5112
assert(str != NULL);
5113
assert(pat != NULL);
5116
patlen = strlen(pat);
5120
str += len - patlen;
5121
if (strcmp(str, pat) == 0)
5128
lt_error_core (int exit_status, const char * mode,
5129
const char * message, va_list ap)
5131
fprintf (stderr, "%s: %s: ", program_name, mode);
5132
vfprintf (stderr, message, ap);
5133
fprintf (stderr, ".\n");
5135
if (exit_status >= 0)
5140
lt_fatal (const char *message, ...)
5143
va_start (ap, message);
5144
lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
5148
# we should really use a build-platform specific compiler
5149
# here, but OTOH, the wrappers (shell script and this C one)
5150
# are only useful if you want to execute the "real" binary.
5151
# Since the "real" binary is built for $host, then this
5152
# wrapper might as well be built for $host, too.
5153
$run $LTCC -s -o $cwrapper $cwrappersource
5157
trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
5162
# $output - temporary wrapper script for $objdir/$outputname
5163
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5165
# The $output program cannot be directly executed until all the libtool
5166
# libraries that it depends on are installed.
5168
# This wrapper script should never be moved out of the build directory.
5169
# If it is, it will not operate correctly.
5171
# Sed substitution that helps us do robust quoting. It backslashifies
5172
# metacharacters that are still active within double-quoted strings.
5173
Xsed='${SED} -e 1s/^X//'
5174
sed_quote_subst='$sed_quote_subst'
5176
# The HP-UX ksh and POSIX shell print the target directory to stdout
5178
if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
5180
relink_command=\"$relink_command\"
5182
# This environment variable determines our operation mode.
5183
if test \"\$libtool_install_magic\" = \"$magic\"; then
5184
# install mode needs the following variable:
5185
notinst_deplibs='$notinst_deplibs'
5187
# When we are sourced in execute mode, \$file and \$echo are already set.
5188
if test \"\$libtool_execute_magic\" != \"$magic\"; then
5191
# Make sure echo works.
5192
if test \"X\$1\" = X--no-reexec; then
5193
# Discard the --no-reexec flag, and continue.
5195
elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
5196
# Yippee, \$echo works!
5199
# Restart under the correct shell, and then maybe \$echo will work.
5200
exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
5206
# Find the directory that this script lives in.
5207
thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
5208
test \"x\$thisdir\" = \"x\$file\" && thisdir=.
5210
# Follow symbolic links until we get to the real thisdir.
5211
file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
5212
while test -n \"\$file\"; do
5213
destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
5215
# If there was a directory component, then change thisdir.
5216
if test \"x\$destdir\" != \"x\$file\"; then
5217
case \"\$destdir\" in
5218
[\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
5219
*) thisdir=\"\$thisdir/\$destdir\" ;;
5223
file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
5224
file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
5227
# Try to get the absolute directory name.
5228
absdir=\`cd \"\$thisdir\" && pwd\`
5229
test -n \"\$absdir\" && thisdir=\"\$absdir\"
5232
if test "$fast_install" = yes; then
5234
program=lt-'$outputname'$exeext
5235
progdir=\"\$thisdir/$objdir\"
5237
if test ! -f \"\$progdir/\$program\" || \\
5238
{ file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
5239
test \"X\$file\" != \"X\$progdir/\$program\"; }; then
5241
file=\"\$\$-\$program\"
5243
if test ! -d \"\$progdir\"; then
5244
$mkdir \"\$progdir\"
5246
$rm \"\$progdir/\$file\"
5251
# relink executable if necessary
5252
if test -n \"\$relink_command\"; then
5253
if relink_command_output=\`eval \$relink_command 2>&1\`; then :
5255
$echo \"\$relink_command_output\" >&2
5256
$rm \"\$progdir/\$file\"
5261
$mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
5262
{ $rm \"\$progdir/\$program\";
5263
$mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
5264
$rm \"\$progdir/\$file\"
5268
program='$outputname'
5269
progdir=\"\$thisdir/$objdir\"
5275
if test -f \"\$progdir/\$program\"; then"
5277
# Export our shlibpath_var if we have one.
5278
if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
5280
# Add our own library path to $shlibpath_var
5281
$shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
5283
# Some systems cannot cope with colon-terminated $shlibpath_var
5284
# The second colon is a workaround for a bug in BeOS R4 sed
5285
$shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
5287
export $shlibpath_var
5291
# fixup the dll searchpath if we need to.
5292
if test -n "$dllsearchpath"; then
5294
# Add the dll search path components to the executable PATH
5295
PATH=$dllsearchpath:\$PATH
5300
if test \"\$libtool_execute_magic\" != \"$magic\"; then
5301
# Run the actual program with our arguments.
5304
# Backslashes separate directories on plain windows
5305
*-*-mingw | *-*-os2*)
5307
exec \$progdir\\\\\$program \${1+\"\$@\"}
5313
exec \$progdir/\$program \${1+\"\$@\"}
5318
\$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
5322
# The program doesn't exist.
5323
\$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
5324
\$echo \"This script is just a wrapper for \$program.\" 1>&2
5325
$echo \"See the $PACKAGE documentation for more information.\" 1>&2
5336
# See if we need to build an old-fashioned archive.
5337
for oldlib in $oldlibs; do
5339
if test "$build_libtool_libs" = convenience; then
5340
oldobjs="$libobjs_save"
5341
addlibs="$convenience"
5342
build_libtool_libs=no
5344
if test "$build_libtool_libs" = module; then
5345
oldobjs="$libobjs_save"
5346
build_libtool_libs=no
5348
oldobjs="$old_deplibs $non_pic_objects"
5350
addlibs="$old_convenience"
5353
if test -n "$addlibs"; then
5354
gentop="$output_objdir/${outputname}x"
5355
$show "${rm}r $gentop"
5356
$run ${rm}r "$gentop"
5357
$show "$mkdir $gentop"
5358
$run $mkdir "$gentop"
5360
if test "$status" -ne 0 && test ! -d "$gentop"; then
5363
generated="$generated $gentop"
5365
# Add in members from convenience archives.
5366
for xlib in $addlibs; do
5367
# Extract the objects.
5369
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
5370
*) xabs=`pwd`"/$xlib" ;;
5372
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
5373
xdir="$gentop/$xlib"
5375
$show "${rm}r $xdir"
5377
$show "$mkdir $xdir"
5380
if test "$status" -ne 0 && test ! -d "$xdir"; then
5383
# We will extract separately just the conflicting names and we will no
5384
# longer touch any unique names. It is faster to leave these extract
5385
# automatically by $AR in one run.
5386
$show "(cd $xdir && $AR x $xabs)"
5387
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
5388
if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
5391
$echo "$modename: warning: object name conflicts; renaming object files" 1>&2
5392
$echo "$modename: warning: to ensure that they will not overwrite" 1>&2
5393
$AR t "$xabs" | sort | uniq -cd | while read -r count name
5396
while test "$i" -le "$count"
5398
# Put our $i before any first dot (extension)
5399
# Never overwrite any file
5401
while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
5403
name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
5405
$show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
5406
$run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
5412
oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
5416
# Do each command in the archive commands.
5417
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
5418
cmds=$old_archive_from_new_cmds
5420
eval cmds=\"$old_archive_cmds\"
5422
if len=`expr "X$cmds" : ".*"` &&
5423
test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
5424
cmds=$old_archive_cmds
5426
# the command line is too long to link in one step, link in parts
5427
$echo "using piecewise archive linking..."
5432
save_oldobjs=$oldobjs
5433
# GNU ar 2.10+ was changed to match POSIX; thus no paths are
5434
# encoded into archives. This makes 'ar r' malfunction in
5435
# this piecewise linking case whenever conflicting object
5436
# names appear in distinct ar calls; check, warn and compensate.
5437
if (for obj in $save_oldobjs
5439
$echo "X$obj" | $Xsed -e 's%^.*/%%'
5440
done | sort | sort -uc >/dev/null 2>&1); then
5443
$echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
5444
$echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
5447
# Is there a better way of finding the last object in the list?
5448
for obj in $save_oldobjs
5452
for obj in $save_oldobjs
5454
oldobjs="$objlist $obj"
5455
objlist="$objlist $obj"
5456
eval test_cmds=\"$old_archive_cmds\"
5457
if len=`expr "X$test_cmds" : ".*"` &&
5458
test "$len" -le "$max_cmd_len"; then
5461
# the above command should be used before it gets too long
5463
if test "$obj" = "$last_oldobj" ; then
5466
test -z "$concat_cmds" || concat_cmds=$concat_cmds~
5467
eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
5473
if test "X$oldobjs" = "X" ; then
5474
eval cmds=\"\$concat_cmds\"
5476
eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
5480
save_ifs="$IFS"; IFS='~'
5481
for cmd in $cmds; do
5485
$run eval "$cmd" || exit $?
5490
if test -n "$generated"; then
5491
$show "${rm}r$generated"
5492
$run ${rm}r$generated
5495
# Now create the libtool archive.
5499
test "$build_old_libs" = yes && old_library="$libname.$libext"
5500
$show "creating $output"
5502
# Preserve any variables that may affect compiler behavior
5503
for var in $variables_saved_for_relink; do
5504
if eval test -z \"\${$var+set}\"; then
5505
relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
5506
elif eval var_value=\$$var; test -z "$var_value"; then
5507
relink_command="$var=; export $var; $relink_command"
5509
var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
5510
relink_command="$var=\"$var_value\"; export $var; $relink_command"
5513
# Quote the link command for shipping.
5514
relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
5515
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
5516
if test "$hardcode_automatic" = yes ; then
5521
# Only create the output if not a dry run.
5522
if test -z "$run"; then
5523
for installed in no yes; do
5524
if test "$installed" = yes; then
5525
if test -z "$install_libdir"; then
5528
output="$output_objdir/$outputname"i
5529
# Replace all uninstalled libtool libraries with the installed ones
5531
for deplib in $dependency_libs; do
5534
name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
5535
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
5536
if test -z "$libdir"; then
5537
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
5540
newdependency_libs="$newdependency_libs $libdir/$name"
5542
*) newdependency_libs="$newdependency_libs $deplib" ;;
5545
dependency_libs="$newdependency_libs"
5547
for lib in $dlfiles; do
5548
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5549
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5550
if test -z "$libdir"; then
5551
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5554
newdlfiles="$newdlfiles $libdir/$name"
5556
dlfiles="$newdlfiles"
5558
for lib in $dlprefiles; do
5559
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
5560
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
5561
if test -z "$libdir"; then
5562
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
5565
newdlprefiles="$newdlprefiles $libdir/$name"
5567
dlprefiles="$newdlprefiles"
5570
for lib in $dlfiles; do
5572
[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5573
*) abs=`pwd`"/$lib" ;;
5575
newdlfiles="$newdlfiles $abs"
5577
dlfiles="$newdlfiles"
5579
for lib in $dlprefiles; do
5581
[\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
5582
*) abs=`pwd`"/$lib" ;;
5584
newdlprefiles="$newdlprefiles $abs"
5586
dlprefiles="$newdlprefiles"
5589
# place dlname in correct position for cygwin
5591
case $host,$output,$installed,$module,$dlname in
5592
*cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
5595
# $outputname - a libtool library file
5596
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
5598
# Please DO NOT delete this file!
5599
# It is necessary for linking the library.
5601
# The name that we can dlopen(3).
5604
# Names of this library.
5605
library_names='$library_names'
5607
# The name of the static archive.
5608
old_library='$old_library'
5610
# Libraries that this one depends upon.
5611
dependency_libs='$dependency_libs'
5613
# Version information for $libname.
5618
# Is this an already installed library?
5619
installed=$installed
5621
# Should we warn about portability when linking against -modules?
5622
shouldnotlink=$module
5624
# Files to dlopen/dlpreopen
5626
dlpreopen='$dlprefiles'
5628
# Directory that this library needs to be installed in:
5629
libdir='$install_libdir'"
5630
if test "$installed" = no && test "$need_relink" = yes; then
5632
relink_command=\"$relink_command\""
5637
# Do a symbolic link so that the libtool archive can be found in
5638
# LD_LIBRARY_PATH before the program is installed.
5639
$show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
5640
$run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
5646
# libtool install mode
5648
modename="$modename: install"
5650
# There may be an optional sh(1) argument at the beginning of
5651
# install_prog (especially on Windows NT).
5652
if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
5653
# Allow the use of GNU shtool's install command.
5654
$echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
5655
# Aesthetically quote it.
5656
arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
5658
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5662
install_prog="$arg "
5670
# The real first argument should be the name of the installation program.
5671
# Aesthetically quote it.
5672
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5674
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5678
install_prog="$install_prog$arg"
5680
# We need to accept at least all the BSD install flags.
5690
if test -n "$dest"; then
5691
files="$files $dest"
5709
# If the previous option needed an argument, then skip it.
5710
if test -n "$prev"; then
5719
# Aesthetically quote the argument.
5720
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
5722
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
5726
install_prog="$install_prog $arg"
5729
if test -z "$install_prog"; then
5730
$echo "$modename: you must specify an install program" 1>&2
5735
if test -n "$prev"; then
5736
$echo "$modename: the \`$prev' option requires an argument" 1>&2
5741
if test -z "$files"; then
5742
if test -z "$dest"; then
5743
$echo "$modename: no file or destination specified" 1>&2
5745
$echo "$modename: you must specify a destination" 1>&2
5751
# Strip any trailing slash from the destination.
5752
dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
5754
# Check to see that the destination is a directory.
5755
test -d "$dest" && isdir=yes
5756
if test "$isdir" = yes; then
5760
destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
5761
test "X$destdir" = "X$dest" && destdir=.
5762
destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
5764
# Not a directory, so check to see that there is only one file specified.
5766
if test "$#" -gt 2; then
5767
$echo "$modename: \`$dest' is not a directory" 1>&2
5773
[\\/]* | [A-Za-z]:[\\/]*) ;;
5775
for file in $files; do
5779
$echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
5788
# This variable tells wrapper scripts just to set variables rather
5789
# than running their programs.
5790
libtool_install_magic="$magic"
5795
for file in $files; do
5797
# Do each installation.
5800
# Do the static libraries later.
5801
staticlibs="$staticlibs $file"
5805
# Check to see that this really is a libtool archive.
5806
if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
5808
$echo "$modename: \`$file' is not a valid libtool archive" 1>&2
5816
# If there is no directory component, then add one.
5818
*/* | *\\*) . $file ;;
5822
# Add the libdir to current_libdirs if it is the destination.
5823
if test "X$destdir" = "X$libdir"; then
5824
case "$current_libdirs " in
5826
*) current_libdirs="$current_libdirs $libdir" ;;
5829
# Note the libdir as a future libdir.
5830
case "$future_libdirs " in
5832
*) future_libdirs="$future_libdirs $libdir" ;;
5836
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
5837
test "X$dir" = "X$file/" && dir=
5840
if test -n "$relink_command"; then
5841
# Determine the prefix the user has applied to our future dir.
5842
inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
5844
# Don't allow the user to place us outside of our expected
5845
# location b/c this prevents finding dependent libraries that
5846
# are installed to the same prefix.
5847
# At present, this check doesn't affect windows .dll's that
5848
# are installed into $libdir/../bin (currently, that works fine)
5849
# but it's something to keep an eye on.
5850
if test "$inst_prefix_dir" = "$destdir"; then
5851
$echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
5855
if test -n "$inst_prefix_dir"; then
5856
# Stick the inst_prefix_dir data into the link command.
5857
relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
5859
relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
5862
$echo "$modename: warning: relinking \`$file'" 1>&2
5863
$show "$relink_command"
5864
if $run eval "$relink_command"; then :
5866
$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
5871
# See the names of the shared library.
5872
set dummy $library_names
5873
if test -n "$2"; then
5879
test -n "$relink_command" && srcname="$realname"T
5881
# Install the shared library and build the symlinks.
5882
$show "$install_prog $dir/$srcname $destdir/$realname"
5883
$run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
5884
if test -n "$stripme" && test -n "$striplib"; then
5885
$show "$striplib $destdir/$realname"
5886
$run eval "$striplib $destdir/$realname" || exit $?
5889
if test "$#" -gt 0; then
5890
# Delete the old symlinks, and create new ones.
5893
if test "$linkname" != "$realname"; then
5894
$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5895
$run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
5900
# Do each command in the postinstall commands.
5901
lib="$destdir/$realname"
5902
cmds=$postinstall_cmds
5903
save_ifs="$IFS"; IFS='~'
5904
for cmd in $cmds; do
5908
$run eval "$cmd" || exit $?
5913
# Install the pseudo-library for information purposes.
5914
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5915
instname="$dir/$name"i
5916
$show "$install_prog $instname $destdir/$name"
5917
$run eval "$install_prog $instname $destdir/$name" || exit $?
5919
# Maybe install the static library, too.
5920
test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
5924
# Install (i.e. copy) a libtool object.
5926
# Figure out destination file name, if it wasn't already specified.
5927
if test -n "$destname"; then
5928
destfile="$destdir/$destname"
5930
destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5931
destfile="$destdir/$destfile"
5934
# Deduce the name of the destination old-style object file.
5937
staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
5940
staticdest="$destfile"
5944
$echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
5950
# Install the libtool object if requested.
5951
if test -n "$destfile"; then
5952
$show "$install_prog $file $destfile"
5953
$run eval "$install_prog $file $destfile" || exit $?
5956
# Install the old object if enabled.
5957
if test "$build_old_libs" = yes; then
5958
# Deduce the name of the old-style object file.
5959
staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
5961
$show "$install_prog $staticobj $staticdest"
5962
$run eval "$install_prog \$staticobj \$staticdest" || exit $?
5968
# Figure out destination file name, if it wasn't already specified.
5969
if test -n "$destname"; then
5970
destfile="$destdir/$destname"
5972
destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
5973
destfile="$destdir/$destfile"
5976
# If the file is missing, and there is a .exe on the end, strip it
5977
# because it is most likely a libtool script we actually want to
5982
if test ! -f "$file"; then
5983
file=`$echo $file|${SED} 's,.exe$,,'`
5989
# Do a test to see if this is really a libtool program.
5992
wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
5998
if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
6002
# To insure that "foo" is sourced, and not "foo.exe",
6003
# finese the cygwin/MSYS system by explicitly sourcing "foo."
6004
# which disallows the automatic-append-.exe behavior.
6006
*cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
6007
*) wrapperdot=${wrapper} ;;
6009
# If there is no directory component, then add one.
6011
*/* | *\\*) . ${wrapperdot} ;;
6012
*) . ./${wrapperdot} ;;
6015
# Check the variables that should have been set.
6016
if test -z "$notinst_deplibs"; then
6017
$echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
6022
for lib in $notinst_deplibs; do
6023
# Check to see that each library is installed.
6025
if test -f "$lib"; then
6026
# If there is no directory component, then add one.
6028
*/* | *\\*) . $lib ;;
6032
libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
6033
if test -n "$libdir" && test ! -f "$libfile"; then
6034
$echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
6040
# To insure that "foo" is sourced, and not "foo.exe",
6041
# finese the cygwin/MSYS system by explicitly sourcing "foo."
6042
# which disallows the automatic-append-.exe behavior.
6044
*cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
6045
*) wrapperdot=${wrapper} ;;
6047
# If there is no directory component, then add one.
6049
*/* | *\\*) . ${wrapperdot} ;;
6050
*) . ./${wrapperdot} ;;
6054
if test "$fast_install" = no && test -n "$relink_command"; then
6055
if test "$finalize" = yes && test -z "$run"; then
6057
test -n "$TMPDIR" && tmpdir="$TMPDIR"
6058
tmpdir="$tmpdir/libtool-$$"
6061
if $mkdir "$tmpdir"; then
6065
$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
6068
file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
6069
outputname="$tmpdir/$file"
6070
# Replace the output file specification.
6071
relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
6073
$show "$relink_command"
6074
if $run eval "$relink_command"; then :
6076
$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
6082
$echo "$modename: warning: cannot relink \`$file'" 1>&2
6085
# Install the binary that we compiled earlier.
6086
file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
6090
# remove .exe since cygwin /usr/bin/install will append another
6092
case $install_prog,$host in
6093
*/usr/bin/install*,*cygwin*)
6094
case $file:$destfile in
6099
destfile=$destfile.exe
6102
destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
6107
$show "$install_prog$stripme $file $destfile"
6108
$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
6109
test -n "$outputname" && ${rm}r "$tmpdir"
6114
for file in $staticlibs; do
6115
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6117
# Set up the ranlib parameters.
6118
oldlib="$destdir/$name"
6120
$show "$install_prog $file $oldlib"
6121
$run eval "$install_prog \$file \$oldlib" || exit $?
6123
if test -n "$stripme" && test -n "$old_striplib"; then
6124
$show "$old_striplib $oldlib"
6125
$run eval "$old_striplib $oldlib" || exit $?
6128
# Do each command in the postinstall commands.
6129
cmds=$old_postinstall_cmds
6130
save_ifs="$IFS"; IFS='~'
6131
for cmd in $cmds; do
6135
$run eval "$cmd" || exit $?
6140
if test -n "$future_libdirs"; then
6141
$echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
6144
if test -n "$current_libdirs"; then
6145
# Maybe just do a dry run.
6146
test -n "$run" && current_libdirs=" -n$current_libdirs"
6147
exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
6153
# libtool finish mode
6155
modename="$modename: finish"
6159
if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
6162
libdirs="$libdirs $dir"
6165
for libdir in $libdirs; do
6166
if test -n "$finish_cmds"; then
6167
# Do each command in the finish commands.
6169
save_ifs="$IFS"; IFS='~'
6170
for cmd in $cmds; do
6174
$run eval "$cmd" || admincmds="$admincmds
6179
if test -n "$finish_eval"; then
6180
# Do the single finish_eval.
6181
eval cmds=\"$finish_eval\"
6182
$run eval "$cmds" || admincmds="$admincmds
6188
# Exit here if they wanted silent mode.
6189
test "$show" = : && exit $EXIT_SUCCESS
6191
$echo "----------------------------------------------------------------------"
6192
$echo "Libraries have been installed in:"
6193
for libdir in $libdirs; do
6197
$echo "If you ever happen to want to link against installed libraries"
6198
$echo "in a given directory, LIBDIR, you must either use libtool, and"
6199
$echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
6200
$echo "flag during linking and do at least one of the following:"
6201
if test -n "$shlibpath_var"; then
6202
$echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
6203
$echo " during execution"
6205
if test -n "$runpath_var"; then
6206
$echo " - add LIBDIR to the \`$runpath_var' environment variable"
6207
$echo " during linking"
6209
if test -n "$hardcode_libdir_flag_spec"; then
6211
eval flag=\"$hardcode_libdir_flag_spec\"
6213
$echo " - use the \`$flag' linker flag"
6215
if test -n "$admincmds"; then
6216
$echo " - have your system administrator run these commands:$admincmds"
6218
if test -f /etc/ld.so.conf; then
6219
$echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
6222
$echo "See any operating system documentation about shared libraries for"
6223
$echo "more information, such as the ld(1) and ld.so(8) manual pages."
6224
$echo "----------------------------------------------------------------------"
6228
# libtool execute mode
6230
modename="$modename: execute"
6232
# The first argument is the command name.
6234
if test -z "$cmd"; then
6235
$echo "$modename: you must specify a COMMAND" 1>&2
6240
# Handle -dlopen flags immediately.
6241
for file in $execute_dlfiles; do
6242
if test ! -f "$file"; then
6243
$echo "$modename: \`$file' is not a file" 1>&2
6251
# Check to see that this really is a libtool archive.
6252
if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
6254
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
6259
# Read the libtool library.
6263
# If there is no directory component, then add one.
6265
*/* | *\\*) . $file ;;
6269
# Skip this library if it cannot be dlopened.
6270
if test -z "$dlname"; then
6271
# Warn if it was a shared library.
6272
test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
6276
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6277
test "X$dir" = "X$file" && dir=.
6279
if test -f "$dir/$objdir/$dlname"; then
6282
$echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
6288
# Just add the directory containing the .lo file.
6289
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6290
test "X$dir" = "X$file" && dir=.
6294
$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
6299
# Get the absolute pathname.
6300
absdir=`cd "$dir" && pwd`
6301
test -n "$absdir" && dir="$absdir"
6303
# Now add the directory to shlibpath_var.
6304
if eval "test -z \"\$$shlibpath_var\""; then
6305
eval "$shlibpath_var=\"\$dir\""
6307
eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
6311
# This variable tells wrapper scripts just to set shlibpath_var
6312
# rather than running their programs.
6313
libtool_execute_magic="$magic"
6315
# Check if any of the arguments is a wrapper script.
6322
# Do a test to see if this is really a libtool program.
6323
if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6324
# If there is no directory component, then add one.
6326
*/* | *\\*) . $file ;;
6330
# Transform arg to wrapped name.
6331
file="$progdir/$program"
6335
# Quote arguments (to preserve shell metacharacters).
6336
file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
6337
args="$args \"$file\""
6340
if test -z "$run"; then
6341
if test -n "$shlibpath_var"; then
6342
# Export the shlibpath_var.
6343
eval "export $shlibpath_var"
6346
# Restore saved environment variables
6347
if test "${save_LC_ALL+set}" = set; then
6348
LC_ALL="$save_LC_ALL"; export LC_ALL
6350
if test "${save_LANG+set}" = set; then
6351
LANG="$save_LANG"; export LANG
6354
# Now prepare to actually exec the command.
6355
exec_cmd="\$cmd$args"
6357
# Display what would be done.
6358
if test -n "$shlibpath_var"; then
6359
eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
6360
$echo "export $shlibpath_var"
6367
# libtool clean and uninstall mode
6369
modename="$modename: $mode"
6375
# This variable tells wrapper scripts just to set variables rather
6376
# than running their programs.
6377
libtool_install_magic="$magic"
6382
-f) rm="$rm $arg"; rmforce=yes ;;
6383
-*) rm="$rm $arg" ;;
6384
*) files="$files $arg" ;;
6388
if test -z "$rm"; then
6389
$echo "$modename: you must specify an RM program" 1>&2
6396
origobjdir="$objdir"
6397
for file in $files; do
6398
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
6399
if test "X$dir" = "X$file"; then
6401
objdir="$origobjdir"
6403
objdir="$dir/$origobjdir"
6405
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
6406
test "$mode" = uninstall && objdir="$dir"
6408
# Remember objdir for removal later, being careful to avoid duplicates
6409
if test "$mode" = clean; then
6412
*) rmdirs="$rmdirs $objdir" ;;
6416
# Don't error if the file doesn't exist and rm -f was used.
6417
if (test -L "$file") >/dev/null 2>&1 \
6418
|| (test -h "$file") >/dev/null 2>&1 \
6419
|| test -f "$file"; then
6421
elif test -d "$file"; then
6424
elif test "$rmforce" = yes; then
6432
# Possibly a libtool archive, so verify it.
6433
if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6436
# Delete the libtool libraries and symlinks.
6437
for n in $library_names; do
6438
rmfiles="$rmfiles $objdir/$n"
6440
test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
6441
test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
6443
if test "$mode" = uninstall; then
6444
if test -n "$library_names"; then
6445
# Do each command in the postuninstall commands.
6446
cmds=$postuninstall_cmds
6447
save_ifs="$IFS"; IFS='~'
6448
for cmd in $cmds; do
6453
if test "$?" -ne 0 && test "$rmforce" != yes; then
6460
if test -n "$old_library"; then
6461
# Do each command in the old_postuninstall commands.
6462
cmds=$old_postuninstall_cmds
6463
save_ifs="$IFS"; IFS='~'
6464
for cmd in $cmds; do
6469
if test "$?" -ne 0 && test "$rmforce" != yes; then
6475
# FIXME: should reinstall the best remaining shared library.
6481
# Possibly a libtool object, so verify it.
6482
if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6487
# Add PIC object to the list of files to remove.
6488
if test -n "$pic_object" \
6489
&& test "$pic_object" != none; then
6490
rmfiles="$rmfiles $dir/$pic_object"
6493
# Add non-PIC object to the list of files to remove.
6494
if test -n "$non_pic_object" \
6495
&& test "$non_pic_object" != none; then
6496
rmfiles="$rmfiles $dir/$non_pic_object"
6502
if test "$mode" = clean ; then
6506
file=`$echo $file|${SED} 's,.exe$,,'`
6507
noexename=`$echo $name|${SED} 's,.exe$,,'`
6508
# $file with .exe has already been added to rmfiles,
6509
# add $file without .exe
6510
rmfiles="$rmfiles $file"
6513
# Do a test to see if this is a libtool program.
6514
if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
6518
# note $name still contains .exe if it was in $file originally
6519
# as does the version of $file that was added into $rmfiles
6520
rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
6521
if test "$fast_install" = yes && test -n "$relink_command"; then
6522
rmfiles="$rmfiles $objdir/lt-$name"
6524
if test "X$noexename" != "X$name" ; then
6525
rmfiles="$rmfiles $objdir/lt-${noexename}.c"
6531
$show "$rm $rmfiles"
6532
$run $rm $rmfiles || exit_status=1
6534
objdir="$origobjdir"
6536
# Try to remove the ${objdir}s in the directories where we deleted files
6537
for dir in $rmdirs; do
6538
if test -d "$dir"; then
6540
$run rmdir $dir >/dev/null 2>&1
6548
$echo "$modename: you must specify a MODE" 1>&2
6549
$echo "$generic_help" 1>&2
6554
if test -z "$exec_cmd"; then
6555
$echo "$modename: invalid operation mode \`$mode'" 1>&2
6556
$echo "$generic_help" 1>&2
6559
fi # test -z "$show_help"
6561
if test -n "$exec_cmd"; then
6566
# We need to display help for each of the modes.
6569
"Usage: $modename [OPTION]... [MODE-ARG]...
6571
Provide generalized library-building support services.
6573
--config show all configuration variables
6574
--debug enable verbose shell tracing
6575
-n, --dry-run display commands without modifying any files
6576
--features display basic configuration information and exit
6577
--finish same as \`--mode=finish'
6578
--help display this help message and exit
6579
--mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
6580
--quiet same as \`--silent'
6581
--silent don't print informational messages
6582
--tag=TAG use configuration variables from tag TAG
6583
--version print version information
6585
MODE must be one of the following:
6587
clean remove files from the build directory
6588
compile compile a source file into a libtool object
6589
execute automatically set library path, then run a program
6590
finish complete the installation of libtool libraries
6591
install install libraries or executables
6592
link create a library or an executable
6593
uninstall remove libraries from an installed directory
6595
MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
6596
a more detailed description of MODE.
6598
Report bugs to <bug-libtool@gnu.org>."
6604
"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
6606
Remove files from the build directory.
6608
RM is the name of the program to use to delete files associated with each FILE
6609
(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6612
If FILE is a libtool library, object or program, all the files associated
6613
with it are deleted. Otherwise, only FILE itself is deleted using RM."
6618
"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
6620
Compile a source file into a libtool library object.
6622
This mode accepts the following additional options:
6624
-o OUTPUT-FILE set the output file name to OUTPUT-FILE
6625
-prefer-pic try to building PIC objects only
6626
-prefer-non-pic try to building non-PIC objects only
6627
-static always build a \`.o' file suitable for static linking
6629
COMPILE-COMMAND is a command to be used in creating a \`standard' object file
6630
from the given SOURCEFILE.
6632
The output file name is determined by removing the directory component from
6633
SOURCEFILE, then substituting the C source code suffix \`.c' with the
6634
library object suffix, \`.lo'."
6639
"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
6641
Automatically set library path, then run a program.
6643
This mode accepts the following additional options:
6645
-dlopen FILE add the directory containing FILE to the library path
6647
This mode sets the library path environment variable according to \`-dlopen'
6650
If any of the ARGS are libtool executable wrappers, then they are translated
6651
into their corresponding uninstalled binary, and any of their required library
6652
directories are added to the library path.
6654
Then, COMMAND is executed, with ARGS as arguments."
6659
"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
6661
Complete the installation of libtool libraries.
6663
Each LIBDIR is a directory that contains libtool libraries.
6665
The commands that this mode executes may require superuser privileges. Use
6666
the \`--dry-run' option if you just want to see what would be executed."
6671
"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
6673
Install executables or libraries.
6675
INSTALL-COMMAND is the installation command. The first component should be
6676
either the \`install' or \`cp' program.
6678
The rest of the components are interpreted as arguments to that command (only
6679
BSD-compatible install options are recognized)."
6684
"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
6686
Link object files or libraries together to form another library, or to
6687
create an executable program.
6689
LINK-COMMAND is a command using the C compiler that you would use to create
6690
a program from several object files.
6692
The following components of LINK-COMMAND are treated specially:
6694
-all-static do not do any dynamic linking at all
6695
-avoid-version do not add a version suffix if possible
6696
-dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
6697
-dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
6698
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
6699
-export-symbols SYMFILE
6700
try to export only the symbols listed in SYMFILE
6701
-export-symbols-regex REGEX
6702
try to export only the symbols matching REGEX
6703
-LLIBDIR search LIBDIR for required installed libraries
6704
-lNAME OUTPUT-FILE requires the installed library libNAME
6705
-module build a library that can dlopened
6706
-no-fast-install disable the fast-install mode
6707
-no-install link a not-installable executable
6708
-no-undefined declare that a library does not refer to external symbols
6709
-o OUTPUT-FILE create OUTPUT-FILE from the specified objects
6710
-objectlist FILE Use a list of object files found in FILE to specify objects
6711
-precious-files-regex REGEX
6712
don't remove output files matching REGEX
6713
-release RELEASE specify package release information
6714
-rpath LIBDIR the created library will eventually be installed in LIBDIR
6715
-R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
6716
-static do not do any dynamic linking of libtool libraries
6717
-version-info CURRENT[:REVISION[:AGE]]
6718
specify library version info [each variable defaults to 0]
6720
All other options (arguments beginning with \`-') are ignored.
6722
Every other argument is treated as a filename. Files ending in \`.la' are
6723
treated as uninstalled libtool libraries, other files are standard or library
6726
If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
6727
only library objects (\`.lo' files) may be specified, and \`-rpath' is
6728
required, except when creating a convenience library.
6730
If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
6731
using \`ar' and \`ranlib', or on Windows using \`lib'.
6733
If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
6734
is created, otherwise an executable program is created."
6739
"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
6741
Remove libraries from an installation directory.
6743
RM is the name of the program to use to delete files associated with each FILE
6744
(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
6747
If FILE is a libtool library, all the files associated with it are deleted.
6748
Otherwise, only FILE itself is deleted using RM."
6752
$echo "$modename: invalid operation mode \`$mode'" 1>&2
6759
$echo "Try \`$modename --help' for more information about other modes."
6763
# The TAGs below are defined such that we never get into a situation
6764
# in which we disable both kinds of libraries. Given conflicting
6765
# choices, we go for a static library, that is the most portable,
6766
# since we can't tell whether shared libraries were disabled because
6767
# the user asked for that or because the platform doesn't support
6768
# them. This is particularly important on AIX, because we don't
6769
# support having both static and shared libraries enabled at the same
6770
# time on that platform, so we default to a shared-only configuration.
6771
# If a disable-shared tag is given, we'll fallback to a static-only
6772
# configuration. But we'll never go from static-only to shared-only.
6774
# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
6775
build_libtool_libs=no
6777
# ### END LIBTOOL TAG CONFIG: disable-shared
6779
# ### BEGIN LIBTOOL TAG CONFIG: disable-static
6780
build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
6781
# ### END LIBTOOL TAG CONFIG: disable-static
6787
# ### BEGIN LIBTOOL TAG CONFIG: CXX
6789
# Libtool was configured on host Suren:
6791
# Shell to use when invoking shell scripts.
6794
# Whether or not to build shared libraries.
6795
build_libtool_libs=yes
6797
# Whether or not to build static libraries.
6800
# Whether or not to add -lc for building shared libraries.
6801
build_libtool_need_lc=no
6803
# Whether or not to disallow shared libs when runtime libs are static
6804
allow_libtool_libs_with_static_runtimes=no
6806
# Whether or not to optimize for fast installation.
6811
host=i686-pc-linux-gnu
6813
# An echo program that does not interpret backslashes.
6823
# A language-specific compiler.
6826
# Is the compiler the GNU C compiler?
6832
# The linker used to build libraries.
6835
# Whether we need hard or soft links.
6838
# A BSD-compatible nm program.
6841
# A symbol stripping program
6844
# Used to examine libraries when file_magic_cmd begins "file"
6847
# Used on cygwin: DLL creation program.
6850
# Used on cygwin: object dumper.
6853
# Used on cygwin: assembler.
6856
# The name of the directory that contains temporary libtool files.
6859
# How to create reloadable object files.
6861
reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
6863
# How to pass a linker flag through the compiler.
6866
# Object file suffix (normally "o").
6869
# Old archive suffix (normally "a").
6872
# Shared library suffix (normally ".so").
6875
# Executable file suffix (normally "").
6878
# Additional compiler flags for building library objects.
6879
pic_flag=" -fPIC -DPIC"
6882
# What is the maximum length of a command?
6885
# Does compiler simultaneously support -c and -o options?
6888
# Must we lock files when doing compilation ?
6891
# Do we need the lib prefix for modules?
6894
# Do we need a version for libraries?
6897
# Whether dlopen is supported.
6898
dlopen_support=unknown
6900
# Whether dlopen of programs is supported.
6903
# Whether dlopen of statically linked programs is supported.
6904
dlopen_self_static=unknown
6906
# Compiler flag to prevent dynamic linking.
6907
link_static_flag="-static"
6909
# Compiler flag to turn off builtin functions.
6910
no_builtin_flag=" -fno-builtin"
6912
# Compiler flag to allow reflexive dlopens.
6913
export_dynamic_flag_spec="\${wl}--export-dynamic"
6915
# Compiler flag to generate shared objects directly from archives.
6916
whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
6918
# Compiler flag to generate thread-safe objects.
6919
thread_safe_flag_spec=""
6921
# Library versioning type.
6924
# Format of library name prefix.
6925
libname_spec="lib\$name"
6927
# List of archive names. First name is the real one, the rest are links.
6928
# The last name is the one that the linker finds with -lNAME.
6929
library_names_spec="\${libname}\${release}\${shared_ext}\$versuffix \${libname}\${release}\${shared_ext}\$major \$libname\${shared_ext}"
6931
# The coded name of the library, if different from the real name.
6932
soname_spec="\${libname}\${release}\${shared_ext}\$major"
6934
# Commands used to build and install an old-style archive.
6936
old_archive_cmds="\$AR \$AR_FLAGS \$oldlib\$oldobjs\$old_deplibs~\$RANLIB \$oldlib"
6937
old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
6938
old_postuninstall_cmds=""
6940
# Create an old-style archive from a shared archive.
6941
old_archive_from_new_cmds=""
6943
# Create a temporary old-style archive to link instead of a shared archive.
6944
old_archive_from_expsyms_cmds=""
6946
# Commands used to build and install a shared archive.
6947
archive_cmds="\$CC -shared -nostdlib \$predep_objects \$libobjs \$deplibs \$postdep_objects \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
6948
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"
6950
postuninstall_cmds=""
6952
# Commands used to build a loadable module (assumed same as above if empty)
6954
module_expsym_cmds=""
6956
# Commands to strip libraries.
6957
old_striplib="strip --strip-debug"
6958
striplib="strip --strip-unneeded"
6960
# Dependencies to place before the objects being linked to create a
6962
predep_objects="/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.3.1/../../../crti.o /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.3.1/crtbeginS.o"
6964
# Dependencies to place after the objects being linked to create a
6966
postdep_objects="/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.3.1/crtendS.o /usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.3.1/../../../crtn.o"
6968
# Dependencies to place before the objects being linked to create a
6972
# Dependencies to place after the objects being linked to create a
6974
postdeps="-lstdc++ -lm -lgcc_s -lc -lgcc_s"
6976
# The library search path used internally by the compiler when linking
6978
compiler_lib_search_path="-L/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.3.1 -L/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.3.1/../../.."
6980
# Method to check whether dependent libraries are shared objects.
6981
deplibs_check_method="pass_all"
6983
# Command to use when deplibs_check_method == file_magic.
6984
file_magic_cmd="\$MAGIC_CMD"
6986
# Flag that allows shared libraries with undefined symbols to be built.
6987
allow_undefined_flag=""
6989
# Flag that forces no undefined symbols.
6990
no_undefined_flag=""
6992
# Commands used to finish a libtool library installation in a directory.
6993
finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
6995
# Same as above, but a single script fragment to be evaled but not shown.
6998
# Take the output of nm and produce a listing of raw symbols and C names.
6999
global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGIRSTW][ABCDGIRSTW]*\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
7001
# Transform the output of nm in a proper C declaration
7002
global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern int \\1;/p'"
7004
# Transform the output of nm in a C name address pair
7005
global_symbol_to_c_name_address="sed -n -e 's/^: \\([^ ]*\\) \$/ {\\\"\\1\\\", (lt_ptr) 0},/p' -e 's/^[BCDEGRST] \\([^ ]*\\) \\([^ ]*\\)\$/ {\"\\2\", (lt_ptr) \\&\\2},/p'"
7007
# This is the shared library runtime path variable.
7008
runpath_var=LD_RUN_PATH
7010
# This is the shared library path variable.
7011
shlibpath_var=LD_LIBRARY_PATH
7013
# Is shlibpath searched before the hard-coded library search path?
7014
shlibpath_overrides_runpath=no
7016
# How to hardcode a shared library path into an executable.
7017
hardcode_action=immediate
7019
# Whether we should hardcode library paths into libraries.
7020
hardcode_into_libs=yes
7022
# Flag to hardcode $libdir into a binary during linking.
7023
# This must work even if $libdir does not exist.
7024
hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
7026
# If ld is used when linking, flag to hardcode $libdir into
7027
# a binary during linking. This must work even if $libdir does
7029
hardcode_libdir_flag_spec_ld=""
7031
# Whether we need a single -rpath flag with a separated argument.
7032
hardcode_libdir_separator=""
7034
# Set to yes if using DIR/libNAME during linking hardcodes DIR into the
7038
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7042
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7043
# the resulting binary.
7044
hardcode_shlibpath_var=
7046
# Set to yes if building a shared library automatically hardcodes DIR into the library
7047
# and all subsequent libraries and executables linked against it.
7048
hardcode_automatic=no
7050
# Variables whose values should be saved in libtool wrapper scripts and
7051
# restored at relink time.
7052
variables_saved_for_relink="PATH LD_LIBRARY_PATH LD_RUN_PATH GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
7054
# Whether libtool must link a program against all its dependency libraries.
7055
link_all_deplibs=unknown
7057
# Compile-time system search path for libraries
7058
sys_lib_search_path_spec="/lib /usr/lib /usr/X11R6/lib /usr/local/lib /usr/X11R6/lib /usr/lib/qt3/lib /root/opccli/libopc"
7060
# Run-time system search path for libraries
7061
sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib /usr/X11R6/lib /usr/lib/qt3/lib /root/opccli/libopc"
7063
# Fix the shell variable $srcfile for the compiler.
7066
# Set to yes if exported symbols are required.
7067
always_export_symbols=no
7069
# The commands to list exported symbols.
7070
export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | \$SED 's/.* //' | sort | uniq > \$export_symbols"
7072
# The commands to extract the exported symbol list from a shared archive.
7073
extract_expsyms_cmds=""
7075
# Symbols that should not be listed in the preloaded symbols.
7078
# Symbols that must always be exported.
7081
# ### END LIBTOOL TAG CONFIG: CXX