]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
configure.ac: don't let -lcgmanager end up in LIBS
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Tue, 3 Jun 2014 03:04:12 +0000 (22:04 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 4 Jun 2014 14:57:53 +0000 (10:57 -0400)
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@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
configure.ac

index 368d80f27ab77ea87ab65e59569a95ab7a5ce78c..d2304c239ad49958fe8a844e7c84b699e05a06b2 100644 (file)
@@ -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])