diff --git a/.hgignore b/.hgignore index 53f17d4..750dab1 100644 --- a/.hgignore +++ b/.hgignore @@ -11,3 +11,12 @@ Makefile\.in$ ^install-sh$ ^ltmain.sh$ ^missing$ +^libtool$ +^src/\.deps +^src/virt-viewer$ +^src/.*\.o +^src/Makefile$ +^virt-viewer\.spec$ +^config.h.in$ +^man/Makefile$ +^man/virt-viewer\.1$ diff --git a/acinclude.m4 b/acinclude.m4 index b37cf34..73b5a7b 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -33,7 +33,8 @@ AC_DEFUN([VIRT_VIEWER_COMPILE_WARNINGS],[ maximum|error) try_compiler_flags="$try_compiler_flags -Wall -Wmissing-prototypes -std=c99 -Wnested-externs -Wpointer-arith" try_compiler_flags="$try_compiler_flags -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return" - try_compiler_flags="$try_compiler_flags -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare" + # Removed -Wstrict-prototypes to avoid GTK bug + try_compiler_flags="$try_compiler_flags -Winline -Wredundant-decls -Wno-sign-compare" if test "$enable_compile_warnings" = "error" ; then try_compiler_flags="$try_compiler_flags -Werror" fi diff --git a/autobuild.sh b/autobuild.sh index 6b753fe..472f2da 100755 --- a/autobuild.sh +++ b/autobuild.sh @@ -3,14 +3,11 @@ set -e set -v -# Make things clean. -test -f Makefile && make -k distclean || : - rm -rf build mkdir build cd build -../autogen.sh --prefix=$AUTOBUILD_INSTALL_ROOT --enable-fatal-warnings +../autogen.sh --prefix=$AUTOBUILD_INSTALL_ROOT --enable-compile-warnings=error --enable-plugin make make install diff --git a/autogen.sh b/autogen.sh index ae01c92..92f8c76 100755 --- a/autogen.sh +++ b/autogen.sh @@ -38,6 +38,7 @@ fi libtoolize --copy --force aclocal +autoheader automake --add-missing autoconf diff --git a/configure.ac b/configure.ac index cce2c69..15c42b4 100644 --- a/configure.ac +++ b/configure.ac @@ -1,10 +1,17 @@ -AC_INIT(virt-viewer.spec.in) -AM_INIT_AUTOMAKE(virt-viewer, 0.0.2) + +AC_INIT(virt-viewer, 0.0.2) +AC_CONFIG_SRCDIR(src/main.c) +AM_CONFIG_HEADER(config.h) +dnl Make automake keep quiet about wildcards & other GNUmake-isms +AM_INIT_AUTOMAKE([-Wno-portability]) +AC_CANONICAL_HOST AC_PROG_CC AM_PROG_CC_C_O AC_PROG_LIBTOOL +AC_DEFINE([_GNU_SOURCE], [], [Enable GNU extensions]) + VIRT_VIEWER_COMPILE_WARNINGS(maximum) PKG_CHECK_MODULES(LIBXML2, libxml-2.0 >= 2.6.0) diff --git a/plugin/Makefile.am b/plugin/Makefile.am index d8f53c2..ff1536e 100644 --- a/plugin/Makefile.am +++ b/plugin/Makefile.am @@ -28,8 +28,6 @@ virt-viewer-plugin.so: virt-viewer-plugin.la install-data-hook: rm -f $(plugindir)/virt-viewer-plugin.a $(plugindir)/virt-viewer-plugin.la -EXTRA_DIST = README - CLEANFILES = virt-viewer-plugin.so endif diff --git a/plugin/npshell.c b/plugin/npshell.c index 94b65dc..b2419a4 100644 --- a/plugin/npshell.c +++ b/plugin/npshell.c @@ -76,10 +76,12 @@ Portions created by Adobe Systems Incorporated are Copyright (C) 2007. All Right Contributor(s): Adobe Systems Incorporated. */ +#include #include #include #include +#include #include #include diff --git a/plugin/npunix.c b/plugin/npunix.c index 9e47aa6..ddc4bdf 100644 --- a/plugin/npunix.c +++ b/plugin/npunix.c @@ -51,6 +51,8 @@ *---------------------------------------------------------------------- */ +#include + #define XP_UNIX 1 #include diff --git a/plugin/virt-viewer-plugin.c b/plugin/virt-viewer-plugin.c index d5a5fdc..8d1bce3 100644 --- a/plugin/virt-viewer-plugin.c +++ b/plugin/virt-viewer-plugin.c @@ -33,6 +33,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ +#include + #include #include #include diff --git a/src/main.c b/src/main.c index d52d923..9df2b09 100644 --- a/src/main.c +++ b/src/main.c @@ -20,7 +20,7 @@ * Author: Daniel P. Berrange */ -#define _GNU_SOURCE +#include #include #include @@ -462,15 +462,6 @@ static GtkWidget *viewer_build_menu(VncDisplay *vnc) return menubar; } -static GtkWidget *viewer_get_toplevel (void *data G_GNUC_UNUSED) -{ - GtkWidget *window; - - window = gtk_window_new(GTK_WINDOW_TOPLEVEL); - gtk_window_set_resizable(GTK_WINDOW(window), FALSE); - return window; -} - static GtkWidget *viewer_build_window(VncDisplay *vnc, GtkWidget *(*get_toplevel)(void *), void *data, @@ -816,6 +807,15 @@ viewer_start (const char *uri, const char *name, #ifndef PLUGIN /* Standalone program. */ +static GtkWidget *viewer_get_toplevel (void *data G_GNUC_UNUSED) +{ + GtkWidget *window; + + window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + gtk_window_set_resizable(GTK_WINDOW(window), FALSE); + return window; +} + static void viewer_version(FILE *out) { fprintf(out, "%s version %s\n", PACKAGE, VERSION);