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.8.0_pre1^2~2070 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=f87d49cd17fbf6aa9465faadac823ed8d0510a16;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 Change-Id: Id3b0bcf65241c635f0109ed370b3079da8cd5656 Reviewed-on: http://gerrit.openafs.org/8021 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear --- diff --git a/src/cf/linux-test1.m4 b/src/cf/linux-test1.m4 index 51238cd65..4e799e264 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])