From 0e2d76f836531e5689311de820c4717918a8484c Mon Sep 17 00:00:00 2001 From: Jeff Lucovsky Date: Thu, 27 Jan 2022 09:00:23 -0500 Subject: [PATCH] config: Make libunwind use configurable for 6.0 Issue: 4973 This commit makes stack-trace on fault configurable by adding "--enable-libunwind" as a configure option. By default, or if "--enable-libunwind=no" is specified, the libunwind library will not be configured. When "--enable-libunwind=yes" is specified, libunwind will be used iff it can be found in one of the standard library locations. --- configure.ac | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index 79cdd4cd34..b5fe2cb2ea 100644 --- a/configure.ac +++ b/configure.ac @@ -1791,13 +1791,17 @@ ;; esac - AC_CHECK_LIB(unwind,unw_backtrace,,LIBUNW="no") - if test "$LIBUNW" = "no"; then - echo - echo " libunwind library and development headers not found" - echo " stacktrace on unexpected termination due to signal not possible" - echo - fi; + AC_ARG_ENABLE(unwind, + AS_HELP_STRING([--enable-unwind], [Enable unwind support]),[enable_unwind=$enableval],[enable_unwind=no]) + AS_IF([test "x$enable_unwind" = "xyes"], [ + AC_CHECK_LIB(unwind,unw_backtrace,,LIBUNW="no") + if test "$LIBUNW" = "no"; then + echo + echo " libunwind library and development headers not found" + echo " stacktrace on unexpected termination due to signal not possible" + echo + fi; + ]) AC_ARG_ENABLE(ebpf, AS_HELP_STRING([--enable-ebpf],[Enable eBPF support]),