Add STAP_PROBEV check ton configure.ac
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 10 Feb 2012 23:13:27 +0000 (18:13 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 10 Feb 2012 23:13:27 +0000 (18:13 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
configure.ac

index 77ba54afc22503dd26fd4996f193f7949a5e2e0f..41c5d6b5c2cb8f600a8eb59c6303ac87fe146b8e 100644 (file)
@@ -217,12 +217,20 @@ AC_ARG_WITH([sdt],
 )
 
 AS_IF([test "x$with_sdt" = "xyes"],[
-       AC_CHECK_HEADERS([sys/sdt.h], [
+       AC_MSG_CHECKING([STAP_PROBEV()])
+       AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+       #define SDT_USE_VARIADIC
+       #include <sys/sdt.h>
+       void fct(void)
+       {
+               STAP_PROBEV(provider,name,1,2,3,4,5,6,7,8,9,10);
+       }
+       ]])],[
+               AC_MSG_RESULT([yes])
                AC_DEFINE([LTTNG_UST_HAVE_SDT_INTEGRATION], [1])
        ],[
-               AC_MSG_ERROR([The sdt.h integration was requested
-but this header file cannot be found. Make sure it is installed
-or use CFLAGS=-I/path/ to specify a non-standard path to sys/sdt.h])
+               AC_MSG_RESULT([no])
+               AC_MSG_ERROR([The sdt.h integration was requested but the STAP_PROBEV define cannot be used. Make sure it is installed, and up to date, or use CFLAGS=-I/path/ to specify a non-standard path to sys/sdt.h])
        ])
 ])
 
This page took 0.025352 seconds and 4 git commands to generate.