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
_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf