# Copyright (c) 1998, Regents of the University of California
#
# IDENTIFICATION
-# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.117 2008/09/01 08:50:09 petere Exp $
+# $PostgreSQL: pgsql/src/Makefile.shlib,v 1.120 2009/01/05 09:27:19 petere Exp $
#
#-------------------------------------------------------------------------
# Try to keep the sections in some kind of order, folks...
override CFLAGS += $(CFLAGS_SL)
+ifdef SO_MAJOR_VERSION
+# libraries ought to use this to refer to versioned gettext domain names
+override CPPFLAGS += -DSO_MAJOR_VERSION=$(SO_MAJOR_VERSION)
+endif
ifeq ($(PORTNAME), aix)
ifdef SO_MAJOR_VERSION
# Cygwin or Win32 case
-DLL_DEFFILE = lib$(NAME)dll.def
-
# If SHLIB_EXPORTS is set, the rules below will build a .def file from
# that. Else we build a temporary one here.
ifeq (,$(SHLIB_EXPORTS))
+DLL_DEFFILE = lib$(NAME)dll.def
exports_file = $(DLL_DEFFILE)
$(exports_file): $(OBJS)
$(DLLTOOL) --export-all $(DLLTOOL_DEFFLAGS) --output-def $@ $^
+else
+DLL_DEFFILE = $(srcdir)/lib$(NAME)dll.def
endif
$(shlib): $(OBJS) $(DLL_DEFFILE)
install-lib-shared: $(shlib) installdirs-lib
ifdef soname
# we don't install $(shlib) on AIX
+# (see http://archives.postgresql.org/message-id/52EF20B2E3209443BC37736D00C3C1380A6E79FE@EXADV1.host.magwien.gv.at)
ifneq ($(PORTNAME), aix)
$(INSTALL_SHLIB) $< '$(DESTDIR)$(libdir)/$(shlib)'
ifneq ($(PORTNAME), cygwin)