On Sat, 2008-05-24 at 09:41 +0200, Ralf Wildenhues wrote: > Hello Richard, > > * Richard Ash wrote on Fri, May 23, 2008 at 11:31:39PM CEST: > > I seem to have hit a fundamental problem with the way AC_CONFIG_SUBDIRS > > that seems to make it most of the way to useless if you want to also use > > pkg-config. Basically, it runs the configure scripts in sub-directories > > after my main configure script has finished, which is useless because I > > want information from those subsidiary configure script to decide how to > > build my application. > > Why don't you organize your package in such a way that the top level > configure is just a stub one calling those for lib1, lib2, ..., libN, > and only then the one for your main package? Plausible, but means that required libraries are treated completely differently to optional ones. It also doesn't scale to my next problem, which is libraries where we use the local copy if there isn't a system one available. In the end I dug the relevant code out of autoconf/status.m4 that runs the subsidiary configure script and made it into a function that configures just one directory, but does it when the function is called not at some later point. I'll probably send this off the autoconf macro archive in case other people find it useful. The only issue I'm aware of is that it calls _AC_SRCDIRS, which I presume is meant to be an autoconf internal function and not used externally (obviously not a problem in the original usage). There may also be a problem with cleaning up after _AC_SRCDIRS, although it hasn't caused me any problems. Richard
Attachment:
ax_config_dir.m4
Description: application/m4
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf