diff --git a/src/Makefile.shlib b/src/Makefile.shlib index ca712a4d46..b2a0343dda 100644 --- a/src/Makefile.shlib +++ b/src/Makefile.shlib @@ -6,7 +6,7 @@ # Copyright (c) 1998, Regents of the University of California # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.70 2003/09/20 21:26:20 tgl Exp $ +# $Header: /cvsroot/pgsql/src/Makefile.shlib,v 1.71 2003/09/27 19:35:32 tgl Exp $ # #------------------------------------------------------------------------- @@ -82,7 +82,7 @@ endif ifeq ($(PORTNAME), darwin) shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) - LINK.shared = $(COMPILER) $(DARWIN_NAMESPACE_SPEC) -bundle -undefined suppress + LINK.shared = $(COMPILER) -bundle endif ifeq ($(PORTNAME), openbsd) diff --git a/src/interfaces/ecpg/compatlib/Makefile b/src/interfaces/ecpg/compatlib/Makefile index cd05452aea..5c65a53824 100644 --- a/src/interfaces/ecpg/compatlib/Makefile +++ b/src/interfaces/ecpg/compatlib/Makefile @@ -4,7 +4,7 @@ # # Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/interfaces/ecpg/compatlib/Makefile,v 1.9 2003/09/27 15:32:47 momjian Exp $ +# $Header: /cvsroot/pgsql/src/interfaces/ecpg/compatlib/Makefile,v 1.10 2003/09/27 19:35:32 tgl Exp $ # #------------------------------------------------------------------------- @@ -17,7 +17,8 @@ SO_MAJOR_VERSION= 1 SO_MINOR_VERSION= 0 override CPPFLAGS := -I$(top_srcdir)/src/interfaces/ecpg/include -I$(libpq_srcdir) -I$(top_srcdir)/src/include/utils $(CPPFLAGS) $(THREAD_CPPFLAGS) -SHLIB_LINK = -L../pgtypeslib -lpgtypes -L../ecpglib -lecpg $(THREAD_LIBS) +SHLIB_LINK = -L../ecpglib -lecpg -L../pgtypeslib -lpgtypes $(libpq) \ + $(filter -lssl -lcrypto -lcrypt -lm, $(LIBS)) $(THREAD_LIBS) OBJS= informix.o diff --git a/src/interfaces/ecpg/ecpglib/Makefile b/src/interfaces/ecpg/ecpglib/Makefile index 75fcfc9023..70e73aaba3 100644 --- a/src/interfaces/ecpg/ecpglib/Makefile +++ b/src/interfaces/ecpg/ecpglib/Makefile @@ -4,7 +4,7 @@ # # Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/Makefile,v 1.8 2003/09/27 15:32:47 momjian Exp $ +# $Header: /cvsroot/pgsql/src/interfaces/ecpg/ecpglib/Makefile,v 1.9 2003/09/27 19:35:32 tgl Exp $ # #------------------------------------------------------------------------- @@ -21,7 +21,8 @@ override CPPFLAGS := -I$(top_srcdir)/src/interfaces/ecpg/include -I$(libpq_srcdi OBJS= execute.o typename.o descriptor.o data.o error.o prepare.o memory.o \ connect.o misc.o -SHLIB_LINK = -L../pgtypeslib -lpgtypes $(libpq) $(THREAD_LIBS) +SHLIB_LINK = -L../pgtypeslib -lpgtypes $(libpq) \ + $(filter -lssl -lcrypto -lcrypt -lm, $(LIBS)) $(THREAD_LIBS) all: all-lib diff --git a/src/interfaces/libpgtcl/Makefile b/src/interfaces/libpgtcl/Makefile index 63fffeabe2..a81795a503 100644 --- a/src/interfaces/libpgtcl/Makefile +++ b/src/interfaces/libpgtcl/Makefile @@ -4,7 +4,7 @@ # # Copyright (c) 1994, Regents of the University of California # -# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile,v 1.30 2002/12/30 17:19:52 tgl Exp $ +# $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/Makefile,v 1.31 2003/09/27 19:35:32 tgl Exp $ # #------------------------------------------------------------------------- @@ -20,12 +20,8 @@ override CPPFLAGS := -I$(libpq_srcdir) $(CPPFLAGS) $(TCL_INCLUDE_SPEC) OBJS= pgtcl.o pgtclCmds.o pgtclId.o -SHLIB_LINK = $(libpq) - -# If crypt is a separate library, rather than part of libc, it may need -# to be referenced separately to keep (broken) linkers happy. (This is -# braindead; users of libpq should not need to know what it depends on.) -SHLIB_LINK+= $(filter -L%, $(LDFLAGS)) $(filter -lcrypt, $(LIBS)) +SHLIB_LINK = $(TCL_LIB_SPEC) $(TCL_LIBS) $(libpq) \ + $(filter -lssl -lcrypto -lcrypt, $(LIBS)) $(THREAD_LIBS) all: submake-libpq all-lib diff --git a/src/makefiles/Makefile.darwin b/src/makefiles/Makefile.darwin index 3d58055b9b..d872c57eab 100644 --- a/src/makefiles/Makefile.darwin +++ b/src/makefiles/Makefile.darwin @@ -3,11 +3,11 @@ AWK= awk DLSUFFIX = .so CFLAGS_SL = -ifeq (,$(filter $(host_os), darwin1.0 darwin1.1 darwin1.2)) -DARWIN_NAMESPACE_SPEC = -flat_namespace -endif +BE_DLLLIBS= -bundle_loader $(top_builddir)/src/backend/postgres +# Rule for building shared libs (currently used only for regression test +# shlib ... should go away, since this is not really enough knowledge) %.so: %.o - $(CC) $(DARWIN_NAMESPACE_SPEC) -bundle -undefined suppress -o $@ $< + $(CC) -bundle -o $@ $< $(BE_DLLLIBS) sqlmansect = 7 diff --git a/src/pl/tcl/Makefile b/src/pl/tcl/Makefile index c48671b0b3..371242f98f 100644 --- a/src/pl/tcl/Makefile +++ b/src/pl/tcl/Makefile @@ -2,7 +2,7 @@ # # Makefile for the pltcl shared object # -# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.39 2002/12/30 17:19:54 tgl Exp $ +# $Header: /cvsroot/pgsql/src/pl/tcl/Makefile,v 1.40 2003/09/27 19:35:32 tgl Exp $ # #------------------------------------------------------------------------- @@ -11,7 +11,7 @@ top_builddir = ../../.. include $(top_builddir)/src/Makefile.global -override CPPFLAGS := $(CPPFLAGS) $(TCL_INCLUDE_SPEC) +override CPPFLAGS += $(TCL_INCLUDE_SPEC) # Find out whether Tcl was built as a shared library --- if not, we @@ -29,24 +29,7 @@ endif endif -# The following attempts to figure out what libraries need to be -# linked with pltcl. The information comes from the tclConfig.sh -# file, but it's mostly bogus. This just might work. - -ifneq ($(TCL_SHLIB_LD_LIBS),) -# link command for a shared lib must mention shared libs it uses -SHLIB_LINK = $(TCL_LIB_SPEC) $(TCL_LIBS) -lc -else -ifeq ($(PORTNAME), hpux) -# link command for a shared lib must mention shared libs it uses, -# even though Tcl doesn't think so... -SHLIB_LINK = $(TCL_LIB_SPEC) $(TCL_LIBS) -lc -else -# link command for a shared lib must NOT mention shared libs it uses -SHLIB_LINK = $(TCL_LIB_SPEC) -endif -endif - +SHLIB_LINK = $(BE_DLLLIBS) $(TCL_LIB_SPEC) $(TCL_LIBS) -lc NAME = pltcl SO_MAJOR_VERSION = 2