From 55d52d490c1396ac26cbf08641fedb3d8859abfd Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Fri, 19 Feb 2021 10:51:46 -0500 Subject: [PATCH] Add detection of lttng-ctl with pkgconfig Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers Change-Id: Iec2ec191d86093e1bfd463f74b5060965359e4d1 --- configure.ac | 4 ++++ src/Makefile.am | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index d972fb8..ed14502 100644 --- a/configure.ac +++ b/configure.ac @@ -68,6 +68,10 @@ AC_CHECK_HEADERS([ \ stddef.h \ ]) +# Check for liblttng-ust +PKG_CHECK_MODULES([LTTNG_CTL], [lttng-ctl]) +AM_CFLAGS="$AM_CFLAGS $LTTNG_CTL_CFLAGS" + AM_CPPFLAGS="-include config.h" AC_SUBST(AM_CPPFLAGS) diff --git a/src/Makefile.am b/src/Makefile.am index 982379c..1e475eb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,4 +10,4 @@ bin_PROGRAMS = lttng-trace lttng_trace_SOURCES = \ lttng-trace.c -lttng_trace_LDADD = -llttng-ctl +lttng_trace_LDADD = $(LTTNG_CTL_LIBS) -- 2.39.5