[lxc-devel] [PATCH 5/3] configure.ac: don't let -lcgmanager end up in LIBS

Serge Hallyn serge.hallyn at ubuntu.com
Tue May 20 19:08:04 UTC 2014


AC_SEARCH_LIBS always places the library being queried into LIBS.  We
don't want that - we were only checking whether a function is
available.  Not everything (notably not init.lxc.static) needs to
link against -lcgmanager.

Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
---
 configure.ac | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configure.ac b/configure.ac
index 8865bc8..8185f3a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -257,7 +257,9 @@ AM_COND_IF([ENABLE_CGMANAGER],
 	])
 
 AC_MSG_CHECKING(for get_pid_cgroup_abs_sync)
+save_LIBS=$LIBS
 AC_SEARCH_LIBS([cgmanager_get_pid_cgroup_abs_sync], [cgmanager], [have_abs_cgroups=yes], [have_abs_cgroups=no], [-lnih -lnih-dbus -ldbus-1])
+LIBS=$save_LIBS
 if test "x$have_abs_cgroups" = "xyes"; then
 	AC_DEFINE([HAVE_CGMANAGER_GET_PID_CGROUP_ABS_SYNC], 1, [Have cgmanager_get_pid_cgroup_abs_sync])
 	AC_MSG_RESULT([yes])
-- 
1.9.1



More information about the lxc-devel mailing list