aboutsummaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2009-01-11 23:41:50 +0000
committerDaniel Stenberg <daniel@haxx.se>2009-01-11 23:41:50 +0000
commitb9fdc0c251a2a2e8aaec9651768dec8c1b3faff4 (patch)
treec92b055e62265985e9bdfacec5f6be9aa889bcf7 /acinclude.m4
parentf471b4836f414def75f2ac5e379d9a1a044570f0 (diff)
- Based on bug report #2498665 (http://curl.haxx.se/bug/view.cgi?id=2498665)
by Daniel Black, I've now added magic to the configure script that makes it use pkg-config to detect gnutls details as well if the existing method (using libgnutls-config) fails. While doing this, I cleaned up and unified the pkg-config usage when detecting openssl and nss as well.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m435
1 files changed, 34 insertions, 1 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 71cf5e21a..c4b7a1395 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -3057,3 +3057,36 @@ AC_DEFUN([CURL_CHECK_WIN32_LARGEFILE], [
;;
esac
])
+
+dnl CURL_CHECK_PKGCONFIG ($module)
+dnl ------------------------
+dnl search for the pkg-config tool (if not cross-compiling). Set the PKGCONFIG
+dnl variable to hold the path to it, or 'no' if not found/present.
+dnl
+dnl If pkg-config is present, check that it has info about the $module or return
+dnl "no" anyway!
+dnl
+
+AC_DEFUN([CURL_CHECK_PKGCONFIG], [
+ if test x$cross_compiling != xyes; then
+ dnl only do pkg-config magic when not cross-compiling
+ AC_PATH_PROG( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin)
+
+ if test x$PKGCONFIG != xno; then
+ AC_MSG_CHECKING([for $1 options with pkg-config])
+ dnl ask pkg-config about $1
+ $PKGCONFIG --exists $1
+ if test "$?" -ne "0"; then
+ dnl pkg-config does not have info about the given module! set the
+ dnl variable to 'no'
+ PKGCONFIG="no"
+ AC_MSG_RESULT([no])
+ else
+ AC_MSG_RESULT([found])
+ fi
+ fi
+
+ else
+ PKGCONFIG="no"
+ fi
+])