summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@verizon.net>2013-03-25 21:27:10 -0400
committerPeter Foley <pefoley2@verizon.net>2013-03-26 11:39:37 -0400
commit4dd7010c007c89497b0b684ee4dbf699c2be1ee4 (patch)
treef5a3b2a64e3359dad71eccefa4ecaf653820e166
parentspeed-up module-deps.pl (diff)
downloadcore-4dd7010c007c89497b0b684ee4dbf699c2be1ee4.tar.gz
core-4dd7010c007c89497b0b684ee4dbf699c2be1ee4.zip
don't build postgresql just to parse the makefiles
When running module-deps.pl postgresql gets built just so that libpq-flags.mk can be included. Since we already have all the necessary libraries, add them explicitly and avoid this. Change-Id: Icd94fc215ecb26c95f9ae3c14625bf819bf3c5c3
-rw-r--r--config_host.mk.in2
-rw-r--r--configure.ac11
-rw-r--r--connectivity/Library_postgresql-sdbc-impl.mk13
-rw-r--r--postgresql/ExternalProject_postgresql.mk3
4 files changed, 22 insertions, 7 deletions
diff --git a/config_host.mk.in b/config_host.mk.in
index 5e68b4129ee9..354dc3ab1643 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -195,6 +195,7 @@ export GPERF=@GPERF@
export GRAPHITE_CFLAGS=$(gb_SPACE)@GRAPHITE_CFLAGS@
export GRAPHITE_LIBS=$(gb_SPACE)@GRAPHITE_LIBS@
@x_Cygwin@ export GREP=@WIN_GREP@
+export GSSAPI_LIBS=@GSSAPI_LIBS@
export GSTREAMER_0_10_CFLAGS=$(gb_SPACE)@GSTREAMER_0_10_CFLAGS@
export GSTREAMER_0_10_LIBS=$(gb_SPACE)@GSTREAMER_0_10_LIBS@
export GSTREAMER_CFLAGS=$(gb_SPACE)@GSTREAMER_CFLAGS@
@@ -276,6 +277,7 @@ export KDE_GLIB_CFLAGS=$(gb_SPACE)@KDE_GLIB_CFLAGS@
export KDE_GLIB_LIBS=$(gb_SPACE)@KDE_GLIB_LIBS@
export KDE_HAVE_GLIB=@KDE_HAVE_GLIB@
export KDE_LIBS=$(gb_SPACE)@KDE_LIBS@
+export KRB5_LIBS=@KRB5_LIBS@
export L10N_MODULE=@L10N_MODULE@
export LCMS2_CFLAGS=$(gb_SPACE)@LCMS2_CFLAGS@
export LCMS2_LIBS=$(gb_SPACE)@LCMS2_LIBS@
diff --git a/configure.ac b/configure.ac
index 5397ed4bb7be..5127e5ab34ea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7793,9 +7793,11 @@ if test "x$enable_postgresql_sdbc" != "xno"; then
save_LIBS=$LIBS
AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
[AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5, try installing libcom_err devel package])])
+ KRB5_LIBS=$LIBS
LIBS=$save_LIBS
AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
[AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5, try installing krb5 devel package])])
+ KRB5_LIBS="$KRB5_LIBS $LIBS"
LIBS=$save_LIBS
fi
if test "$with_gssapi" != "no"; then
@@ -7803,6 +7805,7 @@ if test "x$enable_postgresql_sdbc" != "xno"; then
save_LIBS=$LIBS
AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
[AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
+ GSSAPI_LIBS=$LIBS
LIBS=$save_LIBS
fi
;;
@@ -7817,9 +7820,11 @@ if test "x$enable_postgresql_sdbc" != "xno"; then
save_LIBS=$LIBS
AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
[AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
+ KRB5_LIBS=$LIBS
LIBS=$save_LIBS
AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
[AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
+ KRB5_LIBS="$KRB5_LIBS $LIBS"
LIBS=$save_LIBS
fi
if test "$with_gssapi" != "no"; then
@@ -7827,6 +7832,7 @@ if test "x$enable_postgresql_sdbc" != "xno"; then
save_LIBS=$LIBS
AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
[AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
+ GSSAPI_LIBS=$LIBS
LIBS=$save_LIBS
fi
;;
@@ -7836,9 +7842,11 @@ if test "x$enable_postgresql_sdbc" != "xno"; then
save_LIBS=$LIBS
AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
[AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
+ KRB5_LIBS=$LIBS
LIBS=$save_LIBS
AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
[AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
+ KRB5_LIBS="$KRB5_LIBS $LIBS"
LIBS=$save_LIBS
fi
if test "$with_gssapi" = "yes"; then
@@ -7847,6 +7855,7 @@ if test "x$enable_postgresql_sdbc" != "xno"; then
AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
[AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
LIBS=$save_LIBS
+ GSSAPI_LIBS=$LIBS
fi
esac
@@ -7881,6 +7890,8 @@ if test "x$enable_postgresql_sdbc" != "xno"; then
fi
AC_SUBST(WITH_KRB5)
AC_SUBST(WITH_GSSAPI)
+AC_SUBST(GSSAPI_LIBS)
+AC_SUBST(KRB5_LIBS)
AC_SUBST(BUILD_POSTGRESQL_SDBC)
AC_SUBST(SYSTEM_POSTGRESQL)
AC_SUBST(POSTGRESQL_INC)
diff --git a/connectivity/Library_postgresql-sdbc-impl.mk b/connectivity/Library_postgresql-sdbc-impl.mk
index 37c40746c7cf..d733f01662ea 100644
--- a/connectivity/Library_postgresql-sdbc-impl.mk
+++ b/connectivity/Library_postgresql-sdbc-impl.mk
@@ -60,18 +60,21 @@ endif
$(eval $(call gb_Library_use_externals,postgresql-sdbc-impl,\
boost_headers \
postgresql \
+ openssl \
+ openldap \
+ nss3 \
+ plc4 \
+ ssl3 \
))
ifneq ($(SYSTEM_POSTGRESQL),YES)
ifneq ($(OS)$(COM),WNTMSC)
--include $(OUTDIR)/inc/postgresql/libpq-flags.mk
-
$(eval $(call gb_Library_add_libs,postgresql-sdbc-impl,\
- $(if $(filter-out MACOSX,$(OS)),-Wl$(COMMA)--as-needed) \
- $(LIBPQ_DEP_LIBS) \
+ $(if $(filter YES,$(WITH_GSSAPI)),$(GSSAPI_LIBS)) \
+ $(if $(filter YES,$(WITH_KRB5)),$(KRB5_LIBS)) \
$(if $(filter-out MACOSX,$(OS)),-ldl) \
- $(if $(filter-out MACOSX,$(OS)),-Wl$(COMMA)--no-as-needed) \
+ $(if $(filter-out MACOSX,$(OS)),-lpthread) \
))
endif
diff --git a/postgresql/ExternalProject_postgresql.mk b/postgresql/ExternalProject_postgresql.mk
index 5fef28ecaaf6..19c10e313c57 100644
--- a/postgresql/ExternalProject_postgresql.mk
+++ b/postgresql/ExternalProject_postgresql.mk
@@ -44,8 +44,7 @@ $(call gb_ExternalProject_get_state_target,postgresql,build) :
EXTRA_LDAP_LIBS="-llber -lssl3 -lsmime3 -lnss3 -lnssutil3 -lplds4 -lplc4 -lnspr4" \
) \
&& cd src/interfaces/libpq \
- && MAKEFLAGS= && $(MAKE) all-static-lib libpq-flags.mk \
- )
+ && MAKEFLAGS= && $(MAKE) all-static-lib)
endif