diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index e523b7a8cdd3..1024ad809a9e 100644 --- a/configure.ac +++ b/configure.ac @@ -66,6 +66,20 @@ AC_CHECK_TYPES([sighandler_t],[],[],[AC_INCLUDES_DEFAULT AC_CHECK_FUNCS([swapctl]) AC_CHECK_FUNCS([asprintf]) +dnl Check for POSIX timers +AC_CHECK_FUNCS(timer_create, [], [ + AC_CHECK_LIB(rt, timer_create, [ + AC_DEFINE(HAVE_TIMER_CREATE, 1) + TIMER_LIBS="-lrt" + ], [ + AC_CHECK_LIB(pthread, timer_create, [ + AC_DEFINE(HAVE_TIMER_CREATE, 1) + TIMER_LIBS="-lpthread" + ]) + ]) +]) +AC_SUBST(TIMER_LIBS) + # Initialize libtool AC_DISABLE_STATIC AC_PROG_LIBTOOL |