Package list virt-viewer / 09d4f14
Imported Upstream version 0.4.1 Laurent Léonard 9 years ago
34 changed file(s) with 3350 addition(s) and 2760 deletion(s). Raw diff Collapse all Expand all
120120 AUTOHEADER = @AUTOHEADER@
121121 AUTOMAKE = @AUTOMAKE@
122122 AWK = @AWK@
123 CATALOGS = @CATALOGS@
124 CATOBJEXT = @CATOBJEXT@
125123 CC = @CC@
126124 CCDEPMODE = @CCDEPMODE@
127125 CFLAGS = @CFLAGS@
145143 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
146144 GLIB2_CFLAGS = @GLIB2_CFLAGS@
147145 GLIB2_LIBS = @GLIB2_LIBS@
148 GMOFILES = @GMOFILES@
149146 GMSGFMT = @GMSGFMT@
150147 GREP = @GREP@
151148 GTK_API_VERSION = @GTK_API_VERSION@
160157 INSTALL_PROGRAM = @INSTALL_PROGRAM@
161158 INSTALL_SCRIPT = @INSTALL_SCRIPT@
162159 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
163 INSTOBJEXT = @INSTOBJEXT@
164 INTLLIBS = @INTLLIBS@
165160 INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
166161 INTLTOOL_MERGE = @INTLTOOL_MERGE@
167162 INTLTOOL_PERL = @INTLTOOL_PERL@
181176 MAKEINFO = @MAKEINFO@
182177 MANIFEST_TOOL = @MANIFEST_TOOL@
183178 MKDIR_P = @MKDIR_P@
184 MKINSTALLDIRS = @MKINSTALLDIRS@
185179 MOZILLA_PLUGIN_CFLAGS = @MOZILLA_PLUGIN_CFLAGS@
186180 MOZILLA_PLUGIN_LIBS = @MOZILLA_PLUGIN_LIBS@
187181 MSGFMT = @MSGFMT@
188 MSGFMT_OPTS = @MSGFMT_OPTS@
189182 MSGMERGE = @MSGMERGE@
190183 NM = @NM@
191184 NMEDIT = @NMEDIT@
206199 PKG_CONFIG = @PKG_CONFIG@
207200 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
208201 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
209 POFILES = @POFILES@
210 POSUB = @POSUB@
211 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
212 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
213202 RANLIB = @RANLIB@
214203 SED = @SED@
215204 SET_MAKE = @SET_MAKE@
00 Virt Viewer News
11 ================
2
3 0.4.1: Aug 4, 2011
4 -------------------
5
6 - Remove bogus use of AM_GLIB_GNU_GETTEXT macro to try to
7 facilitate BSD builds
8 - Support multiple monitors with SPICE and QXL drivers
9 - Don't hardcode SSH port to 22 when tunnelling
210
311 0.4.0: Jul 12, 2011
412 -------------------
1717 You have another version of autoconf. It may work, but is not guaranteed to.
1818 If you have problems, you may need to regenerate the build system entirely.
1919 To do so, use the procedure documented by the package, typically `autoreconf'.])])
20
21 # Copyright (C) 1995-2002 Free Software Foundation, Inc.
22 # Copyright (C) 2001-2003,2004 Red Hat, Inc.
23 #
24 # This file is free software, distributed under the terms of the GNU
25 # General Public License. As a special exception to the GNU General
26 # Public License, this file may be distributed as part of a program
27 # that contains a configuration script generated by Autoconf, under
28 # the same distribution terms as the rest of that program.
29 #
30 # This file can be copied and used freely without restrictions. It can
31 # be used in projects which are not available under the GNU Public License
32 # but which still want to provide support for the GNU gettext functionality.
33 #
34 # Macro to add for using GNU gettext.
35 # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
36 #
37 # Modified to never use included libintl.
38 # Owen Taylor <otaylor@redhat.com>, 12/15/1998
39 #
40 # Major rework to remove unused code
41 # Owen Taylor <otaylor@redhat.com>, 12/11/2002
42 #
43 # Added better handling of ALL_LINGUAS from GNU gettext version
44 # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
45 #
46 # Modified to require ngettext
47 # Matthias Clasen <mclasen@redhat.com> 08/06/2004
48 #
49 # We need this here as well, since someone might use autoconf-2.5x
50 # to configure GLib then an older version to configure a package
51 # using AM_GLIB_GNU_GETTEXT
52 AC_PREREQ(2.53)
53
54 dnl
55 dnl We go to great lengths to make sure that aclocal won't
56 dnl try to pull in the installed version of these macros
57 dnl when running aclocal in the glib directory.
58 dnl
59 m4_copy([AC_DEFUN],[glib_DEFUN])
60 m4_copy([AC_REQUIRE],[glib_REQUIRE])
61 dnl
62 dnl At the end, if we're not within glib, we'll define the public
63 dnl definitions in terms of our private definitions.
64 dnl
65
66 # GLIB_LC_MESSAGES
67 #--------------------
68 glib_DEFUN([GLIB_LC_MESSAGES],
69 [AC_CHECK_HEADERS([locale.h])
70 if test $ac_cv_header_locale_h = yes; then
71 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
72 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
73 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
74 if test $am_cv_val_LC_MESSAGES = yes; then
75 AC_DEFINE(HAVE_LC_MESSAGES, 1,
76 [Define if your <locale.h> file defines LC_MESSAGES.])
77 fi
78 fi])
79
80 # GLIB_PATH_PROG_WITH_TEST
81 #----------------------------
82 dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
83 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
84 glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
85 [# Extract the first word of "$2", so it can be a program name with args.
86 set dummy $2; ac_word=[$]2
87 AC_MSG_CHECKING([for $ac_word])
88 AC_CACHE_VAL(ac_cv_path_$1,
89 [case "[$]$1" in
90 /*)
91 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
92 ;;
93 *)
94 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
95 for ac_dir in ifelse([$5], , $PATH, [$5]); do
96 test -z "$ac_dir" && ac_dir=.
97 if test -f $ac_dir/$ac_word; then
98 if [$3]; then
99 ac_cv_path_$1="$ac_dir/$ac_word"
100 break
101 fi
102 fi
103 done
104 IFS="$ac_save_ifs"
105 dnl If no 4th arg is given, leave the cache variable unset,
106 dnl so AC_PATH_PROGS will keep looking.
107 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
108 ])dnl
109 ;;
110 esac])dnl
111 $1="$ac_cv_path_$1"
112 if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
113 AC_MSG_RESULT([$]$1)
114 else
115 AC_MSG_RESULT(no)
116 fi
117 AC_SUBST($1)dnl
118 ])
119
120 # GLIB_WITH_NLS
121 #-----------------
122 glib_DEFUN([GLIB_WITH_NLS],
123 dnl NLS is obligatory
124 [USE_NLS=yes
125 AC_SUBST(USE_NLS)
126
127 gt_cv_have_gettext=no
128
129 CATOBJEXT=NONE
130 XGETTEXT=:
131 INTLLIBS=
132
133 AC_CHECK_HEADER(libintl.h,
134 [gt_cv_func_dgettext_libintl="no"
135 libintl_extra_libs=""
136
137 #
138 # First check in libc
139 #
140 AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
141 [AC_TRY_LINK([
142 #include <libintl.h>
143 ],
144 [return !ngettext ("","", 1)],
145 gt_cv_func_ngettext_libc=yes,
146 gt_cv_func_ngettext_libc=no)
147 ])
148
149 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
150 AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
151 [AC_TRY_LINK([
152 #include <libintl.h>
153 ],
154 [return !dgettext ("","")],
155 gt_cv_func_dgettext_libc=yes,
156 gt_cv_func_dgettext_libc=no)
157 ])
158 fi
159
160 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
161 AC_CHECK_FUNCS(bind_textdomain_codeset)
162 fi
163
164 #
165 # If we don't have everything we want, check in libintl
166 #
167 if test "$gt_cv_func_dgettext_libc" != "yes" \
168 || test "$gt_cv_func_ngettext_libc" != "yes" \
169 || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
170
171 AC_CHECK_LIB(intl, bindtextdomain,
172 [AC_CHECK_LIB(intl, ngettext,
173 [AC_CHECK_LIB(intl, dgettext,
174 gt_cv_func_dgettext_libintl=yes)])])
175
176 if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
177 AC_MSG_CHECKING([if -liconv is needed to use gettext])
178 AC_MSG_RESULT([])
179 AC_CHECK_LIB(intl, ngettext,
180 [AC_CHECK_LIB(intl, dcgettext,
181 [gt_cv_func_dgettext_libintl=yes
182 libintl_extra_libs=-liconv],
183 :,-liconv)],
184 :,-liconv)
185 fi
186
187 #
188 # If we found libintl, then check in it for bind_textdomain_codeset();
189 # we'll prefer libc if neither have bind_textdomain_codeset(),
190 # and both have dgettext and ngettext
191 #
192 if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
193 glib_save_LIBS="$LIBS"
194 LIBS="$LIBS -lintl $libintl_extra_libs"
195 unset ac_cv_func_bind_textdomain_codeset
196 AC_CHECK_FUNCS(bind_textdomain_codeset)
197 LIBS="$glib_save_LIBS"
198
199 if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
200 gt_cv_func_dgettext_libc=no
201 else
202 if test "$gt_cv_func_dgettext_libc" = "yes" \
203 && test "$gt_cv_func_ngettext_libc" = "yes"; then
204 gt_cv_func_dgettext_libintl=no
205 fi
206 fi
207 fi
208 fi
209
210 if test "$gt_cv_func_dgettext_libc" = "yes" \
211 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
212 gt_cv_have_gettext=yes
213 fi
214
215 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
216 INTLLIBS="-lintl $libintl_extra_libs"
217 fi
218
219 if test "$gt_cv_have_gettext" = "yes"; then
220 AC_DEFINE(HAVE_GETTEXT,1,
221 [Define if the GNU gettext() function is already present or preinstalled.])
222 GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
223 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
224 if test "$MSGFMT" != "no"; then
225 glib_save_LIBS="$LIBS"
226 LIBS="$LIBS $INTLLIBS"
227 AC_CHECK_FUNCS(dcgettext)
228 MSGFMT_OPTS=
229 AC_MSG_CHECKING([if msgfmt accepts -c])
230 GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
231 msgid ""
232 msgstr ""
233 "Content-Type: text/plain; charset=UTF-8\n"
234 "Project-Id-Version: test 1.0\n"
235 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
236 "Last-Translator: test <foo@bar.xx>\n"
237 "Language-Team: C <LL@li.org>\n"
238 "MIME-Version: 1.0\n"
239 "Content-Transfer-Encoding: 8bit\n"
240 ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
241 AC_SUBST(MSGFMT_OPTS)
242 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
243 GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
244 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
245 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
246 return _nl_msg_cat_cntr],
247 [CATOBJEXT=.gmo
248 DATADIRNAME=share],
249 [case $host in
250 *-*-solaris*)
251 dnl On Solaris, if bind_textdomain_codeset is in libc,
252 dnl GNU format message catalog is always supported,
253 dnl since both are added to the libc all together.
254 dnl Hence, we'd like to go with DATADIRNAME=share and
255 dnl and CATOBJEXT=.gmo in this case.
256 AC_CHECK_FUNC(bind_textdomain_codeset,
257 [CATOBJEXT=.gmo
258 DATADIRNAME=share],
259 [CATOBJEXT=.mo
260 DATADIRNAME=lib])
261 ;;
262 *)
263 CATOBJEXT=.mo
264 DATADIRNAME=lib
265 ;;
266 esac])
267 LIBS="$glib_save_LIBS"
268 INSTOBJEXT=.mo
269 else
270 gt_cv_have_gettext=no
271 fi
272 fi
273 ])
274
275 if test "$gt_cv_have_gettext" = "yes" ; then
276 AC_DEFINE(ENABLE_NLS, 1,
277 [always defined to indicate that i18n is enabled])
278 fi
279
280 dnl Test whether we really found GNU xgettext.
281 if test "$XGETTEXT" != ":"; then
282 dnl If it is not GNU xgettext we define it as : so that the
283 dnl Makefiles still can work.
284 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
285 : ;
286 else
287 AC_MSG_RESULT(
288 [found xgettext program is not GNU xgettext; ignore it])
289 XGETTEXT=":"
290 fi
291 fi
292
293 # We need to process the po/ directory.
294 POSUB=po
295
296 AC_OUTPUT_COMMANDS(
297 [case "$CONFIG_FILES" in *po/Makefile.in*)
298 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
299 esac])
300
301 dnl These rules are solely for the distribution goal. While doing this
302 dnl we only have to keep exactly one list of the available catalogs
303 dnl in configure.ac.
304 for lang in $ALL_LINGUAS; do
305 GMOFILES="$GMOFILES $lang.gmo"
306 POFILES="$POFILES $lang.po"
307 done
308
309 dnl Make all variables we use known to autoconf.
310 AC_SUBST(CATALOGS)
311 AC_SUBST(CATOBJEXT)
312 AC_SUBST(DATADIRNAME)
313 AC_SUBST(GMOFILES)
314 AC_SUBST(INSTOBJEXT)
315 AC_SUBST(INTLLIBS)
316 AC_SUBST(PO_IN_DATADIR_TRUE)
317 AC_SUBST(PO_IN_DATADIR_FALSE)
318 AC_SUBST(POFILES)
319 AC_SUBST(POSUB)
320 ])
321
322 # AM_GLIB_GNU_GETTEXT
323 # -------------------
324 # Do checks necessary for use of gettext. If a suitable implementation
325 # of gettext is found in either in libintl or in the C library,
326 # it will set INTLLIBS to the libraries needed for use of gettext
327 # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
328 # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
329 # on various variables needed by the Makefile.in.in installed by
330 # glib-gettextize.
331 dnl
332 glib_DEFUN([GLIB_GNU_GETTEXT],
333 [AC_REQUIRE([AC_PROG_CC])dnl
334 AC_REQUIRE([AC_HEADER_STDC])dnl
335
336 GLIB_LC_MESSAGES
337 GLIB_WITH_NLS
338
339 if test "$gt_cv_have_gettext" = "yes"; then
340 if test "x$ALL_LINGUAS" = "x"; then
341 LINGUAS=
342 else
343 AC_MSG_CHECKING(for catalogs to be installed)
344 NEW_LINGUAS=
345 for presentlang in $ALL_LINGUAS; do
346 useit=no
347 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
348 desiredlanguages="$LINGUAS"
349 else
350 desiredlanguages="$ALL_LINGUAS"
351 fi
352 for desiredlang in $desiredlanguages; do
353 # Use the presentlang catalog if desiredlang is
354 # a. equal to presentlang, or
355 # b. a variant of presentlang (because in this case,
356 # presentlang can be used as a fallback for messages
357 # which are not translated in the desiredlang catalog).
358 case "$desiredlang" in
359 "$presentlang"*) useit=yes;;
360 esac
361 done
362 if test $useit = yes; then
363 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
364 fi
365 done
366 LINGUAS=$NEW_LINGUAS
367 AC_MSG_RESULT($LINGUAS)
368 fi
369
370 dnl Construct list of names of catalog files to be constructed.
371 if test -n "$LINGUAS"; then
372 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
373 fi
374 fi
375
376 dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
377 dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
378 dnl Try to locate is.
379 MKINSTALLDIRS=
380 if test -n "$ac_aux_dir"; then
381 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
382 fi
383 if test -z "$MKINSTALLDIRS"; then
384 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
385 fi
386 AC_SUBST(MKINSTALLDIRS)
387
388 dnl Generate list of files to be processed by xgettext which will
389 dnl be included in po/Makefile.
390 test -d po || mkdir po
391 if test "x$srcdir" != "x."; then
392 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
393 posrcprefix="$srcdir/"
394 else
395 posrcprefix="../$srcdir/"
396 fi
397 else
398 posrcprefix="../"
399 fi
400 rm -f po/POTFILES
401 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
402 < $srcdir/po/POTFILES.in > po/POTFILES
403 ])
404
405 # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
406 # -------------------------------
407 # Define VARIABLE to the location where catalog files will
408 # be installed by po/Makefile.
409 glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
410 [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
411 glib_save_prefix="$prefix"
412 glib_save_exec_prefix="$exec_prefix"
413 glib_save_datarootdir="$datarootdir"
414 test "x$prefix" = xNONE && prefix=$ac_default_prefix
415 test "x$exec_prefix" = xNONE && exec_prefix=$prefix
416 datarootdir=`eval echo "${datarootdir}"`
417 if test "x$CATOBJEXT" = "x.mo" ; then
418 localedir=`eval echo "${libdir}/locale"`
419 else
420 localedir=`eval echo "${datadir}/locale"`
421 fi
422 prefix="$glib_save_prefix"
423 exec_prefix="$glib_save_exec_prefix"
424 datarootdir="$glib_save_datarootdir"
425 AC_DEFINE_UNQUOTED($1, "$localedir",
426 [Define the location where the catalogs will be installed])
427 ])
428
429 dnl
430 dnl Now the definitions that aclocal will find
431 dnl
432 ifdef(glib_configure_ac,[],[
433 AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
434 AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
435 ])dnl
436
437 # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
438 #
439 # Create a temporary file with TEST-FILE as its contents and pass the
440 # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
441 # 0 and perform ACTION-IF-FAIL for any other exit status.
442 AC_DEFUN([GLIB_RUN_PROG],
443 [cat >conftest.foo <<_ACEOF
444 $2
445 _ACEOF
446 if AC_RUN_LOG([$1 conftest.foo]); then
447 m4_ifval([$3], [$3], [:])
448 m4_ifvaln([$4], [else $4])dnl
449 echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
450 sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
451 fi])
452
45320
45421
45522 dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
00 /* config.h.in. Generated from configure.ac by autoheader. */
1
2 /* always defined to indicate that i18n is enabled */
3 #undef ENABLE_NLS
41
52 /* GETTEXT package name */
63 #undef GETTEXT_PACKAGE
7
8 /* Define to 1 if you have the `bind_textdomain_codeset' function. */
9 #undef HAVE_BIND_TEXTDOMAIN_CODESET
10
11 /* Define to 1 if you have the `dcgettext' function. */
12 #undef HAVE_DCGETTEXT
134
145 /* Define to 1 if you have the <dlfcn.h> header file. */
156 #undef HAVE_DLFCN_H
178 /* Define to 1 if you have the `fork' function. */
189 #undef HAVE_FORK
1910
20 /* Define if the GNU gettext() function is already present or preinstalled. */
21 #undef HAVE_GETTEXT
22
2311 /* Define to 1 if you have the <inttypes.h> header file. */
2412 #undef HAVE_INTTYPES_H
25
26 /* Define if your <locale.h> file defines LC_MESSAGES. */
27 #undef HAVE_LC_MESSAGES
28
29 /* Define to 1 if you have the <locale.h> header file. */
30 #undef HAVE_LOCALE_H
3113
3214 /* Define to 1 if you have the <memory.h> header file. */
3315 #undef HAVE_MEMORY_H
00 #! /bin/sh
11 # Guess values for system-dependent variables and create Makefiles.
2 # Generated by GNU Autoconf 2.68 for virt-viewer 0.4.0.
2 # Generated by GNU Autoconf 2.68 for virt-viewer 0.4.1.
33 #
44 #
55 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
566566 # Identity of this package.
567567 PACKAGE_NAME='virt-viewer'
568568 PACKAGE_TARNAME='virt-viewer'
569 PACKAGE_VERSION='0.4.0'
570 PACKAGE_STRING='virt-viewer 0.4.0'
569 PACKAGE_VERSION='0.4.1'
570 PACKAGE_STRING='virt-viewer 0.4.1'
571571 PACKAGE_BUGREPORT=''
572572 PACKAGE_URL=''
573573
645645 PKG_CONFIG_LIBDIR
646646 PKG_CONFIG_PATH
647647 PKG_CONFIG
648 MKINSTALLDIRS
649 POSUB
650 POFILES
651 PO_IN_DATADIR_FALSE
652 PO_IN_DATADIR_TRUE
653 INTLLIBS
654 INSTOBJEXT
655 GMOFILES
656 CATOBJEXT
657 CATALOGS
658 MSGFMT_OPTS
659648 DATADIRNAME
660649 ALL_LINGUAS
661650 INTLTOOL_PERL
13881377 # Omit some internal or obsolete options to make the list less imposing.
13891378 # This message is too long to be a string in the A/UX 3.1 sh.
13901379 cat <<_ACEOF
1391 \`configure' configures virt-viewer 0.4.0 to adapt to many kinds of systems.
1380 \`configure' configures virt-viewer 0.4.1 to adapt to many kinds of systems.
13921381
13931382 Usage: $0 [OPTION]... [VAR=VALUE]...
13941383
14581447
14591448 if test -n "$ac_init_help"; then
14601449 case $ac_init_help in
1461 short | recursive ) echo "Configuration of virt-viewer 0.4.0:";;
1450 short | recursive ) echo "Configuration of virt-viewer 0.4.1:";;
14621451 esac
14631452 cat <<\_ACEOF
14641453
16041593 test -n "$ac_init_help" && exit $ac_status
16051594 if $ac_init_version; then
16061595 cat <<\_ACEOF
1607 virt-viewer configure 0.4.0
1596 virt-viewer configure 0.4.1
16081597 generated by GNU Autoconf 2.68
16091598
16101599 Copyright (C) 2010 Free Software Foundation, Inc.
19691958 This file contains any messages produced by compilers while
19701959 running configure, to aid debugging if configure makes a mistake.
19711960
1972 It was created by virt-viewer $as_me 0.4.0, which was
1961 It was created by virt-viewer $as_me 0.4.1, which was
19731962 generated by GNU Autoconf 2.68. Invocation command line was
19741963
19751964 $ $0 $@
27872776
27882777 # Define the identity of the package.
27892778 PACKAGE='virt-viewer'
2790 VERSION='0.4.0'
2779 VERSION='0.4.1'
27912780
27922781
27932782 cat >>confdefs.h <<_ACEOF
1216412153
1216512154
1216612155
12167 for ac_header in locale.h
12168 do :
12169 ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
12170 if test "x$ac_cv_header_locale_h" = xyes; then :
12171 cat >>confdefs.h <<_ACEOF
12172 #define HAVE_LOCALE_H 1
12173 _ACEOF
12174
12175 fi
12176
12177 done
12178
12179 if test $ac_cv_header_locale_h = yes; then
12180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
12181 $as_echo_n "checking for LC_MESSAGES... " >&6; }
12182 if ${am_cv_val_LC_MESSAGES+:} false; then :
12183 $as_echo_n "(cached) " >&6
12184 else
12185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12186 /* end confdefs.h. */
12187 #include <locale.h>
12188 int
12189 main ()
12190 {
12191 return LC_MESSAGES
12192 ;
12193 return 0;
12194 }
12195 _ACEOF
12196 if ac_fn_c_try_link "$LINENO"; then :
12197 am_cv_val_LC_MESSAGES=yes
12198 else
12199 am_cv_val_LC_MESSAGES=no
12200 fi
12201 rm -f core conftest.err conftest.$ac_objext \
12202 conftest$ac_exeext conftest.$ac_ext
12203 fi
12204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
12205 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
12206 if test $am_cv_val_LC_MESSAGES = yes; then
12207
12208 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
12209
12210 fi
12211 fi
12212 USE_NLS=yes
12213
12214
12215 gt_cv_have_gettext=no
12216
12217 CATOBJEXT=NONE
12218 XGETTEXT=:
12219 INTLLIBS=
12220
12221 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
12222 if test "x$ac_cv_header_libintl_h" = xyes; then :
12223 gt_cv_func_dgettext_libintl="no"
12224 libintl_extra_libs=""
12225
12226 #
12227 # First check in libc
12228 #
12229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5
12230 $as_echo_n "checking for ngettext in libc... " >&6; }
12231 if ${gt_cv_func_ngettext_libc+:} false; then :
12232 $as_echo_n "(cached) " >&6
12233 else
12234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12235 /* end confdefs.h. */
12236
12237 #include <libintl.h>
12238
12239 int
12240 main ()
12241 {
12242 return !ngettext ("","", 1)
12243 ;
12244 return 0;
12245 }
12246 _ACEOF
12247 if ac_fn_c_try_link "$LINENO"; then :
12248 gt_cv_func_ngettext_libc=yes
12249 else
12250 gt_cv_func_ngettext_libc=no
12251 fi
12252 rm -f core conftest.err conftest.$ac_objext \
12253 conftest$ac_exeext conftest.$ac_ext
12254
12255 fi
12256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5
12257 $as_echo "$gt_cv_func_ngettext_libc" >&6; }
12258
12259 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
12260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5
12261 $as_echo_n "checking for dgettext in libc... " >&6; }
12262 if ${gt_cv_func_dgettext_libc+:} false; then :
12263 $as_echo_n "(cached) " >&6
12264 else
12265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12266 /* end confdefs.h. */
12267
12268 #include <libintl.h>
12269
12270 int
12271 main ()
12272 {
12273 return !dgettext ("","")
12274 ;
12275 return 0;
12276 }
12277 _ACEOF
12278 if ac_fn_c_try_link "$LINENO"; then :
12279 gt_cv_func_dgettext_libc=yes
12280 else
12281 gt_cv_func_dgettext_libc=no
12282 fi
12283 rm -f core conftest.err conftest.$ac_objext \
12284 conftest$ac_exeext conftest.$ac_ext
12285
12286 fi
12287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5
12288 $as_echo "$gt_cv_func_dgettext_libc" >&6; }
12289 fi
12290
12291 if test "$gt_cv_func_ngettext_libc" = "yes" ; then
12292 for ac_func in bind_textdomain_codeset
12293 do :
12294 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
12295 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
12296 cat >>confdefs.h <<_ACEOF
12297 #define HAVE_BIND_TEXTDOMAIN_CODESET 1
12298 _ACEOF
12299
12300 fi
12301 done
12302
12303 fi
12304
12305 #
12306 # If we don't have everything we want, check in libintl
12307 #
12308 if test "$gt_cv_func_dgettext_libc" != "yes" \
12309 || test "$gt_cv_func_ngettext_libc" != "yes" \
12310 || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
12311
12312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5
12313 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
12314 if ${ac_cv_lib_intl_bindtextdomain+:} false; then :
12315 $as_echo_n "(cached) " >&6
12316 else
12317 ac_check_lib_save_LIBS=$LIBS
12318 LIBS="-lintl $LIBS"
12319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12320 /* end confdefs.h. */
12321
12322 /* Override any GCC internal prototype to avoid an error.
12323 Use char because int might match the return type of a GCC
12324 builtin and then its argument prototype would still apply. */
12325 #ifdef __cplusplus
12326 extern "C"
12327 #endif
12328 char bindtextdomain ();
12329 int
12330 main ()
12331 {
12332 return bindtextdomain ();
12333 ;
12334 return 0;
12335 }
12336 _ACEOF
12337 if ac_fn_c_try_link "$LINENO"; then :
12338 ac_cv_lib_intl_bindtextdomain=yes
12339 else
12340 ac_cv_lib_intl_bindtextdomain=no
12341 fi
12342 rm -f core conftest.err conftest.$ac_objext \
12343 conftest$ac_exeext conftest.$ac_ext
12344 LIBS=$ac_check_lib_save_LIBS
12345 fi
12346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5
12347 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
12348 if test "x$ac_cv_lib_intl_bindtextdomain" = xyes; then :
12349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
12350 $as_echo_n "checking for ngettext in -lintl... " >&6; }
12351 if ${ac_cv_lib_intl_ngettext+:} false; then :
12352 $as_echo_n "(cached) " >&6
12353 else
12354 ac_check_lib_save_LIBS=$LIBS
12355 LIBS="-lintl $LIBS"
12356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12357 /* end confdefs.h. */
12358
12359 /* Override any GCC internal prototype to avoid an error.
12360 Use char because int might match the return type of a GCC
12361 builtin and then its argument prototype would still apply. */
12362 #ifdef __cplusplus
12363 extern "C"
12364 #endif
12365 char ngettext ();
12366 int
12367 main ()
12368 {
12369 return ngettext ();
12370 ;
12371 return 0;
12372 }
12373 _ACEOF
12374 if ac_fn_c_try_link "$LINENO"; then :
12375 ac_cv_lib_intl_ngettext=yes
12376 else
12377 ac_cv_lib_intl_ngettext=no
12378 fi
12379 rm -f core conftest.err conftest.$ac_objext \
12380 conftest$ac_exeext conftest.$ac_ext
12381 LIBS=$ac_check_lib_save_LIBS
12382 fi
12383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
12384 $as_echo "$ac_cv_lib_intl_ngettext" >&6; }
12385 if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
12386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
12387 $as_echo_n "checking for dgettext in -lintl... " >&6; }
12388 if ${ac_cv_lib_intl_dgettext+:} false; then :
12389 $as_echo_n "(cached) " >&6
12390 else
12391 ac_check_lib_save_LIBS=$LIBS
12392 LIBS="-lintl $LIBS"
12393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12394 /* end confdefs.h. */
12395
12396 /* Override any GCC internal prototype to avoid an error.
12397 Use char because int might match the return type of a GCC
12398 builtin and then its argument prototype would still apply. */
12399 #ifdef __cplusplus
12400 extern "C"
12401 #endif
12402 char dgettext ();
12403 int
12404 main ()
12405 {
12406 return dgettext ();
12407 ;
12408 return 0;
12409 }
12410 _ACEOF
12411 if ac_fn_c_try_link "$LINENO"; then :
12412 ac_cv_lib_intl_dgettext=yes
12413 else
12414 ac_cv_lib_intl_dgettext=no
12415 fi
12416 rm -f core conftest.err conftest.$ac_objext \
12417 conftest$ac_exeext conftest.$ac_ext
12418 LIBS=$ac_check_lib_save_LIBS
12419 fi
12420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
12421 $as_echo "$ac_cv_lib_intl_dgettext" >&6; }
12422 if test "x$ac_cv_lib_intl_dgettext" = xyes; then :
12423 gt_cv_func_dgettext_libintl=yes
12424 fi
12425
12426 fi
12427
12428 fi
12429
12430
12431 if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
12432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5
12433 $as_echo_n "checking if -liconv is needed to use gettext... " >&6; }
12434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
12435 $as_echo "" >&6; }
12436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
12437 $as_echo_n "checking for ngettext in -lintl... " >&6; }
12438 if ${ac_cv_lib_intl_ngettext+:} false; then :
12439 $as_echo_n "(cached) " >&6
12440 else
12441 ac_check_lib_save_LIBS=$LIBS
12442 LIBS="-lintl -liconv $LIBS"
12443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12444 /* end confdefs.h. */
12445
12446 /* Override any GCC internal prototype to avoid an error.
12447 Use char because int might match the return type of a GCC
12448 builtin and then its argument prototype would still apply. */
12449 #ifdef __cplusplus
12450 extern "C"
12451 #endif
12452 char ngettext ();
12453 int
12454 main ()
12455 {
12456 return ngettext ();
12457 ;
12458 return 0;
12459 }
12460 _ACEOF
12461 if ac_fn_c_try_link "$LINENO"; then :
12462 ac_cv_lib_intl_ngettext=yes
12463 else
12464 ac_cv_lib_intl_ngettext=no
12465 fi
12466 rm -f core conftest.err conftest.$ac_objext \
12467 conftest$ac_exeext conftest.$ac_ext
12468 LIBS=$ac_check_lib_save_LIBS
12469 fi
12470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
12471 $as_echo "$ac_cv_lib_intl_ngettext" >&6; }
12472 if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
12473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5
12474 $as_echo_n "checking for dcgettext in -lintl... " >&6; }
12475 if ${ac_cv_lib_intl_dcgettext+:} false; then :
12476 $as_echo_n "(cached) " >&6
12477 else
12478 ac_check_lib_save_LIBS=$LIBS
12479 LIBS="-lintl -liconv $LIBS"
12480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12481 /* end confdefs.h. */
12482
12483 /* Override any GCC internal prototype to avoid an error.
12484 Use char because int might match the return type of a GCC
12485 builtin and then its argument prototype would still apply. */
12486 #ifdef __cplusplus
12487 extern "C"
12488 #endif
12489 char dcgettext ();
12490 int
12491 main ()
12492 {
12493 return dcgettext ();
12494 ;
12495 return 0;
12496 }
12497 _ACEOF
12498 if ac_fn_c_try_link "$LINENO"; then :
12499 ac_cv_lib_intl_dcgettext=yes
12500 else
12501 ac_cv_lib_intl_dcgettext=no
12502 fi
12503 rm -f core conftest.err conftest.$ac_objext \
12504 conftest$ac_exeext conftest.$ac_ext
12505 LIBS=$ac_check_lib_save_LIBS
12506 fi
12507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5
12508 $as_echo "$ac_cv_lib_intl_dcgettext" >&6; }
12509 if test "x$ac_cv_lib_intl_dcgettext" = xyes; then :
12510 gt_cv_func_dgettext_libintl=yes
12511 libintl_extra_libs=-liconv
12512 else
12513 :
12514 fi
12515
12516 else
12517 :
12518 fi
12519
12520 fi
12521
12522 #
12523 # If we found libintl, then check in it for bind_textdomain_codeset();
12524 # we'll prefer libc if neither have bind_textdomain_codeset(),
12525 # and both have dgettext and ngettext
12526 #
12527 if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
12528 glib_save_LIBS="$LIBS"
12529 LIBS="$LIBS -lintl $libintl_extra_libs"
12530 unset ac_cv_func_bind_textdomain_codeset
12531 for ac_func in bind_textdomain_codeset
12532 do :
12533 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
12534 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
12535 cat >>confdefs.h <<_ACEOF
12536 #define HAVE_BIND_TEXTDOMAIN_CODESET 1
12537 _ACEOF
12538
12539 fi
12540 done
12541
12542 LIBS="$glib_save_LIBS"
12543
12544 if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
12545 gt_cv_func_dgettext_libc=no
12546 else
12547 if test "$gt_cv_func_dgettext_libc" = "yes" \
12548 && test "$gt_cv_func_ngettext_libc" = "yes"; then
12549 gt_cv_func_dgettext_libintl=no
12550 fi
12551 fi
12552 fi
12553 fi
12554
12555 if test "$gt_cv_func_dgettext_libc" = "yes" \
12556 || test "$gt_cv_func_dgettext_libintl" = "yes"; then
12557 gt_cv_have_gettext=yes
12558 fi
12559
12560 if test "$gt_cv_func_dgettext_libintl" = "yes"; then
12561 INTLLIBS="-lintl $libintl_extra_libs"
12562 fi
12563
12564 if test "$gt_cv_have_gettext" = "yes"; then
12565
12566 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
12567
12568 # Extract the first word of "msgfmt", so it can be a program name with args.
12569 set dummy msgfmt; ac_word=$2
12570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12571 $as_echo_n "checking for $ac_word... " >&6; }
12572 if ${ac_cv_path_MSGFMT+:} false; then :
12573 $as_echo_n "(cached) " >&6
12574 else
12575 case "$MSGFMT" in
12576 /*)
12577 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
12578 ;;
12579 *)
12580 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
12581 for ac_dir in $PATH; do
12582 test -z "$ac_dir" && ac_dir=.
12583 if test -f $ac_dir/$ac_word; then
12584 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
12585 ac_cv_path_MSGFMT="$ac_dir/$ac_word"
12586 break
12587 fi
12588 fi
12589 done
12590 IFS="$ac_save_ifs"
12591 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
12592 ;;
12593 esac
12594 fi
12595 MSGFMT="$ac_cv_path_MSGFMT"
12596 if test "$MSGFMT" != "no"; then
12597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
12598 $as_echo "$MSGFMT" >&6; }
12599 else
12600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12601 $as_echo "no" >&6; }
12602 fi
12603 if test "$MSGFMT" != "no"; then
12604 glib_save_LIBS="$LIBS"
12605 LIBS="$LIBS $INTLLIBS"
12606 for ac_func in dcgettext
12607 do :
12608 ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext"
12609 if test "x$ac_cv_func_dcgettext" = xyes; then :
12610 cat >>confdefs.h <<_ACEOF
12611 #define HAVE_DCGETTEXT 1
12612 _ACEOF
12613
12614 fi
12615 done
12616
12617 MSGFMT_OPTS=
12618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5
12619 $as_echo_n "checking if msgfmt accepts -c... " >&6; }
12620 cat >conftest.foo <<_ACEOF
12621
12622 msgid ""
12623 msgstr ""
12624 "Content-Type: text/plain; charset=UTF-8\n"
12625 "Project-Id-Version: test 1.0\n"
12626 "PO-Revision-Date: 2007-02-15 12:01+0100\n"
12627 "Last-Translator: test <foo@bar.xx>\n"
12628 "Language-Team: C <LL@li.org>\n"
12629 "MIME-Version: 1.0\n"
12630 "Content-Transfer-Encoding: 8bit\n"
12631
12632 _ACEOF
12633 if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5
12634 ($MSGFMT -c -o /dev/null conftest.foo) 2>&5
12635 ac_status=$?
12636 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12637 test $ac_status = 0; }; then
12638 MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12639 $as_echo "yes" >&6; }
12640 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12641 $as_echo "no" >&6; }
12642 echo "$as_me: failed input was:" >&5
12643 sed 's/^/| /' conftest.foo >&5
12644 fi
12645
12646 # Extract the first word of "gmsgfmt", so it can be a program name with args.
12647 set dummy gmsgfmt; ac_word=$2
12648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12649 $as_echo_n "checking for $ac_word... " >&6; }
12650 if ${ac_cv_path_GMSGFMT+:} false; then :
12651 $as_echo_n "(cached) " >&6
12652 else
12653 case $GMSGFMT in
12654 [\\/]* | ?:[\\/]*)
12655 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
12656 ;;
12657 *)
12658 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12659 for as_dir in $PATH
12660 do
12661 IFS=$as_save_IFS
12662 test -z "$as_dir" && as_dir=.
12663 for ac_exec_ext in '' $ac_executable_extensions; do
12664 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
12665 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
12666 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12667 break 2
12668 fi
12669 done
12670 done
12671 IFS=$as_save_IFS
12672
12673 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
12674 ;;
12675 esac
12676 fi
12677 GMSGFMT=$ac_cv_path_GMSGFMT
12678 if test -n "$GMSGFMT"; then
12679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
12680 $as_echo "$GMSGFMT" >&6; }
12681 else
12682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12683 $as_echo "no" >&6; }
12684 fi
12685
12686
12687 # Extract the first word of "xgettext", so it can be a program name with args.
12688 set dummy xgettext; ac_word=$2
12689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12690 $as_echo_n "checking for $ac_word... " >&6; }
12691 if ${ac_cv_path_XGETTEXT+:} false; then :
12692 $as_echo_n "(cached) " >&6
12693 else
12694 case "$XGETTEXT" in
12695 /*)
12696 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
12697 ;;
12698 *)
12699 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
12700 for ac_dir in $PATH; do
12701 test -z "$ac_dir" && ac_dir=.
12702 if test -f $ac_dir/$ac_word; then
12703 if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
12704 ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
12705 break
12706 fi
12707 fi
12708 done
12709 IFS="$ac_save_ifs"
12710 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
12711 ;;
12712 esac
12713 fi
12714 XGETTEXT="$ac_cv_path_XGETTEXT"
12715 if test "$XGETTEXT" != ":"; then
12716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
12717 $as_echo "$XGETTEXT" >&6; }
12718 else
12719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12720 $as_echo "no" >&6; }
12721 fi
12722
12723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12724 /* end confdefs.h. */
12725
12726 int
12727 main ()
12728 {
12729 extern int _nl_msg_cat_cntr;
12730 return _nl_msg_cat_cntr
12731 ;
12732 return 0;
12733 }
12734 _ACEOF
12735 if ac_fn_c_try_link "$LINENO"; then :
12736 CATOBJEXT=.gmo
12737 DATADIRNAME=share
12738 else
12739 case $host in
12740 *-*-solaris*)
12741 ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
12742 if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
12743 CATOBJEXT=.gmo
12744 DATADIRNAME=share
12745 else
12746 CATOBJEXT=.mo
12747 DATADIRNAME=lib
12748 fi
12749
12750 ;;
12751 *)
12752 CATOBJEXT=.mo
12753 DATADIRNAME=lib
12754 ;;
12755 esac
12756 fi
12757 rm -f core conftest.err conftest.$ac_objext \
12758 conftest$ac_exeext conftest.$ac_ext
12759 LIBS="$glib_save_LIBS"
12760 INSTOBJEXT=.mo
12761 else
12762 gt_cv_have_gettext=no
12763 fi
12764 fi
12765
12766 fi
12767
12768
12769
12770 if test "$gt_cv_have_gettext" = "yes" ; then
12771
12772 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
12773
12774 fi
12775
12776 if test "$XGETTEXT" != ":"; then
12777 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
12778 : ;
12779 else
12780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
12781 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
12782 XGETTEXT=":"
12783 fi
12784 fi
12785
12786 # We need to process the po/ directory.
12787 POSUB=po
12788
12789 ac_config_commands="$ac_config_commands default-1"
12790
12791
12792 for lang in $ALL_LINGUAS; do
12793 GMOFILES="$GMOFILES $lang.gmo"
12794 POFILES="$POFILES $lang.po"
12795 done
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809 if test "$gt_cv_have_gettext" = "yes"; then
12810 if test "x$ALL_LINGUAS" = "x"; then
12811 LINGUAS=
12812 else
12813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
12814 $as_echo_n "checking for catalogs to be installed... " >&6; }
12815 NEW_LINGUAS=
12816 for presentlang in $ALL_LINGUAS; do
12817 useit=no
12818 if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
12819 desiredlanguages="$LINGUAS"
12820 else
12821 desiredlanguages="$ALL_LINGUAS"
12822 fi
12823 for desiredlang in $desiredlanguages; do
12824 # Use the presentlang catalog if desiredlang is
12825 # a. equal to presentlang, or
12826 # b. a variant of presentlang (because in this case,
12827 # presentlang can be used as a fallback for messages
12828 # which are not translated in the desiredlang catalog).
12829 case "$desiredlang" in
12830 "$presentlang"*) useit=yes;;
12831 esac
12832 done
12833 if test $useit = yes; then
12834 NEW_LINGUAS="$NEW_LINGUAS $presentlang"
12835 fi
12836 done
12837 LINGUAS=$NEW_LINGUAS
12838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
12839 $as_echo "$LINGUAS" >&6; }
12840 fi
12841
12842 if test -n "$LINGUAS"; then
12843 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
12844 fi
12845 fi
12846
12847 MKINSTALLDIRS=
12848 if test -n "$ac_aux_dir"; then
12849 MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
12850 fi
12851 if test -z "$MKINSTALLDIRS"; then
12852 MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
12853 fi
12854
12855
12856 test -d po || mkdir po
12857 if test "x$srcdir" != "x."; then
12858 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
12859 posrcprefix="$srcdir/"
12860 else
12861 posrcprefix="../$srcdir/"
12862 fi
12863 else
12864 posrcprefix="../"
12865 fi
12866 rm -f po/POTFILES
12867 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
12868 < $srcdir/po/POTFILES.in > po/POTFILES
12869
12870
1287112156
1287212157
1287312158
1454913834 # report actual input values of CONFIG_FILES etc. instead of their
1455013835 # values after options handling.
1455113836 ac_log="
14552 This file was extended by virt-viewer $as_me 0.4.0, which was
13837 This file was extended by virt-viewer $as_me 0.4.1, which was
1455313838 generated by GNU Autoconf 2.68. Invocation command line was
1455413839
1455513840 CONFIG_FILES = $CONFIG_FILES
1461513900 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
1461613901 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
1461713902 ac_cs_version="\\
14618 virt-viewer config.status 0.4.0
13903 virt-viewer config.status 0.4.1
1461913904 configured by $0, generated by GNU Autoconf 2.68,
1462013905 with options \\"\$ac_cs_config\\"
1462113906
1501314298
1501414299
1501514300
15016
1501714301 _ACEOF
1501814302
1501914303 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
1502514309 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
1502614310 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
1502714311 "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
15028 "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
1502914312 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
1503014313 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
1503114314 "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
1635515638 chmod +x "$ofile"
1635615639
1635715640 ;;
16358 "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*)
16359 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
16360 esac ;;
1636115641 "po/stamp-it":C)
1636215642 if ! grep "^# INTLTOOL_MAKEFILE$" "po/Makefile.in" > /dev/null ; then
1636315643 as_fn_error $? "po/Makefile.in.in was not created by intltoolize." "$LINENO" 5
00
1 AC_INIT(virt-viewer, 0.4.0)
1 AC_INIT(virt-viewer, 0.4.1)
22 AC_CONFIG_SRCDIR(src/virt-viewer-main.c)
33 AM_CONFIG_HEADER(config.h)
44 dnl Make automake keep quiet about wildcards & other GNUmake-isms
3232 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [GETTEXT package name])
3333
3434 IT_PROG_INTLTOOL([0.35.0])
35 AM_GLIB_GNU_GETTEXT
3635
3736
3837 PKG_CHECK_MODULES(GLIB2, gmodule-export-2.0 >= $GLIB2_REQUIRED)
8888 AUTOHEADER = @AUTOHEADER@
8989 AUTOMAKE = @AUTOMAKE@
9090 AWK = @AWK@
91 CATALOGS = @CATALOGS@
92 CATOBJEXT = @CATOBJEXT@
9391 CC = @CC@
9492 CCDEPMODE = @CCDEPMODE@
9593 CFLAGS = @CFLAGS@
113111 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
114112 GLIB2_CFLAGS = @GLIB2_CFLAGS@
115113 GLIB2_LIBS = @GLIB2_LIBS@
116 GMOFILES = @GMOFILES@
117114 GMSGFMT = @GMSGFMT@
118115 GREP = @GREP@
119116 GTK_API_VERSION = @GTK_API_VERSION@
128125 INSTALL_PROGRAM = @INSTALL_PROGRAM@
129126 INSTALL_SCRIPT = @INSTALL_SCRIPT@
130127 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
131 INSTOBJEXT = @INSTOBJEXT@
132 INTLLIBS = @INTLLIBS@
133128 INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
134129 INTLTOOL_MERGE = @INTLTOOL_MERGE@
135130 INTLTOOL_PERL = @INTLTOOL_PERL@
149144 MAKEINFO = @MAKEINFO@
150145 MANIFEST_TOOL = @MANIFEST_TOOL@
151146 MKDIR_P = @MKDIR_P@
152 MKINSTALLDIRS = @MKINSTALLDIRS@
153147 MOZILLA_PLUGIN_CFLAGS = @MOZILLA_PLUGIN_CFLAGS@
154148 MOZILLA_PLUGIN_LIBS = @MOZILLA_PLUGIN_LIBS@
155149 MSGFMT = @MSGFMT@
156 MSGFMT_OPTS = @MSGFMT_OPTS@
157150 MSGMERGE = @MSGMERGE@
158151 NM = @NM@
159152 NMEDIT = @NMEDIT@
174167 PKG_CONFIG = @PKG_CONFIG@
175168 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
176169 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
177 POFILES = @POFILES@
178 POSUB = @POSUB@
179 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
180 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
181170 RANLIB = @RANLIB@
182171 SED = @SED@
183172 SET_MAKE = @SET_MAKE@
134134 AUTOHEADER = @AUTOHEADER@
135135 AUTOMAKE = @AUTOMAKE@
136136 AWK = @AWK@
137 CATALOGS = @CATALOGS@
138 CATOBJEXT = @CATOBJEXT@
139137 CC = @CC@
140138 CCDEPMODE = @CCDEPMODE@
141139 CFLAGS = @CFLAGS@
159157 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
160158 GLIB2_CFLAGS = @GLIB2_CFLAGS@
161159 GLIB2_LIBS = @GLIB2_LIBS@
162 GMOFILES = @GMOFILES@
163160 GMSGFMT = @GMSGFMT@
164161 GREP = @GREP@
165162 GTK_API_VERSION = @GTK_API_VERSION@
174171 INSTALL_PROGRAM = @INSTALL_PROGRAM@
175172 INSTALL_SCRIPT = @INSTALL_SCRIPT@
176173 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
177 INSTOBJEXT = @INSTOBJEXT@
178 INTLLIBS = @INTLLIBS@
179174 INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
180175 INTLTOOL_MERGE = @INTLTOOL_MERGE@
181176 INTLTOOL_PERL = @INTLTOOL_PERL@
195190 MAKEINFO = @MAKEINFO@
196191 MANIFEST_TOOL = @MANIFEST_TOOL@
197192 MKDIR_P = @MKDIR_P@
198 MKINSTALLDIRS = @MKINSTALLDIRS@
199193 MOZILLA_PLUGIN_CFLAGS = @MOZILLA_PLUGIN_CFLAGS@
200194 MOZILLA_PLUGIN_LIBS = @MOZILLA_PLUGIN_LIBS@
201195 MSGFMT = @MSGFMT@
202 MSGFMT_OPTS = @MSGFMT_OPTS@
203196 MSGMERGE = @MSGMERGE@
204197 NM = @NM@
205198 NMEDIT = @NMEDIT@
220213 PKG_CONFIG = @PKG_CONFIG@
221214 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
222215 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
223 POFILES = @POFILES@
224 POSUB = @POSUB@
225 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
226 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
227216 RANLIB = @RANLIB@
228217 SED = @SED@
229218 SET_MAKE = @SET_MAKE@
1010
1111 virt_viewer_SOURCES = \
1212 virt-viewer-main.c \
13 virt-viewer.h virt-viewer.c \
1314 virt-viewer-util.h virt-viewer-util.c \
1415 virt-viewer-auth.h virt-viewer-auth.c \
1516 virt-viewer-events.h virt-viewer-events.c \
16 virt-viewer.h virt-viewer.c \
17 virt-viewer-app.h virt-viewer-app.c \
1718 virt-viewer-session.h virt-viewer-session.c \
1819 virt-viewer-session-vnc.h virt-viewer-session-vnc.c \
1920 virt-viewer-display.h virt-viewer-display.c \
2021 virt-viewer-display-vnc.h virt-viewer-display-vnc.c \
22 virt-viewer-notebook.h virt-viewer-notebook.c \
23 virt-viewer-window.h virt-viewer-window.c \
2124 view/autoDrawer.c \
2225 view/autoDrawer.h \
2326 view/drawer.c \
5454 CONFIG_CLEAN_VPATH_FILES =
5555 am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(builderxmldir)"
5656 PROGRAMS = $(bin_PROGRAMS)
57 am__virt_viewer_SOURCES_DIST = virt-viewer-main.c virt-viewer-util.h \
58 virt-viewer-util.c virt-viewer-auth.h virt-viewer-auth.c \
59 virt-viewer-events.h virt-viewer-events.c virt-viewer.h \
60 virt-viewer.c virt-viewer-session.h virt-viewer-session.c \
57 am__virt_viewer_SOURCES_DIST = virt-viewer-main.c virt-viewer.h \
58 virt-viewer.c virt-viewer-util.h virt-viewer-util.c \
59 virt-viewer-auth.h virt-viewer-auth.c virt-viewer-events.h \
60 virt-viewer-events.c virt-viewer-app.h virt-viewer-app.c \
61 virt-viewer-session.h virt-viewer-session.c \
6162 virt-viewer-session-vnc.h virt-viewer-session-vnc.c \
6263 virt-viewer-display.h virt-viewer-display.c \
6364 virt-viewer-display-vnc.h virt-viewer-display-vnc.c \
64 view/autoDrawer.c view/autoDrawer.h view/drawer.c \
65 view/drawer.h view/ovBox.c view/ovBox.h \
66 virt-viewer-session-spice.h virt-viewer-session-spice.c \
67 virt-viewer-display-spice.h virt-viewer-display-spice.c
65 virt-viewer-notebook.h virt-viewer-notebook.c \
66 virt-viewer-window.h virt-viewer-window.c view/autoDrawer.c \
67 view/autoDrawer.h view/drawer.c view/drawer.h view/ovBox.c \
68 view/ovBox.h virt-viewer-session-spice.h \
69 virt-viewer-session-spice.c virt-viewer-display-spice.h \
70 virt-viewer-display-spice.c
6871 @HAVE_SPICE_GTK_TRUE@am__objects_1 = virt_viewer-virt-viewer-session-spice.$(OBJEXT) \
6972 @HAVE_SPICE_GTK_TRUE@ virt_viewer-virt-viewer-display-spice.$(OBJEXT)
7073 am_virt_viewer_OBJECTS = virt_viewer-virt-viewer-main.$(OBJEXT) \
74 virt_viewer-virt-viewer.$(OBJEXT) \
7175 virt_viewer-virt-viewer-util.$(OBJEXT) \
7276 virt_viewer-virt-viewer-auth.$(OBJEXT) \
7377 virt_viewer-virt-viewer-events.$(OBJEXT) \
74 virt_viewer-virt-viewer.$(OBJEXT) \
78 virt_viewer-virt-viewer-app.$(OBJEXT) \
7579 virt_viewer-virt-viewer-session.$(OBJEXT) \
7680 virt_viewer-virt-viewer-session-vnc.$(OBJEXT) \
7781 virt_viewer-virt-viewer-display.$(OBJEXT) \
7882 virt_viewer-virt-viewer-display-vnc.$(OBJEXT) \
83 virt_viewer-virt-viewer-notebook.$(OBJEXT) \
84 virt_viewer-virt-viewer-window.$(OBJEXT) \
7985 virt_viewer-autoDrawer.$(OBJEXT) virt_viewer-drawer.$(OBJEXT) \
8086 virt_viewer-ovBox.$(OBJEXT) $(am__objects_1)
8187 virt_viewer_OBJECTS = $(am_virt_viewer_OBJECTS)
148154 AUTOHEADER = @AUTOHEADER@
149155 AUTOMAKE = @AUTOMAKE@
150156 AWK = @AWK@
151 CATALOGS = @CATALOGS@
152 CATOBJEXT = @CATOBJEXT@
153157 CC = @CC@
154158 CCDEPMODE = @CCDEPMODE@
155159 CFLAGS = @CFLAGS@
173177 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
174178 GLIB2_CFLAGS = @GLIB2_CFLAGS@
175179 GLIB2_LIBS = @GLIB2_LIBS@
176 GMOFILES = @GMOFILES@
177180 GMSGFMT = @GMSGFMT@
178181 GREP = @GREP@
179182 GTK_API_VERSION = @GTK_API_VERSION@
188191 INSTALL_PROGRAM = @INSTALL_PROGRAM@
189192 INSTALL_SCRIPT = @INSTALL_SCRIPT@
190193 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
191 INSTOBJEXT = @INSTOBJEXT@
192 INTLLIBS = @INTLLIBS@
193194 INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
194195 INTLTOOL_MERGE = @INTLTOOL_MERGE@
195196 INTLTOOL_PERL = @INTLTOOL_PERL@
209210 MAKEINFO = @MAKEINFO@
210211 MANIFEST_TOOL = @MANIFEST_TOOL@
211212 MKDIR_P = @MKDIR_P@
212 MKINSTALLDIRS = @MKINSTALLDIRS@
213213 MOZILLA_PLUGIN_CFLAGS = @MOZILLA_PLUGIN_CFLAGS@
214214 MOZILLA_PLUGIN_LIBS = @MOZILLA_PLUGIN_LIBS@
215215 MSGFMT = @MSGFMT@
216 MSGFMT_OPTS = @MSGFMT_OPTS@
217216 MSGMERGE = @MSGMERGE@
218217 NM = @NM@
219218 NMEDIT = @NMEDIT@
234233 PKG_CONFIG = @PKG_CONFIG@
235234 PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
236235 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
237 POFILES = @POFILES@
238 POSUB = @POSUB@
239 PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
240 PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
241236 RANLIB = @RANLIB@
242237 SED = @SED@
243238 SET_MAKE = @SET_MAKE@
308303 virt-viewer-auth.xml
309304
310305 EXTRA_DIST = $(builderxml_DATA)
311 virt_viewer_SOURCES = virt-viewer-main.c virt-viewer-util.h \
312 virt-viewer-util.c virt-viewer-auth.h virt-viewer-auth.c \
313 virt-viewer-events.h virt-viewer-events.c virt-viewer.h \
314 virt-viewer.c virt-viewer-session.h virt-viewer-session.c \
315 virt-viewer-session-vnc.h virt-viewer-session-vnc.c \
316 virt-viewer-display.h virt-viewer-display.c \
317 virt-viewer-display-vnc.h virt-viewer-display-vnc.c \
318 view/autoDrawer.c view/autoDrawer.h view/drawer.c \
319 view/drawer.h view/ovBox.c view/ovBox.h $(am__append_1)
306 virt_viewer_SOURCES = virt-viewer-main.c virt-viewer.h virt-viewer.c \
307 virt-viewer-util.h virt-viewer-util.c virt-viewer-auth.h \
308 virt-viewer-auth.c virt-viewer-events.h virt-viewer-events.c \
309 virt-viewer-app.h virt-viewer-app.c virt-viewer-session.h \
310 virt-viewer-session.c virt-viewer-session-vnc.h \
311 virt-viewer-session-vnc.c virt-viewer-display.h \
312 virt-viewer-display.c virt-viewer-display-vnc.h \
313 virt-viewer-display-vnc.c virt-viewer-notebook.h \
314 virt-viewer-notebook.c virt-viewer-window.h \
315 virt-viewer-window.c view/autoDrawer.c view/autoDrawer.h \
316 view/drawer.c view/drawer.h view/ovBox.c view/ovBox.h \
317 $(am__append_1)
320318 virt_viewer_LDADD = \
321319 @GTK_VNC_LIBS@ \
322320 @SPICE_GTK_LIBS@ \
426424 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-autoDrawer.Po@am__quote@
427425 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-drawer.Po@am__quote@
428426 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-ovBox.Po@am__quote@
427 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer-app.Po@am__quote@
429428 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer-auth.Po@am__quote@
430429 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer-display-spice.Po@am__quote@
431430 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer-display-vnc.Po@am__quote@
432431 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer-display.Po@am__quote@
433432 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer-events.Po@am__quote@
434433 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer-main.Po@am__quote@
434 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer-notebook.Po@am__quote@
435435 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer-session-spice.Po@am__quote@
436436 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer-session-vnc.Po@am__quote@
437437 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer-session.Po@am__quote@
438438 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer-util.Po@am__quote@
439 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer-window.Po@am__quote@
439440 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/virt_viewer-virt-viewer.Po@am__quote@
440441
441442 .c.o:
478479 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
479480 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -c -o virt_viewer-virt-viewer-main.obj `if test -f 'virt-viewer-main.c'; then $(CYGPATH_W) 'virt-viewer-main.c'; else $(CYGPATH_W) '$(srcdir)/virt-viewer-main.c'; fi`
480481
482 virt_viewer-virt-viewer.o: virt-viewer.c
483 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -MT virt_viewer-virt-viewer.o -MD -MP -MF $(DEPDIR)/virt_viewer-virt-viewer.Tpo -c -o virt_viewer-virt-viewer.o `test -f 'virt-viewer.c' || echo '$(srcdir)/'`virt-viewer.c
484 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virt_viewer-virt-viewer.Tpo $(DEPDIR)/virt_viewer-virt-viewer.Po
485 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
486 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='virt-viewer.c' object='virt_viewer-virt-viewer.o' libtool=no @AMDEPBACKSLASH@
487 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
488 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -c -o virt_viewer-virt-viewer.o `test -f 'virt-viewer.c' || echo '$(srcdir)/'`virt-viewer.c
489
490 virt_viewer-virt-viewer.obj: virt-viewer.c
491 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -MT virt_viewer-virt-viewer.obj -MD -MP -MF $(DEPDIR)/virt_viewer-virt-viewer.Tpo -c -o virt_viewer-virt-viewer.obj `if test -f 'virt-viewer.c'; then $(CYGPATH_W) 'virt-viewer.c'; else $(CYGPATH_W) '$(srcdir)/virt-viewer.c'; fi`
492 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virt_viewer-virt-viewer.Tpo $(DEPDIR)/virt_viewer-virt-viewer.Po
493 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
494 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='virt-viewer.c' object='virt_viewer-virt-viewer.obj' libtool=no @AMDEPBACKSLASH@
495 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
496 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -c -o virt_viewer-virt-viewer.obj `if test -f 'virt-viewer.c'; then $(CYGPATH_W) 'virt-viewer.c'; else $(CYGPATH_W) '$(srcdir)/virt-viewer.c'; fi`
497
481498 virt_viewer-virt-viewer-util.o: virt-viewer-util.c
482499 @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
483500 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virt_viewer-virt-viewer-util.Tpo $(DEPDIR)/virt_viewer-virt-viewer-util.Po
526543 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
527544 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -c -o virt_viewer-virt-viewer-events.obj `if test -f 'virt-viewer-events.c'; then $(CYGPATH_W) 'virt-viewer-events.c'; else $(CYGPATH_W) '$(srcdir)/virt-viewer-events.c'; fi`
528545
529 virt_viewer-virt-viewer.o: virt-viewer.c
530 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -MT virt_viewer-virt-viewer.o -MD -MP -MF $(DEPDIR)/virt_viewer-virt-viewer.Tpo -c -o virt_viewer-virt-viewer.o `test -f 'virt-viewer.c' || echo '$(srcdir)/'`virt-viewer.c
531 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virt_viewer-virt-viewer.Tpo $(DEPDIR)/virt_viewer-virt-viewer.Po
532 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
533 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='virt-viewer.c' object='virt_viewer-virt-viewer.o' libtool=no @AMDEPBACKSLASH@
534 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
535 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -c -o virt_viewer-virt-viewer.o `test -f 'virt-viewer.c' || echo '$(srcdir)/'`virt-viewer.c
536
537 virt_viewer-virt-viewer.obj: virt-viewer.c
538 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -MT virt_viewer-virt-viewer.obj -MD -MP -MF $(DEPDIR)/virt_viewer-virt-viewer.Tpo -c -o virt_viewer-virt-viewer.obj `if test -f 'virt-viewer.c'; then $(CYGPATH_W) 'virt-viewer.c'; else $(CYGPATH_W) '$(srcdir)/virt-viewer.c'; fi`
539 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virt_viewer-virt-viewer.Tpo $(DEPDIR)/virt_viewer-virt-viewer.Po
540 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
541 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='virt-viewer.c' object='virt_viewer-virt-viewer.obj' libtool=no @AMDEPBACKSLASH@
542 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
543 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -c -o virt_viewer-virt-viewer.obj `if test -f 'virt-viewer.c'; then $(CYGPATH_W) 'virt-viewer.c'; else $(CYGPATH_W) '$(srcdir)/virt-viewer.c'; fi`
546 virt_viewer-virt-viewer-app.o: virt-viewer-app.c
547 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -MT virt_viewer-virt-viewer-app.o -MD -MP -MF $(DEPDIR)/virt_viewer-virt-viewer-app.Tpo -c -o virt_viewer-virt-viewer-app.o `test -f 'virt-viewer-app.c' || echo '$(srcdir)/'`virt-viewer-app.c
548 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virt_viewer-virt-viewer-app.Tpo $(DEPDIR)/virt_viewer-virt-viewer-app.Po
549 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
550 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='virt-viewer-app.c' object='virt_viewer-virt-viewer-app.o' libtool=no @AMDEPBACKSLASH@
551 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
552 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -c -o virt_viewer-virt-viewer-app.o `test -f 'virt-viewer-app.c' || echo '$(srcdir)/'`virt-viewer-app.c
553
554 virt_viewer-virt-viewer-app.obj: virt-viewer-app.c
555 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -MT virt_viewer-virt-viewer-app.obj -MD -MP -MF $(DEPDIR)/virt_viewer-virt-viewer-app.Tpo -c -o virt_viewer-virt-viewer-app.obj `if test -f 'virt-viewer-app.c'; then $(CYGPATH_W) 'virt-viewer-app.c'; else $(CYGPATH_W) '$(srcdir)/virt-viewer-app.c'; fi`
556 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virt_viewer-virt-viewer-app.Tpo $(DEPDIR)/virt_viewer-virt-viewer-app.Po
557 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
558 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='virt-viewer-app.c' object='virt_viewer-virt-viewer-app.obj' libtool=no @AMDEPBACKSLASH@
559 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
560 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -c -o virt_viewer-virt-viewer-app.obj `if test -f 'virt-viewer-app.c'; then $(CYGPATH_W) 'virt-viewer-app.c'; else $(CYGPATH_W) '$(srcdir)/virt-viewer-app.c'; fi`
544561
545562 virt_viewer-virt-viewer-session.o: virt-viewer-session.c
546563 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -MT virt_viewer-virt-viewer-session.o -MD -MP -MF $(DEPDIR)/virt_viewer-virt-viewer-session.Tpo -c -o virt_viewer-virt-viewer-session.o `test -f 'virt-viewer-session.c' || echo '$(srcdir)/'`virt-viewer-session.c
605622 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='virt-viewer-display-vnc.c' object='virt_viewer-virt-viewer-display-vnc.obj' libtool=no @AMDEPBACKSLASH@
606623 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
607624 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -c -o virt_viewer-virt-viewer-display-vnc.obj `if test -f 'virt-viewer-display-vnc.c'; then $(CYGPATH_W) 'virt-viewer-display-vnc.c'; else $(CYGPATH_W) '$(srcdir)/virt-viewer-display-vnc.c'; fi`
625
626 virt_viewer-virt-viewer-notebook.o: virt-viewer-notebook.c
627 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -MT virt_viewer-virt-viewer-notebook.o -MD -MP -MF $(DEPDIR)/virt_viewer-virt-viewer-notebook.Tpo -c -o virt_viewer-virt-viewer-notebook.o `test -f 'virt-viewer-notebook.c' || echo '$(srcdir)/'`virt-viewer-notebook.c
628 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virt_viewer-virt-viewer-notebook.Tpo $(DEPDIR)/virt_viewer-virt-viewer-notebook.Po
629 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
630 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='virt-viewer-notebook.c' object='virt_viewer-virt-viewer-notebook.o' libtool=no @AMDEPBACKSLASH@
631 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
632 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -c -o virt_viewer-virt-viewer-notebook.o `test -f 'virt-viewer-notebook.c' || echo '$(srcdir)/'`virt-viewer-notebook.c
633
634 virt_viewer-virt-viewer-notebook.obj: virt-viewer-notebook.c
635 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -MT virt_viewer-virt-viewer-notebook.obj -MD -MP -MF $(DEPDIR)/virt_viewer-virt-viewer-notebook.Tpo -c -o virt_viewer-virt-viewer-notebook.obj `if test -f 'virt-viewer-notebook.c'; then $(CYGPATH_W) 'virt-viewer-notebook.c'; else $(CYGPATH_W) '$(srcdir)/virt-viewer-notebook.c'; fi`
636 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virt_viewer-virt-viewer-notebook.Tpo $(DEPDIR)/virt_viewer-virt-viewer-notebook.Po
637 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
638 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='virt-viewer-notebook.c' object='virt_viewer-virt-viewer-notebook.obj' libtool=no @AMDEPBACKSLASH@
639 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
640 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -c -o virt_viewer-virt-viewer-notebook.obj `if test -f 'virt-viewer-notebook.c'; then $(CYGPATH_W) 'virt-viewer-notebook.c'; else $(CYGPATH_W) '$(srcdir)/virt-viewer-notebook.c'; fi`
641
642 virt_viewer-virt-viewer-window.o: virt-viewer-window.c
643 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -MT virt_viewer-virt-viewer-window.o -MD -MP -MF $(DEPDIR)/virt_viewer-virt-viewer-window.Tpo -c -o virt_viewer-virt-viewer-window.o `test -f 'virt-viewer-window.c' || echo '$(srcdir)/'`virt-viewer-window.c
644 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virt_viewer-virt-viewer-window.Tpo $(DEPDIR)/virt_viewer-virt-viewer-window.Po
645 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
646 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='virt-viewer-window.c' object='virt_viewer-virt-viewer-window.o' libtool=no @AMDEPBACKSLASH@
647 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
648 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -c -o virt_viewer-virt-viewer-window.o `test -f 'virt-viewer-window.c' || echo '$(srcdir)/'`virt-viewer-window.c
649
650 virt_viewer-virt-viewer-window.obj: virt-viewer-window.c
651 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -MT virt_viewer-virt-viewer-window.obj -MD -MP -MF $(DEPDIR)/virt_viewer-virt-viewer-window.Tpo -c -o virt_viewer-virt-viewer-window.obj `if test -f 'virt-viewer-window.c'; then $(CYGPATH_W) 'virt-viewer-window.c'; else $(CYGPATH_W) '$(srcdir)/virt-viewer-window.c'; fi`
652 @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/virt_viewer-virt-viewer-window.Tpo $(DEPDIR)/virt_viewer-virt-viewer-window.Po
653 @am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
654 @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='virt-viewer-window.c' object='virt_viewer-virt-viewer-window.obj' libtool=no @AMDEPBACKSLASH@
655 @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
656 @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -c -o virt_viewer-virt-viewer-window.obj `if test -f 'virt-viewer-window.c'; then $(CYGPATH_W) 'virt-viewer-window.c'; else $(CYGPATH_W) '$(srcdir)/virt-viewer-window.c'; fi`
608657
609658 virt_viewer-autoDrawer.o: view/autoDrawer.c
610659 @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(virt_viewer_CFLAGS) $(CFLAGS) -MT virt_viewer-autoDrawer.o -MD -MP -MF $(DEPDIR)/virt_viewer-autoDrawer.Tpo -c -o virt_viewer-autoDrawer.o `test -f 'view/autoDrawer.c' || echo '$(srcdir)/'`view/autoDrawer.c
88 <property name="window_position">center-on-parent</property>
99 <property name="type_hint">dialog</property>
1010 <property name="program_name">Virtual Machine Viewer</property>
11 <property name="copyright" translatable="yes">Copyright 2007-2008 Daniel P. Berrange
12 Copyright 2007-2008 Red Hat, Inc.</property>
13 <property name="comments" translatable="yes">A remote desktop client built with GTK-VNC and libvirt</property>
11 <property name="copyright" translatable="yes">Copyright 2007-2011 Daniel P. Berrange
12 Copyright 2007-2011 Red Hat, Inc.</property>
13 <property name="comments" translatable="yes">A remote desktop client built with GTK-VNC, SPICE-GTK and libvirt</property>
1414 <property name="website">http://virt-manager.org/</property>
1515 <property name="website_label" translatable="yes">virt-manager.org</property>
1616 <property name="license" translatable="yes">This program is free software; you can redistribute it and/or modify
2727 along with this program; if not, write to the Free Software
2828 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2929 </property>
30 <property name="authors">Daniel P. Berrange</property>
30 <property name="authors">Daniel P. Berrange
31 Marc-André Lureau
32 </property>
3133 <property name="translator_credits" translatable="yes">The Fedora Translation Team</property>
32 <signal name="response" handler="virt_viewer_about_close"/>
33 <signal name="delete_event" handler="virt_viewer_about_delete"/>
34 <signal name="response" handler="virt_viewer_app_about_close"/>
35 <signal name="delete_event" handler="virt_viewer_app_about_delete"/>
3436 <child internal-child="vbox">
3537 <object class="GtkVBox" id="dialog-vbox1">
3638 <property name="visible">True</property>
0 /*
1 * Virt Viewer: A virtual machine console viewer
2 *
3 * Copyright (C) 2007-2009 Red Hat,
4 * Copyright (C) 2009 Daniel P. Berrange
5 * Copyright (C) 2010 Marc-André Lureau
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 *
21 * Author: Daniel P. Berrange <berrange@redhat.com>
22 */
23
24 #include <config.h>
25
26 #include <gdk/gdkkeysyms.h>
27 #include <gtk/gtk.h>
28 #include <sys/types.h>
29 #include <sys/stat.h>
30 #include <stdlib.h>
31 #include <string.h>
32 #include <unistd.h>
33 #include <locale.h>
34 #include <glib/gprintf.h>
35 #include <glib/gi18n.h>
36
37 #include <libxml/xpath.h>
38 #include <libxml/uri.h>
39
40 #ifdef HAVE_SYS_SOCKET_H
41 #include <sys/socket.h>
42 #endif
43
44 #ifdef HAVE_SYS_UN_H
45 #include <sys/un.h>
46 #endif
47
48 #ifdef HAVE_WINDOWS_H
49 #include <windows.h>
50 #endif
51
52 #include "virt-viewer-app.h"
53 #include "virt-viewer-auth.h"
54 #include "virt-viewer-window.h"
55 #include "virt-viewer-session.h"
56 #include "virt-viewer-session-vnc.h"
57 #ifdef HAVE_SPICE_GTK
58 #include "virt-viewer-session-spice.h"
59 #endif
60
61 gboolean doDebug = FALSE;
62
63 /* Signal handlers for about dialog */
64 void virt_viewer_app_about_close(GtkWidget *dialog, VirtViewerApp *self);
65 void virt_viewer_app_about_delete(GtkWidget *dialog, void *dummy, VirtViewerApp *self);
66
67
68 /* Internal methods */
69 static void virt_viewer_app_connected(VirtViewerSession *session,
70 VirtViewerApp *self);
71 static void virt_viewer_app_initialized(VirtViewerSession *session,
72 VirtViewerApp *self);
73 static void virt_viewer_app_disconnected(VirtViewerSession *session,
74 VirtViewerApp *self);
75 static void virt_viewer_app_auth_refused(VirtViewerSession *session,
76 const char *msg,
77 VirtViewerApp *self);
78 static void virt_viewer_app_auth_failed(VirtViewerSession *session,
79 const char *msg,
80 VirtViewerApp *self);
81
82 static void virt_viewer_app_server_cut_text(VirtViewerSession *session,
83 const gchar *text,
84 VirtViewerApp *self);
85 static void virt_viewer_app_bell(VirtViewerSession *session,
86 VirtViewerApp *self);
87
88 static void virt_viewer_app_channel_open(VirtViewerSession *session,
89 VirtViewerSessionChannel *channel,
90 VirtViewerApp *self);
91 static void virt_viewer_app_update_pretty_address(VirtViewerApp *self);
92 static void virt_viewer_app_set_fullscreen(VirtViewerApp *self, gboolean fullscreen);
93 static void virt_viewer_app_update_menu_displays(VirtViewerApp *self);
94
95
96 struct _VirtViewerAppPrivate {
97 VirtViewerWindow *main_window;
98 GtkWidget *main_notebook;
99 GtkWidget *container;
100 GHashTable *windows;
101 gchar *clipboard;
102
103 gboolean direct;
104 gboolean verbose;
105 gboolean authretry;
106 gboolean started;
107 gboolean fullscreen;
108
109 VirtViewerSession *session;
110 gboolean active;
111 gboolean connected;
112 guint reconnect_poll; /* source id */
113 char *unixsock;
114 char *ghost;
115 char *gport;
116 char *host; /* ssh */
117 int port;/* ssh */
118 char *user; /* ssh */
119 char *transport;
120 char *pretty_address;
121 gchar *guest_name;
122 gboolean grabbed;
123 };
124
125
126 G_DEFINE_ABSTRACT_TYPE(VirtViewerApp, virt_viewer_app, G_TYPE_OBJECT)
127 #define GET_PRIVATE(o) \
128 (G_TYPE_INSTANCE_GET_PRIVATE ((o), VIRT_VIEWER_TYPE_APP, VirtViewerAppPrivate))
129
130 enum {
131 PROP_0,
132 PROP_VERBOSE,
133 PROP_CONTAINER,
134 PROP_SESSION,
135 PROP_GUEST_NAME,
136 PROP_FULLSCREEN,
137 };
138
139 void
140 virt_viewer_app_set_debug(gboolean debug)
141 {
142 doDebug = debug;
143 }
144
145 void
146 virt_viewer_app_simple_message_dialog(VirtViewerApp *self,
147 const char *fmt, ...)
148 {
149 g_return_if_fail(VIRT_VIEWER_IS_APP(self));
150 GtkWindow *window = GTK_WINDOW(virt_viewer_window_get_window(self->priv->main_window));
151 GtkWidget *dialog;
152 char *msg;
153 va_list vargs;
154
155 va_start(vargs, fmt);
156
157 msg = g_strdup_vprintf(fmt, vargs);
158
159 va_end(vargs);
160
161 dialog = gtk_message_dialog_new(window,
162 GTK_DIALOG_MODAL |
163 GTK_DIALOG_DESTROY_WITH_PARENT,
164 GTK_MESSAGE_ERROR,
165 GTK_BUTTONS_OK,
166 "%s",
167 msg);
168
169 gtk_dialog_run(GTK_DIALOG(dialog));
170
171 gtk_widget_destroy(dialog);
172
173 g_free(msg);
174 }
175
176 void
177 virt_viewer_app_quit(VirtViewerApp *self)
178 {
179 g_return_if_fail(VIRT_VIEWER_IS_APP(self));
180 VirtViewerAppPrivate *priv = self->priv;
181
182 if (priv->session)
183 virt_viewer_session_close(VIRT_VIEWER_SESSION(priv->session));
184 gtk_main_quit();
185 }
186
187 static void count_window_visible(gpointer key G_GNUC_UNUSED,
188 gpointer value,
189 gpointer user_data)
190 {
191 GtkWindow *win = virt_viewer_window_get_window(VIRT_VIEWER_WINDOW(value));
192 guint *n = (guint*)user_data;
193
194 if (gtk_widget_get_visible(GTK_WIDGET(win)))
195 *n += 1;
196 }
197
198 static guint
199 virt_viewer_app_get_n_windows_visible(VirtViewerApp *self)
200 {
201 guint n = 0;
202 g_hash_table_foreach(self->priv->windows, count_window_visible, &n);
203 return n;
204 }
205
206 static guint
207 virt_viewer_app_get_n_windows(VirtViewerApp *self)
208 {
209 return g_hash_table_size(self->priv->windows);
210 }
211
212 gboolean
213 virt_viewer_app_window_set_visible(VirtViewerApp *self,
214 VirtViewerWindow *vwin,
215 gboolean visible)
216 {
217 GtkWidget *window;
218 g_return_val_if_fail(VIRT_VIEWER_IS_APP(self), FALSE);
219 g_return_val_if_fail(VIRT_VIEWER_IS_WINDOW(vwin), FALSE);
220
221 window = GTK_WIDGET(virt_viewer_window_get_window(vwin));
222 if (visible) {
223 gtk_widget_show(window);
224 return TRUE;
225 } else {
226 if (virt_viewer_app_get_n_windows_visible(self) > 1) {
227 gtk_widget_hide(window);
228 return FALSE;
229 } else if (virt_viewer_app_get_n_windows(self) > 1) {
230 GtkWidget *dialog =
231 gtk_message_dialog_new (GTK_WINDOW(window),
232 GTK_DIALOG_DESTROY_WITH_PARENT,
233 GTK_MESSAGE_QUESTION,
234 GTK_BUTTONS_OK_CANCEL,
235 _("This is the last visible display. Do you want to quit?"));
236 gint result = gtk_dialog_run (GTK_DIALOG (dialog));
237 switch (result) {
238 case GTK_RESPONSE_OK:
239 virt_viewer_app_quit(self);
240 break;
241 default:
242 break;
243 }
244 gtk_widget_destroy(dialog);
245 return FALSE;
246 } else {
247 virt_viewer_app_quit(self);
248 return FALSE;
249 }
250 }
251
252 g_warn_if_reached();
253 return FALSE;
254 }
255
256 void
257 virt_viewer_app_about_close(GtkWidget *dialog,
258 VirtViewerApp *self G_GNUC_UNUSED)
259 {
260 gtk_widget_hide(dialog);
261 gtk_widget_destroy(dialog);
262 }
263
264 void
265 virt_viewer_app_about_delete(GtkWidget *dialog,
266 void *dummy G_GNUC_UNUSED,
267 VirtViewerApp *self G_GNUC_UNUSED)
268 {
269 gtk_widget_hide(dialog);
270 gtk_widget_destroy(dialog);
271 }
272
273 #if defined(HAVE_SOCKETPAIR) && defined(HAVE_FORK)
274
275 static int
276 virt_viewer_app_open_tunnel(const char **cmd)
277 {
278 int fd[2];
279 pid_t pid;
280
281 if (socketpair(PF_UNIX, SOCK_STREAM, 0, fd) < 0)
282 return -1;
283
284 pid = fork();
285 if (pid == -1) {
286 close(fd[0]);
287 close(fd[1]);
288 return -1;
289 }
290
291 if (pid == 0) { /* child */
292 close(fd[0]);
293 close(0);
294 close(1);
295 if (dup(fd[1]) < 0)
296 _exit(1);
297 if (dup(fd[1]) < 0)
298 _exit(1);
299 close(fd[1]);
300 execvp("ssh", (char *const*)cmd);
301 _exit(1);
302 }
303 close(fd[1]);
304 return fd[0];
305 }
306
307
308 static int
309 virt_viewer_app_open_tunnel_ssh(const char *sshhost,
310 int sshport,
311 const char *sshuser,
312 const char *host,
313 const char *port,
314 const char *unixsock)
315 {
316 const char *cmd[10];
317 char portstr[50];
318 int n = 0;
319
320 cmd[n++] = "ssh";
321 if (!sshport) {
322 cmd[n++] = "-p";
323 sprintf(portstr, "%d", sshport);
324 cmd[n++] = portstr;
325 }
326 if (sshuser) {
327 cmd[n++] = "-l";
328 cmd[n++] = sshuser;
329 }
330 cmd[n++] = sshhost;
331 cmd[n++] = "nc";
332 if (port) {
333 cmd[n++] = host;
334 cmd[n++] = port;
335 } else {
336 cmd[n++] = "-U";
337 cmd[n++] = unixsock;
338 }
339 cmd[n++] = NULL;
340
341 return virt_viewer_app_open_tunnel(cmd);
342 }
343
344 static int
345 virt_viewer_app_open_unix_sock(const char *unixsock)
346 {
347 struct sockaddr_un addr;
348 int fd;
349
350 memset(&addr, 0, sizeof addr);
351 addr.sun_family = AF_UNIX;
352 strcpy(addr.sun_path, unixsock);
353
354 if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
355 return -1;
356
357 if (connect(fd, (struct sockaddr *)&addr, sizeof addr) < 0) {
358 close(fd);
359 return -1;
360 }
361
362 return fd;
363 }
364
365 #endif /* defined(HAVE_SOCKETPAIR) && defined(HAVE_FORK) */
366
367 void
368 virt_viewer_app_trace(VirtViewerApp *self,
369 const char *fmt, ...)
370 {
371 g_return_if_fail(VIRT_VIEWER_IS_APP(self));
372 va_list ap;
373 VirtViewerAppPrivate *priv = self->priv;
374
375 if (doDebug) {
376 va_start(ap, fmt);
377 g_logv(G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, fmt, ap);
378 va_end(ap);
379 }
380
381 if (priv->verbose) {
382 va_start(ap, fmt);
383 g_vprintf(fmt, ap);
384 va_end(ap);
385 }
386 }
387
388 static void update_title(gpointer key G_GNUC_UNUSED,
389 gpointer value,
390 gpointer user_data G_GNUC_UNUSED)
391 {
392 virt_viewer_window_update_title(VIRT_VIEWER_WINDOW(value));
393 }
394
395 static void
396 virt_viewer_app_update_title(VirtViewerApp *self)
397 {
398 g_hash_table_foreach(self->priv->windows, update_title, NULL);
399 }
400
401 static VirtViewerWindow *
402 virt_viewer_app_get_nth_window(VirtViewerApp *self, gint nth)
403 {
404 return g_hash_table_lookup(self->priv->windows, &nth);
405 }
406
407 static gboolean
408 virt_viewer_app_remove_nth_window(VirtViewerApp *self, gint nth)
409 {
410 gboolean removed;
411
412 g_return_val_if_fail(nth != 0, FALSE);
413 removed = g_hash_table_remove(self->priv->windows, &nth);
414 g_warn_if_fail(removed);
415
416 return removed;
417 }
418
419 static void
420 virt_viewer_app_set_nth_window(VirtViewerApp *self, gint nth, VirtViewerWindow *win)
421 {
422 gint *key;
423
424 g_return_if_fail(virt_viewer_app_get_nth_window(self, nth) == NULL);
425 key = g_malloc(sizeof(gint));
426 *key = nth;
427 g_hash_table_insert(self->priv->windows, key, win);
428 }
429
430 static void
431 viewer_window_visible_cb(GtkWidget *widget G_GNUC_UNUSED,
432 gpointer user_data)
433 {
434 virt_viewer_app_update_menu_displays(VIRT_VIEWER_APP(user_data));
435 }
436
437
438 static VirtViewerWindow*
439 virt_viewer_app_window_new(VirtViewerApp *self, GtkWidget *container, gint nth)
440 {
441 VirtViewerWindow* window;
442 GtkWindow *w;
443
444 window = g_object_new(VIRT_VIEWER_TYPE_WINDOW,
445 "app", self,
446 "container", container,
447 NULL);
448 virt_viewer_app_set_nth_window(self, nth, window);
449 w = virt_viewer_window_get_window(window);
450
451 /* this will set new window to fullscreen if necessary */
452 virt_viewer_app_set_fullscreen(self, self->priv->fullscreen);
453 g_signal_connect(w, "hide", G_CALLBACK(viewer_window_visible_cb), self);
454 g_signal_connect(w, "show", G_CALLBACK(viewer_window_visible_cb), self);
455 return window;
456 }
457
458 static void
459 display_show_hint(VirtViewerDisplay *display,
460 GParamSpec *pspec G_GNUC_UNUSED,
461 VirtViewerWindow *win)
462 {
463 VirtViewerApp *self;
464 VirtViewerNotebook *nb = virt_viewer_window_get_notebook(win);
465 GtkWindow *w = virt_viewer_window_get_window(win);
466 gint nth, hint;
467
468 g_object_get(win,
469 "app", &self,
470 NULL);
471 g_object_get(display,
472 "nth-display", &nth,
473 "show-hint", &hint,
474 NULL);
475
476 if (hint == VIRT_VIEWER_DISPLAY_SHOW_HINT_HIDE) {
477 if (win != self->priv->main_window &&
478 g_getenv("VIRT_VIEWER_HIDE"))
479 gtk_widget_hide(GTK_WIDGET(w));
480 virt_viewer_notebook_show_status(nb, _("Waiting for display %d..."), nth + 1);
481 } else {
482 virt_viewer_notebook_show_display(nb);
483 gtk_widget_show(GTK_WIDGET(w));
484 gtk_window_present(w);
485 }
486
487 g_object_unref(self);
488 }
489
490 static void
491 virt_viewer_app_display_added(VirtViewerSession *session G_GNUC_UNUSED,
492 VirtViewerDisplay *display,
493 VirtViewerApp *self)
494 {
495 VirtViewerAppPrivate *priv = self->priv;
496 VirtViewerWindow *window;
497 gint nth;
498
499 g_object_get(display, "nth-display", &nth, NULL);
500 if (nth == 0) {
501 window = priv->main_window;
502 } else {
503 if (priv->container) {
504 g_warning("multi-head not yet supported within container");
505 return;
506 }
507
508 g_return_if_fail(virt_viewer_app_get_nth_window(self, nth) == NULL);
509 window = virt_viewer_app_window_new(self, NULL, nth);
510 }
511
512 virt_viewer_window_set_display(window, display);
513 g_signal_connect(display, "notify::show-hint",
514 G_CALLBACK(display_show_hint), window);
515 g_object_notify(G_OBJECT(display), "show-hint"); /* call display_show_hint */
516 }
517
518
519 static void
520 virt_viewer_app_display_removed(VirtViewerSession *session G_GNUC_UNUSED,
521 VirtViewerDisplay *display,
522 VirtViewerApp *self)
523 {
524 VirtViewerWindow *win = NULL;
525 gint nth;
526
527 gtk_widget_hide(GTK_WIDGET(display));
528 g_object_get(display, "nth-display", &nth, NULL);
529 win = virt_viewer_app_get_nth_window(self, nth);
530 virt_viewer_window_set_display(win, NULL);
531
532 if (nth != 0)
533 virt_viewer_app_remove_nth_window(self, nth);
534 }
535
536 int
537 virt_viewer_app_create_session(VirtViewerApp *self, const gchar *type)
538 {
539 g_return_val_if_fail(VIRT_VIEWER_IS_APP(self), -1);
540 VirtViewerAppPrivate *priv = self->priv;
541 g_return_val_if_fail(priv->session == NULL, -1);
542
543 if (g_strcasecmp(type, "vnc") == 0) {
544 virt_viewer_app_trace(self, "Guest %s has a %s display\n",
545 priv->guest_name, type);
546 priv->session = virt_viewer_session_vnc_new();
547 } else
548 #ifdef HAVE_SPICE_GTK
549 if (g_strcasecmp(type, "spice") == 0) {
550 virt_viewer_app_trace(self, "Guest %s has a %s display\n",
551 priv->guest_name, type);
552 priv->session = virt_viewer_session_spice_new();
553 } else
554 #endif
555 {
556 virt_viewer_app_trace(self, "Guest %s has unsupported %s display type\n",
557 priv->guest_name, type);
558 virt_viewer_app_simple_message_dialog(self, _("Unknown graphic type for the guest %s"),
559 priv->guest_name);
560 return -1;
561 }
562
563 g_signal_connect(priv->session, "session-initialized",
564 G_CALLBACK(virt_viewer_app_initialized), self);
565 g_signal_connect(priv->session, "session-connected",
566 G_CALLBACK(virt_viewer_app_connected), self);
567 g_signal_connect(priv->session, "session-disconnected",
568 G_CALLBACK(virt_viewer_app_disconnected), self);
569 g_signal_connect(priv->session, "session-channel-open",
570 G_CALLBACK(virt_viewer_app_channel_open), self);
571 g_signal_connect(priv->session, "session-auth-refused",
572 G_CALLBACK(virt_viewer_app_auth_refused), self);
573 g_signal_connect(priv->session, "session-auth-failed",
574 G_CALLBACK(virt_viewer_app_auth_failed), self);
575 g_signal_connect(priv->session, "session-display-added",
576 G_CALLBACK(virt_viewer_app_display_added), self);
577 g_signal_connect(priv->session, "session-display-removed",
578 G_CALLBACK(virt_viewer_app_display_removed), self);
579
580 g_signal_connect(priv->session, "session-cut-text",
581 G_CALLBACK(virt_viewer_app_server_cut_text), self);
582 g_signal_connect(priv->session, "session-bell",
583 G_CALLBACK(virt_viewer_app_bell), self);
584
585 return 0;
586 }
587
588 #if defined(HAVE_SOCKETPAIR) && defined(HAVE_FORK)
589 static void
590 virt_viewer_app_channel_open(VirtViewerSession *session,
591 VirtViewerSessionChannel *channel,
592 VirtViewerApp *self)
593 {
594 VirtViewerAppPrivate *priv;
595 int fd = -1;
596
597 g_return_if_fail(self != NULL);
598
599 priv = self->priv;
600 if (priv->transport && g_strcasecmp(priv->transport, "ssh") == 0 &&
601 !priv->direct) {
602 if ((fd = virt_viewer_app_open_tunnel_ssh(priv->host, priv->port, priv->user,
603 priv->ghost, priv->gport, NULL)) < 0)
604 virt_viewer_app_simple_message_dialog(self, _("Connect to ssh failed."));
605 } else {
606 virt_viewer_app_simple_message_dialog(self, _("Can't connect to channel, SSH only supported."));
607 }
608
609 if (fd >= 0)
610 virt_viewer_session_channel_open_fd(session, channel, fd);
611 }
612 #else
613 static void
614 virt_viewer_app_channel_open(VirtViewerSession *session G_GNUC_UNUSED,
615 VirtViewerSessionChannel *channel G_GNUC_UNUSED,
616 VirtViewerApp *self)
617 {
618 virt_viewer_app_simple_message_dialog(self, _("Connect to channel unsupported."));
619 }
620 #endif
621
622 int
623 virt_viewer_app_activate(VirtViewerApp *self)
624 {
625 g_return_val_if_fail(VIRT_VIEWER_IS_APP(self), -1);
626 VirtViewerAppPrivate *priv = self->priv;
627 int fd = -1;
628 int ret = -1;
629
630 if (priv->active)
631 goto cleanup;
632
633 #if defined(HAVE_SOCKETPAIR) && defined(HAVE_FORK)
634 if (priv->transport &&
635 g_strcasecmp(priv->transport, "ssh") == 0 &&
636 !priv->direct) {
637 if (priv->gport) {
638 virt_viewer_app_trace(self, "Opening indirect TCP connection to display at %s:%s\n",
639 priv->ghost, priv->gport);
640 } else {
641 virt_viewer_app_trace(self, "Opening indirect UNIX connection to display at %s\n",
642 priv->unixsock);
643 }
644 virt_viewer_app_trace(self, "Setting up SSH tunnel via %s@%s:%d\n",
645 priv->user, priv->host, priv->port ? priv->port : 22);
646
647 if ((fd = virt_viewer_app_open_tunnel_ssh(priv->host, priv->port,
648 priv->user, priv->ghost,
649 priv->gport, priv->unixsock)) < 0)
650 return -1;
651 } else if (priv->unixsock) {
652 virt_viewer_app_trace(self, "Opening direct UNIX connection to display at %s",
653 priv->unixsock);
654 if ((fd = virt_viewer_app_open_unix_sock(priv->unixsock)) < 0)
655 return -1;
656 }
657 #endif
658
659 if (fd >= 0) {
660 ret = virt_viewer_session_open_fd(VIRT_VIEWER_SESSION(priv->session), fd);
661 } else {
662 virt_viewer_app_trace(self, "Opening direct TCP connection to display at %s:%s\n",
663 priv->ghost, priv->gport);
664 ret = virt_viewer_session_open_host(VIRT_VIEWER_SESSION(priv->session),
665 priv->ghost, priv->gport);
666 }
667
668 virt_viewer_app_show_status(self, _("Connecting to graphic server"));
669
670 priv->connected = FALSE;
671 priv->active = TRUE;
672 priv->grabbed = FALSE;
673 virt_viewer_app_update_title(self);
674
675 cleanup:
676 return ret;
677 }
678
679 /* text was actually requested */
680 static void
681 virt_viewer_app_clipboard_copy(GtkClipboard *clipboard G_GNUC_UNUSED,
682 GtkSelectionData *data,
683 guint info G_GNUC_UNUSED,
684 VirtViewerApp *self)
685 {
686 VirtViewerAppPrivate *priv = self->priv;
687
688 gtk_selection_data_set_text(data, priv->clipboard, -1);
689 }
690
691 static void
692 virt_viewer_app_server_cut_text(VirtViewerSession *session G_GNUC_UNUSED,
693 const gchar *text,
694 VirtViewerApp *self)
695 {
696 GtkClipboard *cb;
697 gsize a, b;
698 VirtViewerAppPrivate *priv = self->priv;
699 GtkTargetEntry targets[] = {
700 {g_strdup("UTF8_STRING"), 0, 0},
701 {g_strdup("COMPOUND_TEXT"), 0, 0},
702 {g_strdup("TEXT"), 0, 0},
703 {g_strdup("STRING"), 0, 0},
704 };
705
706 if (!text)
707 return;
708
709 g_free (priv->clipboard);
710 priv->clipboard = g_convert (text, -1, "utf-8", "iso8859-1", &a, &b, NULL);
711
712 if (priv->clipboard) {
713 cb = gtk_clipboard_get (GDK_SELECTION_CLIPBOARD);
714
715 gtk_clipboard_set_with_owner (cb,
716 targets,
717 G_N_ELEMENTS(targets),
718 (GtkClipboardGetFunc)virt_viewer_app_clipboard_copy,
719 NULL,
720 G_OBJECT (self));
721 }
722 }
723
724
725 static void virt_viewer_app_bell(VirtViewerSession *session G_GNUC_UNUSED,
726 VirtViewerApp *self)
727 {
728 VirtViewerAppPrivate *priv = self->priv;
729
730 gdk_window_beep(gtk_widget_get_window(GTK_WIDGET(virt_viewer_window_get_window(priv->main_window))));
731 }
732
733
734 static int
735 virt_viewer_app_default_initial_connect(VirtViewerApp *self)
736 {
737 return virt_viewer_app_activate(self);
738 }
739
740 int
741 virt_viewer_app_initial_connect(VirtViewerApp *self)
742 {
743 VirtViewerAppClass *klass;
744
745 g_return_val_if_fail(VIRT_VIEWER_IS_APP(self), -1);
746 klass = VIRT_VIEWER_APP_GET_CLASS(self);
747
748 return klass->initial_connect(self);
749 }
750
751 static gboolean
752 virt_viewer_app_retryauth(gpointer opaque)
753 {
754 VirtViewerApp *self = opaque;
755
756 virt_viewer_app_initial_connect(self);
757
758 return FALSE;
759 }
760
761 static gboolean
762 virt_viewer_app_connect_timer(void *opaque)
763 {
764 VirtViewerApp *self = opaque;
765 VirtViewerAppPrivate *priv = self->priv;
766
767 DEBUG_LOG("Connect timer fired");
768
769 if (!priv->active &&
770 virt_viewer_app_initial_connect(self) < 0)
771 gtk_main_quit();
772
773 if (priv->active) {
774 priv->reconnect_poll = 0;
775 return FALSE;
776 }
777
778 return TRUE;
779 }
780
781 void
782 virt_viewer_app_start_reconnect_poll(VirtViewerApp *self)
783 {
784 g_return_if_fail(VIRT_VIEWER_IS_APP(self));
785 VirtViewerAppPrivate *priv = self->priv;
786
787 if (priv->reconnect_poll != 0)
788 return;
789
790 priv->reconnect_poll = g_timeout_add(500, virt_viewer_app_connect_timer, self);
791 }
792
793 static void
794 virt_viewer_app_default_deactivated(VirtViewerApp *self)
795 {
796 VirtViewerAppPrivate *priv = self->priv;
797
798 virt_viewer_app_show_status(self, _("Guest domain has shutdown"));
799 virt_viewer_app_trace(self, "Guest %s display has disconnected, shutting down",
800 priv->guest_name);
801 gtk_main_quit();
802 }
803
804 static void
805 virt_viewer_app_deactivated(VirtViewerApp *self)
806 {
807 VirtViewerAppClass *klass;
808 klass = VIRT_VIEWER_APP_GET_CLASS(self);
809
810 klass->deactivated(self);
811 }
812
813 static void
814 virt_viewer_app_deactivate(VirtViewerApp *self)
815 {
816 VirtViewerAppPrivate *priv = self->priv;
817
818 if (!priv->active)
819 return;
820
821 if (priv->session)
822 virt_viewer_session_close(VIRT_VIEWER_SESSION(priv->session));
823
824 priv->connected = FALSE;
825 priv->active = FALSE;
826 #if 0
827 g_free(priv->pretty_address);
828 priv->pretty_address = NULL;
829 #endif
830 priv->grabbed = FALSE;
831 virt_viewer_app_update_title(self);
832
833 if (priv->authretry) {
834 priv->authretry = FALSE;
835 g_idle_add(virt_viewer_app_retryauth, self);
836 } else
837 virt_viewer_app_deactivated(self);
838
839 }
840
841 static void
842 virt_viewer_app_connected(VirtViewerSession *session G_GNUC_UNUSED,
843 VirtViewerApp *self)
844 {
845 VirtViewerAppPrivate *priv = self->priv;
846
847 priv->connected = TRUE;
848 virt_viewer_app_show_status(self, _("Connected to graphic server"));
849 }
850
851
852
853 static void
854 virt_viewer_app_initialized(VirtViewerSession *session G_GNUC_UNUSED,
855 VirtViewerApp *self)
856 {
857 virt_viewer_app_update_title(self);
858 }
859
860 static void
861 virt_viewer_app_disconnected(VirtViewerSession *session G_GNUC_UNUSED,
862 VirtViewerApp *self)
863 {
864 VirtViewerAppPrivate *priv = self->priv;
865
866 if (!priv->connected) {
867 virt_viewer_app_simple_message_dialog(self,
868 _("Unable to connect to the graphic server %s"),
869 priv->pretty_address);
870 }
871 virt_viewer_app_deactivate(self);
872 }
873
874
875 static void virt_viewer_app_auth_refused(VirtViewerSession *session G_GNUC_UNUSED,
876 const char *msg,
877 VirtViewerApp *self)
878 {
879 GtkWidget *dialog;
880 int ret;
881 VirtViewerAppPrivate *priv = self->priv;
882
883 dialog = gtk_message_dialog_new(virt_viewer_window_get_window(priv->main_window),
884 GTK_DIALOG_MODAL |
885 GTK_DIALOG_DESTROY_WITH_PARENT,
886 GTK_MESSAGE_ERROR,
887 GTK_BUTTONS_YES_NO,
888 _("Unable to authenticate with remote desktop server at %s: %s\n"
889 "Retry connection again?"),
890 priv->pretty_address, msg);
891
892 ret = gtk_dialog_run(GTK_DIALOG(dialog));
893
894 gtk_widget_destroy(dialog);
895
896 if (ret == GTK_RESPONSE_YES)
897 priv->authretry = TRUE;
898 else
899 priv->authretry = FALSE;
900 }
901
902
903 static void virt_viewer_app_auth_failed(VirtViewerSession *session G_GNUC_UNUSED,
904 const char *msg,
905 VirtViewerApp *self)
906 {
907 VirtViewerAppPrivate *priv = self->priv;
908
909 virt_viewer_app_simple_message_dialog(self,
910 _("Unable to authenticate with remote desktop server at %s"),
911 priv->pretty_address, msg);
912 }
913
914 static void
915 virt_viewer_app_get_property (GObject *object, guint property_id,
916 GValue *value G_GNUC_UNUSED, GParamSpec *pspec)
917 {
918 g_return_if_fail(VIRT_VIEWER_IS_APP(object));
919 VirtViewerApp *self = VIRT_VIEWER_APP(object);
920 VirtViewerAppPrivate *priv = self->priv;
921
922 switch (property_id) {
923 case PROP_VERBOSE:
924 g_value_set_boolean(value, priv->verbose);
925 break;
926
927 case PROP_CONTAINER:
928 g_value_set_object(value, priv->container);
929 break;
930
931 case PROP_SESSION:
932 g_value_set_object(value, priv->session);
933 break;
934
935 case PROP_GUEST_NAME:
936 g_value_set_string(value, priv->guest_name);
937 break;
938
939 case PROP_FULLSCREEN:
940 g_value_set_boolean(value, priv->fullscreen);
941 break;
942
943 default:
944 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
945 }
946 }
947
948 static void
949 virt_viewer_app_set_property (GObject *object, guint property_id,
950 const GValue *value G_GNUC_UNUSED, GParamSpec *pspec)
951 {
952 g_return_if_fail(VIRT_VIEWER_IS_APP(object));
953 VirtViewerApp *self = VIRT_VIEWER_APP(object);
954 VirtViewerAppPrivate *priv = self->priv;
955
956 switch (property_id) {
957 case PROP_VERBOSE:
958 priv->verbose = g_value_get_boolean(value);
959 break;
960
961 case PROP_CONTAINER:
962 g_return_if_fail(priv->container == NULL);
963 priv->container = g_value_dup_object(value);
964 break;
965
966 case PROP_GUEST_NAME:
967 g_free(priv->guest_name);
968 priv->guest_name = g_value_dup_string(value);
969 break;
970
971 case PROP_FULLSCREEN:
972 virt_viewer_app_set_fullscreen(self, g_value_get_boolean(value));
973 break;
974
975 default:
976 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
977 }
978 }
979
980 static void
981 virt_viewer_app_dispose (GObject *object)
982 {
983 VirtViewerApp *self = VIRT_VIEWER_APP(object);
984 VirtViewerAppPrivate *priv = self->priv;
985
986 if (priv->windows) {
987 g_hash_table_unref(priv->windows);
988 priv->windows = NULL;
989 }
990
991 if (priv->main_window) {
992 g_object_unref(priv->main_window);
993 priv->main_window = NULL;
994 }
995
996 if (priv->container) {
997 g_object_unref(priv->container);
998 priv->container = NULL;
999 }
1000
1001 virt_viewer_app_free_connect_info(self);
1002
1003 G_OBJECT_CLASS (virt_viewer_app_parent_class)->dispose (object);
1004 }
1005
1006 static gboolean
1007 virt_viewer_app_default_start(VirtViewerApp *self)
1008 {
1009 VirtViewerAppPrivate *priv;
1010 GtkWindow *win;
1011 priv = self->priv;
1012
1013 win = virt_viewer_window_get_window(priv->main_window);
1014 if (win)
1015 gtk_widget_show(GTK_WIDGET(win));
1016 else {
1017 gtk_box_pack_end(GTK_BOX(priv->container), priv->main_notebook, TRUE, TRUE, 0);
1018 gtk_widget_show(GTK_WIDGET(priv->main_notebook));
1019 }
1020
1021 return TRUE;
1022 }
1023
1024 gboolean virt_viewer_app_start(VirtViewerApp *self)
1025 {
1026 VirtViewerAppClass *klass;
1027
1028 g_return_val_if_fail(VIRT_VIEWER_IS_APP(self), FALSE);
1029 klass = VIRT_VIEWER_APP_GET_CLASS(self);
1030
1031 g_return_val_if_fail(!self->priv->started, TRUE);
1032
1033 self->priv->started = klass->start(self);
1034 return self->priv->started;
1035 }
1036
1037 static void
1038 virt_viewer_app_init (VirtViewerApp *self)
1039 {
1040 self->priv = GET_PRIVATE(self);
1041 self->priv->windows = g_hash_table_new_full(g_int_hash, g_int_equal, g_free, g_object_unref);
1042 }
1043
1044 static GObject *
1045 virt_viewer_app_constructor (GType gtype,
1046 guint n_properties,
1047 GObjectConstructParam *properties)
1048 {
1049 GObject *obj;
1050 VirtViewerApp *self;
1051 VirtViewerAppPrivate *priv;
1052
1053 obj = G_OBJECT_CLASS (virt_viewer_app_parent_class)->constructor (gtype, n_properties, properties);
1054 self = VIRT_VIEWER_APP(obj);
1055 priv = self->priv;
1056
1057 priv->main_window = virt_viewer_app_window_new(self, priv->container, 0);
1058 priv->main_notebook = GTK_WIDGET(virt_viewer_window_get_notebook(priv->main_window));
1059
1060 return obj;
1061 }
1062
1063 static void
1064 virt_viewer_app_class_init (VirtViewerAppClass *klass)
1065 {
1066 GObjectClass *object_class = G_OBJECT_CLASS (klass);
1067
1068 g_type_class_add_private (klass, sizeof (VirtViewerAppPrivate));
1069
1070 object_class->constructor = virt_viewer_app_constructor;
1071 object_class->get_property = virt_viewer_app_get_property;
1072 object_class->set_property = virt_viewer_app_set_property;
1073 object_class->dispose = virt_viewer_app_dispose;
1074
1075 klass->start = virt_viewer_app_default_start;
1076 klass->initial_connect = virt_viewer_app_default_initial_connect;
1077 klass->deactivated = virt_viewer_app_default_deactivated;
1078
1079 g_object_class_install_property(object_class,
1080 PROP_VERBOSE,
1081 g_param_spec_boolean("verbose",
1082 "Verbose",
1083 "Verbose trace",
1084 FALSE,
1085 G_PARAM_READABLE |
1086 G_PARAM_WRITABLE |
1087 G_PARAM_STATIC_STRINGS));
1088
1089 g_object_class_install_property(object_class,
1090 PROP_CONTAINER,
1091 g_param_spec_object("container",
1092 "Container",
1093 "Widget container",
1094 GTK_TYPE_WIDGET,
1095 G_PARAM_READABLE |
1096 G_PARAM_WRITABLE |
1097 G_PARAM_CONSTRUCT_ONLY |
1098 G_PARAM_STATIC_STRINGS));
1099
1100 g_object_class_install_property(object_class,
1101 PROP_SESSION,
1102 g_param_spec_object("session",
1103 "Session",
1104 "ViewerSession",
1105 VIRT_VIEWER_TYPE_SESSION,
1106 G_PARAM_READABLE |
1107 G_PARAM_STATIC_STRINGS));
1108
1109 g_object_class_install_property(object_class,
1110 PROP_GUEST_NAME,
1111 g_param_spec_string("guest-name",
1112 "Guest name",
1113 "Guest name",
1114 "",
1115 G_PARAM_READABLE |
1116 G_PARAM_WRITABLE |
1117 G_PARAM_STATIC_STRINGS));
1118
1119 g_object_class_install_property(object_class,
1120 PROP_FULLSCREEN,
1121 g_param_spec_boolean("fullscreen",
1122 "Fullscreen",
1123 "Fullscreen",
1124 FALSE,
1125 G_PARAM_READABLE |
1126 G_PARAM_WRITABLE |
1127 G_PARAM_STATIC_STRINGS));
1128 }
1129
1130 void
1131 virt_viewer_app_set_direct(VirtViewerApp *self, gboolean direct)
1132 {
1133 g_return_if_fail(VIRT_VIEWER_IS_APP(self));
1134
1135 self->priv->direct = direct;
1136 }
1137
1138 gboolean
1139 virt_viewer_app_is_active(VirtViewerApp *self)
1140 {
1141 g_return_val_if_fail(VIRT_VIEWER_IS_APP(self), FALSE);
1142
1143 return self->priv->active;
1144 }
1145
1146 gboolean
1147 virt_viewer_app_has_session(VirtViewerApp *self)
1148 {
1149 g_return_val_if_fail(VIRT_VIEWER_IS_APP(self), FALSE);
1150
1151 return self->priv->session != NULL;
1152 }
1153
1154 static void
1155 virt_viewer_app_update_pretty_address(VirtViewerApp *self)
1156 {
1157 VirtViewerAppPrivate *priv;
1158
1159 priv = self->priv;
1160 g_free(priv->pretty_address);
1161 if (priv->gport)
1162 priv->pretty_address = g_strdup_printf("%s:%s", priv->ghost, priv->gport);
1163 else
1164 priv->pretty_address = g_strdup_printf("%s:%s", priv->host, priv->unixsock);
1165 }
1166
1167 typedef struct {
1168 gboolean fullscreen;
1169 gboolean move;
1170 } FullscreenOptions;
1171
1172 static void fullscreen_cb(gpointer key,
1173 gpointer value,
1174 gpointer user_data)
1175 {
1176 gint nth = *(gint*)key;
1177 FullscreenOptions *options = (FullscreenOptions *)user_data;
1178 VirtViewerWindow *vwin = VIRT_VIEWER_WINDOW(value);
1179
1180 DEBUG_LOG("fullscreen display %d: %d", nth, options->fullscreen);
1181 if (options->fullscreen) {
1182 GdkScreen *screen = gdk_screen_get_default ();
1183 GdkRectangle mon;
1184
1185 if (nth >= gdk_screen_get_n_monitors(screen)) {
1186 DEBUG_LOG("skipping display %d", nth);
1187 return;
1188 }
1189 gdk_screen_get_monitor_geometry(screen, nth, &mon);
1190 virt_viewer_window_enter_fullscreen(vwin, options->move, mon.x, mon.y);
1191 } else
1192 virt_viewer_window_leave_fullscreen(vwin);
1193 }
1194
1195 static void
1196 virt_viewer_app_set_fullscreen(VirtViewerApp *self, gboolean fullscreen)
1197 {
1198 VirtViewerAppPrivate *priv = self->priv;
1199 FullscreenOptions options = {
1200 .fullscreen = fullscreen,
1201 .move = virt_viewer_app_get_n_windows_visible(self) > 1,
1202 };
1203
1204 /* we iterate unconditionnaly, even if it was set before to update new windows */
1205 priv->fullscreen = fullscreen;
1206 g_hash_table_foreach(priv->windows, fullscreen_cb, &options);
1207 }
1208
1209 static void
1210 menu_display_visible_toggled_cb(GtkCheckMenuItem *checkmenuitem,
1211 VirtViewerWindow *vwin)
1212 {
1213 VirtViewerApp *self;
1214 gboolean visible;
1215 static gboolean reentering = FALSE;
1216
1217 if (reentering) /* do not reenter if I switch you back */
1218 return;
1219
1220 reentering = TRUE;
1221 g_object_get(vwin, "app", &self, NULL);
1222 visible = virt_viewer_app_window_set_visible(self, vwin,
1223 gtk_check_menu_item_get_active(checkmenuitem));
1224 gtk_check_menu_item_set_active(checkmenuitem, /* will be toggled again */ !visible);
1225 g_object_unref(self);
1226 reentering = FALSE;
1227 }
1228
1229 static gint
1230 update_menu_displays_sort(gconstpointer a, gconstpointer b)
1231 {
1232 const int *ai = a;
1233 const int *bi = b;
1234
1235 if (*ai > *bi)
1236 return 1;
1237 else if (*ai < *bi)
1238 return -1;
1239 else
1240 return 0;
1241 }
1242
1243 static void
1244 window_update_menu_displays_cb(gpointer key G_GNUC_UNUSED,
1245 gpointer value,
1246 gpointer user_data)
1247 {
1248 VirtViewerApp *self = VIRT_VIEWER_APP(user_data);
1249 VirtViewerWindow *window = VIRT_VIEWER_WINDOW(value);
1250 GtkMenuShell *submenu = GTK_MENU_SHELL(gtk_menu_new());
1251 GtkMenuItem *menu = virt_viewer_window_get_menu_displays(window);
1252 GList *keys = g_hash_table_get_keys(self->priv->windows);
1253 GList *tmp;
1254
1255 keys = g_list_sort(keys, update_menu_displays_sort);
1256
1257 tmp = keys;
1258 while (tmp) {
1259 int *nth = tmp->data;
1260 VirtViewerWindow *vwin = VIRT_VIEWER_WINDOW(g_hash_table_lookup(self->priv->windows, nth));
1261 GtkWidget *item;
1262 gboolean visible;
1263
1264 item = gtk_check_menu_item_new_with_label(g_strdup_printf("Display %d", *nth));
1265 visible = gtk_widget_get_visible(GTK_WIDGET(virt_viewer_window_get_window(vwin)));
1266 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item), visible);
1267 g_signal_connect(G_OBJECT(item),
1268 "toggled", G_CALLBACK(menu_display_visible_toggled_cb), vwin);
1269 gtk_menu_shell_append(submenu, item);
1270 tmp = tmp->next;
1271 }
1272
1273 gtk_widget_show_all(GTK_WIDGET(submenu));
1274 gtk_menu_item_set_submenu(menu, GTK_WIDGET(submenu));
1275 g_list_free(keys);
1276 }
1277
1278 static void
1279 virt_viewer_app_update_menu_displays(VirtViewerApp *self)
1280 {
1281 g_hash_table_foreach(self->priv->windows, window_update_menu_displays_cb, self);
1282 }
1283
1284 void
1285 virt_viewer_app_set_connect_info(VirtViewerApp *self,
1286 const gchar *host,
1287 const gchar *ghost,
1288 const gchar *gport,
1289 const gchar *transport,
1290 const gchar *unixsock,
1291 const gchar *user,
1292 gint port)
1293 {
1294 g_return_if_fail(VIRT_VIEWER_IS_APP(self));
1295 VirtViewerAppPrivate *priv = self->priv;
1296
1297 DEBUG_LOG("Set connect info: %s,%s,%s,%s,%s,%s,%d",
1298 host, ghost, gport, transport, unixsock, user, port);
1299
1300 g_free(priv->host);
1301 g_free(priv->ghost);
1302 g_free(priv->gport);
1303 g_free(priv->transport);
1304 g_free(priv->unixsock);
1305 g_free(priv->user);
1306
1307 priv->host = g_strdup(host);
1308 priv->ghost = g_strdup(ghost);
1309 priv->gport = g_strdup(gport);
1310 priv->transport = g_strdup(transport);
1311 priv->unixsock = g_strdup(unixsock);
1312 priv->user = g_strdup(user);
1313 priv->port = 0;
1314
1315 virt_viewer_app_update_pretty_address(self);
1316 }
1317
1318 void
1319 virt_viewer_app_free_connect_info(VirtViewerApp *self)
1320 {
1321 g_return_if_fail(VIRT_VIEWER_IS_APP(self));
1322
1323 virt_viewer_app_set_connect_info(self, NULL, NULL, NULL, NULL, NULL, NULL, 0);
1324 }
1325
1326 VirtViewerWindow*
1327 virt_viewer_app_get_main_window(VirtViewerApp *self)
1328 {
1329 g_return_val_if_fail(VIRT_VIEWER_IS_APP(self), NULL);
1330
1331 return self->priv->main_window;
1332 }
1333
1334 static void
1335 show_status_cb(gpointer key G_GNUC_UNUSED,
1336 gpointer value,
1337 gpointer user_data)
1338 {
1339 VirtViewerNotebook *nb = virt_viewer_window_get_notebook(VIRT_VIEWER_WINDOW(value));
1340 gchar *text = (gchar*)user_data;
1341
1342 virt_viewer_notebook_show_status(nb, text);
1343 }
1344
1345 void
1346 virt_viewer_app_show_status(VirtViewerApp *self, const gchar *fmt, ...)
1347 {
1348 va_list args;
1349 gchar *text;
1350
1351 g_return_if_fail(VIRT_VIEWER_IS_APP(self));
1352
1353 va_start(args, fmt);
1354 text = g_strdup_vprintf(fmt, args);
1355 va_end(args);
1356
1357 g_hash_table_foreach(self->priv->windows, show_status_cb, text);
1358 g_free(text);
1359 }
1360
1361 /*
1362 * Local variables:
1363 * c-indent-level: 8
1364 * c-basic-offset: 8
1365 * tab-width: 8
1366 * indent-tabs-mode: t
1367 * End:
1368 */
0 /*
1 * Virt Viewer: A virtual machine console viewer
2 *
3 * Copyright (C) 2007 Red Hat,
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 * Author: Daniel P. Berrange <berrange@redhat.com>
20 */
21
22 #ifndef VIRT_VIEWER_APP_H
23 #define VIRT_VIEWER_APP_H
24
25 #include <glib-object.h>
26 #include "virt-viewer-util.h"
27 #include "virt-viewer-window.h"
28
29 G_BEGIN_DECLS
30
31 #define VIRT_VIEWER_TYPE_APP virt_viewer_app_get_type()
32 #define VIRT_VIEWER_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VIRT_VIEWER_TYPE_APP, VirtViewerApp))
33 #define VIRT_VIEWER_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VIRT_VIEWER_TYPE_APP, VirtViewerAppClass))
34 #define VIRT_VIEWER_IS_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIRT_VIEWER_TYPE_APP))
35 #define VIRT_VIEWER_IS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VIRT_VIEWER_TYPE_APP))
36 #define VIRT_VIEWER_APP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VIRT_VIEWER_TYPE_APP, VirtViewerAppClass))
37
38 typedef struct _VirtViewerAppPrivate VirtViewerAppPrivate;
39
40 typedef struct {
41 GObject parent;
42 VirtViewerAppPrivate *priv;
43 } VirtViewerApp;
44
45 typedef struct {
46 GObjectClass parent_class;
47
48 gboolean (*start) (VirtViewerApp *self);
49 int (*initial_connect) (VirtViewerApp *self);
50 void (*deactivated) (VirtViewerApp *self);
51 } VirtViewerAppClass;
52
53 GType virt_viewer_app_get_type (void);
54
55 void virt_viewer_app_set_debug(gboolean debug);
56 gboolean virt_viewer_app_start(VirtViewerApp *app);
57 void virt_viewer_app_quit(VirtViewerApp *self);
58 VirtViewerWindow* virt_viewer_app_get_main_window(VirtViewerApp *self);
59 void virt_viewer_app_trace(VirtViewerApp *self, const char *fmt, ...);
60 void virt_viewer_app_simple_message_dialog(VirtViewerApp *self, const char *fmt, ...);
61 gboolean virt_viewer_app_is_active(VirtViewerApp *app);
62 void virt_viewer_app_free_connect_info(VirtViewerApp *self);
63 int virt_viewer_app_create_session(VirtViewerApp *self, const gchar *type);
64 int virt_viewer_app_activate(VirtViewerApp *self);
65 int virt_viewer_app_initial_connect(VirtViewerApp *self);
66 void virt_viewer_app_start_reconnect_poll(VirtViewerApp *self);
67 void virt_viewer_app_set_zoom_level(VirtViewerApp *self, gint zoom_level);
68 void virt_viewer_app_set_direct(VirtViewerApp *self, gboolean direct);
69 gboolean virt_viewer_app_has_session(VirtViewerApp *self);
70 void virt_viewer_app_set_connect_info(VirtViewerApp *self,
71 const gchar *host,
72 const gchar *ghost,
73 const gchar *gport,
74 const gchar *transport,
75 const gchar *unixsock,
76 const gchar *user,
77 gint port);
78 gboolean virt_viewer_app_window_set_visible(VirtViewerApp *self, VirtViewerWindow *window, gboolean visible);
79 void virt_viewer_app_show_status(VirtViewerApp *self, const gchar *fmt, ...);
80
81 G_END_DECLS
82
83 #endif /* VIRT_VIEWER_APP_H */
6262 message = g_strdup_printf("Authentication is required for the %s connection to:\n\n"
6363 "<b>%s</b>\n\n",
6464 type,
65 address ? address : "[unknown]");
65 address);
6666 } else {
6767 message = g_strdup_printf("Authentication is required for the %s connection:\n",
6868 type);
9999 }
100100
101101 static void
102 virt_viewer_display_spice_primary_create(SpiceChannel *channel G_GNUC_UNUSED,
103 gint format G_GNUC_UNUSED,
104 gint width,
105 gint height,
106 gint stride G_GNUC_UNUSED,
107 gint shmid G_GNUC_UNUSED,
108 gpointer imgdata G_GNUC_UNUSED,
109 VirtViewerDisplay *display)
102 display_mark(SpiceChannel *channel G_GNUC_UNUSED,
103 gint mark,
104 VirtViewerDisplay *display)
110105 {
111 DEBUG_LOG("desktop resize %dx%d", width, height);
106 DEBUG_LOG("display mark %d", mark);
112107
113 virt_viewer_display_set_desktop_size(display, width, height);
114 g_signal_emit_by_name(display, "display-desktop-resize");
108 virt_viewer_display_set_show_hint(display, mark);
109 }
110
111 static void
112 primary_create(SpiceChannel *channel G_GNUC_UNUSED,
113 gint format G_GNUC_UNUSED,
114 gint width,
115 gint height,
116 gint stride G_GNUC_UNUSED,
117 gint shmid G_GNUC_UNUSED,
118 gpointer imgdata G_GNUC_UNUSED,
119 VirtViewerDisplay *display)
120 {
121 DEBUG_LOG("spice desktop resize %dx%d", width, height);
122
123 virt_viewer_display_set_desktop_size(display, width, height);
124 g_signal_emit_by_name(display, "display-desktop-resize");
115125 }
116126
117127
120130 SpiceDisplay *display)
121131 {
122132 VirtViewerDisplaySpice *self;
133 gint channelid;
123134
124 self = g_object_new(VIRT_VIEWER_TYPE_DISPLAY_SPICE, NULL);
135 g_return_val_if_fail(SPICE_IS_DISPLAY_CHANNEL(channel), NULL);
136 g_return_val_if_fail(SPICE_IS_DISPLAY(display), NULL);
125137
126 self->priv->channel = channel;
127 self->priv->display = display;
138 g_object_get(channel, "channel-id", &channelid, NULL);
128139
129 g_object_ref(channel);
130 g_object_ref(display);
140 self = g_object_new(VIRT_VIEWER_TYPE_DISPLAY_SPICE,
141 "nth-display", channelid,
142 NULL);
143 self->priv->channel = g_object_ref(channel);
144 self->priv->display = g_object_ref(display);
131145
132146 g_signal_connect(channel, "display-primary-create",
133 G_CALLBACK(virt_viewer_display_spice_primary_create), self);
147 G_CALLBACK(primary_create), self);
148 g_signal_connect(channel, "display-mark",
149 G_CALLBACK(display_mark), self);
134150
135151 gtk_container_add(GTK_CONTAINER(self), GTK_WIDGET(self->priv->display));
136152 gtk_widget_show(GTK_WIDGET(self->priv->display));
3939 #define VIRT_VIEWER_DISPLAY_SPICE_CLASS(klass) \
4040 (G_TYPE_CHECK_CLASS_CAST ((klass), VIRT_VIEWER_TYPE_DISPLAY_SPICE, VirtViewerDisplaySpiceClass))
4141
42 #define VIRT_IS_VIEWER_DISPLAY_SPICE(obj) \
42 #define VIRT_VIEWER_IS_DISPLAY_SPICE(obj) \
4343 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIRT_VIEWER_TYPE_DISPLAY_SPICE))
4444
45 #define VIRT_IS_VIEWER_DISPLAY_SPICE_CLASS(klass) \
45 #define VIRT_VIEWER_IS_DISPLAY_SPICE_CLASS(klass) \
4646 (G_TYPE_CHECK_CLASS_TYPE ((klass), VIRT_VIEWER_TYPE_DISPLAY_SPICE))
4747
4848 #define VIRT_VIEWER_DISPLAY_SPICE_GET_CLASS(obj) \
3838 #define VIRT_VIEWER_DISPLAY_VNC_CLASS(klass) \
3939 (G_TYPE_CHECK_CLASS_CAST ((klass), VIRT_VIEWER_TYPE_DISPLAY_VNC, VirtViewerDisplayVncClass))
4040
41 #define VIRT_IS_VIEWER_DISPLAY_VNC(obj) \
41 #define VIRT_VIEWER_IS_DISPLAY_VNC(obj) \
4242 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VIRT_VIEWER_TYPE_DISPLAY_VNC))
4343
44 #define VIRT_IS_VIEWER_DISPLAY_VNC_CLASS(klass) \
44 #define VIRT_VIEWER_IS_DISPLAY_VNC_CLASS(klass) \
4545 (G_TYPE_CHECK_CLASS_TYPE ((klass), VIRT_VIEWER_TYPE_DISPLAY_VNC))
4646
4747 #define VIRT_VIEWER_DISPLAY_VNC_GET_CLASS(obj) \