[vala/staging: 4/4] build: Conditionally adjust VALAFLAGS in case of proper bootsrapped builds



commit a301984530f944fac81ca0cea8f7bae7d7d28b22
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Thu Oct 13 22:25:56 2016 +0200

    build: Conditionally adjust VALAFLAGS in case of proper bootsrapped builds
    
    This adds --hide-internal to VALAFLAGS to allow symbols to be marked
    'internal' in Vala source files and not appear in the dynamic symbol table
    of libvala.
    
    The build system checks for minimum valac version to fullfill required
    support of needed VALAFLAGS.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=771920

 configure.ac |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index f12d4ef..540d4a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,7 +43,16 @@ fi
 AC_PATH_PROG(VALAC, valac, valac)
 AC_SUBST(VALAC)
 
+VALAC_BOOTSTRAP_REQUIRED=0.25.1
+
+AS_IF([test "$VALAC" != valac], [FOUND_VALAC_VERION=`$VALAC --version | sed 's/Vala  *//'`
+       AS_VERSION_COMPARE(["$VALAC_BOOTSTRAP_REQUIRED"], ["$FOUND_VALAC_VERION"],
+               [enable_boostrap=yes], [enable_boostrap=yes], [enable_boostrap=no])])
+
 VALAFLAGS="$VALAFLAGS --disable-version-header"
+if test x$enable_boostrap = xyes; then
+       VALAFLAGS="$VALAFLAGS --hide-internal"
+fi
 
 AC_SUBST(VALAFLAGS)
 AC_SUBST(CFLAGS)


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