Use pg_config to determine include location
authorChristoph Berg <myon@debian.org>
Tue, 2 Feb 2016 17:55:04 +0000 (18:55 +0100)
committerChristoph Berg <myon@debian.org>
Tue, 2 Feb 2016 18:03:55 +0000 (19:03 +0100)
This seems to be the better default over hardcoding a random filesystem
location.

Makefile

index c64dfbf577ee0770519590f89098fc78e6504726..675e68cca8e9c8377fb280210a7410a4601ad76b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,7 +9,8 @@ CFLAGS=-g -O -Wall -Wmissing-prototypes -Wmissing-declarations
 # If working with a PG source directory, point PGSQL_INCLUDE_DIR to its
 # src/include subdirectory.  If working with an installed tree, point to
 # the server include subdirectory, eg /usr/local/include/postgresql/server
-PGSQL_INCLUDE_DIR=../../pgsql/src/include
+PG_CONFIG=pg_config
+PGSQL_INCLUDE_DIR=$(shell $(PG_CONFIG) --includedir-server)
 
 
 DISTFILES= README.pg_filedump Makefile Makefile.contrib \