summaryrefslogtreecommitdiff
path: root/numpy/distutils/command/config.py
diff options
context:
space:
mode:
authorPauli Virtanen <pav@iki.fi>2010-10-06 01:15:15 +0200
committerPauli Virtanen <pav@iki.fi>2010-10-06 21:11:15 +0200
commit5a0ab023d8f81ccf83fe6adf7983d7631021cb62 (patch)
treea3f14bd68f0daca98b5018d84b98e436f0eb6eb1 /numpy/distutils/command/config.py
parent8b0d65986dad4b4d17a51ea272bf17afc5dd7031 (diff)
downloadnumpy-5a0ab023d8f81ccf83fe6adf7983d7631021cb62.tar.gz
BUG: core: use #if check instead of #ifdef in checking HAVE_DECL_ISFINITE (ticket #1625)
Python #defines HAVE_DECL_ISFINITE 0 when the function is not available, so the proper check to do is #if.
Diffstat (limited to 'numpy/distutils/command/config.py')
-rw-r--r--numpy/distutils/command/config.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/numpy/distutils/command/config.py b/numpy/distutils/command/config.py
index dafc7002f..85a86990f 100644
--- a/numpy/distutils/command/config.py
+++ b/numpy/distutils/command/config.py
@@ -169,6 +169,22 @@ int main()
return self.try_compile(body, headers, include_dirs)
+ def check_macro_true(self, symbol,
+ headers=None, include_dirs=None):
+ self._check_compiler()
+ body = """
+int main()
+{
+#if %s
+#else
+#error false or undefined macro
+#endif
+ ;
+ return 0;
+}""" % (symbol,)
+
+ return self.try_compile(body, headers, include_dirs)
+
def check_type(self, type_name, headers=None, include_dirs=None,
library_dirs=None):
"""Check type availability. Return True if the type can be compiled,