From e24e014cc73add6181cd2017ccc670cb605f018c Mon Sep 17 00:00:00 2001 From: Floris Bos Date: Fri, 19 Sep 2014 18:07:27 +0200 Subject: [PATCH] Add configure option to disable examples Having examples installed is not always desired (e.g. no use of them on embedded systems) Signed-off-by: Floris Bos --- Makefile.am | 6 +++++- configure.ac | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index a23e7be4..a2eea94f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,7 +5,11 @@ RSYNC = rsync --rsh=ssh # build the following subdirectories -SUBDIRS = po src examples doc bindings tests +SUBDIRS = po src doc bindings tests + +if BUILD_EXAMPLES +SUBDIRS += examples +endif # the following files are not mentioned in any other Makefile EXTRA_DIST = COPYRIGHT CHANGES TODO CONTRIBUTORS THREADS \ diff --git a/configure.ac b/configure.ac index d235a35c..ceb9cb4a 100644 --- a/configure.ac +++ b/configure.ac @@ -99,6 +99,9 @@ AC_ARG_VAR(RRDGRAPH_YLEGEND_ANGLE, AC_DEFINE_UNQUOTED(RRDGRAPH_YLEGEND_ANGLE,${RRDGRAPH_YLEGEND_ANGLE:-90.0}, [Vertical label angle: -90.0 (default) or 90.0]) +AC_ARG_ENABLE(examples,AS_HELP_STRING([--disable-examples],[disable building of examples]), +[],[enable_examples=yes]) + AC_ARG_ENABLE(rrdcached,AS_HELP_STRING([--disable-rrdcached],[disable building of rrdcached]), [],[enable_rrdcached=yes]) @@ -111,6 +114,7 @@ AC_ARG_ENABLE(rrd_graph,AS_HELP_STRING([--disable-rrd_graph],[disable all rrd_gr AC_ARG_ENABLE(rrd_restore,AS_HELP_STRING([--disable-rrd_restore],[disable rrd_restore XML import functions]), [],[enable_rrd_restore=yes]) +AM_CONDITIONAL(BUILD_EXAMPLES,[test $enable_examples != no]) AM_CONDITIONAL(BUILD_RRDCGI,[test $enable_rrdcgi != no]) AM_CONDITIONAL(BUILD_RRDCACHED,[test $enable_rrdcached != no]) @@ -1013,6 +1017,7 @@ fi fi echo " Build Tcl Bindings: $enable_tcl" echo " Build Python Bindings: $enable_python" +echo " Build examples: $enable_examples" echo " Build rrdcached: $enable_rrdcached" echo " Build rrdcgi: $enable_rrdcgi" echo " Build librrd MT: $enable_pthread" -- 2.47.2