]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
No need to link against rt and util on bionic
authorStéphane Graber <stgraber@ubuntu.com>
Thu, 3 Jan 2013 17:24:06 +0000 (12:24 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 9 Jan 2013 15:10:02 +0000 (10:10 -0500)
When building on bionic, -lrt and -lutil only cause a build failure.
Dropping those fixes the build, so it appears that the symbols are defined
in the main library.

This commit moves -lrt and -lutil under a !IS_BIONIC check.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/Makefile.am

index ef02b6dd1322022758388faf04fe81e0188221fc..4dec533db6502caa4ac48174500cb3806ec106f6 100644 (file)
@@ -94,7 +94,11 @@ liblxc_so_LDFLAGS = \
        -shared \
        -Wl,-soname,liblxc.so.$(firstword $(subst ., ,$(VERSION)))
 
-liblxc_so_LDADD = -lutil $(CAP_LIBS) $(APPARMOR_LIBS) $(SECCOMP_LIBS) -lrt
+liblxc_so_LDADD = $(CAP_LIBS) $(APPARMOR_LIBS) $(SECCOMP_LIBS)
+
+if !IS_BIONIC
+liblxc_so_LDADD += -lutil -lrt
+endif
 
 bin_SCRIPTS = \
        lxc-ps \
@@ -140,7 +144,11 @@ AM_LDFLAGS = -Wl,-E
 if ENABLE_RPATH
 AM_LDFLAGS += -Wl,-rpath -Wl,$(libdir)
 endif
-LDADD=liblxc.so @CAP_LIBS@ @APPARMOR_LIBS@ @SECCOMP_LIBS@ -lrt
+LDADD=liblxc.so @CAP_LIBS@ @APPARMOR_LIBS@ @SECCOMP_LIBS@
+
+if !IS_BIONIC
+LDADD += -lrt
+endif
 
 lxc_attach_SOURCES = lxc_attach.c
 lxc_cgroup_SOURCES = lxc_cgroup.c