aboutsummaryrefslogtreecommitdiff
path: root/ltconfig
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1998-07-07 19:24:58 +0000
committerIan Lance Taylor <ian@airs.com>1998-07-07 19:24:58 +0000
commit99e9c6f741ee7022432ffa600c6c7e5612063ab5 (patch)
tree4fab6b043bd4060375fafd4f06c01d5fc3785bde /ltconfig
parentad0d51e38d1f3a733af22186baa596aafa3b3fa9 (diff)
downloadgdb-99e9c6f741ee7022432ffa600c6c7e5612063ab5.zip
gdb-99e9c6f741ee7022432ffa600c6c7e5612063ab5.tar.gz
gdb-99e9c6f741ee7022432ffa600c6c7e5612063ab5.tar.bz2
* ltconfig, ltmain.sh: Update to libtool 1.2b.
Diffstat (limited to 'ltconfig')
-rwxr-xr-xltconfig61
1 files changed, 36 insertions, 25 deletions
diff --git a/ltconfig b/ltconfig
index 1c91b03..958a628 100755
--- a/ltconfig
+++ b/ltconfig
@@ -27,10 +27,14 @@
# Check that we are running under the correct shell.
SHELL=${CONFIG_SHELL-/bin/sh}
-if test "X$1" = "X--no-reexec"; then
+echo=echo
+if test "X$1" = X--no-reexec; then
# Discard the --no-reexec flag, and continue.
shift
-elif test "X$SHELL" != X/bin/sh; then
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+ # Yippee, $echo works!
+ :
+else
# Restart under the correct shell.
exec "$SHELL" "$0" --no-reexec ${1+"$@"}
fi
@@ -39,9 +43,7 @@ fi
# if CDPATH is set.
if test "${CDPATH+set}" = set; then CDPATH=; export CDPATH; fi
-echo=echo
-if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
-else
+if test "X`($echo '\t') 2>/dev/null`" != 'X\t'; then
# The Solaris, AIX, and Digital Unix default echo programs unquote
# backslashes. This makes it impossible to quote backslashes using
# echo "$something" | sed 's/\\/\\\\/g'
@@ -61,16 +63,15 @@ else
if test "X`(print -r '\t') 2>/dev/null`" = 'X\t'; then
# This shell has a builtin print -r that does the trick.
echo='print -r'
-# elif test -f /bin/ksh && test "X$CONFIG_SHELL" != X/bin/ksh; then
-# # If we have ksh, try running ltconfig again with it.
-# CONFIG_SHELL=/bin/ksh
-# export CONFIG_SHELL
-# exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
+ elif test -f /bin/ksh && test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running ltconfig again with it.
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" --no-reexec ${1+"$@"}
else
# Try using printf.
echo='printf %s\n'
- if test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then :
- else
+ if test "X`($echo '\t') 2>/dev/null`" != 'X\t'; then
# Oops. We lost completely, so just stick with echo.
echo=echo
fi
@@ -92,7 +93,7 @@ progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
# Constants:
PROGRAM=ltconfig
PACKAGE=libtool
-VERSION=1.2a
+VERSION=1.2b
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&5'
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.c $LIBS 1>&5'
rm="rm -f"
@@ -227,8 +228,7 @@ if test -z "$ltmain"; then
exit 1
fi
-if test -f "$ltmain"; then :
-else
+if test ! -f "$ltmain"; then
echo "$progname: \`$ltmain' does not exist" 1>&2
echo "$help" 1>&2
exit 1
@@ -693,7 +693,7 @@ if test -z "$LD"; then
ac_prog=`($CC -print-prog-name=ld) 2>&5`
case "$ac_prog" in
# Accept absolute paths.
- /* | [A-Za-z]:\\*)
+ /* | [A-Za-z]:[/\\]*)
test -z "$LD" && LD="$ac_prog"
;;
"")
@@ -762,6 +762,7 @@ no_undefined_flag=
archive_cmds=
old_archive_from_new_cmds=
export_dynamic_flag_spec=
+whole_archive_flag_spec=
hardcode_libdir_flag_spec=
hardcode_libdir_separator=
hardcode_direct=no
@@ -790,6 +791,9 @@ if test "$with_gnu_ld" = yes; then
sunos4*)
archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
;;
cygwin32* | mingw32*)
@@ -845,6 +849,7 @@ __dll_entry (HINSTANCE hinst, DWORD reason, LPVOID reserved)
runpath_var=LD_RUN_PATH
hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
export_dynamic_flag_spec='${wl}--export-dynamic'
+ whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
fi
else
# PORTME fill in a description of your system's linker (not GNU ld)
@@ -939,7 +944,7 @@ __dll_entry (HINSTANCE hinst, DWORD reason, LPVOID reserved)
archive_cmds='$CC -shared -o $lib$libobjs'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
- hardcode_minus_L=yes
+ hardcode_minus_L=no
hardcode_shlibpath_var=no
;;
@@ -1044,7 +1049,7 @@ echo "$ac_t$ld_shlibs" 1>&6
if test -z "$NM"; then
echo $ac_n "checking for BSD-compatible nm... $ac_c" 1>&6
case "$NM" in
- /* | [A-Za-z]:\\*) ;; # Let the user override the test with a path.
+ /* | [A-Za-z]:[/\\]*) ;; # Let the user override the test with a path.
*)
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
@@ -1134,11 +1139,11 @@ void nm_test_func(){}
main(){nm_test_var='a';nm_test_func();return(0);}
EOF
-echo "$progname:1137: checking if global_symbol_pipe works" >&5
-if { (eval echo $progname:1138: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
+echo "$progname:1142: checking if global_symbol_pipe works" >&5
+if { (eval echo $progname:1143: \"$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:1141: 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:1146: 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
@@ -1196,7 +1201,7 @@ EOF
save_CFLAGS="$CFLAGS"
LIBS="conftestm.$objext"
CFLAGS="$CFLAGS$no_builtin_flag"
- if { (eval echo $progname:1199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ if { (eval echo $progname:1204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
pipe_works=yes
else
echo "$progname: failed program was:" >&5
@@ -1303,8 +1308,8 @@ freebsd2* | freebsd3*)
;;
gnu*)
- version_type=sunos
- library_names_spec='${libname}${release}.so$versuffix'
+ version_type=linux
+ library_names_spec='${libname}${release}.so$versuffix ${libname}.so'
shlibpath_var=LD_LIBRARY_PATH
;;
@@ -1384,6 +1389,8 @@ solaris2*)
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
soname_spec='${libname}${release}.so$major'
shlibpath_var=LD_LIBRARY_PATH
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
;;
sunos4*)
@@ -1459,7 +1466,8 @@ ltecho="$echo"
for var in ltecho old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
old_LN_S old_DLLTOOL old_AS AR CC LD LN_S NM DLLTOOL AS reload_flag \
reload_cmds wl pic_flag link_static_flag no_builtin_flag \
- export_dynamic_flag_spec libname_spec library_names_spec soname_spec RANLIB \
+ export_dynamic_flag_spec whole_archive_flag_spec libname_spec \
+ library_names_spec soname_spec RANLIB \
old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
old_postuninstall_cmds archive_cmds postinstall_cmds postuninstall_cmds \
allow_undefined_flag no_undefined_flag objext libext \
@@ -1597,6 +1605,9 @@ no_builtin_flag="$no_builtin_flag"
# Compiler flag to allow reflexive dlopens.
export_dynamic_flag_spec="$export_dynamic_flag_spec"
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec="$whole_archive_flag_spec"
+
# Library versioning type.
version_type=$version_type