2016-01-04 21:43:19 +03:00
|
|
|
dnl mc_UNDELFS_CHECKS
|
2009-05-07 16:38:06 +04:00
|
|
|
dnl Check for ext2fs undel support.
|
|
|
|
dnl Set shell variable ext2fs_undel to "yes" if we have it,
|
2010-07-10 20:03:38 +04:00
|
|
|
dnl "no" otherwise. May define ENABLE_VFS_UNDELFS for cpp.
|
2009-05-07 16:38:06 +04:00
|
|
|
dnl Will set EXT2FS_UNDEL_LIBS to required libraries.
|
|
|
|
|
2016-01-04 21:43:19 +03:00
|
|
|
AC_DEFUN([mc_UNDELFS_CHECKS], [
|
2021-01-24 20:15:12 +03:00
|
|
|
ext2fs_undel=no
|
|
|
|
EXT2FS_UNDEL_LIBS=
|
|
|
|
|
|
|
|
dnl Use result of mc_EXT2FS_ATTR that was called earlier
|
|
|
|
if test "x$ext2fs_attr_msg" = "xyes"; then
|
|
|
|
com_err=no
|
|
|
|
|
|
|
|
PKG_CHECK_MODULES(COM_ERR, [com_err >= 1.42.4], [com_err=yes], [:])
|
|
|
|
|
|
|
|
if test x"$com_err" = "xyes"; then
|
|
|
|
EXT2FS_UNDEL_LIBS="$EXT2FS_LIBS $COM_ERR_LIBS"
|
|
|
|
ext2fs_undel=yes
|
|
|
|
fi
|
2009-05-07 16:38:06 +04:00
|
|
|
fi
|
2021-01-24 20:15:12 +03:00
|
|
|
|
2009-05-07 16:38:06 +04:00
|
|
|
])
|
|
|
|
|
|
|
|
dnl
|
|
|
|
dnl Ext2fs undelete support
|
|
|
|
dnl
|
2016-01-04 21:43:19 +03:00
|
|
|
AC_DEFUN([mc_VFS_UNDELFS],
|
2009-05-07 16:38:06 +04:00
|
|
|
[
|
2010-07-10 20:03:38 +04:00
|
|
|
AC_ARG_ENABLE([vfs-undelfs],
|
2011-05-25 17:51:18 +04:00
|
|
|
AS_HELP_STRING([--enable-vfs-undelfs], [Support for ext2 undelete filesystem @<:@no@:>@]),
|
2010-07-23 11:38:20 +04:00
|
|
|
[
|
|
|
|
if test "x$enableval" = "xno"; then
|
|
|
|
enable_vfs_undelfs=no
|
|
|
|
else
|
|
|
|
enable_vfs_undelfs=yes
|
|
|
|
fi
|
|
|
|
],
|
|
|
|
[enable_vfs_undelfs="no"])
|
2009-05-07 16:38:06 +04:00
|
|
|
|
2010-07-24 11:24:07 +04:00
|
|
|
if test x"$enable_vfs" = x"yes" -a x"$enable_vfs_undelfs" != x"no"; then
|
2016-01-04 21:43:19 +03:00
|
|
|
mc_UNDELFS_CHECKS
|
2009-05-07 16:38:06 +04:00
|
|
|
|
2010-07-10 20:03:38 +04:00
|
|
|
if test x"$ext2fs_undel" = x"yes"; then
|
2009-05-07 16:38:06 +04:00
|
|
|
enable_vfs_undelfs="yes"
|
2016-01-04 21:43:19 +03:00
|
|
|
mc_VFS_ADDNAME([undelfs])
|
2009-05-07 16:38:06 +04:00
|
|
|
AC_DEFINE(ENABLE_VFS_UNDELFS, [1], [Support for ext2 undelfs])
|
|
|
|
AC_MSG_NOTICE([using ext2fs file recovery code])
|
|
|
|
MCLIBS="$MCLIBS $EXT2FS_UNDEL_LIBS"
|
|
|
|
else
|
2019-01-08 10:34:42 +03:00
|
|
|
AC_MSG_ERROR([Ext2 libraries not found])
|
2009-05-07 16:38:06 +04:00
|
|
|
fi
|
|
|
|
fi
|
2010-07-24 11:24:07 +04:00
|
|
|
AM_CONDITIONAL(ENABLE_VFS_UNDELFS, [test "$enable_vfs" = "yes" -a x"$enable_vfs_undelfs" = x"yes"])
|
2009-05-07 16:38:06 +04:00
|
|
|
])
|