From 18d82466fa64a7a545fa3ff5f92b4781775e8959 Mon Sep 17 00:00:00 2001 From: Paul Ramsey Date: Mon, 6 Feb 2012 19:01:50 +0000 Subject: [PATCH] PostGIS extensions should build/install automatically if PostGIS is compiled against 9.1 (#1490) git-svn-id: http://svn.osgeo.org/postgis/trunk@9044 b70326c6-7e19-0410-871a-916f4a2858ee --- GNUmakefile.in | 2 +- configure.ac | 7 +++++++ extensions/Makefile | 11 +++++++++++ extensions/postgis/Makefile.in | 2 +- extensions/postgis_topology/Makefile.in | 2 +- 5 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 extensions/Makefile diff --git a/GNUmakefile.in b/GNUmakefile.in index 894f2b7cd..8f178a8f2 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -5,7 +5,7 @@ #----------------------------------------------------- # todo: add all subdirs -SUBDIRS = liblwgeom libpgcommon regress postgis loader utils @RASTER@ @TOPOLOGY@ +SUBDIRS = liblwgeom libpgcommon postgis @RASTER@ @TOPOLOGY@ loader utils @EXTENSIONS@ regress # todo: add more rules here, like uninstall, clean... all install uninstall noop clean distclean check: diff --git a/configure.ac b/configure.ac index 2b1644896..40997f35d 100644 --- a/configure.ac +++ b/configure.ac @@ -345,6 +345,13 @@ else fi fi +EXTENSIONS="" +if test $POSTGIS_PGSQL_VERSION -ge 91; then + AC_MSG_RESULT([enabling extensions for PostgreSQL 9.1...]) + EXTENSIONS=extensions + AC_SUBST([EXTENSIONS]) +fi + dnl Temporary hack until minimum PostgreSQL version is 9.0: dnl If PostgreSQL < 9.0 is detected, trigger the inclusion of the new versioned PGXS targets PGXSOVERRIDE=0 diff --git a/extensions/Makefile b/extensions/Makefile new file mode 100644 index 000000000..0a14bad17 --- /dev/null +++ b/extensions/Makefile @@ -0,0 +1,11 @@ +all: + $(MAKE) -C postgis all + $(MAKE) -C postgis_topology all + +clean: + $(MAKE) -C postgis clean + $(MAKE) -C postgis_topology clean + +install: + $(MAKE) -C postgis install + $(MAKE) -C postgis_topology install diff --git a/extensions/postgis/Makefile.in b/extensions/postgis/Makefile.in index 0a4280b20..e445ffabc 100644 --- a/extensions/postgis/Makefile.in +++ b/extensions/postgis/Makefile.in @@ -20,7 +20,7 @@ PREREL_PREFIX = $(shell echo $(EXTVERSION) | \ DATA = $(filter-out $(wildcard sql/*--*.sql),$(wildcard sql/*.sql)) #DOCS = $(wildcard ../../doc/html/*.html) -PG_CONFIG = pg_config +PG_CONFIG = @PGCONFIG@ PG91 = $(shell $(PG_CONFIG) --version | grep -qE " 8\.| 9\.0" && echo no || echo yes) SQL_BITS = $(wildcard sql_bits/*.sql) diff --git a/extensions/postgis_topology/Makefile.in b/extensions/postgis_topology/Makefile.in index fc9468903..ee6edb449 100644 --- a/extensions/postgis_topology/Makefile.in +++ b/extensions/postgis_topology/Makefile.in @@ -19,7 +19,7 @@ PREREL_PREFIX = $(shell echo $(EXTVERSION) | \ DATA = $(filter-out $(wildcard sql/*--*.sql),$(wildcard sql/*.sql)) -PG_CONFIG = pg_config +PG_CONFIG = @PGCONFIG@ PG91 = $(shell $(PG_CONFIG) --version | grep -qE " 8\.| 9\.0" && echo no || echo yes) SQL_BITS = $(wildcard sql_bits/*.sql) -- 2.40.0