From 572f521bafa9895e9bf853ebe819e51f895e5275 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien.villemot@ens.fr>
Date: Thu, 28 Oct 2010 12:30:45 +0200
Subject: [PATCH] Build system: for MEX files under Windows+MATLAB, link with
 -lmat

---
 m4/ax_mexopts.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/m4/ax_mexopts.m4 b/m4/ax_mexopts.m4
index ac41fa5bde..c0fbd11458 100644
--- a/m4/ax_mexopts.m4
+++ b/m4/ax_mexopts.m4
@@ -54,7 +54,7 @@ case ${MATLAB_ARCH} in
     MATLAB_DEFS="$MATLAB_DEFS -DNDEBUG"
     # Note that static-libstdc++ is only supported since GCC 4.5 (but generates no error on older versions)
     MATLAB_LDFLAGS="-static-libgcc -static-libstdc++ -shared \$(top_srcdir)/mex.def -L$MATLAB/bin/${MATLAB_ARCH}"
-    MATLAB_LIBS="-lmex -lmx -lmwlapack"
+    MATLAB_LIBS="-lmex -lmx -lmat -lmwlapack"
     # Starting from MATLAB 7.5, BLAS and LAPACK are in distinct libraries
     AX_COMPARE_VERSION([$MATLAB_VERSION], [ge], [7.5], [MATLAB_LIBS="${MATLAB_LIBS} -lmwblas"])
     ax_mexopts_ok="yes"
-- 
GitLab