mirror of https://github.com/tstack/lnav.git
[win build] fix curses autoconf stuff
The curses macro was out-of-date and needed to be updated to the latest and greatest.
This commit is contained in:
parent
ee1e2afd53
commit
e738619a54
|
@ -41,7 +41,8 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
|
|||
depcomp install-sh missing mkinstalldirs
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/ax_sqlite3.m4 \
|
||||
$(top_srcdir)/lnav.m4 $(top_srcdir)/configure.in
|
||||
$(top_srcdir)/ax_with_curses.m4 $(top_srcdir)/lnav.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
|
|
|
@ -982,4 +982,5 @@ AC_SUBST([am__untar])
|
|||
]) # _AM_PROG_TAR
|
||||
|
||||
m4_include([ax_sqlite3.m4])
|
||||
m4_include([ax_with_curses.m4])
|
||||
m4_include([lnav.m4])
|
||||
|
|
|
@ -0,0 +1,518 @@
|
|||
# ===========================================================================
|
||||
# http://www.gnu.org/software/autoconf-archive/ax_with_curses.html
|
||||
# ===========================================================================
|
||||
#
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_WITH_CURSES
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# This macro checks whether a SysV or X/Open-compatible Curses library is
|
||||
# present, along with the associated header file. The NcursesW
|
||||
# (wide-character) library is searched for first, followed by Ncurses,
|
||||
# then the system-default plain Curses. The first library found is the
|
||||
# one returned.
|
||||
#
|
||||
# The following options are understood: --with-ncursesw, --with-ncurses,
|
||||
# --without-ncursesw, --without-ncurses. The "--with" options force the
|
||||
# macro to use that particular library, terminating with an error if not
|
||||
# found. The "--without" options simply skip the check for that library.
|
||||
# The effect on the search pattern is:
|
||||
#
|
||||
# (no options) - NcursesW, Ncurses, Curses
|
||||
# --with-ncurses --with-ncursesw - NcursesW only [*]
|
||||
# --without-ncurses --with-ncursesw - NcursesW only [*]
|
||||
# --with-ncursesw - NcursesW only [*]
|
||||
# --with-ncurses --without-ncursesw - Ncurses only [*]
|
||||
# --with-ncurses - NcursesW, Ncurses [**]
|
||||
# --without-ncurses --without-ncursesw - Curses only
|
||||
# --without-ncursesw - Ncurses, Curses
|
||||
# --without-ncurses - NcursesW, Curses
|
||||
#
|
||||
# [*] If the library is not found, abort the configure script.
|
||||
#
|
||||
# [**] If the second library (Ncurses) is not found, abort configure.
|
||||
#
|
||||
# The following preprocessor symbols may be defined by this macro if the
|
||||
# appropriate conditions are met:
|
||||
#
|
||||
# HAVE_CURSES - if any SysV or X/Open Curses library found
|
||||
# HAVE_CURSES_ENHANCED - if library supports X/Open Enhanced functions
|
||||
# HAVE_CURSES_COLOR - if library supports color (enhanced functions)
|
||||
# HAVE_CURSES_OBSOLETE - if library supports certain obsolete features
|
||||
# HAVE_NCURSESW - if NcursesW (wide char) library is to be used
|
||||
# HAVE_NCURSES - if the Ncurses library is to be used
|
||||
#
|
||||
# HAVE_CURSES_H - if <curses.h> is present and should be used
|
||||
# HAVE_NCURSESW_H - if <ncursesw.h> should be used
|
||||
# HAVE_NCURSES_H - if <ncurses.h> should be used
|
||||
# HAVE_NCURSESW_CURSES_H - if <ncursesw/curses.h> should be used
|
||||
# HAVE_NCURSES_CURSES_H - if <ncurses/curses.h> should be used
|
||||
#
|
||||
# (These preprocessor symbols are discussed later in this document.)
|
||||
#
|
||||
# The following output variable is defined by this macro; it is precious
|
||||
# and may be overridden on the ./configure command line:
|
||||
#
|
||||
# CURSES_LIB - library to add to xxx_LDADD
|
||||
#
|
||||
# The library listed in CURSES_LIB is NOT added to LIBS by default. You
|
||||
# need to add CURSES_LIB to the appropriate xxx_LDADD line in your
|
||||
# Makefile.am. For example:
|
||||
#
|
||||
# prog_LDADD = @CURSES_LIB@
|
||||
#
|
||||
# If CURSES_LIB is set on the configure command line (such as by running
|
||||
# "./configure CURSES_LIB=-lmycurses"), then the only header searched for
|
||||
# is <curses.h>. The user may use the CPPFLAGS precious variable to
|
||||
# override the standard #include search path. If the user needs to
|
||||
# specify an alternative path for a library (such as for a non-standard
|
||||
# NcurseW), the user should use the LDFLAGS variable.
|
||||
#
|
||||
# The following shell variables may be defined by this macro:
|
||||
#
|
||||
# ax_cv_curses - set to "yes" if any Curses library found
|
||||
# ax_cv_curses_enhanced - set to "yes" if Enhanced functions present
|
||||
# ax_cv_curses_color - set to "yes" if color functions present
|
||||
# ax_cv_curses_obsolete - set to "yes" if obsolete features present
|
||||
#
|
||||
# ax_cv_ncursesw - set to "yes" if NcursesW library found
|
||||
# ax_cv_ncurses - set to "yes" if Ncurses library found
|
||||
# ax_cv_plaincurses - set to "yes" if plain Curses library found
|
||||
# ax_cv_curses_which - set to "ncursesw", "ncurses", "plaincurses" or "no"
|
||||
#
|
||||
# These variables can be used in your configure.ac to determine the level
|
||||
# of support you need from the Curses library. For example, if you must
|
||||
# have either Ncurses or NcursesW, you could include:
|
||||
#
|
||||
# AX_WITH_CURSES
|
||||
# if test "x$ax_cv_ncursesw" != xyes && test "x$ax_cv_ncurses" != xyes; then
|
||||
# AX_MSG_ERROR([requires either NcursesW or Ncurses library])
|
||||
# fi
|
||||
#
|
||||
# If any Curses library will do (but one must be present and must support
|
||||
# color), you could use:
|
||||
#
|
||||
# AX_WITH_CURSES
|
||||
# if test "x$ax_cv_curses" != xyes || test "x$ax_cv_curses_color" != xyes; then
|
||||
# AC_MSG_ERROR([requires an X/Open-compatible Curses library with color])
|
||||
# fi
|
||||
#
|
||||
# Certain preprocessor symbols and shell variables defined by this macro
|
||||
# can be used to determine various features of the Curses library. In
|
||||
# particular, HAVE_CURSES and ax_cv_curses are defined if the Curses
|
||||
# library found conforms to the traditional SysV and/or X/Open Base Curses
|
||||
# definition. Any working Curses library conforms to this level.
|
||||
#
|
||||
# HAVE_CURSES_ENHANCED and ax_cv_curses_enhanced are defined if the
|
||||
# library supports the X/Open Enhanced Curses definition. In particular,
|
||||
# the wide-character types attr_t, cchar_t and wint_t, the functions
|
||||
# wattr_set() and wget_wch() and the macros WA_NORMAL and _XOPEN_CURSES
|
||||
# are checked. The Ncurses library does NOT conform to this definition,
|
||||
# although NcursesW does.
|
||||
#
|
||||
# HAVE_CURSES_COLOR and ax_cv_curses_color are defined if the library
|
||||
# supports color functions and macros such as COLOR_PAIR, A_COLOR,
|
||||
# COLOR_WHITE, COLOR_RED and init_pair(). These are NOT part of the
|
||||
# X/Open Base Curses definition, but are part of the Enhanced set of
|
||||
# functions. The Ncurses library DOES support these functions, as does
|
||||
# NcursesW.
|
||||
#
|
||||
# HAVE_CURSES_OBSOLETE and ax_cv_curses_obsolete are defined if the
|
||||
# library supports certain features present in SysV and BSD Curses but not
|
||||
# defined in the X/Open definition. In particular, the functions
|
||||
# getattrs(), getcurx() and getmaxx() are checked.
|
||||
#
|
||||
# To use the HAVE_xxx_H preprocessor symbols, insert the following into
|
||||
# your system.h (or equivalent) header file:
|
||||
#
|
||||
# #if defined HAVE_NCURSESW_CURSES_H
|
||||
# # include <ncursesw/curses.h>
|
||||
# #elif defined HAVE_NCURSESW_H
|
||||
# # include <ncursesw.h>
|
||||
# #elif defined HAVE_NCURSES_CURSES_H
|
||||
# # include <ncurses/curses.h>
|
||||
# #elif defined HAVE_NCURSES_H
|
||||
# # include <ncurses.h>
|
||||
# #elif defined HAVE_CURSES_H
|
||||
# # include <curses.h>
|
||||
# #else
|
||||
# # error "SysV or X/Open-compatible Curses header file required"
|
||||
# #endif
|
||||
#
|
||||
# For previous users of this macro: you should not need to change anything
|
||||
# in your configure.ac or Makefile.am, as the previous (serial 10)
|
||||
# semantics are still valid. However, you should update your system.h (or
|
||||
# equivalent) header file to the fragment shown above. You are encouraged
|
||||
# also to make use of the extended functionality provided by this version
|
||||
# of AX_WITH_CURSES, as well as in the additional macros
|
||||
# AX_WITH_CURSES_PANEL, AX_WITH_CURSES_MENU and AX_WITH_CURSES_FORM.
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# Copyright (c) 2009 Mark Pulford <mark@kyne.com.au>
|
||||
# Copyright (c) 2009 Damian Pietras <daper@daper.net>
|
||||
# Copyright (c) 2012 Reuben Thomas <rrt@sc3d.org>
|
||||
# Copyright (c) 2011 John Zaitseff <J.Zaitseff@zap.org.au>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License, or (at your
|
||||
# option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
||||
# Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along
|
||||
# with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# As a special exception, the respective Autoconf Macro's copyright owner
|
||||
# gives unlimited permission to copy, distribute and modify the configure
|
||||
# scripts that are the output of Autoconf when processing the Macro. You
|
||||
# need not follow the terms of the GNU General Public License when using
|
||||
# or distributing such scripts, even though portions of the text of the
|
||||
# Macro appear in them. The GNU General Public License (GPL) does govern
|
||||
# all other use of the material that constitutes the Autoconf Macro.
|
||||
#
|
||||
# This special exception to the GPL applies to versions of the Autoconf
|
||||
# Macro released by the Autoconf Archive. When you make and distribute a
|
||||
# modified version of the Autoconf Macro, you may extend this special
|
||||
# exception to the GPL to apply to your modified version as well.
|
||||
|
||||
#serial 13
|
||||
|
||||
AU_ALIAS([MP_WITH_CURSES], [AX_WITH_CURSES])
|
||||
AC_DEFUN([AX_WITH_CURSES], [
|
||||
AC_ARG_VAR([CURSES_LIB], [linker library for Curses, e.g. -lcurses])
|
||||
AC_ARG_WITH([ncurses], [AS_HELP_STRING([--with-ncurses],
|
||||
[force the use of Ncurses or NcursesW])],
|
||||
[], [with_ncurses=check])
|
||||
AC_ARG_WITH([ncursesw], [AS_HELP_STRING([--without-ncursesw],
|
||||
[do not use NcursesW (wide character support)])],
|
||||
[], [with_ncursesw=check])
|
||||
|
||||
ax_saved_LIBS=$LIBS
|
||||
AS_IF([test "x$with_ncurses" = xyes || test "x$with_ncursesw" = xyes],
|
||||
[ax_with_plaincurses=no], [ax_with_plaincurses=check])
|
||||
|
||||
ax_cv_curses_which=no
|
||||
|
||||
# Test for NcursesW
|
||||
|
||||
AS_IF([test "x$CURSES_LIB" = x && test "x$with_ncursesw" != xno], [
|
||||
LIBS="$ax_saved_LIBS -lncursesw"
|
||||
|
||||
AC_CACHE_CHECK([for NcursesW wide-character library], [ax_cv_ncursesw], [
|
||||
AC_LINK_IFELSE([AC_LANG_CALL([], [initscr])],
|
||||
[ax_cv_ncursesw=yes], [ax_cv_ncursesw=no])
|
||||
])
|
||||
AS_IF([test "x$ax_cv_ncursesw" = xno && test "x$with_ncursesw" = xyes], [
|
||||
AC_MSG_ERROR([--with-ncursesw specified but could not find NcursesW library])
|
||||
])
|
||||
|
||||
AS_IF([test "x$ax_cv_ncursesw" = xyes], [
|
||||
ax_cv_curses=yes
|
||||
ax_cv_curses_which=ncursesw
|
||||
CURSES_LIB="-lncursesw"
|
||||
AC_DEFINE([HAVE_NCURSESW], [1], [Define to 1 if the NcursesW library is present])
|
||||
AC_DEFINE([HAVE_CURSES], [1], [Define to 1 if a SysV or X/Open compatible Curses library is present])
|
||||
|
||||
AC_CACHE_CHECK([for working ncursesw/curses.h], [ax_cv_header_ncursesw_curses_h], [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
@%:@define _XOPEN_SOURCE_EXTENDED 1
|
||||
@%:@include <ncursesw/curses.h>
|
||||
]], [[
|
||||
chtype a = A_BOLD;
|
||||
int b = KEY_LEFT;
|
||||
chtype c = COLOR_PAIR(1) & A_COLOR;
|
||||
attr_t d = WA_NORMAL;
|
||||
cchar_t e;
|
||||
wint_t f;
|
||||
int g = getattrs(stdscr);
|
||||
int h = getcurx(stdscr) + getmaxx(stdscr);
|
||||
initscr();
|
||||
init_pair(1, COLOR_WHITE, COLOR_RED);
|
||||
wattr_set(stdscr, d, 0, NULL);
|
||||
wget_wch(stdscr, &f);
|
||||
]])],
|
||||
[ax_cv_header_ncursesw_curses_h=yes],
|
||||
[ax_cv_header_ncursesw_curses_h=no])
|
||||
])
|
||||
AS_IF([test "x$ax_cv_header_ncursesw_curses_h" = xyes], [
|
||||
ax_cv_curses_enhanced=yes
|
||||
ax_cv_curses_color=yes
|
||||
ax_cv_curses_obsolete=yes
|
||||
AC_DEFINE([HAVE_CURSES_ENHANCED], [1], [Define to 1 if library supports X/Open Enhanced functions])
|
||||
AC_DEFINE([HAVE_CURSES_COLOR], [1], [Define to 1 if library supports color (enhanced functions)])
|
||||
AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features])
|
||||
AC_DEFINE([HAVE_NCURSESW_CURSES_H], [1], [Define to 1 if <ncursesw/curses.h> is present])
|
||||
])
|
||||
|
||||
AC_CACHE_CHECK([for working ncursesw.h], [ax_cv_header_ncursesw_h], [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
@%:@define _XOPEN_SOURCE_EXTENDED 1
|
||||
@%:@include <ncursesw.h>
|
||||
]], [[
|
||||
chtype a = A_BOLD;
|
||||
int b = KEY_LEFT;
|
||||
chtype c = COLOR_PAIR(1) & A_COLOR;
|
||||
attr_t d = WA_NORMAL;
|
||||
cchar_t e;
|
||||
wint_t f;
|
||||
int g = getattrs(stdscr);
|
||||
int h = getcurx(stdscr) + getmaxx(stdscr);
|
||||
initscr();
|
||||
init_pair(1, COLOR_WHITE, COLOR_RED);
|
||||
wattr_set(stdscr, d, 0, NULL);
|
||||
wget_wch(stdscr, &f);
|
||||
]])],
|
||||
[ax_cv_header_ncursesw_h=yes],
|
||||
[ax_cv_header_ncursesw_h=no])
|
||||
])
|
||||
AS_IF([test "x$ax_cv_header_ncursesw_h" = xyes], [
|
||||
ax_cv_curses_enhanced=yes
|
||||
ax_cv_curses_color=yes
|
||||
ax_cv_curses_obsolete=yes
|
||||
AC_DEFINE([HAVE_CURSES_ENHANCED], [1], [Define to 1 if library supports X/Open Enhanced functions])
|
||||
AC_DEFINE([HAVE_CURSES_COLOR], [1], [Define to 1 if library supports color (enhanced functions)])
|
||||
AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features])
|
||||
AC_DEFINE([HAVE_NCURSESW_H], [1], [Define to 1 if <ncursesw.h> is present])
|
||||
])
|
||||
|
||||
AC_CACHE_CHECK([for working ncurses.h], [ax_cv_header_ncurses_h_with_ncursesw], [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
@%:@define _XOPEN_SOURCE_EXTENDED 1
|
||||
@%:@include <ncurses.h>
|
||||
]], [[
|
||||
chtype a = A_BOLD;
|
||||
int b = KEY_LEFT;
|
||||
chtype c = COLOR_PAIR(1) & A_COLOR;
|
||||
attr_t d = WA_NORMAL;
|
||||
cchar_t e;
|
||||
wint_t f;
|
||||
int g = getattrs(stdscr);
|
||||
int h = getcurx(stdscr) + getmaxx(stdscr);
|
||||
initscr();
|
||||
init_pair(1, COLOR_WHITE, COLOR_RED);
|
||||
wattr_set(stdscr, d, 0, NULL);
|
||||
wget_wch(stdscr, &f);
|
||||
]])],
|
||||
[ax_cv_header_ncurses_h_with_ncursesw=yes],
|
||||
[ax_cv_header_ncurses_h_with_ncursesw=no])
|
||||
])
|
||||
AS_IF([test "x$ax_cv_header_ncurses_h_with_ncursesw" = xyes], [
|
||||
ax_cv_curses_enhanced=yes
|
||||
ax_cv_curses_color=yes
|
||||
ax_cv_curses_obsolete=yes
|
||||
AC_DEFINE([HAVE_CURSES_ENHANCED], [1], [Define to 1 if library supports X/Open Enhanced functions])
|
||||
AC_DEFINE([HAVE_CURSES_COLOR], [1], [Define to 1 if library supports color (enhanced functions)])
|
||||
AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features])
|
||||
AC_DEFINE([HAVE_NCURSES_H], [1], [Define to 1 if <ncurses.h> is present])
|
||||
])
|
||||
|
||||
AS_IF([test "x$ax_cv_header_ncursesw_curses_h" = xno && test "x$ax_cv_header_ncursesw_h" = xno && test "x$ax_cv_header_ncurses_h_with_ncursesw" = xno], [
|
||||
AC_MSG_WARN([could not find a working ncursesw/curses.h, ncursesw.h or ncurses.h])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
# Test for Ncurses
|
||||
|
||||
AS_IF([test "x$CURSES_LIB" = x && test "x$with_ncurses" != xno && test "x$ax_cv_curses_which" = xno], [
|
||||
LIBS="$ax_saved_LIBS -lncurses"
|
||||
|
||||
AC_CACHE_CHECK([for Ncurses library], [ax_cv_ncurses], [
|
||||
AC_LINK_IFELSE([AC_LANG_CALL([], [initscr])],
|
||||
[ax_cv_ncurses=yes], [ax_cv_ncurses=no])
|
||||
])
|
||||
AS_IF([test "x$ax_cv_ncurses" = xno && test "x$with_ncurses" = xyes], [
|
||||
AC_MSG_ERROR([--with-ncurses specified but could not find Ncurses library])
|
||||
])
|
||||
|
||||
AS_IF([test "x$ax_cv_ncurses" = xyes], [
|
||||
ax_cv_curses=yes
|
||||
ax_cv_curses_which=ncurses
|
||||
CURSES_LIB="-lncurses"
|
||||
AC_DEFINE([HAVE_NCURSES], [1], [Define to 1 if the Ncurses library is present])
|
||||
AC_DEFINE([HAVE_CURSES], [1], [Define to 1 if a SysV or X/Open compatible Curses library is present])
|
||||
|
||||
AC_CACHE_CHECK([for working ncurses/curses.h], [ax_cv_header_ncurses_curses_h], [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
@%:@include <ncurses/curses.h>
|
||||
]], [[
|
||||
chtype a = A_BOLD;
|
||||
int b = KEY_LEFT;
|
||||
chtype c = COLOR_PAIR(1) & A_COLOR;
|
||||
int g = getattrs(stdscr);
|
||||
int h = getcurx(stdscr) + getmaxx(stdscr);
|
||||
initscr();
|
||||
init_pair(1, COLOR_WHITE, COLOR_RED);
|
||||
]])],
|
||||
[ax_cv_header_ncurses_curses_h=yes],
|
||||
[ax_cv_header_ncurses_curses_h=no])
|
||||
])
|
||||
AS_IF([test "x$ax_cv_header_ncurses_curses_h" = xyes], [
|
||||
ax_cv_curses_color=yes
|
||||
ax_cv_curses_obsolete=yes
|
||||
AC_DEFINE([HAVE_CURSES_COLOR], [1], [Define to 1 if library supports color (enhanced functions)])
|
||||
AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features])
|
||||
AC_DEFINE([HAVE_NCURSES_CURSES_H], [1], [Define to 1 if <ncurses/curses.h> is present])
|
||||
])
|
||||
|
||||
AC_CACHE_CHECK([for working ncurses.h], [ax_cv_header_ncurses_h], [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
@%:@include <ncurses.h>
|
||||
]], [[
|
||||
chtype a = A_BOLD;
|
||||
int b = KEY_LEFT;
|
||||
chtype c = COLOR_PAIR(1) & A_COLOR;
|
||||
int g = getattrs(stdscr);
|
||||
int h = getcurx(stdscr) + getmaxx(stdscr);
|
||||
initscr();
|
||||
init_pair(1, COLOR_WHITE, COLOR_RED);
|
||||
]])],
|
||||
[ax_cv_header_ncurses_h=yes],
|
||||
[ax_cv_header_ncurses_h=no])
|
||||
])
|
||||
AS_IF([test "x$ax_cv_header_ncurses_h" = xyes], [
|
||||
ax_cv_curses_color=yes
|
||||
ax_cv_curses_obsolete=yes
|
||||
AC_DEFINE([HAVE_CURSES_COLOR], [1], [Define to 1 if library supports color (enhanced functions)])
|
||||
AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features])
|
||||
AC_DEFINE([HAVE_NCURSES_H], [1], [Define to 1 if <ncurses.h> is present])
|
||||
])
|
||||
|
||||
AS_IF([test "x$ax_cv_header_ncurses_curses_h" = xno && test "x$ax_cv_header_ncurses_h" = xno], [
|
||||
AC_MSG_WARN([could not find a working ncurses/curses.h or ncurses.h])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
# Test for plain Curses (or if CURSES_LIB was set by user)
|
||||
|
||||
AS_IF([test "x$with_plaincurses" != xno && test "x$ax_cv_curses_which" = xno], [
|
||||
AS_IF([test "x$CURSES_LIB" != x], [
|
||||
LIBS="$ax_saved_LIBS $CURSES_LIB"
|
||||
], [
|
||||
LIBS="$ax_saved_LIBS -lcurses"
|
||||
])
|
||||
|
||||
AC_CACHE_CHECK([for Curses library], [ax_cv_plaincurses], [
|
||||
AC_LINK_IFELSE([AC_LANG_CALL([], [initscr])],
|
||||
[ax_cv_plaincurses=yes], [ax_cv_plaincurses=no])
|
||||
])
|
||||
|
||||
AS_IF([test "x$ax_cv_plaincurses" = xyes], [
|
||||
ax_cv_curses=yes
|
||||
ax_cv_curses_which=plaincurses
|
||||
AS_IF([test "x$CURSES_LIB" = x], [
|
||||
CURSES_LIB="-lcurses"
|
||||
])
|
||||
AC_DEFINE([HAVE_CURSES], [1], [Define to 1 if a SysV or X/Open compatible Curses library is present])
|
||||
|
||||
# Check for base conformance (and header file)
|
||||
|
||||
AC_CACHE_CHECK([for working curses.h], [ax_cv_header_curses_h], [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
@%:@include <curses.h>
|
||||
]], [[
|
||||
chtype a = A_BOLD;
|
||||
int b = KEY_LEFT;
|
||||
initscr();
|
||||
]])],
|
||||
[ax_cv_header_curses_h=yes],
|
||||
[ax_cv_header_curses_h=no])
|
||||
])
|
||||
AS_IF([test "x$ax_cv_header_curses_h" = xyes], [
|
||||
AC_DEFINE([HAVE_CURSES_H], [1], [Define to 1 if <curses.h> is present])
|
||||
|
||||
# Check for X/Open Enhanced conformance
|
||||
|
||||
AC_CACHE_CHECK([for X/Open Enhanced Curses conformance], [ax_cv_plaincurses_enhanced], [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
@%:@define _XOPEN_SOURCE_EXTENDED 1
|
||||
@%:@include <curses.h>
|
||||
@%:@ifndef _XOPEN_CURSES
|
||||
@%:@error "this Curses library is not enhanced"
|
||||
"this Curses library is not enhanced"
|
||||
@%:@endif
|
||||
]], [[
|
||||
chtype a = A_BOLD;
|
||||
int b = KEY_LEFT;
|
||||
chtype c = COLOR_PAIR(1) & A_COLOR;
|
||||
attr_t d = WA_NORMAL;
|
||||
cchar_t e;
|
||||
wint_t f;
|
||||
initscr();
|
||||
init_pair(1, COLOR_WHITE, COLOR_RED);
|
||||
wattr_set(stdscr, d, 0, NULL);
|
||||
wget_wch(stdscr, &f);
|
||||
]])],
|
||||
[ax_cv_plaincurses_enhanced=yes],
|
||||
[ax_cv_plaincurses_enhanced=no])
|
||||
])
|
||||
AS_IF([test "x$ax_cv_plaincurses_enhanced" = xyes], [
|
||||
ax_cv_curses_enhanced=yes
|
||||
ax_cv_curses_color=yes
|
||||
AC_DEFINE([HAVE_CURSES_ENHANCED], [1], [Define to 1 if library supports X/Open Enhanced functions])
|
||||
AC_DEFINE([HAVE_CURSES_COLOR], [1], [Define to 1 if library supports color (enhanced functions)])
|
||||
])
|
||||
|
||||
# Check for color functions
|
||||
|
||||
AC_CACHE_CHECK([for Curses color functions], [ax_cv_plaincurses_color], [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
@%:@define _XOPEN_SOURCE_EXTENDED 1
|
||||
@%:@include <curses.h>
|
||||
]], [[
|
||||
chtype a = A_BOLD;
|
||||
int b = KEY_LEFT;
|
||||
chtype c = COLOR_PAIR(1) & A_COLOR;
|
||||
initscr();
|
||||
init_pair(1, COLOR_WHITE, COLOR_RED);
|
||||
]])],
|
||||
[ax_cv_plaincurses_color=yes],
|
||||
[ax_cv_plaincurses_color=no])
|
||||
])
|
||||
AS_IF([test "x$ax_cv_plaincurses_color" = xyes], [
|
||||
ax_cv_curses_color=yes
|
||||
AC_DEFINE([HAVE_CURSES_COLOR], [1], [Define to 1 if library supports color (enhanced functions)])
|
||||
])
|
||||
|
||||
# Check for obsolete functions
|
||||
|
||||
AC_CACHE_CHECK([for obsolete Curses functions], [ax_cv_plaincurses_obsolete], [
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
|
||||
@%:@include <curses.h>
|
||||
]], [[
|
||||
chtype a = A_BOLD;
|
||||
int b = KEY_LEFT;
|
||||
int g = getattrs(stdscr);
|
||||
int h = getcurx(stdscr) + getmaxx(stdscr);
|
||||
initscr();
|
||||
]])],
|
||||
[ax_cv_plaincurses_obsolete=yes],
|
||||
[ax_cv_plaincurses_obsolete=no])
|
||||
])
|
||||
AS_IF([test "x$ax_cv_plaincurses_obsolete" = xyes], [
|
||||
ax_cv_curses_obsolete=yes
|
||||
AC_DEFINE([HAVE_CURSES_OBSOLETE], [1], [Define to 1 if library supports certain obsolete features])
|
||||
])
|
||||
])
|
||||
|
||||
AS_IF([test "x$ax_cv_header_curses_h" = xno], [
|
||||
AC_MSG_WARN([could not find a working curses.h])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
AS_IF([test "x$ax_cv_curses" != xyes], [ax_cv_curses=no])
|
||||
AS_IF([test "x$ax_cv_curses_enhanced" != xyes], [ax_cv_curses_enhanced=no])
|
||||
AS_IF([test "x$ax_cv_curses_color" != xyes], [ax_cv_curses_color=no])
|
||||
AS_IF([test "x$ax_cv_curses_obsolete" != xyes], [ax_cv_curses_obsolete=no])
|
||||
|
||||
LIBS=$ax_saved_LIBS
|
||||
])dnl
|
|
@ -723,6 +723,7 @@ enable_dependency_tracking
|
|||
enable_static
|
||||
enable_profiling
|
||||
with_ncurses
|
||||
with_ncursesw
|
||||
with_pcre
|
||||
with_readline
|
||||
with_sqlite3
|
||||
|
@ -738,7 +739,8 @@ CPPFLAGS
|
|||
CCC
|
||||
CC
|
||||
CFLAGS
|
||||
CPP'
|
||||
CPP
|
||||
CURSES_LIB'
|
||||
|
||||
|
||||
# Initialize some variables set by options.
|
||||
|
@ -1367,7 +1369,8 @@ Optional Features:
|
|||
Optional Packages:
|
||||
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
|
||||
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
|
||||
--with-ncurses Force the use of ncurses over curses
|
||||
--with-ncurses force the use of Ncurses or NcursesW
|
||||
--without-ncursesw do not use NcursesW (wide character support)
|
||||
--with-pcre[=prefix]
|
||||
--with-readline[=prefix] compile xmlreadline part (via libreadline check)
|
||||
--with-sqlite3=[ARG] use SQLite 3 library [default=yes], optionally
|
||||
|
@ -1384,6 +1387,7 @@ Some influential environment variables:
|
|||
CC C compiler command
|
||||
CFLAGS C compiler flags
|
||||
CPP C preprocessor
|
||||
CURSES_LIB linker library for Curses, e.g. -lcurses
|
||||
|
||||
Use these variables to override the choices made by `configure' or to help
|
||||
it to find libraries and programs with nonstandard names/locations.
|
||||
|
@ -5186,90 +5190,762 @@ done
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
# Check whether --with-ncurses was given.
|
||||
if test "${with_ncurses+set}" = set; then :
|
||||
withval=$with_ncurses;
|
||||
else
|
||||
with_ncurses=check
|
||||
fi
|
||||
|
||||
mp_save_LIBS="$LIBS"
|
||||
CURSES_LIB=""
|
||||
if test "$with_ncurses" != yes
|
||||
then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working curses" >&5
|
||||
$as_echo_n "checking for working curses... " >&6; }
|
||||
if ${mp_cv_curses+:} false; then :
|
||||
|
||||
# Check whether --with-ncursesw was given.
|
||||
if test "${with_ncursesw+set}" = set; then :
|
||||
withval=$with_ncursesw;
|
||||
else
|
||||
with_ncursesw=check
|
||||
fi
|
||||
|
||||
|
||||
ax_saved_LIBS=$LIBS
|
||||
if test "x$with_ncurses" = xyes || test "x$with_ncursesw" = xyes; then :
|
||||
ax_with_plaincurses=no
|
||||
else
|
||||
ax_with_plaincurses=check
|
||||
fi
|
||||
|
||||
ax_cv_curses_which=no
|
||||
|
||||
# Test for NcursesW
|
||||
|
||||
if test "x$CURSES_LIB" = x && test "x$with_ncursesw" != xno; then :
|
||||
|
||||
LIBS="$ax_saved_LIBS -lncursesw"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for NcursesW wide-character library" >&5
|
||||
$as_echo_n "checking for NcursesW wide-character library... " >&6; }
|
||||
if ${ax_cv_ncursesw+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
LIBS="$LIBS -lcurses"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <curses.h>
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char initscr ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr();
|
||||
return initscr ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
mp_cv_curses=yes
|
||||
ax_cv_ncursesw=yes
|
||||
else
|
||||
mp_cv_curses=no
|
||||
ax_cv_ncursesw=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $mp_cv_curses" >&5
|
||||
$as_echo "$mp_cv_curses" >&6; }
|
||||
if test "$mp_cv_curses" = yes
|
||||
then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_ncursesw" >&5
|
||||
$as_echo "$ax_cv_ncursesw" >&6; }
|
||||
if test "x$ax_cv_ncursesw" = xno && test "x$with_ncursesw" = xyes; then :
|
||||
|
||||
$as_echo "#define HAVE_CURSES_H /**/" >>confdefs.h
|
||||
as_fn_error $? "--with-ncursesw specified but could not find NcursesW library" "$LINENO" 5
|
||||
|
||||
CURSES_LIB="-lcurses"
|
||||
fi
|
||||
fi
|
||||
if test ! "$CURSES_LIB"
|
||||
then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working ncurses" >&5
|
||||
$as_echo_n "checking for working ncurses... " >&6; }
|
||||
if ${mp_cv_ncurses+:} false; then :
|
||||
fi
|
||||
|
||||
if test "x$ax_cv_ncursesw" = xyes; then :
|
||||
|
||||
ax_cv_curses=yes
|
||||
ax_cv_curses_which=ncursesw
|
||||
CURSES_LIB="-lncursesw"
|
||||
|
||||
$as_echo "#define HAVE_NCURSESW 1" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define HAVE_CURSES 1" >>confdefs.h
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working ncursesw/curses.h" >&5
|
||||
$as_echo_n "checking for working ncursesw/curses.h... " >&6; }
|
||||
if ${ax_cv_header_ncursesw_curses_h+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
LIBS="$mp_save_LIBS -lncurses"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <ncurses.h>
|
||||
|
||||
#define _XOPEN_SOURCE_EXTENDED 1
|
||||
#include <ncursesw/curses.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr();
|
||||
|
||||
chtype a = A_BOLD;
|
||||
int b = KEY_LEFT;
|
||||
chtype c = COLOR_PAIR(1) & A_COLOR;
|
||||
attr_t d = WA_NORMAL;
|
||||
cchar_t e;
|
||||
wint_t f;
|
||||
int g = getattrs(stdscr);
|
||||
int h = getcurx(stdscr) + getmaxx(stdscr);
|
||||
initscr();
|
||||
init_pair(1, COLOR_WHITE, COLOR_RED);
|
||||
wattr_set(stdscr, d, 0, NULL);
|
||||
wget_wch(stdscr, &f);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
mp_cv_ncurses=yes
|
||||
ax_cv_header_ncursesw_curses_h=yes
|
||||
else
|
||||
mp_cv_ncurses=no
|
||||
ax_cv_header_ncursesw_curses_h=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $mp_cv_ncurses" >&5
|
||||
$as_echo "$mp_cv_ncurses" >&6; }
|
||||
if test "$mp_cv_ncurses" = yes
|
||||
then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_ncursesw_curses_h" >&5
|
||||
$as_echo "$ax_cv_header_ncursesw_curses_h" >&6; }
|
||||
if test "x$ax_cv_header_ncursesw_curses_h" = xyes; then :
|
||||
|
||||
$as_echo "#define HAVE_NCURSES_H /**/" >>confdefs.h
|
||||
ax_cv_curses_enhanced=yes
|
||||
ax_cv_curses_color=yes
|
||||
ax_cv_curses_obsolete=yes
|
||||
|
||||
CURSES_LIB="-lncurses"
|
||||
fi
|
||||
fi
|
||||
LIBS="$mp_save_LIBS"
|
||||
$as_echo "#define HAVE_CURSES_ENHANCED 1" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define HAVE_CURSES_COLOR 1" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define HAVE_CURSES_OBSOLETE 1" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define HAVE_NCURSESW_CURSES_H 1" >>confdefs.h
|
||||
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working ncursesw.h" >&5
|
||||
$as_echo_n "checking for working ncursesw.h... " >&6; }
|
||||
if ${ax_cv_header_ncursesw_h+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#define _XOPEN_SOURCE_EXTENDED 1
|
||||
#include <ncursesw.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
chtype a = A_BOLD;
|
||||
int b = KEY_LEFT;
|
||||
chtype c = COLOR_PAIR(1) & A_COLOR;
|
||||
attr_t d = WA_NORMAL;
|
||||
cchar_t e;
|
||||
wint_t f;
|
||||
int g = getattrs(stdscr);
|
||||
int h = getcurx(stdscr) + getmaxx(stdscr);
|
||||
initscr();
|
||||
init_pair(1, COLOR_WHITE, COLOR_RED);
|
||||
wattr_set(stdscr, d, 0, NULL);
|
||||
wget_wch(stdscr, &f);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ax_cv_header_ncursesw_h=yes
|
||||
else
|
||||
ax_cv_header_ncursesw_h=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_ncursesw_h" >&5
|
||||
$as_echo "$ax_cv_header_ncursesw_h" >&6; }
|
||||
if test "x$ax_cv_header_ncursesw_h" = xyes; then :
|
||||
|
||||
ax_cv_curses_enhanced=yes
|
||||
ax_cv_curses_color=yes
|
||||
ax_cv_curses_obsolete=yes
|
||||
|
||||
$as_echo "#define HAVE_CURSES_ENHANCED 1" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define HAVE_CURSES_COLOR 1" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define HAVE_CURSES_OBSOLETE 1" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define HAVE_NCURSESW_H 1" >>confdefs.h
|
||||
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working ncurses.h" >&5
|
||||
$as_echo_n "checking for working ncurses.h... " >&6; }
|
||||
if ${ax_cv_header_ncurses_h_with_ncursesw+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#define _XOPEN_SOURCE_EXTENDED 1
|
||||
#include <ncurses.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
chtype a = A_BOLD;
|
||||
int b = KEY_LEFT;
|
||||
chtype c = COLOR_PAIR(1) & A_COLOR;
|
||||
attr_t d = WA_NORMAL;
|
||||
cchar_t e;
|
||||
wint_t f;
|
||||
int g = getattrs(stdscr);
|
||||
int h = getcurx(stdscr) + getmaxx(stdscr);
|
||||
initscr();
|
||||
init_pair(1, COLOR_WHITE, COLOR_RED);
|
||||
wattr_set(stdscr, d, 0, NULL);
|
||||
wget_wch(stdscr, &f);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ax_cv_header_ncurses_h_with_ncursesw=yes
|
||||
else
|
||||
ax_cv_header_ncurses_h_with_ncursesw=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_ncurses_h_with_ncursesw" >&5
|
||||
$as_echo "$ax_cv_header_ncurses_h_with_ncursesw" >&6; }
|
||||
if test "x$ax_cv_header_ncurses_h_with_ncursesw" = xyes; then :
|
||||
|
||||
ax_cv_curses_enhanced=yes
|
||||
ax_cv_curses_color=yes
|
||||
ax_cv_curses_obsolete=yes
|
||||
|
||||
$as_echo "#define HAVE_CURSES_ENHANCED 1" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define HAVE_CURSES_COLOR 1" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define HAVE_CURSES_OBSOLETE 1" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define HAVE_NCURSES_H 1" >>confdefs.h
|
||||
|
||||
|
||||
fi
|
||||
|
||||
if test "x$ax_cv_header_ncursesw_curses_h" = xno && test "x$ax_cv_header_ncursesw_h" = xno && test "x$ax_cv_header_ncurses_h_with_ncursesw" = xno; then :
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find a working ncursesw/curses.h, ncursesw.h or ncurses.h" >&5
|
||||
$as_echo "$as_me: WARNING: could not find a working ncursesw/curses.h, ncursesw.h or ncurses.h" >&2;}
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# Test for Ncurses
|
||||
|
||||
if test "x$CURSES_LIB" = x && test "x$with_ncurses" != xno && test "x$ax_cv_curses_which" = xno; then :
|
||||
|
||||
LIBS="$ax_saved_LIBS -lncurses"
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Ncurses library" >&5
|
||||
$as_echo_n "checking for Ncurses library... " >&6; }
|
||||
if ${ax_cv_ncurses+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char initscr ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return initscr ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ax_cv_ncurses=yes
|
||||
else
|
||||
ax_cv_ncurses=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_ncurses" >&5
|
||||
$as_echo "$ax_cv_ncurses" >&6; }
|
||||
if test "x$ax_cv_ncurses" = xno && test "x$with_ncurses" = xyes; then :
|
||||
|
||||
as_fn_error $? "--with-ncurses specified but could not find Ncurses library" "$LINENO" 5
|
||||
|
||||
fi
|
||||
|
||||
if test "x$ax_cv_ncurses" = xyes; then :
|
||||
|
||||
ax_cv_curses=yes
|
||||
ax_cv_curses_which=ncurses
|
||||
CURSES_LIB="-lncurses"
|
||||
|
||||
$as_echo "#define HAVE_NCURSES 1" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define HAVE_CURSES 1" >>confdefs.h
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working ncurses/curses.h" >&5
|
||||
$as_echo_n "checking for working ncurses/curses.h... " >&6; }
|
||||
if ${ax_cv_header_ncurses_curses_h+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <ncurses/curses.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
chtype a = A_BOLD;
|
||||
int b = KEY_LEFT;
|
||||
chtype c = COLOR_PAIR(1) & A_COLOR;
|
||||
int g = getattrs(stdscr);
|
||||
int h = getcurx(stdscr) + getmaxx(stdscr);
|
||||
initscr();
|
||||
init_pair(1, COLOR_WHITE, COLOR_RED);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ax_cv_header_ncurses_curses_h=yes
|
||||
else
|
||||
ax_cv_header_ncurses_curses_h=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_ncurses_curses_h" >&5
|
||||
$as_echo "$ax_cv_header_ncurses_curses_h" >&6; }
|
||||
if test "x$ax_cv_header_ncurses_curses_h" = xyes; then :
|
||||
|
||||
ax_cv_curses_color=yes
|
||||
ax_cv_curses_obsolete=yes
|
||||
|
||||
$as_echo "#define HAVE_CURSES_COLOR 1" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define HAVE_CURSES_OBSOLETE 1" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define HAVE_NCURSES_CURSES_H 1" >>confdefs.h
|
||||
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working ncurses.h" >&5
|
||||
$as_echo_n "checking for working ncurses.h... " >&6; }
|
||||
if ${ax_cv_header_ncurses_h+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <ncurses.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
chtype a = A_BOLD;
|
||||
int b = KEY_LEFT;
|
||||
chtype c = COLOR_PAIR(1) & A_COLOR;
|
||||
int g = getattrs(stdscr);
|
||||
int h = getcurx(stdscr) + getmaxx(stdscr);
|
||||
initscr();
|
||||
init_pair(1, COLOR_WHITE, COLOR_RED);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ax_cv_header_ncurses_h=yes
|
||||
else
|
||||
ax_cv_header_ncurses_h=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_ncurses_h" >&5
|
||||
$as_echo "$ax_cv_header_ncurses_h" >&6; }
|
||||
if test "x$ax_cv_header_ncurses_h" = xyes; then :
|
||||
|
||||
ax_cv_curses_color=yes
|
||||
ax_cv_curses_obsolete=yes
|
||||
|
||||
$as_echo "#define HAVE_CURSES_COLOR 1" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define HAVE_CURSES_OBSOLETE 1" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define HAVE_NCURSES_H 1" >>confdefs.h
|
||||
|
||||
|
||||
fi
|
||||
|
||||
if test "x$ax_cv_header_ncurses_curses_h" = xno && test "x$ax_cv_header_ncurses_h" = xno; then :
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find a working ncurses/curses.h or ncurses.h" >&5
|
||||
$as_echo "$as_me: WARNING: could not find a working ncurses/curses.h or ncurses.h" >&2;}
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
# Test for plain Curses (or if CURSES_LIB was set by user)
|
||||
|
||||
if test "x$with_plaincurses" != xno && test "x$ax_cv_curses_which" = xno; then :
|
||||
|
||||
if test "x$CURSES_LIB" != x; then :
|
||||
|
||||
LIBS="$ax_saved_LIBS $CURSES_LIB"
|
||||
|
||||
else
|
||||
|
||||
LIBS="$ax_saved_LIBS -lcurses"
|
||||
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Curses library" >&5
|
||||
$as_echo_n "checking for Curses library... " >&6; }
|
||||
if ${ax_cv_plaincurses+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
/* Override any GCC internal prototype to avoid an error.
|
||||
Use char because int might match the return type of a GCC
|
||||
builtin and then its argument prototype would still apply. */
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
char initscr ();
|
||||
int
|
||||
main ()
|
||||
{
|
||||
return initscr ();
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ax_cv_plaincurses=yes
|
||||
else
|
||||
ax_cv_plaincurses=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_plaincurses" >&5
|
||||
$as_echo "$ax_cv_plaincurses" >&6; }
|
||||
|
||||
if test "x$ax_cv_plaincurses" = xyes; then :
|
||||
|
||||
ax_cv_curses=yes
|
||||
ax_cv_curses_which=plaincurses
|
||||
if test "x$CURSES_LIB" = x; then :
|
||||
|
||||
CURSES_LIB="-lcurses"
|
||||
|
||||
fi
|
||||
|
||||
$as_echo "#define HAVE_CURSES 1" >>confdefs.h
|
||||
|
||||
|
||||
# Check for base conformance (and header file)
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working curses.h" >&5
|
||||
$as_echo_n "checking for working curses.h... " >&6; }
|
||||
if ${ax_cv_header_curses_h+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <curses.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
chtype a = A_BOLD;
|
||||
int b = KEY_LEFT;
|
||||
initscr();
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ax_cv_header_curses_h=yes
|
||||
else
|
||||
ax_cv_header_curses_h=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_header_curses_h" >&5
|
||||
$as_echo "$ax_cv_header_curses_h" >&6; }
|
||||
if test "x$ax_cv_header_curses_h" = xyes; then :
|
||||
|
||||
|
||||
$as_echo "#define HAVE_CURSES_H 1" >>confdefs.h
|
||||
|
||||
|
||||
# Check for X/Open Enhanced conformance
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for X/Open Enhanced Curses conformance" >&5
|
||||
$as_echo_n "checking for X/Open Enhanced Curses conformance... " >&6; }
|
||||
if ${ax_cv_plaincurses_enhanced+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#define _XOPEN_SOURCE_EXTENDED 1
|
||||
#include <curses.h>
|
||||
#ifndef _XOPEN_CURSES
|
||||
#error "this Curses library is not enhanced"
|
||||
"this Curses library is not enhanced"
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
chtype a = A_BOLD;
|
||||
int b = KEY_LEFT;
|
||||
chtype c = COLOR_PAIR(1) & A_COLOR;
|
||||
attr_t d = WA_NORMAL;
|
||||
cchar_t e;
|
||||
wint_t f;
|
||||
initscr();
|
||||
init_pair(1, COLOR_WHITE, COLOR_RED);
|
||||
wattr_set(stdscr, d, 0, NULL);
|
||||
wget_wch(stdscr, &f);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ax_cv_plaincurses_enhanced=yes
|
||||
else
|
||||
ax_cv_plaincurses_enhanced=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_plaincurses_enhanced" >&5
|
||||
$as_echo "$ax_cv_plaincurses_enhanced" >&6; }
|
||||
if test "x$ax_cv_plaincurses_enhanced" = xyes; then :
|
||||
|
||||
ax_cv_curses_enhanced=yes
|
||||
ax_cv_curses_color=yes
|
||||
|
||||
$as_echo "#define HAVE_CURSES_ENHANCED 1" >>confdefs.h
|
||||
|
||||
|
||||
$as_echo "#define HAVE_CURSES_COLOR 1" >>confdefs.h
|
||||
|
||||
|
||||
fi
|
||||
|
||||
# Check for color functions
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Curses color functions" >&5
|
||||
$as_echo_n "checking for Curses color functions... " >&6; }
|
||||
if ${ax_cv_plaincurses_color+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#define _XOPEN_SOURCE_EXTENDED 1
|
||||
#include <curses.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
chtype a = A_BOLD;
|
||||
int b = KEY_LEFT;
|
||||
chtype c = COLOR_PAIR(1) & A_COLOR;
|
||||
initscr();
|
||||
init_pair(1, COLOR_WHITE, COLOR_RED);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ax_cv_plaincurses_color=yes
|
||||
else
|
||||
ax_cv_plaincurses_color=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_plaincurses_color" >&5
|
||||
$as_echo "$ax_cv_plaincurses_color" >&6; }
|
||||
if test "x$ax_cv_plaincurses_color" = xyes; then :
|
||||
|
||||
ax_cv_curses_color=yes
|
||||
|
||||
$as_echo "#define HAVE_CURSES_COLOR 1" >>confdefs.h
|
||||
|
||||
|
||||
fi
|
||||
|
||||
# Check for obsolete functions
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for obsolete Curses functions" >&5
|
||||
$as_echo_n "checking for obsolete Curses functions... " >&6; }
|
||||
if ${ax_cv_plaincurses_obsolete+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
#include <curses.h>
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
|
||||
chtype a = A_BOLD;
|
||||
int b = KEY_LEFT;
|
||||
int g = getattrs(stdscr);
|
||||
int h = getcurx(stdscr) + getmaxx(stdscr);
|
||||
initscr();
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
ax_cv_plaincurses_obsolete=yes
|
||||
else
|
||||
ax_cv_plaincurses_obsolete=no
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_plaincurses_obsolete" >&5
|
||||
$as_echo "$ax_cv_plaincurses_obsolete" >&6; }
|
||||
if test "x$ax_cv_plaincurses_obsolete" = xyes; then :
|
||||
|
||||
ax_cv_curses_obsolete=yes
|
||||
|
||||
$as_echo "#define HAVE_CURSES_OBSOLETE 1" >>confdefs.h
|
||||
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if test "x$ax_cv_header_curses_h" = xno; then :
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find a working curses.h" >&5
|
||||
$as_echo "$as_me: WARNING: could not find a working curses.h" >&2;}
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if test "x$ax_cv_curses" != xyes; then :
|
||||
ax_cv_curses=no
|
||||
fi
|
||||
if test "x$ax_cv_curses_enhanced" != xyes; then :
|
||||
ax_cv_curses_enhanced=no
|
||||
fi
|
||||
if test "x$ax_cv_curses_color" != xyes; then :
|
||||
ax_cv_curses_color=no
|
||||
fi
|
||||
if test "x$ax_cv_curses_obsolete" != xyes; then :
|
||||
ax_cv_curses_obsolete=no
|
||||
fi
|
||||
|
||||
LIBS=$ax_saved_LIBS
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lib pcre" >&5
|
||||
$as_echo_n "checking lib pcre... " >&6; }
|
||||
|
||||
|
@ -5448,7 +6124,7 @@ if ${ac_cv_lib_readline_readline+:} false; then :
|
|||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
ac_check_lib_save_LIBS=$LIBS
|
||||
LIBS="-lreadline -ltermcap $LIBS"
|
||||
LIBS="-lreadline $LIBS"
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ AC_SEARCH_LIBS(BZ2_bzopen, bz2)
|
|||
AC_SEARCH_LIBS(dlopen, dl)
|
||||
AC_CHECK_HEADERS(pty.h util.h zlib.h bzlib.h libutil.h)
|
||||
|
||||
MP_WITH_CURSES()
|
||||
AX_WITH_CURSES
|
||||
AX_PATH_LIB_PCRE([], [AC_MSG_ERROR([pcre required to build])])
|
||||
AX_PATH_LIB_READLINE([], [AC_MSG_ERROR([readline required to build])])
|
||||
|
||||
|
|
39
lnav.m4
39
lnav.m4
|
@ -51,7 +51,7 @@ if test ".$with_readline" = ".no" ; then
|
|||
else
|
||||
if test ".$with_readline" = ".yes"; then
|
||||
OLD_LIBS="$LIBS"
|
||||
AC_CHECK_LIB(readline, readline, [], [], [-ltermcap])
|
||||
AC_CHECK_LIB(readline, readline, [], [], [])
|
||||
LIBS="$OLD_LIBS"
|
||||
if test "$ac_cv_lib_readline_readline" = "yes"; then
|
||||
READLINE_LIBS="-lreadline"
|
||||
|
@ -78,40 +78,3 @@ fi
|
|||
AC_SUBST([READLINE_LIBS])
|
||||
AC_SUBST([READLINE_CFLAGS])
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([MP_WITH_CURSES],
|
||||
[AC_ARG_WITH(ncurses, [ --with-ncurses Force the use of ncurses over curses],,)
|
||||
mp_save_LIBS="$LIBS"
|
||||
CURSES_LIB=""
|
||||
if test "$with_ncurses" != yes
|
||||
then
|
||||
AC_CACHE_CHECK([for working curses], mp_cv_curses,
|
||||
[LIBS="$LIBS -lcurses"
|
||||
AC_TRY_LINK(
|
||||
[#include <curses.h>],
|
||||
[chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ],
|
||||
mp_cv_curses=yes, mp_cv_curses=no)])
|
||||
if test "$mp_cv_curses" = yes
|
||||
then
|
||||
AC_DEFINE(HAVE_CURSES_H, [], [curses library])
|
||||
CURSES_LIB="-lcurses"
|
||||
fi
|
||||
fi
|
||||
if test ! "$CURSES_LIB"
|
||||
then
|
||||
AC_CACHE_CHECK([for working ncurses], mp_cv_ncurses,
|
||||
[LIBS="$mp_save_LIBS -lncurses"
|
||||
AC_TRY_LINK(
|
||||
[#include <ncurses.h>],
|
||||
[chtype a; int b=A_STANDOUT, c=KEY_LEFT; initscr(); ],
|
||||
mp_cv_ncurses=yes, mp_cv_ncurses=no)])
|
||||
if test "$mp_cv_ncurses" = yes
|
||||
then
|
||||
AC_DEFINE(HAVE_NCURSES_H, [], [curses library])
|
||||
CURSES_LIB="-lncurses"
|
||||
fi
|
||||
fi
|
||||
LIBS="$mp_save_LIBS"
|
||||
AC_SUBST(CURSES_LIB)
|
||||
])dnl
|
||||
|
|
|
@ -42,7 +42,8 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
|
|||
$(srcdir)/Makefile.in $(srcdir)/config.h.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/ax_sqlite3.m4 \
|
||||
$(top_srcdir)/lnav.m4 $(top_srcdir)/configure.in
|
||||
$(top_srcdir)/ax_with_curses.m4 $(top_srcdir)/lnav.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
* @file bookmarks.cc
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "bookmarks.hh"
|
||||
|
||||
template<typename LineType>
|
||||
|
|
|
@ -3,9 +3,21 @@
|
|||
/* Define to 1 if you have the <bzlib.h> header file. */
|
||||
#undef HAVE_BZLIB_H
|
||||
|
||||
/* curses library */
|
||||
/* Define to 1 if a SysV or X/Open compatible Curses library is present */
|
||||
#undef HAVE_CURSES
|
||||
|
||||
/* Define to 1 if library supports color (enhanced functions) */
|
||||
#undef HAVE_CURSES_COLOR
|
||||
|
||||
/* Define to 1 if library supports X/Open Enhanced functions */
|
||||
#undef HAVE_CURSES_ENHANCED
|
||||
|
||||
/* Define to 1 if <curses.h> is present */
|
||||
#undef HAVE_CURSES_H
|
||||
|
||||
/* Define to 1 if library supports certain obsolete features */
|
||||
#undef HAVE_CURSES_OBSOLETE
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#undef HAVE_INTTYPES_H
|
||||
|
||||
|
@ -21,7 +33,22 @@
|
|||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
/* curses library */
|
||||
/* Define to 1 if the Ncurses library is present */
|
||||
#undef HAVE_NCURSES
|
||||
|
||||
/* Define to 1 if the NcursesW library is present */
|
||||
#undef HAVE_NCURSESW
|
||||
|
||||
/* Define to 1 if <ncursesw/curses.h> is present */
|
||||
#undef HAVE_NCURSESW_CURSES_H
|
||||
|
||||
/* Define to 1 if <ncursesw.h> is present */
|
||||
#undef HAVE_NCURSESW_H
|
||||
|
||||
/* Define to 1 if <ncurses/curses.h> is present */
|
||||
#undef HAVE_NCURSES_CURSES_H
|
||||
|
||||
/* Define to 1 if <ncurses.h> is present */
|
||||
#undef HAVE_NCURSES_H
|
||||
|
||||
/* Define to 1 if you have the <pcre.h> header file. */
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
* @file listview_curses.cc
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "listview_curses.hh"
|
||||
|
||||
using namespace std;
|
||||
|
|
|
@ -9,7 +9,19 @@
|
|||
#include <stdint.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <ncurses.h>
|
||||
#if defined HAVE_NCURSESW_CURSES_H
|
||||
# include <ncursesw/curses.h>
|
||||
#elif defined HAVE_NCURSESW_H
|
||||
# include <ncursesw.h>
|
||||
#elif defined HAVE_NCURSES_CURSES_H
|
||||
# include <ncurses/curses.h>
|
||||
#elif defined HAVE_NCURSES_H
|
||||
# include <ncurses.h>
|
||||
#elif defined HAVE_CURSES_H
|
||||
# include <curses.h>
|
||||
#else
|
||||
# error "SysV or X/Open-compatible Curses header file required"
|
||||
#endif
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
|
|
@ -55,7 +55,8 @@ DIST_COMMON = $(dist_noinst_DATA) $(dist_noinst_SCRIPTS) \
|
|||
$(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/ax_sqlite3.m4 \
|
||||
$(top_srcdir)/lnav.m4 $(top_srcdir)/configure.in
|
||||
$(top_srcdir)/ax_with_curses.m4 $(top_srcdir)/lnav.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
|
|
|
@ -12,9 +12,22 @@
|
|||
#include <sys/time.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <termios.h>
|
||||
#include <ncurses.h>
|
||||
#include <signal.h>
|
||||
|
||||
#if defined HAVE_NCURSESW_CURSES_H
|
||||
# include <ncursesw/curses.h>
|
||||
#elif defined HAVE_NCURSESW_H
|
||||
# include <ncursesw.h>
|
||||
#elif defined HAVE_NCURSES_CURSES_H
|
||||
# include <ncurses/curses.h>
|
||||
#elif defined HAVE_NCURSES_H
|
||||
# include <ncurses.h>
|
||||
#elif defined HAVE_CURSES_H
|
||||
# include <curses.h>
|
||||
#else
|
||||
# error "SysV or X/Open-compatible Curses header file required"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PTY_H
|
||||
#include <pty.h>
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue