changeset 15493:ac63858cbe5f

configure: Use -lrt for check_gettime() only if needed.
author Timo Sirainen <tss@iki.fi>
date Fri, 28 Dec 2012 17:02:18 +0200
parents cd093d05037e
children b7d8027a8f74
files configure.ac
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Wed Dec 19 23:34:21 2012 +0200
+++ b/configure.ac	Fri Dec 28 17:02:18 2012 +0200
@@ -415,12 +415,8 @@
 
 AC_CHECK_TYPES([struct sockpeercred])
 
-AC_CHECK_LIB(rt, clock_gettime, [
+AC_SEARCH_LIBS(clock_gettime, rt, [
   AC_DEFINE(HAVE_CLOCK_GETTIME,, Define if you have the clock_gettime function)
-  LIBS="$LIBS -lrt"
-], [
-  # OpenBSD
-  AC_CHECK_FUNCS(clock_gettime)
 ])
 
 dnl strtoimax and strtoumax are macros in HP-UX, so inttypes.h must be included