Mercurial > forge
diff main/database/src/configure.ac @ 12564:c73c23bbe9ce octave-forge
Check postgresql version at configure time. Fixes bug #44345.
author | i7tiol |
---|---|
date | Tue, 24 Feb 2015 10:12:25 +0000 |
parents | 6ef2f5b6a9e5 |
children | 1af86934c14e |
line wrap: on
line diff
--- 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