diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2021-10-08 17:35:04 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2021-10-08 22:11:33 +0200 |
commit | b6719eb383828e1cf04f4039edb0e4d8ba8a3587 (patch) | |
tree | deb15afa02594b4270fe41aa24338ccded334bcb | |
parent | aa3951eb3cfe6a148cc18b12327ac273cb41c6cf (diff) | |
download | sciteco-b6719eb383828e1cf04f4039edb0e4d8ba8a3587.tar.gz |
PDCurses support: automatically detect PDC_WIDE
* PDC_WIDE must be defined before including curses.h if the library
is also built against PDC_WIDE.
* Fixes building against PDCursesMod during Nightly Builds, ie.
fixes the current Win32 curses builds.
* The same problem exists for PDC_RGB.
It cannot currently be autodetected, so you must currently manually include
PDCURSES_CFLAGS="-DPDC_RGB" if you built your PDCurses with PDC_RGB.
The same will be true for PDC_NCMOUSE once we support mouses.
You best leave these settings in their defaults (disabled) if you have
control over the PDCurses build.
-rw-r--r-- | configure.ac | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index b2e6b2e..4a24316 100644 --- a/configure.ac +++ b/configure.ac @@ -247,7 +247,7 @@ case $INTERFACE in AC_MSG_RESULT([$XCURSES_LIBS]) LIBS="$LIBS $XCURSES_LIBS" - # This is also used by the curses.h itself: + # It is crucial to define XCURSES before including curses.h. AC_DEFINE(XCURSES, 1, [Enable PDCurses/XCurses extensions]) AC_DEFINE(PDCURSES_GUI, 1, [PDCurses with GUI window]) @@ -280,6 +280,11 @@ case $INTERFACE in AC_DEFINE(PDCURSES_MOD, 1, [PDCursesMod extensions]) ]) + # It is crucial to define PDC_WIDE before including curses.h. + AC_CHECK_FUNC([add_wch], [ + AC_DEFINE(PDC_WIDE, 1, [Built with wide-character support]) + ]) + # This is detectable at runtime on PDCursesMod using PDC_get_version(). # "Classic" PDCurses does not allow runtime or compile-time checks for # discerning eg. WinCon from SDL. |