[grilo] build: Detect Vala presence
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo] build: Detect Vala presence
- Date: Fri, 28 Feb 2014 18:52:29 +0000 (UTC)
commit f6b7305afcf1264f90e51004ea0eda95d4413089
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Fri Feb 28 00:23:35 2014 +0000
build: Detect Vala presence
Build vala bindings if vala is present.
https://bugzilla.gnome.org/show_bug.cgi?id=724648
configure.ac | 51 +++++++++++++++++++++++++++++++--------------------
1 files changed, 31 insertions(+), 20 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 3c0448d..59684f0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -252,29 +252,40 @@ AM_CONDITIONAL(ENABLE_TESTS, test "enable_tests" = "xyes")
# VALA BINDINGS
# ----------------------------------------------------------
-AC_MSG_CHECKING([whether Vala plugin support is requested])
-AC_ARG_ENABLE([vala],
- AS_HELP_STRING([--enable-vala],[Enable Vala plugin support]),
- [enable_vala=$enableval have_vala=$enableval],
- [enable_vala=autodetect have_vala=yes])
-AC_MSG_RESULT([$enable_vala])
-if test "x$enable_vala" != "xno"; then
- AC_PATH_PROG([VALAC], [valac])
- if test "x$VALAC" = "x"; then
- AC_MSG_ERROR([No Vala compiler found.])
- fi
+AC_PATH_PROG([VALAC], [valac])
+AC_PATH_PROG([VALA_GEN_INTROSPECT], [vala-gen-introspect])
+AC_PATH_PROG([VAPIGEN], [vapigen])
- AC_PATH_PROG([VALA_GEN_INTROSPECT], [vala-gen-introspect])
- if test "x$VALA_GEN_INTROSPECT" = "x"; then
- AC_MSG_ERROR([Cannot find "vala-gen-introspect" in your PATH])
+AC_ARG_ENABLE([vala],
+ AS_HELP_STRING([--enable-vala],
+ [Enable Vala plugin support (default: auto)]),
+ [
+ case "$enableval" in
+ yes)
+ if test "x$VALAC" = "x"; then
+ AC_MSG_ERROR([valac not found, install it or use --disable-vala])
+ fi
+ if test "x$VALA_GEN_INTROSPECT" = "x"; then
+ AC_MSG_ERROR([vala-gen-introspect not found, install it or use --disable-vala])
+ fi
+ if test "x$VAPIGEN" = "x"; then
+ AC_MSG_ERROR([vapigen not found, install it or use --disable-vala])
+ fi
+ ;;
+ no)
+ enable_vala=no
+ ;;
+ esac
+ ],
+ [
+ if test "x$VALAC" != "x" -a "x$VALA_GEN_INTROSPECT" != "x" -a "x$VAPIGEN" != "x"; then
+ enable_vala=yes
+ else
+ enable_vala=no
fi
+ ])
- AC_PATH_PROG([VAPIGEN], [vapigen])
- if test "x$VAPIGEN" = "x"; then
- AC_MSG_ERROR([Cannot fine "vapigen" in your PATH])
- fi
-fi
-AM_CONDITIONAL(HAVE_VALA, test "x$enable_vala" != "xno")
+AM_CONDITIONAL([HAVE_VALA], [test "x$enable_vala" = "xyes"])
# ----------------------------------------------------------
# GTK-DOC
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]