From 6baa3ef648b430232077199dfd48c37b5683dace Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 7 Feb 2011 13:12:17 +0100 Subject: waf: add clock_gettime clock ID checks to libreplace wscript. Guenther --- lib/replace/wscript | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/replace/wscript b/lib/replace/wscript index 9fbd3b5ffc..b9921c9b9c 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -202,7 +202,23 @@ def configure(conf): # some systems are missing the declaration conf.CHECK_DECLS('fdatasync') - conf.CHECK_FUNCS_IN('clock_gettime', 'rt', checklibc=True) + if conf.CHECK_FUNCS_IN('clock_gettime', 'rt', checklibc=True): + for c in ['CLOCK_MONOTONIC', 'CLOCK_PROCESS_CPUTIME_ID', 'CLOCK_REALTIME']: + conf.CHECK_CODE(''' + #if TIME_WITH_SYS_TIME + # include + # include + #else + # if HAVE_SYS_TIME_H + # include + # else + # include + # endif + #endif + clockid_t clk = %s''' % c, + 'HAVE_%s' % c, + msg='Checking whether the clock_gettime clock ID %s is available' % c) + # these headers need to be tested as a group on freebsd conf.CHECK_HEADERS(headers='sys/socket.h net/if.h', together=True) -- cgit