message: build: detect sys/sdt.h for eBPF tracing
diff: @@ -130,6 +130,12 @@ AC_ARG_WITH([bdb],
  [use_bdb=$withval],
  [use_bdb=auto])
  +AC_ARG_ENABLE([ebpf],
  + [AS_HELP_STRING([--enable-ebpf],
  + [enable eBPF tracing (default is yes if sys/sdt.h is found)])],
  + [use_ebpf=$enableval],
  + [use_ebpf=yes])
  +
  AC_ARG_WITH([miniupnpc],
  [AS_HELP_STRING([--with-miniupnpc],
  [enable UPNP (default is yes if libminiupnpc is found)])],
  @@ -1305,6 +1311,16 @@ if test x$enable_wallet != xno; then
  fi
  fi
  +if test x$use_ebpf != xno; then
  + AC_CHECK_HEADER([sys/sdt.h], [have_sdt=yes], [have_sdt=no])
  +else
  + have_sdt=no
  +fi
  +
  +if test x$have_sdt = xyes; then
  + AC_DEFINE([ENABLE_TRACING], [1], [Define to 1 to enable eBPF user static defined tracepoints])
  +fi
  +
  dnl Check for libminiupnpc (optional)
  if test x$use_upnp != xno; then
  AC_CHECK_HEADERS(
  @@ -1700,6 +1716,7 @@ AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows])
  AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet = xyes])
  AM_CONDITIONAL([USE_SQLITE], [test "x$use_sqlite" = "xyes"])
  AM_CONDITIONAL([USE_BDB], [test "x$use_bdb" = "xyes"])
  +AM_CONDITIONAL([ENABLE_TRACING],[test x$have_sdt = xyes])
  AM_CONDITIONAL([ENABLE_TESTS],[test x$BUILD_TEST = xyes])
  AM_CONDITIONAL([ENABLE_FUZZ],[test x$enable_fuzz = xyes])
  AM_CONDITIONAL([ENABLE_FUZZ_LINK_ALL],[test x$enable_danger_fuzz_link_all = xyes])
  @@ -1874,6 +1891,7 @@ echo " with bench = $use_bench"
  echo " with upnp = $use_upnp"
  echo " with natpmp = $use_natpmp"
  echo " use asm = $use_asm"
  +echo " ebpf tracing = $have_sdt"
  echo " sanitizers = $use_sanitizers"
  echo " debug enabled = $enable_debug"
  echo " gprof enabled = $enable_gprof"
  