]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Add configure option to disable examples 540/head
authorFloris Bos <bos@je-eigen-domein.nl>
Fri, 19 Sep 2014 16:07:27 +0000 (18:07 +0200)
committerFloris Bos <bos@je-eigen-domein.nl>
Fri, 19 Sep 2014 16:07:27 +0000 (18:07 +0200)
Having examples installed is not always desired
(e.g. no use of them on embedded systems)

Signed-off-by: Floris Bos <bos@je-eigen-domein.nl>
Makefile.am
configure.ac

index a23e7be4af16592a0ccc1bcef7407981a48108a7..a2eea94f3230a91a0fc1c3aa1ff681ad54fd57ae 100644 (file)
@@ -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 \
index d235a35c3c97bfb52e41ac74f3af7e7894236ea5..ceb9cb4a6352c0122fa33949f9d515fe536b5e41 100644 (file)
@@ -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"