bug-libtool
[Top][All Lists]
Advanced

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

Re: LIBTOOL_DEPS wrong when AC_CANONICAL_BUILD not called before initial


From: Jakub Bogusz
Subject: Re: LIBTOOL_DEPS wrong when AC_CANONICAL_BUILD not called before initializing libtool
Date: Sat, 15 Mar 2008 14:56:28 +0100
User-agent: Mutt/1.5.17 (2007-11-01)

On Sat, Mar 15, 2008 at 02:38:27PM +0100, Ralf Wildenhues wrote:
> Hello Jakub,
> 
> * Jakub Bogusz wrote on Fri, Mar 14, 2008 at 08:18:55PM CET:
> > On Fri, Mar 14, 2008 at 07:53:13PM +0100, Jakub Bogusz wrote:
> > > Reduced test:
> > > 
> > > #v+
> > > AC_INIT([libtool-test], [0])
> > > 
> > > if test "$with_canonical" != ""; then
> > >         AC_CANONICAL_HOST
> > > fi
> > > 
> > > AC_LIBTOOL_WIN32_DLL
> > > AC_PROG_LIBTOOL
> > > 
> > > echo "NM: $NM"
> > > echo "OBJDUMP: $OBJDUMP"
> > > #v-
> 
> Thanks, but the above is a problem that cannot be solved with current
> Autoconf.  The issue is that an AC_REQUIRE'ment is met by any previously
> expanded macro, autoconf cannot see the fact that AC_CANONICAL_HOST was
> expanded inside a shell conditional.
> 
> The way to avoid this is to simply not put AC_CANONICAL_HOST inside a
> shell conditional in the first place.  If the original problematic code
> you had used some other macro there instead, which itself AC_REQUIRE'd
> AC_CANONICAL_HOST, then the way to solve that setup is to use
> 
>   AS_IF([test $some_conditional],
>         [MACRO_THAT_REQUIRES_AC_CANONICAL_HOST])
> 
> because in that case (with Autoconf 2.61+), AC_CANONICAL_HOST will be
> expanded outside (before) the if statement.  For more information, you
> can e.g. read this thread
> <http://thread.gmane.org/gmane.comp.sysutils.autoconf.general/10187/focus=10188>
> and the one referenced in that message, and the doc pointers given
> there.

Aaah, I put this shell conditional just to easily demonstrate the
difference and hit another (already known) issue instead of the one
I originally reported.

So here is simpler example:

#v+
AC_INIT([libtool-test], [0])

AC_LIBTOOL_WIN32_DLL
AC_PROG_LIBTOOL

echo "NM: $NM"
echo "OBJDUMP: $OBJDUMP"
echo "LIBTOOL_DEPS: $LIBTOOL_DEPS"
#v-

With libtool 2.2 ./configure --host=i386-mingw32 --build=athlon-pld-linux
output still ends with:

NM: /usr/bin/i386-mingw32-nm -B
OBJDUMP: objdump
LIBTOOL_DEPS: /ltmain.sh


-- 
Jakub Bogusz    http://qboosh.pl/




reply via email to

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