From patchwork Sat Feb 9 07:42:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wayne Xia X-Patchwork-Id: 219372 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id EAE5E2C0087 for ; Sat, 9 Feb 2013 18:46:00 +1100 (EST) Received: from localhost ([::1]:44551 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U458G-0007ws-Ks for incoming@patchwork.ozlabs.org; Sat, 09 Feb 2013 02:45:56 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U457l-0007Mi-41 for qemu-devel@nongnu.org; Sat, 09 Feb 2013 02:45:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U457h-0003Ez-Fl for qemu-devel@nongnu.org; Sat, 09 Feb 2013 02:45:24 -0500 Received: from e28smtp08.in.ibm.com ([122.248.162.8]:52049) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U457g-0003Dv-MW for qemu-devel@nongnu.org; Sat, 09 Feb 2013 02:45:21 -0500 Received: from /spool/local by e28smtp08.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Sat, 9 Feb 2013 13:12:20 +0530 Received: from d28dlp03.in.ibm.com (9.184.220.128) by e28smtp08.in.ibm.com (192.168.1.138) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Sat, 9 Feb 2013 13:12:18 +0530 Received: from d28relay04.in.ibm.com (d28relay04.in.ibm.com [9.184.220.61]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id D0BAF1258053 for ; Sat, 9 Feb 2013 13:15:51 +0530 (IST) Received: from d28av03.in.ibm.com (d28av03.in.ibm.com [9.184.220.65]) by d28relay04.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r197jBWW27984044 for ; Sat, 9 Feb 2013 13:15:11 +0530 Received: from d28av03.in.ibm.com (loopback [127.0.0.1]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r197jD3D025844 for ; Sat, 9 Feb 2013 18:45:13 +1100 Received: from RH63Wenchao ([9.125.26.226]) by d28av03.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r197gTHl019694; Sat, 9 Feb 2013 18:45:10 +1100 From: Wenchao Xia To: qemu-devel@nongnu.org Date: Sat, 9 Feb 2013 15:42:32 +0800 Message-Id: <1360395759-1649-4-git-send-email-xiawenc@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1360395759-1649-1-git-send-email-xiawenc@linux.vnet.ibm.com> References: <1360395759-1649-1-git-send-email-xiawenc@linux.vnet.ibm.com> X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13020907-2000-0000-0000-00000AE667E4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 122.248.162.8 Cc: kwolf@redhat.com, pbonzini@redhat.com, aliguori@us.ibm.com, Wenchao Xia , stefanha@gmail.com Subject: [Qemu-devel] [PATCH V18 03/10] libqblock: build: add configure support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Rule for libqblock.la will be included if it is enabled, and will be added to 'all' to be automatically built. Only support Linux now, to save trouble in building on windows. Signed-off-by: Wenchao Xia --- Makefile | 3 +++ configure | 32 ++++++++++++++++++++++++++++++++ libqblock/Makefile | 4 ++++ 3 files changed, 39 insertions(+), 0 deletions(-) create mode 100644 libqblock/Makefile diff --git a/Makefile b/Makefile index b2d7798..a472fd3 100644 --- a/Makefile +++ b/Makefile @@ -114,6 +114,9 @@ endif ifeq ($(CONFIG_SMARTCARD_NSS),y) include $(SRC_PATH)/libcacard/Makefile endif +ifeq ($(CONFIG_LIBQBLOCK),y) +include $(SRC_PATH)/libqblock/Makefile +endif all: $(DOCS) $(TOOLS) $(HELPERS-y) recurse-all diff --git a/configure b/configure index aa347cc..e8a119e 100755 --- a/configure +++ b/configure @@ -226,6 +226,8 @@ coroutine="" seccomp="" glusterfs="" virtio_blk_data_plane="" +libqblock="" +libqblock_requires_y="" # parse CC options first for opt do @@ -898,6 +900,10 @@ for opt do ;; --enable-virtio-blk-data-plane) virtio_blk_data_plane="yes" ;; + --disable-libqblock) libqblock="no" + ;; + --enable-libqblock) libqblock="yes" + ;; *) echo "ERROR: unknown option $opt"; show_help="yes" ;; esac @@ -1147,6 +1153,8 @@ echo " --enable-glusterfs enable GlusterFS backend" echo " --disable-glusterfs disable GlusterFS backend" echo " --enable-gcov enable test coverage analysis with gcov" echo " --gcov=GCOV use specified gcov [$gcov_tool]" +echo " --enable-libqblock enable shared library libqblock" +echo " --disable-libqblock disable shared library libqblock" echo "" echo "NOTE: The object files are built at the place where configure is launched" exit 1 @@ -2445,6 +2453,23 @@ EOF fi fi +########################################## +# libqblock probe +if test "$libqblock" != "no"; then + if test -n "$libtool" && test -n "$glib_libs" && \ + test "$linux" = "yes" \ + ; then + # Only support Linux now, check for librt and libz are missing, add it later. + libqblock="yes" + libqblock_requires_y="gthread-2.0 glib-2.0 rt z" + else + if test "$libqblock" = "yes"; then + feature_not_found "libqblock" + fi + libqblock="no" + fi +fi + # # Check for xxxat() functions when we are building linux-user # emulator. This is done because older glibc versions don't @@ -3361,6 +3386,7 @@ echo "GlusterFS support $glusterfs" echo "virtio-blk-data-plane $virtio_blk_data_plane" echo "gcov $gcov_tool" echo "gcov enabled $gcov" +echo "libqblock support $libqblock" if test "$sdl_too_old" = "yes"; then echo "-> Your SDL version is too old - please upgrade to have SDL support" @@ -3717,6 +3743,11 @@ if test "$virtio_blk_data_plane" = "yes" ; then echo "CONFIG_VIRTIO_BLK_DATA_PLANE=y" >> $config_host_mak fi +if test "$libqblock" = "yes" ; then + echo "CONFIG_LIBQBLOCK=y" >> $config_host_mak + echo "libqblock-requires-y=$libqblock_requires_y" >> $config_host_mak +fi + # USB host support case "$usb" in linux) @@ -4301,6 +4332,7 @@ DIRS="tests tests/tcg tests/tcg/cris tests/tcg/lm32" DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas" DIRS="$DIRS roms/seabios roms/vgabios" DIRS="$DIRS qapi-generated" +DIRS="$DIRS libqblock" FILES="Makefile tests/tcg/Makefile qdict-test-data.txt" FILES="$FILES tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit" FILES="$FILES tests/tcg/lm32/Makefile" diff --git a/libqblock/Makefile b/libqblock/Makefile new file mode 100644 index 0000000..8173da7 --- /dev/null +++ b/libqblock/Makefile @@ -0,0 +1,4 @@ +all: libqblock.la + +libqblock.la: + @true