]> granicus.if.org Git - postgis/commitdiff
Change configure to check for the existence of the PGXS Makefile, even if pg_config...
authorMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Thu, 6 Nov 2008 15:15:06 +0000 (15:15 +0000)
committerMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Thu, 6 Nov 2008 15:15:06 +0000 (15:15 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@3261 b70326c6-7e19-0410-871a-916f4a2858ee

configure.ac
lwgeom/Makefile.in
topology/Makefile.in

index bd61d6678569082c4a061acc6ed67e6d57729efe..90de33738331ff14b9c30854e4b3b2c6e5a03c26 100644 (file)
@@ -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... 
index 9422654aad1df7e7fc02d3b587cef5144962e413..b939887430d92f1cb5536e82ab0fbdbbb3227d73 100644 (file)
@@ -67,7 +67,7 @@ EXTRA_CLEAN=$(SQL_OBJS)
 
 # PGXS information
 PG_CONFIG = @PGCONFIG@ 
-PGXS := $(shell $(PG_CONFIG) --pgxs)
+PGXS := @PGXS@
 include $(PGXS)
 
 
index 8081163961af9a1b3e0e03f53498ea4912169635..0ac41ca1fba5ef160c758031b412b0280941ec52 100644 (file)
@@ -13,7 +13,7 @@ EXTRA_CLEAN=$(SQL_OBJS)
 
 # PGXS information
 PG_CONFIG = @PGCONFIG@ 
-PGXS := $(shell $(PG_CONFIG) --pgxs)
+PGXS := @PGXS@
 include $(PGXS)