From 2d2a664f6ccd32e7dbb8d6a3040c143e9cee5cb5 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Thu, 2 Mar 2017 22:03:22 +0100 Subject: [PATCH] Some systems (e.g. glibc < 2.17) require librt to get clock_gettime --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index 0e635a5..ad8d34c 100644 --- a/configure.ac +++ b/configure.ac @@ -125,6 +125,10 @@ AM_CONDITIONAL(SPI_ENABLED, [test x"$spi_required" = x"yes"]) # Enable I2C if AM_CONDITIONAL(I2C_ENABLED, [test x"$i2c_required" = x"yes"]) +if test x"$i2c_required" = x"yes" +then + AC_SEARCH_LIBS([clock_gettime], [rt]) +fi # Documentation (default: no) AC_ARG_ENABLE([doc],AS_HELP_STRING([--enable-doc],[Enable documentation generation.]),[enable_doc=$enableval],[enable_doc="no"])