Add automated test on delayed return value handling in ExternalInterface.call().
[gnash.git] / macros / haxe.m4
blob881f30f8cfa9674bcdffb609ffa69639efffeb9f
1 dnl
2 dnl  Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010,
3 dnl  2011 Free Software Foundation, Inc.
4 dnl
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.
9 dnl
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
17 dnl
21 # Use: 
22 #       AC_PATH_HAXE
24 # Provides:
25 #       HAXE             - Path to haxe executable
26 #       HAXE_CLASSPATH   - Classpath for haxe
29 AC_DEFUN([AC_PATH_HAXE], [
30   HAXE=""
31   HAXE_CLASSPATH=""
33   AC_ARG_WITH(haxe, AC_HELP_STRING([--with-haxe=<path>], [Path to the haxe executable]), [
34     case "${withval}" in
35       yes|no) ;;
36       *) HAXE=${withval} ;;
37     esac
38   ], HAXE="")
40   AC_ARG_WITH(haxe-classpath, AC_HELP_STRING([--with-haxe-classpath=<path>], [CLASSPATH for haxe]), [
41     case "${withval}" in
42       yes|no) ;;
43       *) HAXE_CLASSPATH=${withval} ;;
44     esac
45   ], HAXE_CLASSPATH="")
47   if test x"$HAXE" = "x"; then
48     AC_PATH_PROG(HAXE, haxe, ,[${pathlist}])
49   fi
51   if test x"$HAXE" != "x"; then
52     AC_MSG_CHECKING([for HAXE version])
53     HAXE_VERSION=`$HAXE -help 2>&1| 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`
59     dnl
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
63     dnl
64     if test $major -lt 2; then
65         AC_MSG_WARN([Haxe ${HAXE_VERSION} is too old to be used])
66         unset HAXE
67     fi
68   fi
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/"
76     else
77     dnl FIXME
78     dir="/usr/share/haxe/"
79     fi
80     HAXE_CLASSPATH=$dir
81   fi
84   AC_SUBST(HAXE)
85   AC_SUBST(HAXE_CLASSPATH)
88 # Local Variables:
89 # c-basic-offset: 2
90 # tab-width: 2
91 # indent-tabs-mode: nil
92 # End: