]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/general.m4 (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE):
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 4 Oct 2006 19:10:49 +0000 (19:10 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 4 Oct 2006 19:10:49 +0000 (19:10 +0000)
Use a single call to AC_DO_TOKENS rather than multiple, for
efficiency.
(_AC_LINK_IFELSE): Test that resulting file is executable.
Problem reported by mwoehlke in
<http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00048.html>.

ChangeLog
lib/autoconf/general.m4

index c5a25819a33ddf5a36e83a5cc6ac3eb4cf6d0434..83febf4a9cf3c69eaa76cf5e7de2ece76ba27c09 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2006-10-04  Paul Eggert  <eggert@cs.ucla.edu>
 
+       * lib/autoconf/general.m4 (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE):
+       Use a single call to AC_DO_TOKENS rather than multiple, for
+       efficiency.
+       (_AC_LINK_IFELSE): Test that resulting file is executable.
+       Problem reported by mwoehlke in
+       <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00048.html>.
+
        * lib/m4sugar/m4sh.m4 (_AS_TEST_PREPARE): Use "test -x /" rather
        than creating a file to use with test -x; this is much faster.
 
index 7dda9ba8cfd82e9018f76ef642bc3c5124ee1621..7a5bc3aff6b64c9de44d53affe4df26d2745ade5 100644 (file)
@@ -2358,8 +2358,10 @@ m4_define([_AC_COMPILE_IFELSE],
 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
 rm -f conftest.$ac_objext
 AS_IF([_AC_DO_STDERR($ac_compile) &&
-        _AC_DO_TOKENS([test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || test ! -s conftest.err]) &&
-        _AC_DO_TOKENS([test -s conftest.$ac_objext])],
+        _AC_DO_TOKENS([{
+             test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
+             test ! -s conftest.err
+           } && test -s conftest.$ac_objext])],
       [$2],
       [_AC_MSG_LOG_CONFTEST
        $3])
@@ -2398,8 +2400,12 @@ m4_define([_AC_LINK_IFELSE],
 [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl
 rm -f conftest.$ac_objext conftest$ac_exeext
 AS_IF([_AC_DO_STDERR($ac_link) &&
-        _AC_DO_TOKENS([test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || test ! -s conftest.err]) &&
-        _AC_DO_TOKENS([test -s conftest$ac_exeext])],
+       _AC_DO_TOKENS([{
+          test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" ||
+          test ! -s conftest.err
+        } &&
+        test -s conftest$ac_exeext &&
+        AS_EXECUTABLE_P([conftest$ac_exeext])])],
       [$2],
       [_AC_MSG_LOG_CONFTEST
        $3])