commit 47cf170fbc5b71bde0051302e5fe0069a51083b7
parent aa7c139c604e0d2c4ea18a31fe34caf6abb23ac9
Author: Mike Owens <mike@filespanker.com>
Date: Mon, 1 Aug 2016 04:22:36 -0400
Detect when ncurses is ncursesw
Modern macOS/Darwin doesn't provide a distinct ncursesw, but its ncurses is built with wide
support. We detect when the system ncurses has wide support, and use it.
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/extconf.rb b/extconf.rb
@@ -49,6 +49,9 @@ end
if have_library("ncursesw", "wmove")
curses_lib = "ncursesw"
+elsif have_library("ncurses", "add_wch")
+ curses_lib = "ncurses"
+ curses_is_wide = true
elsif have_library("pdcurses", "wmove")
curses_lib = "pdcurses"
else
@@ -147,7 +150,8 @@ end
puts "checking for the form library..."
if have_header("form.h") or have_header("ncursesw/form.h")
- if not have_library("formw", "new_form")
+ if not have_library("formw", "new_form") ||
+ (curses_is_wide && have_library("form", "new_form"))
raise "formw library not found"
end
else