From 996f608165814d578bdcb0ab2f3382edb8918690 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Wed, 11 Nov 2020 11:19:41 -0500 Subject: Support CONFIG_SITE being a list of entries. Instead of treating CONFIG_SITE as a single path, treat it as a space-separated list of paths and load them in order. Also remove the special-casing of entries starting with a dash, this is redundant as they'll be caught by the wildcard case. Finally add a test case to verify that multiple files are loaded correctly. * lib/autoconf/general.m4 (AC_SITE_LOAD): Treat CONFIG_SITE as a space-separated list of scripts to be sourced. Simplify handling of default config.site locations using this capability. * tests/base.at (AC_CACHE_CHECK): Test loading of multiple site files. * doc/autoconf.texi (Site Defaults): Update documentation of CONFIG_SITE. --- tests/base.at | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests') diff --git a/tests/base.at b/tests/base.at index 6a1d9742..2c5c4bdf 100644 --- a/tests/base.at +++ b/tests/base.at @@ -571,6 +571,17 @@ AT_CHECK([grep 'failed to load site script' stderr], [], [ignore], [ignore], CONFIG_SITE=./no-such-file AT_CHECK_CONFIGURE +# Check that multiple files are loaded +AT_DATA([first.site], +[[my_cv_shell_true_works=no +]]) +AT_DATA([second.site], +[[my_cv_shell_true_works=maybe +]]) +CONFIG_SITE="$PWD/first.site $PWD/second.site" +AT_CHECK_CONFIGURE([], [], [stdout]) +AT_CHECK([grep 'whether true.*works.*cached.*maybe' stdout], [], [ignore]) + AT_CLEANUP -- cgit v1.2.1