mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
build: added CHECK_DECLS()
This commit is contained in:
parent
8112b4007d
commit
54e26fcb48
@ -71,6 +71,17 @@ def CHECK_VARIABLE(conf, v, define=None, always=False):
|
||||
conf.DEFINE(define, 0)
|
||||
return False
|
||||
|
||||
@conf
|
||||
def CHECK_DECLS(conf, vars):
|
||||
'''check a list of variable declarations, using the HAVE_DECL_xxx form
|
||||
of define'''
|
||||
ret = True
|
||||
for v in vars.split():
|
||||
if not CHECK_VARIABLE(conf, v, define='HAVE_DECL_%s' % v.upper()):
|
||||
ret = False
|
||||
return ret
|
||||
|
||||
|
||||
@runonce
|
||||
def CHECK_FUNC(conf, f):
|
||||
return conf.check(function_name=f, header_name=conf.env.hlist)
|
||||
|
@ -129,6 +129,8 @@ def configure(conf):
|
||||
|
||||
conf.CHECK_VARIABLE('rl_event_hook', define='HAVE_DECL_RL_EVENT_HOOK', always=True)
|
||||
|
||||
conf.CHECK_DECLS('snprintf vsnprintf asprintf vasprintf')
|
||||
|
||||
conf.check_cc(fragment='''
|
||||
#include <stdarg.h>
|
||||
va_list ap1,ap2;
|
||||
|
Loading…
Reference in New Issue
Block a user