Fix: do not require lttng-utils.debug-info with --disable-debug-info
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 23 May 2017 15:25:05 +0000 (11:25 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 28 May 2017 16:57:44 +0000 (12:57 -0400)
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
cli/babeltrace-cfg-cli-args-default.c
configure.ac

index 0617b59dcf3359683a20bd0046a7f9cb2f96ce12..2a66a6359624e443ceb0967a67e1fd336444ce69 100644 (file)
 #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,
index b31f7acc16e628972d735dda7f517f3e9d3b80b3..a9b2c6a970892d72415c1c5535445ba474e2209a 100644 (file)
@@ -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])
This page took 0.025632 seconds and 4 git commands to generate.