aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.ac
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2022-06-21 02:42:56 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2022-06-21 02:42:56 +0200
commit73cab56e058fe218fa855056f2d567a12b37955d (patch)
tree47a372c98a7d75c844a02969768e897e5c5cacf4 /configure.ac
parentcf9ffc0cec0d2e55930238d1752209bca659c96d (diff)
downloadsciteco-73cab56e058fe218fa855056f2d567a12b37955d.tar.gz
better support recent versions of PDCursesMod (used to be the Win32a-port)
* PDCursesMod is now the recommended PDCurses variant * you should use at least v4.3.2 since earlier versions have problems inserting CTRL+C and CTRL+V. * We now check for PDC_get_version() since initscr() was name-mangled at least for some time. The maintainers have now reverted to name-mangling endwin(), we still check for PDC_get_version() as it is probably safer in the future. * Properly define PDC_FORCE_UTF8 now. * We no longer have to check for PDC_set_resize_limits() since PDCursesMod now defines its own macro __PDCURSESMOD__ in curses.h.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 9 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index a1dab35..3f50576 100644
--- a/configure.ac
+++ b/configure.ac
@@ -277,7 +277,7 @@ case $INTERFACE in
overriding the autoconf check
])
if [[ "x$PDCURSES_LIBS" = "x" ]]; then
- AC_CHECK_LIB(pdcurses, initscr, , [
+ AC_CHECK_LIB(pdcurses, PDC_get_version, , [
AC_MSG_ERROR([libpdcurses missing!
Perhaps it is not named correctly or has wrong permissions.])
])
@@ -287,17 +287,19 @@ case $INTERFACE in
LIBS="$LIBS $PDCURSES_LIBS"
fi
- AC_CHECK_FUNC([PDC_set_resize_limits], [
- AC_DEFINE(PDCURSES_MOD, 1, [PDCursesMod extensions])
- ])
-
# It is crucial to define PDC_WIDE before including curses.h.
+ # FIXME: MinGW has a pdcurses.h that already defines all necessary macros,
+ # but it's not in upstream PDCurses/PDCursesMod.
AC_CHECK_FUNC([add_wch], [
- AC_DEFINE(PDC_WIDE, 1, [Built with wide-character support])
+ AC_DEFINE(PDC_WIDE, 1, [PDCurses built with wide-character support])
+ # FIXME: It would be better to check for PDC_FORCE_UTF8.
+ # Theoretically, we could check for endwin_u[32|64]_4302,
+ # but I'm not sure this will work reliably in the future.
+ AC_DEFINE(PDC_FORCE_UTF8, 1, [PDCursesMod forces use of UTF8])
])
# This is detectable at runtime on PDCursesMod using PDC_get_version().
- # "Classic" PDCurses does not allow runtime or compile-time checks for
+ # "Classic" PDCurses however does not allow runtime or compile-time checks for
# discerning eg. WinCon from SDL.
if [[ $INTERFACE = pdcurses-gui ]]; then
AC_DEFINE(PDCURSES_GUI, 1, [PDCurses with GUI window])