[gnome-settings-daemon] build: Add --disable-man



commit db289a05eae305d6206343ae409d104564884e42
Author: Colin Walters <walters verbum org>
Date:   Tue Aug 7 23:05:37 2012 -0400

    build: Add --disable-man
    
    1) For embedded systems, it makes no sense to include documentation
       of this kind on each image.  So we might as well not even build
       it.
    2) For people bootstrapping systems from source code, documentation
       is the source of many cyclical build loops.  Allowing it to
       be disabled helps cut these loops.
    3) The Docbook stylesheets are distributed as Zip files, and I refuse
       to put that bullshit into my build system.

 Makefile.am  |    5 ++++-
 configure.ac |   12 +++++++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index c0cbb0e..6bb3d58 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,9 +5,12 @@ SUBDIRS = 			\
 	plugins			\
 	data			\
 	po 			\
-	man			\
 	$(NULL)
 
+if ENABLE_MAN
+SUBDIRS += man
+endif
+
 # Honor aclocal flags
 ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS}
 
diff --git a/configure.ac b/configure.ac
index 6ccfe39..c305bc1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -415,7 +415,17 @@ AC_SUBST([plugindir])
 PLUGIN_CFLAGS="-DG_LOG_DOMAIN=\"\\\"\$(plugin_name)-plugin\\\"\" -DPLUGIN_NAME=\"\\\"\$(plugin_name)\\\"\" "
 AC_SUBST(PLUGIN_CFLAGS)
 
-AC_PATH_PROG([XSLTPROC], [xsltproc])
+AC_ARG_ENABLE(man,
+              [AS_HELP_STRING([--enable-man],
+                              [generate man pages [default=yes]])],,
+              enable_man=yes)
+if test "$enable_man" != no; then
+  AC_PATH_PROG([XSLTPROC], [xsltproc])
+  if test -z "$XSLTPROC"; then
+    AC_MSG_ERROR([xsltproc is required for --enable-man])
+  fi
+fi
+AM_CONDITIONAL(ENABLE_MAN, test "$enable_man" != no)
 
 dnl ---------------------------------------------------------------------------
 dnl - Finish



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]