Christopher Browne cbbrowne at ca.afilias.info
Wed Jul 11 08:08:39 PDT 2007
Darcy Buskermolen wrote:
> Since 2.0 will require 8.3, make configure test for >= 8.3
>
>   
> ------------------------------------------------------------------------
>
> Index: config/acx_libpq.m4
> ===================================================================
> RCS file: /home/cvsd/slony1/slony1-engine/config/acx_libpq.m4,v
> retrieving revision 1.27
> diff -r1.27 acx_libpq.m4
> 144,145c144,145
> <     if test "$PG_VERSION_MAJOR" = "7"; then
> < 	if test $PG_VERSION_MINOR -gt 3; then
> ---
>   
>>     if test "$PG_VERSION_MAJOR" = "8"; then
>> 	if test $PG_VERSION_MINOR -gt 2; then
>>     
> 147c147
> < 	    AC_DEFINE(PG_VERSION_OK,1,[PostgreSQL 7.4 or later])
> ---
>   
>> 	    AC_DEFINE(PG_VERSION_OK,1,[PostgreSQL 8.3 or later])
>>     
> 151c151
> < 	    than the required 7.4.  Slony-I needs functions included in
> ---
>   
>> 	    than the required 8.3.  Slony-I needs functions included in
>>     
> 155,157c155,159
> <     if test "$PG_VERSION_MAJOR" = "8"; then
> <       AC_MSG_RESULT($PG_VERSION)
> <       AC_DEFINE(PG_VERSION_OK,1,[PostgreSQL 7.4 or later])
> ---
>   
>>     if test $PG_VERSION_MAJOR -lt 8; then
>>      AC_MSG_RESULT("error")
>>             AC_MSG_ERROR(Your version of PostgreSQL ($PG_VERSION) is lower
>>             than the required 8.3.  Slony-I needs functions included in
>>             a newer version.) 
>>     
> 159,161d160
> < 
> <     if test "$PG_VERSION_MAJOR" = "8"; then
> < 	if test $PG_VERSION_MINOR -gt 0; then
> 166,167d164
> < 	fi
> <     fi
> 181d177
> <                 if test $PG_VERSION_MAJOR -ge 8 -a $PG_VERSION_MINOR -ge 2; then
> 183,185d178
> <                 else
> <                         AC_SUBST(NEED_PG_DLLINIT, 1)
> <                 fi
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Slony1-patches mailing list
> Slony1-patches at lists.slony.info
> http://lists.slony.info/mailman/listinfo/slony1-patches
>   
That seems generally similar to a patch I created at roughly the same time.

Here's what I've got; I don't too much care which patch goes in, but you 
might take a look and make sure that between us, we covered everything 
in config/acx_libpq.m4...

Index: acx_libpq.m4
===================================================================
RCS file: /home/cvsd/slony1/slony1-engine/config/acx_libpq.m4,v
retrieving revision 1.27
diff -c -u -r1.27 acx_libpq.m4
cvs diff: conflicting specifications of output style
--- acx_libpq.m4    29 Nov 2006 18:44:36 -0000    1.27
+++ acx_libpq.m4    11 Jul 2007 15:05:21 -0000
@@ -142,28 +142,29 @@
     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("error")
+        AC_MSG_ERROR(Your version of PostgreSQL ($PG_VERSION) is lower
+        than the required 8.3.  Slony-I needs functionality included in
+        a newer version.)
+    fi
+    if test "$PG_VERSION_MAJOR" = "8"; then
+    if test $PG_VERSION_MINOR -gt 2; then
         AC_MSG_RESULT($PG_VERSION)
-        AC_DEFINE(PG_VERSION_OK,1,[PostgreSQL 7.4 or later])
+        AC_DEFINE(PG_VERSION_OK,1,[PostgreSQL 8.3 or later])
     else
         AC_MSG_RESULT("error")
         AC_MSG_ERROR(Your version of PostgreSQL ($PG_VERSION) is lower
-        than the required 7.4.  Slony-I needs functions included in
+        than the required 8.3.  Slony-I needs functionality included in
         a newer version.)
     fi
-    fi
-    if test "$PG_VERSION_MAJOR" = "8"; then
       AC_MSG_RESULT($PG_VERSION)
-      AC_DEFINE(PG_VERSION_OK,1,[PostgreSQL 7.4 or later])
+      AC_DEFINE(PG_VERSION_OK,1,[PostgreSQL 8.3 or later])
     fi
 
-    if test "$PG_VERSION_MAJOR" = "8"; then
-    if test $PG_VERSION_MINOR -gt 0; then
-            if test "$PG_SHAREDIR" = ""; then
-                PG_SHAREDIR=`$PG_CONFIG_LOCATION --sharedir`/ 2>/dev/null
-                echo "pg_config says pg_sharedir is $PG_SHAREDIR"
-            fi
-    fi
+   
+    if test "$PG_SHAREDIR" = ""; then
+       PG_SHAREDIR=`$PG_CONFIG_LOCATION --sharedir`/ 2>/dev/null
+       echo "pg_config says pg_sharedir is $PG_SHAREDIR"
     fi
 
     case ${host_os} in
@@ -230,8 +231,9 @@
     AC_DEFINE(PG_VERSION_VERIFIED,1,[PostgreSQL 7.3 or later check])
 else
     AC_MSG_ERROR(Your version of libpq doesn't have PQunescapeBytea
-     this means that your version of PostgreSQL is lower than 7.3
-     and thus not supported by Slony-I.)
+     which means that your version of PostgreSQL is lower than 7.3
+     and thus not even remotely supported by Slony-I version 2,
+     which requires 8.3+)
 fi
 
 TEMP_CPPFLAGS=$CPPFLAGS



More information about the Slony1-patches mailing list