From ff4368add70d4e36dd553fdc32efe38bdef677b9 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Sat, 10 May 2014 16:09:44 -0400 Subject: [PATCH] Fixed build by adding librt to build system. --- configure.ac | 11 +++++++++++ toxcore/Makefile.inc | 1 + 2 files changed, 12 insertions(+) diff --git a/configure.ac b/configure.ac index 34038517c..7756e6b94 100644 --- a/configure.ac +++ b/configure.ac @@ -388,6 +388,17 @@ AC_C_BIGENDIAN # Checks for library functions. AC_FUNC_FORK AC_CHECK_FUNCS([gettimeofday memset socket strchr malloc]) +if test "x$WIN32" != "xyes"; then + AC_CHECK_LIB(rt, clock_gettime, + [ + RT_LIBS="-lrt" + AC_SUBST(RT_LIBS) + ], + [ + AC_MSG_ERROR([required library rt was not found on your system]) + ] + ) +fi if test "x$BUILD_AV" = "xyes"; then AX_PTHREAD( diff --git a/toxcore/Makefile.inc b/toxcore/Makefile.inc index 926b4e3fa..4c9597890 100644 --- a/toxcore/Makefile.inc +++ b/toxcore/Makefile.inc @@ -50,6 +50,7 @@ libtoxcore_la_LDFLAGS = $(TOXCORE_LT_LDFLAGS) \ $(EXTRA_LT_LDFLAGS) \ $(LIBSODIUM_LDFLAGS) \ $(NACL_LDFLAGS) \ + $(RT_LIBS) \ $(WINSOCK2_LIBS) libtoxcore_la_LIBADD = $(LIBSODIUM_LIBS) \