build: fixed cflags in CHECK_CODE()
[nivanova/samba-autobuild/.git] / buildtools / wafsamba / samba_autoconf.py
index b1868042925923593fdc02235dfd501f6a785007..36bc2484ec50e6e088664fa0c765a2b0fe7d4cde 100644 (file)
@@ -198,11 +198,13 @@ def CHECK_CODE(conf, code, define,
     if msg is None:
         msg="Checking for %s" % define
 
+    cflags = cflags + ' -I%s' % conf.curdir
+
     if conf.check(fragment=fragment,
                   execute=execute,
                   define_name = define,
                   mandatory = mandatory,
-                  ccflags='-I%s %s' % (conf.curdir, cflags),
+                  ccflags=to_list(cflags),
                   includes='# . ../default',
                   msg=msg):
         conf.DEFINE(define, 1)