diff --git a/.gitignore b/.gitignore
index 82e8a6444615fa4c440ef7a8886cb33c736dcfbc..a5a9becfc1b124148d29136883d3ce0c4e942318 100644
--- a/.gitignore
+++ b/.gitignore
@@ -83,6 +83,7 @@ doc/internals/ltxpng
 *.mexmaca64
 *.mexmaci
 *.mexmaci64
+*.mexmaca64
 /mex/matlab/
 /mex/octave/
 
diff --git a/README.md b/README.md
index 36ea89126219aa1758f50b1d44ec5fa3c6a83fa4..7c0dfc5dd215071152265a38c739cd64c6551269 100644
--- a/README.md
+++ b/README.md
@@ -45,8 +45,8 @@ determine the type of your MATLAB/Octave installation, type:
 ```matlab
 >> computer
 ```
-at the MATLAB/Octave prompt. Under MATLAB, if it returns `PCWIN64`, `GLNX64` or
-`MACI64`, then it is a 64-bit MATLAB; if it returns `PCWIN`, `MACI` or `GLNX`,
+at the MATLAB/Octave prompt. Under MATLAB, if it returns `PCWIN64`, `GLNX64`,
+`MACA64` or `MACI64`, then it is a 64-bit MATLAB; if it returns `PCWIN`, `MACI` or `GLNX`,
 then it is a 32-bit MATLAB. Under Octave, if it returns a string that begins
 with `x86_64`, it is a 64-bit Octave; if the strings begins with `i686`, it is
 a 32-bit Octave.
diff --git a/doc/manual/source/running-dynare.rst b/doc/manual/source/running-dynare.rst
index 0e0bc48390f7a0e87cceaa460661b350cdc46b56..6e2b906478bfdaf5186f137ad855606dd0f3aab0 100644
--- a/doc/manual/source/running-dynare.rst
+++ b/doc/manual/source/running-dynare.rst
@@ -315,7 +315,7 @@ by the ``dynare`` command.
         Prevent Dynare from printing the output of the steps leading up to the
         preprocessor as well as the preprocessor output itself.
 
-    .. option:: mexext=mex|mexw32|mexw64|mexmaci64|mexa64
+    .. option:: mexext=mex|mexw32|mexw64|mexmaca64|mexmaci64|mexa64
 
         The mex extension associated with your platform to be used
         when compiling output associated with :opt:`use_dll`.
diff --git a/m4/ax_matlab_arch.m4 b/m4/ax_matlab_arch.m4
index e37bd522880f92389ece091e1fc718137f6c7c82..c9902b3ad3fb8f5ab24da6cbbde61bacd9beea55 100644
--- a/m4/ax_matlab_arch.m4
+++ b/m4/ax_matlab_arch.m4
@@ -57,6 +57,9 @@ else
       *mexmaci64)
 	ax_cv_matlab_arch=maci64
 	;;
+      *mexmaca64)
+	ax_cv_matlab_arch=maca64
+	;;
       *)
 	ax_cv_matlab_arch=unknown
 	;;
diff --git a/m4/ax_mexopts.m4 b/m4/ax_mexopts.m4
index 52c7505811a56d08ee5660f54ddb6259cd29a325..5e3e9ad846251e85ca67b57195b969e506359138 100644
--- a/m4/ax_mexopts.m4
+++ b/m4/ax_mexopts.m4
@@ -79,6 +79,19 @@ case ${MATLAB_ARCH} in
     MATLAB_LIBS="-L$MATLAB/bin/maci64 -lmx -lmex -lmat -lmwlapack -lmwblas"
     ax_mexopts_ok="yes"
     ;;
+  maca64)
+    MATLAB_DEFS="-DNDEBUG"
+    MATLAB_CFLAGS="-fno-common -fexceptions"
+    MATLAB_CXXFLAGS="-fno-common -fexceptions"
+    MATLAB_FCFLAGS="-fexceptions -fbackslash"
+    MATLAB_LDFLAGS_NOMAP="-Wl,-twolevel_namespace -undefined error -bundle"
+    MATLAB_LDFLAGS="$MATLAB_LDFLAGS_NOMAP -Wl,-exported_symbols_list,\$(abs_top_srcdir)/mexFunction-MacOSX.map"
+    # This -L flag is put here, hence later on the linker command line, so as
+    # to avoid linking against the HDF5 shipped by MATLAB (which would
+    # otherwise override the HDF5 from Homebrew)
+    MATLAB_LIBS="-L$MATLAB/bin/maca64 -lmx -lmex -lmat -lmwlapack -lmwblas"
+    ax_mexopts_ok="yes"
+    ;;
   *)
     ax_mexopts_ok="no"
     ;;
diff --git a/matlab/add_path_to_mex_files.m b/matlab/add_path_to_mex_files.m
index 2a352d82fcd7389869628550c97147718e011111..24ccaf15e4111f8eff6241179eea154151ce1b55 100644
--- a/matlab/add_path_to_mex_files.m
+++ b/matlab/add_path_to_mex_files.m
@@ -70,9 +70,9 @@ else
         end
     end
     % Add macOS paths for Dynare Mac package
-    if strcmp(computer, 'MACI64')
+    if strcmp(computer, 'MACI64') || strcmp(computer, 'MACA64')
         if matlab_ver_less_than('9.4')
-            tmp = [dynareroot '../mex/matlab/maci64-8.3-9.3/'];
+            tmp = [dynareroot '../mex/matlab/' lower(computer) '-8.3-9.3/'];
             if exist(tmp, 'dir')
                 mexpath = tmp;
                 if modifypath