1 # Autoconf support for the Vala compiler
3 # Copyright (C) 2008-2012 Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
9 # Check whether the Vala compiler exists in $PATH. If it is found, the
10 # variable VALAC is set. Optionally a minimum release number of the
11 # compiler can be requested.
13 # AM_PROG_VALAC([MINIMUM-VERSION])
14 # --------------------------------
15 AC_DEFUN([AM_PROG_VALAC],
16 [AC_PATH_PROG([VALAC], [valac], [])
17 AS_IF([test -z "$VALAC"],
18 [AC_MSG_WARN([No Vala compiler found. You will not be able to compile .vala source files.])],
19 [AS_IF([test -n "$1"],
20 [AC_MSG_CHECKING([$VALAC is at least version $1])
21 am__vala_version=`$VALAC --version | sed 's/Vala *//'`
22 AS_VERSION_COMPARE([$1], ["$am__vala_version"],
23 [AC_MSG_RESULT([yes])],
24 [AC_MSG_RESULT([yes])],
26 AC_MSG_ERROR([Vala $1 not found.], [77])])])])