-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Paolo Bonzini on 10/20/2008 7:35 AM: > 2008-10-12 Paolo Bonzini <[EMAIL PROTECTED]> > > * lib/autoconf/general.m4 (_AC_COMPILE_IFELSE): Use a shell function.
Committed with this squashed on: - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkj/C9UACgkQ84KuGfSFAYCZGwCgo2oxnPHQK90ydI/mSVO3oLGK R+YAoMTycOZZPKEwEstfzTr1KeOgM2gR =TkFo -----END PGP SIGNATURE-----
>From 8c353dff488d575694be8c932ce2183995a7d2c1 Mon Sep 17 00:00:00 2001 From: Eric Blake <[EMAIL PROTECTED]> Date: Tue, 21 Oct 2008 17:21:47 -0600 Subject: [PATCH] tmp --- ChangeLog | 7 +++++++ lib/autoconf/general.m4 | 38 ++++++++++++++++++++++---------------- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0eae97f..25ba3c0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-10-21 Paolo Bonzini <[EMAIL PROTECTED]> + and Eric Blake <[EMAIL PROTECTED]> + + Use a shell function for _AC_COMPILE_IFELSE. + * lib/autoconf/general.m4 (_AC_COMPILE_IFELSE_BODY): New macro. + (_AC_COMPILE_IFELSE): Use a shell function. + 2008-10-21 Eric Blake <[EMAIL PROTECTED]> Use AS_VAR_APPEND. diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 50914f0..22111a1 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -2392,7 +2392,7 @@ m4_define([_AC_PREPROC_IFELSE_BODY], rm -f conftest.err AS_LINENO_POP return $ac_retval -]) +])# _AC_PREPROC_IFELSE_BODY # _AC_PREPROC_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) @@ -2405,7 +2405,7 @@ AC_DEFUN([_AC_PREPROC_IFELSE], [AC_REQUIRE_SHELL_FN([ac_func_]_AC_LANG_ABBREV[_try_cpp], [AS_FUNCTION_DESCRIBE([ac_func_]_AC_LANG_ABBREV[_try_cpp], [LINENO], [Try to preprocess conftest.$ac_ext, and return whether this succeeded.])], - [$0_BODY])]dnl + [$0_BODY])]dnl [m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl [AS_IF([ac_func_[]_AC_LANG_ABBREV[]_try_cpp "$LINENO"], [$2], [$3]) m4_ifvaln([$1], [rm -f conftest.$ac_ext])dnl @@ -2466,16 +2466,11 @@ AC_DEFUN([AC_EGREP_HEADER], ## Examining syntax. ## ## ------------------ ## - -# _AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) -# ---------------------------------------------------------------- -# Try to compile PROGRAM. -# This macro can be used during the selection of a compiler. -AC_DEFUN([_AC_COMPILE_IFELSE], -[AC_REQUIRE_SHELL_FN([ac_func_]_AC_LANG_ABBREV[_try_compile], - [AS_FUNCTION_DESCRIBE([ac_func_]_AC_LANG_ABBREV[_try_compile], [LINENO], - [Try to compile conftest.$ac_ext, and return whether this succeeded.])], [ - AS_LINENO_PUSH([$[]1]) +# _AC_COMPILE_IFELSE_BODY +# ----------------------- +# Shell function body for _AC_COMPILE_IFELSE. +m4_define([_AC_COMPILE_IFELSE_BODY], +[ AS_LINENO_PUSH([$[]1]) rm -f conftest.$ac_objext AS_IF([_AC_DO_STDERR($ac_compile) && { test -z "$ac_[]_AC_LANG_ABBREV[]_werror_flag" || @@ -2487,10 +2482,21 @@ AC_DEFUN([_AC_COMPILE_IFELSE], rm -f core conftest.err conftest.$ac_objext AS_LINENO_POP return $ac_retval -])dnl -m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])dnl -AS_IF([ac_func_[]_AC_LANG_ABBREV[]_try_compile "$LINENO"], [$2], [$3]) -m4_ifvaln([$1], [rm -f conftest.$ac_ext]) +])# _AC_COMPILE_IFELSE_BODY + + +# _AC_COMPILE_IFELSE(PROGRAM, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) +# ---------------------------------------------------------------- +# Try to compile PROGRAM. +# This macro can be used during the selection of a compiler. +AC_DEFUN([_AC_COMPILE_IFELSE], +[AC_REQUIRE_SHELL_FN([ac_func_]_AC_LANG_ABBREV[_try_compile], + [AS_FUNCTION_DESCRIBE([ac_func_]_AC_LANG_ABBREV[_try_compile], [LINENO], + [Try to compile conftest.$ac_ext, and return whether this succeeded.])], + [$0_BODY])]dnl +[m4_ifvaln([$1], [AC_LANG_CONFTEST([$1])])]dnl +[AS_IF([ac_func_[]_AC_LANG_ABBREV[]_try_compile "$LINENO"], [$2], [$3]) +m4_ifvaln([$1], [rm -f conftest.$ac_ext])dnl ])# _AC_COMPILE_IFELSE -- 1.6.0.2