Commit e7364f67 e7364f67367283cbb13cace75e8d02710acc0289 by Jeff Bailey

Fix pam stuff

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