mirror of
git://git.savannah.gnu.org/libtool.git
synced 2025-01-18 14:16:00 +08:00
* libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS): Fix tag support
problems with CXX variables being overwritten by the individual macros. (AC_LIBTOOL_PROG_CC_C_O): Ditto. (AC_LIBTOOL_PROG_COMPILER_PIC): Ditto. (AC_LIBTOOL_LANG_CXX_CONFIG): Moved call to AC_LIBTOOL_SYS_HARD_LINK_LOCKS after the call to AC_LIBTOOL_PROG_CC_C_O as it depends on the result. (AC_LIBTOOL_LANG_GCJ_CONFIG): Ditto. (AC_LIBTOOL_LANG_C_CONFIG): Ditto. (AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH): Used the macro _LT_AC_TAGVAR to ensure the correct variable is being queried. (AC_LIBTOOL_SYS_DYNAMIC_LINKER): Changed the naming of shared objects under IRIX back to what it was in the MLB.
This commit is contained in:
parent
717697b020
commit
7e3f8916bb
17
ChangeLog
17
ChangeLog
@ -1,3 +1,20 @@
|
||||
2001-07-19 Robert Boehne <rboehne@ricardo-us.com>
|
||||
|
||||
* libtool.m4 (AC_LIBTOOL_PROG_LD_SHLIBS): Fix tag support
|
||||
problems with CXX variables being overwritten by the individual
|
||||
macros.
|
||||
(AC_LIBTOOL_PROG_CC_C_O): Ditto.
|
||||
(AC_LIBTOOL_PROG_COMPILER_PIC): Ditto.
|
||||
(AC_LIBTOOL_LANG_CXX_CONFIG): Moved call to
|
||||
AC_LIBTOOL_SYS_HARD_LINK_LOCKS after the call to
|
||||
AC_LIBTOOL_PROG_CC_C_O as it depends on the result.
|
||||
(AC_LIBTOOL_LANG_GCJ_CONFIG): Ditto.
|
||||
(AC_LIBTOOL_LANG_C_CONFIG): Ditto.
|
||||
(AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH): Used the macro
|
||||
_LT_AC_TAGVAR to ensure the correct variable is being queried.
|
||||
(AC_LIBTOOL_SYS_DYNAMIC_LINKER): Changed the naming of shared
|
||||
objects under IRIX back to what it was in the MLB.
|
||||
|
||||
2001-07-23 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
* libtool.m4 (AC_LIBTOOL_SYS_MAX_CMD_LEN) [gnu*]: Remove spurious
|
||||
|
266
libtool.m4
vendored
266
libtool.m4
vendored
@ -786,7 +786,6 @@ fi
|
||||
# Check to see if options -c and -o are simultaneously supported by compiler
|
||||
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
|
||||
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
|
||||
|
||||
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
|
||||
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
|
||||
[_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
|
||||
@ -794,8 +793,12 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
|
||||
mkdir conftest
|
||||
cd conftest
|
||||
mkdir out
|
||||
save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
|
||||
ifelse([$1],[],[save_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"],
|
||||
[$1],[CXX],[save_CXXFLAGS="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS -o out/conftest2.$ac_objext"],
|
||||
[$1],[GCJ],[save_GCJFLAGS="$GCJFLAGS"
|
||||
GCJFLAGS="$GCJFLAGS -o out/conftest2.$ac_objext"])
|
||||
echo "$lt_simple_compile_test_code" > conftest.$ac_ext
|
||||
|
||||
# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
|
||||
@ -816,8 +819,9 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
|
||||
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
|
||||
fi
|
||||
fi
|
||||
CFLAGS="$save_CFLAGS"
|
||||
|
||||
ifelse([$1],[],[CFLAGS="$save_CFLAGS"],
|
||||
[$1],[CXX],[CXXFLAGS="$save_CXXFLAGS"],
|
||||
[$1],[GCJ],[GCJFLAGS="$save_GCJFLAGS"])
|
||||
chmod u+w .
|
||||
$rm conftest* out/*
|
||||
rmdir out
|
||||
@ -878,8 +882,8 @@ objdir=$lt_cv_objdir
|
||||
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
|
||||
[AC_MSG_CHECKING([how to hardcode library paths into programs])
|
||||
_LT_AC_TAGVAR(hardcode_action, $1)=
|
||||
if test -n "$hardcode_libdir_flag_spec" || \
|
||||
test -n "$runpath_var"; then
|
||||
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
|
||||
test -n "$_LT_AC_TAGVAR(runpath_var $1)"; then
|
||||
|
||||
# We can hardcode non-existant directories.
|
||||
if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
|
||||
@ -1150,8 +1154,8 @@ irix5* | irix6*)
|
||||
version_type=irix
|
||||
need_lib_prefix=no
|
||||
need_version=no
|
||||
soname_spec='${libname}${release}.so.$major'
|
||||
library_names_spec='${libname}${release}.so.$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
|
||||
soname_spec='${libname}${release}.so$major'
|
||||
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
|
||||
case $host_os in
|
||||
irix5*)
|
||||
libsuff= shlibsuff=
|
||||
@ -2160,9 +2164,9 @@ AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compil
|
||||
## the running order or otherwise move them around unless you know exactly
|
||||
## what you are doing...
|
||||
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
|
||||
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
|
||||
AC_LIBTOOL_PROG_COMPILER_PIC($1)
|
||||
AC_LIBTOOL_PROG_CC_C_O($1)
|
||||
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
|
||||
AC_LIBTOOL_PROG_LD_SHLIBS($1)
|
||||
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
|
||||
AC_LIBTOOL_SYS_LIB_STRIP
|
||||
@ -2535,11 +2539,11 @@ case $host_os in
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
|
||||
fi
|
||||
fi
|
||||
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
|
||||
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
|
||||
_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
|
||||
;;
|
||||
esac
|
||||
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
|
||||
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
|
||||
;;
|
||||
linux*)
|
||||
case $cc_basename in
|
||||
@ -2988,9 +2992,9 @@ _LT_AC_TAGVAR(LD, $1)="$LD"
|
||||
## There is no encapsulation within the following macros, do not change
|
||||
## the running order or otherwise move them around unless you know exactly
|
||||
## what you are doing...
|
||||
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
|
||||
AC_LIBTOOL_PROG_COMPILER_PIC($1)
|
||||
AC_LIBTOOL_PROG_CC_C_O($1)
|
||||
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
|
||||
AC_LIBTOOL_PROG_LD_SHLIBS($1)
|
||||
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
|
||||
AC_LIBTOOL_SYS_LIB_STRIP
|
||||
@ -3044,9 +3048,9 @@ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
|
||||
## the running order or otherwise move them around unless you know exactly
|
||||
## what you are doing...
|
||||
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
|
||||
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
|
||||
AC_LIBTOOL_PROG_COMPILER_PIC($1)
|
||||
AC_LIBTOOL_PROG_CC_C_O($1)
|
||||
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
|
||||
AC_LIBTOOL_PROG_LD_SHLIBS($1)
|
||||
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
|
||||
AC_LIBTOOL_SYS_LIB_STRIP
|
||||
@ -3720,7 +3724,231 @@ AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
|
||||
|
||||
AC_MSG_CHECKING([for $compiler option to produce PIC])
|
||||
ifelse([$1],[CXX],[
|
||||
# C++ specific cases for pic, static, wl, etc.
|
||||
if test "$GXX" = yes; then
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
|
||||
|
||||
case $host_os in
|
||||
aix*)
|
||||
# All AIX code is PIC.
|
||||
if test "$host_cpu" = ia64; then
|
||||
# AIX 5 now supports IA64 processor
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
|
||||
fi
|
||||
;;
|
||||
amigaos*)
|
||||
# FIXME: we need at least 68020 code to build shared libraries, but
|
||||
# adding the `-m68020' flag to GCC prevents building anything better,
|
||||
# like `-m68040'.
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
|
||||
;;
|
||||
beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
|
||||
# PIC is the default for these OSes.
|
||||
;;
|
||||
cygwin* | mingw* | os2*)
|
||||
# This hack is so that the source file can tell whether it is being
|
||||
# built for inclusion in a dll (and should export symbols for example).
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
|
||||
;;
|
||||
darwin* | rhapsody*)
|
||||
# PIC is the default on this platform
|
||||
# Common symbols not allowed in MH_DYLIB files
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
|
||||
;;
|
||||
*djgpp*)
|
||||
# DJGPP does not support shared libraries at all
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
|
||||
;;
|
||||
sysv4*MP*)
|
||||
if test -d /usr/nec; then
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
|
||||
;;
|
||||
esac
|
||||
else
|
||||
case $host_os in
|
||||
aix4* | aix5*)
|
||||
# All AIX code is PIC.
|
||||
if test "$host_cpu" = ia64; then
|
||||
# AIX 5 now supports IA64 processor
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
|
||||
else
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
|
||||
fi
|
||||
;;
|
||||
chorus*)
|
||||
case $cc_basename in
|
||||
cxch68)
|
||||
# Green Hills C++ Compiler
|
||||
# _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
dgux*)
|
||||
case $cc_basename in
|
||||
ec++)
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
|
||||
;;
|
||||
ghcx)
|
||||
# Green Hills C++ Compiler
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
freebsd*)
|
||||
# FreeBSD uses GNU C++
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
case $cc_basename in
|
||||
CC)
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
|
||||
;;
|
||||
aCC)
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
irix5* | irix6*)
|
||||
case $cc_basename in
|
||||
CC)
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
|
||||
# CC pic flag -KPIC is the default.
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
linux*)
|
||||
case $cc_basename in
|
||||
KCC)
|
||||
# KAI C++ Compiler
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
|
||||
;;
|
||||
cxx)
|
||||
# Compaq C++
|
||||
# Make sure the PIC flag is empty. It appears that all Alpha
|
||||
# Linux and Compaq Tru64 Unix objects are PIC.
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
lynxos*)
|
||||
;;
|
||||
m88k*)
|
||||
;;
|
||||
mvs*)
|
||||
case $cc_basename in
|
||||
cxx)
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
netbsd*)
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
case $cc_basename in
|
||||
KCC)
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
|
||||
;;
|
||||
RCC)
|
||||
# Rational C++ 2.4.1
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
|
||||
;;
|
||||
cxx)
|
||||
# Digital/Compaq C++
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
|
||||
# Make sure the PIC flag is empty. It appears that all Alpha
|
||||
# Linux and Compaq Tru64 Unix objects are PIC.
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
psos*)
|
||||
;;
|
||||
sco*)
|
||||
case $cc_basename in
|
||||
CC)
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
solaris*)
|
||||
case $cc_basename in
|
||||
CC)
|
||||
# Sun C++ 4.2, 5.x and Centerline C++
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
|
||||
;;
|
||||
gcx)
|
||||
# Green Hills C++ Compiler
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
sunos4*)
|
||||
case $cc_basename in
|
||||
CC)
|
||||
# Sun C++ 4.x
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
|
||||
;;
|
||||
lcc)
|
||||
# Lucid
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
tandem*)
|
||||
case $cc_basename in
|
||||
NCC)
|
||||
# NonStop-UX NCC 3.20
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
unixware*)
|
||||
;;
|
||||
vxworks*)
|
||||
;;
|
||||
*)
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
],
|
||||
[AC_MSG_CHECKING([for $compiler option to produce PIC])
|
||||
if test "$GCC" = yes; then
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
|
||||
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
|
||||
@ -3863,6 +4091,7 @@ else
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
])
|
||||
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
|
||||
|
||||
#
|
||||
@ -3896,7 +4125,7 @@ esac
|
||||
# See if the linker supports building shared libraries.
|
||||
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
|
||||
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
|
||||
|
||||
ifelse([$1],[CXX],[],[
|
||||
runpath_var=
|
||||
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
|
||||
|
||||
@ -4340,7 +4569,7 @@ else
|
||||
;;
|
||||
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
if test $with_gcc = yes; then
|
||||
if test $GXX = yes; then
|
||||
case $host_os in
|
||||
hpux9*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
|
||||
*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;;
|
||||
@ -4455,7 +4684,7 @@ else
|
||||
|
||||
solaris*)
|
||||
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -z defs'
|
||||
if test "$with_gcc" = yes; then
|
||||
if test "$GXX" = yes; then
|
||||
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
|
||||
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
|
||||
$CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
|
||||
@ -4559,6 +4788,7 @@ else
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
])
|
||||
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
|
||||
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user