+2015-02-11 Pádraig Brady <P@draigBrady.com>
+
+ mountlist: only use libmount when specified
+ There are currently many shared libs dependencies introduced by
+ libmount with associated runtime and virt mem overhead.
+ Therefore don't enable by default.
+ * m4/ls-mntd-fs.m4: Use --with-libmount to enable at build time.
+
2015-02-08 Daiki Ueno <ueno@gnu.org>
uniname/unimame-tests: don't link with -lunistring
(4.3BSD, SunOS, HP-UX, Dynix, Irix)])
AC_CHECK_FUNCS([hasmntopt])
+ AC_ARG_WITH([libmount],
+ [AS_HELP_STRING([--with-libmount],
+ [use libmount if available to parse the system mount list.])],
+ [],
+ dnl libmount has the advantage of propagating accurate device IDs for
+ dnl each entry, but the disadvantage of many dependent shared libs
+ dnl with associated runtime startup overhead and virt mem usage.
+ [with_libmount=no])
+
# Check for libmount to support /proc/self/mountinfo on Linux
- AC_CACHE_VAL([ac_cv_lib_libmount_mnt_table_parse_stream],
- [AC_CHECK_LIB([mount], [mnt_new_table_from_file],
- ac_cv_lib_mount_mnt_table_parse_stream=yes,
- ac_cv_lib_mount_mnt_table_parse_stream=no)])
- if test $ac_cv_lib_mount_mnt_table_parse_stream = yes; then
- AC_DEFINE([MOUNTED_PROC_MOUNTINFO], [1],
- [Define if want to use /proc/self/mountinfo on Linux.])
- LIBS="-lmount $LIBS"
- elif test -f /proc/self/mountinfo; then
- AC_MSG_WARN([/proc/self/mountinfo present but libmount is missing.])
+ if test "x$with_libmount" != xno; then
+ AC_CHECK_LIB([mount], [mnt_new_table_from_file],
+ [AC_DEFINE([MOUNTED_PROC_MOUNTINFO], [1],
+ [Define if want to use /proc/self/mountinfo on Linux.])
+ LIBS="-lmount $LIBS"],
+ [test -f /proc/self/mountinfo &&
+ AC_MSG_WARN([/proc/self/mountinfo present but libmount missing.])])
fi
fi
fi