autoconf
[Top][All Lists]
Advanced

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

Re: weird AC_REQUIRE expansion issue


From: Stepan Kasal
Subject: Re: weird AC_REQUIRE expansion issue
Date: Mon, 29 Aug 2005 13:22:18 +0200
User-agent: Mutt/1.4.1i

Hello,

On Mon, Aug 29, 2005 at 12:20:02PM +0200, Ralf Wildenhues wrote:
> A project uses subdir-objects, calls AC_PROG_CC before calling
> AM_PROG_CC_C_O, yet the code of AC_PROG_CC_C_O (which is AC_REQUIREd by
> the Automake macro) gets expanded before the AC_PROG_CC macro.  Thus,
> $CC is empty and the test fails.

If you call

AC_FOO(...,
  [something
   AM_WHATEVER
   ...
  ])

where AM_WHATEVER requires AC_PROG_CC_C_O, then AC_PROG_CC_C_O will be
expanded before the beginning of AC_FOO.
AC_REQUIRED macros are expanded before the outermost AC_DEFUNed macro.

This means that the following won't work:

AC_FOO(...,
  [something
   AC_PROG_CC
   AM_WHATEVER
   ...
  ])

You have to do

AC_PROG_CC
AC_FOO(...,
  [something
   AM_WHATEVER
   ...
  ])

Does it help?

Of course, this is just a guess.  Post your configure.ac, if the guess
is not right.

Have a nice day,
        Stepan Kasal




reply via email to

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