]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - configure.in
ncurses 6.2 - patch 20200816
[ncurses.git] / configure.in
index 7454c9aeaf63e1f7df3b13c2061c22ac25e0011f..38ef3d3589bef120e5aee905568b1a35fe3ca44a 100644 (file)
@@ -29,7 +29,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: configure.in,v 1.709 2020/05/31 20:04:09 tom Exp $
+dnl $Id: configure.in,v 1.716 2020/08/16 16:21:37 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.709 $)
+AC_REVISION($Revision: 1.716 $)
 AC_INIT(ncurses/base/lib_initscr.c)
 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
 
@@ -311,6 +311,14 @@ CF_HELP_MESSAGE(Build-Tools Needed to Compile Temporary Applications for Cross-c
 # If we're cross-compiling, allow the user to override the tools and their
 # options.  The configure script is oriented toward identifying the host
 # compiler, etc., but we need a build compiler to generate parts of the source.
+
+case $cf_cv_system_name in
+(*-msvc*)
+       LDFLAGS="$LDFLAGS user32.lib"
+       export LDFLAGS
+       ;;
+esac
+
 CF_BUILD_CC
 
 ###############################################################################
@@ -646,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],
@@ -1679,7 +1692,6 @@ limits.h \
 locale.h \
 math.h \
 poll.h \
-sys/bsdtypes.h \
 sys/ioctl.h \
 sys/param.h \
 sys/poll.h \
@@ -1701,13 +1713,6 @@ then
        AC_MSG_WARN(The NCURSES_TRACE environment variable is not supported with this configuration)
 fi
 
-# check for ISC (this may also define _POSIX_SOURCE)
-# Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
-if test "x$ISC" = xyes ; then
-       AC_CHECK_LIB(cposix,main)
-       AC_CHECK_LIB(inet,bzero,CF_ADD_LIB(inet))dnl also 'select()'
-fi
-
 CF_SYS_TIME_SELECT
 
 ###    checks for compiler characteristics
@@ -2231,6 +2236,17 @@ fi
 fi
 WITH_OVERWRITE=$with_overwrite
 
+### At least on MinGW a shared library build without libtool
+### requires adding the additional libs to the link list.
+case $cf_cv_system_name in
+(*mingw32*|*mingw64*)
+       if test "$DFT_LWR_MODEL" != "libtool"; then
+          SHLIB_LIST="$SHLIB_LIST ${LIBS}"
+       fi
+       ;;
+*)     ;;
+esac
+
 AC_SUBST(WITH_OVERWRITE)
 AC_SUBST(TICS_LIST)
 AC_SUBST(TINFO_LIST)