Libtool now builds with the help of Autoconf-2.50!

* configure.ac (AC_PREREQ):  Require Autoconf-2.50 or newer.
(AC_PROG_CPP, AC_EXEEXT, AC_OBJEXT):  Removed.  Autoconf-2.50
doesn't have the AC_REQUIRE bug that required these to be called
explicitly from here.  Autoconf-2.50 uses this file instead of...
* configure.in: ...this, which is now deleted.
* cdemo/configure.ac, cdemo/configure.in: Ditto.
* demo/configure.ac, demo/configure.in: Ditto.
* depdemo/configure.ac, depdemo/configure.in: Ditto.
* libltdl/configure.ac, libltdl/configure.in: Ditto.
* mdemo/configure.ac, mdemo/configure.in: Ditto.
* pdemo/configure.ac, pdemo/configure.in: Ditto.
* libltdl/acconfig.h:  Deleted.
* Makefile.am (libtool): libtool now depends on configure.ac.
* libtool.m4 (_LT_AC_LOCK):  Use 2.50's AC_LANG_PUSH/AC_LANG_POP
instead of 2.13's AC_LANG_SAVE/AC_LANG_RESTORE.
(AC_LIBTOOL_LANG_C_CONFIG): Ditto.
(AC_LIBTOOL_LANG_CXX_CONFIG): Ditto.
* libtoolize.in:  Use $configure_ac, instead of hardcoding
configure.in.
This commit is contained in:
Gary V. Vaughan 2001-06-28 22:02:06 +00:00
parent 6a3e2ec3ef
commit cb2c3d2ed8
12 changed files with 77 additions and 65 deletions

View File

@ -1,3 +1,26 @@
2001-06-28 Gary V. Vaughan <gary@gnu.org>, Paolo Bonzini <bonzini@gnu.org>
Libtool now builds with the help of Autoconf-2.50!
* configure.ac (AC_PREREQ): Require Autoconf-2.50 or newer.
(AC_PROG_CPP, AC_EXEEXT, AC_OBJEXT): Removed. Autoconf-2.50
doesn't have the AC_REQUIRE bug that required these to be called
explicitly from here. Autoconf-2.50 uses this file instead of...
* configure.in: ...this, which is now deleted.
* cdemo/configure.ac, cdemo/configure.in: Ditto.
* demo/configure.ac, demo/configure.in: Ditto.
* depdemo/configure.ac, depdemo/configure.in: Ditto.
* libltdl/configure.ac, libltdl/configure.in: Ditto.
* mdemo/configure.ac, mdemo/configure.in: Ditto.
* pdemo/configure.ac, pdemo/configure.in: Ditto.
* libltdl/acconfig.h: Deleted.
* Makefile.am (libtool): libtool now depends on configure.ac.
* libtool.m4 (_LT_AC_LOCK): Use 2.50's AC_LANG_PUSH/AC_LANG_POP
instead of 2.13's AC_LANG_SAVE/AC_LANG_RESTORE.
(AC_LIBTOOL_LANG_C_CONFIG): Ditto.
(AC_LIBTOOL_LANG_CXX_CONFIG): Ditto.
* libtoolize.in: Use $configure_ac, instead of hardcoding
configure.in.
2001-06-28 Tim Van Holder <tim.van.holder@pandora.be>
* pdemo/Makefile.am: Use '=' isntead of '+=' to shut up

View File

@ -28,7 +28,7 @@ aclocal_DATA = $(aclocal_macros)
# The standalone libtool script, and the libtool distributor.
bin_SCRIPTS = libtool libtoolize
libtool: $(srcdir)/ltmain.sh $(top_builddir)/configure.in
libtool: $(srcdir)/ltmain.sh $(top_builddir)/configure.ac
$(SHELL) $(top_builddir)/config.status --recheck
chmod +x $@

View File

@ -1,6 +1,8 @@
dnl Process this file with autoconf to create configure.
AC_INIT(main.c)
AC_PREREQ(2.50)
AC_INIT
AC_CONFIG_SRCDIR([main.c])
AM_INIT_AUTOMAKE(cdemo,0.1)
AC_PROG_CC
@ -14,4 +16,5 @@ AC_CHECK_LIBM
AC_SUBST(LIBM)
dnl Output the makefile
AC_OUTPUT(Makefile)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

View File

