diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-06-21 19:56:13 +0200 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2015-06-22 04:10:39 +0200 |
commit | 17e7768e3393eaac91ebfa7467be3d1cabd7659a (patch) | |
tree | 61287c03ac216f91f8e8460ebb771ac3ad918519 /configure.ac | |
parent | 1d626c2785117f9c9bf6683d98f57e825a9e7938 (diff) | |
download | sciteco-17e7768e3393eaac91ebfa7467be3d1cabd7659a.tar.gz |
added XCurses support
* enabled via --with-interface=xcurses, so we can configure
it automatically via xcurses-config.
This also adds XCURSES_CFLAGS and XCURSES_LIBS.
* The X11 window class name is set to "SciTECO".
X11 resource overrides can currently not be set via
sciteco's command line. The user may use .Xdefaults though.
* interruptions via CTRL+C are currently not supported.
Apparently, XCurses also does send SIGINT in cbreak() mode.
An XCurses-specific hack would be cumbersome.
* ~InterfaceCurses() should probably be rewritten.
Curses cleanup should be completely in restore_batch() as
the destructor may be called after Curses-cleanup handlers.
E.g. isendwin() SEGFAULTs on XCurses when called from the
destructor.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 9e0cc29..f952d44 100644 --- a/configure.ac +++ b/configure.ac @@ -142,7 +142,7 @@ SCINTERM_PATH=`canonicalize $SCINTERM_PATH` AC_SUBST(SCINTERM_PATH) AC_ARG_WITH(interface, - AS_HELP_STRING([--with-interface=ncurses|pdcurses|gtk], + AS_HELP_STRING([--with-interface=ncurses|xcurses|pdcurses|gtk], [Specify user interface [default=ncurses]]), [INTERFACE=$withval], [INTERFACE=ncurses]) @@ -162,6 +162,38 @@ case $INTERFACE in AC_CHECK_FUNCS([tigetstr]) ;; + xcurses) + AC_CHECK_PROG(XCURSES_CONFIG, xcurses-config, xcurses-config) + + AC_ARG_VAR(XCURSES_CFLAGS, [ + C compiler flags for XCurses, + overriding the autoconf check + ]) + if [[ "x$XCURSES_CFLAGS" = "x" -a "x$XCURSES_CONFIG" != "x" ]]; then + XCURSES_CFLAGS=`$XCURSES_CONFIG --cflags` + fi + CFLAGS="$CFLAGS $XCURSES_CFLAGS" + CXXFLAGS="$CXXFLAGS $XCURSES_CFLAGS" + + AC_ARG_VAR(XCURSES_LIBS, [ + linker flags for XCurses, + overriding the autoconf check + ]) + AC_MSG_CHECKING([checking for XCurses]) + if [[ "x$XCURSES_LIBS" = "x" -a "x$XCURSES_CONFIG" != "x" ]]; then + XCURSES_LIBS=`$XCURSES_CONFIG --libs` + fi + if [[ "x$XCURSES_LIBS" = "x" ]]; then + AC_MSG_ERROR([libXCurses not configured correctly! + xcurses-config must be present or XCURSES_LIBS must be specified.]) + fi + AC_MSG_RESULT([$XCURSES_LIBS]) + LIBS="$LIBS $XCURSES_LIBS" + + # This is also used by the curses.h itself: + AC_DEFINE(XCURSES, , [Enable PDCurses/XCurses extensions]) + ;; + pdcurses) AC_ARG_VAR(PDCURSES_CFLAGS, [ C compiler flags for PDCurses, |