|
From: | Brooks Moses |
Subject: | Re: if (...) then; AC_PROG_CC else AC_PROG_CC fi doesn't work? |
Date: | Wed, 24 Oct 2007 12:33:47 -0700 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.666 |
Ralf Wildenhues wrote:
* Eric Blake wrote on Wed, Oct 24, 2007 at 12:13:44AM CEST:You can try using AS_IF instead of raw shell 'if' for wrapping the AC_PROG_CC calls, since the purpose of AS_IF is to output a shell conditional AND correctly handle side effects of macros within that shell conditional.Well, the AC_REQUIRE'd macros of the wrapped macro (AC_PROG_CC) will be placed outside the shell conditional with AS_IF. This may or may not have the effect that is desired. Especially, I don't think it will work with AC_PROG_CC.
I just now confirmed that it indeed doesn't work; the following still gives the same problems as before:
AC_INIT AC_ARG_ENABLE(foo) AS_IF([test "$enable_foo"], [ echo "enabled" AC_PROG_CC([gcc]) ], [ echo "disabled" AC_PROG_CC ]) Thanks, - Brooks
[Prev in Thread] | Current Thread | [Next in Thread] |