bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL


From: Bruno Haible
Subject: Re: Messed up gl_COMPILER_PREPARE_CHECK_DECL
Date: Sat, 18 Jan 2020 18:58:30 +0100
User-agent: KMail/5.1.3 (Linux/4.4.0-171-generic; KDE/5.18.0; x86_64; ; )

Paul Eggert wrote:
> PS. I vaguely recall a long discussion many years ago when we added this 
> AC_REQUIRE-ish stuff to Autoconf. Although we did fix some major 
> glitches, we replacing them with other glitches that live on to this 
> day. For example, there's now this note in the Autoconf manual:
> 
>       Many Autoconf macros use a compiler, and thus call
>       `AC_REQUIRE([AC_PROG_CC])' to ensure that the compiler has been
>       determined before the body of the outermost `AC_DEFUN' macro.
>       Although `AC_PROG_CC' is safe to directly expand multiple times, it
>       performs certain checks (such as the proper value of `EXEEXT') only
>       on the first invocation.

and likewise for AC_EGREP_CPP, whose definition starts like this:

AC_DEFUN([AC_EGREP_CPP],
[AC_LANG_PREPROC_REQUIRE()dnl
AC_REQUIRE([AC_PROG_EGREP])dnl
...

where AC_LANG_PREPROC_REQUIRE() in this case requires AC_LANG_COMPILER(C).
So, you could also run into trouble if the first AC_EGREP_CPP invocation
in a configure.ac is within

case "$host_os" in
  alpha*)
    AC_EGREP_CPP(...)
    ;;
esac

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]