]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC): Call
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 2 Apr 2006 16:38:54 +0000 (16:38 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 2 Apr 2006 16:38:54 +0000 (16:38 +0000)
  _AC_COMPILER_EXEEXT instead of m4_expand_once([_AC_COMPILER_EXEEXT])
* lib/autoconf/fortran.m4 (_AC_PROG_FC): Likewise.
* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_TESTS): On subsequent
  calls, for a new language, only check that the compiler works.
(AC_NO_EXECUTABLES): Change the redefinition of
  _AC_COMPILER_EXEEXT_TESTS so that on subsequent calls, it checks
  that the new language's compiler works if ac_no_link=no, and
  does nothing otherwise.

ChangeLog
lib/autoconf/c.m4
lib/autoconf/fortran.m4
lib/autoconf/lang.m4

index 0b6a315693aa8c93c5d489b7375b1b1c9632f176..73f3632e150747f891af41fca98320df3351665a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2006-04-02  Stepan Kasal  <kasal@ucw.cz>
+
+       * lib/autoconf/c.m4 (AC_PROG_CC, AC_PROG_CXX, AC_PROG_OBJC): Call
+         _AC_COMPILER_EXEEXT instead of m4_expand_once([_AC_COMPILER_EXEEXT])
+       * lib/autoconf/fortran.m4 (_AC_PROG_FC): Likewise.
+       * lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_TESTS): On subsequent
+         calls, for a new language, only check that the compiler works.
+       (AC_NO_EXECUTABLES): Change the redefinition of
+         _AC_COMPILER_EXEEXT_TESTS so that on subsequent calls, it checks
+         that the new language's compiler works if ac_no_link=no, and
+         does nothing otherwise.
+
 2006-04-02  Pavel Roskin  <proski@gnu.org>
 
        * doc/autoconf.texi (AC_PATH_X): Update per 2005-08-26 change.
index 82844c3c3055fcaa6230ca1e906ef8d25675278b..75f4f533a9bb782b9b9f4d74161d0ba0fab6b222 100644 (file)
@@ -547,7 +547,7 @@ _AC_EVAL([$ac_compiler --version >&AS_MESSAGE_LOG_FD])
 _AC_EVAL([$ac_compiler -v >&AS_MESSAGE_LOG_FD])
 _AC_EVAL([$ac_compiler -V >&AS_MESSAGE_LOG_FD])
 
-m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
+_AC_COMPILER_EXEEXT
 _AC_LANG_COMPILER_GNU
 GCC=`test $ac_compiler_gnu = yes && echo yes`
 _AC_PROG_CC_G
@@ -782,7 +782,7 @@ _AC_EVAL([$ac_compiler --version >&AS_MESSAGE_LOG_FD])
 _AC_EVAL([$ac_compiler -v >&AS_MESSAGE_LOG_FD])
 _AC_EVAL([$ac_compiler -V >&AS_MESSAGE_LOG_FD])
 
-m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
+_AC_COMPILER_EXEEXT
 _AC_LANG_COMPILER_GNU
 GXX=`test $ac_compiler_gnu = yes && echo yes`
 _AC_PROG_CXX_G
@@ -951,7 +951,7 @@ _AC_EVAL([$ac_compiler --version >&AS_MESSAGE_LOG_FD])
 _AC_EVAL([$ac_compiler -v >&AS_MESSAGE_LOG_FD])
 _AC_EVAL([$ac_compiler -V >&AS_MESSAGE_LOG_FD])
 
-m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
+_AC_COMPILER_EXEEXT
 _AC_LANG_COMPILER_GNU
 GOBJC=`test $ac_compiler_gnu = yes && echo yes`
 _AC_PROG_OBJC_G
index 37e447bb33498180c7b2b236c2a6649935432440..e809176942e014be9d81ce154f8082ce73529365 100644 (file)
@@ -369,7 +369,7 @@ _AC_EVAL([$ac_compiler -v >&AS_MESSAGE_LOG_FD])
 _AC_EVAL([$ac_compiler -V >&AS_MESSAGE_LOG_FD])
 rm -f a.out
 
-m4_expand_once([_AC_COMPILER_EXEEXT])[]dnl
+_AC_COMPILER_EXEEXT
 # If we don't use `.F' as extension, the preprocessor is not run on the
 # input file.  (Note that this only needs to work for GNU compilers.)
 ac_save_ext=$ac_ext
index dd76a11cde079cad52b4ae253cc2c0afb360d667..7739aa4552cb43b9563579c0b5128ad5f4860ae4 100644 (file)
@@ -379,22 +379,25 @@ AC_BEFORE([$0], [_AC_COMPILER_EXEEXT])
 AC_BEFORE([$0], [AC_LINK_IFELSE])
 
 m4_define([_AC_COMPILER_EXEEXT_TESTS],
-[if AC_TRY_EVAL(ac_link); then
-  ac_no_link=no
+[m4_expand_once([
+   if AC_TRY_EVAL(ac_link); then
+     ac_no_link=no
+   else
+     ac_no_link=yes
+     # Setting cross_compile will disable run tests; it will
+     # also disable AC_CHECK_FILE but that's generally
+     # correct if we can't link.
+     cross_compiling=yes
+     EXEEXT=
+     _AC_COMPILER_EXEEXT_CROSS
+   fi])
+if test $ac_no_link = no; then
   ]m4_defn([_AC_COMPILER_EXEEXT_TESTS])[
-else
-  ac_no_link=yes
-  # Setting cross_compile will disable run tests; it will
-  # also disable AC_CHECK_FILE but that's generally
-  # correct if we can't link.
-  cross_compiling=yes
-  EXEEXT=
-  _AC_COMPILER_EXEEXT_CROSS
 fi
 ])
 
 m4_define([AC_LINK_IFELSE],
-[if test x$ac_no_link = xyes; then
+[if test $ac_no_link = yes; then
   AC_MSG_ERROR([Link tests are not allowed after AC@&t@_NO_EXECUTABLES.])
 fi
 ]m4_defn([AC_LINK_IFELSE]))
@@ -566,8 +569,9 @@ ac_exeext=$EXEEXT
 # This macro is modified by the AC_NO_EXECUTABLES hack.
 m4_define([_AC_COMPILER_EXEEXT_TESTS],
 [_AC_COMPILER_EXEEXT_DEFAULT
-_AC_COMPILER_EXEEXT_CROSS
-_AC_COMPILER_EXEEXT_O])
+ m4_expand_once([_AC_COMPILER_EXEEXT_CROSS
+   _AC_COMPILER_EXEEXT_O])
+])
 
 
 # _AC_COMPILER_EXEEXT
@@ -607,7 +611,7 @@ _AC_COMPILER_EXEEXT_TESTS
 
 ac_clean_files=$ac_clean_files_save
 
-_AC_COMPILER_OBJEXT
+m4_expand_once([_AC_COMPILER_OBJEXT])
 
 rm -f conftest.*
 ])# _AC_COMPILER_EXEEXT