From patchwork Tue Jul 16 16:17:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bharata B Rao X-Patchwork-Id: 259445 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id C4CBB2C0143 for ; Wed, 17 Jul 2013 02:16:12 +1000 (EST) Received: from localhost ([::1]:54805 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uz7v8-0002yI-LE for incoming@patchwork.ozlabs.org; Tue, 16 Jul 2013 12:16:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uz7uT-0002qD-QW for qemu-devel@nongnu.org; Tue, 16 Jul 2013 12:15:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uz7uS-0005Bd-Ie for qemu-devel@nongnu.org; Tue, 16 Jul 2013 12:15:29 -0400 Received: from e28smtp08.in.ibm.com ([122.248.162.8]:55336) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uz7uR-0005AU-PO for qemu-devel@nongnu.org; Tue, 16 Jul 2013 12:15:28 -0400 Received: from /spool/local by e28smtp08.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 16 Jul 2013 21:35:52 +0530 Received: from d28dlp02.in.ibm.com (9.184.220.127) by e28smtp08.in.ibm.com (192.168.1.138) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 16 Jul 2013 21:35:50 +0530 Received: from d28relay01.in.ibm.com (d28relay01.in.ibm.com [9.184.220.58]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id 0629C394004E for ; Tue, 16 Jul 2013 21:45:19 +0530 (IST) Received: from d28av02.in.ibm.com (d28av02.in.ibm.com [9.184.220.64]) by d28relay01.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r6GGG4NP23462106 for ; Tue, 16 Jul 2013 21:46:04 +0530 Received: from d28av02.in.ibm.com (loopback [127.0.0.1]) by d28av02.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r6GGFKnL024428 for ; Wed, 17 Jul 2013 02:15:21 +1000 Received: from bharata.in.ibm.com ([9.79.196.37]) by d28av02.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id r6GGFD9V023942; Wed, 17 Jul 2013 02:15:19 +1000 From: Bharata B Rao To: qemu-devel@nongnu.org Date: Tue, 16 Jul 2013 21:47:41 +0530 Message-Id: <1373991462-7338-2-git-send-email-bharata@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1373991462-7338-1-git-send-email-bharata@linux.vnet.ibm.com> References: <1373991462-7338-1-git-send-email-bharata@linux.vnet.ibm.com> X-TM-AS-MML: No X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13071616-2000-0000-0000-00000CE98FF3 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, stefanha@gmail.com, aavati@redhat.com, Bharata B Rao Subject: [Qemu-devel] [PATCH v2 1/2] gluster: Use pkg-config to configure GlusterFS block driver 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 Use pkg-config to determine the version and library dependency for GlusterFS block driver. Signed-off-by: Bharata B Rao --- configure | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/configure b/configure index cb0f870..33f943a 100755 --- a/configure +++ b/configure @@ -2566,23 +2566,18 @@ fi ########################################## # glusterfs probe if test "$glusterfs" != "no" ; then - cat > $TMPC < -int main(void) { - (void) glfs_new("volume"); - return 0; -} -EOF - glusterfs_libs="-lgfapi -lgfrpc -lgfxdr" - if compile_prog "" "$glusterfs_libs" ; then - glusterfs=yes + if $pkg_config --atleast-version=3 glusterfs-api >/dev/null 2>&1; then + glusterfs="yes" + glusterfs_cflags=`$pkg_config --cflags glusterfs-api 2>/dev/null` + glusterfs_libs=`$pkg_config --libs glusterfs-api 2>/dev/null` + CFLAGS="$CFLAGS $glusterfs_cflags" libs_tools="$glusterfs_libs $libs_tools" libs_softmmu="$glusterfs_libs $libs_softmmu" else if test "$glusterfs" = "yes" ; then feature_not_found "GlusterFS backend support" fi - glusterfs=no + glusterfs="no" fi fi