diff options
Diffstat (limited to 'numpy/distutils/command/config.py')
-rw-r--r-- | numpy/distutils/command/config.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/numpy/distutils/command/config.py b/numpy/distutils/command/config.py index 5d363eb4e..0086e3632 100644 --- a/numpy/distutils/command/config.py +++ b/numpy/distutils/command/config.py @@ -307,7 +307,10 @@ int main () self._check_compiler() body = [] if decl: - body.append("int %s (void);" % func) + if type(decl) == str: + body.append(decl) + else: + body.append("int %s (void);" % func) # Handle MSVC intrinsics: force MS compiler to make a function call. # Useful to test for some functions when built with optimization on, to # avoid build error because the intrinsic and our 'fake' test @@ -401,7 +404,7 @@ int main () def get_output(self, body, headers=None, include_dirs=None, libraries=None, library_dirs=None, - lang="c"): + lang="c", use_tee=None): """Try to compile, link to an executable, and run a program built from 'body' and 'headers'. Returns the exit status code of the program and its output. @@ -426,7 +429,8 @@ int main () grabber.restore() raise exe = os.path.join('.', exe) - exitstatus, output = exec_command(exe, execute_in='.') + exitstatus, output = exec_command(exe, execute_in='.', + use_tee=use_tee) if hasattr(os, 'WEXITSTATUS'): exitcode = os.WEXITSTATUS(exitstatus) if os.WIFSIGNALED(exitstatus): |