diff -ru postgresql-7.3.orig/src/Makefile.shlib postgresql-7.3/src/Makefile.shlib --- postgresql-7.3.orig/src/Makefile.shlib Wed Oct 9 16:21:54 2002 +++ postgresql-7.3/src/Makefile.shlib Sun Dec 1 05:19:06 2002 @@ -81,8 +81,12 @@ endif ifeq ($(PORTNAME), darwin) - shlib := lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION) - LINK.shared = $(COMPILER) $(DARWIN_NAMESPACE_SPEC) -bundle -undefined suppress + shlib := lib$(NAME).$(SO_MAJOR_VERSION).$(SO_MINOR_VERSION)$(DLSUFFIX) + ifndef DARWIN_SHLIB_BUNDLE + LINK.shared = $(COMPILER) $(DARWIN_NAMESPACE_SPEC) -dynamiclib -undefined suppress + else + LINK.shared = $(COMPILER) $(DARWIN_NAMESPACE_SPEC) -bundle -undefined suppress + endif endif ifeq ($(PORTNAME), openbsd) @@ -252,10 +256,17 @@ $(shlib): $(OBJS) $(LINK.shared) $(OBJS) $(SHLIB_LINK) -o $@ # If we're using major and minor versions, then make a symlink to major-version-only. +ifneq ($(PORTNAME), darwin) ifneq ($(shlib), lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)) rm -f lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) $(LN_S) $(shlib) lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) endif +else # darwin +ifneq ($(shlib), lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX)) + rm -f lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX) + $(LN_S) $(shlib) lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX) +endif +endif # darwin # Make sure we have a link to a name without any version numbers ifneq ($(shlib), lib$(NAME)$(DLSUFFIX)) rm -f lib$(NAME)$(DLSUFFIX) @@ -310,11 +321,19 @@ install-lib-shared: $(shlib) $(INSTALL_SHLIB) $< $(DESTDIR)$(libdir)/$(shlib) ifneq ($(PORTNAME), win) +ifneq ($(PORTNAME), darwin) ifneq ($(shlib), lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION)) cd $(DESTDIR)$(libdir) && \ rm -f lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) && \ $(LN_S) $(shlib) lib$(NAME)$(DLSUFFIX).$(SO_MAJOR_VERSION) endif +else # darwin +ifneq ($(shlib), lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX)) + cd $(DESTDIR)$(libdir) && \ + rm -f lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX) && \ + $(LN_S) $(shlib) lib$(NAME).$(SO_MAJOR_VERSION)$(DLSUFFIX) +endif +endif # darwin ifneq ($(shlib), lib$(NAME)$(DLSUFFIX)) cd $(DESTDIR)$(libdir) && \ rm -f lib$(NAME)$(DLSUFFIX) && \ diff -ru postgresql-7.3.orig/src/backend/port/Makefile postgresql-7.3/src/backend/port/Makefile --- postgresql-7.3.orig/src/backend/port/Makefile Sat Jul 27 20:10:05 2002 +++ postgresql-7.3/src/backend/port/Makefile Sun Dec 1 03:51:35 2002 @@ -32,7 +32,9 @@ OBJS+=beos/SUBSYS.o endif ifeq ($(PORTNAME), darwin) +ifneq ($(host_os), darwin6.0) OBJS+=darwin/SUBSYS.o +endif endif all: SUBSYS.o diff -ru postgresql-7.3.orig/src/backend/utils/mb/conversion_procs/proc.mk postgresql-7.3/src/backend/utils/mb/conversion_procs/proc.mk --- postgresql-7.3.orig/src/backend/utils/mb/conversion_procs/proc.mk Thu Sep 5 18:28:46 2002 +++ postgresql-7.3/src/backend/utils/mb/conversion_procs/proc.mk Wed Dec 4 03:55:08 2002 @@ -7,6 +7,10 @@ SO_MINOR_VERSION := 0 rpath = +ifeq ($(PORTNAME), darwin) +DARWIN_SHLIB_BUNDLE = 1 +endif + all: all-shared-lib include $(top_srcdir)/src/Makefile.shlib diff -ru postgresql-7.3.orig/src/interfaces/python/GNUmakefile postgresql-7.3/src/interfaces/python/GNUmakefile --- postgresql-7.3.orig/src/interfaces/python/GNUmakefile Thu Dec 13 18:39:04 2001 +++ postgresql-7.3/src/interfaces/python/GNUmakefile Sun Dec 1 05:05:43 2002 @@ -14,6 +14,9 @@ SHLIB_LINK += $(python_libspec) endif +ifeq ($(PORTNAME), darwin) +DARWIN_SHLIB_BUNDLE = 1 +endif include $(top_srcdir)/src/Makefile.shlib diff -ru postgresql-7.3.orig/src/makefiles/Makefile.darwin postgresql-7.3/src/makefiles/Makefile.darwin --- postgresql-7.3.orig/src/makefiles/Makefile.darwin Fri Oct 5 21:15:38 2001 +++ postgresql-7.3/src/makefiles/Makefile.darwin Sun Dec 1 07:24:11 2002 @@ -1,13 +1,14 @@ AROPT = cr AWK= awk -DLSUFFIX = .so -CFLAGS_SL = +DLSUFFIX = .dylib +CFLAGS_SL = -fno-common ifeq (,$(filter $(host_os), darwin1.0 darwin1.1 darwin1.2)) DARWIN_NAMESPACE_SPEC = -flat_namespace endif -%.so: %.o - $(CC) $(DARWIN_NAMESPACE_SPEC) -bundle -undefined suppress -o $@ $< +%.dylib: %.o + $(CC) $(DARWIN_NAMESPACE_SPEC) -dynamiclib -undefined suppress -o $@ $< + #$(CC) $(DARWIN_NAMESPACE_SPEC) -bundle -undefined suppress -o $@ $< sqlmansect = 7 diff -ru postgresql-7.3.orig/src/pl/plperl/GNUmakefile postgresql-7.3/src/pl/plperl/GNUmakefile --- postgresql-7.3.orig/src/pl/plperl/GNUmakefile Tue May 28 16:57:53 2002 +++ postgresql-7.3/src/pl/plperl/GNUmakefile Sun Dec 1 05:06:32 2002 @@ -28,6 +28,10 @@ OBJS = plperl.o eloglvl.o SPI.o SHLIB_LINK = $(perl_embed_ldflags) $(BE_DLLLIBS) +ifeq ($(PORTNAME), darwin) +DARWIN_SHLIB_BUNDLE = 1 +endif + include $(top_srcdir)/src/Makefile.shlib diff -ru postgresql-7.3.orig/src/pl/plpgsql/src/Makefile postgresql-7.3/src/pl/plpgsql/src/Makefile --- postgresql-7.3.orig/src/pl/plpgsql/src/Makefile Fri Nov 1 22:52:34 2002 +++ postgresql-7.3/src/pl/plpgsql/src/Makefile Sun Dec 1 05:07:27 2002 @@ -34,6 +34,10 @@ @echo "*****" endif +ifeq ($(PORTNAME), darwin) +DARWIN_SHLIB_BUNDLE = 1 +endif + # Shared library stuff include $(top_srcdir)/src/Makefile.shlib diff -ru postgresql-7.3.orig/src/pl/plpython/Makefile postgresql-7.3/src/pl/plpython/Makefile --- postgresql-7.3.orig/src/pl/plpython/Makefile Thu Sep 5 18:28:46 2002 +++ postgresql-7.3/src/pl/plpython/Makefile Sun Dec 1 05:08:04 2002 @@ -26,6 +26,10 @@ SHLIB_LINK = $(BE_DLLLIBS) $(python_libspec) +ifeq ($(PORTNAME), darwin) +DARWIN_SHLIB_BUNDLE = 1 +endif + include $(top_srcdir)/src/Makefile.shlib diff -ru postgresql-7.3.orig/src/pl/tcl/Makefile postgresql-7.3/src/pl/tcl/Makefile --- postgresql-7.3.orig/src/pl/tcl/Makefile Fri May 24 18:10:17 2002 +++ postgresql-7.3/src/pl/tcl/Makefile Sun Dec 1 05:08:23 2002 @@ -50,6 +50,10 @@ SO_MINOR_VERSION = 0 OBJS = pltcl.o +ifeq ($(PORTNAME), darwin) +DARWIN_SHLIB_BUNDLE = 1 +endif + include $(top_srcdir)/src/Makefile.shlib ifeq ($(TCL_SHARED_BUILD), 1)