~ubuntu-branches/ubuntu/utopic/irqbalance/utopic-proposed

« back to all changes in this revision

Viewing changes to m4/cap-ng.m4

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-09-11 14:20:10 UTC
  • mfrom: (0.2.5) (0.1.16 sid)
  • Revision ID: package-import@ubuntu.com-20120911142010-sl46ls1e7m7s793l
Tags: 1.0.3-1ubuntu1
* Resync with Debian testing and fix compatibility with NUMA 
  based systems (LP: #974450).
  - d/control: Add libnuma-dev to Build-Depends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# libcap-ng.m4 - Checks for the libcap-ng support
 
2
#       Copyright (c) 2009 Steve Grubb sgrubb@redhat.com
 
3
#
 
4
AC_DEFUN([LIBCAP_NG_PATH],
 
5
[
 
6
  AC_ARG_WITH(libcap-ng,
 
7
    [  --with-libcap-ng=[auto/yes/no]  Add Libcap-ng support [default=auto]],,
 
8
    with_libcap_ng=auto)
 
9
 
 
10
  # Check for Libcap-ng API
 
11
  #
 
12
  # libcap-ng detection
 
13
 
 
14
  if test x$with_libcap_ng = xno ; then
 
15
      have_libcap_ng=no;
 
16
  else
 
17
      # Start by checking for header file
 
18
      AC_CHECK_HEADER(cap-ng.h, capng_headers=yes, capng_headers=no)
 
19
 
 
20
      # See if we have libcap-ng library
 
21
      AC_CHECK_LIB(cap-ng, capng_clear,
 
22
                 CAPNG_LDADD=-lcap-ng,)
 
23
 
 
24
      # Check results are usable
 
25
      if test x$with_libcap_ng = xyes -a x$CAPNG_LDADD = x ; then
 
26
         AC_MSG_ERROR(libcap-ng support was requested and the library was not found)
 
27
      fi
 
28
      if test x$CAPNG_LDADD != x -a $capng_headers = no ; then
 
29
         AC_MSG_ERROR(libcap-ng libraries found but headers are missing)
 
30
      fi
 
31
  fi
 
32
  AC_SUBST(CAPNG_LDADD)
 
33
  AC_MSG_CHECKING(whether to use libcap-ng)
 
34
  if test x$CAPNG_LDADD != x ; then
 
35
      AC_DEFINE(HAVE_LIBCAP_NG,1,[libcap-ng support])
 
36
      AC_MSG_RESULT(yes)
 
37
  else
 
38
      AC_MSG_RESULT(no)
 
39
  fi
 
40
])