From: Akim Demaille Date: Wed, 31 Jan 2001 15:00:35 +0000 (+0000) Subject: Englisho. X-Git-Tag: autoconf-2.50~168 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=110ac382f0b9a5f69100bb33f459a51fa1478766;p=thirdparty%2Fautoconf.git Englisho. --- diff --git a/ChangeLog b/ChangeLog index 089ce97c7..0b108585b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -18,7 +18,7 @@ `quote' section, `p'rint the result. If neither `#define' pattern match, just call `d' to start a new cycle. - Call this sed program with -n. + Invoke this sed program with -n. 2001-01-30 Akim Demaille diff --git a/acgeneral.m4 b/acgeneral.m4 index bf209b075..938564b4d 100644 --- a/acgeneral.m4 +++ b/acgeneral.m4 @@ -2225,7 +2225,6 @@ AC_DEFUN([_AC_EVAL], # Eval COMMAND, save its stderr into conftest.err, save the exit status # in ac_status, and log it. # Note that when tracing, most shells will leave the traces in stderr - AC_DEFUN([_AC_EVAL_STDERR], [{ (eval echo "$as_me:__oline__: \"$1\"") >&AS_MESSAGE_LOG_FD (eval $1) 2>conftest.er1 @@ -2242,13 +2241,13 @@ AC_DEFUN([_AC_EVAL_STDERR], # The purpose of this macro is to "configure:123: command line" # written into config.log for every test run. AC_DEFUN([AC_TRY_EVAL], -[_AC_EVAL([$]$1)]) +[_AC_EVAL([$$1])]) # AC_TRY_COMMAND(COMMAND) # ----------------------- AC_DEFUN([AC_TRY_COMMAND], -[_AC_EVAL([$1])]) +[{ ac_try='$1'; _AC_EVAL([$ac_try]); }]) ## ------------------ ## diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index bf209b075..938564b4d 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -2225,7 +2225,6 @@ AC_DEFUN([_AC_EVAL], # Eval COMMAND, save its stderr into conftest.err, save the exit status # in ac_status, and log it. # Note that when tracing, most shells will leave the traces in stderr - AC_DEFUN([_AC_EVAL_STDERR], [{ (eval echo "$as_me:__oline__: \"$1\"") >&AS_MESSAGE_LOG_FD (eval $1) 2>conftest.er1 @@ -2242,13 +2241,13 @@ AC_DEFUN([_AC_EVAL_STDERR], # The purpose of this macro is to "configure:123: command line" # written into config.log for every test run. AC_DEFUN([AC_TRY_EVAL], -[_AC_EVAL([$]$1)]) +[_AC_EVAL([$$1])]) # AC_TRY_COMMAND(COMMAND) # ----------------------- AC_DEFUN([AC_TRY_COMMAND], -[_AC_EVAL([$1])]) +[{ ac_try='$1'; _AC_EVAL([$ac_try]); }]) ## ------------------ ## diff --git a/tests/base.at b/tests/base.at index e339c4fd2..57317b991 100644 --- a/tests/base.at +++ b/tests/base.at @@ -215,3 +215,33 @@ AT_CHECK_AUTOCONF AT_CHECK_CONFIGURE([-q]) AT_CLEANUP + + +## ---------- ## +## AC_TRY_*. ## +## ---------- ## + +AT_SETUP([AC_TRY_*]) + +AT_DATA([configure.ac], +[[AC_INIT + +if AC_TRY_COMMAND([(echo "The Cat in the Hat" + echo "The Hat in the Cat" >&2) + | grep ^The\ Cat\ in\ The\ Hat\$ >/dev/null]); then + # Cool! +else + AC_MSG_ERROR([Didn't see the Cat in the Hat!]) +fi + +if AC_TRY_COMMAND([(echo "The Cat in the Hat" + echo "The Hat in the Cat" >&2) + | grep ^The\ Hat\ in\ The\ Cat\$ >/dev/null]); then + AC_MSG_ERROR([Saw the Hat in the Cat!]) +fi +]]) + +AT_CHECK_AUTOCONF +AT_CHECK_CONFIGURE([-q]) + +AT_CLEANUP