Kaydet (Commit) f6f5c892 authored tarafından Tomas Chvatal's avatar Tomas Chvatal Kaydeden (comit) Jan Holesovsky

Rename --enable-nss-module to --with-system-nss + introduce --enable-xmlsec.

This also finishes the uncoupling of NSS from the --with-system-mozilla.
üst b5ec39a6
......@@ -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
......
......@@ -35,9 +35,9 @@ EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
.INCLUDE : settings.mk
.IF "$(ENABLE_NSS_MODULE)" == "NO" && "$(SYSTEM_MOZILLA)" != "YES"
.IF "$(ENABLE_XMLSEC)" == "NO"
@all:
@echo "NSS module disabled => no libxmlsec...."
@echo "XMLSec module disabled"
.ENDIF
# --- Files --------------------------------------------------------
......@@ -100,7 +100,7 @@ CONFIGURE_DIR=
CONFIGURE_ACTION=.$/configure
CONFIGURE_FLAGS=--with-libxslt=no --with-openssl=no --with-gnutls=no --with-mozilla_ver=1.7.5 --enable-mscrypto --disable-crypto-dl --build=i586-pc-mingw32 --host=i586-pc-mingw32 CC="$(xmlsec_CC)" LDFLAGS="-no-undefined -L$(ILIB:s/;/ -L/)" LIBS="$(xmlsec_LIBS)" LIBXML2LIB=$(LIBXML2LIB) ZLIB3RDLIB=$(ZLIB3RDLIB) OBJDUMP="$(WRAPCMD) objdump"
.IF "$(SYSTEM_MOZILLA)" != "YES"
.IF "$(SYSTEM_NSS)" != "YES"
CONFIGURE_FLAGS+=--enable-pkgconfig=no
.ENDIF
BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS)
......@@ -160,7 +160,7 @@ CONFIGURE_FLAGS=--with-pic --disable-shared --disable-crypto-dl --with-libxslt=n
# --with-nss or parse -pkg-config --libs / cflags mozilla-nss since
# the lib may a) be in /usr/lib (Debian) and be not in $with_nss/include
# $with_nss/lib.
.IF "$(SYSTEM_MOZILLA)" != "YES"
.IF "$(SYSTEM_NSS)" != "YES"
CONFIGURE_FLAGS+=--enable-pkgconfig=no
.ENDIF
BUILD_ACTION=$(GNUMAKE) -j$(EXTMAXPROCESS)
......
......@@ -35,7 +35,7 @@ INCLUDE_DIR=$(INCCOM)
#If we build the NSS module then we do not need the old nss libs from here
.IF "$(ENABLE_NSS_MODULE)"=="YES"
.IF "$(SYSTEM_NSS)"=="NO"
.IF "$(OS)" == "SOLARIS"
......@@ -95,7 +95,7 @@ BIN_RUNTIMELIST= \
softokn3 \
smime3 \
$(FREEBL_LIB)
.ENDIF # "$(ENABLE_NSS_MODULE)"=="YES"
.ENDIF # "$(SYSTEM_NSS)"=="NO"
.IF "$(GUI)"=="WNT"
BIN_RUNTIMELIST+= \
......@@ -164,7 +164,7 @@ DEFAULTS_RUNTIMELIST= \
greprefs$/all.js \
greprefs$/security-prefs.js
.IF "$(ENABLE_NSS_MODULE)"=="YES"
.IF "$(SYSTEM_NSS)"=="NO"
#These headers come from the separate NSS module if enabled
NSS_INCLUDE_LIST=
......@@ -205,7 +205,7 @@ LIBLIST= \
.ENDIF
.ELSE # .IF"$(ENABLE_NSS_MODULE)"=="YES"
.ELSE # .IF"$(SYSTEM_NSS)"=="NO"
.IF "$(GUI)"=="WNT"
.IF "$(COM)"=="GCC"
......@@ -258,7 +258,7 @@ LIBLIST= \
libsmime3$(DLLPOST)
.ENDIF
.ENDIF # .IF "$(ENABLE_NSS_MODULE)"=="YES"
.ENDIF # .IF "$(SYSTEM_NSS)"=="NO"
INCLUDE_PATH=$(MOZ_DIST_DIR)$/include$/
PUBLIC_PATH=$(MOZ_DIST_DIR)$/public$/
......@@ -301,14 +301,14 @@ $(MISC)$/build$/so_moz_runtime_files: $(OUT)$/bin$/mozruntime.zip
$(foreach,file,$(BIN_RUNTIMELIST) $(COPY) $(MOZ_BIN_DIR)$/$(DLLPRE)$(file)$(DLLPOST) \
$(LIB_DIR)$/$(DLLPRE)$(file)$(DLLPOST) &&) \
echo >& $(NULLDEV)
.IF "$(ENABLE_NSS_MODULE)" == "YES"
.IF "$(SYSTEM_NSS)" == "NO"
# We add the libraries from the separate nss module
$(foreach,file,$(NSS_MODULE_RUNTIME_LIST) $(COPY) $(SOLARLIBDIR)$/$(file:d:d)/$(DLLPRE)$(file:f)$(DLLPOST) \
$(RUNTIME_DIR)$/$(DLLPRE)$(file:f)$(DLLPOST) &&) \
echo >& $(NULLDEV)
.ENDIF
.ELSE # .IF "$(GUI)" == "UNX"
.IF "$(ENABLE_NSS_MODULE)" == "YES"
.IF "$(SYSTEM_NSS)" == "NO"
# We add the libraries from the separate nss module
$(foreach,file,$(NSS_MODULE_RUNTIME_LIST) $(COPY) $(SOLARBINDIR)$/$(DLLPRE)$(file)$(DLLPOST) \
$(RUNTIME_DIR)$/$(DLLPRE)$(file)$(DLLPOST) &&) \
......@@ -407,7 +407,7 @@ $(MISC)$/build$/so_moz_include_files: $(INCCOM)$/nsBuildID.h
chmod -R 775 $(INCCOM)
.ENDIF
$(TOUCH) $@
.IF "$(ENABLE_NSS_MODULE)"=="YES"
.IF "$(SYSTEM_NSS)"=="NO"
+$(foreach,dir,$(NSS_INCLUDE_LIST) $(RENAME:s/+//) $(INCLUDE_DIR)$/$(dir) $(INCLUDE_DIR)$/$(dir)_remove_me &&) echo >& $(NULLDEV)
$(foreach,dir,$(NSS_INCLUDE_LIST) rm -rf $(INCLUDE_DIR)$/$(dir)_remove_me &&) echo >& $(NULLDEV)
-$(MKDIR) $(OUT)$/inc.nss
......@@ -463,6 +463,6 @@ $(MISC)$/CREATETARBALL: extract_mozab_files
.ENDIF
cd $(LB) && zip -r ..$/zipped$/$(MOZTARGET)lib.zip *
cd $(INCCOM) && zip -r ..$/zipped$/$(MOZTARGET)inc.zip *
.IF "$(ENABLE_NSS_MODULE)"=="YES"
.IF "$(SYSTEM_NSS)"=="NO"
cd $(OUT)$/inc.nss && zip -r ..$/zipped$/$(MOZTARGET)inc.zip *
.ENDIF
......@@ -150,7 +150,7 @@ MOZILLA_CONFIGURE_FLAGS += --disable-tests \
--disable-pango \
--enable-extensions="pref"
.IF "$(ENABLE_NSS_MODULE)"=="YES"
.IF "$(SYSTEM_NSS)"=="NO"
MOZILLA_CONFIGURE_FLAGS += \
--with-nss-prefix=$(OUTDIR) \
......
......@@ -36,9 +36,9 @@ TARGET=nss
# --- Files --------------------------------------------------------
.IF "$(ENABLE_NSS_MODULE)"!="YES"
.IF "$(SYSTEM_NSS)"=="YES"
all:
@echo "NSS will not be built. ENABLE_NSS_MODULE is '$(ENABLE_NSS_MODULE)'"
@echo "NSS will not be built. Using system one instead."
.ENDIF
VER_MAJOR=3
......
......@@ -4,7 +4,7 @@ nss containes the security libraries which are also part of moz. However nss is
meant to be more current, that is it to be updated more often. This should be
easier than doing this with moz.
If nss is build depends on an environment variable (ENABLE_NSS_MODULE=YES) which
If nss is build depends on an environment variable (SYSTEM_NSS=NO) which
is per default set to YES. In this case nss is build before moz. The nss
libraries/lib files/headers built in moz are then not delivered. Otherwise they
would overwrite those from nss. That is, the nss libraries build in moz are
......
......@@ -1476,7 +1476,7 @@ ToFile( "BUILD_MOZAB", "@BUILD_MOZAB@", "e" );
ToFile( "PREBUILD_MOZAB", $PREBUILD_MOZAB, "e" );
ToFile( "MOZILLA_VERSION", $MOZILLA_VERSION, "e" );
ToFile( "DEFAULT_MOZILLA_TOOLKIT", $MOZILLA_TOOLKIT, "e" );
ToFile( "ENABLE_NSS_MODULE", "@ENABLE_NSS_MODULE@", "e" );
ToFile( "SYSTEM_NSS", "@SYSTEM_NSS@", "e" );
ToFile( "MOZILLABUILD", "@MOZILLABUILD@", "e" );
ToFile( "BUILD_VER_STRING", "@BUILD_VER_STRING@", "e" );
if ($platform =~ m/linux/ && $platform =~ m/powerpc/) {
......@@ -1807,19 +1807,17 @@ ToFile( "DICT_SYSTEM_DIR", "@DICT_SYSTEM_DIR@", "e");
ToFile( "HYPH_SYSTEM_DIR", "@HYPH_SYSTEM_DIR@", "e");
ToFile( "THES_SYSTEM_DIR", "@THES_SYSTEM_DIR@", "e");
ToFile( "ENABLE_LOCKDOWN", "@ENABLE_LOCKDOWN@", "e" );
ToFile( "ENABLE_XMLSEC", "@ENABLE_XMLSEC@", "e" );
ToFile( "WITH_LDAP", "@WITH_LDAP@", "e" );
ToFile( "WITH_OPENLDAP", "@WITH_OPENLDAP@", "e" );
ToFile( "WITH_MOZILLA", "@WITH_MOZILLA@", "e" );
ToFile( "SYSTEM_MOZILLA", "@SYSTEM_MOZILLA@", "e" );
ToFile( "MOZ_FLAVOUR", "@MOZ_FLAVOUR@", "e" );
ToFile( "NSPR_LIB", "@NSPR_LIB@", "e" );
ToFile( "NSS_LIB", "@NSS_LIB@", "e" );
ToFile( "NSS_LIBS", "@NSS_LIBS@", "e" );
ToFile( "NSS_CFLAGS", "@NSS_CFLAGS@", "e" );
ToFile( "MOZ_INC", "@MOZ_INC@", "e" );
ToFile( "MOZ_LIB", "@MOZ_LIB@", "e" );
ToFile( "MOZ_LIB_XPCOM", "@MOZ_LIB_XPCOM@", "e" );
ToFile( "MOZ_NSPR_CFLAGS", "@MOZ_NSPR_CFLAGS@", "e" );
ToFile( "MOZ_NSS_CFLAGS", "@MOZ_NSS_CFLAGS@", "e" );
ToFile( "MOZ_NSS_LIBS", "@MOZ_NSS_LIBS@", "e" );
ToFile( "MOZ_LDAP_CFLAGS", "@MOZ_LDAP_CFLAGS@", "e" );
ToFile( "OOOP_GALLERY_PACK", "@OOOP_GALLERY_PACK@","e" );
ToFile( "OOOP_TEMPLATES_PACK", "@OOOP_TEMPLATES_PACK@","e" );
......
......@@ -148,12 +148,11 @@ $(eval $(call gb_Library_add_exception_objects,xsec_xmlsec,\
endif # ifeq ($(GUI),WNT)
ifeq ($(SYSTEM_MOZILLA),YES)
ifeq ($(SYSTEM_NSS),YES)
$(eval $(call gb_Library_set_include,xsec_xmlsec,\
$$(INCLUDE) \
$(MOZ_NSPR_CFLAGS) \
$(MOZ_NSS_CFLAGS) \
$(NSS_CFLAGS) \
))
$(eval $(call gb_Library_add_defs,xsec_xmlsec,\
......@@ -161,9 +160,7 @@ $(eval $(call gb_Library_add_defs,xsec_xmlsec,\
))
$(eval $(call gb_Library_add_libs,xsec_xmlsec,\
$(NSPR_LIB) \
$(NSS_LIB) \
$(MOZ_NSS_LIBS) \
$(NSS_LIBS) \
))
else
......@@ -179,7 +176,7 @@ $(eval $(call gb_Library_add_linked_libs,xsec_xmlsec,\
nss3 \
))
endif # ifeq ($(SYSTEM_MOZILLA),YES)
endif # ifeq ($(SYSTEM_NSS),YES)
ifeq ($(OS),SOLARIS)
$(eval $(call gb_Library_add_linked_libs,xsec_xmlsec,\
......
......@@ -32,7 +32,7 @@ $(eval $(call gb_Module_add_targets,xmlsecurity,\
AllLangResTarget_xsec \
Library_xmlsecurity \
Library_xsec_fw \
$(if $(filter YES,$(ENABLE_NSS_MODULE) $(SYSTEM_MOZILLA)),Library_xsec_xmlsec) \
Library_xsec_xmlsec \
))
# failing
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment