Hi all,
- Second is to rewrite your condition using AS_IF, which automatically
"hoists" the dependency AC_PROG_CPP (and any other dependencies)
outside of the if condition.
I just wanted to thank you for this explanation. I was not affected by
the original issue, but your answer was very useful. Until now, I
thought AS_IF() was just a stupid wrapper around the shell's if clause,
but your answer makes it clear that it is a lot smarter than that.
So did I!
Incidentally, I am aware of AS_IF and AS_CASE constructions, as
described in
<https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Common-Shell-Constructs.html>.
Is it planned to add other macros like AS_FOR, AS_WHILE...?
One may consider doing something like:
for header in $LIST ; do AC_CHECK_HEADER([$header]) ; done
If I understand well, in case $LIST happens to be empty, AC_PROG_CPP
will never be run, and subsequent calls to AC_CHECK_HEADER in the
configure script will fail.
--
Julien ÉLIE
« Je sens que ma dernière hure est proche ! » (Astérix)
_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf