0001-Add-configure-option-to-disable-documentation.patch 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. From deaef0790f3cbbce826275d3564551fc9568b628 Mon Sep 17 00:00:00 2001
  2. From: Gustavo Zacarias <gustavo@zacarias.com.ar>
  3. Date: Wed, 2 Dec 2015 14:31:52 -0300
  4. Subject: [PATCH] Add configure option to disable documentation
  5. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
  6. ---
  7. Makefile.am | 6 +++++-
  8. configure.ac | 8 ++++++++
  9. 2 files changed, 13 insertions(+), 1 deletion(-)
  10. diff --git a/Makefile.am b/Makefile.am
  11. index f45975c..1f46a9b 100644
  12. --- a/Makefile.am
  13. +++ b/Makefile.am
  14. @@ -5,7 +5,11 @@ RSYNC = rsync --rsh=ssh
  15. # build the following subdirectories
  16. -SUBDIRS = po src doc bindings tests
  17. +SUBDIRS = po src bindings tests
  18. +
  19. +if BUILD_DOCS
  20. +SUBDIRS += doc
  21. +endif
  22. if BUILD_EXAMPLES
  23. SUBDIRS += examples
  24. diff --git a/configure.ac b/configure.ac
  25. index dc70e7d..7460c67 100644
  26. --- a/configure.ac
  27. +++ b/configure.ac
  28. @@ -100,6 +100,9 @@ AC_ARG_VAR(RRDGRAPH_YLEGEND_ANGLE,
  29. AC_DEFINE_UNQUOTED(RRDGRAPH_YLEGEND_ANGLE,${RRDGRAPH_YLEGEND_ANGLE:-90.0},
  30. [Vertical label angle: -90.0 (default) or 90.0])
  31. +AC_ARG_ENABLE(docs,AS_HELP_STRING([--disable-docs],[disable building documentation]),
  32. +[],[enable_docs=yes])
  33. +
  34. AC_ARG_ENABLE(examples,AS_HELP_STRING([--disable-examples],[disable building of examples]),
  35. [],[enable_examples=yes])
  36. @@ -115,6 +118,7 @@ AC_ARG_ENABLE(rrd_graph,AS_HELP_STRING([--disable-rrd_graph],[disable all rrd_gr
  37. AC_ARG_ENABLE(rrd_restore,AS_HELP_STRING([--disable-rrd_restore],[disable rrd_restore XML import functions]),
  38. [],[enable_rrd_restore=yes])
  39. +AM_CONDITIONAL(BUILD_DOCS,[test $enable_docs != no])
  40. AM_CONDITIONAL(BUILD_EXAMPLES,[test $enable_examples != no])
  41. AM_CONDITIONAL(BUILD_RRDCGI,[test $enable_rrdcgi != no])
  42. AM_CONDITIONAL(BUILD_RRDCACHED,[test $enable_rrdcached != no])
  43. @@ -945,6 +949,8 @@ fi
  44. AC_SUBST(COMP_PYTHON)
  45. +if test $enable_docs != no; then
  46. +
  47. dnl Check for nroff
  48. AC_ARG_VAR(NROFF, [path to the local nroff version])
  49. AC_PATH_PROGS(NROFF, [gnroff nroff])
  50. @@ -961,6 +967,8 @@ AC_ARG_VAR(RRDDOCDIR, [[DATADIR/doc/PACKAGE-VERSION] Documentation directory])
  51. if test -z "$RRDDOCDIR"; then
  52. RRDDOCDIR='${datadir}/doc/${PACKAGE}-${VERSION}'; fi
  53. +fi
  54. +
  55. # systemd check
  56. PKG_PROG_PKG_CONFIG
  57. AC_ARG_WITH([systemdsystemunitdir],
  58. --
  59. 2.4.10