From f8185c2d4b532cf72b42bae0d8b086dcc63cb4c8 Mon Sep 17 00:00:00 2001 From: Raffaele Sandrini Date: Mon, 7 Jul 2008 14:48:54 +0000 Subject: [PATCH] Inspect CC environment variable to recognize a C compiler, based on patch 2008-07-07 Raffaele Sandrini * compiler/valacompiler.vala: Inspect CC environment variable to recognize a C compiler, based on patch by Piotr Skamruk, fixes bug 501686 svn path=/trunk/; revision=1683 --- ChangeLog | 7 +++++++ compiler/valacompiler.vala | 3 +++ 2 files changed, 10 insertions(+) diff --git a/ChangeLog b/ChangeLog index d055d7c..423b5cf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-07-07 Raffaele Sandrini + + * compiler/valacompiler.vala: + + Inspect CC environment variable to recognize a C compiler, based on + patch by Piotr Skamruk, fixes bug 501686 + 2008-07-07 Jürg Billeter * vala/valaproperty.vala: diff --git a/compiler/valacompiler.vala b/compiler/valacompiler.vala index d85c8e7..b806244 100644 --- a/compiler/valacompiler.vala +++ b/compiler/valacompiler.vala @@ -302,6 +302,9 @@ class Vala.Compiler : Object { if (!ccode_only) { var ccompiler = new CCodeCompiler (); + if (cc_command == null && Environment.get_variable ("CC") != null) { + cc_command = Environment.get_variable ("CC"); + } if (cc_options == null) { ccompiler.compile (context, cc_command, new string[] { null }); } else { -- 2.7.4