build: detect sys/sdt.h for eBPF tracing
This commit is contained in:
1 parent
f3e17686b3
commit
933ab8a720
1 file changed
+18
@@ -129,6 +129,12 @@ AC_ARG_WITH([bdb],
|
|||||||
[use_bdb=$withval],
|
[use_bdb=$withval],
|
||||||
[use_bdb=auto])
|
[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],
|
AC_ARG_WITH([miniupnpc],
|
||||||
[AS_HELP_STRING([--with-miniupnpc],
|
[AS_HELP_STRING([--with-miniupnpc],
|
||||||
[enable UPNP (default is yes if libminiupnpc is found)])],
|
[enable UPNP (default is yes if libminiupnpc is found)])],
|
||||||
@@ -1256,6 +1262,16 @@ if test x$enable_wallet != xno; then
|
|||||||
fi
|
fi
|
||||||
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)
|
dnl Check for libminiupnpc (optional)
|
||||||
if test x$use_upnp != xno; then
|
if test x$use_upnp != xno; then
|
||||||
AC_CHECK_HEADERS(
|
AC_CHECK_HEADERS(
|
||||||
@@ -1610,6 +1626,7 @@ AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows])
|
|||||||
AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet = xyes])
|
AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet = xyes])
|
||||||
AM_CONDITIONAL([USE_SQLITE], [test "x$use_sqlite" = "xyes"])
|
AM_CONDITIONAL([USE_SQLITE], [test "x$use_sqlite" = "xyes"])
|
||||||
AM_CONDITIONAL([USE_BDB], [test "x$use_bdb" = "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_TESTS],[test x$BUILD_TEST = xyes])
|
||||||
AM_CONDITIONAL([ENABLE_FUZZ],[test x$enable_fuzz = xyes])
|
AM_CONDITIONAL([ENABLE_FUZZ],[test x$enable_fuzz = xyes])
|
||||||
AM_CONDITIONAL([ENABLE_QT],[test x$bitcoin_enable_qt = xyes])
|
AM_CONDITIONAL([ENABLE_QT],[test x$bitcoin_enable_qt = xyes])
|
||||||
@@ -1768,6 +1785,7 @@ fi
|
|||||||
echo " with bench = $use_bench"
|
echo " with bench = $use_bench"
|
||||||
echo " with upnp = $use_upnp"
|
echo " with upnp = $use_upnp"
|
||||||
echo " use asm = $use_asm"
|
echo " use asm = $use_asm"
|
||||||
|
echo " ebpf tracing = $have_sdt"
|
||||||
echo " sanitizers = $use_sanitizers"
|
echo " sanitizers = $use_sanitizers"
|
||||||
echo " debug enabled = $enable_debug"
|
echo " debug enabled = $enable_debug"
|
||||||
echo " gprof enabled = $enable_gprof"
|
echo " gprof enabled = $enable_gprof"
|
||||||
|
|||||||
Reference in new issue
Block a user