aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.ac
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2021-06-07 23:24:20 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2021-06-08 19:10:03 +0200
commit58dee5546e38a17f597bbd2da76d527eaa729282 (patch)
treeb4f381d94a32158eb797fa0e16875f7685f6f3c1 /configure.ac
parentbb08565b91c21e1ffaf0b4b4f0750a52dbb87af2 (diff)
downloadsciteco-58dee5546e38a17f597bbd2da76d527eaa729282.tar.gz
improved PDCurses detection
* follow the current terminology: * PDCurses/Win32a is now called PDCursesMod and includes all other PDCurses ports as well. The Win32 GUI port is now called PDCurses/WinGUI. * PDCurses/Win32 is now called PDCurses/WinCon. * Since PDCursesMod supports WinCon as well, we use the PDCURSES_MOD macro only to detect PDCursesMod API extensions. GUIs (detached from system console) might be available both in classic PDCurses as well as in PDCursesMod. Only PDCursesMod allows detection of the port used *at runtime* using PDC_get_version(). We therefore introduced a --with-interface=pdcurses-gui that must be given whenever compiling for any kind of GUI port (including SDL on "classic" PDCurses). * The PDCURSES macro is used to detect all PDCurses (whether classic or PDCursesMod) API extensions. * __PDCURSES__ is used to detect PDCurses whenever API extensions are not required. * Assume that A_UNDERLINE now works even on WinCon.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac17
1 files changed, 13 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index c16acf1..b2e6b2e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -191,12 +191,12 @@ SCINTERM_PATH=`canonicalize $SCINTERM_PATH`
AC_SUBST(SCINTERM_PATH)
AC_ARG_WITH(interface,
- AS_HELP_STRING([--with-interface=ncurses|netbsd-curses|xcurses|pdcurses|gtk],
+ AS_HELP_STRING([--with-interface=ncurses|netbsd-curses|xcurses|pdcurses|pdcurses-gui|gtk],
[Specify user interface [default=ncurses]]),
[INTERFACE=$withval], [INTERFACE=ncurses])
case $INTERFACE in
-*curses)
+*curses*)
case $INTERFACE in
ncurses | netbsd-curses)
PKG_CHECK_MODULES(NCURSES, [ncurses], [
@@ -249,9 +249,11 @@ case $INTERFACE in
# This is also used by the curses.h itself:
AC_DEFINE(XCURSES, 1, [Enable PDCurses/XCurses extensions])
+
+ AC_DEFINE(PDCURSES_GUI, 1, [PDCurses with GUI window])
;;
- pdcurses)
+ pdcurses*)
AC_ARG_VAR(PDCURSES_CFLAGS, [
C compiler flags for PDCurses,
overriding the autoconf check
@@ -275,8 +277,15 @@ case $INTERFACE in
fi
AC_CHECK_FUNC([PDC_set_resize_limits], [
- AC_DEFINE(PDCURSES_WIN32A, 1, [PDCurses supports Win32a extensions])
+ AC_DEFINE(PDCURSES_MOD, 1, [PDCursesMod extensions])
])
+
+ # 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.
+ if [[ $INTERFACE = pdcurses-gui ]]; then
+ AC_DEFINE(PDCURSES_GUI, 1, [PDCurses with GUI window])
+ fi
;;
esac