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