dynare/m4/mex.m4

64 lines
1.8 KiB
Plaintext

dnl mex.m4 --- check for mex(1) command.
dnl
dnl Copyright (C) 2000--2003 Ralph Schleicher
dnl
dnl This program is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU General Public License as
dnl published by the Free Software Foundation; either version 2,
dnl or (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; see the file COPYING. If not, write to
dnl the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
dnl Boston, MA 02111-1307, USA.
dnl
dnl As a special exception to the GNU General Public License, if
dnl you distribute this file as part of a program that contains a
dnl configuration script generated by GNU Autoconf, you may include
dnl it under the same distribution terms that you use for the rest
dnl of that program.
dnl
dnl Code:
# AX_PATH_MEX
# -----------
# Check for mex(1) command.
AC_DEFUN([AX_PATH_MEX],
[dnl
AC_PREREQ([2.50])
AC_REQUIRE([AX_MATLAB])
AC_REQUIRE([AX_MEX_OPTIONS])
AC_REQUIRE([AC_CANONICAL_HOST])
if test "${MEX+set}" != set ; then
case $host_os in
*cygwin* | *mingw32*)
ax_list='mextool mex mex.bat'
;;
*)
ax_list='mex'
;;
esac
AC_PATH_PROGS([MEX], $ax_list, mex, $MATLAB/bin:$PATH)
fi
AC_SUBST([MEX])
if test "${MEXFLAGS+set}" != set ; then
MEXFLAGS=-O
fi
AC_SUBST([MEXFLAGS])
if test "${MEXLDADD+set}" != set ; then
MEXLDADD=
fi
AC_SUBST([MEXLDADD])
])
dnl mex.m4 ends here
dnl Local variables:
dnl tab-width: 8
dnl End: