From d8d59b4454c8cc557696fc199ceb2fd8f71950bd Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Fri, 10 Aug 2001 07:18:28 +0000 Subject: [PATCH] * lib/autoconf/general.m4 (_AC_OUTPUT_SUBDIRS): Propagate the current $prefix to the sub-configures. --- ChangeLog | 5 +++++ NEWS | 2 ++ doc/autoconf.texi | 25 +++++++++++++++++++------ lib/autoconf/general.m4 | 8 ++++++++ 4 files changed, 34 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0403e6fd..458bba95 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-08-10 Ralf Corsepius + + * lib/autoconf/general.m4 (_AC_OUTPUT_SUBDIRS): Propagate the + current $prefix to the sub-configures. + 2001-08-09 Tim Van Holder * lib/autoconf/lang.m4: Ignore *.xSYM when looking for an executable diff --git a/NEWS b/NEWS index 0821e5d2..d41b3b0a 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,8 @@ - --force, -f ** autoheader - --force, -f +** Bug fixes +- The top level $prefix is propagated to the AC_CONFIG_SUBDIRS configures. * Major changes in Autoconf 2.52 ** Documentation diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 5afea929..57fca80f 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -2671,12 +2671,25 @@ script found by @code{AC_CONFIG_AUX_DIR} is used. The subdirectory @code{configure} scripts are given the same command line options that were given to this @code{configure} script, with minor -changes if needed (e.g., to adjust a relative path for the cache file or -source directory). This macro also sets the output variable -@code{subdirs} to the list of directories @samp{@var{dir} @dots{}}. -@file{Makefile} rules can use this variable to determine which -subdirectories to recurse into. This macro may be called multiple -times. +changes if needed, which include: + +@itemize @minus +@item +adjusting a relative path for the cache file; + +@item +adjusting a relative path for the source directory; + +@item +propagating the current value of @code{$prefix}, including if it was +defaulted, and if default values of the top level and of sub directory +@file{configure} differ. +@end itemize + +This macro also sets the output variable @code{subdirs} to the list of +directories @samp{@var{dir} @dots{}}. @file{Makefile} rules can use +this variable to determine which subdirectories to recurse into. This +macro may be called multiple times. @end defmac @node Default Prefix, , Subdirectories, Setup diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 732bbb08..da785ada 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -4377,10 +4377,18 @@ if test "$no_recursion" != yes; then ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ;; + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + ;; *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; esac done + # Always prepend --prefix to ensure using the same prefix + # in subdir configurations. + ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args" + for ac_subdir in : $subdirs; do test "x$ac_subdir" = x: && continue # Do not complain, so a configure script can configure whichever