Page MenuHomePhorge

configure.in
No OneTemporary

Authored By
Unknown
Size
11 KB
Referenced Files
None
Subscribers
None

configure.in

dnl Process this file with autoconf to produce a configure script.
AC_INIT(imap/imapd.c)
AC_CHECK_PROG(HAVE_MAKEDEPEND,makedepend,yes)
if test "$HAVE_MAKEDEPEND" != "yes"; then
AC_MSG_ERROR(Makedepend is not installed on this system. First compile and install the version in the makedepend subdirectory.)
fi
AC_ARG_WITH(cyrus-prefix,[ --with-cyrus-prefix=DIR use DIR as cyrus install directory],
cyrus_prefix="$withval",cyrus_prefix="/usr/cyrus")
AC_SUBST(cyrus_prefix)
AC_ARG_WITH(cyrus-user,[ --with-cyrus-user=USERID use USERID cyrus userid],
cyrus_user="$withval",cyrus_user="cyrus")
AC_SUBST(cyrus_user)
AC_ARG_WITH(news-group,[ --with-news-group=GROUPID use GROUPID as news group id],
news_group="$withval",news_group="news")
AC_SUBST(news_group)
AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_AIX
AC_ISC_POSIX
AC_PROG_AWK
AC_C_CONST
AC_SYS_LONG_FILE_NAMES
if test $ac_cv_sys_long_file_names = no; then
AC_MSG_ERROR(The Cyrus IMAPD requires support for long file names)
fi
AC_CHECK_HEADERS(unistd.h)
AC_REPLACE_FUNCS(memmove strcasecmp ftruncate getdtablesize)
AC_HEADER_DIRENT
AC_SUBST(CPPFLAGS)
AC_SUBST(PRE_SUBDIRS)
AC_SUBST(EXTRA_SUBDIRS)
AC_SUBST(DEPLIBS)
AC_FUNC_VPRINTF
dnl for et routines
AC_FUNC_CHECK(strerror,AC_DEFINE(HAS_STRERROR),AC_DEFINE(NEED_SYS_ERRLIST))
dnl Bunch of setproctitle stuff
spt_type=""
AC_CHECK_FUNC(setproctitle,spt_type=SPT_BUILTIN)
if test "$spt_type" = ""; then
AC_CHECK_HEADER(sys/pstat.h,spt_type=SPT_PSTAT)
fi
if test "$spt_type" = ""; then
AC_CHECK_HEADER(sys/sysnews.h,spt_type=SPT_SYSMIPS)
fi
if test "$spt_type" = ""; then
AC_MSG_CHECKING(for PS_STRINGS)
AC_CACHE_VAL(cyrus_cv_sys_psstrings, AC_TRY_CPP([
#include <machine/vmparam.h>
#include <sys/exec.h>
#ifndef PS_STRINGS
#include </nonexistent>
#endif],cyrus_cv_sys_psstrings=yes,cyrus_cv_sys_psstrings=no))
if test $cyrus_cv_sys_psstrings = yes; then
spt_type=SPT_PSSTRINGS
fi
AC_MSG_RESULT($cyrus_cv_sys_psstrings)
fi
if test "$spt_type" = ""; then
AC_MSG_CHECKING(for SCO)
AC_CACHE_VAL(cyrus_cv_sys_sco, AC_TRY_CPP([
#ifndef _SCO_unix_
#include </nonexistent>
#endif],cyrus_cv_sys_sco=yes,cyrus_cv_sys_sco=no))
if test $cyrus_cv_sys_sco = yes; then
spt_type=SPT_SCO
fi
AC_MSG_RESULT($cyrus_cv_sys_sco)
fi
if test "$spt_type" = ""; then
AC_MSG_CHECKING(for setproctitle usability)
AC_CACHE_VAL(cyrus_cv_sys_setproctitle, AC_TRY_CPP([
#if defined(DGUX) || defined(_SEQUENT_) || defined(apollo)
#include </nonexistent>
#endif],cyrus_cv_sys_setproctitle=yes,cyrus_cv_sys_setproctitle=no))
if test $cyrus_cv_sys_setproctitle = no; then
spt_type=SPT_NONE
fi
AC_MSG_RESULT($cyrus_cv_sys_setproctitle)
fi
if test "$spt_type" != ""; then
AC_DEFINE_UNQUOTED(SPT_TYPE,$spt_type)
fi
AC_MSG_CHECKING(nonblocking method)
AC_CACHE_VAL(cyrus_cv_sys_nonblock,AC_TRY_LINK([#include <sys/types.h>
#include <sys/file.h>
#include <fcntl.h>
#ifndef FNDELAY
#define FNDELAY O_NDELAY
#endif],[fcntl(0, F_GETFL, 0)&FNDELAY],
cyrus_cv_sys_nonblock=fcntl,cyrus_cv_sys_nonblock=ioctl))
WITH_NONBLOCK=$cyrus_cv_sys_nonblock
AC_SUBST(WITH_NONBLOCK)
AC_MSG_RESULT($WITH_NONBLOCK)
AC_MSG_CHECKING(timezone GMT offset method)
AC_CACHE_VAL(cyrus_cv_struct_sys_gmtoff,AC_TRY_COMPILE([
#include <time.h>],[struct tm tm;
tm.tm_gmtoff = 0;
],cyrus_cv_struct_sys_gmtoff=tm,cyrus_cv_struct_sys_gmtoff=gmtime))
WITH_GMTOFF=$cyrus_cv_struct_sys_gmtoff
AC_SUBST(WITH_GMTOFF)
AC_MSG_RESULT($WITH_GMTOFF)
AC_MSG_CHECKING(for shared mmap)
AC_CACHE_VAL(cyrus_cv_func_mmap_shared,AC_TRY_RUN([
#include <sys/types.h>
#include <sys/mman.h>
#include <fcntl.h>
main() {
char *base;
int fd = open("conftestmmap", O_RDWR|O_CREAT|O_TRUNC, 0666);
if (fd == -1) exit(1);
if (write(fd, "test", 4) != 4) exit(1);
fsync(fd);
base = mmap((caddr_t)0, 100, PROT_READ, MAP_SHARED
#ifdef MAP_FILE
| MAP_FILE
#endif
#ifdef MAP_VARIABLE
| MAP_VARIABLE
#endif
, fd, 0L);
if (base == (caddr_t)-1) exit(1);
if (strncmp(base, "test", 4) != 0) exit(1);
if (write(fd, "test", 4) != 4) exit(1);
fsync(fd);
if (strncmp(base+4, "test", 4) != 0) exit(1);
exit(0);}
],cyrus_cv_func_mmap_shared=yes,cyrus_cv_func_mmap_shared=no,
cyrus_cv_func_mmap_shared=no))
AC_MSG_RESULT($cyrus_cv_func_mmap_shared)
if test $cyrus_cv_func_mmap_shared = yes; then
WITH_MAP="shared"
else
AC_MSG_CHECKING(for non-shared mmap)
AC_CACHE_VAL(cyrus_cv_func_mmap_private,AC_TRY_RUN([
#include <sys/types.h>
#include <sys/mman.h>
#include <fcntl.h>
main() {int fd = open("conftestmmap", O_RDWR|O_CREAT, 0666);
if (fd == -1) exit(1);
if (mmap((caddr_t)0, 100, PROT_READ, MAP_PRIVATE
#ifdef MAP_FILE
| MAP_FILE
#endif
#ifdef MAP_VARIABLE
| MAP_VARIABLE
#endif
, fd, 0L) == (caddr_t)-1)
exit(1);exit(0);}
],cyrus_cv_func_mmap_private=yes,cyrus_cv_func_mmap_private=no,
cyrus_cv_func_mmap_private=no))
AC_MSG_RESULT($cyrus_cv_func_mmap_private)
if test $cyrus_cv_func_mmap_private = yes; then
AC_MSG_WARN(*** mmap() does not adequately support shared memory)
AC_MSG_WARN(*** Expect a performance penalty)
WITH_MAP=private
else
AC_MSG_WARN(*** This system does not have a working mmap())
AC_MSG_WARN(*** Expect a considerable performance penalty)
WITH_MAP=nommap
fi
fi
AC_SUBST(WITH_MAP)
AC_ARG_WITH(lock,[ --with-lock=METHOD force use of METHOD for locking
METHOD is flock or fcntl],WITH_LOCK="$withval",
AC_CHECK_FUNC(flock,WITH_LOCK="flock",WITH_LOCK="fcntl"))
AC_SUBST(WITH_LOCK)
AC_MSG_CHECKING(for Kerberos)
AC_CACHE_VAL(cyrus_cv_lib_kerberos, if test -f /etc/krb.conf; then
cyrus_cv_lib_kerberos=yes
else
cyrus_cv_lib_kerberos=no
fi)
AC_MSG_RESULT($cyrus_cv_lib_kerberos)
AC_ARG_WITH(login,[ --with-login=METHOD use login module METHOD
METHOD is unix, unix_shadow, or krb],
WITH_LOGIN="$withval",
if test $cyrus_cv_lib_kerberos = yes; then
echo using Kerberos authentication
WITH_LOGIN=krb
else
echo using unix /etc/passwd authentication
WITH_LOGIN=unix
fi)
AC_SUBST(WITH_LOGIN)
if test "$WITH_LOGIN" = unix_pwcheck; then
EXTRA_SUBDIRS="${EXTRA_SUBDIRS} pwcheck"
fi
AC_ARG_WITH(auth,[ --with-auth=METHOD use authorization module METHOD
METHOD is unix or krb],[WITH_AUTH="$withval"
with_login_base=`echo ${WITH_LOGIN}|sed 's/_.*//'`
case "$withval" in
${with_login_base}) true;;
${with_login_base}_*) true;;
*) AC_MSG_ERROR(Authorization module incompatibile with login module);;
esac],
if test -f ${srcdir}/lib/auth_${WITH_LOGIN}.c; then
WITH_AUTH="$WITH_LOGIN"
else
WITH_AUTH=`echo $WITH_LOGIN | sed 's/_.*$//'`
fi)
AC_SUBST(WITH_AUTH)
if test "$WITH_AUTH" = krb_pts; then
EXTRA_SUBDIRS="${EXTRA_SUBDIRS} ptclient"
AC_DEFINE_UNQUOTED(CYRUS_PATH,"$cyrus_prefix")
fi
TCL_SUBDIRS="cyradm"
AC_ARG_ENABLE(cyradm,
[ --disable-cyradm disable compling cyradm],
if test "$enableval" = no; then
TCL_SUBDIRS=""
fi)
AC_SUBST(TCL_SUBDIRS)
dnl
dnl XXX MUST CHECK FOR TCL BEFORE KERBEROS V4 XXX
dnl This is because some genius at MIT named one of the Kerberos v4
dnl library functions log(). This of course conflicts with the
dnl logarithm function in the standard math library, used by Tcl.
dnl
dnl Checking for Tcl first puts -lm before -lkrb on the library list.
dnl
AC_ARG_WITH(tcl,[ --with-tcl=PATH use Tcl from PATH],
with_tcl="${withval}")
if test -z "$with_tcl"; then
if test -f /usr/local/lib/libtcl.a; then
with_tcl="/usr/local"
fi
fi
case "$with_tcl" in
no) if test "$TCL_SUBDIRS" != ""; then
AC_MSG_ERROR(Could not find Tcl libraries. You must either install Tcl or configure with --disable-cyradm)
fi;;
""|yes) AC_CHECK_LIB(tcl,main,LIBS="${LIBS} -ltcl -lm",
[if test "$TCL_SUBDIRS" != ""; then
AC_MSG_ERROR(Could not find Tcl libraries. You must either install Tcl or configure with --disable-cyradm)
fi],-lm) ;;
*) CPPFLAGS="${CPPFLAGS} -I${with_tcl}/include"
LIBS="${LIBS} ${with_tcl}/lib/libtcl.a -lm" ;;
esac
dnl
dnl Test for Zephyr
dnl
AC_ARG_WITH(zephyr,[ --with-zephyr=PATH use Zephyr from PATH],
with_zephyr="${withval}")
if test -z "$with_zephyr"; then
if test -f /usr/local/lib/libzephyr.a; then
with_zephyr="/usr/local"
fi
fi
case "$with_zephyr" in
no) true;;
""|yes) AC_CHECK_LIB(zephyr,main,LIBS="${LIBS} -lzephyr",
with_zephyr="no",);;
*) CPPFLAGS="${CPPFLAGS} -I${with_zephyr}/include"
LIBS="${LIBS} ${with_zephyr}/lib/libzephyr.a";;
esac
AC_ARG_WITH(notify,[ --with-notify=METHOD use mail notification METHOD
METHOD is zephyr or no],WITH_NOTIFY="${withval}",
if test "$with_zephyr" = "no"; then
WITH_NOTIFY=no
else
WITH_NOTIFY=zephyr
fi)
AC_SUBST(WITH_NOTIFY)
if test "$with_zephyr" = "no"; then
if test "$WITH_NOTIFY" = "zephyr"; then
AC_MSG_ERROR(Unable to find Zephyr libraries)
fi
fi
dnl
dnl Test for Kerberos
dnl
AC_ARG_WITH(krb,[ --with-krb=PATH use Kerberos from PATH],
with_krb="${withval}")
if test -z "$with_krb"; then
if test -f /usr/local/lib/libkrb.a -a -f /usr/local/lib/libdes.a; then
with_krb="/usr/local"
fi
fi
case "$with_krb" in
no) true;;
""|yes) AC_CHECK_LIB(krb,des_ecb_encrypt,LIBS="${LIBS} -lkrb -ldes",
with_krb="no",-ldes);;
*) if test -f ${with_krb}/lib/libdes.a; then
CPPFLAGS="${CPPFLAGS} -I${with_krb}/include"
LIBS="${LIBS} ${with_krb}/lib/libkrb.a ${with_krb}/lib/libdes.a"
else
AC_MSG_ERROR(The Kerberos DES library is required for Kerberos support)
fi;;
esac
if test "$with_krb" = "no"; then
if test "$WITH_LOGIN" = "krb"; then
AC_MSG_ERROR(Unable to find Kerberos/DES libraries)
fi
else
AC_DEFINE(HAVE_ACTE_KRB)
LIBOBJS="${LIBOBJS} acte_krb.o";
fi
dnl
dnl Look for inn
dnl
AC_ARG_WITH(inn,[ --with-inn=PATH use INN from PATH],
INNSHELLVARS="$withval/innshellvars",[
echo checking for inn
if test -f /usr/local/news/innshellvars; then
INNSHELLVARS=/usr/local/news/innshellvars
elif test -f /usr/lib/news/innshellvars; then
INNSHELLVARS=/usr/lib/news/innshellvars
elif test -f /usr/news/innshellvars; then
INNSHELLVARS=/usr/news/innshellvars
else
echo "did not find inn, don't worry"
INNSHELLVARS=/did/not/find/innshellvars
fi])
AC_SUBST(INNSHELLVARS)
AC_ARG_ENABLE(privacy,
[ --disable-privacy disable network privacy support],
if test "$enableval" = no; then
AC_DEFINE(NOPRIVACY)
fi)
AC_MSG_CHECKING(for modern syslog)
AC_CACHE_VAL(cyrus_cv_lib_syslog, AC_TRY_CPP([#include <syslog.h>
#ifndef LOG_LOCAL6
#include </nonexistent>
#endif],cyrus_cv_lib_syslog=yes,cyrus_cv_lib_syslog=no))
if test $cyrus_cv_lib_syslog = no; then
PRE_SUBDIRS="${PRE_SUBDIRS} syslog"
DEPLIBS="${DEPLIBS} ../syslog/libsyslog.a"
CPPFLAGS="$CPPFLAGS -I\$(srcdir)/../syslog"
fi
AC_MSG_RESULT($cyrus_cv_lib_syslog)
AC_ARG_ENABLE(amssync,
[ --enable-amssync enable AMS bboard sync support],
if test "$enableval" = yes; then
EXTRA_SUBDIRS="${EXTRA_SUBDIRS} amssync"
AC_CHECK_LIB(ossup, main,
LIBS="${LIBS} -lossup"
LIBOBJS=`echo $LIBOBJS | sed s/getdtablesize.o//`
)
fi)
AC_ARG_ENABLE(cmulocal,
[ --enable-cmulocal enable CMU-specific local support],
if test "$enableval" = yes; then
EXTRA_SUBDIRS="${EXTRA_SUBDIRS} cmulocal"
fi)
dnl
dnl Random other libraries
dnl
AC_CHECK_LIB(ndbm, main)
AC_CHECK_LIB(dbm, main)
AC_CHECK_LIB(db, main)
AC_CHECK_LIB(socket, main, LIBS="${LIBS} -lsocket -lnsl",,-lnsl)
AC_OUTPUT(Makefile man/Makefile syslog/Makefile et/Makefile lib/Makefile imap/Makefile imap/feedcyrus cyradm/Makefile imtest/Makefile ptclient/Makefile pwcheck/Makefile amssync/Makefile amssync/amssynctree cmulocal/Makefile)

File Metadata

Mime Type
text/x-c
Expires
Mon, Apr 6, 2:22 AM (2 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18831977
Default Alt Text
configure.in (11 KB)

Event Timeline