diff options
author | Karel Zak | 2014-10-27 11:05:06 +0100 |
---|---|---|
committer | Karel Zak | 2014-10-27 11:05:14 +0100 |
commit | 8fc4a88630ac5c89c143f607c3ca719172163924 (patch) | |
tree | 9ba324f74bc47b1443fd2c2007dfb27d2e728b1c /configure.ac | |
parent | build-sys: old glibc requires -lrt clock_gettime() (diff) | |
download | kernel-qcow2-util-linux-8fc4a88630ac5c89c143f607c3ca719172163924.tar.gz kernel-qcow2-util-linux-8fc4a88630ac5c89c143f607c3ca719172163924.tar.xz kernel-qcow2-util-linux-8fc4a88630ac5c89c143f607c3ca719172163924.zip |
build-sys: properly check for -lrt
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index f692d8a56..1336f8d14 100644 --- a/configure.ac +++ b/configure.ac @@ -346,6 +346,16 @@ AC_FUNC_FSEEKO AC_CHECK_FUNCS([openat fstatat unlinkat], [have_openat=yes], [have_openat=no]) AC_CHECK_FUNCS([ioperm iopl], [have_io=yes]) +dnl Old glibc requires -lrt +AC_CHECK_FUNCS(clock_gettime, [], [ + AC_CHECK_LIB(rt, clock_gettime, [ + AC_DEFINE(HAVE_CLOCK_GETTIME, 1) + CLOCKGETTIME_LIBS="-lrt" + ]) +]) +AC_SUBST([CLOCKGETTIME_LIBS]) + + AC_CHECK_MEMBER([struct sockaddr.sa_len], AC_DEFINE_UNQUOTED([HAVE_SA_LEN], [1], [Define if struct sockaddr contains sa_len]), [], [#include <sys/types.h> |