aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2018-08-11 14:10:57 +0200
committerToni Uhlig <matzeton@googlemail.com>2018-08-11 14:31:24 +0200
commitc201661484f668ecd7de0d05a2a6e4baf74d0e2c (patch)
tree85ba9dbcc4843f1deddafa49777a10a7198967c2
parent40035b83f990286767df0db170295b3f354de0d5 (diff)
check for host_tuple-pkg-config first and use system pkg-config as fallback
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
-rw-r--r--configure.ac7
1 files changed, 5 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index b190f4a..66ed2c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,8 +29,11 @@ case ${host_os} in
;;
esac
-AC_CHECK_TOOL([PKGCONFIG], [pkg-config], [:])
-AS_IF([test "x${PKGCONFIG}" = x], [ AC_MSG_ERROR([pkg-config not found]) ])
+AC_CHECK_TOOL([PKGCONFIG], [${ac_cv_host}-pkg-config], [no])
+AS_IF([test "x${PKGCONFIG}" = xno],
+ [ PKGCONFIG=''
+ AC_CHECK_TOOL([PKGCONFIG], [pkg-config], [no]) ])
+AS_IF([test "x${PKGCONFIG}" = xno], [ AC_MSG_ERROR([pkg-config not found]) ])
dnl check for -std=gnu99
CFLAGS="-pedantic -Wall -std=gnu99 -D_GNU_SOURCE=1 $CFLAGS"