From 40caf0ad9bef07bdfb568a88192c157dd1840100 Mon Sep 17 00:00:00 2001 From: "David M. Lee" Date: Fri, 24 Jul 2015 17:04:35 -0500 Subject: Replaces clock_gettime() with ast_tsnow() clock_gettime() is, unfortunately, not portable. But I did like that over our usual `ts.tv_nsec = tv.tv_usec * 1000` copy/paste code we usually do when we want a timespec and all we have is ast_tvnow(). This patch adds ast_tsnow(), which mimics ast_tvnow(), but returns a timespec. If clock_gettime() is available, it will use that. Otherwise ast_tsnow() falls back to using ast_tvnow(). Change-Id: Ibb1ee67ccf4826b9b76d5a5eb62e90b29b6c456e --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index c09d30a7f..178fea9a6 100644 --- a/configure.ac +++ b/configure.ac @@ -505,6 +505,7 @@ AST_EXT_LIB_SETUP([SQLITE3], [SQLite], [sqlite3]) AST_EXT_LIB_SETUP([SRTP], [Secure RTP], [srtp]) AST_EXT_LIB_SETUP_OPTIONAL([SRTP_SHUTDOWN], [SRTP Library Shutdown Function], [SRTP], [srtp]) AST_EXT_LIB_SETUP([OPENSSL], [OpenSSL Secure Sockets Layer], [ssl]) +AST_EXT_LIB_SETUP_OPTIONAL([RT], [Realtime functions], [rt]) AST_EXT_LIB_SETUP([SUPPSERV], [mISDN Supplemental Services], [suppserv]) AST_EXT_LIB_SETUP([FREETDS], [FreeTDS], [tds]) AST_EXT_LIB_SETUP([TERMCAP], [Termcap], [termcap]) @@ -577,6 +578,9 @@ if test "x$JANSSON_LIB" == "x"; then AC_MSG_ERROR([*** JSON support not found (this typically means the libjansson development package is missing)]) fi +# See if clock_gettime is in librt +AST_EXT_LIB_CHECK([RT], [rt], [clock_gettime]) + AST_EXT_TOOL_CHECK([LIBXML2], [xml2-config], , , [#include #include ], -- cgit v1.2.3