diff options
author | Zack Weinberg <zackw@panix.com> | 2020-10-14 20:22:41 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2020-10-14 20:22:41 -0400 |
commit | b0d20c049bda80a9d323326ae5ea3fd5e4857712 (patch) | |
tree | 4142dcf305cf038f5419184914b23df3a549cbd4 /tests/torture.at | |
parent | 3cdc910d229d33e5a98e66b64ee1506a0c2e262c (diff) | |
download | autoconf-b0d20c049bda80a9d323326ae5ea3fd5e4857712.tar.gz |
autoreconf: cope with empty AC_CONFIG_SUBDIRS (bug 110331)
Commit 41edf99f9515f3f83398428c39d79e11266a5a0d made all Perl warnings
fatal. This caused autoreconf to crash on packages that call
AC_CONFIG_SUBDIRS with no arguments. They probably shouldn’t do that,
but we shouldn’t crash if they do.
Problem reported by Ross Burton.
* bin/autoreconf.in (autoreconf_current_directory):
Convert undef to '' before attempting to split it.
* tests/torture.at (Empty AC_CONFIG_SUBDIRS): New test.
Diffstat (limited to 'tests/torture.at')
-rw-r--r-- | tests/torture.at | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/torture.at b/tests/torture.at index ff0f53f3..631f34f4 100644 --- a/tests/torture.at +++ b/tests/torture.at @@ -1807,6 +1807,28 @@ AT_CHECK([test -f foo/innerfile]) AT_CLEANUP +## ------------------------- ## +## Empty AC_CONFIG_SUBDIRS. ## +## ------------------------- ## + +AT_SETUP([Empty AC_CONFIG_SUBDIRS]) +AT_KEYWORDS([autoreconf]) + +AT_DATA([install-sh], []) +AT_DATA([configure.ac], +[[AC_INIT(GNU Outer, 1.0) + +AC_CONFIG_SUBDIRS() +AC_OUTPUT +]]) + +# autoreconf should have no complaints, and the generated configure +# script should run fine with or without --no-recursion. +AT_CHECK([autoreconf -Werror], [0], [ignore]) +AT_CHECK_CONFIGURE() +AT_CHECK_CONFIGURE([--no-recursion]) + +AT_CLEANUP ## ----------------- ## ## Empty directory. ## |