diff --git a/configure b/configure index 3e01f7c02..fce5b8d6f 100755 --- a/configure +++ b/configure @@ -674,6 +674,7 @@ PYTHON FLEX YFLAGS YACC +GROFFPROG TRPROG UNAMEPROG SHA1SUM @@ -17601,6 +17602,53 @@ printf "%s\n" "no" >&6; } fi +# Extract the first word of "groff", so it can be a program name with args. +set dummy groff; ac_word=$2 +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +printf %s "checking for $ac_word... " >&6; } +if test ${ac_cv_path_GROFFPROG+y} +then : + printf %s "(cached) " >&6 +else case e in #( + e) case $GROFFPROG in + [\\/]* | ?:[\\/]*) + ac_cv_path_GROFFPROG="$GROFFPROG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + ac_cv_path_GROFFPROG="$as_dir$ac_word$ac_exec_ext" + printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + + test -z "$ac_cv_path_GROFFPROG" && ac_cv_path_GROFFPROG="groff" + ;; +esac ;; +esac +fi +GROFFPROG=$ac_cv_path_GROFFPROG +if test -n "$GROFFPROG"; then + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GROFFPROG" >&5 +printf "%s\n" "$GROFFPROG" >&6; } +else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } +fi + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mandoc or nroff" >&5 printf %s "checking for mandoc or nroff... " >&6; } if test ${ac_cv_path_NROFF+y} diff --git a/configure.ac b/configure.ac index 3532ea383..eb2b605f4 100644 --- a/configure.ac +++ b/configure.ac @@ -1726,6 +1726,7 @@ dnl AC_PATH_PROG(SHA1SUM, [sha1sum], [openssl dgst -sha1]) AC_PATH_PROG(UNAMEPROG, [uname], [uname]) AC_PATH_PROG(TRPROG, [tr], [tr]) +AC_PATH_PROG(GROFFPROG, [groff], [groff]) AC_CACHE_CHECK([for mandoc or nroff], [ac_cv_path_NROFF], [ AC_PATH_PROGS_FEATURE_CHECK([NROFF], [mandoc nroff], [ac_cv_path_NROFF="$ac_path_NROFF"], [ac_cv_path_NROFF=no]) ]) diff --git a/docs/Makefile.in b/docs/Makefile.in index ed67bb70b..e1ebd1d67 100644 --- a/docs/Makefile.in +++ b/docs/Makefile.in @@ -36,6 +36,7 @@ MANDOC = mandoc MANCOMPRESS = @MANCOMPRESS@ MANCOMPRESSEXT = @MANCOMPRESSEXT@ TR = @TRPROG@ +GROFF = @GROFFPROG@ # Our install program supports extra flags... INSTALL = $(SHELL) $(scriptdir)/install-sh -c @@ -126,6 +127,10 @@ lint: all for m in $(DOCS); do \ echo $(MANDOC) -Tlint -Wwarning $$m; \ $(MANDOC) -Tlint -Wwarning $$m || rval=`expr $$rval + $$?`; \ + if [ -n "$(GROFF)" ]; then \ + echo $(GROFF) -mandoc -K utf8 -rF0 -rHY=0 -ww -b -z $$m; \ + $(GROFF) -mandoc -K utf8 -rF0 -rHY=0 -ww -b -z $$m || rval=`expr $$rval + $$?`; \ + fi; \ done; \ exit $$rval; \ fi