lttng: Add informational messages to configure.ac

Signed-off-by: Adam Crume <adamcrume@gmail.com>
This commit is contained in:
Adam Crume 2014-08-18 10:58:04 -07:00 committed by Sage Weil
parent 230c5b8e7f
commit 3f1917c094

View File

@ -801,6 +801,7 @@ AC_CHECK_TYPES([__u8, __s8, __u16, __s16, __u32, __s32, __u64, __s64, __le16,
dnl Old versions of lttng-gen-tp leave out includes, and they break our stuff.
AC_MSG_CHECKING([if lttng-gen-tp is sane])
lttng_gen_tp_dir=`mktemp -d`
echo "#include <foo-inc.h>" > "$lttng_gen_tp_dir/foo.tp"
if ( ( cd "$lttng_gen_tp_dir" && lttng-gen-tp foo.tp -o foo.h && grep "#include <foo-inc.h>" foo.h ) > /dev/null 2>&1 ) ; then
@ -809,14 +810,15 @@ else
have_good_lttng_gen_tp=no
fi
rm -rf "$lttng_gen_tp_dir"
AC_MSG_RESULT([$have_good_lttng_gen_tp])
AC_CHECK_HEADERS([babeltrace/ctf/events.h babeltrace/babeltrace.h])
AC_ARG_WITH([lttng],
[AS_HELP_STRING([--with-lttng], [Trace with LTTng])])
AS_IF([test "x$with_lttng" = "xno"], [use_lttng=no],
[test "x$with_lttng" = "xyes"], [use_lttng=yes],
[test "x$ac_cv_header_babeltrace_ctf_events_h$ac_cv_header_babeltrace_babeltrace_h$have_good_lttng_gen_tp" = "xyesyesyes"], [use_lttng=yes],
[use_lttng=no])
[test "x$ac_cv_header_babeltrace_ctf_events_h$ac_cv_header_babeltrace_babeltrace_h$have_good_lttng_gen_tp" = "xyesyesyes"], [use_lttng=yes; AC_MSG_NOTICE([lttng auto-enabled])],
[use_lttng=no; AC_MSG_NOTICE([lttng auto-disabled])])
AM_CONDITIONAL([WITH_LTTNG], test x"$use_lttng" = x"yes")
AM_COND_IF([WITH_LTTNG], [
AC_DEFINE([WITH_LTTNG], [1], [Define if you want to use LTTng])