wscript: first check for headers, add getopt.h and unistd.h
authorPaul Brossier <piem@piem.org>
Sat, 23 Apr 2016 18:47:22 +0000 (20:47 +0200)
committerPaul Brossier <piem@piem.org>
Sat, 23 Apr 2016 18:47:22 +0000 (20:47 +0200)
wscript

diff --git a/wscript b/wscript
index 4b2335b..041a436 100644 (file)
--- a/wscript
+++ b/wscript
@@ -102,6 +102,15 @@ def configure(ctx):
     ctx.load('waf_unit_test')
     ctx.load('gnu_dirs')
 
+    # check for common headers
+    ctx.check(header_name='stdlib.h')
+    ctx.check(header_name='stdio.h')
+    ctx.check(header_name='math.h')
+    ctx.check(header_name='string.h')
+    ctx.check(header_name='limits.h')
+    ctx.check(header_name='getopt.h')
+    ctx.check(header_name='unistd.h')
+
     target_platform = Options.platform
     if ctx.options.target_platform:
         target_platform = ctx.options.target_platform
@@ -174,13 +183,6 @@ def configure(ctx):
         if (ctx.options.enable_atlas != True):
             ctx.options.enable_atlas = False
 
-    # check for required headers
-    ctx.check(header_name='stdlib.h')
-    ctx.check(header_name='stdio.h')
-    ctx.check(header_name='math.h')
-    ctx.check(header_name='string.h')
-    ctx.check(header_name='limits.h')
-
     # check support for C99 __VA_ARGS__ macros
     check_c99_varargs = '''
 #include <stdio.h>