build: make CC command in host check configurable
authorSadique Ali <sadiqalikm@gmail.com>
Mon, 27 Feb 2012 22:56:34 +0000 (04:26 +0530)
committerBen Noordhuis <info@bnoordhuis.nl>
Mon, 5 Mar 2012 15:56:52 +0000 (16:56 +0100)
configure

index 7a44a82..71756a6 100755 (executable)
--- a/configure
+++ b/configure
@@ -147,8 +147,7 @@ def pkg_config(pkg):
 def host_arch():
   """Host architecture. One of arm, ia32 or x64."""
 
-  # TODO better/configurable way of getting the proper 'cc' command?
-  cc = [ 'cc' ]
+  cc = [os.environ.get('CC', 'cc')]
 
   cmd = cc + [ '-dM', '-E', '-' ]
   p = subprocess.Popen(cmd, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)