[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 01/20] configure: Detect libfuse
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH v2 01/20] configure: Detect libfuse |
Date: |
Tue, 22 Sep 2020 13:21:04 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 |
On 22/09/20 13:14, Thomas Huth wrote:
> 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.
For pkg-config in fact it's even simpler and documented in
docs/devel/build-system.rst.
Paolo
- [PATCH v2 00/20] block/export: Allow exporting BDSs via FUSE, Max Reitz, 2020/09/22
- [PATCH v2 03/20] fuse: Implement standard FUSE operations, Max Reitz, 2020/09/22
- [PATCH v2 04/20] fuse: Allow growable exports, Max Reitz, 2020/09/22
- [PATCH v2 02/20] fuse: Allow exporting BDSs via FUSE, Max Reitz, 2020/09/22
- [PATCH v2 05/20] fuse: (Partially) implement fallocate(), Max Reitz, 2020/09/22
- [PATCH v2 06/20] fuse: Implement hole detection through lseek, Max Reitz, 2020/09/22
- [PATCH v2 07/20] iotests: Do not needlessly filter _make_test_img, Max Reitz, 2020/09/22
- [PATCH v2 08/20] iotests: Do not pipe _make_test_img, Max Reitz, 2020/09/22