changeset 31560:5a0460219649

setup: add a function to test header files
author Jun Wu <quark@fb.com>
date Mon, 20 Mar 2017 15:31:21 -0700
parents 9639ff4a93ae
children 312e62640798
files setup.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/setup.py	Mon Mar 20 15:28:08 2017 -0700
+++ b/setup.py	Mon Mar 20 15:31:21 2017 -0700
@@ -127,6 +127,10 @@
     code = 'int main(void) { %s(); }\n' % funcname
     return cancompile(cc, code)
 
+def hasheader(cc, headername):
+    code = '#include <%s>\nint main(void) { return 0; }\n' % headername
+    return cancompile(cc, code)
+
 # py2exe needs to be installed to work
 try:
     import py2exe