CVS User Account cvsuser
Fri Oct 27 10:37:00 PDT 2006
Log Message:
-----------
The version detection code in configure has trouble recognizing 8.2beta2 and 
other nonstandard version numbers.  This patch makes this more robust.

Tags:
----
REL_1_2_STABLE

Modified Files:
--------------
    slony1-engine/config:
        acx_libpq.m4 (r1.24.2.1 -> r1.24.2.2)

-------------- next part --------------
Index: acx_libpq.m4
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/config/acx_libpq.m4,v
retrieving revision 1.24.2.1
retrieving revision 1.24.2.2
diff -Lconfig/acx_libpq.m4 -Lconfig/acx_libpq.m4 -u -w -r1.24.2.1 -r1.24.2.2
--- config/acx_libpq.m4
+++ config/acx_libpq.m4
@@ -139,13 +139,12 @@
     esac
     
     PG_CONFIGURE=`$PG_CONFIG_LOCATION --configure`
-    PG_VERSION=`$PG_CONFIG_LOCATION --version|cut -f2- -d' '|cut -f1 -d'd'|cut -f-2 -d'.'`
+    pg_config_version=`$PG_CONFIG_LOCATION --version`
+    PG_VERSION=`expr "$pg_config_version" : '[[^0-9]]*\([[0-9]]*\.[[0-9]]*\)'`
 
     AC_MSG_CHECKING(for correct version of PostgreSQL)
-    PG_VERSION_MAJOR=`echo $PG_VERSION |\
-           sed 's/\([[0-9]]*\).\([[0-9]]*\)/\1/'`
-    PG_VERSION_MINOR=`echo $PG_VERSION |\
-           sed 's/\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+    PG_VERSION_MAJOR=`echo $PG_VERSION | cut -d. -f1`
+    PG_VERSION_MINOR=`echo $PG_VERSION | cut -d. -f2`
     if test "$PG_VERSION_MAJOR" = "7"; then
 	if test $PG_VERSION_MINOR -gt 3; then
 	    AC_MSG_RESULT($PG_VERSION)



More information about the Slony1-commit mailing list