From: Gary V. Vaughan Date: Thu, 28 Jun 2001 22:02:06 +0000 (+0000) Subject: Libtool now builds with the help of Autoconf-2.50! X-Git-Tag: release-1-4b~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb2c3d2ed89f830d9949d41d37cfd63e7dadeabd;p=thirdparty%2Flibtool.git 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. --- diff --git a/ChangeLog b/ChangeLog index 4b8b2d288..e26c6d124 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,26 @@ +2001-06-28 Gary V. Vaughan , Paolo Bonzini + + 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 * pdemo/Makefile.am: Use '=' isntead of '+=' to shut up diff --git a/Makefile.am b/Makefile.am index a69a6c657..84a936ac6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 $@ diff --git a/cdemo/configure.in b/cdemo/configure.ac similarity index 71% rename from cdemo/configure.in rename to cdemo/configure.ac index cc1fed444..7b5b4e3fa 100644 --- a/cdemo/configure.in +++ b/cdemo/configure.ac @@ -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 diff --git a/configure.in b/configure.ac similarity index 75% rename from configure.in rename to configure.ac index a5077111f..f8de252f6 100644 --- a/configure.in +++ b/configure.ac @@ -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 diff --git a/demo/configure.in b/demo/configure.ac similarity index 84% rename from demo/configure.in rename to demo/configure.ac index 102fcda1e..fc1e0cab3 100644 --- a/demo/configure.in +++ b/demo/configure.ac @@ -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 diff --git a/depdemo/configure.in b/depdemo/configure.ac similarity index 82% rename from depdemo/configure.in rename to depdemo/configure.ac index 157b5127d..f5d8d6dda 100644 --- a/depdemo/configure.in +++ b/depdemo/configure.ac @@ -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 diff --git a/libltdl/acconfig.h b/libltdl/acconfig.h deleted file mode 100644 index 15f115c74..000000000 --- a/libltdl/acconfig.h +++ /dev/null @@ -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 diff --git a/libltdl/configure.in b/libltdl/configure.ac similarity index 98% rename from libltdl/configure.in rename to libltdl/configure.ac index fae3b0dd4..05f122301 100644 --- a/libltdl/configure.in +++ b/libltdl/configure.ac @@ -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, diff --git a/libtool.m4 b/libtool.m4 index 8e4d31847..2b60a33c6 100644 --- a/libtool.m4 +++ b/libtool.m4 @@ -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* diff --git a/libtoolize.in b/libtoolize.in index 446e0970e..459870809 100644 --- a/libtoolize.in +++ b/libtoolize.in @@ -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/'` diff --git a/mdemo/configure.in b/mdemo/configure.ac similarity index 84% rename from mdemo/configure.in rename to mdemo/configure.ac index 2708f9a74..3cad93418 100644 --- a/mdemo/configure.in +++ b/mdemo/configure.ac @@ -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 diff --git a/pdemo/configure.in b/pdemo/configure.ac similarity index 82% rename from pdemo/configure.in rename to pdemo/configure.ac index 2d77d7de1..38e339468 100644 --- a/pdemo/configure.in +++ b/pdemo/configure.ac @@ -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