[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] 02/02: configure: improved detection and us
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] 02/02: configure: improved detection and usage of 'librt' |
Date: |
Sun, 26 Mar 2017 21:22:57 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit d54da541b49d4deb712d8c8df3efe2e2c1efa510
Author: Evgeny Grin (Karlson2k) <address@hidden>
AuthorDate: Sun Mar 26 15:55:51 2017 +0300
configure: improved detection and usage of 'librt'
---
configure.ac | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/configure.ac b/configure.ac
index 7a44c0d5..936550ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -918,9 +918,20 @@ AC_CHECK_DECLS([SOCK_NONBLOCK],
[AC_DEFINE([HAVE_SOCK_NONBLOCK], [1], [SOCK_NONB
])
-AC_SEARCH_LIBS([clock_gettime], [rt], [
- AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Have
clock_gettime])
-])
+AC_CHECK_DECL([[clock_gettime]],
+ [
+ SAVE_LIBS="$LIBS"
+ AC_SEARCH_LIBS([clock_gettime], [rt],
+ [
+ AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Have clock_gettime])
+ AS_VAR_IF([[ac_cv_search_clock_gettime]],[["none required"]], [],
+ [
+ MHD_LIBDEPS="$ac_cv_search_clock_gettime $MHD_LIBDEPS"
+ MHD_LIBDEPS_PKGCFG="$ac_cv_search_clock_gettime $MHD_LIBDEPS_PKGCFG"
+ ])
+ ], [], [$MHD_LIBDEPS])
+ LIBS="$SAVE_LIBS"
+ ], [], [[#include <time.h>]])
AC_MSG_CHECKING([[for clock_get_time]])
AC_LINK_IFELSE(
@@ -939,8 +950,6 @@ AC_LINK_IFELSE(
],
[
AC_DEFINE([HAVE_CLOCK_GET_TIME], [1], [Define to 1 if you have
`clock_get_time', `host_get_clock_service' and `mach_port_deallocate'
functions.])
-# For glibc < 2.17, we need -lrt:
- MHD_LIBDEPS="-lrt $MHD_LIBDEPS"
AC_MSG_RESULT([[yes]])
],
[AC_MSG_RESULT([[no]])
--
To stop receiving notification emails like this one, please contact
address@hidden