autoconf
[Top][All Lists]
Advanced

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

Re: conditionally using libtool


From: Ralf Wildenhues
Subject: Re: conditionally using libtool
Date: Tue, 2 May 2006 04:36:44 +0200
User-agent: Mutt/1.5.11+cvs20060403

* Bob Rossi wrote on Tue, May 02, 2006 at 04:03:27AM CEST:
> > 
> > AC_DEFINE([br_CHOOSE_LIBBUILD],
> > [if $condition; then
> >   AC_PROG_LIBTOOL
> > fi])
> > 
> > and then invoke br_CHOOSE_LIBBUILD later; that will ensure required
> > macros are expanded before that.
> 
> Would you mind quicly explaining how autoconf works? Meaning what are
> the steps taken that generate a configure.sh script?

Hmm.  The general answer to this would be to read
  info Autoconf "Making configure Scripts"

(or maybe even all of the manual?)

> I understand that m4 is used. Is m4 the only tool that is run on the
> configure.in file to generate the configure script?

autoconf invokes autom4te, which may invoke m4.  autoreconf may invoke
libtoolize, autopoint, aclocal, automake, autoconf, and some of those
may invoke autom4te again.

> I'm trying to better
> understand how macro's in an sh condition effect the outcome.

What I posted was the other way round: a shell condition inside a macro.
But both may happen inside legitimate configure.ac scripts.  You just
need to remember that the m4 expansion takes place when you run
"autoconf", and that m4 has no idea whatsoever about shell syntax: it
will treat all non-m4-active stuff as strings.

It helps to play around with macro definitions a bit to get a better
feeling for this.
  info Autoconf "Writing Autoconf Macros"

is useful here.

Cheers,
Ralf




reply via email to

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