Version 4.0.2.1, tag libreoffice-4.0.2.1
[LibreOffice.git] / postgresql / ExternalProject_postgresql.mk
bloba0238529acc32b0f3756b82690980cd9bf069abd
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 $(eval $(call gb_ExternalProject_ExternalProject,postgresql))
12 $(eval $(call gb_ExternalProject_use_unpacked,postgresql,postgresql))
14 $(eval $(call gb_ExternalProject_use_package,postgresql,openldap))
16 $(eval $(call gb_ExternalProject_register_targets,postgresql,\
17 build \
20 ifeq ($(OS)$(COM),WNTMSC)
22 $(call gb_ExternalProject_get_state_target,postgresql,build) :
23 cd $(EXTERNAL_WORKDIR)/src \
24 && MAKEFLAGS= && nmake -f win32.mak USE_SSL=1 USE_LDAP=1 \
25 && touch $@
27 else
29 $(call gb_ExternalProject_get_state_target,postgresql,build) :
30 cd $(EXTERNAL_WORKDIR) \
31 && ./configure \
32 --without-readline --disable-shared --with-openssl --with-ldap \
33 $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
34 $(if $(filter YES,$(WITH_KRB5)),--with-krb5) \
35 $(if $(filter YES,$(WITH_GSSAPI)),--with-gssapi) \
36 $(if $(filter NO,$(SYSTEM_OPENLDAP)), \
37 CPPFLAGS="-I$(call gb_UnpackedTarball_get_dir,openldap/include)" \
38 LDFLAGS="-L$(OUTDIR)/lib" \
39 EXTRA_LDAP_LIBS="-llber -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4" \
40 ) \
41 && cd src/interfaces/libpq \
42 && MAKEFLAGS= && $(MAKE) all-static-lib libpq-flags.mk \
43 && touch $@
45 endif
47 # vim: set noet sw=4 ts=4: