Fix: Conditionnally disable tests requiring shared libs support
A message that is not in the archive (sent off-list or not yet received): [email protected]
Mathieu Desnoyers
AppliedQuoted 11 lines · * Christian Babeux ([email protected]) wrote:
When building lttng-ust with shared library support explicitly disabled (e.g.: ./configure --disable-shared), libtool fail with a fatal error:
CC tp.lo CC tp2.lo CCLD liblttng-ust-provider-ust-tests-demo.lalibtool: link: can not build a shared library
libtool: link: See the libtool documentation for more information.
libtool: link: Fatal configuration error.
Quoted 7 lines
The build should not fail because some tests require explicit shared library support, instead they should be skipped.
This patch detect that the --disable-shared flag was passed to the configure script and toggle the "
NO_SHARED" Automake variable. Thus, the tests that require explicit shared library support can be skipped when theNO_SHAREDvariable is true.
merged into master and stable-2.0, thanks!
Mathieu
Quoted 43 lines
Signed-off-by Christian Babeux <[email protected]>--- configure.ac | 2 ++ tests/demo/Makefile.am | 5 +++++ 2 files changed, 7 insertions(+)configure.ac +2
-0@@ -64,6 +64,8 @@ AS_IF([test "x$libtool_fixup" = "xyes"], ]) ]) +AM_CONDITIONAL([NO_SHARED], [test x$enable_shared = xno]) + # Checks for programs. AC_PROG_CC AC_PROG_CXXtests/demo/Makefile.am +5
-0@@ -6,6 +6,10 @@ AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include -Wsystem-headers # libraries. LIBS = +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 \@@ -41,3 +45,4 @@ if LTTNG_UST_BUILD_WITH_LIBC_DL demo_LDADD = -lc endif +endifSignature · 1 line
1.8.0
Signature · 4 lines
Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com