From: Jeff Lucovsky Date: Thu, 27 Jan 2022 14:00:23 +0000 (-0500) Subject: config: Make libunwind use configurable for 6.0 X-Git-Tag: suricata-6.0.5~48 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e2d76f836531e5689311de820c4717918a8484c;p=thirdparty%2Fsuricata.git 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. --- 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]),