From: Amarnath Valluri Date: Thu, 17 Oct 2013 08:01:55 +0000 (+0300) Subject: build: enable/disable examples support X-Git-Tag: accepted/tizen/20131112.202916~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c3fac3856ad0e825b53caeffe7d1eb2e6e08dd3b;p=profile%2Fivi%2Fmessage-port.git build: enable/disable examples support --- diff --git a/Makefile.am b/Makefile.am index 03ccf40..f72224d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,6 @@ -SUBDIRS = common daemon lib examples +SUBDIRS = common daemon lib +if BUILD_EXAMPLES + SUBDIRS += examples +endif ACLOCAL_AMFLAGS = -I m4 diff --git a/configure.ac b/configure.ac index 5714dd1..af11ca1 100644 --- a/configure.ac +++ b/configure.ac @@ -51,6 +51,11 @@ if test "x$enable_debug" = "xyes" ; then AC_DEFINE(ENABLE_DEBUG, [1], [Enable debug features]) fi +# build example +AC_ARG_ENABLE(examples, + [--enable-examples example applications], + [enable_examples=$enable_examples], [enable_examples=no]) +AM_CONDITIONAL(BUILD_EXAMPLES, [test "x$enable_examples" = "xyes"]) # Checks for header files. AC_CHECK_HEADERS([string.h]) @@ -65,5 +70,10 @@ common/Makefile daemon/Makefile lib/Makefile lib/message-port.pc -examples/Makefile ]) + +if test "x$enable_examples" = "xyes"; then + AC_OUTPUT([ + examples/Makefile + ]) +fi