Inspect CC environment variable to recognize a C compiler, based on patch
authorRaffaele Sandrini <raffaele@sandrini.ch>
Mon, 7 Jul 2008 14:48:54 +0000 (14:48 +0000)
committerRaffaele Sandrini <rasa@src.gnome.org>
Mon, 7 Jul 2008 14:48:54 +0000 (14:48 +0000)
2008-07-07  Raffaele Sandrini  <raffaele@sandrini.ch>

* 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
compiler/valacompiler.vala

index d055d7c..423b5cf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-07-07  Raffaele Sandrini  <raffaele@sandrini.ch>
+
+       * 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  <j@bitron.ch>
 
        * vala/valaproperty.vala:
index d85c8e7..b806244 100644 (file)
@@ -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 {