ctdb-build: Add some missing configure checks
authorMartin Schwenke <martin@meltin.net>
Mon, 15 Sep 2014 01:01:21 +0000 (11:01 +1000)
committerMartin Schwenke <martins@samba.org>
Wed, 17 Sep 2014 05:29:10 +0000 (07:29 +0200)
Fail configure if thread_setsched() is unavailable on AIX or if
sched_setscheduler() is unavailable on other platforms.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/wscript

index 8cb70a3f0efd8f5f219775c7b0079271f0f0806c..8951f79df8fe98df03dbddb1a554796e3c1afae5 100755 (executable)
@@ -80,6 +80,16 @@ def configure(conf):
     conf.RECURSE('lib/tdb')
     conf.RECURSE('lib/socket_wrapper')
 
+    conf.CHECK_HEADERS('sched.h')
+    conf.CHECK_HEADERS('procinfo.h')
+    if sys.platform.startswith('aix') and not conf.CHECK_FUNCS('thread_setsched'):
+        Logs.error('Need thread_setsched() on AIX')
+        sys.exit(1)
+    elif not conf.CHECK_FUNCS('sched_setscheduler'):
+        Logs.error('Need sched_setscheduler()')
+        sys.exit(1)
+    conf.CHECK_FUNCS('mlockall')
+
     have_pmda = False
     if Options.options.ctdb_pmda:
         pmda_support = True