diff options
Diffstat (limited to 'm4.include/vfs')
-rw-r--r-- | m4.include/vfs/mc-vfs-cpiofs.m4 | 12 | ||||
-rw-r--r-- | m4.include/vfs/mc-vfs-extfs.m4 | 34 | ||||
-rw-r--r-- | m4.include/vfs/mc-vfs-fish.m4 | 12 | ||||
-rw-r--r-- | m4.include/vfs/mc-vfs-ftp.m4 | 12 | ||||
-rw-r--r-- | m4.include/vfs/mc-vfs-sfs.m4 | 12 | ||||
-rw-r--r-- | m4.include/vfs/mc-vfs-sftp.m4 | 22 | ||||
-rw-r--r-- | m4.include/vfs/mc-vfs-tarfs.m4 | 12 | ||||
-rw-r--r-- | m4.include/vfs/mc-vfs-undelfs.m4 | 55 | ||||
-rw-r--r-- | m4.include/vfs/rpc.m4 | 17 | ||||
-rw-r--r-- | m4.include/vfs/socket.m4 | 13 |
10 files changed, 201 insertions, 0 deletions
diff --git a/m4.include/vfs/mc-vfs-cpiofs.m4 b/m4.include/vfs/mc-vfs-cpiofs.m4 new file mode 100644 index 0000000..d9c1e47 --- /dev/null +++ b/m4.include/vfs/mc-vfs-cpiofs.m4 @@ -0,0 +1,12 @@ +dnl CPIO filesystem support +AC_DEFUN([mc_VFS_CPIOFS], +[ + AC_ARG_ENABLE([vfs-cpio], + AS_HELP_STRING([--enable-vfs-cpio], [Support for cpio filesystem @<:@yes@:>@])) + if test "$enable_vfs" = "yes" -a x"$enable_vfs_cpio" != x"no"; then + enable_vfs_cpio="yes" + AC_DEFINE([ENABLE_VFS_CPIO], [1], [Support for cpio filesystem]) + mc_VFS_ADDNAME([cpio]) + fi + AM_CONDITIONAL(ENABLE_VFS_CPIO, [test "$enable_vfs" = "yes" -a x"$enable_vfs_cpio" = x"yes"]) +]) diff --git a/m4.include/vfs/mc-vfs-extfs.m4 b/m4.include/vfs/mc-vfs-extfs.m4 new file mode 100644 index 0000000..b57dbba --- /dev/null +++ b/m4.include/vfs/mc-vfs-extfs.m4 @@ -0,0 +1,34 @@ +dnl mc_EXTFS_CHECKS +dnl Check for tools used in extfs scripts. + +dnl FIXME: make this configurable +AC_DEFUN([mc_EXTFS_CHECKS], [ + AC_PATH_PROG([ZIP], [zip], [/usr/bin/zip]) + AC_PATH_PROG([UNZIP], [unzip], [/usr/bin/unzip]) + AC_CACHE_CHECK([for zipinfo code in unzip], [mc_cv_have_zipinfo], + [mc_cv_have_zipinfo=no + if $UNZIP -Z </dev/null >/dev/null 2>&1; then + mc_cv_have_zipinfo=yes + fi]) + if test x"$mc_cv_have_zipinfo" = xyes; then + HAVE_ZIPINFO=1 + else + HAVE_ZIPINFO=0 + fi + AC_SUBST([HAVE_ZIPINFO]) +]) + + +dnl Enable Extfs (classic) +AC_DEFUN([mc_VFS_EXTFS], +[ + AC_ARG_ENABLE([vfs-extfs], + AS_HELP_STRING([--enable-vfs-extfs], [Support for extfs filesystem @<:@yes@:>@])) + if test "$enable_vfs" = "yes" -a x"$enable_vfs_extfs" != x"no"; then + mc_EXTFS_CHECKS + enable_vfs_extfs="yes" + mc_VFS_ADDNAME([extfs]) + AC_DEFINE([ENABLE_VFS_EXTFS], [1], [Support for extfs]) + fi + AM_CONDITIONAL(ENABLE_VFS_EXTFS, [test "$enable_vfs" = "yes" -a x"$enable_vfs_extfs" = x"yes"]) +]) diff --git a/m4.include/vfs/mc-vfs-fish.m4 b/m4.include/vfs/mc-vfs-fish.m4 new file mode 100644 index 0000000..d3463ee --- /dev/null +++ b/m4.include/vfs/mc-vfs-fish.m4 @@ -0,0 +1,12 @@ +dnl Enable FISH protocol (classic) +AC_DEFUN([mc_VFS_FISH], +[ + AC_ARG_ENABLE([vfs-fish], + AS_HELP_STRING([--enable-vfs-fish], [Support for FISH filesystem @<:@yes@:>@])) + if test "$enable_vfs" = "yes" -a "x$enable_vfs_fish" != xno; then + enable_vfs_fish="yes" + mc_VFS_ADDNAME([fish]) + AC_DEFINE([ENABLE_VFS_FISH], [1], [Support for FISH vfs]) + fi + AM_CONDITIONAL(ENABLE_VFS_FISH, [test "$enable_vfs" = "yes" -a x"$enable_vfs_fish" = x"yes"]) +]) diff --git a/m4.include/vfs/mc-vfs-ftp.m4 b/m4.include/vfs/mc-vfs-ftp.m4 new file mode 100644 index 0000000..c87ef00 --- /dev/null +++ b/m4.include/vfs/mc-vfs-ftp.m4 @@ -0,0 +1,12 @@ +dnl Enable FTP filesystem (classic) +AC_DEFUN([mc_VFS_FTP], +[ + AC_ARG_ENABLE([vfs-ftp], + AS_HELP_STRING([--enable-vfs-ftp], [Support for FTP filesystem @<:@yes@:>@])) + if test "$enable_vfs" != "no" -a x"$enable_vfs_ftp" != x"no"; then + enable_vfs_ftp="yes" + mc_VFS_ADDNAME([ftp]) + AC_DEFINE([ENABLE_VFS_FTP], [1], [Support for FTP (classic)]) + fi + AM_CONDITIONAL([ENABLE_VFS_FTP], [test "$enable_vfs" = "yes" -a x"$enable_vfs_ftp" = x"yes"]) +]) diff --git a/m4.include/vfs/mc-vfs-sfs.m4 b/m4.include/vfs/mc-vfs-sfs.m4 new file mode 100644 index 0000000..ec4e6d2 --- /dev/null +++ b/m4.include/vfs/mc-vfs-sfs.m4 @@ -0,0 +1,12 @@ +dnl SFS support +AC_DEFUN([mc_VFS_SFS], +[ + AC_ARG_ENABLE([vfs-sfs], + AS_HELP_STRING([--enable-vfs-sfs], [Support for sfs filesystem @<:@yes@:>@])) + if test "$enable_vfs" = "yes" -a x"$enable_vfs_sfs" != x"no"; then + enable_vfs_sfs="yes" + mc_VFS_ADDNAME([sfs]) + AC_DEFINE([ENABLE_VFS_SFS], [1], [Support for sfs]) + fi + AM_CONDITIONAL(ENABLE_VFS_SFS, [test "$enable_vfs" = "yes" -a x"$enable_vfs_sfs" = x"yes"]) +]) diff --git a/m4.include/vfs/mc-vfs-sftp.m4 b/m4.include/vfs/mc-vfs-sftp.m4 new file mode 100644 index 0000000..581b144 --- /dev/null +++ b/m4.include/vfs/mc-vfs-sftp.m4 @@ -0,0 +1,22 @@ +dnl Enable SFTP filesystem +AC_DEFUN([mc_VFS_SFTP], +[ + AC_ARG_ENABLE([vfs-sftp], + AS_HELP_STRING([--enable-vfs-sftp], [Support for SFTP filesystem [auto]])) + if test "$enable_vfs" != "no" -a x"$enable_vfs_sftp" != x"no"; then + PKG_CHECK_MODULES(LIBSSH, [libssh2 >= 1.2.8], [found_libssh=yes], [:]) + if test x"$found_libssh" = "xyes"; then + mc_VFS_ADDNAME([sftp]) + AC_DEFINE([ENABLE_VFS_SFTP], [1], [Support for SFTP filesystem]) + MCLIBS="$MCLIBS $LIBSSH_LIBS" + enable_vfs_sftp="yes" + else + if test x"$enable_vfs_sftp" = x"yes"; then + dnl user explicitly requested feature + AC_MSG_ERROR([libssh2 >= 1.2.8 library not found]) + fi + enable_vfs_sftp="no" + fi + fi + AM_CONDITIONAL([ENABLE_VFS_SFTP], [test "$enable_vfs" = "yes" -a x"$enable_vfs_sftp" = x"yes"]) +]) diff --git a/m4.include/vfs/mc-vfs-tarfs.m4 b/m4.include/vfs/mc-vfs-tarfs.m4 new file mode 100644 index 0000000..5feb215 --- /dev/null +++ b/m4.include/vfs/mc-vfs-tarfs.m4 @@ -0,0 +1,12 @@ +dnl TAR filesystem support +AC_DEFUN([mc_VFS_TARFS], +[ + AC_ARG_ENABLE([vfs-tar], + AS_HELP_STRING([--enable-vfs-tar], [Support for tar filesystem @<:@yes@:>@])) + if test "$enable_vfs" = "yes" -a x"$enable_vfs_tar" != x"no"; then + enable_vfs_tar="yes" + mc_VFS_ADDNAME([tar]) + AC_DEFINE([ENABLE_VFS_TAR], [1], [Support for tar filesystem]) + fi + AM_CONDITIONAL(ENABLE_VFS_TAR, [test "$enable_vfs" = "yes" -a x"$enable_vfs_tar" = x"yes"]) +]) diff --git a/m4.include/vfs/mc-vfs-undelfs.m4 b/m4.include/vfs/mc-vfs-undelfs.m4 new file mode 100644 index 0000000..ab6fd3f --- /dev/null +++ b/m4.include/vfs/mc-vfs-undelfs.m4 @@ -0,0 +1,55 @@ +dnl mc_UNDELFS_CHECKS +dnl Check for ext2fs undel support. +dnl Set shell variable ext2fs_undel to "yes" if we have it, +dnl "no" otherwise. May define ENABLE_VFS_UNDELFS for cpp. +dnl Will set EXT2FS_UNDEL_LIBS to required libraries. + +AC_DEFUN([mc_UNDELFS_CHECKS], [ + 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 + fi + +]) + +dnl +dnl Ext2fs undelete support +dnl +AC_DEFUN([mc_VFS_UNDELFS], +[ + AC_ARG_ENABLE([vfs-undelfs], + AS_HELP_STRING([--enable-vfs-undelfs], [Support for ext2 undelete filesystem @<:@no@:>@]), + [ + if test "x$enableval" = "xno"; then + enable_vfs_undelfs=no + else + enable_vfs_undelfs=yes + fi + ], + [enable_vfs_undelfs="no"]) + + if test x"$enable_vfs" = x"yes" -a x"$enable_vfs_undelfs" != x"no"; then + mc_UNDELFS_CHECKS + + if test x"$ext2fs_undel" = x"yes"; then + enable_vfs_undelfs="yes" + mc_VFS_ADDNAME([undelfs]) + AC_DEFINE(ENABLE_VFS_UNDELFS, [1], [Support for ext2 undelfs]) + AC_MSG_NOTICE([using ext2fs file recovery code]) + MCLIBS="$MCLIBS $EXT2FS_UNDEL_LIBS" + else + AC_MSG_ERROR([Ext2 libraries not found]) + fi + fi + AM_CONDITIONAL(ENABLE_VFS_UNDELFS, [test "$enable_vfs" = "yes" -a x"$enable_vfs_undelfs" = x"yes"]) +]) diff --git a/m4.include/vfs/rpc.m4 b/m4.include/vfs/rpc.m4 new file mode 100644 index 0000000..43490d9 --- /dev/null +++ b/m4.include/vfs/rpc.m4 @@ -0,0 +1,17 @@ +AC_DEFUN([AC_CHECK_RPC], +[ + AC_CHECK_FUNCS(pmap_set, , [ + AC_CHECK_LIB(rpc, pmap_set, [ + LIBS="-lrpc $LIBS" + AC_DEFINE(HAVE_PMAP_SET) + ])]) + AC_CHECK_FUNCS(pmap_getport pmap_getmaps rresvport) + dnl add for source routing support setsockopt + AC_CHECK_HEADERS(rpc/pmap_clnt.h, , , [ +#include <sys/types.h> +#include <sys/socket.h> +#include <netinet/in.h> +#include <rpc/rpc.h> +#include <rpc/pmap_prot.h> + ]) +]) diff --git a/m4.include/vfs/socket.m4 b/m4.include/vfs/socket.m4 new file mode 100644 index 0000000..3cbfe05 --- /dev/null +++ b/m4.include/vfs/socket.m4 @@ -0,0 +1,13 @@ +AC_DEFUN([AC_REQUIRE_SOCKET], +[ + AC_SEARCH_LIBS(socket, [xnet bsd socket inet], [have_socket=yes]) + if test x"$have_socket" = x"yes"; then + AC_SEARCH_LIBS(gethostbyname, [bsd socket inet netinet nsl]) + AC_CHECK_MEMBERS([struct linger.l_linger], , , [ +#include <sys/types.h> +#include <sys/socket.h> + ]) + else + AC_MSG_ERROR([Couldnt find socket functions]) + fi +]) |