]> granicus.if.org Git - postgis/commitdiff
Allow version parser to handle PostgreSQL 9.3rc1
authorPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 23 Aug 2013 19:57:51 +0000 (19:57 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 23 Aug 2013 19:57:51 +0000 (19:57 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11866 b70326c6-7e19-0410-871a-916f4a2858ee

configure.ac

index 1d582805f1d6c2ac7111f90315787fa20692fdee..170a8bf32ebf67c999bb06e215a67f656928cfc1 100644 (file)
@@ -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"