build(waf): check if we have ctdb_protocol.h in the cluster checks
authorBjörn Baumbach <bb@sernet.de>
Tue, 30 Oct 2012 12:59:41 +0000 (13:59 +0100)
committerMichael Adam <obnox@samba.org>
Thu, 1 Nov 2012 09:22:14 +0000 (10:22 +0100)
Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
source3/wscript

index 5cbfd35f2a66188c9009656436e2b80930f1f236..157a8c9d161a246b47c5e79ab15d31529fbccc3c 100644 (file)
@@ -1361,6 +1361,28 @@ main() {
                 have_cluster_support = False
                 ctdb_broken = "ctdb_private.h is required for cluster support"
 
+        if have_cluster_support:
+            conf.CHECK_CODE('''
+                #define NO_CONFIG_H
+                #include "replace.h"
+                #include "system/wait.h"
+                #include "system/network.h"
+                #define private #error __USED_RESERVED_WORD_private__
+                #include <talloc.h>
+                #include <tdb.h>
+                #include <ctdb.h>
+                #include <ctdb_protocol.h>
+
+                int main(void)
+                {
+                    return 0;
+                }
+                ''',
+                'HAVE_CTDB_PROTOCOL_H',
+                addmain=False,
+                includes=includes,
+                msg='Checking for header ctdb_protocol.h')
+
         if have_cluster_support:
             conf.CHECK_CODE('''
                 #define NO_CONFIG_H