1 From 60a581253331ac38721a12495909d073eff703b7 Mon Sep 17 00:00:00 2001
2 From: "Yann E. MORIN" <yann.morin.1998@free.fr>
3 Date: Sat, 13 Aug 2016 18:47:17 +0200
4 Subject: [PATCH] configure: add option to not build manpages
6 Man pages are not always needed, especially on embedded systems.
8 Add a configure option to not build them; by default, build them.
10 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
13 https://github.com/systemd/systemd-bootchart/pull/14
16 configure.ac | 10 +++++++++-
17 2 files changed, 13 insertions(+), 2 deletions(-)
19 diff --git a/Makefile.am b/Makefile.am
20 index a71f8d8..e6510d5 100644
23 @@ -74,7 +74,10 @@ EXTRA_DIST = \
24 MANPAGES = man/bootchart.conf.5 man/systemd-bootchart.1
25 MANPAGES_ALIAS = man/bootchart.conf.d.5
27 -man_MANS = $(MANPAGES) $(MANPAGES_ALIAS)
29 +MAYBE_MANPAGES = $(MANPAGES) $(MANPAGES_ALIAS)
31 +man_MANS = $(MAYBE_MANPAGES)
33 man/bootchart.conf.d.5: man/bootchart.conf.5
35 diff --git a/configure.ac b/configure.ac
36 index f8e62d8..90e8b03 100644
39 @@ -167,8 +167,16 @@ AC_ARG_WITH([rootlibdir],
40 AC_SUBST([rootprefix], [$with_rootprefix])
41 AC_SUBST([rootlibdir], [$with_rootlibdir])
44 + AS_HELP_STRING([--diable-man],[Build the man pages (default: yes)]),
45 + [build_man=$enableval],
48 AC_PATH_PROG([XSLTPROC], [xsltproc])
49 -AS_IF([test -z "$XSLTPROC"], AC_MSG_ERROR([*** xsltproc is required for man pages]))
50 +AS_IF([test -z "$XSLTPROC" -a "$build_man" = "yes"],
51 + [AC_MSG_ERROR([*** xsltproc is required for man pages])])
53 +AM_CONDITIONAL([COND_man],[test "$build_man" = "yes"])