Ticket #4556: color definitions in the "c.syntax" highlight file.
[midnight-commander.git] / m4.include / vfs / mc-vfs-undelfs.m4
blobab6fd3ff8ff48a75e32645572c6459daead32d99
1 dnl mc_UNDELFS_CHECKS
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], [
8     ext2fs_undel=no
9     EXT2FS_UNDEL_LIBS=
11     dnl Use result of mc_EXT2FS_ATTR that was called earlier
12     if test "x$ext2fs_attr_msg" = "xyes"; then
13         com_err=no
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"
19             ext2fs_undel=yes
20         fi
21     fi
25 dnl
26 dnl Ext2fs undelete support
27 dnl
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@:>@]),
32         [
33             if test "x$enableval" = "xno"; then
34                 enable_vfs_undelfs=no
35             else
36                 enable_vfs_undelfs=yes
37             fi
38         ],
39         [enable_vfs_undelfs="no"])
41     if test x"$enable_vfs" = x"yes" -a x"$enable_vfs_undelfs" != x"no"; then
42         mc_UNDELFS_CHECKS
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"
50         else
51             AC_MSG_ERROR([Ext2 libraries not found])
52         fi
53     fi
54     AM_CONDITIONAL(ENABLE_VFS_UNDELFS, [test "$enable_vfs" = "yes" -a x"$enable_vfs_undelfs" = x"yes"])