AC_TYPE_SIZE_T
AC_TYPE_PID_T
AC_TYPE_SIGNAL
-AC_CHECK_HEADERS(unistd.h termios.h termio.h sgtty.h stdarg.h alloca.h sys/itimer.h fcntl.h sys/fcntl.h)
+AC_CHECK_HEADERS(unistd.h termios.h termio.h sgtty.h stdarg.h alloca.h sys/itimer.h fcntl.h sys/fcntl.h memory.h)
AC_C_CONST dnl getopt needs this.
AC_PROG_LEX
AC_PROG_YACC
+AC_SUBST(CEFLAGS)
+AC_SUBST(LDEFLAGS)
AC_SUBST(LIBOBJS)
# Under sysV68, socket and friends are provided by the C library.
AC_CHECK_LIB(socket,socket)
AC_CHECK_LIB(inet,socket))
-AC_CHECK_LIB(nsl,inet_addr)
-AC_CHECK_LIB(opie,opiegenerator)
+# The condition in this test copes with the presence of inet_addr in libc6.
+AC_CHECK_FUNC(inet_addr,
+ AC_MSG_RESULT(using libc's inet_addr),
+ AC_CHECK_LIB(nsl,inet_addr))
dnl Port hack for Interactive UNIX System V/386 Release 3.2
AC_CHECK_LIB(cposix, strchr,
AC_SUBST(EXTRAOBJ)
AC_CHECK_FUNCS(tcsetattr stty setsid seteuid gethostbyname res_search herror \
- strrchr strerror setlinebuf syslog snprintf vsnprintf vsyslog atexit \
- inet_aton)
+ strrchr strerror setlinebuf syslog snprintf vprintf vsnprintf vsyslog \
+ atexit inet_aton strftime)
# Under Red Hat 4.0 (and many other Linuxes) -lresolv is seriously flaky
# and breaks gethostbyname(2). It's better to use the bind stuff in the C
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
-### use option --enable-POP2 to compile in the POP2 fallback support
+### use option --enable-POP2 to compile in the POP2 support
AC_ARG_ENABLE(POP2,
[ --enable-POP2 compile in POP2 protocol support (obsolete)],
[with_POP2=$enableval],
[with_POP2=no])
test "$with_POP2" = "yes" && AC_DEFINE(POP2_ENABLE)
-### use option --enable-OPIE to compile in the OPIE support
-AC_ARG_ENABLE(OPIE,
- [ --enable-OPIE compile in OPIE protocol support (obsolete)],
- [with_OPIE=$enableval],
- [with_OPIE=no])
-test "$with_OPIE" = "yes" && AC_DEFINE(OPIE_ENABLE)
+### use option --disable-POP3 to omit the POP3 support
+AC_ARG_ENABLE(POP3,
+ [ --disable-POP3 don't compile in POP3 protocol support],
+ [with_POP3=$enableval],
+ [with_POP3=yes])
+test "$with_POP3" = "yes" && AC_DEFINE(POP3_ENABLE)
+
+### use option --disable-IMAP to omit the IMAP support
+AC_ARG_ENABLE(IMAP,
+ [ --disable-IMAP don't compile in IMAP protocol support],
+ [with_IMAP=$enableval],
+ [with_IMAP=yes])
+test "$with_IMAP" = "yes" && AC_DEFINE(IMAP_ENABLE)
+
+### use option --disable-ETRN to omit the ETRN support
+AC_ARG_ENABLE(ETRN,
+ [ --disable-ETRN don't compile in ETRN protocol support],
+ [with_ETRN=$enableval],
+ [with_ETRN=yes])
+test "$with_ETRN" = "yes" && AC_DEFINE(ETRN_ENABLE)
+
+### use option --enable-RPA to compile in the RPA support
+AC_ARG_ENABLE(RPA,
+ [ --enable-RPA compile in RPA protocol support],
+ [with_RPA=$enableval],
+ [with_RPA=no])
+test "$with_RPA" = "yes" && AC_DEFINE(RPA_ENABLE)
+
+### use option --enable-opie to compile in the OPIE support
+AC_ARG_ENABLE(opie,
+ [ --enable-opie support OTP through the OPIE library],
+ [ AC_CHECK_HEADER(opie.h,, [echo 'configure: cannot find <opie.h>, which is required for OPIE support.'; exit 1])
+ AC_CHECK_LIB(opie,opiegenerator,, [echo 'configure: cannot find libopie, which is required for OPIE support.'; exit 1])
+ AC_DEFINE(OPIE,1) ],
+ [with_opie=no])
+
+### use option --with-gssapi=DIR to compile in GSSAPI support
+AC_ARG_WITH(gssapi,
+ [ --with-gssapi[=DIR] compile in GSSAPI support using libraries in DIR])
+if test "$with-gssapi" = "yes"
+then
+ GSSAPIDIR="/usr /usr/local /usr/athena"
+else
+ GSSAPIDIR="$with_gssapi"
+fi
+if test "$GSSAPIDIR" != "" -a "$GSSAPIDIR" != "no"
+then
+ AC_MSG_CHECKING([for gssapi])
+ for curgssapidir in $GSSAPIDIR
+ do
+ if test -f $curgssapidir/include/gssapi/gssapi.h
+ then
+ CEFLAGS="$CEFLAGS -DGSSAPI -I$curgssapidir/include"
+ LDEFLAGS="$LDEFLAGS -L$curgssapidir/lib"
+ LIBS="$LIBS -lgssapi_krb5 -lkrb5"
+ AC_MSG_RESULT([in $curgssapidir])
+ GSSAPIFOUND="yes"
+ fi
+ done
+ if test "$GSSAPIFOUND" != "yes"
+ then
+ AC_MSG_ERROR([not found])
+ fi
+fi
### use option --with-kerberos=DIR to point at a Kerberos directory
AC_ARG_WITH(kerberos,
# configuring the BSD/OS Kerberos IV support, though.
if test -n "$with_kerberos"
then
- CFLAGS="$CFLAGS -DKERBEROS_V4 -I$with_kerberos"
- LDFLAGS="$LDFLAGS -L$dir/lib"
+ CEFLAGS="$CEFLAGS -DKERBEROS_V4 -I$with_kerberos"
+ LDEFLAGS="$LDEFLAGS -L$dir/lib"
LIBS="$LIBS -lkrb -ldes"
else
for dir in /usr/kerberos /usr/kerberosIV /usr/athena
do
if test -f "$dir/include/krb.h"
then
- CFLAGS="$CFLAGS -DKERBEROS_V4 -I$dir/include"
- LDFLAGS="$LDFLAGS -L$dir/lib"
+ CEFLAGS="$CEFLAGS -DKERBEROS_V4 -I$dir/include"
+ LDEFLAGS="$LDEFLAGS -L$dir/lib"
LIBS="$LIBS -lkrb -ldes"
break
fi