chiark / gitweb /
Fix check for libcap to re-set LIBS; add -lrt for mq_unlink
authorAndy Wingo <wingo@pobox.com>
Sun, 6 Mar 2016 11:47:17 +0000 (12:47 +0100)
committerAndy Wingo <wingo@pobox.com>
Sun, 6 Mar 2016 15:00:51 +0000 (16:00 +0100)
configure.ac

index 045bfb5..0fdd7c5 100644 (file)
@@ -232,18 +232,21 @@ AC_CHECK_HEADERS([linux/memfd.h], [], [])
 
 # unconditionally pull-in librt with old glibc versions
 AC_SEARCH_LIBS([clock_gettime], [rt], [], [])
+AC_SEARCH_LIBS([mq_unlink], [rt], [], [])
 
 AC_ARG_WITH([libcap],
             AS_HELP_STRING([--with-libcap=DIR], [Prefix for libcap]),
             [CAP_LDFLAGS="-L$with_libcap/lib"],
             [CAP_LDFLAGS=""])
 save_LIBS="$LIBS"
+save_LDFLAGS="$LDFLAGS"
 LIBS=
 LDFLAGS="$LDFLAGS $CAP_LDFLAGS"
 AC_SEARCH_LIBS([cap_init], [cap], [], [AC_MSG_ERROR([*** POSIX caps library not found])])
 CAP_LIBS="$LIBS"
 AC_SUBST(CAP_LIBS)
 AC_SUBST(CAP_LDFLAGS)
+LIBS="$save_LIBS"
 LDFLAGS="$save_LDFLAGS"
 
 AC_CHECK_FUNCS([memfd_create])