X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=configure.in;h=2183a9781483539289296313fdf0b2a422513a81;hp=508e0aa7f5c9890ba85b3a456181ff438916dd9e;hb=a6ff7e087fd944fd0035075d0bb528e95e498d81;hpb=4bbfbf869d8c913cb0f5f30708b0bcb5d1724b96 diff --git a/configure.in b/configure.in index 508e0aa7..2183a978 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,6 @@ dnl*************************************************************************** -dnl Copyright (c) 1998-2017,2018 Free Software Foundation, Inc. * +dnl Copyright 2018-2019,2020 Thomas E. Dickey * +dnl Copyright 1998-2017,2018 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,17 +29,21 @@ 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.697 2020/02/08 20:56:13 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 For additional information, see +dnl https://invisible-island.net/autoconf/ +dnl https://invisible-island.net/autoconf/my-autoconf.html dnl dnl --------------------------------------------------------------------------- -AC_PREREQ(2.52.20170501) -AC_REVISION($Revision: 1.671 $) +AC_PREREQ(2.52.20200111) +AC_REVISION($Revision: 1.697 $) AC_INIT(ncurses/base/lib_initscr.c) AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) +AC_DEFUN([AC_PATH_XTRA],[])dnl ignore dependencies on this + CF_TOP_BUILDDIR CF_SUBST_NCURSES_VERSION CF_VERSION_INFO(NCURSES,ncurses) @@ -58,7 +63,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 +159,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 +616,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, @@ -821,27 +857,7 @@ test "x$with_links" = xyes && AC_DEFINE(USE_LINKS,1,[Define to 1 if hardlinks sh test "x$with_symlinks" = xyes && AC_DEFINE(USE_SYMLINKS,1,[Define to 1 if symbolic links should be used in terminfo database]) ### use option --enable-broken-linker to force on use of broken-linker support -AC_MSG_CHECKING(if you want broken-linker support code) -AC_ARG_ENABLE(broken_linker, - [ --enable-broken_linker compile with broken-linker support code], - [with_broken_linker=$enableval], - [with_broken_linker=${BROKEN_LINKER:-no}]) -AC_MSG_RESULT($with_broken_linker) - -BROKEN_LINKER=0 -if test "x$with_broken_linker" = xyes ; then - AC_DEFINE(BROKEN_LINKER,1,[Define to 1 to work around linkers which cannot link data-only modules]) - BROKEN_LINKER=1 -elif test "$DFT_LWR_MODEL" = shared ; then - case $cf_cv_system_name in - (cygwin*) - AC_DEFINE(BROKEN_LINKER,1,[Define to 1 to work around linkers which cannot link data-only modules]) - BROKEN_LINKER=1 - CF_VERBOSE(cygwin linker is broken anyway) - ;; - esac -fi -AC_SUBST(BROKEN_LINKER) +CF_ENABLE_BROKEN_LINKER ### use option --enable-bsdpad to have tputs process BSD-style prefix padding AC_MSG_CHECKING(if tputs should process BSD-style prefix padding) @@ -1034,7 +1050,7 @@ AC_ARG_WITH(ccharw-max, AC_MSG_RESULT($NCURSES_CCHARW_MAX) AC_SUBST(NCURSES_CCHARW_MAX) -AC_CHECK_SIZEOF([signed char], 0) +AC_CHECK_SIZEOF([signed char]) if test "$ac_cv_sizeof_signed_char" = 1 ; then NCURSES_SBOOL="signed char" else @@ -1585,7 +1601,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 +1644,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 to declare fd_set if test "x$ISC" = xyes ; then @@ -1677,6 +1701,7 @@ geteuid \ getopt \ getttynam \ issetugid \ +localeconv \ poll \ putenv \ remove \ @@ -1691,7 +1716,6 @@ strdup \ strstr \ sysconf \ tcgetpgrp \ -tdestroy \ times \ tsearch \ vsnprintf \ @@ -1740,6 +1764,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 +1869,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 +1886,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 +1907,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 @@ -1891,6 +1919,16 @@ fi # do this "late" to avoid conflict with header-checks if test "x$with_widec" = xyes ; then AC_CHECK_SIZEOF(wchar_t) + # cross-compiling to mingw can run into the problem that attempting to + # link with the regex library fails, causing the test to not set this to + # a number. "recent" autoconf does not address this problem either -TD + if test -z "$ac_cv_sizeof_wchar_t" + then + CF_VERBOSE(test failed (assume 2)) + sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp + mv confdefs.tmp confdefs.h + echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h + fi fi ### Construct the ncurses library-subsets, if any, from this set of keywords: @@ -2161,6 +2199,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 +2236,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 +2337,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 +2386,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 +2397,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