aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2004-12-16 18:13:07 +0000
committerBruce Momjian <bruce@momjian.us>2004-12-16 18:13:07 +0000
commitd0c01f29dfba8892d12685bd148d41ccdec2614b (patch)
tree7bf652027dda9a7e870aca4ff4011d3717ab309a
parentb5498167d7569875cb91ae0cf06a649d3f9f41a6 (diff)
downloadpostgresql-d0c01f29dfba8892d12685bd148d41ccdec2614b.tar.gz
postgresql-d0c01f29dfba8892d12685bd148d41ccdec2614b.zip
Allow --enable-thread-safety with --disable-shared libraries by passing
PTHREAD_LIBS to all libpq-usage builds.
-rw-r--r--src/Makefile.global.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 4edd8ca7c10..a74833ba6aa 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -1,5 +1,5 @@
# -*-makefile-*-
-# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.206 2004/12/16 17:48:29 momjian Exp $
+# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.207 2004/12/16 18:13:07 momjian Exp $
#------------------------------------------------------------------------------
# All PostgreSQL makefiles include this file and use the variables it sets,
@@ -308,11 +308,17 @@ endif
libpq = -L$(libpq_builddir) -lpq
+# If doing static linking, shared library dependency can't be
+# used so we specify pthread libs for every usage of libpq
+ifeq ($(enable_shared), no)
+libpq += $(PTHREAD_LIBS)
+else
# AIX libraries do not remember their required libs so we have to force
# thread dependent libraires in the link
ifeq ($(PORTNAME), aix)
libpq += $(PTHREAD_LIBS)
endif
+endif
submake-libpq:
$(MAKE) -C $(libpq_builddir) all