qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH v1 1/2] gluster: Use pkg-config to configure


From: Kevin Wolf
Subject: Re: [Qemu-devel] [RFC PATCH v1 1/2] gluster: Use pkg-config to configure GlusterFS block driver
Date: Tue, 16 Jul 2013 10:25:29 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 12.07.2013 um 08:58 hat Bharata B Rao geschrieben:
> 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 <address@hidden>
> ---
>  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 <<EOF
> -#include <glusterfs/api/glfs.h>
> -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"

Why do you switch from libs_tools/libs_softmmu to LIBS? If I understand
it right, this means that you now link the library to linux-user targets
as well, but I can't see how they need it.

Kevin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]