(regex_command_for): move load of extension file to separate function.
[midnight-commander.git] / m4.include / mc-ext2fs-attr.m4
blob6a57cd5ef6c572b109ee39aed66e768d506d5802
1 dnl
2 dnl Support for attributes on a Linux second extended file system
3 dnl
4 AC_DEFUN([mc_EXT2FS_ATTR],
6     ext2fs_attr_msg="no"
8     PKG_CHECK_MODULES(EXT2FS, [ext2fs >= 1.42.4], [found_ext2fs=yes], [:])
10     if test x"$found_ext2fs" = "xyes"; then
11         PKG_CHECK_MODULES(E2P, [e2p >= 1.42.4], [found_e2p=yes], [:])
13         if test x"$found_e2p" = "xyes"; then
14             AC_DEFINE(ENABLE_EXT2FS_ATTR, 1, [Define to enable support for ext2fs attributes])
15             AC_SUBST(EXT2FS_CFLAGS)
16             AC_SUBST(E2P_CFLAGS)
17             MCLIBS="$MCLIBS $E2P_LIBS"
18             ext2fs_attr_msg="yes"
19         else
20             AC_MSG_WARN([e2p library not found or version too old (must be >= 1.42.4)])
21             ext2fs_attr_msg="no"
22         fi
23     else
24         AC_MSG_WARN([ext2fs library not found or version too old (must be >= 1.42.4)])
25         ext2fs_attr_msg="no"
26     fi
28     AM_CONDITIONAL(ENABLE_EXT2FS_ATTR, [test "x$ext2fs_attr_msg" = "xyes"])