[libvirt] [PATCH v2 7/7] m4: readline: Add gross kludge for include path
Daniel P. Berrangé
berrange at redhat.com
Fri Apr 12 14:19:35 UTC 2019
On Tue, Apr 09, 2019 at 04:27:50PM +0200, Andrea Bolognani wrote:
> Unfortunately the data reported by pkg-config is not completely
> accurate, so until the issue has been fixed in readline we need
> to work around it in libvirt.
>
> The good news is that we only need the fix to land in FreeBSD
> ports and macOS homebrew before we can drop the kludge, so
> we're talking months rather than years.
>
> Signed-off-by: Andrea Bolognani <abologna at redhat.com>
> ---
> m4/virt-readline.m4 | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)
Reviewed-by: Daniel P. Berrangé <berrange at redhat.com>
>
> diff --git a/m4/virt-readline.m4 b/m4/virt-readline.m4
> index 1bec5deb22..cd12110c4e 100644
> --- a/m4/virt-readline.m4
> +++ b/m4/virt-readline.m4
> @@ -62,6 +62,23 @@ AC_DEFUN([LIBVIRT_CHECK_READLINE],[
> *) READLINE_CFLAGS="-D_FUNCTION_DEF $READLINE_CFLAGS" ;;
> esac
> fi
> +
> + # Gross kludge for readline include path obtained through pkg-config.
> + #
> + # As of 8.0, upstream readline.pc has -I${includedir}/readline among
> + # its Cflags, which is clearly wrong. This does not affect Linux
> + # because ${includedir} is already part of the default include path,
> + # but on other platforms that's not the case and the result is that
> + # <readline/readline.h> can't be located, causing the build to fail.
> + # A patch solving this issue has already been posted upstream, so once
> + # the fix has landed in FreeBSD ports and macOS homebrew we can safely
> + # drop the kludge and rely on pkg-config alone on those platforms.
> + #
> + # [1] http://lists.gnu.org/archive/html/bug-readline/2019-04/msg00007.html
> + case "$READLINE_CFLAGS" in
> + *include/readline*) READLINE_CFLAGS=$(echo $READLINE_CFLAGS | sed s,include/readline,include,g) ;;
> + *) ;;
> + esac
> ])
>
> AC_DEFUN([LIBVIRT_RESULT_READLINE],[
> --
> 2.20.1
>
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
More information about the libvir-list
mailing list