Debian Codegraph @

matio-1.5.0/config/matio_matlab.m4

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