[Top][All Lists]

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

Re: AC_SEARCH_LIBS does not clean up

From: Noah Misch
Subject: Re: AC_SEARCH_LIBS does not clean up
Date: Wed, 31 Aug 2005 11:51:41 -0700
User-agent: Mutt/1.5.6i

On Wed, Aug 31, 2005 at 05:40:59PM +0200, Stepan Kasal wrote:
> Hello,
>   I noticed that the "break" called in a parameter to
> AC_LINK_IFELSE skips the command
>       rm conftest conftest.$ac_objext ...
> This means that the files are left uncleaned.
> The patch attached to this mail exposes the problem.
> There are two ways to fix the problem:
> 1) Add a "rm" to AC_SEARCH_LIBS

This is unpleasant.

> 2) Fix the macro AC_LINK_IFELSE so that it cleans up before it executes
>    the commands given as parameters.

For new interfaces, this looks wise.

Libtool, specifically _LT_AC_SYS_LIBPATH_AIX aka _LT_SYS_MODULE_PATH_AIX,
interrogates the object file in the IF-SUCCESS command.  The documentation does
not suggest that this should work; if only recent Libtool development made the
assumption, we could just fix Libtool.  The usage was added on 2001-07-23, so it
is present in many or all of 1.5.X.  Autoconf 2.60 ought to work with all
Libtool releases that work with 2.59, making this option unacceptable.

I suggest this solution:

3) Do not branch from the IF-SUCCESS or IF-FAILURE.  Use an idiom like this:

for ...; do
  AC_LINK_IFELSE([], [... && break_me=break])

   or this:

for ...; do
  AC_LINK_IFELSE([], [... && var_we_set_anyway=yes])
  test $var_we_set_anyway = no || break

*snip Autoconf test suite patch*

reply via email to

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