]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
autoconf: add AC_CHECK_LINUX_TYPE macro
authorAndrew Deason <adeason@sinenomine.net>
Thu, 30 Aug 2012 12:06:33 +0000 (08:06 -0400)
committerStephan Wiesand <stephan.wiesand@desy.de>
Fri, 21 Dec 2012 10:13:43 +0000 (02:13 -0800)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit f87d49cd17fbf6aa9465faadac823ed8d0510a16)

Change-Id: Idc6cc79d9410149f6faeb867f878724beaa30793
Reviewed-on: http://gerrit.openafs.org/8788
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/cf/linux-test1.m4

index 3141a4478d25223eeb09aa78ee1708ba002fef91..f7176d2d4f38b6fc6278718c5e311f450b749cdf 100644 (file)
@@ -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 <linux/$2>],
+                       [$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])