From 716cca7ed808aee2e639d06d8d5fcdd71de12b2b Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Thu, 30 Aug 2012 08:06:33 -0400 Subject: [PATCH] autoconf: add AC_CHECK_LINUX_TYPE macro add a macro which looks for a given type in a given linux kernel header file Reviewed-on: http://gerrit.openafs.org/8021 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit f87d49cd17fbf6aa9465faadac823ed8d0510a16) Change-Id: Idc6cc79d9410149f6faeb867f878724beaa30793 Reviewed-on: http://gerrit.openafs.org/8788 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand --- src/cf/linux-test1.m4 | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/cf/linux-test1.m4 b/src/cf/linux-test1.m4 index 3141a4478..f7176d2d4 100644 --- a/src/cf/linux-test1.m4 +++ b/src/cf/linux-test1.m4 @@ -125,6 +125,16 @@ AC_DEFUN([AC_CHECK_LINUX_FUNC], [Define if your kernel has the $1 function])]) ]) +dnl AC_CHECK_LINUX_TYPE([type], [includes]) +AC_DEFUN([AC_CHECK_LINUX_TYPE], + [AC_CHECK_LINUX_BUILD([for $1], + [ac_cv_linux_type_$1_exists], + [#include ], + [$1 _test; ], + AS_TR_CPP(HAVE_LINUX_$1), + [Define if kernel defines $1]) + ]) + dnl AC_CHECK_LINUX_STRUCT([structure], [element], [includes]) AC_DEFUN([AC_CHECK_LINUX_STRUCT], [AC_CHECK_LINUX_TYPED_STRUCT([struct $1], [$2], [$3]) -- 2.39.5