>From 0890923a8ca1652aa04109f0ef2cf0a37419b339 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 12 Jan 2020 12:58:43 +0100 Subject: [PATCH 1/2] build: Try harder to get pkg.m4. * bootstrap.conf (bootstrap_post_import_hook): Use an extended directory list when looking for pkg.m4. From GNU grep. --- bootstrap.conf | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/bootstrap.conf b/bootstrap.conf index fd3580b..1562381 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -1,6 +1,6 @@ # Bootstrap configuration. -# Copyright (C) 2006-2008 Free Software Foundation, Inc. +# Copyright (C) 2006-2020 Free Software Foundation, Inc. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -114,4 +114,21 @@ bootstrap_post_import_hook () echo 'Importing Autoconf macros from Jitter...' cp jitter/autoconf/jitter.m4 m4/ + + # 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 $ac_dir /usr/share/aclocal '' + do + IFS=$oIFS + if test -n "$dir" && test -r "$dir/pkg.m4"; then + cp "$dir/pkg.m4" m4/pkg.m4 + return + fi + done + IFS=$oIFS + die 'Cannot find pkg.m4; perhaps you need to install pkg-config' } -- 2.7.4