]> 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>
Tue, 3 Jun 2014 14:11:05 +0000 (10:11 -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 8865bc858ee605e040c02aed29171032bea6081f..8185f3a58328cbd4d7452f439660c822001a666c 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])