tdb-waf: added build of manpages and config options for RPM build
[samba.git] / buildtools / wafsamba / samba_autoconf.py
index 60c505717bac451a9e8e4419b7029395120b30a4..9d0229e1479ae5553889dcf0734b6c43af2598b4 100644 (file)
@@ -4,6 +4,7 @@ import Build, os, Options, preproc, Logs
 import string
 from Configure import conf
 from samba_utils import *
+import samba_cross
 
 missing_headers = set()
 
@@ -204,7 +205,7 @@ def CHECK_VARIABLE(conf, v, define=None, always=False,
 
 
 @conf
-def CHECK_DECLS(conf, vars, reverse=False, headers=None):
+def CHECK_DECLS(conf, vars, reverse=False, headers=None, always=False):
     '''check a list of variable declarations, using the HAVE_DECL_xxx form
        of define
 
@@ -219,7 +220,8 @@ def CHECK_DECLS(conf, vars, reverse=False, headers=None):
         if not CHECK_VARIABLE(conf, v,
                               define=define,
                               headers=headers,
-                              msg='Checking for declaration of %s' % v):
+                              msg='Checking for declaration of %s' % v,
+                              always=always):
             ret = False
     return ret
 
@@ -366,6 +368,8 @@ def CHECK_CODE(conf, code, define,
     cflags = TO_LIST(cflags)
     cflags.extend(ccflags)
 
+    exec_args = conf.SAMBA_CROSS_ARGS()
+
     ret = conf.check(fragment=fragment,
                      execute=execute,
                      define_name = define,
@@ -377,6 +381,7 @@ def CHECK_CODE(conf, code, define,
                      type=type,
                      msg=msg,
                      quote=quote,
+                     exec_args=exec_args,
                      define_ret=define_ret)
     if not ret and CONFIG_SET(conf, define):
         # sometimes conf.check() returns false, but it
@@ -529,6 +534,7 @@ def CHECK_FUNCS_IN(conf, list, library, mandatory=False, checklibc=False,
 def IN_LAUNCH_DIR(conf):
     '''return True if this rule is being run from the launch directory'''
     return os.path.realpath(conf.curdir) == os.path.realpath(Options.launch_dir)
+Options.Handler.IN_LAUNCH_DIR = IN_LAUNCH_DIR
 
 
 @conf