configure.in 1.15 KB
dnl Process this file with autoconf to procude a configure script. -*-m4-*-
AC_INIT(libmailbox/mailbox.c)
AM_INIT_AUTOMAKE(mailutils, 0.9.7.1999.09.12)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE

dnl Check for programs
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AM_PROG_LIBTOOL

dnl Check for arguments
AC_ARG_ENABLE(-mailbox-install,
[  --enable-mailbox-install	install libmailbox])

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)
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
else
	AC_CHECK_FUNCS(crypt)
	if test x"$ac_cv_func_crypt" = x"no"; then
		AC_CHECK_LIB(crypt, crypt, AUTHLIBS="-lcrypt",, -lcrypt)
	fi
fi

dnl Output Makefiles
AC_OUTPUT(Makefile libmailbox/Makefile mail/Makefile pop3d/Makefile
	libsrc/Makefile)