Changeset 18119
- Timestamp:
- 06/06/14 13:41:27 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/m4/issm_options.m4
r17895 r18119 168 168 169 169 dnl 4. get MEXLIB MEXLINK and MEXEXT (experimental) except for windows 170 AC_MSG_CHECKING([matlab's mex compilation flags]) 170 171 case "${host_os}" in 171 172 *cygwin*) … … 184 185 MEXLIB=$( $MATLAB_ROOT/bin/mex -v 2>&1 < /dev/null | grep CXXLIBS | sed -e "s/ CXXLIBS = //g") 185 186 MEXEXT=$( $MATLAB_ROOT/bin/mex -v 2>&1 < /dev/null | grep LDEXTENSION | sed -e "s/ LDEXTENSION = //g") 187 188 dnl version 2014 and up 189 if test "x$MEXEXT" = "x" ; then 190 echo "#include <mex.h>" > conftest.cpp 191 echo "void mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){}" >> conftest.cpp 192 $MATLAB_ROOT/bin/mex -v -lmex conftest.cpp > conftest.tmp 2>&1 193 rm -f conftest.cpp 194 MEXLINK=$(cat conftest.tmp | grep LDFLAGS | sed -e "s/LDFLAGS ://g") 195 MEXLIB=$( cat conftest.tmp | grep LINKLIBS | sed -e "s/LINKLIBS ://g") 196 MEXEXT=$( cat conftest.tmp | grep LDEXT | sed -e "s/LDEXT ://g" | awk '{print $[1]}') 197 rm -f conftest.tmp 198 fi 199 186 200 ;; 187 201 esac 202 AC_MSG_RESULT(done) 188 203 if test "x$MEXEXT" = "x" ; then 189 204 AC_MSG_ERROR([Couldn't find mex... check your installation of matlab]) … … 191 206 192 207 AC_SUBST([MATLABINCL]) 193 AC_SUBST([MEX])194 208 MATLABWRAPPEREXT=$MEXEXT 195 209 AC_SUBST([MATLABWRAPPEREXT])
Note:
See TracChangeset
for help on using the changeset viewer.