summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-10-27 00:47:10 +0200
committerMichael Stahl <mstahl@redhat.com>2013-10-27 00:50:01 +0200
commit90d7723085a8da0929c7c17587a7717ceeb23d36 (patch)
tree0def5f9d0d22c6572c2fbe99e600de6041ea2d72
parentc4bf336f658dea0cbbe5a907d4e921bcac3b8f6a (diff)
postgresql: find both openssl and NSS libraries in their hiding places
Change-Id: I626bf288cb7375af1445bf86f5559a5587324e5d
-rw-r--r--openldap/ExternalProject_openldap.mk2
-rw-r--r--postgresql/ExternalProject_postgresql.mk32
2 files changed, 25 insertions, 9 deletions
diff --git a/openldap/ExternalProject_openldap.mk b/openldap/ExternalProject_openldap.mk
index 66385e88d3ef..36c844c0b6d5 100644
--- a/openldap/ExternalProject_openldap.mk
+++ b/openldap/ExternalProject_openldap.mk
@@ -9,7 +9,7 @@
$(eval $(call gb_ExternalProject_ExternalProject,openldap))
-$(eval $(call gb_ExternalProject_use_package,openldap,nss))
+$(eval $(call gb_ExternalProject_use_externals,openldap,nss3))
$(eval $(call gb_ExternalProject_register_targets,openldap,\
build \
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)