From d7e9c4bd845d1d5de78f9f5e31b254babc01f1d0 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Sun, 28 Aug 2016 17:05:38 +0000 Subject: [PATCH] Accept dot-less output from pg_config --version Hopefully fixes #3614 git-svn-id: http://svn.osgeo.org/postgis/trunk@15048 b70326c6-7e19-0410-871a-916f4a2858ee --- configure.ac | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index f5d6c4a4d..0c3f6165d 100644 --- a/configure.ac +++ b/configure.ac @@ -429,9 +429,10 @@ if test "x$LIBLWGEOM_ONLY" = "xno"; then 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... - PGSQL_MAJOR_VERSION=`$PG_CONFIG --version | sed 's/[[^0-9]]*\([[0-9]]\)\.\([[0-9]]\).*/\1/'` - PGSQL_MINOR_VERSION=`$PG_CONFIG --version | sed 's/[[^0-9]]*\([[0-9]]\)\.\([[0-9]]\).*/\2/'` PGSQL_FULL_VERSION=`$PG_CONFIG --version` + PGSQL_MAJOR_VERSION=`echo $PGSQL_FULL_VERSION | sed 's/[[^0-9]]*\([[0-9]]*\).*/\1/'` + PGSQL_MINOR_VERSION=`echo $PGSQL_FULL_VERSION | sed 's/[[^\.]]*\.\([[0-9]]*\).*/\1/'` + PGSQL_MINOR_VERSION=`echo $PGSQL_MINOR_VERSION | sed 's/.*develop.*/0/'` POSTGIS_PGSQL_VERSION="$PGSQL_MAJOR_VERSION$PGSQL_MINOR_VERSION" PGSQL_PKGLIBDIR=`$PG_CONFIG --pkglibdir` -- 2.50.1