autoconf
[Top][All Lists]
Advanced

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

Re: AC_PROG_CC not working


From: Akim Demaille
Subject: Re: AC_PROG_CC not working
Date: 10 Oct 2000 12:55:40 +0200
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands)

The problem is that:

/tmp % ace --trace AC_PROG_CC
autoconf: warning: --macrodir is obsolete, use --autoconf-dir
configure.in:2:AC_PROG_CC:foo bar supercompiler
configure.in:2:AC_PROG_CC:

someone is requiring AC_PROG_CC *inside* the AC_PROG_CC itself.  But
since AC_PROG_CC (the first one) is in elaboration, AC_REQUIRE or
something emits it anyway, and requirements are expanded *before*.
Therefore, AC_PROG_CC is expected twice.  And it is always, this is
independent from the presence of a list of compilers.

AC_DEFUN([AC_PROG_CC],
[AC_BEFORE([$0], [AC_PROG_CPP])dnl
# Coucou
...

/tmp % cat configure.in
AC_INIT
AC_PROG_CC
/tmp % ace
/tmp % grep Coucou configure
# Coucou
# Coucou

The chain is:

          AC_DEFUN([AC_PROG_CC],
          [AC_BEFORE([$0], [AC_PROG_CPP])dnl
          AC_LANG_PUSH(C)

           ....

          AC_EXPAND_ONCE([_AC_EXEEXT])
          AC_LANG_POP   
          ])# AC_PROG_CC

and

          define([_AC_EXEEXT],
          [_AC_CYGWIN
          ...

and

          define([_AC_CYGWIN],
          [AC_CACHE_CHECK(for Cygwin environment, ac_cv_cygwin,
          [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
          
and

          AC_DEFUN([AC_COMPILE_IFELSE],
          [AC_LANG_COMPILER_REQUIRE()dnl


So we face, again, the problem that AC_PROG_CC depends upon
AC_COMPILE_IFELSE which depends upon AC_PROG_CC.  Likewise for all the
languages, of course (we have to write a test for this one).


So I am back to something I raised some time ago: why the heck do we
have to compile to recognize Mingw etc.?  Can't we just uname?  While
anti-Autoconf (and btw, frankly, compiling __MINGW32__ makes no big
difference to me), it seems better in that, for instance, it makes it
possible to enable the support of these kind of machines without
requiring a C compiler.



reply via email to

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