[Top][All Lists]

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

AC_CACHE_VAL bug (was: Re: How to debug autoconf issues?)

From: Stepan Kasal
Subject: AC_CACHE_VAL bug (was: Re: How to debug autoconf issues?)
Date: Thu, 12 Jan 2006 11:11:44 +0100
User-agent: Mutt/1.4.1i

Hello Matt,
  it seems you have found a bug in Autoconf, so I'm sending this reply to

In the attached config.log, I see:
configure:1783: checking for suffix of object files
configure:1805: i686-pc-linux-gnu-gcc -c  -DLINUX -D_XOPEN_SOURCE=500  
conftest.c >&5
configure:1808: $? = 0
configure:1830: result:
configure:1834: checking whether we are using the GNU C compiler
configure:1859: i686-pc-linux-gnu-gcc -c  -DLINUX -D_XOPEN_SOURCE=500  
conftest.c >&5
configure:1862: $? = 0
configure:1865: test -s conftest.
configure:1868: $? = 1

This means that the compile command doesn't create conftest.o nor other of
the expected object files.  Thus the variable ac_cv_objext remains unset
and configure thinks that the compiler uses '' (empty string) as the object
extension.  That's why it looks for "conftest." later.

Sure, this bug can be fixed in _AC_COMPILER_OBJEXT.

But perhaps there is a better way to fix it:
I think that if the parameter COMMANDS-TO-SET-IT of macro AC_CACHE_CHECK or
AC_CACHE_VAL does not set the cache variable, that is a bug.
The manual doesn't explicitely require that the macro sets the variable,
but the _name_ of the parameter should indicate it.

I think that configure should issue a warning if the code doesn't set
the cache variable.  We'll find out how many complaints will the warning
generate. ;-)

(Yes, I'm aware of one place where this (mis)feature is (ab)used: the macros
in programs.m4 don't cache negative results and leave the variable unset if
the program is not found.  But this should be cleared anyway.)

Have a nice day,
        Stepan Kasal

reply via email to

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