|
Packit Service |
09cdfc |
dnl Checks for libcap.so
|
|
Packit Service |
09cdfc |
dnl
|
|
Packit Service |
09cdfc |
AC_DEFUN([AC_LIBCAP], [
|
|
Packit Service |
09cdfc |
|
|
Packit Service |
09cdfc |
AC_ARG_WITH(libcap,
|
|
Packit Service |
09cdfc |
[ --with-libcap Add libcap support [default=yes, if libcap-ng not available]],,
|
|
Packit Service |
09cdfc |
with_libcap=auto)
|
|
Packit Service |
09cdfc |
|
|
Packit Service |
09cdfc |
if test "x$with_libcap" = "xno"; then
|
|
Packit Service |
09cdfc |
enable_libcap="no"
|
|
Packit Service |
09cdfc |
else
|
|
Packit Service |
09cdfc |
dnl look for prctl
|
|
Packit Service |
09cdfc |
AC_CHECK_FUNC([prctl], , )
|
|
Packit Service |
09cdfc |
|
|
Packit Service |
09cdfc |
dnl look for the library; do not add to LIBS if found
|
|
Packit Service |
09cdfc |
AC_CHECK_LIB([cap], [cap_get_proc], enable_libcap="yes", enable_libcap="no", )
|
|
Packit Service |
09cdfc |
|
|
Packit Service |
09cdfc |
AC_CHECK_HEADERS([sys/capability.h], ,
|
|
Packit Service |
09cdfc |
[
|
|
Packit Service |
09cdfc |
if test x$with_libcap = xyes; then
|
|
Packit Service |
09cdfc |
AC_MSG_ERROR([libcap headers not found])
|
|
Packit Service |
09cdfc |
else
|
|
Packit Service |
09cdfc |
AC_MSG_WARN([libcap headers not found. mount.cifs will be built without support for dropping capabilities. Consider installing libcap-devel.])
|
|
Packit Service |
09cdfc |
enable_libcap="no"
|
|
Packit Service |
09cdfc |
fi
|
|
Packit Service |
09cdfc |
])
|
|
Packit Service |
09cdfc |
fi
|
|
Packit Service |
09cdfc |
|
|
Packit Service |
09cdfc |
if test "$enable_libcap" = "yes"; then
|
|
Packit Service |
09cdfc |
AC_DEFINE([HAVE_LIBCAP],[1], [Define if libcap exists])
|
|
Packit Service |
09cdfc |
LIBCAP=-lcap
|
|
Packit Service |
09cdfc |
AC_SUBST(LIBCAP)
|
|
Packit Service |
09cdfc |
fi
|
|
Packit Service |
09cdfc |
|
|
Packit Service |
09cdfc |
])dnl
|