@ -1,6 +1,8 @@
## Process this file with autoconf to create configure.
AC_INIT(ltmain.in)
AC_PREREQ(2.50)
AC_INIT
AC_CONFIG_SRCDIR([ltmain.in])
AM_INIT_AUTOMAKE(libtool, 1.4a)
@ -32,12 +34,6 @@ AC_SUBST(aclocaldir)
# Use the specified CC and LD
AC_PROG_CC
# Autoconf-2.13 AC_REQUIRE resolution confuses the ordering for the
# preprocessor test if left to figure this out for itself -- by forcing that
# checks here, AC_REQUIRE doesn't need to add it. When we upgrade to
# Autoconf-2.50, this can be removed.
AC_PROG_CPP
AM_PROG_LD
AC_SUBST(LD)
AM_PROG_NM
@ -55,13 +51,6 @@ AM_CONDITIONAL(HAVE_GCJ, [test "x$GCJ" != xno])
# Declare win32 dll support
AC_LIBTOOL_WIN32_DLL
# Autoconf-2.13 AC_REQUIRE resolution confuses the ordering for the cygwin
# and mingw tests if left to figure this out for itself -- by forcing those
# checks here, AC_REQUIRE doesn't need to add them. When we upgrade to
# Autoconf-2.50, this can be removed.
AC_EXEEXT
AC_OBJEXT
# Check for dlopen support
AC_LIBTOOL_DLOPEN
AC_PROG_LIBTOOL
@ -88,4 +77,5 @@ done
AC_SUBST(ACINCLUDE_M4_LIST)
AC_SUBST(DIST_MAKEFILE_LIST)
AC_OUTPUT([Makefile doc/Makefile tests/Makefile])
AC_CONFIG_FILES([Makefile doc/Makefile tests/Makefile])
AC_OUTPUT

View File

@ -1,6 +1,8 @@
dnl Process this file with autoconf to create configure.
AC_INIT(hello.c)
AC_PREREQ(2.50)
AC_INIT
AC_CONFIG_SRCDIR([hello.c])
AM_INIT_AUTOMAKE(hell,1.0)
AC_PROG_CC
@ -26,4 +28,5 @@ AC_CHECK_LIBM
AC_SUBST(LIBM)
dnl Output the makefile
AC_OUTPUT(Makefile)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

View File

@ -1,6 +1,8 @@
dnl Process this file with autoconf to create configure.
AC_INIT(main.c)
AC_PREREQ(2.50)
AC_INIT
AC_CONFIG_SRCDIR([main.c])
AM_INIT_AUTOMAKE(depdemo,0.1)
AC_PROG_CC
@ -21,10 +23,10 @@ AC_CHECK_LIBM
AC_SUBST(LIBM)
dnl Output the makefile
AC_OUTPUT(
Makefile
AC_CONFIG_FILES([Makefile
l1/Makefile
l2/Makefile
l3/Makefile
l4/Makefile
)
])
AC_OUTPUT

View File

@ -1,12 +0,0 @@
/* Some of these are defined here, not in configure.in, because
they're AC_DEFINEd in two different places, which causes two
defines to appear. Some C compilers might now appreciate it... */
/* Define if you have the libdl library or equivalent. */
#undef HAVE_LIBDL
/* Define if you have the GNU dld library. */
#undef HAVE_DLD
/* Define if you have the shl_load function. */
#undef HAVE_SHL_LOAD

View File

@ -1,5 +1,6 @@
dnl Process this file with autoconf to create configure.
AC_PREREQ(2.50)
AC_INIT(ltdl.c)
dnl We shouldn't be using these internal macros of autoconf,

44
libtool.m4 vendored
View File

