X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=configure.in;h=2183a9781483539289296313fdf0b2a422513a81;hp=859f7275941bb9b6239777550e24704bd9df10b3;hb=a6ff7e087fd944fd0035075d0bb528e95e498d81;hpb=4f56e7e405530c9c5e953d4072415429878b6e5b diff --git a/configure.in b/configure.in index 859f7275..2183a978 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,6 @@ dnl*************************************************************************** -dnl Copyright (c) 1998-2018,2019 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.688 2019/06/30 15:21:02 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.688 $) +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) @@ -852,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) @@ -1065,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 @@ -1616,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, @@ -1884,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. @@ -1901,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 @@ -1922,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 @@ -1931,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: @@ -2201,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 @@ -2345,8 +2344,6 @@ else fi AC_SUBST(MAKE_DATABASE) -SUB_SCRIPTS= - dnl Override the package used for exported symbols if test -n "$PACKAGE" then @@ -2389,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( \ @@ -2397,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