diff options
author | Tomas Chvatal <tchvatal@suse.cz> | 2011-11-02 17:36:27 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-11-02 17:37:53 +0100 |
commit | f6f5c89259867b5aeb86d5509f826da949d122c4 (patch) | |
tree | 89fd68e2d15904c775be50d163b9826ba7aee345 | |
parent | b5ec39a65e8b5d78f9f58bc179e9130c81ec347a (diff) |
Rename --enable-nss-module to --with-system-nss + introduce --enable-xmlsec.
This also finishes the uncoupling of NSS from the --with-system-mozilla.
-rw-r--r-- | configure.in | 77 | ||||
-rw-r--r-- | libxmlsec/makefile.mk | 8 | ||||
-rw-r--r-- | moz/extractfiles.mk | 18 | ||||
-rw-r--r-- | moz/makefile.mk | 2 | ||||
-rw-r--r-- | nss/makefile.mk | 4 | ||||
-rwxr-xr-x | nss/readme.txt | 2 | ||||
-rwxr-xr-x | set_soenv.in | 10 | ||||
-rw-r--r-- | xmlsecurity/Library_xsec_xmlsec.mk | 11 | ||||
-rw-r--r-- | xmlsecurity/Module_xmlsecurity.mk | 2 |
9 files changed, 55 insertions, 79 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 diff --git a/libxmlsec/makefile.mk b/libxmlsec/makefile.mk index 3ef990f16213..5388580fd960 100644 --- a/libxmlsec/makefile.mk +++ b/libxmlsec/makefile.mk @@ -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) diff --git a/moz/extractfiles.mk b/moz/extractfiles.mk index 4741ff43bdef..793c281b68a4 100644 --- a/moz/extractfiles.mk +++ b/moz/extractfiles.mk @@ -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 diff --git a/moz/makefile.mk b/moz/makefile.mk index 020fa693208a..4487bc11004c 100644 --- a/moz/makefile.mk +++ b/moz/makefile.mk @@ -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) \ diff --git a/nss/makefile.mk b/nss/makefile.mk index 9fdc9e601074..bc7b827be1ae 100644 --- a/nss/makefile.mk +++ b/nss/makefile.mk @@ -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 diff --git a/nss/readme.txt b/nss/readme.txt index df65908204c4..21d7d5487221 100755 --- a/nss/readme.txt +++ b/nss/readme.txt @@ -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 diff --git a/set_soenv.in b/set_soenv.in index 2505e193e8f0..6a97b454a1cc 100755 --- a/set_soenv.in +++ b/set_soenv.in @@ -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" ); diff --git a/xmlsecurity/Library_xsec_xmlsec.mk b/xmlsecurity/Library_xsec_xmlsec.mk index f51fd9d9143c..90dcad0ee939 100644 --- a/xmlsecurity/Library_xsec_xmlsec.mk +++ b/xmlsecurity/Library_xsec_xmlsec.mk @@ -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,\ diff --git a/xmlsecurity/Module_xmlsecurity.mk b/xmlsecurity/Module_xmlsecurity.mk index b32ff3b8fbbe..2e6e8d9bb571 100644 --- a/xmlsecurity/Module_xmlsecurity.mk +++ b/xmlsecurity/Module_xmlsecurity.mk @@ -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 |