1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
|
dnl Process this file with autoconf to produce a configure script.
AC_INIT(maildrop/Makefile.am)
AC_PROG_CC
AC_PROG_AWK
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
AM_INIT_AUTOMAKE(maildrop,0.75)
if test "$libdir" = '${exec_prefix}/lib'
then
libdir='${exec_prefix}/lib/maildrop'
ac_configure_args="--libdir='$libdir' $ac_configure_args"
fi
if test "$mandir" = '${prefix}/man'
then
mandir="${libdir}/man"
ac_configure_args="--mandir='$mandir' $ac_configure_args"
fi
dnl Check whether we should use gdbm, or db.
needs_withdb=0
AC_ARG_WITH(db, [ --with-db=db Use DB library instead of GDBM.
--without-db Disable GDBM extensions],
db="$withval", db="")
saveLIBS="$LIBS"
case "$db" in
gdbm)
;;
db)
;;
no)
db=""
;;
"")
AC_CHECK_LIB(gdbm, gdbm_open)
AC_CHECK_FUNC(gdbm_open, [ db=gdbm ])
if test "$db" = ""
then
AC_CHECK_LIB(db, dbopen, [ ],
AC_CHECK_LIB(db, db_open, [ ] ))
AC_CHECK_FUNC(dbopen, db="db")
AC_CHECK_FUNC(db_open, db="db")
fi
AC_MSG_CHECKING(for gdbm or db library)
AC_MSG_RESULT($db)
if test "$db" != ""
then
ac_configure_args="--with-db=$db $ac_configure_args"
fi
;;
*)
AC_MSG_ERROR(Invalid --with-db option.)
;;
esac
saveLIBS="$LIBS"
case "$db" in
gdbm)
AC_CHECK_LIB(gdbm, gdbm_open, [ LIBGDBM=-lgdbm ; LIBS="-lgdbm $LIBS" ])
AC_CHECK_FUNC(gdbm_open, [ HAVE_GDBM=1 ])
if test "$HAVE_GDBM" != "1"
then
AC_MSG_ERROR(GDBM library not found)
fi
;;
db)
AC_CHECK_LIB(db, dbopen, [ LIBDB=-ldb ; LIBS="-ldb $LIBS" ],
AC_CHECK_LIB(db, db_open, [ LIBDB=-ldb ; LIBS="-ldb $LIBS"] ))
AC_CHECK_FUNC(dbopen, HAVE_BDB=1)
AC_CHECK_FUNC(db_open, HAVE_BDB=1)
if test "$HAVE_BDB" != "1"
then
AC_MSG_ERROR(GDBM library not found)
fi
;;
*)
;;
esac
LIBS="$saveLIBS"
USE_GDBM=0
USE_DB=0
if test "$HAVE_GDBM" = "1"
then
USE_GDBM=1
DBSUBDIR=gdbmobj
fi
if test "$HAVE_BDB" = "1"
then
USE_DB=1
DBSUBDIR=bdbobj
fi
AC_SUBST(DBSUBDIR)
AC_SUBST(USE_GDBM)
AC_SUBST(USE_DB)
AC_SUBST(LIBDB)
AC_SUBST(LIBGDBM)
AC_ARG_WITH(plentyofbeer,
[ --enable-sendmail=prog set sendmail location
--enable-trusted-users='...' specify users allowed to use the -d option
--enable-maildrop-uid=root UID of maildrop
--enable-maildrop-gid=mail GID of maildrop
--enable-use-flock=(1|0) enable flock()/lockf() locking
--enable-use-dotlock=(1|0) enable dotlock locking
--enable-lockext-def=.lock set extension for dotlock files
--enable-locksleep-def=5 set sleep interval dotlock files (seconds)
--enable-locktimeout-def=60 set timeout for dotlock files (seconds)
--enable-lockrefresh-def=15 set timeout for dotlock files (seconds)
--enable-tempdir=.tmp directory for temp files (in user's home dir)
--disable-tempdir disable temp files in home directory (use
the tmpfile function)
--enable-smallmsg=8192 size of buffer for small messages
--enable-global-timeout=300 global watchdog timer (seconds)
--enable-crlf-term=0 enable <CR><LF> line termination
--enable-restrict-trusted=1 restrict -d for trusted users only
--enable-keep-fromline=(1|0) preserve the original From_ line in messages
--enable-syslog=1 log fatal errors to syslog
--with-etcdir=dir Instead of /etc, use this.])
AC_ARG_ENABLE(maildirquota,[ --enable-maildirquota enable experimental maildir quota support.],maildirquota="$enableval")
case "$maildirquota" in
1*|y*|Y*)
AC_DEFINE_UNQUOTED(MAILDIRQUOTA,1)
maildirquota=1
;;
*)
maildirquota=0
;;
esac
AC_ARG_ENABLE(userdb,
[ --enable-userdb enable experimental virtual user db support],userdb="$enableval")
AC_ARG_WITH(makedatprog,[], , ac_configure_args="--with-makedatprog=${libdir}/bin/makedatprog $ac_configure_args")
case "$userdb" in
1*|y*|Y*)
USERDBSUBDIR="userdb"
makedat="makedat"
if test "$USE_GDBM$USE_DB" = "00"
then
AC_MSG_ERROR(--enable-userdb requires --with-db)
fi
;;
*)
USERDBSUBDIR=""
;;
esac
AC_SUBST(USERDBSUBDIR)
AM_CONDITIONAL(INSTALL_USERDB, test "$USERDBSUBDIR" != "")
MAKEDAT="makedat"
if test "$USE_GDBM$USE_DB" = "00"
then
MAKEDAT=""
fi
AC_SUBST(MAKEDAT)
AM_CONDITIONAL(INSTALL_MAKEDAT, test "$makedat" != "")
AM_CONDITIONAL(INSTALL_DELIVERQUOTA, test "$maildirquota" = "1")
AC_CONFIG_SUBDIRS(numlib rfc822 rfc2045 gdbmobj bdbobj $MAKEDAT maildir userdb maildrop)
AC_OUTPUT(Makefile dbobj.h dbobj.config maildrop.spec)
|