|
@@ -505,27 +505,46 @@ else
|
|
|
fi
|
|
fi
|
|
|
fi
|
|
fi
|
|
|
if test "x$curses" != "xyes"; then
|
|
if test "x$curses" != "xyes"; then
|
|
|
-
|
|
|
|
|
- AC_SEARCH_LIBS(addstr, ${preferl}, [
|
|
|
|
|
- curses=yes
|
|
|
|
|
- cursesmsg="FOUND: ${ac_cv_search_addstr}"
|
|
|
|
|
- cursesmsg="${cursesmsg/-l/}"
|
|
|
|
|
- if test "x${ac_cv_search_addstr}" != "xnone required"; then
|
|
|
|
|
- NCURSES_LIBS="${ac_cv_search_addstr}"
|
|
|
|
|
- fi
|
|
|
|
|
- ], [
|
|
|
|
|
- if test "x$curses" = "xyes"; then
|
|
|
|
|
- AC_MSG_ERROR([Could not find curses library - please install libncurses-dev or pdcurses-dev (or configure --without-curses)])
|
|
|
|
|
- else
|
|
|
|
|
- AC_MSG_WARN([Could not find curses library - if you want a TUI, install libncurses-dev or pdcurses-dev])
|
|
|
|
|
- curses=no
|
|
|
|
|
- cursesmsg='NOT FOUND. TUI support DISABLED'
|
|
|
|
|
- fi
|
|
|
|
|
- ])
|
|
|
|
|
-
|
|
|
|
|
|
|
+ for sym in addwstr addstr; do
|
|
|
|
|
+ AC_SEARCH_LIBS(${sym}, ${preferl}, [
|
|
|
|
|
+ curses=yes
|
|
|
|
|
+ eval "curseslib=\"\${ac_cv_search_${sym}}\""
|
|
|
|
|
+ cursesmsg="FOUND: ${curseslib}"
|
|
|
|
|
+ cursesmsg="${cursesmsg/-l/}"
|
|
|
|
|
+ if test "x${curseslib}" != "xnone required"; then
|
|
|
|
|
+ NCURSES_LIBS="${curseslib}"
|
|
|
|
|
+ fi
|
|
|
|
|
+ break
|
|
|
|
|
+ ], [
|
|
|
|
|
+ test "x$sym" != "addstr" && continue
|
|
|
|
|
+
|
|
|
|
|
+ if test "x$curses" = "xyes"; then
|
|
|
|
|
+ AC_MSG_ERROR([Could not find curses library - please install libncurses-dev or pdcurses-dev (or configure --without-curses)])
|
|
|
|
|
+ else
|
|
|
|
|
+ AC_MSG_WARN([Could not find curses library - if you want a TUI, install libncurses-dev or pdcurses-dev])
|
|
|
|
|
+ curses=no
|
|
|
|
|
+ cursesmsg='NOT FOUND. TUI support DISABLED'
|
|
|
|
|
+ fi
|
|
|
|
|
+ ])
|
|
|
|
|
+ done
|
|
|
fi
|
|
fi
|
|
|
if test "x$curses" = "xyes"; then
|
|
if test "x$curses" = "xyes"; then
|
|
|
AC_DEFINE([HAVE_CURSES], [1], [Defined to 1 if curses TUI support is wanted])
|
|
AC_DEFINE([HAVE_CURSES], [1], [Defined to 1 if curses TUI support is wanted])
|
|
|
|
|
+ AC_MSG_CHECKING([whether curses library supports wide characters])
|
|
|
|
|
+ LIBS="$orig_libs $NCURSES_CPPFLAGS $NCURSES_LIBS"
|
|
|
|
|
+ AC_LINK_IFELSE([
|
|
|
|
|
+ AC_LANG_PROGRAM([
|
|
|
|
|
+ #define PDC_WIDE
|
|
|
|
|
+ #include <curses.h>
|
|
|
|
|
+ ],[
|
|
|
|
|
+ addwstr(L"test");
|
|
|
|
|
+ ])
|
|
|
|
|
+ ],[
|
|
|
|
|
+ AC_MSG_RESULT([yes])
|
|
|
|
|
+ AC_DEFINE([USE_UNICODE],[1],[Defined to 1 if curses supports wide characters])
|
|
|
|
|
+ ],[
|
|
|
|
|
+ AC_MSG_RESULT([no])
|
|
|
|
|
+ ])
|
|
|
fi
|
|
fi
|
|
|
LIBS="$orig_libs"
|
|
LIBS="$orig_libs"
|
|
|
fi
|
|
fi
|