curl: link against the internal NSS if SYSTEM_NSS=NO

This is somewhat non-obvious since there is no way to override curl
configure's use of pkg-config for NSS... it needs actually 2 include
paths, and the --with-nss takes only one (which is extended with
include/ and lib/).

Thanks to Alex Thurgood for the report.

Change-Id: I06074de50daad19a2cc62fe4090d3c0fbfdb2cb1
This commit is contained in:
Michael Stahl 2013-04-18 15:20:58 +02:00
parent b72c1a6575
commit 075023b473

View File

@ -17,15 +17,31 @@ $(eval $(call gb_ExternalProject_register_targets,curl,\
ifneq ($(OS),WNT) ifneq ($(OS),WNT)
curl_CPPFLAGS :=
curl_LDFLAGS :=
ifneq ($(SYSBASE),)
curl_CPPFLAGS += -I$(SYSBASE)/usr/include
curl_LDFLAGS += -L$(SYSBASE)/usr/lib
endif
# there are 2 include paths, the other one is passed to --with-nss below
ifeq ($(SYSTEM_NSS),NO)
curl_CPPFLAGS += -I$(call gb_UnpackedTarball_get_dir,nss)/mozilla/dist/public/nss
endif
$(call gb_ExternalProject_get_state_target,curl,build): $(call gb_ExternalProject_get_state_target,curl,build):
$(call gb_ExternalProject_run,build,\ $(call gb_ExternalProject_run,build,\
PATH=$(OUTDIR_FOR_BUILD)/bin:$$PATH ./configure --with-nss --without-ssl \ CPPFLAGS="$(curl_CPPFLAGS)" \
LDFLAGS="$(curl_LDFLAGS)" \
./configure \
--with-nss$(if $(filter NO,$(SYSTEM_NSS)),="$(call gb_UnpackedTarball_get_dir,nss)/mozilla/dist/out") \
--without-ssl \
--without-libidn --enable-ftp --enable-ipv6 --enable-http --disable-gopher \ --without-libidn --enable-ftp --enable-ipv6 --enable-http --disable-gopher \
--disable-file --disable-ldap --disable-telnet --disable-dict --without-libssh2 \ --disable-file --disable-ldap --disable-telnet --disable-dict --without-libssh2 \
$(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
$(if $(filter TRUE,$(DISABLE_DYNLOADING)),--disable-shared,--disable-static) \ $(if $(filter TRUE,$(DISABLE_DYNLOADING)),--disable-shared,--disable-static) \
$(if $(filter TRUE,$(ENABLE_DEBUG)),--enable-debug) \ $(if $(filter TRUE,$(ENABLE_DEBUG)),--enable-debug) \
$(if $(SYSBASE),CPPFLAGS="-I$(SYSBASE)/usr/include" LDFLAGS="-L$(SYSBASE)/usr/lib") \
&& cd lib \ && cd lib \
&& $(MAKE) \ && $(MAKE) \
) )
@ -34,7 +50,7 @@ else ifeq ($(OS)$(COM),WNTGCC)
$(call gb_ExternalProject_get_state_target,curl,build): $(call gb_ExternalProject_get_state_target,curl,build):
$(call gb_ExternalProject_run,build,\ $(call gb_ExternalProject_run,build,\
PATH=$(OUTDIR_FOR_BUILD)/bin:$$PATH ./configure --with-nss --without-ssl --enable-ftp --enable-ipv6 --disable-http --disable-gopher \ PATH=$(OUTDIR)/bin:$$PATH ./configure --with-nss --without-ssl --enable-ftp --enable-ipv6 --disable-http --disable-gopher \
--disable-file --disable-ldap --disable-telnet --disable-dict --build=i586-pc-mingw32 --host=i586-pc-mingw32 \ --disable-file --disable-ldap --disable-telnet --disable-dict --build=i586-pc-mingw32 --host=i586-pc-mingw32 \
$(if $(filter TRUE,$(ENABLE_DEBUG)),--enable-debug) \ $(if $(filter TRUE,$(ENABLE_DEBUG)),--enable-debug) \
CC="$(CC) -mthreads $(if $(filter YES,$(MINGW_SHARED_GCCLIB)),-shared-libgcc)" \ CC="$(CC) -mthreads $(if $(filter YES,$(MINGW_SHARED_GCCLIB)),-shared-libgcc)" \