diff mbox

[V14,03/10] libqblock: build: add configure support

Message ID 1358939887-22533-4-git-send-email-xiawenc@linux.vnet.ibm.com
State New
Headers show

Commit Message

Wayne Xia Jan. 23, 2013, 11:18 a.m. UTC
Rule for libqblock.la will be included if it is enabled, and
will be added to $TOOLS to be automatically built.

Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
---
 Makefile           |    3 +++
 configure          |   26 ++++++++++++++++++++++++++
 libqblock/Makefile |    4 ++++
 3 files changed, 33 insertions(+), 0 deletions(-)
 create mode 100644 libqblock/Makefile

Comments

Paolo Bonzini Jan. 23, 2013, 11:26 a.m. UTC | #1
Il 23/01/2013 12:18, Wenchao Xia ha scritto:
> @@ -0,0 +1,4 @@
> +TOOLS += libqblock.la

This is not needed since you have "all: libqblock.la" in patch 4.
Otherwise looks good.

> +
> +libqblock.la:
> +	@true

Paolo
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 69472b7..87c4303 100644
--- a/Makefile
+++ b/Makefile
@@ -111,6 +111,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 c6172ef..9463346 100755
--- a/configure
+++ b/configure
@@ -226,6 +226,7 @@  coroutine=""
 seccomp=""
 glusterfs=""
 virtio_blk_data_plane=""
+libqblock=""
 
 # parse CC options first
 for opt do
@@ -897,6 +898,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
@@ -1146,6 +1151,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
@@ -2429,6 +2436,19 @@  EOF
   fi
 fi
 
+##########################################
+# libqblock probe
+if test "$libqblock" != "no"; then
+    if test -n "$libtool"; then
+        libqblock="yes"
+    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
@@ -3344,6 +3364,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"
@@ -3700,6 +3721,10 @@  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
+fi
+
 # USB host support
 case "$usb" in
 linux)
@@ -4283,6 +4308,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..734d90e
--- /dev/null
+++ b/libqblock/Makefile
@@ -0,0 +1,4 @@ 
+TOOLS += libqblock.la
+
+libqblock.la:
+	@true