X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=configure.in;h=f46474e79dd98ecf261f209c62ba919b3484a8fd;hp=acc5cb709a7a2bd42108730d075193937b508464;hb=f67a188e71a0e6f80c1c45e50e7a7449c2d7bfb3;hpb=3b3a6d094f484e799b1430782f1130a9af71a94e diff --git a/configure.in b/configure.in index acc5cb70..f46474e7 100644 --- a/configure.in +++ b/configure.in @@ -29,7 +29,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: configure.in,v 1.713 2020/08/01 21:07:44 tom Exp $ +dnl $Id: configure.in,v 1.724 2020/09/06 22:23:32 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.20200111) -AC_REVISION($Revision: 1.713 $) +AC_REVISION($Revision: 1.724 $) AC_INIT(ncurses/base/lib_initscr.c) AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) @@ -654,27 +654,32 @@ case ".$with_fallback" in ;; esac -USE_FALLBACKS= -test -z "$FALLBACK_LIST" && USE_FALLBACKS="#" -AC_SUBST(FALLBACK_LIST) -AC_SUBST(USE_FALLBACKS) - # The fallback feature in ncurses relies upon tic/infocmp outside the build # tree for generating the terminal descriptions that will be compiled into the # library. If your toolchain is old, it may not handle current terminal # databases. Use configure-options to point to the tools which will be used, # rather than the first ones found on the $PATH. +AC_CHECK_TOOL(TIC, tic) +AC_CHECK_TOOL(INFOCMP, infocmp) if test -n "$FALLBACK_LIST" then CF_WITH_PATH_PROG(TIC, tic, [for fallbacks], $PATH:/usr/local/ncurses/bin) CF_WITH_PATH_PROG(INFOCMP, infocmp, [for fallbacks], $PATH:/usr/local/ncurses/bin) -else - : ${TIC:=tic} - : ${INFOCMP:=infocmp} + test -z "$TIC" && FALLBACK_LIST= + test -z "$INFOCMP" && FALLBACK_LIST= + if test -z "$FALLBACK_LIST" + then + AC_MSG_WARN(ignoring fallback option because tic/infocmp are not available) + fi fi AC_SUBST(TIC) AC_SUBST(INFOCMP) +USE_FALLBACKS= +test -z "$FALLBACK_LIST" && USE_FALLBACKS="#" +AC_SUBST(FALLBACK_LIST) +AC_SUBST(USE_FALLBACKS) + AC_MSG_CHECKING(if you want modern xterm or antique) AC_ARG_WITH(xterm-new, [ --without-xterm-new specify if xterm terminfo should be old version], @@ -1544,6 +1549,32 @@ AC_ARG_ENABLE(wgetch-events, AC_MSG_RESULT($with_wgetch_events) test "x$with_wgetch_events" = xyes && AC_DEFINE(NCURSES_WGETCH_EVENTS,1,[Define to 1 to compile with wgetch-events code]) +case $cf_cv_system_name in +(*mingw32*|*mingw64*|*-msvc*) + AC_MSG_CHECKING(if you want experimental-Windows driver) + AC_ARG_ENABLE(exp-win32, + [ --enable-exp-win32 compile with experimental-Windows driver], + [with_exp_win32=$enableval], + [with_exp_win32=no]) + AC_MSG_RESULT($with_exp_win32) + if test "x$with_exp_win32" = xyes + then + AC_DEFINE(EXP_WIN32_DRIVER,1,[Define to 1 to compile with experimental win32 driver]) + EXP_WIN32_DRIVER=1 + INTERNALS_HDR='[$](INCDIR)/nc_win32.h' + else + INTERNALS_HDR='[$](INCDIR)/nc_mingw.h' + EXP_WIN32_DRIVER=0 + fi + ;; +(*) + EXP_WIN32_DRIVER=0 + INTERNALS_HDR= + ;; +esac +AC_SUBST(EXP_WIN32_DRIVER) +AC_SUBST(INTERNALS_HDR) + ############################################################################### CF_HELP_MESSAGE(Testing/development Options:) @@ -1577,20 +1608,14 @@ fi AC_SUBST(INSTALL_OPT_P) ### use option --enable-warnings to turn on all gcc warnings -AC_MSG_CHECKING(if you want to see compiler warnings) -AC_ARG_ENABLE(warnings, - [ --enable-warnings build: turn on GCC compiler warnings], - [with_warnings=$enableval]) -AC_MSG_RESULT($with_warnings) +CF_ENABLE_WARNINGS(Wno-unknown-pragmas Wswitch-enum,yes) if test "x$with_warnings" = "xyes"; then CF_ADD_ADAFLAGS(-gnatg) - CF_GCC_WARNINGS(Wno-unknown-pragmas Wswitch-enum) if test "x$cf_with_cxx" = xyes ; then CF_GXX_WARNINGS(Wno-unused) fi fi -CF_GCC_ATTRIBUTES CF_ENABLE_STRING_HACKS ### use option --enable-assertions to turn on generation of assertion code @@ -1657,7 +1682,11 @@ CF_DISABLE_GNAT_PROJECTS ### Checks for libraries. case $cf_cv_system_name in (*mingw32*|*mingw64*) + if test "x$with_exp_win32" = xyes ; then + CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN" + else CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN" + fi # Note: WINVER may be a problem with Windows 10 ;; (*) @@ -2020,13 +2049,25 @@ if test "$with_term_driver" != no ; then LIB_SUBSETS="${LIB_SUBSETS}+port_drivers" case $cf_cv_system_name in (*mingw32*|*mingw64*) - LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con" + if test "x$with_exp_win32" = xyes ; then + LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32" + else + LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con" + fi CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER" ;; (*) LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo" ;; esac +elif test "x$with_exp_win32" = xyes ; then + case $cf_cv_system_name in + (*mingw32*|*mingw64*) + LIB_SUBSETS="${LIB_SUBSETS}+port_win32" + ;; + (*) + ;; + esac fi test "x$with_widec" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar" @@ -2282,9 +2323,6 @@ AC_DEFINE_UNQUOTED(NCURSES_PATHSEP,'$PATH_SEPARATOR',[Define to override ':' as AC_DEFINE_UNQUOTED(NCURSES_VERSION_STRING, "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}",[Define to 1 if machine has ample memory for tic]) -### Now that we're done running tests, add the compiler-warnings, if any -CF_ADD_CFLAGS($EXTRA_CFLAGS) - ### Define substitutions for header files to avoid name-pollution CF_SUBST_IF(["x$cf_cv_have_tcgetattr" = xyes], HAVE_TCGETATTR, 1, 0) CF_SUBST_IF(["x$ac_cv_header_stdint_h" = xyes], HAVE_STDINT_H, 1, 0)