1 diff -urN audit-2.0.org/acinclude.m4 audit-2.0/acinclude.m4
2 --- audit-2.0.org/acinclude.m4 1970-01-01 01:00:00.000000000 +0100
3 +++ audit-2.0/acinclude.m4 2009-08-18 11:11:24.700738677 +0200
5 +# libcap-ng.m4 - Checks for the libcap-ng support
6 +# Copyright (c) 2009 Steve Grubb sgrubb@redhat.com
8 +AC_DEFUN([LIBCAP_NG_PATH],
10 + AC_ARG_WITH(libcap-ng,
11 + [ --with-libcap-ng=[auto/yes/no] Add Libcap-ng support [default=auto]],,
12 + with_libcap_ng=auto)
14 + # Check for Libcap-ng API
16 + # libcap-ng detection
18 + if test x$with_libcap_ng = xno ; then
21 + # Start by checking for header file
22 + AC_CHECK_HEADER(cap-ng.h, capng_headers=yes, capng_headers=no)
24 + # See if we have libcap-ng library
25 + AC_CHECK_LIB(cap-ng, capng_clear,
26 + CAPNG_LDADD=-lcap-ng,)
28 + # Check results are usable
29 + if test x$with_libcap_ng = xyes -a x$CAPNG_LDADD = x ; then
30 + AC_MSG_ERROR(libcap-ng support was requested and the library was not found)
32 + if test x$CAPNG_LDADD != x -a $capng_headers = no ; then
33 + AC_MSG_ERROR(libcap-ng libraries found but headers are missing)
36 + AC_SUBST(CAPNG_LDADD)
37 + AC_MSG_CHECKING(whether to use libcap-ng)
38 + if test x$CAPNG_LDADD != x ; then
39 + AC_DEFINE(HAVE_LIBCAP_NG,1,[libcap-ng support])