AC_INIT(lisp/gnus.el)
AC_SET_MAKE
AC_PROG_INSTALL

AC_ARG_WITH(xemacs,           --with-xemacs             Use XEmacs to build, [ if test "${withval}" = "yes"; then EMACS=xemacs; else EMACS=${withval}; fi ])
AC_ARG_WITH(emacs,            --with-emacs              Use Emacs to build, [ if test "${withval}" = "yes"; then EMACS=emacs; else EMACS=${withval}; fi ])

AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, \$(EMACS) -batch -q -l texinfmt -f batch-texinfo-format)

AM_PATH_LISPDIR

AC_CHECK_CUSTOM
AC_CHECK_CUSTOMLOADS
AC_CHECK_AUTOLOADS(gnus)

if test "${CUSTOM}" = "no"; then
AC_MSG_WARN(" ")
AC_MSG_WARN(No usable version of the widget/custom libraries have been)
AC_MSG_WARN(detected on your system.  This version of Gnus requires)
AC_MSG_WARN(features present in newer versions of the widget library.)
AC_MSG_WARN(" ")
AC_MSG_WARN(Please upgrade to the latest version of custom available.)
AC_MSG_WARN(This package is included with Emacs 20.1 and XEmacs 20.3)
AC_MSG_WARN(or from http://www.dina.kvl.dk/~abraham/custom/)
AC_MSG_WARN(or /ftp.dina.kvl.dk:/pub/Staff/Per.Abrahamsen/custom/)
AC_MSG_WARN(" ")
fi
AC_SUBST(CUSTOM)

AC_OUTPUT(Makefile lisp/Makefile texi/Makefile lisp/dgnushack.el)
