2 dnl Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
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.
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
24 # HAXE - Path to haxe executable
25 # HAXE_CLASSPATH - Classpath for haxe
28 AC_DEFUN([AC_PATH_HAXE], [
32 AC_ARG_WITH(haxe, AC_HELP_STRING([--with-haxe=<path>], [Path to the haxe executable]), [
39 AC_ARG_WITH(haxe-classpath, AC_HELP_STRING([--with-haxe-classpath=<path>], [CLASSPATH for haxe]), [
42 *) HAXE_CLASSPATH=${withval} ;;
46 if test x"$HAXE" = "x"; then
47 AC_PATH_PROG(HAXE, haxe, ,[${pathlist}])
50 if test x"$HAXE" != "x"; then
51 AC_MSG_CHECKING([for HAXE version])
52 HAXE_VERSION=`$HAXE -help | grep -i ^haxe | awk '{print $'3'}'`
53 AC_MSG_RESULT([${HAXE_VERSION}])
55 major=`echo $HAXE_VERSION | cut -d '.' -f 1`
56 minor=`echo $HAXE_VERSION | cut -d '.' -f 2`
59 dnl we need 2.00 or higher
60 dnl 1.19 was tested as failing to build some testcases
61 dnl preventing 'make check' from completing
63 if test $major -lt 2; then
64 AC_MSG_WARN([Haxe ${HAXE_VERSION} is too old to be used])
69 if test x"$HAXE" != "x" -a x"$HAXE_CLASSPATH" = "x"; then
70 # cross your fingers !
71 if test -d "`dirname ${HAXE}`/std"; then
72 dir="`dirname ${HAXE}`/std"
73 elif test -d "/usr/share/haxe"; then
74 dir="/usr/share/haxe/"
77 dir="/usr/share/haxe/"
84 AC_SUBST(HAXE_CLASSPATH)
90 # indent-tabs-mode: nil