* TODO: describe problems with libltdl

* ltmain.in (ILD): tidy up, add comments, remove dead code,
  merge duplicate code

* ltmain.in (ILD): don't touch newdependency_libs after scan or
  dlopen pass

* ltmain.in (ILD): don't dlpreopen dependency_libs of a dlopened
  module (remove absolutely wrong quick hack)

* ltmain.in (ILD): remove wrong comments about duplicate removal

* ltmain.in (ILD): build a static-only module if it has
  static libraries in its dependencies (so that libltdl can
  safely load dependency_libs)

* ltmain.in (argument parsing): prefix comparsions of -l args with X,
  replace -lc with `-framework System' _after_ the ILD passes

* ltmain.in (argument parsing): support dl[pre]open
  for both .o and .lo files

* ltmain.in (deplibs_check): use portable test syntax

* ltmain.in (help): document -prefer-[non-]pic flags

* ltmain.in: improve readablity by adding some comments,
  rename uninst_* to notinst_* (more adequate name)
This commit is contained in:
Thomas Tanner 2001-04-24 20:30:21 +00:00 committed by Thomas Tanner
parent e943e1bf57
commit 6588d8158d
3 changed files with 215 additions and 187 deletions

View File

@ -1,3 +1,35 @@
2001-04-24 Thomas Tanner <tanner@ffii.org>
* TODO: describe problems with libltdl
* ltmain.in (ILD): tidy up, add comments, remove dead code,
merge duplicate code
* ltmain.in (ILD): don't touch newdependency_libs after scan or
dlopen pass
* ltmain.in (ILD): don't dlpreopen dependency_libs of a dlopened
module (remove absolutely wrong quick hack)
* ltmain.in (ILD): remove wrong comments about duplicate removal
* ltmain.in (ILD): build a static-only module if it has
static libraries in its dependencies (so that libltdl can
safely load dependency_libs)
* ltmain.in (argument parsing): prefix comparsions of -l args with X,
replace -lc with `-framework System' _after_ the ILD passes
* ltmain.in (argument parsing): support dl[pre]open
for both .o and .lo files
* ltmain.in (deplibs_check): use portable test syntax
* ltmain.in (help): document -prefer-[non-]pic flags
* ltmain.in: improve readablity by adding some comments,
rename uninst_* to notinst_* (more adequate name)
2001-04-24 Gary V. Vaughan <gvv@techie.com>
* doc/PLATFORMS: More updates from subscribers to

11
TODO
View File

