diff --git a/ChangeLog b/ChangeLog
index 851e52a244d61f297b3d2f3d6fe2400007c5996a..ad6b27859a2fc61a1c00115910d4140b14a1bc65 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-02-15 Chris Allegretta <chrisa@asty.org>
+	* configure.ac, doc/man/Makefile.am - Add check for HTML output support in GNU
+	  groff.  Fixes Savannah bug #24461: build traps on groff.  Also, add installation
+	  of html-ized man pages to $datadir/nano/man-html, since we should probably
+	  install files we went to all the trouble of generating.
+
 2009-02-14 Chris Allegretta <chrisa@asty.org>
         * nano.c (precalc_multicolorinfo) - Add debugging so we have a better clue if further
           issues arise.   Also start at the beginning of later lines when trying to match the
diff --git a/configure.ac b/configure.ac
index 6c56725259121336048184902af8112065163c75..4cc40fc7d9b28c4c2c74777282b59ccd2cd54a06 100644
--- a/configure.ac
+++ b/configure.ac
@@ -545,6 +545,21 @@ else
     fi
 fi
 
+# Check for groff html support
+AC_MSG_CHECKING([for HTML support in groff])
+groff -t -mandoc -Thtml </dev/null >/dev/null
+if test $? -ne 0 ; then 
+    echo "no"
+    echo "*** Will not generate HTML version of man pages  ***"
+    echo "*** Consider installing a newer version of groff with HTML support ***"
+    groff_html_support=no
+else
+    echo "yes"
+    groff_html_support=yes
+fi
+AM_CONDITIONAL(GROFF_HTML, test x$groff_html_support = xyes)
+
+
 AC_CONFIG_FILES([
 Makefile
 doc/Makefile
diff --git a/doc/man/Makefile.am b/doc/man/Makefile.am
index 4c6e87764bae705e5b2a2e8d4886f0ec35b5b313..e932674551fa794da62ffce9e15c18b1768fb83c 100644
--- a/doc/man/Makefile.am
+++ b/doc/man/Makefile.am
@@ -6,13 +6,20 @@ endif
 
 if USE_NANORC
 man_MANS = nano.1 nanorc.5 rnano.1
+if GROFF_HTML
 BUILT_SOURCES = nano.1.html nanorc.5.html rnano.1.html
+endif
 else
 man_MANS = nano.1 rnano.1
+if GROFF_HTML
 BUILT_SOURCES = nano.1.html rnano.1.html
 endif
+endif
 
+if GROFF_HTML
 nano_man_mans = nano.1 nanorc.5 rnano.1
+htmlman_DATA = nano.1.html nanorc.5.html rnano.1.html
+htmlmandir = $(datadir)/nano/man-html
 nano_built_sources = nano.1.html nanorc.5.html rnano.1.html
 
 nano.1.html: nano.1
@@ -23,3 +30,6 @@ rnano.1.html: rnano.1
 	groff -t -mandoc -Thtml < $< > $@
 
 EXTRA_DIST = $(nano_man_mans) $(nano_built_sources)
+else 
+EXTRA_DIST = $(nano_man_mans)
+endif