3
# libtool - Provide generalized library-building support services.
4
# Generated automatically by ltconfig (GNU libtool 1.3c (1.695 2000/02/24 02:15:35))
5
# NOTE: Changes made to this file will be lost: look at ltconfig or ltmain.sh.
7
# Copyright (C) 1996-2000 Free Software Foundation, Inc.
8
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
10
# This program is free software; you can redistribute it and/or modify
11
# it under the terms of the GNU General Public License as published by
12
# the Free Software Foundation; either version 2 of the License, or
13
# (at your option) any later version.
15
# This program is distributed in the hope that it will be useful, but
16
# WITHOUT ANY WARRANTY; without even the implied warranty of
17
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
# General Public License for more details.
20
# You should have received a copy of the GNU General Public License
21
# along with this program; if not, write to the Free Software
22
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24
# As a special exception to the GNU General Public License, if you
25
# distribute this file as part of a program that contains a
26
# configuration script generated by Autoconf, you may include it under
27
# the same distribution terms that you use for the rest of that program.
29
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
32
# The HP-UX ksh and POSIX shell print the target directory to stdout
34
if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
36
### BEGIN LIBTOOL CONFIG
37
# Libtool was configured as follows, on host sagitta:
39
# AR="" CC="gcc" CFLAGS="-O2" CPPFLAGS="" \
40
# MAGIC="" LD="/usr/bin/ld" LDFLAGS="-s" LIBS="" \
41
# LN_S="ln -s" NM="/usr/bin/nm -B" RANLIB="ranlib" STRIP="strip" \
42
# AS="" DLLTOOL="" OBJDUMP="" \
43
# objext="" exeext="" reload_flag="" \
44
# deplibs_check_method="pass_all" file_magic_cmd="\${MAGIC}" \
45
# ./ltconfig --cache-file=./config.cache --disable-static --with-gcc --with-gnu-ld --enable-dlopen --no-verify --build=i586-pc-linux-gnu ./ltmain.sh i586-pc-linux-gnu
47
# Compiler and other test output produced by ltconfig, useful for
48
# debugging ltconfig, is in ./config.log if it exists.
49
# The version of ltconfig that generated this script.
50
LTCONFIG_VERSION="1.3c"
52
# Shell to use when invoking shell scripts.
55
# Whether or not to build shared libraries.
56
build_libtool_libs=yes
58
# Whether or not to build static libraries.
61
# Whether or not to optimize for fast installation.
65
host_alias=i586-pc-linux-gnu
66
host=i586-pc-linux-gnu
68
# An echo program that does not interpret backslashes.
74
# The default C compiler.
77
# The linker used to build libraries.
80
# Whether we need hard or soft links.
83
# A BSD-compatible nm program.
86
# A symbol stripping program
89
# Used to examine libraries when file_magic_cmd begins "file"
92
# Used on cygwin: DLL creation program.
95
# Used on cygwin: object dumper.
98
# Used on cygwin: assembler.
101
# The name of the directory that contains temporary libtool files.
104
# How to create reloadable object files.
106
reload_cmds="\$LD\$reload_flag -o \$output\$reload_objs"
108
# How to pass a linker flag through the compiler.
111
# Object file suffix (normally "o").
114
# Old archive suffix (normally "a").
117
# Executable file suffix (normally "").
120
# Additional compiler flags for building library objects.
124
# Does compiler simultaneously support -c and -o options?
127
# Can we write directly to a .lo ?
130
# Must we lock files when doing compilation ?
133
# Do we need the lib prefix for modules?
136
# Do we need a version for libraries?
139
# Whether dlopen is supported.
142
# Whether dlopen of programs is supported.
145
# Whether dlopen of statically linked programs is supported.
146
dlopen_self_static=no
148
# Compiler flag to prevent dynamic linking.
149
link_static_flag="-static"
151
# Compiler flag to turn off builtin functions.
152
no_builtin_flag=" -fno-builtin -fno-rtti -fno-exceptions"
154
# Compiler flag to allow reflexive dlopens.
155
export_dynamic_flag_spec="\${wl}--export-dynamic"
157
# Compiler flag to generate shared objects directly from archives.
158
whole_archive_flag_spec="\${wl}--whole-archive\$convenience \${wl}--no-whole-archive"
160
# Compiler flag to generate thread-safe objects.
161
thread_safe_flag_spec=""
163
# Library versioning type.
166
# Format of library name prefix.
167
libname_spec="lib\$name"
169
# List of archive names. First name is the real one, the rest are links.
170
# The last name is the one that the linker finds with -lNAME.
171
library_names_spec="\${libname}\${release}.so\$versuffix \${libname}\${release}.so\$major \$libname.so"
173
# The coded name of the library, if different from the real name.
174
soname_spec="\${libname}\${release}.so\$major"
176
# Commands used to build and install an old-style archive.
178
old_archive_cmds="\$AR cru \$oldlib\$oldobjs\$old_deplibs"
179
old_postinstall_cmds="chmod 644 \$oldlib"
180
old_postuninstall_cmds=""
182
# Create an old-style archive from a shared archive.
183
old_archive_from_new_cmds=""
185
# Create a temporary old-style archive to link instead of a shared archive.
186
old_archive_from_expsyms_cmds=""
188
# Commands used to build and install a shared archive.
189
archive_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname -o \$lib"
190
archive_expsym_cmds="\$CC -shared \$libobjs \$deplibs \$compiler_flags \${wl}-soname \$wl\$soname \${wl}-retain-symbols-file \$wl\$export_symbols -o \$lib"
192
postuninstall_cmds=""
194
# Commands to strip libraries.
195
old_striplib="strip --strip-debug"
196
striplib="strip --strip-unneeded"
198
# Method to check whether dependent libraries are shared objects.
199
deplibs_check_method="pass_all"
201
# Command to use when deplibs_check_method == file_magic.
202
file_magic_cmd="\${MAGIC}"
204
# Flag that allows shared libraries with undefined symbols to be built.
205
allow_undefined_flag=""
207
# Flag that forces no undefined symbols.
210
# Commands used to finish a libtool library installation in a directory.
211
finish_cmds="PATH=\\\"\\\$PATH:/sbin\\\" ldconfig -n \$libdir"
213
# Same as above, but a single script fragment to be evaled but not shown.
216
# Take the output of nm and produce a listing of raw symbols and C names.
217
global_symbol_pipe="sed -n -e 's/^.*[ ]\\([ABCDGISTW]\\)[ ][ ]*\\(\\)\\([_A-Za-z][_A-Za-z0-9]*\\)\$/\\1 \\2\\3 \\3/p'"
219
# Transform the output of nm in a proper C declaration
220
global_symbol_to_cdecl="sed -n -e 's/^. .* \\(.*\\)\$/extern char \\1;/p'"
222
# This is the shared library runtime path variable.
223
runpath_var=LD_RUN_PATH
225
# This is the shared library path variable.
226
shlibpath_var=LD_LIBRARY_PATH
228
# Is shlibpath searched before the hard-coded library search path?
229
shlibpath_overrides_runpath=no
231
# How to hardcode a shared library path into an executable.
232
hardcode_action=immediate
234
# Whether we should hardcode library paths into libraries.
235
hardcode_into_libs=yes
237
# Flag to hardcode $libdir into a binary during linking.
238
# This must work even if $libdir does not exist.
239
hardcode_libdir_flag_spec="\${wl}--rpath \${wl}\$libdir"
241
# Whether we need a single -rpath flag with a separated argument.
242
hardcode_libdir_separator=""
244
# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
248
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
252
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
253
# the resulting binary.
254
hardcode_shlibpath_var=unsupported
256
# Whether libtool must link a program against all its dependency libraries.
257
link_all_deplibs=unknown
259
# Compile-time system search path for libraries
260
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
262
# Run-time system search path for libraries
263
sys_lib_dlsearch_path_spec="/lib /usr/lib"
265
# Fix the shell variable $srcfile for the compiler.
268
# Set to yes if exported symbols are required.
269
always_export_symbols=no
271
# The commands to list exported symbols.
272
export_symbols_cmds="\$NM \$libobjs \$convenience | \$global_symbol_pipe | sed 's/.* //' | sort | uniq > \$export_symbols"
274
# The commands to extract the exported symbol list from a shared archive.
275
extract_expsyms_cmds=""
277
# Symbols that should not be listed in the preloaded symbols.
278
exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
280
# Symbols that must always be exported.
283
### END LIBTOOL CONFIG
285
# ltmain.sh - Provide generalized library-building support services.
286
# NOTE: Changing this file will not affect anything until you rerun ltconfig.
288
# Copyright (C) 1996-2000 Free Software Foundation, Inc.
289
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
291
# This program is free software; you can redistribute it and/or modify
292
# it under the terms of the GNU General Public License as published by
293
# the Free Software Foundation; either version 2 of the License, or
294
# (at your option) any later version.
296
# This program is distributed in the hope that it will be useful, but
297
# WITHOUT ANY WARRANTY; without even the implied warranty of
298
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
299
# General Public License for more details.
301
# You should have received a copy of the GNU General Public License
302
# along with this program; if not, write to the Free Software
303
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
305
# As a special exception to the GNU General Public License, if you
306
# distribute this file as part of a program that contains a
307
# configuration script generated by Autoconf, you may include it under
308
# the same distribution terms that you use for the rest of that program.
310
# Check that we have a working $echo.
311
if test "X$1" = X--no-reexec; then
312
# Discard the --no-reexec flag, and continue.
314
elif test "X$1" = X--fallback-echo; then
315
# Avoid inline document here, it may be left over
317
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
318
# Yippee, $echo works!
321
# Restart under the correct shell, and then maybe $echo will work.
322
exec $SHELL "$0" --no-reexec ${1+"$@"}
325
if test "X$1" = X--fallback-echo; then
326
# used as fallback echo
334
# The name of this program.
335
progname=`$echo "$0" | sed 's%^.*/%%'`
342
TIMESTAMP=" (1.695 2000/02/24 02:15:35)"
345
help="Try \`$progname --help' for more information."
346
magic="%%%MAGIC variable%%%"
351
# Sed substitution that helps us do robust quoting. It backslashifies
352
# metacharacters that are still active within double-quoted strings.
353
Xsed='sed -e 1s/^X//'
354
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
356
NL2SP='tr \015\012 \040\040'
359
# Only set LANG and LC_ALL to C if already set.
360
# These must not be set unconditionally because not all systems understand
361
# e.g. LANG=C (notably SCO).
362
# We save the old values to restore during execute mode.
363
if test "${LC_ALL+set}" = set; then
364
save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
366
if test "${LANG+set}" = set; then
367
save_LANG="$LANG"; LANG=C; export LANG
370
if test "$LTCONFIG_VERSION" != "$VERSION"; then
371
echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
372
echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
376
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
377
echo "$modename: not configured to build any kind of library" 1>&2
378
echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
391
lo2o="s/\\.lo\$/.${objext}/"
392
o2lo="s/\\.${objext}\$/.lo/"
394
# Parse our command line options once, thoroughly.
401
-*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
405
# If the previous option needs an argument, assign it.
406
if test -n "$prev"; then
409
eval "$prev=\"\$$prev \$arg\""
421
# Have we seen a non-optional argument yet?
428
echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
433
sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0
438
echo "$progname: enabling shell trace mode"
448
if test "$build_libtool_libs" = yes; then
449
echo "enable shared libraries"
451
echo "disable shared libraries"
453
if test "$build_old_libs" = yes; then
454
echo "enable static libraries"
456
echo "disable static libraries"
461
--finish) mode="finish" ;;
463
--mode) prevopt="--mode" prev=mode ;;
464
--mode=*) mode="$optarg" ;;
476
$echo "$modename: unrecognized option \`$arg'" 1>&2
488
if test -n "$prevopt"; then
489
$echo "$modename: option \`$prevopt' requires an argument" 1>&2
494
if test -z "$show_help"; then
496
# Infer the operation mode.
497
if test -z "$mode"; then
499
*cc | *++ | gcc* | *-gcc*)
511
*db | *dbx | *strace | *truss)
521
# If we have no mode, but dlfiles were specified, then do execute mode.
522
test -n "$execute_dlfiles" && mode=execute
524
# Just use the default operation mode.
525
if test -z "$mode"; then
526
if test -n "$nonopt"; then
527
$echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
529
$echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
536
# Only execute mode is allowed to have -dlopen flags.
537
if test -n "$execute_dlfiles" && test "$mode" != execute; then
538
$echo "$modename: unrecognized option \`-dlopen'" 1>&2
543
# Change the help message to a mode-specific one.
545
help="Try \`$modename --help --mode=$mode' for more information."
547
# These modes are in order of execution frequency so that they run quickly.
549
# libtool compile mode
551
modename="$modename: compile"
552
# Get the compilation command and the source file.
565
# Aesthetically quote the previous argument.
567
lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
570
# Double-quote args containing other shell metacharacters.
571
# Many Bourne shells cannot handle close brackets correctly
572
# in scan sets, so we specify it separately.
573
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
578
# Add the previous argument to base_compile.
579
if test -z "$base_compile"; then
580
base_compile="$lastarg"
582
base_compile="$base_compile $lastarg"
588
# Accept any command-line options.
591
if test "$user_target" != "no"; then
592
$echo "$modename: you cannot specify \`-o' more than once" 1>&2
609
args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
611
IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
615
# Double-quote args containing other shell metacharacters.
616
# Many Bourne shells cannot handle close brackets correctly
617
# in scan sets, so we specify it separately.
619
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
623
lastarg="$lastarg $arg"
626
lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
628
# Add the arguments to base_compile.
629
if test -z "$base_compile"; then
630
base_compile="$lastarg"
632
base_compile="$base_compile $lastarg"
638
case "$user_target" in
640
# The next one is the -o target name
645
# We got the output file
652
# Accept the current argument as the source file.
656
# Aesthetically quote the previous argument.
658
# Backslashify any backslashes, double quotes, and dollar signs.
659
# These are the only characters that are still specially
660
# interpreted inside of double-quoted scrings.
661
lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
663
# Double-quote args containing other shell metacharacters.
664
# Many Bourne shells cannot handle close brackets correctly
665
# in scan sets, so we specify it separately.
667
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
668
lastarg="\"$lastarg\""
672
# Add the previous argument to base_compile.
673
if test -z "$base_compile"; then
674
base_compile="$lastarg"
676
base_compile="$base_compile $lastarg"
680
case "$user_target" in
684
# Get the name of the library object.
685
libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
688
$echo "$modename: you must specify a target with \`-o'" 1>&2
693
# Recognize several different file suffixes.
694
# If the user specifies -o file.o, it is replaced with file.lo
709
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
712
*.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
714
$echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
719
if test -z "$base_compile"; then
720
$echo "$modename: you must specify a compilation command" 1>&2
725
# Delete any leftover library objects.
726
if test "$build_old_libs" = yes; then
727
removelist="$obj $libobj"
733
trap "$run $rm $removelist; exit 1" 1 2 15
735
# Calculate the filename of the output object if compiler does
736
# not support -o with -c
737
if test "$compiler_c_o" = no; then
738
output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext}
739
lockfile="$output_obj.lock"
740
removelist="$removelist $output_obj $lockfile"
741
trap "$run $rm $removelist; exit 1" 1 2 15
747
# Lock this critical section if it is needed
748
# We use this script file to make the link, it avoids creating a new file
749
if test "$need_locks" = yes; then
750
until ln "$0" "$lockfile" 2>/dev/null; do
751
$show "Waiting for $lockfile to be removed"
754
elif test "$need_locks" = warn; then
755
if test -f "$lockfile"; then
757
*** ERROR, $lockfile exists and contains:
758
`cat $lockfile 2>/dev/null`
760
This indicates that another process is trying to use the same
761
temporary object file, and libtool could not work around it because
762
your compiler does not support \`-c' and \`-o' together. If you
763
repeat this compilation, it may succeed, by chance, but you had better
764
avoid parallel builds (make -j) in this platform, or get a better
770
echo $srcfile > "$lockfile"
773
if test -n "$fix_srcfile_path"; then
774
eval srcfile=\"$fix_srcfile_path\"
777
# Only build a PIC object if we are building libtool libraries.
778
if test "$build_libtool_libs" = yes; then
779
# Without this assignment, base_compile gets emptied.
780
fbsd_hideous_sh_bug=$base_compile
782
if test "$pic_mode" != no; then
783
# All platforms use -DPIC, to notify preprocessed assembler code.
784
command="$base_compile $srcfile $pic_flag -DPIC"
786
# Don't build PIC code
787
command="$base_compile $srcfile"
789
if test "$build_old_libs" = yes; then
791
dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
792
if test "X$dir" = "X$libobj"; then
797
libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
799
if test -d "$dir"; then
806
if test $status -ne 0 && test ! -d $dir; then
811
if test "$compiler_o_lo" = yes; then
813
command="$command -o $output_obj"
814
elif test "$compiler_c_o" = yes; then
816
command="$command -o $output_obj"
819
$run $rm "$output_obj"
821
if $run eval "$command"; then :
823
test -n "$output_obj" && $run $rm $removelist
827
if test "$need_locks" = warn &&
828
test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
830
*** ERROR, $lockfile contains:
831
`cat $lockfile 2>/dev/null`
833
but it should contain:
836
This indicates that another process is trying to use the same
837
temporary object file, and libtool could not work around it because
838
your compiler does not support \`-c' and \`-o' together. If you
839
repeat this compilation, it may succeed, by chance, but you had better
840
avoid parallel builds (make -j) in this platform, or get a better
847
# Just move the object if needed, then go on to compile the next one
848
if test x"$output_obj" != x"$libobj"; then
849
$show "$mv $output_obj $libobj"
850
if $run $mv $output_obj $libobj; then :
858
# If we have no pic_flag, then copy the object into place and finish.
859
if (test -z "$pic_flag" || test "$pic_mode" != default) &&
860
test "$build_old_libs" = yes; then
861
# Rename the .lo from within objdir to obj
862
if test -f $obj; then
867
$show "$mv $libobj $obj"
868
if $run $mv $libobj $obj; then :
875
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
876
if test "X$xdir" = "X$obj"; then
881
baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
882
libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
883
# Now arrange that obj and lo_libobj become the same file
884
$show "(cd $xdir && $LN_S $baseobj $libobj)"
885
if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
894
# Allow error messages only from the first compilation.
895
suppress_output=' >/dev/null 2>&1'
898
# Only build a position-dependent object if we build old libraries.
899
if test "$build_old_libs" = yes; then
900
if test "$pic_mode" != yes; then
901
# Don't build PIC code
902
command="$base_compile $srcfile"
904
# All platforms use -DPIC, to notify preprocessed assembler code.
905
command="$base_compile $srcfile $pic_flag -DPIC"
907
if test "$compiler_c_o" = yes; then
908
command="$command -o $obj"
912
# Suppress compiler output if we already did a PIC compilation.
913
command="$command$suppress_output"
914
$run $rm "$output_obj"
916
if $run eval "$command"; then :
922
if test "$need_locks" = warn &&
923
test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
925
*** ERROR, $lockfile contains:
926
`cat $lockfile 2>/dev/null`
928
but it should contain:
931
This indicates that another process is trying to use the same
932
temporary object file, and libtool could not work around it because
933
your compiler does not support \`-c' and \`-o' together. If you
934
repeat this compilation, it may succeed, by chance, but you had better
935
avoid parallel builds (make -j) in this platform, or get a better
942
# Just move the object if needed
943
if test x"$output_obj" != x"$obj"; then
944
$show "$mv $output_obj $obj"
945
if $run $mv $output_obj $obj; then :
953
# Create an invalid libtool object if no PIC, so that we do not
954
# accidentally link it into a program.
955
if test "$build_libtool_libs" != yes; then
956
$show "echo timestamp > $libobj"
957
$run eval "echo timestamp > \$libobj" || exit $?
959
# Move the .lo from within objdir
960
$show "$mv $libobj $lo_libobj"
961
if $run $mv $libobj $lo_libobj; then :
970
# Unlock the critical section if it was locked
971
if test "$need_locks" != no; then
980
modename="$modename: link"
982
*-*-cygwin* | *-*-mingw* | *-*-os2*)
983
# It is impossible to link a dll without this setting, and
984
# we shouldn't force the makefile maintainer to figure out
985
# which system we are compiling for in order to pass an extra
986
# flag for every libtool invokation.
989
# FIXME: Unfortunately, there are problems with the above when trying
990
# to make a dll which has undefined symbols, in which case not
991
# even a static library is built. For now, we need to specify
992
# -no-undefined on the libtool link line when we can be certain
993
# that all symbols are satisfied, otherwise we get a static library.
1000
libtool_args="$nonopt"
1001
compile_command="$nonopt"
1002
finalize_command="$nonopt"
1015
lib_search_path=`pwd`
1023
export_symbols_regex=
1030
prefer_static_libs=no
1042
# We need to know -static, to get the right output filenames.
1046
-all-static | -static)
1047
if test "X$arg" = "X-all-static"; then
1048
if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
1049
$echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
1051
if test -n "$link_static_flag"; then
1052
dlopen_self=$dlopen_self_static
1055
if test -z "$pic_flag" && test -n "$link_static_flag"; then
1056
dlopen_self=$dlopen_self_static
1059
build_libtool_libs=no
1061
prefer_static_libs=yes
1067
# See if our shared archives depend on static archives.
1068
test -n "$old_archive_from_new_cmds" && build_old_libs=yes
1070
# Go through the arguments, transforming them on the way.
1071
while test $# -gt 0; do
1075
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1076
qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
1080
libtool_args="$libtool_args $qarg"
1082
# If the previous option needs an argument, assign it.
1083
if test -n "$prev"; then
1086
compile_command="$compile_command @OUTPUT@"
1087
finalize_command="$finalize_command @OUTPUT@"
1093
if test "$preload" = no; then
1094
# Add the symbol object into the linking commands.
1095
compile_command="$compile_command @SYMFILE@"
1096
finalize_command="$finalize_command @SYMFILE@"
1100
*.la | *.lo) ;; # We handle these cases below.
1102
if test "$dlself" = no; then
1110
if test "$prev" = dlprefiles; then
1112
elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
1122
if test "$prev" = dlfiles; then
1123
dlfiles="$dlfiles $arg"
1125
dlprefiles="$dlprefiles $arg"
1133
export_symbols="$arg"
1134
if test ! -f "$arg"; then
1135
$echo "$modename: symbol file \`$arg' does not exist"
1142
export_symbols_regex="$arg"
1152
# We need an absolute path.
1154
[\\/]* | [A-Za-z]:[\\/]*) ;;
1156
$echo "$modename: only absolute run-paths are allowed" 1>&2
1160
if test "$prev" = rpath; then
1163
*) rpath="$rpath $arg" ;;
1168
*) xrpath="$xrpath $arg" ;;
1175
compiler_flags="$compiler_flags $qarg"
1177
compile_command="$compile_command $qarg"
1178
finalize_command="$finalize_command $qarg"
1182
linker_flags="$linker_flags $qarg"
1183
compiler_flags="$compiler_flags $wl$qarg"
1185
compile_command="$compile_command $wl$qarg"
1186
finalize_command="$finalize_command $wl$qarg"
1190
eval "$prev=\"\$arg\""
1201
if test -n "$link_static_flag"; then
1202
compile_command="$compile_command $link_static_flag"
1203
finalize_command="$finalize_command $link_static_flag"
1209
# FIXME: remove this flag sometime in the future.
1210
$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
1234
-export-symbols | -export-symbols-regex)
1235
if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
1236
$echo "$modename: not more than one -exported-symbols argument allowed"
1239
if test "X$arg" = "X-export-symbols"; then
1248
dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
1249
# We need an absolute path.
1251
[\\/]* | [A-Za-z]:[\\/]*) ;;
1253
absdir=`cd "$dir" && pwd`
1254
if test -z "$absdir"; then
1255
$echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
1264
deplibs="$deplibs -L$dir"
1265
lib_search_path="$lib_search_path $dir"
1269
*-*-cygwin* | *-*-mingw* | *-*-os2*)
1270
case ":$dllsearchpath:" in
1272
*) dllsearchpath="$dllsearchpath:$dir";;
1280
if test "$arg" = "-lc"; then
1282
*-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
1283
# These systems don't actually have c library (as such)
1287
elif test "$arg" = "-lm"; then
1289
*-*-cygwin* | *-*-beos*)
1290
# These systems don't actually have math library (as such)
1295
deplibs="$deplibs $arg"
1311
*-*-cygwin* | *-*-mingw* | *-*-os2*)
1312
# The PATH hackery in wrapper scripts is required on Windows
1313
# in order for the loader to find any dlls it needs.
1314
$echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1315
$echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1348
dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1349
# We need an absolute path.
1351
[\\/]* | [A-Za-z]:[\\/]*) ;;
1353
$echo "$modename: only absolute run-paths are allowed" 1>&2
1359
*) xrpath="$xrpath $dir" ;;
1365
# If we have no pic_flag, then this is the same as -all-static.
1366
if test -z "$pic_flag" && test -n "$link_static_flag"; then
1367
compile_command="$compile_command $link_static_flag"
1368
finalize_command="$finalize_command $link_static_flag"
1384
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
1386
IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
1387
for flag in $args; do
1390
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1395
compiler_flags="$compiler_flags $flag"
1398
arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1402
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
1404
IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
1405
for flag in $args; do
1408
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1413
compiler_flags="$compiler_flags $wl$flag"
1414
linker_flags="$linker_flags $flag"
1417
arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1430
# Some other compiler flag.
1432
# Unknown arguments in both finalize_command and compile_command need
1433
# to be aesthetically quoted because they are evaled later.
1434
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1436
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1443
# A standard object.
1449
if test "$prev" = dlfiles; then
1450
# This file was specified with -dlopen.
1451
if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1452
dlfiles="$dlfiles $arg"
1456
# If libtool objects are unsupported, then we need to preload.
1461
if test "$prev" = dlprefiles; then
1462
# Preload the old-style object.
1463
dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
1466
libobjs="$libobjs $arg"
1472
deplibs="$deplibs $arg"
1473
old_deplibs="$old_deplibs $arg"
1478
# A libtool-controlled library.
1480
if test "$prev" = dlfiles; then
1481
# This library was specified with -dlopen.
1482
dlfiles="$dlfiles $arg"
1484
elif test "$prev" = dlprefiles; then
1485
# The library was specified with -dlpreopen.
1486
dlprefiles="$dlprefiles $arg"
1489
deplibs="$deplibs $arg"
1494
# Some other compiler argument.
1496
# Unknown arguments in both finalize_command and compile_command need
1497
# to be aesthetically quoted because they are evaled later.
1498
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1500
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1507
# Now actually substitute the argument into the commands.
1508
if test -n "$arg"; then
1509
compile_command="$compile_command $arg"
1510
finalize_command="$finalize_command $arg"
1514
if test -n "$prev"; then
1515
$echo "$modename: the \`$prevarg' option requires an argument" 1>&2
1520
if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
1521
eval arg=\"$export_dynamic_flag_spec\"
1522
compile_command="$compile_command $arg"
1523
finalize_command="$finalize_command $arg"
1527
# calculate the name of the file, without its directory
1528
outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
1529
libobjs_save="$libobjs"
1531
if test -n "$shlibpath_var"; then
1532
# get the directories listed in $shlibpath_var
1533
eval shlib_search_path=\`\$echo \"X \${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
1537
eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
1538
eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
1539
lib_search_path="$lib_search_path $sys_lib_search_path $shlib_search_path"
1541
output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
1542
if test "X$output_objdir" = "X$output"; then
1543
output_objdir="$objdir"
1545
output_objdir="$output_objdir/$objdir"
1547
# Create the object directory.
1548
if test ! -d $output_objdir; then
1549
$show "$mkdir $output_objdir"
1550
$run $mkdir $output_objdir
1552
if test $status -ne 0 && test ! -d $output_objdir; then
1559
$echo "$modename: you must specify an output file" 1>&2
1569
*) # Anything else should be a program.
1575
# Find all interdependent deplibs that
1576
# are linked more than once (e.g. -la -lb -la)
1577
for deplib in $deplibs; do
1579
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1581
libs="$libs $deplib"
1585
uninst_path= # paths that contain uninstalled libtool libraries
1586
new_lib_search_path=
1587
need_relink=no # whether we're linking any uninstalled libtool libraries
1591
for file in $dlfiles $dlprefiles; do
1595
$echo "$modename: libraries can \`-dlopen' only libtool libraries" 1>&2
1607
link_against_libtool_libs=
1608
passes="scan dlopen dlpreopen link"
1613
for pass in $passes; do
1614
if test $linkmode = prog; then
1616
dlopen) libs="$dlfiles" ;;
1617
dlpreopen) libs="$dlprefiles" ;;
1618
link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
1621
if test $pass = dlopen; then
1622
# Collect dlpreopened libraries
1623
save_deplibs="$deplibs"
1626
for deplib in $libs; do
1631
if test $linkmode != lib && test $linkmode != prog; then
1632
$echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
1635
name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
1636
for searchdir in $lib_search_path; do
1637
# Search the libtool library
1638
lib="$searchdir/lib${name}.la"
1639
if test -f "$lib"; then
1644
if test "$found" != yes; then
1645
if test "$linkmode,$pass" = "prog,link"; then
1646
compile_deplibs="$deplib $compile_deplibs"
1647
finalize_deplibs="$deplib $finalize_deplibs"
1649
deplibs="$deplib $deplibs"
1650
test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs"
1658
deplibs="$deplib $deplibs"
1659
newdependency_libs="$deplib $newdependency_libs"
1660
new_lib_search_path="$new_lib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
1663
if test $pass = scan; then
1664
deplibs="$deplib $deplibs"
1665
new_lib_search_path="$new_lib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
1667
compile_deplibs="$deplib $compile_deplibs"
1668
finalize_deplibs="$deplib $finalize_deplibs"
1672
$echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
1678
if test "$linkmode,$pass" = "prog,link"; then
1679
dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
1680
# Make sure the xrpath contains only unique directories.
1683
*) xrpath="$xrpath $dir" ;;
1688
*.la) lib="$deplib" ;;
1692
if test "$deplibs_check_method" != pass_all; then
1694
echo "*** Warning: This library needs some functionality provided by $deplib."
1695
echo "*** I have the capability to make that library automatically link in when"
1696
echo "*** you link to this library. But I can only do this if you have a"
1697
echo "*** shared version of the library, which you do not appear to have."
1700
echo "*** Warning: Linking the shared library $output against the"
1701
echo "*** static library $deplib is not portable!"
1702
deplibs="$deplib $deplibs"
1707
if test $pass != link; then
1708
deplibs="$deplib $deplibs"
1710
compile_deplibs="$deplib $compile_deplibs"
1711
finalize_deplibs="$deplib $finalize_deplibs"
1718
if test $linkmode = prog; then
1719
if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
1720
# If there is no dlopen support or we're linking statically,
1721
# we need to preload.
1722
newdlprefiles="$newdlprefiles $deplib"
1723
compile_deplibs="$deplib $compile_deplibs"
1724
finalize_deplibs="$deplib $finalize_deplibs"
1726
newdlfiles="$newdlfiles $deplib"
1736
if test $found = yes || test -f "$lib"; then :
1738
$echo "$modename: cannot find the library \`$lib'" 1>&2
1742
# Check to see that this really is a libtool archive.
1743
if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
1745
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
1749
ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
1750
test "X$ladir" = "X$lib" && ladir="."
1758
# If the library was installed with an old release of libtool,
1759
# it will not redefine variable installed.
1764
*/* | *\\*) . $lib ;;
1768
if test $linkmode = lib || test "$linkmode,$pass" = "prog,scan"; then
1769
test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
1770
test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
1773
if test $linkmode != lib && test $linkmode != prog; then
1774
# only check for convenience libraries
1775
if test -z "$old_library"; then
1776
$echo "$modename: cannot find name of link library for \`$lib'" 1>&2
1779
if test -n "$libdir"; then
1780
$echo "$modename: \`$lib' is not a convenience library" 1>&2
1783
# It is a libtool convenience library, so add in its objects.
1784
convenience="$convenience $ladir/$objdir/$old_library"
1785
old_convenience="$old_convenience $ladir/$objdir/$old_library"
1789
# Get the name of the library we link against.
1791
for l in $old_library $library_names; do
1794
if test -z "$linklib"; then
1795
$echo "$modename: cannot find name of link library for \`$lib'" 1>&2
1799
# This library was specified with -dlopen.
1800
if test $pass = dlopen; then
1801
if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
1802
# If there is no dlname, no dlopen support or we're linking statically,
1803
# we need to preload.
1804
dlprefiles="$dlprefiles $lib"
1806
newdlfiles="$newdlfiles $lib"
1811
# We need an absolute path.
1813
[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
1815
abs_ladir=`cd "$ladir" && pwd`
1816
if test -z "$abs_ladir"; then
1817
$echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
1818
$echo "$modename: passing it literally to the linker, although it might fail" 1>&2
1823
laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
1825
# Find the relevant object directory and library name.
1826
if test "X$installed" = Xyes; then
1827
if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
1828
$echo "$modename: warning: library \`$lib' was moved." 1>&2
1837
dir="$ladir/$objdir"
1838
absdir="$abs_ladir/$objdir"
1839
# Remove this search path later
1840
uninst_path="$uninst_path $abs_ladir"
1842
name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
1844
# This library was specified with -dlpreopen.
1845
if test $pass = dlpreopen; then
1846
# Prefer using a static library (so that no silly _DYNAMIC symbols
1847
# are required to link).
1848
if test -n "$old_library"; then
1849
newdlprefiles="$newdlprefiles $dir/$old_library"
1851
newdlprefiles="$newdlprefiles $dir/$linklib"
1855
if test $linkmode = prog && test $pass != link; then
1856
new_lib_search_path="$new_lib_search_path $ladir"
1857
deplibs="$lib $deplibs"
1860
if test "$link_all_deplibs" != no || test "$fast_install" != no || \
1861
test "$build_libtool_libs" = no || test -z "$library_names"; then
1866
for deplib in $dependency_libs; do
1868
-L*) new_lib_search_path="$new_lib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
1870
# Need to link against all dependency_libs?
1871
if test $linkalldeplibs = yes; then
1872
deplibs="$deplib $deplibs"
1874
# Need to hardcode shared library paths
1875
# or/and link against static libraries
1876
newdependency_libs="$deplib $newdependency_libs"
1878
case "$tmp_libs " in
1879
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1881
tmp_libs="$tmp_libs $deplib"
1886
if test -z "$libdir"; then
1887
# It is a libtool convenience library, so add in its objects.
1888
convenience="$convenience $dir/$old_library"
1889
old_convenience="$old_convenience $dir/$old_library"
1890
if test $linkmode = lib; then
1891
deplibs="$dir/$old_library $deplibs"
1893
for deplib in $dependency_libs; do
1894
newdependency_libs="$deplib $newdependency_libs"
1895
case "$tmp_libs " in
1896
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1898
tmp_libs="$tmp_libs $deplib"
1900
elif test "$linkmode,$pass" = "prog,link"; then
1901
compile_deplibs="$dir/$old_library $compile_deplibs"
1902
finalize_deplibs="$dir/$old_library $finalize_deplibs"
1907
if test "$linkmode,$pass" = "prog,link"; then
1908
if test -n "$library_names" &&
1909
{ test "$hardcode_into_libs" != all || test "$alldeplibs" != yes; } &&
1910
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then
1911
# We need to hardcode the library path
1912
if test -n "$shlibpath_var"; then
1913
# Make sure the rpath contains only unique directories.
1914
case "$temp_rpath " in
1917
*) temp_rpath="$temp_rpath $dir" ;;
1921
# Hardcode the library path.
1922
# Skip directories that are in the system default run-time
1924
case " $sys_lib_dlsearch_path " in
1927
case "$compile_rpath " in
1929
*) compile_rpath="$compile_rpath $absdir"
1934
case " $sys_lib_dlsearch_path " in
1937
case "$finalize_rpath " in
1939
*) finalize_rpath="$finalize_rpath $libdir"
1945
if test "$alldeplibs" = yes &&
1946
{ test "$deplibs_check_method" = pass_all ||
1947
{ test "$build_libtool_libs" = yes &&
1948
test -n "$library_names"; }; }; then
1949
# Do we only need to link against static libraries?
1954
link_static=no # Whether this library is linked statically
1955
if test -n "$library_names" &&
1956
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then
1957
link_against_libtool_libs="$link_against_libtool_libs $lib"
1958
test "X$installed" = xno && need_relink=yes
1959
# This is a shared library
1960
if test $linkmode = lib && test "$hardcode_into_libs" = all; then
1961
# Hardcode the library path.
1962
# Skip directories that are in the system default run-time
1964
case " $sys_lib_dlsearch_path " in
1967
case "$compile_rpath " in
1969
*) compile_rpath="$compile_rpath $absdir"
1973
case " $sys_lib_dlsearch_path " in
1976
case "$finalize_rpath " in
1978
*) finalize_rpath="$finalize_rpath $libdir"
1984
if test -n "$old_archive_from_expsyms_cmds"; then
1985
# figure out the soname
1986
set dummy $library_names
1989
libname=`eval \\$echo \"$libname_spec\"`
1990
if test -n "$soname_spec"; then
1991
eval soname=\"$soname_spec\"
1996
# Make a new name for the extract_expsyms_cmds to use
1997
newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
1999
# If the library has no export list, then create one now
2000
if test -f "$output_objdir/$soname-def"; then :
2002
$show "extracting exported symbol list from \`$soname'"
2003
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
2004
eval cmds=\"$extract_expsyms_cmds\"
2005
for cmd in $cmds; do
2008
$run eval "$cmd" || exit $?
2014
if test -f "$output_objdir/$newlib"; then :; else
2015
$show "generating import library for \`$soname'"
2016
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
2017
eval cmds=\"$old_archive_from_expsyms_cmds\"
2018
for cmd in $cmds; do
2021
$run eval "$cmd" || exit $?
2025
# make sure the library variables are pointing to the new library
2030
if test $linkmode = prog || test "$mode" != relink; then
2035
case "$hardcode_action" in
2036
immediate | unsupported)
2037
if test "$hardcode_direct" = no; then
2039
elif test "$hardcode_minus_L" = no; then
2041
*-*-sunos*) add_shlibpath="$dir" ;;
2045
elif test "$hardcode_shlibpath_var" = no; then
2046
add_shlibpath="$dir"
2053
if test "$hardcode_direct" = yes; then
2055
elif test "$hardcode_minus_L" = yes; then
2058
elif test "$hardcode_shlibpath_var" = yes; then
2059
add_shlibpath="$dir"
2068
if test "$lib_linked" != yes; then
2069
$echo "$modename: configuration error: unsupported hardcode properties"
2073
if test -n "$add_shlibpath"; then
2074
case ":$compile_shlibpath:" in
2075
*":$add_shlibpath:"*) ;;
2076
*) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
2079
if test $linkmode = prog; then
2080
test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
2081
test -n "$add" && compile_deplibs="$add $compile_deplibs"
2083
test -n "$add_dir" && deplibs="$add_dir $deplibs"
2084
test -n "$add" && deplibs="$add $deplibs"
2085
if test "$hardcode_direct" != yes && \
2086
test "$hardcode_minus_L" != yes && \
2087
test "$hardcode_shlibpath_var" = yes; then
2088
case ":$finalize_shlibpath:" in
2090
*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2096
if test $linkmode = prog || test "$mode" = relink; then
2100
# Finalize command for both is simple: just hardcode it.
2101
if test "$hardcode_direct" = yes; then
2102
add="$libdir/$linklib"
2103
elif test "$hardcode_minus_L" = yes; then
2106
elif test "$hardcode_shlibpath_var" = yes; then
2107
case ":$finalize_shlibpath:" in
2109
*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
2113
# We cannot seem to hardcode it, guess we'll fake it.
2118
if test $linkmode = prog; then
2119
test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
2120
test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
2122
test -n "$add_dir" && deplibs="$add_dir $deplibs"
2123
test -n "$add" && deplibs="$add deplibs"
2126
elif test $linkmode = prog; then
2127
# Here we assume that one of hardcode_direct or hardcode_minus_L
2128
# is not unsupported. This is valid on all known static and
2130
if test "$hardcode_direct" != unsupported; then
2131
test -n "$old_library" && linklib="$old_library"
2132
compile_deplibs="$dir/$linklib $compile_deplibs"
2133
finalize_deplibs="$dir/$linklib $finalize_deplibs"
2135
compile_deplibs="-l$name -L$dir $compile_deplibs"
2136
finalize_deplibs="-l$name -L$dir $finalize_deplibs"
2138
elif test "$build_libtool_libs" = yes; then
2139
# Not a shared library
2140
if test "$deplibs_check_method" != pass_all; then
2141
# We're trying link a shared library against a static one
2142
# but the system doesn't support it.
2143
# Just print a warning and add the library to dependency_libs so
2144
# that the program can be linked against the static library.
2146
echo "*** Warning: This library needs some functionality provided by $lib."
2147
echo "*** I have the capability to make that library automatically link in when"
2148
echo "*** you link to this library. But I can only do this if you have a"
2149
echo "*** shared version of the library, which you do not appear to have."
2151
convenience="$convenience $dir/$old_library"
2152
old_convenience="$old_convenience $dir/$old_library"
2153
deplibs="$dir/$old_library $deplibs"
2158
if test $linkmode = lib; then
2159
if test -n "$dependency_libs" &&
2160
{ test "$hardcode_into_libs" = no || test $build_old_libs = yes ||
2161
test $link_static = yes; }; then
2162
# Extract -R from dependency_libs
2164
for libdir in $dependency_libs; do
2166
-R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
2168
*" $temp_xrpath "*) ;;
2169
*) xrpath="$xrpath $temp_xrpath";;
2171
*) temp_deplibs="$temp_deplibs $libdir";;
2174
dependency_libs="$temp_deplibs"
2177
new_lib_search_path="$new_lib_search_path $absdir"
2178
# Link against this library
2179
test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
2180
# ... and its dependency_libs
2182
for deplib in $dependency_libs; do
2183
newdependency_libs="$deplib $newdependency_libs"
2184
case "$tmp_libs " in
2185
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
2187
tmp_libs="$tmp_libs $deplib"
2190
if test $link_all_deplibs != no; then
2191
# Add the search paths of all dependency libraries
2192
for deplib in $dependency_libs; do
2194
-L*) path="$deplib" ;;
2196
dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
2197
test "X$dir" = "X$deplib" && dir="."
2198
# We need an absolute path.
2200
[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
2202
absdir=`cd "$dir" && pwd`
2203
if test -z "$absdir"; then
2204
$echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
2209
if grep "^installed=no" $deplib > /dev/null; then
2210
path="-L$absdir/$objdir"
2212
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
2213
if test -z "$libdir"; then
2214
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
2217
if test "$absdir" != "$libdir"; then
2218
$echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
2225
case " $deplibs " in
2227
*) deplibs="$deplibs $path" ;;
2233
dependency_libs="$newdependency_libs"
2234
if test $pass = dlpreopen; then
2235
# Link the dlpreopened libraries before other libraries
2236
deplibs="$deplibs $save_deplibs"
2237
elif test $pass != dlopen; then
2238
# Make sure lib_search_path contains only unique directories.
2240
for dir in $new_lib_search_path; do
2241
case "$lib_search_path " in
2243
*) lib_search_path="$lib_search_path $dir" ;;
2246
lib_search_path="$lib_search_path $sys_lib_search_path"
2248
if test "$linkmode,$pass" != "prog,link"; then
2251
vars="compile_deplibs finalize_deplibs"
2253
for var in $vars dependency_libs; do
2254
# Make sure that $var contains only unique libraries
2255
# and add them in reverse order
2256
eval tmp_libs=\"\$$var\"
2258
for deplib in $tmp_libs; do
2260
-L*) new_libs="$deplib $new_libs" ;;
2262
case " $specialdeplibs " in
2263
*" $deplib "*) new_libs="$deplib $new_libs" ;;
2265
case " $new_libs " in
2267
*) new_libs="$deplib $new_libs" ;;
2275
for deplib in $new_libs; do
2278
case " $tmp_libs " in
2280
*) tmp_libs="$tmp_libs $deplib" ;;
2283
*) tmp_libs="$tmp_libs $deplib" ;;
2286
eval $var=\"$tmp_libs\"
2290
if test $linkmode = prog; then
2291
dlfiles="$newdlfiles"
2292
dlprefiles="$newdlprefiles"
2297
if test -n "$deplibs"; then
2298
$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
2301
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
2302
$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
2305
if test -n "$rpath"; then
2306
$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
2309
if test -n "$xrpath"; then
2310
$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
2313
if test -n "$vinfo"; then
2314
$echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
2317
if test -n "$release"; then
2318
$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
2321
if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
2322
$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
2325
# Now set the variables for building old libraries.
2326
build_libtool_libs=no
2328
objs="$objs$old_deplibs"
2332
# Make sure we only generate libraries of the form `libNAME.la'.
2333
case "$outputname" in
2335
name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2336
eval libname=\"$libname_spec\"
2339
if test "$module" = no; then
2340
$echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
2344
if test "$need_lib_prefix" != no; then
2345
# Add the "lib" prefix for modules if required
2346
name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
2347
eval libname=\"$libname_spec\"
2349
libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
2354
if test -n "$objs"; then
2355
if test "$deplibs_check_method" != pass_all; then
2356
$echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
2360
echo "*** Warning: Linking the shared library $output against the non-libtool"
2361
echo "*** objects $objs is not portable!"
2362
libobjs="$libobjs $objs"
2366
if test "$dlself" != no; then
2367
$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
2371
if test $# -gt 2; then
2372
$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
2377
if test -z "$rpath"; then
2378
if test "$build_libtool_libs" = yes; then
2379
# Building a libtool convenience library.
2381
oldlibs="$output_objdir/$libname.$libext $oldlibs"
2382
build_libtool_libs=convenience
2386
if test -n "$vinfo"; then
2387
$echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
2390
if test -n "$release"; then
2391
$echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
2395
# Parse the version information argument.
2396
IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
2397
set dummy $vinfo 0 0 0
2400
if test -n "$8"; then
2401
$echo "$modename: too many parameters to \`-version-info'" 1>&2
2410
# Check that each of the things are valid numbers.
2412
0 | [1-9] | [1-9][0-9]*) ;;
2414
$echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
2415
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
2421
0 | [1-9] | [1-9][0-9]*) ;;
2423
$echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
2424
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
2430
0 | [1-9] | [1-9][0-9]*) ;;
2432
$echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
2433
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
2438
if test $age -gt $current; then
2439
$echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
2440
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
2444
# Calculate the version variables.
2448
case "$version_type" in
2452
major=`expr $current - $age + 1`
2453
versuffix="$major.$revision"
2454
verstring="sgi$major.$revision"
2456
# Add in all the interfaces that we are compatible with.
2458
while test $loop != 0; do
2459
iface=`expr $revision - $loop`
2460
loop=`expr $loop - 1`
2461
verstring="sgi$major.$iface:$verstring"
2466
major=.`expr $current - $age`
2467
versuffix="$major.$age.$revision"
2471
major=`expr $current - $age`
2472
versuffix=".$current.$age.$revision"
2473
verstring="$current.$age.$revision"
2475
# Add in all the interfaces that we are compatible with.
2477
while test $loop != 0; do
2478
iface=`expr $current - $loop`
2479
loop=`expr $loop - 1`
2480
verstring="$verstring:${iface}.0"
2483
# Make executables depend on our current version.
2484
verstring="$verstring:${current}.0"
2489
versuffix=".$current.$revision"
2494
versuffix=".$current.$revision";
2499
versuffix=".$current";
2503
# Like Linux, but with '-' rather than '.', since we only
2504
# want one extension on Windows 95.
2505
major=`expr $current - $age`
2506
versuffix="-$major-$age-$revision"
2510
$echo "$modename: unknown library version type \`$version_type'" 1>&2
2511
echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
2516
# Clear the version info if we defaulted, and they specified a release.
2517
if test -z "$vinfo" && test -n "$release"; then
2520
if test "$need_version" = no; then
2527
# Remove version info from name if versioning should be avoided
2528
if test "$avoid_version" = yes && test "$need_version" = no; then
2534
# Check to see if the archive will have undefined symbols.
2535
if test "$allow_undefined" = yes; then
2536
if test "$allow_undefined_flag" = unsupported; then
2537
$echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
2538
build_libtool_libs=no
2542
# Don't allow undefined symbols.
2543
allow_undefined_flag="$no_undefined_flag"
2547
if test "$mode" != relink; then
2548
# Remove our outputs.
2549
$show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
2550
$run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
2553
# Now set the variables for building old libraries.
2554
if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
2555
oldlibs="$oldlibs $output_objdir/$libname.$libext"
2557
# Transform .lo files to .o files.
2558
oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
2561
# Eliminate all temporary directories.
2562
for path in $uninst_path; do
2563
lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`
2564
deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`
2565
dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
2568
if test -n "$xrpath"; then
2569
# If the user specified any rpath flags, then add them.
2571
for libdir in $xrpath; do
2572
temp_xrpath="$temp_xrpath -R$libdir"
2573
case "$finalize_rpath " in
2575
*) finalize_rpath="$finalize_rpath $libdir" ;;
2578
if test "$hardcode_into_libs" = no || test $build_old_libs = yes; then
2579
dependency_libs="$temp_xrpath $dependency_libs"
2583
# Make sure dlfiles contains only unique files that won't be dlpreopened
2584
old_dlfiles="$dlfiles"
2586
for lib in $old_dlfiles; do
2587
case " $dlprefiles $dlfiles " in
2589
*) dlfiles="$dlfiles $lib" ;;
2593
# Make sure dlprefiles contains only unique files
2594
old_dlprefiles="$dlprefiles"
2596
for lib in $old_dlprefiles; do
2597
case "$dlprefiles " in
2599
*) dlprefiles="$dlprefiles $lib" ;;
2603
if test "$build_libtool_libs" = yes; then
2604
if test -n "$rpath"; then
2606
*-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
2607
# these systems don't actually have a c library (as such)!
2610
# Add libc to deplibs on all other systems.
2611
deplibs="$deplibs -lc"
2616
# Transform deplibs into only deplibs that can be linked in shared.
2618
libname_save=$libname
2619
release_save=$release
2620
versuffix_save=$versuffix
2622
# I'm not sure if I'm treating the release correctly. I think
2623
# release should show up in the -l (ie -lgmp5) so we don't want to
2624
# add it in twice. Is that correct?
2630
case "$deplibs_check_method" in
2632
# Don't check for shared/static. Everything works.
2633
# This might be a little naive. We might want to check
2634
# whether the library exists or not. But this is on
2635
# osf3 & osf4 and I'm not really sure... Just
2636
# implementing what was already the behaviour.
2640
# This code stresses the "libraries are programs" paradigm to its
2641
# limits. Maybe even breaks it. We compile a program, linking it
2642
# against the deplibs as a proxy for the library. Then we can check
2643
# whether they linked in statically or dynamically with ldd.
2645
cat > conftest.c <<EOF
2646
int main() { return 0; }
2649
$CC -o conftest conftest.c $deplibs
2650
if test $? -eq 0 ; then
2651
ldd_output=`ldd conftest`
2652
for i in $deplibs; do
2653
name="`expr $i : '-l\(.*\)'`"
2654
# If $name is empty we are operating on a -L argument.
2655
if test "$name" != "" ; then
2656
libname=`eval \\$echo \"$libname_spec\"`
2657
deplib_matches=`eval \\$echo \"$library_names_spec\"`
2658
set dummy $deplib_matches
2660
if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
2661
newdeplibs="$newdeplibs $i"
2665
echo "*** Warning: This library needs some functionality provided by $i."
2666
echo "*** I have the capability to make that library automatically link in when"
2667
echo "*** you link to this library. But I can only do this if you have a"
2668
echo "*** shared version of the library, which you do not appear to have."
2671
newdeplibs="$newdeplibs $i"
2675
# Error occured in the first compile. Let's try to salvage the situation:
2676
# Compile a seperate program for each library.
2677
for i in $deplibs; do
2678
name="`expr $i : '-l\(.*\)'`"
2679
# If $name is empty we are operating on a -L argument.
2680
if test "$name" != "" ; then
2682
$CC -o conftest conftest.c $i
2684
if test $? -eq 0 ; then
2685
ldd_output=`ldd conftest`
2686
libname=`eval \\$echo \"$libname_spec\"`
2687
deplib_matches=`eval \\$echo \"$library_names_spec\"`
2688
set dummy $deplib_matches
2690
if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
2691
newdeplibs="$newdeplibs $i"
2695
echo "*** Warning: This library needs some functionality provided by $i."
2696
echo "*** I have the capability to make that library automatically link in when"
2697
echo "*** you link to this library. But I can only do this if you have a"
2698
echo "*** shared version of the library, which you do not appear to have."
2703
echo "*** Warning! Library $i is needed by this library but I was not able to"
2704
echo "*** make it link in! You will probably need to install it or some"
2705
echo "*** library that it depends on before this library will be fully"
2706
echo "*** functional. Installing it before continuing would be even better."
2709
newdeplibs="$newdeplibs $i"
2715
set dummy $deplibs_check_method
2716
file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2717
for a_deplib in $deplibs; do
2718
name="`expr $a_deplib : '-l\(.*\)'`"
2719
# If $name is empty we are operating on a -L argument.
2720
if test "$name" != "" ; then
2721
libname=`eval \\$echo \"$libname_spec\"`
2722
for i in $lib_search_path; do
2723
potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
2724
for potent_lib in $potential_libs; do
2725
# Follow soft links.
2726
if ls -lLd "$potent_lib" 2>/dev/null \
2727
| grep " -> " >/dev/null; then
2730
# The statement above tries to avoid entering an
2731
# endless loop below, in case of cyclic links.
2732
# We might still enter an endless loop, since a link
2733
# loop can be closed while we follow links,
2735
potlib="$potent_lib"
2736
while test -h "$potlib" 2>/dev/null; do
2737
potliblink=`ls -ld $potlib | sed 's/.* -> //'`
2738
case "$potliblink" in
2739
[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
2740
*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
2743
if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
2745
| egrep "$file_magic_regex" > /dev/null; then
2746
newdeplibs="$newdeplibs $a_deplib"
2752
if test -n "$a_deplib" ; then
2755
echo "*** Warning: This library needs some functionality provided by $a_deplib."
2756
echo "*** I have the capability to make that library automatically link in when"
2757
echo "*** you link to this library. But I can only do this if you have a"
2758
echo "*** shared version of the library, which you do not appear to have."
2761
# Add a -L argument.
2762
newdeplibs="$newdeplibs $a_deplib"
2764
done # Gone through all deplibs.
2768
if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
2769
-e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
2770
grep . >/dev/null; then
2772
if test "X$deplibs_check_method" = "Xnone"; then
2773
echo "*** Warning: inter-library dependencies are not supported in this platform."
2775
echo "*** Warning: inter-library dependencies are not known to be supported."
2777
echo "*** All declared inter-library dependencies are being dropped."
2782
versuffix=$versuffix_save
2784
release=$release_save
2785
libname=$libname_save
2788
if test "$droppeddeps" = yes; then
2789
if test "$module" = yes; then
2791
echo "*** Warning: libtool could not satisfy all declared inter-library"
2792
echo "*** dependencies of module $libname. Therefore, libtool will create"
2793
echo "*** a static module, that should work as long as the dlopening"
2794
echo "*** application is linked with the -dlopen flag."
2795
if test -z "$global_symbol_pipe"; then
2797
echo "*** However, this would only work if libtool was able to extract symbol"
2798
echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2799
echo "*** not find such a program. So, this module is probably useless."
2800
echo "*** \`nm' from GNU binutils and a full rebuild may help."
2802
if test "$build_old_libs" = no; then
2803
oldlibs="$output_objdir/$libname.$libext"
2804
build_libtool_libs=module
2807
build_libtool_libs=no
2810
echo "*** The inter-library dependencies that have been dropped here will be"
2811
echo "*** automatically added whenever a program is linked with this library"
2812
echo "*** or is declared to -dlopen it."
2815
# Done checking deplibs!
2819
# All the library-specific variables (install_libdir is set above).
2824
# Test again, we may have decided not to build it any more
2825
if test "$build_libtool_libs" = yes; then
2826
if test "$hardcode_into_libs" != no; then
2827
# Hardcode the library paths
2830
rpath="$finalize_rpath"
2831
test "$mode" != relink && rpath="$compile_rpath$rpath"
2832
for libdir in $rpath; do
2833
if test -n "$hardcode_libdir_flag_spec"; then
2834
if test -n "$hardcode_libdir_separator"; then
2835
if test -z "$hardcode_libdirs"; then
2836
hardcode_libdirs="$libdir"
2838
# Just accumulate the unique libdirs.
2839
case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
2840
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
2843
hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
2848
eval flag=\"$hardcode_libdir_flag_spec\"
2849
dep_rpath="$dep_rpath $flag"
2851
elif test -n "$runpath_var"; then
2852
case "$perm_rpath " in
2854
*) perm_rpath="$perm_rpath $libdir" ;;
2858
# Substitute the hardcoded libdirs into the rpath.
2859
if test -n "$hardcode_libdir_separator" &&
2860
test -n "$hardcode_libdirs"; then
2861
libdir="$hardcode_libdirs"
2862
eval dep_rpath=\"$hardcode_libdir_flag_spec\"
2864
if test -n "$runpath_var" && test -n "$perm_rpath"; then
2865
# We should set the runpath_var.
2867
for dir in $perm_rpath; do
2870
eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
2872
test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
2875
shlibpath="$finalize_shlibpath"
2876
test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
2877
if test -n "$shlibpath"; then
2878
eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
2881
# Get the real and link names of the library.
2882
eval library_names=\"$library_names_spec\"
2883
set dummy $library_names
2887
if test -n "$soname_spec"; then
2888
eval soname=\"$soname_spec\"
2893
lib="$output_objdir/$realname"
2896
linknames="$linknames $link"
2899
# Ensure that we have .o objects for linkers which dislike .lo
2900
# (e.g. aix) in case we are running --disable-static
2901
for obj in $libobjs; do
2902
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
2903
if test "X$xdir" = "X$obj"; then
2908
baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
2909
oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
2910
if test ! -f $xdir/$oldobj; then
2911
$show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
2912
$run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
2916
# Use standard objects if they are pic
2917
test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2919
# Prepare the list of exported symbols
2920
if test -z "$export_symbols"; then
2921
if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
2922
$show "generating symbol list for \`$libname.la'"
2923
export_symbols="$output_objdir/$libname.exp"
2924
$run $rm $export_symbols
2925
eval cmds=\"$export_symbols_cmds\"
2926
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
2927
for cmd in $cmds; do
2930
$run eval "$cmd" || exit $?
2933
if test -n "$export_symbols_regex"; then
2934
$show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
2935
$run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
2936
$show "$mv \"${export_symbols}T\" \"$export_symbols\""
2937
$run eval '$mv "${export_symbols}T" "$export_symbols"'
2942
if test -n "$export_symbols" && test -n "$include_expsyms"; then
2943
$run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
2946
if test -n "$convenience"; then
2947
if test -n "$whole_archive_flag_spec"; then
2948
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
2950
gentop="$output_objdir/${outputname}x"
2951
$show "${rm}r $gentop"
2952
$run ${rm}r "$gentop"
2953
$show "mkdir $gentop"
2954
$run mkdir "$gentop"
2956
if test $status -ne 0 && test ! -d "$gentop"; then
2959
generated="$generated $gentop"
2961
for xlib in $convenience; do
2962
# Extract the objects.
2964
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
2965
*) xabs=`pwd`"/$xlib" ;;
2967
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
2968
xdir="$gentop/$xlib"
2970
$show "${rm}r $xdir"
2975
if test $status -ne 0 && test ! -d "$xdir"; then
2978
$show "(cd $xdir && $AR x $xabs)"
2979
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
2981
libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
2986
if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
2987
eval flag=\"$thread_safe_flag_spec\"
2988
linker_flags="$linker_flags $flag"
2991
# Make a backup of the uninstalled library when relinking
2992
if test "$mode" = relink && test "$hardcode_into_libs" = all; then
2993
$run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
2996
# Do each of the archive commands.
2997
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
2998
eval cmds=\"$archive_expsym_cmds\"
3000
eval cmds=\"$archive_cmds\"
3002
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3003
for cmd in $cmds; do
3006
$run eval "$cmd" || exit $?
3010
# Restore the uninstalled library and exit
3011
if test "$mode" = relink && test "$hardcode_into_libs" = all; then
3012
$run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
3016
# Create links to the real library.
3017
for linkname in $linknames; do
3018
if test "$realname" != "$linkname"; then
3019
$show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
3020
$run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
3024
# If -module or -export-dynamic was specified, set the dlname.
3025
if test "$module" = yes || test "$export_dynamic" = yes; then
3026
# On all known operating systems, these are identical.
3033
if test -n "$deplibs"; then
3034
$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
3037
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3038
$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
3041
if test -n "$rpath"; then
3042
$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
3045
if test -n "$xrpath"; then
3046
$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
3049
if test -n "$vinfo"; then
3050
$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
3053
if test -n "$release"; then
3054
$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
3059
if test -n "$objs$old_deplibs"; then
3060
$echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
3064
obj=`$echo "X$output" | $Xsed -e "$lo2o"`
3072
# Delete the old objects.
3073
$run $rm $obj $libobj
3075
# Objects from convenience libraries. This assumes
3076
# single-version convenience libraries. Whenever we create
3077
# different ones for PIC/non-PIC, this we'll have to duplicate
3081
# reload_cmds runs $LD directly, so let us get rid of
3082
# -Wl from whole_archive_flag_spec
3085
if test -n "$convenience"; then
3086
if test -n "$whole_archive_flag_spec"; then
3087
eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
3089
gentop="$output_objdir/${obj}x"
3090
$show "${rm}r $gentop"
3091
$run ${rm}r "$gentop"
3092
$show "mkdir $gentop"
3093
$run mkdir "$gentop"
3095
if test $status -ne 0 && test ! -d "$gentop"; then
3098
generated="$generated $gentop"
3100
for xlib in $convenience; do
3101
# Extract the objects.
3103
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3104
*) xabs=`pwd`"/$xlib" ;;
3106
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3107
xdir="$gentop/$xlib"
3109
$show "${rm}r $xdir"
3114
if test $status -ne 0 && test ! -d "$xdir"; then
3117
$show "(cd $xdir && $AR x $xabs)"
3118
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
3120
reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
3125
# Create the old-style object.
3126
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
3129
eval cmds=\"$reload_cmds\"
3130
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3131
for cmd in $cmds; do
3134
$run eval "$cmd" || exit $?
3138
# Exit if we aren't doing a library object file.
3139
if test -z "$libobj"; then
3140
if test -n "$gentop"; then
3141
$show "${rm}r $gentop"
3148
if test "$build_libtool_libs" != yes; then
3149
if test -n "$gentop"; then
3150
$show "${rm}r $gentop"
3154
# Create an invalid libtool object if no PIC, so that we don't
3155
# accidentally link it into a program.
3156
$show "echo timestamp > $libobj"
3157
$run eval "echo timestamp > $libobj" || exit $?
3161
if test -n "$pic_flag" || test "$pic_mode" != default; then
3162
# Only do commands if we really have different PIC objects.
3163
reload_objs="$libobjs $reload_conv_objs"
3165
eval cmds=\"$reload_cmds\"
3166
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3167
for cmd in $cmds; do
3170
$run eval "$cmd" || exit $?
3174
# Just create a symlink.
3177
xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
3178
if test "X$xdir" = "X$libobj"; then
3183
baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
3184
oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
3185
$show "(cd $xdir && $LN_S $oldobj $baseobj)"
3186
$run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
3189
if test -n "$gentop"; then
3190
$show "${rm}r $gentop"
3198
if test -n "$vinfo"; then
3199
$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
3202
if test -n "$release"; then
3203
$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
3206
if test "$preload" = yes; then
3207
if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
3208
test "$dlopen_self_static" = unknown; then
3209
$echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
3213
compile_command="$compile_command $compile_deplibs"
3214
finalize_command="$finalize_command $finalize_deplibs"
3216
if test -n "$rpath$xrpath"; then
3217
# If the user specified any rpath flags, then add them.
3218
for libdir in $rpath $xrpath; do
3219
# This is the magic to use -rpath.
3220
case "$finalize_rpath " in
3222
*) finalize_rpath="$finalize_rpath $libdir" ;;
3227
# Now hardcode the library paths
3230
for libdir in $compile_rpath $finalize_rpath; do
3231
if test -n "$hardcode_libdir_flag_spec"; then
3232
if test -n "$hardcode_libdir_separator"; then
3233
if test -z "$hardcode_libdirs"; then
3234
hardcode_libdirs="$libdir"
3236
# Just accumulate the unique libdirs.
3237
case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
3238
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3241
hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3246
eval flag=\"$hardcode_libdir_flag_spec\"
3247
rpath="$rpath $flag"
3249
elif test -n "$runpath_var"; then
3250
case "$perm_rpath " in
3252
*) perm_rpath="$perm_rpath $libdir" ;;
3256
*-*-cygwin* | *-*-mingw* | *-*-os2*)
3257
case ":$dllsearchpath:" in
3259
*) dllsearchpath="$dllsearchpath:$libdir";;
3264
# Substitute the hardcoded libdirs into the rpath.
3265
if test -n "$hardcode_libdir_separator" &&
3266
test -n "$hardcode_libdirs"; then
3267
libdir="$hardcode_libdirs"
3268
eval rpath=\" $hardcode_libdir_flag_spec\"
3270
compile_rpath="$rpath"
3274
for libdir in $finalize_rpath; do
3275
if test -n "$hardcode_libdir_flag_spec"; then
3276
if test -n "$hardcode_libdir_separator"; then
3277
if test -z "$hardcode_libdirs"; then
3278
hardcode_libdirs="$libdir"
3280
# Just accumulate the unique libdirs.
3281
case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
3282
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3285
hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3290
eval flag=\"$hardcode_libdir_flag_spec\"
3291
rpath="$rpath $flag"
3293
elif test -n "$runpath_var"; then
3294
case "$finalize_perm_rpath " in
3296
*) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
3300
# Substitute the hardcoded libdirs into the rpath.
3301
if test -n "$hardcode_libdir_separator" &&
3302
test -n "$hardcode_libdirs"; then
3303
libdir="$hardcode_libdirs"
3304
eval rpath=\" $hardcode_libdir_flag_spec\"
3306
finalize_rpath="$rpath"
3308
if test -n "$libobjs" && test "$build_old_libs" = yes; then
3309
# Transform all the library objects into standard objects.
3310
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3311
finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3315
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3316
if test -n "$NM" && test -n "$global_symbol_pipe"; then
3317
dlsyms="${outputname}S.c"
3319
$echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
3323
if test -n "$dlsyms"; then
3327
# Discover the nlist of each of the dlfiles.
3328
nlist="$output_objdir/${outputname}.nm"
3330
$show "$rm $nlist ${nlist}S ${nlist}T"
3331
$run $rm "$nlist" "${nlist}S" "${nlist}T"
3333
# Parse the name list into a source file.
3334
$show "creating $output_objdir/$dlsyms"
3336
test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
3337
/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
3338
/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
3344
/* Prevent the only kind of declaration conflicts we can make. */
3345
#define lt_preloaded_symbols some_other_symbol
3347
/* External symbol declarations for the compiler. */\
3350
if test "$dlself" = yes; then
3351
$show "generating symbol list for \`$output'"
3353
test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
3355
# Add our own program objects to the symbol list.
3356
progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3357
for arg in $progfiles; do
3358
$show "extracting global C symbols from \`$arg'"
3359
$run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
3362
if test -n "$exclude_expsyms"; then
3363
$run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
3364
$run eval '$mv "$nlist"T "$nlist"'
3367
if test -n "$export_symbols_regex"; then
3368
$run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
3369
$run eval '$mv "$nlist"T "$nlist"'
3372
# Prepare the list of exported symbols
3373
if test -z "$export_symbols"; then
3374
export_symbols="$output_objdir/$output.exp"
3375
$run $rm $export_symbols
3376
$run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
3378
$run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
3379
$run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
3380
$run eval 'mv "$nlist"T "$nlist"'
3384
for arg in $dlprefiles; do
3385
$show "extracting global C symbols from \`$arg'"
3386
name=`echo "$arg" | sed -e 's%^.*/%%'`
3387
$run eval 'echo ": $name " >> "$nlist"'
3388
$run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
3391
if test -z "$run"; then
3392
# Make sure we have at least an empty file.
3393
test -f "$nlist" || : > "$nlist"
3395
if test -n "$exclude_expsyms"; then
3396
egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
3397
$mv "$nlist"T "$nlist"
3400
# Try sorting and uniquifying the output.
3401
if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
3404
grep -v "^: " < "$nlist" > "$nlist"S
3407
if test -f "$nlist"S; then
3408
eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
3410
echo '/* NONE */' >> "$output_objdir/$dlsyms"
3413
$echo >> "$output_objdir/$dlsyms" "\
3415
#undef lt_preloaded_symbols
3417
#if defined (__STDC__) && __STDC__
3418
# define lt_ptr_t void *
3420
# define lt_ptr_t char *
3424
/* The mapping between symbol names and symbols. */
3425
extern const struct {
3429
lt_preloaded_symbols[] =
3433
sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \
3434
-e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \
3435
< "$nlist" >> "$output_objdir/$dlsyms"
3437
$echo >> "$output_objdir/$dlsyms" "\
3441
/* This works around a problem in FreeBSD linker */
3442
#ifdef FREEBSD_WORKAROUND
3443
static const void *lt_preloaded_setup() {
3444
return lt_preloaded_symbols;
3454
pic_flag_for_symtable=
3456
# compiling the symbol table file with pic_flag works around
3457
# a FreeBSD bug that causes programs to crash when -lm is
3458
# linked before any other PIC object. But we must not use
3459
# pic_flag when linking with -static. The problem exists in
3460
# FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
3461
*-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
3462
case "$compile_command " in
3464
*) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
3467
case "$compile_command " in
3469
*) pic_flag_for_symtable=" $pic_flag -DPIC";;
3473
# Now compile the dynamic symbol file.
3474
$show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
3475
$run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
3477
# Clean up the generated files.
3478
$show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
3479
$run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
3481
# Transform the symbol file into the correct name.
3482
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
3483
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
3486
$echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
3491
# We keep going just in case the user didn't refer to
3492
# lt_preloaded_symbols. The linker will fail if global_symbol_pipe
3493
# really was required.
3495
# Nullify the symbol file.
3496
compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
3497
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
3500
if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
3501
# Replace the output file specification.
3502
compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
3503
link_command="$compile_command$compile_rpath"
3505
# We have no uninstalled library dependencies, so finalize right now.
3506
$show "$link_command"
3507
$run eval "$link_command"
3510
# Delete the generated files.
3511
if test -n "$dlsyms"; then
3512
$show "$rm $output_objdir/${outputname}S.${objext}"
3513
$run $rm "$output_objdir/${outputname}S.${objext}"
3519
if test -n "$shlibpath_var"; then
3520
# We should set the shlibpath_var
3522
for dir in $temp_rpath; do
3524
[\\/]* | [A-Za-z]:[\\/]*)
3529
# Relative path: add a thisdir entry.
3530
rpath="$rpath\$thisdir/$dir:"
3537
if test -n "$compile_shlibpath$finalize_shlibpath"; then
3538
compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
3540
if test -n "$finalize_shlibpath"; then
3541
finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
3546
if test -n "$runpath_var"; then
3547
if test -n "$perm_rpath"; then
3548
# We should set the runpath_var.
3550
for dir in $perm_rpath; do
3553
compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
3555
if test -n "$finalize_perm_rpath"; then
3556
# We should set the runpath_var.
3558
for dir in $finalize_perm_rpath; do
3561
finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
3565
if test "$no_install" = yes; then
3566
# We don't need to create a wrapper script.
3567
link_command="$compile_var$compile_command$compile_rpath"
3568
# Replace the output file specification.
3569
link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
3570
# Delete the old output file.
3572
# Link the executable and exit
3573
$show "$link_command"
3574
$run eval "$link_command" || exit $?
3578
if test "$hardcode_action" = relink || test "$hardcode_into_libs" = all; then
3579
# Fast installation is not supported
3580
link_command="$compile_var$compile_command$compile_rpath"
3581
relink_command="$finalize_var$finalize_command$finalize_rpath"
3583
$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
3584
$echo "$modename: \`$output' will be relinked during installation" 1>&2
3586
if test "$fast_install" != no; then
3587
link_command="$finalize_var$compile_command$finalize_rpath"
3588
if test "$fast_install" = yes; then
3589
relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
3591
# fast_install is set to needless
3595
link_command="$compile_var$compile_command$compile_rpath"
3596
relink_command="$finalize_var$finalize_command$finalize_rpath"
3600
# Replace the output file specification.
3601
link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
3603
# Delete the old output files.
3604
$run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
3606
$show "$link_command"
3607
$run eval "$link_command" || exit $?
3609
# Now create the wrapper script.
3610
$show "creating $output"
3612
# Quote the relink command for shipping.
3613
if test -n "$relink_command"; then
3614
relink_command="cd `pwd`; $relink_command"
3615
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
3618
# Quote $echo for shipping.
3619
if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
3621
[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
3622
*) qecho="$SHELL `pwd`/$0 --fallback-echo";;
3624
qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
3626
qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
3629
# Only actually do things if our run command is non-null.
3630
if test -z "$run"; then
3631
# win32 will think the script is a binary if it has
3632
# a .exe suffix, so we strip it off here.
3634
*.exe) output=`echo $output|sed 's,.exe$,,'` ;;
3637
trap "$rm $output; exit 1" 1 2 15
3642
# $output - temporary wrapper script for $objdir/$outputname
3643
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
3645
# The $output program cannot be directly executed until all the libtool
3646
# libraries that it depends on are installed.
3648
# This wrapper script should never be moved out of the build directory.
3649
# If it is, it will not operate correctly.
3651
# Sed substitution that helps us do robust quoting. It backslashifies
3652
# metacharacters that are still active within double-quoted strings.
3653
Xsed='sed -e 1s/^X//'
3654
sed_quote_subst='$sed_quote_subst'
3656
# The HP-UX ksh and POSIX shell print the target directory to stdout
3658
if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
3660
relink_command=\"$relink_command\"
3662
# This environment variable determines our operation mode.
3663
if test \"\$libtool_install_magic\" = \"$magic\"; then
3664
# install mode needs the following variable:
3665
link_against_libtool_libs='$link_against_libtool_libs'
3667
# When we are sourced in execute mode, \$file and \$echo are already set.
3668
if test \"\$libtool_execute_magic\" != \"$magic\"; then
3671
# Make sure echo works.
3672
if test \"X\$1\" = X--no-reexec; then
3673
# Discard the --no-reexec flag, and continue.
3675
elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
3676
# Yippee, \$echo works!
3679
# Restart under the correct shell, and then maybe \$echo will work.
3680
exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
3686
# Find the directory that this script lives in.
3687
thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
3688
test \"x\$thisdir\" = \"x\$file\" && thisdir=.
3690
# Follow symbolic links until we get to the real thisdir.
3691
file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
3692
while test -n \"\$file\"; do
3693
destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
3695
# If there was a directory component, then change thisdir.
3696
if test \"x\$destdir\" != \"x\$file\"; then
3697
case \"\$destdir\" in
3698
[\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;;
3699
*) thisdir=\"\$thisdir/\$destdir\" ;;
3703
file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
3704
file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
3707
# Try to get the absolute directory name.
3708
absdir=\`cd \"\$thisdir\" && pwd\`
3709
test -n \"\$absdir\" && thisdir=\"\$absdir\"
3712
if test "$fast_install" = yes; then
3714
program=lt-'$outputname'
3715
progdir=\"\$thisdir/$objdir\"
3717
if test ! -f \"\$progdir/\$program\" || \\
3718
{ file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
3719
test \"X\$file\" != \"X\$progdir/\$program\"; }; then
3721
file=\"\$\$-\$program\"
3723
if test ! -d \"\$progdir\"; then
3724
$mkdir \"\$progdir\"
3726
$rm \"\$progdir/\$file\"
3731
# relink executable if necessary
3732
if test -n \"\$relink_command\"; then
3733
if (eval \$relink_command); then :
3735
$rm \"\$progdir/\$file\"
3740
$mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
3741
{ $rm \"\$progdir/\$program\";
3742
$mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
3743
$rm \"\$progdir/\$file\"
3747
program='$outputname'
3748
progdir=\"\$thisdir/$objdir\"
3754
if test -f \"\$progdir/\$program\"; then"
3756
# Export our shlibpath_var if we have one.
3757
if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
3759
# Add our own library path to $shlibpath_var
3760
$shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
3762
# Some systems cannot cope with colon-terminated $shlibpath_var
3763
# The second colon is a workaround for a bug in BeOS R4 sed
3764
$shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
3766
export $shlibpath_var
3770
# fixup the dll searchpath if we need to.
3771
if test -n "$dllsearchpath"; then
3773
# Add the dll search path components to the executable PATH
3774
PATH=$dllsearchpath:\$PATH
3779
if test \"\$libtool_execute_magic\" != \"$magic\"; then
3780
# Run the actual program with our arguments.
3783
*-*-cygwin* | *-*-mingw | *-*-os2*)
3784
# win32 systems need to use the prog path for dll
3787
exec \$progdir\\\\\$program \${1+\"\$@\"}
3792
# Export the path to the program.
3793
PATH=\"\$progdir:\$PATH\"
3796
exec \$program \${1+\"\$@\"}
3801
\$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
3805
# The program doesn't exist.
3806
\$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
3807
\$echo \"This script is just a wrapper for \$program.\" 1>&2
3808
echo \"See the $PACKAGE documentation for more information.\" 1>&2
3819
# See if we need to build an old-fashioned archive.
3820
for oldlib in $oldlibs; do
3822
if test "$build_libtool_libs" = convenience; then
3823
oldobjs="$libobjs_save"
3824
addlibs="$convenience"
3825
build_libtool_libs=no
3827
if test "$build_libtool_libs" = module; then
3828
oldobjs="$libobjs_save"
3829
build_libtool_libs=no
3831
oldobjs="$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
3833
addlibs="$old_convenience"
3836
if test -n "$addlibs"; then
3837
gentop="$output_objdir/${outputname}x"
3838
$show "${rm}r $gentop"
3839
$run ${rm}r "$gentop"
3840
$show "mkdir $gentop"
3841
$run mkdir "$gentop"
3843
if test $status -ne 0 && test ! -d "$gentop"; then
3846
generated="$generated $gentop"
3848
# Add in members from convenience archives.
3849
for xlib in $addlibs; do
3850
# Extract the objects.
3852
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3853
*) xabs=`pwd`"/$xlib" ;;
3855
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3856
xdir="$gentop/$xlib"
3858
$show "${rm}r $xdir"
3863
if test $status -ne 0 && test ! -d "$xdir"; then
3866
$show "(cd $xdir && $AR x $xabs)"
3867
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
3869
oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
3873
# Do each command in the archive commands.
3874
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
3875
eval cmds=\"$old_archive_from_new_cmds\"
3877
# Ensure that we have .o objects in place in case we decided
3878
# not to build a shared library, and have fallen back to building
3879
# static libs even though --disable-static was passed!
3880
for oldobj in $oldobjs; do
3881
if test ! -f $oldobj; then
3882
xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
3883
if test "X$xdir" = "X$oldobj"; then
3888
baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
3889
obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
3890
$show "(cd $xdir && ${LN_S} $obj $baseobj)"
3891
$run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
3895
eval cmds=\"$old_archive_cmds\"
3897
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3898
for cmd in $cmds; do
3901
$run eval "$cmd" || exit $?
3906
if test -n "$generated"; then
3907
$show "${rm}r$generated"
3908
$run ${rm}r$generated
3911
# Now create the libtool archive.
3915
test "$build_old_libs" = yes && old_library="$libname.$libext"
3916
$show "creating $output"
3918
# Quote the link command for shipping.
3919
relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
3920
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
3922
# Only create the output if not a dry run.
3923
if test -z "$run"; then
3924
for installed in no yes; do
3925
if test "$installed" = yes; then
3926
if test -z "$install_libdir"; then
3929
output="$output_objdir/$outputname"i
3930
# Replace all uninstalled libtool libraries with the installed ones
3932
for deplib in $dependency_libs; do
3935
name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
3936
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
3937
if test -z "$libdir"; then
3938
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
3941
newdependency_libs="$newdependency_libs $libdir/$name"
3943
*) newdependency_libs="$newdependency_libs $deplib" ;;
3946
dependency_libs="$newdependency_libs"
3948
for lib in $dlfiles; do
3949
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
3950
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
3951
if test -z "$libdir"; then
3952
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
3955
newdlfiles="$newdlfiles $libdir/$name"
3957
dlfiles="$newdlfiles"
3959
for lib in $dlprefiles; do
3960
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
3961
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
3962
if test -z "$libdir"; then
3963
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
3966
newdlprefiles="$newdlprefiles $libdir/$name"
3968
dlprefiles="$newdlprefiles"
3972
# $outputname - a libtool library file
3973
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
3975
# Please DO NOT delete this file!
3976
# It is necessary for linking the library.
3978
# The name that we can dlopen(3).
3981
# Names of this library.
3982
library_names='$library_names'
3984
# The name of the static archive.
3985
old_library='$old_library'
3987
# Libraries that this one depends upon.
3988
dependency_libs='$dependency_libs'
3990
# Version information for $libname.
3995
# Is this an already installed library?
3996
installed=$installed
3998
# Files to dlopen/dlpreopen
4000
dlpreopen='$dlprefiles'
4002
# Directory that this library needs to be installed in:
4003
libdir='$install_libdir'"
4004
if test "$installed" = no; then
4006
relink_command=\"$relink_command\""
4011
# Do a symbolic link so that the libtool archive can be found in
4012
# LD_LIBRARY_PATH before the program is installed.
4013
$show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
4014
$run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
4020
# libtool install mode
4022
modename="$modename: install"
4024
# There may be an optional sh(1) argument at the beginning of
4025
# install_prog (especially on Windows NT).
4026
if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then
4027
# Aesthetically quote it.
4028
arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
4030
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
4034
install_prog="$arg "
4042
# The real first argument should be the name of the installation program.
4043
# Aesthetically quote it.
4044
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
4046
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
4050
install_prog="$install_prog$arg"
4052
# We need to accept at least all the BSD install flags.
4062
if test -n "$dest"; then
4063
files="$files $dest"
4081
# If the previous option needed an argument, then skip it.
4082
if test -n "$prev"; then
4091
# Aesthetically quote the argument.
4092
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
4094
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
4098
install_prog="$install_prog $arg"
4101
if test -z "$install_prog"; then
4102
$echo "$modename: you must specify an install program" 1>&2
4107
if test -n "$prev"; then
4108
$echo "$modename: the \`$prev' option requires an argument" 1>&2
4113
if test -z "$files"; then
4114
if test -z "$dest"; then
4115
$echo "$modename: no file or destination specified" 1>&2
4117
$echo "$modename: you must specify a destination" 1>&2
4123
# Strip any trailing slash from the destination.
4124
dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
4126
# Check to see that the destination is a directory.
4127
test -d "$dest" && isdir=yes
4128
if test "$isdir" = yes; then
4132
destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
4133
test "X$destdir" = "X$dest" && destdir=.
4134
destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
4136
# Not a directory, so check to see that there is only one file specified.
4138
if test $# -gt 2; then
4139
$echo "$modename: \`$dest' is not a directory" 1>&2
4145
[\\/]* | [A-Za-z]:[\\/]*) ;;
4147
for file in $files; do
4151
$echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
4160
# This variable tells wrapper scripts just to set variables rather
4161
# than running their programs.
4162
libtool_install_magic="$magic"
4167
for file in $files; do
4169
# Do each installation.
4172
# Do the static libraries later.
4173
staticlibs="$staticlibs $file"
4177
# Check to see that this really is a libtool archive.
4178
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
4180
$echo "$modename: \`$file' is not a valid libtool archive" 1>&2
4188
# If there is no directory component, then add one.
4190
*/* | *\\*) . $file ;;
4194
# Add the libdir to current_libdirs if it is the destination.
4195
if test "X$destdir" = "X$libdir"; then
4196
case "$current_libdirs " in
4198
*) current_libdirs="$current_libdirs $libdir" ;;
4201
# Note the libdir as a future libdir.
4202
case "$future_libdirs " in
4204
*) future_libdirs="$future_libdirs $libdir" ;;
4208
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
4209
test "X$dir" = "X$file/" && dir=
4212
if test "$hardcode_into_libs" = all; then
4213
if test -z "$relink_command"; then
4214
$echo "$modename: invalid libtool pseudo library \`$file'" 1>&2
4217
$echo "$modename: warning: relinking \`$file'" 1>&2
4218
$show "$relink_command"
4219
if $run eval "$relink_command"; then :
4221
$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
4226
# See the names of the shared library.
4227
set dummy $library_names
4228
if test -n "$2"; then
4234
test "$hardcode_into_libs" = all && srcname="$realname"T
4236
# Install the shared library and build the symlinks.
4237
$show "$install_prog $dir/$srcname $destdir/$realname"
4238
$run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
4239
if test -n "$stripme" && test -n "$striplib"; then
4240
$show "$striplib $destdir/$realname"
4241
$run eval "$striplib $destdir/$realname" || exit $?
4244
if test $# -gt 0; then
4245
# Delete the old symlinks, and create new ones.
4248
if test "$linkname" != "$realname"; then
4249
$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
4250
$run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
4255
# Do each command in the postinstall commands.
4256
lib="$destdir/$realname"
4257
eval cmds=\"$postinstall_cmds\"
4258
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
4259
for cmd in $cmds; do
4262
$run eval "$cmd" || exit $?
4267
# Install the pseudo-library for information purposes.
4268
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4269
instname="$dir/$name"i
4270
$show "$install_prog $instname $destdir/$name"
4271
$run eval "$install_prog $instname $destdir/$name" || exit $?
4273
# Maybe install the static library, too.
4274
test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
4278
# Install (i.e. copy) a libtool object.
4280
# Figure out destination file name, if it wasn't already specified.
4281
if test -n "$destname"; then
4282
destfile="$destdir/$destname"
4284
destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4285
destfile="$destdir/$destfile"
4288
# Deduce the name of the destination old-style object file.
4291
staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
4294
staticdest="$destfile"
4298
$echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
4304
# Install the libtool object if requested.
4305
if test -n "$destfile"; then
4306
$show "$install_prog $file $destfile"
4307
$run eval "$install_prog $file $destfile" || exit $?
4310
# Install the old object if enabled.
4311
if test "$build_old_libs" = yes; then
4312
# Deduce the name of the old-style object file.
4313
staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
4315
$show "$install_prog $staticobj $staticdest"
4316
$run eval "$install_prog \$staticobj \$staticdest" || exit $?
4322
# Figure out destination file name, if it wasn't already specified.
4323
if test -n "$destname"; then
4324
destfile="$destdir/$destname"
4326
destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4327
destfile="$destdir/$destfile"
4330
# Do a test to see if this is really a libtool program.
4331
if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4332
link_against_libtool_libs=
4335
# If there is no directory component, then add one.
4337
*/* | *\\*) . $file ;;
4341
# Check the variables that should have been set.
4342
if test -z "$link_against_libtool_libs"; then
4343
$echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
4348
for lib in $link_against_libtool_libs; do
4349
# Check to see that each library is installed.
4351
if test -f "$lib"; then
4352
# If there is no directory component, then add one.
4354
*/* | *\\*) . $lib ;;
4358
libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
4359
if test -n "$libdir" && test ! -f "$libfile"; then
4360
$echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
4366
# If there is no directory component, then add one.
4368
*/* | *\\*) . $file ;;
4373
if test "$fast_install" = no && test -n "$relink_command"; then
4374
if test "$finalize" = yes && test -z "$run"; then
4376
test -n "$TMPDIR" && tmpdir="$TMPDIR"
4377
tmpdir="$tmpdir/libtool-$$"
4378
if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
4380
$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
4383
outputname="$tmpdir/$file"
4384
# Replace the output file specification.
4385
relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
4387
$show "$relink_command"
4388
if $run eval "$relink_command"; then :
4390
$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
4396
$echo "$modename: warning: cannot relink \`$file'" 1>&2
4399
# Install the binary that we compiled earlier.
4400
file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
4404
$show "$install_prog$stripme $file $destfile"
4405
$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
4406
test -n "$outputname" && ${rm}r "$tmpdir"
4411
for file in $staticlibs; do
4412
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4414
# Set up the ranlib parameters.
4415
oldlib="$destdir/$name"
4417
$show "$install_prog $file $oldlib"
4418
$run eval "$install_prog \$file \$oldlib" || exit $?
4420
if test -n "$stripme" && test -n "$striplib"; then
4421
$show "$old_striplib $oldlib"
4422
$run eval "$old_striplib $oldlib" || exit $?
4425
# Do each command in the postinstall commands.
4426
eval cmds=\"$old_postinstall_cmds\"
4427
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
4428
for cmd in $cmds; do
4431
$run eval "$cmd" || exit $?
4436
if test -n "$future_libdirs"; then
4437
$echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
4440
if test -n "$current_libdirs"; then
4441
# Maybe just do a dry run.
4442
test -n "$run" && current_libdirs=" -n$current_libdirs"
4443
exec $SHELL $0 --finish$current_libdirs
4450
# libtool finish mode
4452
modename="$modename: finish"
4456
if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
4459
libdirs="$libdirs $dir"
4462
for libdir in $libdirs; do
4463
if test -n "$finish_cmds"; then
4464
# Do each command in the finish commands.
4465
eval cmds=\"$finish_cmds\"
4466
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
4467
for cmd in $cmds; do
4470
$run eval "$cmd" || admincmds="$admincmds
4475
if test -n "$finish_eval"; then
4476
# Do the single finish_eval.
4477
eval cmds=\"$finish_eval\"
4478
$run eval "$cmds" || admincmds="$admincmds
4484
# Exit here if they wanted silent mode.
4485
test "$show" = : && exit 0
4487
echo "----------------------------------------------------------------------"
4488
echo "Libraries have been installed in:"
4489
for libdir in $libdirs; do
4493
echo "If you ever happen to want to link against installed libraries"
4494
echo "in a given directory, LIBDIR, you must either use libtool, and"
4495
echo "specify the full pathname of the library, or use \`-LLIBDIR'"
4496
echo "flag during linking and do at least one of the following:"
4497
if test -n "$shlibpath_var"; then
4498
echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
4499
echo " during execution"
4501
if test -n "$runpath_var"; then
4502
echo " - add LIBDIR to the \`$runpath_var' environment variable"
4503
echo " during linking"
4505
if test -n "$hardcode_libdir_flag_spec"; then
4507
eval flag=\"$hardcode_libdir_flag_spec\"
4509
echo " - use the \`$flag' linker flag"
4511
if test -n "$admincmds"; then
4512
echo " - have your system administrator run these commands:$admincmds"
4514
if test -f /etc/ld.so.conf; then
4515
echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
4518
echo "See any operating system documentation about shared libraries for"
4519
echo "more information, such as the ld(1) and ld.so(8) manual pages."
4520
echo "----------------------------------------------------------------------"
4524
# libtool execute mode
4526
modename="$modename: execute"
4528
# The first argument is the command name.
4530
if test -z "$cmd"; then
4531
$echo "$modename: you must specify a COMMAND" 1>&2
4536
# Handle -dlopen flags immediately.
4537
for file in $execute_dlfiles; do
4538
if test ! -f "$file"; then
4539
$echo "$modename: \`$file' is not a file" 1>&2
4547
# Check to see that this really is a libtool archive.
4548
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
4550
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
4555
# Read the libtool library.
4559
# If there is no directory component, then add one.
4561
*/* | *\\*) . $file ;;
4565
# Skip this library if it cannot be dlopened.
4566
if test -z "$dlname"; then
4567
# Warn if it was a shared library.
4568
test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
4572
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
4573
test "X$dir" = "X$file" && dir=.
4575
if test -f "$dir/$objdir/$dlname"; then
4578
$echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
4584
# Just add the directory containing the .lo file.
4585
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
4586
test "X$dir" = "X$file" && dir=.
4590
$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
4595
# Get the absolute pathname.
4596
absdir=`cd "$dir" && pwd`
4597
test -n "$absdir" && dir="$absdir"
4599
# Now add the directory to shlibpath_var.
4600
if eval "test -z \"\$$shlibpath_var\""; then
4601
eval "$shlibpath_var=\"\$dir\""
4603
eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
4607
# This variable tells wrapper scripts just to set shlibpath_var
4608
# rather than running their programs.
4609
libtool_execute_magic="$magic"
4611
# Check if any of the arguments is a wrapper script.
4618
# Do a test to see if this is really a libtool program.
4619
if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4620
# If there is no directory component, then add one.
4622
*/* | *\\*) . $file ;;
4626
# Transform arg to wrapped name.
4627
file="$progdir/$program"
4631
# Quote arguments (to preserve shell metacharacters).
4632
file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
4633
args="$args \"$file\""
4636
if test -z "$run"; then
4637
if test -n "$shlibpath_var"; then
4638
# Export the shlibpath_var.
4639
eval "export $shlibpath_var"
4642
# Restore saved enviroment variables
4643
if test "${save_LC_ALL+set}" = set; then
4644
LC_ALL="$save_LC_ALL"; export LC_ALL
4646
if test "${save_LANG+set}" = set; then
4647
LANG="$save_LANG"; export LANG
4650
# Now actually exec the command.
4651
eval "exec \$cmd$args"
4653
$echo "$modename: cannot exec \$cmd$args"
4656
# Display what would be done.
4657
if test -n "$shlibpath_var"; then
4658
eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
4659
$echo "export $shlibpath_var"
4666
# libtool clean and uninstall mode
4668
modename="$modename: $mode"
4672
# This variable tells wrapper scripts just to set variables rather
4673
# than running their programs.
4674
libtool_install_magic="$magic"
4679
-*) rm="$rm $arg" ;;
4680
*) files="$files $arg" ;;
4684
if test -z "$rm"; then
4685
$echo "$modename: you must specify an RM program" 1>&2
4690
for file in $files; do
4691
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
4692
if test "X$dir" = "X$file"; then
4696
objdir="$dir/$objdir"
4698
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4699
test $mode = uninstall && objdir="$dir"
4705
# Possibly a libtool archive, so verify it.
4706
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4709
# Delete the libtool libraries and symlinks.
4710
for n in $library_names; do
4711
rmfiles="$rmfiles $objdir/$n"
4713
test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
4714
test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
4716
if test $mode = uninstall; then
4717
if test -n "$library_names"; then
4718
# Do each command in the postuninstall commands.
4719
eval cmds=\"$postuninstall_cmds\"
4720
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
4721
for cmd in $cmds; do
4729
if test -n "$old_library"; then
4730
# Do each command in the old_postuninstall commands.
4731
eval cmds=\"$old_postuninstall_cmds\"
4732
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
4733
for cmd in $cmds; do
4740
# FIXME: should reinstall the best remaining shared library.
4746
if test "$build_old_libs" = yes; then
4747
oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
4748
rmfiles="$rmfiles $dir/$oldobj"
4753
# Do a test to see if this is a libtool program.
4754
if test $mode = clean &&
4755
(sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4759
rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
4760
if test "$fast_install" = yes && test -n "$relink_command"; then
4761
rmfiles="$rmfiles $objdir/lt-$name"
4766
$show "$rm $rmfiles"
4773
$echo "$modename: you must specify a MODE" 1>&2
4774
$echo "$generic_help" 1>&2
4779
$echo "$modename: invalid operation mode \`$mode'" 1>&2
4780
$echo "$generic_help" 1>&2
4782
fi # test -z "$show_help"
4784
# We need to display help for each of the modes.
4787
"Usage: $modename [OPTION]... [MODE-ARG]...
4789
Provide generalized library-building support services.
4791
--config show all configuration variables
4792
--debug enable verbose shell tracing
4793
-n, --dry-run display commands without modifying any files
4794
--features display basic configuration information and exit
4795
--finish same as \`--mode=finish'
4796
--help display this help message and exit
4797
--mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
4798
--quiet same as \`--silent'
4799
--silent don't print informational messages
4800
--version print version information
4802
MODE must be one of the following:
4804
clean remove files from the build directory
4805
compile compile a source file into a libtool object
4806
execute automatically set library path, then run a program
4807
finish complete the installation of libtool libraries
4808
install install libraries or executables
4809
link create a library or an executable
4810
uninstall remove libraries from an installed directory
4812
MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
4813
a more detailed description of MODE."
4819
"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
4821
Remove files from the build directory.
4823
RM is the name of the program to use to delete files associated with each FILE
4824
(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
4827
If FILE is a libtool library, object or program, all the files associated
4828
with it are deleted. Otherwise, only FILE itself is deleted using RM."
4833
"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
4835
Compile a source file into a libtool library object.
4837
This mode accepts the following additional options:
4839
-o OUTPUT-FILE set the output file name to OUTPUT-FILE
4840
-static always build a \`.o' file suitable for static linking
4842
COMPILE-COMMAND is a command to be used in creating a \`standard' object file
4843
from the given SOURCEFILE.
4845
The output file name is determined by removing the directory component from
4846
SOURCEFILE, then substituting the C source code suffix \`.c' with the
4847
library object suffix, \`.lo'."
4852
"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
4854
Automatically set library path, then run a program.
4856
This mode accepts the following additional options:
4858
-dlopen FILE add the directory containing FILE to the library path
4860
This mode sets the library path environment variable according to \`-dlopen'
4863
If any of the ARGS are libtool executable wrappers, then they are translated
4864
into their corresponding uninstalled binary, and any of their required library
4865
directories are added to the library path.
4867
Then, COMMAND is executed, with ARGS as arguments."
4872
"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
4874
Complete the installation of libtool libraries.
4876
Each LIBDIR is a directory that contains libtool libraries.
4878
The commands that this mode executes may require superuser privileges. Use
4879
the \`--dry-run' option if you just want to see what would be executed."
4884
"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
4886
Install executables or libraries.
4888
INSTALL-COMMAND is the installation command. The first component should be
4889
either the \`install' or \`cp' program.
4891
The rest of the components are interpreted as arguments to that command (only
4892
BSD-compatible install options are recognized)."
4897
"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
4899
Link object files or libraries together to form another library, or to
4900
create an executable program.
4902
LINK-COMMAND is a command using the C compiler that you would use to create
4903
a program from several object files.
4905
The following components of LINK-COMMAND are treated specially:
4907
-all-static do not do any dynamic linking at all
4908
-avoid-version do not add a version suffix if possible
4909
-dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
4910
-dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
4911
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
4912
-export-symbols SYMFILE
4913
try to export only the symbols listed in SYMFILE
4914
-export-symbols-regex REGEX
4915
try to export only the symbols matching REGEX
4916
-LLIBDIR search LIBDIR for required installed libraries
4917
-lNAME OUTPUT-FILE requires the installed library libNAME
4918
-module build a library that can dlopened
4919
-no-fast-install disable the fast-install mode
4920
-no-install link a not-installable executable
4921
-no-undefined declare that a library does not refer to external symbols
4922
-o OUTPUT-FILE create OUTPUT-FILE from the specified objects
4923
-release RELEASE specify package release information
4924
-rpath LIBDIR the created library will eventually be installed in LIBDIR
4925
-R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
4926
-static do not do any dynamic linking of libtool libraries
4927
-version-info CURRENT[:REVISION[:AGE]]
4928
specify library version info [each variable defaults to 0]
4930
All other options (arguments beginning with \`-') are ignored.
4932
Every other argument is treated as a filename. Files ending in \`.la' are
4933
treated as uninstalled libtool libraries, other files are standard or library
4936
If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
4937
only library objects (\`.lo' files) may be specified, and \`-rpath' is
4938
required, except when creating a convenience library.
4940
If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
4941
using \`ar' and \`ranlib', or on Windows using \`lib'.
4943
If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
4944
is created, otherwise an executable program is created."
4949
"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
4951
Remove libraries from an installation directory.
4953
RM is the name of the program to use to delete files associated with each FILE
4954
(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
4957
If FILE is a libtool library, all the files associated with it are deleted.
4958
Otherwise, only FILE itself is deleted using RM."
4962
$echo "$modename: invalid operation mode \`$mode'" 1>&2
4969
$echo "Try \`$modename --help' for more information about other modes."