diff --git a/ChangeLog b/ChangeLog index 6156efc..223ed54 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,265 @@ +2012-09-17 Daniel P. Berrange + + Update for 0.5.4 releae + +2012-09-14 Daniel P. Berrange + + Use a more specific regex to fix enum include paths + Simply doing a search replace on $(srcdir) doesn't work very + well in non-VPATH builds. Use a more specific regex that won't + generate false matches + + Look in builddir for icons & strip build dir prefix from enum file includs + + Don't include generated icons in tar.gz and clean them up + + Convert to use Mingw64 toolchain for Windows biulds + +2012-08-13 Christophe Fergeau + + Document -f=auto-conf in remote-viewer --help + virt-viewer does not support -f=auto-conf so this does not change the + option there. + Fixes rhbz#718001 + +2012-08-10 Christophe Fergeau + + Use real binary name in help message + Now that we have 2 distinct binaries, remote-viewer and virt-viewer, + 'PACKAGE' can no longer be used in error messages as the name of the + binary. This causes a small inconsistency when running + 'remote-viewer --foobar' as the error message would be: + 'Unknown option --foobar + Run 'virt-viewer --help' to see a full list of available command line options' + + This commit makes sure we use argv[0] for this message. + Fixes rhbz#814150 + +2012-07-23 Marc-André Lureau + + Show status page by default if display not ready + Switch back to status page if display is not ready. + + Make status widget visible immediately + GtkNotebook will use the currently visible widget as default page. + If we don't show status widget before we append the display, the + current page will be on display. Quoting Gtk+ documentation: + + "Note that due to historical reasons, GtkNotebook refuses to switch to + a page unless the child widget is visible. Therefore, it is + recommended to show child widgets before adding them to a notebook." + + vnc: when session is disconnected, make the display as non-ready + + Simplify display flag handling + + Add VirtViewerSession::session-display-updated + Rebuild menu when agent is connected. Only when the agent is running + may a display be enabled/disabled. + + Make the display submenu insensitive if display can't be selected + + spice: factor out main channel lookup code + + Add VirtViewerDisplay::selectable property + This property will be set when the display can be selected to be + "enabled" and shown (this can involve creating/connecting an + additional guest monitor, and may need guest agent cooperation for + example). + + Add virt_viewer_window_get_display() + Getter used in following changes. + + Hook up handling of Monitors + Rely on spice-gtk display channel monitors property to manage + displays. The same display channel may now provide several monitors, + the SpiceDisplay widget must be told which monitor to display + + Bump glib > 2.22, add compat file + We use API from 2.22, and some from further version. Add + virt-glib-compat.h fallback file for those. + + Use SpiceDisplay:ready property instead of channel mark + The display can now check several conditions before the display can be + shown, use that instead of display mark, which was not high-level + enough. + + Number display starting from 1 + + Prevent from adding the same display several time in the session + In virt_viewer_session_spice_display_monitors(), we (re)add the + display unconditionnaly every time we receive a new MonitorConfig. + + Add a DISABLED display hint + This flag will help to track whether the display has been + removed/closed and whether it really has a valid display. + + Ready in contrast, is used to "hide" temporarily the display (when + starting or redrawing the display, to avoid artifacts) + + Use virt_viewer_connect_object() for display + When display is released, detach signal automatically. + + Fix various crash related to not cleaning up signal handlers properly, + due to no longer 1-1 only relation between display widget and channel. + + Rebuild display menu when a window is added or removed + + Mark a menu string as translatable + + Run-time check values before doing bad computation + + Turn display:show-hint into flags type + + Destroy dialog immediately after run + If the parent is already destroyed, it looks like the dialog is + destroyed too. This avoids a crash when calling app_quit(). + + build: generate enums type boilerplate + + spice: disconnect signal handlers when either object is destroyed + Use virt_viewer_signal_connect_object(), a copy of telepathy + utility function tp_g_signal_connect_object(). This function + will take care of removing signal handler if any of emitter or + attached object are destroyed. + + The following patches will have this condition met, since there is no + longer 1-1 relation between channel and display. The channels can + continue to be around when some of the display are removed. + + spice: improve fullscreen=auto-conf + Do keep client monitor position, do not align monitors automatically. + The align property is only available since v0.12.101. + +2012-07-03 Marc-André Lureau + + build: allow building with newer glibc-headers and -O0 + Fix copied from libvirt, commit by Eric Blake. + + glibc 2.15 (on Fedora 17) coupled with explicit disabling of + optimization during development dies a painful death: + + /usr/include/features.h:314:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp] + + Work around this by only conditionally defining _FORTIFY_SOURCE, + in the case where glibc can actually use it. The trick is using + AH_VERBATIM instead of AC_DEFINE. + +2012-06-15 Christophe Fergeau + + Revert "Fix virt_viewer_app_activate return value" + This reverts commit 3ce6df7c309068f36e2602692da809a153ed5688. This + commit broke virt-viewer which expects this function to return -1 + or 0 on error, and a positive value on success in + virt_viewer_initial_connect. + +2012-06-13 Christophe Fergeau + + Fix virt_viewer_app_activate return value + VirtViewerApp::activate is expected to return -1 on errors. + It calls the VirtViewerSession::open_* methods, which return FALSE + on error. However, VirtViewerApp::activate directly returns these + boolean instead of testing the returned value and properly returning + -1 on errors. This caused errors in these open methodes to be ignored. + + Fix various memory leaks + ==25063== 59 bytes in 1 blocks are definitely lost in loss record 5,163 of 9,502 + ==25063== at 0x4A0884D: malloc (vg_replace_malloc.c:263) + ==25063== by 0x3DE384D2BE: g_malloc (gmem.c:159) + ==25063== by 0x3DE3862D0B: g_strdup (gstrfuncs.c:356) + ==25063== by 0x41F40A: connected (remote-viewer-main.c:186) + ==25063== by 0x3DE400F663: g_closure_invoke (gclosure.c:777) + ==25063== by 0x3DE40206D7: signal_emit_unlocked_R (gsignal.c:3547) + ==25063== by 0x3DE402866C: g_signal_emit_valist (gsignal.c:3296) + ==25063== by 0x3DE4028CCF: g_signal_emit_by_name (gsignal.c:3389) + ==25063== by 0x41AA53: reemit_signal_VOID (virt-viewer-session-ovirt.c:211) + ==25063== by 0x3DE400F942: _g_closure_invoke_va (gclosure.c:840) + ==25063== by 0x3DE4027D87: g_signal_emit_valist (gsignal.c:3207) + ==25063== by 0x3DE4028CCF: g_signal_emit_by_name (gsignal.c:3389) + + ==25063== 14 bytes in 1 blocks are definitely lost in loss record 623 of 9,502 + ==25063== at 0x4A0884D: malloc (vg_replace_malloc.c:263) + ==25063== by 0x34561092F7: __vasprintf_chk (vasprintf_chk.c:82) + ==25063== by 0x3DE3882F1A: g_vasprintf (stdio2.h:199) + ==25063== by 0x3DE3862EDC: g_strdup_vprintf (gstrfuncs.c:509) + ==25063== by 0x3DE3862F7B: g_strdup_printf (gstrfuncs.c:535) + ==25063== by 0x40CBAE: virt_viewer_app_update_pretty_address (virt-viewer-app.c:1538) + ==25063== by 0x40FB55: virt_viewer_app_free_connect_info (virt-viewer-app.c:1707) + ==25063== by 0x40FBE9: virt_viewer_app_dispose (virt-viewer-app.c:1291) + ==25063== by 0x3DE40144F7: g_object_unref (gobject.c:2981) + ==25063== by 0x40C31A: main (remote-viewer-main.c:336) + + ==25063== 10 bytes in 1 blocks are definitely lost in loss record 491 of 9,502 + ==25063== at 0x4A0884D: malloc (vg_replace_malloc.c:263) + ==25063== by 0x34561092F7: __vasprintf_chk (vasprintf_chk.c:82) + ==25063== by 0x3DE3882F1A: g_vasprintf (stdio2.h:199) + ==25063== by 0x3DE3862EDC: g_strdup_vprintf (gstrfuncs.c:509) + ==25063== by 0x3DE3862F7B: g_strdup_printf (gstrfuncs.c:535) + ==25063== by 0x40DE36: window_update_menu_displays_cb (virt-viewer-app.c:1640) + ==25063== by 0x3DE383833F: g_hash_table_foreach (ghash.c:1524) + ==25063== by 0x3DE400F663: g_closure_invoke (gclosure.c:777) + ==25063== by 0x3DE40206D7: signal_emit_unlocked_R (gsignal.c:3547) + ==25063== by 0x3DE402866C: g_signal_emit_valist (gsignal.c:3296) + ==25063== by 0x3DE40287C1: g_signal_emit (gsignal.c:3352) + ==25063== by 0x5772F95: gtk_widget_show (gtkwidget.c:3225) + + ==25063== 8,431 (72 direct, 8,359 indirect) bytes in 1 blocks are definitely lost in loss record 9,468 of 9,502 + ==25063== at 0x4A0884D: malloc (vg_replace_malloc.c:263) + ==25063== by 0x3DE384D2BE: g_malloc (gmem.c:159) + ==25063== by 0x3DE38616B1: g_slice_alloc (gslice.c:1003) + ==25063== by 0x3DE3861C05: g_slice_alloc0 (gslice.c:1029) + ==25063== by 0x3DE402F96F: g_type_create_instance (gtype.c:1872) + ==25063== by 0x3DE40147A7: g_object_constructor (gobject.c:1849) + ==25063== by 0x3DE4016260: g_object_newv (gobject.c:1632) + ==25063== by 0x3DE40168AB: g_object_new (gobject.c:1542) + ==25063== by 0x40C4BD: virt_viewer_util_load_ui (virt-viewer-util.c:41) + ==25063== by 0x40C7EB: virt_viewer_auth_collect_credentials (virt-viewer-auth.c:43) + ==25063== by 0x41B391: authenticate_cb (virt-viewer-session-ovirt.c:430) + ==25063== by 0x3458C05E8F: ffi_call_unix64 (unix64.S:75) + + ==25063== 32 (16 direct, 16 indirect) bytes in 1 blocks are definitely lost in loss record 3,962 of 9,502 + ==25063== at 0x4A0884D: malloc (vg_replace_malloc.c:263) + ==25063== by 0x3DE384D2BE: g_malloc (gmem.c:159) + ==25063== by 0x3DE38616B1: g_slice_alloc (gslice.c:1003) + ==25063== by 0x3DE38629F2: g_slist_append (gslist.c:222) + ==25063== by 0x41483C: virt_viewer_window_init (virt-viewer-window.c:323) + ==25063== by 0x3DE402FA05: g_type_create_instance (gtype.c:1892) + ==25063== by 0x3DE40147A7: g_object_constructor (gobject.c:1849) + ==25063== by 0x3DE4015D70: g_object_newv (gobject.c:1713) + ==25063== by 0x3DE401655F: g_object_new_valist (gobject.c:1830) + ==25063== by 0x3DE4016893: g_object_new (gobject.c:1545) + ==25063== by 0x40DA34: virt_viewer_app_window_new (virt-viewer-app.c:590) + ==25063== by 0x40E300: virt_viewer_app_constructor (virt-viewer-app.c:1336) + + ==30355== 4 bytes in 1 blocks are definitely lost in loss record 53 of 9,267 + ==30355== at 0x4A0884D: malloc (vg_replace_malloc.c:263) + ==30355== by 0x3DE384D2BE: g_malloc (gmem.c:159) + ==30355== by 0x3DE3862D0B: g_strdup (gstrfuncs.c:356) + ==30355== by 0x3DE40360FC: value_copy_string (gvaluetypes.c:276) + ==30355== by 0x3DE40340CA: g_value_transform (gvalue.c:535) + ==30355== by 0x3FDAE621DD: gdk_screen_get_setting (gdkevents-x11.c:3022) + ==30355== by 0x3FDB3C7415: gtk_settings_get_property (gtksettings.c:1152) + ==30355== by 0x3DE4017A74: g_object_get_property (gobject.c:1289) + ==30355== by 0x414991: virt_viewer_window_disable_modifiers (virt-viewer-window.c:616) + ==30355== by 0x415922: virt_viewer_window_keyboard_grab (virt-viewer-window.c:931) + ==30355== by 0x3DE400F942: _g_closure_invoke_va (gclosure.c:840) + ==30355== by 0x3DE4027D87: g_signal_emit_valist (gsignal.c:3207) + + Don't leak SPICE ticket + +2012-05-17 Marc-André Lureau + + spice: use weak references to display channel + Fix switch-host migration with Spice. + + spice-gtk doesn't like channels staying around when they should be + destroyed/finalized, ie removed from session. + + spice-gtk should probably learned to handle better the case of non + cooperating clients, and be able to dissociate a channel from a + session without waiting for it to be disposed, but for now, the + relation is quite tight. + 2012-05-15 Daniel P. Berrange Avoid use of deprecated GTK3 pointer APIs diff --git a/INSTALL b/INSTALL index a1e89e1..6e90e07 100644 --- a/INSTALL +++ b/INSTALL @@ -1,7 +1,7 @@ Installation Instructions ************************* -Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, +Copyright (C) 1994-1996, 1999-2002, 2004-2012 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, @@ -309,9 +309,10 @@ overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: - - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash +an Autoconf limitation. Until the limitation is lifted, you can use +this workaround: + + CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== @@ -367,4 +368,3 @@ `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. - diff --git a/Makefile.in b/Makefile.in index c827528..ca42301 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +14,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,10 +52,15 @@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(srcdir)/mingw32-virt-viewer.spec.in \ - $(srcdir)/virt-viewer.spec.in $(top_srcdir)/configure AUTHORS \ - COPYING ChangeLog INSTALL NEWS build-aux/compile \ - build-aux/config.guess build-aux/config.sub build-aux/depcomp \ + $(srcdir)/mingw-virt-viewer.spec.in \ + $(srcdir)/virt-viewer.spec.in $(top_srcdir)/build-aux/compile \ + $(top_srcdir)/build-aux/config.guess \ + $(top_srcdir)/build-aux/config.sub \ + $(top_srcdir)/build-aux/install-sh \ + $(top_srcdir)/build-aux/ltmain.sh \ + $(top_srcdir)/build-aux/missing $(top_srcdir)/configure \ + AUTHORS COPYING ChangeLog INSTALL NEWS build-aux/compile \ + build-aux/config.guess build-aux/config.sub \ build-aux/install-sh build-aux/ltmain.sh build-aux/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \ @@ -53,14 +74,20 @@ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = mingw32-virt-viewer.spec virt-viewer.spec +CONFIG_CLEAN_FILES = mingw-virt-viewer.spec virt-viewer.spec CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ @@ -70,13 +97,19 @@ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck + cscope distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags +CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) @@ -87,6 +120,7 @@ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi +am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -114,6 +148,7 @@ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best +DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -152,6 +187,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB2_CFLAGS = @GLIB2_CFLAGS@ GLIB2_LIBS = @GLIB2_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ @@ -388,7 +424,7 @@ distclean-hdr: -rm -f config.h stamp-h1 -mingw32-virt-viewer.spec: $(top_builddir)/config.status $(srcdir)/mingw32-virt-viewer.spec.in +mingw-virt-viewer.spec: $(top_builddir)/config.status $(srcdir)/mingw-virt-viewer.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ virt-viewer.spec: $(top_builddir)/config.status $(srcdir)/virt-viewer.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ @@ -403,12 +439,12 @@ -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ @@ -418,7 +454,11 @@ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -432,37 +472,6 @@ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ @@ -470,6 +479,10 @@ ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done +cscopelist-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -534,8 +547,32 @@ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) + +clean-cscope: + -rm -f cscope.files + +cscope.files: clean-cscope cscopelist-recursive cscopelist + +cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) @@ -571,13 +608,10 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -609,40 +643,36 @@ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 - $(am__remove_distdir) + $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) + $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) + $(am__post_remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) + +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another @@ -653,8 +683,6 @@ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ @@ -666,7 +694,7 @@ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) + chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) @@ -700,7 +728,7 @@ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 - $(am__remove_distdir) + $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' @@ -837,12 +865,14 @@ uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ - ctags-recursive install-am install-strip tags-recursive + cscopelist-recursive ctags-recursive install-am install-strip \ + tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-generic \ - clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-hook dist-lzip dist-lzma dist-shar dist-tarZ \ + all all-am am--refresh check check-am clean clean-cscope \ + clean-generic clean-libtool cscope cscopelist \ + cscopelist-recursive ctags ctags-recursive dist dist-all \ + dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar dist-tarZ \ dist-xz dist-zip distcheck distclean distclean-generic \ distclean-hdr distclean-libtool distclean-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ diff --git a/NEWS b/NEWS index 6768f78..47e23f6 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,20 @@ Virt Viewer News ================ + +0.5.4: Sep 17, 2012 +------------------- + + - Fix host migration with Spice + - Fix misc memory leaks + - Fix build with newer glibc and -O0 + - Improve automatic fullscreen Spice configuration + - Avoid crash when quiting application + - Rebuild display men whenever a window is added/removed + - Number displays starting from 1 instead of 0 + - Add support for handling multiple monitors with Spice + - Menu display menu insensitive if no displays can be selected + - Use real binary name in remote-viewer help message + - Document -f=auto-conf in remote-viewer help 0.5.3: May 14, 2012 ------------------- diff --git a/README b/README index 04df356..568540e 100644 --- a/README +++ b/README @@ -19,7 +19,7 @@ http://gtk-vnc.sourceforge.net/ -Virt Viewer uses the SPICE-GTK (>= 0.11) widget to provide a +Virt Viewer uses the SPICE-GTK (>= 0.12.101) widget to provide a display of the SPICE protocol, which is available from: http://spice-space.org/page/Spice-Gtk diff --git a/acinclude.m4 b/acinclude.m4 index 73b5a7b..0c308bc 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -19,7 +19,7 @@ warnCFLAGS= - try_compiler_flags="-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables" + try_compiler_flags="-fexceptions -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables" case "$enable_compile_warnings" in no) @@ -43,6 +43,13 @@ AC_MSG_ERROR(Unknown argument '$enable_compile_warnings' to --enable-compile-warnings) ;; esac + + AH_VERBATIM([FORTIFY_SOURCE], + [/* Enable compile-time and run-time bounds-checking, and some warnings. */ + #if defined __OPTIMIZE__ && __OPTIMIZE__ + # define _FORTIFY_SOURCE 2 + #endif + ]) compiler_flags= for option in $try_compiler_flags; do diff --git a/aclocal.m4 b/aclocal.m4 index eadb352..d77d5ab 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,8 +1,7 @@ -# generated automatically by aclocal 1.11.3 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, -# Inc. +# generated automatically by aclocal 1.12.2 -*- Autoconf -*- + +# Copyright (C) 1996-2012 Free Software Foundation, Inc. + # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -18,7 +17,7 @@ [m4_warning([this file was generated for autoconf 2.68. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. -To do so, use the procedure documented by the package, typically `autoreconf'.])]) +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 1995-2002 Free Software Foundation, Inc. # Copyright (C) 2001-2003,2004 Red Hat, Inc. @@ -648,14 +647,13 @@ fi[]dnl ])# PKG_CHECK_MODULES -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software -# Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 +# Copyright (C) 2002-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- @@ -663,10 +661,10 @@ # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' +[am__api_version='1.12' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.3], [], +m4_if([$1], [1.12.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -682,24 +680,24 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.3])dnl +[AM_AUTOMAKE_VERSION([1.12.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 +# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and @@ -718,7 +716,7 @@ # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you +# harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, @@ -744,22 +742,21 @@ # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 9 +# Copyright (C) 1997-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 10 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl @@ -778,16 +775,15 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, -# 2010, 2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 12 - -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 17 + +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing @@ -797,7 +793,7 @@ # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was @@ -810,12 +806,13 @@ AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], @@ -823,8 +820,8 @@ # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're @@ -864,16 +861,16 @@ : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -882,8 +879,8 @@ test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else @@ -891,7 +888,7 @@ fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -939,7 +936,7 @@ # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl @@ -949,9 +946,13 @@ # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' @@ -966,14 +967,13 @@ # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -#serial 5 +# Copyright (C) 1999-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 6 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ @@ -992,7 +992,7 @@ # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -1004,21 +1004,19 @@ continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` @@ -1036,7 +1034,7 @@ # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will +# is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], @@ -1044,8 +1042,7 @@ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# Free Software Foundation, Inc. +# Copyright (C) 1996-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1058,14 +1055,13 @@ # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 16 +# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 19 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. @@ -1111,31 +1107,41 @@ # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl +[AC_DIAGNOSE([obsolete], +[$0: two- and three-arguments forms are deprecated. For more info, see: +http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl @@ -1146,28 +1152,35 @@ [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +dnl Support for Objective C++ was only introduced in Autoconf 2.65, +dnl but we still cater to Autoconf 2.62. +m4_ifdef([AC_PROG_OBJCXX], +[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], @@ -1195,14 +1208,13 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, -# Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 +# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 # AM_PROG_INSTALL_SH # ------------------ @@ -1217,9 +1229,9 @@ install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +AC_SUBST([install_sh])]) + +# Copyright (C) 2003-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1242,13 +1254,13 @@ # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 4 +# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 5 # AM_MAKE_INCLUDE() # ----------------- @@ -1267,7 +1279,7 @@ _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -1292,8 +1304,7 @@ rm -f confinc confmf ]) -# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1329,14 +1340,13 @@ # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 6 +# Copyright (C) 1997-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 7 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ @@ -1366,49 +1376,19 @@ am_missing_run="$MISSING --run " else am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) + AC_MSG_WARN(['missing' script is too old or missing]) fi ]) -# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, -# Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software -# Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 +# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 6 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -1419,7 +1399,7 @@ # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ @@ -1435,22 +1415,18 @@ # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 5 +# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 9 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -1461,32 +1437,40 @@ esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$[2]" = conftest.file ) then @@ -1496,31 +1480,52 @@ AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi -AC_MSG_RESULT(yes)]) - -# Copyright (C) 2009, 2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) + +# Copyright (C) 2009-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT -# (`yes' being less verbose, `no' or empty being verbose). +# ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], -[ --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0')]) -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl -dnl A few `make' implementations (e.g., NonStop OS and NextStep) +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} @@ -1538,7 +1543,7 @@ am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then - dnl Using `$V' instead of `$(V)' breaks IRIX make. + dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else @@ -1555,37 +1560,37 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 1 +# Copyright (C) 2001-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 2 # AM_PROG_INSTALL_STRIP # --------------------- -# One issue with vendor `install' (even GNU) is that you can't +# One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize +# always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. +# Copyright (C) 2006-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1606,18 +1611,18 @@ # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. -# -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# serial 2 +# Copyright (C) 2004-2012 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 3 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory @@ -1640,7 +1645,7 @@ _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. +# Solaris sh will not grok spaces in the rhs of '-'. for _am_tool in $_am_tools do case $_am_tool in diff --git a/build-aux/compile b/build-aux/compile index b1f4749..7b4a9a7 100755 --- a/build-aux/compile +++ b/build-aux/compile @@ -1,10 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-01-04.17; # UTC - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free -# Software Foundation, Inc. +scriptversion=2012-03-05.13; # UTC + +# Copyright (C) 1999-2012 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -77,6 +76,48 @@ esac ;; esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi } # func_cl_wrapper cl arg... @@ -109,43 +150,34 @@ ;; esac ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; -l*) - lib=${1#-l} - found=no - save_IFS=$IFS - IFS=';' - for dir in $lib_path $LIB - do - IFS=$save_IFS - if $shared && test -f "$dir/$lib.dll.lib"; then - found=yes - set x "$@" "$dir/$lib.dll.lib" - break - fi - if test -f "$dir/$lib.lib"; then - found=yes - set x "$@" "$dir/$lib.lib" - break - fi - done - IFS=$save_IFS - - test "$found" != yes && set x "$@" "$lib.lib" - shift + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" ;; -L*) - func_file_conv "${1#-L}" - if test -z "$lib_path"; then - lib_path=$file - else - lib_path="$lib_path;$file" - fi - linker_opts="$linker_opts -LIBPATH:$file" + func_cl_dashL "${1#-L}" ;; -static) shared=false diff --git a/build-aux/config.guess b/build-aux/config.guess index 49ba16f..c0adba9 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. -timestamp='2012-01-01' +timestamp='2012-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -17,9 +17,7 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -863,6 +861,13 @@ i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -1251,7 +1256,7 @@ NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) @@ -1319,6 +1324,9 @@ exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx exit ;; esac diff --git a/build-aux/config.sub b/build-aux/config.sub index d6b6b3c..6205f84 100755 --- a/build-aux/config.sub +++ b/build-aux/config.sub @@ -4,7 +4,7 @@ # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. -timestamp='2012-01-01' +timestamp='2012-04-18' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -21,9 +21,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -132,6 +130,10 @@ os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] @@ -223,6 +225,12 @@ -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -247,6 +255,7 @@ # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ + | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ @@ -319,7 +328,7 @@ c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -332,7 +341,10 @@ strongarm | thumb | xscale) basic_machine=arm-unknown ;; - + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; xscaleeb) basic_machine=armeb-unknown ;; @@ -355,6 +367,7 @@ # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ + | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ @@ -1530,6 +1543,9 @@ c4x-* | tic4x-*) os=-coff ;; + hexagon-*) + os=-elf + ;; tic54x-*) os=-coff ;; diff --git a/build-aux/depcomp b/build-aux/depcomp index bd0ac08..debb6ff 100755 --- a/build-aux/depcomp +++ b/build-aux/depcomp @@ -1,10 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2011-12-04.11; # UTC - -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, -# 2011 Free Software Foundation, Inc. +scriptversion=2012-03-27.16; # UTC + +# Copyright (C) 1999-2012 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,7 +27,7 @@ case $1 in '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 + echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) @@ -40,8 +39,8 @@ Environment variables: depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. + source Source file read by 'PROGRAMS ARGS'. + object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. @@ -57,6 +56,12 @@ ;; esac +# A tabulation character. +tab=' ' +# A newline character. +nl=' +' + if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 @@ -100,6 +105,12 @@ # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 +fi + +if test "$depmode" = xlc; then + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. + gccflag=-qmakedep=gcc,-MF + depmode=gcc fi case "$depmode" in @@ -156,15 +167,14 @@ ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. +## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory + tr ' ' "$nl" < "$tmpdepfile" | +## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. @@ -203,18 +213,15 @@ # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the + # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ + tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> "$depfile" + tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ + tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else @@ -226,10 +233,17 @@ rm -f "$tmpdepfile" ;; +xlc) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the + # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` @@ -259,12 +273,11 @@ test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then - # Each line is of the form `foo.o: dependent.h'. + # Each line is of the form 'foo.o: dependent.h'. # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. + # '$object: dependent.h' and one to simply 'dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile @@ -275,23 +288,26 @@ ;; icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. + # However on + # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h - # which is wrong. We want: + # which is wrong. We want # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : + # and will wrap long lines using '\': # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... - + # tcc 0.9.26 (FIXME still under development at the moment of writing) + # will emit a similar output, but also prepend the continuation lines + # with horizontal tabulation characters. "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : @@ -300,15 +316,21 @@ exit $stat fi rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Each line is of the form 'foo.o: dependent.h', + # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" + # '$object: dependent.h' and one to simply 'dependent.h:'. + sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ + < "$tmpdepfile" > "$depfile" + sed ' + s/[ '"$tab"'][ '"$tab"']*/ /g + s/^ *// + s/ *\\*$// + s/^[^:]*: *// + /^$/d + /:$/d + s/$/ :/ + ' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; @@ -344,7 +366,7 @@ done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" - # Add `dependent.h:' lines. + # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// @@ -359,9 +381,9 @@ tru64) # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. + # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= @@ -407,8 +429,7 @@ done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi @@ -443,11 +464,11 @@ p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g -s/\(.*\)/ \1 \\/p +s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { - s/.*/ / + s/.*/'"$tab"'/ G p }' >> "$depfile" @@ -478,7 +499,7 @@ shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -498,15 +519,14 @@ done test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' + # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ + tr ' ' "$nl" < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" @@ -562,8 +582,7 @@ # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ + sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" @@ -583,7 +602,7 @@ shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -652,8 +671,8 @@ sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" + sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" + echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; diff --git a/build-aux/install-sh b/build-aux/install-sh index a9244eb..377bb86 100755 --- a/build-aux/install-sh +++ b/build-aux/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-01-19.21; # UTC +scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -35,7 +35,7 @@ # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it +# 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written @@ -156,7 +156,7 @@ -s) stripcmd=$stripprog;; -t) dst_arg=$2 - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac @@ -190,7 +190,7 @@ fi shift # arg dst_arg=$arg - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac @@ -202,7 +202,7 @@ echo "$0: no input file specified." >&2 exit 1 fi - # It's OK to call `install-sh -d' without argument. + # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi @@ -240,7 +240,7 @@ for src do - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac @@ -354,7 +354,7 @@ if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. + # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in diff --git a/build-aux/missing b/build-aux/missing index 86a8fc3..9a55648 100755 --- a/build-aux/missing +++ b/build-aux/missing @@ -1,10 +1,9 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2012-01-06.13; # UTC - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. +scriptversion=2012-01-06.18; # UTC + +# Copyright (C) 1996-2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -26,7 +25,7 @@ # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "Try '$0 --help' for more information" exit 1 fi @@ -34,7 +33,7 @@ sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' -# In the cases where this matters, `missing' is being run in the +# In the cases where this matters, 'missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac @@ -65,7 +64,7 @@ echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an +Handle 'PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: @@ -74,20 +73,20 @@ --run try to run the given command, and emulate it if it fails Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' + aclocal touch file 'aclocal.m4' + autoconf touch file 'configure' + autoheader touch file 'config.h.in' autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c + automake touch all 'Makefile.in' files + bison create 'y.tab.[ch]', if possible, from existing .[ch] + flex create 'lex.yy.c', if possible, from existing .c help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c + lex create 'lex.yy.c', if possible, from existing .c makeinfo touch the output file - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and -\`g' are ignored when checking the name. + yacc create 'y.tab.[ch]', if possible, from existing .[ch] + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. Send bug reports to ." exit $? @@ -99,8 +98,8 @@ ;; -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "$0: Unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; @@ -127,7 +126,7 @@ exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether + # running '$TOOL --version' or '$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi @@ -139,27 +138,27 @@ case $program in aclocal*) echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from +WARNING: '$1' is $msg. You should only need it if + you modified 'acinclude.m4' or '${configure_ac}'. You might want + to install the Automake and Perl packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU +WARNING: '$1' is $msg. You should only need it if + you modified '${configure_ac}'. You might want to install the + Autoconf and GNU m4 packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them +WARNING: '$1' is $msg. You should only need it if + you modified 'acconfig.h' or '${configure_ac}'. You might want + to install the Autoconf and GNU m4 packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" @@ -176,9 +175,9 @@ automake*) echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. +WARNING: '$1' is $msg. You should only need it if + you modified 'Makefile.am', 'acinclude.m4' or '${configure_ac}'. + You might want to install the Automake and Perl packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | @@ -187,10 +186,10 @@ autom4te*) echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. +WARNING: '$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU + You can get '$1' as part of Autoconf from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` @@ -210,10 +209,10 @@ bison*|yacc*) echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package +WARNING: '$1' $msg. You should only need it if + you modified a '.y' file. You may need the Bison package in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." + Bison from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG=\${$#} @@ -240,10 +239,10 @@ lex*|flex*) echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package +WARNING: '$1' is $msg. You should only need it if + you modified a '.l' file. You may need the Flex package in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." + Flex from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG=\${$#} @@ -263,10 +262,10 @@ help2man*) echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if +WARNING: '$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." + Help2man package in order for those modifications to take + effect. You can get Help2man from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` @@ -281,12 +280,12 @@ makeinfo*) echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file +WARNING: '$1' is $msg. You should only need it if + you modified a '.texi' or '.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." + call might also be the consequence of using a buggy 'make' (AIX, + DU, IRIX). You might want to install the Texinfo package or + the GNU make package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` @@ -310,12 +309,12 @@ *) echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. +WARNING: '$1' is needed, and is $msg. You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, + proper tools for further handling them. Check the 'README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." + some other package would contain this missing '$1' program." exit 1 ;; esac diff --git a/config.h.in b/config.h.in index b359d9a..cd9e4d7 100644 --- a/config.h.in +++ b/config.h.in @@ -2,6 +2,12 @@ /* always defined to indicate that i18n is enabled */ #undef ENABLE_NLS + +/* Enable compile-time and run-time bounds-checking, and some warnings. */ + #if defined __OPTIMIZE__ && __OPTIMIZE__ + # define _FORTIFY_SOURCE 2 + #endif + /* GETTEXT package name */ #undef GETTEXT_PACKAGE diff --git a/configure b/configure index 8be9426..0113444 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for virt-viewer 0.5.3. +# Generated by GNU Autoconf 2.68 for virt-viewer 0.5.4. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -567,8 +567,8 @@ # Identity of this package. PACKAGE_NAME='virt-viewer' PACKAGE_TARNAME='virt-viewer' -PACKAGE_VERSION='0.5.3' -PACKAGE_STRING='virt-viewer 0.5.3' +PACKAGE_VERSION='0.5.4' +PACKAGE_STRING='virt-viewer 0.5.4' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -651,6 +651,7 @@ LIBXML2_CFLAGS GLIB2_LIBS GLIB2_CFLAGS +GLIB_MKENUMS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG @@ -1416,7 +1417,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures virt-viewer 0.5.3 to adapt to many kinds of systems. +\`configure' configures virt-viewer 0.5.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1486,7 +1487,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of virt-viewer 0.5.3:";; + short | recursive ) echo "Configuration of virt-viewer 0.5.4:";; esac cat <<\_ACEOF @@ -1494,10 +1495,12 @@ --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0') - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] @@ -1642,7 +1645,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -virt-viewer configure 0.5.3 +virt-viewer configure 0.5.4 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -2007,7 +2010,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by virt-viewer $as_me 0.5.3, which was +It was created by virt-viewer $as_me 0.5.4, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2388,7 +2391,7 @@ ac_config_headers="$ac_config_headers config.h" -am__api_version='1.11' +am__api_version='1.12' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -2485,9 +2488,6 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -2498,32 +2498,40 @@ esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi - + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$2" = conftest.file ) then @@ -2535,6 +2543,16 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. @@ -2561,8 +2579,8 @@ am_missing_run="$MISSING --run " else am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then @@ -2574,10 +2592,10 @@ esac fi -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. +# will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. @@ -2716,12 +2734,6 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -2826,7 +2838,7 @@ # Define the identity of the package. PACKAGE='virt-viewer' - VERSION='0.5.3' + VERSION='0.5.4' cat >>confdefs.h <<_ACEOF @@ -2853,6 +2865,12 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' # We need awk for the "check" target. The system "awk" is bad on # some platforms. @@ -2945,10 +2963,10 @@ enableval=$enable_silent_rules; fi -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=0;; +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 @@ -2980,14 +2998,14 @@ AM_BACKSLASH='\' -GLIB2_REQUIRED=2.12.0 +GLIB2_REQUIRED=2.22.0 LIBXML2_REQUIRED="2.6.0" LIBVIRT_REQUIRED="0.9.7" GTK2_REQUIRED="2.18.0" GTK3_REQUIRED="3.0" GTK_VNC1_REQUIRED="0.3.8" GTK_VNC2_REQUIRED="0.4.0" -SPICE_GTK_REQUIRED="0.11" +SPICE_GTK_REQUIRED="0.12.101" SPICE_PROTOCOL_REQUIRED="0.10.1" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native Win32" >&5 @@ -3819,7 +3837,7 @@ _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -3875,8 +3893,8 @@ # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're @@ -3911,16 +3929,16 @@ : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -3929,8 +3947,8 @@ test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else @@ -3938,7 +3956,7 @@ fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -11806,7 +11824,7 @@ warnCFLAGS= - try_compiler_flags="-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables" + try_compiler_flags="-fexceptions -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables" case "$enable_compile_warnings" in no) @@ -11830,6 +11848,8 @@ as_fn_error $? "Unknown argument '$enable_compile_warnings' to --enable-compile-warnings" "$LINENO" 5 ;; esac + + compiler_flags= for option in $try_compiler_flags; do @@ -13198,7 +13218,6 @@ - if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. @@ -13312,6 +13331,9 @@ PKG_CONFIG="" fi fi +GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` + + pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLIB2" >&5 @@ -14520,7 +14542,7 @@ fi -ac_config_files="$ac_config_files Makefile data/Makefile data/virt-viewer.nsis icons/Makefile icons/16x16/Makefile icons/22x22/Makefile icons/24x24/Makefile icons/32x32/Makefile icons/48x48/Makefile icons/256x256/Makefile man/Makefile mingw32-virt-viewer.spec plugin/Makefile po/Makefile.in src/Makefile src/virt-viewer.rc virt-viewer.spec" +ac_config_files="$ac_config_files Makefile data/Makefile data/virt-viewer.nsis icons/Makefile icons/16x16/Makefile icons/22x22/Makefile icons/24x24/Makefile icons/32x32/Makefile icons/48x48/Makefile icons/256x256/Makefile man/Makefile mingw-virt-viewer.spec plugin/Makefile po/Makefile.in src/Makefile src/virt-viewer.rc virt-viewer.spec" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -14631,6 +14653,14 @@ LTLIBOBJS=$ac_ltlibobjs +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -15088,7 +15118,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by virt-viewer $as_me 0.5.3, which was +This file was extended by virt-viewer $as_me 0.5.4, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15158,7 +15188,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -virt-viewer config.status 0.5.3 +virt-viewer config.status 0.5.4 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" @@ -15582,7 +15612,7 @@ "icons/48x48/Makefile") CONFIG_FILES="$CONFIG_FILES icons/48x48/Makefile" ;; "icons/256x256/Makefile") CONFIG_FILES="$CONFIG_FILES icons/256x256/Makefile" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; - "mingw32-virt-viewer.spec") CONFIG_FILES="$CONFIG_FILES mingw32-virt-viewer.spec" ;; + "mingw-virt-viewer.spec") CONFIG_FILES="$CONFIG_FILES mingw-virt-viewer.spec" ;; "plugin/Makefile") CONFIG_FILES="$CONFIG_FILES plugin/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; @@ -16230,7 +16260,7 @@ # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -16264,21 +16294,19 @@ continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || diff --git a/configure.ac b/configure.ac index 494cd13..e7ddd3e 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ -AC_INIT(virt-viewer, 0.5.3) +AC_INIT(virt-viewer, 0.5.4) AC_CONFIG_SRCDIR(src/virt-viewer-main.c) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_AUX_DIR([build-aux]) @@ -12,14 +12,14 @@ m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])]) AM_SILENT_RULES([yes]) -GLIB2_REQUIRED=2.12.0 +GLIB2_REQUIRED=2.22.0 LIBXML2_REQUIRED="2.6.0" LIBVIRT_REQUIRED="0.9.7" GTK2_REQUIRED="2.18.0" GTK3_REQUIRED="3.0" GTK_VNC1_REQUIRED="0.3.8" GTK_VNC2_REQUIRED="0.4.0" -SPICE_GTK_REQUIRED="0.11" +SPICE_GTK_REQUIRED="0.12.101" SPICE_PROTOCOL_REQUIRED="0.10.1" AC_MSG_CHECKING([for native Win32]) @@ -72,6 +72,9 @@ AM_GLIB_GNU_GETTEXT IT_PROG_INTLTOOL([0.35.0]) +PKG_PROG_PKG_CONFIG +GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` +AC_SUBST(GLIB_MKENUMS) PKG_CHECK_MODULES(GLIB2, glib-2.0 >= $GLIB2_REQUIRED gthread-2.0 gmodule-export-2.0) PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= $LIBXML2_REQUIRED) @@ -201,7 +204,7 @@ icons/48x48/Makefile icons/256x256/Makefile man/Makefile - mingw32-virt-viewer.spec + mingw-virt-viewer.spec plugin/Makefile po/Makefile.in src/Makefile diff --git a/data/Makefile.in b/data/Makefile.in index d3f77c2..2a8595f 100644 --- a/data/Makefile.in +++ b/data/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +14,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -48,14 +64,25 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = virt-viewer.nsis CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALL_LINGUAS = @ALL_LINGUAS@ @@ -91,6 +118,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB2_CFLAGS = @GLIB2_CFLAGS@ GLIB2_LIBS = @GLIB2_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ @@ -284,6 +312,8 @@ ctags: CTAGS CTAGS: +cscope cscopelist: + distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ diff --git a/icons/16x16/Makefile.in b/icons/16x16/Makefile.in index e15b6c3..f9ff433 100644 --- a/icons/16x16/Makefile.in +++ b/icons/16x16/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -48,14 +64,25 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -120,6 +147,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB2_CFLAGS = @GLIB2_CFLAGS@ GLIB2_LIBS = @GLIB2_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ @@ -305,8 +333,11 @@ -rm -rf .libs _libs install-iconDATA: $(icon_DATA) @$(NORMAL_INSTALL) - test -z "$(icondir)" || $(MKDIR_P) "$(DESTDIR)$(icondir)" @list='$(icon_DATA)'; test -n "$(icondir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(icondir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(icondir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -326,6 +357,8 @@ ctags: CTAGS CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) diff --git a/icons/22x22/Makefile.in b/icons/22x22/Makefile.in index 34cc507..e6ef1cb 100644 --- a/icons/22x22/Makefile.in +++ b/icons/22x22/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -48,14 +64,25 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -120,6 +147,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB2_CFLAGS = @GLIB2_CFLAGS@ GLIB2_LIBS = @GLIB2_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ @@ -305,8 +333,11 @@ -rm -rf .libs _libs install-iconDATA: $(icon_DATA) @$(NORMAL_INSTALL) - test -z "$(icondir)" || $(MKDIR_P) "$(DESTDIR)$(icondir)" @list='$(icon_DATA)'; test -n "$(icondir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(icondir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(icondir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -326,6 +357,8 @@ ctags: CTAGS CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) diff --git a/icons/24x24/Makefile.in b/icons/24x24/Makefile.in index cbc5961..cb2a4d7 100644 --- a/icons/24x24/Makefile.in +++ b/icons/24x24/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -48,14 +64,25 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -120,6 +147,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB2_CFLAGS = @GLIB2_CFLAGS@ GLIB2_LIBS = @GLIB2_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ @@ -305,8 +333,11 @@ -rm -rf .libs _libs install-iconDATA: $(icon_DATA) @$(NORMAL_INSTALL) - test -z "$(icondir)" || $(MKDIR_P) "$(DESTDIR)$(icondir)" @list='$(icon_DATA)'; test -n "$(icondir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(icondir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(icondir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -326,6 +357,8 @@ ctags: CTAGS CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) diff --git a/icons/256x256/Makefile.in b/icons/256x256/Makefile.in index d0a87e5..d3ff71e 100644 --- a/icons/256x256/Makefile.in +++ b/icons/256x256/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -48,14 +64,25 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -120,6 +147,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB2_CFLAGS = @GLIB2_CFLAGS@ GLIB2_LIBS = @GLIB2_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ @@ -305,8 +333,11 @@ -rm -rf .libs _libs install-iconDATA: $(icon_DATA) @$(NORMAL_INSTALL) - test -z "$(icondir)" || $(MKDIR_P) "$(DESTDIR)$(icondir)" @list='$(icon_DATA)'; test -n "$(icondir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(icondir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(icondir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -326,6 +357,8 @@ ctags: CTAGS CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) diff --git a/icons/32x32/Makefile.in b/icons/32x32/Makefile.in index ca400a1..80b7981 100644 --- a/icons/32x32/Makefile.in +++ b/icons/32x32/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -48,14 +64,25 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -120,6 +147,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB2_CFLAGS = @GLIB2_CFLAGS@ GLIB2_LIBS = @GLIB2_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ @@ -305,8 +333,11 @@ -rm -rf .libs _libs install-iconDATA: $(icon_DATA) @$(NORMAL_INSTALL) - test -z "$(icondir)" || $(MKDIR_P) "$(DESTDIR)$(icondir)" @list='$(icon_DATA)'; test -n "$(icondir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(icondir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(icondir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -326,6 +357,8 @@ ctags: CTAGS CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) diff --git a/icons/48x48/Makefile.in b/icons/48x48/Makefile.in index 0daa951..eb7ade9 100644 --- a/icons/48x48/Makefile.in +++ b/icons/48x48/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -48,14 +64,25 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -120,6 +147,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB2_CFLAGS = @GLIB2_CFLAGS@ GLIB2_LIBS = @GLIB2_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ @@ -305,8 +333,11 @@ -rm -rf .libs _libs install-iconDATA: $(icon_DATA) @$(NORMAL_INSTALL) - test -z "$(icondir)" || $(MKDIR_P) "$(DESTDIR)$(icondir)" @list='$(icon_DATA)'; test -n "$(icondir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(icondir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(icondir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -326,6 +357,8 @@ ctags: CTAGS CTAGS: + +cscope cscopelist: distdir: $(DISTFILES) diff --git a/icons/Makefile.am b/icons/Makefile.am index 8f2db64..0b4c247 100644 --- a/icons/Makefile.am +++ b/icons/Makefile.am @@ -2,6 +2,7 @@ if OS_WIN32 noinst_DATA = virt-viewer.ico +CLEANFILES = $(noinst_DATA) endif # http://stackoverflow.com/questions/3236115/which-icon-sizes-should-my-windows-applications-icon-include @@ -9,6 +10,4 @@ %.ico: $(foreach s,$(ico_sizes),$(s)x$(s)/%.png) $(AM_V_GEN)$(ICOTOOL) -c -o $@ $^ -EXTRA_DIST = virt-viewer.ico - -include $(top_srcdir)/git.mk diff --git a/icons/Makefile.in b/icons/Makefile.in index c4c7ecc..f325ae2 100644 --- a/icons/Makefile.in +++ b/icons/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -48,12 +64,18 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ @@ -63,6 +85,11 @@ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac DATA = $(noinst_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive @@ -132,6 +159,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB2_CFLAGS = @GLIB2_CFLAGS@ GLIB2_LIBS = @GLIB2_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ @@ -274,10 +302,10 @@ top_srcdir = @top_srcdir@ SUBDIRS = 16x16 22x22 24x24 32x32 48x48 256x256 @OS_WIN32_TRUE@noinst_DATA = virt-viewer.ico +@OS_WIN32_TRUE@CLEANFILES = $(noinst_DATA) # http://stackoverflow.com/questions/3236115/which-icon-sizes-should-my-windows-applications-icon-include ico_sizes = 16 32 48 256 -EXTRA_DIST = virt-viewer.ico all: all-recursive .SUFFIXES: @@ -319,12 +347,12 @@ -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ @@ -334,7 +362,11 @@ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -348,37 +380,6 @@ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" - -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ @@ -386,6 +387,10 @@ ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done +cscopelist-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) @@ -450,6 +455,20 @@ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -485,13 +504,10 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -538,6 +554,7 @@ mostlyclean-generic: clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -612,22 +629,23 @@ uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \ + cscopelist-recursive ctags-recursive install-am install-strip \ + tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ - ctags ctags-recursive distclean distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am + cscopelist cscopelist-recursive ctags ctags-recursive \ + distclean distclean-generic distclean-libtool distclean-tags \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-recursive uninstall uninstall-am %.ico: $(foreach s,$(ico_sizes),$(s)x$(s)/%.png) $(AM_V_GEN)$(ICOTOOL) -c -o $@ $^ diff --git a/icons/virt-viewer.ico b/icons/virt-viewer.ico deleted file mode 100644 index e11de61..0000000 Binary files a/icons/virt-viewer.ico and /dev/null differ diff --git a/man/Makefile.in b/man/Makefile.in index 6e66c4c..b05ec86 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +14,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -47,14 +63,25 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -121,6 +148,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB2_CFLAGS = @GLIB2_CFLAGS@ GLIB2_LIBS = @GLIB2_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ @@ -314,11 +342,18 @@ -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list=''; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ - l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ - sed -n '/\.1[a-z]*$$/p'; \ + @list1=''; \ + list2='$(man_MANS)'; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -354,6 +389,8 @@ ctags: CTAGS CTAGS: +cscope cscopelist: + distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ @@ -362,10 +399,10 @@ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ - echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ + echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ - echo " typically \`make maintainer-clean' will remove them" >&2; \ + echo " typically 'make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi diff --git a/mingw-virt-viewer.spec.in b/mingw-virt-viewer.spec.in new file mode 100644 index 0000000..0b7012e --- /dev/null +++ b/mingw-virt-viewer.spec.in @@ -0,0 +1,99 @@ +%{?mingw_package_hedder} + +Name: mingw-virt-viewer +Version: @VERSION@ +Release: 1%{?dist}%{?extra_release} +Summary: MinGW Windows virt-viewer console application + +License: GPLv2+ +Group: Applications/Internet +URL: http://virt-manager.org/ +Source0: ftp://virt-manager.org/downloads/virt-viewer/virt-viewer-%{version}.tar.gz + +BuildRequires: mingw32-filesystem >= 23 +BuildRequires: mingw64-filesystem >= 23 +BuildRequires: mingw32-glib2 >= 2.22 +BuildRequires: mingw64-glib2 >= 2.22 +BuildRequires: mingw32-gtk3 >= 3.0.0 +BuildRequires: mingw64-gtk3 >= 3.0.0 +BuildRequires: mingw32-libvirt >= 0.9.7 +BuildRequires: mingw64-libvirt >= 0.9.7 +BuildRequires: mingw32-libxml2 +BuildRequires: mingw64-libxml2 +BuildRequires: mingw32-gtk-vnc2 >= 0.4.3 +BuildRequires: mingw64-gtk-vnc2 >= 0.4.3 +BuildRequires: pkgconfig + +BuildArch: noarch + +%package -n mingw32-virt-viewer +Summary: MinGW Windows virt-viewer console application +Group: Applications/Internet + +%package -n mingw64-virt-viewer +Summary: MinGW Windows virt-viewer console application +Group: Applications/Internet + +%description +MinGW Windows virt-viewer console application + +%description -n mingw32-virt-viewer +MinGW Windows virt-viewer console application + +%description -n mingw64-virt-viewer +MinGW Windows virt-viewer console application + +%prep +%setup -q -n virt-viewer-%{version} + + +%build +%mingw_configure --with-gtk=3.0 +%mingw_make %{?_smp_mflags} V=1 + + +%install +%mingw_make_install DESTDIR=$RPM_BUILD_ROOT + +%find_lang virt-viewer + +# Don't need the XDG desktop files on Windows +find $RPM_BUILD_ROOT -name "*.desktop" -delete + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files -n mingw32-virt-viewer -f virt-viewer.lang +%defattr(-,root,root) +%{mingw32_bindir}/virt-viewer.exe +%{mingw32_bindir}/remote-viewer.exe +%{mingw32_bindir}/windows-cmdline-wrapper.exe + +%dir %{mingw32_datadir}/virt-viewer/ +%dir %{mingw32_datadir}/virt-viewer/ui/ +%{mingw32_datadir}/virt-viewer/ui/virt-viewer.xml +%{mingw32_datadir}/virt-viewer/ui/virt-viewer-about.xml +%{mingw32_datadir}/virt-viewer/ui/virt-viewer-auth.xml +%{mingw32_datadir}/icons/hicolor/*/apps/* + +%{mingw32_mandir}/man1/virt-viewer.1* +%{mingw32_mandir}/man1/remote-viewer.1* + +%files -n mingw64-virt-viewer -f virt-viewer.lang +%defattr(-,root,root) +%{mingw64_bindir}/virt-viewer.exe +%{mingw64_bindir}/remote-viewer.exe +%{mingw64_bindir}/windows-cmdline-wrapper.exe + +%dir %{mingw64_datadir}/virt-viewer/ +%dir %{mingw64_datadir}/virt-viewer/ui/ +%{mingw64_datadir}/virt-viewer/ui/virt-viewer.xml +%{mingw64_datadir}/virt-viewer/ui/virt-viewer-about.xml +%{mingw64_datadir}/virt-viewer/ui/virt-viewer-auth.xml +%{mingw64_datadir}/icons/hicolor/*/apps/* + +%{mingw64_mandir}/man1/virt-viewer.1* +%{mingw64_mandir}/man1/remote-viewer.1* + +%changelog diff --git a/mingw32-virt-viewer.spec.in b/mingw32-virt-viewer.spec.in deleted file mode 100644 index beeb73f..0000000 --- a/mingw32-virt-viewer.spec.in +++ /dev/null @@ -1,84 +0,0 @@ -%define __strip %{_mingw32_strip} -%define __objdump %{_mingw32_objdump} -%define _use_internal_dependency_generator 0 -%define __find_requires %{_mingw32_findrequires} -%define __find_provides %{_mingw32_findprovides} - -%define with_gtk3 0 -%if 0%{?fedora} >= 15 -%define with_gtk3 1 -%endif - -Name: mingw32-virt-viewer -Version: @VERSION@ -Release: 1%{?dist}%{?extra_release} -Summary: MinGW Windows virt-viewer console application - -License: LGPLv2+ -Group: Development/Libraries -URL: http://virt-manager.org/ -Source0: ftp://virt-manager.org/downloads/virt-viewer/virt-viewer-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: mingw32-filesystem >= 23 -%if %{with_gtk3} -BuildRequires: mingw32-gtk3 >= 3.0.0 -%else -BuildRequires: mingw32-gtk2 >= 2.12.0 -%endif -BuildRequires: mingw32-libvirt >= 0.9.7 -BuildRequires: mingw32-libxml2 -%if %{with_gtk3} -BuildRequires: mingw32-gtk-vnc >= 0.4.3 -%else -BuildRequires: mingw32-gtk-vnc2 >= 0.4.3 -%endif -BuildRequires: pkgconfig - -BuildArch: noarch - - -%description -MinGW Windows virt-viewer console application - - -%prep -%setup -q -n virt-viewer-%{version} - - -%build -%if %{with_gtk3} -%{_mingw32_configure} --with-gtk=3.0 -%else -%{_mingw32_configure} --with-gtk=2.0 -%endif -make - - -%install -rm -rf $RPM_BUILD_ROOT - -make DESTDIR=$RPM_BUILD_ROOT install - -%find_lang virt-viewer - -%clean -rm -rf $RPM_BUILD_ROOT - - -%files -f virt-viewer.lang -%defattr(-,root,root) -%{_mingw32_bindir}/virt-viewer.exe -%{_mingw32_bindir}/remote-viewer.exe - -%dir %{_mingw32_datadir}/virt-viewer/ -%dir %{_mingw32_datadir}/virt-viewer/ui/ -%{_mingw32_datadir}/virt-viewer/ui/virt-viewer.xml -%{_mingw32_datadir}/virt-viewer/ui/virt-viewer-about.xml -%{_mingw32_datadir}/virt-viewer/ui/virt-viewer-auth.xml -%{_mingw32_datadir}/icons/hicolor/*/apps/* - -%{_mingw32_mandir}/man1/virt-viewer.1* -%{_mingw32_mandir}/man1/remote-viewer.1* - -%changelog diff --git a/plugin/Makefile.in b/plugin/Makefile.in index 71fd693..b592d02 100644 --- a/plugin/Makefile.in +++ b/plugin/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -35,7 +51,8 @@ build_triplet = @build@ host_triplet = @host@ subdir = plugin -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/build-aux/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -102,12 +119,25 @@ AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = virt_viewer_plugin_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(virt_viewer_plugin_la_CFLAGS) $(CFLAGS) \ $(virt_viewer_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ @ENABLE_PLUGIN_TRUE@am_virt_viewer_plugin_la_rpath = -rpath \ @ENABLE_PLUGIN_TRUE@ $(plugindir) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -120,22 +150,23 @@ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(virt_viewer_plugin_la_SOURCES) DIST_SOURCES = $(am__virt_viewer_plugin_la_SOURCES_DIST) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -173,6 +204,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB2_CFLAGS = @GLIB2_CFLAGS@ GLIB2_LIBS = @GLIB2_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ @@ -380,7 +412,6 @@ $(am__aclocal_m4_deps): install-pluginLTLIBRARIES: $(plugin_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" @list='$(plugin_LTLIBRARIES)'; test -n "$(plugindir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -388,6 +419,8 @@ else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(plugindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(plugindir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(plugindir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(plugindir)"; \ } @@ -403,12 +436,14 @@ clean-pluginLTLIBRARIES: -test -z "$(plugin_LTLIBRARIES)" || rm -f $(plugin_LTLIBRARIES) - @list='$(plugin_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done + @list='$(plugin_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } virt-viewer-plugin.la: $(virt_viewer_plugin_la_OBJECTS) $(virt_viewer_plugin_la_DEPENDENCIES) $(EXTRA_virt_viewer_plugin_la_DEPENDENCIES) $(AM_V_CCLD)$(virt_viewer_plugin_la_LINK) $(am_virt_viewer_plugin_la_rpath) $(virt_viewer_plugin_la_OBJECTS) $(virt_viewer_plugin_la_LIBADD) $(LIBS) @@ -550,6 +585,20 @@ here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" + +cscopelist: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -699,8 +748,8 @@ .MAKE: install-am install-data-am install-strip .PHONY: CTAGS GTAGS all all-am all-local check check-am clean \ - clean-generic clean-libtool clean-pluginLTLIBRARIES ctags \ - distclean distclean-compile distclean-generic \ + clean-generic clean-libtool clean-pluginLTLIBRARIES cscopelist \ + ctags distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-data-hook install-dvi install-dvi-am \ diff --git a/src/Makefile.am b/src/Makefile.am index d99b043..a62a8c0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,11 +10,31 @@ virt-viewer-auth.xml \ $(NULL) -EXTRA_DIST = $(builderxml_DATA) \ - gbinding.c \ - gbinding.h +EXTRA_DIST = \ + $(builderxml_DATA) \ + virt-viewer-enums.c.etemplate \ + virt-viewer-enums.h.etemplate \ + gbinding.c \ + gbinding.h \ + $(NULL) + +ENUMS_FILES = \ + virt-viewer-display.h \ + $(NULL) + +BUILT_SOURCES = \ + virt-viewer-enums.h \ + virt-viewer-enums.c \ + $(NULL) + +$(BUILT_SOURCES): %: %.etemplate $(ENUMS_FILES) + $(AM_V_GEN)$(GLIB_MKENUMS) --template $^ | \ + sed -e 's/VIRT_TYPE_VIEWER/VIRT_VIEWER_TYPE/' \ + -e 's,#include "$(srcdir)/,#include ",' > $@ COMMON_SOURCES = \ + $(BUILT_SOURCES) \ + virt-glib-compat.h \ virt-gtk-compat.h \ virt-viewer-util.h virt-viewer-util.c \ virt-viewer-auth.h virt-viewer-auth.c \ @@ -121,7 +141,7 @@ EXTRA_DIST += $(desktop_DATA) VIRT_VIEWER_RES = virt-viewer.rc virt-viewer.manifest -ICONDIR = $(top_srcdir)/icons +ICONDIR = $(top_builddir)/icons MANIFESTDIR = $(srcdir) EXTRA_DIST += $(VIRT_VIEWER_RES) diff --git a/src/Makefile.in b/src/Makefile.in index 3c74340..60673ec 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.3 from Makefile.am. +# Makefile.in generated by automake 1.12.2 from Makefile.am. # @configure_input@ -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 1994-2012 Free Software Foundation, Inc. + # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,6 +16,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -61,7 +77,7 @@ @OS_WIN32_TRUE@am__append_15 = virt-viewer_rc.$(OBJEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/virt-viewer.rc.in + $(srcdir)/virt-viewer.rc.in $(top_srcdir)/build-aux/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/intltool.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -79,27 +95,32 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(builderxmldir)" \ "$(DESTDIR)$(desktopdir)" PROGRAMS = $(bin_PROGRAMS) -am__remote_viewer_SOURCES_DIST = virt-gtk-compat.h virt-viewer-util.h \ - virt-viewer-util.c virt-viewer-auth.h virt-viewer-auth.c \ - virt-viewer-app.h virt-viewer-app.c virt-viewer-session.h \ - virt-viewer-session.c virt-viewer-display.h \ - virt-viewer-display.c virt-viewer-notebook.h \ - virt-viewer-notebook.c virt-viewer-window.h \ - virt-viewer-window.c view/autoDrawer.c view/autoDrawer.h \ - view/drawer.c view/drawer.h view/ovBox.c view/ovBox.h \ - virt-viewer-session-vnc.h virt-viewer-session-vnc.c \ - virt-viewer-display-vnc.h virt-viewer-display-vnc.c \ - virt-viewer-session-spice.h virt-viewer-session-spice.c \ - virt-viewer-display-spice.h virt-viewer-display-spice.c \ - remote-viewer.h remote-viewer.c remote-viewer-main.c +am__remote_viewer_SOURCES_DIST = virt-viewer-enums.h \ + virt-viewer-enums.c virt-glib-compat.h virt-gtk-compat.h \ + virt-viewer-util.h virt-viewer-util.c virt-viewer-auth.h \ + virt-viewer-auth.c virt-viewer-app.h virt-viewer-app.c \ + virt-viewer-session.h virt-viewer-session.c \ + virt-viewer-display.h virt-viewer-display.c \ + virt-viewer-notebook.h virt-viewer-notebook.c \ + virt-viewer-window.h virt-viewer-window.c view/autoDrawer.c \ + view/autoDrawer.h view/drawer.c view/drawer.h view/ovBox.c \ + view/ovBox.h virt-viewer-session-vnc.h \ + virt-viewer-session-vnc.c virt-viewer-display-vnc.h \ + virt-viewer-display-vnc.c virt-viewer-session-spice.h \ + virt-viewer-session-spice.c virt-viewer-display-spice.h \ + virt-viewer-display-spice.c remote-viewer.h remote-viewer.c \ + remote-viewer-main.c am__objects_1 = -@HAVE_GTK_VNC_TRUE@am__objects_2 = remote_viewer-virt-viewer-session-vnc.$(OBJEXT) \ +am__objects_2 = remote_viewer-virt-viewer-enums.$(OBJEXT) \ + $(am__objects_1) +@HAVE_GTK_VNC_TRUE@am__objects_3 = remote_viewer-virt-viewer-session-vnc.$(OBJEXT) \ @HAVE_GTK_VNC_TRUE@ remote_viewer-virt-viewer-display-vnc.$(OBJEXT) \ @HAVE_GTK_VNC_TRUE@ $(am__objects_1) -@HAVE_SPICE_GTK_TRUE@am__objects_3 = remote_viewer-virt-viewer-session-spice.$(OBJEXT) \ +@HAVE_SPICE_GTK_TRUE@am__objects_4 = remote_viewer-virt-viewer-session-spice.$(OBJEXT) \ @HAVE_SPICE_GTK_TRUE@ remote_viewer-virt-viewer-display-spice.$(OBJEXT) \ @HAVE_SPICE_GTK_TRUE@ $(am__objects_1) -am__objects_4 = remote_viewer-virt-viewer-util.$(OBJEXT) \ +am__objects_5 = $(am__objects_2) \ + remote_viewer-virt-viewer-util.$(OBJEXT) \ remote_viewer-virt-viewer-auth.$(OBJEXT) \ remote_viewer-virt-viewer-app.$(OBJEXT) \ remote_viewer-virt-viewer-session.$(OBJEXT) \ @@ -108,8 +129,8 @@ remote_viewer-virt-viewer-window.$(OBJEXT) \ remote_viewer-autoDrawer.$(OBJEXT) \ remote_viewer-drawer.$(OBJEXT) remote_viewer-ovBox.$(OBJEXT) \ - $(am__objects_1) $(am__objects_2) $(am__objects_3) -am_remote_viewer_OBJECTS = $(am__objects_4) \ + $(am__objects_1) $(am__objects_3) $(am__objects_4) +am_remote_viewer_OBJECTS = $(am__objects_5) \ remote_viewer-remote-viewer.$(OBJEXT) \ remote_viewer-remote-viewer-main.$(OBJEXT) $(am__objects_1) remote_viewer_OBJECTS = $(am_remote_viewer_OBJECTS) @@ -118,10 +139,12 @@ AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = remote_viewer_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(remote_viewer_CFLAGS) \ $(CFLAGS) $(remote_viewer_LDFLAGS) $(LDFLAGS) -o $@ -am__virt_viewer_SOURCES_DIST = virt-gtk-compat.h virt-viewer-util.h \ +am__virt_viewer_SOURCES_DIST = virt-viewer-enums.h virt-viewer-enums.c \ + virt-glib-compat.h virt-gtk-compat.h virt-viewer-util.h \ virt-viewer-util.c virt-viewer-auth.h virt-viewer-auth.c \ virt-viewer-app.h virt-viewer-app.c virt-viewer-session.h \ virt-viewer-session.c virt-viewer-display.h \ @@ -135,13 +158,16 @@ virt-viewer-display-spice.h virt-viewer-display-spice.c \ virt-viewer-events.h virt-viewer-events.c virt-viewer.h \ virt-viewer.c virt-viewer-main.c -@HAVE_GTK_VNC_TRUE@am__objects_5 = virt_viewer-virt-viewer-session-vnc.$(OBJEXT) \ +am__objects_6 = virt_viewer-virt-viewer-enums.$(OBJEXT) \ + $(am__objects_1) +@HAVE_GTK_VNC_TRUE@am__objects_7 = virt_viewer-virt-viewer-session-vnc.$(OBJEXT) \ @HAVE_GTK_VNC_TRUE@ virt_viewer-virt-viewer-display-vnc.$(OBJEXT) \ @HAVE_GTK_VNC_TRUE@ $(am__objects_1) -@HAVE_SPICE_GTK_TRUE@am__objects_6 = virt_viewer-virt-viewer-session-spice.$(OBJEXT) \ +@HAVE_SPICE_GTK_TRUE@am__objects_8 = virt_viewer-virt-viewer-session-spice.$(OBJEXT) \ @HAVE_SPICE_GTK_TRUE@ virt_viewer-virt-viewer-display-spice.$(OBJEXT) \ @HAVE_SPICE_GTK_TRUE@ $(am__objects_1) -am__objects_7 = virt_viewer-virt-viewer-util.$(OBJEXT) \ +am__objects_9 = $(am__objects_6) \ + virt_viewer-virt-viewer-util.$(OBJEXT) \ virt_viewer-virt-viewer-auth.$(OBJEXT) \ virt_viewer-virt-viewer-app.$(OBJEXT) \ virt_viewer-virt-viewer-session.$(OBJEXT) \ @@ -149,9 +175,9 @@ virt_viewer-virt-viewer-notebook.$(OBJEXT) \ virt_viewer-virt-viewer-window.$(OBJEXT) \ virt_viewer-autoDrawer.$(OBJEXT) virt_viewer-drawer.$(OBJEXT) \ - virt_viewer-ovBox.$(OBJEXT) $(am__objects_1) $(am__objects_5) \ - $(am__objects_6) -@HAVE_LIBVIRT_TRUE@am_virt_viewer_OBJECTS = $(am__objects_7) \ + virt_viewer-ovBox.$(OBJEXT) $(am__objects_1) $(am__objects_7) \ + $(am__objects_8) +@HAVE_LIBVIRT_TRUE@am_virt_viewer_OBJECTS = $(am__objects_9) \ @HAVE_LIBVIRT_TRUE@ virt_viewer-virt-viewer-events.$(OBJEXT) \ @HAVE_LIBVIRT_TRUE@ virt_viewer-virt-viewer.$(OBJEXT) \ @HAVE_LIBVIRT_TRUE@ virt_viewer-virt-viewer-main.$(OBJEXT) \ @@ -173,6 +199,18 @@ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(windows_cmdline_wrapper_LDFLAGS) \ $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -185,25 +223,26 @@ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(remote_viewer_SOURCES) $(virt_viewer_SOURCES) \ $(windows_cmdline_wrapper_SOURCES) DIST_SOURCES = $(am__remote_viewer_SOURCES_DIST) \ $(am__virt_viewer_SOURCES_DIST) \ $(am__windows_cmdline_wrapper_SOURCES_DIST) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -269,6 +308,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB2_CFLAGS = @GLIB2_CFLAGS@ GLIB2_LIBS = @GLIB2_LIBS@ +GLIB_MKENUMS = @GLIB_MKENUMS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ @@ -419,17 +459,27 @@ virt-viewer-auth.xml \ $(NULL) -EXTRA_DIST = $(builderxml_DATA) gbinding.c gbinding.h $(desktop_DATA) \ - $(VIRT_VIEWER_RES) -COMMON_SOURCES = virt-gtk-compat.h virt-viewer-util.h \ - virt-viewer-util.c virt-viewer-auth.h virt-viewer-auth.c \ - virt-viewer-app.h virt-viewer-app.c virt-viewer-session.h \ - virt-viewer-session.c virt-viewer-display.h \ - virt-viewer-display.c virt-viewer-notebook.h \ - virt-viewer-notebook.c virt-viewer-window.h \ - virt-viewer-window.c view/autoDrawer.c view/autoDrawer.h \ - view/drawer.c view/drawer.h view/ovBox.c view/ovBox.h $(NULL) \ - $(am__append_1) $(am__append_2) +EXTRA_DIST = $(builderxml_DATA) virt-viewer-enums.c.etemplate \ + virt-viewer-enums.h.etemplate gbinding.c gbinding.h $(NULL) \ + $(desktop_DATA) $(VIRT_VIEWER_RES) +ENUMS_FILES = \ + virt-viewer-display.h \ + $(NULL) + +BUILT_SOURCES = \ + virt-viewer-enums.h \ + virt-viewer-enums.c \ + $(NULL) + +COMMON_SOURCES = $(BUILT_SOURCES) virt-glib-compat.h virt-gtk-compat.h \ + virt-viewer-util.h virt-viewer-util.c virt-viewer-auth.h \ + virt-viewer-auth.c virt-viewer-app.h virt-viewer-app.c \ + virt-viewer-session.h virt-viewer-session.c \ + virt-viewer-display.h virt-viewer-display.c \ + virt-viewer-notebook.h virt-viewer-notebook.c \ + virt-viewer-window.h virt-viewer-window.c view/autoDrawer.c \ + view/autoDrawer.h view/drawer.c view/drawer.h view/ovBox.c \ + view/ovBox.h $(NULL) $(am__append_1) $(am__append_2) @HAVE_LIBVIRT_TRUE@virt_viewer_SOURCES = \ @HAVE_LIBVIRT_TRUE@ $(COMMON_SOURCES) \ @HAVE_LIBVIRT_TRUE@ virt-viewer-events.h virt-viewer-events.c \ @@ -462,11 +512,12 @@ desktopdir = $(datadir)/applications desktop_DATA = remote-viewer.desktop VIRT_VIEWER_RES = virt-viewer.rc virt-viewer.manifest -ICONDIR = $(top_srcdir)/icons +ICONDIR = $(top_builddir)/icons MANIFESTDIR = $(srcdir) @OS_WIN32_TRUE@windows_cmdline_wrapper_SOURCES = windows-cmdline-wrapper.c @OS_WIN32_TRUE@windows_cmdline_wrapper_LDFLAGS = -lpsapi -all: all-am +all: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj @@ -504,8 +555,11 @@ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -571,6 +625,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remote_viewer-virt-viewer-display-spice.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remote_viewer-virt-viewer-display-vnc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remote_viewer-virt-viewer-display.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remote_viewer-virt-viewer-enums.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remote_viewer-virt-viewer-notebook.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remote_viewer-virt-viewer-session-spice.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/remote_viewer-virt-viewer-session-vnc.Po@am__quote@ @@ -585,6 +640,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer-display-spice.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer-display-vnc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer-display.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer-enums.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer-events.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer-notebook.Po@am__quote@ @@ -617,6 +673,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< +remote_viewer-virt-viewer-enums.o: virt-viewer-enums.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(remote_viewer_CFLAGS) $(CFLAGS) -MT remote_viewer-virt-viewer-enums.o -MD -MP -MF $(DEPDIR)/remote_viewer-virt-viewer-enums.Tpo -c -o remote_viewer-virt-viewer-enums.o `test -f 'virt-viewer-enums.c' || echo '$(srcdir)/'`virt-viewer-enums.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/remote_viewer-virt-viewer-enums.Tpo $(DEPDIR)/remote_viewer-virt-viewer-enums.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='virt-viewer-enums.c' object='remote_viewer-virt-viewer-enums.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(remote_viewer_CFLAGS) $(CFLAGS) -c -o remote_viewer-virt-viewer-enums.o `test -f 'virt-viewer-enums.c' || echo '$(srcdir)/'`virt-viewer-enums.c + +remote_viewer-virt-viewer-enums.obj: virt-viewer-enums.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(remote_viewer_CFLAGS) $(CFLAGS) -MT remote_viewer-virt-viewer-enums.obj -MD -MP -MF $(DEPDIR)/remote_viewer-virt-viewer-enums.Tpo -c -o remote_viewer-virt-viewer-enums.obj `if test -f 'virt-viewer-enums.c'; then $(CYGPATH_W) 'virt-viewer-enums.c'; else $(CYGPATH_W) '$(srcdir)/virt-viewer-enums.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/remote_viewer-virt-viewer-enums.Tpo $(DEPDIR)/remote_viewer-virt-viewer-enums.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='virt-viewer-enums.c' object='remote_viewer-virt-viewer-enums.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(remote_viewer_CFLAGS) $(CFLAGS) -c -o remote_viewer-virt-viewer-enums.obj `if test -f 'virt-viewer-enums.c'; then $(CYGPATH_W) 'virt-viewer-enums.c'; else $(CYGPATH_W) '$(srcdir)/virt-viewer-enums.c'; fi` + remote_viewer-virt-viewer-util.o: virt-viewer-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(remote_viewer_CFLAGS) $(CFLAGS) -MT remote_viewer-virt-viewer-util.o -MD -MP -MF $(DEPDIR)/remote_viewer-virt-viewer-util.Tpo -c -o remote_viewer-virt-viewer-util.o `test -f 'virt-viewer-util.c' || echo '$(srcdir)/'`virt-viewer-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/remote_viewer-virt-viewer-util.Tpo $(DEPDIR)/remote_viewer-virt-viewer-util.Po @@ -841,6 +911,20 @@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(remote_viewer_CFLAGS) $(CFLAGS) -c -o remote_viewer-remote-viewer-main.obj `if test -f 'remote-viewer-main.c'; then $(CYGPATH_W) 'remote-viewer-main.c'; else $(CYGPATH_W) '$(srcdir)/remote-viewer-main.c'; fi` +virt_viewer-virt-viewer-enums.o: virt-viewer-enums.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -MT virt_viewer-virt-viewer-enums.o -MD -MP -MF $(DEPDIR)/virt_viewer-virt-viewer-enums.Tpo -c -o virt_viewer-virt-viewer-enums.o `test -f 'virt-viewer-enums.c' || echo '$(srcdir)/'`virt-viewer-enums.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virt_viewer-virt-viewer-enums.Tpo $(DEPDIR)/virt_viewer-virt-viewer-enums.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='virt-viewer-enums.c' object='virt_viewer-virt-viewer-enums.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -c -o virt_viewer-virt-viewer-enums.o `test -f 'virt-viewer-enums.c' || echo '$(srcdir)/'`virt-viewer-enums.c + +virt_viewer-virt-viewer-enums.obj: virt-viewer-enums.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -MT virt_viewer-virt-viewer-enums.obj -MD -MP -MF $(DEPDIR)/virt_viewer-virt-viewer-enums.Tpo -c -o virt_viewer-virt-viewer-enums.obj `if test -f 'virt-viewer-enums.c'; then $(CYGPATH_W) 'virt-viewer-enums.c'; else $(CYGPATH_W) '$(srcdir)/virt-viewer-enums.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virt_viewer-virt-viewer-enums.Tpo $(DEPDIR)/virt_viewer-virt-viewer-enums.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='virt-viewer-enums.c' object='virt_viewer-virt-viewer-enums.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -c -o virt_viewer-virt-viewer-enums.obj `if test -f 'virt-viewer-enums.c'; then $(CYGPATH_W) 'virt-viewer-enums.c'; else $(CYGPATH_W) '$(srcdir)/virt-viewer-enums.c'; fi` + virt_viewer-virt-viewer-util.o: virt-viewer-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -MT virt_viewer-virt-viewer-util.o -MD -MP -MF $(DEPDIR)/virt_viewer-virt-viewer-util.Tpo -c -o virt_viewer-virt-viewer-util.o `test -f 'virt-viewer-util.c' || echo '$(srcdir)/'`virt-viewer-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virt_viewer-virt-viewer-util.Tpo $(DEPDIR)/virt_viewer-virt-viewer-util.Po @@ -1086,8 +1170,11 @@ -rm -rf .libs _libs install-builderxmlDATA: $(builderxml_DATA) @$(NORMAL_INSTALL) - test -z "$(builderxmldir)" || $(MKDIR_P) "$(DESTDIR)$(builderxmldir)" @list='$(builderxml_DATA)'; test -n "$(builderxmldir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(builderxmldir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(builderxmldir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1104,8 +1191,11 @@ dir='$(DESTDIR)$(builderxmldir)'; $(am__uninstall_files_from_dir) install-desktopDATA: $(desktop_DATA) @$(NORMAL_INSTALL) - test -z "$(desktopdir)" || $(MKDIR_P) "$(DESTDIR)$(desktopdir)" @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(desktopdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(desktopdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1170,6 +1260,20 @@ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -1204,13 +1308,15 @@ fi; \ done check-am: all-am -check: check-am +check: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(PROGRAMS) $(DATA) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(builderxmldir)" "$(DESTDIR)$(desktopdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done -install: install-am +install: $(BUILT_SOURCES) + $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am @@ -1240,6 +1346,7 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." + -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am @@ -1312,23 +1419,29 @@ uninstall-am: uninstall-binPROGRAMS uninstall-builderxmlDATA \ uninstall-desktopDATA -.MAKE: install-am install-strip +.MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-builderxmlDATA install-data \ - install-data-am install-desktopDATA install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-builderxmlDATA uninstall-desktopDATA - + clean-generic clean-libtool cscopelist ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-builderxmlDATA \ + install-data install-data-am install-desktopDATA install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-builderxmlDATA \ + uninstall-desktopDATA + + +$(BUILT_SOURCES): %: %.etemplate $(ENUMS_FILES) + $(AM_V_GEN)$(GLIB_MKENUMS) --template $^ | \ + sed -e 's/VIRT_TYPE_VIEWER/VIRT_VIEWER_TYPE/' \ + -e 's,#include "$(srcdir)/,#include ",' > $@ @OS_WIN32_TRUE@virt-viewer_rc.$(OBJEXT): $(VIRT_VIEWER_RES) $(ICONDIR)/virt-viewer.ico @OS_WIN32_TRUE@ $(AM_V_GEN)$(WINDRES) \ diff --git a/src/remote-viewer-main.c b/src/remote-viewer-main.c index b260c85..615e758 100644 --- a/src/remote-viewer-main.c +++ b/src/remote-viewer-main.c @@ -184,6 +184,7 @@ gchar *uri = virt_viewer_session_get_uri(session); recent_add(uri); + g_free(uri); } int @@ -203,7 +204,6 @@ gboolean controller = FALSE; #endif VirtViewerApp *app; - const char *help_msg = N_("Run '" PACKAGE " --help' to see a full list of available command line options"); const GOptionEntry options [] = { { "version", 'V', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, remote_viewer_version, N_("Display version information"), NULL }, @@ -216,7 +216,7 @@ { "debug", '\0', 0, G_OPTION_ARG_NONE, &debug, N_("Display debugging information"), NULL }, { "full-screen", 'f', G_OPTION_FLAG_OPTIONAL_ARG, G_OPTION_ARG_CALLBACK, option_fullscreen, - N_("Open in full screen mode (=)"), NULL }, + N_("Open in full screen mode (auto-conf adjusts guest resolution to fit the client's)."), N_("") }, #if HAVE_SPICE_GTK { "spice-controller", '\0', 0, G_OPTION_ARG_NONE, &controller, N_("Open connection using Spice controller communication"), NULL }, @@ -260,9 +260,11 @@ #endif g_option_context_parse (context, &argc, &argv, &error); if (error) { - g_printerr("%s\n%s\n", - error->message, - gettext(help_msg)); + char *basename; + basename = g_path_get_basename(argv[0]); + g_printerr(_("%s\nRun '%s --help' to see a full list of available command line options\n"), + error->message, basename); + g_free(basename); g_error_free(error); goto cleanup; } diff --git a/src/virt-glib-compat.h b/src/virt-glib-compat.h new file mode 100644 index 0000000..23345a0 --- /dev/null +++ b/src/virt-glib-compat.h @@ -0,0 +1,56 @@ +/* + * Virt Viewer: A virtual machine console viewer + * + * Copyright (C) 2007-2009 Red Hat, Inc. + * Copyright (C) 2009-2012 Daniel P. Berrange + * Copyright (C) 2010 Marc-André Lureau + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Daniel P. Berrange + */ + +#include + +#ifndef _VIRT_GLIB_COMPAT_H +# define _VIRT_GLIB_COMPAT_H 1 + +#include + +G_BEGIN_DECLS + +#ifndef g_clear_pointer +#define g_clear_pointer(pp, destroy) \ + G_STMT_START { \ + G_STATIC_ASSERT (sizeof *(pp) == sizeof (gpointer)); \ + /* Only one access, please */ \ + gpointer *_pp = (gpointer *) (pp); \ + gpointer _p; \ + /* This assignment is needed to avoid a gcc warning */ \ + GDestroyNotify _destroy = (GDestroyNotify) (destroy); \ + \ + (void) (0 ? (gpointer) *(pp) : 0); \ + do \ + _p = g_atomic_pointer_get (_pp); \ + while G_UNLIKELY (!g_atomic_pointer_compare_and_exchange (_pp, _p, NULL)); \ + \ + if (_p) \ + _destroy (_p); \ + } G_STMT_END +#endif + +G_END_DECLS + +#endif // _VIRT_GLIB_COMPAT_H diff --git a/src/virt-viewer-app.c b/src/virt-viewer-app.c index b2f42ca..def52c5 100644 --- a/src/virt-viewer-app.c +++ b/src/virt-viewer-app.c @@ -283,6 +283,7 @@ GTK_BUTTONS_OK_CANCEL, _("This is the last visible display. Do you want to quit?")); gint result = gtk_dialog_run (GTK_DIALOG (dialog)); + gtk_widget_destroy(dialog); switch (result) { case GTK_RESPONSE_OK: virt_viewer_app_quit(self); @@ -290,7 +291,6 @@ default: break; } - gtk_widget_destroy(dialog); return FALSE; } else { virt_viewer_app_quit(self); @@ -520,6 +520,7 @@ DEBUG_LOG("Remove window %d %p", nth, win); removed = g_hash_table_steal(self->priv->windows, &nth); g_warn_if_fail(removed); + virt_viewer_app_update_menu_displays(self); if (removed) g_signal_emit(self, signals[SIGNAL_WINDOW_REMOVED], 0, win); @@ -540,6 +541,7 @@ DEBUG_LOG("Insert window %d %p", nth, win); g_hash_table_insert(self->priv->windows, key, win); virt_viewer_app_set_window_subtitle(self, win, nth); + virt_viewer_app_update_menu_displays(self); g_signal_emit(self, signals[SIGNAL_WINDOW_ADDED], 0, win); } @@ -609,7 +611,8 @@ { VirtViewerApp *self; VirtViewerNotebook *nb = virt_viewer_window_get_notebook(win); - gint nth, hint; + gint nth; + guint hint; g_object_get(win, "app", &self, @@ -619,15 +622,17 @@ "show-hint", &hint, NULL); - if (hint == VIRT_VIEWER_DISPLAY_SHOW_HINT_HIDE) { + if (hint & VIRT_VIEWER_DISPLAY_SHOW_HINT_DISABLED) { + virt_viewer_window_hide(win); + } else if (hint & VIRT_VIEWER_DISPLAY_SHOW_HINT_READY) { + virt_viewer_notebook_show_display(nb); + virt_viewer_window_show(win); + gtk_window_present(virt_viewer_window_get_window(win)); + } else { if (win != self->priv->main_window && g_getenv("VIRT_VIEWER_HIDE")) virt_viewer_window_hide(win); virt_viewer_notebook_show_status(nb, _("Waiting for display %d..."), nth + 1); - } else { - virt_viewer_notebook_show_display(nb); - virt_viewer_window_show(win); - gtk_window_present(virt_viewer_window_get_window(win)); } g_object_unref(self); @@ -656,8 +661,9 @@ } virt_viewer_window_set_display(window, display); - g_signal_connect(display, "notify::show-hint", - G_CALLBACK(display_show_hint), window); + virt_viewer_app_update_menu_displays(self); + virt_viewer_signal_connect_object(display, "notify::show-hint", + G_CALLBACK(display_show_hint), window, 0); g_object_notify(G_OBJECT(display), "show-hint"); /* call display_show_hint */ } @@ -677,6 +683,13 @@ if (nth != 0) virt_viewer_app_remove_nth_window(self, nth); +} + +static void +virt_viewer_app_display_updated(VirtViewerSession *session G_GNUC_UNUSED, + VirtViewerApp *self) +{ + virt_viewer_app_update_menu_displays(self); } int @@ -729,6 +742,8 @@ G_CALLBACK(virt_viewer_app_display_added), self); g_signal_connect(priv->session, "session-display-removed", G_CALLBACK(virt_viewer_app_display_removed), self); + g_signal_connect(priv->session, "session-display-updated", + G_CALLBACK(virt_viewer_app_display_updated), self); g_signal_connect(priv->session, "session-cut-text", G_CALLBACK(virt_viewer_app_server_cut_text), self); @@ -1273,6 +1288,15 @@ priv->session = NULL; } g_free(priv->title); + priv->title = NULL; + g_free(priv->guest_name); + priv->guest_name = NULL; + g_free(priv->pretty_address); + priv->pretty_address = NULL; + g_free(priv->guri); + priv->guri = NULL; + g_free(priv->title); + priv->title = NULL; virt_viewer_app_free_connect_info(self); @@ -1620,12 +1644,31 @@ while (tmp) { int *nth = tmp->data; VirtViewerWindow *vwin = VIRT_VIEWER_WINDOW(g_hash_table_lookup(self->priv->windows, nth)); + VirtViewerDisplay *display = virt_viewer_window_get_display(vwin); GtkWidget *item; - gboolean visible; - - item = gtk_check_menu_item_new_with_label(g_strdup_printf("Display %d", *nth)); + gboolean visible, sensitive = FALSE; + gchar *label; + + label = g_strdup_printf(_("Display %d"), *nth + 1); + item = gtk_check_menu_item_new_with_label(label); + g_free(label); + visible = gtk_widget_get_visible(GTK_WIDGET(virt_viewer_window_get_window(vwin))); gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), visible); + + if (display) { + guint hint = virt_viewer_display_get_show_hint(display); + + if (hint & VIRT_VIEWER_DISPLAY_SHOW_HINT_READY) + sensitive = TRUE; + + if ((hint & VIRT_VIEWER_DISPLAY_SHOW_HINT_DISABLED) && + virt_viewer_display_get_selectable(display)) + sensitive = TRUE; + } + + gtk_widget_set_sensitive(item, sensitive); + g_signal_connect(G_OBJECT(item), "toggled", G_CALLBACK(menu_display_visible_toggled_cb), vwin); gtk_menu_shell_append(submenu, item); diff --git a/src/virt-viewer-auth.c b/src/virt-viewer-auth.c index 8c4041d..487e67c 100644 --- a/src/virt-viewer-auth.c +++ b/src/virt-viewer-auth.c @@ -89,6 +89,7 @@ } gtk_widget_destroy(GTK_WIDGET(dialog)); + g_object_unref(G_OBJECT(creds)); return response == GTK_RESPONSE_OK ? 0 : -1; } diff --git a/src/virt-viewer-display-spice.c b/src/virt-viewer-display-spice.c index f7bb26d..8845ee0 100644 --- a/src/virt-viewer-display-spice.c +++ b/src/virt-viewer-display-spice.c @@ -35,7 +35,7 @@ G_DEFINE_TYPE (VirtViewerDisplaySpice, virt_viewer_display_spice, VIRT_VIEWER_TYPE_DISPLAY) struct _VirtViewerDisplaySpicePrivate { - SpiceChannel *channel; + SpiceChannel *channel; /* weak reference */ SpiceDisplay *display; }; @@ -47,6 +47,7 @@ static GdkPixbuf *virt_viewer_display_spice_get_pixbuf(VirtViewerDisplay *display); static void virt_viewer_display_spice_release_cursor(VirtViewerDisplay *display); static void virt_viewer_display_spice_close(VirtViewerDisplay *display G_GNUC_UNUSED); +static gboolean virt_viewer_display_spice_selectable(VirtViewerDisplay *display); static void virt_viewer_display_spice_finalize(GObject *obj) @@ -54,7 +55,6 @@ VirtViewerDisplaySpice *spice = VIRT_VIEWER_DISPLAY_SPICE(obj); g_object_unref(spice->priv->display); - g_object_unref(spice->priv->channel); G_OBJECT_CLASS(virt_viewer_display_spice_parent_class)->finalize(obj); } @@ -71,14 +71,45 @@ dclass->get_pixbuf = virt_viewer_display_spice_get_pixbuf; dclass->release_cursor = virt_viewer_display_spice_release_cursor; dclass->close = virt_viewer_display_spice_close; + dclass->selectable = virt_viewer_display_spice_selectable; g_type_class_add_private(klass, sizeof(VirtViewerDisplaySpicePrivate)); } +static SpiceMainChannel* +get_main(VirtViewerDisplay *self) +{ + VirtViewerSessionSpice *session; + + session = VIRT_VIEWER_SESSION_SPICE(virt_viewer_display_get_session(self)); + + return virt_viewer_session_spice_get_main_channel(session); +} + +static void +show_hint_changed(VirtViewerDisplay *self) +{ + SpiceMainChannel *main_channel = get_main(self); + guint enabled = TRUE; + guint nth; + + /* this may happen when finalizing */ + if (!main_channel) + return; + + g_object_get(self, "nth-display", &nth, NULL); + if (virt_viewer_display_get_show_hint(self) & VIRT_VIEWER_DISPLAY_SHOW_HINT_DISABLED) + enabled = FALSE; + + spice_main_set_display_enabled(main_channel, nth, enabled); +} + static void virt_viewer_display_spice_init(VirtViewerDisplaySpice *self G_GNUC_UNUSED) { self->priv = VIRT_VIEWER_DISPLAY_SPICE_GET_PRIVATE(self); + + g_signal_connect(self, "notify::show-hint", G_CALLBACK(show_hint_changed), NULL); } static void @@ -106,30 +137,17 @@ } static void -display_mark(SpiceChannel *channel G_GNUC_UNUSED, - gint mark, - VirtViewerDisplay *display) -{ - DEBUG_LOG("Toggle monitor visibility %p %d", channel, mark); - - virt_viewer_display_set_show_hint(display, mark); -} - -static void -primary_create(SpiceChannel *channel G_GNUC_UNUSED, - gint format G_GNUC_UNUSED, - gint width, - gint height, - gint stride G_GNUC_UNUSED, - gint shmid G_GNUC_UNUSED, - gpointer imgdata G_GNUC_UNUSED, - VirtViewerDisplay *display) -{ - DEBUG_LOG("spice desktop resize %dx%d", width, height); - - virt_viewer_display_set_desktop_size(display, width, height); -} - +display_ready(GObject *display, + GParamSpec *pspec G_GNUC_UNUSED, + VirtViewerDisplay *self) +{ + gboolean ready; + + g_object_get(display, "ready", &ready, NULL); + DEBUG_LOG("display %p ready:%d", self, ready); + + virt_viewer_display_set_show_hint(self, VIRT_VIEWER_DISPLAY_SHOW_HINT_READY, ready); +} static void virt_viewer_display_spice_keyboard_grab(SpiceDisplay *display G_GNUC_UNUSED, @@ -162,9 +180,12 @@ { gdouble dw = allocation->width, dh = allocation->height; guint zoom = 100; - guint channelid; + guint nth; if (virt_viewer_display_get_auto_resize(VIRT_VIEWER_DISPLAY(self)) == FALSE) + return; + + if (virt_viewer_display_get_show_hint(VIRT_VIEWER_DISPLAY(self)) & VIRT_VIEWER_DISPLAY_SHOW_HINT_DISABLED) return; if (virt_viewer_display_get_zoom(VIRT_VIEWER_DISPLAY(self))) { @@ -174,13 +195,10 @@ dh /= ((double)zoom / 100.0); } - g_object_get(self->priv->channel, "channel-id", &channelid, NULL); - - SpiceMainChannel *main_channel = virt_viewer_session_spice_get_main_channel( - VIRT_VIEWER_SESSION_SPICE(virt_viewer_display_get_session(VIRT_VIEWER_DISPLAY(self)))); - spice_main_set_display(main_channel, - channelid, - 0, 0, dw, dh); + g_object_get(self, "nth-display", &nth, NULL); + + spice_main_set_display(get_main(VIRT_VIEWER_DISPLAY(self)), + nth, 0, 0, dw, dh); } static void @@ -200,30 +218,36 @@ GtkWidget * virt_viewer_display_spice_new(VirtViewerSessionSpice *session, SpiceChannel *channel, - SpiceDisplay *display) + gint monitorid) { VirtViewerDisplaySpice *self; VirtViewerApp *app; gint channelid; + SpiceSession *s; g_return_val_if_fail(SPICE_IS_DISPLAY_CHANNEL(channel), NULL); - g_return_val_if_fail(SPICE_IS_DISPLAY(display), NULL); g_object_get(channel, "channel-id", &channelid, NULL); + // We don't allow monitorid != 0 && channelid != 0 + g_return_val_if_fail(channelid == 0 || monitorid == 0, NULL); self = g_object_new(VIRT_VIEWER_TYPE_DISPLAY_SPICE, "session", session, - "nth-display", channelid, + // either monitorid is always 0 or channelid + // is, we can't have display (0, 2) and (2, 0) + // for example + "nth-display", channelid + monitorid, NULL); - self->priv->channel = g_object_ref(channel); - self->priv->display = g_object_ref(display); - - g_signal_connect(channel, "display-primary-create", - G_CALLBACK(primary_create), self); - g_signal_connect(channel, "display-mark", - G_CALLBACK(display_mark), self); - - gtk_container_add(GTK_CONTAINER(self), GTK_WIDGET(self->priv->display)); + self->priv->channel = channel; + + g_object_get(session, "spice-session", &s, NULL); + self->priv->display = spice_display_new_with_monitor(s, channelid, monitorid); + g_object_unref(s); + + virt_viewer_signal_connect_object(self->priv->display, "notify::ready", + G_CALLBACK(display_ready), self, 0); + + gtk_container_add(GTK_CONTAINER(self), g_object_ref(self->priv->display)); gtk_widget_show(GTK_WIDGET(self->priv->display)); g_object_set(self->priv->display, "grab-keyboard", TRUE, @@ -232,19 +256,17 @@ "scaling", TRUE, NULL); - g_signal_connect(self->priv->display, - "keyboard-grab", - G_CALLBACK(virt_viewer_display_spice_keyboard_grab), self); - g_signal_connect(self->priv->display, - "mouse-grab", - G_CALLBACK(virt_viewer_display_spice_mouse_grab), self); - g_signal_connect(self, - "size-allocate", - G_CALLBACK(virt_viewer_display_spice_size_allocate), self); + virt_viewer_signal_connect_object(self->priv->display, "keyboard-grab", + G_CALLBACK(virt_viewer_display_spice_keyboard_grab), self, 0); + virt_viewer_signal_connect_object(self->priv->display, "mouse-grab", + G_CALLBACK(virt_viewer_display_spice_mouse_grab), self, 0); + virt_viewer_signal_connect_object(self, "size-allocate", + G_CALLBACK(virt_viewer_display_spice_size_allocate), self, 0); app = virt_viewer_session_get_app(VIRT_VIEWER_SESSION(session)); - g_signal_connect(app, "notify::enable-accel", G_CALLBACK(enable_accel_changed), self); + virt_viewer_signal_connect_object(app, "notify::enable-accel", + G_CALLBACK(enable_accel_changed), self, 0); enable_accel_changed(app, NULL, self); return GTK_WIDGET(self); @@ -262,6 +284,20 @@ static void virt_viewer_display_spice_close(VirtViewerDisplay *display G_GNUC_UNUSED) { +} + +static gboolean +virt_viewer_display_spice_selectable(VirtViewerDisplay *self) +{ + gboolean agent_connected; + SpiceMainChannel *mainc; + + mainc = get_main(self); + g_object_get(mainc, + "agent-connected", &agent_connected, + NULL); + + return agent_connected; } diff --git a/src/virt-viewer-display-spice.h b/src/virt-viewer-display-spice.h index eecc03e..c2013ec 100644 --- a/src/virt-viewer-display-spice.h +++ b/src/virt-viewer-display-spice.h @@ -66,9 +66,7 @@ GType virt_viewer_display_spice_get_type(void); -GtkWidget* virt_viewer_display_spice_new(VirtViewerSessionSpice *session, - SpiceChannel *channel, - SpiceDisplay *display); +GtkWidget* virt_viewer_display_spice_new(VirtViewerSessionSpice *session, SpiceChannel *channel, gint monitorid); G_END_DECLS diff --git a/src/virt-viewer-display.c b/src/virt-viewer-display.c index 6d6052b..fe7ce4f 100644 --- a/src/virt-viewer-display.c +++ b/src/virt-viewer-display.c @@ -41,7 +41,7 @@ guint zoom_level; gboolean zoom; gint nth_display; - gint show_hint; + guint show_hint; VirtViewerSession *session; gboolean auto_resize; }; @@ -80,6 +80,7 @@ PROP_ZOOM_LEVEL, PROP_SHOW_HINT, PROP_SESSION, + PROP_SELECTABLE, }; static void @@ -151,13 +152,12 @@ g_object_class_install_property(object_class, PROP_SHOW_HINT, - g_param_spec_int("show-hint", - "Show hint", - "Show state hint", - 0, - G_MAXINT32, - 0, - G_PARAM_READABLE)); + g_param_spec_flags("show-hint", + "Show hint", + "Show state hint", + VIRT_VIEWER_TYPE_DISPLAY_SHOW_HINT_FLAGS, + 0, + G_PARAM_READABLE)); g_object_class_install_property(object_class, PROP_SESSION, @@ -168,6 +168,13 @@ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + g_object_class_install_property(object_class, + PROP_SELECTABLE, + g_param_spec_boolean("selectable", + "Selectable", + "Selectable", + FALSE, + G_PARAM_READABLE)); g_signal_new("display-pointer-grab", G_OBJECT_CLASS_TYPE(object_class), @@ -298,10 +305,13 @@ g_value_set_int(value, priv->nth_display); break; case PROP_SHOW_HINT: - g_value_set_int(value, priv->show_hint); + g_value_set_flags(value, priv->show_hint); break; case PROP_SESSION: g_value_set_object(value, virt_viewer_display_get_session(display)); + break; + case PROP_SELECTABLE: + g_value_set_boolean(value, virt_viewer_display_get_selectable(display)); break; default: @@ -404,6 +414,10 @@ DEBUG_LOG("Allocated %dx%d", allocation->width, allocation->height); gtk_widget_set_allocation(widget, allocation); + if (priv->desktopWidth == 0 || + priv->desktopHeight == 0) + goto end; + desktopAspect = (double)priv->desktopWidth / (double)priv->desktopHeight; if (child && gtk_widget_get_visible(child)) { @@ -428,7 +442,7 @@ gtk_widget_size_allocate(child, &child_allocation); } - +end: /* This unsets the size request, so that the user can * manually resize the window smaller again */ @@ -530,12 +544,27 @@ return VIRT_VIEWER_DISPLAY_GET_CLASS(display)->get_pixbuf(display); } -void virt_viewer_display_set_show_hint(VirtViewerDisplay *self, gint hint) +guint virt_viewer_display_get_show_hint(VirtViewerDisplay *self) +{ + g_return_val_if_fail(VIRT_VIEWER_IS_DISPLAY(self), 0); + + return self->priv->show_hint; +} + +void virt_viewer_display_set_show_hint(VirtViewerDisplay *self, guint mask, gboolean enable) { VirtViewerDisplayPrivate *priv; + guint hint; g_return_if_fail(VIRT_VIEWER_IS_DISPLAY(self)); priv = self->priv; + hint = priv->show_hint; + + if (enable) + hint |= mask; + else + hint &= ~mask; + if (priv->show_hint == hint) return; @@ -543,6 +572,13 @@ g_object_notify(G_OBJECT(self), "show-hint"); } +void virt_viewer_display_set_enabled(VirtViewerDisplay *self, gboolean enabled) +{ + g_return_if_fail(VIRT_VIEWER_IS_DISPLAY(self)); + + virt_viewer_display_set_show_hint(self, VIRT_VIEWER_DISPLAY_SHOW_HINT_DISABLED, !enabled); +} + VirtViewerSession* virt_viewer_display_get_session(VirtViewerDisplay *self) { g_return_val_if_fail(VIRT_VIEWER_IS_DISPLAY(self), NULL); @@ -576,6 +612,18 @@ klass->release_cursor(self); } +gboolean virt_viewer_display_get_selectable(VirtViewerDisplay *self) +{ + VirtViewerDisplayClass *klass; + + g_return_val_if_fail(VIRT_VIEWER_IS_DISPLAY(self), FALSE); + + klass = VIRT_VIEWER_DISPLAY_GET_CLASS(self); + if (klass->selectable) + return klass->selectable(self); + + return TRUE; +} void virt_viewer_display_close(VirtViewerDisplay *self) { diff --git a/src/virt-viewer-display.h b/src/virt-viewer-display.h index ffbaf0e..af78709 100644 --- a/src/virt-viewer-display.h +++ b/src/virt-viewer-display.h @@ -25,6 +25,7 @@ #define _VIRT_VIEWER_DISPLAY_H #include +#include "virt-viewer-enums.h" G_BEGIN_DECLS @@ -54,10 +55,10 @@ typedef struct _VirtViewerDisplayChannel VirtViewerDisplayChannel; -enum { - VIRT_VIEWER_DISPLAY_SHOW_HINT_HIDE = 0, - VIRT_VIEWER_DISPLAY_SHOW_HINT_READY, -}; +typedef enum { + VIRT_VIEWER_DISPLAY_SHOW_HINT_READY = 1 << 0, + VIRT_VIEWER_DISPLAY_SHOW_HINT_DISABLED = 1 << 1, +} VirtViewerDisplayShowHintFlags; /* perhaps this become an interface, and be pushed in gtkvnc and spice? */ struct _VirtViewerDisplay { @@ -76,6 +77,7 @@ void (*release_cursor)(VirtViewerDisplay *display); void (*close)(VirtViewerDisplay *display); + gboolean (*selectable)(VirtViewerDisplay *display); /* signals */ void (*display_pointer_grab)(VirtViewerDisplay *display); @@ -108,13 +110,16 @@ void virt_viewer_display_send_keys(VirtViewerDisplay *display, const guint *keyvals, int nkeyvals); GdkPixbuf* virt_viewer_display_get_pixbuf(VirtViewerDisplay *display); -void virt_viewer_display_set_show_hint(VirtViewerDisplay *display, gint hint); +void virt_viewer_display_set_show_hint(VirtViewerDisplay *display, guint mask, gboolean enable); +guint virt_viewer_display_get_show_hint(VirtViewerDisplay *display); VirtViewerSession* virt_viewer_display_get_session(VirtViewerDisplay *display); void virt_viewer_display_set_auto_resize(VirtViewerDisplay *display, gboolean auto_resize); gboolean virt_viewer_display_get_auto_resize(VirtViewerDisplay *display); void virt_viewer_display_release_cursor(VirtViewerDisplay *display); void virt_viewer_display_close(VirtViewerDisplay *display); +void virt_viewer_display_set_enabled(VirtViewerDisplay *display, gboolean enabled); +gboolean virt_viewer_display_get_selectable(VirtViewerDisplay *display); G_END_DECLS diff --git a/src/virt-viewer-enums.c b/src/virt-viewer-enums.c new file mode 100644 index 0000000..4d6c7cf --- /dev/null +++ b/src/virt-viewer-enums.c @@ -0,0 +1,52 @@ + +/* Generated data (by glib-mkenums) */ + +/* + * Virt Viewer: A virtual machine console viewer + * + * Copyright (C) 2007-2012 Red Hat, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Marc-André Lureau + */ + +#include "virt-viewer-enums.h" + +#include "virt-viewer-display.h" + +GType +virt_viewer_display_show_hint_flags_get_type (void) +{ + static volatile gsize g_define_type_id__volatile = 0; + + if (g_once_init_enter (&g_define_type_id__volatile)) + { + static const GFlagsValue values[] = { + { VIRT_VIEWER_DISPLAY_SHOW_HINT_READY, "VIRT_VIEWER_DISPLAY_SHOW_HINT_READY", "ready" }, + { VIRT_VIEWER_DISPLAY_SHOW_HINT_DISABLED, "VIRT_VIEWER_DISPLAY_SHOW_HINT_DISABLED", "disabled" }, + { 0, NULL, NULL } + }; + GType g_define_type_id = + g_flags_register_static (g_intern_static_string ("VirtViewerDisplayShowHintFlags"), values); + g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); + } + + return g_define_type_id__volatile; +} + + +/* Generated data ends here */ + diff --git a/src/virt-viewer-enums.c.etemplate b/src/virt-viewer-enums.c.etemplate new file mode 100644 index 0000000..6f9925f --- /dev/null +++ b/src/virt-viewer-enums.c.etemplate @@ -0,0 +1,60 @@ +/*** BEGIN file-header ***/ +/* + * Virt Viewer: A virtual machine console viewer + * + * Copyright (C) 2007-2012 Red Hat, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Marc-André Lureau + */ + +#include "virt-viewer-enums.h" + +/*** END file-header ***/ + +/*** BEGIN file-production ***/ +#include "@filename@" +/*** END file-production ***/ + + +/*** BEGIN value-header ***/ + +GType +@enum_name@_get_type (void) +{ + static volatile gsize g_define_type_id__volatile = 0; + + if (g_once_init_enter (&g_define_type_id__volatile)) + { + static const G@Type@Value values[] = { +/*** END value-header ***/ + +/*** BEGIN value-production ***/ + { @VALUENAME@, "@VALUENAME@", "@valuenick@" }, +/*** END value-production ***/ + +/*** BEGIN value-tail ***/ + { 0, NULL, NULL } + }; + GType g_define_type_id = + g_@type@_register_static (g_intern_static_string ("@EnumName@"), values); + g_once_init_leave (&g_define_type_id__volatile, g_define_type_id); + } + + return g_define_type_id__volatile; +} + +/*** END value-tail ***/ diff --git a/src/virt-viewer-enums.h b/src/virt-viewer-enums.h new file mode 100644 index 0000000..3ddab97 --- /dev/null +++ b/src/virt-viewer-enums.h @@ -0,0 +1,39 @@ + +/* Generated data (by glib-mkenums) */ + +/* + * Virt Viewer: A virtual machine console viewer + * + * Copyright (C) 2007-2012 Red Hat, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Marc-André Lureau + */ + +#ifndef VIRT_VIEWER_ENUMS_H +#define VIRT_VIEWER_ENUMS_H + +#include + +G_BEGIN_DECLS +GType virt_viewer_display_show_hint_flags_get_type (void) G_GNUC_CONST; +#define VIRT_VIEWER_TYPE_DISPLAY_SHOW_HINT_FLAGS (virt_viewer_display_show_hint_flags_get_type ()) +G_END_DECLS + +#endif + +/* Generated data ends here */ + diff --git a/src/virt-viewer-enums.h.etemplate b/src/virt-viewer-enums.h.etemplate new file mode 100644 index 0000000..f33158d --- /dev/null +++ b/src/virt-viewer-enums.h.etemplate @@ -0,0 +1,41 @@ +/*** BEGIN file-header ***/ +/* + * Virt Viewer: A virtual machine console viewer + * + * Copyright (C) 2007-2012 Red Hat, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * Author: Marc-André Lureau + */ + +#ifndef VIRT_VIEWER_ENUMS_H +#define VIRT_VIEWER_ENUMS_H + +#include + +G_BEGIN_DECLS +/*** END file-header ***/ + +/*** BEGIN value-header ***/ +GType @enum_name@_get_type (void) G_GNUC_CONST; +#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ()) +/*** END value-header ***/ + +/*** BEGIN file-tail ***/ +G_END_DECLS + +#endif +/*** END file-tail ***/ diff --git a/src/virt-viewer-main.c b/src/virt-viewer-main.c index c80949b..bf938c4 100644 --- a/src/virt-viewer-main.c +++ b/src/virt-viewer-main.c @@ -57,7 +57,8 @@ gboolean reconnect = FALSE; gboolean fullscreen = FALSE; VirtViewer *viewer = NULL; - const char *help_msg = N_("Run '" PACKAGE " --help' to see a full list of available command line options"); + char *basename; + char *help_msg = NULL; const GOptionEntry options [] = { { "version", 'V', G_OPTION_FLAG_NO_ARG, G_OPTION_ARG_CALLBACK, virt_viewer_version, N_("Display version information"), NULL }, @@ -95,6 +96,12 @@ g_set_application_name(_("Virt Viewer")); + + basename = g_path_get_basename(argv[0]); + help_msg = g_strdup_printf(_("Run '%s --help' to see a full list of available command line options"), + basename); + g_free(basename); + /* Setup command line options */ context = g_option_context_new (_("- Virtual machine graphical console")); g_option_context_add_main_entries (context, options, NULL); @@ -108,8 +115,7 @@ g_option_context_parse (context, &argc, &argv, &error); if (error) { g_printerr("%s\n%s\n", - error->message, - gettext(help_msg)); + error->message, help_msg); g_error_free(error); goto cleanup; } @@ -147,6 +153,7 @@ g_object_unref(viewer); g_free(uri); g_strfreev(args); + g_free(help_msg); return ret; } diff --git a/src/virt-viewer-notebook.c b/src/virt-viewer-notebook.c index 09e8ec4..cc7136b 100644 --- a/src/virt-viewer-notebook.c +++ b/src/virt-viewer-notebook.c @@ -86,6 +86,7 @@ priv->status = gtk_label_new(""); gtk_notebook_set_show_tabs(GTK_NOTEBOOK(self), FALSE); gtk_notebook_set_show_border(GTK_NOTEBOOK(self), FALSE); + gtk_widget_show_all(priv->status); gtk_notebook_append_page(GTK_NOTEBOOK(self), priv->status, NULL); gdk_color_parse("white", &color); gtk_widget_modify_fg(priv->status, GTK_STATE_NORMAL, &color); diff --git a/src/virt-viewer-session-spice.c b/src/virt-viewer-session-spice.c index d11d7a1..5fcd7fb 100644 --- a/src/virt-viewer-session-spice.c +++ b/src/virt-viewer-session-spice.c @@ -33,6 +33,7 @@ #include "virt-viewer-session-spice.h" #include "virt-viewer-display-spice.h" #include "virt-viewer-auth.h" +#include "virt-glib-compat.h" #if !GLIB_CHECK_VERSION(2, 26, 0) #include "gbinding.h" @@ -325,6 +326,7 @@ gboolean openfd; g_object_set(self->priv->session, "password", password, NULL); + g_free(password); g_object_get(self->priv->session, "client-sockets", &openfd, NULL); if (openfd) @@ -404,12 +406,93 @@ } static void -agent_connected_changed(SpiceChannel *cmain, +agent_connected_changed(SpiceChannel *cmain G_GNUC_UNUSED, GParamSpec *pspec G_GNUC_UNUSED, VirtViewerSessionSpice *self) { + // this will force refresh of application menu + g_signal_emit_by_name(self, "session-display-updated"); +} + +static void +agent_connected_fullscreen_auto_conf(SpiceChannel *cmain, + GParamSpec *pspec G_GNUC_UNUSED, + VirtViewerSessionSpice *self) +{ if (virt_viewer_session_spice_fullscreen_auto_conf(self)) - g_signal_handlers_disconnect_by_func(cmain, agent_connected_changed, self); + g_signal_handlers_disconnect_by_func(cmain, agent_connected_fullscreen_auto_conf, self); +} + +static void +destroy_display(gpointer data) +{ + VirtViewerDisplay *display = VIRT_VIEWER_DISPLAY(data); + VirtViewerSession *session = virt_viewer_display_get_session(display); + + DEBUG_LOG("Destroying spice display %p", display); + virt_viewer_session_remove_display(session, display); + g_object_unref(display); +} + +static void +virt_viewer_session_spice_display_monitors(SpiceChannel *channel, + GParamSpec *pspec G_GNUC_UNUSED, + VirtViewerSessionSpice *self) +{ + GArray *monitors = NULL; + GPtrArray *displays = NULL; + GtkWidget *display; + guint i, monitors_max; + + g_object_get(channel, + "monitors", &monitors, + "monitors-max", &monitors_max, + NULL); + g_return_if_fail(monitors != NULL); + g_return_if_fail(monitors->len <= monitors_max); + + displays = g_object_get_data(G_OBJECT(channel), "virt-viewer-displays"); + if (displays == NULL) { + displays = g_ptr_array_new(); + g_ptr_array_set_free_func(displays, destroy_display); + g_object_set_data_full(G_OBJECT(channel), "virt-viewer-displays", + displays, (GDestroyNotify)g_ptr_array_unref); + } + + g_ptr_array_set_size(displays, monitors_max); + + for (i = 0; i < monitors_max; i++) { + display = g_ptr_array_index(displays, i); + if (display == NULL) { + display = virt_viewer_display_spice_new(self, channel, i); + DEBUG_LOG("creating spice display (#:%d)", i); + g_ptr_array_index(displays, i) = g_object_ref(display); + } + + g_object_freeze_notify(G_OBJECT(display)); + virt_viewer_display_set_enabled(VIRT_VIEWER_DISPLAY(display), FALSE); + virt_viewer_session_add_display(VIRT_VIEWER_SESSION(self), + VIRT_VIEWER_DISPLAY(display)); + } + + for (i = 0; i < monitors->len; i++) { + SpiceDisplayMonitorConfig *monitor = &g_array_index(monitors, SpiceDisplayMonitorConfig, i); + display = g_ptr_array_index(displays, monitor->id); + g_return_if_fail(display != NULL); + + if (monitor->width == 0 || monitor->width == 0) + continue; + + virt_viewer_display_set_enabled(VIRT_VIEWER_DISPLAY(display), TRUE); + virt_viewer_display_set_desktop_size(VIRT_VIEWER_DISPLAY(display), + monitor->width, monitor->height); + } + + for (i = 0; i < monitors_max; i++) + g_object_thaw_notify(g_ptr_array_index(displays, i)); + + g_clear_pointer(&monitors, g_array_unref); + } static void @@ -438,24 +521,20 @@ G_CALLBACK(virt_viewer_session_spice_main_channel_event), self); self->priv->main_channel = SPICE_MAIN_CHANNEL(channel); - g_signal_connect(channel, "notify::agent-connected", G_CALLBACK(agent_connected_changed), self); - agent_connected_changed(channel, NULL, self); + g_signal_connect(channel, "notify::agent-connected", G_CALLBACK(agent_connected_changed), self); + g_signal_connect(channel, "notify::agent-connected", G_CALLBACK(agent_connected_fullscreen_auto_conf), self); + agent_connected_fullscreen_auto_conf(channel, NULL, self); + + g_signal_emit_by_name(session, "session-connected"); } if (SPICE_IS_DISPLAY_CHANNEL(channel)) { - GtkWidget *display; - - g_signal_emit_by_name(session, "session-connected"); - - DEBUG_LOG("new display channel (#%d)", id); - display = virt_viewer_display_spice_new(self, - channel, - spice_display_new(s, id)); - - virt_viewer_session_add_display(VIRT_VIEWER_SESSION(session), - VIRT_VIEWER_DISPLAY(display)); - g_signal_emit_by_name(session, "session-initialized"); + + g_signal_connect(channel, "notify::monitors", + G_CALLBACK(virt_viewer_session_spice_display_monitors), self); + + spice_channel_connect(channel); } if (SPICE_IS_INPUTS_CHANNEL(channel)) { @@ -500,6 +579,10 @@ DEBUG_LOG("Performing full screen auto-conf, %d host monitors", gdk_screen_get_n_monitors(screen)); + g_object_set(G_OBJECT(cmain), + "disable-display-position", FALSE, + "disable-display-align", TRUE, + NULL); spice_main_set_display_enabled(cmain, -1, FALSE); for (i = 0; i < gdk_screen_get_n_monitors(screen); i++) { gdk_screen_get_monitor_geometry(screen, i, &dest); @@ -533,7 +616,8 @@ } if (SPICE_IS_DISPLAY_CHANNEL(channel)) { - DEBUG_LOG("zap session channel (#%d)", id); + VirtViewerDisplay *display = g_object_get_data(G_OBJECT(channel), "virt-viewer-display"); + DEBUG_LOG("zap display channel (#%d, %p)", id, display); } if (SPICE_IS_PLAYBACK_CHANNEL(channel) && self->priv->audio) { diff --git a/src/virt-viewer-session-vnc.c b/src/virt-viewer-session-vnc.c index 238c865..52baf5c 100644 --- a/src/virt-viewer-session-vnc.c +++ b/src/virt-viewer-session-vnc.c @@ -95,7 +95,7 @@ GtkWidget *display = virt_viewer_display_vnc_new(session->priv->vnc); g_signal_emit_by_name(session, "session-connected"); virt_viewer_display_set_show_hint(VIRT_VIEWER_DISPLAY(display), - VIRT_VIEWER_DISPLAY_SHOW_HINT_READY); + VIRT_VIEWER_DISPLAY_SHOW_HINT_READY, TRUE); virt_viewer_session_add_display(VIRT_VIEWER_SESSION(session), VIRT_VIEWER_DISPLAY(display)); } @@ -104,11 +104,11 @@ virt_viewer_session_vnc_disconnected(VncDisplay *vnc G_GNUC_UNUSED, VirtViewerSessionVnc *session) { + GtkWidget *display = virt_viewer_display_vnc_new(session->priv->vnc); DEBUG_LOG("Disconnected"); g_signal_emit_by_name(session, "session-disconnected"); - /* TODO perhaps? */ - /* virt_viewer_display_set_show_hint(VIRT_VIEWER_DISPLAY(session->priv->vnc), */ - /* VIRT_VIEWER_DISPLAY_SHOW_HINT_HIDE); */ + virt_viewer_display_set_show_hint(VIRT_VIEWER_DISPLAY(display), + VIRT_VIEWER_DISPLAY_SHOW_HINT_READY, FALSE); } static void diff --git a/src/virt-viewer-session.c b/src/virt-viewer-session.c index 18b6922..a1d96c2 100644 --- a/src/virt-viewer-session.c +++ b/src/virt-viewer-session.c @@ -233,6 +233,16 @@ 1, VIRT_VIEWER_TYPE_DISPLAY); + g_signal_new("session-display-updated", + G_OBJECT_CLASS_TYPE(object_class), + G_SIGNAL_RUN_LAST | G_SIGNAL_NO_HOOKS, + G_STRUCT_OFFSET(VirtViewerSessionClass, session_display_updated), + NULL, + NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, + 0); + g_signal_new("session-cut-text", G_OBJECT_CLASS_TYPE(object_class), G_SIGNAL_RUN_LAST | G_SIGNAL_NO_HOOKS, @@ -282,6 +292,9 @@ void virt_viewer_session_add_display(VirtViewerSession *session, VirtViewerDisplay *display) { + if (g_list_find(session->priv->displays, display)) + return; + session->priv->displays = g_list_append(session->priv->displays, display); g_object_ref(display); g_signal_emit_by_name(session, "session-display-added", display); diff --git a/src/virt-viewer-session.h b/src/virt-viewer-session.h index 44e4674..38ed988 100644 --- a/src/virt-viewer-session.h +++ b/src/virt-viewer-session.h @@ -88,6 +88,7 @@ VirtViewerDisplay *display); void (*session_display_removed)(VirtViewerSession *session, VirtViewerDisplay *display); + void (*session_display_updated)(VirtViewerSession *session); void (*session_cut_text)(VirtViewerSession *session, const gchar *str); void (*session_bell)(VirtViewerSession *session); diff --git a/src/virt-viewer-util.c b/src/virt-viewer-util.c index c1182af..9a163fa 100644 --- a/src/virt-viewer-util.c +++ b/src/virt-viewer-util.c @@ -136,6 +136,123 @@ return 0; } +typedef struct { + GObject *instance; + GObject *observer; + GClosure *closure; + gulong handler_id; +} WeakHandlerCtx; + +static WeakHandlerCtx * +whc_new(GObject *instance, + GObject *observer) +{ + WeakHandlerCtx *ctx = g_slice_new0(WeakHandlerCtx); + + ctx->instance = instance; + ctx->observer = observer; + + return ctx; +} + +static void +whc_free(WeakHandlerCtx *ctx) +{ + g_slice_free(WeakHandlerCtx, ctx); +} + +static void observer_destroyed_cb(gpointer, GObject *); +static void closure_invalidated_cb(gpointer, GClosure *); + +/* + * If signal handlers are removed before the object is destroyed, this + * callback will never get triggered. + */ +static void +instance_destroyed_cb(gpointer ctx_, + GObject *where_the_instance_was G_GNUC_UNUSED) +{ + WeakHandlerCtx *ctx = ctx_; + + /* No need to disconnect the signal here, the instance has gone away. */ + g_object_weak_unref(ctx->observer, observer_destroyed_cb, ctx); + g_closure_remove_invalidate_notifier(ctx->closure, ctx, + closure_invalidated_cb); + whc_free(ctx); +} + +/* Triggered when the observer is destroyed. */ +static void +observer_destroyed_cb(gpointer ctx_, + GObject *where_the_observer_was G_GNUC_UNUSED) +{ + WeakHandlerCtx *ctx = ctx_; + + g_closure_remove_invalidate_notifier(ctx->closure, ctx, + closure_invalidated_cb); + g_signal_handler_disconnect(ctx->instance, ctx->handler_id); + g_object_weak_unref(ctx->instance, instance_destroyed_cb, ctx); + whc_free(ctx); +} + +/* Triggered when either object is destroyed or the handler is disconnected. */ +static void +closure_invalidated_cb(gpointer ctx_, + GClosure *where_the_closure_was G_GNUC_UNUSED) +{ + WeakHandlerCtx *ctx = ctx_; + + g_object_weak_unref(ctx->instance, instance_destroyed_cb, ctx); + g_object_weak_unref(ctx->observer, observer_destroyed_cb, ctx); + whc_free(ctx); +} + +/* Copied from tp_g_signal_connect_object. */ +/** + * virt_viewer_signal_connect_object: (skip) + * @instance: the instance to connect to. + * @detailed_signal: a string of the form "signal-name::detail". + * @c_handler: the #GCallback to connect. + * @gobject: the object to pass as data to @c_handler. + * @connect_flags: a combination of #GConnectFlags. + * + * Similar to g_signal_connect_object() but will delete connection + * when any of the objects is destroyed. + * + * Returns: the handler id. + */ +gulong virt_viewer_signal_connect_object(gpointer instance, + const gchar *detailed_signal, + GCallback c_handler, + gpointer gobject, + GConnectFlags connect_flags) +{ + GObject *instance_obj = G_OBJECT(instance); + WeakHandlerCtx *ctx = whc_new(instance_obj, gobject); + + g_return_val_if_fail(G_TYPE_CHECK_INSTANCE (instance), 0); + g_return_val_if_fail(detailed_signal != NULL, 0); + g_return_val_if_fail(c_handler != NULL, 0); + g_return_val_if_fail(G_IS_OBJECT (gobject), 0); + g_return_val_if_fail((connect_flags & ~(G_CONNECT_AFTER|G_CONNECT_SWAPPED)) == 0, 0); + + if (connect_flags & G_CONNECT_SWAPPED) + ctx->closure = g_cclosure_new_object_swap(c_handler, gobject); + else + ctx->closure = g_cclosure_new_object(c_handler, gobject); + + ctx->handler_id = g_signal_connect_closure(instance, detailed_signal, + ctx->closure, (connect_flags & G_CONNECT_AFTER) ? TRUE : FALSE); + + g_object_weak_ref(instance_obj, instance_destroyed_cb, ctx); + g_object_weak_ref(gobject, observer_destroyed_cb, ctx); + g_closure_add_invalidate_notifier(ctx->closure, ctx, + closure_invalidated_cb); + + return ctx->handler_id; +} + + /* * Local variables: * c-indent-level: 4 diff --git a/src/virt-viewer-util.h b/src/virt-viewer-util.h index 3a40651..38c8078 100644 --- a/src/virt-viewer-util.h +++ b/src/virt-viewer-util.h @@ -40,6 +40,12 @@ char **user, int *port); +gulong virt_viewer_signal_connect_object(gpointer instance, + const gchar *detailed_signal, + GCallback c_handler, + gpointer gobject, + GConnectFlags connect_flags); + #endif /* diff --git a/src/virt-viewer-window.c b/src/virt-viewer-window.c index ab82558..7c6e41f 100644 --- a/src/virt-viewer-window.c +++ b/src/virt-viewer-window.c @@ -112,7 +112,8 @@ virt_viewer_window_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { - VirtViewerWindowPrivate *priv = VIRT_VIEWER_WINDOW(object)->priv; + VirtViewerWindow *self = VIRT_VIEWER_WINDOW(object); + VirtViewerWindowPrivate *priv = self->priv; switch (property_id) { case PROP_SUBTITLE: @@ -124,7 +125,7 @@ break; case PROP_DISPLAY: - g_value_set_object(value, priv->display); + g_value_set_object(value, virt_viewer_window_get_display(self)); break; case PROP_CONTAINER: @@ -172,6 +173,8 @@ virt_viewer_window_dispose (GObject *object) { VirtViewerWindowPrivate *priv = VIRT_VIEWER_WINDOW(object)->priv; + GSList *it; + G_OBJECT_CLASS (virt_viewer_window_parent_class)->dispose (object); if (priv->display) { @@ -190,8 +193,16 @@ priv->builder = NULL; } + for (it = priv->accel_list ; it != NULL ; it = it->next) { + g_object_unref(G_OBJECT(it->data)); + } + g_slist_free(priv->accel_list); + priv->accel_list = NULL; + g_free(priv->subtitle); priv->subtitle = NULL; + + g_value_unset(&priv->accel_setting); } static void @@ -422,6 +433,11 @@ gdk_screen_get_monitor_at_window (screen, gtk_widget_get_window(priv->window)), &fullscreen); + + g_return_if_fail(fullscreen.height > 128); + g_return_if_fail(fullscreen.width > 128); + g_return_if_fail(desktopWidth > 0); + g_return_if_fail(desktopHeight > 0); desktopAspect = (double)desktopWidth / (double)desktopHeight; screenAspect = (double)(fullscreen.width - 128) / (double)(fullscreen.height - 128); @@ -992,9 +1008,12 @@ GParamSpec *pspec G_GNUC_UNUSED, VirtViewerWindow *self) { - gboolean hint; + guint hint; g_object_get(display, "show-hint", &hint, NULL); + + hint = (hint & VIRT_VIEWER_DISPLAY_SHOW_HINT_READY); + gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(self->priv->builder, "menu-send")), hint); gtk_widget_set_sensitive(GTK_WIDGET(gtk_builder_get_object(self->priv->builder, "menu-file-screenshot")), hint); gtk_widget_set_sensitive(self->priv->toolbar_send_key, hint); @@ -1021,21 +1040,25 @@ virt_viewer_display_set_zoom_level(VIRT_VIEWER_DISPLAY(priv->display), priv->zoomlevel); virt_viewer_display_set_auto_resize(VIRT_VIEWER_DISPLAY(priv->display), priv->auto_resize); + gtk_widget_show_all(GTK_WIDGET(display)); gtk_notebook_append_page(GTK_NOTEBOOK(priv->notebook), GTK_WIDGET(display), NULL); - gtk_widget_show_all(GTK_WIDGET(display)); - - g_signal_connect(display, "display-pointer-grab", - G_CALLBACK(virt_viewer_window_pointer_grab), self); - g_signal_connect(display, "display-pointer-ungrab", - G_CALLBACK(virt_viewer_window_pointer_ungrab), self); - g_signal_connect(display, "display-keyboard-grab", - G_CALLBACK(virt_viewer_window_keyboard_grab), self); - g_signal_connect(display, "display-keyboard-ungrab", - G_CALLBACK(virt_viewer_window_keyboard_ungrab), self); - g_signal_connect(display, "display-desktop-resize", - G_CALLBACK(virt_viewer_window_desktop_resize), self); - g_signal_connect(display, "notify::show-hint", - G_CALLBACK(display_show_hint), self); + /* switch back to non-display if not ready */ + if (!(virt_viewer_display_get_show_hint(display) & + VIRT_VIEWER_DISPLAY_SHOW_HINT_READY)) + gtk_notebook_set_current_page(GTK_NOTEBOOK(priv->notebook), 0); + + virt_viewer_signal_connect_object(display, "display-pointer-grab", + G_CALLBACK(virt_viewer_window_pointer_grab), self, 0); + virt_viewer_signal_connect_object(display, "display-pointer-ungrab", + G_CALLBACK(virt_viewer_window_pointer_ungrab), self, 0); + virt_viewer_signal_connect_object(display, "display-keyboard-grab", + G_CALLBACK(virt_viewer_window_keyboard_grab), self, 0); + virt_viewer_signal_connect_object(display, "display-keyboard-ungrab", + G_CALLBACK(virt_viewer_window_keyboard_ungrab), self, 0); + virt_viewer_signal_connect_object(display, "display-desktop-resize", + G_CALLBACK(virt_viewer_window_desktop_resize), self, 0); + virt_viewer_signal_connect_object(display, "notify::show-hint", + G_CALLBACK(display_show_hint), self, 0); } } @@ -1043,6 +1066,9 @@ virt_viewer_window_show(VirtViewerWindow *self) { gtk_widget_show(self->priv->window); + + if (self->priv->display) + virt_viewer_display_set_enabled(self->priv->display, TRUE); if (self->priv->desktop_resize_pending) { virt_viewer_window_resize(self); @@ -1054,6 +1080,15 @@ virt_viewer_window_hide(VirtViewerWindow *self) { gtk_widget_hide(self->priv->window); + + if (self->priv->display) { + VirtViewerDisplay *display = self->priv->display; + guint nth; + + g_object_get(display, "nth-display", &nth, NULL); + if (nth != 0) + virt_viewer_display_set_enabled(display, FALSE); + } } void @@ -1085,6 +1120,14 @@ g_return_val_if_fail(VIRT_VIEWER_IS_WINDOW(self), NULL); return self->priv->builder; +} + +VirtViewerDisplay* +virt_viewer_window_get_display(VirtViewerWindow *self) +{ + g_return_val_if_fail(VIRT_VIEWER_WINDOW(self), FALSE); + + return self->priv->display; } /* diff --git a/src/virt-viewer-window.h b/src/virt-viewer-window.h index f80c4c7..44db585 100644 --- a/src/virt-viewer-window.h +++ b/src/virt-viewer-window.h @@ -63,6 +63,7 @@ GtkWindow* virt_viewer_window_get_window (VirtViewerWindow* window); VirtViewerNotebook* virt_viewer_window_get_notebook (VirtViewerWindow* window); void virt_viewer_window_set_display(VirtViewerWindow *self, VirtViewerDisplay *display); +VirtViewerDisplay* virt_viewer_window_get_display(VirtViewerWindow *self); void virt_viewer_window_set_usb_options_sensitive(VirtViewerWindow *self, gboolean sensitive); void virt_viewer_window_update_title(VirtViewerWindow *self); void virt_viewer_window_show(VirtViewerWindow *self); diff --git a/src/virt-viewer.rc b/src/virt-viewer.rc index db93714..e944602 100644 --- a/src/virt-viewer.rc +++ b/src/virt-viewer.rc @@ -9,12 +9,12 @@ BEGIN VALUE "CompanyName", "virt-manager.org" VALUE "FileDescription", "A remote desktop client" - VALUE "FileVersion", "0.5.3" - VALUE "InternalName", "virt-viewer 0.5.3" + VALUE "FileVersion", "0.5.4" + VALUE "InternalName", "virt-viewer 0.5.4" VALUE "LegalCopyright", "Copyright (C) 2007-2012 Red Hat, Inc." VALUE "OriginalFilename", "virt-viewer.exe" VALUE "ProductName", "VirtViewer" - VALUE "ProductVersion", "0.5.3" + VALUE "ProductVersion", "0.5.4" END END diff --git a/virt-viewer.spec b/virt-viewer.spec index d79ffd0..a3417be 100644 --- a/virt-viewer.spec +++ b/virt-viewer.spec @@ -24,7 +24,7 @@ %endif Name: virt-viewer -Version: 0.5.3 +Version: 0.5.4 Release: 1%{?dist}%{?extra_release} Summary: Virtual Machine Viewer Group: Applications/System @@ -38,6 +38,7 @@ Requires(post): desktop-file-utils Requires(postun): desktop-file-utils +BuildRequires: glib2-devel >= 2.22 %if %{with_gtk3} BuildRequires: gtk3-devel >= 3.0.0 %else @@ -52,9 +53,9 @@ %endif %if %{with_spice} %if %{with_gtk3} -BuildRequires: spice-gtk3-devel >= 0.11 +BuildRequires: spice-gtk3-devel >= 0.12.101 %else -BuildRequires: spice-gtk-devel >= 0.11 +BuildRequires: spice-gtk-devel >= 0.12.101 %endif BuildRequires: spice-protocol >= 0.10.1 %endif diff --git a/virt-viewer.spec.in b/virt-viewer.spec.in index bbdfade..ac236f4 100644 --- a/virt-viewer.spec.in +++ b/virt-viewer.spec.in @@ -38,6 +38,7 @@ Requires(post): desktop-file-utils Requires(postun): desktop-file-utils +BuildRequires: glib2-devel >= 2.22 %if %{with_gtk3} BuildRequires: gtk3-devel >= 3.0.0 %else @@ -52,9 +53,9 @@ %endif %if %{with_spice} %if %{with_gtk3} -BuildRequires: spice-gtk3-devel >= 0.11 +BuildRequires: spice-gtk3-devel >= 0.12.101 %else -BuildRequires: spice-gtk-devel >= 0.11 +BuildRequires: spice-gtk-devel >= 0.12.101 %endif BuildRequires: spice-protocol >= 0.10.1 %endif