From a71e0ebee4c52748436c0e7ae2066705c9a3aea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Wed, 6 Jun 2018 14:31:25 +0200 Subject: [PATCH] Add a compile-time check for MATLAB version, as we already do for Octave --- matlab/dynare.m | 2 +- mex/build/matlab/configure.ac | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/matlab/dynare.m b/matlab/dynare.m index fccfe619c..e04d24d79 100644 --- a/matlab/dynare.m +++ b/matlab/dynare.m @@ -87,7 +87,7 @@ if isoctave skipline() end else - if matlab_ver_less_than('7.5') + if matlab_ver_less_than('7.5') % Should match the test in mex/build/matlab/configure.ac skipline() warning('This version of Dynare has only been tested on MATLAB 7.5 (R2007b) and above. Since your MATLAB version is older than that, Dynare may fail to run, or give unexpected results. Consider upgrading your MATLAB installation, or switch to Octave.'); skipline() diff --git a/mex/build/matlab/configure.ac b/mex/build/matlab/configure.ac index 668706229..40e93d6f8 100644 --- a/mex/build/matlab/configure.ac +++ b/mex/build/matlab/configure.ac @@ -34,6 +34,7 @@ if test "x$ax_enable_matlab" = "xyes"; then if test "x$ax_matlab_version_ok" = "xyes"; then AX_MEXOPTS + AX_COMPARE_VERSION([$MATLAB_VERSION], [lt], [7.5], [AC_MSG_ERROR([Your MATLAB is too old, please upgrade to version 7.5 (R2007b) at least.])]) fi CFLAGS="$MATLAB_CFLAGS"