>From 40c196b627ab6b5343cabd7fd4befc0733142ba5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Tue, 19 Jul 2011 21:51:49 +0100 Subject: [PATCH] timer-time: A new module to check for timer_settime() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * m4/timer_time.m4: Check for the POSIX function. * modules/timer-time: Add the new module. * MODULES.html.sh (Compat checks for POSIX:2008 functions): Mention it. Signed-off-by: Pádraig Brady --- ChangeLog | 8 ++++++++ MODULES.html.sh | 1 + m4/timer_time.m4 | 26 ++++++++++++++++++++++++++ modules/timer-time | 26 ++++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 0 deletions(-) create mode 100644 m4/timer_time.m4 create mode 100644 modules/timer-time diff --git a/ChangeLog b/ChangeLog index e72af4c..fa135a2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2011-07-19 Pádraig Brady + timer-time: A new module to check for timer_settime() + * m4/timer_time.m4: Check for the posix function. + * modules/timer-time: Add the new module. + * MODULES.html.sh (Compat checks for POSIX:2008 functions): + Mention it. + +2011-07-19 Pádraig Brady + getopt-gnu: suppress core dumps from detection code * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Use the nocrash module to suppress core dumps that may well occur on glibc systems. diff --git a/MODULES.html.sh b/MODULES.html.sh index 99de344..bcd8aac 100755 --- a/MODULES.html.sh +++ b/MODULES.html.sh @@ -2522,6 +2522,7 @@ func_all_modules () func_module link-follow func_module rename-dest-slash func_module rmdir-errno + func_module timer-time func_module unlink-busy func_module winsz-ioctl func_module winsz-termios diff --git a/m4/timer_time.m4 b/m4/timer_time.m4 new file mode 100644 index 0000000..29e5a3d --- /dev/null +++ b/m4/timer_time.m4 @@ -0,0 +1,26 @@ +# timer_time.m4 serial 1 +dnl Copyright (C) 2011 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +# Check for timer_settime, and set LIB_TIMER_TIME. +# For a program named, say foo, you should add a line like the following +# in the corresponding Makefile.am file: +# foo_LDADD = $(LDADD) $(LIB_TIMER_TIME) + +AC_DEFUN([gl_TIMER_TIME], +[ + dnl Based on clock_time.m4. See details there. + + AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) + + LIB_TIMER_TIME= + AC_SUBST([LIB_TIMER_TIME]) + gl_saved_libs=$LIBS + AC_SEARCH_LIBS([timer_settime], [rt posix4], + [test "$ac_cv_search_timer_settime" = "none required" || + LIB_TIMER_TIME=$ac_cv_search_timer_settime]) + AC_CHECK_FUNCS([timer_settime]) + LIBS=$gl_saved_libs +]) diff --git a/modules/timer-time b/modules/timer-time new file mode 100644 index 0000000..1adcf2c --- /dev/null +++ b/modules/timer-time @@ -0,0 +1,26 @@ +Description: +Check for timer_settime. Within HAVE_TIMER_SETTIME one can +assume timer_create is available too, as that is a +prerequisite to use timer_settime. + +Files: +m4/timer_time.m4 + +Depends-on: +extensions + +configure.ac: +gl_TIMER_TIME + +Makefile.am: + +Include: + +Link: +$(LIB_TIMER_TIME) + +License: +LGPLv2+ + +Maintainer: +Pádraig Brady -- 1.7.5.2