Home | History | Annotate | Download | only in m4
      1 dnl
      2 dnl Copyright (c) Cisco Systems Inc., 2009
      3 dnl Copyright (c) Linux Test Project, 2010
      4 dnl
      5 dnl This program is free software;  you can redistribute it and/or modify
      6 dnl it under the terms of the GNU General Public License as published by
      7 dnl the Free Software Foundation; either version 2 of the License, or
      8 dnl (at your option) any later version.
      9 dnl
     10 dnl This program is distributed in the hope that it will be useful,
     11 dnl but WITHOUT ANY WARRANTY;  without even the implied warranty of
     12 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
     13 dnl the GNU General Public License for more details.
     14 dnl
     15 dnl You should have received a copy of the GNU General Public License
     16 dnl along with this program;  if not, write to the Free Software
     17 dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
     18 dnl
     19 dnl Author: Garrett Cooper <yanegomi (a] gmail.com>
     20 dnl
     21 
     22 dnl
     23 dnl LTP_CHECK_CAPABILITY_SUPPORT
     24 dnl ----------------------------
     25 dnl
     26 AC_DEFUN([LTP_CHECK_CAPABILITY_SUPPORT],[
     27 AH_TEMPLATE(HAVE_LIBCAP,
     28 [Define to 1 if you have libcap-2 installed.])
     29 AC_CHECK_HEADERS([sys/capability.h],[capability_header_prefix="sys"])
     30 if test "x$capability_header_prefix" != x; then
     31 	AC_CHECK_LIB(cap,cap_compare,[cap_libs="-lcap"])
     32 fi
     33 if test "x$cap_libs" != x; then
     34 	AC_DEFINE(HAVE_LIBCAP)
     35 fi
     36 AC_SUBST(CAP_LIBS,$cap_libs)
     37 ])
     38