Index: config/acx_pthread.m4===================================================================RCS file: /projects/cvsroot/pgsql/config/acx_pthread.m4,vretrieving revision 1.11diff -u -r1.11 acx_pthread.m4--- config/acx_pthread.m4	14 Dec 2004 14:53:53 -0000	1.11+++ config/acx_pthread.m4	24 Aug 2005 21:02:05 -0000@@ -43,7 +43,7 @@ # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. -acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"  # The ordering *is* (sometimes) important.  Some notes on the # individual items follow:Index: src/interfaces/libpq/Makefile===================================================================RCS file: /projects/cvsroot/pgsql/src/interfaces/libpq/Makefile,vretrieving revision 1.137diff -u -r1.137 Makefile--- src/interfaces/libpq/Makefile	23 Aug 2005 21:02:03 -0000	1.137+++ src/interfaces/libpq/Makefile	28 Aug 2005 23:15:28 -0000@@ -21,7 +21,9 @@ DLTYPE= library  override CPPFLAGS :=  -DFRONTEND -I$(srcdir) $(CPPFLAGS) -I$(top_builddir)/src/port+ifneq ($(PORTNAME), win32) override CFLAGS += $(PTHREAD_CFLAGS)+endif  # Need to recomple any libpgport object files LIBS := $(patsubst -lpgport,, $(LIBS))@@ -51,7 +53,11 @@ # Add libraries that libpq depends (or might depend) on into the # shared library link.  (The order in which you list them here doesn't # matter.)+ifneq ($(PORTNAME), win32) SHLIB_LINK += $(filter -lcrypt -ldes -lcom_err -lcrypto -lk5crypto -lkrb5 -lssl -lsocket -lnsl -lresolv -lintl, $(LIBS)) $(PTHREAD_LIBS)+else+SHLIB_LINK += $(filter -lcrypt -ldes -lcom_err -lcrypto -lk5crypto -lkrb5 -lssl -lsocket -lnsl -lresolv -lintl $(PTHREAD_LIBS), $(LIBS))+endif ifeq ($(PORTNAME), win32) SHLIB_LINK += -lshfolder -lwsock32 -lws2_32 $(filter -leay32 -lssleay32 -lcomerr32 -lkrb5_32, $(LIBS)) endif