From: Mark Cave-Ayland Date: Thu, 6 Nov 2008 15:15:06 +0000 (+0000) Subject: Change configure to check for the existence of the PGXS Makefile, even if pg_config... X-Git-Tag: 1.4.0b1~523 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b6e444e63860557fcb6812841d66cb83478adcae;p=postgis Change configure to check for the existence of the PGXS Makefile, even if pg_config can be found. This is become distributions such as Debian install pg_config as part of libpq-dev but this package doesn't contain the required Makefile. Per bug report from strk. git-svn-id: http://svn.osgeo.org/postgis/trunk@3261 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/configure.ac b/configure.ac index bd61d6678..90de33738 100644 --- a/configure.ac +++ b/configure.ac @@ -220,6 +220,21 @@ else fi fi + +dnl +dnl Ensure that $PG_CONFIG --pgxs points to a valid file. This is because some distributions such as Debian +dnl also include pg_config as part of libpq-dev packages, but don't install the Makefile it points to unless +dnl the postgresql-server-dev packages are installed :) +dnl + +PGXS=`$PGCONFIG --pgxs` +if test ! -f $PGXS; then + AC_MSG_ERROR([the PGXS Makefile $PGXS cannot be found. Please install the PostgreSQL server development packages and re-run configure.]) +fi + +AC_SUBST([PGXS]) + + dnl Extract the version information from pg_config dnl Note: we extract the major & minor separately, ensure they are numeric, and then combine to give dnl the final version. This is to guard against user error... diff --git a/lwgeom/Makefile.in b/lwgeom/Makefile.in index 9422654aa..b93988743 100644 --- a/lwgeom/Makefile.in +++ b/lwgeom/Makefile.in @@ -67,7 +67,7 @@ EXTRA_CLEAN=$(SQL_OBJS) # PGXS information PG_CONFIG = @PGCONFIG@ -PGXS := $(shell $(PG_CONFIG) --pgxs) +PGXS := @PGXS@ include $(PGXS) diff --git a/topology/Makefile.in b/topology/Makefile.in index 808116396..0ac41ca1f 100644 --- a/topology/Makefile.in +++ b/topology/Makefile.in @@ -13,7 +13,7 @@ EXTRA_CLEAN=$(SQL_OBJS) # PGXS information PG_CONFIG = @PGCONFIG@ -PGXS := $(shell $(PG_CONFIG) --pgxs) +PGXS := @PGXS@ include $(PGXS)