gui: Try to link against libncursesw.
authorAndre Noll <maan@systemlinux.org>
Sun, 3 Jun 2012 21:22:13 +0000 (23:22 +0200)
committerAndre Noll <maan@systemlinux.org>
Sun, 23 Dec 2012 14:03:10 +0000 (15:03 +0100)
This variant of the curses library supports wide characters so we
should link against it if it is available. If it is not, we may still
fall back to libcurses instead.

configure.ac

index 45557f6..e1fa811 100644 (file)
@@ -471,11 +471,16 @@ fi
 AC_CHECK_HEADER(curses.h, [], [
        have_curses="no"
 ])
-AC_CHECK_LIB([curses], [initscr], [], [
-       have_curses="no"
-])
+gui_ldflags="$curses_libs"
+AC_CHECK_LIB([ncursesw], [initscr],
+       [gui_ldflags="$curses_libs -lncursesw"], [
+               AC_CHECK_LIB([curses], [initscr],
+                       [gui_ldflags="$curses_libs -lcurses"],
+                       [have_curses="no"]
+               )
+       ]
+)
 if test "$have_curses" = "yes"; then
-       gui_ldflags="$curses_libs -lcurses"
        AC_SUBST(curses_cppflags)
        extras="$extras gui"
        executables="$executables gui"