blob: 9019b541a2298fb62f8e03ff9d11ed755bf604c4 [file] [log] [blame]
Garrett Cooper494aa342010-11-03 20:48:19 -07001dnl
2dnl Copyright (c) Linux Test Project, 2010
3dnl
4dnl This program is free software; you can redistribute it and/or modify
5dnl it under the terms of the GNU General Public License as published by
6dnl the Free Software Foundation; either version 2 of the License, or
7dnl (at your option) any later version.
8dnl
9dnl This program is distributed in the hope that it will be useful,
10dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
12dnl the GNU General Public License for more details.
13dnl
14dnl You should have received a copy of the GNU General Public License
15dnl along with this program; if not, write to the Free Software
16dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17dnl
18
19dnl
20dnl LTP_CHECK_SYSCALL_KEYCTL
21dnl ----------------------------
22dnl
Garrett Cooper6b9a2422010-11-16 21:53:29 -080023AC_DEFUN([LTP_CHECK_SYSCALL_KEYCTL],[AC_LINK_IFELSE([AC_LANG_SOURCE([
Garrett Cooper494aa342010-11-03 20:48:19 -070024#include <sys/types.h>
25#include <keyutils.h>
Garrett Cooperc23c3512010-11-16 09:07:08 -080026int main(void) {
Garrett Cooper494aa342010-11-03 20:48:19 -070027 key_serial_t akey;
28 (void) keyctl(KEYCTL_READ, akey);
29 return 0;
Garrett Cooper6b9a2422010-11-16 21:53:29 -080030}])],[has_keyctl_syscall="yes"])
Garrett Cooper494aa342010-11-03 20:48:19 -070031if test "x$has_keyctl_syscall" = "xyes"; then
Garrett Cooper020a4da2010-11-03 20:57:21 -070032 AC_DEFINE(HAVE_KEYCTL_SYSCALL,1,[Define to 1 if you have the libkeyutils development package and keyctl syscall on your system])
Garrett Cooper494aa342010-11-03 20:48:19 -070033else
Garrett Cooper020a4da2010-11-03 20:57:21 -070034 AC_DEFINE(HAVE_KEYCTL_SYSCALL,0,[Define to 1 if you have the libkeyutils development package and keyctl syscall on your system])
Garrett Cooper494aa342010-11-03 20:48:19 -070035fi
36])