summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/linux/Makefile.in3
-rw-r--r--build/linux/configure.ac3
2 files changed, 6 insertions, 0 deletions
diff --git a/build/linux/Makefile.in b/build/linux/Makefile.in
index 9066f0a..ae3dec8 100644
--- a/build/linux/Makefile.in
+++ b/build/linux/Makefile.in
@@ -4,6 +4,7 @@ cuda=@HAVECUDA@
matlab=@HAVEMATLAB@
python=@HAVEPYTHON@
boostutf=@HAVEBOOSTUTF@
+macos=@IS_MACOS@
MATLAB_ROOT=@MATLAB_ROOT@
octave=@HAVEOCTAVE@
@@ -64,9 +65,11 @@ endif
ifeq ($(matlab),yes)
# TODO: Do we also want -fopenmp for octave?
CPPFLAGS+=-I$(MATLAB_ROOT)/extern/include -DMATLAB_MEX_FILE
+ifeq ($(macos),no)
CXXFLAGS+=-fopenmp
LDFLAGS+=-fopenmp
endif
+endif
# MODLDFLAGS are the base LDFLAGS for matlab, octave, python modules
MODLDFLAGS=$(LDFLAGS) -L$(abs_top_builddir)/.libs
diff --git a/build/linux/configure.ac b/build/linux/configure.ac
index 43cb1a8..813b462 100644
--- a/build/linux/configure.ac
+++ b/build/linux/configure.ac
@@ -251,13 +251,16 @@ AC_CANONICAL_HOST
case $host_os in
darwin* )
CPPFLAGS_OS="-stdlib=libstdc++ -mmacosx-version-min=10.6"
+ IS_MACOS=yes
;;
*)
CPPFLAGS_OS=""
+ IS_MACOS=no
;;
esac
AC_SUBST(CPPFLAGS_OS)
+AC_SUBST(IS_MACOS)
# For some reason, some older versions of autoconf produce a config.status
# that disables all lines looking like VPATH=@srcdir@