Copyright (C) 2000-2012 |
GNU Info (autoconf.info)SubdirectoriesConfiguring Other Packages in Subdirectories ============================================ In most situations, calling `AC_OUTPUT' is sufficient to produce `Makefile's 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_OUTPUT' run `configure' in each subdirectory DIR in the given whitespace-separated list. Each DIR should be a literal, i.e., please do not use: if test "$package_foo_enabled" = yes; 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'. Rather, you should write: if test "$package_foo_enabled" = yes; then AC_CONFIG_SUBDIRS(foo) fi If a given DIR is not found, an error 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 of `configure'. This is for packages that might use a non-autoconf script `Configure', which can't be called through a wrapper `configure' since it would be the same file on case-insensitive filesystems. Likewise, if a DIR contains `configure.ac' but no `configure', the Cygnus `configure' script found by `AC_CONFIG_AUX_DIR' is used. The subdirectory `configure' scripts are given the same command line options that were given to this `configure' script, with minor changes if needed, which include: - adjusting a relative path for the cache file; - adjusting a relative path for the source directory; - propagating the current value of `$prefix', including if it was defaulted, and if default values of the top level and of sub directory `configure' differ. This macro also sets the output variable `subdirs' to the list of directories `DIR ...'. `Makefile' rules can use this variable to determine which subdirectories to recurse into. This macro may be called multiple times. automatically generated by info2www version 1.2.2.9 |