From 673d7738a4e7a9e47ea0ef297a7fb5e33a369d1a Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Tue, 21 Aug 2007 20:23:16 +0000 Subject: [PATCH] * lib/autoconf/general.m4 (AC_SITE_LOAD): Do not overwrite "$@" here, this macro is expanded by AC_INIT. Fixes 2.60 regression. * tests/base.at (configure arguments): New test. * THANKS: Update. Report by Olaf Lenz. --- ChangeLog | 6 ++++++ THANKS | 1 + lib/autoconf/general.m4 | 19 +++++++++++-------- tests/base.at | 18 ++++++++++++++++++ 4 files changed, 36 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0629a0f2..c1e9320e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2007-08-21 Ralf Wildenhues + * lib/autoconf/general.m4 (AC_SITE_LOAD): Do not overwrite "$@" + here, this macro is expanded by AC_INIT. Fixes 2.60 regression. + * tests/base.at (configure arguments): New test. + * THANKS: Update. + Report by Olaf Lenz. + * lib/autoconf/general.m4 (_AC_ENABLE_IF): Expand macro arguments in comment. Report by Vincent Torri . diff --git a/THANKS b/THANKS index 8d284f98..25d393af 100644 --- a/THANKS +++ b/THANKS @@ -159,6 +159,7 @@ Nishio Futoshi fut_nis@d3.dion.ne.jp Noah Elliott elliott@hera.llnl.gov Noah Friedman friedman@gnu.ai.mit.edu Noah Misch noah@cs.caltech.edu +Olaf Lenz olenz@fias.uni-frankfurt.de Oliver Kiddle opk@zsh.org Olly Betts olly@survex.com Ossama Othman ossama@debian.org diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4 index 5c66f1e9..6350a56d 100644 --- a/lib/autoconf/general.m4 +++ b/lib/autoconf/general.m4 @@ -1805,20 +1805,23 @@ AU_DEFUN([AC_VALIDATE_CACHED_SYSTEM_TUPLE], []) # AC_SITE_LOAD # ------------ -# Look for site or system specific initialization scripts. +# Look for site- or system-specific initialization scripts. m4_define([AC_SITE_LOAD], -[# Prefer explicitly selected file to automatically selected ones. +[# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" + ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi -shift -for ac_site_file +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do + test "$ac_site_file" = NONE && continue if test -r "$ac_site_file"; then AC_MSG_NOTICE([loading site script $ac_site_file]) sed 's/^/| /' "$ac_site_file" >&AS_MESSAGE_LOG_FD diff --git a/tests/base.at b/tests/base.at index e5e6a605..0acabe7d 100644 --- a/tests/base.at +++ b/tests/base.at @@ -289,3 +289,21 @@ AT_CHECK([echo Hello | top_srcdir=$abs_top_srcdir ./configure | grep -v 'configu AT_CHECK([echo Hello | top_srcdir=$abs_top_srcdir ./configure --silent]) AT_CLEANUP + + +## ------------------- ## +## configure arguments ## +## ------------------- ## + +AT_SETUP([configure arguments]) + +AT_DATA([configure.ac], +[[AC_INIT +echo "$@" +]]) + +AT_CHECK_AUTOCONF +AT_CHECK_CONFIGURE([FOO=bar --enable-baz --without-zork --silent], [0], [stdout], [ignore]) +AT_CHECK([grep 'FOO=bar --enable-baz --without-zork --silent' stdout], [0], [ignore], [ignore]) + +AT_CLEANUP -- 2.11.4.GIT