From: Andrew Deason Date: Thu, 30 Aug 2012 12:06:33 +0000 (-0400) Subject: autoconf: add AC_CHECK_LINUX_TYPE macro X-Git-Tag: upstream/1.6.2_pre2^2~15 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=716cca7ed808aee2e639d06d8d5fcdd71de12b2b;p=packages%2Fo%2Fopenafs.git 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 --- 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])