diff urogue/configure.ac @ 294:fe6b7a1a6dfc

Improve the documentation build process. The choice between troff implementations is now made at configure time, rather than using shell logic in the Makefile to choose while building.
author John "Elwin" Edwards
date Sat, 30 Dec 2017 14:15:52 -0500
parents b8919055c2fc
children 029c1f5c5588
line wrap: on
line diff
--- a/urogue/configure.ac	Fri Dec 29 17:38:08 2017 -0500
+++ b/urogue/configure.ac	Sat Dec 30 14:15:52 2017 -0500
@@ -34,6 +34,24 @@
 AC_CHECK_PROG([GROFF], [groff], [groff],)
 AC_CHECK_PROG([COLCRT], [colcrt], [colcrt],)
 
+if test "x$GROFF" != "x" ; then
+DOCS_GROFF=
+DOCS_NROFF=.no-nroff
+DOCS_NONE=.none
+elif test "x$(NROFF)" != "x" && test "x$(COLCRT)" != "x" ; then
+DOCS_GROFF=.no-groff
+DOCS_NROFF=
+DOCS_NONE=.none
+else
+DOCS_GROFF=.no-groff
+DOCS_NROFF=.no-nroff
+DOCS_NONE=
+fi
+
+AC_SUBST(DOCS_GROFF)
+AC_SUBST(DOCS_NROFF)
+AC_SUBST(DOCS_NONE)
+
 AC_ARG_WITH(program-name, AC_HELP_STRING([--with-program-name=NAME],[alternate executable name]),[progname="$withval" ], [progname="urogue"] )
 PROGRAM=$progname
 AC_SUBST(PROGRAM)