5 AC_DEFUN([AC_BSD_FUNC_VGET], [
6 AC_CACHE_CHECK(if vget takes one argument, ac_cv_func_vget_one_args,
7 AC_TRY_COMPILE_KERNEL([
8 #ifdef HAVE_SYS_CDEFS_H
11 #if defined(__osf__) && defined(__GNUC__)
14 #include <sys/types.h>
15 #include <sys/param.h>
18 #include <sys/vnode.h>
20 ac_cv_func_vget_one_args=yes,
21 ac_cv_func_vget_one_args=no))
22 if test "$ac_cv_func_vget_one_args" = yes; then
23 AC_DEFINE_UNQUOTED(HAVE_ONE_ARGUMENT_VGET, 1,
24 [define if vget takes one argument])
27 AC_CACHE_CHECK(if vget takes two arguments, ac_cv_func_vget_two_args,
28 AC_TRY_COMPILE_KERNEL([
29 #ifdef HAVE_SYS_CDEFS_H
30 #include <sys/cdefs.h>
32 #include <sys/types.h>
33 #include <sys/param.h>
36 #include <sys/vnode.h>
38 ac_cv_func_vget_two_args=yes,
39 ac_cv_func_vget_two_args=no))
40 if test "$ac_cv_func_vget_two_args" = yes; then
41 AC_DEFINE_UNQUOTED(HAVE_TWO_ARGUMENT_VGET, 1,
42 [define if vget takes two arguments])
45 AC_CACHE_CHECK(if vget takes three arguments, ac_cv_func_vget_three_args,
46 AC_TRY_COMPILE_KERNEL([
47 #ifdef HAVE_SYS_CDEFS_H
48 #include <sys/cdefs.h>
50 #include <sys/types.h>
51 #include <sys/param.h>
54 #include <sys/vnode.h>
56 ac_cv_func_vget_three_args=yes,
57 ac_cv_func_vget_three_args=no))
58 if test "$ac_cv_func_vget_three_args" = yes; then
59 AC_DEFINE(HAVE_THREE_ARGUMENT_VGET, 1,
60 [define if vget takes three arguments])
63 AC_CACHE_CHECK(if vget takes four arguments, ac_cv_func_vget_four_args,
64 AC_TRY_COMPILE_KERNEL([
65 #ifdef HAVE_SYS_CDEFS_H
66 #include <sys/cdefs.h>
68 #include <sys/types.h>
69 #include <sys/param.h>
72 #include <sys/vnode.h>
74 ac_cv_func_vget_four_args=yes,
75 ac_cv_func_vget_four_args=no))
76 if test "$ac_cv_func_vget_four_args" = yes; then
77 AC_DEFINE(HAVE_FOUR_ARGUMENT_VGET, 1,
78 [define if vget takes four arguments])
81 if test "$ac_cv_func_vget_one_args" = "no" -a "$ac_cv_func_vget_two_args" = "no" -a "$ac_cv_func_vget_three_args" = "no" -a "$ac_cv_func_vget_four_args" = "no"; then
82 AC_MSG_ERROR([test for number of arguments of vget failed])