diff options
author | kraxel <kraxel> | 2007-08-23 16:15:21 +0000 |
---|---|---|
committer | kraxel <kraxel> | 2007-08-23 16:15:21 +0000 |
commit | 96535b0adcc73d8fe07bf020e162c4ffad55ee9a (patch) | |
tree | de0db38cb61a7d2b30094130c042bb1c67951e29 | |
parent | d259d7e6a9a56baecb92d350004b6d35235fbe96 (diff) | |
download | xenwatch-96535b0adcc73d8fe07bf020e162c4ffad55ee9a.tar.gz |
buildsystem tweaks, fix testbuild failures
-rw-r--r-- | GNUmakefile | 52 | ||||
-rw-r--r-- | xenscreen.c | 3 |
2 files changed, 31 insertions, 24 deletions
diff --git a/GNUmakefile b/GNUmakefile index d8a083f..6374c90 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -6,9 +6,13 @@ include mk/Variables.mk CFLAGS += -DVERSION='"$(VERSION)"' -DLIB='"$(LIB)"' # build -TARGETS := xenlog xenscreen -BUILD_GTK := xenwatch xenstore mdns-browser -BUILD_AVAHI := mdns-publish-xendom mdns-publish-vnc +TARGETS := xenlog xenscreen xenwatch xenstore \ + mdns-browser mdns-publish-xendom mdns-publish-vnc \ + vnc-client +BUILD_XENSTORE := xenlog xenwatch xenstore \ + mdns-publish-xendom mdns-publish-vnc +BUILD_GTK := xenwatch xenstore mdns-browser vnc-client +BUILD_AVAHI := mdns-browser mdns-publish-xendom mdns-publish-vnc BUILD_GTK_VNC := vnc-client NEEDS_XENSTORE := xenlog xenscreen xenwatch xenstore mdns-publish-xendom mdns-publish-vnc @@ -35,29 +39,38 @@ HAVE_GTK_VNC := $(call ac_pkg_config,gtk-vnc-1.0) HAVE_XENSTORE := $(call ac_lib,xs_daemon_open,xenstore) endef - -# gtk stuff +# gtk ifeq ($(HAVE_GTK),yes) $(NEEDS_GTK) : CFLAGS += -Wno-strict-prototypes $(NEEDS_GTK) : pkglst += gtk+-x11-2.0 - TARGETS += $(BUILD_GTK) - ifeq ($(HAVE_GTK_VNC),yes) - TARGETS += $(BUILD_GTK_VNC) - $(NEEDS_GTK_VNC) : pkglst += gtk-vnc-1.0 - endif +else + TARGETS := $(filter-out $(BUILD_GTK), $(TARGETS)) +endif + +# gtk-vnc +ifeq ($(HAVE_GTK_VNC),yes) + $(NEEDS_GTK_VNC) : pkglst += gtk-vnc-1.0 +else + TARGETS := $(filter-out $(BUILD_GTK_VNC), $(TARGETS)) endif -# avahi stuff +# avahi ifeq ($(HAVE_AVAHI),yes) - $(NEEDS_AVAHI) : pkglst += avahi-client - $(NEEDS_GTK) : pkglst += avahi-glib - TARGETS += $(BUILD_AVAHI) + $(NEEDS_AVAHI) : pkglst += avahi-client avahi-glib +else + TARGETS := $(filter-out $(BUILD_AVAHI), $(TARGETS)) endif -# libvirt stuff +# xenstore +ifeq ($(HAVE_XENSTORE),yes) + $(NEEDS_XENSTORE) : LDLIBS += -lxenstore +else + TARGETS := $(filter-out $(BUILD_XENSTORE), $(TARGETS)) +endif + +# libvirt ifeq ($(HAVE_LIBVIRT),yes) $(NEEDS_LIBVIRT) : pkglst += libvirt libxml-2.0 - TARGETS += $(BUILD_LIBVIRT) endif # compile flags @@ -65,13 +78,6 @@ CFLAGS += $(call ac_inc_cflags,XENSTORE LIBVIRT AVAHI GTK_VNC) CFLAGS += $(shell test "$(pkglst)" != "" && pkg-config --cflags $(pkglst)) LDLIBS += $(shell test "$(pkglst)" != "" && pkg-config --libs $(pkglst)) -# xenstore -ifneq ($(XENSRC),) - $(NEEDS_XENSTORE) : CFLAGS += -I $(XENSRC)/dist/install/usr/include - $(NEEDS_XENSTORE) : LDLIBS += -I $(XENSRC)/dist/install/usr/$(LIB) -endif -$(NEEDS_XENSTORE) : LDLIBS += -lxenstore - ######################################################################## # rules diff --git a/xenscreen.c b/xenscreen.c index 8cbe178..1e783f9 100644 --- a/xenscreen.c +++ b/xenscreen.c @@ -5,6 +5,7 @@ #include <unistd.h> #include <signal.h> #include <time.h> +#include <errno.h> #include <sys/utsname.h> #ifdef HAVE_LIBVIRT @@ -434,11 +435,11 @@ int main(int argc, char *argv[]) unsigned int rc, i; time_t last_ctrl_c = 0; char **nav; + struct timeval tv; #ifdef HAVE_LIBVIRT char *vir_url = getenv("VIRSH_DEFAULT_CONNECT_URI"); virConnectPtr vir_conn = NULL; - struct timeval tv; #else void *vir_conn = NULL; #endif |