From: Sebastian Dröge Date: Thu, 25 Mar 2010 15:34:45 +0000 (+0100) Subject: compiler: Automatically define GLIB_2_XX if --target-glib is used X-Git-Tag: 0.8.0~35 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cde5dc4f43654b60a14efc0cd8934663b794b4d1;p=thirdparty%2Fvala.git compiler: Automatically define GLIB_2_XX if --target-glib is used --- diff --git a/compiler/valacompiler.vala b/compiler/valacompiler.vala index a006dae73..3d2a09837 100644 --- a/compiler/valacompiler.vala +++ b/compiler/valacompiler.vala @@ -282,6 +282,10 @@ class Vala.Compiler { Report.error (null, "This version of valac only supports GLib 2"); } + for (int i = 16; i <= glib_minor; i += 2) { + context.add_define ("GLIB_2_%d".printf (i)); + } + if (!nostdpkg) { /* default packages */ if (!add_package (context, "glib-2.0")) {