From be42c2e7dc19f4602671420dd171307ec4a68896 Mon Sep 17 00:00:00 2001 From: Francis Dupont Date: Thu, 3 Apr 2014 09:24:53 +0200 Subject: [PATCH] [RT#35643] fixed -lrt in LIBS --- configure | 8 ++++++-- configure.in | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 074391866c..fc0e639d3e 100755 --- a/configure +++ b/configure @@ -16216,17 +16216,21 @@ fi { $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? # diff --git a/configure.in b/configure.in index bd24b28031..c967b4b4ba 100644 --- a/configure.in +++ b/configure.in @@ -1962,13 +1962,17 @@ AC_SUBST(PKCS11_TEST) 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? #