libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fix AC_LANG_PROGRAM warnings from git Autoconf.


From: Ralf Wildenhues
Subject: Fix AC_LANG_PROGRAM warnings from git Autoconf.
Date: Sat, 28 Aug 2010 09:10:29 +0200
User-agent: Mutt/1.5.20 (2010-04-22)

This patch should fix all warnings emitted by git Autoconf due to the
new AC_LANG_PROGRAM check:
http://lists.gnu.org/archive/html/autoconf-patches/2010-08/msg00080.html

As far as I can see, the first two instances were fairly benign *before*
the Autoconf patch, but the last one exposed a real bug, namely that
Fortran sources were not treated correctly on IRIX with GCC.  I have
access to IRIX but no Fortran compiler is installed there, so I can't
really test it.  The C++ case is just for consistency (this part of the
macro should not be expanded for that language), and the macro is broken
still for GCJ because AC_LANG does not have a setting for the language.

OK to commit?

Cheers,
Ralf

    Fix AC_LANG_PROGRAM warnings from git Autoconf.
    
    * libltdl/m4/libtool.m4 (_LT_SYS_MODULE_PATH_AIX): Fix
    underquoted AC_LANG_PROGRAM call.
    (LT_PROG_AR): Use AC_LANG_PROGRAM.
    (_LT_LINKER_SHLIBS) [irix, GCC]: Use the right source for the
    given language.

diff --git a/libltdl/m4/libtool.m4 b/libltdl/m4/libtool.m4
index d7bd57d..1fac524 100644
--- a/libltdl/m4/libtool.m4
+++ b/libltdl/m4/libtool.m4
@@ -1083,7 +1083,7 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
 m4_defun([_LT_SYS_MODULE_PATH_AIX],
 [m4_require([_LT_DECL_SED])dnl
 AC_CACHE_VAL([lt_cv_aix_libpath],
-[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+[AC_LINK_IFELSE([AC_LANG_PROGRAM],[
 lt_aix_libpath_sed='
     /Import File Strings/,/^$/ {
        /^0/ {
@@ -1324,7 +1324,7 @@ _LT_DECL([], [AR_FLAGS], [1], [Flags to create an 
archive])
 
 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
   [lt_cv_ar_at_file=no
-   AC_COMPILE_IFELSE([[int some_variable = 0;]],
+   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
      [echo conftest.$ac_objext > conftest.lst
       am_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst'
       AC_TRY_EVAL([am_ar_try])
@@ -5130,9 +5130,18 @@ _LT_EOF
        # implicitly export all symbols.
         save_LDFLAGS="$LDFLAGS"
         LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo 
${wl}-update_registry ${wl}/dev/null"
-        AC_LINK_IFELSE(int foo(void) {},
+        AC_LINK_IFELSE(
+          [AC_LANG_SOURCE(
+            [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
+                          [C++], [[int foo (void) { return 0; }]],
+                          [Fortran 77], [[
+       subroutine foo
+       end]],
+                          [Fortran], [[
+       subroutine foo
+       end]])])], [
           _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs 
$compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && 
func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry 
${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o 
$lib'
-        )
+        ])
         LDFLAGS="$save_LDFLAGS"
       else
        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs 
$compiler_flags -soname $soname `test -n "$verstring" && func_echo_all 
"-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o 
$lib'



reply via email to

[Prev in Thread] Current Thread [Next in Thread]