From: Christian Babeux Date: Fri, 8 Feb 2013 03:47:04 +0000 (-0500) Subject: Fix: Conditionally disable test requiring shared libs X-Git-Tag: v2.2.0-rc1~71 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=ccf7af6c78ba7a206baa9d0b9578468a1af734e1 Fix: Conditionally disable test requiring shared libs When building lttng-tools with shared library support explicitly disabled (e.g.: ./configure --disable-shared), libtool fail with a fatal error: Making all in demo CC tp.lo CC tp2.lo CC tp3.lo CC demo.o CCLD demo CCLD liblttng-ust-provider-ust-tests-demo.la CCLD liblttng-ust-provider-ust-tests-demo3.la libtool: link: can not build a shared library libtool: link: See the libtool documentation for more information. libtool: link: Fatal configuration error. The build should not fail because some tests require explicit shared library support, instead they should be skipped. This can be accomplished by detecting builds with no shared libs support with the NO_SHARED Automake variable. Signed-off-by: Christian Babeux Signed-off-by: David Goulet --- diff --git a/tests/ust/overlap/demo/Makefile.am b/tests/ust/overlap/demo/Makefile.am index e354636bc..68b6e087f 100644 --- a/tests/ust/overlap/demo/Makefile.am +++ b/tests/ust/overlap/demo/Makefile.am @@ -1,5 +1,10 @@ AM_CFLAGS=-I$(srcdir) - +if NO_SHARED +# Do not build this test if shared libraries support was +# explicitly disabled. +else +# Force the shared flag on the noinst libraries since they are +# only built static by default FORCE_SHARED_LIB_OPTIONS = -module -shared -avoid-version \ -rpath $(abs_builddir) @@ -30,3 +35,4 @@ endif noinst_SCRIPTS = demo-trace EXTRA_DIST = demo-trace +endif