From f978ebeff7a42bc541fa9c29d8caa126246e7edb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien.villemot@ens.fr>
Date: Fri, 8 Apr 2011 11:07:03 +0200
Subject: [PATCH] Provisions for MATLAB 7.12 (R2011a)

---
 m4/ax_matlab_version.m4 |  3 +++
 matlab/dynare_config.m  |  4 ++--
 windows/dynare.nsi      | 12 ++++++------
 3 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/m4/ax_matlab_version.m4 b/m4/ax_matlab_version.m4
index 438201f1b..c6844453d 100644
--- a/m4/ax_matlab_version.m4
+++ b/m4/ax_matlab_version.m4
@@ -22,6 +22,9 @@ AC_REQUIRE([AX_MATLAB])
 AC_MSG_CHECKING([for MATLAB version])
 if test "x$MATLAB_VERSION" != "x"; then
   case $MATLAB_VERSION in
+    *2011a | *2011A)
+      MATLAB_VERSION="7.12"
+      ;;
     *2010b | *2010B)
       MATLAB_VERSION="7.11"
       ;;
diff --git a/matlab/dynare_config.m b/matlab/dynare_config.m
index 895d4a074..b36d821f6 100644
--- a/matlab/dynare_config.m
+++ b/matlab/dynare_config.m
@@ -89,7 +89,7 @@ else
                 addpath(mexpath)
             end
         else
-            mexpath = [dynareroot '../mex/matlab/win32-7.5-7.11'];
+            mexpath = [dynareroot '../mex/matlab/win32-7.5-7.12'];
             if exist(mexpath, 'dir')
                 addpath(mexpath)
             end
@@ -114,7 +114,7 @@ else
                 addpath(mexpath)
             end
         else
-            mexpath = [dynareroot '../mex/matlab/win64-7.8-7.11'];
+            mexpath = [dynareroot '../mex/matlab/win64-7.8-7.12'];
             if exist(mexpath, 'dir')
                 addpath(mexpath)
             end
diff --git a/windows/dynare.nsi b/windows/dynare.nsi
index 90595d59b..7869e1601 100644
--- a/windows/dynare.nsi
+++ b/windows/dynare.nsi
@@ -80,9 +80,9 @@ Section "MEX files for MATLAB 32-bit, version 6.5 to 7.4 (R13 to R2007a)"
  File ..\mex\matlab\win32-6.5-7.4\*.dll
 SectionEnd
 
-Section "MEX files for MATLAB 32-bit, version 7.5 to 7.11 (R2007b to R2010b)"
- SetOutPath $INSTDIR\mex\matlab\win32-7.5-7.11
- File ..\mex\matlab\win32-7.5-7.11\*.mexw32
+Section "MEX files for MATLAB 32-bit, version 7.5 to 7.12 (R2007b to R2011a)"
+ SetOutPath $INSTDIR\mex\matlab\win32-7.5-7.12
+ File ..\mex\matlab\win32-7.5-7.12\*.mexw32
 SectionEnd
 
 # Currently we don't have that version of MATLAB
@@ -101,9 +101,9 @@ Section "MEX files for MATLAB 64-bit, version 7.5 to 7.7 (R2007b to R2008b)"
  File ..\mex\matlab\win64-7.5-7.7\*.mexw64
 SectionEnd
 
-Section "MEX files for MATLAB 64-bit, version 7.8 to 7.11 (R2009a to R2010b)"
- SetOutPath $INSTDIR\mex\matlab\win64-7.8-7.11
- File ..\mex\matlab\win64-7.8-7.11\*.mexw64
+Section "MEX files for MATLAB 64-bit, version 7.8 to 7.12 (R2009a to R2011a)"
+ SetOutPath $INSTDIR\mex\matlab\win64-7.8-7.12
+ File ..\mex\matlab\win64-7.8-7.12\*.mexw64
 SectionEnd
 
 SectionGroupEnd
-- 
GitLab