From b9fdc0c251a2a2e8aaec9651768dec8c1b3faff4 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 11 Jan 2009 23:41:50 +0000 Subject: - 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. --- acinclude.m4 | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'acinclude.m4') 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, , et al. +# Copyright (C) 1998 - 2009, Daniel Stenberg, , 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 +]) -- cgit v1.2.1