X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=configure.ac;h=c2176cb4e6cb5bff3431af03c0a778769bbda04f;hb=aff0fa7248c73edb8e02578c83e338716cf695ec;hp=dc7c87c4d8818554402f295e15983f04404d789c;hpb=1a1986cee77301b30e22b83a57a9d20224ff08e7;p=lttng-tools.git diff --git a/configure.ac b/configure.ac index dc7c87c4d..c2176cb4e 100644 --- a/configure.ac +++ b/configure.ac @@ -557,18 +557,18 @@ AC_ARG_WITH([lttng-ust], [with_lttng_ust=yes] ) -AS_IF([test "x$with_lttng_ust" = "xyes"], - [ - AC_CHECK_LIB([lttng-ust-ctl], [lttng_ust_enum_get_from_desc], - [ - AC_DEFINE([HAVE_LIBLTTNG_UST_CTL], [1]) - ], - [ - AC_MSG_FAILURE([Cannot find LTTng-UST >= 2.11.x. Use [LDFLAGS]=-Ldir and [CPPFLAGS]=-Idir to specify its location, or specify --without-lttng-ust to build lttng-tools without LTTng-UST support.]) - ] - ) - ] -) +AS_IF([test "x$with_lttng_ust" = "xyes"], [ + AC_DEFINE([HAVE_LIBLTTNG_UST_CTL], [1]) + + # Check for liblttng-ust + PKG_CHECK_MODULES([UST], [lttng-ust >= $major_version.$minor_version]) + + # Check for liblttng-ust-ctl + PKG_CHECK_MODULES([UST_CTL], [lttng-ust-ctl >= $major_version.$minor_version]) + + AM_CPPFLAGS="$AM_CPPFLAGS $UST_CFLAGS" +]) + AM_CONDITIONAL([HAVE_LIBLTTNG_UST_CTL], [test "x$with_lttng_ust" = "xyes"])