1
# ltmain.sh - Provide generalized library-building support services.
2
# NOTE: Changing this file will not affect anything until you rerun ltconfig.
4
# Copyright (C) 1996-2000 Free Software Foundation, Inc.
5
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7
# This program is free software; you can redistribute it and/or modify
8
# it under the terms of the GNU General Public License as published by
9
# the Free Software Foundation; either version 2 of the License, or
10
# (at your option) any later version.
12
# This program is distributed in the hope that it will be useful, but
13
# WITHOUT ANY WARRANTY; without even the implied warranty of
14
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
# General Public License for more details.
17
# You should have received a copy of the GNU General Public License
18
# along with this program; if not, write to the Free Software
19
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21
# As a special exception to the GNU General Public License, if you
22
# distribute this file as part of a program that contains a
23
# configuration script generated by Autoconf, you may include it under
24
# the same distribution terms that you use for the rest of that program.
26
# Check that we have a working $echo.
27
if test "X$1" = X--no-reexec; then
28
# Discard the --no-reexec flag, and continue.
30
elif test "X$1" = X--fallback-echo; then
31
# Avoid inline document here, it may be left over
33
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
34
# Yippee, $echo works!
37
# Restart under the correct shell, and then maybe $echo will work.
38
exec $SHELL "$0" --no-reexec ${1+"$@"}
41
if test "X$1" = X--fallback-echo; then
42
# used as fallback echo
50
# The name of this program.
51
progname=`$echo "$0" | sed 's%^.*/%%'`
58
TIMESTAMP=" (1.695 2000/02/24 02:15:35)"
61
help="Try \`$progname --help' for more information."
62
magic="%%%MAGIC variable%%%"
67
# Sed substitution that helps us do robust quoting. It backslashifies
68
# metacharacters that are still active within double-quoted strings.
70
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
72
NL2SP='tr \015\012 \040\040'
75
# Only set LANG and LC_ALL to C if already set.
76
# These must not be set unconditionally because not all systems understand
77
# e.g. LANG=C (notably SCO).
78
# We save the old values to restore during execute mode.
79
if test "${LC_ALL+set}" = set; then
80
save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
82
if test "${LANG+set}" = set; then
83
save_LANG="$LANG"; LANG=C; export LANG
86
if test "$LTCONFIG_VERSION" != "$VERSION"; then
87
echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
88
echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
92
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
93
echo "$modename: not configured to build any kind of library" 1>&2
94
echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
107
lo2o="s/\\.lo\$/.${objext}/"
108
o2lo="s/\\.${objext}\$/.lo/"
110
# Parse our command line options once, thoroughly.
117
-*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
121
# If the previous option needs an argument, assign it.
122
if test -n "$prev"; then
125
eval "$prev=\"\$$prev \$arg\""
137
# Have we seen a non-optional argument yet?
144
echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
149
sed -e '1,/^### BEGIN LIBTOOL CONFIG/d' -e '/^### END LIBTOOL CONFIG/,$d' $0
154
echo "$progname: enabling shell trace mode"
164
if test "$build_libtool_libs" = yes; then
165
echo "enable shared libraries"
167
echo "disable shared libraries"
169
if test "$build_old_libs" = yes; then
170
echo "enable static libraries"
172
echo "disable static libraries"
177
--finish) mode="finish" ;;
179
--mode) prevopt="--mode" prev=mode ;;
180
--mode=*) mode="$optarg" ;;
192
$echo "$modename: unrecognized option \`$arg'" 1>&2
204
if test -n "$prevopt"; then
205
$echo "$modename: option \`$prevopt' requires an argument" 1>&2
210
if test -z "$show_help"; then
212
# Infer the operation mode.
213
if test -z "$mode"; then
215
*cc | *++ | gcc* | *-gcc*)
227
*db | *dbx | *strace | *truss)
237
# If we have no mode, but dlfiles were specified, then do execute mode.
238
test -n "$execute_dlfiles" && mode=execute
240
# Just use the default operation mode.
241
if test -z "$mode"; then
242
if test -n "$nonopt"; then
243
$echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
245
$echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
252
# Only execute mode is allowed to have -dlopen flags.
253
if test -n "$execute_dlfiles" && test "$mode" != execute; then
254
$echo "$modename: unrecognized option \`-dlopen'" 1>&2
259
# Change the help message to a mode-specific one.
261
help="Try \`$modename --help --mode=$mode' for more information."
263
# These modes are in order of execution frequency so that they run quickly.
265
# libtool compile mode
267
modename="$modename: compile"
268
# Get the compilation command and the source file.
281
# Aesthetically quote the previous argument.
283
lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
286
# Double-quote args containing other shell metacharacters.
287
# Many Bourne shells cannot handle close brackets correctly
288
# in scan sets, so we specify it separately.
289
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
294
# Add the previous argument to base_compile.
295
if test -z "$base_compile"; then
296
base_compile="$lastarg"
298
base_compile="$base_compile $lastarg"
304
# Accept any command-line options.
307
if test "$user_target" != "no"; then
308
$echo "$modename: you cannot specify \`-o' more than once" 1>&2
325
args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
327
IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
331
# Double-quote args containing other shell metacharacters.
332
# Many Bourne shells cannot handle close brackets correctly
333
# in scan sets, so we specify it separately.
335
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
339
lastarg="$lastarg $arg"
342
lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
344
# Add the arguments to base_compile.
345
if test -z "$base_compile"; then
346
base_compile="$lastarg"
348
base_compile="$base_compile $lastarg"
354
case "$user_target" in
356
# The next one is the -o target name
361
# We got the output file
368
# Accept the current argument as the source file.
372
# Aesthetically quote the previous argument.
374
# Backslashify any backslashes, double quotes, and dollar signs.
375
# These are the only characters that are still specially
376
# interpreted inside of double-quoted scrings.
377
lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
379
# Double-quote args containing other shell metacharacters.
380
# Many Bourne shells cannot handle close brackets correctly
381
# in scan sets, so we specify it separately.
383
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
384
lastarg="\"$lastarg\""
388
# Add the previous argument to base_compile.
389
if test -z "$base_compile"; then
390
base_compile="$lastarg"
392
base_compile="$base_compile $lastarg"
396
case "$user_target" in
400
# Get the name of the library object.
401
libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
404
$echo "$modename: you must specify a target with \`-o'" 1>&2
409
# Recognize several different file suffixes.
410
# If the user specifies -o file.o, it is replaced with file.lo
425
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
428
*.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
430
$echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
435
if test -z "$base_compile"; then
436
$echo "$modename: you must specify a compilation command" 1>&2
441
# Delete any leftover library objects.
442
if test "$build_old_libs" = yes; then
443
removelist="$obj $libobj"
449
trap "$run $rm $removelist; exit 1" 1 2 15
451
# Calculate the filename of the output object if compiler does
452
# not support -o with -c
453
if test "$compiler_c_o" = no; then
454
output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\..*$%%'`.${objext}
455
lockfile="$output_obj.lock"
456
removelist="$removelist $output_obj $lockfile"
457
trap "$run $rm $removelist; exit 1" 1 2 15
463
# Lock this critical section if it is needed
464
# We use this script file to make the link, it avoids creating a new file
465
if test "$need_locks" = yes; then
466
until ln "$0" "$lockfile" 2>/dev/null; do
467
$show "Waiting for $lockfile to be removed"
470
elif test "$need_locks" = warn; then
471
if test -f "$lockfile"; then
473
*** ERROR, $lockfile exists and contains:
474
`cat $lockfile 2>/dev/null`
476
This indicates that another process is trying to use the same
477
temporary object file, and libtool could not work around it because
478
your compiler does not support \`-c' and \`-o' together. If you
479
repeat this compilation, it may succeed, by chance, but you had better
480
avoid parallel builds (make -j) in this platform, or get a better
486
echo $srcfile > "$lockfile"
489
if test -n "$fix_srcfile_path"; then
490
eval srcfile=\"$fix_srcfile_path\"
493
# Only build a PIC object if we are building libtool libraries.
494
if test "$build_libtool_libs" = yes; then
495
# Without this assignment, base_compile gets emptied.
496
fbsd_hideous_sh_bug=$base_compile
498
if test "$pic_mode" != no; then
499
# All platforms use -DPIC, to notify preprocessed assembler code.
500
command="$base_compile $srcfile $pic_flag -DPIC"
502
# Don't build PIC code
503
command="$base_compile $srcfile"
505
if test "$build_old_libs" = yes; then
507
dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
508
if test "X$dir" = "X$libobj"; then
513
libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
515
if test -d "$dir"; then
522
if test $status -ne 0 && test ! -d $dir; then
527
if test "$compiler_o_lo" = yes; then
529
command="$command -o $output_obj"
530
elif test "$compiler_c_o" = yes; then
532
command="$command -o $output_obj"
535
$run $rm "$output_obj"
537
if $run eval "$command"; then :
539
test -n "$output_obj" && $run $rm $removelist
543
if test "$need_locks" = warn &&
544
test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
546
*** ERROR, $lockfile contains:
547
`cat $lockfile 2>/dev/null`
549
but it should contain:
552
This indicates that another process is trying to use the same
553
temporary object file, and libtool could not work around it because
554
your compiler does not support \`-c' and \`-o' together. If you
555
repeat this compilation, it may succeed, by chance, but you had better
556
avoid parallel builds (make -j) in this platform, or get a better
563
# Just move the object if needed, then go on to compile the next one
564
if test x"$output_obj" != x"$libobj"; then
565
$show "$mv $output_obj $libobj"
566
if $run $mv $output_obj $libobj; then :
574
# If we have no pic_flag, then copy the object into place and finish.
575
if (test -z "$pic_flag" || test "$pic_mode" != default) &&
576
test "$build_old_libs" = yes; then
577
# Rename the .lo from within objdir to obj
578
if test -f $obj; then
583
$show "$mv $libobj $obj"
584
if $run $mv $libobj $obj; then :
591
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
592
if test "X$xdir" = "X$obj"; then
597
baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
598
libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
599
# Now arrange that obj and lo_libobj become the same file
600
$show "(cd $xdir && $LN_S $baseobj $libobj)"
601
if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
610
# Allow error messages only from the first compilation.
611
suppress_output=' >/dev/null 2>&1'
614
# Only build a position-dependent object if we build old libraries.
615
if test "$build_old_libs" = yes; then
616
if test "$pic_mode" != yes; then
617
# Don't build PIC code
618
command="$base_compile $srcfile"
620
# All platforms use -DPIC, to notify preprocessed assembler code.
621
command="$base_compile $srcfile $pic_flag -DPIC"
623
if test "$compiler_c_o" = yes; then
624
command="$command -o $obj"
628
# Suppress compiler output if we already did a PIC compilation.
629
command="$command$suppress_output"
630
$run $rm "$output_obj"
632
if $run eval "$command"; then :
638
if test "$need_locks" = warn &&
639
test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
641
*** ERROR, $lockfile contains:
642
`cat $lockfile 2>/dev/null`
644
but it should contain:
647
This indicates that another process is trying to use the same
648
temporary object file, and libtool could not work around it because
649
your compiler does not support \`-c' and \`-o' together. If you
650
repeat this compilation, it may succeed, by chance, but you had better
651
avoid parallel builds (make -j) in this platform, or get a better
658
# Just move the object if needed
659
if test x"$output_obj" != x"$obj"; then
660
$show "$mv $output_obj $obj"
661
if $run $mv $output_obj $obj; then :
669
# Create an invalid libtool object if no PIC, so that we do not
670
# accidentally link it into a program.
671
if test "$build_libtool_libs" != yes; then
672
$show "echo timestamp > $libobj"
673
$run eval "echo timestamp > \$libobj" || exit $?
675
# Move the .lo from within objdir
676
$show "$mv $libobj $lo_libobj"
677
if $run $mv $libobj $lo_libobj; then :
686
# Unlock the critical section if it was locked
687
if test "$need_locks" != no; then
696
modename="$modename: link"
698
*-*-cygwin* | *-*-mingw* | *-*-os2*)
699
# It is impossible to link a dll without this setting, and
700
# we shouldn't force the makefile maintainer to figure out
701
# which system we are compiling for in order to pass an extra
702
# flag for every libtool invokation.
705
# FIXME: Unfortunately, there are problems with the above when trying
706
# to make a dll which has undefined symbols, in which case not
707
# even a static library is built. For now, we need to specify
708
# -no-undefined on the libtool link line when we can be certain
709
# that all symbols are satisfied, otherwise we get a static library.
716
libtool_args="$nonopt"
717
compile_command="$nonopt"
718
finalize_command="$nonopt"
731
lib_search_path=`pwd`
739
export_symbols_regex=
746
prefer_static_libs=no
758
# We need to know -static, to get the right output filenames.
762
-all-static | -static)
763
if test "X$arg" = "X-all-static"; then
764
if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
765
$echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
767
if test -n "$link_static_flag"; then
768
dlopen_self=$dlopen_self_static
771
if test -z "$pic_flag" && test -n "$link_static_flag"; then
772
dlopen_self=$dlopen_self_static
775
build_libtool_libs=no
777
prefer_static_libs=yes
783
# See if our shared archives depend on static archives.
784
test -n "$old_archive_from_new_cmds" && build_old_libs=yes
786
# Go through the arguments, transforming them on the way.
787
while test $# -gt 0; do
791
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
792
qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
796
libtool_args="$libtool_args $qarg"
798
# If the previous option needs an argument, assign it.
799
if test -n "$prev"; then
802
compile_command="$compile_command @OUTPUT@"
803
finalize_command="$finalize_command @OUTPUT@"
809
if test "$preload" = no; then
810
# Add the symbol object into the linking commands.
811
compile_command="$compile_command @SYMFILE@"
812
finalize_command="$finalize_command @SYMFILE@"
816
*.la | *.lo) ;; # We handle these cases below.
818
if test "$dlself" = no; then
826
if test "$prev" = dlprefiles; then
828
elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
838
if test "$prev" = dlfiles; then
839
dlfiles="$dlfiles $arg"
841
dlprefiles="$dlprefiles $arg"
849
export_symbols="$arg"
850
if test ! -f "$arg"; then
851
$echo "$modename: symbol file \`$arg' does not exist"
858
export_symbols_regex="$arg"
868
# We need an absolute path.
870
[\\/]* | [A-Za-z]:[\\/]*) ;;
872
$echo "$modename: only absolute run-paths are allowed" 1>&2
876
if test "$prev" = rpath; then
879
*) rpath="$rpath $arg" ;;
884
*) xrpath="$xrpath $arg" ;;
891
compiler_flags="$compiler_flags $qarg"
893
compile_command="$compile_command $qarg"
894
finalize_command="$finalize_command $qarg"
898
linker_flags="$linker_flags $qarg"
899
compiler_flags="$compiler_flags $wl$qarg"
901
compile_command="$compile_command $wl$qarg"
902
finalize_command="$finalize_command $wl$qarg"
906
eval "$prev=\"\$arg\""
917
if test -n "$link_static_flag"; then
918
compile_command="$compile_command $link_static_flag"
919
finalize_command="$finalize_command $link_static_flag"
925
# FIXME: remove this flag sometime in the future.
926
$echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
950
-export-symbols | -export-symbols-regex)
951
if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
952
$echo "$modename: not more than one -exported-symbols argument allowed"
955
if test "X$arg" = "X-export-symbols"; then
964
dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
965
# We need an absolute path.
967
[\\/]* | [A-Za-z]:[\\/]*) ;;
969
absdir=`cd "$dir" && pwd`
970
if test -z "$absdir"; then
971
$echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
980
deplibs="$deplibs -L$dir"
981
lib_search_path="$lib_search_path $dir"
985
*-*-cygwin* | *-*-mingw* | *-*-os2*)
986
case ":$dllsearchpath:" in
988
*) dllsearchpath="$dllsearchpath:$dir";;
996
if test "$arg" = "-lc"; then
998
*-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
999
# These systems don't actually have c library (as such)
1003
elif test "$arg" = "-lm"; then
1005
*-*-cygwin* | *-*-beos*)
1006
# These systems don't actually have math library (as such)
1011
deplibs="$deplibs $arg"
1027
*-*-cygwin* | *-*-mingw* | *-*-os2*)
1028
# The PATH hackery in wrapper scripts is required on Windows
1029
# in order for the loader to find any dlls it needs.
1030
$echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
1031
$echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
1064
dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
1065
# We need an absolute path.
1067
[\\/]* | [A-Za-z]:[\\/]*) ;;
1069
$echo "$modename: only absolute run-paths are allowed" 1>&2
1075
*) xrpath="$xrpath $dir" ;;
1081
# If we have no pic_flag, then this is the same as -all-static.
1082
if test -z "$pic_flag" && test -n "$link_static_flag"; then
1083
compile_command="$compile_command $link_static_flag"
1084
finalize_command="$finalize_command $link_static_flag"
1100
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
1102
IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
1103
for flag in $args; do
1106
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1111
compiler_flags="$compiler_flags $flag"
1114
arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1118
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
1120
IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
1121
for flag in $args; do
1124
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1129
compiler_flags="$compiler_flags $wl$flag"
1130
linker_flags="$linker_flags $flag"
1133
arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
1146
# Some other compiler flag.
1148
# Unknown arguments in both finalize_command and compile_command need
1149
# to be aesthetically quoted because they are evaled later.
1150
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1152
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1159
# A standard object.
1165
if test "$prev" = dlfiles; then
1166
# This file was specified with -dlopen.
1167
if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
1168
dlfiles="$dlfiles $arg"
1172
# If libtool objects are unsupported, then we need to preload.
1177
if test "$prev" = dlprefiles; then
1178
# Preload the old-style object.
1179
dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
1182
libobjs="$libobjs $arg"
1188
deplibs="$deplibs $arg"
1189
old_deplibs="$old_deplibs $arg"
1194
# A libtool-controlled library.
1196
if test "$prev" = dlfiles; then
1197
# This library was specified with -dlopen.
1198
dlfiles="$dlfiles $arg"
1200
elif test "$prev" = dlprefiles; then
1201
# The library was specified with -dlpreopen.
1202
dlprefiles="$dlprefiles $arg"
1205
deplibs="$deplibs $arg"
1210
# Some other compiler argument.
1212
# Unknown arguments in both finalize_command and compile_command need
1213
# to be aesthetically quoted because they are evaled later.
1214
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
1216
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
1223
# Now actually substitute the argument into the commands.
1224
if test -n "$arg"; then
1225
compile_command="$compile_command $arg"
1226
finalize_command="$finalize_command $arg"
1230
if test -n "$prev"; then
1231
$echo "$modename: the \`$prevarg' option requires an argument" 1>&2
1236
if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
1237
eval arg=\"$export_dynamic_flag_spec\"
1238
compile_command="$compile_command $arg"
1239
finalize_command="$finalize_command $arg"
1243
# calculate the name of the file, without its directory
1244
outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
1245
libobjs_save="$libobjs"
1247
if test -n "$shlibpath_var"; then
1248
# get the directories listed in $shlibpath_var
1249
eval shlib_search_path=\`\$echo \"X \${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
1253
eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
1254
eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
1255
lib_search_path="$lib_search_path $sys_lib_search_path $shlib_search_path"
1257
output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
1258
if test "X$output_objdir" = "X$output"; then
1259
output_objdir="$objdir"
1261
output_objdir="$output_objdir/$objdir"
1263
# Create the object directory.
1264
if test ! -d $output_objdir; then
1265
$show "$mkdir $output_objdir"
1266
$run $mkdir $output_objdir
1268
if test $status -ne 0 && test ! -d $output_objdir; then
1275
$echo "$modename: you must specify an output file" 1>&2
1285
*) # Anything else should be a program.
1291
# Find all interdependent deplibs that
1292
# are linked more than once (e.g. -la -lb -la)
1293
for deplib in $deplibs; do
1295
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1297
libs="$libs $deplib"
1301
uninst_path= # paths that contain uninstalled libtool libraries
1302
new_lib_search_path=
1303
need_relink=no # whether we're linking any uninstalled libtool libraries
1307
for file in $dlfiles $dlprefiles; do
1311
$echo "$modename: libraries can \`-dlopen' only libtool libraries" 1>&2
1323
link_against_libtool_libs=
1324
passes="scan dlopen dlpreopen link"
1329
for pass in $passes; do
1330
if test $linkmode = prog; then
1332
dlopen) libs="$dlfiles" ;;
1333
dlpreopen) libs="$dlprefiles" ;;
1334
link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
1337
if test $pass = dlopen; then
1338
# Collect dlpreopened libraries
1339
save_deplibs="$deplibs"
1342
for deplib in $libs; do
1347
if test $linkmode != lib && test $linkmode != prog; then
1348
$echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
1351
name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
1352
for searchdir in $lib_search_path; do
1353
# Search the libtool library
1354
lib="$searchdir/lib${name}.la"
1355
if test -f "$lib"; then
1360
if test "$found" != yes; then
1361
if test "$linkmode,$pass" = "prog,link"; then
1362
compile_deplibs="$deplib $compile_deplibs"
1363
finalize_deplibs="$deplib $finalize_deplibs"
1365
deplibs="$deplib $deplibs"
1366
test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs"
1374
deplibs="$deplib $deplibs"
1375
newdependency_libs="$deplib $newdependency_libs"
1376
new_lib_search_path="$new_lib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
1379
if test $pass = scan; then
1380
deplibs="$deplib $deplibs"
1381
new_lib_search_path="$new_lib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
1383
compile_deplibs="$deplib $compile_deplibs"
1384
finalize_deplibs="$deplib $finalize_deplibs"
1388
$echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
1394
if test "$linkmode,$pass" = "prog,link"; then
1395
dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
1396
# Make sure the xrpath contains only unique directories.
1399
*) xrpath="$xrpath $dir" ;;
1404
*.la) lib="$deplib" ;;
1408
if test "$deplibs_check_method" != pass_all; then
1410
echo "*** Warning: This library needs some functionality provided by $deplib."
1411
echo "*** I have the capability to make that library automatically link in when"
1412
echo "*** you link to this library. But I can only do this if you have a"
1413
echo "*** shared version of the library, which you do not appear to have."
1416
echo "*** Warning: Linking the shared library $output against the"
1417
echo "*** static library $deplib is not portable!"
1418
deplibs="$deplib $deplibs"
1423
if test $pass != link; then
1424
deplibs="$deplib $deplibs"
1426
compile_deplibs="$deplib $compile_deplibs"
1427
finalize_deplibs="$deplib $finalize_deplibs"
1434
if test $linkmode = prog; then
1435
if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
1436
# If there is no dlopen support or we're linking statically,
1437
# we need to preload.
1438
newdlprefiles="$newdlprefiles $deplib"
1439
compile_deplibs="$deplib $compile_deplibs"
1440
finalize_deplibs="$deplib $finalize_deplibs"
1442
newdlfiles="$newdlfiles $deplib"
1452
if test $found = yes || test -f "$lib"; then :
1454
$echo "$modename: cannot find the library \`$lib'" 1>&2
1458
# Check to see that this really is a libtool archive.
1459
if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
1461
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
1465
ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
1466
test "X$ladir" = "X$lib" && ladir="."
1474
# If the library was installed with an old release of libtool,
1475
# it will not redefine variable installed.
1480
*/* | *\\*) . $lib ;;
1484
if test $linkmode = lib || test "$linkmode,$pass" = "prog,scan"; then
1485
test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
1486
test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
1489
if test $linkmode != lib && test $linkmode != prog; then
1490
# only check for convenience libraries
1491
if test -z "$old_library"; then
1492
$echo "$modename: cannot find name of link library for \`$lib'" 1>&2
1495
if test -n "$libdir"; then
1496
$echo "$modename: \`$lib' is not a convenience library" 1>&2
1499
# It is a libtool convenience library, so add in its objects.
1500
convenience="$convenience $ladir/$objdir/$old_library"
1501
old_convenience="$old_convenience $ladir/$objdir/$old_library"
1505
# Get the name of the library we link against.
1507
for l in $old_library $library_names; do
1510
if test -z "$linklib"; then
1511
$echo "$modename: cannot find name of link library for \`$lib'" 1>&2
1515
# This library was specified with -dlopen.
1516
if test $pass = dlopen; then
1517
if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
1518
# If there is no dlname, no dlopen support or we're linking statically,
1519
# we need to preload.
1520
dlprefiles="$dlprefiles $lib"
1522
newdlfiles="$newdlfiles $lib"
1527
# We need an absolute path.
1529
[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
1531
abs_ladir=`cd "$ladir" && pwd`
1532
if test -z "$abs_ladir"; then
1533
$echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
1534
$echo "$modename: passing it literally to the linker, although it might fail" 1>&2
1539
laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
1541
# Find the relevant object directory and library name.
1542
if test "X$installed" = Xyes; then
1543
if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
1544
$echo "$modename: warning: library \`$lib' was moved." 1>&2
1553
dir="$ladir/$objdir"
1554
absdir="$abs_ladir/$objdir"
1555
# Remove this search path later
1556
uninst_path="$uninst_path $abs_ladir"
1558
name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
1560
# This library was specified with -dlpreopen.
1561
if test $pass = dlpreopen; then
1562
# Prefer using a static library (so that no silly _DYNAMIC symbols
1563
# are required to link).
1564
if test -n "$old_library"; then
1565
newdlprefiles="$newdlprefiles $dir/$old_library"
1567
newdlprefiles="$newdlprefiles $dir/$linklib"
1571
if test $linkmode = prog && test $pass != link; then
1572
new_lib_search_path="$new_lib_search_path $ladir"
1573
deplibs="$lib $deplibs"
1576
if test "$link_all_deplibs" != no || test "$fast_install" != no || \
1577
test "$build_libtool_libs" = no || test -z "$library_names"; then
1582
for deplib in $dependency_libs; do
1584
-L*) new_lib_search_path="$new_lib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
1586
# Need to link against all dependency_libs?
1587
if test $linkalldeplibs = yes; then
1588
deplibs="$deplib $deplibs"
1590
# Need to hardcode shared library paths
1591
# or/and link against static libraries
1592
newdependency_libs="$deplib $newdependency_libs"
1594
case "$tmp_libs " in
1595
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1597
tmp_libs="$tmp_libs $deplib"
1602
if test -z "$libdir"; then
1603
# It is a libtool convenience library, so add in its objects.
1604
convenience="$convenience $dir/$old_library"
1605
old_convenience="$old_convenience $dir/$old_library"
1606
if test $linkmode = lib; then
1607
deplibs="$dir/$old_library $deplibs"
1609
for deplib in $dependency_libs; do
1610
newdependency_libs="$deplib $newdependency_libs"
1611
case "$tmp_libs " in
1612
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1614
tmp_libs="$tmp_libs $deplib"
1616
elif test "$linkmode,$pass" = "prog,link"; then
1617
compile_deplibs="$dir/$old_library $compile_deplibs"
1618
finalize_deplibs="$dir/$old_library $finalize_deplibs"
1623
if test "$linkmode,$pass" = "prog,link"; then
1624
if test -n "$library_names" &&
1625
{ test "$hardcode_into_libs" != all || test "$alldeplibs" != yes; } &&
1626
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then
1627
# We need to hardcode the library path
1628
if test -n "$shlibpath_var"; then
1629
# Make sure the rpath contains only unique directories.
1630
case "$temp_rpath " in
1633
*) temp_rpath="$temp_rpath $dir" ;;
1637
# Hardcode the library path.
1638
# Skip directories that are in the system default run-time
1640
case " $sys_lib_dlsearch_path " in
1643
case "$compile_rpath " in
1645
*) compile_rpath="$compile_rpath $absdir"
1650
case " $sys_lib_dlsearch_path " in
1653
case "$finalize_rpath " in
1655
*) finalize_rpath="$finalize_rpath $libdir"
1661
if test "$alldeplibs" = yes &&
1662
{ test "$deplibs_check_method" = pass_all ||
1663
{ test "$build_libtool_libs" = yes &&
1664
test -n "$library_names"; }; }; then
1665
# Do we only need to link against static libraries?
1670
link_static=no # Whether this library is linked statically
1671
if test -n "$library_names" &&
1672
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then
1673
link_against_libtool_libs="$link_against_libtool_libs $lib"
1674
test "X$installed" = xno && need_relink=yes
1675
# This is a shared library
1676
if test $linkmode = lib && test "$hardcode_into_libs" = all; then
1677
# Hardcode the library path.
1678
# Skip directories that are in the system default run-time
1680
case " $sys_lib_dlsearch_path " in
1683
case "$compile_rpath " in
1685
*) compile_rpath="$compile_rpath $absdir"
1689
case " $sys_lib_dlsearch_path " in
1692
case "$finalize_rpath " in
1694
*) finalize_rpath="$finalize_rpath $libdir"
1700
if test -n "$old_archive_from_expsyms_cmds"; then
1701
# figure out the soname
1702
set dummy $library_names
1705
libname=`eval \\$echo \"$libname_spec\"`
1706
if test -n "$soname_spec"; then
1707
eval soname=\"$soname_spec\"
1712
# Make a new name for the extract_expsyms_cmds to use
1713
newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
1715
# If the library has no export list, then create one now
1716
if test -f "$output_objdir/$soname-def"; then :
1718
$show "extracting exported symbol list from \`$soname'"
1719
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
1720
eval cmds=\"$extract_expsyms_cmds\"
1721
for cmd in $cmds; do
1724
$run eval "$cmd" || exit $?
1730
if test -f "$output_objdir/$newlib"; then :; else
1731
$show "generating import library for \`$soname'"
1732
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
1733
eval cmds=\"$old_archive_from_expsyms_cmds\"
1734
for cmd in $cmds; do
1737
$run eval "$cmd" || exit $?
1741
# make sure the library variables are pointing to the new library
1746
if test $linkmode = prog || test "$mode" != relink; then
1751
case "$hardcode_action" in
1752
immediate | unsupported)
1753
if test "$hardcode_direct" = no; then
1755
elif test "$hardcode_minus_L" = no; then
1757
*-*-sunos*) add_shlibpath="$dir" ;;
1761
elif test "$hardcode_shlibpath_var" = no; then
1762
add_shlibpath="$dir"
1769
if test "$hardcode_direct" = yes; then
1771
elif test "$hardcode_minus_L" = yes; then
1774
elif test "$hardcode_shlibpath_var" = yes; then
1775
add_shlibpath="$dir"
1784
if test "$lib_linked" != yes; then
1785
$echo "$modename: configuration error: unsupported hardcode properties"
1789
if test -n "$add_shlibpath"; then
1790
case ":$compile_shlibpath:" in
1791
*":$add_shlibpath:"*) ;;
1792
*) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
1795
if test $linkmode = prog; then
1796
test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
1797
test -n "$add" && compile_deplibs="$add $compile_deplibs"
1799
test -n "$add_dir" && deplibs="$add_dir $deplibs"
1800
test -n "$add" && deplibs="$add $deplibs"
1801
if test "$hardcode_direct" != yes && \
1802
test "$hardcode_minus_L" != yes && \
1803
test "$hardcode_shlibpath_var" = yes; then
1804
case ":$finalize_shlibpath:" in
1806
*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
1812
if test $linkmode = prog || test "$mode" = relink; then
1816
# Finalize command for both is simple: just hardcode it.
1817
if test "$hardcode_direct" = yes; then
1818
add="$libdir/$linklib"
1819
elif test "$hardcode_minus_L" = yes; then
1822
elif test "$hardcode_shlibpath_var" = yes; then
1823
case ":$finalize_shlibpath:" in
1825
*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
1829
# We cannot seem to hardcode it, guess we'll fake it.
1834
if test $linkmode = prog; then
1835
test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
1836
test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
1838
test -n "$add_dir" && deplibs="$add_dir $deplibs"
1839
test -n "$add" && deplibs="$add deplibs"
1842
elif test $linkmode = prog; then
1843
# Here we assume that one of hardcode_direct or hardcode_minus_L
1844
# is not unsupported. This is valid on all known static and
1846
if test "$hardcode_direct" != unsupported; then
1847
test -n "$old_library" && linklib="$old_library"
1848
compile_deplibs="$dir/$linklib $compile_deplibs"
1849
finalize_deplibs="$dir/$linklib $finalize_deplibs"
1851
compile_deplibs="-l$name -L$dir $compile_deplibs"
1852
finalize_deplibs="-l$name -L$dir $finalize_deplibs"
1854
elif test "$build_libtool_libs" = yes; then
1855
# Not a shared library
1856
if test "$deplibs_check_method" != pass_all; then
1857
# We're trying link a shared library against a static one
1858
# but the system doesn't support it.
1859
# Just print a warning and add the library to dependency_libs so
1860
# that the program can be linked against the static library.
1862
echo "*** Warning: This library needs some functionality provided by $lib."
1863
echo "*** I have the capability to make that library automatically link in when"
1864
echo "*** you link to this library. But I can only do this if you have a"
1865
echo "*** shared version of the library, which you do not appear to have."
1867
convenience="$convenience $dir/$old_library"
1868
old_convenience="$old_convenience $dir/$old_library"
1869
deplibs="$dir/$old_library $deplibs"
1874
if test $linkmode = lib; then
1875
if test -n "$dependency_libs" &&
1876
{ test "$hardcode_into_libs" = no || test $build_old_libs = yes ||
1877
test $link_static = yes; }; then
1878
# Extract -R from dependency_libs
1880
for libdir in $dependency_libs; do
1882
-R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
1884
*" $temp_xrpath "*) ;;
1885
*) xrpath="$xrpath $temp_xrpath";;
1887
*) temp_deplibs="$temp_deplibs $libdir";;
1890
dependency_libs="$temp_deplibs"
1893
new_lib_search_path="$new_lib_search_path $absdir"
1894
# Link against this library
1895
test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
1896
# ... and its dependency_libs
1898
for deplib in $dependency_libs; do
1899
newdependency_libs="$deplib $newdependency_libs"
1900
case "$tmp_libs " in
1901
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
1903
tmp_libs="$tmp_libs $deplib"
1906
if test $link_all_deplibs != no; then
1907
# Add the search paths of all dependency libraries
1908
for deplib in $dependency_libs; do
1910
-L*) path="$deplib" ;;
1912
dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
1913
test "X$dir" = "X$deplib" && dir="."
1914
# We need an absolute path.
1916
[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
1918
absdir=`cd "$dir" && pwd`
1919
if test -z "$absdir"; then
1920
$echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
1925
if grep "^installed=no" $deplib > /dev/null; then
1926
path="-L$absdir/$objdir"
1928
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
1929
if test -z "$libdir"; then
1930
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
1933
if test "$absdir" != "$libdir"; then
1934
$echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
1941
case " $deplibs " in
1943
*) deplibs="$deplibs $path" ;;
1949
dependency_libs="$newdependency_libs"
1950
if test $pass = dlpreopen; then
1951
# Link the dlpreopened libraries before other libraries
1952
deplibs="$deplibs $save_deplibs"
1953
elif test $pass != dlopen; then
1954
# Make sure lib_search_path contains only unique directories.
1956
for dir in $new_lib_search_path; do
1957
case "$lib_search_path " in
1959
*) lib_search_path="$lib_search_path $dir" ;;
1962
lib_search_path="$lib_search_path $sys_lib_search_path"
1964
if test "$linkmode,$pass" != "prog,link"; then
1967
vars="compile_deplibs finalize_deplibs"
1969
for var in $vars dependency_libs; do
1970
# Make sure that $var contains only unique libraries
1971
# and add them in reverse order
1972
eval tmp_libs=\"\$$var\"
1974
for deplib in $tmp_libs; do
1976
-L*) new_libs="$deplib $new_libs" ;;
1978
case " $specialdeplibs " in
1979
*" $deplib "*) new_libs="$deplib $new_libs" ;;
1981
case " $new_libs " in
1983
*) new_libs="$deplib $new_libs" ;;
1991
for deplib in $new_libs; do
1994
case " $tmp_libs " in
1996
*) tmp_libs="$tmp_libs $deplib" ;;
1999
*) tmp_libs="$tmp_libs $deplib" ;;
2002
eval $var=\"$tmp_libs\"
2006
if test $linkmode = prog; then
2007
dlfiles="$newdlfiles"
2008
dlprefiles="$newdlprefiles"
2013
if test -n "$deplibs"; then
2014
$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
2017
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
2018
$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
2021
if test -n "$rpath"; then
2022
$echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
2025
if test -n "$xrpath"; then
2026
$echo "$modename: warning: \`-R' is ignored for archives" 1>&2
2029
if test -n "$vinfo"; then
2030
$echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
2033
if test -n "$release"; then
2034
$echo "$modename: warning: \`-release' is ignored for archives" 1>&2
2037
if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
2038
$echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
2041
# Now set the variables for building old libraries.
2042
build_libtool_libs=no
2044
objs="$objs$old_deplibs"
2048
# Make sure we only generate libraries of the form `libNAME.la'.
2049
case "$outputname" in
2051
name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
2052
eval libname=\"$libname_spec\"
2055
if test "$module" = no; then
2056
$echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
2060
if test "$need_lib_prefix" != no; then
2061
# Add the "lib" prefix for modules if required
2062
name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
2063
eval libname=\"$libname_spec\"
2065
libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
2070
if test -n "$objs"; then
2071
if test "$deplibs_check_method" != pass_all; then
2072
$echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
2076
echo "*** Warning: Linking the shared library $output against the non-libtool"
2077
echo "*** objects $objs is not portable!"
2078
libobjs="$libobjs $objs"
2082
if test "$dlself" != no; then
2083
$echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
2087
if test $# -gt 2; then
2088
$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
2093
if test -z "$rpath"; then
2094
if test "$build_libtool_libs" = yes; then
2095
# Building a libtool convenience library.
2097
oldlibs="$output_objdir/$libname.$libext $oldlibs"
2098
build_libtool_libs=convenience
2102
if test -n "$vinfo"; then
2103
$echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
2106
if test -n "$release"; then
2107
$echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
2111
# Parse the version information argument.
2112
IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
2113
set dummy $vinfo 0 0 0
2116
if test -n "$8"; then
2117
$echo "$modename: too many parameters to \`-version-info'" 1>&2
2126
# Check that each of the things are valid numbers.
2128
0 | [1-9] | [1-9][0-9]*) ;;
2130
$echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
2131
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
2137
0 | [1-9] | [1-9][0-9]*) ;;
2139
$echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
2140
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
2146
0 | [1-9] | [1-9][0-9]*) ;;
2148
$echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
2149
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
2154
if test $age -gt $current; then
2155
$echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
2156
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
2160
# Calculate the version variables.
2164
case "$version_type" in
2168
major=`expr $current - $age + 1`
2169
versuffix="$major.$revision"
2170
verstring="sgi$major.$revision"
2172
# Add in all the interfaces that we are compatible with.
2174
while test $loop != 0; do
2175
iface=`expr $revision - $loop`
2176
loop=`expr $loop - 1`
2177
verstring="sgi$major.$iface:$verstring"
2182
major=.`expr $current - $age`
2183
versuffix="$major.$age.$revision"
2187
major=`expr $current - $age`
2188
versuffix=".$current.$age.$revision"
2189
verstring="$current.$age.$revision"
2191
# Add in all the interfaces that we are compatible with.
2193
while test $loop != 0; do
2194
iface=`expr $current - $loop`
2195
loop=`expr $loop - 1`
2196
verstring="$verstring:${iface}.0"
2199
# Make executables depend on our current version.
2200
verstring="$verstring:${current}.0"
2205
versuffix=".$current.$revision"
2210
versuffix=".$current.$revision";
2215
versuffix=".$current";
2219
# Like Linux, but with '-' rather than '.', since we only
2220
# want one extension on Windows 95.
2221
major=`expr $current - $age`
2222
versuffix="-$major-$age-$revision"
2226
$echo "$modename: unknown library version type \`$version_type'" 1>&2
2227
echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
2232
# Clear the version info if we defaulted, and they specified a release.
2233
if test -z "$vinfo" && test -n "$release"; then
2236
if test "$need_version" = no; then
2243
# Remove version info from name if versioning should be avoided
2244
if test "$avoid_version" = yes && test "$need_version" = no; then
2250
# Check to see if the archive will have undefined symbols.
2251
if test "$allow_undefined" = yes; then
2252
if test "$allow_undefined_flag" = unsupported; then
2253
$echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
2254
build_libtool_libs=no
2258
# Don't allow undefined symbols.
2259
allow_undefined_flag="$no_undefined_flag"
2263
if test "$mode" != relink; then
2264
# Remove our outputs.
2265
$show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
2266
$run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
2269
# Now set the variables for building old libraries.
2270
if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
2271
oldlibs="$oldlibs $output_objdir/$libname.$libext"
2273
# Transform .lo files to .o files.
2274
oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
2277
# Eliminate all temporary directories.
2278
for path in $uninst_path; do
2279
lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`
2280
deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`
2281
dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
2284
if test -n "$xrpath"; then
2285
# If the user specified any rpath flags, then add them.
2287
for libdir in $xrpath; do
2288
temp_xrpath="$temp_xrpath -R$libdir"
2289
case "$finalize_rpath " in
2291
*) finalize_rpath="$finalize_rpath $libdir" ;;
2294
if test "$hardcode_into_libs" = no || test $build_old_libs = yes; then
2295
dependency_libs="$temp_xrpath $dependency_libs"
2299
# Make sure dlfiles contains only unique files that won't be dlpreopened
2300
old_dlfiles="$dlfiles"
2302
for lib in $old_dlfiles; do
2303
case " $dlprefiles $dlfiles " in
2305
*) dlfiles="$dlfiles $lib" ;;
2309
# Make sure dlprefiles contains only unique files
2310
old_dlprefiles="$dlprefiles"
2312
for lib in $old_dlprefiles; do
2313
case "$dlprefiles " in
2315
*) dlprefiles="$dlprefiles $lib" ;;
2319
if test "$build_libtool_libs" = yes; then
2320
if test -n "$rpath"; then
2322
*-*-cygwin* | *-*-mingw* | *-*-os2* | *-*-beos*)
2323
# these systems don't actually have a c library (as such)!
2326
# Add libc to deplibs on all other systems.
2327
deplibs="$deplibs -lc"
2332
# Transform deplibs into only deplibs that can be linked in shared.
2334
libname_save=$libname
2335
release_save=$release
2336
versuffix_save=$versuffix
2338
# I'm not sure if I'm treating the release correctly. I think
2339
# release should show up in the -l (ie -lgmp5) so we don't want to
2340
# add it in twice. Is that correct?
2346
case "$deplibs_check_method" in
2348
# Don't check for shared/static. Everything works.
2349
# This might be a little naive. We might want to check
2350
# whether the library exists or not. But this is on
2351
# osf3 & osf4 and I'm not really sure... Just
2352
# implementing what was already the behaviour.
2356
# This code stresses the "libraries are programs" paradigm to its
2357
# limits. Maybe even breaks it. We compile a program, linking it
2358
# against the deplibs as a proxy for the library. Then we can check
2359
# whether they linked in statically or dynamically with ldd.
2361
cat > conftest.c <<EOF
2362
int main() { return 0; }
2365
$CC -o conftest conftest.c $deplibs
2366
if test $? -eq 0 ; then
2367
ldd_output=`ldd conftest`
2368
for i in $deplibs; do
2369
name="`expr $i : '-l\(.*\)'`"
2370
# If $name is empty we are operating on a -L argument.
2371
if test "$name" != "" ; then
2372
libname=`eval \\$echo \"$libname_spec\"`
2373
deplib_matches=`eval \\$echo \"$library_names_spec\"`
2374
set dummy $deplib_matches
2376
if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
2377
newdeplibs="$newdeplibs $i"
2381
echo "*** Warning: This library needs some functionality provided by $i."
2382
echo "*** I have the capability to make that library automatically link in when"
2383
echo "*** you link to this library. But I can only do this if you have a"
2384
echo "*** shared version of the library, which you do not appear to have."
2387
newdeplibs="$newdeplibs $i"
2391
# Error occured in the first compile. Let's try to salvage the situation:
2392
# Compile a seperate program for each library.
2393
for i in $deplibs; do
2394
name="`expr $i : '-l\(.*\)'`"
2395
# If $name is empty we are operating on a -L argument.
2396
if test "$name" != "" ; then
2398
$CC -o conftest conftest.c $i
2400
if test $? -eq 0 ; then
2401
ldd_output=`ldd conftest`
2402
libname=`eval \\$echo \"$libname_spec\"`
2403
deplib_matches=`eval \\$echo \"$library_names_spec\"`
2404
set dummy $deplib_matches
2406
if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
2407
newdeplibs="$newdeplibs $i"
2411
echo "*** Warning: This library needs some functionality provided by $i."
2412
echo "*** I have the capability to make that library automatically link in when"
2413
echo "*** you link to this library. But I can only do this if you have a"
2414
echo "*** shared version of the library, which you do not appear to have."
2419
echo "*** Warning! Library $i is needed by this library but I was not able to"
2420
echo "*** make it link in! You will probably need to install it or some"
2421
echo "*** library that it depends on before this library will be fully"
2422
echo "*** functional. Installing it before continuing would be even better."
2425
newdeplibs="$newdeplibs $i"
2431
set dummy $deplibs_check_method
2432
file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
2433
for a_deplib in $deplibs; do
2434
name="`expr $a_deplib : '-l\(.*\)'`"
2435
# If $name is empty we are operating on a -L argument.
2436
if test "$name" != "" ; then
2437
libname=`eval \\$echo \"$libname_spec\"`
2438
for i in $lib_search_path; do
2439
potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
2440
for potent_lib in $potential_libs; do
2441
# Follow soft links.
2442
if ls -lLd "$potent_lib" 2>/dev/null \
2443
| grep " -> " >/dev/null; then
2446
# The statement above tries to avoid entering an
2447
# endless loop below, in case of cyclic links.
2448
# We might still enter an endless loop, since a link
2449
# loop can be closed while we follow links,
2451
potlib="$potent_lib"
2452
while test -h "$potlib" 2>/dev/null; do
2453
potliblink=`ls -ld $potlib | sed 's/.* -> //'`
2454
case "$potliblink" in
2455
[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
2456
*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
2459
if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
2461
| egrep "$file_magic_regex" > /dev/null; then
2462
newdeplibs="$newdeplibs $a_deplib"
2468
if test -n "$a_deplib" ; then
2471
echo "*** Warning: This library needs some functionality provided by $a_deplib."
2472
echo "*** I have the capability to make that library automatically link in when"
2473
echo "*** you link to this library. But I can only do this if you have a"
2474
echo "*** shared version of the library, which you do not appear to have."
2477
# Add a -L argument.
2478
newdeplibs="$newdeplibs $a_deplib"
2480
done # Gone through all deplibs.
2484
if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
2485
-e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
2486
grep . >/dev/null; then
2488
if test "X$deplibs_check_method" = "Xnone"; then
2489
echo "*** Warning: inter-library dependencies are not supported in this platform."
2491
echo "*** Warning: inter-library dependencies are not known to be supported."
2493
echo "*** All declared inter-library dependencies are being dropped."
2498
versuffix=$versuffix_save
2500
release=$release_save
2501
libname=$libname_save
2504
if test "$droppeddeps" = yes; then
2505
if test "$module" = yes; then
2507
echo "*** Warning: libtool could not satisfy all declared inter-library"
2508
echo "*** dependencies of module $libname. Therefore, libtool will create"
2509
echo "*** a static module, that should work as long as the dlopening"
2510
echo "*** application is linked with the -dlopen flag."
2511
if test -z "$global_symbol_pipe"; then
2513
echo "*** However, this would only work if libtool was able to extract symbol"
2514
echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
2515
echo "*** not find such a program. So, this module is probably useless."
2516
echo "*** \`nm' from GNU binutils and a full rebuild may help."
2518
if test "$build_old_libs" = no; then
2519
oldlibs="$output_objdir/$libname.$libext"
2520
build_libtool_libs=module
2523
build_libtool_libs=no
2526
echo "*** The inter-library dependencies that have been dropped here will be"
2527
echo "*** automatically added whenever a program is linked with this library"
2528
echo "*** or is declared to -dlopen it."
2531
# Done checking deplibs!
2535
# All the library-specific variables (install_libdir is set above).
2540
# Test again, we may have decided not to build it any more
2541
if test "$build_libtool_libs" = yes; then
2542
if test "$hardcode_into_libs" != no; then
2543
# Hardcode the library paths
2546
rpath="$finalize_rpath"
2547
test "$mode" != relink && rpath="$compile_rpath$rpath"
2548
for libdir in $rpath; do
2549
if test -n "$hardcode_libdir_flag_spec"; then
2550
if test -n "$hardcode_libdir_separator"; then
2551
if test -z "$hardcode_libdirs"; then
2552
hardcode_libdirs="$libdir"
2554
# Just accumulate the unique libdirs.
2555
case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
2556
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
2559
hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
2564
eval flag=\"$hardcode_libdir_flag_spec\"
2565
dep_rpath="$dep_rpath $flag"
2567
elif test -n "$runpath_var"; then
2568
case "$perm_rpath " in
2570
*) perm_rpath="$perm_rpath $libdir" ;;
2574
# Substitute the hardcoded libdirs into the rpath.
2575
if test -n "$hardcode_libdir_separator" &&
2576
test -n "$hardcode_libdirs"; then
2577
libdir="$hardcode_libdirs"
2578
eval dep_rpath=\"$hardcode_libdir_flag_spec\"
2580
if test -n "$runpath_var" && test -n "$perm_rpath"; then
2581
# We should set the runpath_var.
2583
for dir in $perm_rpath; do
2586
eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
2588
test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
2591
shlibpath="$finalize_shlibpath"
2592
test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
2593
if test -n "$shlibpath"; then
2594
eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
2597
# Get the real and link names of the library.
2598
eval library_names=\"$library_names_spec\"
2599
set dummy $library_names
2603
if test -n "$soname_spec"; then
2604
eval soname=\"$soname_spec\"
2609
lib="$output_objdir/$realname"
2612
linknames="$linknames $link"
2615
# Ensure that we have .o objects for linkers which dislike .lo
2616
# (e.g. aix) in case we are running --disable-static
2617
for obj in $libobjs; do
2618
xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
2619
if test "X$xdir" = "X$obj"; then
2624
baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
2625
oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
2626
if test ! -f $xdir/$oldobj; then
2627
$show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
2628
$run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
2632
# Use standard objects if they are pic
2633
test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
2635
# Prepare the list of exported symbols
2636
if test -z "$export_symbols"; then
2637
if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
2638
$show "generating symbol list for \`$libname.la'"
2639
export_symbols="$output_objdir/$libname.exp"
2640
$run $rm $export_symbols
2641
eval cmds=\"$export_symbols_cmds\"
2642
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
2643
for cmd in $cmds; do
2646
$run eval "$cmd" || exit $?
2649
if test -n "$export_symbols_regex"; then
2650
$show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
2651
$run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
2652
$show "$mv \"${export_symbols}T\" \"$export_symbols\""
2653
$run eval '$mv "${export_symbols}T" "$export_symbols"'
2658
if test -n "$export_symbols" && test -n "$include_expsyms"; then
2659
$run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
2662
if test -n "$convenience"; then
2663
if test -n "$whole_archive_flag_spec"; then
2664
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
2666
gentop="$output_objdir/${outputname}x"
2667
$show "${rm}r $gentop"
2668
$run ${rm}r "$gentop"
2669
$show "mkdir $gentop"
2670
$run mkdir "$gentop"
2672
if test $status -ne 0 && test ! -d "$gentop"; then
2675
generated="$generated $gentop"
2677
for xlib in $convenience; do
2678
# Extract the objects.
2680
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
2681
*) xabs=`pwd`"/$xlib" ;;
2683
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
2684
xdir="$gentop/$xlib"
2686
$show "${rm}r $xdir"
2691
if test $status -ne 0 && test ! -d "$xdir"; then
2694
$show "(cd $xdir && $AR x $xabs)"
2695
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
2697
libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
2702
if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
2703
eval flag=\"$thread_safe_flag_spec\"
2704
linker_flags="$linker_flags $flag"
2707
# Make a backup of the uninstalled library when relinking
2708
if test "$mode" = relink && test "$hardcode_into_libs" = all; then
2709
$run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
2712
# Do each of the archive commands.
2713
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
2714
eval cmds=\"$archive_expsym_cmds\"
2716
eval cmds=\"$archive_cmds\"
2718
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
2719
for cmd in $cmds; do
2722
$run eval "$cmd" || exit $?
2726
# Restore the uninstalled library and exit
2727
if test "$mode" = relink && test "$hardcode_into_libs" = all; then
2728
$run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
2732
# Create links to the real library.
2733
for linkname in $linknames; do
2734
if test "$realname" != "$linkname"; then
2735
$show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
2736
$run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
2740
# If -module or -export-dynamic was specified, set the dlname.
2741
if test "$module" = yes || test "$export_dynamic" = yes; then
2742
# On all known operating systems, these are identical.
2749
if test -n "$deplibs"; then
2750
$echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
2753
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
2754
$echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
2757
if test -n "$rpath"; then
2758
$echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
2761
if test -n "$xrpath"; then
2762
$echo "$modename: warning: \`-R' is ignored for objects" 1>&2
2765
if test -n "$vinfo"; then
2766
$echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
2769
if test -n "$release"; then
2770
$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
2775
if test -n "$objs$old_deplibs"; then
2776
$echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
2780
obj=`$echo "X$output" | $Xsed -e "$lo2o"`
2788
# Delete the old objects.
2789
$run $rm $obj $libobj
2791
# Objects from convenience libraries. This assumes
2792
# single-version convenience libraries. Whenever we create
2793
# different ones for PIC/non-PIC, this we'll have to duplicate
2797
# reload_cmds runs $LD directly, so let us get rid of
2798
# -Wl from whole_archive_flag_spec
2801
if test -n "$convenience"; then
2802
if test -n "$whole_archive_flag_spec"; then
2803
eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
2805
gentop="$output_objdir/${obj}x"
2806
$show "${rm}r $gentop"
2807
$run ${rm}r "$gentop"
2808
$show "mkdir $gentop"
2809
$run mkdir "$gentop"
2811
if test $status -ne 0 && test ! -d "$gentop"; then
2814
generated="$generated $gentop"
2816
for xlib in $convenience; do
2817
# Extract the objects.
2819
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
2820
*) xabs=`pwd`"/$xlib" ;;
2822
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
2823
xdir="$gentop/$xlib"
2825
$show "${rm}r $xdir"
2830
if test $status -ne 0 && test ! -d "$xdir"; then
2833
$show "(cd $xdir && $AR x $xabs)"
2834
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
2836
reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
2841
# Create the old-style object.
2842
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
2845
eval cmds=\"$reload_cmds\"
2846
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
2847
for cmd in $cmds; do
2850
$run eval "$cmd" || exit $?
2854
# Exit if we aren't doing a library object file.
2855
if test -z "$libobj"; then
2856
if test -n "$gentop"; then
2857
$show "${rm}r $gentop"
2864
if test "$build_libtool_libs" != yes; then
2865
if test -n "$gentop"; then
2866
$show "${rm}r $gentop"
2870
# Create an invalid libtool object if no PIC, so that we don't
2871
# accidentally link it into a program.
2872
$show "echo timestamp > $libobj"
2873
$run eval "echo timestamp > $libobj" || exit $?
2877
if test -n "$pic_flag" || test "$pic_mode" != default; then
2878
# Only do commands if we really have different PIC objects.
2879
reload_objs="$libobjs $reload_conv_objs"
2881
eval cmds=\"$reload_cmds\"
2882
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
2883
for cmd in $cmds; do
2886
$run eval "$cmd" || exit $?
2890
# Just create a symlink.
2893
xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
2894
if test "X$xdir" = "X$libobj"; then
2899
baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
2900
oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
2901
$show "(cd $xdir && $LN_S $oldobj $baseobj)"
2902
$run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
2905
if test -n "$gentop"; then
2906
$show "${rm}r $gentop"
2914
if test -n "$vinfo"; then
2915
$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
2918
if test -n "$release"; then
2919
$echo "$modename: warning: \`-release' is ignored for programs" 1>&2
2922
if test "$preload" = yes; then
2923
if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
2924
test "$dlopen_self_static" = unknown; then
2925
$echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
2929
compile_command="$compile_command $compile_deplibs"
2930
finalize_command="$finalize_command $finalize_deplibs"
2932
if test -n "$rpath$xrpath"; then
2933
# If the user specified any rpath flags, then add them.
2934
for libdir in $rpath $xrpath; do
2935
# This is the magic to use -rpath.
2936
case "$finalize_rpath " in
2938
*) finalize_rpath="$finalize_rpath $libdir" ;;
2943
# Now hardcode the library paths
2946
for libdir in $compile_rpath $finalize_rpath; do
2947
if test -n "$hardcode_libdir_flag_spec"; then
2948
if test -n "$hardcode_libdir_separator"; then
2949
if test -z "$hardcode_libdirs"; then
2950
hardcode_libdirs="$libdir"
2952
# Just accumulate the unique libdirs.
2953
case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
2954
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
2957
hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
2962
eval flag=\"$hardcode_libdir_flag_spec\"
2963
rpath="$rpath $flag"
2965
elif test -n "$runpath_var"; then
2966
case "$perm_rpath " in
2968
*) perm_rpath="$perm_rpath $libdir" ;;
2972
*-*-cygwin* | *-*-mingw* | *-*-os2*)
2973
case ":$dllsearchpath:" in
2975
*) dllsearchpath="$dllsearchpath:$libdir";;
2980
# Substitute the hardcoded libdirs into the rpath.
2981
if test -n "$hardcode_libdir_separator" &&
2982
test -n "$hardcode_libdirs"; then
2983
libdir="$hardcode_libdirs"
2984
eval rpath=\" $hardcode_libdir_flag_spec\"
2986
compile_rpath="$rpath"
2990
for libdir in $finalize_rpath; do
2991
if test -n "$hardcode_libdir_flag_spec"; then
2992
if test -n "$hardcode_libdir_separator"; then
2993
if test -z "$hardcode_libdirs"; then
2994
hardcode_libdirs="$libdir"
2996
# Just accumulate the unique libdirs.
2997
case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
2998
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
3001
hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
3006
eval flag=\"$hardcode_libdir_flag_spec\"
3007
rpath="$rpath $flag"
3009
elif test -n "$runpath_var"; then
3010
case "$finalize_perm_rpath " in
3012
*) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
3016
# Substitute the hardcoded libdirs into the rpath.
3017
if test -n "$hardcode_libdir_separator" &&
3018
test -n "$hardcode_libdirs"; then
3019
libdir="$hardcode_libdirs"
3020
eval rpath=\" $hardcode_libdir_flag_spec\"
3022
finalize_rpath="$rpath"
3024
if test -n "$libobjs" && test "$build_old_libs" = yes; then
3025
# Transform all the library objects into standard objects.
3026
compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3027
finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3031
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
3032
if test -n "$NM" && test -n "$global_symbol_pipe"; then
3033
dlsyms="${outputname}S.c"
3035
$echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
3039
if test -n "$dlsyms"; then
3043
# Discover the nlist of each of the dlfiles.
3044
nlist="$output_objdir/${outputname}.nm"
3046
$show "$rm $nlist ${nlist}S ${nlist}T"
3047
$run $rm "$nlist" "${nlist}S" "${nlist}T"
3049
# Parse the name list into a source file.
3050
$show "creating $output_objdir/$dlsyms"
3052
test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
3053
/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
3054
/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
3060
/* Prevent the only kind of declaration conflicts we can make. */
3061
#define lt_preloaded_symbols some_other_symbol
3063
/* External symbol declarations for the compiler. */\
3066
if test "$dlself" = yes; then
3067
$show "generating symbol list for \`$output'"
3069
test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
3071
# Add our own program objects to the symbol list.
3072
progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
3073
for arg in $progfiles; do
3074
$show "extracting global C symbols from \`$arg'"
3075
$run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
3078
if test -n "$exclude_expsyms"; then
3079
$run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
3080
$run eval '$mv "$nlist"T "$nlist"'
3083
if test -n "$export_symbols_regex"; then
3084
$run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
3085
$run eval '$mv "$nlist"T "$nlist"'
3088
# Prepare the list of exported symbols
3089
if test -z "$export_symbols"; then
3090
export_symbols="$output_objdir/$output.exp"
3091
$run $rm $export_symbols
3092
$run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
3094
$run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
3095
$run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
3096
$run eval 'mv "$nlist"T "$nlist"'
3100
for arg in $dlprefiles; do
3101
$show "extracting global C symbols from \`$arg'"
3102
name=`echo "$arg" | sed -e 's%^.*/%%'`
3103
$run eval 'echo ": $name " >> "$nlist"'
3104
$run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
3107
if test -z "$run"; then
3108
# Make sure we have at least an empty file.
3109
test -f "$nlist" || : > "$nlist"
3111
if test -n "$exclude_expsyms"; then
3112
egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
3113
$mv "$nlist"T "$nlist"
3116
# Try sorting and uniquifying the output.
3117
if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
3120
grep -v "^: " < "$nlist" > "$nlist"S
3123
if test -f "$nlist"S; then
3124
eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
3126
echo '/* NONE */' >> "$output_objdir/$dlsyms"
3129
$echo >> "$output_objdir/$dlsyms" "\
3131
#undef lt_preloaded_symbols
3133
#if defined (__STDC__) && __STDC__
3134
# define lt_ptr_t void *
3136
# define lt_ptr_t char *
3140
/* The mapping between symbol names and symbols. */
3141
extern const struct {
3145
lt_preloaded_symbols[] =
3149
sed -n -e 's/^: \([^ ]*\) $/ {\"\1\", (lt_ptr_t) 0},/p' \
3150
-e 's/^. \([^ ]*\) \([^ ]*\)$/ {"\2", (lt_ptr_t) \&\2},/p' \
3151
< "$nlist" >> "$output_objdir/$dlsyms"
3153
$echo >> "$output_objdir/$dlsyms" "\
3157
/* This works around a problem in FreeBSD linker */
3158
#ifdef FREEBSD_WORKAROUND
3159
static const void *lt_preloaded_setup() {
3160
return lt_preloaded_symbols;
3170
pic_flag_for_symtable=
3172
# compiling the symbol table file with pic_flag works around
3173
# a FreeBSD bug that causes programs to crash when -lm is
3174
# linked before any other PIC object. But we must not use
3175
# pic_flag when linking with -static. The problem exists in
3176
# FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
3177
*-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
3178
case "$compile_command " in
3180
*) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
3183
case "$compile_command " in
3185
*) pic_flag_for_symtable=" $pic_flag -DPIC";;
3189
# Now compile the dynamic symbol file.
3190
$show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
3191
$run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
3193
# Clean up the generated files.
3194
$show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
3195
$run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
3197
# Transform the symbol file into the correct name.
3198
compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
3199
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
3202
$echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
3207
# We keep going just in case the user didn't refer to
3208
# lt_preloaded_symbols. The linker will fail if global_symbol_pipe
3209
# really was required.
3211
# Nullify the symbol file.
3212
compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
3213
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
3216
if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
3217
# Replace the output file specification.
3218
compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
3219
link_command="$compile_command$compile_rpath"
3221
# We have no uninstalled library dependencies, so finalize right now.
3222
$show "$link_command"
3223
$run eval "$link_command"
3226
# Delete the generated files.
3227
if test -n "$dlsyms"; then
3228
$show "$rm $output_objdir/${outputname}S.${objext}"
3229
$run $rm "$output_objdir/${outputname}S.${objext}"
3235
if test -n "$shlibpath_var"; then
3236
# We should set the shlibpath_var
3238
for dir in $temp_rpath; do
3240
[\\/]* | [A-Za-z]:[\\/]*)
3245
# Relative path: add a thisdir entry.
3246
rpath="$rpath\$thisdir/$dir:"
3253
if test -n "$compile_shlibpath$finalize_shlibpath"; then
3254
compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
3256
if test -n "$finalize_shlibpath"; then
3257
finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
3262
if test -n "$runpath_var"; then
3263
if test -n "$perm_rpath"; then
3264
# We should set the runpath_var.
3266
for dir in $perm_rpath; do
3269
compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
3271
if test -n "$finalize_perm_rpath"; then
3272
# We should set the runpath_var.
3274
for dir in $finalize_perm_rpath; do
3277
finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
3281
if test "$no_install" = yes; then
3282
# We don't need to create a wrapper script.
3283
link_command="$compile_var$compile_command$compile_rpath"
3284
# Replace the output file specification.
3285
link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
3286
# Delete the old output file.
3288
# Link the executable and exit
3289
$show "$link_command"
3290
$run eval "$link_command" || exit $?
3294
if test "$hardcode_action" = relink || test "$hardcode_into_libs" = all; then
3295
# Fast installation is not supported
3296
link_command="$compile_var$compile_command$compile_rpath"
3297
relink_command="$finalize_var$finalize_command$finalize_rpath"
3299
$echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
3300
$echo "$modename: \`$output' will be relinked during installation" 1>&2
3302
if test "$fast_install" != no; then
3303
link_command="$finalize_var$compile_command$finalize_rpath"
3304
if test "$fast_install" = yes; then
3305
relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
3307
# fast_install is set to needless
3311
link_command="$compile_var$compile_command$compile_rpath"
3312
relink_command="$finalize_var$finalize_command$finalize_rpath"
3316
# Replace the output file specification.
3317
link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
3319
# Delete the old output files.
3320
$run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
3322
$show "$link_command"
3323
$run eval "$link_command" || exit $?
3325
# Now create the wrapper script.
3326
$show "creating $output"
3328
# Quote the relink command for shipping.
3329
if test -n "$relink_command"; then
3330
relink_command="cd `pwd`; $relink_command"
3331
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
3334
# Quote $echo for shipping.
3335
if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
3337
[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
3338
*) qecho="$SHELL `pwd`/$0 --fallback-echo";;
3340
qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
3342
qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
3345
# Only actually do things if our run command is non-null.
3346
if test -z "$run"; then
3347
# win32 will think the script is a binary if it has
3348
# a .exe suffix, so we strip it off here.
3350
*.exe) output=`echo $output|sed 's,.exe$,,'` ;;
3353
trap "$rm $output; exit 1" 1 2 15
3358
# $output - temporary wrapper script for $objdir/$outputname
3359
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
3361
# The $output program cannot be directly executed until all the libtool
3362
# libraries that it depends on are installed.
3364
# This wrapper script should never be moved out of the build directory.
3365
# If it is, it will not operate correctly.
3367
# Sed substitution that helps us do robust quoting. It backslashifies
3368
# metacharacters that are still active within double-quoted strings.
3369
Xsed='sed -e 1s/^X//'
3370
sed_quote_subst='$sed_quote_subst'
3372
# The HP-UX ksh and POSIX shell print the target directory to stdout
3374
if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
3376
relink_command=\"$relink_command\"
3378
# This environment variable determines our operation mode.
3379
if test \"\$libtool_install_magic\" = \"$magic\"; then
3380
# install mode needs the following variable:
3381
link_against_libtool_libs='$link_against_libtool_libs'
3383
# When we are sourced in execute mode, \$file and \$echo are already set.
3384
if test \"\$libtool_execute_magic\" != \"$magic\"; then
3387
# Make sure echo works.
3388
if test \"X\$1\" = X--no-reexec; then
3389
# Discard the --no-reexec flag, and continue.
3391
elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
3392
# Yippee, \$echo works!
3395
# Restart under the correct shell, and then maybe \$echo will work.
3396
exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
3402
# Find the directory that this script lives in.
3403
thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
3404
test \"x\$thisdir\" = \"x\$file\" && thisdir=.
3406
# Follow symbolic links until we get to the real thisdir.
3407
file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
3408
while test -n \"\$file\"; do
3409
destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
3411
# If there was a directory component, then change thisdir.
3412
if test \"x\$destdir\" != \"x\$file\"; then
3413
case \"\$destdir\" in
3414
[\\/]* | [A-Za-z]:[\\/]*) thisdir=\"\$destdir\" ;;
3415
*) thisdir=\"\$thisdir/\$destdir\" ;;
3419
file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
3420
file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
3423
# Try to get the absolute directory name.
3424
absdir=\`cd \"\$thisdir\" && pwd\`
3425
test -n \"\$absdir\" && thisdir=\"\$absdir\"
3428
if test "$fast_install" = yes; then
3430
program=lt-'$outputname'
3431
progdir=\"\$thisdir/$objdir\"
3433
if test ! -f \"\$progdir/\$program\" || \\
3434
{ file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
3435
test \"X\$file\" != \"X\$progdir/\$program\"; }; then
3437
file=\"\$\$-\$program\"
3439
if test ! -d \"\$progdir\"; then
3440
$mkdir \"\$progdir\"
3442
$rm \"\$progdir/\$file\"
3447
# relink executable if necessary
3448
if test -n \"\$relink_command\"; then
3449
if (eval \$relink_command); then :
3451
$rm \"\$progdir/\$file\"
3456
$mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
3457
{ $rm \"\$progdir/\$program\";
3458
$mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
3459
$rm \"\$progdir/\$file\"
3463
program='$outputname'
3464
progdir=\"\$thisdir/$objdir\"
3470
if test -f \"\$progdir/\$program\"; then"
3472
# Export our shlibpath_var if we have one.
3473
if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
3475
# Add our own library path to $shlibpath_var
3476
$shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
3478
# Some systems cannot cope with colon-terminated $shlibpath_var
3479
# The second colon is a workaround for a bug in BeOS R4 sed
3480
$shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
3482
export $shlibpath_var
3486
# fixup the dll searchpath if we need to.
3487
if test -n "$dllsearchpath"; then
3489
# Add the dll search path components to the executable PATH
3490
PATH=$dllsearchpath:\$PATH
3495
if test \"\$libtool_execute_magic\" != \"$magic\"; then
3496
# Run the actual program with our arguments.
3499
*-*-cygwin* | *-*-mingw | *-*-os2*)
3500
# win32 systems need to use the prog path for dll
3503
exec \$progdir\\\\\$program \${1+\"\$@\"}
3508
# Export the path to the program.
3509
PATH=\"\$progdir:\$PATH\"
3512
exec \$program \${1+\"\$@\"}
3517
\$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
3521
# The program doesn't exist.
3522
\$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
3523
\$echo \"This script is just a wrapper for \$program.\" 1>&2
3524
echo \"See the $PACKAGE documentation for more information.\" 1>&2
3535
# See if we need to build an old-fashioned archive.
3536
for oldlib in $oldlibs; do
3538
if test "$build_libtool_libs" = convenience; then
3539
oldobjs="$libobjs_save"
3540
addlibs="$convenience"
3541
build_libtool_libs=no
3543
if test "$build_libtool_libs" = module; then
3544
oldobjs="$libobjs_save"
3545
build_libtool_libs=no
3547
oldobjs="$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
3549
addlibs="$old_convenience"
3552
if test -n "$addlibs"; then
3553
gentop="$output_objdir/${outputname}x"
3554
$show "${rm}r $gentop"
3555
$run ${rm}r "$gentop"
3556
$show "mkdir $gentop"
3557
$run mkdir "$gentop"
3559
if test $status -ne 0 && test ! -d "$gentop"; then
3562
generated="$generated $gentop"
3564
# Add in members from convenience archives.
3565
for xlib in $addlibs; do
3566
# Extract the objects.
3568
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
3569
*) xabs=`pwd`"/$xlib" ;;
3571
xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
3572
xdir="$gentop/$xlib"
3574
$show "${rm}r $xdir"
3579
if test $status -ne 0 && test ! -d "$xdir"; then
3582
$show "(cd $xdir && $AR x $xabs)"
3583
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
3585
oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
3589
# Do each command in the archive commands.
3590
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
3591
eval cmds=\"$old_archive_from_new_cmds\"
3593
# Ensure that we have .o objects in place in case we decided
3594
# not to build a shared library, and have fallen back to building
3595
# static libs even though --disable-static was passed!
3596
for oldobj in $oldobjs; do
3597
if test ! -f $oldobj; then
3598
xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
3599
if test "X$xdir" = "X$oldobj"; then
3604
baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
3605
obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
3606
$show "(cd $xdir && ${LN_S} $obj $baseobj)"
3607
$run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
3611
eval cmds=\"$old_archive_cmds\"
3613
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3614
for cmd in $cmds; do
3617
$run eval "$cmd" || exit $?
3622
if test -n "$generated"; then
3623
$show "${rm}r$generated"
3624
$run ${rm}r$generated
3627
# Now create the libtool archive.
3631
test "$build_old_libs" = yes && old_library="$libname.$libext"
3632
$show "creating $output"
3634
# Quote the link command for shipping.
3635
relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
3636
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
3638
# Only create the output if not a dry run.
3639
if test -z "$run"; then
3640
for installed in no yes; do
3641
if test "$installed" = yes; then
3642
if test -z "$install_libdir"; then
3645
output="$output_objdir/$outputname"i
3646
# Replace all uninstalled libtool libraries with the installed ones
3648
for deplib in $dependency_libs; do
3651
name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
3652
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
3653
if test -z "$libdir"; then
3654
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
3657
newdependency_libs="$newdependency_libs $libdir/$name"
3659
*) newdependency_libs="$newdependency_libs $deplib" ;;
3662
dependency_libs="$newdependency_libs"
3664
for lib in $dlfiles; do
3665
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
3666
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
3667
if test -z "$libdir"; then
3668
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
3671
newdlfiles="$newdlfiles $libdir/$name"
3673
dlfiles="$newdlfiles"
3675
for lib in $dlprefiles; do
3676
name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
3677
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
3678
if test -z "$libdir"; then
3679
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
3682
newdlprefiles="$newdlprefiles $libdir/$name"
3684
dlprefiles="$newdlprefiles"
3688
# $outputname - a libtool library file
3689
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
3691
# Please DO NOT delete this file!
3692
# It is necessary for linking the library.
3694
# The name that we can dlopen(3).
3697
# Names of this library.
3698
library_names='$library_names'
3700
# The name of the static archive.
3701
old_library='$old_library'
3703
# Libraries that this one depends upon.
3704
dependency_libs='$dependency_libs'
3706
# Version information for $libname.
3711
# Is this an already installed library?
3712
installed=$installed
3714
# Files to dlopen/dlpreopen
3716
dlpreopen='$dlprefiles'
3718
# Directory that this library needs to be installed in:
3719
libdir='$install_libdir'"
3720
if test "$installed" = no; then
3722
relink_command=\"$relink_command\""
3727
# Do a symbolic link so that the libtool archive can be found in
3728
# LD_LIBRARY_PATH before the program is installed.
3729
$show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
3730
$run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
3736
# libtool install mode
3738
modename="$modename: install"
3740
# There may be an optional sh(1) argument at the beginning of
3741
# install_prog (especially on Windows NT).
3742
if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh; then
3743
# Aesthetically quote it.
3744
arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
3746
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
3750
install_prog="$arg "
3758
# The real first argument should be the name of the installation program.
3759
# Aesthetically quote it.
3760
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
3762
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
3766
install_prog="$install_prog$arg"
3768
# We need to accept at least all the BSD install flags.
3778
if test -n "$dest"; then
3779
files="$files $dest"
3797
# If the previous option needed an argument, then skip it.
3798
if test -n "$prev"; then
3807
# Aesthetically quote the argument.
3808
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
3810
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
3814
install_prog="$install_prog $arg"
3817
if test -z "$install_prog"; then
3818
$echo "$modename: you must specify an install program" 1>&2
3823
if test -n "$prev"; then
3824
$echo "$modename: the \`$prev' option requires an argument" 1>&2
3829
if test -z "$files"; then
3830
if test -z "$dest"; then
3831
$echo "$modename: no file or destination specified" 1>&2
3833
$echo "$modename: you must specify a destination" 1>&2
3839
# Strip any trailing slash from the destination.
3840
dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
3842
# Check to see that the destination is a directory.
3843
test -d "$dest" && isdir=yes
3844
if test "$isdir" = yes; then
3848
destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
3849
test "X$destdir" = "X$dest" && destdir=.
3850
destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
3852
# Not a directory, so check to see that there is only one file specified.
3854
if test $# -gt 2; then
3855
$echo "$modename: \`$dest' is not a directory" 1>&2
3861
[\\/]* | [A-Za-z]:[\\/]*) ;;
3863
for file in $files; do
3867
$echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
3876
# This variable tells wrapper scripts just to set variables rather
3877
# than running their programs.
3878
libtool_install_magic="$magic"
3883
for file in $files; do
3885
# Do each installation.
3888
# Do the static libraries later.
3889
staticlibs="$staticlibs $file"
3893
# Check to see that this really is a libtool archive.
3894
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
3896
$echo "$modename: \`$file' is not a valid libtool archive" 1>&2
3904
# If there is no directory component, then add one.
3906
*/* | *\\*) . $file ;;
3910
# Add the libdir to current_libdirs if it is the destination.
3911
if test "X$destdir" = "X$libdir"; then
3912
case "$current_libdirs " in
3914
*) current_libdirs="$current_libdirs $libdir" ;;
3917
# Note the libdir as a future libdir.
3918
case "$future_libdirs " in
3920
*) future_libdirs="$future_libdirs $libdir" ;;
3924
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
3925
test "X$dir" = "X$file/" && dir=
3928
if test "$hardcode_into_libs" = all; then
3929
if test -z "$relink_command"; then
3930
$echo "$modename: invalid libtool pseudo library \`$file'" 1>&2
3933
$echo "$modename: warning: relinking \`$file'" 1>&2
3934
$show "$relink_command"
3935
if $run eval "$relink_command"; then :
3937
$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
3942
# See the names of the shared library.
3943
set dummy $library_names
3944
if test -n "$2"; then
3950
test "$hardcode_into_libs" = all && srcname="$realname"T
3952
# Install the shared library and build the symlinks.
3953
$show "$install_prog $dir/$srcname $destdir/$realname"
3954
$run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
3955
if test -n "$stripme" && test -n "$striplib"; then
3956
$show "$striplib $destdir/$realname"
3957
$run eval "$striplib $destdir/$realname" || exit $?
3960
if test $# -gt 0; then
3961
# Delete the old symlinks, and create new ones.
3964
if test "$linkname" != "$realname"; then
3965
$show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
3966
$run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
3971
# Do each command in the postinstall commands.
3972
lib="$destdir/$realname"
3973
eval cmds=\"$postinstall_cmds\"
3974
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
3975
for cmd in $cmds; do
3978
$run eval "$cmd" || exit $?
3983
# Install the pseudo-library for information purposes.
3984
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
3985
instname="$dir/$name"i
3986
$show "$install_prog $instname $destdir/$name"
3987
$run eval "$install_prog $instname $destdir/$name" || exit $?
3989
# Maybe install the static library, too.
3990
test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
3994
# Install (i.e. copy) a libtool object.
3996
# Figure out destination file name, if it wasn't already specified.
3997
if test -n "$destname"; then
3998
destfile="$destdir/$destname"
4000
destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4001
destfile="$destdir/$destfile"
4004
# Deduce the name of the destination old-style object file.
4007
staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
4010
staticdest="$destfile"
4014
$echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
4020
# Install the libtool object if requested.
4021
if test -n "$destfile"; then
4022
$show "$install_prog $file $destfile"
4023
$run eval "$install_prog $file $destfile" || exit $?
4026
# Install the old object if enabled.
4027
if test "$build_old_libs" = yes; then
4028
# Deduce the name of the old-style object file.
4029
staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
4031
$show "$install_prog $staticobj $staticdest"
4032
$run eval "$install_prog \$staticobj \$staticdest" || exit $?
4038
# Figure out destination file name, if it wasn't already specified.
4039
if test -n "$destname"; then
4040
destfile="$destdir/$destname"
4042
destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4043
destfile="$destdir/$destfile"
4046
# Do a test to see if this is really a libtool program.
4047
if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4048
link_against_libtool_libs=
4051
# If there is no directory component, then add one.
4053
*/* | *\\*) . $file ;;
4057
# Check the variables that should have been set.
4058
if test -z "$link_against_libtool_libs"; then
4059
$echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
4064
for lib in $link_against_libtool_libs; do
4065
# Check to see that each library is installed.
4067
if test -f "$lib"; then
4068
# If there is no directory component, then add one.
4070
*/* | *\\*) . $lib ;;
4074
libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
4075
if test -n "$libdir" && test ! -f "$libfile"; then
4076
$echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
4082
# If there is no directory component, then add one.
4084
*/* | *\\*) . $file ;;
4089
if test "$fast_install" = no && test -n "$relink_command"; then
4090
if test "$finalize" = yes && test -z "$run"; then
4092
test -n "$TMPDIR" && tmpdir="$TMPDIR"
4093
tmpdir="$tmpdir/libtool-$$"
4094
if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
4096
$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
4099
outputname="$tmpdir/$file"
4100
# Replace the output file specification.
4101
relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
4103
$show "$relink_command"
4104
if $run eval "$relink_command"; then :
4106
$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
4112
$echo "$modename: warning: cannot relink \`$file'" 1>&2
4115
# Install the binary that we compiled earlier.
4116
file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
4120
$show "$install_prog$stripme $file $destfile"
4121
$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
4122
test -n "$outputname" && ${rm}r "$tmpdir"
4127
for file in $staticlibs; do
4128
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4130
# Set up the ranlib parameters.
4131
oldlib="$destdir/$name"
4133
$show "$install_prog $file $oldlib"
4134
$run eval "$install_prog \$file \$oldlib" || exit $?
4136
if test -n "$stripme" && test -n "$striplib"; then
4137
$show "$old_striplib $oldlib"
4138
$run eval "$old_striplib $oldlib" || exit $?
4141
# Do each command in the postinstall commands.
4142
eval cmds=\"$old_postinstall_cmds\"
4143
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
4144
for cmd in $cmds; do
4147
$run eval "$cmd" || exit $?
4152
if test -n "$future_libdirs"; then
4153
$echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
4156
if test -n "$current_libdirs"; then
4157
# Maybe just do a dry run.
4158
test -n "$run" && current_libdirs=" -n$current_libdirs"
4159
exec $SHELL $0 --finish$current_libdirs
4166
# libtool finish mode
4168
modename="$modename: finish"
4172
if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
4175
libdirs="$libdirs $dir"
4178
for libdir in $libdirs; do
4179
if test -n "$finish_cmds"; then
4180
# Do each command in the finish commands.
4181
eval cmds=\"$finish_cmds\"
4182
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
4183
for cmd in $cmds; do
4186
$run eval "$cmd" || admincmds="$admincmds
4191
if test -n "$finish_eval"; then
4192
# Do the single finish_eval.
4193
eval cmds=\"$finish_eval\"
4194
$run eval "$cmds" || admincmds="$admincmds
4200
# Exit here if they wanted silent mode.
4201
test "$show" = : && exit 0
4203
echo "----------------------------------------------------------------------"
4204
echo "Libraries have been installed in:"
4205
for libdir in $libdirs; do
4209
echo "If you ever happen to want to link against installed libraries"
4210
echo "in a given directory, LIBDIR, you must either use libtool, and"
4211
echo "specify the full pathname of the library, or use \`-LLIBDIR'"
4212
echo "flag during linking and do at least one of the following:"
4213
if test -n "$shlibpath_var"; then
4214
echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
4215
echo " during execution"
4217
if test -n "$runpath_var"; then
4218
echo " - add LIBDIR to the \`$runpath_var' environment variable"
4219
echo " during linking"
4221
if test -n "$hardcode_libdir_flag_spec"; then
4223
eval flag=\"$hardcode_libdir_flag_spec\"
4225
echo " - use the \`$flag' linker flag"
4227
if test -n "$admincmds"; then
4228
echo " - have your system administrator run these commands:$admincmds"
4230
if test -f /etc/ld.so.conf; then
4231
echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
4234
echo "See any operating system documentation about shared libraries for"
4235
echo "more information, such as the ld(1) and ld.so(8) manual pages."
4236
echo "----------------------------------------------------------------------"
4240
# libtool execute mode
4242
modename="$modename: execute"
4244
# The first argument is the command name.
4246
if test -z "$cmd"; then
4247
$echo "$modename: you must specify a COMMAND" 1>&2
4252
# Handle -dlopen flags immediately.
4253
for file in $execute_dlfiles; do
4254
if test ! -f "$file"; then
4255
$echo "$modename: \`$file' is not a file" 1>&2
4263
# Check to see that this really is a libtool archive.
4264
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
4266
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
4271
# Read the libtool library.
4275
# If there is no directory component, then add one.
4277
*/* | *\\*) . $file ;;
4281
# Skip this library if it cannot be dlopened.
4282
if test -z "$dlname"; then
4283
# Warn if it was a shared library.
4284
test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
4288
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
4289
test "X$dir" = "X$file" && dir=.
4291
if test -f "$dir/$objdir/$dlname"; then
4294
$echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
4300
# Just add the directory containing the .lo file.
4301
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
4302
test "X$dir" = "X$file" && dir=.
4306
$echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
4311
# Get the absolute pathname.
4312
absdir=`cd "$dir" && pwd`
4313
test -n "$absdir" && dir="$absdir"
4315
# Now add the directory to shlibpath_var.
4316
if eval "test -z \"\$$shlibpath_var\""; then
4317
eval "$shlibpath_var=\"\$dir\""
4319
eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
4323
# This variable tells wrapper scripts just to set shlibpath_var
4324
# rather than running their programs.
4325
libtool_execute_magic="$magic"
4327
# Check if any of the arguments is a wrapper script.
4334
# Do a test to see if this is really a libtool program.
4335
if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4336
# If there is no directory component, then add one.
4338
*/* | *\\*) . $file ;;
4342
# Transform arg to wrapped name.
4343
file="$progdir/$program"
4347
# Quote arguments (to preserve shell metacharacters).
4348
file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
4349
args="$args \"$file\""
4352
if test -z "$run"; then
4353
if test -n "$shlibpath_var"; then
4354
# Export the shlibpath_var.
4355
eval "export $shlibpath_var"
4358
# Restore saved enviroment variables
4359
if test "${save_LC_ALL+set}" = set; then
4360
LC_ALL="$save_LC_ALL"; export LC_ALL
4362
if test "${save_LANG+set}" = set; then
4363
LANG="$save_LANG"; export LANG
4366
# Now actually exec the command.
4367
eval "exec \$cmd$args"
4369
$echo "$modename: cannot exec \$cmd$args"
4372
# Display what would be done.
4373
if test -n "$shlibpath_var"; then
4374
eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
4375
$echo "export $shlibpath_var"
4382
# libtool clean and uninstall mode
4384
modename="$modename: $mode"
4388
# This variable tells wrapper scripts just to set variables rather
4389
# than running their programs.
4390
libtool_install_magic="$magic"
4395
-*) rm="$rm $arg" ;;
4396
*) files="$files $arg" ;;
4400
if test -z "$rm"; then
4401
$echo "$modename: you must specify an RM program" 1>&2
4406
for file in $files; do
4407
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
4408
if test "X$dir" = "X$file"; then
4412
objdir="$dir/$objdir"
4414
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
4415
test $mode = uninstall && objdir="$dir"
4421
# Possibly a libtool archive, so verify it.
4422
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4425
# Delete the libtool libraries and symlinks.
4426
for n in $library_names; do
4427
rmfiles="$rmfiles $objdir/$n"
4429
test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
4430
test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
4432
if test $mode = uninstall; then
4433
if test -n "$library_names"; then
4434
# Do each command in the postuninstall commands.
4435
eval cmds=\"$postuninstall_cmds\"
4436
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
4437
for cmd in $cmds; do
4445
if test -n "$old_library"; then
4446
# Do each command in the old_postuninstall commands.
4447
eval cmds=\"$old_postuninstall_cmds\"
4448
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
4449
for cmd in $cmds; do
4456
# FIXME: should reinstall the best remaining shared library.
4462
if test "$build_old_libs" = yes; then
4463
oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
4464
rmfiles="$rmfiles $dir/$oldobj"
4469
# Do a test to see if this is a libtool program.
4470
if test $mode = clean &&
4471
(sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
4475
rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
4476
if test "$fast_install" = yes && test -n "$relink_command"; then
4477
rmfiles="$rmfiles $objdir/lt-$name"
4482
$show "$rm $rmfiles"
4489
$echo "$modename: you must specify a MODE" 1>&2
4490
$echo "$generic_help" 1>&2
4495
$echo "$modename: invalid operation mode \`$mode'" 1>&2
4496
$echo "$generic_help" 1>&2
4498
fi # test -z "$show_help"
4500
# We need to display help for each of the modes.
4503
"Usage: $modename [OPTION]... [MODE-ARG]...
4505
Provide generalized library-building support services.
4507
--config show all configuration variables
4508
--debug enable verbose shell tracing
4509
-n, --dry-run display commands without modifying any files
4510
--features display basic configuration information and exit
4511
--finish same as \`--mode=finish'
4512
--help display this help message and exit
4513
--mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
4514
--quiet same as \`--silent'
4515
--silent don't print informational messages
4516
--version print version information
4518
MODE must be one of the following:
4520
clean remove files from the build directory
4521
compile compile a source file into a libtool object
4522
execute automatically set library path, then run a program
4523
finish complete the installation of libtool libraries
4524
install install libraries or executables
4525
link create a library or an executable
4526
uninstall remove libraries from an installed directory
4528
MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
4529
a more detailed description of MODE."
4535
"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
4537
Remove files from the build directory.
4539
RM is the name of the program to use to delete files associated with each FILE
4540
(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
4543
If FILE is a libtool library, object or program, all the files associated
4544
with it are deleted. Otherwise, only FILE itself is deleted using RM."
4549
"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
4551
Compile a source file into a libtool library object.
4553
This mode accepts the following additional options:
4555
-o OUTPUT-FILE set the output file name to OUTPUT-FILE
4556
-static always build a \`.o' file suitable for static linking
4558
COMPILE-COMMAND is a command to be used in creating a \`standard' object file
4559
from the given SOURCEFILE.
4561
The output file name is determined by removing the directory component from
4562
SOURCEFILE, then substituting the C source code suffix \`.c' with the
4563
library object suffix, \`.lo'."
4568
"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
4570
Automatically set library path, then run a program.
4572
This mode accepts the following additional options:
4574
-dlopen FILE add the directory containing FILE to the library path
4576
This mode sets the library path environment variable according to \`-dlopen'
4579
If any of the ARGS are libtool executable wrappers, then they are translated
4580
into their corresponding uninstalled binary, and any of their required library
4581
directories are added to the library path.
4583
Then, COMMAND is executed, with ARGS as arguments."
4588
"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
4590
Complete the installation of libtool libraries.
4592
Each LIBDIR is a directory that contains libtool libraries.
4594
The commands that this mode executes may require superuser privileges. Use
4595
the \`--dry-run' option if you just want to see what would be executed."
4600
"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
4602
Install executables or libraries.
4604
INSTALL-COMMAND is the installation command. The first component should be
4605
either the \`install' or \`cp' program.
4607
The rest of the components are interpreted as arguments to that command (only
4608
BSD-compatible install options are recognized)."
4613
"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
4615
Link object files or libraries together to form another library, or to
4616
create an executable program.
4618
LINK-COMMAND is a command using the C compiler that you would use to create
4619
a program from several object files.
4621
The following components of LINK-COMMAND are treated specially:
4623
-all-static do not do any dynamic linking at all
4624
-avoid-version do not add a version suffix if possible
4625
-dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
4626
-dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
4627
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
4628
-export-symbols SYMFILE
4629
try to export only the symbols listed in SYMFILE
4630
-export-symbols-regex REGEX
4631
try to export only the symbols matching REGEX
4632
-LLIBDIR search LIBDIR for required installed libraries
4633
-lNAME OUTPUT-FILE requires the installed library libNAME
4634
-module build a library that can dlopened
4635
-no-fast-install disable the fast-install mode
4636
-no-install link a not-installable executable
4637
-no-undefined declare that a library does not refer to external symbols
4638
-o OUTPUT-FILE create OUTPUT-FILE from the specified objects
4639
-release RELEASE specify package release information
4640
-rpath LIBDIR the created library will eventually be installed in LIBDIR
4641
-R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
4642
-static do not do any dynamic linking of libtool libraries
4643
-version-info CURRENT[:REVISION[:AGE]]
4644
specify library version info [each variable defaults to 0]
4646
All other options (arguments beginning with \`-') are ignored.
4648
Every other argument is treated as a filename. Files ending in \`.la' are
4649
treated as uninstalled libtool libraries, other files are standard or library
4652
If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
4653
only library objects (\`.lo' files) may be specified, and \`-rpath' is
4654
required, except when creating a convenience library.
4656
If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
4657
using \`ar' and \`ranlib', or on Windows using \`lib'.
4659
If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
4660
is created, otherwise an executable program is created."
4665
"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
4667
Remove libraries from an installation directory.
4669
RM is the name of the program to use to delete files associated with each FILE
4670
(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
4673
If FILE is a libtool library, all the files associated with it are deleted.
4674
Otherwise, only FILE itself is deleted using RM."
4678
$echo "$modename: invalid operation mode \`$mode'" 1>&2
4685
$echo "Try \`$modename --help' for more information about other modes."