Improve crossbuildability
authorRicardo Mones <ricardo@mones.org>
Tue, 4 Sep 2018 22:24:24 +0000 (00:24 +0200)
committerRicardo Mones <ricardo@mones.org>
Tue, 4 Sep 2018 22:24:24 +0000 (00:24 +0200)
configure.ac

index 9023e27e9eadff8f23ad528b470e8b5b34a00150..25858ed437ee995d88cb2be80743eb96de4f125f 100644 (file)
@@ -46,14 +46,15 @@ AC_PROG_CPP
 AM_PROG_LIBTOOL
 AC_SYS_LARGEFILE
 
-
-#
-# Find pkg-config
-#
-AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
-if test x$PKG_CONFIG = xno ; then
-  AC_MSG_ERROR([*** pkg-config not found. See http://www.freedesktop.org/software/pkgconfig/])
-fi
+dnl Require pkg-config
+m4_ifndef([PKG_PROG_PKG_CONFIG],
+    [m4_fatal([Could not locate the pkg-config autoconf macros. These
+are usually located in /usr/share/aclocal/pkg.m4. If your macros
+are in a different location, try setting the environment variable
+ACLOCAL_FLAGS before running ./autogen.sh or autoreconf again. E.g.:
+export ACLOCAL_FLAGS="-I/other/macro/dir"])
+])
+PKG_PROG_PKG_CONFIG
 
 #
 # Check for claws-mail