diff options
author | Andy Wingo <wingo@pobox.com> | 2015-08-26 23:19:06 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2015-08-26 23:19:51 +0200 |
commit | 6c06c23c21d48a94febb03cbbfb4ef09dcddebc1 (patch) | |
tree | 91b4135752004c14a321e7c826493b78c67ddee6 /configure.ac | |
parent | eafcdd13f80e15fce7b2b31d2574d94a6fd10a99 (diff) |
Add --with-libcap option
* configure.ac: Add --with-libcap option.
* Makefile.am (libelogind_shared_la_LDFLAGS): Add CAP_LDFLAGS.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 54b533004f..16e0343702 100644 --- a/configure.ac +++ b/configure.ac @@ -234,11 +234,18 @@ AC_CHECK_HEADERS([linux/memfd.h], [], []) # unconditionally pull-in librt with old glibc versions AC_SEARCH_LIBS([clock_gettime], [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" 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) +LDFLAGS="$save_LDFLAGS" AC_CHECK_FUNCS([memfd_create]) AC_CHECK_FUNCS([__secure_getenv secure_getenv]) |