aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac43
1 files changed, 25 insertions, 18 deletions
diff --git a/configure.ac b/configure.ac
index ed5e056..f64636b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.65])
-AC_INIT([SciTECO], [2.5.1],
+AC_INIT([SciTECO], [2.5.2],
[hackers@fmsbw.de],
[sciteco],
[https://sciteco.fmsbw.de/])
@@ -215,7 +215,7 @@ case $host in
*-*-linux* | *-*-*bsd* | *-*-darwin* | *-*-cygwin* | *-*-haiku*)
# NOTE: Keep this on a single line for compatibility
# with ancient versions of Autoconf.
- AC_CHECK_FUNCS([realpath readlink pathconf fchown dup dup2 getpid open read kill mmap popen pclose isatty fork setsid], , [
+ AC_CHECK_FUNCS([realpath readlink pathconf fchown dup dup2 getpid open read kill mmap popen pclose isatty fork execv setsid sigaction], , [
AC_MSG_ERROR([Missing libc function])
])
AC_SEARCH_LIBS(dladdr, [dl], , [
@@ -289,7 +289,8 @@ case $INTERFACE in
case $INTERFACE in
ncurses)
# This gives precendence to the widechar version of ncurses,
- # which is necessary for Unicode support even when not using widechar APIs.
+ # which is necessary for Unicode support and when using more than
+ # 256 color pairs.
# However we also accept libncurses.so if it also contains the
# enhanced definitions.
# NOTE: This also defines CURSES_CFLAGS and CURSES_LIBS arguments,
@@ -303,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])
;;
@@ -312,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.
@@ -325,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])
;;
@@ -353,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])
])
@@ -363,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!])
@@ -373,21 +375,26 @@ case $INTERFACE in
else
AC_MSG_CHECKING([checking for PDCurses (CURSES_LIBS)])
AC_MSG_RESULT([$CURSES_LIBS])
- LIBS="$LIBS $CURSES_LIBS"
fi
# 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, [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])
+ # 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.
+ 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])
])