aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-02-02 22:39:04 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-02-02 22:39:04 +0000
commit37685848d1b0ef78043f6f725dc69e662ee4c691 (patch)
tree21a6d7b685ae533923c508d7422d8f131fcc404e
parent0412a201a341390f443270211ce02c7c5fa23e20 (diff)
try to figure out if -man or -mandoc works to get text with the NROFF
utility
-rw-r--r--configure.ac18
1 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 6b4059e02..83e3070ff 100644
--- a/configure.ac
+++ b/configure.ac
@@ -991,6 +991,24 @@ AC_PATH_PROGS( NROFF, gnroff nroff, ,
$PATH:/usr/bin/:/usr/local/bin )
AC_SUBST(NROFF)
+AC_MSG_CHECKING([how to use *nroff to get plain text from man pages])
+MANOPT="-man"
+mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null`
+if test -z "$mancheck"; then
+ MANOPT="-mandoc"
+ mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null`
+ if test -z "$mancheck"; then
+ MANOPT=""
+ AC_MSG_RESULT([failed])
+ AC_MSG_WARN([found no *nroff option to get plaintext from man pages])
+ else
+ AC_MSG_RESULT([$MANOPT])
+ fi
+else
+ AC_MSG_RESULT([$MANOPT])
+fi
+AC_SUBST(MANOPT)
+
AC_PROG_YACC
dnl AC_PATH_PROG( RANLIB, ranlib, /usr/bin/ranlib,