diff options
author | Eelco Chaudron <echaudro@redhat.com> | 2021-12-22 10:16:25 +0100 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2022-01-18 00:46:07 +0100 |
commit | 191013cae99e146292b7ea34bf3c4aaa3bb54832 (patch) | |
tree | 0e26f941f23cefbc0c341f4c798f45697861a0c0 /m4 | |
parent | 844f141814776712cf26b8ed2de92b3071b0e0ae (diff) | |
download | openvswitch-191013cae99e146292b7ea34bf3c4aaa3bb54832.tar.gz |
configure: Add --enable-usdt-probes option to enable USDT probes.
Allow inclusion of User Statically Defined Trace (USDT) probes
in the OVS binaries using the --enable-usdt-probes option to the
./configure script.
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Acked-by: Paolo Valerio <pvalerio@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'm4')
-rw-r--r-- | m4/openvswitch.m4 | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4 index 772825a71..4c3bace6e 100644 --- a/m4/openvswitch.m4 +++ b/m4/openvswitch.m4 @@ -60,6 +60,34 @@ AC_DEFUN([OVS_CHECK_NDEBUG], [ndebug=false]) AM_CONDITIONAL([NDEBUG], [test x$ndebug = xtrue])]) +dnl Checks for --enable-usdt-probes and defines HAVE_USDT if it is specified. +AC_DEFUN([OVS_CHECK_USDT], [ + AC_ARG_ENABLE( + [usdt-probes], + [AC_HELP_STRING([--enable-usdt-probes], + [Enable User Statically Defined Tracing (USDT) probes])], + [case "${enableval}" in + (yes) usdt=true ;; + (no) usdt=false ;; + (*) AC_MSG_ERROR([bad value ${enableval} for --enable-usdt-probes]) ;; + esac], + [usdt=false]) + + AC_MSG_CHECKING([whether USDT probes are enabled]) + if test "$usdt" != true; then + AC_MSG_RESULT([no]) + else + AC_MSG_RESULT([yes]) + + AC_CHECK_HEADER([sys/sdt.h], [], + [AC_MSG_ERROR([unable to find sys/sdt.h needed for USDT support])]) + + AC_DEFINE([HAVE_USDT_PROBES], [1], + [Define to 1 if USDT probes are enabled.]) + fi + AM_CONDITIONAL([HAVE_USDT_PROBES], [test $usdt = true]) +]) + dnl Checks for MSVC x64 compiler. AC_DEFUN([OVS_CHECK_WIN64], [AC_CACHE_CHECK( |