summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2020-11-11 11:19:41 -0500
committerZack Weinberg <zackw@panix.com>2020-11-11 11:19:41 -0500
commit996f608165814d578bdcb0ab2f3382edb8918690 (patch)
tree8a6a6ab1a0c44a7c97390bc432c348c7f374871e /tests
parentdbd374cff01a32210450faeee20f7d368c85de54 (diff)
downloadautoconf-996f608165814d578bdcb0ab2f3382edb8918690.tar.gz
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/base.at11
1 files changed, 11 insertions, 0 deletions
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