From cde5dc4f43654b60a14efc0cd8934663b794b4d1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 25 Mar 2010 16:34:45 +0100 Subject: [PATCH] compiler: Automatically define GLIB_2_XX if --target-glib is used --- compiler/valacompiler.vala | 4 ++++ 1 file changed, 4 insertions(+) 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")) { -- 2.47.3