From: Timo Sirainen Date: Sun, 26 Jul 2009 18:12:15 +0000 (-0400) Subject: configure: Use -lrt for clock_gettime() if necessary. X-Git-Tag: 2.0.alpha1~397 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7480d0b5ae402583812c6cd406bb42500e7b62b6;p=thirdparty%2Fdovecot%2Fcore.git configure: Use -lrt for clock_gettime() if necessary. --HG-- branch : HEAD --- diff --git a/configure.in b/configure.in index 01233e134a..f025d8fcfd 100644 --- a/configure.in +++ b/configure.in @@ -351,7 +351,15 @@ AC_CHECK_FUNCS(fcntl flock lockf inet_aton sigaction getpagesize madvise \ setrlimit setproctitle seteuid setreuid setegid setresgid \ strtoull strtoll strtouq strtoq \ setpriority quotactl getmntent kqueue kevent backtrace_symbols \ - walkcontext dirfd clearenv malloc_usable_size clock_gettime) + walkcontext dirfd clearenv malloc_usable_size) + +AC_CHECK_LIB(rt, clock_gettime, [ + AC_DEFINE(HAVE_CLOCK_GETTIME,, Define if you have the clock_gettime function) + LIBS="-lrt" +], [ + # OpenBSD + AC_CHECK_FUNCS(clock_gettime) +]) dnl strtoimax and strtoumax are macros in HP-UX, so inttypes.h must be included dnl Link instead of just compiling since there's something wrong with Tru64