From f5bf76deb5d76b356d43edbfbc62d02c12e17642 Mon Sep 17 00:00:00 2001
From: Houtan Bastani <houtan@dynare.org>
Date: Wed, 27 Jun 2018 15:04:24 +0200
Subject: [PATCH] fix mex build system for macOS

---
 mex/build/matlab/configure.ac | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/mex/build/matlab/configure.ac b/mex/build/matlab/configure.ac
index 40e93d6f80..ef87b0fdbb 100644
--- a/mex/build/matlab/configure.ac
+++ b/mex/build/matlab/configure.ac
@@ -48,9 +48,6 @@ case ${host_os} in
     AC_MSG_WARN([not run from MATLAB, because it cannot load the Cygwin DLL.])
     AC_MSG_WARN([This is probably not what you want. Consider using a MinGW cross-compiler.])
     ;;
-  *darwin13*)
-    CXXFLAGS="$CXXFLAGS -std=c++11"
-    ;;
 esac
 
 CFLAGS="$CFLAGS -Wall -Wno-parentheses"
@@ -76,6 +73,9 @@ case ${host_os} in
     # Also see <uchar.h>
     CFLAGS="$CFLAGS -include stdint.h -Dchar16_t=uint_least16_t"
     ;;
+  *darwin*)
+    CXXFLAGS="$CXXFLAGS -stdlib=libc++"
+    ;;
 esac
 AX_PTHREAD
 
-- 
GitLab