Fix detection of MATLAB MEX extension under Windows/MSYS2

This check recently broke under my MSYS2 installation. I’m unsure why, but I
guess it’s related to some Windows 10 update.

The solution is to stop calling it through “cmd”, and to call it directly as an
executable.
time-shift
Sébastien Villemot 2019-09-16 18:27:53 +02:00
parent 502b0c5038
commit 36d530358b
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 2 additions and 5 deletions

View File

@ -1,7 +1,7 @@
dnl ax_mexext.m4 --- check for MEX-file suffix.
dnl
dnl Copyright © 2000-2003 Ralph Schleicher
dnl Copyright © 2009 Dynare Team
dnl Copyright © 2009-2019 Dynare Team
dnl
dnl This program is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU General Public License as
@ -40,12 +40,9 @@ 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*)
*cygwin*|*mingw*)
ax_cv_mexext=$("$MATLAB"/bin/mexext.bat | sed 's/\r//')
;;
*mingw*)
ax_cv_mexext=$(cd "$MATLAB"/bin && cmd /c mexext.bat | sed 's/\r//')
;;
*)
ax_cv_mexext=$("$MATLAB"/bin/mexext)
;;