diff options
author | Günther Deschner <gd@samba.org> | 2011-02-07 13:12:17 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-02-07 13:21:50 +0100 |
commit | 6baa3ef648b430232077199dfd48c37b5683dace (patch) | |
tree | 33eb71680d6ed4d48c50bf314f3bee7af5092267 /lib/replace/wscript | |
parent | 13d8290d0d4f574cadd0c5daabe4e527ce78db30 (diff) | |
download | samba-6baa3ef648b430232077199dfd48c37b5683dace.tar.gz samba-6baa3ef648b430232077199dfd48c37b5683dace.tar.bz2 samba-6baa3ef648b430232077199dfd48c37b5683dace.zip |
waf: add clock_gettime clock ID checks to libreplace wscript.
Guenther
Diffstat (limited to 'lib/replace/wscript')
-rw-r--r-- | lib/replace/wscript | 18 |
1 files changed, 17 insertions, 1 deletions
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 <sys/time.h> + # include <time.h> + #else + # if HAVE_SYS_TIME_H + # include <sys/time.h> + # else + # include <time.h> + # 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) |