summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorKamil Dudka <kdudka@redhat.com>2010-01-14 01:37:55 +0000
committerKamil Dudka <kdudka@redhat.com>2010-01-14 01:37:55 +0000
commit383bf1e4764cf141846e27bca8872f80fecdd1a7 (patch)
tree668624405b0cd68d7cb44ec38d15e1459cea8b14 /acinclude.m4
parent8c8df3966be526a6961f7c861b4576cc885d927d (diff)
downloadcurl-383bf1e4764cf141846e27bca8872f80fecdd1a7.tar.gz
- Suppressed side effect of OpenSSL configure checks, which prevented NSS from
being properly detected under certain circumstances. It had been caused by strange behavior of pkg-config when handling PKG_CONFIG_LIBDIR. pkg-config distinguishes among empty and non-existent environment variable in that case.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m425
1 files changed, 22 insertions, 3 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 18f4d8202..cf9201651 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -3190,7 +3190,22 @@ AC_DEFUN([CURL_CHECK_WIN32_LARGEFILE], [
esac
])
-dnl CURL_CHECK_PKGCONFIG ($module)
+dnl CURL_EXPORT_PCDIR ($pcdir)
+dnl ------------------------
+dnl if $pcdir is not empty, set PKG_CONFIG_LIBDIR to $pcdir and export
+dnl
+dnl we need this macro since pkg-config distinguishes among empty and unset
+dnl variable while checking PKG_CONFIG_LIBDIR
+dnl
+
+AC_DEFUN([CURL_EXPORT_PCDIR], [
+ if test -n "$1"; then
+ PKG_CONFIG_LIBDIR="$1"
+ export PKG_CONFIG_LIBDIR
+ fi
+])
+
+dnl CURL_CHECK_PKGCONFIG ($module, [$pcdir])
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.
@@ -3198,6 +3213,8 @@ dnl
dnl If pkg-config is present, check that it has info about the $module or
dnl return "no" anyway!
dnl
+dnl Optionally PKG_CONFIG_LIBDIR may be given as $pcdir.
+dnl
AC_DEFUN([CURL_CHECK_PKGCONFIG], [
@@ -3216,8 +3233,10 @@ AC_DEFUN([CURL_CHECK_PKGCONFIG], [
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
+ itexists=`CURL_EXPORT_PCDIR([$2]) dnl
+ $PKGCONFIG --exists $1 >/dev/null 2>&1 && echo 1`
+
+ if test -z "$itexists"; then
dnl pkg-config does not have info about the given module! set the
dnl variable to 'no'
PKGCONFIG="no"