commit - dd038bc6ec835ad3fd3c0b5303b8af9ad506c8cc
commit + acf52a76031e15e6a2bbe327bc4291a2867ae143
blob - 4a32b53176f07eed16b613bb85a0eaa5ff2bfb65
blob + 58e9cd224042487a39106bc8aedac7af423fa274
--- configure.ac
+++ configure.ac
AC_MSG_RESULT(no)
)
-# Look for ncurses.
PKG_CHECK_MODULES(
- LIBTINFO,
- tinfo,
+ LIBPANELW,
+ panelw,
+ found_panel=yes,
+ AC_MSG_ERROR("*** couldn't find -lpanel from ncurses")
+)
+
+PKG_CHECK_MODULES(
+ LIBNCURSES,
+ ncursesw,
found_ncurses=yes,
found_ncurses=no
)
-if test "x$found_ncurses" = xno; then
- PKG_CHECK_MODULES(
- LIBNCURSES,
- ncurses,
- found_ncurses=yes,
- found_ncurses=no
- )
-fi
-if test "x$found_ncurses" = xno; then
- PKG_CHECK_MODULES(
- LIBNCURSES,
- ncursesw,
- found_ncurses=yes,
- found_ncurses=no
- )
-fi
-if test "x$found_ncurses" = xyes; then
- AM_CFLAGS="$LIBNCURSES_CFLAGS $LIBTINFO_CFLAGS $AM_CFLAGS"
- CFLAGS="$LIBNCURSES_CFLAGS $LIBTINFO_CFLAGS $CFLAGS"
- LIBS="$LIBNCURSES_LIBS $LIBTINFO_LIBS $LIBS"
+if test "x$found_ncurses" = xyes; then
+ AM_CFLAGS="$LIBNCURSES_CFLAGS $LIBTINFO_CFLAGS $LIBPANELW_CFLAGS $AM_CFLAGS"
+ CFLAGS="$LIBNCURSES_CFLAGS $LIBTINFO_CFLAGS $LIBPANELW_CFLAGS $CFLAGS"
+ LIBS="$LIBNCURSES_LIBS $LIBTINFO_LIBS $LIBPANELW_LIBS $LIBS"
else
- # pkg-config didn't work, try ncurses.
AC_CHECK_LIB(
- tinfo,
+ ncursesw,
setupterm,
found_ncurses=yes,
found_ncurses=no
)
- if test "x$found_ncurses" = xno; then
- AC_CHECK_LIB(
- ncurses,
- setupterm,
- found_ncurses=yes,
- found_ncurses=no
- )
- fi
if test "x$found_ncurses" = xyes; then
AC_CHECK_HEADER(
ncurses.h,
- LIBS="$LIBS -lncurses",
- found_ncurses=no)
- fi
+ AM_CFLAGS="$LIBPANELW_CFLAGS $AM_CFLAGS"
+ CFLAGS="$LIBPANEL_CFLAGS $CFLAGS"
+ LIBS="$LIBS -lncursesw $LIBPANELW_LIBS",
+ found_ncurses=no
+ )
+ fi
fi
if test "x$found_ncurses" = xyes; then
AC_DEFINE(HAVE_NCURSES_H)
else
# No ncurses, try curses.
AC_CHECK_LIB(
- curses,
+ cursesw,
setupterm,
found_curses=yes,
found_curses=no
,
found_curses=no)
if test "x$found_curses" = xyes; then
- LIBS="$LIBS -lcurses"
+ AM_CFLAGS="$LIBPANELW_CFLAGS $AM_CFLAGS"
+ CFLAGS="$LIBPANEL_CFLAGS $CFLAGS"
+ LIBS="$LIBS -lcursesw $LIBPANELW_LIBS"
AC_DEFINE(HAVE_CURSES_H)
else
AC_MSG_ERROR("curses not found")
blob - 3f3825f3ab509f53cf1886193cccec03dfb99724
blob + 22be8f445205b2b01aced81e6ed5000cb6e90ac4
--- tog/Makefile.am
+++ tog/Makefile.am
-I$(top_srcdir)/include \
-I.
-LDADD = -L$(top_builddir)/compat -lopenbsd-compat -lutil -lpanel -lncursesw -lpthread
+LDADD = -L$(top_builddir)/compat -lopenbsd-compat -lpthread
blob - 9368c448d5fc066021785fa4c63cfc10e92e46ae
blob + af76bcbb1f3e4fea2aa79213207241abf1d2c04d
--- tog/tog.c
+++ tog/tog.c
#define MAX(_a,_b) ((_a) > (_b) ? (_a) : (_b))
#endif
+#ifndef CTRL
#define CTRL(x) ((x) & 0x1f)
+#endif
#ifndef nitems
#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))