build: Add configure summary checking to waf build
authorAndrew Bartlett <abartlet@samba.org>
Thu, 5 Apr 2012 00:36:55 +0000 (10:36 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 5 Apr 2012 02:11:45 +0000 (04:11 +0200)
When we remove the autoconf build, this can be re-expressed in python, but
for now it is good to share this double-check.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Apr  5 04:11:45 CEST 2012 on sn-devel-104

wscript

diff --git a/wscript b/wscript
index e64e50902a233f6641cecc4ab5d9e6ab8960a03a..6b51a37c857b8c954bf915ecf0f9b9e240d1520e 100755 (executable)
--- a/wscript
+++ b/wscript
@@ -123,6 +123,13 @@ def configure(conf):
     del(conf.env.defines['PYTHONDIR'])
     del(conf.env.defines['PYTHONARCHDIR'])
 
+    if not conf.CHECK_CODE('#include "tests/summary.c"',
+                           define='SUMMARY_PASSES',
+                           addmain=False,
+                           execute=True,
+                           msg='Checking configure summary'):
+        raise Utils.WafError('configure summary failed')
+    
     conf.SAMBA_CONFIG_H('include/config.h')