summaryrefslogtreecommitdiff
path: root/numpy/distutils
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2007-12-22 05:52:38 +0000
committerDavid Cournapeau <cournape@gmail.com>2007-12-22 05:52:38 +0000
commit622b1425544db5a4de2f2b678adcbdd0105ba8a9 (patch)
tree96a0846adc81b4111332e542923531a165d5cc89 /numpy/distutils
parent2d914ba6055da226a039dd846b19363532a26254 (diff)
downloadnumpy-622b1425544db5a4de2f2b678adcbdd0105ba8a9.tar.gz
Add a check_decl function to check for declaration
Diffstat (limited to 'numpy/distutils')
-rw-r--r--numpy/distutils/command/config.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/numpy/distutils/command/config.py b/numpy/distutils/command/config.py
index 41c8f4f02..ce42a36e0 100644
--- a/numpy/distutils/command/config.py
+++ b/numpy/distutils/command/config.py
@@ -101,6 +101,21 @@ class config(old_config):
(body, headers, include_dirs,
libraries, library_dirs, lang))
+ def check_decl(self, symbol,
+ headers=None, include_dirs=None):
+ self._check_compiler()
+ body = """
+int main()
+{
+#ifndef %s
+ (void) %s;
+#endif
+ ;
+ return 0;
+}""" % (symbol, symbol)
+
+ return self.try_compile(body, headers, include_dirs)
+
def check_func(self, func,
headers=None, include_dirs=None,
libraries=None, library_dirs=None,