Skip to content
Snippets Groups Projects
Commit 7f61dcca authored by sebastien's avatar sebastien
Browse files

Build system: fix for building on older MATLAB (at least 7.0.4)

git-svn-id: https://www.dynare.org/svn/dynare/trunk@3155 ac1d8469-bf42-47a9-8791-bf33cf982152
parent 210a1ba2
Branches
Tags
No related merge requests found
...@@ -23,6 +23,8 @@ AC_REQUIRE([AX_MATLAB_VERSION]) ...@@ -23,6 +23,8 @@ AC_REQUIRE([AX_MATLAB_VERSION])
AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AC_PROG_SED]) AC_REQUIRE([AC_PROG_SED])
AX_COMPARE_VERSION([$MATLAB_VERSION], [lt], [6.5], [AC_MSG_ERROR([Your MATLAB is too old, please upgrade to 6.5 (R13) at least.])])
AC_MSG_CHECKING([for options to compile MEX for MATLAB]) AC_MSG_CHECKING([for options to compile MEX for MATLAB])
MATLAB_CPPFLAGS="-I$MATLAB/extern/include" MATLAB_CPPFLAGS="-I$MATLAB/extern/include"
...@@ -49,7 +51,17 @@ case ${MATLAB_ARCH} in ...@@ -49,7 +51,17 @@ case ${MATLAB_ARCH} in
win32 | win64) win32 | win64)
MATLAB_CFLAGS="-fexceptions -g -O2" MATLAB_CFLAGS="-fexceptions -g -O2"
MATLAB_CXXFLAGS="-g -O2" MATLAB_CXXFLAGS="-g -O2"
LIBLOC="$MATLAB/extern/lib/${MATLAB_ARCH}/microsoft" case $MATLAB_VERSION in
6.5*|7.0|7.0.0|7.0.4)
LIBLOC="$MATLAB/extern/lib/${MATLAB_ARCH}/microsoft/msvc60"
;;
7.0.1)
AC_MSG_ERROR([MATLAB version 7.0.1 (R14SP1) is buggy (LAPACK library missing for MSVC), and can't be used for compiling MEX files])
;;
*)
LIBLOC="$MATLAB/extern/lib/${MATLAB_ARCH}/microsoft"
;;
esac
MATLAB_LDFLAGS="-static-libgcc -shared \$(top_srcdir)/mex.def" MATLAB_LDFLAGS="-static-libgcc -shared \$(top_srcdir)/mex.def"
MATLAB_LIBS="$LIBLOC/libmex.lib $LIBLOC/libmx.lib $LIBLOC/libmwlapack.lib -lstdc++" MATLAB_LIBS="$LIBLOC/libmex.lib $LIBLOC/libmx.lib $LIBLOC/libmwlapack.lib -lstdc++"
# Starting from MATLAB 7.5, BLAS and LAPACK are in distinct libraries # Starting from MATLAB 7.5, BLAS and LAPACK are in distinct libraries
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment