From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40367) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHqTJ-0002rP-JW for qemu-devel@nongnu.org; Fri, 06 Sep 2013 03:28:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VHqT8-00005d-TK for qemu-devel@nongnu.org; Fri, 06 Sep 2013 03:28:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41919) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VHqT8-00005W-HC for qemu-devel@nongnu.org; Fri, 06 Sep 2013 03:28:38 -0400 From: Fam Zheng Date: Fri, 6 Sep 2013 15:28:10 +0800 Message-Id: <1378452491-20467-6-git-send-email-famz@redhat.com> In-Reply-To: <1378452491-20467-1-git-send-email-famz@redhat.com> References: <1378452491-20467-1-git-send-email-famz@redhat.com> Subject: [Qemu-devel] [RFC PATCH v2 5/6] curl: build as shared library List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, famz@redhat.com, mjt@tls.msk.ru, stefanha@redhat.com, pbonzini@redhat.com, vilanova@ac.upc.edu, rth@twiddle.net Curl block driver is built as shared object module when enabled. We have per object cflags and libs support now, move CURL_CFLAGS and CURL_LIBS from global option variables to a per object basis. "make install" is not installing it yet, manually copy it to ${prefix}/qemu/block/curl.so to make it loaded. Signed-off-by: Fam Zheng --- block/Makefile.objs | 3 ++- configure | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/block/Makefile.objs b/block/Makefile.objs index 4cf9aa4..b1e1520 100644 --- a/block/Makefile.objs +++ b/block/Makefile.objs @@ -23,4 +23,5 @@ common-obj-y += commit.o common-obj-y += mirror.o common-obj-y += backup.o -$(obj)/curl.o: QEMU_CFLAGS+=$(CURL_CFLAGS) +$(obj)/curl.o-cflags := $(CURL_CFLAGS) +$(obj)/curl.o-libs := $(CURL_LIBS) diff --git a/configure b/configure index 7fec1c7..4adc267 100755 --- a/configure +++ b/configure @@ -2210,8 +2210,6 @@ EOF curl_libs=`$curlconfig --libs 2>/dev/null` if compile_prog "$curl_cflags" "$curl_libs" ; then curl=yes - libs_tools="$curl_libs $libs_tools" - libs_softmmu="$curl_libs $libs_softmmu" else if test "$curl" = "yes" ; then feature_not_found "curl" @@ -3889,8 +3887,9 @@ if test "$bswap_h" = "yes" ; then echo "CONFIG_MACHINE_BSWAP_H=y" >> $config_host_mak fi if test "$curl" = "yes" ; then - echo "CONFIG_CURL=y" >> $config_host_mak + echo "CONFIG_CURL=m" >> $config_host_mak echo "CURL_CFLAGS=$curl_cflags" >> $config_host_mak + echo "CURL_LIBS=$curl_libs" >> $config_host_mak fi if test "$brlapi" = "yes" ; then echo "CONFIG_BRLAPI=y" >> $config_host_mak -- 1.8.3.1