]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
config: Make libunwind use configurable for 6.0
authorJeff Lucovsky <jeff@lucovsky.org>
Thu, 27 Jan 2022 14:00:23 +0000 (09:00 -0500)
committerVictor Julien <vjulien@oisf.net>
Thu, 7 Apr 2022 17:30:44 +0000 (19:30 +0200)
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

index 79cdd4cd34c7864acca9def735e48fa80ad87691..b5fe2cb2ea08c61bb2da8bb28647b19f0b1d4c22 100644 (file)
     ;;
     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]),