Updated GSSDP version to 0.13.1 (85c939e)
[profile/ivi/GSSDP.git] / m4 / vapigen.m4
1
2 dnl vala.m4
3 dnl
4 dnl Copyright 2010 Marc-Andre Lureau
5 dnl Copyright 2011 Rodney Dawes <dobey.pwns@gmail.com>
6 dnl
7 dnl This library is free software; you can redistribute it and/or
8 dnl modify it under the terms of the GNU Lesser General Public
9 dnl License as published by the Free Software Foundation; either
10 dnl version 2.1 of the License, or (at your option) any later version.
11 dnl
12 dnl This library is distributed in the hope that it will be useful,
13 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
14 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 dnl Lesser General Public License for more details.
16 dnl
17 dnl You should have received a copy of the GNU Lesser General Public
18 dnl License along with this library; if not, write to the Free Software
19 dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
20
21 dnl dropped everything but VALA_PROG_VAPIGEN - Jens Georg <mail@jensge.org>
22
23 # Check whether the Vala API Generator exists in `PATH'. If it is found,
24 # the variable VAPIGEN is set. Optionally a minimum release number of the
25 # generator can be requested.
26 #
27 # VALA_PROG_VAPIGEN([MINIMUM-VERSION])
28 # ------------------------------------
29 AC_DEFUN([VALA_PROG_VAPIGEN],
30 [AC_PATH_PROG([VAPIGEN], [vapigen], [])
31   AS_IF([test -z "$VAPIGEN"],
32     [AC_MSG_WARN([No Vala API Generator found. You will not be able to generate .vapi files.])],
33     [AS_IF([test -n "$1"],
34         [AC_MSG_CHECKING([$VAPIGEN is at least version $1])
35          am__vapigen_version=`$VAPIGEN --version | sed 's/Vala API Generator  *//'`
36          AS_VERSION_COMPARE([$1], ["$am__vapigen_version"],
37            [AC_MSG_RESULT([yes])],
38            [AC_MSG_RESULT([yes])],
39            [AC_MSG_RESULT([no])
40             AC_MSG_WARN([Vala API Generator $1 not found.])])])])
41 ])