dovecot-2.0: configure: Use -lrt for clock_gettime() if necessary.

dovecot at dovecot.org dovecot at dovecot.org
Sun Jul 26 21:12:54 EEST 2009


details:   http://hg.dovecot.org/dovecot-2.0/rev/cef143e8719d
changeset: 9655:cef143e8719d
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Jul 26 14:12:15 2009 -0400
description:
configure: Use -lrt for clock_gettime() if necessary.

diffstat:

1 file changed, 9 insertions(+), 1 deletion(-)
configure.in |   10 +++++++++-

diffs (20 lines):

diff -r 5714aba539f0 -r cef143e8719d configure.in
--- a/configure.in	Sun Jul 26 02:16:45 2009 -0400
+++ b/configure.in	Sun Jul 26 14:12:15 2009 -0400
@@ -351,7 +351,15 @@ AC_CHECK_FUNCS(fcntl flock lockf inet_at
 	       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


More information about the dovecot-cvs mailing list