From ed945351ab4d250fedc4d5c1c0769a1cd6ce05d3 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Mon, 28 Aug 2017 21:21:12 -0700 Subject: [PATCH 1/2] Use libtool dependencies for linking tests If libservicelog is not already installed on the system library path, the test suite currently fails because the library cannot be found. This also means that the library being tested by the test suite is *not* the one in the source tree, but the one installed on the system. This is fixed by linking against the libtool .la instead of directly against the .so, so that we get a wrapper script that sets the LD_LIBRARY_PATH. --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 785da44..e840eee 100644 --- a/Makefile.am +++ b/Makefile.am @@ -46,7 +46,7 @@ libservicelog_la_LDFLAGS = -module -version-info \ check_PROGRAMS = src/tests/test_libservicelog src_tests_test_libservicelog_SOURCES = src/tests/test_libservicelog.c -src_tests_test_libservicelog_LDADD = .libs/libservicelog.so +src_tests_test_libservicelog_LDADD = libservicelog.la TESTS=src/tests/run_tests -- 2.11.0