From: Michael Jeanson Date: Mon, 17 Jul 2017 22:21:56 +0000 (-0400) Subject: Port: use a separate variable for elfutils libs X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=901e5c120b4662debf4be6478e8f10a015ccde28 Port: use a separate variable for elfutils libs Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- diff --git a/cli/Makefile.am b/cli/Makefile.am index 195c878a..ef5a19aa 100644 --- a/cli/Makefile.am +++ b/cli/Makefile.am @@ -72,6 +72,7 @@ babeltrace_bin_LDFLAGS += $(call pluginarchive,utils) if ENABLE_DEBUG_INFO babeltrace_bin_LDFLAGS += $(call pluginarchive,lttng-utils) +babeltrace_bin_LDADD += $(ELFUTILS_LIBS) endif endif diff --git a/configure.ac b/configure.ac index 1fba17f4..b9bb6b47 100644 --- a/configure.ac +++ b/configure.ac @@ -587,11 +587,13 @@ AS_IF([test "x$enable_python_bindings_tests" = xyes], AS_IF([test "x$enable_debug_info" = xyes], [ # Check if libelf and libdw are present - AC_CHECK_LIB([elf], [elf_version], [], [AC_MSG_ERROR(Missing libelf (from elfutils >= 0.154) which is required by debug info. You can disable this feature using --disable-debug-info.)]) - AC_CHECK_LIB([dw], [dwarf_begin], [], [AC_MSG_ERROR(Missing libdw (from elfutils >= 0.154) which is required by debug info. You can disable this feature using --disable-debug-info.)]) + AC_CHECK_LIB([elf], [elf_version], [:], [AC_MSG_ERROR(Missing libelf (from elfutils >= 0.154) which is required by debug info. You can disable this feature using --disable-debug-info.)]) + AC_CHECK_LIB([dw], [dwarf_begin], [:], [AC_MSG_ERROR(Missing libdw (from elfutils >= 0.154) which is required by debug info. You can disable this feature using --disable-debug-info.)]) BT_LIB_ELFUTILS([0], [154], [:], [AC_MSG_ERROR(elfutils >= 0.154 is required to use the debug info feature. You can disable this feature using --disable-debug-info.)]) + ELFUTILS_LIBS="-lelf -ldw" ] ) +AC_SUBST([ELFUTILS_LIBS]) AS_IF([test "x$enable_api_doc" = "xyes"], [ diff --git a/plugins/lttng-utils/Makefile.am b/plugins/lttng-utils/Makefile.am index 0a01610f..72c73311 100644 --- a/plugins/lttng-utils/Makefile.am +++ b/plugins/lttng-utils/Makefile.am @@ -27,7 +27,7 @@ babeltrace_plugin_lttng_utils_la_SOURCES = \ babeltrace_plugin_lttng_utils_la_LDFLAGS = \ $(LT_NO_UNDEFINED) \ -avoid-version -module \ - -lelf -ldw + $(ELFUTILS_LIBS) if !ENABLE_BUILT_IN_PLUGINS babeltrace_plugin_lttng_utils_la_LIBADD = \