From 07ffb1303ef5833847e9cf38d5557aceda9cc5f4 Mon Sep 17 00:00:00 2001 From: Serge Hallyn Date: Mon, 2 Jun 2014 22:04:12 -0500 Subject: [PATCH] configure.ac: don't let -lcgmanager end up in LIBS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Acked-by: Stéphane Graber --- configure.ac | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure.ac b/configure.ac index 8865bc858..8185f3a58 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])