mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 10:04:32 +03:00
Fix compile mcserv helper
Changes logic in m4 files for more sense of configure options. Renamed --with-mcfs ro --enable-mcserver
This commit is contained in:
parent
abcd23406d
commit
f0182a6969
@ -545,7 +545,7 @@ AM_CONDITIONAL(USE_VFS, [test "x$use_vfs" = xyes])
|
|||||||
AM_CONDITIONAL(USE_VFS_NET, [test x"$use_net_code" = xtrue])
|
AM_CONDITIONAL(USE_VFS_NET, [test x"$use_net_code" = xtrue])
|
||||||
AM_CONDITIONAL(USE_UNDEL_FS, [test -n "$use_undelfs"])
|
AM_CONDITIONAL(USE_UNDEL_FS, [test -n "$use_undelfs"])
|
||||||
AM_CONDITIONAL(USE_SAMBA_FS, [test -n "$use_smbfs"])
|
AM_CONDITIONAL(USE_SAMBA_FS, [test -n "$use_smbfs"])
|
||||||
AM_CONDITIONAL(ENABLE_VFS_MCFS, [test -n "$use_mcfs"])
|
AM_CONDITIONAL(ENABLE_MCSERVER, [test x"$enable_mcserver" = "xyes"])
|
||||||
AM_CONDITIONAL(CHARSET, [test -n "$have_charset"])
|
AM_CONDITIONAL(CHARSET, [test -n "$have_charset"])
|
||||||
AM_CONDITIONAL(CONS_SAVER, [test -n "$cons_saver"])
|
AM_CONDITIONAL(CONS_SAVER, [test -n "$cons_saver"])
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
DIST_SUBDIRS = es hu it pl ru sr
|
DIST_SUBDIRS = es hu it pl ru sr
|
||||||
SUBDIRS = $(DOC_LINGUAS)
|
SUBDIRS = $(DOC_LINGUAS)
|
||||||
|
|
||||||
if ENABLE_VFS_MCFS
|
if ENABLE_MCSERVER
|
||||||
man_MANS = mc.1 mcedit.1 mcview.1 mcserv.8
|
man_MANS = mc.1 mcedit.1 mcview.1 mcserv.8
|
||||||
else
|
else
|
||||||
man_MANS = mc.1 mcedit.1 mcview.1
|
man_MANS = mc.1 mcedit.1 mcview.1
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
LANG=sr
|
LANG=sr
|
||||||
mandir = @mandir@/$(LANG)
|
mandir = @mandir@/$(LANG)
|
||||||
if ENABLE_VFS_MCFS
|
if ENABLE_MCSERVER
|
||||||
man_MANS = mc.1 mcserv.8
|
man_MANS = mc.1 mcserv.8
|
||||||
else
|
else
|
||||||
man_MANS = mc.1
|
man_MANS = mc.1
|
||||||
|
@ -6,49 +6,64 @@ dnl If PAM is found, other methods are not checked.
|
|||||||
|
|
||||||
AC_DEFUN([MC_MCSERVER_CHECKS], [
|
AC_DEFUN([MC_MCSERVER_CHECKS], [
|
||||||
|
|
||||||
dnl Check if PAM can be used for mcserv
|
dnl
|
||||||
AC_CHECK_LIB(dl, dlopen, [LIB_DL="-ldl"])
|
dnl mcfs support
|
||||||
AC_CHECK_LIB(pam, pam_start, [
|
dnl
|
||||||
AC_DEFINE(HAVE_PAM, 1,
|
AC_ARG_ENABLE([mcserver],
|
||||||
[Define if PAM (Pluggable Authentication Modules) is available])
|
[ --enable-mcserver Support mc-specific networking file system server [[no]]],
|
||||||
MCSERVLIBS="-lpam $LIB_DL"
|
[if test "x$enableval" != "xno"; then
|
||||||
mcserv_pam=yes], [], [$LIB_DL])
|
AC_DEFINE(ENABLE_MCSERVER, 1, [Define to enable mc-specific networking file system server])
|
||||||
|
AC_MC_VFS_ADDNAME([mcfs])
|
||||||
|
enable_mcserver=yes
|
||||||
|
fi]
|
||||||
|
)
|
||||||
|
|
||||||
dnl Check for crypt() - needed for both /etc/shadow and /etc/passwd.
|
if test x"$enable_mcserver" = "xyes"; then
|
||||||
if test -z "$mcserv_pam"; then
|
AC_MC_VFS_MCFS_SET
|
||||||
|
|
||||||
dnl Check for pwdauth() - used on SunOS.
|
dnl Check if PAM can be used for mcserv
|
||||||
AC_CHECK_FUNCS([pwdauth])
|
AC_CHECK_LIB(dl, dlopen, [LIB_DL="-ldl"])
|
||||||
|
AC_CHECK_LIB(pam, pam_start, [
|
||||||
|
AC_DEFINE(HAVE_PAM, 1,
|
||||||
|
[Define if PAM (Pluggable Authentication Modules) is available])
|
||||||
|
MCSERVLIBS="-lpam $LIB_DL"
|
||||||
|
mcserv_pam=yes], [], [$LIB_DL])
|
||||||
|
|
||||||
dnl Check for crypt()
|
dnl Check for crypt() - needed for both /etc/shadow and /etc/passwd.
|
||||||
AC_CHECK_HEADERS([crypt.h], [crypt_header=yes])
|
if test -z "$mcserv_pam"; then
|
||||||
if test -n "$crypt_header"; then
|
|
||||||
save_LIBS="$LIBS"
|
|
||||||
LIBS=
|
|
||||||
AC_SEARCH_LIBS(crypt, [crypt crypt_i], [mcserv_auth=crypt])
|
|
||||||
MCSERVLIBS="$LIBS"
|
|
||||||
LIBS="$save_LIBS"
|
|
||||||
if test -n "$mcserv_auth"; then
|
|
||||||
AC_DEFINE(HAVE_CRYPT, 1,
|
|
||||||
[Define to use crypt function in mcserv])
|
|
||||||
|
|
||||||
dnl Check for shadow passwords
|
dnl Check for pwdauth() - used on SunOS.
|
||||||
AC_CHECK_HEADERS([shadow.h shadow/shadow.h],
|
AC_CHECK_FUNCS([pwdauth])
|
||||||
[shadow_header=yes; break])
|
|
||||||
if test -n "$shadow_header"; then
|
dnl Check for crypt()
|
||||||
save_LIBS="$LIBS"
|
AC_CHECK_HEADERS([crypt.h], [crypt_header=yes])
|
||||||
LIBS="$MCSERVLIBS"
|
if test -n "$crypt_header"; then
|
||||||
AC_SEARCH_LIBS(getspnam, [shadow], [mcserv_auth=shadow])
|
save_LIBS="$LIBS"
|
||||||
MCSERVLIBS="$LIBS"
|
LIBS=
|
||||||
LIBS="$save_LIBS"
|
AC_SEARCH_LIBS(crypt, [crypt crypt_i], [mcserv_auth=crypt])
|
||||||
if test -n "$mcserv_auth"; then
|
MCSERVLIBS="$LIBS"
|
||||||
AC_DEFINE(HAVE_SHADOW, 1,
|
LIBS="$save_LIBS"
|
||||||
[Define to use shadow passwords for mcserv])
|
if test -n "$mcserv_auth"; then
|
||||||
fi
|
AC_DEFINE(HAVE_CRYPT, 1,
|
||||||
fi
|
[Define to use crypt function in mcserv])
|
||||||
fi
|
|
||||||
fi
|
dnl Check for shadow passwords
|
||||||
|
AC_CHECK_HEADERS([shadow.h shadow/shadow.h],
|
||||||
|
[shadow_header=yes; break])
|
||||||
|
if test -n "$shadow_header"; then
|
||||||
|
save_LIBS="$LIBS"
|
||||||
|
LIBS="$MCSERVLIBS"
|
||||||
|
AC_SEARCH_LIBS(getspnam, [shadow], [mcserv_auth=shadow])
|
||||||
|
MCSERVLIBS="$LIBS"
|
||||||
|
LIBS="$save_LIBS"
|
||||||
|
if test -n "$mcserv_auth"; then
|
||||||
|
AC_DEFINE(HAVE_SHADOW, 1,
|
||||||
|
[Define to use shadow passwords for mcserv])
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(MCSERVLIBS)
|
AC_SUBST(MCSERVLIBS)
|
||||||
])
|
])
|
||||||
|
@ -49,18 +49,8 @@ AC_DEFUN([MC_WITH_VFS],
|
|||||||
AC_CHECK_RPC
|
AC_CHECK_RPC
|
||||||
AC_REQUIRE_SOCKET
|
AC_REQUIRE_SOCKET
|
||||||
|
|
||||||
dnl
|
MC_MCSERVER_CHECKS
|
||||||
dnl mcfs support
|
|
||||||
dnl
|
|
||||||
AC_ARG_WITH(mcfs,
|
|
||||||
[ --with-mcfs Support mc-specific networking file system [[no]]],
|
|
||||||
[if test "x$withval" != "xno"; then
|
|
||||||
AC_DEFINE(ENABLE_VFS_MCFS, 1, [Define to enable mc-specific networking file system])
|
|
||||||
AC_MC_VFS_ADDNAME([mcfs])
|
|
||||||
use_mcfs=yes
|
|
||||||
MC_MCSERVER_CHECKS
|
|
||||||
fi]
|
|
||||||
)
|
|
||||||
use_net_code=true
|
use_net_code=true
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -1,14 +1,17 @@
|
|||||||
|
AC_DEFUN([AC_MC_VFS_MCFS_SET],
|
||||||
|
[
|
||||||
|
AC_REQUIRE_SOCKET
|
||||||
|
AC_CHECK_RPC
|
||||||
|
AC_DEFINE(ENABLE_VFS_MCFS, 1, [Define to enable mc-specific networking file system])
|
||||||
|
AC_MC_VFS_ADDNAME([mcfs])
|
||||||
|
use_net_code=true
|
||||||
|
])
|
||||||
|
|
||||||
AC_DEFUN([AC_MC_VFS_MCFS],
|
AC_DEFUN([AC_MC_VFS_MCFS],
|
||||||
[
|
[
|
||||||
AC_ARG_ENABLE([vfs-mcfs],
|
AC_ARG_ENABLE([vfs-mcfs],
|
||||||
[ --enable-vfs-mcfs Enable Support MCFS (mc's network filesystem)])
|
[ --enable-vfs-mcfs Enable Support MCFS (mc's network filesystem)])
|
||||||
if test "$enable_vfs_mcfs" = "yes" ; then
|
if test "$enable_vfs_mcfs" = "yes" ; then
|
||||||
AC_REQUIRE_SOCKET
|
AC_MC_VFS_MCFS_SET
|
||||||
AC_CHECK_RPC
|
|
||||||
AC_DEFINE(ENABLE_VFS_MCFS, 1, [Define to enable mc-specific networking file system])
|
|
||||||
AC_MC_VFS_ADDNAME([mcfs])
|
|
||||||
use_mcfs=yes
|
|
||||||
MC_MCSERVER_CHECKS
|
|
||||||
use_net_code=true
|
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
@ -87,13 +87,12 @@ else
|
|||||||
libvfs_mc_a_SOURCES = $(NONETFILES)
|
libvfs_mc_a_SOURCES = $(NONETFILES)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if ENABLE_VFS_MCFS
|
if ENABLE_MCSERVER
|
||||||
sbin_PROGRAMS = mcserv
|
sbin_PROGRAMS = mcserv
|
||||||
|
mcserv_SOURCES = mcserv.c mcfsutil.c
|
||||||
|
mcserv_LDADD = $(MCSERVLIBS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
mcserv_SOURCES = mcserv.c mcfsutil.c
|
|
||||||
|
|
||||||
mcserv_LDADD = $(MCSERVLIBS)
|
|
||||||
|
|
||||||
SAMBA_DIST = \
|
SAMBA_DIST = \
|
||||||
Makefile.in \
|
Makefile.in \
|
||||||
|
Loading…
Reference in New Issue
Block a user