diff --git a/lib/vfs/mc-vfs/mcfsutil.c b/lib/vfs/mc-vfs/mcfsutil.c index 3d976d6c9..28fd4f341 100644 --- a/lib/vfs/mc-vfs/mcfsutil.c +++ b/lib/vfs/mc-vfs/mcfsutil.c @@ -25,7 +25,7 @@ #include -#ifdef ENABLE_VFS_MCFS +#if defined(ENABLE_VFS_MCFS) || defined(ENABLE_MCSERVER) #include #include #include @@ -210,4 +210,4 @@ rpc_get (int sock, ...) } } } -#endif /* ENABLE_VFS_MCFS */ +#endif /* ENABLE_VFS_MCFS || ENABLE_MCSERVER */ diff --git a/m4.include/mc-mcserver.m4 b/m4.include/mc-mcserver.m4 index ff59982e8..6fd02bc3d 100644 --- a/m4.include/mc-mcserver.m4 +++ b/m4.include/mc-mcserver.m4 @@ -7,19 +7,18 @@ dnl If PAM is found, other methods are not checked. AC_DEFUN([MC_MCSERVER_CHECKS], [ dnl - dnl mcfs support + dnl mcfs server support dnl AC_ARG_ENABLE([mcserver], [ --enable-mcserver Support mc-specific networking file system server [[no]]], - [if test "x$enableval" != "xno"; then - AC_DEFINE(ENABLE_MCSERVER, 1, [Define to enable mc-specific networking file system server]) - AC_MC_VFS_ADDNAME([mcfs]) - enable_mcserver=yes - fi] + [enable_mcserver="$enableval"] ) if test x"$enable_mcserver" = "xyes"; then - AC_MC_VFS_MCFS_SET + AC_DEFINE(ENABLE_MCSERVER, 1, [Define to enable mc-specific networking file system server]) + AC_REQUIRE_SOCKET + AC_CHECK_RPC + use_net_code=true dnl Check if PAM can be used for mcserv AC_CHECK_LIB(dl, dlopen, [LIB_DL="-ldl"]) @@ -65,5 +64,6 @@ AC_DEFUN([MC_MCSERVER_CHECKS], [ fi fi fi + AM_CONDITIONAL(ENABLE_MCSERVER, [test x"$enable_mcserver" = "xyes"]) AC_SUBST(MCSERVLIBS) ]) diff --git a/m4.include/mc-vfs.m4 b/m4.include/mc-vfs.m4 index 5db42cddf..d8f4e8577 100644 --- a/m4.include/mc-vfs.m4 +++ b/m4.include/mc-vfs.m4 @@ -49,13 +49,10 @@ AC_DEFUN([MC_WITH_VFS], AC_CHECK_RPC AC_REQUIRE_SOCKET - MC_MCSERVER_CHECKS - use_net_code=true fi fi - AC_DEFINE(ENABLE_VFS, 1, [Define to enable VFS support]) if $use_net_code; then AC_DEFINE(USE_NETCODE, 1, [Define to use networked VFS]) @@ -94,5 +91,7 @@ AC_DEFUN([AC_MC_VFS_CHECKS],[ AM_CONDITIONAL(ENABLE_VFS_UNDELFS, [false]) fi + MC_MCSERVER_CHECKS + AM_CONDITIONAL(ENABLE_VFS, [test x"$enable_vfs" = x"yes"]) ])