diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-08-19 17:32:35 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-08-19 17:32:35 +0300 |
commit | e3af05db9554662a5a8f3b15ebbe1dc5697643f8 (patch) | |
tree | 79ed50c4c21ef6f2ea02c787cdc5246ffac7f07c | |
parent | 9ec7d0f1e6ee4f7f45b4950d483006ab53786901 (diff) | |
download | sciteco-e3af05db9554662a5a8f3b15ebbe1dc5697643f8.tar.gz |
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.
-rw-r--r-- | m4/ax_with_ncurses.m4 | 8 |
1 files changed, 6 insertions, 2 deletions
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 <curses.h> @%:@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 <curses.h> @%:@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; |