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 memory.h sys/wait.h)
+AC_CHECK_HEADERS(arpa/inet.h arpa/nameser.h resolv.h net/socket.h)
AC_C_CONST dnl getopt needs this.
# Arnaldo Carvalho de Melo <acme@conectiva.com.br>
# Sat Nov 7 15:39:03 EDT 1998
-ALL_LINGUAS="cs es fr pl pt_BR ru"
+ALL_LINGUAS="cs es fr pl pt_BR gl"
AM_GNU_GETTEXT
[EXTRASRC="$EXTRASRC \$(srcdir)/getopt.c \$(srcdir)/getopt1.c"
EXTRAOBJ="$EXTRAOBJ getopt.o getopt1.o"])
+AC_CHECK_FUNC(MD5Init, AC_DEFINE(HAVE_MD5),
+ [EXTRASRC="$EXTRASRC \$(srcdir)/md5c.c"
+ EXTRAOBJ="$EXTRAOBJ md5c.o"])
+
AC_FUNC_VPRINTF
AC_FUNC_ALLOCA
if test -n "$ALLOCA"
AC_CHECK_LIB(resolv,res_search,
[AC_DEFINE(HAVE_RES_SEARCH) AC_MSG_RESULT(found resolver functions in libresolv); LIBS="$LIBS -lresolv"], AC_MSG_RESULT(no resolver calls found)))
-dnl Check for libcrypt
-AC_CHECK_LIB(crypt,crypt)
+dnl Check for libcrypt -- it may live in libc or libcrypt, as on IRIX
+AC_CHECK_FUNC(crypt, , AC_CHECK_LIB(crypt,crypt))
+
+dnl Check for RSA refersence library in case we're using SSL
+AC_CHECK_LIB(rsaref, RSAPublicDecrypt)
dnl AC_FUNC_SETVBUF_REVERSED
# The "then" arm (nonempty $with_kerberos5) is kind of a crock. It works for
# configuring the BSD/OS Kerberos IV support, though.
-if test -n "$with_kerberos5"
+if test -n "$with_kerberos5" -a "$with_kerberos5" != "no"
then
# Path given
CEFLAGS="$CEFLAGS -DKERBEROS_V5 -I$with_kerberos5/include"
else
LIBS="$LIBS -lkrb5 -lcrypto -lcom_err"
fi
-else
- if test "$with_kerberos5" != "no" ; then
+elif test "$with_kerberos" != "no"; then
for dir in /usr/kerberos /usr/local/krb5 /usr/athena
do
if test -f "$dir/include/krb5.h"
break
fi
done
- fi
fi
### use option --with-ssl to compile in the SSL support
fi
LDEFLAGS="$LDEFLAGS -L$with_ssl/lib"
LIBS="$LIBS -lssl -lcrypto"
+ AC_DEFINE(SSL_ENABLE)
else
echo 'Disabling SSL support...'
fi
echo "Configuring kerberosIV for `uname`"
CEFLAGS="$CEFLAGS -DKERBEROS_V4 -I/usr/include/kerberosIV"
LIBS="$LIBS -lkrb -ldes"
-elif test -n "$with_kerberos" -a -n "$with_kerberos5"
+elif test -n "$with_kerberos" -a -n "$with_kerberos5" -a "$with_kerberos" != "no"
then
CEFLAGS="$CEFLAGS -DKERBEROS_V4 -I$with_kerberos/include"
LDEFLAGS="$LDEFLAGS -L$with_kerberos/lib"
else
LIBS="-lkrb4 -ldes425 $LIBS"
fi
-elif test -n "$with_kerberos5"
+elif test -n "$with_kerberos5" -a "$with_kerberos" != "no"
then
for dir in /usr/kerberos /usr/kerberosIV /usr/athena
do
LIBS="-lsocks $LIBS"
fi])
+### use option --with-socks5=DIR to point at SOCKS library
+AC_ARG_WITH(socks5,
+ [ --with-socks5[=DIR] add built-in SOCKS5 firewall access],
+[
+if test "$with_socks5" != no
+then
+ if test "$with_socks5" != yes
+ then
+ LDEFLAGS="$LDEFLAGS -L$with_socks5"
+ else
+ AC_CHECK_LIB(socks5, SOCKSconnect,,
+ AC_MSG_ERROR([could not find libsocks5 which is needed for built-in SOCKS5 support]))
+ fi
+ AC_DEFINE(HAVE_SOCKS)
+ CEFLAGS="$CEFLAGS -Dconnect=SOCKSconnect -Dgetsockname=SOCKSgetsockname -Dbind=SOCKSbind -Daccept=SOCKSaccept -Dlisten=SOCKSlisten -Dselect=SOCKSselect -Drecvfrom=SOCKSrecvfrom -Dsendto=SOCKSsendto -Drecv=SOCKSrecv -Dsend=SOCKSsend -Dread=SOCKSread -Dwrite=SOCKSwrite -Drresvport=SOCKSrresvport -Dshutdown=SOCKSshutdown -Dlisten=SOCKSlisten -Dclose=SOCKSclose -Ddup=SOCKSdup -Ddup2=SOCKSdup2 -Dfclose=SOCKSfclose -Dgethostbyname=SOCKSgethostbyname"
+ LIBS="-lsocks5 $LIBS"
+fi])
+
### use option --with-hesiod=DIR to point at a HESIOD directory
AC_ARG_WITH(hesiod,
[ --with-hesiod=DIR point fetchmail compilation at a HESIOD directory])
-if test -n "$with_hesiod"
-then
- # Path given
- CEFLAGS="$CEFLAGS -DHESIOD -I$with_hesiod/include"
- LDEFLAGS="$LDEFLAGS -L$with_hesiod/lib"
- LIBS="$LIBS -lhesiod"
-else
+case "x$with_hesiod" in
+xno)
+ ;;
+x)
for dir in /usr/athena /usr /usr/local
do
if test -f "$dir/include/hesiod.h"
break
fi
done
- fi
+ ;;
+*)
+ # Path given
+ CEFLAGS="$CEFLAGS -DHESIOD -I$with_hesiod/include"
+ LDEFLAGS="$LDEFLAGS -L$with_hesiod/lib"
+ LIBS="$LIBS -lhesiod"
+ ;;
+ esac
fi
### use option --with-gssapi=DIR to compile in GSSAPI support