+# LB_LIBMOUNT
+#
+# Check whether build with libmount for mount.lustre.
+# libmount is part of the util-linux since v2.18.
+# We need it to manipulate utab file.
+#
+AC_DEFUN([LB_LIBMOUNT], [
+AC_CHECK_HEADER([libmount/libmount.h], [
+ AC_CHECK_LIB([mount], [mnt_update_set_fs], [
+ LDLIBMOUNT="-lmount"
+ AC_SUBST(LDLIBMOUNT)
+ AC_DEFINE(HAVE_LIBMOUNT, 1, [build with libmount])
+ with_libmount="yes"
+ ],[with_libmount="no"])
+], [with_libmount="no"])
+AC_MSG_CHECKING([whether to build with libmount])
+AS_IF([test "x$with_libmount" = xyes], [
+ AC_MSG_RESULT([yes])
+], [
+ AC_MSG_RESULT([no])
+])
+]) # LB_LIBMOUNT
+
+#