# HG changeset patch # User i7tiol # Date 1424772745 0 # Node ID c73c23bbe9cea4a5d6a0910cb0c10986a91a245a # Parent 2e6bd8aa7df8c8c915746f0a12b4fd9ee60d9935 Check postgresql version at configure time. Fixes bug #44345. diff -r 2e6bd8aa7df8 -r c73c23bbe9ce main/database/DESCRIPTION --- a/main/database/DESCRIPTION Sun Feb 22 20:00:47 2015 +0000 +++ b/main/database/DESCRIPTION Tue Feb 24 10:12:25 2015 +0000 @@ -1,6 +1,6 @@ Name: database Version: 2.3.1 -Date: 2015-01-26 +Date: 2015-02-24 Author: Olaf Till Maintainer: Olaf Till Title: Database. diff -r 2e6bd8aa7df8 -r c73c23bbe9ce main/database/NEWS --- a/main/database/NEWS Sun Feb 22 20:00:47 2015 +0000 +++ b/main/database/NEWS Tue Feb 24 10:12:25 2015 +0000 @@ -1,3 +1,6 @@ + ** Incompatible versions of postgresql (< 8.3) are rejected at + configure time. + database 2.3.1 -------------- diff -r 2e6bd8aa7df8 -r c73c23bbe9ce main/database/src/configure.ac --- a/main/database/src/configure.ac Sun Feb 22 20:00:47 2015 +0000 +++ b/main/database/src/configure.ac Tue Feb 24 10:12:25 2015 +0000 @@ -26,5 +26,17 @@ # Checks for library functions. AC_FUNC_ERROR_AT_LINE +# Check for PostgreSQL version. (Octave is 'abused' here for string +# and version handling, only because I'm more familiar with it than +# with other tools. Should not interfer with cross-compiling as long +# as you have any Octave installed locally.) +AC_MSG_CHECKING([whether PostgreSQL version is >= 8.3]) +if $OCTAVE -q --eval ["[~, vs] = system ('$PG_CONFIG --version'); if (compare_versions (regexp (vs, '(\\d+\\.\\d+\\.\\d+)', 'tokens'){1}{:}, '8.3', '>=')) exit (1); else exit (0); endif"]; then + AC_MSG_RESULT(no) + AC_MSG_ERROR([package \"database\" does not work with PostgreSQL version < 8.3], 1); +else + AC_MSG_RESULT(yes) +fi + AC_CONFIG_FILES([Makefile]) AC_OUTPUT