| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
4.12 Configuring Other Packages in Subdirectories
In most situations, calling AC_OUTPUT is sufficient to produce
makefiles in subdirectories. However, configure scripts
that control more than one independent package can use
AC_CONFIG_SUBDIRS to run configure scripts for other
packages in subdirectories.
- Macro: AC_CONFIG_SUBDIRS (dir …)
-
Make
AC_OUTPUTrunconfigurein each subdirectory dir in the given blank-or-newline-separated list. Each dir should be a literal, i.e., please do not use:if test "x$package_foo_enabled" = xyes; then my_subdirs="$my_subdirs foo" fi AC_CONFIG_SUBDIRS([$my_subdirs])
because this prevents ‘./configure --help=recursive’ from displaying the options of the package
foo. Instead, you should write:if test "x$package_foo_enabled" = xyes; then AC_CONFIG_SUBDIRS([foo]) fi
If a given dir is not found at
configurerun time, a warning is reported; if the subdirectory is optional, write:if test -d "$srcdir/foo"; then AC_CONFIG_SUBDIRS([foo]) fi
If a given dir contains
configure.gnu, it is run instead ofconfigure. This is for packages that might use a non-Autoconf scriptConfigure, which can’t be called through a wrapperconfiguresince it would be the same file on case-insensitive file systems. Likewise, if a dir contains ‘configure.in’ but noconfigure, the Cygnusconfigurescript found byAC_CONFIG_AUX_DIRis used.The subdirectory
configurescripts are given the same command line options that were given to thisconfigurescript, with minor changes if needed, which include:- - adjusting a relative name for the cache file;
- - adjusting a relative name for the source directory;
- -
propagating the current value of
$prefix, including if it was defaulted, and if the default values of the top level and of the subdirectory ‘configure’ differ.
This macro also sets the output variable
subdirsto the list of directories ‘dir …’. Make rules can use this variable to determine which subdirectories to recurse into.This macro may be called multiple times.
| [ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on April 26, 2012 using texi2html 5.0.
