xref: /netbsd-src/external/bsd/am-utils/dist/m4/macros/check_unmount_call.m4 (revision a53f50b9b44dc9467ccc9c464999b1d1c509cb0c)
1*a53f50b9Schristosdnl ######################################################################
2*a53f50b9Schristosdnl check for the correct system call to unmount a filesystem.
3*a53f50b9SchristosAC_DEFUN([AMU_CHECK_UNMOUNT_CALL],
4*a53f50b9Schristos[
5*a53f50b9Schristosdnl make sure this one is called before [AC_CHECK_UNMOUNT_ARGS]
6*a53f50b9SchristosAC_BEFORE([$0], [AC_CHECK_UNMOUNT_ARGS])
7*a53f50b9SchristosAC_CACHE_CHECK(the system call to unmount a filesystem,
8*a53f50b9Schristosac_cv_unmount_call,
9*a53f50b9Schristos[
10*a53f50b9Schristos# check for various unmount a filesystem calls
11*a53f50b9Schristosif test "$ac_cv_func_uvmount" = yes ; then
12*a53f50b9Schristos  ac_cv_unmount_call=uvmount
13*a53f50b9Schristoselif test "$ac_cv_func_unmount" = yes ; then
14*a53f50b9Schristos  ac_cv_unmount_call=unmount
15*a53f50b9Schristoselif test "$ac_cv_func_umount" = yes ; then
16*a53f50b9Schristos  ac_cv_unmount_call=umount
17*a53f50b9Schristoselse
18*a53f50b9Schristos  ac_cv_unmount_call=no
19*a53f50b9Schristosfi
20*a53f50b9Schristos])
21*a53f50b9Schristosif test "$ac_cv_unmount_call" != no
22*a53f50b9Schristosthen
23*a53f50b9Schristos  am_utils_unmount_call=$ac_cv_unmount_call
24*a53f50b9Schristos  AC_SUBST(am_utils_unmount_call)
25*a53f50b9Schristosfi
26*a53f50b9Schristos])
27*a53f50b9Schristosdnl ======================================================================
28