]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
build: Conditionally adjust VALAFLAGS in case of proper bootsrapped builds
authorRico Tzschichholz <ricotz@ubuntu.com>
Thu, 13 Oct 2016 20:25:56 +0000 (22:25 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 25 Oct 2016 09:13:10 +0000 (11:13 +0200)
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

index f12d4efbc42399e9de6079744643afa5580081f1..540d4a2bde8855d5d05e126d770e5b58865952e1 100644 (file)
@@ -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)