From 68e1ee60200029ba823b36156d9411e8a20f1ff0 Mon Sep 17 00:00:00 2001 From: Michael Biebl Date: Tue, 1 Sep 2009 01:16:11 +0200 Subject: [PATCH 1/4] Make examples optional Add --enable-examples configure switch which allows to disable the compilation and installation of the examples. Default is off. --- configure.ac | 5 +++++ src/Makefile.am | 6 +++++- 2 files changed, 10 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index 7b34692..192892e 100644 --- a/configure.ac +++ b/configure.ac @@ -414,6 +414,11 @@ if test "x$enable_introspection" = xyes; then fi AM_CONDITIONAL([ENABLE_INTROSPECTION], [test "x$enable_introspection" = xyes]) +AC_ARG_ENABLE([examples], + AC_HELP_STRING([--enable-examples], [Build the example programs]),, + [enable_examples=no]) + +AM_CONDITIONAL(BUILD_EXAMPLES, test "x$enable_examples" = "xyes") # ******************** # Internationalization diff --git a/src/Makefile.am b/src/Makefile.am index a90dba2..28c7bfa 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,9 @@ -SUBDIRS = polkit polkitbackend polkitagent polkitd nullbackend programs examples +SUBDIRS = polkit polkitbackend polkitagent polkitd nullbackend programs + +if BUILD_EXAMPLES +SUBDIRS += examples +endif clean-local : rm -f *~ -- 1.6.3.3