2 dnl Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010,
3 dnl 2011 Free Software Foundation, Inc.
5 dnl This program is free software; you can redistribute it and/or modify
6 dnl it under the terms of the GNU General Public License as published by
7 dnl the Free Software Foundation; either version 3 of the License, or
8 dnl (at your option) any later version.
10 dnl This program is distributed in the hope that it will be useful,
11 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 dnl GNU General Public License for more details.
14 dnl You should have received a copy of the GNU General Public License
15 dnl along with this program; if not, write to the Free Software
16 dnl Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 # HAXE - Path to haxe executable
26 # HAXE_CLASSPATH - Classpath for haxe
29 AC_DEFUN([AC_PATH_HAXE], [
33 AC_ARG_WITH(haxe, AC_HELP_STRING([--with-haxe=<path>], [Path to the haxe executable]), [
40 AC_ARG_WITH(haxe-classpath, AC_HELP_STRING([--with-haxe-classpath=<path>], [CLASSPATH for haxe]), [
43 *) HAXE_CLASSPATH=${withval} ;;
47 if test x"$HAXE" = "x"; then
48 AC_PATH_PROG(HAXE, haxe, ,[${pathlist}])
51 if test x"$HAXE" != "x"; then
52 AC_MSG_CHECKING([for HAXE version])
53 HAXE_VERSION=`$HAXE -help | grep -i ^haxe | awk '{print $'3'}'`
54 AC_MSG_RESULT([${HAXE_VERSION}])
56 major=`echo $HAXE_VERSION | cut -d '.' -f 1`
57 minor=`echo $HAXE_VERSION | cut -d '.' -f 2`
60 dnl we need 2.00 or higher
61 dnl 1.19 was tested as failing to build some testcases
62 dnl preventing 'make check' from completing
64 if test $major -lt 2; then
65 AC_MSG_WARN([Haxe ${HAXE_VERSION} is too old to be used])
70 if test x"$HAXE" != "x" -a x"$HAXE_CLASSPATH" = "x"; then
71 # cross your fingers !
72 if test -d "`dirname ${HAXE}`/std"; then
73 dir="`dirname ${HAXE}`/std"
74 elif test -d "/usr/share/haxe"; then
75 dir="/usr/share/haxe/"
78 dir="/usr/share/haxe/"
85 AC_SUBST(HAXE_CLASSPATH)
91 # indent-tabs-mode: nil