commit
0d1c7738dc21f2c9e398b790d101f0024dab0a54
Author: Steve Singer <ssinger@ca.afilias.info>
Date: Thu Jun 6 10:45:34 2013 -0400
win32 makefile fixes for the PGVER variable
commit
9f2eed91d129304a0e67534c977394cce04492cf
Merge:
c9a4687 86eac22
Author: Steve Singer <ssinger@ca.afilias.info>
Date: Thu Jun 6 09:42:31 2013 -0400
Merge remote-tracking branch 'origin/master' into pgcommon_22
commit
c9a4687f8fa28cf93a417c0b0597b8c6bf65cea7
Author: Steve Singer <ssinger@ca.afilias.info>
Date: Sun Jun 2 21:39:23 2013 -0400
Link with pgcommon on win32 when building with PG 9.3+
commit
abd5addee71a2fa55a634673730c2d1d18dfe8e9
Author: Steve Singer <ssinger@ca.afilias.info>
Date: Sun Jun 2 21:31:37 2013 -0400
expose HAVE_PGCOMMON to the slonik makefile so it can link in pgcommon if required
Conflicts:
configure.ac
commit
9217d72cdf740e7cb9ca7b540c3a7df334f81e0e
Author: Steve Singer <ssinger@ca.afilias.info>
Date: Tue May 28 10:55:40 2013 -0400
link with pgcommon in addition to pgport on PG 9.3+
PG 9.3 introduces a new library called libpgcommon we need to link
with this when we link with pgport.
HAVE_PGPORT= @HAVE_PGPORT@
endif
+ifeq (@HAVE_PGCOMMON@,1)
+HAVE_PGCOMMON= @HAVE_PGCOMMON@
+endif
+
# Documentation
JADE= @JADE@
NSGMLS= @NSGMLS@
if test "$with_pgport" = "yes"; then
AC_MSG_CHECKING(for pgport)
+ # check if we have pgcommon this is a lib in 9.3+ that
+ # is needed with PGPORT
+ OLD_LIBS=$LIBS
+ AC_DEFINE(HAVE_PGCOMMON)
+ LIBS="$LIBS -lpgcommon"
+ AC_TRY_LINK_FUNC(pg_malloc,[HAVE_PGCOMMON=1
+ AC_MSG_RESULT(yes)],
+ HAVE_PGCOMMON=0 )
+ LIBS=$OLD_LIBS
AC_DEFINE(HAVE_PGPORT)
- LIBS="$LIBS -lpgport"
+ if test $HAVE_PGCOMMON = 1 ; then
+ EXTRALIBS=" -lpgcommon"
+ fi
+ LIBS="$LIBS -lpgport $EXTRALIBS"
AC_TRY_LINK_FUNC(find_my_exec,[HAVE_PGPORT=1
AC_MSG_RESULT(yes)],
AC_MSG_ERROR("pgport was not found. build without --with-pgport=yes to disable"))
AC_SUBST(PORTNAME,$template)
AC_SUBST(HAVE_PGPORT,$HAVE_PGPORT)
+AC_SUBST(HAVE_PGCOMMON,$HAVE_PGCOMMON)
if test "${SLON_BINDIR}" = ""; then
if test ${prefix} = "NONE"; then
SLON_BINDIR="${PG_BINDIR}"
LDFLAGS += -lpgport
else ifdef HAVE_PGPORT
LDFLAGS += -lpgport
+ifdef HAVE_PGCOMMON
+LDFLAGS += -lpgcommon
+endif
endif
OBJS = \
CPP=cl.exe
LINK32=link.exe
-LINK32_FLAGS=/libpath:$(PG_LIB) libpq.lib libpgport.lib ws2_32.lib kernel32.lib user32.lib advapi32.lib /libpath:$(GETTEXT_LIB) intl.lib
+
+!if "$(PGVER)" == "8.3"
+PORTLIBS=libpgport.lib
+!elseif "$(PGVER)" == "8.4"
+PORTLIBS=libpgport.lib
+!elseif "$(PGVER)" == "9.0"
+PORTLIBS=libpgport.lib
+!elseif "$(PGVER)" == "9.1"
+PORTLIBS=libpgport.lib
+!elseif "$(PGVER)" == "9.2"
+PORTLIBS=libpgport.lib
+!else
+PORTLIBS=libpgport.lib libpgcommon.lib
+!endif
+
+LINK32_FLAGS=/libpath:$(PG_LIB) libpq.lib $(PORTLIBS) ws2_32.lib kernel32.lib user32.lib advapi32.lib /libpath:$(GETTEXT_LIB) intl.lib
OBJS = slonik.obj \
dbutil.obj \
parser.obj \