From 2dbb7a6743c162b435e3b5a66857a6fb87093a2e Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sun, 29 Apr 2012 17:22:29 +0200 Subject: [PATCH] build-sys: allow packagers to choose what is installed Distribution maintainers may not want to use upstream example files in their procps-ng package. Reference: http://permalink.gmane.org/gmane.linux.arch.devel/17440 Signed-off-by: Sami Kerola --- Makefile.am | 2 ++ configure.ac | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/Makefile.am b/Makefile.am index 87b88ec0..ec2f12af 100644 --- a/Makefile.am +++ b/Makefile.am @@ -84,7 +84,9 @@ uptime_SOURCES = uptime.c $(top_srcdir)/lib/fileutils.c vmstat_SOURCES = vmstat.c $(top_srcdir)/lib/strutils.c $(top_srcdir)/lib/fileutils.c w_SOURCES = w.c $(top_srcdir)/lib/fileutils.c +if EXAMPLE_FILES sysconf_DATA = sysctl.conf +endif EXTRA_DIST = \ autogen.sh \ diff --git a/configure.ac b/configure.ac index a493fa8f..e3f701bc 100644 --- a/configure.ac +++ b/configure.ac @@ -187,6 +187,12 @@ AC_ARG_ENABLE([skill], ) AM_CONDITIONAL(BUILD_SKILL, test "x$build_skill" = xyes) +AC_ARG_ENABLE([examples], + AS_HELP_STRING([--enable-examples], [add example files to installation]), + [], enable_examples=no +) +AM_CONDITIONAL(EXAMPLE_FILES, test "x$enable_examples" = xyes) + AC_ARG_ENABLE([oomem], AS_HELP_STRING([--enable-oomem], [add out-of-memory fields to the library and top]), [], enable_oomem=no