From 7de6be31e6822439571ef23d2c860c38cf145d61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien.villemot@ens.fr> Date: Tue, 18 Sep 2012 11:54:40 +0200 Subject: [PATCH] Upgrade the minimum requirement to MATLAB 7.3 (R2006b) --- doc/dynare.texi | 2 +- m4/ax_mexopts.m4 | 3 +-- matlab/dynare.m | 4 ++-- matlab/dynare_config.m | 18 ++++-------------- windows/README.txt | 4 ++-- windows/dynare.nsi | 10 ---------- 6 files changed, 10 insertions(+), 31 deletions(-) diff --git a/doc/dynare.texi b/doc/dynare.texi index bf320a1dbb..66e511a054 100644 --- a/doc/dynare.texi +++ b/doc/dynare.texi @@ -372,7 +372,7 @@ In order to run Dynare, you need one of the following: @itemize @item -MATLAB version 7.0 (R14) or above; +MATLAB version 7.3 (R2006b) or above; @item GNU Octave version 3.4.0 or above. diff --git a/m4/ax_mexopts.m4 b/m4/ax_mexopts.m4 index 90ffac2348..02cc204993 100644 --- a/m4/ax_mexopts.m4 +++ b/m4/ax_mexopts.m4 @@ -22,7 +22,7 @@ AC_REQUIRE([AX_MATLAB_ARCH]) AC_REQUIRE([AX_MATLAB_VERSION]) AC_REQUIRE([AC_PROG_SED]) -AX_COMPARE_VERSION([$MATLAB_VERSION], [lt], [7.0], [AC_MSG_ERROR([Your MATLAB is too old, please upgrade to 7.0 (R14) at least.])]) +AX_COMPARE_VERSION([$MATLAB_VERSION], [lt], [7.3], [AC_MSG_ERROR([Your MATLAB is too old, please upgrade to 7.3 (R2006b) at least.])]) AC_MSG_CHECKING([for options to compile MEX for MATLAB]) @@ -52,7 +52,6 @@ case ${MATLAB_ARCH} in MATLAB_CFLAGS="-fexceptions -g -O2" MATLAB_CXXFLAGS="-g -O2" MATLAB_FFLAGS="-fexceptions -g -O2 -fno-underscoring" - AX_COMPARE_VERSION([$MATLAB_VERSION], [eq], [7.0.1], [AC_MSG_ERROR([MATLAB version 7.0.1 (R14SP1) is buggy (LAPACK library missing for MSVC), and can't be used for compiling MEX files])]) MATLAB_DEFS="$MATLAB_DEFS -DNDEBUG" # Note that static-libstdc++ is only supported since GCC 4.5 (but generates no error on older versions) MATLAB_LDFLAGS="-static-libgcc -static-libstdc++ -shared \$(top_srcdir)/mex.def -L$MATLAB/bin/${MATLAB_ARCH}" diff --git a/matlab/dynare.m b/matlab/dynare.m index cc81bb8da5..4945844934 100644 --- a/matlab/dynare.m +++ b/matlab/dynare.m @@ -51,8 +51,8 @@ if exist('OCTAVE_VERSION') warning('This version of Dynare has only been tested on Octave 3.4.0 and above. Since your Octave version is older than that, Dynare may fail to run, or give unexpected results. Consider upgrading your Octave installation.'); end else - if matlab_ver_less_than('7.0') - warning('This version of Dynare has only been tested on MATLAB 7.0 (R14) 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.'); + if matlab_ver_less_than('7.3') + warning('This version of Dynare has only been tested on MATLAB 7.3 (R2006b) 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.'); end end diff --git a/matlab/dynare_config.m b/matlab/dynare_config.m index 7dc52d7b7b..ede09a40de 100644 --- a/matlab/dynare_config.m +++ b/matlab/dynare_config.m @@ -77,8 +77,8 @@ if ~exist('OCTAVE_VERSION') end end -% ordeig() was introducted in MATLAB 7.0.1, and doesn't exist in Octave -if exist('OCTAVE_VERSION') || matlab_ver_less_than('7.0.1') +% ordeig() doesn't exist in Octave +if exist('OCTAVE_VERSION') addpath([dynareroot '/missing/ordeig']) end @@ -100,12 +100,7 @@ if exist('OCTAVE_VERSION') else % Add win32 specific paths for Dynare Windows package if strcmp(computer, 'PCWIN') - if matlab_ver_less_than('7.3') - mexpath = [dynareroot '../mex/matlab/win32-7.0-7.2']; - if exist(mexpath, 'dir') - addpath(mexpath) - end - elseif matlab_ver_less_than('7.5') + if matlab_ver_less_than('7.5') mexpath = [dynareroot '../mex/matlab/win32-7.3-7.4']; if exist(mexpath, 'dir') addpath(mexpath) @@ -120,12 +115,7 @@ else % Add win64 specific paths for Dynare Windows package if strcmp(computer, 'PCWIN64') - if matlab_ver_less_than('7.3') - mexpath = [dynareroot '../mex/matlab/win64-7.2']; - if exist(mexpath, 'dir') - addpath(mexpath) - end - elseif matlab_ver_less_than('7.5') + if matlab_ver_less_than('7.5') mexpath = [dynareroot '../mex/matlab/win64-7.3-7.4']; if exist(mexpath, 'dir') addpath(mexpath) diff --git a/windows/README.txt b/windows/README.txt index c03aed769c..48f6d3739c 100644 --- a/windows/README.txt +++ b/windows/README.txt @@ -25,8 +25,8 @@ NOTE: Dynare comes with an automated uninstaller, which you can run from the Using Dynare with MATLAB (R) ---------------------------- -Dynare requires MATLAB (R) version 7.0 or above. With older versions of MATLAB (R), -it may fail or give unexpected results. +Dynare requires MATLAB (R) version 7.3 (R2006b) or above. With older versions +of MATLAB (R), it may fail or give unexpected results. To use Dynare, you just have to add the 'matlab' subdirectory of your Dynare installation to MATLAB (R) path. You have two options for doing that: diff --git a/windows/dynare.nsi b/windows/dynare.nsi index 716a3c9893..44accbe679 100644 --- a/windows/dynare.nsi +++ b/windows/dynare.nsi @@ -83,11 +83,6 @@ SectionEnd SectionGroup "MEX files for MATLAB" -Section "MEX files for MATLAB 32-bit, version 7.0 to 7.2 (R14 to R2006a)" - SetOutPath $INSTDIR\mex\matlab\win32-7.0-7.2 - File ..\mex\matlab\win32-7.0-7.2\*.dll -SectionEnd - Section "MEX files for MATLAB 32-bit, version 7.3 to 7.4 (R2006b to R2007a)" SetOutPath $INSTDIR\mex\matlab\win32-7.3-7.4 File ..\mex\matlab\win32-7.3-7.4\*.mexw32 @@ -98,11 +93,6 @@ Section "MEX files for MATLAB 32-bit, version 7.5 to 8.0 (R2007b to R2012b)" File ..\mex\matlab\win32-7.5-8.0\*.mexw32 SectionEnd -Section "MEX files for MATLAB 64-bit, version 7.2 (R2006a)" - SetOutPath $INSTDIR\mex\matlab\win64-7.2 - File ..\mex\matlab\win64-7.2\*.mexw64 -SectionEnd - Section "MEX files for MATLAB 64-bit, version 7.3 to 7.4 (R2006b to R2007a)" SetOutPath $INSTDIR\mex\matlab\win64-7.3-7.4 File ..\mex\matlab\win64-7.3-7.4\*.mexw64 -- GitLab