xref: /netbsd-src/external/bsd/am-utils/dist/m4/macros/type_autofs_args.m4 (revision a53f50b9b44dc9467ccc9c464999b1d1c509cb0c)
1dnl ######################################################################
2dnl Find the correct type for AUTOFS mount(2) arguments structure
3AC_DEFUN([AMU_TYPE_AUTOFS_ARGS],
4[
5AC_CACHE_CHECK(for structure type of autofs mount(2) arguments,
6ac_cv_type_autofs_args,
7[
8# set to a default value
9ac_cv_type_autofs_args=notfound
10
11# look for "struct auto_args"
12if test "$ac_cv_type_autofs_args" = notfound
13then
14AC_TRY_COMPILE_ANYFS(
15[ struct auto_args a;
16], ac_cv_type_autofs_args="struct auto_args", ac_cv_type_autofs_args=notfound)
17fi
18
19# look for "struct autofs_args"
20if test "$ac_cv_type_autofs_args" = notfound
21then
22AC_TRY_COMPILE_ANYFS(
23[ struct autofs_args a;
24], ac_cv_type_autofs_args="struct autofs_args", ac_cv_type_autofs_args=notfound)
25fi
26
27])
28if test "$ac_cv_type_autofs_args" != notfound
29then
30  AC_DEFINE_UNQUOTED(autofs_args_t, $ac_cv_type_autofs_args)
31fi
32])
33dnl ======================================================================
34