AC_ARG_WITH(domain, AC_HELP_STRING([--with-domain=DOMAIN], [Specify your DNS domain name]),
[if test $withval != yes; then
- AC_DEFINE_UNQUOTED(DOMAIN,"$withval",[ Define your domain name. ])
+ if test $withval != no; then
+ AC_DEFINE_UNQUOTED(DOMAIN,"$withval",[ Define your domain name. ])
+ fi
fi])
need_socket="no"
AM_CONDITIONAL(USE_SSL, test x$need_ssl = xyes)
-AC_ARG_WITH(sasl, AC_HELP_STRING([--with-sasl[=PFX]], [Use Cyrus SASL library for POP/IMAP authentication]),
- [
- if test "$with_sasl" != "no" -a "$need_imap" != "yes" -a "$need_pop" != "yes"
- then
- AC_MSG_ERROR([SASL support is only useful with POP or IMAP support])
- fi
-
- if test "$with_sasl" != "no"
- then
- if test "$with_sasl" != "yes"
- then
- CPPFLAGS="$CPPFLAGS -I$with_sasl/include"
- LDFLAGS="$LDFLAGS -L$with_sasl/lib"
- fi
-
- saved_LIBS="$LIBS"
-
- AC_CHECK_LIB(sasl, sasl_client_init,,
- AC_MSG_ERROR([could not find libsasl]),)
-
- MUTT_LIB_OBJECTS="$MUTT_LIB_OBJECTS mutt_sasl.o"
- MUTTLIBS="$MUTTLIBS -lsasl"
- LIBS="$saved_LIBS"
- AC_DEFINE(USE_SASL,1,
- [ Define if want to use the Cyrus SASL library for POP/IMAP authentication. ])
- need_sasl=yes
- fi
- ])
-AM_CONDITIONAL(USE_SASL, test x$need_sasl = xyes)
-
AC_ARG_WITH(sasl2, AC_HELP_STRING([--with-sasl2[=PFX]], [Use Cyrus SASL library version 2 for POP/IMAP authentication]),
[
if test "$with_sasl2" != "no" -a "$need_imap" != "yes" -a "$need_pop" != "yes"
MUTTLIBS="$MUTTLIBS -lsasl2"
LIBS="$saved_LIBS"
AC_DEFINE(USE_SASL,1,
- [ Define if want to use the Cyrus SASL library for POP/IMAP authentication. ])
- AC_DEFINE(USE_SASL2,1,
[ Define if want to use version 2 of the Cyrus SASL library. ])
need_sasl=yes
fi
dnl -- end libesmtp --
dnl -- sgml tools --
-AC_MSG_CHECKING([for SGML Tools style])
-SGML2TXT_CMD="true"
-SGML2PS_CMD="true"
-SGML2HTML_CMD="true"
-case "`uname -s`" in
- FreeBSD)
- SGML2TXT_CMD="sgmlfmt -f ascii manual.sgml && uniq < manual.ascii | expand > manual.txt && rm -rf manual.ascii || true"
- SGML2PS_CMD="sgmlfmt -f ps manual.sgml || true"
- SGML2HTML_CMD="sgmlfmt -f html manual.sgml || true"
- AC_MSG_RESULT(FreeBSD)
+
+dnl Documentation tools
+have_openjade="no"
+AC_PATH_PROG([OSPCAT], [ospcat], [none])
+if test "$OSPCAT" != "none"
+then
+ AC_MSG_CHECKING([for openjade docbook stylesheets])
+ dslosfile=`ospcat --public-id="-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN"`
+ DSLROOT=`echo $dslosfile | sed -n -e "s/.*SOIBASE='\(@<:@^'@:>@*\)\/catalog'.*/\1/p"`
+ # ospcat may spit out an absolute path without an SOIBASE
+ if test -z "$DSLROOT"
+ then
+ DSLROOT=`echo $dslosfile | sed -e 's|<OSFILE>\(.*\)/print/docbook.dsl|\1|'`
+ fi
+ if test -f $DSLROOT/print/docbook.dsl
+ then
+ AC_MSG_RESULT([in $DSLROOT])
+ have_openjade="yes"
+ else
+ AC_MSG_RESULT([not found: PDF documentation will not be built.])
+ fi
+fi
+AC_SUBST(DSLROOT)
+
+AC_MSG_CHECKING([for lynx])
+AC_PATH_PROG([HTML2TXT_CMD], [lynx], [none])
+if test x"$HTML2TXT_CMD" = x"none"
+then
+ AC_MSG_CHECKING([for w3m])
+ AC_PATH_PROG([HTML2TXT_CMD], [w3m], [none])
+fi
+if test x"$HTML2TXT_CMD" = x"none"
+then
+ AC_MSG_CHECKING([for elinks])
+ AC_PATH_PROG([HTML2TXT_CMD], [elinks], [none])
+fi
+case "$HTML2TXT_CMD" in
+ *elinks*)
+ HTML2TXT_CMD="$HTML2TXT_CMD -dump -no-numbering -no-references \$^ > \$@"
;;
- SunOS)
- SGML2TXT_CMD="sgml2txt -l manual || true"
- SGML2PS_CMD="sgml2latex -l -p manual || true"
- SGML2HTML_CMD="sgml2html -l manual || true"
- AC_MSG_RESULT(Solaris)
+ *lynx*)
+ HTML2TXT_CMD="$HTML2TXT_CMD -dump -nolist -with_backspaces \$^ > \$@"
+ ;;
+ *w3m*)
+ HTML2TXT_CMD="$HTML2TXT_CMD -dump \$^ > \$@"
;;
*)
- SGML2TXT_CMD="if linuxdoc -B txt -c latin --pass='-P -c' manual ; then uniq < manual.txt | expand > _manual.txt ; rm manual.txt ; col -b < _manual.txt > manual.txt ; rm -rf _manual.txt ; fi || true"
- SGML2PS_CMD="sgml2latex --output=ps manual || true"
- SGML2HTML_CMD="sgml2html manual || true"
- AC_MSG_RESULT(Linux (default))
+ HTML2TXT_CMD="true"
;;
esac
-AC_SUBST(SGML2TXT_CMD)
-AC_SUBST(SGML2PS_CMD)
-AC_SUBST(SGML2HTML_CMD)
+AC_SUBST(HTML2TXT_CMD)
+
+AC_MSG_CHECKING([for tidy])
+AC_PATH_PROG([HTMLCLEAN_CMD], [tidy], [none])
+
+if test x"$HTMLCLEAN_CMD" != x"none"
+then
+ HTMLCLEAN_CMD="$HTMLCLEAN_CMD -q -i -m -asxml -utf8 "
+else
+ HTMLCLEAN_CMD="echo "
+fi
+AC_SUBST(HTMLCLEAN_CMD)
AC_OUTPUT(Makefile intl/Makefile m4/Makefile
po/Makefile.in doc/Makefile contrib/Makefile