From c74b1d1bdc8c7c6df438710c8a10a9524b1142f3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien.villemot@ens.fr>
Date: Fri, 14 Sep 2012 11:10:47 +0200
Subject: [PATCH] Provisions for MATLAB 8.0 (R2012b)

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

diff --git a/m4/ax_matlab_version.m4 b/m4/ax_matlab_version.m4
index fbd5e0da9..049feb803 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
+    *2012b | *2012B)
+      MATLAB_VERSION="8.0"
+      ;;
     *2012a | *2012A)
       MATLAB_VERSION="7.14"
       ;;
diff --git a/matlab/dynare_config.m b/matlab/dynare_config.m
index d9b6846f7..7dc52d7b7 100644
--- a/matlab/dynare_config.m
+++ b/matlab/dynare_config.m
@@ -111,7 +111,7 @@ else
                 addpath(mexpath)
             end
         else
-            mexpath = [dynareroot '../mex/matlab/win32-7.5-7.14'];
+            mexpath = [dynareroot '../mex/matlab/win32-7.5-8.0'];
             if exist(mexpath, 'dir')
                 addpath(mexpath)
             end
@@ -136,7 +136,7 @@ else
                 addpath(mexpath)
             end
         else
-            mexpath = [dynareroot '../mex/matlab/win64-7.8-7.14'];
+            mexpath = [dynareroot '../mex/matlab/win64-7.8-8.0'];
             if exist(mexpath, 'dir')
                 addpath(mexpath)
             end
@@ -150,7 +150,7 @@ else
                 addpath(mexpath)
             end
         else
-            mexpath = [dynareroot '../mex/matlab/osx32-7.5-7.14'];
+            mexpath = [dynareroot '../mex/matlab/osx32-7.5-8.0'];
             if exist(mexpath, 'dir')
                 addpath(mexpath)
             end
diff --git a/windows/dynare.nsi b/windows/dynare.nsi
index 40822c2ee..716a3c989 100644
--- a/windows/dynare.nsi
+++ b/windows/dynare.nsi
@@ -93,9 +93,9 @@ Section "MEX files for MATLAB 32-bit, version 7.3 to 7.4 (R2006b to R2007a)"
  File ..\mex\matlab\win32-7.3-7.4\*.mexw32
 SectionEnd
 
-Section "MEX files for MATLAB 32-bit, version 7.5 to 7.14 (R2007b to R2012a)"
- SetOutPath $INSTDIR\mex\matlab\win32-7.5-7.14
- File ..\mex\matlab\win32-7.5-7.14\*.mexw32
+Section "MEX files for MATLAB 32-bit, version 7.5 to 8.0 (R2007b to R2012b)"
+ SetOutPath $INSTDIR\mex\matlab\win32-7.5-8.0
+ File ..\mex\matlab\win32-7.5-8.0\*.mexw32
 SectionEnd
 
 Section "MEX files for MATLAB 64-bit, version 7.2 (R2006a)"
@@ -113,9 +113,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.14 (R2009a to R2012a)"
- SetOutPath $INSTDIR\mex\matlab\win64-7.8-7.14
- File ..\mex\matlab\win64-7.8-7.14\*.mexw64
+Section "MEX files for MATLAB 64-bit, version 7.8 to 8.0 (R2009a to R2012b)"
+ SetOutPath $INSTDIR\mex\matlab\win64-7.8-8.0
+ File ..\mex\matlab\win64-7.8-8.0\*.mexw64
 SectionEnd
 
 SectionGroupEnd
-- 
GitLab