From 6be9efc138f42a3247b242198d0284dfedb67a59 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Thu, 20 Dec 2018 15:22:40 -0500 Subject: [PATCH] Use config.h to define SONAME major number Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- configure.ac | 2 +- liblttng-ust/Makefile.am | 2 -- liblttng-ust/lttng-ust-comm.c | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index f2be2868..f9ee053f 100644 --- a/configure.ac +++ b/configure.ac @@ -25,7 +25,7 @@ m4_define([UST_LIB_V_MINOR], [0]) m4_define([UST_LIB_V_PATCH], [0]) AC_SUBST([LTTNG_UST_LIBRARY_VERSION], [UST_LIB_V_MAJOR:UST_LIB_V_MINOR:UST_LIB_V_PATCH]) -AC_SUBST([LTTNG_UST_LIBRARY_VERSION_MAJOR], [UST_LIB_V_MAJOR]) +AC_DEFINE([CONFIG_LTTNG_UST_LIBRARY_VERSION_MAJOR], [UST_LIB_V_MAJOR], [Major SONAME number of the ust library]) # note: remember to update tracepoint.h dlopen() to match this version # number. TODO: eventually automate by exporting the major number. diff --git a/liblttng-ust/Makefile.am b/liblttng-ust/Makefile.am index ea4c8f61..15655280 100644 --- a/liblttng-ust/Makefile.am +++ b/liblttng-ust/Makefile.am @@ -63,8 +63,6 @@ liblttng_ust_runtime_la_SOURCES = \ string-utils.c \ string-utils.h -liblttng_ust_runtime_la_CFLAGS = -DLTTNG_UST_LIBRARY_VERSION_MAJOR=\"$(LTTNG_UST_LIBRARY_VERSION_MAJOR)\" - if HAVE_PERF_EVENT liblttng_ust_runtime_la_SOURCES += \ lttng-context-perf-counters.c \ diff --git a/liblttng-ust/lttng-ust-comm.c b/liblttng-ust/lttng-ust-comm.c index a09f676a..eab2d8eb 100644 --- a/liblttng-ust/lttng-ust-comm.c +++ b/liblttng-ust/lttng-ust-comm.c @@ -61,7 +61,7 @@ #include "getenv.h" /* Concatenate lttng ust shared library name with its major version number. */ -#define LTTNG_UST_LIB_SO_NAME "liblttng-ust.so." LTTNG_UST_LIBRARY_VERSION_MAJOR +#define LTTNG_UST_LIB_SO_NAME "liblttng-ust.so." __ust_stringify(CONFIG_LTTNG_UST_LIBRARY_VERSION_MAJOR) /* * Has lttng ust comm constructor been called ? -- 2.34.1