summaryrefslogtreecommitdiff
path: root/bootstrap.conf
diff options
context:
space:
mode:
authorJim Meyering <meyering@fb.com>2015-10-17 16:26:58 -0700
committerJim Meyering <meyering@fb.com>2015-10-17 21:05:22 -0700
commitd34269c09dffc4dae884fc1fc63384c6ef706a1d (patch)
tree711eb42d70cfad00d2946d0c10232a3934cfcbcd /bootstrap.conf
parent94792e378cb0547f3229708e24e26b9f02405b05 (diff)
downloadgrep-d34269c09dffc4dae884fc1fc63384c6ef706a1d.tar.gz
build: avoid spurious bootstrap failure involving pkg.m4
Running ./bootstrap could fail mistakenly at the very end in its attempt to obtain a copy of pkg.m4. It would search only $(aclocal --print-ac-dir) and some other directories, but not those listed in $(aclocal --print-ac-dir)/dirlist. * bootstrap.conf (bootstrap_post_import_hook): Also search the directories named in $(aclocal --print-ac-dir)/dirlist when that file exists with nonzero size.
Diffstat (limited to 'bootstrap.conf')
-rw-r--r--bootstrap.conf4
1 files changed, 3 insertions, 1 deletions
diff --git a/bootstrap.conf b/bootstrap.conf
index 7842928c..9db620b2 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -136,10 +136,12 @@ bootstrap_post_import_hook ()
touch ChangeLog || return 1
# Copy pkg-config's pkg.m4 so that our downstream users don't need to.
+ local ac_dir=`aclocal --print-ac-dir`
+ test -s "$ac_dir/dirlist" && ac_dir=$ac_dir:`tr '\n' : < "$ac_dir/dirlist"`
oIFS=$IFS
IFS=:
for dir in \
- $ACLOCAL_PATH $(aclocal --print-ac-dir) /usr/share/aclocal ''
+ $ACLOCAL_PATH $ac_dir /usr/share/aclocal ''
do
IFS=$oIFS
if test -n "$dir" && test -r "$dir/pkg.m4"; then