Commit 94f8e743 authored by Eddie Kohler's avatar Eddie Kohler

Configury: Only define have_clock_gettime to yes in AC_SEARCH_LIBS.

parent f5461db1
......@@ -7507,7 +7507,7 @@ _ACEOF
fi
have_clock_gettime=no
have_clock_gettime=no; POSIX_CLOCK_LIBS=
ac_fn_cxx_check_decl "$LINENO" "clock_gettime" "ac_cv_have_decl_clock_gettime" "#ifdef HAVE_TIME_H
# include <time.h>
#endif
......@@ -7576,13 +7576,15 @@ $as_echo "$ac_cv_search_clock_gettime" >&6; }
ac_res=$ac_cv_search_clock_gettime
if test "$ac_res" != no; then :
test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
have_clock_gettime=yes
fi
$as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
if test "x$have_clock_gettime" = xyes; then
have_clock_gettime=yes
fi
$as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
POSIX_CLOCK_LIBS="$LIBS"
POSIX_CLOCK_LIBS="$LIBS"
fi
LIBS="$SAVELIBS"
......
......@@ -499,5 +499,5 @@ FromHost::add_handlers()
add_data_handlers("drops", Handler::OP_READ, &_drops);
}
ELEMENT_REQUIRES(AnyDevice linuxmodule)
ELEMENT_REQUIRES(AnyDevice linuxmodule false)
EXPORT_ELEMENT(FromHost)
......@@ -797,15 +797,16 @@ dnl POSIX_CLOCK_LIBS.
dnl
AC_DEFUN([CLICK_CHECK_POSIX_CLOCKS], [
have_clock_gettime=no
have_clock_gettime=no; POSIX_CLOCK_LIBS=
AC_CHECK_DECLS([clock_gettime], [], [], [#ifdef HAVE_TIME_H
# include <time.h>
#endif])
SAVELIBS="$LIBS"
AC_SEARCH_LIBS([clock_gettime], [rt],
[AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Define if you have the clock_gettime function.])
have_clock_gettime=yes])
POSIX_CLOCK_LIBS="$LIBS"
AC_SEARCH_LIBS([clock_gettime], [rt], [have_clock_gettime=yes])
if test "x$have_clock_gettime" = xyes; then
AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Define if you have the clock_gettime function.])
POSIX_CLOCK_LIBS="$LIBS"
fi
AC_SUBST(POSIX_CLOCK_LIBS)
LIBS="$SAVELIBS"
])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment