--- libsoup-1.99.26/configure.in 2003-09-12 22:07:05.000000000 +0100 +++ libsoup-1.99.26/configure.in 2003-09-28 09:55:18.779887808 +0100 @@ -177,9 +177,10 @@ dnl *** SSL Library checks (GnuTLS, Mozilla NSS, or OpenSSL) *** dnl ************************************************************ -AC_ARG_ENABLE(ssl, - [ --enable-ssl Turn on Secure Sockets Layer support [default=yes]],, - enable_ssl=yes) +AC_ARG_WITH(ssl, + [ --with-ssl=yes|no|gnutls|openssl Specify Secure Socket Layer Support and Implementation Preference (default=yes)], + [with_ssl=$withval], + [with_ssl=yes]) dnl NSS AC_ARG_WITH(nspr-includes, dnl NSS [ --with-nspr-includes Specify location of Netscape Portable Runtime headers], @@ -242,43 +243,44 @@ enable_openssl="no" dnl NSS enable_nss="no" -if test "x$enable_ssl" = xyes; then +if test "x$with_ssl" != xno; then found_ssl= ### ### Check for GnuTLS ### - save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS $gnutls_inc_prefix" - AC_CHECK_HEADERS(gnutls/gnutls.h, + if test "x$with_ssl" != "xopenssl"; then + save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $gnutls_inc_prefix" + AC_CHECK_HEADERS(gnutls/gnutls.h, [enable_gnutls="yes"], [enable_gnutls="no"; break]) - if test "x$enable_gnutls" = xyes; then - if test "x$enable_static_ssl" = "xyes"; then - GNUTLS_LIBS="$gnutls_prefix/libgnutls.a $gnutls_prefix/libgcrypt.a" + if test "x$enable_gnutls" = xyes; then + if test "x$enable_static_ssl" = "xyes"; then + GNUTLS_LIBS="$gnutls_prefix/libgnutls.a $gnutls_prefix/libgcrypt.a" + else + GNUTLS_LIBS="-L$gnutls_prefix -lgnutls -lgcrypt" + fi + GNUTLS_CFLAGS=$CPPFLAGS + AC_DEFINE(HAVE_GNUTLS, 1, + [Defined if you are using GnuTLS for SSL support]) + found_ssl=yes else - GNUTLS_LIBS="-L$gnutls_prefix -lgnutls -lgcrypt" + GNUTLS_LIBS= + GNUTLS_CFLAGS= fi - GNUTLS_CFLAGS=$CPPFLAGS - AC_DEFINE(HAVE_GNUTLS, 1, - [Defined if you are using GnuTLS for SSL support]) - found_ssl=yes - else - GNUTLS_LIBS= - GNUTLS_CFLAGS= - fi - - AC_SUBST(GNUTLS_CFLAGS) - AC_SUBST(GNUTLS_LIBS) - CPPFLAGS=$save_CPPFLAGS - AM_CONDITIONAL(BUILD_PROXY, false) + AC_SUBST(GNUTLS_CFLAGS) + AC_SUBST(GNUTLS_LIBS) + CPPFLAGS=$save_CPPFLAGS + AM_CONDITIONAL(BUILD_PROXY, false) + fi ### ### Check for OpenSSL ### - if test "x$found_ssl" != "xyes"; then + if test "x$found_ssl" != "xyes" -a "x$with_ssl" != "xgnutls"; then PKG_CHECK_MODULES(OPENSSL, openssl, enable_openssl=yes, [ save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $openssl_inc_prefix" @@ -311,6 +313,10 @@ AC_SUBST(OPENSSL_CFLAGS) AC_SUBST(OPENSSL_LIBS) fi + + if test "x$enable_openssl" = "xno" -a "x$enable_gnutls" = "xno"; then + AC_MSG_ERROR("Cannot find GnuTLS or OpenSSL") + fi dnl NSS ### dnl NSS ### Check for Mozilla NSS