fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / external / libxmlsec / xmlsec1-configure.patch
blob19fdc570d8063c5a097c5b163afc766ec8ccb21a
1 --- misc/xmlsec1-1.2.14/Makefile.am
2 +++ misc/build/xmlsec1-1.2.14/Makefile.am
3 @@ -1,8 +1,9 @@
4 NULL =
6 SAFE_VERSION = @XMLSEC_VERSION_SAFE@
7 -SUBDIRS = include src apps man docs
8 -TEST_APP = apps/xmlsec1$(EXEEXT)
9 +#Do not build xmlsec1 app. It is not needed. Also the libtool includes
10 +#a -L/path_to_lib_dir which may contain an incompatible lixbml2.
11 +SUBDIRS = include src man docs
12 DEFAULT_CRYPTO = @XMLSEC_CRYPTO@
14 bin_SCRIPTS = xmlsec1-config
15 --- misc/xmlsec1-1.2.14/Makefile.in 2009-06-25 22:53:34.000000000 +0200
16 +++ misc/build/xmlsec1-1.2.14/Makefile.in 2009-10-01 10:32:48.708515261 +0200
17 @@ -341,8 +341,9 @@
18 top_srcdir = @top_srcdir@
19 NULL =
20 SAFE_VERSION = @XMLSEC_VERSION_SAFE@
21 -SUBDIRS = include src apps man docs
22 -TEST_APP = apps/xmlsec1$(EXEEXT)
23 +#Do not build xmlsec1 app. It is not needed. Also the libtool includes
24 +#a -L/path_to_lib_dir which may contain an incompatible lixbml2.
25 +SUBDIRS = include src man docs
26 DEFAULT_CRYPTO = @XMLSEC_CRYPTO@
27 bin_SCRIPTS = xmlsec1-config
28 pkgconfig_DATA = xmlsec1.pc @XMLSEC_CRYPTO_PC_FILES_LIST@
29 --- misc/xmlsec1-1.2.14/configure.in 2009-06-25 22:53:18.000000000 +0200
30 +++ misc/build/xmlsec1-1.2.14/configure.in 2009-10-01 10:28:50.990755126 +0200
31 @@ -192,8 +192,8 @@
32 dnl ==========================================================================
33 LIBXML_MIN_VERSION="2.7.4"
34 LIBXML_CONFIG="xml2-config"
35 -LIBXML_CFLAGS=""
36 -LIBXML_LIBS=""
37 +LIBXML_CFLAGS="$LIBXML_CFLAGS"
38 +LIBXML_LIBS="$LIBXML_LIBS"
39 LIBXML_FOUND="no"
40 AC_ARG_WITH(libxml,
41 [ --with-libxml=[PFX] libxml2 location]
42 @@ -202,6 +202,8 @@
43 [ --with-libxml-src=[PFX] not installed yet libxml2 location]
46 +if test "z$LIBXML_CFLAGS" = "z" -o "z$LIBXML_LIBS" = "z"; then
48 if test "z$with_libxml" = "zno" -o "z$with_libxml_src" = "zno"; then
49 AC_MSG_CHECKING(for libxml2 libraries >= $LIBXML_MIN_VERSION)
50 AC_MSG_ERROR(libxml2 >= $LIBXML_MIN_VERSION is required for $XMLSEC_PACKAGE)
51 @@ -245,6 +247,8 @@
55 +fi
57 AC_SUBST(LIBXML_CFLAGS)
58 AC_SUBST(LIBXML_LIBS)
59 AC_SUBST(LIBXML_CONFIG)
60 @@ -555,12 +559,26 @@
62 XMLSEC_NO_NSS="1"
63 MOZILLA_MIN_VERSION="1.4"
64 +if test "z$MOZ_FLAVOUR" = "zfirefox" ; then
65 + MOZILLA_MIN_VERSION="1.0"
66 +fi
67 NSS_MIN_VERSION="3.2"
68 NSPR_MIN_VERSION="4.0"
69 NSS_CFLAGS=""
70 NSS_LIBS=""
71 -NSS_LIBS_LIST="-lnss3 -lsmime3"
72 -NSPR_LIBS_LIST="-lnspr4 -lplds4 -lplc4"
74 +case $host_os in
75 +cygwin* | mingw* | pw32*)
76 + NSS_LIBS_LIST="-lnss3 -lsmime3"
77 + NSPR_LIBS_LIST="-lnspr4"
78 + ;;
80 +*)
81 + NSS_LIBS_LIST="-lnss3 -lsmime3"
82 + NSPR_LIBS_LIST="-lnspr4 -lplds4 -lplc4"
83 + ;;
84 +esac
86 NSS_CRYPTO_LIB="$XMLSEC_PACKAGE-nss"
87 NSS_FOUND="no"
88 NSPR_PACKAGE=mozilla-nspr
89 @@ -586,6 +604,16 @@
90 dnl We are going to try all options
91 dnl
92 if test "z$NSS_FOUND" = "zno" ; then
93 + PKG_CHECK_MODULES(NSS, $MOZ_FLAVOUR-nspr >= $MOZILLA_MIN_VERSION $MOZ_FLAVOUR >= $MOZILLA_MIN_VERSION,
94 + [NSS_FOUND=yes NSPR_PACKAGE=$MOZ_FLAVOUR-nspr NSS_PACKAGE=$MOZ_FLAVOUR-nss],
95 + [NSS_FOUND=no])
96 + fi
97 + if test "z$NSS_FOUND" = "zno" ; then
98 + PKG_CHECK_MODULES(NSS, nss >= 3.9.3 nspr >= 4.8,
99 + [NSS_FOUND=yes NSPR_PACKAGE=nspr NSS_PACKAGE=nss],
100 + [NSS_FOUND=no])
101 + fi
102 + if test "z$NSS_FOUND" = "zno" ; then
103 PKG_CHECK_MODULES(NSS, mozilla-nspr >= $MOZILLA_MIN_VERSION mozilla-nss >= $MOZILLA_MIN_VERSION,
104 [NSS_FOUND=yes NSPR_PACKAGE=mozilla-nspr NSS_PACKAGE=mozilla-nss],
105 [NSS_FOUND=no])
106 @@ -612,8 +640,8 @@
107 ac_mozilla_name=mozilla-$MOZILLA_MIN_VERSION
110 - ac_nss_lib_dir="/usr/lib /usr/lib64 /usr/local/lib /usr/lib/$ac_mozilla_name /usr/local/lib/$ac_mozilla_name"
111 - 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"
112 + ac_nss_lib_dir="${WORKDIR}/UnpackedTarball/nss/dist/out/lib"
113 + ac_nss_inc_dir="${WORKDIR}/UnpackedTarball/nss/dist/out/include ${WORKDIR}/UnpackedTarball/nss/dist/public"
115 AC_MSG_CHECKING(for nspr libraries >= $NSPR_MIN_VERSION)
116 NSPR_INCLUDES_FOUND="no"
117 @@ -634,21 +662,21 @@
118 NSPR_PRINIT_H="$with_nspr/include/prinit.h"
119 else
120 for dir in $ac_nss_inc_dir ; do
121 - if test -f $dir/nspr/prinit.h ; then
122 + if test -f $dir/prinit.h ; then
123 dnl do not add -I/usr/include because compiler does it anyway
124 if test "z$dir" = "z/usr/include" ; then
125 NSPR_CFLAGS=""
126 else
127 - NSPR_CFLAGS="-I$dir/nspr"
128 + NSPR_CFLAGS="-I$dir"
130 NSPR_INCLUDES_FOUND="yes"
131 - NSPR_PRINIT_H="$dir/nspr/prinit.h"
132 + NSPR_PRINIT_H="$dir/prinit.h"
133 break
135 done
137 for dir in $ac_nss_lib_dir ; do
138 - if test -f $dir/libnspr4$shrext ; then
139 + if test -f $dir/libnspr4.so -o -f $dir/libnspr4.dylib ; then
140 dnl do not add -L/usr/lib because compiler does it anyway
141 if test "z$dir" = "z/usr/lib" ; then
142 NSPR_LIBS="$NSPR_LIBS_LIST"
143 @@ -719,7 +747,7 @@
144 done
146 for dir in $ac_nss_lib_dir ; do
147 - if test -f $dir/libnss3$shrext ; then
148 + if test -f $dir/libnss3.so -o -f $dir/libnss3.dylib ; then
149 dnl do not add -L/usr/lib because compiler does it anyway
150 if test "z$dir" = "z/usr/lib" ; then
151 NSS_LIBS="$NSS_LIBS_LIST"
152 @@ -738,7 +766,7 @@
154 if test "z$NSS_INCLUDES_FOUND" = "zyes" -a "z$NSS_LIBS_FOUND" = "zyes" ; then
155 OLD_CPPFLAGS=$CPPFLAGS
156 - CPPFLAGS="$NSS_CFLAGS"
157 + CPPFLAGS="$NSS_CFLAGS $NSPR_CFLAGS"
158 AC_EGREP_CPP(yes,[
159 #include <nss.h>
160 #if NSS_VMAJOR >= 3 && NSS_VMINOR >= 2
161 --- misc/xmlsec1-1.2.14/win32/Makefile.msvc 2009-06-25 22:53:18.000000000 +0200
162 +++ misc/build/xmlsec1-1.2.14/win32/Makefile.msvc 2009-10-01 10:28:50.997747312 +0200
163 @@ -376,7 +376,7 @@
164 XMLSEC_OPENSSL_SOLIBS = libeay32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib
165 XMLSEC_OPENSSL_ALIBS = libeay32.lib wsock32.lib kernel32.lib user32.lib gdi32.lib
167 -XMLSEC_NSS_SOLIBS = smime3.lib ssl3.lib nss3.lib libnspr4.lib libplds4.lib libplc4.lib kernel32.lib user32.lib gdi32.lib
168 +XMLSEC_NSS_SOLIBS = smime3.lib nss3.lib nspr4.lib kernel32.lib user32.lib gdi32.lib
169 XMLSEC_NSS_ALIBS = smime3.lib ssl3.lib nss3.lib libnspr4_s.lib libplds4_s.lib libplc4_s.lib kernel32.lib user32.lib gdi32.lib
171 XMLSEC_MSCRYPTO_SOLIBS = kernel32.lib user32.lib gdi32.lib Crypt32.lib Advapi32.lib