Package: libtool Version: 1.5.22-4 Severity: wishlist Tags: patch Usertags: autoconf-warning
Hi, When using «autoreconf -fi -Wall» the m4 provided files trigger autoconf warnings, which is quite annoying as it makes it more difficult to see what are the warnings on your configure.ac or m4 files. The attached patch fixes this. The AC_LANG_PUSH([C]) call is a hack (although an improvment over the obsolete macro) and should probably be fixed once/if autoconf provides support for java and rc files for AC_LANG, the other option would be to define the needed macros as it's done in autoconf's c.m4 or fortran.m4. regards, guillem
--- libtool.m4 2005-12-18 23:53:17.000000000 +0200 +++ libtool.m4 2007-04-09 20:00:16.000000000 +0300 @@ -202,12 +202,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]) @@ -468,7 +468,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 @@ -571,7 +571,8 @@ x86_64-*linux*|ppc*-*linux*|powerpc*-*li 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_PROGRAM([[]], [[]])], + [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 @@ -1786,7 +1787,7 @@ fi # ---------------- 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"]) @@ -1823,7 +1824,7 @@ if test -f "$ltmain" && test -n "$tagnam 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. @@ -1909,7 +1910,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 @@ -1948,7 +1949,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 @@ -1987,7 +1988,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 @@ -2127,7 +2128,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]) @@ -3999,7 +4000,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 @@ -4047,8 +4048,8 @@ AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) -AC_LANG_RESTORE CC="$lt_save_CC" +AC_LANG_POP([C]) ])# AC_LIBTOOL_LANG_GCJ_CONFIG @@ -4059,7 +4060,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 @@ -4091,8 +4092,8 @@ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $ AC_LIBTOOL_CONFIG($1) -AC_LANG_RESTORE CC="$lt_save_CC" +AC_LANG_POP([C]) ])# AC_LIBTOOL_LANG_RC_CONFIG --- ltdl.m4 2005-12-18 23:53:17.000000000 +0200 +++ ltdl.m4 2007-04-09 19:27:33.000000000 +0300 @@ -95,7 +95,7 @@ AC_CHECK_FUNCS([closedir opendir readdir # ---------------------- AC_DEFUN([AC_LTDL_ENABLE_INSTALL], [AC_ARG_ENABLE([ltdl-install], - [AC_HELP_STRING([--enable-ltdl-install], [install libltdl])]) + [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])]) AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno) AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno) @@ -304,11 +304,11 @@ AC_CHECK_FUNC([shl_load], [AC_DEFINE([HAVE_LIBDL], [1], [Define if you have the libdl library or equivalent.]) LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes"], - [AC_TRY_LINK([#if HAVE_DLFCN_H + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H # include <dlfcn.h> #endif - ], - [dlopen(0, 0);], + ]], + [[dlopen(0, 0);]])], [AC_DEFINE([HAVE_LIBDL], [1], [Define if you have the libdl library or equivalent.]) libltdl_cv_func_dlopen="yes"], [AC_CHECK_LIB([svld], [dlopen], @@ -363,15 +363,15 @@ EOF if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then : else - echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC + echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD fi fi else - echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC + echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else - echo "configure: failed program was:" >&AC_FD_CC - cat conftest.c >&AC_FD_CC + echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.c >&AS_MESSAGE_LOG_FD fi rm -rf conftest* ])