]> git.pld-linux.org Git - packages/audit.git/blob - audit-m4.patch
- updated to 2.4.1
[packages/audit.git] / audit-m4.patch
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
4 @@ -0,0 +1,41 @@
5 +# libcap-ng.m4 - Checks for the libcap-ng support
6 +#      Copyright (c) 2009 Steve Grubb sgrubb@redhat.com
7 +#
8 +AC_DEFUN([LIBCAP_NG_PATH],
9 +[
10 +  AC_ARG_WITH(libcap-ng,
11 +    [  --with-libcap-ng=[auto/yes/no]  Add Libcap-ng support [default=auto]],,
12 +    with_libcap_ng=auto)
13 +
14 +  # Check for Libcap-ng API
15 +  #
16 +  # libcap-ng detection
17 +
18 +  if test x$with_libcap_ng = xno ; then
19 +      have_libcap_ng=no;
20 +  else
21 +      # Start by checking for header file
22 +      AC_CHECK_HEADER(cap-ng.h, capng_headers=yes, capng_headers=no)
23 +
24 +      # See if we have libcap-ng library
25 +      AC_CHECK_LIB(cap-ng, capng_clear,
26 +                CAPNG_LDADD=-lcap-ng,)
27 +
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)
31 +      fi
32 +      if test x$CAPNG_LDADD != x -a $capng_headers = no ; then
33 +         AC_MSG_ERROR(libcap-ng libraries found but headers are missing)
34 +      fi
35 +  fi
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])
40 +      AC_MSG_RESULT(yes)
41 +  else
42 +      AC_MSG_RESULT(no)
43 +  fi
44 +])
45 +
This page took 0.050681 seconds and 3 git commands to generate.