configure: Add --with-default-graphics option

Allows setting default graphics type in the gconf schema for new VMs.
This commit is contained in:
Cole Robinson 2011-03-24 08:59:41 -04:00
parent e76ce5336c
commit 0f8070d665
3 changed files with 14 additions and 2 deletions

View File

@ -80,6 +80,14 @@ AC_ARG_WITH([preferred-distros],
[PREFERRED_DISTROS=$withval],
[PREFERRED_DISTROS=""])
dnl Default graphics type (spice/vnc)
AC_ARG_WITH([--with-default-graphics],
AC_HELP_STRING(
[--with-default-graphics],
[default graphics type for new guests in gconf(spice or vnc) @<:@default=vnc@:>@]),
[DEFAULT_GRAPHICS=$withval],
[DEFAULT_GRAPHICS="vnc"])
dnl -----------------------
dnl Variable substitution
dnl -----------------------
@ -89,6 +97,7 @@ AC_SUBST([ENABLE_UNSUPPORTED_RHEL_OPTS])
AC_SUBST([PREFERRED_DISTROS])
AC_SUBST([LIBVIRT_PACKAGES])
AC_SUBST([KVM_PACKAGES])
AC_SUBST([DEFAULT_GRAPHICS])
AM_CONDITIONAL([INSTALL_TUI], [test "x$with_tui" = "xyes"])
@ -142,6 +151,7 @@ AC_MSG_NOTICE([KVM packages: none])
else
AC_MSG_NOTICE([KVM packages: $KVM_PACKAGES])
fi
AC_MSG_NOTICE([Default graphics: $DEFAULT_GRAPHICS])
AC_MSG_NOTICE([])
AC_MSG_NOTICE([])

View File

@ -49,7 +49,9 @@ endif
sed -e "s,::PACKAGE::,$(PACKAGE)," -e "s,::PREFIX::,$(prefix)," < $< > $@
%.schemas: $(srcdir)/%.schemas.in ${top_builddir}/config.status
sed -e "s,::PACKAGE::,$(PACKAGE)," < $< > $@
sed -e "s|::DEFAULT_GRAPHICS::|$(DEFAULT_GRAPHICS)|g" \
-e "s,::PACKAGE::,$(PACKAGE)," \
< $< > $@
%.py: $(srcdir)/%.py.in ${top_builddir}/config.status
sed -e "s,::PACKAGE::,$(PACKAGE)," \

View File

@ -200,7 +200,7 @@
<applyto>/apps/::PACKAGE::/new-vm/graphics-type</applyto>
<owner>::PACKAGE::</owner>
<type>string</type>
<default>vnc</default>
<default>::DEFAULT_GRAPHICS::</default>
<locale name="C">
<short>Install selected graphics type for new VM</short>