Add a compile-time check for MATLAB version, as we already do for Octave

time-shift
Sébastien Villemot 2018-06-06 14:31:25 +02:00
parent 88e89dfb21
commit a71e0ebee4
2 changed files with 2 additions and 1 deletions

View File

@ -87,7 +87,7 @@ if isoctave
skipline() skipline()
end end
else 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() 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.'); 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() skipline()

View File

@ -34,6 +34,7 @@ if test "x$ax_enable_matlab" = "xyes"; then
if test "x$ax_matlab_version_ok" = "xyes"; then if test "x$ax_matlab_version_ok" = "xyes"; then
AX_MEXOPTS 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 fi
CFLAGS="$MATLAB_CFLAGS" CFLAGS="$MATLAB_CFLAGS"