]> granicus.if.org Git - postgis/commitdiff
Use grep found by ./configure (and have ./configure look for it)
authorSandro Santilli <strk@keybit.net>
Mon, 31 Dec 2012 15:18:55 +0000 (15:18 +0000)
committerSandro Santilli <strk@keybit.net>
Mon, 31 Dec 2012 15:18:55 +0000 (15:18 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@10942 b70326c6-7e19-0410-871a-916f4a2858ee

configure.ac
extensions/postgis_topology/Makefile.in

index 6f430928af2025c8bdd48a52166c439a0be083ee..f904246df1461dc6642e244c470ef5c54c94ad67 100644 (file)
@@ -25,6 +25,7 @@ dnl
 AC_PROG_CC
 AC_PROG_CPP
 AC_PROG_CXX
+AC_PROG_GREP
 AC_PATH_PROG([ANT], [ant], [])
 AC_SUBST([ANT])
 
index 19608a1db320a3c651c1276e4bab4f9bae897cb0..6a55e8a4a64105478c56d5f696a4ac91b755110b 100644 (file)
@@ -4,25 +4,26 @@ EXTENSION    = postgis_topology
 EXTVERSION    = @POSTGIS_LIB_VERSION@
 MINORVERSION  = @POSTGIS_MAJOR_VERSION@.@POSTGIS_MINOR_VERSION@
 PGIS_MAJ_MIN=@POSTGIS_MAJOR_VERSION@@POSTGIS_MINOR_VERSION@
+GREP=@GREP@
 
 MICRO_NUMBER  = $(shell echo $(EXTVERSION) | sed "s/[0-9]\.[0-9]\.\([0-9]*\)[a-zA-Z]*[0-9]*/\1/")
 PREREL_NUMBER = $(shell echo $(EXTVERSION) | \
                         sed "s/[0-9]\.[0-9]\.\(.*\)/\1/" | \
-                        grep "[a-zA-Z]" | \
+                        $(GREP) "[a-zA-Z]" | \
                         sed "s/[0-9][a-zA-Z]\([0-9]*\)[a-zA-Z]*/\1/")
 MICRO_PREV    = $(shell if test "$(MICRO_NUMBER)x" != "x"; then expr $(MICRO_NUMBER) - 1; fi)
 PREREL_PREV   = $(shell if test "$(PREREL_NUMBER)x" != "x"; then expr $(PREREL_NUMBER) - 1; fi)
 
 PREREL_PREFIX = $(shell echo $(EXTVERSION) | \
                         sed "s/[0-9]\.[0-9]\.\(.*\)/\1/" | \
-                        grep "[a-zA-Z]" | \
+                        $(GREP) "[a-zA-Z]" | \
                         sed "s/\([0-9][a-zA-Z]*\)[0-9]*/\1/")
 
 DATA         = $(filter-out $(wildcard sql/*--*.sql),$(wildcard sql/*.sql))
 
 PG_CONFIG    = @PGCONFIG@
 
-PG91         = $(shell $(PG_CONFIG) --version | grep -qE " 8\.| 9\.0" && echo no || echo yes)
+PG91         = $(shell $(PG_CONFIG) --version | $(GREP) -qE " 8\.| 9\.0" && echo no || echo yes)
 SQL_BITS     = $(wildcard sql_bits/*.sql)
 EXTRA_CLEAN += sql/*.sql ${SQL_BITS}