summaryrefslogtreecommitdiff
path: root/xorg-macros.m4
diff options
context:
space:
mode:
authorKevin E Martin <kem@kem.org>2005-12-09 03:01:09 +0000
committerKevin E Martin <kem@kem.org>2005-12-09 03:01:09 +0000
commit80c3aba8ac4af96c3d9407ecbed2f6c813adbbe1 (patch)
treeb128dab51d333715e9bb78b7399b26f6e11292b3 /xorg-macros.m4
parent98959e58700f53c1cafba3b4a2fa6e103c71a55d (diff)
Add support for building other formats from sgml docs.
Diffstat (limited to 'xorg-macros.m4')
-rw-r--r--xorg-macros.m423
1 files changed, 21 insertions, 2 deletions
diff --git a/xorg-macros.m4 b/xorg-macros.m4
index 387810e..0284399 100644
--- a/xorg-macros.m4
+++ b/xorg-macros.m4
@@ -188,10 +188,11 @@ AC_CHECK_FILE(
)
AC_PATH_PROG(LINUXDOC, linuxdoc)
+AC_PATH_PROG(PS2PDF, ps2pdf)
AC_MSG_CHECKING([Whether to build documentation])
-if [[ ! -z $DEFS_ENT_PATH ] && [ ! -z $LINUXDOC ]] ; then
+if test x$DEFS_ENT_PATH != x && test x$LINUXDOC != x ; then
BUILDDOC=yes
else
BUILDDOC=no
@@ -201,9 +202,27 @@ AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
AC_MSG_RESULT([$BUILDDOC])
-MAKE_TEXT="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B txt"
+AC_MSG_CHECKING([Whether to build pdf documentation])
+
+if test x$PS2PDF != x ; then
+ BUILDPDFDOC=yes
+else
+ BUILDPDFDOC=no
+fi
+
+AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
+
+AC_MSG_RESULT([$BUILDPDFDOC])
+
+MAKE_TEXT="SGML_SEARCH_PATH=$DEFS_ENT_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
+MAKE_PS="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
+MAKE_PDF="$PS2PDF"
+MAKE_HTML="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B html --split=0"
AC_SUBST(MAKE_TEXT)
+AC_SUBST(MAKE_PS)
+AC_SUBST(MAKE_PDF)
+AC_SUBST(MAKE_HTML)
]) # XORG_CHECK_LINUXDOC
# XORG_CHECK_MALLOC_ZERO