summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2016-07-18 14:24:39 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2016-07-18 23:24:42 -0400
commit4d920466f7a8163adb3de2862b48c53b24a9a915 (patch)
treeca0c2cc0b991f35563de67b91fd03f438e1b6509 /configure.ac
parenta3ec906ef97fae05291f335210d66ae4b7260d4a (diff)
downloadlighttpd1.4-4d920466f7a8163adb3de2862b48c53b24a9a915.tar.gz
lighttpd1.4-4d920466f7a8163adb3de2862b48c53b24a9a915.zip
[autobuild] clock_gettime() -lrt with glibc < 2.17
clock_gettime() needs -lrt with glibc < 2.17, and possibly other platforms On systems without clock_gettime (-cough- Mac OSX -cough-), use gettimeofday() (deprecated in POSIX.1-2008) which is slightly lower precision, but reasonably fast in execution. References: http://stackoverflow.com/questions/5167269/clock-gettime-alternative-in-mac-os-x http://stackoverflow.com/questions/11680461/monotonic-clock-on-osx https://discussions.apple.com/thread/6023936?tstart=0
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac5
1 files changed, 4 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index ffe6a177..1d172a1a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -286,6 +286,9 @@ AC_SEARCH_LIBS(hstrerror,resolv)
dnl On Haiku accept() and friends are in libnetwork
AC_SEARCH_LIBS(accept,network)
+dnl clock_gettime() needs -lrt with glibc < 2.17, and possibly other platforms
+AC_SEARCH_LIBS([clock_gettime],[rt])
+
save_LIBS=$LIBS
AC_SEARCH_LIBS(dlopen,dl,[
AC_CHECK_HEADERS([dlfcn.h],[
@@ -699,7 +702,7 @@ AC_CHECK_FUNCS([dup2 getcwd inet_ntoa inet_ntop inet_pton issetugid memset mmap
gethostbyname poll epoll_ctl getrlimit chroot \
getuid select signal pathconf madvise posix_fadvise posix_madvise \
writev sigaction sendfile64 send_file kqueue port_create localtime_r gmtime_r \
- memset_s explicit_bzero])
+ memset_s explicit_bzero clock_gettime])
AC_MSG_CHECKING(if weak symbols are supported)
AC_LINK_IFELSE([AC_LANG_PROGRAM([[