summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2003-06-24 16:02:41 +0000
committerDan Winship <danw@src.gnome.org>2003-06-24 16:02:41 +0000
commitdeed4896a47fb3e706d33bd79d5caa9d7e1b41dc (patch)
treeab97b6113b9725cf73fa704385f37f71367e8f4e /configure.in
parent0911002eb73705cb7806aa38204b925481a3d6bc (diff)
downloadlibsoup-deed4896a47fb3e706d33bd79d5caa9d7e1b41dc.tar.gz
Check pkgconfig for openssl, since 0.9.7 (a) uses it, and (b) depends on
* configure.in: Check pkgconfig for openssl, since 0.9.7 (a) uses it, and (b) depends on lots of new things sometimes (like on RH9). * libsoup/soup-openssl.c: * libsoup/soup-ssl-proxy.c: Change #ifdef HAVE_OPENSSL_SSL_H to just #ifdef HAVE_OPENSSL since the header check doesn't get run in the pkgconfig case
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in31
1 files changed, 18 insertions, 13 deletions
diff --git a/configure.in b/configure.in
index f78b48b1..91cf03b3 100644
--- a/configure.in
+++ b/configure.in
@@ -279,32 +279,37 @@ if test "x$enable_ssl" = xyes; then
### Check for OpenSSL
###
if test "x$found_ssl" != "xyes"; then
- save_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS $openssl_inc_prefix"
- AC_CHECK_LIB(dl, dlopen, DL_LDFLAGS="-ldl", DL_LDFLAGS="")
- AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h,
+ PKG_CHECK_MODULES(OPENSSL, openssl, enable_openssl=yes, [
+ save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS $openssl_inc_prefix"
+ AC_CHECK_LIB(dl, dlopen, DL_LDFLAGS="-ldl", DL_LDFLAGS="")
+ AC_CHECK_HEADERS(openssl/ssl.h openssl/err.h,
[enable_openssl="yes"],
[enable_openssl="no"; break])
- if test "x$enable_openssl" = xyes; then
- if test "x$enable_static_ssl" = "xyes"; then
- OPENSSL_LIBS="$openssl_prefix/libssl.a $openssl_prefix/libcrypto.a"
+ if test "x$enable_openssl" = xyes; then
+ if test "x$enable_static_ssl" = "xyes"; then
+ OPENSSL_LIBS="$openssl_prefix/libssl.a $openssl_prefix/libcrypto.a"
+ else
+ OPENSSL_LIBS="-L$openssl_prefix -lssl -lcrypto $DL_LDFLAGS"
+ fi
+ OPENSSL_CFLAGS=$CPPFLAGS
else
- OPENSSL_LIBS="-L$openssl_prefix -lssl -lcrypto $DL_LDFLAGS"
+ OPENSSL_LIBS=
+ OPENSSL_CFLAGS=
fi
- OPENSSL_CFLAGS=$CPPFLAGS
+ CPPFLAGS=$save_CPPFLAGS
+ ])
+
+ if test "x$enable_openssl" = xyes; then
AC_DEFINE(HAVE_OPENSSL, 1,
[Defined if you are using OpenSSL for SSL support])
found_ssl=yes
AM_CONDITIONAL(BUILD_PROXY, true)
- else
- OPENSSL_LIBS=
- OPENSSL_CFLAGS=
fi
AC_SUBST(OPENSSL_CFLAGS)
AC_SUBST(OPENSSL_LIBS)
- CPPFLAGS=$save_CPPFLAGS
fi
dnl NSS ###