skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

commit 0b2719640e69c8bc929c43338646674a2a00582c
parent b4048073e620a8d84baebf299819a4f409cbbfea
Author: Laurent Bercot <ska-skaware@skarnet.org>
Date:   Mon, 24 Oct 2016 13:05:48 +0000

 Add timer_lib for support (GNU requires -lrt for timer_create!)

Diffstat:
Mconfigure | 13++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/configure b/configure @@ -449,6 +449,17 @@ EOF echo 'posixspawn: no' >> $sysdeps/sysdeps echo "#undef ${package_macro_name}_HASPOSIXSPAWN" >> $sysdeps/sysdeps.h fi + + hastimer=true + timer_lib=`trylibs timer 'timer_create()' -lrt` || hastimer=false + echo "$timer_lib" > $sysdeps/timer.lib + if $hastimer ; then + echo 'timer: yes' >> $sysdeps/sysdeps + echo "#define ${package_macro_name}_HASTIMER" >> $sysdeps/sysdeps.h + else + echo 'timer: no' >> $sysdeps/sysdeps + echo "#undef ${package_macro_name}_HASTIMER" >> $sysdeps/sysdeps.h + fi exec 3>&- echo "Checking system endianness..." @@ -495,7 +506,6 @@ EOF choose cl futimes FUTIMES 'futimes()' choose cl arc4random ARC4RANDOM 'arc4random()' choose cl getrandom GETRANDOM 'getrandom()' - choose cl timer TIMER 'timer_create()' $sysclock_lib choose cl itimer ITIMER 'setitimer()' echo '#endif' >> $sysdeps/sysdeps.h @@ -532,6 +542,7 @@ SPAWN_LIB := ${spawn_lib} SOCKET_LIB := ${socket_lib} SYSCLOCK_LIB := ${sysclock_lib} TAINNOW_LIB := ${tainnow_lib} +TIMER_LIB := ${timer_lib} UTIL_LIB := ${util_lib} CC := ${CC_AUTO##${cross}} CFLAGS := $CFLAGS_AUTO