qemu-block
[Top][All Lists]
Advanced

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

Re: [PATCH v2 01/20] configure: Detect libfuse


From: Thomas Huth
Subject: Re: [PATCH v2 01/20] configure: Detect libfuse
Date: Tue, 22 Sep 2020 13:14:45 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0

On 22/09/2020 12.49, Max Reitz wrote:
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
>  configure   | 34 ++++++++++++++++++++++++++++++++++
>  meson.build |  6 ++++++
>  2 files changed, 40 insertions(+)
> 
> diff --git a/configure b/configure
> index ce27eafb0a..21c31e4694 100755
> --- a/configure
> +++ b/configure
> @@ -538,6 +538,7 @@ meson=""
>  ninja=""
>  skip_meson=no
>  gettext=""
> +fuse=""
>  
>  bogus_os="no"
>  malloc_trim=""
> @@ -1621,6 +1622,10 @@ for opt do
>    ;;
>    --disable-libdaxctl) libdaxctl=no
>    ;;
> +  --enable-fuse) fuse=yes
> +  ;;
> +  --disable-fuse) fuse=no
> +  ;;
>    *)
>        echo "ERROR: unknown option $opt"
>        echo "Try '$0 --help' for more information"
> @@ -1945,6 +1950,7 @@ disabled with --disable-FEATURE, default is enabled if 
> available:
>    xkbcommon       xkbcommon support
>    rng-none        dummy RNG, avoid using /dev/(u)random and getrandom()
>    libdaxctl       libdaxctl support
> +  fuse            fuse block device export
>  
>  NOTE: The object files are built at the place where configure is launched
>  EOF
> @@ -6206,6 +6212,28 @@ but not implemented on your system"
>      fi
>  fi
>  
> +##########################################
> +# FUSE support
> +
> +if test "$fuse" != "no"; then
> +  cat > $TMPC <<EOF
> +#define FUSE_USE_VERSION 31
> +#include <fuse.h>
> +#include <fuse_lowlevel.h>
> +int main(void) { return 0; }
> +EOF
> +  fuse_cflags=$(pkg-config --cflags fuse3)
> +  fuse_libs=$(pkg-config --libs fuse3)
> +  if compile_prog "$fuse_cflags" "$fuse_libs"; then
> +    fuse=yes
> +  else
> +    if test "$fuse" = "yes"; then
> +      feature_not_found "fuse"
> +    fi
> +    fuse=no
> +  fi
> +fi

Could you turn this immediately into a meson test instead? See e.g.
https://lists.gnu.org/archive/html/qemu-devel/2020-09/msg07112.html as
an example for how to do this.

 Thomas




reply via email to

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