From 2b90f1d34356963d8cac98fb409689a5c3ebd2ac Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Galarneau?= Date: Thu, 27 Feb 2014 12:30:41 -0500 Subject: [PATCH] Fix: Skip lttng-gen-tp example build if Python is missing MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes #665 Signed-off-by: Jérémie Galarneau Signed-off-by: Mathieu Desnoyers --- configure.ac | 3 +++ doc/examples/Makefile.am | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index c8421b7b..3c92da15 100644 --- a/configure.ac +++ b/configure.ac @@ -276,6 +276,9 @@ AC_DEFINE_UNQUOTED([LTTNG_SYSTEM_RUNDIR], ["$lttng_system_rundir"], lttnglibjavadir="${libdir}/lttng/java" AC_SUBST(lttnglibjavadir) +AM_PATH_PYTHON([2.7],BUILD_GEN_TP_EXAMPLES=1) +AM_CONDITIONAL([BUILD_GEN_TP_EXAMPLES], [test $BUILD_GEN_TP_EXAMPLES], [Build examples requiring lttng-gen-tp]) + AC_CONFIG_FILES([ Makefile doc/Makefile diff --git a/doc/examples/Makefile.am b/doc/examples/Makefile.am index 971eec3e..0d341c82 100644 --- a/doc/examples/Makefile.am +++ b/doc/examples/Makefile.am @@ -43,7 +43,11 @@ if NO_SHARED # disabled. else # Copies are for VPATH build support -SUBDIRS_PROXY = easy-ust demo gen-tp hello-static-lib +SUBDIRS_PROXY = easy-ust demo hello-static-lib + +if BUILD_GEN_TP_EXAMPLES +SUBDIRS_PROXY += gen-tp +endif all-local: @if [ x"$(srcdir)" != x"$(builddir)" ]; then \ -- 2.34.1