aboutsummaryrefslogtreecommitdiffstats
path: root/m4/macros/check_hide_mount_type.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/macros/check_hide_mount_type.m4')
-rw-r--r--m4/macros/check_hide_mount_type.m431
1 files changed, 31 insertions, 0 deletions
diff --git a/m4/macros/check_hide_mount_type.m4 b/m4/macros/check_hide_mount_type.m4
new file mode 100644
index 000000000000..89c6c4da438f
--- /dev/null
+++ b/m4/macros/check_hide_mount_type.m4
@@ -0,0 +1,31 @@
+dnl ######################################################################
+dnl Define mount type to hide amd mounts from df(1)
+dnl
+dnl This has to be determined individually per OS. Depending on whatever
+dnl mount options are defined in the system header files such as
+dnl MNTTYPE_IGNORE or MNTTYPE_AUTO, or others does not work: some OSs define
+dnl some of these then use other stuff; some do not define them at all in
+dnl the headers, but still use it; and more. After a long attempt to get
+dnl this automatically configured, I came to the conclusion that the semi-
+dnl automatic per-host-os determination here is the best.
+dnl
+AC_DEFUN([AMU_CHECK_HIDE_MOUNT_TYPE],
+[
+AC_CACHE_CHECK(for mount type to hide from df,
+ac_cv_hide_mount_type,
+[
+case "${host_os}" in
+ irix* | hpux* )
+ ac_cv_hide_mount_type="ignore"
+ ;;
+ sunos4* )
+ ac_cv_hide_mount_type="auto"
+ ;;
+ * )
+ ac_cv_hide_mount_type="nfs"
+ ;;
+esac
+])
+AC_DEFINE_UNQUOTED(HIDE_MOUNT_TYPE, "$ac_cv_hide_mount_type")
+])
+dnl ======================================================================