Use server includes for pgport when building slonik
authorSteve Singer <ssinger@ca.afilias.info>
Thu, 12 Dec 2013 14:26:04 +0000 (09:26 -0500)
committerSteve Singer <ssinger@ca.afilias.info>
Sat, 14 Dec 2013 21:40:11 +0000 (16:40 -0500)
When building with --with-pgport slonik needs to include port.h
port.h is normally found under the server include directory but
some distributions (ie debian libpq-dev) also include it in
/usr/include/postgresql

The fix for bug 315 removed the server include paths from
all client programs including slonik.  This went too far,
the actual issue with bug 315 was src/backend failing because
it pulled in the client headers.

If we are building with pgport we will pull in the server
include directories for slonik

src/slonik/Makefile

index 9929882281d9e41ffdc01f860f198579a171656d..54c879280b772ac954574924649553e897b6b3c0 100644 (file)
@@ -10,8 +10,11 @@ slony_subdir = src/slonik
 slony_top_builddir = ../..
 SLFILEDESC="Slony command interpreter"
 include $(slony_top_builddir)/Makefile.global
+ifeq ($(HAVE_PGPORT),1)
+CPPFLAGS:=$(CPPFLAGS_SERVER) $(CPPFLAGS_CLIENT)
+else
 CPPFLAGS:=$(CPPFLAGS_CLIENT)
-
+endif
 ifeq ($(PORTNAME), aix)
   CFLAGS += -D_LARGE_FILES
 endif