[vala/wip/issue/606: 20/20] WIP build: Check for valac with sufficient GIR support



commit 594c6b27ff4207b97c06f44bb198fbe47a921a66
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Wed May 1 12:46:36 2019 +0200

    WIP build: Check for valac with sufficient GIR support

 configure.ac | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
---
diff --git a/configure.ac b/configure.ac
index fde50f57a..8f3c29743 100644
--- a/configure.ac
+++ b/configure.ac
@@ -144,6 +144,23 @@ AC_SUBST(TEST_CFLAGS)
 
 GOBJECT_INTROSPECTION_CHECK([1.48.0])
 
+if test x$enable_introspection = xyes; then
+       AC_MSG_CHECKING([for sufficient GIR support])
+       #FIXME Adjust on merge, maybe 0.44.5
+       VALAC_GIR_REQUIRED=0.45.1.15
+
+       AS_IF([test "$VALAC" != valac], [FOUND_VALAC_VERION=`$VALAC --version | sed 's/Vala  *//'`
+               AS_VERSION_COMPARE(["$VALAC_GIR_REQUIRED"], ["$FOUND_VALAC_VERION"],
+                       [enable_gir=yes], [enable_gir=yes], [enable_gir=no])])
+
+       if test x$enable_gir = xno; then
+               AM_CONDITIONAL(HAVE_INTROSPECTION, false)
+               AC_MSG_RESULT([no (valac >= $VALAC_GIR_REQUIRED is required)])
+       else
+               AC_MSG_RESULT([yes])
+       fi
+fi
+
 GLIB_REQUIRED=2.48.0
 LIBGVC_REQUIRED=2.16
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]