autoconf: Subdirectories

1 
1 4.12 Configuring Other Packages in Subdirectories
1 =================================================
1 
1 In most situations, calling `AC_OUTPUT' is sufficient to produce
1 makefiles in subdirectories.  However, `configure' scripts that control
1 more than one independent package can use `AC_CONFIG_SUBDIRS' to run
1 `configure' scripts for other packages in subdirectories.
1 
1  -- Macro: AC_CONFIG_SUBDIRS (DIR ...)
1      Make `AC_OUTPUT' run `configure' in each subdirectory DIR in the
1      given blank-or-newline-separated list.  Each DIR should be a
1      literal, i.e., please do not use:
1 
1           if test "x$package_foo_enabled" = xyes; then
1             my_subdirs="$my_subdirs foo"
1           fi
1           AC_CONFIG_SUBDIRS([$my_subdirs])
1 
1      because this prevents `./configure --help=recursive' from
1      displaying the options of the package `foo'.  Instead, you should
1      write:
1 
1           if test "x$package_foo_enabled" = xyes; then
1             AC_CONFIG_SUBDIRS([foo])
1           fi
1 
1      If a given DIR is not found at `configure' run time, a warning is
1      reported; if the subdirectory is optional, write:
1 
1           if test -d "$srcdir/foo"; then
1             AC_CONFIG_SUBDIRS([foo])
1           fi
1 
1      If a given DIR contains `configure.gnu', it is run instead of
1      `configure'.  This is for packages that might use a non-Autoconf
1      script `Configure', which can't be called through a wrapper
1      `configure' since it would be the same file on case-insensitive
1      file systems.  Likewise, if a DIR contains `configure.in' but no
1      `configure', the Cygnus `configure' script found by
1      `AC_CONFIG_AUX_DIR' is used.
1 
1      The subdirectory `configure' scripts are given the same command
1      line options that were given to this `configure' script, with minor
1      changes if needed, which include:
1 
1         - adjusting a relative name for the cache file;
1 
1         - adjusting a relative name for the source directory;
1 
1         - propagating the current value of `$prefix', including if it
1           was defaulted, and if the default values of the top level and
1           of the subdirectory `configure' differ.
1 
1      This macro also sets the output variable `subdirs' to the list of
1      directories `DIR ...'.  Make rules can use this variable to
1      determine which subdirectories to recurse into.
1 
1      This macro may be called multiple times.
1