From ac96da0a1d558a21943fbadc7eb75f75ec3d0393 Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Sat, 16 Nov 2002 22:56:50 +0000 Subject: [PATCH] * configure.in: Move all mcserv related checks ... * acinclude.m4 (MC_MCSERVER_CHECKS): ... here. --- ChangeLog | 5 +++++ acinclude.m4 | 30 ++++++++++++++++++++++++++++++ configure.in | 42 ++++++------------------------------------ 3 files changed, 41 insertions(+), 36 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8b8745f0d..53d6ee70a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-11-16 Pavel Roskin + + * configure.in: Move all mcserv related checks ... + * acinclude.m4 (MC_MCSERVER_CHECKS): ... here. + 2002-11-15 Pavel Roskin * configure.in: Fully enable glib2. Update the documentation. diff --git a/acinclude.m4 b/acinclude.m4 index 86146b12b..1d26f24d4 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -35,6 +35,35 @@ AC_DEFUN([MC_UNDELFS_CHECKS], [ +dnl MC_MCSERVER_CHECKS +dnl Check how mcserver should check passwords. +dnl Possible methods are PAM and libcrypt. + +AC_DEFUN([MC_MCSERVER_CHECKS], [ + dnl Check if PAM can be used for mcserv + PAMLIBS="" + case $host_os in + linux*) + AC_CHECK_LIB(pam, pam_start, [ + AC_DEFINE(HAVE_PAM, 1, + [Define if PAM (Pluggable Authentication Modules) is available]) + PAMLIBS="-lpam -ldl" + ],[],[-ldl]) + ;; + esac + AC_SUBST(PAMLIBS) + + AC_CHECK_HEADERS([crypt.h]) + + LCRYPT="" + AC_CHECK_FUNCS(crypt, , [ + AC_CHECK_LIB(crypt, crypt, [LCRYPT="-lcrypt"], [ + AC_CHECK_LIB(crypt_i, crypt, [LCRYPT="-lcrypt_i"])])]) + AC_SUBST(LCRYPT) +]) + + + dnl MC_VFS_CHECKS dnl Check for various functions needed by libvfs. dnl This has various effects: @@ -100,6 +129,7 @@ AC_DEFUN([MC_WITH_VFS],[ AC_DEFINE(WITH_MCFS, 1, [Define to enable mc-specific networking file system]) vfs_flags="$vfs_flags, mcfs" use_mcfs=yes + MC_MCSERVER_CHECKS fi] ) vfs_flags="$vfs_flags, ftpfs, fish" diff --git a/configure.in b/configure.in index be263313c..626d6619b 100644 --- a/configure.in +++ b/configure.in @@ -113,10 +113,9 @@ sco*) esac AC_PROG_INSTALL -AC_CHECK_HEADERS([unistd.h string.h memory.h crypt.h grp.h limits.h \ - malloc.h stdlib.h termios.h utime.h fcntl.h pwd.h sys/statfs.h \ - sys/time.h sys/timeb.h sys/select.h sys/ioctl.h stropts.h \ - arpa/inet.h]) +AC_CHECK_HEADERS([unistd.h string.h memory.h grp.h limits.h malloc.h \ + stdlib.h termios.h utime.h fcntl.h pwd.h sys/statfs.h sys/time.h \ + sys/timeb.h sys/select.h sys/ioctl.h stropts.h arpa/inet.h]) AC_HEADER_TIME AC_HEADER_SYS_WAIT @@ -142,18 +141,6 @@ dnl dnl getpt is a GNU Extension (glibc 2.1.x) dnl AC_CHECK_FUNCS(getpt) - - -dnl -dnl On SCO and some SVR4, crypt is on libcrypt.a -dnl grantpt in libpt.a -dnl -LCRYPT="" -AC_CHECK_FUNCS(crypt, , [ - AC_CHECK_LIB(crypt, crypt, [LCRYPT="-lcrypt"], [ - AC_CHECK_LIB(crypt_i, crypt, [LCRYPT="-lcrypt_i"])])]) -AC_SUBST(LCRYPT) - AC_CHECK_FUNCS(grantpt, , [AC_CHECK_LIB(pt, grantpt)]) dnl replacing lstat with statlstat on sco makes it more portable between @@ -494,29 +481,13 @@ if test $use_vfs = yes; then fi -dnl -dnl The variables used for expanding the auto saver. -dnl +dnl Check if the OS is supported by the console saver. cons_saver="" -install_saver="no" -PAMLIBS="" case $host_os in linux*) - cons_saver="cons.saver" - install_saver="yes" - - dnl - dnl On Linux, check for PAM authentication available - dnl - AC_CHECK_LIB(pam, pam_start, [ - AC_DEFINE(HAVE_PAM, 1, - [Define if PAM (Pluggable Authentication Modules) is available]) - PAMLIBS="-lpam -ldl" - ],[],[-ldl]) - ;; + cons_saver=yes esac -AC_SUBST(cons_saver) -AC_SUBST(PAMLIBS) + dnl dnl User visible support for charset conversion. @@ -616,7 +587,6 @@ Configuration: File system: ${vfs_type} ${vfs_flags} Screen library: ${screen_msg} - Install console saver: ${install_saver} Mouse support: ${mouse_lib} X11 events support: ${textmode_x11_support} With subshell support: ${subshell}