Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--libtool.m46
-rw-r--r--ltcf-c.sh13
-rw-r--r--ltcf-cxx.sh34
-rw-r--r--ltcf-gcj.sh15
-rwxr-xr-xltconfig90
-rw-r--r--ltmain.sh395
7 files changed, 286 insertions, 273 deletions
diff --git a/ChangeLog b/ChangeLog
index 54848d0c0..27f9d75d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-05-20 Alexandre Oliva <aoliva@redhat.com>
+
+ * ltconfig, ltmain.sh, libtool.m4, ltcf-c.sh, ltcf-cxx.sh,
+ ltcf-gcj.sh: Upgraded to libtool 1.4a 1.641.2.254. Rebuilt a number
+ of subdir/configure scripts to use the new libtool.m4.
+
2001-05-14 H.J. Lu <hjl@gnu.org>
* config.if (libc_interface): Set to -libc6.2- for cross
diff --git a/libtool.m4 b/libtool.m4
index d44222903..aa7e62a0e 100644
--- a/libtool.m4
+++ b/libtool.m4
@@ -597,7 +597,7 @@ irix5* | irix6*)
# This must be Linux ELF.
linux-gnu*)
case $host_cpu in
- alpha* | i*86 | powerpc* | sparc* | ia64* )
+ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
lt_cv_deplibs_check_method=pass_all ;;
*)
# glibc up to 2.1.1 does not perform some relocations on ARM
@@ -636,6 +636,10 @@ solaris*)
lt_cv_file_magic_test_file=/lib/libc.so
;;
+[sysv5uw[78]* | sysv4*uw2*)]
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
case $host_vendor in
ncr)
diff --git a/ltcf-c.sh b/ltcf-c.sh
index 17b65111c..d9bbae954 100644
--- a/ltcf-c.sh
+++ b/ltcf-c.sh
@@ -188,8 +188,8 @@ EOF
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
fi
;;
@@ -585,8 +585,13 @@ else
runpath_var=LD_RUN_PATH
;;
- unixware7*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ sysv5uw7* | unixware7*)
+ no_undefined_flag='${wl}-z ${wl}text'
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
runpath_var='LD_RUN_PATH'
hardcode_shlibpath_var=no
;;
diff --git a/ltcf-cxx.sh b/ltcf-cxx.sh
index e34891464..29f8ffe5d 100644
--- a/ltcf-cxx.sh
+++ b/ltcf-cxx.sh
@@ -106,7 +106,7 @@ if { ac_try='${CC-c++} -E conftest.$ac_ext'; { (eval echo \"$ac_try\") 1>&5; (ev
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
else
with_gcc=no
@@ -197,7 +197,7 @@ case $host_os in
# Warning - without using the other run time loading flags, -berok will
# link without error, but may produce a broken library.
no_undefined_flag='${wl}-bnoerok'
- allow_undefined_flag='${wl}-berok"
+ allow_undefined_flag='${wl}-berok'
# -bexpall does not export symbols beginning with underscore (_)
always_export_symbols=yes
# Exported symbols can be pulled into shared objects from archives
@@ -270,14 +270,14 @@ case $host_os in
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmds='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
;;
*)
if test $with_gcc = yes; then
if test $with_gnu_ld = no; then
case "$host_os" in
- hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
- *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;;
+ hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
+ *) archive_cmds='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;;
esac
fi
else
@@ -302,9 +302,9 @@ case $host_os in
*)
if test "$with_gcc" = yes; then
if test "$with_gnu_ld" = no; then
- archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+ archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
else
- archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
+ archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
fi
fi
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
@@ -332,7 +332,7 @@ case $host_os in
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmds='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
hardcode_libdir_flag_spec='${wl}--rpath,$libdir'
export_dynamic_flag_spec='${wl}--export-dynamic'
@@ -358,7 +358,7 @@ case $host_os in
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmds='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
;;
esac
;;
@@ -396,7 +396,7 @@ case $host_os in
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
fi
case $cc_basename in
@@ -436,7 +436,7 @@ case $host_os in
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmds='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
;;
*)
# FIXME: insert proper C++ library support
@@ -455,7 +455,7 @@ case $host_os in
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
fi
case $cc_basename in
@@ -498,7 +498,7 @@ case $host_os in
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmds='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
;;
*)
# FIXME: insert proper C++ library support
@@ -571,7 +571,7 @@ case $host_os in
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmds='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
# Archives containing C++ object files must be created using
# "CC -xar", where "CC" is the Sun C++ compiler. This is
@@ -598,7 +598,7 @@ case $host_os in
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmds="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
+ output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
else
# g++ 2.7 appears to require `-G' NOT `-shared' on this
# platform.
@@ -609,7 +609,7 @@ case $host_os in
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmds="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
+ output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
fi
hardcode_libdir_flag_spec='${wl}-R $wl$libdir'
@@ -916,7 +916,7 @@ if (eval $ac_compile) 2>&5; then
# the conftest object file.
pre_test_object_deps_done=no
- for p in `eval $output_verbose_link_cmds`; do
+ for p in `eval $output_verbose_link_cmd`; do
case $p in
diff --git a/ltcf-gcj.sh b/ltcf-gcj.sh
index 2fa090c14..dbdb880e9 100644
--- a/ltcf-gcj.sh
+++ b/ltcf-gcj.sh
@@ -181,8 +181,8 @@ EOF
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
fi
;;
@@ -431,7 +431,7 @@ else
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
else
- archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ archive_cmds='$LD -shared -nodefaultlibs -o $lib $libobjs $deplibs $linker_flags' # ELF
fi
hardcode_libdir_flag_spec='${wl}-R$libdir'
hardcode_direct=yes
@@ -569,8 +569,13 @@ else
runpath_var=LD_RUN_PATH
;;
- unixware7*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ sysv5uw7* | unixware7*)
+ no_undefined_flag='${wl}-z ${wl}text'
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
runpath_var='LD_RUN_PATH'
hardcode_shlibpath_var=no
;;
diff --git a/ltconfig b/ltconfig
index 291802616..0d8c84421 100755
--- a/ltconfig
+++ b/ltconfig
@@ -182,7 +182,7 @@ progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
PROGRAM=ltconfig
PACKAGE=libtool
VERSION=1.4a
-TIMESTAMP=" (1.641.2.228 2001/04/20 08:53:18)"
+TIMESTAMP=" (1.641.2.254 2001/05/20 18:44:55)"
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
rm="rm -f"
@@ -783,11 +783,15 @@ if test "${lt_cv_sys_max_cmd_len+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
i=0
- testring="ABCDEF"
- while test `$CONFIG_SHELL $0 --fallback-echo "X$testring" >/dev/null 2>&1` == `echo "X$testring" >/dev/null 2>&1` &&
+ testring="ABCD"
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while test "X"`$CONFIG_SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \
+ = "XX$testring" &&
new_result=`expr "X$testring" : ".*" 2>&1` &&
lt_cv_sys_max_cmd_len=$new_result &&
- test $i != 32 # 1 MB should be enough
+ test $i != 18 # 1 MB should be enough
do
i=`expr $i + 1`
testring=$testring$testring
@@ -826,8 +830,8 @@ else
chmod -w .
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -o out/conftest2.$objext"
- echo "$progname:829: checking if $compiler supports -c -o file.$objext" >&5
- if { (eval echo $progname:830: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$objext; then
+ echo "$progname:833: checking if $compiler supports -c -o file.$objext" >&5
+ if { (eval echo $progname:834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$objext; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -880,8 +884,8 @@ if test "$with_gcc" = yes; then
echo $lt_simple_compile_test_code > conftest.$ac_ext
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
- echo "$progname:883: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
- if { (eval echo $progname:884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
+ echo "$progname:887: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+ if { (eval echo $progname:888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -1217,6 +1221,8 @@ linux-gnu*)
;;
netbsd*)
+ need_lib_prefix=no
+ need_version=no
version_type=sunos
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
@@ -1374,7 +1380,7 @@ cygwin* | mingw* | pw32*)
symcode='[ABCDGISTW]'
;;
hpux*) # Its linker distinguishes data from code symbols
- global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
+ global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
;;
irix*)
symcode='[BCDEGRST]'
@@ -1404,7 +1410,7 @@ fi
for ac_symprfx in "" "_"; do
# Write the raw and C identifiers.
-global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
+ global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
# Check to see that the pipe works correctly.
pipe_works=no
@@ -1421,11 +1427,11 @@ void nm_test_func(){}
int main(){nm_test_var='a';nm_test_func();return(0);}
EOF
- echo "$progname:1424: checking if global_symbol_pipe works" >&5
- if { (eval echo $progname:1425: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
+ echo "$progname:1430: checking if global_symbol_pipe works" >&5
+ if { (eval echo $progname:1431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
# Now try to grab the symbols.
nlist=conftest.nm
- if { echo "$progname:1428: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
+ if { echo "$progname:1434: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
@@ -1462,7 +1468,7 @@ const struct {
lt_preloaded_symbols[] =
{
EOF
- sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.$ac_ext
+ sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" >> conftest.$ac_ext
cat <<\EOF >> conftest.$ac_ext
{0, (lt_ptr_t) 0}
};
@@ -1477,7 +1483,7 @@ EOF
save_CFLAGS="$CFLAGS"
LIBS="conftstm.$objext"
CFLAGS="$CFLAGS$no_builtin_flag"
- if { (eval echo $progname:1480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ if { (eval echo $progname:1486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
pipe_works=yes
else
echo "$progname: failed program was:" >&5
@@ -1581,14 +1587,14 @@ else
if test "X${lt_cv_dlopen+set}" != Xset; then
lt_cv_dlopen=no lt_cv_dlopen_libs=
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "$progname:1584: checking for dlopen in -ldl" >&5
+echo "$progname:1590: checking for dlopen in -ldl" >&5
if test "X${ac_cv_lib_dl_dlopen+set}" = Xset; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1591 "ltconfig"
+#line 1597 "ltconfig"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
@@ -1601,7 +1607,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo $progname:1604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo $progname:1610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_lib_dl_dlopen=yes
else
@@ -1620,12 +1626,12 @@ if test "X$ac_cv_lib_dl_dlopen" = Xyes; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "$progname:1623: checking for dlopen" >&5
+echo "$progname:1629: checking for dlopen" >&5
if test "X${ac_cv_func_dlopen+set}" = Xset; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1628 "ltconfig"
+#line 1634 "ltconfig"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dlopen(); below. */
#include <assert.h>
@@ -1650,7 +1656,7 @@ dlopen();
; return 0; }
EOF
-if { (eval echo $progname:1653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo $progname:1659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_dlopen=yes
else
@@ -1667,14 +1673,14 @@ if test "X$ac_cv_func_dlopen" = Xyes; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
-echo "$progname:1670: checking for dlopen in -lsvld" >&5
+echo "$progname:1676: checking for dlopen in -lsvld" >&5
if test "X${ac_cv_lib_svld_dlopen+set}" = Xset; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lsvld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1677 "ltconfig"
+#line 1683 "ltconfig"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
@@ -1687,7 +1693,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo $progname:1690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo $progname:1696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_lib_svld_dlopen=yes
else
@@ -1706,14 +1712,14 @@ if test "X$ac_cv_lib_svld_dlopen" = Xyes; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
-echo "$progname:1709: checking for dld_link in -ldld" >&5
+echo "$progname:1715: checking for dld_link in -ldld" >&5
if test "X${ac_cv_lib_dld_dld_link+set}" = Xset; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1716 "ltconfig"
+#line 1722 "ltconfig"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
@@ -1726,7 +1732,7 @@ int main() {
dld_link()
; return 0; }
EOF
-if { (eval echo $progname:1729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo $progname:1735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_lib_dld_dld_link=yes
else
@@ -1745,12 +1751,12 @@ if test "X$ac_cv_lib_dld_dld_link" = Xyes; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for shl_load""... $ac_c" 1>&6
-echo "$progname:1748: checking for shl_load" >&5
+echo "$progname:1754: checking for shl_load" >&5
if test "X${ac_cv_func_shl_load+set}" = Xset; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1753 "ltconfig"
+#line 1759 "ltconfig"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shl_load(); below. */
#include <assert.h>
@@ -1775,7 +1781,7 @@ shl_load();
; return 0; }
EOF
-if { (eval echo $progname:1778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo $progname:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_shl_load=yes
else
@@ -1793,14 +1799,14 @@ if test "X$ac_cv_func_shl_load" = Xyes; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "$progname:1796: checking for shl_load in -ldld" >&5
+echo "$progname:1802: checking for shl_load in -ldld" >&5
if test "X${ac_cv_lib_dld_shl_load+set}" = Xset; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1803 "ltconfig"
+#line 1809 "ltconfig"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -1814,7 +1820,7 @@ int main() {
shl_load()
; return 0; }
EOF
-if { (eval echo $progname:1817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo $progname:1823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_lib_dld_shl_load=yes
else
@@ -1861,18 +1867,18 @@ fi
for ac_hdr in dlfcn.h; do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "$progname:1864: checking for $ac_hdr" >&5
+echo "$progname:1870: checking for $ac_hdr" >&5
if eval "test \"`echo 'X$''{'ac_cv_header_$ac_safe'+set}'`\" = Xset"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1869 "ltconfig"
+#line 1875 "ltconfig"
#include <$ac_hdr>
int fnord = 0;
int main () { return(0); }
EOF
ac_try="$ac_compile >/dev/null 2>conftest.out"
-{ (eval echo $progname:1875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo $progname:1881: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1900,7 +1906,7 @@ done
LIBS="$lt_cv_dlopen_libs $LIBS"
echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
-echo "$progname:1903: checking whether a program can dlopen itself" >&5
+echo "$progname:1909: checking whether a program can dlopen itself" >&5
if test "X${lt_cv_dlopen_self+set}" = Xset; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1908,7 +1914,7 @@ else
lt_cv_dlopen_self=cross
else
cat > conftest.$ac_ext <<EOF
-#line 1911 "ltconfig"
+#line 1917 "ltconfig"
#if HAVE_DLFCN_H
#include <dlfcn.h>
@@ -1955,7 +1961,7 @@ int main() {
if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
EOF
-if { (eval echo $progname:1958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo $progname:1964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
lt_cv_dlopen_self=yes
else
@@ -1974,7 +1980,7 @@ echo "$ac_t""$lt_cv_dlopen_self" 1>&6
if test "$lt_cv_dlopen_self" = yes; then
LDFLAGS="$LDFLAGS $link_static_flag"
echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
-echo "$progname:1977: checking whether a statically linked program can dlopen itself" >&5
+echo "$progname:1983: checking whether a statically linked program can dlopen itself" >&5
if test "X${lt_cv_dlopen_self_static+set}" = Xset; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1982,7 +1988,7 @@ else
lt_cv_dlopen_self_static=cross
else
cat > conftest.$ac_ext <<EOF
-#line 1985 "ltconfig"
+#line 1991 "ltconfig"
#if HAVE_DLFCN_H
#include <dlfcn.h>
@@ -2029,7 +2035,7 @@ int main() {
if(ptr1 || ptr2) { dlclose(self); exit(0); } } exit(1); }
EOF
-if { (eval echo $progname:2032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo $progname:2038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
lt_cv_dlopen_self_static=yes
else
diff --git a/ltmain.sh b/ltmain.sh
index daaf6bb5e..bc2183585 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -56,7 +56,7 @@ modename="$progname"
PROGRAM=ltmain.sh
PACKAGE=libtool
VERSION=1.4a
-TIMESTAMP=" (1.641.2.228 2001/04/20 08:53:18)"
+TIMESTAMP=" (1.641.2.254 2001/05/20 18:44:55)"
default_mode=
help="Try \`$progname --help' for more information."
@@ -246,6 +246,11 @@ if test -n "$prevopt"; then
exit 1
fi
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
if test -z "$show_help"; then
# Infer the operation mode.
@@ -1110,7 +1115,7 @@ EOF
continue
;;
esac
- fi
+ fi # test -n $prev
prevarg="$arg"
@@ -1151,7 +1156,7 @@ EOF
-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
@@ -1173,7 +1178,7 @@ EOF
esac
continue
;;
-
+
-L*)
dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
# We need an absolute path.
@@ -1207,28 +1212,15 @@ EOF
;;
-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
@@ -1255,9 +1247,7 @@ EOF
$echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
fast_install=no
;;
- *)
- no_install=yes
- ;;
+ *) no_install=yes ;;
esac
continue
;;
@@ -1307,7 +1297,7 @@ EOF
;;
-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
@@ -1517,14 +1507,14 @@ EOF
;;
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
@@ -1582,7 +1572,6 @@ EOF
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"
@@ -1656,8 +1645,8 @@ EOF
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"
@@ -1679,34 +1668,29 @@ EOF
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
@@ -1723,6 +1707,7 @@ EOF
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"
@@ -1732,7 +1717,7 @@ EOF
fi
continue
fi
- ;;
+ ;; # -l
-L*)
case $linkmode in
lib)
@@ -1755,11 +1740,11 @@ EOF
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//'`
@@ -1803,21 +1788,17 @@ EOF
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
;;
@@ -1825,7 +1806,7 @@ EOF
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
@@ -1860,13 +1841,14 @@ EOF
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
@@ -1889,7 +1871,7 @@ EOF
exit 1
fi
continue
- fi
+ fi # $pass = conv
# Get the name of the library we link against.
linklib=
@@ -1909,15 +1891,13 @@ EOF
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
@@ -1948,8 +1928,8 @@ EOF
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.
@@ -1968,17 +1948,17 @@ EOF
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
@@ -2010,23 +1990,17 @@ EOF
*" $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.
@@ -2039,7 +2013,6 @@ EOF
esac
;;
esac
-
case " $sys_lib_dlsearch_path " in
*" $libdir "*) ;;
*)
@@ -2049,7 +2022,18 @@ EOF
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 ||
@@ -2058,40 +2042,11 @@ EOF
# 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
@@ -2149,7 +2104,7 @@ EOF
# 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=
@@ -2248,6 +2203,15 @@ EOF
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.
@@ -2264,6 +2228,7 @@ EOF
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
@@ -2271,13 +2236,30 @@ EOF
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" &&
@@ -2351,10 +2333,9 @@ EOF
*) deplibs="$path $deplibs" ;;
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
@@ -2362,6 +2343,7 @@ EOF
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=
@@ -2384,40 +2366,20 @@ EOF
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" ;;
- *)
- # And here is the reason: when a library appears more
- # than once as an explicit dependence of a library, or
- # is implicitly linked in more than once by the
- # compiler, it is considered special, and multiple
- # occurrences thereof are not removed. Compare this
- # with having the same library being listed as a
- # dependency of multiple other libraries: in this case,
- # we know (pedantically, we assume) the library does not
- # need to be listed more than once, so we keep only the
- # last copy. This is not always right, but it is rare
- # enough that we require users that really mean to play
- # such unportable linking tricks to link the library
- # using -Wl,-lname, so that libtool does not consider it
- # for duplicate removal.
- 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
@@ -2432,9 +2394,14 @@ EOF
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"
@@ -2442,10 +2409,6 @@ EOF
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
@@ -2737,7 +2700,7 @@ EOF
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'`
@@ -2788,11 +2751,14 @@ EOF
# 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.
+ ;;
*)
- # 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
@@ -2836,7 +2802,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
@@ -2861,7 +2827,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
$LTCC -o conftest conftest.c $i
# Did it work?
@@ -2901,7 +2867,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`
@@ -2953,7 +2919,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`
@@ -3003,6 +2969,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
@@ -3122,9 +3095,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
@@ -3535,7 +3506,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
@@ -3552,6 +3523,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"
@@ -4014,7 +3993,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
@@ -4082,8 +4061,9 @@ else
# relink executable if necessary
if test -n \"\$relink_command\"; then
- if (eval \$relink_command); then :
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
else
+ $echo \"\$relink_command_output\" >&2
$rm \"\$progdir/\$file\"
exit 1
fi
@@ -4735,7 +4715,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.
@@ -4745,13 +4725,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
@@ -4866,11 +4846,10 @@ relink_command=\"$relink_command\""
if test -n "$current_libdirs"; then
# Maybe just do a dry run.
test -n "$run" && current_libdirs=" -n$current_libdirs"
- exec $SHELL $0 --finish$current_libdirs
- exit 1
+ exec_cmd='$SHELL $0 --finish$current_libdirs'
+ else
+ exit 0
fi
-
- exit 0
;;
# libtool finish mode
@@ -4908,7 +4887,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:"
@@ -5073,11 +5052,8 @@ relink_command=\"$relink_command\""
LANG="$save_LANG"; export LANG
fi
- # Now actually exec the command.
- eval "exec \$cmd$args"
-
- $echo "$modename: cannot exec \$cmd$args"
- exit 1
+ # Now prepare to actually exec the command.
+ exec_cmd='"$cmd"$args'
else
# Display what would be done.
if test -n "$shlibpath_var"; then
@@ -5131,14 +5107,16 @@ 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
fi
-
+
# Don't error if the file doesn't exist and rm -f was used.
- if test -L "$file" >/dev/null 2>&1 || test -f "$file"; then
+ if (test -L "$file") >/dev/null 2>&1 \
+ || (test -h "$file") >/dev/null 2>&1 \
+ || test -f "$file"; then
:
elif test -d "$file"; then
exit_status=1
@@ -5239,8 +5217,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
@@ -5254,11 +5232,18 @@ relink_command=\"$relink_command\""
;;
esac
- $echo "$modename: invalid operation mode \`$mode'" 1>&2
- $echo "$generic_help" 1>&2
- exit 1
+ if test -z "$exec_cmd"; then
+ $echo "$modename: invalid operation mode \`$mode'" 1>&2
+ $echo "$generic_help" 1>&2
+ exit 1
+ fi
fi # test -z "$show_help"
+if test -n "$exec_cmd"; then
+ eval exec $exec_cmd
+ exit 1
+fi
+
# We need to display help for each of the modes.
case $mode in
"") $echo \
@@ -5316,6 +5301,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