diff options
author | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2019-08-16 12:34:44 +0200 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2019-08-16 12:34:44 +0200 |
commit | 4a396a608aefc3282baea76bc4e1965faa99b4f8 (patch) | |
tree | 1d41969dd8c747f9150256ebffbddedb426e2238 /build/linux/configure.ac | |
parent | d9261bdb05cd0863a2c3747c812871dbb851646e (diff) | |
download | astra-4a396a608aefc3282baea76bc4e1965faa99b4f8.tar.gz astra-4a396a608aefc3282baea76bc4e1965faa99b4f8.tar.bz2 astra-4a396a608aefc3282baea76bc4e1965faa99b4f8.tar.xz astra-4a396a608aefc3282baea76bc4e1965faa99b4f8.zip |
Check for the mex -R2017b option in configure
Since we use mex for linking, but CXX for compiling, we also need to
set a preprocessor macro to emulate the -R2017b option. Currently we
use -DMATLAB_MEXCMD_RELEASE=700, but it is unclear if this is the
recommended way.
This is required to build with Matlab R2018a and newer.
Diffstat (limited to 'build/linux/configure.ac')
-rw-r--r-- | build/linux/configure.ac | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/build/linux/configure.ac b/build/linux/configure.ac index ffb525a..0a9024e 100644 --- a/build/linux/configure.ac +++ b/build/linux/configure.ac @@ -174,7 +174,24 @@ if test x"$with_matlab" != x; then fi fi +AC_MSG_CHECKING([if mex requires the -R2017b option]) +if test x"$HAVEMATLAB" = xyes; then + ASTRA_CHECK_MEX_OPTION([-R2017b],[$MEXSUFFIX],[ + MEXFLAGS="-R2017b" + # TODO: check if this is the best way of emulating -R2017b when using + # CXX directly to compile mex files. + CPPFLAGS_MATLAB="-DMATLAB_MEXCMD_RELEASE=700" + AC_MSG_RESULT([yes]) + ],[ + MEXFLAGS= + CPPFLAGS_MATLAB= + AC_MSG_RESULT([no]) + ]) +fi + AC_SUBST(HAVEMATLAB) +AC_SUBST(MEXFLAGS) +AC_SUBST(CPPFLAGS_MATLAB) # octave |