]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - configure.in
ncurses 6.1 - patch 20191221
[ncurses.git] / configure.in
index 508e0aa7f5c9890ba85b3a456181ff438916dd9e..4201c33ef79617ff28e05e5130eb118bc6e75873 100644 (file)
@@ -1,5 +1,5 @@
 dnl***************************************************************************
-dnl Copyright (c) 1998-2017,2018 Free Software Foundation, Inc.              *
+dnl Copyright (c) 1998-2018,2019 Free Software Foundation, Inc.              *
 dnl                                                                          *
 dnl Permission is hereby granted, free of charge, to any person obtaining a  *
 dnl copy of this software and associated documentation files (the            *
@@ -28,14 +28,14 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: configure.in,v 1.671 2018/11/11 01:12:44 tom Exp $
+dnl $Id: configure.in,v 1.691 2019/11/16 15:54:47 tom Exp $
 dnl Process this file with autoconf to produce a configure script.
 dnl
 dnl See https://invisible-island.net/autoconf/ for additional information.
 dnl
 dnl ---------------------------------------------------------------------------
 AC_PREREQ(2.52.20170501)
-AC_REVISION($Revision: 1.671 $)
+AC_REVISION($Revision: 1.691 $)
 AC_INIT(ncurses/base/lib_initscr.c)
 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
 
@@ -58,7 +58,7 @@ CF_ABI_DEFAULTS
 
 ###    Checks for programs.
 AC_ARG_WITH(ada,
-       [  --without-ada           suppress check for Ada95, don't build demo],
+       [  --without-ada           suppress check for Ada compiler, don't build demo],
        [cf_with_ada=$withval],
        [cf_with_ada=yes])
 
@@ -154,7 +154,7 @@ AC_ARG_WITH(cxx-binding,
        [cf_with_cxx_binding=$cf_with_cxx])
 AC_MSG_RESULT($cf_with_cxx_binding)
 
-AC_MSG_CHECKING(if you want to build with Ada95)
+AC_MSG_CHECKING(if you want to build with Ada)
 AC_MSG_RESULT($cf_with_ada)
 
 AC_MSG_CHECKING(if you want to install terminal database)
@@ -611,8 +611,39 @@ AC_ARG_WITH(fallbacks,
        [with_fallback=$withval],
        [with_fallback=])
 AC_MSG_RESULT($with_fallback)
-FALLBACK_LIST=`test "$with_fallback" != no && echo "$with_fallback" | sed -e 's/,/ /g'`
+
+case ".$with_fallback" in
+(.|.no)
+       FALLBACK_LIST=
+       ;;
+(.yes)
+       AC_MSG_WARN(expected a list of terminal descriptions)
+       ;;
+(*)
+       FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
+       ;;
+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.
+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}
+fi
+AC_SUBST(TIC)
+AC_SUBST(INFOCMP)
 
 AC_MSG_CHECKING(if you want modern xterm or antique)
 AC_ARG_WITH(xterm-new,
@@ -1585,7 +1616,7 @@ CF_DISABLE_GNAT_PROJECTS
 case $cf_cv_system_name in
 (*mingw32*|*mingw64*)
        CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
-       LIBS=" -lpsapi $LIBS"
+       # Note: WINVER may be a problem with Windows 10
        ;;
 (*)
 AC_CHECK_FUNC(gettimeofday,
@@ -1628,6 +1659,14 @@ wctype.h \
 
 CF_GETOPT_HEADER
 
+CF_CHECK_ENVIRON(environ)
+CF_CHECK_GETENV
+if test "x$cf_cv_consistent_getenv" = xno && \
+       test "x$cf_with_trace" = xyes
+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
@@ -1677,6 +1716,7 @@ geteuid \
 getopt \
 getttynam \
 issetugid \
+localeconv \
 poll \
 putenv \
 remove \
@@ -1691,7 +1731,6 @@ strdup \
 strstr \
 sysconf \
 tcgetpgrp \
-tdestroy \
 times \
 tsearch \
 vsnprintf \
@@ -1740,6 +1779,7 @@ CF_FUNC_MEMMOVE
 CF_FUNC_POLL
 CF_VA_COPY
 AC_FUNC_VFORK
+CF_FOPEN_BIN_R
 
 # special check for test/ditto.c
 CF_FUNC_OPENPTY
@@ -1844,7 +1884,7 @@ else
 fi
 AC_SUBST(USE_CXX_BOOL)
 
-CF_HELP_MESSAGE(Ada95 Binding Options:)
+CF_HELP_MESSAGE(Ada Binding Options:)
 
 dnl If the Ada95 source-tree is present, add that to the build unless it will
 dnl not work, or was not requested.
@@ -1861,7 +1901,7 @@ dnl libtool -TD 20070714
        fi
 
 dnl Check for availability of GNU Ada Translator (GNAT).
-dnl At the moment we support no other Ada95 compiler.
+dnl At the moment we support no other Ada compiler.
        if test "$cf_with_ada" != "no" ; then
                CF_PROG_GNAT
                if test "x$cf_cv_prog_gnat_correct" = xyes; then
@@ -1882,6 +1922,9 @@ dnl At the moment we support no other Ada95 compiler.
                        CF_WITH_ADA_INCLUDE
                        CF_WITH_ADA_OBJECTS
                        CF_WITH_ADA_SHAREDLIB
+
+                       # allow the Ada binding to be renamed
+                       CF_WITH_ADA_LIBNAME(AdaCurses)
                fi
        fi
 else
@@ -2161,6 +2204,7 @@ AC_DEFINE(HAVE_SLK_COLOR,1,[Define to 1 if we have slk_color for test-programs])
 CF_SRC_MODULES($modules_to_build)
 
 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
+   SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
 fi
@@ -2197,16 +2241,6 @@ SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
 fi
 AC_SUBST(cross_compiling)
 
-AC_PATH_PROG(TIC_PATH,tic,unknown,$PATH:/usr/local/ncurses/bin)
-if test -n "$FALLBACK_LIST"
-then
-       if test "$TIC_PATH" = unknown
-       then
-               AC_MSG_WARN(no tic program found for fallbacks)
-       fi
-fi
-AC_SUBST(TIC_PATH)
-
 if test "x$cf_with_tests" != xno ; then
        MAKE_TESTS=
 else
@@ -2308,7 +2342,12 @@ fi
 AC_SUBST(MISC_INSTALL_DATA)
 AC_SUBST(MISC_UNINSTALL_DATA)
 
-SUB_SCRIPTS=
+if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
+       MAKE_DATABASE="#"
+else
+       MAKE_DATABASE="$MAKE_TERMINFO"
+fi
+AC_SUBST(MAKE_DATABASE)
 
 dnl Override the package used for exported symbols
 if test -n "$PACKAGE"
@@ -2352,6 +2391,9 @@ AC_SUBST(ADAGEN_LDFLAGS)
 AC_SUBST(CHECK_BUILD)
 AC_SUBST(PRIVATE_LIBS)
 
+# This is used for the *-config script and *.pc data files.
+CF_LD_SEARCHPATH
+
 AC_DEFINE(HAVE_CURSES_DATA_BOOLNAMES,1,[definition needed for in-tree build of tack])
 
 AC_OUTPUT( \
@@ -2360,7 +2402,6 @@ AC_OUTPUT( \
        include/ncurses_dll.h \
        include/termcap.h \
        include/unctrl.h \
-       $SUB_SCRIPTS \
        $SUB_MAKEFILES \
        Makefile,[
 if test "x$cf_with_tests" != xno ; then