[PATCH:lib/libX11] Check that groff -ms works

Yaakov (Cygwin/X) yselkowitz at users.sourceforge.net
Mon Oct 19 21:00:41 PDT 2009


From: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>

Some distributions ship the ms macros as a separate package which may
not be installed together with groff, and Mac OS is apparently known to
ship a defective /usr/bin/groff.  So we need to make sure that groff
works and the required macros are actually installed before attempting
to build the specs.

Signed-off-by: Yaakov Selkowitz <yselkowitz at users.sourceforge.net>
---

A similar, but not always identical, patch will be necessary for other 
modules as well.

 configure.ac |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index db83f26..11638f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -432,6 +432,17 @@ XORG_CHECK_MALLOC_ZERO
 AC_PATH_PROGS([GROFF], [groff], [none], [$PATH:/usr/gnu/bin])
 AC_PATH_PROGS([PS2PDF], [ps2pdf], [none], [$PATH:/usr/gnu/bin])
 
+if test "x${GROFF}" != xnone ; then
+    AC_MSG_CHECKING([whether ${GROFF} -ms works])
+    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
+        groff_ms_works=yes
+    else
+        groff_ms_works=no
+        GROFF=none
+    fi
+    AC_MSG_RESULT([${groff_ms_works}])
+fi
+
 AC_MSG_CHECKING([whether to build specifications])
 AC_ARG_ENABLE(specs, AC_HELP_STRING([--enable-specs],
                                    [Enable building of specification docs]),
-- 
1.6.4.2



More information about the xorg-devel mailing list