summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac31
-rw-r--r--doc/Makefile.am6
2 files changed, 9 insertions, 28 deletions
diff --git a/configure.ac b/configure.ac
index 1f86aa0..d4ee7c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,10 +12,10 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
-# Require xorg-macros 1.3 or later: XORG_DEFAULT_OPTIONS
+# Require xorg-macros: 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)
AM_CONFIG_HEADER([config.h])
@@ -24,6 +24,8 @@ AC_PROG_LIBTOOL
AC_PROG_CC
XORG_DEFAULT_OPTIONS
+XORG_ENABLE_DOCS
+XORG_WITH_GROFF
# Checks for pkg-config packages
PKG_CHECK_MODULES(SM, [ice >= 1.0.5] xproto)
@@ -55,29 +57,6 @@ AC_CHECK_FUNCS([uuid_create], [], [
AM_CONDITIONAL(WITH_LIBUUID, test x"$HAVE_LIBUUID" = xyes)
-# Documentation is currently a single troff document
-AC_PATH_PROGS([GROFF], [groff], [none], [$PATH:/usr/gnu/bin])
-
-AC_MSG_CHECKING([whether to build documentation])
-AC_ARG_ENABLE(docs, AC_HELP_STRING([--enable-docs],
- [Enable building of Xaw documentation]),
- [build_docs="${enableval}"], [build_docs="auto"])
-
-if test "x${build_docs}" = xauto; then
- if test "x${GROFF}" = xnone ; then
- build_docs=no
- else
- build_docs=yes
- fi
-fi
-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])
-
-
AC_OUTPUT([Makefile
doc/Makefile
src/Makefile
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 05fee05..eea436b 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -27,7 +27,8 @@ doc_sources = macros.t SMlib.ms xsmp.ms
EXTRA_DIST = $(doc_sources)
-if BUILD_DOCS
+if ENABLE_DOCS
+if HAVE_GROFF
doc_DATA = SMlib.txt SMlib.ps SMlib.html xsmp.txt xsmp.ps xsmp.html
CLEANFILES = $(doc_DATA)
@@ -56,4 +57,5 @@ SUFFIXES = .ms .ps .txt .html
.ms.html:
$(AM_V_GEN) $(GROFF) -Thtml -P-Dimages -P-I$*-image $(GROFF_FLAGS) $< 2> index.$@.raw > $@
-endif BUILD_DOCS
+endif HAVE_GROFF
+endif ENABLE_DOCS