Index: waflib/Tools/c_config.py
===================================================================
--- waflib/Tools/c_config.py	(revision c101fe139c5f96364e9d3d18734eafd64d7b7618)
+++ waflib/Tools/c_config.py	(revision 46b006901aca0014cdd4222a285bc9b29565902e)
@@ -163,4 +163,11 @@
 	for key,val in defi.items():
 		lst.append('--define-variable=%s=%s'%(key,val))
+	static=False
+	if'args'in kw:
+		args=Utils.to_list(kw['args'])
+		if'--static'in args or'--static-libs'in args:
+			static=True
+		lst+=args
+	lst.extend(Utils.to_list(kw['package']))
 	if'variables'in kw:
 		env=kw.get('env',self.env)
@@ -174,11 +181,4 @@
 			kw['okmsg']='yes'
 		return
-	static=False
-	if'args'in kw:
-		args=Utils.to_list(kw['args'])
-		if'--static'in args or'--static-libs'in args:
-			static=True
-		lst+=args
-	lst.extend(Utils.to_list(kw['package']))
 	ret=self.cmd_and_log(lst)
 	if not'okmsg'in kw:
@@ -328,5 +328,6 @@
 	if'define_name'in kw:
 		self.undefine(kw['define_name'])
-	assert'msg'in kw,'invalid parameters, read http://freehackers.org/~tnagy/wafbook/single.html#config_helpers_c'
+	if not'msg'in kw:
+		self.fatal('missing "msg" in conf.check(...)')
 @conf
 def post_check(self,*k,**kw):
@@ -359,11 +360,9 @@
 		for k in _vars:
 			lk=k.lower()
-			if k=='INCLUDES':lk='includes'
-			if k=='DEFINES':lk='defines'
 			if lk in kw:
 				val=kw[lk]
 				if isinstance(val,str):
 					val=val.rstrip(os.path.sep)
-				self.env.append_unique(k+'_'+kw['uselib_store'],val)
+				self.env.append_unique(k+'_'+kw['uselib_store'],Utils.to_list(val))
 	return is_success
 @conf
@@ -672,6 +671,9 @@
 	try:
 		out,err=conf.cmd_and_log(cmd,output=0)
-	except Errors.WafError:
-		conf.fatal('Could not find suncc %r'%cmd)
+	except Errors.WafError ,e:
+		if not(hasattr(e,'returncode')and hasattr(e,'stdout')and hasattr(e,'stderr')):
+			conf.fatal('Could not find suncc %r'%cmd)
+		out=e.stdout
+		err=e.stderr
 	version=(out or err)
 	version=version.split('\n')[0]
Index: waflib/Tools/c_preproc.py
===================================================================
--- waflib/Tools/c_preproc.py	(revision c101fe139c5f96364e9d3d18734eafd64d7b7618)
+++ waflib/Tools/c_preproc.py	(revision 46b006901aca0014cdd4222a285bc9b29565902e)
@@ -247,5 +247,5 @@
 							break
 						elif v2==',':
-							if not one_param:raise PreprocError("empty param in funcall %s"%p)
+							if not one_param:raise PreprocError("empty param in funcall %s"%v)
 							args.append(one_param)
 							one_param=[]
@@ -363,5 +363,8 @@
 	else:
 		(p,v)=t[0]
-		return(v,[[],t[1:]])
+		if len(t)>1:
+			return(v,[[],t[1:]])
+		else:
+			return(v,[[],[('T','')]])
 re_include=re.compile('^\s*(<(?P<a>.*)>|"(?P<b>.*)")')
 def extract_include(txt,defs):
Index: waflib/Tools/fc_scan.py
===================================================================
--- waflib/Tools/fc_scan.py	(revision c101fe139c5f96364e9d3d18734eafd64d7b7618)
+++ waflib/Tools/fc_scan.py	(revision 46b006901aca0014cdd4222a285bc9b29565902e)
@@ -7,5 +7,5 @@
 from waflib.TaskGen import feature,before_method,after_method,extension
 from waflib.Configure import conf
-INC_REGEX="""(?:^|['">]\s*;)\s*INCLUDE\s+(?:\w+_)?[<"'](.+?)(?=["'>])"""
+INC_REGEX="""(?:^|['">]\s*;)\s*(?:|#\s*)INCLUDE\s+(?:\w+_)?[<"'](.+?)(?=["'>])"""
 USE_REGEX="""(?:^|;)\s*USE(?:\s+|(?:(?:\s*,\s*(?:NON_)?INTRINSIC)?\s*::))\s*(\w+)"""
 MOD_REGEX="""(?:^|;)\s*MODULE(?!\s*PROCEDURE)(?:\s+|(?:(?:\s*,\s*(?:NON_)?INTRINSIC)?\s*::))\s*(\w+)"""
Index: waflib/Tools/nasm.py
===================================================================
--- waflib/Tools/nasm.py	(revision c101fe139c5f96364e9d3d18734eafd64d7b7618)
+++ waflib/Tools/nasm.py	(revision 46b006901aca0014cdd4222a285bc9b29565902e)
@@ -3,4 +3,5 @@
 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
 
+import os
 import waflib.Tools.asm
 from waflib.TaskGen import feature
@@ -13,2 +14,3 @@
 	conf.env.ASLNK_TGT_F=['-o']
 	conf.load('asm')
+	conf.env.ASMPATH_ST='-I%s'+os.sep
