summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2018-08-19 18:59:10 +0200
committerNick Wellnhofer <wellnhofer@aevum.de>2018-08-19 19:31:19 +0200
commitb6ab8b449cf47e5992d803fc588fe7e621f4526d (patch)
tree0fa983413916174964dbdb033e82c05de9c9e746
parent173ea684dd355c68c3a9f521d108ff10c2fb3f5d (diff)
downloadlibxml2-b6ab8b449cf47e5992d803fc588fe7e621f4526d.tar.gz
Improve error message if pkg.m4 couldn't be found
Check whether aclocal.m4 contains the pkg.m4 macro package after running autoreconf and print a more helpful error message. Thanks to ๆž—ๅšไป (Buo-ren Lin) for the initial patch. Closes: #21
-rwxr-xr-xautogen.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/autogen.sh b/autogen.sh
index 4e7858a5..d9c49f4c 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -69,6 +69,15 @@ autoreconf -if -Wall
cd $THEDIR
+if ! grep -q pkg.m4 aclocal.m4; then
+ cat <<EOF
+
+Couldn't find pkg.m4 from pkg-config. Install the appropriate package for
+your distribution or set ACLOCAL_PATH to the directory containing pkg.m4.
+EOF
+ exit 1
+fi
+
if test x$OBJ_DIR != x; then
mkdir -p "$OBJ_DIR"
cd "$OBJ_DIR"