From 3f857a8d12b1c4b0076a6424d5f62b1f60a4ad27 Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Tue, 22 Nov 2011 17:24:51 +0000 Subject: tools: use system installed libaio by default. I could have sworn I did this years ago. IIRC the need for our own copy was due to the use of io_set_eventfd which is not present in version 0.3.106. However it is in 0.3.107 the first version of which was uploaded to Debian in June 2008 (I can't find a better reference for the release date). The necessary version is available in Debian Lenny onwards and is in at least RHEL 6, Fedora 13 and OpenSuSE 11.3. The necessary version appears to not be available in RHEL 5 or SLES 11 which is why I haven't simply nuked the in tree version. This is based on tools-system-libaio.diff from the Debian packaging although I have made it optional (but default on). Signed-off-by: Ian Campbell Committed-by: Ian Jackson --- tools/blktap2/drivers/Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'tools/blktap2') diff --git a/tools/blktap2/drivers/Makefile b/tools/blktap2/drivers/Makefile index d205fa07d4..405d2d3e94 100644 --- a/tools/blktap2/drivers/Makefile +++ b/tools/blktap2/drivers/Makefile @@ -14,7 +14,6 @@ CFLAGS += -Wno-unused CFLAGS += -fno-strict-aliasing CFLAGS += -I$(BLKTAP_ROOT)/include -I$(BLKTAP_ROOT)/drivers CFLAGS += $(CFLAGS_libxenctrl) -CFLAGS += -I $(LIBAIO_DIR) CFLAGS += -I $(MEMSHR_DIR) CFLAGS += -D_GNU_SOURCE CFLAGS += -DUSE_NFS_LOCKS @@ -30,7 +29,15 @@ REMUS-OBJS += hashtable.o REMUS-OBJS += hashtable_itr.o REMUS-OBJS += hashtable_utility.o +ifneq ($(CONFIG_SYSTEM_LIBAIO),y) +CFLAGS += -I $(LIBAIO_DIR) LIBAIO_DIR = $(XEN_ROOT)/tools/libaio/src +tapdisk2 tapdisk-stream tapdisk-diff $(QCOW_UTIL): AIOLIBS := $(LIBAIO_DIR)/libaio.a +tapdisk-client tapdisk-stream tapdisk-diff $(QCOW_UTIL): CFLAGS += -I$(LIBAIO_DIR) +else +tapdisk2 tapdisk-stream tapdisk-diff $(QCOW_UTIL): AIOLIBS := -laio +endif + MEMSHR_DIR = $(XEN_ROOT)/tools/memshr MEMSHRLIBS := @@ -39,9 +46,6 @@ CFLAGS += -DMEMSHR MEMSHRLIBS += $(MEMSHR_DIR)/libmemshr.a endif -tapdisk2 tapdisk-stream tapdisk-diff $(QCOW_UTIL): AIOLIBS := $(LIBAIO_DIR)/libaio.a -tapdisk-client tapdisk-stream tapdisk-diff $(QCOW_UTIL): CFLAGS += -I$(LIBAIO_DIR) - ifeq ($(VHD_STATIC),y) td-util: CFLAGS += -static endif -- cgit v1.2.3