2012-10-29 10:50:32 -04:00
|
|
|
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
|
|
|
|
#
|
|
|
|
# This file is part of the LibreOffice project.
|
|
|
|
#
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
#
|
|
|
|
|
2013-05-06 23:46:30 +02:00
|
|
|
$(eval $(call gb_ExternalProject_ExternalProject,curl))
|
2012-10-29 10:50:32 -04:00
|
|
|
|
2013-04-19 12:41:49 +02:00
|
|
|
$(eval $(call gb_ExternalProject_use_externals,curl,\
|
2016-12-19 13:19:57 +00:00
|
|
|
$(if $(ENABLE_NSS),nss3) \
|
2013-04-19 12:41:49 +02:00
|
|
|
zlib \
|
|
|
|
))
|
|
|
|
|
2012-10-29 10:50:32 -04:00
|
|
|
$(eval $(call gb_ExternalProject_register_targets,curl,\
|
|
|
|
build \
|
|
|
|
))
|
|
|
|
|
2012-12-12 01:07:09 +02:00
|
|
|
ifneq ($(OS),WNT)
|
2012-10-29 22:57:34 +01:00
|
|
|
|
2013-04-18 15:20:58 +02:00
|
|
|
curl_CPPFLAGS :=
|
2017-09-06 23:24:08 +02:00
|
|
|
curl_LDFLAGS := $(if $(filter LINUX FREEBSD,$(OS)),-Wl$(COMMA)-z$(COMMA)origin -Wl$(COMMA)-rpath$(COMMA)\$$$$ORIGIN)
|
2013-04-18 15:20:58 +02:00
|
|
|
|
2013-10-30 20:06:18 +02:00
|
|
|
ifneq ($(OS),ANDROID)
|
2013-04-18 15:20:58 +02:00
|
|
|
ifneq ($(SYSBASE),)
|
|
|
|
curl_CPPFLAGS += -I$(SYSBASE)/usr/include
|
|
|
|
curl_LDFLAGS += -L$(SYSBASE)/usr/lib
|
|
|
|
endif
|
2013-10-30 20:06:18 +02:00
|
|
|
endif
|
2013-04-18 15:20:58 +02:00
|
|
|
|
|
|
|
# there are 2 include paths, the other one is passed to --with-nss below
|
2014-02-11 15:57:18 +01:00
|
|
|
ifeq ($(SYSTEM_NSS),)
|
2013-11-13 17:08:03 +01:00
|
|
|
curl_CPPFLAGS += -I$(call gb_UnpackedTarball_get_dir,nss)/dist/public/nss
|
2013-04-18 15:20:58 +02:00
|
|
|
endif
|
|
|
|
|
2014-03-02 06:41:51 -05:00
|
|
|
# use --with-darwinssl on Mac OS X >10.5 and iOS to get a native UI for SSL certs for CMIS usage
|
|
|
|
# use --with-nss only on platforms other than Mac OS X and iOS
|
2012-10-29 10:50:32 -04:00
|
|
|
$(call gb_ExternalProject_get_state_target,curl,build):
|
2013-02-21 08:15:39 -06:00
|
|
|
$(call gb_ExternalProject_run,build,\
|
2013-04-18 15:20:58 +02:00
|
|
|
./configure \
|
2015-06-02 15:48:13 +02:00
|
|
|
$(if $(filter IOS MACOSX,$(OS)),\
|
|
|
|
--with-darwinssl,\
|
2016-12-19 13:19:57 +00:00
|
|
|
$(if $(ENABLE_NSS),--with-nss$(if $(SYSTEM_NSS),,="$(call gb_UnpackedTarball_get_dir,nss)/dist/out"),--without-nss)) \
|
2015-06-02 15:45:59 +02:00
|
|
|
--without-ssl --without-gnutls --without-polarssl --without-cyassl --without-axtls \
|
2017-08-09 17:14:11 +02:00
|
|
|
--enable-ftp --enable-http --enable-ipv6 \
|
|
|
|
--without-libidn2 --without-libpsl --without-librtmp \
|
|
|
|
--without-libssh2 --without-metalink --without-nghttp2 \
|
|
|
|
--disable-ares \
|
|
|
|
--disable-dict --disable-file --disable-gopher --disable-imap \
|
|
|
|
--disable-ldap --disable-ldaps --disable-manual --disable-pop3 \
|
|
|
|
--disable-rtsp --disable-smb --disable-smtp --disable-telnet \
|
|
|
|
--disable-tftp \
|
2016-03-10 14:54:28 +01:00
|
|
|
$(if $(filter LINUX,$(OS)),--without-ca-bundle --without-ca-path) \
|
2014-02-27 16:19:43 +01:00
|
|
|
$(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
|
2013-02-21 08:15:39 -06:00
|
|
|
$(if $(filter TRUE,$(DISABLE_DYNLOADING)),--disable-shared,--disable-static) \
|
2014-08-29 17:14:53 +02:00
|
|
|
$(if $(ENABLE_DEBUG),--enable-debug) \
|
2017-09-06 23:21:40 +02:00
|
|
|
$(if $(verbose),--disable-silent-rules,--enable-silent-rules) \
|
2014-01-20 23:29:27 +01:00
|
|
|
$(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
|
2017-09-20 22:53:45 +02:00
|
|
|
$(if $(filter MACOSX,$(OS)),CFLAGS='$(CFLAGS) \
|
|
|
|
-mmacosx-version-min=$(MAC_OS_X_VERSION_MIN_REQUIRED_DOTS)') \
|
2017-09-06 23:24:08 +02:00
|
|
|
CPPFLAGS='$(curl_CPPFLAGS)' \
|
|
|
|
LDFLAGS='$(curl_LDFLAGS)' \
|
Pass --without-system-zlib into external/curl
For (implicit) --with-zlib, curl's configure would insist on calling pkg-config
and insist on using -lz to link against the zlib library. None of that fits
LO's --without-system-zlib option.
So make curl's configure honor any passed in ZLIB_CLFAGS/LIBS (unless --without-
zlib were explicitly specified; also, ZLIB_CLFAGS/LIBS would override any
explicitly specified --with-zlib=PATH, which could be considered an error, but
we do never explicitly specify --with-zlib=PATH in
external/curl/ExternalProject_curl.mk, anyway).
Both ZLIB_CLFAGS/LIBS are set in config_host.mk, so are always set as env vars,
so would already be visible to curl's configure. I nevertheless pass them into
curl's configure explicitly in external/curl/ExternalProject_curl.mk, to make
that more obvious.
With (implicit) --with-system-zlib, LO's configure.ac will set ZLIB_LIBS and
leave ZLIB_CFLAGS empty (and checks that zlib.h is indeed available without any
ZLIB_CLFAGS being necessary). And with --without-system-zlib, LO's configure.ac
will set both ZLIB_CFLAGS/LIBS. So curl's configure, as invoked from
external/curl/ExternalProject_curl.mk, will now always go into the newly added
case honoring any passed in ZLIB_CLFAGS/LIBS, which should thus always work out
nicely and use the same zlib settings as configured for LO itself.
(For documentation purposes, external/curl/zlib.patch.0 also contains the
changes to curl's configure.ac that are reflected in the changes to curl's
configure.)
Change-Id: Icf5eefe44a7f9beb8a43a9af381f46e5c8b98b04
Reviewed-on: https://gerrit.libreoffice.org/42032
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-09-06 23:28:46 +02:00
|
|
|
ZLIB_CFLAGS='$(ZLIB_CFLAGS)' ZLIB_LIBS='$(ZLIB_LIBS)' \
|
2013-02-21 08:15:39 -06:00
|
|
|
&& cd lib \
|
|
|
|
&& $(MAKE) \
|
|
|
|
)
|
2012-10-29 22:57:34 +01:00
|
|
|
|
2012-10-29 10:50:32 -04:00
|
|
|
else ifeq ($(COM),MSC)
|
2012-10-29 22:57:34 +01:00
|
|
|
|
2012-10-29 10:50:32 -04:00
|
|
|
$(call gb_ExternalProject_get_state_target,curl,build):
|
2013-02-21 08:15:39 -06:00
|
|
|
$(call gb_ExternalProject_run,build,\
|
2017-10-23 17:43:21 +02:00
|
|
|
CC="$(shell cygpath -w $(filter-out -%,$(CC))) $(filter -%,$(CC))" \
|
|
|
|
MAKEFLAGS= LIB="$(ILIB)" nmake -f Makefile.vc \
|
|
|
|
mode=dll \
|
|
|
|
VC=12 \
|
|
|
|
$(if $(filter X86_64,$(CPUNAME)),MACHINE=x64,MACHINE=x86) \
|
|
|
|
GEN_PDB=$(if $(gb_SYMBOL),yes,no) \
|
|
|
|
DEBUG=$(if $(MSVC_USE_DEBUG_RUNTIME),yes,no) \
|
|
|
|
ENABLE_IPV6=yes \
|
|
|
|
ENABLE_SSPI=yes \
|
|
|
|
ENABLE_WINSSL=yes \
|
|
|
|
,winbuild)
|
2012-10-29 10:50:32 -04:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
# vim: set noet sw=4 ts=4:
|