From: Paul Eggert Date: Wed, 4 Oct 2006 19:10:49 +0000 (+0000) Subject: * lib/autoconf/general.m4 (_AC_COMPILE_IFELSE, _AC_LINK_IFELSE): X-Git-Tag: AUTOCONF-2.60b~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25d20b0c959e8bb6c1b8b0ca0b4642002e61236c;p=thirdparty%2Fautoconf.git * 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 . --- diff --git a/ChangeLog b/ChangeLog index c5a25819..83febf4a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2006-10-04 Paul Eggert + * 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 + . + * lib/m4sugar/m4sh.m4 (_AS_TEST_PREPARE): Use "test -x /" rather than creating a file to use with test -x; this is much faster. diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 7dda9ba8..7a5bc3af 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -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])