summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m412
1 files changed, 10 insertions, 2 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 850db317c..cff4d645c 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -3052,9 +3052,17 @@ dnl Optionally PKG_CONFIG_LIBDIR may be given as $pcdir.
dnl
AC_DEFUN([CURL_CHECK_PKGCONFIG], [
- AC_PATH_TOOL( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin)
- if test x$PKGCONFIG != xno; then
+ if test -z "$PKGCONFIG"; then
+ PKGCONFIG="$PKG_CONFIG"
+ fi
+
+ if test -z "$PKGCONFIG"; then
+ AC_PATH_TOOL([PKGCONFIG], [pkg-config], [no],
+ [$PATH:/usr/bin:/usr/local/bin])
+ fi
+
+ if test "x$PKGCONFIG" != "xno"; then
AC_MSG_CHECKING([for $1 options with pkg-config])
dnl ask pkg-config about $1
itexists=`CURL_EXPORT_PCDIR([$2]) dnl