blob: c7e8d3a3fa0d05068a84321d96082e23d8c75b4c [file] [log] [blame]
yaberauneyaef772532009-10-09 17:55:43 +00001dnl
2dnl Copyright (c) Cisco Systems Inc., 2009
Garrett Cooper183c6e42010-11-01 22:22:45 -07003dnl Copyright (c) Linux Test Project, 2010
yaberauneyaef772532009-10-09 17:55:43 +00004dnl
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
Wanlong Gao4548c6c2012-10-19 18:03:36 +080017dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
yaberauneyaef772532009-10-09 17:55:43 +000018dnl
19dnl Author: Garrett Cooper <yanegomi@gmail.com>
20dnl
21
22dnl
23dnl LTP_CHECK_CAPABILITY_SUPPORT
24dnl ----------------------------
25dnl
26AC_DEFUN([LTP_CHECK_CAPABILITY_SUPPORT],[
Rishikesh K Rajak6e3dd832010-03-22 12:04:09 +053027AH_TEMPLATE(HAVE_LIBCAP,
28[Define to 1 if you have libcap-2 installed.])
Garrett Cooper091fbdc2010-11-08 11:36:32 -080029AC_CHECK_HEADERS([sys/capability.h],[capability_header_prefix="sys"])
Garrett Cooper183c6e42010-11-01 22:22:45 -070030if test "x$capability_header_prefix" != x; then
31 AC_CHECK_LIB(cap,cap_compare,[cap_libs="-lcap"])
Garrett Cooper183c6e42010-11-01 22:22:45 -070032fi
33if test "x$cap_libs" != x; then
34 AC_DEFINE(HAVE_LIBCAP)
Garrett Cooper4f71cae2010-11-01 21:09:17 -070035fi
36AC_SUBST(CAP_LIBS,$cap_libs)
Garrett Cooper4f71cae2010-11-01 21:09:17 -070037])