From 633ee29e9b15eb2b9d7dc3adb76dfea50ce31221 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Fri, 4 Mar 2016 16:06:19 +0100 Subject: [PATCH] xmlsec1-configure.patch Conflicts: Makefile.am Makefile.in configure.ac win32/Makefile.msvc --- configure.ac | 42 +++++++++++++++++++++++++++++++++--------- win32/Makefile.msvc | 2 +- 2 files changed, 34 insertions(+), 10 deletions(-) diff --git a/configure.ac b/configure.ac index 32782002..1c19c223 100644 --- a/configure.ac +++ b/configure.ac @@ -570,12 +570,26 @@ dnl ========================================================================== XMLSEC_NO_NSS="1" SEAMONKEY_MIN_VERSION="1.0" MOZILLA_MIN_VERSION="1.4" +if test "z$MOZ_FLAVOUR" = "zfirefox" ; then + MOZILLA_MIN_VERSION="1.0" +fi NSS_MIN_VERSION="3.11.1" NSPR_MIN_VERSION="4.4.1" NSS_CFLAGS="" NSS_LIBS="" -NSS_LIBS_LIST="-lnss3 -lsmime3" -NSPR_LIBS_LIST="-lnspr4 -lplds4 -lplc4" + +case $host_os in +cygwin* | pw32*) + NSS_LIBS_LIST="-lnss3 -lsmime3" + NSPR_LIBS_LIST="-lnspr4" + ;; + +*) + NSS_LIBS_LIST="-lnss3 -lsmime3" + NSPR_LIBS_LIST="-lnspr4 -lplds4 -lplc4" + ;; +esac + NSS_CRYPTO_LIB="$XMLSEC_PACKAGE-nss" NSS_FOUND="no" NSPR_PACKAGE=mozilla-nspr @@ -602,6 +616,16 @@ elif test "z$with_nss" = "z" -a "z$with_nspr" = "z" -a "z$with_mozilla_ver" = "z dnl We are going to try all options dnl if test "z$NSS_FOUND" = "zno" ; then + PKG_CHECK_MODULES(NSS, $MOZ_FLAVOUR-nspr >= $MOZILLA_MIN_VERSION $MOZ_FLAVOUR >= $MOZILLA_MIN_VERSION, + [NSS_FOUND=yes NSPR_PACKAGE=$MOZ_FLAVOUR-nspr NSS_PACKAGE=$MOZ_FLAVOUR-nss], + [NSS_FOUND=no]) + fi + if test "z$NSS_FOUND" = "zno" ; then + PKG_CHECK_MODULES(NSS, nss >= 3.9.3 nspr >= 4.8, + [NSS_FOUND=yes NSPR_PACKAGE=nspr NSS_PACKAGE=nss], + [NSS_FOUND=no]) + fi + if test "z$NSS_FOUND" = "zno" ; then PKG_CHECK_MODULES(NSS, seamonkey-nspr >= $NSPR_MIN_VERSION seamonkey-nss >= $SEAMONKEY_MIN_VERSION, [NSS_FOUND=yes NSPR_PACKAGE=seamonkey-nspr NSS_PACKAGE=seamonkey-nss], [NSS_FOUND=no]) @@ -633,8 +657,8 @@ if test "z$NSS_FOUND" = "zno" ; then ac_mozilla_name=mozilla-$MOZILLA_MIN_VERSION fi - ac_nss_lib_dir="/usr/lib /usr/lib64 /usr/local/lib /usr/lib/$ac_mozilla_name /usr/local/lib/$ac_mozilla_name" - ac_nss_inc_dir="/usr/include /usr/include/mozilla /usr/local/include /usr/local/include/mozilla /usr/include/$ac_mozilla_name /usr/local/include/$ac_mozilla_name" + ac_nss_lib_dir="${WORKDIR}/UnpackedTarball/nss/dist/out/lib" + ac_nss_inc_dir="${WORKDIR}/UnpackedTarball/nss/dist/out/include ${WORKDIR}/UnpackedTarball/nss/dist/public" AC_MSG_CHECKING(for nspr libraries >= $NSPR_MIN_VERSION) NSPR_INCLUDES_FOUND="no" @@ -655,21 +679,21 @@ if test "z$NSS_FOUND" = "zno" ; then NSPR_PRINIT_H="$with_nspr/include/prinit.h" else for dir in $ac_nss_inc_dir ; do - if test -f $dir/nspr/prinit.h ; then + if test -f $dir/prinit.h ; then dnl do not add -I/usr/include because compiler does it anyway if test "z$dir" = "z/usr/include" ; then NSPR_CFLAGS="" else - NSPR_CFLAGS="-I$dir/nspr" + NSPR_CFLAGS="-I$dir" fi NSPR_INCLUDES_FOUND="yes" - NSPR_PRINIT_H="$dir/nspr/prinit.h" + NSPR_PRINIT_H="$dir/prinit.h" break fi done for dir in $ac_nss_lib_dir ; do - if test -f $dir/libnspr4$shrext ; then + if test -f $dir/libnspr4.so -o -f $dir/libnspr4.dylib ; then dnl do not add -L/usr/lib because compiler does it anyway if test "z$dir" = "z/usr/lib" ; then NSPR_LIBS="$NSPR_LIBS_LIST" @@ -740,7 +764,7 @@ if test "z$NSS_FOUND" = "zno" ; then done for dir in $ac_nss_lib_dir ; do - if test -f $dir/libnss3$shrext ; then + if test -f $dir/libnss3.so -o -f $dir/libnss3.dylib ; then dnl do not add -L/usr/lib because compiler does it anyway if test "z$dir" = "z/usr/lib" ; then NSS_LIBS="$NSS_LIBS_LIST" diff --git a/win32/Makefile.msvc b/win32/Makefile.msvc index 5a7e2d13..e34c3e9f 100644 --- a/win32/Makefile.msvc +++ b/win32/Makefile.msvc @@ -399,7 +399,7 @@ XMLSEC_OPENSSL_SOLIBS = libeay32.lib wsock32.lib kernel32.lib user32.lib gdi32 XMLSEC_OPENSSL_ALIBS = libeay32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib crypt32.lib advapi32.lib !endif -XMLSEC_NSS_SOLIBS = smime3.lib ssl3.lib nss3.lib libnspr4.lib libplds4.lib libplc4.lib kernel32.lib user32.lib gdi32.lib +XMLSEC_NSS_SOLIBS = smime3.lib nss3.lib nspr4.lib kernel32.lib user32.lib gdi32.lib XMLSEC_NSS_ALIBS = smime3.lib ssl3.lib nss3.lib libnspr4_s.lib libplds4_s.lib libplc4_s.lib kernel32.lib user32.lib gdi32.lib XMLSEC_MSCRYPTO_SOLIBS = kernel32.lib user32.lib gdi32.lib Crypt32.lib Advapi32.lib -- 2.13.5