diff --git a/m4/ax_matlab_version.m4 b/m4/ax_matlab_version.m4 index 7d254f56c..f82bad1ab 100644 --- a/m4/ax_matlab_version.m4 +++ b/m4/ax_matlab_version.m4 @@ -18,7 +18,6 @@ dnl along with Dynare. If not, see . AC_DEFUN([AX_MATLAB_VERSION], [dnl AC_REQUIRE([AX_MATLAB]) -AC_REQUIRE([AX_MATLAB_ARCH]) AC_MSG_CHECKING([for MATLAB version]) if test "x$MATLAB_VERSION" != "x"; then diff --git a/m4/ax_mexext.m4 b/m4/ax_mexext.m4 index 9b4e51c8b..569a9c9a7 100644 --- a/m4/ax_mexext.m4 +++ b/m4/ax_mexext.m4 @@ -33,11 +33,14 @@ AC_DEFUN([AX_MEXEXT], [dnl AC_PREREQ([2.50]) AC_REQUIRE([AX_MATLAB]) +AC_REQUIRE([AX_MATLAB_VERSION]) AC_REQUIRE([AC_CANONICAL_BUILD]) AC_CACHE_CHECK([for MEX-file suffix], [ax_cv_mexext], [if test "${MEXEXT+set}" = set ; then ax_cv_mexext="$MEXEXT" else + # The mexext script appeared in MATLAB 7.1 + AX_COMPARE_VERSION([$MATLAB_VERSION], [lt], [7.1], [AC_MSG_ERROR([I can't determine the MEX file extension. Please explicitly indicate it to the configure script with the MEXEXT variable.])]) case $build_os in *cygwin*) ax_cv_mexext=`$MATLAB/bin/mexext.bat | sed 's/\r//'` diff --git a/mex/build/matlab/configure.ac b/mex/build/matlab/configure.ac index e36adaaff..e5d91e51c 100644 --- a/mex/build/matlab/configure.ac +++ b/mex/build/matlab/configure.ac @@ -25,9 +25,9 @@ AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AX_MATLAB if test "x$ax_enable_matlab" = "xyes"; then + AX_MATLAB_VERSION AX_DOT_MEXEXT AX_MATLAB_ARCH - AX_MATLAB_VERSION if test "x$ax_matlab_version_ok" = "xyes"; then AX_MEXOPTS