{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
- have_clock_gt=yes
+ have_clock_gt=rt
fi
fi
-if test "$have_clock_gt" = "yes"; then
+if test "$have_clock_gt" != "no"; then
$as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
fi
+if test "$have_clock_gt" = "rt"; then
+ LIBS="-lrt $LIBS"
+fi
+
#
# was --with-libxml2 specified?
#
have_clock_gt=no
AC_CHECK_FUNC(clock_gettime,have_clock_gt=yes,)
if test "$have_clock_gt" = "no"; then
- AC_CHECK_LIB(rt,clock_gettime,have_clock_gt=yes,)
+ AC_CHECK_LIB(rt,clock_gettime,have_clock_gt=rt,)
fi
-if test "$have_clock_gt" = "yes"; then
+if test "$have_clock_gt" != "no"; then
AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define if clock_gettime is available.])
fi
+if test "$have_clock_gt" = "rt"; then
+ LIBS="-lrt $LIBS"
+fi
+
#
# was --with-libxml2 specified?
#