diff options
author | Gaetan Nadon <memsize@videotron.ca> | 2010-01-29 15:05:37 -0500 |
---|---|---|
committer | Gaetan Nadon <memsize@videotron.ca> | 2010-02-05 13:23:17 -0500 |
commit | b531ff3ed2ad841b716ba370fd43bbe8f06f1185 (patch) | |
tree | fa69505b6666759bd09d94be1a015c1796f4905d | |
parent | 5922556f408fbcd14e7ad23bbe46db2ae8dcdee6 (diff) |
doc: use new macros XORG_WITH_GROFF and PS2PDF
These control the usage of doc tools
Also use XORG_ENABLE_DOCS to control generation of docs
Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
-rw-r--r-- | .gitignore | 8 | ||||
-rw-r--r-- | Makefile.am | 7 | ||||
-rw-r--r-- | configure.ac | 25 |
3 files changed, 18 insertions, 22 deletions
@@ -71,8 +71,14 @@ core *.tar.bz2 *.tar.gz # -# Add & Override patterns for libxtrans +# Add & Override patterns for libxtrans # # Edit the following section as needed # For example, !report.pc overrides *.pc. See 'man gitignore' # +Xtrans.html +Xtrans.pdf +Xtrans.txt +index.Xtrans.html.raw +index.Xtrans.ps.raw +index.Xtrans.txt.raw diff --git a/Makefile.am b/Makefile.am index af68a7a..a824f02 100644 --- a/Makefile.am +++ b/Makefile.am @@ -32,13 +32,15 @@ dist-hook: ChangeLog INSTALL # Rules to convert documentation from troff to other formats doc_sources = Xtrans.mm +if ENABLE_DOCS +if HAVE_GROFF + if HAVE_PS2PDF printable_format = .pdf else printable_format = .ps endif -if BUILD_DOCS doc_DATA = $(doc_sources:.mm=.txt) \ $(doc_sources:.mm=$(printable_format)) \ $(doc_sources:.mm=.html) @@ -69,4 +71,5 @@ SUFFIXES = .mm .ps .txt .html .pdf .ps.pdf: $(AM_V_GEN) $(PS2PDF) $< $@ -endif BUILD_DOCS +endif HAVE_GROFF +endif ENABLE_DOCS diff --git a/configure.ac b/configure.ac index 383a1c1..6dad5a2 100644 --- a/configure.ac +++ b/configure.ac @@ -25,11 +25,14 @@ AC_INIT(xtrans, [1.2.5], [https://bugs.freedesktop.org/enter_bug.cgi?product=xor AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE -# Require xorg-macros 1.3 or later: XORG_DEFAULT_OPTIONS +# Require xorg-macrosr: XORG_DEFAULT_OPTIONS m4_ifndef([XORG_MACROS_VERSION], - [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])]) -XORG_MACROS_VERSION(1.3) + [m4_fatal([must install xorg-macros 1.6 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.6) XORG_DEFAULT_OPTIONS +XORG_ENABLE_DOCS +XORG_WITH_GROFF +XORG_WITH_PS2PDF # Because xtrans is included into other modules rather than being linked # with, these defines have to be added to the cflags line @@ -49,21 +52,5 @@ sticky_bit_define="-DHAS_STICKY_DIR_BIT" AC_SUBST(sticky_bit_define) -# Documentation is currently provided in troff format, built on request -AC_PATH_PROGS([GROFF], [groff], [none], [$PATH:/usr/gnu/bin]) -AC_PATH_PROGS([PS2PDF], [ps2pdf], [none], [$PATH:/usr/gnu/bin]) - -AC_MSG_CHECKING([whether to build documentation]) -AC_ARG_ENABLE(docs, AC_HELP_STRING([--enable-docs], - [Enable building of documentation]), - [build_docs="${enableval}"], [build_docs="no"]) -AC_MSG_RESULT([${build_docs}]) -if test "x${build_docs}" = xyes && test "x${GROFF}" = xnone ; then - AC_MSG_ERROR([can't build documentation without groff]) -fi - -AM_CONDITIONAL(BUILD_DOCS, [test x$build_docs = xyes]) -AM_CONDITIONAL(HAVE_PS2PDF, [test x$PS2PDF != xnone]) - AC_OUTPUT([Makefile xtrans.pc]) |