Port: Detect platforms where librt is required
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 3 Aug 2016 21:59:16 +0000 (17:59 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 5 Aug 2016 19:39:15 +0000 (15:39 -0400)
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
configure.ac
src/bin/lttng-consumerd/Makefile.am
src/bin/lttng-relayd/Makefile.am
src/bin/lttng-sessiond/Makefile.am
src/common/Makefile.am
src/common/sessiond-comm/Makefile.am

index aa4220de70739608db734aa7b87d2e991386d941..5cfe9731584b11e23b35a1d19934148611b67ad8 100644 (file)
@@ -127,6 +127,10 @@ AC_CHECK_FUNCS([ \
        strtoull dirfd gethostbyname2 getipnodebyname epoll_create1 \
 ])
 
+# Check if clock_gettime, timer_create, timer_settime, and timer_delete are available in lib rt, and if so,
+# add -lrt to LIBS
+AC_CHECK_LIB([rt], [clock_gettime, timer_create, timer_settime, timer_delete])
+
 # Babeltrace viewer check
 AC_ARG_WITH([babeltrace-bin],
        AS_HELP_STRING([--with-babeltrace-bin],
index 7c6b0275ec823a7eb23674926bc252824ee30b36..acb8d7d44b896ba639245cf8f6a4f05375e6cba8 100644 (file)
@@ -13,8 +13,7 @@ lttng_consumerd_LDADD = \
           $(top_builddir)/src/common/libcommon.la \
           $(top_builddir)/src/common/index/libindex.la \
           $(top_builddir)/src/common/health/libhealth.la \
-          $(top_builddir)/src/common/testpoint/libtestpoint.la \
-          -lrt
+          $(top_builddir)/src/common/testpoint/libtestpoint.la
 
 if HAVE_LIBLTTNG_UST_CTL
 lttng_consumerd_LDADD += -llttng-ust-ctl
index 07eb73223eb71c6c3ce062b518037ea710fd4fe7..4857074df266e51fb90795f34dd7ed47bedaf0fd 100644 (file)
@@ -23,7 +23,7 @@ lttng_relayd_SOURCES = main.c lttng-relayd.h utils.h utils.c cmd.h \
                        tracefile-array.c tracefile-array.h
 
 # link on liblttngctl for check if relayd is already alive.
-lttng_relayd_LDADD = -lrt -lurcu-common -lurcu \
+lttng_relayd_LDADD = -lurcu-common -lurcu \
                $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
                $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la \
                $(top_builddir)/src/common/hashtable/libhashtable.la \
index 29f48c9cc6670c0476134b0d17d69db320a7d903..4238661397275622c9cf79a6c8a9b1d6982a9894 100644 (file)
@@ -42,7 +42,7 @@ endif
 lttng_sessiond_SOURCES += lttng-sessiond.h main.c
 
 # link on liblttngctl for check if sessiond is already alive.
-lttng_sessiond_LDADD = -lrt -lurcu-common -lurcu \
+lttng_sessiond_LDADD = -lurcu-common -lurcu \
                $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la \
                $(top_builddir)/src/common/sessiond-comm/libsessiond-comm.la \
                $(top_builddir)/src/common/kernel-ctl/libkernel-ctl.la \
index 37c451a45e1f5734aedba1436a5f66c8297f3d51..e63ddeb73668f7a3cb6bb26a25e9d372b5b1ce36 100644 (file)
@@ -76,7 +76,6 @@ libcommon_la_SOURCES = error.h error.c utils.c utils.h runas.c runas.h \
                        filter.c filter.h context.c context.h
 
 libcommon_la_LIBADD = \
-               -lrt \
                $(top_builddir)/src/common/config/libconfig.la
 if LTTNG_BUILD_WITH_LIBUUID
 libcommon_la_LIBADD += -luuid
index 32ec058b3f925d68c01ec0a75cefcfc4443b15be..8f0a839b611416bbeb9313527398990fcd36992b 100644 (file)
@@ -6,4 +6,3 @@ noinst_LTLIBRARIES = libsessiond-comm.la
 libsessiond_comm_la_SOURCES = sessiond-comm.c sessiond-comm.h \
                               inet.c inet.h inet6.c inet6.h \
                               relayd.h agent.h
-libsessiond_comm_la_LIBADD = -lrt
This page took 0.028682 seconds and 4 git commands to generate.