wafsamba: let CHECK_DECLS() find enum values
authorStefan Metzmacher <metze@samba.org>
Fri, 12 Jun 2015 10:13:23 +0000 (12:13 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 12 Jun 2015 15:08:20 +0000 (17:08 +0200)
In the current state this still generates the same config.h
at least on ubuntu 14.04 amd64.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
buildtools/wafsamba/samba_autoconf.py

index 4f646fdb8f0943d2fdfbbe97c554761b9cf559eb..c5f132cf17b48a3483342671cba79727bc3f4c91 100644 (file)
@@ -229,7 +229,18 @@ def CHECK_DECLS(conf, vars, reverse=False, headers=None, always=False):
                               headers=headers,
                               msg='Checking for declaration of %s' % v,
                               always=always):
-            ret = False
+            if not CHECK_CODE(conf,
+                      '''
+                      return (int)%s;
+                      ''' % (v),
+                      execute=False,
+                      link=False,
+                      msg='Checking for declaration of %s (as enum)' % v,
+                      local_include=False,
+                      headers=headers,
+                      define=define,
+                      always=always):
+                ret = False
     return ret