]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - configure.in
ncurses 6.3 - patch 20221001
[ncurses.git] / configure.in
index b27e83cef958ec8212d8f423ea212daaf90aeda0..70e8ae1c727db4d1732cbfbc2ccec44d11ed08ac 100644 (file)
@@ -29,7 +29,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: configure.in,v 1.741 2022/01/23 00:11:08 tom Exp $
+dnl $Id: configure.in,v 1.749 2022/10/01 13:16:18 tom Exp $
 dnl Process this file with autoconf to produce a configure script.
 dnl
 dnl For additional information, see
@@ -38,7 +38,7 @@ dnl     https://invisible-island.net/autoconf/my-autoconf.html
 dnl
 dnl ---------------------------------------------------------------------------
 AC_PREREQ(2.52.20210101)
-AC_REVISION($Revision: 1.741 $)
+AC_REVISION($Revision: 1.749 $)
 AC_INIT(ncurses/base/lib_initscr.c)
 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
 
@@ -693,6 +693,15 @@ AC_MSG_RESULT($with_xterm_new)
 WHICH_XTERM=$with_xterm_new
 AC_SUBST(WHICH_XTERM)
 
+case $host_os in
+(*linux-gnu|*cygwin|*mingw32|*msys)
+       want_xterm_kbs=DEL
+       ;;
+(*)
+       want_xterm_kbs=BS
+       ;;
+esac
+
 AC_MSG_CHECKING(if xterm backspace sends BS or DEL)
 AC_ARG_WITH(xterm-kbs,
        [  --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL],
@@ -713,6 +722,11 @@ AC_MSG_RESULT($with_xterm_kbs)
 XTERM_KBS=$with_xterm_kbs
 AC_SUBST(XTERM_KBS)
 
+if test "x$with_xterm_kbs" != "x$want_xterm_kbs"
+then
+       AC_MSG_WARN(expected --with-xterm-kbs=$want_xterm_kbs for $host_os)
+fi
+
 MAKE_TERMINFO=
 if test "$use_database" = no ; then
        TERMINFO="${datadir}/terminfo"
@@ -946,6 +960,15 @@ if test "x$with_widec" = xyes ; then
        fi
        AC_DEFINE(USE_WIDEC_SUPPORT,1,[Define to 1 to compile with wide-char/UTF-8 code])
        AC_DEFINE(NCURSES_WIDECHAR,1,[Define to 1 to compile with wide-char/UTF-8 code])
+       case "$CPPFLAGS" in
+       (*_XOPEN_SOURCE=*)
+               ;;
+       (*)
+               AC_MSG_WARN(_XOPEN_SOURCE feature test macro appears to be predefined)
+               # CPPFLAGS="$CPPFLAGS -DNCURSES_WIDECHAR"
+               CPPFLAGS_after_XOPEN="$CPPFLAGS_after_XOPEN -DNCURSES_WIDECHAR"
+               ;;
+       esac
 
        CF_CHECK_WCHAR_H
        CF_CHECK_WCWIDTH_GRAPHICS
@@ -953,7 +976,7 @@ if test "x$with_widec" = xyes ; then
 
        # with_overwrite=no
        NCURSES_CH_T=cchar_t
-       AC_CHECK_FUNCS(putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs)
+       AC_CHECK_FUNCS(putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs)
        if test "x$ac_cv_func_putwc" != xyes ; then
                CF_UTF8_LIB
                if test "$cf_cv_utf8_lib" != no ; then
@@ -1640,7 +1663,7 @@ AC_SUBST(INSTALL_OPT_P)
 CF_ENABLE_WARNINGS(Wno-unknown-pragmas Wswitch-enum,yes)
 
 if test "x$enable_warnings" = "xyes"; then
-       CF_ADD_ADAFLAGS(-gnatg)
+       CF_ADD_ADAFLAGS(-gnatwa -gnatyg)
        if test "x$cf_with_cxx" = xyes ; then
                CF_GXX_WARNINGS(Wno-unused)
        fi
@@ -1802,6 +1825,7 @@ CF_LINK_DATAONLY
 
 ###    Checks for library functions.
 AC_CHECK_FUNCS( \
+fpathconf \
 getcwd \
 getegid \
 geteuid \
@@ -1925,6 +1949,7 @@ if test -n "$CXX" ; then
        CF_BOOL_DECL
        CF_BOOL_SIZE
        CF_ETIP_DEFINES
+       CF_CPP_OVERRIDE
        CF_CPP_PARAM_INIT
        CF_CPP_STATIC_CAST
        CF_CXX_AR_FLAGS
@@ -2544,7 +2569,9 @@ CXX_NAME="$CXX_NAME"
 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
 DFT_LWR_MODEL="$DFT_LWR_MODEL"
 ECHO_LD="$ECHO_LD"
+EGREP="${EGREP-grep -E}"
 EXTRA_SUFFIX="$EXTRA_SUFFIX"
+FGREP="${FGREP-grep -F}"
 FORM_NAME="$FORM_NAME"
 LDCONFIG="$LDCONFIG"
 LIBTOOL_VERSION="$LIBTOOL_VERSION"