@ -420,10 +420,9 @@ case $host in
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
[AC_LANG_SAVE
AC_LANG_C
[AC_LANG_PUSH(C)
AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
AC_LANG_RESTORE])
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
CFLAGS="$SAVE_CFLAGS"
@ -482,7 +481,7 @@ AC_DEFUN(AC_LIBTOOL_COMPILER_OPTION,
# So say no if there are warnings
if test -s conftest.err; then
# Append any errors to the config.log.
cat conftest.err 1>&AC_FD_CC
cat conftest.err 1>&AS_MESSAGE_LOG_FD()
else
$2=yes
fi
@ -514,7 +513,7 @@ AC_DEFUN(AC_LIBTOOL_LINKER_OPTION,
# So say no if there are warnings
if test -s conftest.err; then
# Append any errors to the config.log.
cat conftest.err 1>&AC_FD_CC
cat conftest.err 1>&AS_MESSAGE_LOG_FD()
else
$2=yes
fi
@ -798,7 +797,7 @@ AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
# So say no if there are warnings
if test -s out/conftest.err; then
# Append any errors to the config.log.
cat out/conftest.err 1>&AC_FD_CC
cat out/conftest.err 1>&AS_MESSAGE_LOG_FD()
else
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
fi
@ -833,7 +832,7 @@ if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks"
ln conftest.a conftest.b 2>/dev/null && hard_links=no
AC_MSG_RESULT([$hard_links])
if test "$hard_links" = no; then
AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
need_locks=warn
fi
else
@ -1329,15 +1328,15 @@ AC_ARG_WITH(tags,
if test -f "$ltmain" && test -n "$tagnames"; then
if test ! -f "${ofile}"; then
AC_MSG_WARN([output file \`$ofile' does not exist])
AC_MSG_WARN([output file `$ofile' does not exist])
fi
if test -z "$LTCC"; then
eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
if test -z "$LTCC"; then
AC_MSG_WARN([output file \`$ofile' does not look like a libtool script])
AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
else
AC_MSG_WARN([using \`LTCC=$LTCC', extracted from \`$ofile'])
AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
fi
fi
@ -1627,7 +1626,6 @@ fi
# find a file program which can recognise a shared library
AC_DEFUN([AC_PATH_MAGIC],
[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin${PATH_SEPARATOR-:}$PATH)
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
@ -2094,8 +2092,7 @@ AC_DEFUN([_LT_AC_LANG_GCJ],
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
[lt_save_CC="$CC"
AC_LANG_SAVE
AC_LANG_C
AC_LANG_PUSH(C)
# Source file extension for C test sources.
ac_ext=c
@ -2124,10 +2121,10 @@ if test "$GCC" = no; then
esac
fi
if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
AC_MSG_WARN([\`$CC' requires \`$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
if echo "$old_CC $old_CFLAGS " | [egrep -e "[ ]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]"] >/dev/null; then :
else
AC_MSG_WARN([add \`$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
_LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
fi
fi
@ -2163,7 +2160,7 @@ AC_MSG_RESULT([$can_build_shared])
AC_LIBTOOL_CONFIG($1)
AC_LANG_RESTORE
AC_LANG_POP
CC="$lt_save_CC"
])# AC_LIBTOOL_LANG_C_CONFIG
@ -2175,8 +2172,7 @@ CC="$lt_save_CC"
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
[AC_LANG_SAVE
AC_LANG_CPLUSPLUS
[AC_LANG_PUSH(C++)
AC_REQUIRE([AC_PROG_CXX])
AC_REQUIRE([AC_PROG_CXXCPP])
@ -2945,7 +2941,7 @@ AC_MSG_RESULT([$can_build_shared])
AC_LIBTOOL_CONFIG($1)
AC_LANG_RESTORE
AC_LANG_POP
CC="$lt_save_CC"
])# AC_LIBTOOL_LANG_CXX_CONFIG
@ -3089,7 +3085,7 @@ ifelse([$1], [],
[cfgfile="${ofile}T"
trap "$rm \"$cfgfile\"; exit 1" 1 2 15
$rm -f "$cfgfile"
echo creating $ofile],
AC_MSG_NOTICE([creating $ofile])],
[cfgfile="$ofile"])
cat <<__EOF__ >> "$cfgfile"
@ -3618,16 +3614,16 @@ EOF
LIBS="$lt_save_LIBS"
CFLAGS="$lt_save_CFLAGS"
else
echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD()
fi
else
echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD()
fi
else
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD()
fi
else
echo "$progname: failed program was:" >&AC_FD_CC
echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD()
cat conftest.$ac_ext >&5
fi
rm -f conftest* conftst*

View File

@ -154,7 +154,7 @@ fi
files='config.guess config.sub ltmain.sh'
auxdir=.
auxdirline=`egrep '^AC_CONFIG_AUX_DIR' configure.in 2>/dev/null`
auxdirline=`egrep '^AC_CONFIG_AUX_DIR' $configure_ac 2>/dev/null`
if test -n "$auxdirline"; then
# Handle explicit AC_CONFIG_AUX_DIR settings.
auxdir=`echo "$auxdirline" | sed 's/^AC_CONFIG_AUX_DIR(\([^)]*\)).*$/\1/'`

View File

@ -1,6 +1,8 @@
dnl Process this file with autoconf to create configure.
AC_INIT(main.c)
AC_PREREQ(2.50)
AC_INIT
AC_CONFIG_SRCDIR([main.c])
AM_INIT_AUTOMAKE(mdemo,0.1)
AC_PROG_CC
@ -29,4 +31,5 @@ AC_CHECK_LIBM
AC_SUBST(LIBM)
dnl Output the makefile
AC_OUTPUT(Makefile)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

View File

@ -1,6 +1,8 @@
dnl Process this file with autoconf to create configure.
AC_INIT(longer_file_name_hello.c)
AC_PREREQ(2.50)
AC_INIT
AC_CONFIG_SRCDIR([longer_file_name_hello.c])
AM_INIT_AUTOMAKE(hell,1.0)
AC_PROG_CC
@ -26,4 +28,5 @@ AC_CHECK_LIBM
AC_SUBST(LIBM)
dnl Output the makefile
AC_OUTPUT(Makefile)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT