summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac1
-rw-r--r--m4/openvswitch.m428
2 files changed, 29 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index eaa9bf7ee..3e72e28bf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -88,6 +88,7 @@ OVS_CHECK_WIN32
OVS_CHECK_VISUAL_STUDIO_DDK
OVS_CHECK_COVERAGE
OVS_CHECK_NDEBUG
+OVS_CHECK_USDT
OVS_CHECK_NETLINK
OVS_CHECK_OPENSSL
OVS_CHECK_LIBCAPNG
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(