From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V06Df-0003e6-AC for qemu-devel@nongnu.org; Fri, 19 Jul 2013 04:39:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V06Dc-0006yx-1y for qemu-devel@nongnu.org; Fri, 19 Jul 2013 04:39:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33228) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V06Db-0006yt-PP for qemu-devel@nongnu.org; Fri, 19 Jul 2013 04:39:15 -0400 From: Stefan Hajnoczi Date: Fri, 19 Jul 2013 16:38:42 +0800 Message-Id: <1374223132-29107-2-git-send-email-stefanha@redhat.com> In-Reply-To: <1374223132-29107-1-git-send-email-stefanha@redhat.com> References: <1374223132-29107-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PATCH 01/11] gluster: Use pkg-config to configure GlusterFS block driver List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Anthony Liguori , Stefan Hajnoczi , Bharata B Rao From: Bharata B Rao Use pkg-config to determine the version and library dependency for GlusterFS block driver. Signed-off-by: Bharata B Rao Signed-off-by: Stefan Hajnoczi --- configure | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/configure b/configure index 9e1cd19..cf13493 100755 --- a/configure +++ b/configure @@ -2570,23 +2570,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 -- 1.8.1.4