Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake-scripts/external-libs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ if (ENABLE_READLINE)
list(APPEND ASY_COMPILE_OPTS ${CURSES_CFLAGS})
list(APPEND ASY_STATIC_LIBRARIES ${CURSES_LIBRARIES})

list(APPEND ASY_MACROS HAVE_NCURSES_CURSES_H HAVE_LIBCURSES)
list(APPEND ASY_MACROS HAVE_NCURSESW_CURSES_H HAVE_LIBCURSES)
else()
message(FATAL_ERROR "curses not found; will compile without curses")
endif()
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ AC_DEFUN([CHECK_LIB_STATIC],[
if test "x$enable_readline" != "xno"; then
if test "x$with_vcpkg" != "xno"; then # vcpkg
ADD_VCPKG_FEATURE(readline)
AC_DEFINE(HAVE_NCURSES_CURSES_H)
AC_DEFINE(HAVE_NCURSESW_CURSES_H)
AC_DEFINE(HAVE_LIBCURSES)
AC_DEFINE(HAVE_LIBREADLINE)
ADD_VCPKG_LIB_FOR_PKGCONFIG(readline)
Expand Down Expand Up @@ -447,7 +447,7 @@ else # managed by the system
CHECK_LIB_STATIC(tinfo,tinfo,tgetent,HAVE_LIBTINFO,AC_MSG_NOTICE([perhaps tgetent is in -lncurses]))

PKG_CONFIG(CPPFLAGS,$CPPFLAGS,--cflags,ncurses)
AC_CHECK_HEADERS([ncurses/curses.h ncurses.h curses.h],[break])
AC_CHECK_HEADERS([ncursesw/curses.h ncurses/curses.h ncurses.h curses.h],[break])
CHECK_LIB_STATIC(ncurses,ncurses,setupterm,HAVE_LIBCURSES,
AC_CHECK_LIB(curses,setupterm))
fi
Expand Down
4 changes: 4 additions & 0 deletions settings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ extern "C" {
#define USE_SETUPTERM
#include <ncurses/curses.h>
#include <ncurses/term.h>
#elif HAVE_NCURSESW_CURSES_H
#define USE_SETUPTERM
#include <ncursesw/curses.h>
#include <ncursesw/term.h>
#elif HAVE_NCURSES_H
#define USE_SETUPTERM
#include <ncurses.h>
Expand Down