autoconf
[Top][All Lists]
Advanced

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

Re: PAssing command line arguments for AC_CONFIG_SUBDIR


From: John Burger
Subject: Re: PAssing command line arguments for AC_CONFIG_SUBDIR
Date: Mon, 14 Apr 2003 13:08:49 -0400

Niels Möller writes:

In lsh I have a toplevel configure script, which uses
AC_CONFIG_SUBDIRS to run configure in the subdirectories src/nettle
and src/spki. Both of these subdirectories are libraries, and can be
distributed and built separately.

The spki library depends on nettle. So when building the spki
directory separately, it should use configure tests for nettle and use
the nettle library that is installed on the system. However, when
building both libraries as parts of lsh, I want to use the included
nettle library, and ignore any library which is already installed on
the system.

In this case, a simple thing I've done is to have (my analog of) spki/configure look for ../nettle, and use it if it's there. This is obviously less safe than the alternative you suggest:

One way of doing this is to let spki:s configure script take a command
line argument --with-nettle=<nettle-directory>, and use that to set up
-I and -L-flags etc properly.

But then I need lsh:s configure script to add the option on the
command line when invoking spki's configure script. Can I do that?

You can add args to ac_configure_args - I don't think this is a documented part of the Autoconf interface, but I've done this as well. This will pass the extra args to all of the sub-configures, which isn't usually a problem, but might be.

Or you could just have your main configure script call the subsidiary one directly, with whatever args you want. Unfortunately, doing this right also involves the undocumented ac_configure_args, if you want to pass on everything from the original invocation.

- John Burger
  MITRE





reply via email to

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