2 dnl Check for ext2fs undel support.
3 dnl Set shell variable ext2fs_undel to "yes" if we have it,
4 dnl "no" otherwise. May define ENABLE_VFS_UNDELFS for cpp.
5 dnl Will set EXT2FS_UNDEL_LIBS to required libraries.
7 AC_DEFUN([mc_UNDELFS_CHECKS], [
11 dnl Use result of mc_EXT2FS_ATTR that was called earlier
12 if test "x$ext2fs_attr_msg" = "xyes"; then
15 PKG_CHECK_MODULES(COM_ERR, [com_err >= 1.42.4], [com_err=yes], [:])
17 if test x"$com_err" = "xyes"; then
18 EXT2FS_UNDEL_LIBS="$EXT2FS_LIBS $COM_ERR_LIBS"
26 dnl Ext2fs undelete support
28 AC_DEFUN([mc_VFS_UNDELFS],
30 AC_ARG_ENABLE([vfs-undelfs],
31 AS_HELP_STRING([--enable-vfs-undelfs], [Support for ext2 undelete filesystem @<:@no@:>@]),
33 if test "x$enableval" = "xno"; then
36 enable_vfs_undelfs=yes
39 [enable_vfs_undelfs="no"])
41 if test x"$enable_vfs" = x"yes" -a x"$enable_vfs_undelfs" != x"no"; then
44 if test x"$ext2fs_undel" = x"yes"; then
45 enable_vfs_undelfs="yes"
46 mc_VFS_ADDNAME([undelfs])
47 AC_DEFINE(ENABLE_VFS_UNDELFS, [1], [Support for ext2 undelfs])
48 AC_MSG_NOTICE([using ext2fs file recovery code])
49 MCLIBS="$MCLIBS $EXT2FS_UNDEL_LIBS"
51 AC_MSG_ERROR([Ext2 libraries not found])
54 AM_CONDITIONAL(ENABLE_VFS_UNDELFS, [test "$enable_vfs" = "yes" -a x"$enable_vfs_undelfs" = x"yes"])