From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41025) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxXHK-0002pJ-Cu for qemu-devel@nongnu.org; Fri, 12 Jul 2013 02:56:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UxXHJ-0004mn-Hg for qemu-devel@nongnu.org; Fri, 12 Jul 2013 02:56:30 -0400 Received: from e23smtp01.au.ibm.com ([202.81.31.143]:49533) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxXHI-0004mZ-UA for qemu-devel@nongnu.org; Fri, 12 Jul 2013 02:56:29 -0400 Received: from /spool/local by e23smtp01.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 12 Jul 2013 16:47:07 +1000 Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [9.190.234.120]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id F2BCD2CE8051 for ; Fri, 12 Jul 2013 16:56:23 +1000 (EST) Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r6C6fEYm9044370 for ; Fri, 12 Jul 2013 16:41:14 +1000 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r6C6uNcv006403 for ; Fri, 12 Jul 2013 16:56:23 +1000 Date: Fri, 12 Jul 2013 12:28:54 +0530 From: Bharata B Rao Message-ID: <20130712065854.GJ32532@in.ibm.com> References: <20130712065614.GI32532@in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130712065614.GI32532@in.ibm.com> Subject: [Qemu-devel] [RFC PATCH v1 1/2] gluster: Use pkg-config to configure GlusterFS block driver Reply-To: bharata@linux.vnet.ibm.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi , Anand Avati gluster: Use pkg-config to configure GlusterFS block driver Use pkg-config to determine the version and library dependency for GlusterFS block driver. Signed-off-by: Bharata B Rao --- configure | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/configure b/configure index cb0f870..76adcb1 100755 --- a/configure +++ b/configure @@ -2566,23 +2566,17 @@ 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 - libs_tools="$glusterfs_libs $libs_tools" - libs_softmmu="$glusterfs_libs $libs_softmmu" + 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="$LIBS $glusterfs_libs" else if test "$glusterfs" = "yes" ; then feature_not_found "GlusterFS backend support" fi - glusterfs=no + glusterfs="no" fi fi