diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-10-27 00:47:10 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-10-27 00:50:01 +0200 |
commit | 90d7723085a8da0929c7c17587a7717ceeb23d36 (patch) | |
tree | 0def5f9d0d22c6572c2fbe99e600de6041ea2d72 /postgresql | |
parent | c4bf336f658dea0cbbe5a907d4e921bcac3b8f6a (diff) |
postgresql: find both openssl and NSS libraries in their hiding places
Change-Id: I626bf288cb7375af1445bf86f5559a5587324e5d
Diffstat (limited to 'postgresql')
-rw-r--r-- | postgresql/ExternalProject_postgresql.mk | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/postgresql/ExternalProject_postgresql.mk b/postgresql/ExternalProject_postgresql.mk index 76903579cf4d..afa7ff3162b7 100644 --- a/postgresql/ExternalProject_postgresql.mk +++ b/postgresql/ExternalProject_postgresql.mk @@ -28,6 +28,28 @@ $(call gb_ExternalProject_get_state_target,postgresql,build) : else +postgresql_CPPFLAGS := $(ZLIB_CFLAGS) +postgresql_LDFLAGS := + +ifeq ($(DISABLE_OPENSSL),) +ifeq ($(SYSTEM_OPENSSL),NO) +postgresql_CPPFLAGS += -I$(call gb_UnpackedTarball_get_dir,openssl)/include +postgresql_LDFLAGS += -L$(call gb_UnpackedTarball_get_dir,openssl)/ +endif +endif + +ifeq ($(SYSTEM_OPENLDAP),NO) +postgresql_CPPFLAGS += -I$(call gb_UnpackedTarball_get_dir,openldap)/include +postgresql_LDFLAGS += \ + -L$(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap_r/.libs \ + -L$(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs \ + -L$(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs \ + $(if $(filter NO,$(SYSTEM_NSS)),\ + -L$(call gb_UnpackedTarball_get_dir,nss)/mozilla/dist/out/lib) \ + +endif + + $(call gb_ExternalProject_get_state_target,postgresql,build) : $(call gb_ExternalProject_run,build,\ ./configure \ @@ -36,15 +58,9 @@ $(call gb_ExternalProject_get_state_target,postgresql,build) : $(if $(DISABLE_OPENSSL),,--with-openssl \ $(if $(filter YES,$(WITH_KRB5)), --with-krb5) \ $(if $(filter YES,$(WITH_GSSAPI)),--with-gssapi)) \ - CPPFLAGS="$(ZLIB_CFLAGS) \ - $(if $(filter NO,$(SYSTEM_OPENLDAP)),\ - -I$(call gb_UnpackedTarball_get_dir,openldap/include)) \ - $(if $(DISABLE_OPENSSL),,$(if $(filter NO,$(SYSTEM_OPENSSL)),\ - -I$(call gb_UnpackedTarball_get_dir,openssl/include)))" \ - $(if $(filter NO,$(SYSTEM_OPENLDAP)), \ - LDFLAGS="-L$(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap_r/.libs -L$(call gb_UnpackedTarball_get_dir,openldap)/libraries/libldap/.libs -L$(call gb_UnpackedTarball_get_dir,openldap)/libraries/liblber/.libs -L$(OUTDIR)/lib" \ + CPPFLAGS="$(postgresql_CPPFLAGS)" \ + LDFLAGS="$(postgresql_LDFLAGS)" \ EXTRA_LDAP_LIBS="-llber -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4" \ - ) \ && cd src/interfaces/libpq \ && MAKEFLAGS= && $(MAKE) all-static-lib) |