Re: [RFC] [PATCH v3 1/6] add a configure option --with-fuse to prepare introduction of fuse support for libvirt lxc

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

 



On Mon, Sep 10, 2012 at 9:54 PM, Gao feng <gaofeng@xxxxxxxxxxxxxx> wrote:
> add a configure option --with-fuse to prepare introduction
> of fuse support for libvirt lxc.
>
> With help from Daniel
>
> Signed-off-by: Gao feng <gaofeng@xxxxxxxxxxxxxx>
> ---
>  configure.ac    |   35 +++++++++++++++++++++++++++++++++++
>  libvirt.spec.in |    9 +++++++++
>  2 files changed, 44 insertions(+), 0 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 47a72b9..cc7de9d 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1847,6 +1847,36 @@ AC_SUBST([CAPNG_CFLAGS])
>  AC_SUBST([CAPNG_LIBS])
>
>
> +dnl libfuse
> +AC_ARG_WITH([fuse],
> +  AC_HELP_STRING([--with-fuse], [use libfuse to proivde fuse filesystem support for libvirt lxc]),
> +  [],
> +  [with_fuse=check])
> +dnl
> +dnl This check looks for 'fuse'
> +dnl
> +FUSE_CFLAGS=
> +FUSE_LIBS=
> +if test "x$with_fuse" != "xno"; then
> +  PKG_CHECK_MODULES([FUSE], [fuse],

Probably want to figure out your minimum supported version and check
for at least that or newer.

> +    [with_fuse=yes], [
> +    if test "x$with_fuse" = "xcheck" ; then
> +        with_fuse=no
> +    else
> +        AC_MSG_ERROR(
> +          [You must install fuse-devel to compile libvirt])

Very Fedora/RHEL-y message. Probably better to be a bit more abstract.
See other messages in confugure.ac for an example.

> +    fi
> +  ])
> +  if test "x$with_fuse" = "xyes" ; then
> +    FUSE_LIBS="-lfuse"
> +    FUSE_CFLAGS="-D_FILE_OFFSET_BITS=64"
> +    AC_DEFINE_UNQUOTED([HAVE_FUSE], 1, [whether fuse is available for libvirt lxc])
> +  fi
> +fi
> +AM_CONDITIONAL([HAVE_FUSE], [test "x$with_fuse" = "xyes"])
> +AC_SUBST([FUSE_CFLAGS])
> +AC_SUBST([FUSE_LIBS])
> +
>
>  dnl virsh libraries
>  AC_CHECK_HEADERS([readline/readline.h])
> @@ -3103,6 +3133,11 @@ AC_MSG_NOTICE([   capng: $CAPNG_CFLAGS $CAPNG_LIBS])
>  else
>  AC_MSG_NOTICE([   capng: no])
>  fi
> +if test "$with_fuse" = "yes" ; then
> +AC_MSG_NOTICE([   fuse: $FUSE_CFLAGS $FUSE_LIBS])
> +else
> +AC_MSG_NOTICE([   fuse: no])
> +fi
>  if test "$with_xen" = "yes" ; then
>  AC_MSG_NOTICE([     xen: $XEN_CFLAGS $XEN_LIBS])
>  else
> diff --git a/libvirt.spec.in b/libvirt.spec.in
> index 8c4c08d..a63999c 100644
> --- a/libvirt.spec.in
> +++ b/libvirt.spec.in
> @@ -92,6 +92,7 @@
>  # A few optional bits off by default, we enable later
>  %define with_polkit        0%{!?_without_polkit:0}
>  %define with_capng         0%{!?_without_capng:0}
> +%define with_fuse          0%{!?_without_fuse:0}
>  %define with_netcf         0%{!?_without_netcf:0}
>  %define with_udev          0%{!?_without_udev:0}
>  %define with_hal           0%{!?_without_hal:0}
> @@ -490,6 +491,9 @@ BuildRequires: numactl-devel
>  %if %{with_capng}
>  BuildRequires: libcap-ng-devel >= 0.5.0
>  %endif
> +%if %{with_fuse}
> +BuildRequires: fuse-devel
> +%endif
>  %if %{with_phyp}
>  BuildRequires: libssh2-devel
>  %endif
> @@ -1157,6 +1161,10 @@ of recent versions of Linux (and other OSes).
>  %define _without_capng --without-capng
>  %endif
>
> +%if ! %{with_fuse}
> +%define _without_fuse --without-fuse
> +%endif
> +
>  %if ! %{with_netcf}
>  %define _without_netcf --without-netcf
>  %endif
> @@ -1261,6 +1269,7 @@ autoreconf -if
>             %{?_without_numactl} \
>             %{?_without_numad} \
>             %{?_without_capng} \
> +           %{?_without_fuse} \
>             %{?_without_netcf} \
>             %{?_without_selinux} \
>             %{?_with_selinux_mount} \
> --
> 1.7.7.6
>
> --
> libvir-list mailing list
> libvir-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvir-list

Other than the 2 small comments, it looks fine.

-- 
Doug Goldstein

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]