bug-autoconf
[Top][All Lists]
Advanced

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

OBJEXT not set if AC_PROG_CC is in a conditional


From: Bradley Baetz
Subject: OBJEXT not set if AC_PROG_CC is in a conditional
Date: Mon, 15 Oct 2001 10:52:30 -0400 (EDT)

Using autoconf-2.52d, the following configure.in file doesn't work:

AC_INIT

if test -z "$USE_SECOND"; then
  AC_PROG_CC
else
  AC_PROG_CC
fi

./configure works, but USE_SECOND=1 ./configure will fail, because OBJEXT
and EXEEXT are never tested, and so testing that a file exists does:

configure:2016: test -s conftest.

which obviously doesn't work.

This works with autoconf 2.13. For an example of when this is wanted, see
http://lxr.mozilla.org/seamonkey/source/configure.in#143 - mozilla needs
to build some programs with the host compiler as part of its build
process.

Note that I can't use AC_CHECK_TOOLS, since that macro isn't defined in
automake 2.13.

Bradley




reply via email to

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