autoconf
[Top][All Lists]
Advanced

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

Re: passing configure options via AC_CONFIG_SUBDIRS


From: Ralf Corsepius
Subject: Re: passing configure options via AC_CONFIG_SUBDIRS
Date: 15 Aug 2001 17:26:56 +0200

Am 15 Aug 2001 09:44:00 -0500 schrieb Paul Martinolich:
> Sorry, I was unclean.  I'll give it another shot.  I have this structure
> 
>   ../src
>   ../pkgA
>   ../pkgB
> 
> src contains my application.  Platform A does not provide the third party
> pkgA which I need in the application, whereas Platform B does.  Ditto for
> pkgB.  Some platforms provide it and others do not.
> 
> When src/configure is run on Platform A it will identify that pkgA is 
> unavailable, but recognizes that the source (../pkgA) exists and therefore 
> will
> schedule the configuration and compilation of pkgA using 
> AC_CONFIG_SUBDIRS(pkgA).
> Therefore in src directory, I run ./configure, followed by make --- all
> works well.  On Platform A, pkgA is configured and compiled automatically.
> 
> Now, for Platform B, I need to add switches to the configure script when
> pkgA is configured, say "--disable-shared --enable-static" or some 
> "--disable-xxx"
> feature.  I don't want to run ./src/configure --disable-xxx as that is passed
> down to each AC_CONFIG_SUBDIRS, which may be appropriate for pkgA but not
> for pkgB.  I would like the src/configure script to append these extra 
> switches
> to pkgA, but none or different ones to pkgB.
> 
> I looked through the info pages, but did not see any way to selectively
> pass switches.  I was hoping someone had tried this before and could give
> me some pointers on how to accomplish this.
I've done this before and I am afraid having to tell you that there is
hardly a way to do so with autoconf's current standard means.

One more or less clean work-around is to implement the handling of
subpackage's configuration options in such a way that they can coexist
(Modify the subpackage's configure.ins). If such subpackages are out of
your personal control, this will hardly be possible.

Another way is not to use AC_CONFIG_SUBDIRs inside of the toplevel
configure.in, but to implement your own way of handling SUBDIRS.
However, implementing such thing is not an easy task.

And yes, I agree with you, the feature you are asking for is lacking in
autoconf.

Ralf






reply via email to

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