summaryrefslogtreecommitdiff
path: root/external/postgresql/ExternalProject_postgresql.mk
diff options
context:
space:
mode:
Diffstat (limited to 'external/postgresql/ExternalProject_postgresql.mk')
-rw-r--r--external/postgresql/ExternalProject_postgresql.mk18
1 files changed, 9 insertions, 9 deletions
diff --git a/external/postgresql/ExternalProject_postgresql.mk b/external/postgresql/ExternalProject_postgresql.mk
index cec1fb62b541..1d0a13b6bb03 100644
--- a/external/postgresql/ExternalProject_postgresql.mk
+++ b/external/postgresql/ExternalProject_postgresql.mk
@@ -25,7 +25,9 @@ $(eval $(call gb_ExternalProject_use_nmake,postgresql,build))
$(call gb_ExternalProject_get_state_target,postgresql,build) :
$(call gb_Trace_StartRange,postgresql,EXTERNAL)
$(call gb_ExternalProject_run,build,\
- MSBFLAGS=/p:Platform=$(gb_MSBUILD_PLATFORM) \
+ MSBFLAGS="/p:Platform=$(gb_MSBUILD_PLATFORM) \
+ /p:PlatformToolset=$(VCTOOLSET) /p:VisualStudioVersion=$(VCVER) /ToolsVersion:Current \
+ $(if $(filter 10,$(WINDOWS_SDK_VERSION)),/p:WindowsTargetPlatformVersion=$(UCRTVERSION))" \
$(PERL) build.pl $(gb_MSBUILD_CONFIG) libpq \
,src/tools/msvc)
$(call gb_Trace_EndRange,postgresql,EXTERNAL)
@@ -39,10 +41,10 @@ ifeq ($(SYSTEM_ZLIB),)
postgresql_LDFLAGS += $(ZLIB_LIBS)
endif
-ifeq ($(DISABLE_OPENSSL),)
+ifeq ($(ENABLE_OPENSSL),TRUE)
ifeq ($(SYSTEM_OPENSSL),)
postgresql_CPPFLAGS += -I$(call gb_UnpackedTarball_get_dir,openssl)/include
-postgresql_LDFLAGS += -L$(call gb_UnpackedTarball_get_dir,openssl)/ $(if $(filter $(OS),LINUX),-pthread)
+postgresql_LDFLAGS += -L$(call gb_UnpackedTarball_get_dir,openssl) $(if $(filter $(OS),LINUX),-pthread)
endif
endif
@@ -52,8 +54,6 @@ 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 $(SYSTEM_NSS),,\
- -L$(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib) \
endif
@@ -63,18 +63,18 @@ endif
$(call gb_ExternalProject_get_state_target,postgresql,build) :
$(call gb_Trace_StartRange,postgresql,EXTERNAL)
$(call gb_ExternalProject_run,build,\
- ./configure \
+ $(gb_RUN_CONFIGURE) ./configure \
--without-readline \
--without-zlib \
--with-ldap \
- $(if $(CROSS_COMPILING),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
- $(if $(DISABLE_OPENSSL),,--with-openssl \
+ $(gb_CONFIGURE_PLATFORMS) \
+ $(if $(ENABLE_OPENSSL),--with-openssl \
$(if $(WITH_GSSAPI),--with-gssapi)) \
$(if $(ENABLE_LDAP),,--with-ldap=no) \
CFLAGS="-fPIC" \
CPPFLAGS="$(postgresql_CPPFLAGS)" \
LDFLAGS="$(postgresql_LDFLAGS)" \
- $(if $(ENABLE_LDAP),EXTRA_LDAP_LIBS="-llber -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4") \
+ $(if $(ENABLE_LDAP),EXTRA_LDAP_LIBS="-llber") \
&& cd src/interfaces/libpq \
&& MAKEFLAGS= && $(MAKE) MAKELEVEL=0 all-static-lib)
$(call gb_Trace_EndRange,postgresql,EXTERNAL)