10e3d5408SPeter Wemmdnl*************************************************************************** 2*7a656419SBaptiste Daroussindnl Copyright 2018-2020,2021 Thomas E. Dickey * 3e1865124SBaptiste Daroussindnl Copyright 1998-2017,2018 Free Software Foundation, Inc. * 40e3d5408SPeter Wemmdnl * 50e3d5408SPeter Wemmdnl Permission is hereby granted, free of charge, to any person obtaining a * 60e3d5408SPeter Wemmdnl copy of this software and associated documentation files (the * 70e3d5408SPeter Wemmdnl "Software"), to deal in the Software without restriction, including * 80e3d5408SPeter Wemmdnl without limitation the rights to use, copy, modify, merge, publish, * 90e3d5408SPeter Wemmdnl distribute, distribute with modifications, sublicense, and/or sell * 100e3d5408SPeter Wemmdnl copies of the Software, and to permit persons to whom the Software is * 110e3d5408SPeter Wemmdnl furnished to do so, subject to the following conditions: * 120e3d5408SPeter Wemmdnl * 130e3d5408SPeter Wemmdnl The above copyright notice and this permission notice shall be included * 140e3d5408SPeter Wemmdnl in all copies or substantial portions of the Software. * 150e3d5408SPeter Wemmdnl * 160e3d5408SPeter Wemmdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * 170e3d5408SPeter Wemmdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * 180e3d5408SPeter Wemmdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * 190e3d5408SPeter Wemmdnl IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * 200e3d5408SPeter Wemmdnl DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * 210e3d5408SPeter Wemmdnl OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * 220e3d5408SPeter Wemmdnl THE USE OR OTHER DEALINGS IN THE SOFTWARE. * 230e3d5408SPeter Wemmdnl * 240e3d5408SPeter Wemmdnl Except as contained in this notice, the name(s) of the above copyright * 250e3d5408SPeter Wemmdnl holders shall not be used in advertising or otherwise to promote the * 260e3d5408SPeter Wemmdnl sale, use or other dealings in this Software without prior written * 270e3d5408SPeter Wemmdnl authorization. * 280e3d5408SPeter Wemmdnl*************************************************************************** 290e3d5408SPeter Wemmdnl 30b82face1SPeter Wemmdnl Author: Thomas E. Dickey 1995-on 310e3d5408SPeter Wemmdnl 32*7a656419SBaptiste Daroussindnl $Id: configure.in,v 1.729 2021/01/09 11:20:52 tom Exp $ 330e3d5408SPeter Wemmdnl Process this file with autoconf to produce a configure script. 3418259542SPeter Wemmdnl 35aae38d10SBaptiste Daroussindnl For additional information, see 36aae38d10SBaptiste Daroussindnl https://invisible-island.net/autoconf/ 37aae38d10SBaptiste Daroussindnl https://invisible-island.net/autoconf/my-autoconf.html 3818259542SPeter Wemmdnl 3918259542SPeter Wemmdnl --------------------------------------------------------------------------- 40*7a656419SBaptiste DaroussinAC_PREREQ(2.52.20210101) 41*7a656419SBaptiste DaroussinAC_REVISION($Revision: 1.729 $) 420e3d5408SPeter WemmAC_INIT(ncurses/base/lib_initscr.c) 430e3d5408SPeter WemmAC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) 440e3d5408SPeter Wemm 45aae38d10SBaptiste DaroussinAC_DEFUN([AC_PATH_XTRA],[])dnl ignore dependencies on this 46aae38d10SBaptiste Daroussin 474a1a9510SRong-En FanCF_TOP_BUILDDIR 480e3d5408SPeter WemmCF_SUBST_NCURSES_VERSION 49aae38d10SBaptiste DaroussinCF_VERSION_INFO(NCURSES,ncurses) 504a1a9510SRong-En Fan 514a1a9510SRong-En FanCF_WITH_REL_VERSION(NCURSES) 52aae38d10SBaptiste DaroussinCF_NCURSES_WITH_ABI_VERSION 534a1a9510SRong-En Fan 5473f0a83dSXin LICF_WITH_SYSTYPE 550e3d5408SPeter Wemm 560e3d5408SPeter Wemm### Save the given $CFLAGS to allow user-override. 570e3d5408SPeter Wemmcf_user_CFLAGS="$CFLAGS" 580e3d5408SPeter Wemm 590e3d5408SPeter Wemm### Default install-location 600e3d5408SPeter WemmCF_CFG_DEFAULTS 61aae38d10SBaptiste Daroussin### Defaults for ncurses ABI 62aae38d10SBaptiste DaroussinCF_ABI_DEFAULTS 630e3d5408SPeter Wemm 640e3d5408SPeter Wemm### Checks for programs. 6573f0a83dSXin LIAC_ARG_WITH(ada, 66aae38d10SBaptiste Daroussin [ --without-ada suppress check for Ada compiler, don't build demo], 6773f0a83dSXin LI [cf_with_ada=$withval], 6873f0a83dSXin LI [cf_with_ada=yes]) 69aae38d10SBaptiste Daroussin 7073f0a83dSXin LIif test "x$cf_with_ada" = xyes 7173f0a83dSXin LIthen 72aae38d10SBaptiste Daroussin cf_prog_cc="gnatgcc gcc cc" 7373f0a83dSXin LIelse 74aae38d10SBaptiste Daroussin cf_prog_cc="gcc cc" 7573f0a83dSXin LIfi 76aae38d10SBaptiste DaroussinCF_PROG_CC($cf_prog_cc) 7739f2269fSPeter Wemm 780e3d5408SPeter WemmAC_PROG_CPP 790e3d5408SPeter WemmAC_PROG_GCC_TRADITIONAL 80aae38d10SBaptiste DaroussinCF_PROG_CC_C_O(CC,[$CFLAGS $CPPFLAGS]) 814a1a9510SRong-En FanCF_PROG_LDCONFIG 820e3d5408SPeter Wemm 830e3d5408SPeter Wemmdnl DEFECT in autoconf 2.12: an attempt to set policy, this breaks the 840e3d5408SPeter Wemmdnl configure script by not letting us test if C++ 850e3d5408SPeter Wemmdnl is present, making this option necessary. 861759abf3SPeter WemmAC_MSG_CHECKING(if you want to ensure bool is consistent with C++) 870e3d5408SPeter WemmAC_ARG_WITH(cxx, 881759abf3SPeter Wemm [ --without-cxx do not adjust ncurses bool to match C++], 890e3d5408SPeter Wemm [cf_with_cxx=$withval], 900e3d5408SPeter Wemm [cf_with_cxx=yes]) 910e3d5408SPeter WemmAC_MSG_RESULT($cf_with_cxx) 921759abf3SPeter Wemmif test "X$cf_with_cxx" = Xno ; then 931759abf3SPeter Wemm CXX="" 941759abf3SPeter Wemm GXX="" 951759abf3SPeter Wemmelse 964a1a9510SRong-En Fan # with autoconf 2.13, we can change the error to a warning: 9715589c42SPeter Wemm pushdef([AC_MSG_ERROR], 984a1a9510SRong-En Fan [AC_MSG_RESULT(no) 994a1a9510SRong-En Fan AC_MSG_WARN([You don't have any C++ compiler, too bad]) 10015589c42SPeter Wemm cf_with_cxx=no; CXX=""; GXX="";])dnl 1010e3d5408SPeter Wemm AC_PROG_CXX 10215589c42SPeter Wemm popdef([AC_MSG_ERROR])dnl 103aae38d10SBaptiste Daroussin 104aae38d10SBaptiste Daroussin AC_LANG_PUSH(C++) 105aae38d10SBaptiste Daroussin if test "x$cf_with_cxx" != xno 106aae38d10SBaptiste Daroussin then 107aae38d10SBaptiste Daroussin # Several of the C++ configurations do not work, particularly when 108aae38d10SBaptiste Daroussin # cross-compiling (20140913 -TD) 109aae38d10SBaptiste Daroussin AC_MSG_CHECKING(if $CXX works) 110aae38d10SBaptiste Daroussin 111aae38d10SBaptiste Daroussin save_CPPFLAGS="$CPPFLAGS" 112aae38d10SBaptiste Daroussin eval cf_includedir=${includedir} 113aae38d10SBaptiste Daroussin CPPFLAGS="$CPPFLAGS -I${cf_includedir}" 114aae38d10SBaptiste Daroussin AC_TRY_COMPILE([ 115aae38d10SBaptiste Daroussin#include <stdlib.h> 116aae38d10SBaptiste Daroussin#include <stdio.h> 117aae38d10SBaptiste Daroussin], 118aae38d10SBaptiste Daroussin [ 119aae38d10SBaptiste Daroussin printf("Hello world!\n") 120aae38d10SBaptiste Daroussin ], 121aae38d10SBaptiste Daroussin [cf_cxx_works=yes], 122aae38d10SBaptiste Daroussin [cf_cxx_works=no]) 123aae38d10SBaptiste Daroussin CPPFLAGS="$save_CPPFLAGS" 124aae38d10SBaptiste Daroussin 125aae38d10SBaptiste Daroussin AC_MSG_RESULT($cf_cxx_works) 126aae38d10SBaptiste Daroussin if test "x$cf_cxx_works" = xno 127aae38d10SBaptiste Daroussin then 128aae38d10SBaptiste Daroussin AC_MSG_WARN([Ignore $CXX, since it cannot compile hello-world.]) 129aae38d10SBaptiste Daroussin cf_with_cxx=no; CXX=""; GXX=""; 130aae38d10SBaptiste Daroussin fi 131aae38d10SBaptiste Daroussin fi 132aae38d10SBaptiste Daroussin AC_LANG_POP 133aae38d10SBaptiste Daroussin 13473f0a83dSXin LI # autoconf 2.5x removed the error (hardcoding it to g++, or just blank) 1354a1a9510SRong-En Fan if test "$CXX" = "g++" ; then 1364a1a9510SRong-En Fan AC_PATH_PROG(CXX,g++) 1374a1a9510SRong-En Fan fi 138aae38d10SBaptiste Daroussin case "x$CXX" in 139aae38d10SBaptiste Daroussin (x|xg++) 14073f0a83dSXin LI AC_MSG_WARN([You don't have any C++ compiler, too bad]) 1414a1a9510SRong-En Fan cf_with_cxx=no; CXX=""; GXX=""; 14273f0a83dSXin LI ;; 14373f0a83dSXin LI esac 1440e3d5408SPeter Wemmfi 14518259542SPeter Wemm 1464a1a9510SRong-En FanCF_GXX_VERSION 147*7a656419SBaptiste Daroussincase "$GXX_VERSION" in 148*7a656419SBaptiste Daroussin([[1-9]][[0-9]].*) 149*7a656419SBaptiste Daroussin ;; 150*7a656419SBaptiste Daroussin(1.*|2.[[0-6]]*) 15139f2269fSPeter Wemm AC_MSG_WARN(templates do not work) 15218259542SPeter Wemm ;; 15318259542SPeter Wemmesac 1540e3d5408SPeter Wemm 1551759abf3SPeter WemmAC_MSG_CHECKING(if you want to build C++ binding and demo) 1561759abf3SPeter WemmAC_ARG_WITH(cxx-binding, 1571759abf3SPeter Wemm [ --without-cxx-binding do not build C++ binding and demo], 1581759abf3SPeter Wemm [cf_with_cxx_binding=$withval], 1591759abf3SPeter Wemm [cf_with_cxx_binding=$cf_with_cxx]) 1601759abf3SPeter WemmAC_MSG_RESULT($cf_with_cxx_binding) 1611759abf3SPeter Wemm 162aae38d10SBaptiste DaroussinAC_MSG_CHECKING(if you want to build with Ada) 1630e3d5408SPeter WemmAC_MSG_RESULT($cf_with_ada) 1640e3d5408SPeter Wemm 16573f0a83dSXin LIAC_MSG_CHECKING(if you want to install terminal database) 16673f0a83dSXin LIAC_ARG_ENABLE(db-install, 16773f0a83dSXin LI [ --disable-db-install suppress install of terminal database], 16873f0a83dSXin LI [cf_with_db_install=$enableval], 16973f0a83dSXin LI [cf_with_db_install=yes]) 17073f0a83dSXin LIAC_MSG_RESULT($cf_with_db_install) 17173f0a83dSXin LI 17206bfebdeSXin LIAC_MSG_CHECKING(if you want to install manpages) 17306bfebdeSXin LIAC_ARG_WITH(manpages, 17406bfebdeSXin LI [ --without-manpages suppress install of manpages], 17506bfebdeSXin LI [cf_with_manpages=$withval], 17606bfebdeSXin LI [cf_with_manpages=yes]) 17706bfebdeSXin LIAC_MSG_RESULT($cf_with_manpages) 17806bfebdeSXin LI 1790e3d5408SPeter WemmAC_MSG_CHECKING(if you want to build programs such as tic) 1800e3d5408SPeter WemmAC_ARG_WITH(progs, 18173f0a83dSXin LI [ --without-progs suppress build/install with programs (e.g., tic)], 1820e3d5408SPeter Wemm [cf_with_progs=$withval], 1830e3d5408SPeter Wemm [cf_with_progs=yes]) 1840e3d5408SPeter WemmAC_MSG_RESULT($cf_with_progs) 1850e3d5408SPeter Wemm 186*7a656419SBaptiste Daroussinif test -f "$srcdir/tack/tack.h" ; then 187aae38d10SBaptiste Daroussin if test "x$cross_compiling" = xyes ; then 188aae38d10SBaptiste Daroussin CF_VERBOSE(ignoring tack because we are cross-compiling) 189aae38d10SBaptiste Daroussin cf_with_tack=no 190aae38d10SBaptiste Daroussin else 191aae38d10SBaptiste Daroussin AC_MSG_CHECKING(if you want to build the tack program) 192aae38d10SBaptiste Daroussin AC_ARG_WITH(tack, 193aae38d10SBaptiste Daroussin [ --without-tack suppress build/install with tack program], 194aae38d10SBaptiste Daroussin [cf_with_tack=$withval], 195aae38d10SBaptiste Daroussin [cf_with_tack=$cf_with_progs]) 196aae38d10SBaptiste Daroussin AC_MSG_RESULT($cf_with_tack) 197aae38d10SBaptiste Daroussin fi 198aae38d10SBaptiste Daroussinelse 199aae38d10SBaptiste Daroussin cf_with_tack=no 200aae38d10SBaptiste Daroussinfi 201aae38d10SBaptiste Daroussin 20206bfebdeSXin LIAC_MSG_CHECKING(if you want to build test-programs) 20306bfebdeSXin LIAC_ARG_WITH(tests, 20473f0a83dSXin LI [ --without-tests suppress build/install with test-programs], 20506bfebdeSXin LI [cf_with_tests=$withval], 20606bfebdeSXin LI [cf_with_tests=yes]) 20706bfebdeSXin LIAC_MSG_RESULT($cf_with_tests) 20806bfebdeSXin LI 2097a69bbfbSPeter WemmAC_MSG_CHECKING(if you wish to install curses.h) 2107a69bbfbSPeter WemmAC_ARG_WITH(curses-h, 2117a69bbfbSPeter Wemm [ --without-curses-h install curses.h as ncurses.h only], 2127a69bbfbSPeter Wemm [with_curses_h=$withval], 2137a69bbfbSPeter Wemm [with_curses_h=yes]) 2147a69bbfbSPeter WemmAC_MSG_RESULT($with_curses_h) 2157a69bbfbSPeter Wemm 2160e3d5408SPeter Wemmmodules_to_build="ncurses" 217aae38d10SBaptiste Daroussintest "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs" 218aae38d10SBaptiste Daroussintest "X$cf_with_tack" != Xno && modules_to_build="$modules_to_build tack" 2190e3d5408SPeter Wemmmodules_to_build="$modules_to_build panel menu form" 2200e3d5408SPeter Wemm 22118259542SPeter WemmAC_ARG_PROGRAM 2224a1a9510SRong-En Fan 2234a1a9510SRong-En FanCF_PROG_AWK 2240e3d5408SPeter WemmCF_PROG_INSTALL 2254a1a9510SRong-En FanCF_PROG_LINT 22606bfebdeSXin LICF_PROG_LN_S 2274a1a9510SRong-En Fan 2285ca44d1cSRong-En FanAC_SYS_LONG_FILE_NAMES 2295ca44d1cSRong-En Fan 230aae38d10SBaptiste Daroussin# Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case 231aae38d10SBaptiste Daroussin# of package conflict. 232aae38d10SBaptiste Daroussincf_config_suffix= 233aae38d10SBaptiste DaroussinAC_ARG_WITH(config-suffix, 234aae38d10SBaptiste Daroussin [ --with-config-suffix=X suffixes ncursesXX-config file], 235aae38d10SBaptiste Daroussin [case "x$withval" in 236aae38d10SBaptiste Daroussin (xyes|xno) 237aae38d10SBaptiste Daroussin AC_MSG_WARN(expected a value for config-suffix option) 238aae38d10SBaptiste Daroussin ;; 239aae38d10SBaptiste Daroussin (*) cf_config_suffix="$withval" 240aae38d10SBaptiste Daroussin ;; 241aae38d10SBaptiste Daroussin esac]) 242aae38d10SBaptiste DaroussinAC_SUBST(cf_config_suffix) 243aae38d10SBaptiste Daroussin 244aae38d10SBaptiste Daroussin# If we find pkg-config, check if we should install the ".pc" files. 24506bfebdeSXin LICF_PKG_CONFIG 24673f0a83dSXin LICF_WITH_PKG_CONFIG_LIBDIR 24773f0a83dSXin LICF_ENABLE_PC_FILES 248aae38d10SBaptiste Daroussinif test -z "$MAKE_PC_FILES" 249aae38d10SBaptiste Daroussinthen 250aae38d10SBaptiste Daroussin AC_MSG_CHECKING(for suffix to add to pc-files) 251aae38d10SBaptiste DaroussinAC_ARG_WITH(pc-suffix, 252aae38d10SBaptiste Daroussin [ --with-pc-suffix suffixes pc-files], 253aae38d10SBaptiste Daroussin [case "x$withval" in 254aae38d10SBaptiste Daroussin (xyes|xno) 255aae38d10SBaptiste Daroussin PC_MODULE_SUFFIX= 256aae38d10SBaptiste Daroussin ;; 257aae38d10SBaptiste Daroussin (*) PC_MODULE_SUFFIX="$withval" 258aae38d10SBaptiste Daroussin ;; 259aae38d10SBaptiste Daroussin esac]) 260aae38d10SBaptiste Daroussin test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none 261aae38d10SBaptiste Daroussin AC_MSG_RESULT($PC_MODULE_SUFFIX) 262aae38d10SBaptiste Daroussin test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX= 263aae38d10SBaptiste Daroussin AC_SUBST(PC_MODULE_SUFFIX) 264aae38d10SBaptiste Daroussinfi 26506bfebdeSXin LI 2665ca44d1cSRong-En FanAC_MSG_CHECKING(if we should assume mixed-case filenames) 2675ca44d1cSRong-En FanAC_ARG_ENABLE(mixed-case, 2685ca44d1cSRong-En Fan [ --enable-mixed-case tic should assume mixed-case filenames], 2695ca44d1cSRong-En Fan [enable_mixedcase=$enableval], 2705ca44d1cSRong-En Fan [enable_mixedcase=auto]) 2715ca44d1cSRong-En FanAC_MSG_RESULT($enable_mixedcase) 2725ca44d1cSRong-En Fanif test "$enable_mixedcase" = "auto" ; then 2735ca44d1cSRong-En Fan CF_MIXEDCASE_FILENAMES 2745ca44d1cSRong-En Fanelse 2755ca44d1cSRong-En Fan cf_cv_mixedcase=$enable_mixedcase 27673f0a83dSXin LI if test "x$enable_mixedcase" = "xyes" ; then 27773f0a83dSXin LI AC_DEFINE(MIXEDCASE_FILENAMES,1,[Define to 1 if tic should assume mixed-case filenames]) 2785ca44d1cSRong-En Fan fi 2795ca44d1cSRong-En Fanfi 2805ca44d1cSRong-En Fan 2815ca44d1cSRong-En Fan# do this after mixed-case option (tags/TAGS is not as important as tic). 2824a1a9510SRong-En FanAC_PROG_MAKE_SET 2834a1a9510SRong-En FanCF_MAKE_TAGS 2844a1a9510SRong-En FanCF_MAKEFLAGS 2854a1a9510SRong-En Fan 2860e3d5408SPeter Wemmdnl These are standard among *NIX systems, but not when cross-compiling 2874a1a9510SRong-En FanAC_CHECK_TOOL(RANLIB, ranlib, ':') 2884a1a9510SRong-En FanAC_CHECK_TOOL(LD, ld, ld) 2894a1a9510SRong-En FanAC_CHECK_TOOL(AR, ar, ar) 29073f0a83dSXin LIAC_CHECK_TOOL(NM, nm, nm) 29106bfebdeSXin LICF_AR_FLAGS 2920e3d5408SPeter Wemm 2930e3d5408SPeter Wemmdnl Special option for use by system-builders: the install-prefix is used to 2940e3d5408SPeter Wemmdnl adjust the location into which the actual install is done, so that an 2950e3d5408SPeter Wemmdnl archive can be built without modifying the host system's configuration. 2960e3d5408SPeter WemmAC_MSG_CHECKING(if you have specified an install-prefix) 2970e3d5408SPeter WemmAC_ARG_WITH(install-prefix, 2984a1a9510SRong-En Fan [ --with-install-prefix prefixes actual install-location ($DESTDIR)], 299aae38d10SBaptiste Daroussin [case "x$withval" in 300aae38d10SBaptiste Daroussin (xyes|xno) 3010e3d5408SPeter Wemm ;; 302aae38d10SBaptiste Daroussin (*) DESTDIR="$withval" 3030e3d5408SPeter Wemm ;; 3040e3d5408SPeter Wemm esac]) 30518259542SPeter WemmAC_MSG_RESULT($DESTDIR) 30618259542SPeter WemmAC_SUBST(DESTDIR) 3070e3d5408SPeter Wemm 3080e3d5408SPeter Wemm############################################################################### 3094a1a9510SRong-En FanCF_HELP_MESSAGE(Build-Tools Needed to Compile Temporary Applications for Cross-compiling:) 3104a1a9510SRong-En Fan# If we're cross-compiling, allow the user to override the tools and their 3114a1a9510SRong-En Fan# options. The configure script is oriented toward identifying the host 3124a1a9510SRong-En Fan# compiler, etc., but we need a build compiler to generate parts of the source. 313*7a656419SBaptiste Daroussin 314*7a656419SBaptiste Daroussincase "$cf_cv_system_name" in 315*7a656419SBaptiste Daroussin(*-msvc*) 316*7a656419SBaptiste Daroussin LDFLAGS="$LDFLAGS user32.lib" 317*7a656419SBaptiste Daroussin export LDFLAGS 318*7a656419SBaptiste Daroussin ;; 319*7a656419SBaptiste Daroussinesac 320*7a656419SBaptiste Daroussin 3214a1a9510SRong-En FanCF_BUILD_CC 3224a1a9510SRong-En Fan 3234a1a9510SRong-En Fan############################################################################### 3240e3d5408SPeter WemmCF_HELP_MESSAGE(Options to Specify the Libraries Built/Used:) 3250e3d5408SPeter Wemm 3260e3d5408SPeter Wemm### Options to allow the user to specify the set of libraries which are used. 3270e3d5408SPeter Wemm### Use "--without-normal --with-shared" to allow the default model to be 3280e3d5408SPeter Wemm### shared, for example. 3290e3d5408SPeter Wemmcf_list_models="" 33015589c42SPeter WemmAC_SUBST(cf_list_models)dnl the complete list of models ("normal debug") 3310e3d5408SPeter Wemm 3324a1a9510SRong-En FanCF_WITH_LIBTOOL 3334a1a9510SRong-En Fanif test "$with_libtool" != "no" ; then 3344a1a9510SRong-En Fan 3357a69bbfbSPeter Wemmcf_list_models="$cf_list_models libtool" 3364a1a9510SRong-En Fan 3377a69bbfbSPeter Wemmelse 3387a69bbfbSPeter Wemm 3390e3d5408SPeter WemmAC_MSG_CHECKING(if you want to build shared libraries) 3400e3d5408SPeter WemmAC_ARG_WITH(shared, 3410e3d5408SPeter Wemm [ --with-shared generate shared-libraries], 3420e3d5408SPeter Wemm [with_shared=$withval], 3430e3d5408SPeter Wemm [with_shared=no]) 3440e3d5408SPeter WemmAC_MSG_RESULT($with_shared) 34573f0a83dSXin LItest "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared" 3460e3d5408SPeter Wemm 3470e3d5408SPeter WemmAC_MSG_CHECKING(if you want to build static libraries) 3480e3d5408SPeter WemmAC_ARG_WITH(normal, 3490e3d5408SPeter Wemm [ --with-normal generate normal-libraries (default)], 3500e3d5408SPeter Wemm [with_normal=$withval], 3510e3d5408SPeter Wemm [with_normal=yes]) 3520e3d5408SPeter WemmAC_MSG_RESULT($with_normal) 35373f0a83dSXin LItest "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal" 3540e3d5408SPeter Wemm 3550e3d5408SPeter WemmAC_MSG_CHECKING(if you want to build debug libraries) 3560e3d5408SPeter WemmAC_ARG_WITH(debug, 3570e3d5408SPeter Wemm [ --with-debug generate debug-libraries (default)], 3580e3d5408SPeter Wemm [with_debug=$withval], 3590e3d5408SPeter Wemm [with_debug=yes]) 3600e3d5408SPeter WemmAC_MSG_RESULT($with_debug) 36173f0a83dSXin LItest "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug" 3620e3d5408SPeter Wemm 3630e3d5408SPeter WemmAC_MSG_CHECKING(if you want to build profiling libraries) 3640e3d5408SPeter WemmAC_ARG_WITH(profile, 3650e3d5408SPeter Wemm [ --with-profile generate profile-libraries], 3660e3d5408SPeter Wemm [with_profile=$withval], 3670e3d5408SPeter Wemm [with_profile=no]) 3680e3d5408SPeter WemmAC_MSG_RESULT($with_profile) 36973f0a83dSXin LItest "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile" 3700e3d5408SPeter Wemm 3714a1a9510SRong-En Fanfi 3724a1a9510SRong-En Fan 37373f0a83dSXin LIif test "X$cf_with_cxx_binding" != Xno; then 37473f0a83dSXin LIif test "x$with_shared" = "xyes"; then 37573f0a83dSXin LIAC_MSG_CHECKING(if you want to build C++ shared libraries) 37673f0a83dSXin LIAC_ARG_WITH(cxx-shared, 37773f0a83dSXin LI [ --with-cxx-shared generate C++ shared-libraries], 37873f0a83dSXin LI [with_shared_cxx=$withval], 37973f0a83dSXin LI [with_shared_cxx=no]) 38073f0a83dSXin LIAC_MSG_RESULT($with_shared_cxx) 38173f0a83dSXin LIfi 38273f0a83dSXin LIfi 38373f0a83dSXin LI 38415589c42SPeter Wemm############################################################################### 38515589c42SPeter Wemm 38615589c42SPeter WemmAC_MSG_CHECKING(for specified models) 38715589c42SPeter Wemmtest -z "$cf_list_models" && cf_list_models=normal 3887a69bbfbSPeter Wemmdnl If we use libtool to generate libraries, then it must be the only 3897a69bbfbSPeter Wemmdnl specified model. 3904a1a9510SRong-En Fantest "$with_libtool" != "no" && cf_list_models=libtool 39115589c42SPeter WemmAC_MSG_RESULT($cf_list_models) 39215589c42SPeter Wemm 39315589c42SPeter Wemm### Use the first model as the default, and save its suffix for use in building 39415589c42SPeter Wemm### up test-applications. 39515589c42SPeter WemmAC_MSG_CHECKING(for default model) 3964a1a9510SRong-En FanDFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'` 39715589c42SPeter WemmAC_MSG_RESULT($DFT_LWR_MODEL) 39815589c42SPeter Wemm 39915589c42SPeter WemmCF_UPPER(DFT_UPR_MODEL,$DFT_LWR_MODEL)dnl 40015589c42SPeter Wemm 40115589c42SPeter WemmAC_SUBST(DFT_LWR_MODEL)dnl the default model ("normal") 40215589c42SPeter WemmAC_SUBST(DFT_UPR_MODEL)dnl the default model ("NORMAL") 40315589c42SPeter Wemm 4045ca44d1cSRong-En FanTICS_NAME=tic 4055ca44d1cSRong-En FanAC_SUBST(TICS_NAME) 4065ca44d1cSRong-En Fan 40715589c42SPeter WemmTINFO_NAME=tinfo 40815589c42SPeter WemmAC_SUBST(TINFO_NAME) 40915589c42SPeter Wemm 41015589c42SPeter WemmLIB_NAME=ncurses 41115589c42SPeter WemmAC_SUBST(LIB_NAME) 41215589c42SPeter Wemm 41315589c42SPeter WemmLIB_DIR=../lib 4144a1a9510SRong-En FanLIB_2ND=../../lib 4154a1a9510SRong-En Fan 41673f0a83dSXin LICF_WITH_LIB_PREFIX(cf_prefix) 41715589c42SPeter Wemm 41815589c42SPeter WemmLIB_SUFFIX= 41915589c42SPeter WemmAC_SUBST(LIB_SUFFIX) 42073f0a83dSXin LICF_PATHSEP 42115589c42SPeter Wemm 42215589c42SPeter Wemm############################################################################### 42315589c42SPeter Wemm 4240e3d5408SPeter WemmAC_MSG_CHECKING(if you want to build a separate terminfo library) 4250e3d5408SPeter WemmAC_ARG_WITH(termlib, 4260e3d5408SPeter Wemm [ --with-termlib generate separate terminfo library], 4270e3d5408SPeter Wemm [with_termlib=$withval], 4280e3d5408SPeter Wemm [with_termlib=no]) 4290e3d5408SPeter WemmAC_MSG_RESULT($with_termlib) 4300e3d5408SPeter Wemm 4315ca44d1cSRong-En FanAC_MSG_CHECKING(if you want to build a separate tic library) 4325ca44d1cSRong-En FanAC_ARG_WITH(ticlib, 4335ca44d1cSRong-En Fan [ --with-ticlib generate separate tic library], 4345ca44d1cSRong-En Fan [with_ticlib=$withval], 4355ca44d1cSRong-En Fan [with_ticlib=no]) 4365ca44d1cSRong-En FanAC_MSG_RESULT($with_ticlib) 4375ca44d1cSRong-En Fan 438aae38d10SBaptiste Daroussindnl Not all ports of gcc support the -g option 439aae38d10SBaptiste Daroussin 440aae38d10SBaptiste Daroussinif test X"$CC_G_OPT" = X"" ; then 441aae38d10SBaptiste Daroussin CC_G_OPT='-g' 442aae38d10SBaptiste Daroussin test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT='' 443aae38d10SBaptiste Daroussinfi 444aae38d10SBaptiste DaroussinAC_SUBST(CC_G_OPT) 445aae38d10SBaptiste Daroussin 446aae38d10SBaptiste Daroussinif test X"$CXX_G_OPT" = X"" ; then 447aae38d10SBaptiste Daroussin CXX_G_OPT='-g' 448aae38d10SBaptiste Daroussin test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT='' 449aae38d10SBaptiste Daroussinfi 450aae38d10SBaptiste DaroussinAC_SUBST(CXX_G_OPT) 451aae38d10SBaptiste Daroussin 452aae38d10SBaptiste DaroussinAC_MSG_CHECKING(for default loader flags) 453*7a656419SBaptiste Daroussincase "$DFT_LWR_MODEL" in 454aae38d10SBaptiste Daroussin(libtool) LD_MODEL='' ;; 455aae38d10SBaptiste Daroussin(normal) LD_MODEL='' ;; 456aae38d10SBaptiste Daroussin(debug) LD_MODEL=$CC_G_OPT ;; 457aae38d10SBaptiste Daroussin(profile) LD_MODEL='-pg';; 458aae38d10SBaptiste Daroussin(shared) LD_MODEL='' ;; 459aae38d10SBaptiste Daroussinesac 460aae38d10SBaptiste DaroussinAC_SUBST(LD_MODEL)dnl the type of link (e.g., -g or -pg) 461aae38d10SBaptiste DaroussinAC_MSG_RESULT($LD_MODEL) 462aae38d10SBaptiste Daroussin 463*7a656419SBaptiste Daroussincase "$DFT_LWR_MODEL" in 464aae38d10SBaptiste Daroussin(shared) 465aae38d10SBaptiste DaroussinCF_ENABLE_RPATH 466aae38d10SBaptiste DaroussinAC_MSG_CHECKING(if shared libraries should be relinked during install) 467aae38d10SBaptiste DaroussinAC_ARG_ENABLE(relink, 468aae38d10SBaptiste Daroussin[ --disable-relink relink shared libraries during install], 469aae38d10SBaptiste Daroussin[cf_cv_do_relink=$enableval], 470aae38d10SBaptiste Daroussin[cf_cv_do_relink=yes]) 471aae38d10SBaptiste DaroussinAC_MSG_RESULT($cf_cv_do_relink) 472aae38d10SBaptiste Daroussin ;; 473aae38d10SBaptiste Daroussinesac 474aae38d10SBaptiste Daroussin 475aae38d10SBaptiste Daroussin# we will build libraries one-level down. 476aae38d10SBaptiste Daroussinrel_builddir=.. 477aae38d10SBaptiste DaroussinCF_SHARED_OPTS 478aae38d10SBaptiste Daroussinfor model in $cf_list_models ; do 479*7a656419SBaptiste Daroussin case "$model" in 480aae38d10SBaptiste Daroussin (libtool) 481aae38d10SBaptiste Daroussin CF_WITH_LIBTOOL_OPTS 482aae38d10SBaptiste Daroussin CF_WITH_EXPORT_SYMS 483aae38d10SBaptiste Daroussin ;; 484aae38d10SBaptiste Daroussin (shared) 485aae38d10SBaptiste Daroussin if test "$CC_SHARED_OPTS" = "unknown"; then 486aae38d10SBaptiste Daroussin AC_ERROR(Shared libraries are not supported in this version) 487aae38d10SBaptiste Daroussin fi 488aae38d10SBaptiste Daroussin # workaround for inept transition to PIE vs PIC... 489aae38d10SBaptiste Daroussin AC_MSG_CHECKING(if current CFLAGS link properly) 490aae38d10SBaptiste Daroussin AC_TRY_LINK( 491aae38d10SBaptiste Daroussin [#include <stdio.h>], 492*7a656419SBaptiste Daroussin [printf("Hello work\\n");], 493aae38d10SBaptiste Daroussin [cf_cflags_work=yes], 494aae38d10SBaptiste Daroussin [cf_cflags_work=no]) 495aae38d10SBaptiste Daroussin AC_MSG_RESULT($cf_cflags_work) 496aae38d10SBaptiste Daroussin if test "$cf_cflags_work" = no 497aae38d10SBaptiste Daroussin then 498aae38d10SBaptiste Daroussin CF_VERBOSE(try to work around by appending shared-options) 499aae38d10SBaptiste Daroussin CFLAGS="$CFLAGS $CC_SHARED_OPTS" 500aae38d10SBaptiste Daroussin fi 501aae38d10SBaptiste Daroussin CF_WITH_VERSIONED_SYMS 502aae38d10SBaptiste Daroussin ;; 503aae38d10SBaptiste Daroussin esac 504aae38d10SBaptiste Daroussindone 505aae38d10SBaptiste Daroussin 5060e3d5408SPeter Wemm### Checks for special libraries, must be done up-front. 5070e3d5408SPeter WemmSHLIB_LIST="" 5084a1a9510SRong-En FanCF_WITH_GPM 5094a1a9510SRong-En Fanif test "$with_gpm" != no ; then 5104a1a9510SRong-En Fan AC_MSG_CHECKING(if you want to load GPM dynamically) 5114a1a9510SRong-En Fan AC_ARG_WITH(dlsym, 5124a1a9510SRong-En Fan [ --without-dlsym do not use dlsym() to load GPM dynamically], 5134a1a9510SRong-En Fan [with_dlsym=$withval], 5144a1a9510SRong-En Fan [with_dlsym=yes]) 5154a1a9510SRong-En Fan AC_MSG_RESULT($with_dlsym) 51673f0a83dSXin LI if test "x$with_dlsym" = xyes ; then 5174a1a9510SRong-En Fan CF_FUNC_DLSYM 51873f0a83dSXin LI if test "x$with_gpm" != xyes ; then 5194a1a9510SRong-En Fan CF_VERBOSE(assuming soname for gpm is $with_gpm) 5204a1a9510SRong-En Fan cf_cv_gpm_soname="$with_gpm" 5214a1a9510SRong-En Fan else 5224a1a9510SRong-En Fan CF_LIB_SONAME([#include <gpm.h>],[if (Gpm_Open(0,0)) Gpm_Close();],gpm) 5230e3d5408SPeter Wemm fi 52473f0a83dSXin LI test "$cf_cv_gpm_soname" != "unknown" && AC_DEFINE_UNQUOTED(LIBGPM_SONAME,"$cf_cv_gpm_soname",[Define as needed to set the gpm share library soname]) 5254a1a9510SRong-En Fan SHLIB_LIST="-ldl $SHLIB_LIST" 526aae38d10SBaptiste Daroussin CF_ADD_LIB(dl,PRIVATE_LIBS) 5274a1a9510SRong-En Fan else 5284a1a9510SRong-En Fan SHLIB_LIST="-lgpm $SHLIB_LIST" 52906bfebdeSXin LI CF_ADD_LIB(gpm,TEST_LIBS) 530aae38d10SBaptiste Daroussin CF_ADD_LIB(gpm,PRIVATE_LIBS) 5314a1a9510SRong-En Fan fi 53273f0a83dSXin LI AC_DEFINE(HAVE_LIBGPM,1,[Define to 1 if we have the gpm library]) 5335ca44d1cSRong-En Fan CF_CHECK_GPM_WGETCH 5344a1a9510SRong-En Fanfi 5354a1a9510SRong-En Fan 536aae38d10SBaptiste DaroussinCF_WITH_PCRE2 5374a1a9510SRong-En FanCF_WITH_SYSMOUSE 5380e3d5408SPeter Wemm 539aae38d10SBaptiste Daroussin# pretend that ncurses==ncursesw==ncursest 540aae38d10SBaptiste DaroussinAC_MSG_CHECKING(if you want to disable library suffixes) 541aae38d10SBaptiste DaroussinCF_ARG_DISABLE(lib-suffixes, 542aae38d10SBaptiste Daroussin [ --disable-lib-suffixes disable library suffixes], 543aae38d10SBaptiste Daroussin [disable_lib_suffixes=yes], 544aae38d10SBaptiste Daroussin [disable_lib_suffixes=no], 545aae38d10SBaptiste Daroussin no) 546aae38d10SBaptiste DaroussinAC_MSG_RESULT($disable_lib_suffixes) 5470e3d5408SPeter Wemm 54806bfebdeSXin LI### If we're building with rpath, try to link non-standard libs that way too. 549aae38d10SBaptiste Daroussinif test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then 55006bfebdeSXin LI CF_DISABLE_RPATH_HACK 55106bfebdeSXin LIfi 55206bfebdeSXin LI 553*7a656419SBaptiste Daroussin### Depending on the system, someone may use rpath to build ncurses but not 554*7a656419SBaptiste Daroussin# want users of the package to rely upon that feature. Give those people an 555*7a656419SBaptiste Daroussin# option to suppress that detail from EXTRA_LDFLAGS. 556*7a656419SBaptiste DaroussinEXTRA_PKG_LDFLAGS="$EXTRA_LDFLAGS" 557*7a656419SBaptiste Daroussinif test -n "$EXTRA_PKG_LDFLAGS" 558*7a656419SBaptiste Daroussinthen 559*7a656419SBaptiste Daroussin AC_MSG_CHECKING(if you want to disable extra LDFLAGS for package-scripts) 560*7a656419SBaptiste Daroussin CF_ARG_DISABLE(pkg-ldflags, 561*7a656419SBaptiste Daroussin [ --disable-pkg-ldflags disable extra LDFLAGS for package-scripts], 562*7a656419SBaptiste Daroussin [disable_pkg_ldflags=yes], 563*7a656419SBaptiste Daroussin [disable_pkg_ldflags=no], 564*7a656419SBaptiste Daroussin no) 565*7a656419SBaptiste Daroussin AC_MSG_RESULT($disable_pkg_ldflags) 566*7a656419SBaptiste Daroussin test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS= 567*7a656419SBaptiste Daroussinfi 568*7a656419SBaptiste DaroussinAC_SUBST(EXTRA_PKG_LDFLAGS) 569*7a656419SBaptiste Daroussin 5700e3d5408SPeter Wemm############################################################################### 5710e3d5408SPeter WemmCF_HELP_MESSAGE(Fine-Tuning Your Configuration:) 5720e3d5408SPeter Wemm 573aae38d10SBaptiste Daroussin### use option --with-extra-suffix to append suffix to headers and libraries 574aae38d10SBaptiste DaroussinAC_MSG_CHECKING(if you wish to append extra suffix to header/library paths) 575aae38d10SBaptiste DaroussinEXTRA_SUFFIX= 576aae38d10SBaptiste DaroussinAC_ARG_WITH(extra-suffix, 577aae38d10SBaptiste Daroussin [ --with-extra-suffix=X append extra suffix to header/library paths], 578aae38d10SBaptiste Daroussin [case x$withval in 579*7a656419SBaptiste Daroussin (xno) 580aae38d10SBaptiste Daroussin ;; 581aae38d10SBaptiste Daroussin (xyes|x) 582aae38d10SBaptiste Daroussin EXTRA_SUFFIX=$cf_cv_abi_version 583aae38d10SBaptiste Daroussin ;; 584aae38d10SBaptiste Daroussin (*) 585aae38d10SBaptiste Daroussin EXTRA_SUFFIX=$withval 586aae38d10SBaptiste Daroussin ;; 587aae38d10SBaptiste Daroussin esac 588aae38d10SBaptiste Daroussin ]) 589aae38d10SBaptiste DaroussinAC_MSG_RESULT($EXTRA_SUFFIX) 590aae38d10SBaptiste DaroussinAC_SUBST(EXTRA_SUFFIX) 591aae38d10SBaptiste Daroussin 5920e3d5408SPeter Wemm### use option --disable-overwrite to leave out the link to -lcurses 5930e3d5408SPeter WemmAC_MSG_CHECKING(if you wish to install ncurses overwriting curses) 5940e3d5408SPeter WemmAC_ARG_ENABLE(overwrite, 595aae38d10SBaptiste Daroussin [ --disable-overwrite put headers in subdir, omit link to -lcurses], 59615589c42SPeter Wemm [with_overwrite=$enableval], 5974a1a9510SRong-En Fan [if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi]) 5980e3d5408SPeter WemmAC_MSG_RESULT($with_overwrite) 5990e3d5408SPeter Wemm 6000e3d5408SPeter WemmAC_MSG_CHECKING(if external terminfo-database is used) 6010e3d5408SPeter WemmAC_ARG_ENABLE(database, 60239f2269fSPeter Wemm [ --disable-database do not use terminfo, only fallbacks/termcap], 60318259542SPeter Wemm [use_database=$enableval], 60418259542SPeter Wemm [use_database=yes]) 60518259542SPeter WemmAC_MSG_RESULT($use_database) 60618259542SPeter Wemm 607*7a656419SBaptiste Daroussincase "$host_os" in 608aae38d10SBaptiste Daroussin(os2*) 60918259542SPeter Wemm TERMINFO_SRC='${top_srcdir}/misc/emx.src' 61018259542SPeter Wemm ;; 611aae38d10SBaptiste Daroussin(*) 61218259542SPeter Wemm TERMINFO_SRC='${top_srcdir}/misc/terminfo.src' 61318259542SPeter Wemm ;; 61418259542SPeter Wemmesac 61518259542SPeter WemmAC_SUBST(TERMINFO_SRC) 61618259542SPeter Wemm 61773f0a83dSXin LINCURSES_USE_DATABASE=0 61818259542SPeter Wemmif test "$use_database" != no ; then 61973f0a83dSXin LI NCURSES_USE_DATABASE=1 6204a1a9510SRong-En Fan 62118259542SPeter Wemm AC_MSG_CHECKING(which terminfo source-file will be installed) 62206bfebdeSXin LI AC_ARG_WITH(database, 62318259542SPeter Wemm [ --with-database=XXX specify terminfo source to install], 62418259542SPeter Wemm [TERMINFO_SRC=$withval]) 62518259542SPeter Wemm AC_MSG_RESULT($TERMINFO_SRC) 6264a1a9510SRong-En Fan 6274a1a9510SRong-En Fan AC_MSG_CHECKING(whether to use hashed database instead of directory/tree) 6284a1a9510SRong-En Fan AC_ARG_WITH(hashed-db, 6294a1a9510SRong-En Fan [ --with-hashed-db specify hashed-database library],, 6304a1a9510SRong-En Fan [with_hashed_db=no]) 6314a1a9510SRong-En Fan AC_MSG_RESULT($with_hashed_db) 6325d08fb1fSRong-En Fanelse 6335d08fb1fSRong-En Fan with_hashed_db=no 63418259542SPeter Wemmfi 63573f0a83dSXin LIAC_SUBST(NCURSES_USE_DATABASE) 6360e3d5408SPeter Wemm 6370e3d5408SPeter WemmAC_MSG_CHECKING(for list of fallback descriptions) 6380e3d5408SPeter WemmAC_ARG_WITH(fallbacks, 6390e3d5408SPeter Wemm [ --with-fallbacks=XXX specify list of fallback terminal descriptions], 6400e3d5408SPeter Wemm [with_fallback=$withval], 6410e3d5408SPeter Wemm [with_fallback=]) 6420e3d5408SPeter WemmAC_MSG_RESULT($with_fallback) 643aae38d10SBaptiste Daroussin 644aae38d10SBaptiste Daroussincase ".$with_fallback" in 645aae38d10SBaptiste Daroussin(.|.no) 646aae38d10SBaptiste Daroussin FALLBACK_LIST= 647aae38d10SBaptiste Daroussin ;; 648aae38d10SBaptiste Daroussin(.yes) 649aae38d10SBaptiste Daroussin AC_MSG_WARN(expected a list of terminal descriptions) 650aae38d10SBaptiste Daroussin ;; 651aae38d10SBaptiste Daroussin(*) 6524a1a9510SRong-En Fan FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'` 653aae38d10SBaptiste Daroussin ;; 654aae38d10SBaptiste Daroussinesac 655aae38d10SBaptiste Daroussin 656aae38d10SBaptiste Daroussin# The fallback feature in ncurses relies upon tic/infocmp outside the build 657aae38d10SBaptiste Daroussin# tree for generating the terminal descriptions that will be compiled into the 658aae38d10SBaptiste Daroussin# library. If your toolchain is old, it may not handle current terminal 659aae38d10SBaptiste Daroussin# databases. Use configure-options to point to the tools which will be used, 660aae38d10SBaptiste Daroussin# rather than the first ones found on the $PATH. 661*7a656419SBaptiste DaroussinAC_CHECK_TOOL(TIC, tic) 662*7a656419SBaptiste DaroussinAC_CHECK_TOOL(INFOCMP, infocmp) 663aae38d10SBaptiste Daroussinif test -n "$FALLBACK_LIST" 664aae38d10SBaptiste Daroussinthen 665aae38d10SBaptiste Daroussin CF_WITH_PATH_PROG(TIC, tic, [for fallbacks], $PATH:/usr/local/ncurses/bin) 666aae38d10SBaptiste Daroussin CF_WITH_PATH_PROG(INFOCMP, infocmp, [for fallbacks], $PATH:/usr/local/ncurses/bin) 667*7a656419SBaptiste Daroussin test -z "$TIC" && FALLBACK_LIST= 668*7a656419SBaptiste Daroussin test -z "$INFOCMP" && FALLBACK_LIST= 669*7a656419SBaptiste Daroussin if test -z "$FALLBACK_LIST" 670*7a656419SBaptiste Daroussin then 671*7a656419SBaptiste Daroussin AC_MSG_WARN(ignoring fallback option because tic/infocmp are not available) 672*7a656419SBaptiste Daroussin fi 673aae38d10SBaptiste Daroussinfi 674aae38d10SBaptiste DaroussinAC_SUBST(TIC) 675aae38d10SBaptiste DaroussinAC_SUBST(INFOCMP) 6760e3d5408SPeter Wemm 677*7a656419SBaptiste DaroussinUSE_FALLBACKS= 678*7a656419SBaptiste Daroussintest -z "$FALLBACK_LIST" && USE_FALLBACKS="#" 679*7a656419SBaptiste DaroussinAC_SUBST(FALLBACK_LIST) 680*7a656419SBaptiste DaroussinAC_SUBST(USE_FALLBACKS) 681*7a656419SBaptiste Daroussin 6824a1a9510SRong-En FanAC_MSG_CHECKING(if you want modern xterm or antique) 6834a1a9510SRong-En FanAC_ARG_WITH(xterm-new, 6844a1a9510SRong-En Fan [ --without-xterm-new specify if xterm terminfo should be old version], 6854a1a9510SRong-En Fan [with_xterm_new=$withval], 6864a1a9510SRong-En Fan [with_xterm_new=yes]) 687*7a656419SBaptiste Daroussincase "$with_xterm_new" in 688aae38d10SBaptiste Daroussin(no) with_xterm_new=xterm-old;; 689aae38d10SBaptiste Daroussin(*) with_xterm_new=xterm-new;; 6904a1a9510SRong-En Fanesac 6914a1a9510SRong-En FanAC_MSG_RESULT($with_xterm_new) 6924a1a9510SRong-En FanWHICH_XTERM=$with_xterm_new 6934a1a9510SRong-En FanAC_SUBST(WHICH_XTERM) 6944a1a9510SRong-En Fan 69573f0a83dSXin LIAC_MSG_CHECKING(if xterm backspace sends BS or DEL) 69673f0a83dSXin LIAC_ARG_WITH(xterm-kbs, 69773f0a83dSXin LI [ --with-xterm-kbs=XXX specify if xterm backspace sends BS or DEL], 69873f0a83dSXin LI [with_xterm_kbs=$withval], 69973f0a83dSXin LI [with_xterm_kbs=BS]) 70073f0a83dSXin LIcase x$with_xterm_kbs in 701aae38d10SBaptiste Daroussin(xyes|xno|xBS|xbs|x8) 70273f0a83dSXin LI with_xterm_kbs=BS 70373f0a83dSXin LI ;; 704aae38d10SBaptiste Daroussin(xDEL|xdel|x127) 70573f0a83dSXin LI with_xterm_kbs=DEL 70673f0a83dSXin LI ;; 707aae38d10SBaptiste Daroussin(*) 70873f0a83dSXin LI with_xterm_kbs=$withval 70973f0a83dSXin LI ;; 71073f0a83dSXin LIesac 71173f0a83dSXin LIAC_MSG_RESULT($with_xterm_kbs) 71273f0a83dSXin LIXTERM_KBS=$with_xterm_kbs 71373f0a83dSXin LIAC_SUBST(XTERM_KBS) 71473f0a83dSXin LI 71539f2269fSPeter WemmMAKE_TERMINFO= 71618259542SPeter Wemmif test "$use_database" = no ; then 71718259542SPeter Wemm TERMINFO="${datadir}/terminfo" 71839f2269fSPeter Wemm MAKE_TERMINFO="#" 71918259542SPeter Wemmelse 72018259542SPeter Wemm 7210e3d5408SPeter WemmAC_MSG_CHECKING(for list of terminfo directories) 7220e3d5408SPeter WemmCF_WITH_PATHLIST(terminfo-dirs, 7230e3d5408SPeter Wemm [ --with-terminfo-dirs=XXX specify list of terminfo directories], 7240e3d5408SPeter Wemm TERMINFO_DIRS, 7250e3d5408SPeter Wemm DATADIR/terminfo, 7260e3d5408SPeter Wemm ${datadir}/terminfo) 7270e3d5408SPeter WemmAC_MSG_RESULT($TERMINFO_DIRS) 72873f0a83dSXin LItest -n "$TERMINFO_DIRS" && AC_DEFINE_UNQUOTED(TERMINFO_DIRS,"$TERMINFO_DIRS",[Define as needed to predefine the TERMINFO_DIR searchlist]) 7290e3d5408SPeter Wemm 730aae38d10SBaptiste Daroussincase "x$TERMINFO" in 731aae38d10SBaptiste Daroussinx???:*) 732aae38d10SBaptiste Daroussin AC_MSG_WARN(ignoring non-directory/file TERMINFO value) 733aae38d10SBaptiste Daroussin unset TERMINFO 734aae38d10SBaptiste Daroussin ;; 735aae38d10SBaptiste Daroussinesac 736aae38d10SBaptiste Daroussin 73718259542SPeter WemmAC_MSG_CHECKING(for default terminfo directory) 73818259542SPeter WemmCF_WITH_PATH(default-terminfo-dir, 73918259542SPeter Wemm [ --with-default-terminfo-dir=DIR default terminfo directory], 74018259542SPeter Wemm TERMINFO, 74118259542SPeter Wemm DATADIR/terminfo, 74218259542SPeter Wemm ${datadir}/terminfo) 74318259542SPeter WemmAC_MSG_RESULT($TERMINFO) 74473f0a83dSXin LIAC_DEFINE_UNQUOTED(TERMINFO,"$TERMINFO",[Define to set the default terminal database path]) 74518259542SPeter Wemm 7460e3d5408SPeter Wemmfi 74718259542SPeter Wemm 74818259542SPeter WemmAC_SUBST(TERMINFO) 74939f2269fSPeter WemmAC_SUBST(MAKE_TERMINFO) 7500e3d5408SPeter Wemm 7510e3d5408SPeter Wemm### use option --disable-big-core to make tic run on small machines 7520e3d5408SPeter Wemm### We need 4Mb, check if we can allocate 50% more than that. 7530e3d5408SPeter WemmAC_MSG_CHECKING(if big-core option selected) 7540e3d5408SPeter WemmAC_ARG_ENABLE(big-core, 7550e3d5408SPeter Wemm [ --disable-big-core assume machine has little memory], 7560e3d5408SPeter Wemm [with_big_core=$enableval], 7570e3d5408SPeter Wemm [AC_TRY_RUN([ 7580e3d5408SPeter Wemm#include <stdlib.h> 7590e3d5408SPeter Wemm#include <string.h> 76018259542SPeter Wemmint main() { 76118259542SPeter Wemm unsigned long n = 6000000L; 76218259542SPeter Wemm char *s = malloc(n); 76318259542SPeter Wemm if (s != 0) 76418259542SPeter Wemm s[0] = s[n-1] = 0; 7654a1a9510SRong-En Fan ${cf_cv_main_return:-return}(s == 0); 76618259542SPeter Wemm}], 7670e3d5408SPeter Wemm [with_big_core=yes], 7680e3d5408SPeter Wemm [with_big_core=no], 7690e3d5408SPeter Wemm [with_big_core=no])]) 7700e3d5408SPeter WemmAC_MSG_RESULT($with_big_core) 77173f0a83dSXin LItest "x$with_big_core" = "xyes" && AC_DEFINE(HAVE_BIG_CORE,1,[Define to 1 if machine has ample memory for tic]) 7720e3d5408SPeter Wemm 7735ca44d1cSRong-En Fan### ISO C only guarantees 512-char strings, we have tables which load faster 7745d08fb1fSRong-En Fan### when constructed using "big" strings. More than the C compiler, the awk 7755d08fb1fSRong-En Fan### program is a limit on most vendor UNIX systems. Check that we can build. 7765ca44d1cSRong-En FanAC_MSG_CHECKING(if big-strings option selected) 7775ca44d1cSRong-En FanAC_ARG_ENABLE(big-strings, 7785ca44d1cSRong-En Fan [ --disable-big-strings assume compiler has only standard-size strings], 7795d08fb1fSRong-En Fan [with_big_strings=$enableval], 7805d08fb1fSRong-En Fan [CF_AWK_BIG_PRINTF(12000,with_big_strings)]) 7815ca44d1cSRong-En FanAC_MSG_RESULT($with_big_strings) 7825ca44d1cSRong-En Fan 7835ca44d1cSRong-En FanUSE_BIG_STRINGS=0 78473f0a83dSXin LItest "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1 7855ca44d1cSRong-En FanAC_SUBST(USE_BIG_STRINGS) 7865ca44d1cSRong-En Fan 7870e3d5408SPeter Wemm### use option --enable-termcap to compile in the termcap fallback support 7880e3d5408SPeter WemmAC_MSG_CHECKING(if you want termcap-fallback support) 7890e3d5408SPeter WemmAC_ARG_ENABLE(termcap, 7900e3d5408SPeter Wemm [ --enable-termcap compile in termcap fallback support], 7910e3d5408SPeter Wemm [with_termcap=$enableval], 7920e3d5408SPeter Wemm [with_termcap=no]) 7930e3d5408SPeter WemmAC_MSG_RESULT($with_termcap) 7940e3d5408SPeter Wemm 79573f0a83dSXin LINCURSES_USE_TERMCAP=0 79673f0a83dSXin LIif test "x$with_termcap" != "xyes" ; then 79739f2269fSPeter Wemm if test "$use_database" = no ; then 7984a1a9510SRong-En Fan if test -z "$with_fallback" ; then 79939f2269fSPeter Wemm AC_ERROR(You have disabled the database w/o specifying fallbacks) 80039f2269fSPeter Wemm fi 80139f2269fSPeter Wemm fi 80273f0a83dSXin LI AC_DEFINE(PURE_TERMINFO,1,[Define to 1 if we should support only terminfo]) 8030e3d5408SPeter Wemmelse 8040e3d5408SPeter Wemm 8055ca44d1cSRong-En Fan if test "$with_ticlib" != no ; then 8065ca44d1cSRong-En Fan AC_ERROR(Options --with-ticlib and --enable-termcap cannot be combined) 8075ca44d1cSRong-En Fan fi 8085ca44d1cSRong-En Fan 80973f0a83dSXin LI NCURSES_USE_TERMCAP=1 81039f2269fSPeter Wemm AC_MSG_CHECKING(for list of termcap files) 81139f2269fSPeter Wemm CF_WITH_PATHLIST(termpath, 81239f2269fSPeter Wemm [ --with-termpath=XXX specify list of termcap files], 81339f2269fSPeter Wemm TERMPATH, 81439f2269fSPeter Wemm /etc/termcap:/usr/share/misc/termcap) 81539f2269fSPeter Wemm AC_MSG_RESULT($TERMPATH) 81673f0a83dSXin LI test -n "$TERMPATH" && AC_DEFINE_UNQUOTED(TERMPATH,"$TERMPATH",[Define to set the termcap searchlist]) 81739f2269fSPeter Wemm 8180e3d5408SPeter Wemm ### use option --enable-getcap to use a hacked getcap for reading termcaps 8190e3d5408SPeter Wemm AC_MSG_CHECKING(if fast termcap-loader is needed) 8200e3d5408SPeter Wemm AC_ARG_ENABLE(getcap, 8210e3d5408SPeter Wemm [ --enable-getcap fast termcap load, no xrefs to terminfo], 8220e3d5408SPeter Wemm [with_getcap=$enableval], 8230e3d5408SPeter Wemm [with_getcap=no]) 8240e3d5408SPeter Wemm AC_MSG_RESULT($with_getcap) 82573f0a83dSXin LI test "x$with_getcap" = "xyes" && AC_DEFINE(USE_GETCAP,1,[Define to 1 to use fast termcap-loader]) 8260e3d5408SPeter Wemm 8270e3d5408SPeter Wemm AC_MSG_CHECKING(if translated termcaps will be cached in ~/.terminfo) 8280e3d5408SPeter Wemm AC_ARG_ENABLE(getcap-cache, 8290e3d5408SPeter Wemm [ --enable-getcap-cache cache translated termcaps in ~/.terminfo], 8300e3d5408SPeter Wemm [with_getcap_cache=$enableval], 8310e3d5408SPeter Wemm [with_getcap_cache=no]) 8320e3d5408SPeter Wemm AC_MSG_RESULT($with_getcap_cache) 83373f0a83dSXin LI test "x$with_getcap_cache" = "xyes" && AC_DEFINE(USE_GETCAP_CACHE,1,[Define to 1 if translated termcap should be stored in $HOME/.terminfo]) 8340e3d5408SPeter Wemm 8350e3d5408SPeter Wemmfi 83673f0a83dSXin LIAC_SUBST(NCURSES_USE_TERMCAP) 8370e3d5408SPeter Wemm 8384a1a9510SRong-En Fan### Use option --disable-home-terminfo to completely remove ~/.terminfo 8394a1a9510SRong-En FanAC_MSG_CHECKING(if ~/.terminfo is wanted) 8404a1a9510SRong-En FanAC_ARG_ENABLE(home-terminfo, 8414a1a9510SRong-En Fan [ --disable-home-terminfo drop ~/.terminfo from terminfo search-path], 8424a1a9510SRong-En Fan [with_home_terminfo=$enableval], 8434a1a9510SRong-En Fan [with_home_terminfo=yes]) 8444a1a9510SRong-En FanAC_MSG_RESULT($with_home_terminfo) 84573f0a83dSXin LItest "x$with_home_terminfo" = "xyes" && AC_DEFINE(USE_HOME_TERMINFO,1,[Define to 1 if $HOME/.terminfo feature is wanted]) 8464a1a9510SRong-En Fan 8474a1a9510SRong-En FanAC_MSG_CHECKING(if you want to use restricted environment when running as root) 8484a1a9510SRong-En FanAC_ARG_ENABLE(root-environ, 8494a1a9510SRong-En Fan [ --disable-root-environ restrict environment when running as root], 8504a1a9510SRong-En Fan [with_root_environ=$enableval], 8514a1a9510SRong-En Fan [with_root_environ=yes]) 8524a1a9510SRong-En FanAC_MSG_RESULT($with_root_environ) 85373f0a83dSXin LItest "x$with_root_environ" = xyes && AC_DEFINE(USE_ROOT_ENVIRON,1,[Define to 1 if environment should be restricted for root user]) 8544a1a9510SRong-En Fan 8550e3d5408SPeter Wemm### Use option --enable-symlinks to make tic use symlinks, not hard links 8560e3d5408SPeter Wemm### to reduce storage requirements for the terminfo database. 8570e3d5408SPeter WemmCF_LINK_FUNCS 8580e3d5408SPeter Wemm 8590e3d5408SPeter Wemmwith_links=no 8600e3d5408SPeter Wemmwith_symlinks=no 8610e3d5408SPeter Wemm 8624a1a9510SRong-En Fan# soft links (symbolic links) are useful for some systems where hard links do 8634a1a9510SRong-En Fan# not work, or to make it simpler to copy terminfo trees around. 86473f0a83dSXin LIif test "x$ac_cv_func_symlink" = xyes ; then 8654a1a9510SRong-En Fan AC_MSG_CHECKING(if tic should use symbolic links) 8664a1a9510SRong-En Fan AC_ARG_ENABLE(symlinks, 8674a1a9510SRong-En Fan [ --enable-symlinks make tic use symbolic links not hard links], 8684a1a9510SRong-En Fan [with_symlinks=$enableval], 8694a1a9510SRong-En Fan [with_symlinks=no]) 8700e3d5408SPeter Wemm AC_MSG_RESULT($with_symlinks) 8714a1a9510SRong-En Fanfi 8724a1a9510SRong-En Fan 8734a1a9510SRong-En Fan# If we have hard links and did not choose to use soft links instead, there is 8744a1a9510SRong-En Fan# no reason to make this choice optional - use the hard links. 8754a1a9510SRong-En Fanif test "$with_symlinks" = no ; then 8760e3d5408SPeter Wemm AC_MSG_CHECKING(if tic should use hard links) 87773f0a83dSXin LI if test "x$ac_cv_func_link" = xyes ; then 8780e3d5408SPeter Wemm with_links=yes 8790e3d5408SPeter Wemm else 8800e3d5408SPeter Wemm with_links=no 8810e3d5408SPeter Wemm fi 8820e3d5408SPeter Wemm AC_MSG_RESULT($with_links) 8830e3d5408SPeter Wemmfi 8840e3d5408SPeter Wemm 88573f0a83dSXin LItest "x$with_links" = xyes && AC_DEFINE(USE_LINKS,1,[Define to 1 if hardlinks should be used in terminfo database]) 88673f0a83dSXin LItest "x$with_symlinks" = xyes && AC_DEFINE(USE_SYMLINKS,1,[Define to 1 if symbolic links should be used in terminfo database]) 8870e3d5408SPeter Wemm 88815589c42SPeter Wemm### use option --enable-broken-linker to force on use of broken-linker support 889e1865124SBaptiste DaroussinCF_ENABLE_BROKEN_LINKER 89039f2269fSPeter Wemm 8914a1a9510SRong-En Fan### use option --enable-bsdpad to have tputs process BSD-style prefix padding 8924a1a9510SRong-En FanAC_MSG_CHECKING(if tputs should process BSD-style prefix padding) 8934a1a9510SRong-En FanAC_ARG_ENABLE(bsdpad, 8944a1a9510SRong-En Fan [ --enable-bsdpad recognize BSD-style prefix padding], 8954a1a9510SRong-En Fan [with_bsdpad=$enableval], 8964a1a9510SRong-En Fan [with_bsdpad=no]) 8974a1a9510SRong-En FanAC_MSG_RESULT($with_bsdpad) 89873f0a83dSXin LItest "x$with_bsdpad" = xyes && AC_DEFINE(BSD_TPUTS,1,[Define to 1 to recognize BSD-style prefix padding]) 8994a1a9510SRong-En Fan 9004a1a9510SRong-En Fan### use option --enable-widec to turn on use of wide-character support 9014a1a9510SRong-En FanNCURSES_CH_T=chtype 9024a1a9510SRong-En FanNCURSES_LIBUTF8=0 9034a1a9510SRong-En Fan 9044a1a9510SRong-En FanNEED_WCHAR_H=0 9054a1a9510SRong-En FanNCURSES_MBSTATE_T=0 9064a1a9510SRong-En FanNCURSES_WCHAR_T=0 9074a1a9510SRong-En FanNCURSES_WINT_T=0 9084a1a9510SRong-En Fan 9094a1a9510SRong-En Fan# Check to define _XOPEN_SOURCE "automatically" 910aae38d10SBaptiste DaroussinCPPFLAGS_before_XOPEN="$CPPFLAGS" 911aae38d10SBaptiste DaroussinCF_XOPEN_SOURCE(600) 912aae38d10SBaptiste DaroussinCPPFLAGS_after_XOPEN="$CPPFLAGS" 9134a1a9510SRong-En Fan 9144a1a9510SRong-En Fan# Work around breakage on OS X 9154a1a9510SRong-En FanCF_SIGWINCH 9164a1a9510SRong-En Fan 9174a1a9510SRong-En Fan# Checks for CODESET support. 9184a1a9510SRong-En FanAM_LANGINFO_CODESET 9194a1a9510SRong-En Fan 9204a1a9510SRong-En Fan# use these variables to work around a defect in gcc's fixincludes. 9214a1a9510SRong-En FanNCURSES_OK_WCHAR_T= 9224a1a9510SRong-En FanNCURSES_OK_WINT_T= 9234a1a9510SRong-En Fan 9244a1a9510SRong-En FanAC_MSG_CHECKING(if you want wide-character code) 9254a1a9510SRong-En FanAC_ARG_ENABLE(widec, 9264a1a9510SRong-En Fan [ --enable-widec compile with wide-char/UTF-8 code], 9274a1a9510SRong-En Fan [with_widec=$enableval], 9284a1a9510SRong-En Fan [with_widec=no]) 9294a1a9510SRong-En FanAC_MSG_RESULT($with_widec) 930aae38d10SBaptiste Daroussin 931aae38d10SBaptiste DaroussinNCURSES_WCWIDTH_GRAPHICS=1 932aae38d10SBaptiste DaroussinAC_SUBST(NCURSES_WCWIDTH_GRAPHICS) 933aae38d10SBaptiste Daroussin 93473f0a83dSXin LIif test "x$with_widec" = xyes ; then 935aae38d10SBaptiste Daroussin if test "x$disable_lib_suffixes" = xno ; then 9364a1a9510SRong-En Fan LIB_SUFFIX="w${LIB_SUFFIX}" 937aae38d10SBaptiste Daroussin fi 93873f0a83dSXin LI AC_DEFINE(USE_WIDEC_SUPPORT,1,[Define to 1 to compile with wide-char/UTF-8 code]) 93973f0a83dSXin LI AC_DEFINE(NCURSES_WIDECHAR,1,[Define to 1 to compile with wide-char/UTF-8 code]) 94006bfebdeSXin LI 94173f0a83dSXin LI CF_CHECK_WCHAR_H 942aae38d10SBaptiste Daroussin CF_CHECK_WCWIDTH_GRAPHICS 943aae38d10SBaptiste Daroussin test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0 94406bfebdeSXin LI 9454a1a9510SRong-En Fan # with_overwrite=no 9464a1a9510SRong-En Fan NCURSES_CH_T=cchar_t 9475d08fb1fSRong-En Fan AC_CHECK_FUNCS(putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs) 94873f0a83dSXin LI if test "x$ac_cv_func_putwc" != xyes ; then 9495d08fb1fSRong-En Fan CF_UTF8_LIB 9505d08fb1fSRong-En Fan if test "$cf_cv_utf8_lib" != no ; then 9514a1a9510SRong-En Fan NCURSES_LIBUTF8=1 9524a1a9510SRong-En Fan fi 9534a1a9510SRong-En Fan fi 9544a1a9510SRong-En Fan CF_WCHAR_TYPE(mbstate_t, NCURSES_MBSTATE_T) 9554a1a9510SRong-En Fan CF_WCHAR_TYPE(wchar_t, NCURSES_WCHAR_T, NCURSES_OK_WCHAR_T) 9564a1a9510SRong-En Fan CF_WCHAR_TYPE(wint_t, NCURSES_WINT_T, NCURSES_OK_WINT_T) 9574a1a9510SRong-En Fan 9584a1a9510SRong-En Fan if test "$NCURSES_MBSTATE_T" != 0; then 95973f0a83dSXin LI AC_DEFINE(NEED_MBSTATE_T_DEF,1,[Define to 1 if we must declare mbstate_t]) 9604a1a9510SRong-En Fan fi 9614a1a9510SRong-En Fanfi 9624a1a9510SRong-En FanAC_SUBST(NCURSES_CH_T) 9634a1a9510SRong-En FanAC_SUBST(NCURSES_LIBUTF8) 9644a1a9510SRong-En Fan 9654a1a9510SRong-En FanAC_SUBST(NEED_WCHAR_H) 9664a1a9510SRong-En FanAC_SUBST(NCURSES_MBSTATE_T) 9674a1a9510SRong-En FanAC_SUBST(NCURSES_WCHAR_T) 9684a1a9510SRong-En FanAC_SUBST(NCURSES_WINT_T) 9694a1a9510SRong-En Fan 9704a1a9510SRong-En FanAC_SUBST(NCURSES_OK_WCHAR_T) 9714a1a9510SRong-En FanAC_SUBST(NCURSES_OK_WINT_T) 9724a1a9510SRong-En Fan 9734a1a9510SRong-En Fan### use option --disable-lp64 to allow long chtype 9744a1a9510SRong-En FanAC_MSG_CHECKING(whether to enable _LP64 definition in curses.h) 9754a1a9510SRong-En FanAC_ARG_ENABLE(lp64, 9764a1a9510SRong-En Fan [ --disable-lp64 allow chtype to be long (ignore _LP64)], 9774a1a9510SRong-En Fan [with_lp64=$enableval], 978aae38d10SBaptiste Daroussin [with_lp64=$cf_dft_with_lp64]) 9794a1a9510SRong-En FanAC_MSG_RESULT($with_lp64) 9804a1a9510SRong-En Fan 98173f0a83dSXin LIif test "x$with_lp64" = xyes ; then 9824a1a9510SRong-En Fan cf_cv_enable_lp64=1 9834a1a9510SRong-En Fanelse 9844a1a9510SRong-En Fan cf_cv_enable_lp64=0 9854a1a9510SRong-En Fanfi 9864a1a9510SRong-En FanAC_SUBST(cf_cv_enable_lp64) 9874a1a9510SRong-En Fan 9884a1a9510SRong-En FanCF_LARGEFILE 9894a1a9510SRong-En Fan 9904a1a9510SRong-En Fan### use option --disable-tparm-varargs to make tparm() conform to X/Open 9914a1a9510SRong-En FanAC_MSG_CHECKING(if you want tparm not to use X/Open fixed-parameter list) 9924a1a9510SRong-En FanAC_ARG_ENABLE(tparm-varargs, 9934a1a9510SRong-En Fan [ --disable-tparm-varargs compile tparm() without varargs interface], 9944a1a9510SRong-En Fan [with_tparm_varargs=$enableval], 9954a1a9510SRong-En Fan [with_tparm_varargs=yes]) 9964a1a9510SRong-En FanAC_MSG_RESULT($with_tparm_varargs) 9974a1a9510SRong-En FanNCURSES_TPARM_VARARGS=0 99873f0a83dSXin LItest "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1 9994a1a9510SRong-En FanAC_SUBST(NCURSES_TPARM_VARARGS) 10004a1a9510SRong-En Fan 10015d08fb1fSRong-En Fan### use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw 10025d08fb1fSRong-En Fanif test "$with_ticlib" != no ; then 10035d08fb1fSRong-En FanAC_MSG_CHECKING(if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library) 10045d08fb1fSRong-En FanAC_ARG_ENABLE(tic-depends, 10055d08fb1fSRong-En Fan [ --disable-tic-depends link tic library without explicit dependency on ncurses library], 10065d08fb1fSRong-En Fan [with_tic_depends=$enableval], 10075d08fb1fSRong-En Fan [with_tic_depends=yes]) 10085d08fb1fSRong-En FanAC_MSG_RESULT($with_tic_depends) 10095d08fb1fSRong-En Fanelse 10105d08fb1fSRong-En Fan with_tic_depends=no 10115d08fb1fSRong-En Fanfi 10125d08fb1fSRong-En Fan 1013aae38d10SBaptiste Daroussin### use option --disable-wattr-macros to suppress wattr* macros from curses.h 1014aae38d10SBaptiste DaroussinAC_MSG_CHECKING(if you want to suppress wattr* macros to help with ncurses5/ncurses6 transition) 1015aae38d10SBaptiste DaroussinAC_ARG_ENABLE(wattr-macros, 1016aae38d10SBaptiste Daroussin [ --disable-wattr-macros suppress wattr* macros to help with ncurses5/ncurses6 transition], 1017aae38d10SBaptiste Daroussin [with_wattr_macros=$enableval], 1018aae38d10SBaptiste Daroussin [with_wattr_macros=yes]) 1019aae38d10SBaptiste Daroussinif [[ "x$with_wattr_macros" != xyes ]]; then 1020aae38d10SBaptiste Daroussin NCURSES_WATTR_MACROS=0 1021aae38d10SBaptiste Daroussin AC_MSG_RESULT(yes) 1022aae38d10SBaptiste Daroussinelse 1023aae38d10SBaptiste Daroussin NCURSES_WATTR_MACROS=1 1024aae38d10SBaptiste Daroussin AC_MSG_RESULT(no) 1025aae38d10SBaptiste Daroussinfi 1026aae38d10SBaptiste DaroussinAC_SUBST(NCURSES_WATTR_MACROS) 1027aae38d10SBaptiste Daroussin 1028aae38d10SBaptiste DaroussinCF_WITH_X11_RGB 1029aae38d10SBaptiste Daroussin 103039f2269fSPeter Wemm### use option --with-bool to override bool's type 103139f2269fSPeter WemmAC_MSG_CHECKING(for type of bool) 103239f2269fSPeter WemmAC_ARG_WITH(bool, 103339f2269fSPeter Wemm [ --with-bool=TYPE override fallback type of bool variable], 103439f2269fSPeter Wemm [NCURSES_BOOL="$withval"], 103539f2269fSPeter Wemm [NCURSES_BOOL=auto]) 103639f2269fSPeter WemmAC_MSG_RESULT($NCURSES_BOOL) 103739f2269fSPeter WemmAC_SUBST(NCURSES_BOOL) 103815589c42SPeter Wemm 10394a1a9510SRong-En FanAC_MSG_CHECKING(for alternate terminal capabilities file) 10404a1a9510SRong-En FanAC_ARG_WITH(caps, 10414a1a9510SRong-En Fan [ --with-caps=alt compile with alternate Caps file], 10424a1a9510SRong-En Fan [TERMINFO_CAPS=Caps.$withval], 10434a1a9510SRong-En Fan [TERMINFO_CAPS=Caps]) 10444a1a9510SRong-En Fantest -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps 10454a1a9510SRong-En FanAC_MSG_RESULT($TERMINFO_CAPS) 10464a1a9510SRong-En FanAC_SUBST(TERMINFO_CAPS) 10474a1a9510SRong-En Fan 10484a1a9510SRong-En Fan### use option --with-chtype to override chtype's type 10494a1a9510SRong-En FanAC_MSG_CHECKING(for type of chtype) 10504a1a9510SRong-En FanAC_ARG_WITH(chtype, 10514a1a9510SRong-En Fan [ --with-chtype=TYPE override type of chtype], 10524a1a9510SRong-En Fan [NCURSES_CHTYPE="$withval"], 1053aae38d10SBaptiste Daroussin [NCURSES_CHTYPE=$cf_dft_chtype]) 10544a1a9510SRong-En FanAC_MSG_RESULT($NCURSES_CHTYPE) 10554a1a9510SRong-En Fan 10567a69bbfbSPeter Wemm### use option --with-ospeed to override ospeed's type 10577a69bbfbSPeter WemmAC_MSG_CHECKING(for type of ospeed) 10587a69bbfbSPeter WemmAC_ARG_WITH(ospeed, 10597a69bbfbSPeter Wemm [ --with-ospeed=TYPE override type of ospeed variable], 106039f2269fSPeter Wemm [NCURSES_OSPEED="$withval"], 10617a69bbfbSPeter Wemm [NCURSES_OSPEED=short]) 10627a69bbfbSPeter WemmAC_MSG_RESULT($NCURSES_OSPEED) 10637a69bbfbSPeter WemmAC_SUBST(NCURSES_OSPEED) 10647a69bbfbSPeter Wemm 10654a1a9510SRong-En Fan### use option --with-mmask-t to override mmask_t's type 10664a1a9510SRong-En FanAC_MSG_CHECKING(for type of mmask_t) 10674a1a9510SRong-En FanAC_ARG_WITH(mmask-t, 10684a1a9510SRong-En Fan [ --with-mmask-t=TYPE override type of mmask_t], 10694a1a9510SRong-En Fan [NCURSES_MMASK_T="$withval"], 1070aae38d10SBaptiste Daroussin [NCURSES_MMASK_T=$cf_dft_mmask_t]) 10714a1a9510SRong-En FanAC_MSG_RESULT($NCURSES_MMASK_T) 10720e3d5408SPeter Wemm 107306bfebdeSXin LI### use option --with-ccharw-max to override CCHARW_MAX size 107406bfebdeSXin LIAC_MSG_CHECKING(for size CCHARW_MAX) 107506bfebdeSXin LIAC_ARG_WITH(ccharw-max, 107606bfebdeSXin LI [ --with-ccharw-max=XXX override size CCHARW_MAX], 107706bfebdeSXin LI [NCURSES_CCHARW_MAX="$withval"], 107806bfebdeSXin LI [NCURSES_CCHARW_MAX=5]) 107906bfebdeSXin LIAC_MSG_RESULT($NCURSES_CCHARW_MAX) 108006bfebdeSXin LIAC_SUBST(NCURSES_CCHARW_MAX) 108106bfebdeSXin LI 1082e1865124SBaptiste DaroussinAC_CHECK_SIZEOF([signed char]) 10834a1a9510SRong-En Fanif test "$ac_cv_sizeof_signed_char" = 1 ; then 10844a1a9510SRong-En Fan NCURSES_SBOOL="signed char" 10854a1a9510SRong-En Fanelse 10864a1a9510SRong-En Fan NCURSES_SBOOL="char" 10874a1a9510SRong-En Fanfi 10884a1a9510SRong-En FanAC_MSG_CHECKING(if you want to use signed Boolean array in term.h) 10894a1a9510SRong-En FanAC_ARG_ENABLE(signed-char, 10905ca44d1cSRong-En Fan [ --enable-signed-char compile using signed Boolean's in term.h], 10914a1a9510SRong-En Fan [with_signed_char=$enableval], 10924a1a9510SRong-En Fan [with_signed_char=no]) 10934a1a9510SRong-En FanAC_MSG_RESULT($with_signed_char) 109473f0a83dSXin LItest "x$with_signed_char" != xyes && NCURSES_SBOOL="char" 10954a1a9510SRong-En FanAC_SUBST(NCURSES_SBOOL) 10964a1a9510SRong-En Fan 1097aae38d10SBaptiste Daroussin### use option --with-tparm-arg to override tparm's argument type 1098aae38d10SBaptiste DaroussinAC_MSG_CHECKING(for type of tparm args) 1099aae38d10SBaptiste DaroussinAC_ARG_WITH(tparm-arg, 1100aae38d10SBaptiste Daroussin [ --with-tparm-arg=TYPE override parameter type of tparm], 1101aae38d10SBaptiste Daroussin [NCURSES_TPARM_ARG="$withval"], 1102aae38d10SBaptiste Daroussin [NCURSES_TPARM_ARG=$cf_dft_tparm_arg]) 1103aae38d10SBaptiste DaroussinAC_MSG_RESULT($NCURSES_TPARM_ARG) 1104aae38d10SBaptiste DaroussinAC_SUBST(NCURSES_TPARM_ARG) 1105aae38d10SBaptiste Daroussin 1106aae38d10SBaptiste Daroussin### Enable compiling-in rcs id's 1107aae38d10SBaptiste DaroussinAC_MSG_CHECKING(if RCS identifiers should be compiled-in) 1108aae38d10SBaptiste DaroussinAC_ARG_WITH(rcs-ids, 1109aae38d10SBaptiste Daroussin [ --with-rcs-ids compile-in RCS identifiers], 1110aae38d10SBaptiste Daroussin [with_rcs_ids=$withval], 1111aae38d10SBaptiste Daroussin [with_rcs_ids=no]) 1112aae38d10SBaptiste DaroussinAC_MSG_RESULT($with_rcs_ids) 1113aae38d10SBaptiste Daroussintest "x$with_rcs_ids" = xyes && AC_DEFINE(USE_RCS_IDS,1,[Define to 1 to compile-in RCS identifiers]) 1114aae38d10SBaptiste Daroussin 1115aae38d10SBaptiste Daroussin############################################################################### 1116aae38d10SBaptiste DaroussinCF_MAN_PAGES([ captoinfo clear infocmp infotocap reset tabs tic toe tput tset ]) 1117aae38d10SBaptiste Daroussin 1118aae38d10SBaptiste Daroussin############################################################################### 1119aae38d10SBaptiste DaroussinCF_HELP_MESSAGE(Extensions:) 1120aae38d10SBaptiste Daroussin 1121aae38d10SBaptiste Daroussin### Note that some functions (such as const) are normally disabled anyway. 1122aae38d10SBaptiste DaroussinAC_MSG_CHECKING(if you want to build with function extensions) 1123aae38d10SBaptiste DaroussinAC_ARG_ENABLE(ext-funcs, 1124aae38d10SBaptiste Daroussin [ --disable-ext-funcs disable function-extensions], 1125aae38d10SBaptiste Daroussin [with_ext_funcs=$enableval], 1126aae38d10SBaptiste Daroussin [with_ext_funcs=yes]) 1127aae38d10SBaptiste DaroussinAC_MSG_RESULT($with_ext_funcs) 1128aae38d10SBaptiste Daroussinif test "x$with_ext_funcs" = xyes ; then 1129aae38d10SBaptiste Daroussin NCURSES_EXT_FUNCS=1 1130aae38d10SBaptiste Daroussin AC_DEFINE(NCURSES_EXT_FUNCS,1,[Define to 1 to enable ncurses extended functions]) 1131aae38d10SBaptiste Daroussin AC_DEFINE(HAVE_ASSUME_DEFAULT_COLORS,1,[Define to 1 to enable assume_default_colors() function in test-programs]) 1132aae38d10SBaptiste Daroussin AC_DEFINE(HAVE_CURSES_VERSION,1,[Define to 1 to enable curses_version() function in test-programs]) 1133aae38d10SBaptiste Daroussin AC_DEFINE(HAVE_HAS_KEY,1,[Define to 1 to enable has_key() function in test-programs]) 1134aae38d10SBaptiste Daroussin AC_DEFINE(HAVE_RESIZETERM,1,[Define to 1 to enable resizeterm() function in test-programs]) 1135aae38d10SBaptiste Daroussin AC_DEFINE(HAVE_RESIZE_TERM,1,[Define to 1 to enable resize_term() function in test-programs]) 1136aae38d10SBaptiste Daroussin AC_DEFINE(HAVE_TERM_ENTRY_H,1,[Define to 1 to enable term_entry() function in test-programs]) 1137aae38d10SBaptiste Daroussin AC_DEFINE(HAVE_USE_DEFAULT_COLORS,1,[Define to 1 to enable use_default_colors() function in test-programs]) 1138aae38d10SBaptiste Daroussin AC_DEFINE(HAVE_USE_EXTENDED_NAMES,1,[Define to 1 to enable use_extended_names() function in test-programs]) 1139aae38d10SBaptiste Daroussin AC_DEFINE(HAVE_USE_SCREEN,1,[Define to 1 to enable use_screen() function in test-programs]) 1140aae38d10SBaptiste Daroussin AC_DEFINE(HAVE_USE_WINDOW,1,[Define to 1 to enable use_window() function in test-programs]) 1141aae38d10SBaptiste Daroussin AC_DEFINE(HAVE_WRESIZE,1,[Define to 1 to enable wresize() function in test-programs]) 1142aae38d10SBaptiste Daroussin GENERATED_EXT_FUNCS=generated 1143aae38d10SBaptiste Daroussin test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no 1144aae38d10SBaptiste Daroussinelse 1145aae38d10SBaptiste Daroussin NCURSES_EXT_FUNCS=0 1146aae38d10SBaptiste Daroussin GENERATED_EXT_FUNCS= 1147aae38d10SBaptiste Daroussinfi 1148aae38d10SBaptiste DaroussinAC_SUBST(NCURSES_EXT_FUNCS) 1149aae38d10SBaptiste DaroussinAC_SUBST(GENERATED_EXT_FUNCS) 1150aae38d10SBaptiste Daroussin 1151aae38d10SBaptiste DaroussinAC_MSG_CHECKING(if you want to build with SCREEN extensions) 1152aae38d10SBaptiste DaroussinAC_ARG_ENABLE(sp-funcs, 1153aae38d10SBaptiste Daroussin [ --enable-sp-funcs enable SCREEN-extensions], 1154aae38d10SBaptiste Daroussin [with_sp_funcs=$enableval], 1155aae38d10SBaptiste Daroussin [with_sp_funcs=$cf_dft_ext_spfuncs]) 1156aae38d10SBaptiste DaroussinAC_MSG_RESULT($with_sp_funcs) 1157aae38d10SBaptiste Daroussinif test "x$with_sp_funcs" = xyes ; then 1158aae38d10SBaptiste Daroussin NCURSES_SP_FUNCS=1 1159aae38d10SBaptiste Daroussin AC_DEFINE(NCURSES_SP_FUNCS,1,[Define to 1 to enable SCREEN-extensions]) 1160aae38d10SBaptiste Daroussin AC_DEFINE(HAVE_TPUTS_SP,1,[Define to 1 to enable tputs_sp() function in test-programs]) 1161aae38d10SBaptiste Daroussin GENERATED_SP_FUNCS=generated 1162aae38d10SBaptiste Daroussinelse 1163aae38d10SBaptiste Daroussin NCURSES_SP_FUNCS=0 1164aae38d10SBaptiste Daroussin GENERATED_SP_FUNCS= 1165aae38d10SBaptiste Daroussinfi 1166aae38d10SBaptiste DaroussinAC_SUBST(NCURSES_SP_FUNCS) 1167aae38d10SBaptiste DaroussinAC_SUBST(GENERATED_SP_FUNCS) 1168aae38d10SBaptiste Daroussin 1169aae38d10SBaptiste DaroussinAC_MSG_CHECKING(if you want to build with terminal-driver) 1170aae38d10SBaptiste DaroussinAC_ARG_ENABLE(term-driver, 1171aae38d10SBaptiste Daroussin [ --enable-term-driver enable terminal-driver], 1172aae38d10SBaptiste Daroussin [with_term_driver=$enableval], 1173aae38d10SBaptiste Daroussin [with_term_driver=no]) 1174aae38d10SBaptiste DaroussinAC_MSG_RESULT($with_term_driver) 1175aae38d10SBaptiste Daroussinif test "x$with_term_driver" = xyes ; then 1176aae38d10SBaptiste Daroussin AC_DEFINE(USE_TERM_DRIVER,1,[Define to 1 to enable terminal-driver]) 1177aae38d10SBaptiste Daroussin if test "x$with_termlib" != xno ; then 1178aae38d10SBaptiste Daroussin AC_MSG_ERROR(The term-driver option conflicts with the termlib option) 1179aae38d10SBaptiste Daroussin fi 1180aae38d10SBaptiste Daroussin if test "x$with_sp_funcs" != xyes ; then 1181aae38d10SBaptiste Daroussin AC_MSG_ERROR(The term-driver option relies upon sp-funcs) 1182aae38d10SBaptiste Daroussin fi 1183aae38d10SBaptiste Daroussinfi 1184aae38d10SBaptiste Daroussin 1185aae38d10SBaptiste Daroussin### use option --enable-const to turn on use of const beyond that in XSI. 1186aae38d10SBaptiste DaroussinAC_MSG_CHECKING(for extended use of const keyword) 1187aae38d10SBaptiste DaroussinAC_ARG_ENABLE(const, 1188aae38d10SBaptiste Daroussin [ --enable-const compile with extra/non-standard const], 1189aae38d10SBaptiste Daroussin [with_ext_const=$enableval], 1190aae38d10SBaptiste Daroussin [with_ext_const=$cf_dft_ext_const]) 1191aae38d10SBaptiste DaroussinAC_MSG_RESULT($with_ext_const) 1192aae38d10SBaptiste DaroussinNCURSES_CONST='/*nothing*/' 1193aae38d10SBaptiste Daroussinif test "x$with_ext_const" = xyes ; then 1194aae38d10SBaptiste Daroussin NCURSES_CONST=const 1195aae38d10SBaptiste Daroussinfi 1196aae38d10SBaptiste DaroussinAC_SUBST(NCURSES_CONST) 1197aae38d10SBaptiste Daroussin 1198aae38d10SBaptiste Daroussin### use option --enable-ext-colors to turn on use of colors beyond 16. 1199aae38d10SBaptiste DaroussinAC_MSG_CHECKING(if you want to use extended colors) 1200aae38d10SBaptiste DaroussinAC_ARG_ENABLE(ext-colors, 1201aae38d10SBaptiste Daroussin [ --enable-ext-colors compile for 256-color support], 1202aae38d10SBaptiste Daroussin [with_ext_colors=$enableval], 1203aae38d10SBaptiste Daroussin [with_ext_colors=$cf_dft_ext_colors]) 1204aae38d10SBaptiste DaroussinAC_MSG_RESULT($with_ext_colors) 1205aae38d10SBaptiste DaroussinNCURSES_EXT_COLORS=0 1206aae38d10SBaptiste Daroussinif test "x$with_ext_colors" = xyes ; then 1207aae38d10SBaptiste Daroussin if test "x$with_widec" != xyes ; then 1208aae38d10SBaptiste Daroussin AC_MSG_WARN(This option applies only to wide-character library) 1209aae38d10SBaptiste Daroussin else 1210aae38d10SBaptiste Daroussin # cannot be ABI 5 since it changes sizeof(cchar_t) 1211aae38d10SBaptiste Daroussin CF_NCURSES_ABI_6 1212aae38d10SBaptiste Daroussin NCURSES_EXT_COLORS=1 1213aae38d10SBaptiste Daroussin AC_DEFINE(NCURSES_EXT_COLORS,1,[Define to 1 to compile for 256-color support]) 1214aae38d10SBaptiste Daroussin AC_DEFINE(HAVE_ALLOC_PAIR,1,[Define to 1 to enable alloc_pair() function]) 1215aae38d10SBaptiste Daroussin AC_DEFINE(HAVE_INIT_EXTENDED_COLOR,1,[Define to 1 to enable init_extended_color() function in test-programs]) 1216aae38d10SBaptiste Daroussin AC_DEFINE(HAVE_RESET_COLOR_PAIRS,1,[Define to 1 to enable reset_color_pairs() function in test-programs]) 1217aae38d10SBaptiste Daroussin fi 1218aae38d10SBaptiste Daroussinfi 1219aae38d10SBaptiste DaroussinAC_SUBST(NCURSES_EXT_COLORS) 1220aae38d10SBaptiste Daroussin 1221aae38d10SBaptiste Daroussin### use option --enable-ext-mouse to modify coding to support 5-button mice 1222aae38d10SBaptiste DaroussinAC_MSG_CHECKING(if you want to use extended mouse encoding) 1223aae38d10SBaptiste DaroussinAC_ARG_ENABLE(ext-mouse, 1224aae38d10SBaptiste Daroussin [ --enable-ext-mouse compile for extended mouse-encoding], 1225aae38d10SBaptiste Daroussin [with_ext_mouse=$enableval], 1226aae38d10SBaptiste Daroussin [with_ext_mouse=$cf_dft_ext_mouse]) 1227aae38d10SBaptiste DaroussinAC_MSG_RESULT($with_ext_mouse) 1228aae38d10SBaptiste DaroussinNCURSES_MOUSE_VERSION=1 1229aae38d10SBaptiste Daroussinif test "x$with_ext_mouse" = xyes ; then 1230aae38d10SBaptiste Daroussin NCURSES_MOUSE_VERSION=2 1231aae38d10SBaptiste Daroussin CF_NCURSES_ABI_6 1232aae38d10SBaptiste Daroussinfi 1233aae38d10SBaptiste DaroussinAC_SUBST(NCURSES_MOUSE_VERSION) 1234aae38d10SBaptiste Daroussin 1235aae38d10SBaptiste Daroussin### use option --enable-ext-putwin to turn on extended screendumps 1236aae38d10SBaptiste DaroussinAC_MSG_CHECKING(if you want to use extended putwin/screendump) 1237aae38d10SBaptiste DaroussinAC_ARG_ENABLE(ext-putwin, 1238aae38d10SBaptiste Daroussin [ --enable-ext-putwin compile with extended putwin/screendump], 1239aae38d10SBaptiste Daroussin [with_ext_putwin=$enableval], 1240aae38d10SBaptiste Daroussin [with_ext_putwin=$cf_dft_ext_putwin]) 1241aae38d10SBaptiste DaroussinAC_MSG_RESULT($with_ext_putwin) 1242aae38d10SBaptiste Daroussinif test "x$with_ext_putwin" = xyes ; then 1243aae38d10SBaptiste Daroussin AC_DEFINE(NCURSES_EXT_PUTWIN,1,[Define to 1 to compile with extended putwin/screendump]) 1244aae38d10SBaptiste Daroussinfi 1245aae38d10SBaptiste Daroussin 1246aae38d10SBaptiste DaroussinAC_MSG_CHECKING(if you want \$NCURSES_NO_PADDING code) 1247aae38d10SBaptiste DaroussinAC_ARG_ENABLE(no-padding, 1248aae38d10SBaptiste Daroussin [ --enable-no-padding compile with $NCURSES_NO_PADDING code], 1249aae38d10SBaptiste Daroussin [with_no_padding=$enableval], 1250aae38d10SBaptiste Daroussin [with_no_padding=$with_ext_funcs]) 1251aae38d10SBaptiste DaroussinAC_MSG_RESULT($with_no_padding) 1252aae38d10SBaptiste Daroussintest "x$with_no_padding" = xyes && AC_DEFINE(NCURSES_NO_PADDING,1,[Define to 1 to compile with $NCURSES_NO_PADDING code]) 1253aae38d10SBaptiste Daroussin 125415589c42SPeter Wemm### use option --enable-sigwinch to turn on use of SIGWINCH logic 125515589c42SPeter WemmAC_MSG_CHECKING(if you want SIGWINCH handler) 125615589c42SPeter WemmAC_ARG_ENABLE(sigwinch, 125715589c42SPeter Wemm [ --enable-sigwinch compile with SIGWINCH handler], 125815589c42SPeter Wemm [with_sigwinch=$enableval], 125915589c42SPeter Wemm [with_sigwinch=$with_ext_funcs]) 126015589c42SPeter WemmAC_MSG_RESULT($with_sigwinch) 126173f0a83dSXin LItest "x$with_sigwinch" = xyes && AC_DEFINE(USE_SIGWINCH,1,[Define to 1 to compile with SIGWINCH handler]) 126215589c42SPeter Wemm 126315589c42SPeter Wemm### use option --enable-tcap-names to allow user to define new capabilities 126415589c42SPeter WemmAC_MSG_CHECKING(if you want user-definable terminal capabilities like termcap) 126515589c42SPeter WemmAC_ARG_ENABLE(tcap-names, 126615589c42SPeter Wemm [ --enable-tcap-names compile with user-definable terminal capabilities], 126715589c42SPeter Wemm [with_tcap_names=$enableval], 126815589c42SPeter Wemm [with_tcap_names=$with_ext_funcs]) 126915589c42SPeter WemmAC_MSG_RESULT($with_tcap_names) 127015589c42SPeter WemmNCURSES_XNAMES=0 127173f0a83dSXin LItest "x$with_tcap_names" = xyes && NCURSES_XNAMES=1 127215589c42SPeter WemmAC_SUBST(NCURSES_XNAMES) 12730e3d5408SPeter Wemm 1274aae38d10SBaptiste Daroussin############################################################################## 1275aae38d10SBaptiste DaroussinCF_HELP_MESSAGE(Reentrant Code:) 1276aae38d10SBaptiste DaroussinCF_WITH_PTHREAD 1277aae38d10SBaptiste Daroussin 1278aae38d10SBaptiste Daroussinif test "x$with_pthread" != xno; then 1279aae38d10SBaptiste Daroussin AC_CHECK_FUNC(pthread_kill,[ 1280aae38d10SBaptiste Daroussin AC_MSG_CHECKING(if you want to allow EINTR in wgetch with pthreads) 1281aae38d10SBaptiste Daroussin AC_ARG_ENABLE(pthreads-eintr, 1282aae38d10SBaptiste Daroussin [ --enable-pthreads-eintr enable EINTR in wgetch with pthreads], 1283aae38d10SBaptiste Daroussin [use_pthreads_eintr=$enableval], 1284aae38d10SBaptiste Daroussin [use_pthreads_eintr=no]) 1285aae38d10SBaptiste Daroussin AC_MSG_RESULT($use_pthreads_eintr) 1286aae38d10SBaptiste Daroussin if test "x$use_pthreads_eintr" = xyes ; then 1287aae38d10SBaptiste Daroussin AC_DEFINE(USE_PTHREADS_EINTR,1,[Define to 1 to enable EINTR in wgetch with pthreads]) 1288aae38d10SBaptiste Daroussin fi]) 1289aae38d10SBaptiste Daroussin 1290aae38d10SBaptiste Daroussin AC_MSG_CHECKING(if you want to use weak-symbols for pthreads) 1291aae38d10SBaptiste Daroussin AC_ARG_ENABLE(weak-symbols, 1292aae38d10SBaptiste Daroussin [ --enable-weak-symbols enable weak-symbols for pthreads], 1293aae38d10SBaptiste Daroussin [use_weak_symbols=$enableval], 1294aae38d10SBaptiste Daroussin [use_weak_symbols=no]) 1295aae38d10SBaptiste Daroussin AC_MSG_RESULT($use_weak_symbols) 1296aae38d10SBaptiste Daroussin if test "x$use_weak_symbols" = xyes ; then 1297aae38d10SBaptiste Daroussin CF_WEAK_SYMBOLS 1298aae38d10SBaptiste Daroussin else 1299aae38d10SBaptiste Daroussin cf_cv_weak_symbols=no 1300aae38d10SBaptiste Daroussin fi 1301aae38d10SBaptiste Daroussin 1302aae38d10SBaptiste Daroussin if test "x$cf_cv_weak_symbols" = xyes ; then 1303aae38d10SBaptiste Daroussin AC_DEFINE(USE_WEAK_SYMBOLS,1,[Define to 1 to enable weak-symbols for pthreads]) 1304aae38d10SBaptiste Daroussin fi 1305aae38d10SBaptiste Daroussinfi 1306aae38d10SBaptiste Daroussin 1307aae38d10SBaptiste DaroussinPTHREAD= 1308aae38d10SBaptiste Daroussinif test "x$with_pthread" = "xyes" ; then 1309aae38d10SBaptiste Daroussin AC_DEFINE(USE_PTHREADS,1,[Define to 1 to use pthreads feature]) 1310aae38d10SBaptiste Daroussin enable_reentrant=yes 1311aae38d10SBaptiste Daroussin if test "x$cf_cv_weak_symbols" = xyes ; then 1312aae38d10SBaptiste Daroussin PTHREAD=-lpthread 1313aae38d10SBaptiste Daroussin CF_ADD_LIB(pthread,PRIVATE_LIBS) 1314aae38d10SBaptiste Daroussin fi 1315aae38d10SBaptiste Daroussinfi 1316aae38d10SBaptiste DaroussinAC_SUBST(PTHREAD) 1317aae38d10SBaptiste Daroussin 1318aae38d10SBaptiste Daroussin# Reentrant code has to be opaque; there's little advantage to making ncurses 1319aae38d10SBaptiste Daroussin# opaque outside of that, so there is no --enable-opaque option. We can use 1320aae38d10SBaptiste Daroussin# this option without --with-pthreads, but this will be always set for 1321aae38d10SBaptiste Daroussin# pthreads. 1322aae38d10SBaptiste DaroussinAC_MSG_CHECKING(if you want reentrant code) 1323aae38d10SBaptiste DaroussinAC_ARG_ENABLE(reentrant, 1324aae38d10SBaptiste Daroussin [ --enable-reentrant compile with reentrant code], 1325aae38d10SBaptiste Daroussin [with_reentrant=$enableval], 1326aae38d10SBaptiste Daroussin [with_reentrant=no]) 1327aae38d10SBaptiste DaroussinAC_MSG_RESULT($with_reentrant) 1328aae38d10SBaptiste Daroussinif test "x$with_reentrant" = xyes ; then 1329aae38d10SBaptiste Daroussin cf_cv_enable_reentrant=1 1330aae38d10SBaptiste Daroussin cf_cv_enable_opaque="NCURSES_INTERNALS" 1331aae38d10SBaptiste Daroussin NCURSES_SIZE_T=int 1332aae38d10SBaptiste Daroussin if test "x$cf_cv_weak_symbols" = xyes ; then 1333aae38d10SBaptiste Daroussin CF_REMOVE_LIB(LIBS,$LIBS,pthread) 1334aae38d10SBaptiste Daroussin CF_ADD_LIB(pthread,TEST_LIBS) 1335aae38d10SBaptiste Daroussin CF_ADD_LIB(pthread,TEST_LIBS2) 1336aae38d10SBaptiste Daroussin CF_ADD_LIB(pthread,PRIVATE_LIBS) 1337aae38d10SBaptiste Daroussin else 1338aae38d10SBaptiste Daroussin # when not using weak symbols but with_reentrant, 1339aae38d10SBaptiste Daroussin # add 't' to the library suffix on all platforms 1340aae38d10SBaptiste Daroussin # except cygwin, where we only do that if ALSO 1341aae38d10SBaptiste Daroussin # compiling with full thread support. 1342aae38d10SBaptiste Daroussin case "$host" in 1343aae38d10SBaptiste Daroussin (*cygwin* | *msys*) 1344aae38d10SBaptiste Daroussin if test "$with_pthread" = "yes" ; then 1345aae38d10SBaptiste Daroussin if test "x$disable_lib_suffixes" = "xno" ; then 1346aae38d10SBaptiste Daroussin LIB_SUFFIX="t${LIB_SUFFIX}" 1347aae38d10SBaptiste Daroussin fi 1348aae38d10SBaptiste Daroussin fi ;; 1349aae38d10SBaptiste Daroussin (*) 1350aae38d10SBaptiste Daroussin if test "x$disable_lib_suffixes" = "xno" ; then 1351aae38d10SBaptiste Daroussin LIB_SUFFIX="t${LIB_SUFFIX}" 1352aae38d10SBaptiste Daroussin fi 1353aae38d10SBaptiste Daroussin ;; 1354aae38d10SBaptiste Daroussin esac 1355aae38d10SBaptiste Daroussin fi 1356aae38d10SBaptiste Daroussin AC_DEFINE(USE_REENTRANT,1,[Define to 1 to use reentrant feature]) 1357aae38d10SBaptiste Daroussin CF_NCURSES_ABI_6 1358aae38d10SBaptiste Daroussinelse 1359aae38d10SBaptiste Daroussin cf_cv_enable_reentrant=0 1360aae38d10SBaptiste Daroussin cf_cv_enable_opaque="NCURSES_OPAQUE" 1361aae38d10SBaptiste Daroussin NCURSES_SIZE_T=short 1362aae38d10SBaptiste Daroussinfi 1363aae38d10SBaptiste DaroussinAC_SUBST(cf_cv_enable_reentrant) 1364aae38d10SBaptiste DaroussinAC_SUBST(cf_cv_enable_opaque) 1365aae38d10SBaptiste Daroussin 1366aae38d10SBaptiste DaroussinAC_SUBST(NCURSES_SIZE_T) 1367aae38d10SBaptiste Daroussin 1368aae38d10SBaptiste DaroussinAC_MSG_CHECKING(if you want opaque curses-library structures) 1369aae38d10SBaptiste DaroussinCF_ARG_ENABLE(opaque-curses, 1370aae38d10SBaptiste Daroussin [ --enable-opaque-curses make curses WINDOW, etc., "opaque"], 1371aae38d10SBaptiste Daroussin [enable_opaque_curses=yes],[ 1372aae38d10SBaptiste Daroussin test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes 1373aae38d10SBaptiste Daroussin test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no 1374aae38d10SBaptiste Daroussin ]) 1375aae38d10SBaptiste DaroussinAC_MSG_RESULT($enable_opaque_curses) 1376aae38d10SBaptiste Daroussin 1377aae38d10SBaptiste Daroussintest "$cf_cv_enable_reentrant" = 1 && \ 1378aae38d10SBaptiste Daroussintest "$enable_opaque_curses" = no && \ 1379aae38d10SBaptiste DaroussinAC_MSG_ERROR(reentrant configuration requires opaque library) 1380aae38d10SBaptiste Daroussin 1381aae38d10SBaptiste DaroussinAC_MSG_CHECKING(if you want opaque form-library structures) 1382aae38d10SBaptiste DaroussinAC_ARG_ENABLE(opaque-form, 1383aae38d10SBaptiste Daroussin [ --enable-opaque-form make form-library structures "opaque"], 1384aae38d10SBaptiste Daroussin [enable_opaque_form=yes],[enable_opaque_form=no]) 1385aae38d10SBaptiste DaroussinAC_MSG_RESULT($enable_opaque_form) 1386aae38d10SBaptiste Daroussin 1387aae38d10SBaptiste DaroussinAC_MSG_CHECKING(if you want opaque menu-library structures) 1388aae38d10SBaptiste DaroussinAC_ARG_ENABLE(opaque-menu, 1389aae38d10SBaptiste Daroussin [ --enable-opaque-menu make menu-library structures "opaque"], 1390aae38d10SBaptiste Daroussin [enable_opaque_menu=yes],[enable_opaque_menu=no]) 1391aae38d10SBaptiste DaroussinAC_MSG_RESULT($enable_opaque_menu) 1392aae38d10SBaptiste Daroussin 1393aae38d10SBaptiste DaroussinAC_MSG_CHECKING(if you want opaque panel-library structures) 1394aae38d10SBaptiste DaroussinAC_ARG_ENABLE(opaque-panel, 1395aae38d10SBaptiste Daroussin [ --enable-opaque-panel make panel-library structures "opaque"], 1396aae38d10SBaptiste Daroussin [enable_opaque_panel=yes],[enable_opaque_panel=no]) 1397aae38d10SBaptiste DaroussinAC_MSG_RESULT($enable_opaque_panel) 1398aae38d10SBaptiste Daroussin 1399aae38d10SBaptiste DaroussinNCURSES_OPAQUE=0; test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1 1400aae38d10SBaptiste DaroussinNCURSES_OPAQUE_FORM=0; test "$enable_opaque_form" = yes && NCURSES_OPAQUE_FORM=1 1401aae38d10SBaptiste DaroussinNCURSES_OPAQUE_MENU=0; test "$enable_opaque_menu" = yes && NCURSES_OPAQUE_MENU=1 1402aae38d10SBaptiste DaroussinNCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel" = yes && NCURSES_OPAQUE_PANEL=1 1403aae38d10SBaptiste Daroussin 1404aae38d10SBaptiste DaroussinAC_SUBST(NCURSES_OPAQUE) 1405aae38d10SBaptiste DaroussinAC_SUBST(NCURSES_OPAQUE_FORM) 1406aae38d10SBaptiste DaroussinAC_SUBST(NCURSES_OPAQUE_MENU) 1407aae38d10SBaptiste DaroussinAC_SUBST(NCURSES_OPAQUE_PANEL) 1408aae38d10SBaptiste Daroussin 1409aae38d10SBaptiste Daroussin### Allow using a different wrap-prefix 1410aae38d10SBaptiste Daroussinif test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then 1411aae38d10SBaptiste Daroussin AC_MSG_CHECKING(for prefix used to wrap public variables) 1412aae38d10SBaptiste Daroussin AC_ARG_WITH(wrap-prefix, 1413aae38d10SBaptiste Daroussin [ --with-wrap-prefix=XXX override prefix used for public variables], 1414aae38d10SBaptiste Daroussin [NCURSES_WRAP_PREFIX=$withval], 1415aae38d10SBaptiste Daroussin [NCURSES_WRAP_PREFIX=_nc_]) 1416aae38d10SBaptiste Daroussin AC_MSG_RESULT($NCURSES_WRAP_PREFIX) 1417aae38d10SBaptiste Daroussinelse 1418aae38d10SBaptiste Daroussin NCURSES_WRAP_PREFIX=_nc_ 1419aae38d10SBaptiste Daroussinfi 1420aae38d10SBaptiste DaroussinAC_SUBST(NCURSES_WRAP_PREFIX) 1421aae38d10SBaptiste DaroussinAC_DEFINE_UNQUOTED(NCURSES_WRAP_PREFIX,"$NCURSES_WRAP_PREFIX",[Define to override _nc_ prefix]) 1422aae38d10SBaptiste Daroussin 14230e3d5408SPeter Wemm############################################################################### 142418259542SPeter Wemm# These options are relatively safe to experiment with. 142518259542SPeter WemmCF_HELP_MESSAGE(Development Code:) 142618259542SPeter WemmAC_MSG_CHECKING(if you want all development code) 14270e3d5408SPeter WemmAC_ARG_WITH(develop, 14284a1a9510SRong-En Fan [ --without-develop disable development options], 14290e3d5408SPeter Wemm [with_develop=$withval], 14300e3d5408SPeter Wemm [with_develop=no]) 14310e3d5408SPeter WemmAC_MSG_RESULT($with_develop) 14320e3d5408SPeter Wemm 14330e3d5408SPeter Wemm### use option --enable-hard-tabs to turn on use of hard-tabs optimize 143418259542SPeter WemmAC_MSG_CHECKING(if you want hard-tabs code) 14350e3d5408SPeter WemmAC_ARG_ENABLE(hard-tabs, 14364a1a9510SRong-En Fan [ --enable-hard-tabs compile with hard-tabs code],, 14374a1a9510SRong-En Fan [enable_hard_tabs=$with_develop]) 14384a1a9510SRong-En FanAC_MSG_RESULT($enable_hard_tabs) 143973f0a83dSXin LItest "x$enable_hard_tabs" = xyes && AC_DEFINE(USE_HARD_TABS,1,[Define to 1 to compile with hard-tabs code]) 144018259542SPeter Wemm 144118259542SPeter Wemm### use option --enable-xmc-glitch to turn on use of magic-cookie optimize 144218259542SPeter WemmAC_MSG_CHECKING(if you want limited support for xmc) 144318259542SPeter WemmAC_ARG_ENABLE(xmc-glitch, 14444a1a9510SRong-En Fan [ --enable-xmc-glitch compile with support for xmc (magic-cookie)],, 14454a1a9510SRong-En Fan [enable_xmc_glitch=$with_develop]) 14464a1a9510SRong-En FanAC_MSG_RESULT($enable_xmc_glitch) 144773f0a83dSXin LItest "x$enable_xmc_glitch" = xyes && AC_DEFINE(USE_XMC_SUPPORT,1,[Define to 1 to compile with support for xmc (magic-cookie)]) 144818259542SPeter Wemm 144918259542SPeter Wemm############################################################################### 145018259542SPeter Wemm# These are just experimental, probably should not be in a package: 145118259542SPeter WemmCF_HELP_MESSAGE(Experimental Code:) 145218259542SPeter Wemm 145318259542SPeter WemmAC_MSG_CHECKING(if you do not want to assume colors are white-on-black) 145418259542SPeter WemmAC_ARG_ENABLE(assumed-color, 145518259542SPeter Wemm [ --disable-assumed-color do not assume anything about default-colors], 145618259542SPeter Wemm [with_assumed_color=$enableval], 145718259542SPeter Wemm [with_assumed_color=yes]) 145818259542SPeter WemmAC_MSG_RESULT($with_assumed_color) 145973f0a83dSXin LItest "x$with_assumed_color" = xyes && AC_DEFINE(USE_ASSUMED_COLOR,1,[Define to 1 to assume things about default-colors]) 146018259542SPeter Wemm 146118259542SPeter Wemm### use option --enable-hashmap to turn on use of hashmap scrolling logic 146218259542SPeter WemmAC_MSG_CHECKING(if you want hashmap scrolling-optimization code) 146318259542SPeter WemmAC_ARG_ENABLE(hashmap, 146418259542SPeter Wemm [ --disable-hashmap compile without hashmap scrolling-optimization], 146518259542SPeter Wemm [with_hashmap=$enableval], 146618259542SPeter Wemm [with_hashmap=yes]) 146718259542SPeter WemmAC_MSG_RESULT($with_hashmap) 146873f0a83dSXin LItest "x$with_hashmap" = xyes && AC_DEFINE(USE_HASHMAP,1,[Define to 1 to compile with hashmap scrolling-optimization]) 146918259542SPeter Wemm 1470b82face1SPeter Wemm### use option --enable-colorfgbg to turn on use of $COLORFGBG environment 1471b82face1SPeter WemmAC_MSG_CHECKING(if you want colorfgbg code) 1472b82face1SPeter WemmAC_ARG_ENABLE(colorfgbg, 147306bfebdeSXin LI [ --enable-colorfgbg compile-in experimental $COLORFGBG code], 1474b82face1SPeter Wemm [with_colorfgbg=$enableval], 1475b82face1SPeter Wemm [with_colorfgbg=no]) 1476b82face1SPeter WemmAC_MSG_RESULT($with_colorfgbg) 147773f0a83dSXin LItest "x$with_colorfgbg" = xyes && AC_DEFINE(USE_COLORFGBG,1,[Define to 1 to compile-in experimental $COLORFGBG code]) 1478b82face1SPeter Wemm 1479*7a656419SBaptiste Daroussin### use option --enable-fvisibility to turn on use of gcc-specific feature 1480*7a656419SBaptiste DaroussinAC_MSG_CHECKING(if you want to use gcc -fvisibility option) 1481*7a656419SBaptiste DaroussinAC_ARG_ENABLE(fvisibility, 1482*7a656419SBaptiste Daroussin [ --enable-fvisibility compile with -fvisibility=hidden], 1483*7a656419SBaptiste Daroussin [cf_with_fvisibility=$enableval], 1484*7a656419SBaptiste Daroussin [cf_with_fvisibility=no]) 1485*7a656419SBaptiste DaroussinAC_MSG_RESULT($cf_with_fvisibility) 1486*7a656419SBaptiste Daroussin 1487*7a656419SBaptiste DaroussinNCURSES_IMPEXP= 1488*7a656419SBaptiste DaroussinNCURSES_CXX_IMPEXP= 1489*7a656419SBaptiste Daroussinif test "x$cf_with_fvisibility" = xyes; then 1490*7a656419SBaptiste Daroussin CF_CHECK_FVISIBILITY($CC,CFLAGS,cf_cv_fvisibility_hidden) 1491*7a656419SBaptiste Daroussin if test "x$cf_cv_fvisibility_hidden" = xyes 1492*7a656419SBaptiste Daroussin then 1493*7a656419SBaptiste Daroussin CF_ADD_CFLAGS([-fvisibility=hidden]) 1494*7a656419SBaptiste Daroussin NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))" 1495*7a656419SBaptiste Daroussin fi 1496*7a656419SBaptiste Daroussin if test -n "$CXX" 1497*7a656419SBaptiste Daroussin then 1498*7a656419SBaptiste Daroussin AC_LANG_PUSH(C++) 1499*7a656419SBaptiste Daroussin CF_CHECK_FVISIBILITY($CXX,CXXFLAGS,cf_cv_fvisibility_hidden2) 1500*7a656419SBaptiste Daroussin if test "x$cf_cv_fvisibility_hidden2" = xyes 1501*7a656419SBaptiste Daroussin then 1502*7a656419SBaptiste Daroussin CF_ADD_CXXFLAGS([-fvisibility=hidden]) 1503*7a656419SBaptiste Daroussin NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))" 1504*7a656419SBaptiste Daroussin fi 1505*7a656419SBaptiste Daroussin AC_LANG_POP 1506*7a656419SBaptiste Daroussin fi 1507*7a656419SBaptiste Daroussinfi 1508*7a656419SBaptiste DaroussinAC_SUBST(NCURSES_IMPEXP) 1509*7a656419SBaptiste DaroussinAC_SUBST(NCURSES_CXX_IMPEXP) 1510*7a656419SBaptiste Daroussin 151106bfebdeSXin LI### use option --enable-interop to turn on use of bindings used for interop 151206bfebdeSXin LIAC_MSG_CHECKING(if you want interop bindings) 151306bfebdeSXin LIAC_ARG_ENABLE(interop, 1514aae38d10SBaptiste Daroussin [ --enable-interop compile-in interop bindings], 151506bfebdeSXin LI [with_exp_interop=$enableval], 1516aae38d10SBaptiste Daroussin [with_exp_interop=$cf_dft_interop]) 151706bfebdeSXin LIAC_MSG_RESULT($with_exp_interop) 151806bfebdeSXin LI 151906bfebdeSXin LINCURSES_INTEROP_FUNCS=0 152073f0a83dSXin LItest "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1 152106bfebdeSXin LIAC_SUBST(NCURSES_INTEROP_FUNCS) 152206bfebdeSXin LI 152306bfebdeSXin LI 15240e3d5408SPeter WemmAC_MSG_CHECKING(if you want experimental safe-sprintf code) 15250e3d5408SPeter WemmAC_ARG_ENABLE(safe-sprintf, 15260e3d5408SPeter Wemm [ --enable-safe-sprintf compile with experimental safe-sprintf code], 15270e3d5408SPeter Wemm [with_safe_sprintf=$enableval], 15280e3d5408SPeter Wemm [with_safe_sprintf=no]) 15290e3d5408SPeter WemmAC_MSG_RESULT($with_safe_sprintf) 15300e3d5408SPeter Wemm 15310e3d5408SPeter Wemm### use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic 153215589c42SPeter Wemm# when hashmap is used scroll hints are useless 153315589c42SPeter Wemmif test "$with_hashmap" = no ; then 15340e3d5408SPeter WemmAC_MSG_CHECKING(if you want to experiment without scrolling-hints code) 15350e3d5408SPeter WemmAC_ARG_ENABLE(scroll-hints, 153615589c42SPeter Wemm [ --disable-scroll-hints compile without scroll-hints code], 15370e3d5408SPeter Wemm [with_scroll_hints=$enableval], 153815589c42SPeter Wemm [with_scroll_hints=yes]) 15390e3d5408SPeter WemmAC_MSG_RESULT($with_scroll_hints) 154073f0a83dSXin LItest "x$with_scroll_hints" = xyes && AC_DEFINE(USE_SCROLL_HINTS,1,[Define to 1 to compile without scroll-hints code]) 154115589c42SPeter Wemmfi 15420e3d5408SPeter Wemm 1543aae38d10SBaptiste DaroussinAC_MSG_CHECKING(if you want wgetch-events code) 15444a1a9510SRong-En FanAC_ARG_ENABLE(wgetch-events, 1545aae38d10SBaptiste Daroussin [ --enable-wgetch-events compile with wgetch-events code], 15464a1a9510SRong-En Fan [with_wgetch_events=$enableval], 15474a1a9510SRong-En Fan [with_wgetch_events=no]) 15484a1a9510SRong-En FanAC_MSG_RESULT($with_wgetch_events) 1549*7a656419SBaptiste Daroussinif test "x$with_wgetch_events" = xyes ; then 1550*7a656419SBaptiste Daroussin AC_DEFINE(NCURSES_WGETCH_EVENTS,1,[Define to 1 to compile with wgetch-events code]) 1551*7a656419SBaptiste Daroussin NCURSES_WGETCH_EVENTS=1 1552*7a656419SBaptiste Daroussinelse 1553*7a656419SBaptiste Daroussin NCURSES_WGETCH_EVENTS=0 1554*7a656419SBaptiste Daroussinfi 1555*7a656419SBaptiste DaroussinAC_SUBST(NCURSES_WGETCH_EVENTS) 1556*7a656419SBaptiste Daroussin 1557*7a656419SBaptiste Daroussincase "$cf_cv_system_name" in 1558*7a656419SBaptiste Daroussin(*mingw32*|*mingw64*|*-msvc*) 1559*7a656419SBaptiste Daroussin AC_MSG_CHECKING(if you want experimental-Windows driver) 1560*7a656419SBaptiste Daroussin AC_ARG_ENABLE(exp-win32, 1561*7a656419SBaptiste Daroussin [ --enable-exp-win32 compile with experimental-Windows driver], 1562*7a656419SBaptiste Daroussin [with_exp_win32=$enableval], 1563*7a656419SBaptiste Daroussin [with_exp_win32=no]) 1564*7a656419SBaptiste Daroussin AC_MSG_RESULT($with_exp_win32) 1565*7a656419SBaptiste Daroussin if test "x$with_exp_win32" = xyes 1566*7a656419SBaptiste Daroussin then 1567*7a656419SBaptiste Daroussin AC_DEFINE(EXP_WIN32_DRIVER,1,[Define to 1 to compile with experimental win32 driver]) 1568*7a656419SBaptiste Daroussin EXP_WIN32_DRIVER=1 1569*7a656419SBaptiste Daroussin INTERNALS_HDR='[$](INCDIR)/nc_win32.h' 1570*7a656419SBaptiste Daroussin else 1571*7a656419SBaptiste Daroussin INTERNALS_HDR='[$](INCDIR)/nc_mingw.h' 1572*7a656419SBaptiste Daroussin EXP_WIN32_DRIVER=0 1573*7a656419SBaptiste Daroussin fi 1574*7a656419SBaptiste Daroussin ;; 1575*7a656419SBaptiste Daroussin(*) 1576*7a656419SBaptiste Daroussin EXP_WIN32_DRIVER=0 1577*7a656419SBaptiste Daroussin INTERNALS_HDR= 1578*7a656419SBaptiste Daroussin ;; 1579*7a656419SBaptiste Daroussinesac 1580*7a656419SBaptiste DaroussinAC_SUBST(EXP_WIN32_DRIVER) 1581*7a656419SBaptiste DaroussinAC_SUBST(INTERNALS_HDR) 15820e3d5408SPeter Wemm 15830e3d5408SPeter Wemm############################################################################### 15840e3d5408SPeter WemmCF_HELP_MESSAGE(Testing/development Options:) 15850e3d5408SPeter Wemm 15860e3d5408SPeter Wemm### use option --disable-echo to suppress full display compiling commands 158773f0a83dSXin LICF_DISABLE_ECHO 158873f0a83dSXin LIif test "x$enable_echo" = xyes; then 15890e3d5408SPeter Wemm ECHO_LINK= 15900e3d5408SPeter Wemmelse 15910e3d5408SPeter Wemm ECHO_LINK='@ echo linking $@ ... ;' 15927a69bbfbSPeter Wemm test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent" 15935ca44d1cSRong-En Fan test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent" 15940e3d5408SPeter Wemmfi 15950e3d5408SPeter WemmAC_SUBST(ECHO_LINK) 15960e3d5408SPeter Wemm 1597aae38d10SBaptiste Daroussin# --disable-stripping is used for debugging 1598aae38d10SBaptiste DaroussinCF_INSTALL_OPTS 1599aae38d10SBaptiste Daroussin 1600aae38d10SBaptiste Daroussin# If we're avoiding relinking of shared libraries during install, that is to 1601aae38d10SBaptiste Daroussin# avoid modifying the build-tree. For the same reason, avoid doing ranlib if 1602aae38d10SBaptiste Daroussin# the install program has "-p" (for preserving timestamps). 1603aae38d10SBaptiste Daroussincf_cv_do_reranlib=yes 1604aae38d10SBaptiste Daroussinif test "x$cf_cv_install_p" = xyes 1605aae38d10SBaptiste Daroussinthen 1606aae38d10SBaptiste Daroussin if test "x$cf_cv_do_relink" != xyes 1607aae38d10SBaptiste Daroussin then 1608aae38d10SBaptiste Daroussin cf_cv_do_reranlib=no 1609aae38d10SBaptiste Daroussin INSTALL_OPT_P="-p" 1610aae38d10SBaptiste Daroussin INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P" 1611aae38d10SBaptiste Daroussin fi 1612aae38d10SBaptiste Daroussinfi 1613aae38d10SBaptiste DaroussinAC_SUBST(INSTALL_OPT_P) 1614aae38d10SBaptiste Daroussin 16150e3d5408SPeter Wemm### use option --enable-warnings to turn on all gcc warnings 1616*7a656419SBaptiste DaroussinCF_ENABLE_WARNINGS(Wno-unknown-pragmas Wswitch-enum,yes) 16177a69bbfbSPeter Wemm 1618*7a656419SBaptiste Daroussinif test "x$enable_warnings" = "xyes"; then 161906bfebdeSXin LI CF_ADD_ADAFLAGS(-gnatg) 162073f0a83dSXin LI if test "x$cf_with_cxx" = xyes ; then 16214a1a9510SRong-En Fan CF_GXX_WARNINGS(Wno-unused) 16224a1a9510SRong-En Fan fi 16230e3d5408SPeter Wemmfi 162473f0a83dSXin LICF_ENABLE_STRING_HACKS 16250e3d5408SPeter Wemm 16260e3d5408SPeter Wemm### use option --enable-assertions to turn on generation of assertion code 162718259542SPeter WemmAC_MSG_CHECKING(if you want to enable runtime assertions) 16280e3d5408SPeter WemmAC_ARG_ENABLE(assertions, 16290e3d5408SPeter Wemm [ --enable-assertions test: turn on generation of assertion code], 16300e3d5408SPeter Wemm [with_assertions=$enableval], 16310e3d5408SPeter Wemm [with_assertions=no]) 163218259542SPeter WemmAC_MSG_RESULT($with_assertions) 16330e3d5408SPeter Wemmif test -n "$GCC" 16340e3d5408SPeter Wemmthen 163518259542SPeter Wemm if test "$with_assertions" = no 16360e3d5408SPeter Wemm then 16370e3d5408SPeter Wemm CPPFLAGS="$CPPFLAGS -DNDEBUG" 16380e3d5408SPeter Wemm else 163906bfebdeSXin LI CF_ADD_ADAFLAGS(-gnata) 16400e3d5408SPeter Wemm fi 16410e3d5408SPeter Wemmfi 16420e3d5408SPeter Wemm 16430e3d5408SPeter Wemm### use option --disable-leaks to suppress "permanent" leaks, for testing 16444a1a9510SRong-En FanCF_DISABLE_LEAKS 164573f0a83dSXin LIAC_DEFINE(HAVE_NC_ALLOC_H,1,[Define to 1 if we have nc_alloc.h header]) 16460e3d5408SPeter Wemm 16470e3d5408SPeter Wemm### use option --enable-expanded to generate certain macros as functions 16480e3d5408SPeter WemmAC_ARG_ENABLE(expanded, 16490e3d5408SPeter Wemm [ --enable-expanded test: generate functions for certain macros], 165073f0a83dSXin LI [test "x$enableval" = xyes && AC_DEFINE(NCURSES_EXPANDED,1,[Define to 1 to generate functions for certain macros])]) 16510e3d5408SPeter Wemm 16520e3d5408SPeter Wemm### use option --disable-macros to suppress macros in favor of functions 16530e3d5408SPeter WemmAC_ARG_ENABLE(macros, 16540e3d5408SPeter Wemm [ --disable-macros test: use functions rather than macros], 165573f0a83dSXin LI [test "$enableval" = no && AC_DEFINE(NCURSES_NOMACROS,1,[Define to 1 to use functions rather than macros])]) 16560e3d5408SPeter Wemm 16574a1a9510SRong-En Fan# Normally we only add trace() to the debug-library. Allow this to be 16584a1a9510SRong-En Fan# extended to all models of the ncurses library: 16594a1a9510SRong-En Fancf_all_traces=no 16604a1a9510SRong-En Fancase "$CFLAGS $CPPFLAGS" in 1661aae38d10SBaptiste Daroussin(*-DTRACE*) 16624a1a9510SRong-En Fan cf_all_traces=yes 16634a1a9510SRong-En Fan ;; 16644a1a9510SRong-En Fanesac 16654a1a9510SRong-En Fan 16664a1a9510SRong-En FanAC_MSG_CHECKING(whether to add trace feature to all models) 16674a1a9510SRong-En FanAC_ARG_WITH(trace, 16684a1a9510SRong-En Fan[ --with-trace test: add trace() function to all models of ncurses], 16694a1a9510SRong-En Fan[cf_with_trace=$withval], 16704a1a9510SRong-En Fan[cf_with_trace=$cf_all_traces]) 16714a1a9510SRong-En FanAC_MSG_RESULT($cf_with_trace) 16724a1a9510SRong-En Fan 167373f0a83dSXin LIif test "x$cf_with_trace" = xyes ; then 16744a1a9510SRong-En Fan LIB_TRACING=all 16754a1a9510SRong-En Fan ADA_TRACE=TRUE 16764a1a9510SRong-En Fan CF_ADD_CFLAGS(-DTRACE) 1677aae38d10SBaptiste Daroussin AC_DEFINE(HAVE__TRACEF,1,[Define to 1 if we have _tracef function]) 16784a1a9510SRong-En Fanelse 16794a1a9510SRong-En Fan LIB_TRACING=DEBUG 16804a1a9510SRong-En Fan ADA_TRACE=FALSE 16814a1a9510SRong-En Fanfi 16824a1a9510SRong-En Fan 16834a1a9510SRong-En FanAC_SUBST(ADA_TRACE) 16844a1a9510SRong-En Fan 1685aae38d10SBaptiste DaroussinCF_DISABLE_GNAT_PROJECTS 1686aae38d10SBaptiste Daroussin 16870e3d5408SPeter Wemm### Checks for libraries. 1688*7a656419SBaptiste Daroussincase "$cf_cv_system_name" in 1689aae38d10SBaptiste Daroussin(*mingw32*|*mingw64*) 1690*7a656419SBaptiste Daroussin if test "x$with_exp_win32" = xyes ; then 1691*7a656419SBaptiste Daroussin CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN" 1692*7a656419SBaptiste Daroussin else 1693aae38d10SBaptiste Daroussin CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN" 1694*7a656419SBaptiste Daroussin fi 1695aae38d10SBaptiste Daroussin # Note: WINVER may be a problem with Windows 10 169606bfebdeSXin LI ;; 1697aae38d10SBaptiste Daroussin(*) 16980e3d5408SPeter WemmAC_CHECK_FUNC(gettimeofday, 169973f0a83dSXin LI AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define to 1 if we have gettimeofday function]),[ 17000e3d5408SPeter Wemm 17010e3d5408SPeter WemmAC_CHECK_LIB(bsd, gettimeofday, 170273f0a83dSXin LI AC_DEFINE(HAVE_GETTIMEOFDAY,1,[Define to 1 if we have gettimeofday function]) 170306bfebdeSXin LI CF_ADD_LIB(bsd))])dnl CLIX: bzero, select, gettimeofday 170406bfebdeSXin LI ;; 170506bfebdeSXin LIesac 17060e3d5408SPeter Wemm 170773f0a83dSXin LICF_MATH_LIB(MATH_LIB,pow(sin(x),x)) 17080e3d5408SPeter WemmAC_SUBST(MATH_LIB) 17090e3d5408SPeter Wemm 17100e3d5408SPeter Wemm### Checks for header files. 17110e3d5408SPeter WemmAC_STDC_HEADERS 17120e3d5408SPeter WemmAC_HEADER_DIRENT 171339f2269fSPeter WemmAC_HEADER_TIME 17140e3d5408SPeter WemmCF_REGEX 17150e3d5408SPeter Wemm 17160e3d5408SPeter Wemmdnl These are some other potentially nonportable headers. 17170e3d5408SPeter WemmAC_CHECK_HEADERS( \ 17180e3d5408SPeter Wemmfcntl.h \ 17190e3d5408SPeter Wemmgetopt.h \ 17200e3d5408SPeter Wemmlimits.h \ 17210e3d5408SPeter Wemmlocale.h \ 172206bfebdeSXin LImath.h \ 172315589c42SPeter Wemmpoll.h \ 17240e3d5408SPeter Wemmsys/ioctl.h \ 17250e3d5408SPeter Wemmsys/param.h \ 172615589c42SPeter Wemmsys/poll.h \ 17270e3d5408SPeter Wemmsys/select.h \ 17280e3d5408SPeter Wemmsys/time.h \ 17290e3d5408SPeter Wemmsys/times.h \ 17300e3d5408SPeter Wemmttyent.h \ 17310e3d5408SPeter Wemmunistd.h \ 17324a1a9510SRong-En Fanwctype.h \ 17330e3d5408SPeter Wemm) 17340e3d5408SPeter Wemm 173573f0a83dSXin LICF_GETOPT_HEADER 173673f0a83dSXin LI 1737aae38d10SBaptiste DaroussinCF_CHECK_ENVIRON(environ) 1738aae38d10SBaptiste DaroussinCF_CHECK_GETENV 1739aae38d10SBaptiste Daroussinif test "x$cf_cv_consistent_getenv" = xno && \ 1740aae38d10SBaptiste Daroussin test "x$cf_with_trace" = xyes 1741aae38d10SBaptiste Daroussinthen 1742aae38d10SBaptiste Daroussin AC_MSG_WARN(The NCURSES_TRACE environment variable is not supported with this configuration) 1743aae38d10SBaptiste Daroussinfi 1744aae38d10SBaptiste Daroussin 17450e3d5408SPeter WemmCF_SYS_TIME_SELECT 17460e3d5408SPeter Wemm 17470e3d5408SPeter Wemm### checks for compiler characteristics 17480e3d5408SPeter WemmAC_LANG_C 17490e3d5408SPeter WemmAC_C_CONST 17505ca44d1cSRong-En FanCF_C_INLINE(NCURSES_INLINE,1200) 17515ca44d1cSRong-En FanCF_SIG_ATOMIC_T 17524a1a9510SRong-En Fan 1753*7a656419SBaptiste Daroussinif test "$NCURSES_CHTYPE" = auto ; then 17540e3d5408SPeter Wemm CF_TYPEOF_CHTYPE 17554a1a9510SRong-En Fanelse 17564a1a9510SRong-En Fan cf_cv_typeof_chtype=$NCURSES_CHTYPE 17574a1a9510SRong-En Fanfi 17585ca44d1cSRong-En Fantest "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype="" 17594a1a9510SRong-En FanAC_SUBST(cf_cv_typeof_chtype) 17604a1a9510SRong-En Fan 17614a1a9510SRong-En FanCF_UNSIGNED_LITERALS 17624a1a9510SRong-En Fancf_cv_1UL="1" 17635ca44d1cSRong-En Fantest ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U" 17645ca44d1cSRong-En Fantest ".$cf_cv_typeof_chtype" = .long && cf_cv_1UL="${cf_cv_1UL}L" 17654a1a9510SRong-En FanAC_SUBST(cf_cv_1UL) 17664a1a9510SRong-En Fan 1767*7a656419SBaptiste Daroussinif test "$NCURSES_MMASK_T" = auto ; then 17684a1a9510SRong-En Fan cf_cv_typeof_mmask_t=long 17694a1a9510SRong-En Fanelse 17704a1a9510SRong-En Fan cf_cv_typeof_mmask_t=$NCURSES_MMASK_T 17714a1a9510SRong-En Fanfi 17725ca44d1cSRong-En Fantest "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t="" 17734a1a9510SRong-En FanAC_SUBST(cf_cv_typeof_mmask_t) 17740e3d5408SPeter Wemm 17750e3d5408SPeter Wemm### Checks for external-data 17760e3d5408SPeter WemmCF_ERRNO 17770e3d5408SPeter WemmCF_LINK_DATAONLY 17780e3d5408SPeter Wemm 17790e3d5408SPeter Wemm### Checks for library functions. 178015589c42SPeter WemmAC_CHECK_FUNCS( \ 178115589c42SPeter Wemmgetcwd \ 178218259542SPeter Wemmgetegid \ 178318259542SPeter Wemmgeteuid \ 1784aae38d10SBaptiste Daroussingetopt \ 17850e3d5408SPeter Wemmgetttynam \ 178618259542SPeter Wemmissetugid \ 1787aae38d10SBaptiste Daroussinlocaleconv \ 17880e3d5408SPeter Wemmpoll \ 178973f0a83dSXin LIputenv \ 17900e3d5408SPeter Wemmremove \ 17910e3d5408SPeter Wemmselect \ 17920e3d5408SPeter Wemmsetbuf \ 17930e3d5408SPeter Wemmsetbuffer \ 179473f0a83dSXin LIsetenv \ 17950e3d5408SPeter Wemmsetvbuf \ 17960e3d5408SPeter Wemmsigaction \ 17970e3d5408SPeter Wemmsigvec \ 1798*7a656419SBaptiste Daroussinsnprintf \ 17990e3d5408SPeter Wemmstrdup \ 18000e3d5408SPeter Wemmstrstr \ 1801aae38d10SBaptiste Daroussinsysconf \ 18020e3d5408SPeter Wemmtcgetpgrp \ 18030e3d5408SPeter Wemmtimes \ 1804aae38d10SBaptiste Daroussintsearch \ 18050e3d5408SPeter Wemmvsnprintf \ 18060e3d5408SPeter Wemm) 1807aae38d10SBaptiste Daroussin 1808aae38d10SBaptiste Daroussinif test "x$ac_cv_func_getopt" = xno && \ 1809aae38d10SBaptiste Daroussin test "x$cf_with_progs$cf_with_tests" != xnono; then 1810aae38d10SBaptiste Daroussin AC_MSG_ERROR(getopt is required for building programs) 1811aae38d10SBaptiste Daroussinfi 1812aae38d10SBaptiste Daroussin 1813aae38d10SBaptiste Daroussinif test "x$with_safe_sprintf" = xyes 1814aae38d10SBaptiste Daroussinthen 1815aae38d10SBaptiste Daroussin if test "x$ac_cv_func_vsnprintf" = xyes 1816aae38d10SBaptiste Daroussin then 1817aae38d10SBaptiste Daroussin AC_MSG_WARN(will use vsnprintf instead of safe-sprintf option) 1818aae38d10SBaptiste Daroussin else 1819aae38d10SBaptiste Daroussin AC_DEFINE(USE_SAFE_SPRINTF,1,[Define to 1 to compile with experimental safe-sprintf code]) 1820aae38d10SBaptiste Daroussin fi 1821aae38d10SBaptiste Daroussinfi 1822aae38d10SBaptiste Daroussin 182373f0a83dSXin LIif test "x$with_getcap" = "xyes" ; then 18240e3d5408SPeter Wemm CF_CGETENT 18250e3d5408SPeter Wemmfi 18260e3d5408SPeter Wemm 18270e3d5408SPeter WemmCF_ISASCII 18280e3d5408SPeter WemmCF_STRUCT_SIGACTION 18294a1a9510SRong-En FanCF_FUNC_NANOSLEEP 183018259542SPeter WemmCF_FUNC_TERMIOS 183139f2269fSPeter WemmCF_FUNC_VSSCANF 183239f2269fSPeter WemmCF_MKSTEMP 183339f2269fSPeter Wemm 183439f2269fSPeter Wemm# setup for prototype of fallback for vsscanf() 18354a1a9510SRong-En FanCF_SUBST_IF(["$cf_cv_func_vsscanf" = vsscanf], HAVE_VSSCANF, 1, 0) 18360e3d5408SPeter Wemm 18370e3d5408SPeter Wemmdnl FIXME (may need this) AC_SYS_RESTARTABLE_SYSCALLS 183873f0a83dSXin LIif test "x$cross_compiling" = xyes ; then 18390e3d5408SPeter Wemm AC_MSG_WARN(cross compiling: assume setvbuf params not reversed) 18400e3d5408SPeter Wemmelse 18410e3d5408SPeter Wemm AC_FUNC_SETVBUF_REVERSED 18420e3d5408SPeter Wemmfi 184373f0a83dSXin LIAC_CHECK_TYPE(intptr_t, long) 1844aae38d10SBaptiste DaroussinAC_CHECK_TYPE(ssize_t, int) 18450e3d5408SPeter WemmCF_TYPE_SIGACTION 18460e3d5408SPeter WemmCF_SIZECHANGE 18470e3d5408SPeter WemmCF_FUNC_MEMMOVE 184815589c42SPeter WemmCF_FUNC_POLL 184906bfebdeSXin LICF_VA_COPY 185006bfebdeSXin LIAC_FUNC_VFORK 1851aae38d10SBaptiste DaroussinCF_FOPEN_BIN_R 18520e3d5408SPeter Wemm 1853aa59d4d4SRong-En Fan# special check for test/ditto.c 1854aa59d4d4SRong-En FanCF_FUNC_OPENPTY 1855aa59d4d4SRong-En Fanif test "$cf_cv_func_openpty" != no ; then 185673f0a83dSXin LI AC_DEFINE_UNQUOTED(USE_OPENPTY_HEADER,<$cf_cv_func_openpty>,[Define to actual header for openpty function]) 185773f0a83dSXin LI AC_DEFINE(USE_XTERM_PTY,1,[Define to 1 if we should assume xterm pseudoterminal interface]) 185873f0a83dSXin LI if test "x$cf_cv_lib_util" = xyes ; then 185906bfebdeSXin LI CF_ADD_LIB(util,TEST_LIBS) 1860aa59d4d4SRong-En Fan fi 1861aa59d4d4SRong-En Fanfi 1862aa59d4d4SRong-En FanAC_SUBST(TEST_LIBS) 186306bfebdeSXin LIAC_SUBST(TEST_LIBS2) 1864aa59d4d4SRong-En Fan 18654a1a9510SRong-En Fanif test "$with_hashed_db" != no ; then 186673f0a83dSXin LI AC_DEFINE(USE_HASHED_DB,1,[Define to 1 if we should build terminfo in hashed database]) 18675ca44d1cSRong-En Fan CF_HASHED_DB($with_hashed_db) 18684a1a9510SRong-En Fanfi 18694a1a9510SRong-En Fan 18700e3d5408SPeter Wemmdnl We'll do our own -g libraries, unless the user's overridden via $CFLAGS 1871*7a656419SBaptiste Daroussinif test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then 18720e3d5408SPeter Wemm CF_STRIP_G_OPT(CFLAGS) 18730e3d5408SPeter Wemm CF_STRIP_G_OPT(CXXFLAGS) 18740e3d5408SPeter Wemmfi 18750e3d5408SPeter Wemm 18764a1a9510SRong-En Fan# Just in case, check if the C compiler has a bool type. 18770e3d5408SPeter WemmCF_BOOL_DECL(cf_cv_cc_bool_type) 18784a1a9510SRong-En Fan 18794a1a9510SRong-En Fan# Check for C++ compiler characteristics (and ensure that it's there!) 18800e3d5408SPeter Wemmif test -n "$CXX" ; then 18810e3d5408SPeter Wemm AC_LANG_CPLUSPLUS 18821759abf3SPeter Wemm CF_STDCPP_LIBRARY 1883aae38d10SBaptiste Daroussin CF_PROG_CC_C_O(CXX,[$CXXFLAGS $CPPFLAGS]) 18847a69bbfbSPeter Wemm 1885*7a656419SBaptiste Daroussin case "$GXX_VERSION" in 1886*7a656419SBaptiste Daroussin (1.*|2.[[0-6]]*|[[1-9]][[0-9]].*) 18870e3d5408SPeter Wemm cf_cxx_library=yes 18880e3d5408SPeter Wemm ;; 1889aae38d10SBaptiste Daroussin (*-2.7*|2.7*) 18901759abf3SPeter Wemm CF_GPP_LIBRARY 18911759abf3SPeter Wemm ;; 1892aae38d10SBaptiste Daroussin (*) 18931759abf3SPeter Wemm cf_cxx_library=no 18941759abf3SPeter Wemm ;; 18950e3d5408SPeter Wemm esac 18967a69bbfbSPeter Wemm 189773f0a83dSXin LI AC_CHECK_HEADERS(typeinfo) 189873f0a83dSXin LI CF_CXX_IOSTREAM_NAMESPACE 18990e3d5408SPeter Wemm CF_BOOL_DECL 19000e3d5408SPeter Wemm CF_BOOL_SIZE 19010e3d5408SPeter Wemm CF_ETIP_DEFINES 19021759abf3SPeter Wemm CF_CPP_PARAM_INIT 19034a1a9510SRong-En Fan CF_CPP_STATIC_CAST 190473f0a83dSXin LI CF_CXX_AR_FLAGS 19050e3d5408SPeter Wemmelse 19060e3d5408SPeter Wemm cf_cxx_library=no 19071759abf3SPeter Wemm cf_cv_builtin_bool=1 19080e3d5408SPeter Wemm 19090e3d5408SPeter Wemm # Just because we are not configuring against C++ right now does not 19100e3d5408SPeter Wemm # mean that a user will not want to use C++. Some distributors disable 19110e3d5408SPeter Wemm # the C++ portion of this configuration as a shortcut (or just to avoid 19120e3d5408SPeter Wemm # compiling the demo in the c++ directory). So we need a reasonable 19130e3d5408SPeter Wemm # default for the 'bool' type. 19140e3d5408SPeter Wemm # 19150e3d5408SPeter Wemm # Caveat: since the storage of the bool type is not standardized, it 19160e3d5408SPeter Wemm # may change. 19170e3d5408SPeter Wemm 191839f2269fSPeter Wemm if test "$NCURSES_BOOL" != auto ; then 19194a1a9510SRong-En Fan cf_cv_type_of_bool=$NCURSES_BOOL 19204a1a9510SRong-En Fan cf_cv_header_stdbool_h=0 192139f2269fSPeter Wemm else 192239f2269fSPeter Wemm if test "$cf_cv_header_stdbool_h" = 1 ; then 192339f2269fSPeter Wemm CF_BOOL_SIZE 192439f2269fSPeter Wemm else 19250e3d5408SPeter Wemm AC_MSG_CHECKING(for fallback type of bool) 1926aae38d10SBaptiste Daroussin case "$host_cpu" in 1927aae38d10SBaptiste Daroussin (i?86) cf_cv_type_of_bool=char ;; 1928aae38d10SBaptiste Daroussin (*) cf_cv_type_of_bool=int ;; 19290e3d5408SPeter Wemm esac 19300e3d5408SPeter Wemm AC_MSG_RESULT($cf_cv_type_of_bool) 19310e3d5408SPeter Wemm fi 193239f2269fSPeter Wemm fi 193339f2269fSPeter Wemmfi 19340e3d5408SPeter WemmAC_SUBST(CXXLIBS) 19350e3d5408SPeter Wemm 19364a1a9510SRong-En Fan# If the C compiler did not declare bool, and we did not determine that the C++ 19374a1a9510SRong-En Fan# compiler does not declare bool, turn on an ifdef in curses.h that makes the 19384a1a9510SRong-En Fan# ncurses library use the same type as C++ bool. Note that this allows one to 19394a1a9510SRong-En Fan# specify the type of bool in a configure-script option and postpone 19404a1a9510SRong-En Fan# integration with the C++ compiler provided that the types are compatible. 19414a1a9510SRong-En FanUSE_CXX_BOOL=1 1942*7a656419SBaptiste Daroussinif test "$cf_cv_cc_bool_type" = 1 19434a1a9510SRong-En Fanthen 19444a1a9510SRong-En Fan # oops: C has a bool. Unlikely, but C++ could differ. 19454a1a9510SRong-En Fan USE_CXX_BOOL=0 1946*7a656419SBaptiste Daroussinelif test "$cf_cv_builtin_bool" = 0 19474a1a9510SRong-En Fanthen 19484a1a9510SRong-En Fan # C++ has no bool 19494a1a9510SRong-En Fan USE_CXX_BOOL=0 19504a1a9510SRong-En Fanelse 19514a1a9510SRong-En Fan # this is the normal case 19524a1a9510SRong-En Fan USE_CXX_BOOL='defined(__cplusplus)' 19534a1a9510SRong-En Fanfi 19544a1a9510SRong-En FanAC_SUBST(USE_CXX_BOOL) 19554a1a9510SRong-En Fan 1956aae38d10SBaptiste DaroussinCF_HELP_MESSAGE(Ada Binding Options:) 19570e3d5408SPeter Wemm 19585ca44d1cSRong-En Fandnl If the Ada95 source-tree is present, add that to the build unless it will 19595ca44d1cSRong-En Fandnl not work, or was not requested. 19605ca44d1cSRong-En Fanif test -f "${srcdir}/Ada95/Makefile.in" ; then 19615ca44d1cSRong-En Fan 19625ca44d1cSRong-En Fandnl libtool does not know anything about GNAT, though a change made in 1998 19635ca44d1cSRong-En Fandnl provided for it "someday". Disable the ada subtree if we are using 19645ca44d1cSRong-En Fandnl libtool -TD 20070714 19655ca44d1cSRong-En Fan if test "$cf_with_ada" != "no" ; then 19665ca44d1cSRong-En Fan if test "$with_libtool" != "no"; then 19675ca44d1cSRong-En Fan AC_MSG_WARN(libtool does not support Ada - disabling feature) 19685ca44d1cSRong-En Fan cf_with_ada=no 19695ca44d1cSRong-En Fan fi 19705ca44d1cSRong-En Fan fi 19715ca44d1cSRong-En Fan 19720e3d5408SPeter Wemmdnl Check for availability of GNU Ada Translator (GNAT). 1973aae38d10SBaptiste Daroussindnl At the moment we support no other Ada compiler. 19740e3d5408SPeter Wemm if test "$cf_with_ada" != "no" ; then 197506bfebdeSXin LI CF_PROG_GNAT 197673f0a83dSXin LI if test "x$cf_cv_prog_gnat_correct" = xyes; then 197706bfebdeSXin LI CF_ADD_ADAFLAGS(-gnatpn) 197873f0a83dSXin LI CF_FIXUP_ADAFLAGS 19794a1a9510SRong-En Fan 1980aae38d10SBaptiste Daroussin CF_GNATPREP_OPT_T 1981aae38d10SBaptiste Daroussin 198206bfebdeSXin LI CF_GNAT_GENERICS 198306bfebdeSXin LI CF_GNAT_SIGINT 198406bfebdeSXin LI CF_GNAT_PROJECTS 19854a1a9510SRong-En Fan 198606bfebdeSXin LI CF_WITH_ADA_COMPILER 19870e3d5408SPeter Wemm 19880e3d5408SPeter Wemm cf_ada_package=terminal_interface 19890e3d5408SPeter Wemm AC_SUBST(cf_ada_package) 19900e3d5408SPeter Wemm 199106bfebdeSXin LI CF_WITH_ADA_INCLUDE 199206bfebdeSXin LI CF_WITH_ADA_OBJECTS 199306bfebdeSXin LI CF_WITH_ADA_SHAREDLIB 1994aae38d10SBaptiste Daroussin 1995aae38d10SBaptiste Daroussin # allow the Ada binding to be renamed 1996aae38d10SBaptiste Daroussin CF_WITH_ADA_LIBNAME(AdaCurses) 19970e3d5408SPeter Wemm fi 19980e3d5408SPeter Wemm fi 19995ca44d1cSRong-En Fanelse 20005ca44d1cSRong-En Fan cf_with_ada=no 20010e3d5408SPeter Wemmfi 20020e3d5408SPeter Wemm 200373f0a83dSXin LI# do this "late" to avoid conflict with header-checks 200473f0a83dSXin LIif test "x$with_widec" = xyes ; then 200573f0a83dSXin LI AC_CHECK_SIZEOF(wchar_t) 2006e1865124SBaptiste Daroussin # cross-compiling to mingw can run into the problem that attempting to 2007e1865124SBaptiste Daroussin # link with the regex library fails, causing the test to not set this to 2008e1865124SBaptiste Daroussin # a number. "recent" autoconf does not address this problem either -TD 2009e1865124SBaptiste Daroussin if test -z "$ac_cv_sizeof_wchar_t" 2010e1865124SBaptiste Daroussin then 2011e1865124SBaptiste Daroussin CF_VERBOSE(test failed (assume 2)) 2012e1865124SBaptiste Daroussin sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp 2013e1865124SBaptiste Daroussin mv confdefs.tmp confdefs.h 2014e1865124SBaptiste Daroussin echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h 2015e1865124SBaptiste Daroussin fi 201673f0a83dSXin LIfi 201773f0a83dSXin LI 20185ca44d1cSRong-En Fan### Construct the ncurses library-subsets, if any, from this set of keywords: 20195ca44d1cSRong-En Fan### none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar 20205ca44d1cSRong-En Fan### 20215ca44d1cSRong-En Fan### ticlib modules may be a separate library, otherwise contained in termlib. 20225ca44d1cSRong-En Fan### termlib modules may be a separate library, otherwise contained in ncurses. 20235ca44d1cSRong-En Fan### 20245ca44d1cSRong-En Fan### The of "+" or " " between the tokens controls the way the script 20255ca44d1cSRong-En Fan### chooses to split module lists into libraries. 20265ca44d1cSRong-En Fan### 20275ca44d1cSRong-En Fan### (see CF_LIB_RULES). 20280e3d5408SPeter WemmAC_MSG_CHECKING(for library subsets) 20295ca44d1cSRong-En FanLIB_SUBSETS= 20305ca44d1cSRong-En Fan 203173f0a83dSXin LIif test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then 20325ca44d1cSRong-En Fan LIB_SUBSETS="${LIB_SUBSETS}ticlib" 20335ca44d1cSRong-En Fan if test "$with_ticlib" != no ; then 20344a1a9510SRong-En Fan LIB_SUBSETS="${LIB_SUBSETS} " 20350e3d5408SPeter Wemm else 20365ca44d1cSRong-En Fan LIB_SUBSETS="${LIB_SUBSETS}+" 20370e3d5408SPeter Wemm fi 20385ca44d1cSRong-En Fanfi 20395ca44d1cSRong-En Fan 20405ca44d1cSRong-En FanLIB_SUBSETS="${LIB_SUBSETS}termlib" 204173f0a83dSXin LItest "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo" 204206bfebdeSXin LI 20435ca44d1cSRong-En Fanif test "$with_termlib" != no ; then 20445ca44d1cSRong-En Fan LIB_SUBSETS="${LIB_SUBSETS} " 20455ca44d1cSRong-En Fanelse 20465ca44d1cSRong-En Fan LIB_SUBSETS="${LIB_SUBSETS}+" 20475ca44d1cSRong-En Fanfi 20485ca44d1cSRong-En Fan 20490e3d5408SPeter WemmLIB_SUBSETS="${LIB_SUBSETS}base" 205006bfebdeSXin LI 205106bfebdeSXin LI# Most term-driver calls are to tinfo, but some like init_pair are to the 205206bfebdeSXin LI# base library (so it resides in base). 205306bfebdeSXin LIif test "$with_term_driver" != no ; then 205406bfebdeSXin LI LIB_SUBSETS="${LIB_SUBSETS}+port_drivers" 2055*7a656419SBaptiste Daroussin case "$cf_cv_system_name" in 2056aae38d10SBaptiste Daroussin (*mingw32*|*mingw64*) 2057*7a656419SBaptiste Daroussin if test "x$with_exp_win32" = xyes ; then 2058*7a656419SBaptiste Daroussin LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32" 2059*7a656419SBaptiste Daroussin else 206006bfebdeSXin LI LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con" 2061*7a656419SBaptiste Daroussin fi 2062aae38d10SBaptiste Daroussin CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER" 206306bfebdeSXin LI ;; 2064aae38d10SBaptiste Daroussin (*) 206506bfebdeSXin LI LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo" 206606bfebdeSXin LI ;; 206706bfebdeSXin LI esac 2068*7a656419SBaptiste Daroussinelif test "x$with_exp_win32" = xyes ; then 2069*7a656419SBaptiste Daroussin case "$cf_cv_system_name" in 2070*7a656419SBaptiste Daroussin (*mingw32*|*mingw64*) 2071*7a656419SBaptiste Daroussin LIB_SUBSETS="${LIB_SUBSETS}+port_win32" 2072*7a656419SBaptiste Daroussin ;; 2073*7a656419SBaptiste Daroussin (*) 2074*7a656419SBaptiste Daroussin ;; 2075*7a656419SBaptiste Daroussin esac 207606bfebdeSXin LIfi 207706bfebdeSXin LI 207873f0a83dSXin LItest "x$with_widec" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar" 207973f0a83dSXin LItest "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs" 20805ca44d1cSRong-En Fan 20810e3d5408SPeter WemmAC_MSG_RESULT($LIB_SUBSETS) 20820e3d5408SPeter Wemm 20830e3d5408SPeter Wemm### Construct the list of include-directories to be generated 20840e3d5408SPeter WemmCF_INCLUDE_DIRS 20850e3d5408SPeter WemmCF_ADA_INCLUDE_DIRS 20860e3d5408SPeter Wemm 208715589c42SPeter Wemm### Build up pieces for makefile rules 208815589c42SPeter WemmAC_MSG_CHECKING(default library suffix) 208915589c42SPeter WemmCF_LIB_TYPE($DFT_LWR_MODEL,DFT_ARG_SUFFIX)dnl 209015589c42SPeter WemmAC_SUBST(DFT_ARG_SUFFIX)dnl the string to append to "-lncurses" ("") 209115589c42SPeter WemmAC_MSG_RESULT($DFT_ARG_SUFFIX) 209215589c42SPeter Wemm 209315589c42SPeter WemmAC_MSG_CHECKING(default library-dependency suffix) 20945d08fb1fSRong-En FanCF_LIB_SUFFIX($DFT_LWR_MODEL,DFT_LIB_SUFFIX,DFT_DEP_SUFFIX)dnl 209515589c42SPeter WemmAC_SUBST(DFT_DEP_SUFFIX)dnl the corresponding library-suffix (".a") 209615589c42SPeter WemmAC_MSG_RESULT($DFT_DEP_SUFFIX) 209715589c42SPeter Wemm 209815589c42SPeter WemmAC_MSG_CHECKING(default object directory) 209915589c42SPeter WemmCF_OBJ_SUBDIR($DFT_LWR_MODEL,DFT_OBJ_SUBDIR)dnl 210015589c42SPeter WemmAC_SUBST(DFT_OBJ_SUBDIR)dnl the default object-directory ("obj") 210115589c42SPeter WemmAC_MSG_RESULT($DFT_OBJ_SUBDIR) 210215589c42SPeter Wemm 210373f0a83dSXin LIif test "x$cf_with_cxx" = xyes ; then 21047a69bbfbSPeter WemmAC_MSG_CHECKING(c++ library-dependency suffix) 21054a1a9510SRong-En Fanif test "$with_libtool" != "no"; then 210673f0a83dSXin LI # libtool thinks it can make c++ shared libraries (perhaps only g++) 210773f0a83dSXin LI CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX 210873f0a83dSXin LIelif test "$with_shared_cxx" != "no"; then 210973f0a83dSXin LI # also for g++ users... 21107a69bbfbSPeter Wemm CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX 21117a69bbfbSPeter Wemmelse 211273f0a83dSXin LI # we normally make a static library because C/C++ library rules differ 211373f0a83dSXin LI CF_LIB_SUFFIX(normal,CXX_LIB_SUFFIX,CXX_DEP_SUFFIX) 21147a69bbfbSPeter Wemmfi 21157a69bbfbSPeter WemmAC_MSG_RESULT($CXX_LIB_SUFFIX) 21167a69bbfbSPeter WemmAC_SUBST(CXX_LIB_SUFFIX) 21174a1a9510SRong-En Fanfi 21187a69bbfbSPeter Wemm 21195ca44d1cSRong-En Fan# do not want -ldl in build except as needed for -lncurses dependency 212073f0a83dSXin LIif test "x$with_dlsym" = xyes ; then 2121*7a656419SBaptiste Daroussinif test "$DFT_LWR_MODEL" = shared || \ 2122*7a656419SBaptiste Daroussin test "$DFT_LWR_MODEL" = libtool ; then 21235ca44d1cSRong-En Fan CF_REMOVE_LIB(LIBS,$LIBS,dl) 21245ca44d1cSRong-En Fanfi 21255ca44d1cSRong-En Fanfi 21264a1a9510SRong-En Fan### Set up low-level terminfo dependencies for makefiles. 21275ca44d1cSRong-En Fan 21285ca44d1cSRong-En Fan# TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but 21295ca44d1cSRong-En Fan# do not need libdl 21305ca44d1cSRong-En FanTICS_LIST= 213173f0a83dSXin LIif test "x$with_dlsym" = xyes ; then 21325ca44d1cSRong-En Fan CF_REMOVE_LIB(TINFO_LIST,$SHLIB_LIST,dl) 21335ca44d1cSRong-En Fanfi 21345ca44d1cSRong-En Fan 2135aae38d10SBaptiste DaroussinUSE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}" 2136aae38d10SBaptiste DaroussinUSE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}" 2137aae38d10SBaptiste DaroussinUSE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version} 2138aae38d10SBaptiste Daroussinif test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}" 2139aae38d10SBaptiste Daroussinthen 2140aae38d10SBaptiste Daroussin USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}" 2141aae38d10SBaptiste Daroussinfi 2142aae38d10SBaptiste DaroussinAC_SUBST(USE_ARG_SUFFIX) 2143aae38d10SBaptiste DaroussinAC_SUBST(USE_CFG_SUFFIX) 2144aae38d10SBaptiste DaroussinAC_SUBST(USE_LIB_SUFFIX) 2145aae38d10SBaptiste Daroussin 21465ca44d1cSRong-En Fanif test "$with_ticlib" != no ; then 21475ca44d1cSRong-En Fan 214873f0a83dSXin LI if test "x$with_ticlib" != xyes ; then 21495ca44d1cSRong-En Fan TICS_NAME=$with_ticlib 2150*7a656419SBaptiste Daroussin TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`" 2151*7a656419SBaptiste Daroussin TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`" 2152*7a656419SBaptiste Daroussin TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`" 21535ca44d1cSRong-En Fan TICS_LIB_SUFFIX="${with_ticlib}" 21545ca44d1cSRong-En Fan else 2155aae38d10SBaptiste Daroussin TICS_SUFFIX=${DFT_LIB_SUFFIX} 2156aae38d10SBaptiste Daroussin TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}" 21575ca44d1cSRong-En Fan TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}" 2158aae38d10SBaptiste Daroussin TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}" 21595ca44d1cSRong-En Fan fi 216073f0a83dSXin LI TICS_LDFLAGS="-L${LIB_DIR}" 2161aae38d10SBaptiste Daroussin TICS_LIBS="-l${TICS_ARG_SUFFIX}" 21625ca44d1cSRong-En Fanelse 2163aae38d10SBaptiste Daroussin TICS_SUFFIX=${DFT_LIB_SUFFIX} 216473f0a83dSXin LI TICS_LDFLAGS="-L${LIB_DIR}" 2165aae38d10SBaptiste Daroussin TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}" 21665ca44d1cSRong-En Fanfi 21675ca44d1cSRong-En FanAC_SUBST(TICS_ARG_SUFFIX) 21685ca44d1cSRong-En FanAC_SUBST(TICS_DEP_SUFFIX) 21695ca44d1cSRong-En FanAC_SUBST(TICS_LIB_SUFFIX) 217073f0a83dSXin LIAC_SUBST(TICS_LDFLAGS) 217173f0a83dSXin LIAC_SUBST(TICS_LIBS) 21725ca44d1cSRong-En Fan 21734a1a9510SRong-En Fanif test "$with_termlib" != no ; then 21744a1a9510SRong-En Fan 217573f0a83dSXin LI if test "x$with_termlib" != xyes ; then 21764a1a9510SRong-En Fan TINFO_NAME=$with_termlib 2177*7a656419SBaptiste Daroussin TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`" 2178*7a656419SBaptiste Daroussin TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`" 2179*7a656419SBaptiste Daroussin TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`" 21804a1a9510SRong-En Fan TINFO_LIB_SUFFIX="${with_termlib}" 21814a1a9510SRong-En Fan else 21825ca44d1cSRong-En Fan TINFO_SUFFIX=${DFT_LIB_SUFFIX} 2183aae38d10SBaptiste Daroussin TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}" 21844a1a9510SRong-En Fan TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}" 2185aae38d10SBaptiste Daroussin TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}" 21864a1a9510SRong-En Fan fi 21874a1a9510SRong-En Fan 21884a1a9510SRong-En Fan TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}" 21894a1a9510SRong-En Fan TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}" 21904a1a9510SRong-En Fan if test "$DFT_LWR_MODEL" = "libtool"; then 21914a1a9510SRong-En Fan TEST_ARGS="${TEST_DEPS}" 21924a1a9510SRong-En Fan TEST_ARG2="${TEST_DEP2}" 219373f0a83dSXin LI TINFO_LDFLAGS="-L${LIB_DIR}" 219473f0a83dSXin LI TINFO_LIBS="$TEST_ARGS" 219506bfebdeSXin LI TICS_LIST="$SHLIB_LIST $TEST_ARGS" 219606bfebdeSXin LI SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS" 21974a1a9510SRong-En Fan else 21984a1a9510SRong-En Fan TEST_ARGS="-l${TINFO_ARG_SUFFIX}" 21994a1a9510SRong-En Fan TEST_ARG2="-l${TINFO_ARG_SUFFIX}" 220073f0a83dSXin LI if test "x$with_term_driver" != xno ; then 2201aae38d10SBaptiste Daroussin TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}" 2202aae38d10SBaptiste Daroussin TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}" 2203aae38d10SBaptiste Daroussin TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS" 220473f0a83dSXin LI else 22055ca44d1cSRong-En Fan TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}" 220673f0a83dSXin LI TINFO_LIBS="$TEST_ARGS" 220773f0a83dSXin LI fi 220873f0a83dSXin LI TINFO_LDFLAGS="-L${LIB_DIR}" 22094a1a9510SRong-En Fan SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}" 22104a1a9510SRong-En Fan fi 22114a1a9510SRong-En Fanelse 22125ca44d1cSRong-En Fan # the next lines are needed for linking libtic over libncurses 22135ca44d1cSRong-En Fan TINFO_NAME=${LIB_NAME} 22145ca44d1cSRong-En Fan TINFO_SUFFIX=${DFT_LIB_SUFFIX} 2215aae38d10SBaptiste Daroussin TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX} 221673f0a83dSXin LI if test "x$with_tic_depends" = xyes ; then 2217aae38d10SBaptiste Daroussin TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}" 22185d08fb1fSRong-En Fan else 22195d08fb1fSRong-En Fan TICS_LIST="$SHLIB_LIST" 22205d08fb1fSRong-En Fan fi 22215ca44d1cSRong-En Fan 222273f0a83dSXin LI TINFO_LDFLAGS="-L${LIB_DIR}" 2223aae38d10SBaptiste Daroussin TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}" 22244a1a9510SRong-En Fanfi 22255ca44d1cSRong-En Fan 22265ca44d1cSRong-En Fanif test "$DFT_LWR_MODEL" = shared ; then 2227*7a656419SBaptiste Daroussin case "$cf_cv_system_name" in 2228aae38d10SBaptiste Daroussin (cygwin*|msys*) 222973f0a83dSXin LI # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll" 22305ca44d1cSRong-En Fan TINFO_SUFFIX=.dll 22315ca44d1cSRong-En Fan ;; 22325ca44d1cSRong-En Fan esac 22335ca44d1cSRong-En Fanfi 22345ca44d1cSRong-En Fan 22354a1a9510SRong-En FanAC_SUBST(TINFO_ARG_SUFFIX) 22364a1a9510SRong-En FanAC_SUBST(TINFO_DEP_SUFFIX) 22374a1a9510SRong-En FanAC_SUBST(TINFO_LIB_SUFFIX) 223873f0a83dSXin LIAC_SUBST(TINFO_LDFLAGS) 223973f0a83dSXin LIAC_SUBST(TINFO_LIBS) 22404a1a9510SRong-En Fan 224173f0a83dSXin LIif test "x$with_dlsym" = xyes ; then 22425ca44d1cSRong-En Fan CF_REMOVE_LIB(TICS_LIST,$TICS_LIST,dl) 22435ca44d1cSRong-En Fanfi 22445ca44d1cSRong-En Fan 2245aa59d4d4SRong-En Fanif test "$DFT_LWR_MODEL" = "libtool"; then 2246aa59d4d4SRong-En Fan OBJEXT=lo 2247aa59d4d4SRong-En Fanfi 2248aa59d4d4SRong-En Fan 22494a1a9510SRong-En Fan# needed for Ada95 225073f0a83dSXin LITINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'` 225173f0a83dSXin LIAC_SUBST(TINFO_LDFLAGS2) 225215589c42SPeter Wemm 2253*7a656419SBaptiste Daroussincase "$DFT_LWR_MODEL" in 2254aae38d10SBaptiste Daroussin(normal|debug|profile) 22555ca44d1cSRong-En Fan CF_LDFLAGS_STATIC 22565ca44d1cSRong-En Fan ;; 22575ca44d1cSRong-En Fanesac 22585ca44d1cSRong-En Fan 225915589c42SPeter WemmAC_MSG_CHECKING(where we will install curses.h) 226073f0a83dSXin LIAC_SUBST(includesubdir) 226173f0a83dSXin LIincludesubdir= 226273f0a83dSXin LIif test "$with_overwrite" = no && \ 2263*7a656419SBaptiste Daroussin { test "x$includedir" = 'x${prefix}/include' || \ 2264*7a656419SBaptiste Daroussin test "x$includedir" = "x${prefix}/include"; } 226573f0a83dSXin LIthen 2266aae38d10SBaptiste Daroussin includesubdir="/ncurses${USE_LIB_SUFFIX}" 226773f0a83dSXin LIfi 226873f0a83dSXin LIAC_MSG_RESULT(${includedir}${includesubdir}) 226915589c42SPeter Wemm 22704a1a9510SRong-En Fan### Resolve a conflict between normal and wide-curses by forcing applications 22714a1a9510SRong-En Fan### that will need libutf8 to add it to their configure script. 22724a1a9510SRong-En Fanif test "$with_overwrite" != no ; then 22734a1a9510SRong-En Fanif test "$NCURSES_LIBUTF8" = 1 ; then 22744a1a9510SRong-En Fan NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)' 22754a1a9510SRong-En Fan AC_MSG_WARN(Wide-character applications must define HAVE_LIBUTF8_H to include curses.h) 22764a1a9510SRong-En Fanfi 22774a1a9510SRong-En Fanfi 227806bfebdeSXin LIWITH_OVERWRITE=$with_overwrite 22794a1a9510SRong-En Fan 2280*7a656419SBaptiste Daroussin### At least on MinGW a shared library build without libtool 2281*7a656419SBaptiste Daroussin### requires adding the additional libs to the link list. 2282*7a656419SBaptiste Daroussincase "$cf_cv_system_name" in 2283*7a656419SBaptiste Daroussin(*mingw32*|*mingw64*) 2284*7a656419SBaptiste Daroussin if test "$DFT_LWR_MODEL" != "libtool"; then 2285*7a656419SBaptiste Daroussin SHLIB_LIST="$SHLIB_LIST ${LIBS}" 2286*7a656419SBaptiste Daroussin fi 2287*7a656419SBaptiste Daroussin ;; 2288*7a656419SBaptiste Daroussin*) ;; 2289*7a656419SBaptiste Daroussinesac 2290*7a656419SBaptiste Daroussin 22914a1a9510SRong-En FanAC_SUBST(WITH_OVERWRITE) 22925ca44d1cSRong-En FanAC_SUBST(TICS_LIST) 229315589c42SPeter WemmAC_SUBST(TINFO_LIST) 229415589c42SPeter WemmAC_SUBST(SHLIB_LIST) 229515589c42SPeter Wemm 22965ca44d1cSRong-En Fan# used to separate tack out of the tree 22975ca44d1cSRong-En FanNCURSES_TREE= 22985ca44d1cSRong-En FanAC_SUBST(NCURSES_TREE) 22995ca44d1cSRong-En Fan 23004a1a9510SRong-En Fan### predefined stuff for the test programs 230173f0a83dSXin LIAC_DEFINE(HAVE_SLK_COLOR,1,[Define to 1 if we have slk_color for test-programs]) 23020e3d5408SPeter Wemm 2303*7a656419SBaptiste Daroussin# pkgsrc uses these 2304*7a656419SBaptiste DaroussinCF_WITH_LIB_BASENAME(FORM_NAME,form) 2305*7a656419SBaptiste DaroussinCF_WITH_LIB_BASENAME(MENU_NAME,menu) 2306*7a656419SBaptiste DaroussinCF_WITH_LIB_BASENAME(PANEL_NAME,panel) 2307*7a656419SBaptiste DaroussinCF_WITH_LIB_BASENAME(CXX_NAME,cxx,ncurses++) 2308*7a656419SBaptiste Daroussin 23090e3d5408SPeter Wemm### Construct the list of subdirectories for which we'll customize makefiles 23100e3d5408SPeter Wemm### with the appropriate compile-rules. 23110e3d5408SPeter Wemm 23120e3d5408SPeter WemmCF_SRC_MODULES($modules_to_build) 23135ca44d1cSRong-En Fan 231473f0a83dSXin LIif test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then 2315aae38d10SBaptiste Daroussin SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in" 2316aae38d10SBaptiste Daroussin SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in" 2317aae38d10SBaptiste Daroussin SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in" 23185ca44d1cSRong-En Fanfi 23195ca44d1cSRong-En Fan 23200e3d5408SPeter WemmCF_DIRS_TO_MAKE 23210e3d5408SPeter Wemm 232206bfebdeSXin LI# symbols that differ when compiling Ada95 by itself. 2323aae38d10SBaptiste DaroussinNCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib' 232406bfebdeSXin LIAC_SUBST(NCURSES_SHLIB2) 232506bfebdeSXin LI 232606bfebdeSXin LI# values to use as strings 232773f0a83dSXin LIAC_DEFINE_UNQUOTED(NCURSES_PATHSEP,'$PATH_SEPARATOR',[Define to override ':' as library path-separator]) 23287a69bbfbSPeter Wemm 232973f0a83dSXin LIAC_DEFINE_UNQUOTED(NCURSES_VERSION_STRING, "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}",[Define to 1 if machine has ample memory for tic]) 23304a1a9510SRong-En Fan 23314a1a9510SRong-En Fan### Define substitutions for header files to avoid name-pollution 233273f0a83dSXin LICF_SUBST_IF(["x$cf_cv_have_tcgetattr" = xyes], HAVE_TCGETATTR, 1, 0) 2333aae38d10SBaptiste DaroussinCF_SUBST_IF(["x$ac_cv_header_stdint_h" = xyes], HAVE_STDINT_H, 1, 0) 233473f0a83dSXin LICF_SUBST_IF(["x$ac_cv_header_termio_h" = xyes], HAVE_TERMIO_H, 1, 0) 233573f0a83dSXin LICF_SUBST_IF(["x$ac_cv_header_termios_h" = xyes], HAVE_TERMIOS_H, 1, 0) 23360e3d5408SPeter Wemm 23370e3d5408SPeter Wemm################################################################################ 233873f0a83dSXin LItest "x$use_database" = xyes && \ 233906bfebdeSXin LISUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in" 234006bfebdeSXin LI 23414a1a9510SRong-En FanSUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in" 2342aae38d10SBaptiste DaroussinSUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in" 234306bfebdeSXin LI 2344aae38d10SBaptiste Daroussinif test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then 234506bfebdeSXin LISUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in" 234606bfebdeSXin LIfi 234706bfebdeSXin LIAC_SUBST(cross_compiling) 234806bfebdeSXin LI 234906bfebdeSXin LIif test "x$cf_with_tests" != xno ; then 235006bfebdeSXin LI MAKE_TESTS= 235106bfebdeSXin LIelse 235206bfebdeSXin LI MAKE_TESTS="#" 235306bfebdeSXin LIfi 235406bfebdeSXin LIAC_SUBST(MAKE_TESTS) 235506bfebdeSXin LI 235606bfebdeSXin LIADAHTML_DIR=../../doc/html/ada 235706bfebdeSXin LIAC_SUBST(ADAHTML_DIR) 235806bfebdeSXin LI 2359aae38d10SBaptiste Daroussin# workaround for OS/2 (20151017) 2360*7a656419SBaptiste Daroussincase "$cf_cv_system_name" in 2361aae38d10SBaptiste Daroussin(os2*) 2362aae38d10SBaptiste Daroussin LIBTOOL_OPTS_CXX="-os2dllname ncurs++" 2363aae38d10SBaptiste Daroussin ;; 2364aae38d10SBaptiste Daroussin(*) 2365aae38d10SBaptiste Daroussin LIBTOOL_OPTS_CXX= 2366aae38d10SBaptiste Daroussin ;; 2367aae38d10SBaptiste Daroussinesac 2368aae38d10SBaptiste DaroussinAC_SUBST(LIBTOOL_OPTS_CXX) 2369aae38d10SBaptiste Daroussin 237073f0a83dSXin LI# workaround for g++ versus Solaris (20131116) 2371*7a656419SBaptiste Daroussincase "$cf_cv_system_name" in 2372aae38d10SBaptiste Daroussin(solaris2*) 2373aae38d10SBaptiste Daroussin case "x$CPPFLAGS" in 2374aae38d10SBaptiste Daroussin (*-D_XOPEN_SOURCE_EXTENDED*) 237573f0a83dSXin LI CF_VERBOSE(moving _XOPEN_SOURCE_EXTENDED to work around g++ problem) 237673f0a83dSXin LI CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED" 237773f0a83dSXin LI CPPFLAGS=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'` 237806bfebdeSXin LI ;; 237906bfebdeSXin LI esac 238073f0a83dSXin LI ;; 238173f0a83dSXin LIesac 238273f0a83dSXin LI 2383aae38d10SBaptiste Daroussin# Help to automatically enable the extended curses features when using either 2384aae38d10SBaptiste Daroussin# the *-config or the ".pc" files by adding defines. 2385aae38d10SBaptiste DaroussinAC_MSG_CHECKING(for defines to add to ncurses${USE_CFG_SUFFIX}-config script) 2386aae38d10SBaptiste DaroussinPKG_CFLAGS= 2387aae38d10SBaptiste Daroussinfor cf_loop1 in $CPPFLAGS_after_XOPEN 2388aae38d10SBaptiste Daroussindo 2389aae38d10SBaptiste Daroussin cf_found=no 2390aae38d10SBaptiste Daroussin for cf_loop2 in $CPPFLAGS_before_XOPEN 2391aae38d10SBaptiste Daroussin do 2392aae38d10SBaptiste Daroussin if test "x$cf_loop1" = "x$cf_loop2" 2393aae38d10SBaptiste Daroussin then 2394aae38d10SBaptiste Daroussin cf_found=yes 2395aae38d10SBaptiste Daroussin break 2396aae38d10SBaptiste Daroussin fi 2397aae38d10SBaptiste Daroussin done 2398aae38d10SBaptiste Daroussin test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1" 2399aae38d10SBaptiste Daroussindone 2400aae38d10SBaptiste DaroussinAC_MSG_RESULT($PKG_CFLAGS) 2401aae38d10SBaptiste DaroussinAC_SUBST(PKG_CFLAGS) 2402aae38d10SBaptiste Daroussin 240373f0a83dSXin LI# AC_CHECK_SIZEOF demands a literal parameter, no variables. So we do this. 2404aae38d10SBaptiste Daroussincase "x$NCURSES_OSPEED" in 2405aae38d10SBaptiste Daroussin(*short*) 240673f0a83dSXin LI cf_compatible=1 240773f0a83dSXin LI ;; 2408aae38d10SBaptiste Daroussin(*) 240973f0a83dSXin LI cf_compatible=0 241073f0a83dSXin LI ;; 241173f0a83dSXin LIesac 241273f0a83dSXin LIAC_DEFINE_UNQUOTED(NCURSES_OSPEED_COMPAT,$cf_compatible,[Define to 1 if termcap variable ospeed is short]) 241373f0a83dSXin LI 2414aae38d10SBaptiste Daroussincase "x$cf_cv_typeof_chtype" in 2415aae38d10SBaptiste Daroussin(xshort|xint|xlong) 2416aae38d10SBaptiste Daroussin cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype" 2417aae38d10SBaptiste Daroussin ;; 2418aae38d10SBaptiste Daroussinesac 2419aae38d10SBaptiste Daroussin 2420aae38d10SBaptiste Daroussincase "x$cf_cv_typeof_mmask_t" in 2421aae38d10SBaptiste Daroussin(xshort|xint|xlong) 2422aae38d10SBaptiste Daroussin cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t" 2423aae38d10SBaptiste Daroussin ;; 2424aae38d10SBaptiste Daroussinesac 2425aae38d10SBaptiste Daroussin 2426aae38d10SBaptiste Daroussin# substitute into misc/Makefile to suppress 2427aae38d10SBaptiste Daroussin# (un)install.data from the 2428aae38d10SBaptiste Daroussin# (un)install rules. 2429aae38d10SBaptiste Daroussinif test "x$cf_with_db_install" = "xno"; then 2430aae38d10SBaptiste Daroussin MISC_INSTALL_DATA= 2431aae38d10SBaptiste Daroussin MISC_UNINSTALL_DATA= 2432aae38d10SBaptiste Daroussinelse 2433aae38d10SBaptiste Daroussin MISC_INSTALL_DATA=install.data 2434aae38d10SBaptiste Daroussin MISC_UNINSTALL_DATA=uninstall.data 2435aae38d10SBaptiste Daroussinfi 2436aae38d10SBaptiste DaroussinAC_SUBST(MISC_INSTALL_DATA) 2437aae38d10SBaptiste DaroussinAC_SUBST(MISC_UNINSTALL_DATA) 2438aae38d10SBaptiste Daroussin 2439aae38d10SBaptiste Daroussinif test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then 2440aae38d10SBaptiste Daroussin MAKE_DATABASE="#" 2441aae38d10SBaptiste Daroussinelse 2442aae38d10SBaptiste Daroussin MAKE_DATABASE="$MAKE_TERMINFO" 2443aae38d10SBaptiste Daroussinfi 2444aae38d10SBaptiste DaroussinAC_SUBST(MAKE_DATABASE) 2445aae38d10SBaptiste Daroussin 2446aae38d10SBaptiste Daroussindnl Override the package used for exported symbols 2447aae38d10SBaptiste Daroussinif test -n "$PACKAGE" 2448aae38d10SBaptiste Daroussinthen 2449aae38d10SBaptiste Daroussin PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}" 2450aae38d10SBaptiste Daroussin export PACKAGE 2451aae38d10SBaptiste Daroussin echo "package: $PACKAGE" 2452aae38d10SBaptiste Daroussinfi 2453aae38d10SBaptiste Daroussin 2454aae38d10SBaptiste DaroussinUNALTERED_SYMS= 2455aae38d10SBaptiste Daroussincf_filter_syms=no 2456aae38d10SBaptiste Daroussin 2457aae38d10SBaptiste Daroussinif test -n "$RESULTING_SYMS" 2458aae38d10SBaptiste Daroussinthen 2459aae38d10SBaptiste Daroussin cf_filter_syms=$cf_dft_filter_syms 2460aae38d10SBaptiste Daroussin CF_VERBOSE(will map symbols to ABI=$cf_cv_abi_version) 2461aae38d10SBaptiste Daroussinfi 2462aae38d10SBaptiste Daroussin 2463aae38d10SBaptiste Daroussinif test "x$WILDCARD_SYMS" = xno 2464aae38d10SBaptiste Daroussinthen 2465aae38d10SBaptiste Daroussin cf_filter_syms=yes 2466aae38d10SBaptiste Daroussinfi 2467aae38d10SBaptiste Daroussin 2468aae38d10SBaptiste Daroussintest "x$cf_with_trace" = xyes && NCURSES_INLINE= 2469aae38d10SBaptiste Daroussin 2470aae38d10SBaptiste DaroussinUNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'` 2471*7a656419SBaptiste Daroussinif test "$cf_filter_syms" = yes 2472aae38d10SBaptiste Daroussinthen 2473aae38d10SBaptiste Daroussin RESULTING_SYMS=resulting.map 2474aae38d10SBaptiste Daroussinfi 2475aae38d10SBaptiste DaroussinAC_SUBST(UNALTERED_SYMS) 2476aae38d10SBaptiste Daroussin 2477aae38d10SBaptiste Daroussinif test "x$cross_compiling" = xyes ; then 2478aae38d10SBaptiste Daroussin ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)' 2479aae38d10SBaptiste Daroussin CHECK_BUILD="#" 2480aae38d10SBaptiste Daroussinelse 2481aae38d10SBaptiste Daroussin ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)' 2482aae38d10SBaptiste Daroussin CHECK_BUILD= 2483aae38d10SBaptiste Daroussinfi 2484aae38d10SBaptiste DaroussinAC_SUBST(ADAGEN_LDFLAGS) 2485aae38d10SBaptiste DaroussinAC_SUBST(CHECK_BUILD) 2486aae38d10SBaptiste DaroussinAC_SUBST(PRIVATE_LIBS) 2487aae38d10SBaptiste Daroussin 2488aae38d10SBaptiste Daroussin# This is used for the *-config script and *.pc data files. 2489aae38d10SBaptiste DaroussinCF_LD_SEARCHPATH 2490aae38d10SBaptiste Daroussin 2491aae38d10SBaptiste DaroussinAC_DEFINE(HAVE_CURSES_DATA_BOOLNAMES,1,[definition needed for in-tree build of tack]) 249206bfebdeSXin LI 24930e3d5408SPeter WemmAC_OUTPUT( \ 24940e3d5408SPeter Wemm include/MKterm.h.awk \ 249539f2269fSPeter Wemm include/curses.head:include/curses.h.in \ 249606bfebdeSXin LI include/ncurses_dll.h \ 24970e3d5408SPeter Wemm include/termcap.h \ 24980e3d5408SPeter Wemm include/unctrl.h \ 24990e3d5408SPeter Wemm $SUB_MAKEFILES \ 25000e3d5408SPeter Wemm Makefile,[ 250106bfebdeSXin LIif test "x$cf_with_tests" != xno ; then 2502*7a656419SBaptiste Daroussin CF_PRG_RULES(["$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD"], test) 250306bfebdeSXin LIfi 25044a1a9510SRong-En FanCF_LIB_RULES($SRC_SUBDIRS) 250506bfebdeSXin LI 250673f0a83dSXin LIif test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then 250706bfebdeSXin LIif test -z "$USE_OLD_MAKERULES" ; then 2508*7a656419SBaptiste Daroussin $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile 250906bfebdeSXin LIfi 251006bfebdeSXin LIfi 25110e3d5408SPeter Wemm],[ 25120e3d5408SPeter Wemm### Special initialization commands, used to pass information from the 25130e3d5408SPeter Wemm### configuration-run into config.status 25140e3d5408SPeter Wemm 2515aae38d10SBaptiste DaroussinALTERNATE_SYMS="$ALTERNATE_SYMS" 2516*7a656419SBaptiste DaroussinAWK="$AWK" 2517*7a656419SBaptiste DaroussinCXX_NAME="$CXX_NAME" 25184a1a9510SRong-En FanDFT_ARG_SUFFIX="$DFT_ARG_SUFFIX" 25190e3d5408SPeter WemmDFT_LWR_MODEL="$DFT_LWR_MODEL" 252073f0a83dSXin LIECHO_LD="$ECHO_LD" 2521aae38d10SBaptiste DaroussinEXTRA_SUFFIX="$EXTRA_SUFFIX" 2522*7a656419SBaptiste DaroussinFORM_NAME="$FORM_NAME" 25230e3d5408SPeter WemmLDCONFIG="$LDCONFIG" 252406bfebdeSXin LILIBTOOL_VERSION="$LIBTOOL_VERSION" 25250e3d5408SPeter WemmLIB_NAME="$LIB_NAME" 252673f0a83dSXin LILIB_PREFIX="$LIB_PREFIX" 25270e3d5408SPeter WemmLIB_SUBSETS="$LIB_SUBSETS" 252839f2269fSPeter WemmLIB_SUFFIX="$LIB_SUFFIX" 252915589c42SPeter WemmLIB_TRACING="$LIB_TRACING" 253006bfebdeSXin LILN_S="$LN_S" 253139f2269fSPeter WemmMAKE_TERMINFO="$MAKE_TERMINFO" 2532*7a656419SBaptiste DaroussinMENU_NAME="$MENU_NAME" 25334a1a9510SRong-En FanNCURSES_MAJOR="$NCURSES_MAJOR" 25344a1a9510SRong-En FanNCURSES_MINOR="$NCURSES_MINOR" 253539f2269fSPeter WemmNCURSES_OSPEED="$NCURSES_OSPEED" 25364a1a9510SRong-En FanNCURSES_PATCH="$NCURSES_PATCH" 2537*7a656419SBaptiste DaroussinPANEL_NAME="$PANEL_NAME" 25380e3d5408SPeter WemmSRC_SUBDIRS="$SRC_SUBDIRS" 253918259542SPeter WemmTERMINFO="$TERMINFO" 254006bfebdeSXin LITICS_ARG_SUFFIX="$TICS_ARG_SUFFIX" 254106bfebdeSXin LITICS_LIB_SUFFIX="$TICS_LIB_SUFFIX" 254206bfebdeSXin LITICS_NAME="$TICS_NAME" 2543aae38d10SBaptiste DaroussinTICS_SUFFIX="$TICS_SUFFIX" 254406bfebdeSXin LITIC_PATH="$TIC_PATH" 25454a1a9510SRong-En FanTINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX" 25464a1a9510SRong-En FanTINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX" 25470e3d5408SPeter WemmTINFO_NAME="$TINFO_NAME" 25485ca44d1cSRong-En FanTINFO_SUFFIX="$TINFO_SUFFIX" 2549aae38d10SBaptiste DaroussinUNALTERED_SYMS="$UNALTERED_SYMS" 2550aae38d10SBaptiste DaroussinUSE_ARG_SUFFIX="$USE_ARG_SUFFIX" 2551aae38d10SBaptiste DaroussinUSE_CFG_SUFFIX="$USE_CFG_SUFFIX" 2552aae38d10SBaptiste DaroussinUSE_LIB_SUFFIX="$USE_LIB_SUFFIX" 255306bfebdeSXin LIUSE_OLD_MAKERULES="$USE_OLD_MAKERULES" 2554aae38d10SBaptiste DaroussinWILDCARD_SYMS="$WILDCARD_SYMS" 255539f2269fSPeter WemmWITH_CURSES_H="$with_curses_h" 255673f0a83dSXin LIWITH_ECHO="${enable_echo:=yes}" 25570e3d5408SPeter WemmWITH_OVERWRITE="$with_overwrite" 25584a1a9510SRong-En Fancf_LIST_MODELS="$cf_list_models" 2559*7a656419SBaptiste Daroussincf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE 2560*7a656419SBaptiste Daroussincf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD 25610e3d5408SPeter Wemmcf_cv_abi_version="$cf_cv_abi_version" 25625ca44d1cSRong-En Fancf_cv_do_relink="$cf_cv_do_relink" 2563aae38d10SBaptiste Daroussincf_cv_do_reranlib="$cf_cv_do_reranlib" 25640e3d5408SPeter Wemmcf_cv_do_symlinks="$cf_cv_do_symlinks" 25654a1a9510SRong-En Fancf_cv_enable_lp64="$cf_cv_enable_lp64" 25665ca44d1cSRong-En Fancf_cv_enable_opaque="$cf_cv_enable_opaque" 25674a1a9510SRong-En Fancf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o 25684a1a9510SRong-En Fancf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o 256973f0a83dSXin LIcf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct 25700e3d5408SPeter Wemmcf_cv_rel_version="$cf_cv_rel_version" 25710e3d5408SPeter Wemmcf_cv_rm_so_locs="$cf_cv_rm_so_locs" 25725d08fb1fSRong-En Fancf_cv_shared_soname='$cf_cv_shared_soname' 257339f2269fSPeter Wemmcf_cv_shlib_version="$cf_cv_shlib_version" 257439f2269fSPeter Wemmcf_cv_shlib_version_infix="$cf_cv_shlib_version_infix" 25750e3d5408SPeter Wemmcf_cv_system_name="$cf_cv_system_name" 257673f0a83dSXin LIcf_cv_term_driver="$with_term_driver" 257706bfebdeSXin LIcf_with_ada="$cf_with_ada" 25781759abf3SPeter Wemmcf_with_cxx_binding="$cf_with_cxx_binding" 257973f0a83dSXin LIcf_with_db_install="$cf_with_db_install" 258006bfebdeSXin LIcf_with_manpages="$cf_with_manpages" 258106bfebdeSXin LIcf_with_tests="$cf_with_tests" 25824a1a9510SRong-En Fanhost="$host" 25830e3d5408SPeter Wemmtarget="$target" 2584aae38d10SBaptiste Daroussinwith_shared_cxx="$with_shared_cxx" 25850e3d5408SPeter Wemm 25864a1a9510SRong-En Fan],cat)dnl 258706bfebdeSXin LI${MAKE:-make} preinstall 2588