From ce4064056e3579e27967340d42c2546df973fb1c Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Tue, 23 May 2017 11:25:05 -0400 Subject: [PATCH] Fix: do not require lttng-utils.debug-info with --disable-debug-info MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Philippe Proulx Signed-off-by: Jérémie Galarneau --- cli/babeltrace-cfg-cli-args-default.c | 6 ++++++ configure.ac | 11 +++++------ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/cli/babeltrace-cfg-cli-args-default.c b/cli/babeltrace-cfg-cli-args-default.c index 0617b59d..2a66a635 100644 --- a/cli/babeltrace-cfg-cli-args-default.c +++ b/cli/babeltrace-cfg-cli-args-default.c @@ -26,6 +26,12 @@ #include "babeltrace-cfg-cli-args.h" #include "babeltrace-cfg-cli-args-default.h" +#ifdef ENABLE_DEBUG_INFO +# define BT_ENABLE_DEBUG_INFO 1 +#else +# define BT_ENABLE_DEBUG_INFO 0 +#endif + #ifdef BT_SET_DEFAULT_IN_TREE_CONFIGURATION struct bt_config *bt_config_cli_args_create_with_default(int argc, diff --git a/configure.ac b/configure.ac index b31f7acc..a9b2c6a9 100644 --- a/configure.ac +++ b/configure.ac @@ -368,14 +368,13 @@ AC_ARG_ENABLE([debug-info], [AS_IF([test "x$enableval" = xyes], [_enable_debug_info=yes], [_enable_debug_info=no])], []) AM_CONDITIONAL([ENABLE_DEBUG_INFO], [test "x$_enable_debug_info" = xyes]) -AC_DEFINE([BT_ENABLE_DEBUG_INFO], [1], [Enable debug info support]) 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.)]) - 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.)]) - AC_DEFINE([ENABLE_DEBUG_INFO], [1], [Define to 1 if you enable the 'debug info' feature]) + # 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.)]) + 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.)]) + AC_DEFINE([ENABLE_DEBUG_INFO], [1], [Define to 1 if you enable the 'debug info' feature]) ], []) AC_ARG_VAR([BUILT_IN_PLUGINS], [Statically-link in-tree plug-ins into the babeltrace binary]) -- 2.34.1