| 1 |
dnl Copyright (c) 2015-2026, The matio contributors |
| 2 |
dnl Copyright (c) 2010-2014, Christopher C. Hulbert |
| 3 |
dnl All rights reserved. |
| 4 |
dnl |
| 5 |
dnl Redistribution and use in source and binary forms, with or without |
| 6 |
dnl modification, are permitted provided that the following conditions are met: |
| 7 |
dnl |
| 8 |
dnl 1. Redistributions of source code must retain the above copyright notice, this |
| 9 |
dnl list of conditions and the following disclaimer. |
| 10 |
dnl |
| 11 |
dnl 2. Redistributions in binary form must reproduce the above copyright notice, |
| 12 |
dnl this list of conditions and the following disclaimer in the documentation |
| 13 |
dnl and/or other materials provided with the distribution. |
| 14 |
dnl |
| 15 |
dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 16 |
dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 17 |
dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 18 |
dnl DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
| 19 |
dnl FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 20 |
dnl DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 21 |
dnl SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 22 |
dnl CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 23 |
dnl OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 24 |
dnl OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 |
AC_DEFUN([MATIO_CHECK_MATLAB], |
| 26 |
[ |
| 27 |
AC_ARG_WITH(matlab, |
| 28 |
AS_HELP_STRING([--with-matlab=DIR],[Directory with 'matlab' program]), |
| 29 |
MATLAB_DIR="$withval",MATLAB_DIR="") |
| 30 |
|
| 31 |
if test -n "$MATLAB_DIR" -a -d "$MATLAB_DIR"; then |
| 32 |
MATLAB_PATH="$PATH_SEPARATOR$MATLAB_DIR" |
| 33 |
fi |
| 34 |
# Do not use MATLAB as the program name because it can cause the matlab |
| 35 |
# script to fail |
| 36 |
AC_PATH_PROG([MATLABEXE], [matlab], [], [$PATH$MATLAB_PATH]) |
| 37 |
|
| 38 |
AC_SUBST([MATLABEXE]) |
| 39 |
if test -n "$MATLABEXE" |
| 40 |
then |
| 41 |
matio_cv_have_matlab=yes |
| 42 |
else |
| 43 |
matio_cv_have_matlab=no |
| 44 |
fi |
| 45 |
]) |