tdf#99528: revert vertical tabs changes (24.8 only)
[LibreOffice.git] / external / xmlsec / ExternalProject_xmlsec.mk
blob06e737c3c952e819211b70b28d8a1c1af8db07eb
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 $(eval $(call gb_ExternalProject_ExternalProject,xmlsec))
12 $(eval $(call gb_ExternalProject_use_externals,xmlsec,\
13 libxml2 \
14 $(if $(ENABLE_NSS),nss3,$(if $(ENABLE_OPENSSL),openssl)) \
17 $(eval $(call gb_ExternalProject_register_targets,xmlsec,\
18 build \
21 # note: it's possible to use XSLT in XML signatures - that appears to be a
22 # really bad idea from a security point of view though, because it will run
23 # an XSLT script supplied as untrusted input, and XSLT implementations
24 # tend to have extension functions, and some of these trivially allow
25 # running arbitrary code... so investigate the situation with libxslt
26 # before enabling it here; hopefully nobody uses XSLT in practice anyway.
28 ifeq ($(OS),WNT)
30 $(eval $(call gb_ExternalProject_use_nmake,xmlsec,build))
32 $(call gb_ExternalProject_get_state_target,xmlsec,build) :
33 $(call gb_Trace_StartRange,xmlsec,EXTERNAL)
34 $(call gb_ExternalProject_run,build,\
35 cscript /e:javascript configure.js crypto=mscng xslt=no iconv=no static=no \
36 lib=$(gb_UnpackedTarball_workdir)/libxml2/win32/bin.msvc \
37 $(if $(filter TRUE,$(ENABLE_DBGUTIL)),debug=yes cruntime=/MDd) \
38 cflags="$(SOLARINC) -I$(WORKDIR)/UnpackedTarball/libxml2/include -I$(WORKDIR)/UnpackedTarball/icu/source/i18n -I$(WORKDIR)/UnpackedTarball/icu/source/common" \
39 && nmake \
40 ,win32)
41 $(call gb_Trace_EndRange,xmlsec,EXTERNAL)
43 else
45 $(call gb_ExternalProject_get_state_target,xmlsec,build) :
46 $(call gb_Trace_StartRange,xmlsec,EXTERNAL)
47 $(call gb_ExternalProject_run,build,\
48 $(if $(filter iOS MACOSX,$(OS_FOR_BUILD)),ACLOCAL="aclocal -I $(SRCDIR)/m4/mac") \
49 autoreconf \
50 && $(gb_RUN_CONFIGURE) ./configure \
51 --with-pic --disable-shared --disable-crypto-dl --without-libxslt --without-gnutls --without-gcrypt --disable-apps --disable-docs --disable-pedantic \
52 $(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
53 $(if $(filter -fsanitize=undefined,$(CC)),CC='$(CC) -fno-sanitize=function') \
54 CFLAGS="$(CFLAGS) $(call gb_ExternalProject_get_build_flags,xmlsec) $(gb_VISIBILITY_FLAGS)" \
55 $(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
56 $(if $(ENABLE_NSS), \
57 --without-openssl \
58 $(if $(SYSTEM_NSS),, \
59 $(if $(filter MACOSX,$(OS_FOR_BUILD)),--disable-pkgconfig) \
60 NSPR_CFLAGS="-I$(gb_UnpackedTarball_workdir)/nss/dist/out/include" NSPR_LIBS="-L$(gb_UnpackedTarball_workdir)/nss/dist/out/lib -lnspr4" \
61 NSS_CFLAGS="-I$(gb_UnpackedTarball_workdir)/nss/dist/public/nss" NSS_LIBS="-L$(gb_UnpackedTarball_workdir)/nss/dist/out/lib -lsmime3 -lnss3 -lnssutil3" \
62 ), \
63 $(if $(ENABLE_OPENSSL), \
64 $(if $(SYSTEM_OPENSSL),, \
65 OPENSSL_CFLAGS="-I$(gb_UnpackedTarball_workdir)/openssl/include" \
66 OPENSSL_LIBS="-L$(gb_UnpackedTarball_workdir)/openssl -lcrypto -lssl" \
67 ), \
68 --without-openssl) \
69 ) \
70 $(gb_CONFIGURE_PLATFORMS) \
71 $(if $(SYSBASE),CFLAGS="-I$(SYSBASE)/usr/include" \
72 LDFLAGS="$(call gb_ExternalProject_get_link_flags,xmlsec) -L$(SYSBASE)/usr/lib $(if $(filter-out LINUX FREEBSD,$(OS)),",-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath$(COMMA)\\"\$$\$$ORIGIN)) \
73 && $(MAKE) \
75 $(call gb_Trace_EndRange,xmlsec,EXTERNAL)
77 endif
79 # vim: set noet sw=4 ts=4: