source: trunk/cf/rpLangMatlab.m4 @ 2298

Last change on this file since 2298 was 2298, checked in by gah, 13 years ago

fixes for grid.sh build for opensees

File size: 1.1 KB
Line 
1AC_DEFUN([RP_LANG_MATLAB],[
2with_matlab="yes"
3AC_ARG_WITH(
4    [matlab],
5    [AS_HELP_STRING([--with-matlab[=DIR]],
6        [location of matlab and mex compiler @<:@default=yes@:>@])],
7    [],
8    [with_matlab=yes])
9
10MCC=""
11MEX=""
12MEX_ARCH=""
13MEXEXT=""
14MATLAB=
15if test "$with_matlab" != "no" ; then
16  if test "$with_matlab" = "yes" ; then
17    AC_PATH_PROG(MATLAB, matlab)
18  else
19    AC_PATH_PROG(MATLAB, matlab, [], [${with_matlab}/bin:${with_matlab}])
20  fi
21fi
22
23if test "x$MATLAB" != "x" ; then
24  # Found matlab.  May be a symlink to the real binary.  Run "matlab -e"
25  # to tell where matlab is installed.
26
27  matlab_bindir=`${MATLAB} -e | grep "MATLAB=" | sed s/MATLAB=//`/bin
28
29  # Now see if we can find "mex" or "mexext" there.
30  AC_PATH_PROG(MEX, mex, [], [${matlab_bindir}])
31  AC_PATH_PROG(MEXEXT, mexext, [], [${matlab_bindir}])
32
33  # Run "mexext" to get the expected module extension for this platform.
34  AC_MSG_CHECKING([for mex extension])
35  if test "x$MEXEXT" != "x" ; then
36    MEXEXT=`$MEXEXT`
37  else
38    MEXEXT="mexglx"
39  fi
40  AC_MSG_RESULT([$MEXEXT])
41  AC_PATH_PROG(MCC, mcc, [], [${matlab_bindir}])
42  AC_MSG_CHECKING([for mcc extension])
43fi
44])
Note: See TracBrowser for help on using the repository browser.