]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
configure: Use -lrt for clock_gettime() if necessary.
authorTimo Sirainen <tss@iki.fi>
Sun, 26 Jul 2009 18:12:15 +0000 (14:12 -0400)
committerTimo Sirainen <tss@iki.fi>
Sun, 26 Jul 2009 18:12:15 +0000 (14:12 -0400)
--HG--
branch : HEAD

configure.in

index 01233e134ae9450fbd10f1915a56d17042c59268..f025d8fcfd838a433a6a8eb21ef3324ccac3aec3 100644 (file)
@@ -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