source: branches/blt4/cf/rpLangMatlab.m4 @ 2545

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

update from trunk

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