]> granicus.if.org Git - check/commitdiff
configure.ac: use the librt_timer.m4 checks
authorbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Wed, 18 Dec 2013 23:03:08 +0000 (23:03 +0000)
committerbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Wed, 18 Dec 2013 23:03:08 +0000 (23:03 +0000)
Hopefully with this the default ./configure will
work on OpenBSD.

Note that --enable-timer-replacement will still override the
check, resulting the Check's replacements being used.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@904 64e312b2-a51f-0410-8e61-82d0ca0eb02a

configure.ac

index 90a9e28d122d51eef13e78c6e04bd38cce8e249a..b2d14c5b02a7d8486cc3a5cf270036ce9eb25332 100644 (file)
@@ -243,18 +243,10 @@ AC_CHECK_SIZEOF(long, 4)
 AC_FUNC_MALLOC
 AC_FUNC_REALLOC
 
-# The timer_create(), timer_settime(), and timer_delete()
-# functions on OpenBSD (and maybe other BSDs) are implemented, but
-# simply set errno=ENOSYS. For this reason, we give the option
-# to use Check's replacement of these functions.
-if test "xtrue" = x"$enable_timer_replacement"; then
-    AC_LIBOBJ([timer_create])
-    AC_LIBOBJ([timer_settime])
-    AC_LIBOBJ([timer_delete])
-else
-    AC_REPLACE_FUNCS([timer_create timer_settime timer_delete])
-    AC_CHECK_DECLS([timer_create, timer_settime, timer_delete])
-fi
+# Check if the timer_create(), timer_settime(), and timer_delete()
+# functions on the system are available and suitable, or need to be
+# replaced with Check's replacement of these functions.
+HW_LIBRT_TIMERS
 
 AC_REPLACE_FUNCS([alarm clock_gettime fileno localtime_r pipe putenv setenv sleep strdup strsignal unsetenv])
 AC_CHECK_DECLS([alarm, clock_gettime, fileno, localtime_r, pipe, putenv, setenv, sleep, strdup, strsignal, unsetenv])