build: cope with double check for functions
authorAndrew Tridgell <tridge@samba.org>
Sat, 20 Mar 2010 06:51:39 +0000 (17:51 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:26:57 +0000 (20:26 +1000)
buildtools/wafsamba/samba_autoconf.py

index 0b2686003344f6921984c7100637bb13c4fedd77..dc1a0b3094cd37c8f9c86a1d4daf1316497b1bde 100644 (file)
@@ -125,8 +125,11 @@ def CHECK_DECLS(conf, vars, reverse=False, headers=None):
 @runonce
 def CHECK_FUNC(conf, f, checklink=False):
     '''check for a function'''
+    define='HAVE_%s' % f.upper()
+    if CONFIG_SET(define):
+        return True
     if checklink:
-        return CHECK_CODE(conf, '%s()' % f, execute=False, define='HAVE_%s' % f.upper())
+        return CHECK_CODE(conf, '%s()' % f, execute=False, define=define)
     return conf.check(function_name=f, header_name=conf.env.hlist)