1 dnl ---------------------------------------------------------------------------
2 dnl w3m: This program is needed for converting HTML to text.
3 dnl ---------------------------------------------------------------------------
4 AC_DEFUN([GP_CHECK_W3M],
9 AC_ARG_WITH(w3m, [ --without-w3m Don't use w3m],[
10 if test "x$withval" = "xno"; then
15 if test -n "${W3M}"; then
20 AC_MSG_CHECKING([whether ${W3M} works])
21 cat > html2text-test.xxxhtml 2> /dev/null <<EOF
24 <h1>HTML2TEXT Test</h1>
27 <p>This is a test.</p>
31 ${W3M} -T text/html -cols 78 -dump html2text-test.xxxhtml > html2text-test.txt
32 if test $? != 0 || test ! -f html2text-test.txt || test ! -s html2text-test.txt
35 AC_MSG_RESULT([no (see http://www.w3m.org/ or http://w3m.sourceforge.net/ ...)])
43 AM_CONDITIONAL([HAVE_W3M], [$have_w3m])