X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=configure.in;h=4201c33ef79617ff28e05e5130eb118bc6e75873;hp=b42214598d7d106aa36fd320aa2f6dbc0929a7fe;hb=d479dbaecb05c5d5fbd064835c930c468898c7b1;hpb=d60228973b72d3b457e3ec2653ea5b2cb38fc0c9 diff --git a/configure.in b/configure.in index b4221459..4201c33e 100644 --- a/configure.in +++ b/configure.in @@ -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.659 2018/06/16 21:26:41 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.659 $) +AC_REVISION($Revision: 1.691 $) AC_INIT(ncurses/base/lib_initscr.c) AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) @@ -58,17 +58,17 @@ 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]) + if test "x$cf_with_ada" = xyes then - cf_PROG_CC="gnatgcc gcc cc" + cf_prog_cc="gnatgcc gcc cc" else - cf_PROG_CC="gcc cc" + cf_prog_cc="gcc cc" fi - -CF_PROG_CC($cf_PROG_CC) +CF_PROG_CC($cf_prog_cc) AC_PROG_CPP AC_PROG_GCC_TRADITIONAL @@ -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) @@ -521,6 +521,7 @@ if test "$with_gpm" != no ; then CF_CHECK_GPM_WGETCH fi +CF_WITH_PCRE2 CF_WITH_SYSMOUSE # pretend that ncurses==ncursesw==ncursest @@ -533,7 +534,7 @@ CF_ARG_DISABLE(lib-suffixes, AC_MSG_RESULT($disable_lib_suffixes) ### If we're building with rpath, try to link non-standard libs that way too. -if test "$DFT_LWR_MODEL" = "shared"; then +if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then CF_DISABLE_RPATH_HACK fi @@ -610,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, @@ -661,6 +693,13 @@ CF_WITH_PATHLIST(terminfo-dirs, AC_MSG_RESULT($TERMINFO_DIRS) test -n "$TERMINFO_DIRS" && AC_DEFINE_UNQUOTED(TERMINFO_DIRS,"$TERMINFO_DIRS",[Define as needed to predefine the TERMINFO_DIR searchlist]) +case "x$TERMINFO" in +x???:*) + AC_MSG_WARN(ignoring non-directory/file TERMINFO value) + unset TERMINFO + ;; +esac + AC_MSG_CHECKING(for default terminfo directory) CF_WITH_PATH(default-terminfo-dir, [ --with-default-terminfo-dir=DIR default terminfo directory], @@ -1480,6 +1519,21 @@ AC_SUBST(ECHO_LINK) # --disable-stripping is used for debugging CF_INSTALL_OPTS +# If we're avoiding relinking of shared libraries during install, that is to +# avoid modifying the build-tree. For the same reason, avoid doing ranlib if +# the install program has "-p" (for preserving timestamps). +cf_cv_do_reranlib=yes +if test "x$cf_cv_install_p" = xyes +then + if test "x$cf_cv_do_relink" != xyes + then + cf_cv_do_reranlib=no + INSTALL_OPT_P="-p" + INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P" + fi +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, @@ -1562,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, @@ -1605,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 to declare fd_set if test "x$ISC" = xyes ; then @@ -1654,6 +1716,7 @@ geteuid \ getopt \ getttynam \ issetugid \ +localeconv \ poll \ putenv \ remove \ @@ -1666,8 +1729,8 @@ sigaction \ sigvec \ strdup \ strstr \ +sysconf \ tcgetpgrp \ -tdestroy \ times \ tsearch \ vsnprintf \ @@ -1716,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 @@ -1820,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. @@ -1837,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 @@ -1858,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 @@ -2137,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 @@ -2173,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 @@ -2284,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" @@ -2328,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( \ @@ -2336,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 @@ -2395,6 +2460,7 @@ WITH_OVERWRITE="$with_overwrite" cf_LIST_MODELS="$cf_list_models" cf_cv_abi_version="$cf_cv_abi_version" cf_cv_do_relink="$cf_cv_do_relink" +cf_cv_do_reranlib="$cf_cv_do_reranlib" cf_cv_do_symlinks="$cf_cv_do_symlinks" cf_cv_enable_lp64="$cf_cv_enable_lp64" cf_cv_enable_opaque="$cf_cv_enable_opaque"