]> xenbits.xensource.com Git - libvirt.git/commitdiff
Allow building lxc without virt-login-shell
authorCédric Bosdonnat <cbosdonnat@suse.com>
Mon, 9 Nov 2015 22:36:40 +0000 (15:36 -0700)
committerCédric Bosdonnat <cbosdonnat@suse.com>
Thu, 17 Dec 2015 14:49:06 +0000 (15:49 +0100)
Add a configure option to disable virt-login-shell build even if lxc is
enabled.

configure.ac
m4/virt-login-shell.m4 [new file with mode: 0644]
src/Makefile.am
tools/Makefile.am

index 928fcb4cb21d537211c5019f84271c855f05e5ed..a566f5b0152eca6829c6db0d64e3380f80e77791 100644 (file)
@@ -1085,6 +1085,14 @@ if test "$with_lxc" = "yes" ; then
 fi
 AM_CONDITIONAL([WITH_LXC], [test "$with_lxc" = "yes"])
 
+dnl
+dnl Check for virt-login-shell
+dnl
+
+LIBVIRT_CHECK_LOGIN_SHELL
+
+AM_CONDITIONAL([WITH_SETUID_RPC_CLIENT], [test "$with_lxc$with_login_shell" != "nono"])
+
 dnl
 dnl Checks for the Parallels driver
 dnl
@@ -2985,6 +2993,7 @@ AC_MSG_NOTICE([      Init script: $with_init_script])
 AC_MSG_NOTICE([Char device locks: $with_chrdev_lock_files])
 AC_MSG_NOTICE([   Default Editor: $DEFAULT_EDITOR])
 AC_MSG_NOTICE([     Loader/NVRAM: $with_loader_nvram])
+AC_MSG_NOTICE([ virt-login-shell: $with_login_shell])
 AC_MSG_NOTICE([])
 AC_MSG_NOTICE([Developer Tools])
 AC_MSG_NOTICE([])
diff --git a/m4/virt-login-shell.m4 b/m4/virt-login-shell.m4
new file mode 100644 (file)
index 0000000..0701054
--- /dev/null
@@ -0,0 +1,27 @@
+dnl Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
+dnl
+dnl This library is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU Lesser General Public
+dnl License as published by the Free Software Foundation; either
+dnl version 2.1 of the License, or (at your option) any later version.
+dnl
+dnl This library is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl Lesser General Public License for more details.
+dnl
+dnl You should have received a copy of the GNU Lesser General Public
+dnl License along with this library.  If not, see
+dnl <http://www.gnu.org/licenses/>.
+
+AC_DEFUN([LIBVIRT_CHECK_LOGIN_SHELL], [
+  AC_ARG_WITH([login_shell],
+    [AS_HELP_STRING([--with-login-shell],
+      [build virt-login-shell @<:@default=yes@:>@])])
+  m4_divert_text([DEFAULTS], [with_login_shell=yes])
+
+  if test "$with_login_shell" ; then
+      AC_DEFINE_UNQUOTED([WITH_LOGIN_SHELL], 1, [whether virt-login-shell is built])
+  fi
+  AM_CONDITIONAL([WITH_LOGIN_SHELL], [test "$with_login_shell" = "yes"])
+])
index 7219f7c5635a74956325178f2ac686091dfa3a75..af22fc17ba5261d4fab98f9cda1f9706f7d5f408 100644 (file)
@@ -2283,7 +2283,7 @@ libvirt_lxc_la_LIBADD = libvirt.la $(CYGWIN_EXTRA_LIBADD)
 # have a RPC client for local UNIX socket access only. We use
 # the ../config-post.h header to disable all external deps that
 # we don't want
-if WITH_LXC
+if WITH_SETUID_RPC_CLIENT
 noinst_LTLIBRARIES += libvirt-setuid-rpc-client.la
 
 libvirt_setuid_rpc_client_la_SOURCES =                 \
@@ -2360,7 +2360,7 @@ libvirt_setuid_rpc_client_la_CFLAGS =             \
                $(SECDRIVER_CFLAGS)             \
                $(XDR_CFLAGS)                   \
                $(NULL)
-endif WITH_LXC
+endif WITH_SETUID_RPC_CLIENT
 
 lockdriverdir = $(libdir)/libvirt/lock-driver
 lockdriver_LTLIBRARIES =
index 9180564d0b025feb517e034019df5f67acf0cf30..d39f2ba415b0643316a14d8b770cbafa8505ace5 100644 (file)
@@ -71,12 +71,12 @@ sbin_SCRIPTS = virt-sanlock-cleanup
 DISTCLEANFILES += virt-sanlock-cleanup
 endif WITH_SANLOCK
 
-if WITH_LXC
+if WITH_LOGIN_SHELL
 conf_DATA += virt-login-shell.conf
 bin_PROGRAMS += virt-login-shell
-else ! WITH_LXC
+else ! WITH_LOGIN_SHELL
 EXTRA_DIST += virt-login-shell.conf
-endif ! WITH_LXC
+endif ! WITH_LOGIN_SHELL
 
 
 dist_man1_MANS = \
@@ -85,11 +85,11 @@ dist_man1_MANS = \
                virt-xml-validate.1 \
                virsh.1 \
                virt-admin.1
-if WITH_LXC
+if WITH_LOGIN_SHELL
 dist_man1_MANS += virt-login-shell.1
-else ! WITH_LXC
+else ! WITH_LOGIN_SHELL
 EXTRA_DIST += virt-login-shell.1
-endif ! WITH_LXC
+endif ! WITH_LOGIN_SHELL
 if WITH_SANLOCK
 dist_man8_MANS = virt-sanlock-cleanup.8
 endif WITH_SANLOCK