forked from ThomasHabets/gtping
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixed autotools stuff wrt monotonic clock
- Loading branch information
1 parent
f36dc37
commit 36ae031
Showing
2 changed files
with
27 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# check for clock_gettime(CLOCK_MONOTONIC, ...) | ||
AC_DEFUN([EL_CLOCK_MONOTONIC], | ||
[ | ||
AC_SEARCH_LIBS([clock_gettime], [rt]) | ||
AC_CACHE_CHECK([for CLOCK_MONOTONIC], | ||
ac_cv_have_clock_monotonic, | ||
[ | ||
AC_TRY_RUN( | ||
[ | ||
#include <time.h> | ||
int main() { | ||
struct timespec ts; | ||
exit(!!clock_gettime(CLOCK_MONOTONIC, &ts)); | ||
} | ||
], | ||
[ ac_cv_have_clock_monotonic="yes"], | ||
[ ac_cv_have_clock_monotonic="no" ] | ||
) | ||
]) | ||
AM_CONDITIONAL(HAVE_CLOCK_MONOTONIC, test x$ac_cv_have_clock_monotonic = xyes) | ||
if test x$ac_cv_have_clock_monotonic = xyes; then | ||
AC_DEFINE([HAVE_CLOCK_MONOTONIC], 1, [Have symbol CLOCK_MONOTONIC]) | ||
fi | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters