From: Paul Ramsey Date: Fri, 23 Aug 2013 19:57:51 +0000 (+0000) Subject: Allow version parser to handle PostgreSQL 9.3rc1 X-Git-Tag: 2.2.0rc1~1388 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e5b5209fb494f5cb13cedc5ee382f5b375a944c8;p=postgis Allow version parser to handle PostgreSQL 9.3rc1 git-svn-id: http://svn.osgeo.org/postgis/trunk@11866 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/configure.ac b/configure.ac index 1d582805f..170a8bf32 100644 --- a/configure.ac +++ b/configure.ac @@ -379,8 +379,8 @@ 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... -PGSQL_MAJOR_VERSION=`$PG_CONFIG --version | sed 's/[[A-Za-z ]]*//' | cut -d. -f1 | sed 's/[[^0-9]]//g'` -PGSQL_MINOR_VERSION=`$PG_CONFIG --version | sed 's/[[A-Za-z ]]*//' | cut -d. -f2 | sed 's/[[^0-9]]//g'` +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` POSTGIS_PGSQL_VERSION="$PGSQL_MAJOR_VERSION$PGSQL_MINOR_VERSION"