summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorTomas Chvatal <tchvatal@suse.cz>2011-11-02 17:36:27 +0100
committerJan Holesovsky <kendy@suse.cz>2011-11-02 17:37:53 +0100
commitf6f5c89259867b5aeb86d5509f826da949d122c4 (patch)
tree89fd68e2d15904c775be50d163b9826ba7aee345 /configure.in
parentb5ec39a65e8b5d78f9f58bc179e9130c81ec347a (diff)
Rename --enable-nss-module to --with-system-nss + introduce --enable-xmlsec.
This also finishes the uncoupling of NSS from the --with-system-mozilla.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in77
1 files changed, 29 insertions, 48 deletions
diff --git a/configure.in b/configure.in
index a260a0a775fd..b69aeb63f802 100644
--- a/configure.in
+++ b/configure.in
@@ -361,10 +361,10 @@ AC_ARG_ENABLE(build-mozilla,
the Mozilla source code but take precompiled zips.]),
,)
-AC_ARG_ENABLE(nss-module,
- AS_HELP_STRING([--disable-nss-module],
- [Whether to use provided NSS module.]),
-,enable_nss_module=yes)
+AC_ARG_ENABLE(xmlsec,
+ AS_HELP_STRING([--disable-xmlsec],
+ [Whether to enable XMLsec for open document signing.]),
+)
AC_ARG_ENABLE(kde,
AS_HELP_STRING([--enable-kde],
@@ -643,6 +643,11 @@ AC_ARG_WITH(system-cairo,
[Use Cairo libraries already on system.]),
,)
+AC_ARG_WITH(system-nss,
+ AS_HELP_STRING([--with-system-nss],
+ [Use NSS/nspr libraries already on system.]),
+,)
+
AC_ARG_WITH(mozilla-version,
AS_HELP_STRING([--with-mozilla-version],
[Choose which version of Mozilla to use while building Mozilla.
@@ -5723,11 +5728,14 @@ else
fi
AC_MSG_CHECKING([whether to build XML Security support])
-if test "$enable_nss_module" = "no"; then
- AC_MSG_RESULT([no, NSS disabled])
+if test "$enable_xmlsec" = "no"; then
+ AC_MSG_RESULT([no])
+ ENABLE_XMLSEC=no
else
+ ENABLE_XMLSEC=yes
AC_MSG_RESULT([yes])
fi
+AC_SUBST(ENABLE_XMLSEC)
AC_MSG_CHECKING([whether to build LDAP configuration backend])
if test -z "$enable_ldap" || test "$enable_ldap" = "yes"; then
@@ -5776,8 +5784,6 @@ AC_MSG_CHECKING([which Mozilla to use])
if test -n "$with_system_mozilla" && test "$with_system_mozilla" != "no"; then
AC_MSG_RESULT([external])
SYSTEM_MOZILLA=YES
- ENABLE_NSS_MODULE=NO
- enable_nss_module=no
AC_MSG_CHECKING([which Mozilla flavour to use])
if test -n "$with_system_mozilla" && test "$with_system_mozilla" = "libxul"; then
MOZ_FLAVOUR=libxul
@@ -5795,22 +5801,6 @@ if test -n "$with_system_mozilla" && test "$with_system_mozilla" != "no"; then
tmp=`echo $MOZ_FLAVOUR | $PERL -e 'print ucfirst(<STDIN>);'`
AC_MSG_RESULT($tmp)
- PKG_CHECK_MODULES( MOZ_NSS, nss, STANDALONENSS="TRUE", STANDALONENSS="" )
- if test -z "$STANDALONENSS"; then
- PKG_CHECK_MODULES( MOZ_NSS, $MOZ_FLAVOUR-nss )
- else
- NSS_LIB="-L`$PKG_CONFIG --variable=libdir nss`"
- AC_SUBST(NSS_LIB)
- fi
-
- if $PKG_CONFIG --exists nspr ; then
- PKG_CHECK_MODULES( MOZ_NSPR, nspr )
- NSPR_LIB="-L`$PKG_CONFIG --variable=libdir nspr`"
- AC_SUBST(NSPR_LIB)
- else
- PKG_CHECK_MODULES( MOZ_NSPR, $MOZ_FLAVOUR-nspr )
- fi
-
if test "$MOZ_FLAVOUR" != "libxul"; then
PKG_CHECK_MODULES( MOZILLAXPCOM, $MOZ_FLAVOUR-xpcom, HASXPCOM="TRUE", HASXPCOM="" )
MOZ_INC=`$PKG_CONFIG --variable=includedir $MOZ_FLAVOUR-xpcom`
@@ -5829,19 +5819,6 @@ if test -n "$with_system_mozilla" && test "$with_system_mozilla" != "no"; then
fi
fi
- save_CPPFLAGS="$CPPFLAGS"
- save_LDFLAGS="$LDFLAGS"
- save_LIBS="$LIBS"
- CPPFLAGS="$CPPFLAGS $MOZ_NSS_CFLAGS"
- LDFLAGS="$LDFLAGS $MOZ_NSS_LIBS"
- AC_CHECK_LIB(nss3, PK11_GetCertFromPrivateKey, [],
- [AC_MSG_ERROR(PK11_GetCertFromPrivateKey missing but needed.
-See https://bugzilla.mozilla.org/show_bug.cgi?id=262274.
-Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5))], [])
- LDFLAGS="$save_LDFLAGS"
- CPPFLAGS="$save_CPPFLAGS"
- LIBS="$save_LIBS"
-
MOZ_LIB_XPCOM=$MOZILLAXPCOM_LIBS
if test "$WITH_LDAP" != "NO" && test "$WITH_OPENLDAP" != "YES"; then
AC_MSG_CHECKING([whether $tmp was compiled with --enable-ldap])
@@ -6001,18 +5978,22 @@ AC_SUBST(MOZ_FLAVOUR)
AC_SUBST(MOZ_INC)
AC_SUBST(MOZ_LIB)
AC_SUBST(MOZ_LIB_XPCOM)
-AC_SUBST(MOZ_NSPR_CFLAGS)
-AC_SUBST(MOZ_NSS_CFLAGS)
AC_SUBST(MOZ_LDAP_CFLAGS)
dnl ===================================================================
-dnl Check for system NSS
+dnl Check for system NSS only with xmlsec or mozilla build enabled
dnl ===================================================================
-AC_MSG_CHECKING([whether to build provided NSS module])
-if test "$enable_nss_module" != "no"; then
- ENABLE_NSS_MODULE="YES"
+if test "x$enable_xmlsec" != "xno" -o "x$enable_mozilla" = "xyes"; then
+AC_MSG_CHECKING([which NSS to use])
+if test -n "$with_system_nss" -o -n "$with_system_headers" && \
+ test "$with_system_nss" != "no"; then
+ AC_MSG_RESULT([external])
+ SYSTEM_NSS="YES"
+ PKG_CHECK_MODULES(NSS, nss >= 3.9.3 nspr >= 4.8)
+else
+ SYSTEM_NSS="NO"
BUILD_TYPE="$BUILD_TYPE NSS"
- AC_MSG_RESULT([yes])
+ AC_MSG_RESULT([internal])
if test "$build_os" = "cygwin"; then
AC_MSG_CHECKING([for Mozilla build tooling])
if test -z "$MOZILLABUILD" ; then
@@ -6036,11 +6017,11 @@ from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32])
fi
fi
fi
-else
- ENABLE_NSS_MODULE="NO"
- AC_MSG_RESULT([no])
fi
-AC_SUBST(ENABLE_NSS_MODULE)
+fi
+AC_SUBST(SYSTEM_NSS)
+AC_SUBST(NSS_CFLAGS)
+AC_SUBST(NSS_LIBS)
dnl ===================================================================
dnl Check for system sane