Avoid overriding the check-local rule, hushing automake warning
[gnash.git] / macros / mtasc.m4
blob4283db163b44cb25cc93429660c4f92938cabdfd
1 dnl
2 dnl    Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
3 dnl
4 dnl  This program is free software; you can redistribute it and/or modify
5 dnl  it under the terms of the GNU General Public License as published by
6 dnl  the Free Software Foundation; either version 3 of the License, or
7 dnl  (at your option) any later version.
8 dnl
9 dnl  This program is distributed in the hope that it will be useful,
10 dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 dnl  GNU General Public License for more details.
13 dnl  You should have received a copy of the GNU General Public License
14 dnl  along with this program; if not, write to the Free Software
15 dnl  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
16 dnl
20 # Use: 
21 #       AC_PATH_MTASC
23 # Provides:
24 #       MTASC             - Path to mtasc executable
25 #       MTASC_CLASSPATH   - Classpath for mtasc
28 AC_DEFUN([AC_PATH_MTASC], [
29   MTASC=""
30   MTASC_CLASSPATH=""
32   AC_ARG_WITH(mtasc, AC_HELP_STRING([--with-mtasc=<path>], [Path to the mtasc executable]), [
33     case "${withval}" in
34       yes|no) ;;
35       *) MTASC=${withval} ;;
36     esac
37   ], MTASC="")
39   AC_ARG_WITH(mtasc-classpath, AC_HELP_STRING([--with-mtasc-classpath=<path>], [CLASSPATH for mtasc]), [
40     case "${withval}" in
41       yes|no) ;;
42       *) MTASC_CLASSPATH=${withval} ;;
43     esac
44   ], MTASC_CLASSPATH="")
46   if test x"$MTASC" = "x"; then
47     AC_PATH_PROG(MTASC, mtasc, ,[${pathlist}])
48   fi
50   if test x"$MTASC" != "x" -a x"$MTASC_CLASSPATH" = "x"; then
51     # cross your fingers !
52     if test -d "`dirname ${MTASC}`/std"; then
53     dir="`dirname ${MTASC}`/std"
54     elif test -d "/usr/share/mtasc/std"; then
55     dir="/usr/share/mtasc/std"
56     else
57     dnl FIXME
58     dir="/usr/share/ocaml/mtasc/std"
59     fi
60     MTASC_CLASSPATH=$dir
61   fi
64   AC_SUBST(MTASC)
65   AC_SUBST(MTASC_CLASSPATH)
68 # Local Variables:
69 # c-basic-offset: 2
70 # tab-width: 2
71 # indent-tabs-mode: nil
72 # End: