bdr: Try to make configure (i.e. sed) work on OSX.
authorAndres Freund <andres@anarazel.de>
Thu, 16 Oct 2014 15:09:58 +0000 (17:09 +0200)
committerAndres Freund <andres@anarazel.de>
Thu, 16 Oct 2014 15:10:25 +0000 (17:10 +0200)
Also fix future issue that bdr wouldn't detect 9.4.0+ properly.

configure
configure.in

index 070119cb01820d4f679997bb245ba28dcdeb7515..768caed8a9157d915ae0b7f484c3c4bb3bfdecaa 100755 (executable)
--- a/configure
+++ b/configure
@@ -1898,9 +1898,7 @@ fi
 
 pgac_pg_config_version=$($PG_CONFIG --version 2>/dev/null)
 version_num=$(echo "$pgac_pg_config_version"|
-              $SED -e 's/^PostgreSQL \([0-9]\+\)\.\([0-9]\+\)\([a-zA-Z0-9]\+\)$/\1.\2/')
-version_add=$(echo "$pgac_pg_config_version"|
-              $SED -e 's/^PostgreSQL \([0-9]\+\)\.\([0-9]\+\)\([a-zA-Z0-9]\+\)$/\3/')
+              $SED -e 's/^PostgreSQL \([0-9]*\)\.\([0-9]*\)\([a-zA-Z0-9.]*\)$/\1.\2/')
 
 if test "$version_num" != '9.4'; then
    as_fn_error $? "bdr is not compatible with postgres $version_num" "$LINENO" 5
index e6cfd8d74c03a68936b2d53459c711ec07dfe74e..91c2ebf6b2cde08670ac3665fb593eefe450845c 100644 (file)
@@ -15,9 +15,7 @@ fi
 
 pgac_pg_config_version=$($PG_CONFIG --version 2>/dev/null)
 version_num=$(echo "$pgac_pg_config_version"|
-              $SED -e 's/^PostgreSQL \([[0-9]]\+\)\.\([[0-9]]\+\)\([[a-zA-Z0-9]]\+\)$/\1.\2/')
-version_add=$(echo "$pgac_pg_config_version"|
-              $SED -e 's/^PostgreSQL \([[0-9]]\+\)\.\([[0-9]]\+\)\([[a-zA-Z0-9]]\+\)$/\3/')
+              $SED -e 's/^PostgreSQL \([[0-9]]*\)\.\([[0-9]]*\)\([[a-zA-Z0-9.]]*\)$/\1.\2/')
 
 if test "$version_num" != '9.4'; then
    AC_MSG_ERROR([bdr is not compatible with postgres $version_num])