[postgis-commits] svn - r3261 - in trunk: . lwgeom topology

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Thu Nov 6 07:15:07 PST 2008


Author: mcayland
Date: 2008-11-06 07:15:06 -0800 (Thu, 06 Nov 2008)
New Revision: 3261

Modified:
   trunk/configure.ac
   trunk/lwgeom/Makefile.in
   trunk/topology/Makefile.in
Log:
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.


Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2008-11-05 20:49:11 UTC (rev 3260)
+++ trunk/configure.ac	2008-11-06 15:15:06 UTC (rev 3261)
@@ -220,6 +220,21 @@
 	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... 

Modified: trunk/lwgeom/Makefile.in
===================================================================
--- trunk/lwgeom/Makefile.in	2008-11-05 20:49:11 UTC (rev 3260)
+++ trunk/lwgeom/Makefile.in	2008-11-06 15:15:06 UTC (rev 3261)
@@ -67,7 +67,7 @@
 
 # PGXS information
 PG_CONFIG = @PGCONFIG@ 
-PGXS := $(shell $(PG_CONFIG) --pgxs)
+PGXS := @PGXS@
 include $(PGXS)
 
 

Modified: trunk/topology/Makefile.in
===================================================================
--- trunk/topology/Makefile.in	2008-11-05 20:49:11 UTC (rev 3260)
+++ trunk/topology/Makefile.in	2008-11-06 15:15:06 UTC (rev 3261)
@@ -13,7 +13,7 @@
 
 # PGXS information
 PG_CONFIG = @PGCONFIG@ 
-PGXS := $(shell $(PG_CONFIG) --pgxs)
+PGXS := @PGXS@
 include $(PGXS)
 
 



More information about the postgis-commits mailing list