yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 1 | dnl |
| 2 | dnl Copyright (c) Cisco Systems Inc., 2009 |
Garrett Cooper | 183c6e4 | 2010-11-01 22:22:45 -0700 | [diff] [blame] | 3 | dnl Copyright (c) Linux Test Project, 2010 |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 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 |
Wanlong Gao | 4548c6c | 2012-10-19 18:03:36 +0800 | [diff] [blame] | 17 | dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
yaberauneya | ef77253 | 2009-10-09 17:55:43 +0000 | [diff] [blame] | 18 | dnl |
| 19 | dnl Author: Garrett Cooper <yanegomi@gmail.com> |
| 20 | dnl |
| 21 | |
| 22 | dnl |
| 23 | dnl LTP_CHECK_CAPABILITY_SUPPORT |
| 24 | dnl ---------------------------- |
| 25 | dnl |
| 26 | AC_DEFUN([LTP_CHECK_CAPABILITY_SUPPORT],[ |
Rishikesh K Rajak | 6e3dd83 | 2010-03-22 12:04:09 +0530 | [diff] [blame] | 27 | AH_TEMPLATE(HAVE_LIBCAP, |
| 28 | [Define to 1 if you have libcap-2 installed.]) |
Garrett Cooper | 091fbdc | 2010-11-08 11:36:32 -0800 | [diff] [blame] | 29 | AC_CHECK_HEADERS([sys/capability.h],[capability_header_prefix="sys"]) |
Garrett Cooper | 183c6e4 | 2010-11-01 22:22:45 -0700 | [diff] [blame] | 30 | if test "x$capability_header_prefix" != x; then |
| 31 | AC_CHECK_LIB(cap,cap_compare,[cap_libs="-lcap"]) |
Garrett Cooper | 183c6e4 | 2010-11-01 22:22:45 -0700 | [diff] [blame] | 32 | fi |
| 33 | if test "x$cap_libs" != x; then |
| 34 | AC_DEFINE(HAVE_LIBCAP) |
Garrett Cooper | 4f71cae | 2010-11-01 21:09:17 -0700 | [diff] [blame] | 35 | fi |
| 36 | AC_SUBST(CAP_LIBS,$cap_libs) |
Garrett Cooper | 4f71cae | 2010-11-01 21:09:17 -0700 | [diff] [blame] | 37 | ]) |