diff options
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac index ebe7b8b..673fb33 100644 --- a/configure.ac +++ b/configure.ac @@ -304,6 +304,9 @@ case $INTERFACE in CXXFLAGS="$CXXFLAGS $CURSES_CFLAGS" LIBS="$LIBS $CURSES_LIBS" + # Scinterm cares about the correct flags itself. + AC_DEFINE(NCURSES_WIDECHAR, 1, [Provide wide-character functions]) + AC_CHECK_FUNCS([tigetstr]) ;; @@ -313,10 +316,6 @@ case $INTERFACE in # installed, we want this to be an explicit setting. AC_DEFINE(NETBSD_CURSES, 1, [Building against netbsd-curses]) - CFLAGS="$CFLAGS $CURSES_CFLAGS" - CXXFLAGS="$CXXFLAGS $CURSES_CFLAGS" - LIBS="$LIBS $CURSES_LIBS" - if [[ "x$CURSES_LIBS" = "x" ]]; then # libncurses.pc is only shipped by Void Linux' fork, # not in NetBSD itself. @@ -326,9 +325,12 @@ case $INTERFACE in else AC_MSG_CHECKING([checking for netbsd-curses (CURSES_LIBS)]) AC_MSG_RESULT([$CURSES_LIBS]) - LIBS="$LIBS $CURSES_LIBS" fi + CFLAGS="$CFLAGS $CURSES_CFLAGS" + CXXFLAGS="$CXXFLAGS $CURSES_CFLAGS" + LIBS="$LIBS $CURSES_LIBS" + AC_CHECK_FUNCS([tigetstr]) ;; @@ -354,9 +356,11 @@ case $INTERFACE in LIBS="$LIBS $CURSES_LIBS" # It is crucial to define XCURSES before including curses.h. + # This is not important for Scinterm. AC_DEFINE(XCURSES, 1, [Enable PDCurses/XCurses extensions]) AC_CHECK_FUNC([has_mouse], [ + # not important to pass to Scinterm AC_DEFINE(PDC_NCMOUSE, 1, [PDCurses built with ncurses mouse API]) ]) @@ -364,9 +368,6 @@ case $INTERFACE in ;; pdcurses*) - CFLAGS="$CFLAGS $CURSES_CFLAGS" - CXXFLAGS="$CXXFLAGS $CURSES_CFLAGS" - if [[ "x$CURSES_LIBS" = "x" ]]; then AC_CHECK_LIB(pdcurses, PDC_get_version, , [ AC_MSG_ERROR([libpdcurses missing!]) @@ -374,23 +375,26 @@ case $INTERFACE in else AC_MSG_CHECKING([checking for PDCurses (CURSES_LIBS)]) AC_MSG_RESULT([$CURSES_LIBS]) - LIBS="$LIBS $CURSES_LIBS" fi - AC_CHECK_FUNC([add_wch], [], [ - AC_MSG_ERROR([libpdcurses does not include wide-character support!]) - ]) - # 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_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]) + CURSES_CFLAGS="$CURSES_CFLAGS -DPDC_WIDE -DPDC_FORCE_UTF8" + + CFLAGS="$CFLAGS $CURSES_CFLAGS" + CXXFLAGS="$CXXFLAGS $CURSES_CFLAGS" + LIBS="$LIBS $CURSES_LIBS" + + AC_CHECK_FUNC([add_wch], [], [ + AC_MSG_ERROR([libpdcurses does not include wide-character support!]) + ]) AC_CHECK_FUNC([has_mouse], [ + # not important to pass to Scinterm AC_DEFINE(PDC_NCMOUSE, 1, [PDCurses built with ncurses mouse API]) ]) |
