# 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"
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"
[with_RPA=no])
test "$with_RPA" = "yes" && AC_DEFINE(RPA_ENABLE)
+### use option --enable-NTLM to compile in the NTLM support
+AC_ARG_ENABLE(NTLM,
+ [ --enable-NTLM compile in NTLM authentication support],
+ [with_NTLM=$enableval],
+ [with_NTLM=no])
+test "$with_NTLM" = "yes" && AC_DEFINE(NTLM_ENABLE)
+
### use option --enable-SDPS to compile in the SDPS support
AC_ARG_ENABLE(SDPS,
[ --enable-SDPS compile in SDPS protocol support],
[ --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=$enableval],
[with_opie=no])
+test "$with_opie" = "yes" && AC_DEFINE(OPIE_ENABLE)
AC_ARG_ENABLE(inet6,
[ --enable-inet6 support IPv6 (requires the inet6-apps library)],
- [ unset ac_cv_lib_inet6_getaddrinfo; AC_CHECK_LIB(inet6, getaddrinfo,,
- [ unset ac_cv_lib_inet6_getaddrinfo; LDFLAGS="$LDFLAGS -L/usr/inet6/lib"; AC_CHECK_LIB(inet6, getaddrinfo,,
- [ echo 'configure: cannot find libinet6, which is required for IPv6 support.'; exit 1]) ])
- AC_DEFINE(INET6, 1) ])
+
+ [ AC_CHECK_FUNC(getaddrinfo, [with_inet6=yes],
+ [ LDFLAGS="$LDFLAGS -L/usr/inet6/lib";
+ AC_CHECK_LIB(inet6, getaddrinfo, [with_inet6=yes
+ LIBS="$LIBS -linet6"],
+ [ echo 'configure: cannot find proper glibc version or libinet6,';
+ echo ' which is required for IPv6 support.';
+ exit 1]) ] )],
+ [with_inet6=no])
+test "$with_inet6" = "yes" && AC_DEFINE(INET6_ENABLE)
+
+AC_CHECK_FUNCS(inner_connect)
AC_ARG_ENABLE(netsec,
[ --enable-netsec support network security (requires inet6-apps library)],
[ unset ac_cv_lib_inet6_net_security_strtorequest; AC_CHECK_LIB(inet6, net_security_strtorequest,,
- [ unset ac_cv_lib_inet6_net_security_strtorequest; LDFLAGS="$LDFLAGS -L/usr/inet6/lib"; AC_CHECK_LIB(inet6, net_security_strtorequest,,
- [ echo 'configure: cannot find net_security_strtorequest in libinet6, which is required';
- echo ' for network security support. Either it does not exist, or it was';
- echo ' not built with network security support enabled.';
- exit 1]) ])
- unset ac_cv_header_net_security_h; AC_CHECK_HEADER(net/security.h,,
- [ unset ac_cv_header_net_security_h; CPPFLAGS="$CPPFLAGS -I/usr/inet6/include"; CFLAGS="$CFLAGS -I/usr/inet6/include"; AC_CHECK_HEADER(net/security.h,,
- [ echo 'configure: cannot find <net/security.h>, which is required for network security';
- echo ' support.';
- exit 1]) ])
- AC_DEFINE(NET_SECURITY, 1) ])
-
+ [ unset ac_cv_lib_inet6_net_security_strtorequest;
+ LDFLAGS="$LDFLAGS -L/usr/inet6/lib";
+ AC_CHECK_LIB(inet6, net_security_strtorequest,,
+ [ echo 'configure: cannot find net_security_strtorequest in libinet6, which is required';
+ echo ' for network security support. Either it does not exist, or it was';
+ echo ' not built with network security support enabled.';
+ exit 1]) ])
+ unset ac_cv_header_net_security_h; AC_CHECK_HEADER(net/security.h,,
+ [ unset ac_cv_header_net_security_h;
+ CPPFLAGS="$CPPFLAGS -I/usr/inet6/include";
+ CFLAGS="$CFLAGS -I/usr/inet6/include"; AC_CHECK_HEADER(net/security.h,,
+ [ echo 'configure: cannot find <net/security.h>, which is required';
+ echo ' for network security support.';
+ exit 1]) ]) ]
+ [with_netsec=no])
+test "$with_netsec" = "yes" && AC_DEFINE(NET_SECURITY)
+
### use option --with-kerberos5=DIR to point at a Kerberos 5 directory
AC_ARG_WITH(kerberos5,
[ --with-kerberos5=DIR point fetchmail compilation at a Kerberos 5 directory])
fi
fi
+### use option --with-ssl to compile in the SSL support
+AC_ARG_WITH(ssl,
+ [ --with-ssl=[DIR] enable SSL support using libraries in DIR],
+ [with_ssl=$withval],
+ [with_ssl=no])
+test "$with_ssl" = "yes" && AC_DEFINE(SSL_ENABLE)
+
+if test "$with_ssl" = "yes"
+then
+# He didn't specify an SSL location. Let's look at some common
+# directories where SSL has been found in the past and try and auto
+# configure for SSL. OpenSSL determination will be made later.
+# This will screw up if an OpenSSL install is located in a later
+# directory than an older SSLeay install, but the user should fix that
+# anyways and he can override on the configure line.
+
+ for ac_dir in \
+ /usr/local/ssl \
+ /usr/ssl \
+ /local/ssl \
+ /opt/ssl \
+ ; \
+ do
+ if test -d "$ac_dir" ; then
+ with_ssl=$ac_dir
+ break;
+ fi
+ done
+fi
+
+if test -n "$with_ssl" -a "$with_ssl" != "no"
+then
+ # With the autoconfigure above, the only time this is going to be
+ # true is going to be when we could not find the headers. If they
+ # are not in system standard locations, we are going to be broken.
+ if test "$with_ssl" = "yes"
+ then
+# Let's just define the standard location for the SSLeay root
+ with_ssl="/usr/local/ssl"
+ fi
+ if test -r $with_ssl/include/openssl/ssl.h
+ then
+### ssl.h found under openssl. Use openssl configuration preferentially
+ echo "Enabling OpenSSL support in $with_ssl"
+ CEFLAGS="$CEFLAGS -I$with_ssl/include -I$with_ssl/include/openssl"
+### OpenBSD comes with ssl headers
+ elif test -r /usr/include/ssl/ssl.h
+ then
+ echo "Enabling SSLeay support in $with_ssl"
+ CEFLAGS="$CEFLAGS -I/usr/include/ssl"
+ else
+ echo "Enabling SSLeay support in $with_ssl"
+ CEFLAGS="$CEFLAGS -I$with_ssl/include"
+ fi
+ LDEFLAGS="$LDEFLAGS -L$with_ssl/lib"
+ LIBS="$LIBS -lssl -lcrypto"
+else
+ echo 'Disabling SSL support...'
+fi
+
### use option --with-kerberos=DIR to point at a Kerberos directory
AC_ARG_WITH(kerberos,
[ --with-kerberos=DIR point fetchmail compilation at a Kerberos directory])
# configuring the BSD/OS Kerberos IV support, though.
# Check for a NetBSD/OpenBSD special case
-if test "$with_kerberos" = "yes" -a `uname` = "NetBSD" -o `uname` = "OpenBSD"
+if test "$with_kerberos" = "yes" && test `uname` = "NetBSD" -o `uname` = "OpenBSD"
then
echo "Configuring kerberosIV for `uname`"
CEFLAGS="$CEFLAGS -DKERBEROS_V4 -I/usr/include/kerberosIV"
LDFLAGS="$LDFLAGS -L$with_gssapi/lib"
fi
- AC_CHECK_LIB(krb5, krb5_init_context,,
- AC_MSG_ERROR([could not find libkrb5 which is needed for GSSAPI support]))
- if test -f "$with_kerberos5/include/roken.h"
+ if test -f "$with_gssapi/include/roken.h"
then
+ LIBS="$LIBS -lkrb5 -lasn1 -ldes -lroken -ldb -ldl"
AC_CHECK_LIB(gssapi, gss_init_sec_context,LIBS="$LIBS -lgssapi",
AC_MSG_ERROR([could not find libgssapi which is needed for GSSAPI support]), )
AC_DEFINE(HEIMDAL)
else
AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi/gssapi.h, AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE))
fi
- CPPFLAGS=$save_CPPFLAGS
fi])
AC_OUTPUT([Makefile intl/Makefile po/Makefile.in], [
# The reason for this odd makedepend line is that we want
# to have all dependencies evaluated relative to the source directory
# and let VPATH do all the dirty work when we build remotely
- echo "You can ignore any makedepend error messages";
+ echo "You can ignore any makedepend error messages:";
+ echo timestamp > stamp-h;
(cd $srcdir; makedepend -f - *.c) >>Makefile])
dnl Local Variables: