summaryrefslogtreecommitdiff
path: root/autoconf/m4/libtool.m4
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2004-09-19 22:31:49 +0000
committerReid Spencer <rspencer@reidspencer.com>2004-09-19 22:31:49 +0000
commit12de17db02dca026fea1e2aee57ebdca97784292 (patch)
treeedfdc281c36966a7fa9f81a3533acee319d0bd7f /autoconf/m4/libtool.m4
parent8eacb0c3a7489b86a7f5523ff4992452bc0b7941 (diff)
downloadllvm-12de17db02dca026fea1e2aee57ebdca97784292.tar.gz
llvm-12de17db02dca026fea1e2aee57ebdca97784292.tar.bz2
llvm-12de17db02dca026fea1e2aee57ebdca97784292.tar.xz
Bring the script out of the dark ages and into modern autoconfness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16415 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'autoconf/m4/libtool.m4')
-rw-r--r--autoconf/m4/libtool.m446
1 files changed, 26 insertions, 20 deletions
diff --git a/autoconf/m4/libtool.m4 b/autoconf/m4/libtool.m4
index 140b345600..75a9bb52aa 100644
--- a/autoconf/m4/libtool.m4
+++ b/autoconf/m4/libtool.m4
@@ -1,11 +1,16 @@
###############################################################################
###############################################################################
-############ READ THIS:
-############ The only difference between this version of libtool.m4 and the one
-############ provided with libtool 1.5.10 is this warning header and changing
-############ the name of libtool to mklib. AutoRegen.sh checks for version
-############ 1.5.10 of libtool so attempts to use another version with this
-############ AC_PROG_LIBTOOL definition should fail. You've been warned.
+####### READ THIS:
+####### THIS FILE IS BASED ON THE VERSION IN libtool 1.5.10.
+####### The following changes have been made:
+####### * this big bold header has been added
+####### * fix obsolete constructs (ala autoupdate)
+####### * the name of the generated tool is "mklib" instead of "libtool"
+####### The last change is provided to avoid tab completion errors on the "lib"
+####### prefix. AutoRegen.sh checks for version 1.5.10 of libtool so attempts
+####### to use another version with this AC_PROG_LIBTOOL definition should
+####### fail.
+####### You've been warned.
###############################################################################
###############################################################################
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
@@ -226,12 +231,12 @@ AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
enable_win32_dll=yes, enable_win32_dll=no)
AC_ARG_ENABLE([libtool-lock],
- [AC_HELP_STRING([--disable-libtool-lock],
+ [AS_HELP_STRING([--disable-libtool-lock],
[avoid locking (might break parallel builds)])])
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
AC_ARG_WITH([pic],
- [AC_HELP_STRING([--with-pic],
+ [AS_HELP_STRING([--with-pic],
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
[pic_mode="$withval"],
[pic_mode=default])
@@ -447,7 +452,7 @@ AC_SUBST(ECHO)
# -----------
AC_DEFUN([_LT_AC_LOCK],
[AC_ARG_ENABLE([libtool-lock],
- [AC_HELP_STRING([--disable-libtool-lock],
+ [AS_HELP_STRING([--disable-libtool-lock],
[avoid locking (might break parallel builds)])])
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
@@ -550,7 +555,8 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
CFLAGS="$CFLAGS -belf"
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
[AC_LANG_PUSH(C)
- AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[]],[[]])],
+ lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
AC_LANG_POP])
if test x"$lt_cv_cc_needs_belf" != x"yes"; then
# this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
@@ -1655,7 +1661,7 @@ test "$dynamic_linker" = no && can_build_shared=no
# ----------------
AC_DEFUN([_LT_AC_TAGCONFIG],
[AC_ARG_WITH([tags],
- [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
+ [AS_HELP_STRING([--with-tags@<:@=TAGS@:>@],
[include additional configurations @<:@automatic@:>@])],
[tagnames="$withval"])
@@ -1689,7 +1695,7 @@ if test -f "$ltmain" && test -n "$tagnames"; then
if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
then
- AC_MSG_ERROR([tag name \"$tagname\" already exists])
+ AC_MSG_ERROR([tag name "$tagname" already exists])
fi
# Update the list of available tags.
@@ -1775,7 +1781,7 @@ AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
AC_DEFUN([AC_ENABLE_SHARED],
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE([shared],
- [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+ [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
@@ -1814,7 +1820,7 @@ AC_ENABLE_SHARED(no)
AC_DEFUN([AC_ENABLE_STATIC],
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE([static],
- [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+ [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
@@ -1853,7 +1859,7 @@ AC_ENABLE_STATIC(no)
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE([fast-install],
- [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+ [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
[optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
[p=${PACKAGE-default}
case $enableval in
@@ -1993,7 +1999,7 @@ fi
# find the pathname to the GNU or non-GNU linker
AC_DEFUN([AC_PROG_LD],
[AC_ARG_WITH([gnu-ld],
- [AC_HELP_STRING([--with-gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
[assume the C compiler uses GNU ld @<:@default=no@:>@])],
[test "$withval" = no || with_gnu_ld=yes],
[with_gnu_ld=no])
@@ -3781,7 +3787,7 @@ CC="$lt_save_CC"
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
-[AC_LANG_SAVE
+[AC_LANG_PUSH([C])
# Source file extension for Java test sources.
ac_ext=java
@@ -3824,7 +3830,7 @@ AC_LIBTOOL_DLOPEN_SELF($1)
AC_LIBTOOL_CONFIG($1)
-AC_LANG_RESTORE
+AC_LANG_POP([C])
CC="$lt_save_CC"
])# AC_LIBTOOL_LANG_GCJ_CONFIG
@@ -3836,7 +3842,7 @@ CC="$lt_save_CC"
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
-[AC_LANG_SAVE
+[AC_LANG_PUSH([C])
# Source file extension for RC test sources.
ac_ext=rc
@@ -3863,7 +3869,7 @@ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
AC_LIBTOOL_CONFIG($1)
-AC_LANG_RESTORE
+AC_LANG_POP([C])
CC="$lt_save_CC"
])# AC_LIBTOOL_LANG_RC_CONFIG