From bb8f25067fb84d437a00fb8d1f3625daad10c01f Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 5 Apr 2013 13:53:33 +0100 Subject: [PATCH] On Linux, check for mq_getattr(), needed by sd-daemon.c With recent glibc, we have no other reason to need -lrt, so we don't link it and the build fails. Signed-off-by: Simon McVittie --- configure.ac | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/configure.ac b/configure.ac index aff812e..514a09a 100644 --- a/configure.ac +++ b/configure.ac @@ -1297,7 +1297,19 @@ if test x$with_valgrind != xno; then fi #### Set up final flags + LIBDBUS_LIBS="$THREAD_LIBS $NETWORK_libs" + +# If running Linux, sd-daemon.c may have dependencies. +AS_CASE([$host_os], + [linux*], + [ + save_libs="$LIBS" + LIBS="$LIBDBUS_LIBS" + AC_SEARCH_LIBS([mq_getattr], [rt], [LIBDBUS_LIBS="$LIBS"]) + LIBS="$save_libs" + ]) + AC_SUBST([LIBDBUS_LIBS]) ### X11 detection -- 1.7.10.4