Commit e7364f67 e7364f67367283cbb13cace75e8d02710acc0289 by Jeff Bailey

Fix pam stuff

1 parent 953d5e9e
1999-10-08 Jeff Bailey <jbailey@cr499794-a.crdva1.bc.wave.home.com>
* doc/: New directory
* pop3d/Makefile.am: Remove pam detection, now handled by configure
in the @AUTHLIBS@ spot.
* configure.in: Detect pam correctly/handle crypt case correctly
Add option: --disable-pam
* acconfig.h: New File
Sean 'Shaleh' Perry <shaleh@debian.org> Fri, 8 Oct 1999 18:13:45 -0700
* added showmail.c to examples
......
......@@ -3,7 +3,7 @@
= --> on hold
* --> in progress
- autogen.sh (libtool) complains about libmailbox.la in noinst
* autogen.sh (libtool) complains about libmailbox.la in noinst (JB Oct 08/99)
+ libmailbox has a nasty bug -- if the mailbox is empty, the library has no idea
what to do
......@@ -12,7 +12,7 @@
- libmailbox needs an interface to set and create values in the header
- crypt is linked even if pam was detected, it should be one or the other
+ crypt is linked even if pam was detected, it should be one or the other (JB Oct 08/99)
- test daemon code
......
/* GNU mailutils - a suite of utilities for electronic mail
Copyright (C) 1999 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Define if using libpam */
#undef USE_LIBPAM
......@@ -10,28 +10,42 @@ AC_PROG_LN_S
AM_PROG_LIBTOOL
dnl Check for arguments
AC_ARG_ENABLE(-mailbox-install,
AC_ARG_ENABLE(mailbox-install,
[ --enable-mailbox-install install libmailbox])
AC_ARG_ENABLE(pam,
[ --disable-pam disable pam],
[case "${enableval}" in
yes) testpam=yes ;;
no) testpam=no ;;
*) AC_MSG_ERROR(bad value ${enableval} for --disable-pam) ;;
esac],[testpam=yes])
AM_CONDITIONAL(INSTALL_MAILBOX, test x"${enable_mailbox_install-no}" != xno)
dnl Check for headers
AC_HEADER_STDC
AC_CHECK_HEADERS(malloc.h stdlib.h stdio.h errno.h unistd.h\
paths.h sys/file.h syslog.h shadow.h security/pam_appl.h)
paths.h sys/file.h syslog.h shadow.h)
AC_CHECK_HEADERS(string.h strings.h, break)
dnl Check for libraries
if test x"$ac_cv_header_security_pam_appl_h" = x"yes"; then
AC_CHECK_LIB(pam, pam_start, AUTHLIBS="-lpam -ldl",, -ldl)
AM_CONDITIONAL(USE_LIBPAM, test x"$ac_cv_have_libpam" != xno)
##fi
##if test x"$ac_cv_have_libpam" != x"yes"; then
dnl Use either PAM or CRYPT, not both.
if test x"$testpam" = x"yes"; then
AC_CHECK_HEADERS(security/pam_appl.h)
if test x"$ac_cv_header_security_pam_appl_h" = x"yes"; then
AC_CHECK_LIB(pam, pam_start, AUTHLIBS="-lpam -ldl" ac_cv_have_libpam="yes",, -ldl)
AC_DEFINE(USE_LIBPAM)
AM_CONDITIONAL(USE_LIBPAM, test x"$ac_cv_have_libpam" != xno)
fi
fi
AC_CHECK_FUNCS(crypt)
if test x"$ac_cv_func_crypt" = x"no"; then
AC_CHECK_LIB(crypt, crypt, AUTHLIBS="-lcrypt",, -lcrypt)
if test x"$ac_cv_have_libpam" != x"yes"; then
AC_CHECK_FUNCS(crypt)
if test x"$ac_cv_func_crypt" = x"no"; then
AC_CHECK_LIB(crypt, crypt, AUTHLIBS="-lcrypt",, -lcrypt)
fi
fi
AC_SUBST(AUTHLIBS)
......@@ -40,10 +54,3 @@ dnl Output Makefiles
AC_OUTPUT(Makefile libmailbox/Makefile mail/Makefile pop3d/Makefile
libsrc/Makefile)
......
......@@ -7,9 +7,4 @@ pop3d_DEPENDENDENCIES = ../libmailbox/libmailbox.la ../libsrc/libgetopt.la\
pop3d_SOURCES = apop.c auth.c capa.c dele.c extra.c pop3d.c pop3d.h\
list.c noop.c quit.c retr.c rset.c stat.c top.c uidl.c user.c signal.c
#if USE_LIBPAM
#pop3d_LDADD = ../libmailbox/libmailbox.la -lpam -ldl
#else
#pop3d_LDADD = ../libmailbox/libmailbox.la
#endif
pop3d_LDADD = ../libmailbox/libmailbox.la ../libsrc/libmailutils.a @AUTHLIBS@
......