Add extra configuration and sanity checks for groff and ps2pdf

1) Add AC_ARG_VAR for GROFF and PS2PDF to inform users of these
   environment variables.
2) Check that groff -ms works

Some distributions ship the ms macros as a separate package which may
not be installed together with 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: Jeremy Huddleston <jeremyhu@freedesktop.org>
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
This commit is contained in:
Jeremy Huddleston 2009-10-20 12:46:03 -07:00
parent d3f801fd2f
commit 9c95f2af7c

View file

@ -429,9 +429,23 @@ AC_DEFINE_DIR(XERRORDB, XERRORDB, [Location of error message database])
XORG_CHECK_MALLOC_ZERO
# Specification documents are currently provided in troff format
AC_ARG_VAR([GROFF], [Path to a groff executable that supports -ms])
AC_PATH_PROGS([GROFF], [groff], [none], [$PATH:/usr/gnu/bin])
AC_ARG_VAR([PS2PDF], [Path to a ps2pdf executable])
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]),