xref: /netbsd-src/external/bsd/am-utils/dist/m4/macros/type_pcfs_args.m4 (revision a53f50b9b44dc9467ccc9c464999b1d1c509cb0c)
1dnl ######################################################################
2dnl Find the correct type for PC/FS mount(2) arguments structure
3AC_DEFUN([AMU_TYPE_PCFS_ARGS],
4[
5AC_CACHE_CHECK(for structure type of pcfs mount(2) arguments,
6ac_cv_type_pcfs_args,
7[
8# set to a default value
9ac_cv_type_pcfs_args=notfound
10
11# look for "struct msdos_args"
12if test "$ac_cv_type_pcfs_args" = notfound
13then
14AC_TRY_COMPILE_ANYFS(
15[ struct msdos_args a;
16], ac_cv_type_pcfs_args="struct msdos_args", ac_cv_type_pcfs_args=notfound)
17fi
18
19# look for "struct pc_args"
20if test "$ac_cv_type_pcfs_args" = notfound
21then
22AC_TRY_COMPILE_ANYFS(
23[ struct pc_args a;
24], ac_cv_type_pcfs_args="struct pc_args", ac_cv_type_pcfs_args=notfound)
25fi
26
27# look for "struct pcfs_args"
28if test "$ac_cv_type_pcfs_args" = notfound
29then
30AC_TRY_COMPILE_ANYFS(
31[ struct pcfs_args a;
32], ac_cv_type_pcfs_args="struct pcfs_args", ac_cv_type_pcfs_args=notfound)
33fi
34
35# look for "struct msdosfs_args"
36if test "$ac_cv_type_pcfs_args" = notfound
37then
38AC_TRY_COMPILE_ANYFS(
39[ struct msdosfs_args a;
40], ac_cv_type_pcfs_args="struct msdosfs_args", ac_cv_type_pcfs_args=notfound)
41fi
42
43])
44
45if test "$ac_cv_type_pcfs_args" != notfound
46then
47  AC_DEFINE_UNQUOTED(pcfs_args_t, $ac_cv_type_pcfs_args)
48fi
49])
50dnl ======================================================================
51