Fix: use LIBDL/LIBC_DL to select either libdl or libc
authorVitaly Lipatov <lav@etersoft.ru>
Sat, 30 Jun 2018 09:07:21 +0000 (12:07 +0300)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Sat, 30 Jun 2018 17:26:54 +0000 (13:26 -0400)
Use LTTNG_UST_BUILD_WITH_LIBDL/LIBC_DL variables to choose between -ldl
and -lc.

Add a missing direct dependency against -ldl or -lc to
liblttng_ust_tracepoint_la_LIBADD.

Signed-off-by: Vitaly Lipatov <lav@etersoft.ru>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/Makefile.am

index a7edfd5c30291562d4ebb39a56674d5cfb78e385..57df3aedc9b3f04ad57c6530994e9a61609f2e57 100644 (file)
@@ -19,6 +19,13 @@ liblttng_ust_tracepoint_la_LIBADD = \
 liblttng_ust_tracepoint_la_LDFLAGS = -no-undefined -version-info $(LTTNG_UST_LIBRARY_VERSION)
 liblttng_ust_tracepoint_la_CFLAGS = -DUST_COMPONENT="liblttng_ust_tracepoint" $(AM_CFLAGS)
 
+if LTTNG_UST_BUILD_WITH_LIBDL
+liblttng_ust_tracepoint_la_LIBADD += -ldl
+endif
+if LTTNG_UST_BUILD_WITH_LIBC_DL
+liblttng_ust_tracepoint_la_LIBADD += -lc
+endif
+
 liblttng_ust_runtime_la_SOURCES = \
        lttng-ust-comm.c \
        lttng-ust-abi.c \
@@ -96,10 +103,16 @@ liblttng_ust_la_LIBADD = \
        -lpthread \
        -lrt \
        -lurcu-cds \
-       -ldl \
        $(top_builddir)/snprintf/libustsnprintf.la \
        $(top_builddir)/liblttng-ust-comm/liblttng-ust-comm.la \
        liblttng-ust-tracepoint.la \
        liblttng-ust-runtime.la liblttng-ust-support.la
 
+if LTTNG_UST_BUILD_WITH_LIBDL
+liblttng_ust_la_LIBADD += -ldl
+endif
+if LTTNG_UST_BUILD_WITH_LIBC_DL
+liblttng_ust_la_LIBADD += -lc
+endif
+
 liblttng_ust_la_CFLAGS = -DUST_COMPONENT="liblttng_ust" $(AM_CFLAGS)
This page took 0.02963 seconds and 4 git commands to generate.