From e3af05db9554662a5a8f3b15ebbe1dc5697643f8 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Tue, 19 Aug 2025 17:32:35 +0300 Subject: AX_WITH_NCURSES: also check for NCURSEN_VERSION If we find libncursesw or libncurses, but without pkg-config and if ncurses does not install its curses.h into the standard search path, we might theoretically pick up another compatible Curses' curses.h. Better guard against this. --- m4/ax_with_ncurses.m4 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'm4') diff --git a/m4/ax_with_ncurses.m4 b/m4/ax_with_ncurses.m4 index cefd21f..d4b9462 100644 --- a/m4/ax_with_ncurses.m4 +++ b/m4/ax_with_ncurses.m4 @@ -186,7 +186,9 @@ AC_DEFUN([AX_WITH_NCURSES], [ @%:@include @%:@ifndef _XOPEN_CURSES @%:@error "this Curses library is not enhanced" - "this Curses library is not enhanced" + @%:@endif + @%:@ifndef NCURSES_VERSION + @%:@error "the curses library is not an ncurses"" @%:@endif ]], [[ chtype a = A_BOLD; @@ -239,7 +241,9 @@ AC_DEFUN([AX_WITH_NCURSES], [ @%:@include @%:@ifndef _XOPEN_CURSES @%:@error "this Curses library is not enhanced" - "this Curses library is not enhanced" + @%:@endif + @%:@ifndef NCURSES_VERSION + @%:@error "the curses library is not an ncurses"" @%:@endif ]], [[ chtype a = A_BOLD; -- cgit v1.2.3