@ -8,6 +8,17 @@ In the near future:
multi-language-branch, so that CVS automake can remove its references
to ltconfig.
* Fix the following bugs in libltdl:
- error reporting of tryall_dlopen():
if the file actually doesn't exist (stat() fails or it wasn't dlpreopened)
-> report `file not found'
if it cannot be loaded (e.g. due to missing dependencies)
-> report dlerror
open question: which error should be reported if all dlloaders fail
or if a specific module type can only be loaded by one of them, how report its dlerror?
Also report dlerror() for dlclose and dlsym if available
- Make sure that the dependency_libs of a dlpreopened module won't be loaded.
* Check whether the version of libtool.m4 is compatible with
ltconfig/ltmain.sh. Meanwhile, the recommended approach for
developers using automake is to insert libtool.m4 in acinclude.m4.

359
ltmain.in
View File

@ -924,7 +924,7 @@ compiler."
continue
;;
esac
fi
fi # test -n $prev
prevarg="$arg"
@ -965,7 +965,7 @@ compiler."
-export-symbols | -export-symbols-regex)
if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
$echo "$modename: not more than one -exported-symbols argument allowed"
$echo "$modename: more than one -exported-symbols argument is not allowed"
exit 1
fi
if test "X$arg" = "X-export-symbols"; then
@ -987,7 +987,7 @@ compiler."
esac
continue
;;
-L*)
dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
# We need an absolute path.
@ -1021,28 +1021,15 @@ compiler."
;;
-l*)
if test "$arg" = "-lc"; then
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
# These systems don't actually have c library (as such)
continue
;;
*-*-rhapsody* | *-*-darwin1.[012])
# Rhapsody C library is in the System framework
deplibs="$deplibs -framework System"
continue
;;
esac
elif test "$arg" = "-lm"; then
if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
case $host in
*-*-cygwin* | *-*-pw32* | *-*-beos*)
# These systems don't actually have math library (as such)
# These systems don't actually have a C or math library (as such)
continue
;;
*-*-rhapsody* | *-*-darwin1.[012])
# Rhapsody math library is in the System framework
deplibs="$deplibs -framework System"
continue
*-*-mingw* | *-*-os2*)
# These systems don't actually have a C library (as such)
test "X$arg" = "X-lc" && continue
;;
esac
fi
@ -1069,9 +1056,7 @@ compiler."
$echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
fast_install=no
;;
*)
no_install=yes
;;
*) no_install=yes ;;
esac
continue
;;
@ -1116,7 +1101,7 @@ compiler."
;;
-static)
# The effects of -static are defined in a previous loop.
# The effects of -static are defined in a previous loop.
# We used to do the same as -all-static on platforms that
# didn't have a PIC flag, but the assumption that the effects
# would be equivalent was wrong. It would break on at least
@ -1193,13 +1178,8 @@ compiler."
esac
;;
*.$objext)
# A standard object.
objs="$objs $arg"
;;
*.lo)
# A library object.
*.lo | *.$objext)
# A library or standard object.
if test "$prev" = dlfiles; then
# This file was specified with -dlopen.
if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
@ -1217,7 +1197,10 @@ compiler."
dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
prev=
else
libobjs="$libobjs $arg"
case $arg in
*.lo) libobjs="$libobjs $arg" ;;
*) objs="$objs $arg" ;;
esac
fi
;;
@ -1256,14 +1239,14 @@ compiler."
;;
esac
;;
esac
esac # arg
# Now actually substitute the argument into the commands.
if test -n "$arg"; then
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
fi
done
done # argument parsing loop
if test -n "$prev"; then
$echo "$modename: the \`$prevarg' option requires an argument" 1>&2
@ -1277,7 +1260,6 @@ compiler."
finalize_command="$finalize_command $arg"
fi
oldlibs=
# calculate the name of the file, without its directory
outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
libobjs_save="$libobjs"
@ -1334,8 +1316,8 @@ compiler."
newdependency_libs=
newlib_search_path=
need_relink=no # whether we're linking any uninstalled libtool libraries
uninst_deplibs= # uninstalled libtool libraries
uninst_path= # paths that contain uninstalled libtool libraries
notinst_deplibs= # not-installed libtool libraries
notinst_path= # paths that contain not-installed libtool libraries
case $linkmode in
lib)
passes="conv link"
@ -1357,34 +1339,29 @@ compiler."
newdlprefiles=
passes="conv scan dlopen dlpreopen link"
;;
*) passes="conv"
*) passes="conv"
;;
esac
for pass in $passes; do
if test "$linkmode,$pass" = "lib,link" ||
test "$linkmode,$pass" = "prog,scan"; then
libs="$deplibs"
deplibs=
fi
if test $linkmode = prog; then
# Determine which files to process
case $pass in
dlopen) libs="$dlfiles" ;;
dlopen)
libs="$dlfiles"
save_deplibs="$deplibs" # Collect dlpreopened libraries
deplibs=
;;
dlpreopen) libs="$dlprefiles" ;;
link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
esac
fi
if test $pass = dlopen; then
# Collect dlpreopened libraries
save_deplibs="$deplibs"
deplibs=
fi
for deplib in $libs; do
lib=
found=no
case $deplib in
-l*)
if test $linkmode != lib && test $linkmode != prog; then
$echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
if test $linkmode = oldlib && test $linkmode = obj; then
$echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2
continue
fi
if test $pass = conv; then
@ -1401,6 +1378,7 @@ compiler."
fi
done
if test "$found" != yes; then
# deplib doesn't seem to be a libtool library
if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
@ -1410,7 +1388,7 @@ compiler."
fi
continue
fi
;;
;; # -l
-L*)
case $linkmode in
lib)
@ -1433,11 +1411,11 @@ compiler."
fi
;;
*)
$echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
$echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2
;;
esac
esac # linkmode
continue
;;
;; # -L
-R*)
if test $pass = link; then
dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
@ -1481,21 +1459,17 @@ compiler."
fi
continue
;;
esac
;;
esac # linkmode
;; # *.$libext
*.lo | *.$objext)
if test $pass = conv; then
deplibs="$deplib $deplibs"
elif test $linkmode = prog; then
if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
# If there is no dlopen support or we're linking statically,
# we need to preload.
newdlprefiles="$newdlprefiles $deplib"
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
newdlfiles="$newdlfiles $deplib"
fi
if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
# If there is no dlopen support or we're linking statically,
# we need to preload.
newdlprefiles="$newdlprefiles $deplib"
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
else
newdlfiles="$newdlfiles $deplib"
fi
continue
;;
@ -1503,7 +1477,7 @@ compiler."
alldeplibs=yes
continue
;;
esac
esac # case $deplib
if test $found = yes || test -f "$lib"; then :
else
$echo "$modename: cannot find the library \`$lib'" 1>&2
@ -1538,13 +1512,14 @@ compiler."
if test "$linkmode,$pass" = "lib,link" ||
test "$linkmode,$pass" = "prog,scan" ||
{ test $linkmode != prog && test $linkmode != lib; }; then
{ test $linkmode = oldlib && test $linkmode = obj; }; then
# Add dl[pre]opened files of deplib
test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
fi
if test $pass = conv; then
# only check for convenience libraries
# Only check for convenience libraries
deplibs="$lib $deplibs"
if test -z "$libdir"; then
if test -z "$old_library"; then
@ -1567,7 +1542,7 @@ compiler."
exit 1
fi
continue
fi
fi # $pass = conv
# Get the name of the library we link against.
linklib=
@ -1587,15 +1562,13 @@ compiler."
fi
if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
# If there is no dlname, no dlopen support or we're linking
# statically, we need to preload. We also need to preload any
# dependent libraries so libltdl's deplib preloader doesn't
# bomb out in the load deplibs phase.
dlprefiles="$dlprefiles $lib $dependency_libs"
# statically, we need to preload.
dlprefiles="$dlprefiles $lib"
else
newdlfiles="$newdlfiles $lib"
fi
continue
fi
fi # $pass = dlopen
# We need an absolute path.
case $ladir in
@ -1626,8 +1599,8 @@ compiler."
dir="$ladir/$objdir"
absdir="$abs_ladir/$objdir"
# Remove this search path later
uninst_path="$uninst_path $abs_ladir"
fi
notinst_path="$notinst_path $abs_ladir"
fi # $installed = yes
name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
# This library was specified with -dlpreopen.
@ -1646,17 +1619,17 @@ compiler."
else
newdlprefiles="$newdlprefiles $dir/$linklib"
fi
fi
fi # $pass = dlpreopen
if test -z "$libdir"; then
# link the convenience library
# Link the convenience library
if test $linkmode = lib; then
deplibs="$dir/$old_library $deplibs"
elif test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$dir/$old_library $compile_deplibs"
finalize_deplibs="$dir/$old_library $finalize_deplibs"
else
deplibs="$lib $deplibs" # used for prog,scan pass
deplibs="$lib $deplibs"
fi
continue
fi
@ -1688,23 +1661,17 @@ compiler."
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
esac
tmp_libs="$tmp_libs $deplib"
done
done # for deplib
continue
fi
fi # $linkmode = prog...
if test "$linkmode,$pass" = "prog,link"; then
if test -n "$library_names" &&
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then
# We need to hardcode the library path
if test -n "$shlibpath_var"; then
# Make sure the rpath contains only unique directories.
case "$temp_rpath " in
*" $dir "*) ;;
*" $absdir "*) ;;
*) temp_rpath="$temp_rpath $dir" ;;
esac
fi
link_static=no # Whether the deplib will be linked statically
if test -n "$library_names" &&
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then
# Link against this shared library
if test "$linkmode,$pass" = "prog,link" ||
{ test $linkmode = lib && test $hardcode_into_libs = yes; }; then
# Hardcode the library path.
# Skip directories that are in the system default run-time
# search path.
@ -1717,7 +1684,6 @@ compiler."
esac
;;
esac
case " $sys_lib_dlsearch_path " in
*" $libdir "*) ;;
*)
@ -1727,7 +1693,18 @@ compiler."
esac
;;
esac
fi
if test $linkmode = prog; then
# We need to hardcode the library path
if test -n "$shlibpath_var"; then
# Make sure the rpath contains only unique directories.
case "$temp_rpath " in
*" $dir "*) ;;
*" $absdir "*) ;;
*) temp_rpath="$temp_rpath $dir" ;;
esac
fi
fi
fi # $linkmode,$pass = prog,link...
if test "$alldeplibs" = yes &&
{ test "$deplibs_check_method" = pass_all ||
@ -1736,47 +1713,18 @@ compiler."
# We only need to search for static libraries
continue
fi
fi
link_static=no # Whether the deplib will be linked statically
if test -n "$library_names" &&
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then
if test "$installed" = no; then
uninst_deplibs="$uninst_deplibs $lib"
notinst_deplibs="$notinst_deplibs $lib"
need_relink=yes
fi
# This is a shared library
if test $linkmode = lib &&
test $hardcode_into_libs = yes; then
# Hardcode the library path.
# Skip directories that are in the system default run-time
# search path.
case " $sys_lib_dlsearch_path " in
*" $absdir "*) ;;
*)
case "$compile_rpath " in
*" $absdir "*) ;;
*) compile_rpath="$compile_rpath $absdir"
esac
;;
esac
case " $sys_lib_dlsearch_path " in
*" $libdir "*) ;;
*)
case "$finalize_rpath " in
*" $libdir "*) ;;
*) finalize_rpath="$finalize_rpath $libdir"
esac
;;
esac
fi
if test -n "$old_archive_from_expsyms_cmds"; then
# figure out the soname
set dummy $library_names
realname="$2"
shift; shift
libname=`eval \\$echo \"$libname_spec\"`
libname=`eval \\$echo \"$libname_spec\"`
# use dlname if we got it. it's perfectly good, no?
if test -n "$dlname"; then
soname="$dlname"
@ -1827,7 +1775,7 @@ compiler."
# make sure the library variables are pointing to the new library
dir=$output_objdir
linklib=$newlib
fi
fi # test -n $old_archive_from_expsyms_cmds
if test $linkmode = prog || test "$mode" != relink; then
add_shlibpath=
@ -1926,6 +1874,15 @@ compiler."
fi
fi
elif test $linkmode = prog; then
if test "$alldeplibs" = yes &&
{ test "$deplibs_check_method" = pass_all ||
{ test "$build_libtool_libs" = yes &&
test -n "$library_names"; }; }; then
# We only need to search for static libraries
continue
fi
# Try to link the static library
# Here we assume that one of hardcode_direct or hardcode_minus_L
# is not unsupported. This is valid on all known static and
# shared platforms.
@ -1942,6 +1899,7 @@ compiler."
if test "$deplibs_check_method" != pass_all; then
# We're trying link a shared library against a static one
# but the system doesn't support it.
# Just print a warning and add the library to dependency_libs so
# that the program can be linked against the static library.
echo
@ -1949,13 +1907,30 @@ compiler."
echo "*** I have the capability to make that library automatically link in when"
echo "*** you link to this library. But I can only do this if you have a"
echo "*** shared version of the library, which you do not appear to have."
if test "$module" = yes; then
echo "*** Therefore, libtool will create a static module, that should work "
echo "*** as long as the dlopening application is linked with the -dlopen flag."
if test -z "$global_symbol_pipe"; then
echo
echo "*** However, this would only work if libtool was able to extract symbol"
echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
echo "*** not find such a program. So, this module is probably useless."
echo "*** \`nm' from GNU binutils and a full rebuild may help."
fi
if test "$build_old_libs" = no; then
build_libtool_libs=module
build_old_libs=yes
else
build_libtool_libs=no
fi
fi
else
convenience="$convenience $dir/$old_library"
old_convenience="$old_convenience $dir/$old_library"
deplibs="$dir/$old_library $deplibs"
link_static=yes
fi
fi
fi # link shared/static library?
if test $linkmode = lib; then
if test -n "$dependency_libs" &&
@ -2029,10 +2004,9 @@ compiler."
*) deplibs="$deplibs $path" ;;
esac
done
fi
fi
done
dependency_libs="$newdependency_libs"
fi # link_all_deplibs != no
fi # linkmode = lib
done # for deplib in $libs
if test $pass = dlpreopen; then
# Link the dlpreopened libraries before other libraries
for deplib in $save_deplibs; do
@ -2040,6 +2014,7 @@ compiler."
done
fi
if test $pass != dlopen; then
test $pass != scan && dependency_libs="$newdependency_libs"
if test $pass != conv; then
# Make sure lib_search_path contains only unique directories.
lib_search_path=
@ -2062,26 +2037,20 @@ compiler."
eval tmp_libs=\"\$$var\"
new_libs=
for deplib in $tmp_libs; do
# FIXME: Pedantically, this is the right thing to do, so
# that some nasty dependency loop isn't accidentally
# broken:
#new_libs="$deplib $new_libs"
# Pragmatically, this seems to cause very few problems in
# practice:
case $deplib in
-L*) new_libs="$deplib $new_libs" ;;
*)
case " $specialdeplibs " in
*" $deplib "*) new_libs="$deplib $new_libs" ;;
*)
case " $new_libs " in
*" $deplib "*) ;;
*) new_libs="$deplib $new_libs" ;;
esac
;;
esac
;;
esac
-L*) new_libs="$deplib $new_libs" ;;
*)
case " $specialdeplibs " in
*" $deplib "*) new_libs="$deplib $new_libs" ;;
*)
case " $new_libs " in
*" $deplib "*) ;;
*) new_libs="$deplib $new_libs" ;;
esac
;;
esac
;;
esac
done
tmp_libs=
for deplib in $new_libs; do
@ -2096,9 +2065,14 @@ compiler."
esac
done
eval $var=\"$tmp_libs\"
done
done # for var
fi
done
if test "$pass" = "conv" &&
{ test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then
libs="$deplibs" # reset libs
deplibs=
fi
done # for pass
if test $linkmode = prog; then
dlfiles="$newdlfiles"
dlprefiles="$newdlprefiles"
@ -2106,10 +2080,6 @@ compiler."
case $linkmode in
oldlib)
if test -n "$deplibs"; then
$echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
fi
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
fi
@ -2384,7 +2354,7 @@ compiler."
fi
# Eliminate all temporary directories.
for path in $uninst_path; do
for path in $notinst_path; do
lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`
deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`
dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
@ -2434,15 +2404,15 @@ compiler."
*-*-rhapsody* | *-*-darwin1.[012])
# Rhapsody C library is in the System framework
deplibs="$deplibs -framework System"
;;
*-*-netbsd*)
# Don't link with libc until the a.out ld.so is fixed.
;;
;;
*-*-netbsd*)
# Don't link with libc until the a.out ld.so is fixed.
;;
*)
# Add libc to deplibs on all other systems if necessary.
if test $build_libtool_need_lc = "yes"; then
deplibs="$deplibs -lc"
fi
# Add libc to deplibs on all other systems if necessary.
if test $build_libtool_need_lc = "yes"; then
deplibs="$deplibs -lc"
fi
;;
esac
fi
@ -2486,7 +2456,7 @@ EOF
for i in $deplibs; do
name="`expr $i : '-l\(.*\)'`"
# If $name is empty we are operating on a -L argument.
if test "$name" != "" -a "$name" != "0"; then
if test -n "$name" && test "$name" != "0"; then
libname=`eval \\$echo \"$libname_spec\"`
deplib_matches=`eval \\$echo \"$library_names_spec\"`
set dummy $deplib_matches
@ -2511,7 +2481,7 @@ EOF
for i in $deplibs; do
name="`expr $i : '-l\(.*\)'`"
# If $name is empty we are operating on a -L argument.
if test "$name" != "" -a "$name" != "0"; then
if test -n "$name" && test "$name" != "0"; then
$rm conftest
$CC -o conftest conftest.c $i
# Did it work?
@ -2551,7 +2521,7 @@ EOF
for a_deplib in $deplibs; do
name="`expr $a_deplib : '-l\(.*\)'`"
# If $name is empty we are operating on a -L argument.
if test "$name" != "" -a "$name" != "0"; then
if test -n "$name" && test "$name" != "0"; then
libname=`eval \\$echo \"$libname_spec\"`
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
@ -2603,7 +2573,7 @@ EOF
for a_deplib in $deplibs; do
name="`expr $a_deplib : '-l\(.*\)'`"
# If $name is empty we are operating on a -L argument.
if test "$name" != "" -a "$name" != "0"; then
if test -n "$name" && test "$name" != "0"; then
libname=`eval \\$echo \"$libname_spec\"`
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
@ -2653,6 +2623,13 @@ EOF
libname=$libname_save
name=$name_save
case $host in
*-*-rhapsody* | *-*-darwin1.[012])
# On Rhapsody replace the C library is the System framework
newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
;;
esac
if test "$droppeddeps" = yes; then
if test "$module" = yes; then
echo
@ -2772,9 +2749,7 @@ EOF
else
soname="$realname"
fi
if test x$dlname = x; then
dlname=$soname
fi
test -z "$dlname" && dlname=$soname
lib="$output_objdir/$realname"
for link
@ -3082,7 +3057,7 @@ EOF
prog)
case $host in
*cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
*cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
esac
if test -n "$vinfo"; then
$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
@ -3099,6 +3074,14 @@ EOF
fi
fi
case $host in
*-*-rhapsody* | *-*-darwin1.[012])
# On Rhapsody replace the C library is the System framework
compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
;;
esac
compile_command="$compile_command $compile_deplibs"
finalize_command="$finalize_command $finalize_deplibs"
@ -3567,7 +3550,7 @@ relink_command=\"$relink_command\"
# This environment variable determines our operation mode.
if test \"\$libtool_install_magic\" = \"$magic\"; then
# install mode needs the following variable:
uninst_deplibs='$uninst_deplibs'
notinst_deplibs='$notinst_deplibs'
else
# When we are sourced in execute mode, \$file and \$echo are already set.
if test \"\$libtool_execute_magic\" != \"$magic\"; then
@ -4256,7 +4239,7 @@ relink_command=\"$relink_command\""
# Do a test to see if this is really a libtool program.
if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
uninst_deplibs=
notinst_deplibs=
relink_command=
# If there is no directory component, then add one.
@ -4266,13 +4249,13 @@ relink_command=\"$relink_command\""
esac
# Check the variables that should have been set.
if test -z "$uninst_deplibs"; then
if test -z "$notinst_deplibs"; then
$echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
exit 1
fi
finalize=yes
for lib in $uninst_deplibs; do
for lib in $notinst_deplibs; do
# Check to see that each library is installed.
libdir=
if test -f "$lib"; then
@ -4427,7 +4410,7 @@ relink_command=\"$relink_command\""
fi
# Exit here if they wanted silent mode.
test "$show" = : && exit 0
test "$show" = ":" && exit 0
echo "----------------------------------------------------------------------"
echo "Libraries have been installed in:"
@ -4650,7 +4633,7 @@ relink_command=\"$relink_command\""
# Remember objdir for removal later, being careful to avoid duplicates
if test $mode = clean; then
case " $rmdirs " in
case " $rmdirs " in
*" $objdir "*) ;;
*) rmdirs="$rmdirs $objdir" ;;
esac
@ -4746,8 +4729,8 @@ relink_command=\"$relink_command\""
# Try to remove the ${objdir}s in the directories where we deleted files
for dir in $rmdirs; do
if test -d "$dir"; then
$show "rmdir $dir"
$run rmdir $dir >/dev/null 2>&1
$show "rmdir $dir"
$run rmdir $dir >/dev/null 2>&1
fi
done
@ -4822,6 +4805,8 @@ Compile a source file into a libtool library object.
This mode accepts the following additional options:
-o OUTPUT-FILE set the output file name to OUTPUT-FILE
-prefer-pic try to building PIC objects only
-prefer-non-pic try to building non-PIC objects only
-static always build a \`.o' file suitable for static linking
COMPILE-COMMAND is a command to be used in creating a \`standard' object file