diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2019-09-03 18:07:28 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2019-09-03 18:07:28 +0000 |
commit | e69717d9e0cd107f461abff85f255be82d7bd69b (patch) | |
tree | a1158470fe0ea9afea4fb95e974464ac61fe058e /configure | |
parent | 2aa26bce30a3a1d46979a011d85928dda927932c (diff) | |
download | skalibs-e69717d9e0cd107f461abff85f255be82d7bd69b.tar.gz skalibs-e69717d9e0cd107f461abff85f255be82d7bd69b.tar.xz skalibs-e69717d9e0cd107f461abff85f255be82d7bd69b.zip |
Big wallclock/stopwatch refactor. It was long overdue.
* --enable-clock and --enable-monotonic are gone * tain_sysclock() has been renamed tain_wallclock_read() * tain_wallclock_read() reads from CLOCK_REALTIME (or gettimeofday()) * tain_clockmon[_init]() have been renamed to tain_stopwatch_[read|init]() and now accept a monotonic clock name as an extra argument * tain_now() points to the system (wall) clock by default * tain_now_set_[stopwatch|wallclock]() can be used to switch Now to make a pass on all skarnet.org programs and add a tain_now_set_stopwatch() call everywhere needed... >.>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 37 |
1 files changed, 6 insertions, 31 deletions
diff --git a/configure b/configure index 151662f..b8c76fc 100755 --- a/configure +++ b/configure @@ -42,8 +42,6 @@ $package options: --disable-ipv6 do not build IPv6 support [enabled] --enable-iopause-select prefer select() over poll() for iopause implementation [disabled] --enable-tai-clock assume the system clock is TAI-10 instead of UTC [disabled] - --enable-clock use clock_gettime() instead of gettimeofday() [disabled] - --enable-monotonic count time with CLOCK_MONOTONIC instead of CLOCK_REALTIME --with-default-path=PATH default executable search path [/usr/bin:/bin] EOF @@ -241,8 +239,6 @@ slashpackage=false ipv6=true select=false taiclock=false -clockrt=false -clockmon=false ddefaultpath=/usr/bin:/bin defaultpath=$ddefaultpath dpathorig=true @@ -284,10 +280,8 @@ for arg ; do --disable-iopause-select|--enable-iopause-select=no) select=false ;; --enable-tai-clock|--enable-tai-clock=yes) taiclock=true ;; --disable-tai-clock|--enable-tai-clock=no) taiclock=false ;; - --enable-clock|--enable-clock=yes) clockrt=true ;; - --disable-clock|--enable-clock=no) clockrt=false ;; - --enable-monotonic|--enable-monotonic=yes) clockmon=true ;; - --disable-monotonic|--enable-monotonic=no) clockmon=false ;; + --enable-monotonic|--enable-monotonic=yes) echo "$0: warning: --enable-monotonic is now obsolete" 1>&2 ;; + --disable-monotonic|--enable-monotonic=no) ;; --with-default-path=*) defaultpath=${arg#*=} ; dpathorig=false ;; --without-default-path) defaultpath=$ddefaultpath ; dpathorig=true ;; --enable-*|--disable-*|--with-*|--without-*|--*dir=*) ;; @@ -458,11 +452,6 @@ else #undef SKALIBS_TARGET #define SKALIBS_TARGET "$target" -#undef SKALIBS_BSD_SUCKS -#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__bsdi__) || defined(__DragonFly__) -# define SKALIBS_BSD_SUCKS -#endif - EOF exec 3>&1 @@ -474,23 +463,19 @@ EOF hasclock=true sysclock_lib=`trylibs clockrt 'clock_gettime()' -lrt` || hasclock=false - if $clockrt ; then - tainnow_lib=$sysclock_lib - else - tainnow_lib= - fi + tainnow_lib=$sysclock_lib echo "$sysclock_lib" > $sysdeps/sysclock.lib echo "$tainnow_lib" > $sysdeps/tainnow.lib echo "#undef ${package_macro_name}_HASCLOCKRT" >> $sysdeps/sysdeps.h if $hasclock ; then echo 'clockrt: yes' >> $sysdeps/sysdeps echo "#define ${package_macro_name}_HASCLOCKRT" >> $sysdeps/sysdeps.h - echo >> $sysdeps/sysdeps.h - choose cl clockmon CLOCKMON CLOCK_MONOTONIC $sysclock_lib else echo 'clockrt: no' >> $sysdeps/sysdeps - echo >> $sysdeps/sysdeps.h fi + echo >> $sysdeps/sysdeps.h + choose cl clockmon CLOCKMON CLOCK_MONOTONIC $sysclock_lib + choose cl clockboot CLOCKBOOT CLOCK_BOOTTIME $sysclock_lib hasspawn=true spawn_lib=`trylibs posixspawn 'posix_spawn()' -lrt` || hasspawn=false @@ -664,16 +649,6 @@ if $taiclock ; then else echo "#undef ${package_macro_name}_FLAG_CLOCKISTAI" fi -if $clockrt ; then - echo "#define ${package_macro_name}_FLAG_USERT" -else - echo "#undef ${package_macro_name}_FLAG_USERT" -fi -if $clockmon ; then - echo "#define ${package_macro_name}_FLAG_USEMON" -else - echo "#undef ${package_macro_name}_FLAG_USEMON" -fi if $ipv6 ; then echo "#define ${package_macro_name}_FLAG_WANTIPV6" else |