mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-22 20:36:50 +03:00
patches by Rostislav Beneš: mc-40-ncurses
Extende support of ncurses
This commit is contained in:
parent
b7b74c2f03
commit
8d94909d0f
@ -483,13 +483,20 @@ dnl
|
|||||||
AC_DEFUN([MC_WITH_NCURSES], [
|
AC_DEFUN([MC_WITH_NCURSES], [
|
||||||
dnl has_colors() is specific to ncurses, it's not in the old curses
|
dnl has_colors() is specific to ncurses, it's not in the old curses
|
||||||
save_LIBS="$LIBS"
|
save_LIBS="$LIBS"
|
||||||
|
ncursesw_found=
|
||||||
|
LIBS=
|
||||||
|
AC_SEARCH_LIBS([addwstr], [ncursesw ncurses curses], [MCLIBS="$MCLIBS $LIBS";ncursesw_found=yes],
|
||||||
|
[AC_MSG_WARN([Cannot find ncurses library, that support wide characters])])
|
||||||
|
|
||||||
|
if test -z "$ncursesw_found"; then
|
||||||
LIBS=
|
LIBS=
|
||||||
AC_SEARCH_LIBS([has_colors], [ncurses curses], [MCLIBS="$MCLIBS $LIBS"],
|
AC_SEARCH_LIBS([has_colors], [ncurses curses], [MCLIBS="$MCLIBS $LIBS"],
|
||||||
[AC_MSG_ERROR([Cannot find ncurses library])])
|
[AC_MSG_ERROR([Cannot find ncurses library])])
|
||||||
|
fi
|
||||||
|
|
||||||
dnl Check the header
|
dnl Check the header
|
||||||
ncurses_h_found=
|
ncurses_h_found=
|
||||||
AC_CHECK_HEADERS([ncurses/curses.h ncurses.h curses.h],
|
AC_CHECK_HEADERS([ncursesw/curses.h ncurses/curses.h ncurses.h curses.h],
|
||||||
[ncurses_h_found=yes; break])
|
[ncurses_h_found=yes; break])
|
||||||
|
|
||||||
if test -z "$ncurses_h_found"; then
|
if test -z "$ncurses_h_found"; then
|
||||||
|
@ -15,6 +15,8 @@
|
|||||||
#ifdef USE_NCURSES
|
#ifdef USE_NCURSES
|
||||||
# ifdef HAVE_NCURSES_CURSES_H
|
# ifdef HAVE_NCURSES_CURSES_H
|
||||||
# include <ncurses/curses.h>
|
# include <ncurses/curses.h>
|
||||||
|
# elif HAVE_NCURSESW_CURSES_H
|
||||||
|
# include <ncursesw/curses.h>
|
||||||
# elif HAVE_NCURSES_H
|
# elif HAVE_NCURSES_H
|
||||||
# include <ncurses.h>
|
# include <ncurses.h>
|
||||||
# else
|
# else
|
||||||
|
Loading…
Reference in New Issue
Block a user