@@ -129,6 +129,12 @@ AC_ARG_WITH([bdb],
129129 [ use_bdb=$withval] ,
130130 [ use_bdb=auto] )
131131
132+ AC_ARG_ENABLE ( [ ebpf] ,
133+ [ AS_HELP_STRING ( [ --enable-ebpf] ,
134+ [ enable eBPF tracing (default is yes if sys/sdt.h is found)] ) ] ,
135+ [ use_ebpf=$enableval] ,
136+ [ use_ebpf=yes] )
137+
132138AC_ARG_WITH ( [ miniupnpc] ,
133139 [ AS_HELP_STRING ( [ --with-miniupnpc] ,
134140 [ enable UPNP (default is yes if libminiupnpc is found)] ) ] ,
@@ -1256,6 +1262,16 @@ if test x$enable_wallet != xno; then
12561262 fi
12571263fi
12581264
1265+ if test x$use_ebpf != xno; then
1266+ AC_CHECK_HEADER ( [ sys/sdt.h] , [ have_sdt=yes] , [ have_sdt=no] )
1267+ else
1268+ have_sdt=no
1269+ fi
1270+
1271+ if test x$have_sdt = xyes; then
1272+ AC_DEFINE ( [ ENABLE_TRACING] , [ 1] , [ Define to 1 to enable eBPF user static defined tracepoints] )
1273+ fi
1274+
12591275dnl Check for libminiupnpc (optional)
12601276if test x$use_upnp != xno; then
12611277 AC_CHECK_HEADERS (
@@ -1610,6 +1626,7 @@ AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows])
16101626AM_CONDITIONAL([ ENABLE_WALLET] ,[ test x$enable_wallet = xyes] )
16111627AM_CONDITIONAL([ USE_SQLITE] , [ test "x$use_sqlite" = "xyes"] )
16121628AM_CONDITIONAL([ USE_BDB] , [ test "x$use_bdb" = "xyes"] )
1629+ AM_CONDITIONAL([ ENABLE_TRACING] ,[ test x$have_sdt = xyes] )
16131630AM_CONDITIONAL([ ENABLE_TESTS] ,[ test x$BUILD_TEST = xyes] )
16141631AM_CONDITIONAL([ ENABLE_FUZZ] ,[ test x$enable_fuzz = xyes] )
16151632AM_CONDITIONAL([ ENABLE_QT] ,[ test x$bitcoin_enable_qt = xyes] )
17681785echo " with bench = $use_bench"
17691786echo " with upnp = $use_upnp"
17701787echo " use asm = $use_asm"
1788+ echo " ebpf tracing = $have_sdt"
17711789echo " sanitizers = $use_sanitizers"
17721790echo " debug enabled = $enable_debug"
17731791echo " gprof enabled = $enable_gprof"
0 commit comments