Commit 06298abd by Alexandre Oliva Committed by Alexandre Oliva

ltconfig, [...]: Updated from libtool multi-language branch.

* ltconfig, ltmain.sh, libtool.m4, ltcf-c.sh, ltcf-cxx.sh,
ltcf-gcj.sh: Updated from libtool multi-language branch.

From-SVN: r36198
parent 611bbf2a
2000-09-06 Alexandre Oliva <aoliva@redhat.com>
* ltconfig, ltmain.sh, libtool.m4, ltcf-c.sh, ltcf-cxx.sh,
ltcf-gcj.sh: Updated from libtool multi-language branch.
2000-09-05 Alexandre Oliva <aoliva@redhat.com> 2000-09-05 Alexandre Oliva <aoliva@redhat.com>
* Makefile.in (all-bootstrap): Added all-texinfo and all-zlib. * Makefile.in (all-bootstrap): Added all-texinfo and all-zlib.
......
...@@ -532,8 +532,10 @@ freebsd* ) ...@@ -532,8 +532,10 @@ freebsd* )
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case "$host_cpu" in case "$host_cpu" in
i*86 ) i*86 )
# Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up.
changequote(,)dnl changequote(,)dnl
lt_cv_deplibs_check_method=='file_magic OpenBSD/i[3-9]86 demand paged shared library' lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
changequote([, ])dnl changequote([, ])dnl
lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
...@@ -579,7 +581,7 @@ irix5* | irix6*) ...@@ -579,7 +581,7 @@ irix5* | irix6*)
;; ;;
# This must be Linux ELF. # This must be Linux ELF.
linux*) linux-gnu*)
case "$host_cpu" in case "$host_cpu" in
alpha* | i*86 | powerpc* | sparc* | ia64* ) alpha* | i*86 | powerpc* | sparc* | ia64* )
lt_cv_deplibs_check_method=pass_all ;; lt_cv_deplibs_check_method=pass_all ;;
...@@ -655,7 +657,8 @@ else ...@@ -655,7 +657,8 @@ else
# Check to see if the nm accepts a BSD-compat flag. # Check to see if the nm accepts a BSD-compat flag.
# Adding the `sed 1q' prevents false positives on HP-UX, which says: # Adding the `sed 1q' prevents false positives on HP-UX, which says:
# nm: unknown option "B" ignored # nm: unknown option "B" ignored
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then # Tru64's nm complains that /dev/null is an invalid object file
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
ac_cv_path_NM="$tmp_nm -B" ac_cv_path_NM="$tmp_nm -B"
break break
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
...@@ -822,3 +825,9 @@ AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl ...@@ -822,3 +825,9 @@ AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
dnl This is just to silence aclocal about the macro not being used dnl This is just to silence aclocal about the macro not being used
ifelse([AC_DISABLE_FAST_INSTALL])dnl ifelse([AC_DISABLE_FAST_INSTALL])dnl
AC_DEFUN([LT_AC_PROG_GCJ],[
AC_CHECK_TOOL(GCJ, gcj, no)
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
AC_SUBST(GCJFLAGS)
])
#### This script is meant to be sourced by ltconfig. #### This script is meant to be sourced by ltconfig.
# $Id: ltcf-c.sh,v 1.1 2000/07/28 18:04:21 bkoz Exp $
# ltcf-c.sh - Create a C compiler specific configuration # ltcf-c.sh - Create a C compiler specific configuration
# #
# Copyright (C) 1996-2000 Free Software Foundation, Inc. # Copyright (C) 1996-2000 Free Software Foundation, Inc.
...@@ -92,7 +90,7 @@ EOF ...@@ -92,7 +90,7 @@ EOF
allow_undefined_flag=unsupported allow_undefined_flag=unsupported
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
# support --undefined. This deserves some investigation. FIXME # support --undefined. This deserves some investigation. FIXME
archive_cmds='$CC -nostart $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname -o $lib' archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
else else
ld_shlibs=no ld_shlibs=no
fi fi
...@@ -193,8 +191,8 @@ EOF ...@@ -193,8 +191,8 @@ EOF
EOF EOF
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname -o $lib' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else else
ld_shlibs=no ld_shlibs=no
fi fi
...@@ -219,8 +217,8 @@ EOF ...@@ -219,8 +217,8 @@ EOF
if test "$ld_shlibs" = yes; then if test "$ld_shlibs" = yes; then
runpath_var=LD_RUN_PATH runpath_var=LD_RUN_PATH
hardcode_libdir_flag_spec="$wlarc"'--rpath '"$wlarc"'$libdir' hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
export_dynamic_flag_spec="$wlarc"'--export-dynamic' export_dynamic_flag_spec='${wl}--export-dynamic'
case $host_os in case $host_os in
cygwin* | mingw*) cygwin* | mingw*)
# dlltool doesn't understand --whole-archive et. al. # dlltool doesn't understand --whole-archive et. al.
...@@ -673,10 +671,12 @@ if test "$enable_shared" = yes && test "$with_gcc" = yes; then ...@@ -673,10 +671,12 @@ if test "$enable_shared" = yes && test "$with_gcc" = yes; then
verstring= verstring=
output_objdir=. output_objdir=.
libname=conftest libname=conftest
save_allow_undefined_flag=$allow_undefined_flag
allow_undefined_flag= allow_undefined_flag=
if { (eval echo ltcf-c.sh:need_lc: \"$archive_cmds\") 1>&5; (eval $archive_cmds) 2>&1 | grep " -lc " 1>&5 ; }; then if { (eval echo ltcf-c.sh:need_lc: \"$archive_cmds\") 1>&5; (eval $archive_cmds) 2>&1 | grep " -lc " 1>&5 ; }; then
need_lc=no need_lc=no
fi fi
allow_undefined_flag=$save_allow_undefined_flag
else else
cat conftest.err 1>&5 cat conftest.err 1>&5
fi fi
......
#### This script is meant to be sourced by ltconfig. #### This script is meant to be sourced by ltconfig.
# $Id: ltcf-cxx.sh,v 1.1 2000/07/28 18:04:21 bkoz Exp $
# ltcf-cxx.sh - Create a C++ compiler specific configuration # ltcf-cxx.sh - Create a C++ compiler specific configuration
# #
# Copyright (C) 1996-1999,2000 Free Software Foundation, Inc. # Copyright (C) 1996-1999,2000 Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
# #
# Original C++ support by: # Original C++ support by:Gary V. Vaughan <gvv@techie.com>
# Alexandre Oliva <oliva@lsd.ic.unicamp.br> # Alexandre Oliva <oliva@lsd.ic.unicamp.br>
# Ossama Othman <ossama@debian.org> # Ossama Othman <ossama@debian.org>
# Thomas Thanner <tanner@gmx.de> # Thomas Thanner <tanner@gmx.de>
...@@ -178,8 +176,8 @@ case "$host_os" in ...@@ -178,8 +176,8 @@ case "$host_os" in
;; ;;
aCC) aCC)
case "$host_os" in case "$host_os" in
hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;; hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -b ${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 -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;;
esac esac
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=: hardcode_libdir_separator=:
...@@ -209,11 +207,17 @@ case "$host_os" in ...@@ -209,11 +207,17 @@ case "$host_os" in
CC) CC)
# SGI C++ # SGI C++
archive_cmds='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' archive_cmds='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
;;
# Archives containing C++ object files must be created using
# "CC -ar", where "CC" is the IRIX C++ compiler. This is
# necessary to make sure instantiated templates are included
# in the archive.
old_archive_cmds='$CC -ar -WR,-u -o $oldlib $oldobjs'
;;
*) *)
if test "$with_gcc" = yes; then if test "$with_gcc" = yes; then
if test "$with_gnu_ld" = no; then if test "$with_gnu_ld" = no; then
archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $linker_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 $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 else
archive_cmds='$LD -shared $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib' archive_cmds='$LD -shared $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
fi fi
...@@ -232,8 +236,8 @@ case "$host_os" in ...@@ -232,8 +236,8 @@ case "$host_os" in
# KCC will only create a shared library if the output file # KCC will only create a shared library if the output file
# ends with ".so" (or ".sl" for HP-UX), so rename the library # ends with ".so" (or ".sl" for HP-UX), so rename the library
# to its proper name (with version) after linking. # to its proper name (with version) after linking.
archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $linker_flags --soname $soname -o \$templib; mv \$templib $lib' archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
archive_expsym_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $linker_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' archive_expsym_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
# Commands to make compiler produce verbose output that lists # Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when # what "hidden" libraries, object files and flags are used when
...@@ -254,8 +258,8 @@ case "$host_os" in ...@@ -254,8 +258,8 @@ case "$host_os" in
;; ;;
cxx) cxx)
# Compaq C++ # Compaq C++
archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-soname $wl$soname -o $lib' archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' archive_expsym_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
runpath_var=LD_RUN_PATH runpath_var=LD_RUN_PATH
hardcode_libdir_flag_spec='-rpath $libdir' hardcode_libdir_flag_spec='-rpath $libdir'
...@@ -318,7 +322,7 @@ case "$host_os" in ...@@ -318,7 +322,7 @@ case "$host_os" in
# KCC will only create a shared library if the output file # KCC will only create a shared library if the output file
# ends with ".so" (or ".sl" for HP-UX), so rename the library # ends with ".so" (or ".sl" for HP-UX), so rename the library
# to its proper name (with version) after linking. # to its proper name (with version) after linking.
archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $linker_flags --soname $soname -o \$templib; mv \$templib $lib' archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
hardcode_libdir_flag_spec='${wl}-rpath,$libdir' hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
hardcode_libdir_separator=: hardcode_libdir_separator=:
...@@ -335,7 +339,7 @@ case "$host_os" in ...@@ -335,7 +339,7 @@ case "$host_os" in
;; ;;
cxx) cxx)
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
archive_cmds='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' archive_cmds='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=: hardcode_libdir_separator=:
...@@ -377,7 +381,7 @@ case "$host_os" in ...@@ -377,7 +381,7 @@ case "$host_os" in
# KCC will only create a shared library if the output file # KCC will only create a shared library if the output file
# ends with ".so" (or ".sl" for HP-UX), so rename the library # ends with ".so" (or ".sl" for HP-UX), so rename the library
# to its proper name (with version) after linking. # to its proper name (with version) after linking.
archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $linker_flags --soname $soname -o \$templib; mv \$templib $lib' archive_cmds='templib=`echo $lib | sed -e "s/\.so\..*/\.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
hardcode_libdir_flag_spec='${wl}-rpath,$libdir' hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
hardcode_libdir_separator=: hardcode_libdir_separator=:
...@@ -393,7 +397,7 @@ case "$host_os" in ...@@ -393,7 +397,7 @@ case "$host_os" in
;; ;;
cxx) cxx)
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
archive_cmds='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-msym ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' archive_cmds='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=: hardcode_libdir_separator=:
...@@ -453,9 +457,9 @@ case "$host_os" in ...@@ -453,9 +457,9 @@ case "$host_os" in
CC) CC)
# Sun C++ 4.2, 5.x and Centerline C++ # Sun C++ 4.2, 5.x and Centerline C++
no_undefined_flag=' -ztext' no_undefined_flag=' -ztext'
archive_cmds='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' archive_cmds='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp' $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
hardcode_libdir_flag_spec='-R$libdir' hardcode_libdir_flag_spec='-R$libdir'
hardcode_shlibpath_var=no hardcode_shlibpath_var=no
...@@ -489,7 +493,7 @@ case "$host_os" in ...@@ -489,7 +493,7 @@ case "$host_os" in
;; ;;
gcx) gcx)
# Green Hills C++ Compiler # Green Hills C++ Compiler
archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib' archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
# The C++ compiler must be used to create the archive. # The C++ compiler must be used to create the archive.
old_archive_cmds='$CC $LDFLAGS -archive -o $oldlib $oldobjs' old_archive_cmds='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
......
#### This script is meant to be sourced by ltconfig. #### This script is meant to be sourced by ltconfig.
# $Id: ltcf-gcj.sh,v 1.1.2.5 2000/07/20 02:29:15 oliva Exp $
# ltcf-gcj.sh - Create a GCJ compiler specific configuration # ltcf-gcj.sh - Create a GCJ compiler specific configuration
# #
# Copyright (C) 1996-1999,2000 Free Software Foundation, Inc. # Copyright (C) 1996-1999,2000 Free Software Foundation, Inc.
...@@ -95,7 +93,7 @@ EOF ...@@ -95,7 +93,7 @@ EOF
allow_undefined_flag=unsupported allow_undefined_flag=unsupported
# Joseph Beckenbach <jrb3@best.com> says some releases of gcc # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
# support --undefined. This deserves some investigation. FIXME # support --undefined. This deserves some investigation. FIXME
archive_cmds='$CC -nostart $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname -o $lib' archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
else else
ld_shlibs=no ld_shlibs=no
fi fi
...@@ -196,8 +194,8 @@ EOF ...@@ -196,8 +194,8 @@ EOF
EOF EOF
elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname -o $lib' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $linker_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else else
ld_shlibs=no ld_shlibs=no
fi fi
...@@ -222,8 +220,8 @@ EOF ...@@ -222,8 +220,8 @@ EOF
if test "$ld_shlibs" = yes; then if test "$ld_shlibs" = yes; then
runpath_var=LD_RUN_PATH runpath_var=LD_RUN_PATH
hardcode_libdir_flag_spec="$wlarc"'--rpath '"$wlarc"'$libdir' hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
export_dynamic_flag_spec="$wlarc"'--export-dynamic' export_dynamic_flag_spec='${wl}--export-dynamic'
case $host_os in case $host_os in
cygwin* | mingw*) cygwin* | mingw*)
# dlltool doesn't understand --whole-archive et. al. # dlltool doesn't understand --whole-archive et. al.
......
...@@ -55,7 +55,7 @@ modename="$progname" ...@@ -55,7 +55,7 @@ modename="$progname"
PROGRAM=ltmain.sh PROGRAM=ltmain.sh
PACKAGE=libtool PACKAGE=libtool
VERSION=1.4a VERSION=1.4a
TIMESTAMP=" (1.641.2.77 2000/08/01 04:25:15)" TIMESTAMP=" (1.641.2.111 2000/09/05 10:29:18)"
default_mode= default_mode=
help="Try \`$progname --help' for more information." help="Try \`$progname --help' for more information."
...@@ -483,7 +483,7 @@ if test -z "$show_help"; then ...@@ -483,7 +483,7 @@ if test -z "$show_help"; then
"$CC "*) ;; "$CC "*) ;;
# Blanks in the command may have been stripped by the calling shell, # Blanks in the command may have been stripped by the calling shell,
# but not from the CC environment variable when ltconfig was run. # but not from the CC environment variable when ltconfig was run.
"`$echo X$CC | $Xsed` "*) ;; "`$echo $CC` "*) ;;
*) *)
for z in $available_tags; do for z in $available_tags; do
if grep "^### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then if grep "^### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
...@@ -497,7 +497,7 @@ if test -z "$show_help"; then ...@@ -497,7 +497,7 @@ if test -z "$show_help"; then
tagname=$z tagname=$z
break break
;; ;;
"`$echo X$CC | $Xsed` "*) "`$echo $CC` "*)
tagname=$z tagname=$z
break break
;; ;;
...@@ -570,7 +570,7 @@ if test -z "$show_help"; then ...@@ -570,7 +570,7 @@ if test -z "$show_help"; then
# Lock this critical section if it is needed # Lock this critical section if it is needed
# We use this script file to make the link, it avoids creating a new file # We use this script file to make the link, it avoids creating a new file
if test "$need_locks" = yes; then if test "$need_locks" = yes; then
until ln "$0" "$lockfile" 2>/dev/null; do until $run ln "$0" "$lockfile" 2>/dev/null; do
$show "Waiting for $lockfile to be removed" $show "Waiting for $lockfile to be removed"
sleep 2 sleep 2
done done
...@@ -768,7 +768,7 @@ EOF ...@@ -768,7 +768,7 @@ EOF
# Unlock the critical section if it was locked # Unlock the critical section if it was locked
if test "$need_locks" != no; then if test "$need_locks" != no; then
$rm "$lockfile" $run $rm "$lockfile"
fi fi
exit 0 exit 0
...@@ -1046,6 +1046,18 @@ EOF ...@@ -1046,6 +1046,18 @@ EOF
continue continue
;; ;;
# The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
# so, if we see these flags be careful not to treat them like -L
-L[A-Z][A-Z]*:*)
case $with_gcc/$host in
no/*-*-irix*)
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
;;
esac
continue
;;
-L*) -L*)
dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
# We need an absolute path. # We need an absolute path.
...@@ -1168,11 +1180,11 @@ EOF ...@@ -1168,11 +1180,11 @@ EOF
;; ;;
-static) -static)
# If we have no pic_flag, then this is the same as -all-static. # The effects of -static are defined in a previous loop.
if test -z "$pic_flag" && test -n "$link_static_flag"; then # We used to do the same as -all-static on platforms that
compile_command="$compile_command $link_static_flag" # didn't have a PIC flag, but the assumption that the effects
finalize_command="$finalize_command $link_static_flag" # would be equivalent was wrong. It would break on at least
fi # Digital Unix and AIX.
continue continue
;; ;;
...@@ -1402,7 +1414,7 @@ EOF ...@@ -1402,7 +1414,7 @@ EOF
"$CC "*) ;; "$CC "*) ;;
# Blanks in the command may have been stripped by the calling shell, # Blanks in the command may have been stripped by the calling shell,
# but not from the CC environment variable when ltconfig was run. # but not from the CC environment variable when ltconfig was run.
"`$echo X$CC | $Xsed` "*) ;; "`$echo $CC` "*) ;;
*) *)
for z in $available_tags; do for z in $available_tags; do
if grep "^### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then if grep "^### BEGIN LIBTOOL TAG CONFIG: $z$" < "$0" > /dev/null; then
...@@ -1416,7 +1428,7 @@ EOF ...@@ -1416,7 +1428,7 @@ EOF
tagname=$z tagname=$z
break break
;; ;;
"`$echo X$CC | $Xsed` "*) "`$echo $CC` "*)
tagname=$z tagname=$z
break break
;; ;;
...@@ -1809,6 +1821,9 @@ EOF ...@@ -1809,6 +1821,9 @@ EOF
# are required to link). # are required to link).
if test -n "$old_library"; then if test -n "$old_library"; then
newdlprefiles="$newdlprefiles $dir/$old_library" newdlprefiles="$newdlprefiles $dir/$old_library"
# Otherwise, use the dlname, so that lt_dlopen finds it.
elif test -n "$dlname"; then
newdlprefiles="$newdlprefiles $dir/$dlname"
else else
newdlprefiles="$newdlprefiles $dir/$linklib" newdlprefiles="$newdlprefiles $dir/$linklib"
fi fi
...@@ -1860,7 +1875,6 @@ EOF ...@@ -1860,7 +1875,6 @@ EOF
if test "$linkmode,$pass" = "prog,link"; then if test "$linkmode,$pass" = "prog,link"; then
if test -n "$library_names" && if test -n "$library_names" &&
{ test "$hardcode_into_libs" != all || test "$alldeplibs" != yes; } &&
{ test "$prefer_static_libs" = no || test -z "$old_library"; }; then { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
# We need to hardcode the library path # We need to hardcode the library path
if test -n "$shlibpath_var"; then if test -n "$shlibpath_var"; then
...@@ -1913,7 +1927,8 @@ EOF ...@@ -1913,7 +1927,8 @@ EOF
need_relink=yes need_relink=yes
fi fi
# This is a shared library # This is a shared library
if test $linkmode = lib && test "$hardcode_into_libs" = all; then if test $linkmode = lib &&
test $hardcode_into_libs = yes; then
# Hardcode the library path. # Hardcode the library path.
# Skip directories that are in the system default run-time # Skip directories that are in the system default run-time
# search path. # search path.
...@@ -2113,7 +2128,7 @@ EOF ...@@ -2113,7 +2128,7 @@ EOF
if test $linkmode = lib; then if test $linkmode = lib; then
if test -n "$dependency_libs" && if test -n "$dependency_libs" &&
{ test "$hardcode_into_libs" = no || test $build_old_libs = yes || { test $hardcode_into_libs != yes || test $build_old_libs = yes ||
test $link_static = yes; }; then test $link_static = yes; }; then
# Extract -R from dependency_libs # Extract -R from dependency_libs
temp_deplibs= temp_deplibs=
...@@ -2556,7 +2571,7 @@ EOF ...@@ -2556,7 +2571,7 @@ EOF
*) finalize_rpath="$finalize_rpath $libdir" ;; *) finalize_rpath="$finalize_rpath $libdir" ;;
esac esac
done done
if test "$hardcode_into_libs" = no || test $build_old_libs = yes; then if test $hardcode_into_libs != yes || test $build_old_libs = yes; then
dependency_libs="$temp_xrpath $dependency_libs" dependency_libs="$temp_xrpath $dependency_libs"
fi fi
fi fi
...@@ -2806,7 +2821,7 @@ EOF ...@@ -2806,7 +2821,7 @@ EOF
# Test again, we may have decided not to build it any more # Test again, we may have decided not to build it any more
if test "$build_libtool_libs" = yes; then if test "$build_libtool_libs" = yes; then
if test "$hardcode_into_libs" != no; then if test $hardcode_into_libs = yes; then
# Hardcode the library paths # Hardcode the library paths
hardcode_libdirs= hardcode_libdirs=
dep_rpath= dep_rpath=
...@@ -2972,7 +2987,7 @@ EOF ...@@ -2972,7 +2987,7 @@ EOF
fi fi
# Make a backup of the uninstalled library when relinking # Make a backup of the uninstalled library when relinking
if test "$mode" = relink && test "$hardcode_into_libs" = all; then if test "$mode" = relink; then
$run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
fi fi
...@@ -2991,7 +3006,7 @@ EOF ...@@ -2991,7 +3006,7 @@ EOF
IFS="$save_ifs" IFS="$save_ifs"
# Restore the uninstalled library and exit # Restore the uninstalled library and exit
if test "$mode" = relink && test "$hardcode_into_libs" = all; then if test "$mode" = relink; then
$run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
exit 0 exit 0
fi fi
...@@ -3552,7 +3567,7 @@ static const void *lt_preloaded_setup() { ...@@ -3552,7 +3567,7 @@ static const void *lt_preloaded_setup() {
exit 0 exit 0
fi fi
if test "$hardcode_action" = relink || test "$hardcode_into_libs" = all; then if test "$hardcode_action" = relink; then
# Fast installation is not supported # Fast installation is not supported
link_command="$compile_var$compile_command$compile_rpath" link_command="$compile_var$compile_command$compile_rpath"
relink_command="$finalize_var$finalize_command$finalize_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath"
...@@ -3590,9 +3605,14 @@ static const void *lt_preloaded_setup() { ...@@ -3590,9 +3605,14 @@ static const void *lt_preloaded_setup() {
if test -n "$relink_command"; then if test -n "$relink_command"; then
# Preserve any variables that may affect compiler behavior # Preserve any variables that may affect compiler behavior
for var in $variables_saved_for_relink; do for var in $variables_saved_for_relink; do
eval var_value=\$$var if eval test -z \"\${$var+set}\"; then
var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
relink_command="$var=\"$var_value\"; export $var; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then
relink_command="$var=; export $var; $relink_command"
else
var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
relink_command="$var=\"$var_value\"; export $var; $relink_command"
fi
done done
relink_command="cd `pwd`; $relink_command" relink_command="cd `pwd`; $relink_command"
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
...@@ -3908,9 +3928,14 @@ fi\ ...@@ -3908,9 +3928,14 @@ fi\
# Preserve any variables that may affect compiler behavior # Preserve any variables that may affect compiler behavior
for var in $variables_saved_for_relink; do for var in $variables_saved_for_relink; do
eval var_value=\$$var if eval test -z \"\${$var+set}\"; then
var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
relink_command="$var=\"$var_value\"; export $var; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then
relink_command="$var=; export $var; $relink_command"
else
var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
relink_command="$var=\"$var_value\"; export $var; $relink_command"
fi
done done
# Quote the link command for shipping. # Quote the link command for shipping.
relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args" relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
...@@ -3998,8 +4023,7 @@ dlpreopen='$dlprefiles' ...@@ -3998,8 +4023,7 @@ dlpreopen='$dlprefiles'
# Directory that this library needs to be installed in: # Directory that this library needs to be installed in:
libdir='$install_libdir'" libdir='$install_libdir'"
if test $hardcode_into_libs = all && if test "$installed" = no && test $need_relink = yes; then
test "$installed" = no && test $need_relink = yes; then
$echo >> $output "\ $echo >> $output "\
relink_command=\"$relink_command\"" relink_command=\"$relink_command\""
fi fi
...@@ -4209,7 +4233,7 @@ relink_command=\"$relink_command\"" ...@@ -4209,7 +4233,7 @@ relink_command=\"$relink_command\""
test "X$dir" = "X$file/" && dir= test "X$dir" = "X$file/" && dir=
dir="$dir$objdir" dir="$dir$objdir"
if test "$hardcode_into_libs" = all && test -n "$relink_command"; then if test -n "$relink_command"; then
$echo "$modename: warning: relinking \`$file'" 1>&2 $echo "$modename: warning: relinking \`$file'" 1>&2
$show "$relink_command" $show "$relink_command"
if $run eval "$relink_command"; then : if $run eval "$relink_command"; then :
...@@ -4227,7 +4251,7 @@ relink_command=\"$relink_command\"" ...@@ -4227,7 +4251,7 @@ relink_command=\"$relink_command\""
shift shift
srcname="$realname" srcname="$realname"
test "$hardcode_into_libs" = all && test -n "$relink_command" && srcname="$realname"T test -n "$relink_command" && srcname="$realname"T
# Install the shared library and build the symlinks. # Install the shared library and build the symlinks.
$show "$install_prog $dir/$srcname $destdir/$realname" $show "$install_prog $dir/$srcname $destdir/$realname"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment