aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2003-03-25 22:40:43 +0000
committerDaniel Stenberg <daniel@haxx.se>2003-03-25 22:40:43 +0000
commit8b6cf239a383b928208e99239d0ab45f99ae4daa (patch)
treed7401fdf5919b809f5db2f4f1086ddb133702897
parentbcc285cffd86b471ba5aab24ac409fccae3c9267 (diff)
attempt to extract openssl information using pkg-config
-rw-r--r--configure.ac25
1 files changed, 25 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index ec3dac746..fcb9ab731 100644
--- a/configure.ac
+++ b/configure.ac
@@ -452,6 +452,31 @@ else
AC_MSG_RESULT(no)
fi
+dnl Detect the pkg-config tool, as it may have extra info about the
+dnl openssl installation we can use. I *believe* this is what we are
+dnl expected to do on really recent Redhat Linux hosts.
+AC_PATH_PROG( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin)
+if test "$PKGCONFIG" != "no" ; then
+ AC_MSG_CHECKING([for OpenSSL options using pkg-config])
+
+ $PKGCONFIG --exists openssl
+ SSL_EXISTS=$?
+
+ if test "$SSL_EXISTS" -eq "0"; then
+ SSL_LIBS=`$PKGCONFIG --libs-only-l openssl 2>/dev/null`
+ SSL_LDFLAGS=`$PKGCONFIG --libs-only-L openssl 2>/dev/null`
+ SSL_CFLAGS=`$PKGCONFIG --cflags openssl 2>/dev/null`
+
+ LIBS="$LIBS $SSL_LIBS"
+ CFLAGS="$CFLAGS $SSL_CFLAGS"
+ LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
+
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+
+fi
dnl **********************************************************************
dnl Check for the presence of SSL libraries and headers