build.rs: Try ncurses if curses couldn't be found

That's gonna be the typical one
This commit is contained in:
Fabian Boehm 2024-01-19 20:29:22 +01:00
parent 5aa622daef
commit f0af165348

View File

@ -39,7 +39,11 @@ fn main() {
.map(|s| s.to_owned())
.collect()
};
rsconf::link_libraries(&curses_libnames, LinkType::Default);
if !curses_libnames.is_empty() {
rsconf::link_libraries(&curses_libnames, LinkType::Default);
} else {
rsconf::link_libraries(&["ncurses"], LinkType::Default);
}
cc::Build::new()
.file("src/libc.c")