[Libguestfs] [PATCH 1/3] configure: handle older version of ncurses
ptoscano at redhat.com
Tue Mar 1 10:34:27 UTC 2016
On Tuesday 01 March 2016 11:17:17 Cédric Bosdonnat wrote:
> ncurses didn't have pkg-config files in not-that-old versions. If those
> couldn't be found, then try the ncurses6-config tool.
> m4/guestfs_libraries.m4 | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
> diff --git a/m4/guestfs_libraries.m4 b/m4/guestfs_libraries.m4
> index c5a4a01..0aadae0 100644
> --- a/m4/guestfs_libraries.m4
> +++ b/m4/guestfs_libraries.m4
> @@ -113,7 +113,11 @@ struct sockaddr_un myaddr;
> dnl tgetent, tputs and UP [sic] are all required. They come from the lower
> dnl tinfo library, but might be part of ncurses directly.
> PKG_CHECK_MODULES([LIBTINFO], [tinfo], , [
> - PKG_CHECK_MODULES([LIBTINFO], [ncurses])
> + PKG_CHECK_MODULES([LIBTINFO], [ncurses], , [
> + AC_CHECK_PROG([NCURSES6_CONFIG], [ncurses6-config], [ncurses6-config], [no])
> + LIBTINFO_CFLAGS=`$NCURSES6_CONFIG --cflags`
> + LIBTINFO_LIBS=`$NCURSES6_CONFIG --libs`
AC_CHECK_PROG won't fail if the program is not found, so instead of
setting the "not found" value to "no" (which will cause the two
invocations to fail because "no" is not found), use AC_MSG_ERROR to
clearly point out about the issue.
Also, I guess you should check both ncurses6-config and
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: This is a digitally signed message part.
More information about the Libguestfs