From 560f323048c5e4e9853ac1281ecee624a57fe1d1 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 2 Sep 2005 11:01:07 +0000 Subject: [PATCH] Update to ensure that the macros AC_REQUIRE'd by AC_CHECK_HEADER are always invoked properly. This commit was SVN r7147. --- ompi/mca/io/romio/romio/configure.in | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ompi/mca/io/romio/romio/configure.in b/ompi/mca/io/romio/romio/configure.in index 771154e550..cc04265073 100644 --- a/ompi/mca/io/romio/romio/configure.in +++ b/ompi/mca/io/romio/romio/configure.in @@ -643,6 +643,24 @@ CFLAGS_save="$CFLAGS" AC_PROG_CC CFLAGS="$CFLAGS_save" +# Open MPI: this is a useless CHECK_HEADER (i.e., everyone will have +# stdio.h), but we need to do it here because AC_CHECK_HEADER has +# several other macros AC_REQUIRE'd. The problem is best illustrated +# via example -- the code in the rest of configure is analogous to the +# following: +# +# AC_PROG_CC +# if test ...something...; then +# AC_CHECK_HEADER(...) +# fi +# AC_CHECK_HEADER +# +# The second AC_CHECK_HEADER may fail if the conditional block is not +# taken, because from AC/AM's perspective, the AC_REQUIRE'd macros +# have already been invoked (i.e., they don't know anything about the +# shell conditional). +AC_CHECK_HEADER([stdio.h], [:], [:]) + # Open MPI: this stuff is not necessary with modern versions of the # GNU auto tools. #AR="${AR:-ar} cr$AR_LOCAL"