summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2016-03-06 12:47:17 +0100
committerAndy Wingo <wingo@pobox.com>2016-03-06 16:00:51 +0100
commit675af195fd6dd2e1f2d92f818c2efb9d328a46a9 (patch)
treefab24743b49e752c0ba0f90163be74887434fe29
parent9c5e7cbf05cfff09b1ce6df920debdeff48a0558 (diff)
Fix check for libcap to re-set LIBS; add -lrt for mq_unlink
-rw-r--r--configure.ac3
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 045bfb52a..0fdd7c58e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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])