build: if a library is found, but not the fn, still define the library
authorAndrew Tridgell <tridge@samba.org>
Sat, 20 Mar 2010 08:41:41 +0000 (19:41 +1100)
committerAndrew Tridgell <tridge@samba.org>
Tue, 6 Apr 2010 10:26:58 +0000 (20:26 +1000)
buildtools/wafsamba/samba_autoconf.py

index 6f8985a521f1e03a146bcf4bcd484baddd595c10..4ea29d4058fe5389355bf595b806e56e5047586a 100644 (file)
@@ -338,6 +338,8 @@ def CHECK_FUNCS_IN(conf, list, library, mandatory=False, checklibc=False, header
             ret = False
         else:
             conf.define('HAVE_LIB%s' % string.replace(lib.upper(),'-','_'), 1)
+            conf.env['LIB_' + lib.upper()] = lib
+            LOCAL_CACHE_SET(conf, 'TARGET_TYPE', lib, 'SYSLIB')
 
     if not ret:
         return ret
@@ -347,15 +349,6 @@ def CHECK_FUNCS_IN(conf, list, library, mandatory=False, checklibc=False, header
         if not conf.check_cc(function_name=f, lib=liblist, header_name=hlist):
             ret = False
 
-    if not ret:
-        return ret
-
-    for lib in liblist:
-        if GET_TARGET_TYPE(conf, lib):
-            continue
-        conf.env['LIB_' + lib.upper()] = lib
-        LOCAL_CACHE_SET(conf, 'TARGET_TYPE', lib, 'SYSLIB')
-
     return ret