8 if conf
.CHECK_BUNDLED_SYSTEM('resolv_wrapper', minversion
=VERSION
, set_target
=False):
9 conf
.DEFINE('USING_SYSTEM_RESOLV_WRAPPER', 1)
10 libresolv_wrapper_so_path
= 'libresolv_wrapper.so'
12 # check HAVE_GCC_THREAD_LOCAL_STORAGE
20 'HAVE_GCC_THREAD_LOCAL_STORAGE',
22 msg
='Checking for thread local storage')
24 # check HAVE_DESTRUCTOR_ATTRIBUTE
26 void test_destructor_attribute(void) __attribute__ ((destructor));
28 void test_destructor_attribute(void)
37 'HAVE_DESTRUCTOR_ATTRIBUTE',
39 msg
='Checking for library destructor support')
41 # check HAVE_FUNCTION_ATTRIBUTE_FORMAT
43 void log_fn(const char *format, ...) __attribute__ ((format (printf, 1, 2)));
49 'HAVE_FUNCTION_ATTRIBUTE_FORMAT',
51 msg
='Checking for printf format validation support')
53 conf
.CHECK_HEADERS('resolv.h')
55 conf
.CHECK_STRUCTURE_MEMBER('struct _res_state',
58 define
='HAVE_RESOLV_IPV6_NSADDRS')
60 conf
.CHECK_FUNCS_IN('res_ninit', 'resolv')
61 if conf
.CONFIG_SET('HAVE_RES_NINIT'):
62 conf
.DEFINE('HAVE_RES_NINIT_IN_LIBRESOLV', 1)
64 conf
.CHECK_FUNCS_IN('res_nclose', 'resolv')
65 if conf
.CONFIG_SET('HAVE_RES_NCLOSE'):
66 conf
.DEFINE('HAVE_RES_NCLOSE_IN_LIBRESOLV', 1)
68 conf
.CHECK_FUNCS_IN('res_init __res_init', 'resolv', checklibc
=True)
69 conf
.CHECK_FUNCS_IN('res_ninit __res_ninit', 'resolv', checklibc
=True)
70 conf
.CHECK_FUNCS_IN('res_close __res_close', 'resolv', checklibc
=True)
71 conf
.CHECK_FUNCS_IN('res_nclose __res_nclose', 'resolv', checklibc
=True)
72 conf
.CHECK_FUNCS_IN('res_query __res_query', 'resolv', checklibc
=True)
73 conf
.CHECK_FUNCS_IN('res_nquery __res_nquery', 'resolv', checklibc
=True)
74 conf
.CHECK_FUNCS_IN('res_search __res_search', 'resolv', checklibc
=True)
75 conf
.CHECK_FUNCS_IN('res_nsearch __res_nsearch', 'resolv', checklibc
=True)
77 # Create full path to resolv_wrapper
78 srcdir
= os
.path
.realpath(conf
.srcdir
)
79 libresolv_wrapper_so_path
= srcdir
+ '/bin/default/lib/resolv_wrapper/libresolv-wrapper.so'
81 conf
.DEFINE('LIBRESOLV_WRAPPER_SO_PATH', libresolv_wrapper_so_path
)
82 conf
.DEFINE('RESOLV_WRAPPER', 1)
85 if bld
.CONFIG_SET("HAVE_RESOLV_H") and not bld
.CONFIG_SET("USING_SYSTEM_RESOLV_WRAPPER"):
86 # We need to do it this way or the library wont work.
87 # Using private_library=True will add symbol version which
89 bld
.SAMBA_LIBRARY('resolv_wrapper',
90 source
='resolv_wrapper.c',
94 realname
='libresolv-wrapper.so')