From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx> In order to not have users of libtracecmd having to also include the includes and libraries for libtracefs and libraceevent, add a requires field for libtracefs to the libtracecmd.pc file. As libtracefs requires libtraceevent, it will pull that one in as well. Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx> --- libtracecmd.pc.template | 1 + scripts/utils.mk | 1 + 2 files changed, 2 insertions(+) diff --git a/libtracecmd.pc.template b/libtracecmd.pc.template index dc41076e..bcf4e39d 100644 --- a/libtracecmd.pc.template +++ b/libtracecmd.pc.template @@ -6,5 +6,6 @@ Name: libtracecmd URL: https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/ Description: Library for creating and reading trace-cmd data files Version: LIB_VERSION +Requires: libtracefs >= LIBTRACEFS_MIN_VERSION Cflags: -I${includedir} Libs: -L${libdir} -ltracecmd diff --git a/scripts/utils.mk b/scripts/utils.mk index 237b2fc9..6865a746 100644 --- a/scripts/utils.mk +++ b/scripts/utils.mk @@ -169,6 +169,7 @@ define do_make_pkgconfig_file sed -i "s|INSTALL_PREFIX|${1}|g" ${PKG_CONFIG_FILE}; \ sed -i "s|LIB_VERSION|${LIBTRACECMD_VERSION}|g" ${PKG_CONFIG_FILE}; \ sed -i "s|LIB_DIR|$(libdir)|g" ${PKG_CONFIG_FILE}; \ + sed -i "s|LIBTRACEFS_MIN_VERSION|$(LIBTRACEFS_MIN_VERSION)|g" ${PKG_CONFIG_FILE}; \ sed -i "s|HEADER_DIR|$(includedir)/trace-cmd|g" ${PKG_CONFIG_FILE}; endef -- 2.31.1