aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-03-07 06:10:47 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-03-07 06:10:47 +0800
commitcb85cdf89280479cda05952ec5ed398d4305a26d (patch)
tree8df9233126dde372cce642f3f6bdd6cc84283995 /configure.in
parentae4be8efcc113a01c16de6192b76bee05358b0a4 (diff)
downloadgsoc2013-evolution-cb85cdf89280479cda05952ec5ed398d4305a26d.tar.gz
gsoc2013-evolution-cb85cdf89280479cda05952ec5ed398d4305a26d.tar.zst
gsoc2013-evolution-cb85cdf89280479cda05952ec5ed398d4305a26d.zip
Allow the user to enable OpenSSL over Mozilla NSS using --enable-openssl
2002-03-06 Jeffrey Stedfast <fejj@ximian.com> * configure.in: Allow the user to enable OpenSSL over Mozilla NSS using --enable-openssl or --disable-nss. svn path=/trunk/; revision=15952
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in219
1 files changed, 118 insertions, 101 deletions
diff --git a/configure.in b/configure.in
index aff87a942f..93859ac307 100644
--- a/configure.in
+++ b/configure.in
@@ -740,119 +740,134 @@ dnl
dnl The Evolution security extensions are only built if these libraries are found
dnl ********************************************************************************
msg_ssl=no
-AC_ARG_WITH(nspr-includes, [ --with-nspr-includes=PREFIX Location of Mozilla nspr4 includes.],
- with_nspr_includes="$withval", with_nspr_includes="/usr/include/nspr")
-have_nspr_includes="no"
-if test "x${with_nspr_includes}" != "xno"; then
- CPPFLAGS_save="$CPPFLAGS"
-
- AC_MSG_CHECKING(for Mozilla nspr4 includes in $with_nspr_includes)
- AC_MSG_RESULT("")
-
- CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
- AC_CHECK_HEADERS(nspr.h prio.h, [ moz_nspr_includes="yes" ])
- CPPFLAGS="$CPPFLAGS_save"
-
- if test "x{$moz_nspr_includes}" != "xno" -a "x{$moz_nspr_includes}" != "x" ; then
- have_nspr_includes="yes"
- NSPR_CFLAGS="-I$with_nspr_includes"
- fi
-else
- AC_MSG_CHECKING(for Mozilla nspr4 includes)
- AC_MSG_RESULT(no)
+
+dnl these 2 enable's are inverses of each other
+AC_ARG_ENABLE(nss, [ --enable-nss=[yes,no] Attempt to use Mozilla libnss for SSL support.],
+ enable_nss="$enableval", enable_nss="yes")
+
+AC_ARG_ENABLE(openssl, [ --enable-openssl=[yes,no] Attempt to use OpenSSL for SSL support.],
+ enable_openssl="$enableval", enable_openssl="auto")
+
+if test "x${enable_openssl}" = "xyes"; then
+dnl User wants to override nss with OpenSSL
+ enable_nss="no"
fi
-AC_ARG_WITH(nspr-libs, [ --with-nspr-libs=PREFIX Location of Mozilla nspr4 libs.],
- with_nspr_libs="$withval")
-have_nspr_libs="no"
-if test "x${with_nspr_libs}" != "xno" -a "x${have_nspr_includes}" != "xno"; then
- CFLAGS_save="$CFLAGS"
- LDFLAGS_save="$LDFLAGS"
+if test "x${enable_nss}" = "xyes"; then
+ AC_ARG_WITH(nspr-includes, [ --with-nspr-includes=PREFIX Location of Mozilla nspr4 includes.],
+ with_nspr_includes="$withval", with_nspr_includes="/usr/include/nspr")
+ have_nspr_includes="no"
+ if test "x${with_nspr_includes}" != "xno"; then
+ CPPFLAGS_save="$CPPFLAGS"
+
+ AC_MSG_CHECKING(for Mozilla nspr4 includes in $with_nspr_includes)
+ AC_MSG_RESULT("")
+
+ CPPFLAGS="$CPPFLAGS -I$with_nspr_includes"
+ AC_CHECK_HEADERS(nspr.h prio.h, [ moz_nspr_includes="yes" ])
+ CPPFLAGS="$CPPFLAGS_save"
+
+ if test "x{$moz_nspr_includes}" != "xno" -a "x{$moz_nspr_includes}" != "x" ; then
+ have_nspr_includes="yes"
+ NSPR_CFLAGS="-I$with_nspr_includes"
+ fi
+ else
+ AC_MSG_CHECKING(for Mozilla nspr4 includes)
+ AC_MSG_RESULT(no)
+ fi
- nsprlibs="-lplc4 -lplds4 -lnspr4 $PTHREAD_LIB"
- AC_CACHE_CHECK([for Mozilla nspr libraries], moz_nspr_libs,
- [
- CFLAGS="$CFLAGS $NSPR_CFLAGS"
+ AC_ARG_WITH(nspr-libs, [ --with-nspr-libs=PREFIX Location of Mozilla nspr4 libs.],
+ with_nspr_libs="$withval")
+ have_nspr_libs="no"
+ if test "x${with_nspr_libs}" != "xno" -a "x${have_nspr_includes}" != "xno"; then
+ CFLAGS_save="$CFLAGS"
+ LDFLAGS_save="$LDFLAGS"
- if test "x${with_nspr_libs}" != "x"; then
- LDFLAGS="$LDFLAGS -L$with_nspr_libs $nsprlibs"
+ nsprlibs="-lplc4 -lplds4 -lnspr4 $PTHREAD_LIB"
+ AC_CACHE_CHECK([for Mozilla nspr libraries], moz_nspr_libs,
+ [
+ CFLAGS="$CFLAGS $NSPR_CFLAGS"
+
+ if test "x${with_nspr_libs}" != "x"; then
+ LDFLAGS="$LDFLAGS -L$with_nspr_libs $nsprlibs"
+ else
+ LDFLAGS="$LDFLAGS $nsprlibs"
+ fi
+
+ AC_TRY_LINK_FUNC(PR_Init, moz_nspr_libs="yes", moz_nspr_libs="no")
+ CFLAGS="$CFLAGS_save"
+ LDFLAGS="$LDFLAGS_save"
+ ])
+ if test "x$moz_nspr_libs" != "xno"; then
+ have_nspr_libs="yes"
+ NSPR_LDFLAGS="-L$with_nspr_libs $nsprlibs"
else
- LDFLAGS="$LDFLAGS $nsprlibs"
+ NSPR_CLFAGS=""
fi
-
- AC_TRY_LINK_FUNC(PR_Init, moz_nspr_libs="yes", moz_nspr_libs="no")
- CFLAGS="$CFLAGS_save"
- LDFLAGS="$LDFLAGS_save"
- ])
- if test "x$moz_nspr_libs" != "xno"; then
- have_nspr_libs="yes"
- NSPR_LDFLAGS="-L$with_nspr_libs $nsprlibs"
else
- NSPR_CLFAGS=""
+ AC_MSG_CHECKING(for Mozilla nspr4 libraries)
+ AC_MSG_RESULT(no)
fi
-else
- AC_MSG_CHECKING(for Mozilla nspr4 libraries)
- AC_MSG_RESULT(no)
-fi
-
-AC_ARG_WITH(nss-includes, [ --with-nss-includes=PREFIX Location of Mozilla nss3 includes.],
- with_nss_includes="$withval", with_nss_includes="/usr/include/moznss")
-if test "x${with_nss_includes}" != "xno" -a "x${have_nspr_libs}" != "xno"; then
- CPPFLAGS_save="$CPPFLAGS"
- AC_MSG_CHECKING(for Mozilla nss3 includes in $with_nss_includes)
- AC_MSG_RESULT("")
-
- if test "x${with_nspr_includes}" != "x"; then
- CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
- else
- CPPFLAGS="$CPPFLAGS -I$with_nss_includes"
- fi
-
- AC_CHECK_HEADERS(nss.h ssl.h smime.h,
- [ have_nss_includes="yes" ],
- [ have_nss_includes="no" ])
-
- CPPFLAGS="$CPPFLAGS_save"
-
- if test "x${have_nss_includes}" = xyes ; then
- have_nss_includes="yes"
- NSS_CFLAGS="-I$with_nss_includes"
+ AC_ARG_WITH(nss-includes, [ --with-nss-includes=PREFIX Location of Mozilla nss3 includes.],
+ with_nss_includes="$withval", with_nss_includes="/usr/include/moznss")
+ if test "x${with_nss_includes}" != "xno" -a "x${have_nspr_libs}" != "xno"; then
+ CPPFLAGS_save="$CPPFLAGS"
+
+ AC_MSG_CHECKING(for Mozilla nss3 includes in $with_nss_includes)
+ AC_MSG_RESULT("")
+
+ if test "x${with_nspr_includes}" != "x"; then
+ CPPFLAGS="$CPPFLAGS -I$with_nspr_includes -I$with_nss_includes"
+ else
+ CPPFLAGS="$CPPFLAGS -I$with_nss_includes"
+ fi
+
+ AC_CHECK_HEADERS(nss.h ssl.h smime.h,
+ [ have_nss_includes="yes" ],
+ [ have_nss_includes="no" ])
+
+ CPPFLAGS="$CPPFLAGS_save"
+
+ if test "x${have_nss_includes}" = xyes ; then
+ have_nss_includes="yes"
+ NSS_CFLAGS="-I$with_nss_includes"
+ else
+ NSPR_CFLAGS=""
+ NSPR_LDFLAGS=""
+ fi
else
- NSPR_CFLAGS=""
- NSPR_LDFLAGS=""
+ AC_MSG_CHECKING(for Mozilla nss3 includes)
+ AC_MSG_RESULT(no)
fi
-else
- AC_MSG_CHECKING(for Mozilla nss3 includes)
- AC_MSG_RESULT(no)
-fi
-
-AC_ARG_WITH(nss-libs, [ --with-nss-libs=PREFIX Location of Mozilla nss3 libs.],
- with_nss_libs="$withval")
-if test "x${with_nss_libs}" != "xno" -a "x${have_nss_includes}" != "xno"; then
- LDFLAGS_save="$LDFLAGS"
- nsprlibs="-lplc4 -lplds4 -lnspr4 $PTHREAD_LIB"
- nsslibs="-lssl3 -lsmime3 -lnss3"
- AC_CACHE_CHECK([for Mozilla nss libraries], moz_nss_libs,
- [
- LDFLAGS="$LDFLAGS -L$with_nspr_libs $nsprlibs -L$with_nss_libs $nsslibs"
- AC_TRY_LINK_FUNC(NSS_Init, moz_nss_libs="yes", moz_nss_libs="no")
- LDFLAGS="$LDFLAGS_save"
- ])
- if test "$moz_nss_libs" != no; then
- AC_DEFINE(HAVE_NSS)
- AC_DEFINE(HAVE_SSL)
- msg_ssl="yes (Mozilla NSS)"
- NSS_LDFLAGS="-L$with_nss_libs $nsslibs"
+ AC_ARG_WITH(nss-libs, [ --with-nss-libs=PREFIX Location of Mozilla nss3 libs.],
+ with_nss_libs="$withval")
+ if test "x${with_nss_libs}" != "xno" -a "x${have_nss_includes}" != "xno"; then
+ LDFLAGS_save="$LDFLAGS"
+
+ nsprlibs="-lplc4 -lplds4 -lnspr4 $PTHREAD_LIB"
+ nsslibs="-lssl3 -lsmime3 -lnss3"
+ AC_CACHE_CHECK([for Mozilla nss libraries], moz_nss_libs,
+ [
+ LDFLAGS="$LDFLAGS -L$with_nspr_libs $nsprlibs -L$with_nss_libs $nsslibs"
+ AC_TRY_LINK_FUNC(NSS_Init, moz_nss_libs="yes", moz_nss_libs="no")
+ LDFLAGS="$LDFLAGS_save"
+ ])
+ if test "$moz_nss_libs" != no; then
+ AC_DEFINE(HAVE_NSS)
+ AC_DEFINE(HAVE_SSL)
+ msg_ssl="yes (Mozilla NSS)"
+ NSS_LDFLAGS="-L$with_nss_libs $nsslibs"
+ else
+ NSS_CFLAGS=""
+ NSPR_CFLAGS=""
+ NSPR_LDFLAGS=""
+ fi
else
- NSS_CFLAGS=""
- NSPR_CFLAGS=""
- NSPR_LDFLAGS=""
+ AC_MSG_CHECKING(for Mozilla nss libraries)
+ AC_MSG_RESULT(no)
fi
-else
- AC_MSG_CHECKING(for Mozilla nss libraries)
- AC_MSG_RESULT(no)
fi
AC_SUBST(NSPR_CFLAGS)
@@ -864,7 +879,9 @@ dnl ******************************
dnl OpenSSL
dnl ******************************
-if test "$msg_ssl" = "no"; then
+dnl only continue detecting OpenSSL if we haven't already found all of the
+dnl Mozilla libnss includes/libraries and if user actually wants ssl support
+if test "$msg_ssl" = "no" -a "x${enable_openssl}" != "xno"; then
AC_ARG_WITH(openssl-includes, [ --with-openssl-includes=PREFIX Location of OpenSSL includes.],
with_openssl_includes="$withval", with_openssl_includes="/usr/include")
have_openssl_includes="no"
@@ -923,7 +940,7 @@ else
OPENSSL_CFLAGS=""
OPENSSL_LDFLAGS=""
fi
-
+
AC_SUBST(OPENSSL_CFLAGS)
AC_SUBST(OPENSSL_LDFLAGS)