From 2fdc7c7dbc5ac046416f1148856b38f6439df74f Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Mon, 3 Jun 2013 23:57:20 +0300 Subject: Added has_header method. --- environment.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'environment.py') diff --git a/environment.py b/environment.py index 16606560d..46aa34953 100755 --- a/environment.py +++ b/environment.py @@ -109,6 +109,11 @@ class CCompiler(): if pe.returncode != 0: raise EnvironmentException('Executables created by C compiler %s are not runnable.' % self.name_string()) + def has_header(self, hname): + templ = '''#include<%s> +''' + return self.compiles(templ % hname) + def compiles(self, code): suflen = len(self.default_suffix) (fd, srcname) = tempfile.mkstemp(suffix='.'+self.default_suffix) -- cgit v1.2.3