10e3d5408SPeter Wemmdnl*************************************************************************** 20e3d5408SPeter Wemmdnl Copyright (c) 1998,1999 Free Software Foundation, Inc. * 30e3d5408SPeter Wemmdnl * 40e3d5408SPeter Wemmdnl Permission is hereby granted, free of charge, to any person obtaining a * 50e3d5408SPeter Wemmdnl copy of this software and associated documentation files (the * 60e3d5408SPeter Wemmdnl "Software"), to deal in the Software without restriction, including * 70e3d5408SPeter Wemmdnl without limitation the rights to use, copy, modify, merge, publish, * 80e3d5408SPeter Wemmdnl distribute, distribute with modifications, sublicense, and/or sell * 90e3d5408SPeter Wemmdnl copies of the Software, and to permit persons to whom the Software is * 100e3d5408SPeter Wemmdnl furnished to do so, subject to the following conditions: * 110e3d5408SPeter Wemmdnl * 120e3d5408SPeter Wemmdnl The above copyright notice and this permission notice shall be included * 130e3d5408SPeter Wemmdnl in all copies or substantial portions of the Software. * 140e3d5408SPeter Wemmdnl * 150e3d5408SPeter Wemmdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * 160e3d5408SPeter Wemmdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * 170e3d5408SPeter Wemmdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * 180e3d5408SPeter Wemmdnl IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * 190e3d5408SPeter Wemmdnl DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * 200e3d5408SPeter Wemmdnl OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * 210e3d5408SPeter Wemmdnl THE USE OR OTHER DEALINGS IN THE SOFTWARE. * 220e3d5408SPeter Wemmdnl * 230e3d5408SPeter Wemmdnl Except as contained in this notice, the name(s) of the above copyright * 240e3d5408SPeter Wemmdnl holders shall not be used in advertising or otherwise to promote the * 250e3d5408SPeter Wemmdnl sale, use or other dealings in this Software without prior written * 260e3d5408SPeter Wemmdnl authorization. * 270e3d5408SPeter Wemmdnl*************************************************************************** 280e3d5408SPeter Wemmdnl 290e3d5408SPeter Wemmdnl Author: Thomas E. Dickey <dickey@clark.net> 1996,1997 300e3d5408SPeter Wemmdnl 310e3d5408SPeter Wemmdnl $Id: configure.in,v 1.169 1999/08/21 20:33:10 tom Exp $ 320e3d5408SPeter Wemmdnl Process this file with autoconf to produce a configure script. 330e3d5408SPeter WemmAC_PREREQ(2.12.971222) 340e3d5408SPeter WemmAC_REVISION($Revision: 1.169 $) 350e3d5408SPeter WemmAC_INIT(ncurses/base/lib_initscr.c) 360e3d5408SPeter WemmAC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin) 370e3d5408SPeter Wemm 380e3d5408SPeter WemmCF_SUBST_NCURSES_VERSION 390e3d5408SPeter WemmCF_CHECK_CACHE 400e3d5408SPeter WemmAC_ARG_WITH(system-type, 410e3d5408SPeter Wemm[ --with-system-type=XXX test: override derived host system-type], 420e3d5408SPeter Wemm[AC_MSG_WARN(overriding system type to $withval) 430e3d5408SPeter Wemm cf_cv_system_name=$withval]) 440e3d5408SPeter Wemm 450e3d5408SPeter Wemm# We need a configure script only when compiling as part of GNU C library. 460e3d5408SPeter Wemm# Here we have to generate one of the files we need while compiling. 470e3d5408SPeter Wemm# 480e3d5408SPeter Wemm# The only problem is that users of the package might think they have to 490e3d5408SPeter Wemm# run configure themself and find it irritating when nothing happens. 500e3d5408SPeter Wemm# 510e3d5408SPeter Wemm# So we try here to find out whether we are called from the glibc configure 520e3d5408SPeter Wemm# or by a user. 530e3d5408SPeter Wemm# 540e3d5408SPeter Wemmdnl Check if we are a drop-in addition to glibc. 550e3d5408SPeter WemmAC_ARG_ENABLE(add-ons, dnl 560e3d5408SPeter Wemm[ --enable-add-ons=DIR... used to check if we are a glibc add-on.], 570e3d5408SPeter Wemm [glibc_add_on=yes], 580e3d5408SPeter Wemm [glibc_add_on=]) 590e3d5408SPeter Wemm 600e3d5408SPeter Wemmdnl We need to use [ and ] for other purposes for a while now. 610e3d5408SPeter Wemmchangequote(,)dnl 620e3d5408SPeter Wemmif test x"$glibc_add_on" = "xyes" ; then 630e3d5408SPeter Wemm rm -f $srcdir/Banner 640e3d5408SPeter Wemm # We are in glibc. 650e3d5408SPeter Wemm rm -f $srcdir/Makefile 660e3d5408SPeter Wemm cp $srcdir/Makefile.glibc $srcdir/Makefile 670e3d5408SPeter Wemm echo "ncurses `grep \"^[ ]*ncurses-version[ ]*=.*$\" \ 680e3d5408SPeter Wemm $srcdir/Makefile | sed -e \ 690e3d5408SPeter Wemm 's/^[ ]*ncurses-version[ ]*=[ ]*\([^ ^ ]*\)[ ]*$/\1/'`" > $srcdir/Banner 700e3d5408SPeter Wemm exit 0 710e3d5408SPeter Wemmfi 720e3d5408SPeter Wemmchangequote([,])dnl 730e3d5408SPeter Wemm 740e3d5408SPeter Wemm### Save the given $CFLAGS to allow user-override. 750e3d5408SPeter Wemmcf_user_CFLAGS="$CFLAGS" 760e3d5408SPeter Wemm 770e3d5408SPeter Wemm### Default install-location 780e3d5408SPeter WemmCF_CFG_DEFAULTS 790e3d5408SPeter Wemm 800e3d5408SPeter Wemm### Checks for programs. 810e3d5408SPeter WemmAC_PROG_CC 820e3d5408SPeter Wemmif test -n "$GCC" ; then 830e3d5408SPeter WemmAC_MSG_CHECKING(version of gcc) 840e3d5408SPeter Wemmeval "$CC --version" 850e3d5408SPeter Wemmfi 860e3d5408SPeter Wemmif test $host != $build; then 870e3d5408SPeter Wemm AC_CHECK_PROGS(BUILD_CC, $CC gcc cc) 880e3d5408SPeter Wemmfi 890e3d5408SPeter WemmAC_PROG_CPP 900e3d5408SPeter WemmAC_PROG_GCC_TRADITIONAL 910e3d5408SPeter WemmAC_ISC_POSIX 920e3d5408SPeter WemmCF_ANSI_CC_REQD 930e3d5408SPeter WemmCF_PROG_EXT 940e3d5408SPeter Wemm 950e3d5408SPeter Wemmcase "$cf_cv_system_name" in 960e3d5408SPeter Wemmfreebsd*) #(vi 970e3d5408SPeter Wemm test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R" 980e3d5408SPeter Wemm ;; 990e3d5408SPeter Wemm*) LDPATH=$PATH:/sbin:/usr/sbin 1000e3d5408SPeter Wemm AC_PATH_PROG(LDCONFIG,ldconfig,,$LDPATH) 1010e3d5408SPeter Wemm ;; 1020e3d5408SPeter Wemmesac 1030e3d5408SPeter WemmAC_SUBST(LDCONFIG) 1040e3d5408SPeter Wemm 1050e3d5408SPeter Wemmdnl DEFECT in autoconf 2.12: an attempt to set policy, this breaks the 1060e3d5408SPeter Wemmdnl configure script by not letting us test if C++ 1070e3d5408SPeter Wemmdnl is present, making this option necessary. 1080e3d5408SPeter WemmAC_MSG_CHECKING(if you want to build with C++) 1090e3d5408SPeter WemmAC_ARG_WITH(cxx, 1100e3d5408SPeter Wemm [ --without-cxx suppress check for C++, don't build demo], 1110e3d5408SPeter Wemm [cf_with_cxx=$withval], 1120e3d5408SPeter Wemm [cf_with_cxx=yes]) 1130e3d5408SPeter WemmAC_MSG_RESULT($cf_with_cxx) 1140e3d5408SPeter Wemmif test "X$cf_with_cxx" != Xno ; then 1150e3d5408SPeter WemmAC_PROG_CXX 1160e3d5408SPeter Wemmfi 1170e3d5408SPeter Wemmchangequote(,)dnl 1180e3d5408SPeter Wemmif test -n "$GXX" ; then case "`${CXX-g++} --version`" in 1*|2.[0-6]*) GXX=""; CXX=""; ac_cv_prog_gxx=no; cf_cxx_library=no ; echo No: templates do not work;; esac; fi 1190e3d5408SPeter Wemmchangequote([,])dnl 1200e3d5408SPeter Wemm 1210e3d5408SPeter WemmAC_MSG_CHECKING(if you want to build with Ada95) 1220e3d5408SPeter WemmAC_ARG_WITH(ada, 1230e3d5408SPeter Wemm [ --without-ada suppress check for Ada95, don't build demo], 1240e3d5408SPeter Wemm [cf_with_ada=$withval], 1250e3d5408SPeter Wemm [cf_with_ada=yes]) 1260e3d5408SPeter WemmAC_MSG_RESULT($cf_with_ada) 1270e3d5408SPeter Wemm 1280e3d5408SPeter WemmAC_MSG_CHECKING(if you want to build programs such as tic) 1290e3d5408SPeter WemmAC_ARG_WITH(progs, 1300e3d5408SPeter Wemm [ --without-progs suppress build with programs (e.g., tic)], 1310e3d5408SPeter Wemm [cf_with_progs=$withval], 1320e3d5408SPeter Wemm [cf_with_progs=yes]) 1330e3d5408SPeter WemmAC_MSG_RESULT($cf_with_progs) 1340e3d5408SPeter Wemm 1350e3d5408SPeter Wemmmodules_to_build="ncurses" 1360e3d5408SPeter Wemmif test "X$cf_with_progs" != Xno ; then 1370e3d5408SPeter Wemmmodules_to_build="$modules_to_build progs tack" 1380e3d5408SPeter Wemmfi 1390e3d5408SPeter Wemmmodules_to_build="$modules_to_build panel menu form" 1400e3d5408SPeter Wemm 1410e3d5408SPeter WemmAC_PROG_AWK 1420e3d5408SPeter WemmAC_PROG_MAKE_SET 1430e3d5408SPeter WemmCF_PROG_INSTALL 1440e3d5408SPeter WemmAC_SYS_LONG_FILE_NAMES 1450e3d5408SPeter WemmAC_PROG_LN_S 1460e3d5408SPeter WemmAC_PROG_RANLIB 1470e3d5408SPeter WemmAC_CHECK_PROGS(LINT, tdlint lint alint) 1480e3d5408SPeter WemmAC_CHECK_PROGS(MAN, man man_db) 1490e3d5408SPeter WemmAC_SUBST(LINT_OPTS) 1500e3d5408SPeter Wemm 1510e3d5408SPeter Wemmdnl These are standard among *NIX systems, but not when cross-compiling 1520e3d5408SPeter WemmCF_SUBST(loader,LD,ld) 1530e3d5408SPeter WemmCF_SUBST(archiver,AR,ar) 1540e3d5408SPeter WemmCF_SUBST(archiver options,AR_OPTS,rv) 1550e3d5408SPeter Wemm 1560e3d5408SPeter WemmCF_MAKEFLAGS 1570e3d5408SPeter Wemm 1580e3d5408SPeter Wemmdnl Special option for use by system-builders: the install-prefix is used to 1590e3d5408SPeter Wemmdnl adjust the location into which the actual install is done, so that an 1600e3d5408SPeter Wemmdnl archive can be built without modifying the host system's configuration. 1610e3d5408SPeter WemmAC_MSG_CHECKING(if you have specified an install-prefix) 1620e3d5408SPeter WemmAC_ARG_WITH(install-prefix, 1630e3d5408SPeter Wemm [ --with-install-prefix prefixes actual install-location], 1640e3d5408SPeter Wemm [case "$withval" in #(vi 1650e3d5408SPeter Wemm yes|no) #(vi 1660e3d5408SPeter Wemm ;; 1670e3d5408SPeter Wemm *) INSTALL_PREFIX="$withval" 1680e3d5408SPeter Wemm ;; 1690e3d5408SPeter Wemm esac]) 1700e3d5408SPeter WemmAC_MSG_RESULT($INSTALL_PREFIX) 1710e3d5408SPeter WemmAC_SUBST(INSTALL_PREFIX) 1720e3d5408SPeter Wemm 1730e3d5408SPeter Wemm############################################################################### 1740e3d5408SPeter WemmCF_MAN_PAGES 1750e3d5408SPeter Wemm 1760e3d5408SPeter Wemm############################################################################### 1770e3d5408SPeter WemmCF_HELP_MESSAGE(Options to Specify the Libraries Built/Used:) 1780e3d5408SPeter Wemm 1790e3d5408SPeter Wemm### Options to allow the user to specify the set of libraries which are used. 1800e3d5408SPeter Wemm### Use "--without-normal --with-shared" to allow the default model to be 1810e3d5408SPeter Wemm### shared, for example. 1820e3d5408SPeter Wemmcf_list_models="" 1830e3d5408SPeter Wemm 1840e3d5408SPeter WemmAC_MSG_CHECKING(if you want to build shared libraries) 1850e3d5408SPeter WemmAC_ARG_WITH(shared, 1860e3d5408SPeter Wemm [ --with-shared generate shared-libraries], 1870e3d5408SPeter Wemm [with_shared=$withval], 1880e3d5408SPeter Wemm [with_shared=no]) 1890e3d5408SPeter WemmAC_MSG_RESULT($with_shared) 1900e3d5408SPeter Wemmtest "$with_shared" = "yes" && cf_list_models="$cf_list_models shared" 1910e3d5408SPeter Wemm 1920e3d5408SPeter WemmAC_MSG_CHECKING(if you want to build static libraries) 1930e3d5408SPeter WemmAC_ARG_WITH(normal, 1940e3d5408SPeter Wemm [ --with-normal generate normal-libraries (default)], 1950e3d5408SPeter Wemm [with_normal=$withval], 1960e3d5408SPeter Wemm [with_normal=yes]) 1970e3d5408SPeter WemmAC_MSG_RESULT($with_normal) 1980e3d5408SPeter Wemmtest "$with_normal" = "yes" && cf_list_models="$cf_list_models normal" 1990e3d5408SPeter Wemm 2000e3d5408SPeter WemmAC_MSG_CHECKING(if you want to build debug libraries) 2010e3d5408SPeter WemmAC_ARG_WITH(debug, 2020e3d5408SPeter Wemm [ --with-debug generate debug-libraries (default)], 2030e3d5408SPeter Wemm [with_debug=$withval], 2040e3d5408SPeter Wemm [with_debug=yes]) 2050e3d5408SPeter WemmAC_MSG_RESULT($with_debug) 2060e3d5408SPeter Wemmtest "$with_debug" = "yes" && cf_list_models="$cf_list_models debug" 2070e3d5408SPeter Wemm 2080e3d5408SPeter WemmAC_MSG_CHECKING(if you want to build profiling libraries) 2090e3d5408SPeter WemmAC_ARG_WITH(profile, 2100e3d5408SPeter Wemm [ --with-profile generate profile-libraries], 2110e3d5408SPeter Wemm [with_profile=$withval], 2120e3d5408SPeter Wemm [with_profile=no]) 2130e3d5408SPeter WemmAC_MSG_RESULT($with_profile) 2140e3d5408SPeter Wemmtest "$with_profile" = "yes" && cf_list_models="$cf_list_models profile" 2150e3d5408SPeter Wemm 2160e3d5408SPeter WemmAC_MSG_CHECKING(if you want to build a separate terminfo library) 2170e3d5408SPeter WemmAC_ARG_WITH(termlib, 2180e3d5408SPeter Wemm [ --with-termlib generate separate terminfo library], 2190e3d5408SPeter Wemm [with_termlib=$withval], 2200e3d5408SPeter Wemm [with_termlib=no]) 2210e3d5408SPeter WemmAC_MSG_RESULT($with_termlib) 2220e3d5408SPeter Wemm 2230e3d5408SPeter Wemm### Checks for special libraries, must be done up-front. 2240e3d5408SPeter WemmAC_MSG_CHECKING(if you want to link with dbmalloc for testing) 2250e3d5408SPeter WemmAC_ARG_WITH(dbmalloc, 2260e3d5408SPeter Wemm [ --with-dbmalloc test: use Conor Cahill's dbmalloc library], 2270e3d5408SPeter Wemm [with_dbmalloc=$withval], 2280e3d5408SPeter Wemm [with_dbmalloc=no]) 2290e3d5408SPeter WemmAC_MSG_RESULT($with_dbmalloc) 2300e3d5408SPeter Wemmif test $with_dbmalloc = yes ; then 2310e3d5408SPeter Wemm AC_CHECK_LIB(dbmalloc,debug_malloc) 2320e3d5408SPeter Wemmfi 2330e3d5408SPeter Wemm 2340e3d5408SPeter WemmAC_MSG_CHECKING(if you want to link with dmalloc for testing) 2350e3d5408SPeter WemmAC_ARG_WITH(dmalloc, 2360e3d5408SPeter Wemm [ --with-dmalloc test: use Gray Watson's dmalloc library], 2370e3d5408SPeter Wemm [with_dmalloc=$withval], 2380e3d5408SPeter Wemm [with_dmalloc=no]) 2390e3d5408SPeter WemmAC_MSG_RESULT($with_dmalloc) 2400e3d5408SPeter Wemmif test $with_dmalloc = yes ; then 2410e3d5408SPeter Wemm AC_CHECK_LIB(dmalloc,dmalloc_debug) 2420e3d5408SPeter Wemmfi 2430e3d5408SPeter Wemm 2440e3d5408SPeter WemmSHLIB_LIST="" 2450e3d5408SPeter WemmAC_MSG_CHECKING(if you want to link with the gpm mouse library) 2460e3d5408SPeter WemmAC_ARG_WITH(gpm, 2470e3d5408SPeter Wemm [ --with-gpm use Alessandro Rubini's GPM library], 2480e3d5408SPeter Wemm [with_gpm=$withval], 2490e3d5408SPeter Wemm [with_gpm=no]) 2500e3d5408SPeter WemmAC_MSG_RESULT($with_gpm) 2510e3d5408SPeter Wemmif test $with_gpm = yes ; then 2520e3d5408SPeter Wemm AC_CHECK_LIB(gpm,Gpm_Open,[ 2530e3d5408SPeter Wemm EXTRA_LIBS="-lgpm -lncurses $EXTRA_LIBS" 2540e3d5408SPeter Wemm SHLIB_LIST="-lgpm $SHLIB_LIST" 2550e3d5408SPeter Wemm AC_DEFINE(HAVE_LIBGPM) 2560e3d5408SPeter Wemm AC_CHECK_HEADERS(gpm.h) 2570e3d5408SPeter Wemm ],,-lcurses -ltermcap) 2580e3d5408SPeter Wemmfi 2590e3d5408SPeter Wemm 2600e3d5408SPeter WemmTINFO_LIST="$SHLIB_LIST" 2610e3d5408SPeter Wemmtest $with_termlib = yes && SHLIB_LIST="$SHLIB_LIST -ltinfo" 2620e3d5408SPeter Wemm 2630e3d5408SPeter WemmAC_SUBST(EXTRA_LIBS) 2640e3d5408SPeter WemmAC_SUBST(TINFO_LIST) 2650e3d5408SPeter WemmAC_SUBST(SHLIB_LIST) 2660e3d5408SPeter Wemm 2670e3d5408SPeter WemmAC_MSG_CHECKING(for specified models) 2680e3d5408SPeter Wemmtest -z "$cf_list_models" && cf_list_models=normal 2690e3d5408SPeter WemmAC_MSG_RESULT($cf_list_models) 2700e3d5408SPeter Wemm 2710e3d5408SPeter Wemm### Use the first model as the default, and save its suffix for use in building 2720e3d5408SPeter Wemm### up test-applications. 2730e3d5408SPeter WemmDFT_LWR_MODEL=`echo $cf_list_models | $AWK '{print $1}'` 2740e3d5408SPeter WemmCF_UPPER(DFT_UPR_MODEL,$DFT_LWR_MODEL)dnl 2750e3d5408SPeter WemmCF_LIB_SUFFIX($DFT_LWR_MODEL,DFT_DEP_SUFFIX)dnl 2760e3d5408SPeter WemmCF_LIB_TYPE($DFT_LWR_MODEL,DFT_ARG_SUFFIX)dnl 2770e3d5408SPeter WemmCF_OBJ_SUBDIR($DFT_LWR_MODEL,DFT_OBJ_SUBDIR)dnl 2780e3d5408SPeter WemmAC_SUBST(DFT_OBJ_SUBDIR)dnl the default object-directory ("obj") 2790e3d5408SPeter WemmAC_SUBST(DFT_LWR_MODEL)dnl the default model ("normal") 2800e3d5408SPeter WemmAC_SUBST(DFT_UPR_MODEL)dnl the default model ("NORMAL") 2810e3d5408SPeter WemmAC_SUBST(DFT_DEP_SUFFIX)dnl the corresponding library-suffix (".a") 2820e3d5408SPeter WemmAC_SUBST(DFT_ARG_SUFFIX)dnl the string to append to "-lncurses" ("") 2830e3d5408SPeter WemmAC_SUBST(cf_list_models)dnl the complete list of models ("normal debug") 2840e3d5408SPeter Wemm 2850e3d5408SPeter WemmTINFO_NAME=tinfo 2860e3d5408SPeter WemmAC_SUBST(TINFO_NAME) 2870e3d5408SPeter Wemm 2880e3d5408SPeter WemmLIB_NAME=ncurses 2890e3d5408SPeter WemmAC_SUBST(LIB_NAME) 2900e3d5408SPeter Wemm 2910e3d5408SPeter WemmLIB_DIR=../lib 2920e3d5408SPeter WemmCF_LIB_PREFIX(cf_prefix) 2930e3d5408SPeter WemmLIB_PREFIX=$LIB_DIR/$cf_prefix 2940e3d5408SPeter WemmAC_SUBST(LIB_PREFIX) 2950e3d5408SPeter Wemm 2960e3d5408SPeter Wemmdnl Not all ports of gcc support the -g option 2970e3d5408SPeter Wemmdnl autoconf 2.12 uses different symbol for -g option than autoconf 2.10, etc. 2980e3d5408SPeter Wemm 2990e3d5408SPeter Wemmif test X"$CC_G_OPT" = X"" ; then 3000e3d5408SPeter Wemm CC_G_OPT='-g' 3010e3d5408SPeter Wemm test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT='' 3020e3d5408SPeter Wemmfi 3030e3d5408SPeter WemmAC_SUBST(CC_G_OPT) 3040e3d5408SPeter Wemm 3050e3d5408SPeter Wemmif test X"$CXX_G_OPT" = X"" ; then 3060e3d5408SPeter Wemm CXX_G_OPT='-g' 3070e3d5408SPeter Wemm test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT='' 3080e3d5408SPeter Wemmfi 3090e3d5408SPeter WemmAC_SUBST(CXX_G_OPT) 3100e3d5408SPeter Wemm 3110e3d5408SPeter Wemmcase $DFT_LWR_MODEL in 3120e3d5408SPeter Wemmnormal) LD_MODEL='' ;; 3130e3d5408SPeter Wemmdebug) LD_MODEL=$CC_G_OPT ;; 3140e3d5408SPeter Wemmprofile) LD_MODEL='-pg';; 3150e3d5408SPeter Wemmshared) LD_MODEL='' ;; 3160e3d5408SPeter Wemmesac 3170e3d5408SPeter WemmAC_SUBST(LD_MODEL)dnl the type of link (e.g., -g or -pg) 3180e3d5408SPeter Wemm 3190e3d5408SPeter WemmAC_MSG_CHECKING(if rpath option should be used) 3200e3d5408SPeter WemmAC_ARG_ENABLE(rpath, 3210e3d5408SPeter Wemm[ --enable-rpath use rpath option when generating shared libraries], 3220e3d5408SPeter Wemm[cf_cv_ld_rpath=$enableval], 3230e3d5408SPeter Wemm[cf_cv_ld_rpath=no]) 3240e3d5408SPeter WemmAC_MSG_RESULT($cf_cv_ld_rpath) 3250e3d5408SPeter Wemm 3260e3d5408SPeter WemmCF_SHARED_OPTS 3270e3d5408SPeter Wemm 3280e3d5408SPeter Wemmif test "$CC_SHARED_OPTS" = "unknown"; then 3290e3d5408SPeter Wemm for model in $cf_list_models; do 3300e3d5408SPeter Wemm if test "$model" = "shared"; then 3310e3d5408SPeter Wemm AC_ERROR(Shared libraries are not supported in this version) 3320e3d5408SPeter Wemm fi 3330e3d5408SPeter Wemm done 3340e3d5408SPeter Wemmfi 3350e3d5408SPeter Wemm 3360e3d5408SPeter Wemm############################################################################### 3370e3d5408SPeter WemmCF_HELP_MESSAGE(Fine-Tuning Your Configuration:) 3380e3d5408SPeter Wemm 3390e3d5408SPeter Wemm### use option --disable-overwrite to leave out the link to -lcurses 3400e3d5408SPeter WemmAC_MSG_CHECKING(if you wish to install ncurses overwriting curses) 3410e3d5408SPeter WemmAC_ARG_ENABLE(overwrite, 3420e3d5408SPeter Wemm [ --disable-overwrite leave out the link to -lcurses], 3430e3d5408SPeter Wemm [with_overwrite=$enableval 3440e3d5408SPeter Wemm test "$with_overwrite" = no && \ 3450e3d5408SPeter Wemm test "x$includedir" = 'x${prefix}/include' && \ 3460e3d5408SPeter Wemm includedir='$(prefix)/include/ncurses' 3470e3d5408SPeter Wemm ], 3480e3d5408SPeter Wemm [with_overwrite=yes]) 3490e3d5408SPeter WemmAC_MSG_RESULT($with_overwrite) 3500e3d5408SPeter WemmAC_MSG_CHECKING(where we will install curses.h) 3510e3d5408SPeter WemmAC_MSG_RESULT($includedir) 3520e3d5408SPeter Wemm 3530e3d5408SPeter WemmAC_MSG_CHECKING(if external terminfo-database is used) 3540e3d5408SPeter WemmAC_ARG_ENABLE(database, 3550e3d5408SPeter Wemm [ --disable-database use only built-in data], 3560e3d5408SPeter Wemm [with_database=$enableval], 3570e3d5408SPeter Wemm [with_database=yes]) 3580e3d5408SPeter WemmAC_MSG_RESULT($with_database) 3590e3d5408SPeter Wemmtest $with_database != no && AC_DEFINE(USE_DATABASE) 3600e3d5408SPeter Wemm 3610e3d5408SPeter WemmAC_MSG_CHECKING(if you want to build with function extensions) 3620e3d5408SPeter WemmAC_ARG_ENABLE(ext-funcs, 3630e3d5408SPeter Wemm [ --disable-ext-funcs disable function-extensions], 3640e3d5408SPeter Wemm [with_ext_funcs=$enableval], 3650e3d5408SPeter Wemm [with_ext_funcs=yes]) 3660e3d5408SPeter WemmAC_MSG_RESULT($with_ext_funcs) 3670e3d5408SPeter Wemmtest "$with_ext_funcs" = yes && AC_DEFINE(NCURSES_EXT_FUNCS) 3680e3d5408SPeter Wemm 3690e3d5408SPeter WemmAC_MSG_CHECKING(for list of fallback descriptions) 3700e3d5408SPeter WemmAC_ARG_WITH(fallbacks, 3710e3d5408SPeter Wemm [ --with-fallbacks=XXX specify list of fallback terminal descriptions], 3720e3d5408SPeter Wemm [with_fallback=$withval], 3730e3d5408SPeter Wemm [with_fallback=]) 3740e3d5408SPeter WemmAC_MSG_RESULT($with_fallback) 3750e3d5408SPeter WemmFALLBACK_LIST=`echo $with_fallback|sed -e 's/,/ /g'` 3760e3d5408SPeter WemmAC_SUBST(FALLBACK_LIST) 3770e3d5408SPeter Wemm 3780e3d5408SPeter WemmAC_MSG_CHECKING(for list of terminfo directories) 3790e3d5408SPeter WemmCF_WITH_PATHLIST(terminfo-dirs, 3800e3d5408SPeter Wemm [ --with-terminfo-dirs=XXX specify list of terminfo directories], 3810e3d5408SPeter Wemm TERMINFO_DIRS, 3820e3d5408SPeter Wemm DATADIR/terminfo, 3830e3d5408SPeter Wemm ${datadir}/terminfo) 3840e3d5408SPeter WemmAC_MSG_RESULT($TERMINFO_DIRS) 3850e3d5408SPeter Wemmtest -n "$TERMINFO_DIRS" && AC_DEFINE_UNQUOTED(TERMINFO_DIRS,"$TERMINFO_DIRS") 3860e3d5408SPeter Wemm 3870e3d5408SPeter Wemmif test $with_database = no ; then 3880e3d5408SPeter Wemm if test -z $with_fallback ; then 3890e3d5408SPeter Wemm AC_ERROR(You have disabled the database w/o specifying fallbacks) 3900e3d5408SPeter Wemm fi 3910e3d5408SPeter Wemmfi 3920e3d5408SPeter Wemm 3930e3d5408SPeter Wemm### use option --disable-big-core to make tic run on small machines 3940e3d5408SPeter Wemm### We need 4Mb, check if we can allocate 50% more than that. 3950e3d5408SPeter WemmAC_MSG_CHECKING(if big-core option selected) 3960e3d5408SPeter WemmAC_ARG_ENABLE(big-core, 3970e3d5408SPeter Wemm [ --disable-big-core assume machine has little memory], 3980e3d5408SPeter Wemm [with_big_core=$enableval], 3990e3d5408SPeter Wemm [AC_TRY_RUN([ 4000e3d5408SPeter Wemm#include <stdlib.h> 4010e3d5408SPeter Wemm#include <string.h> 4020e3d5408SPeter Wemmint main() { exit(malloc(6000000L) == 0); }], 4030e3d5408SPeter Wemm [with_big_core=yes], 4040e3d5408SPeter Wemm [with_big_core=no], 4050e3d5408SPeter Wemm [with_big_core=no])]) 4060e3d5408SPeter WemmAC_MSG_RESULT($with_big_core) 4070e3d5408SPeter Wemmtest "$with_big_core" = "yes" && AC_DEFINE(HAVE_BIG_CORE) 4080e3d5408SPeter Wemm 4090e3d5408SPeter Wemm### use option --enable-termcap to compile in the termcap fallback support 4100e3d5408SPeter WemmAC_MSG_CHECKING(if you want termcap-fallback support) 4110e3d5408SPeter WemmAC_ARG_ENABLE(termcap, 4120e3d5408SPeter Wemm [ --enable-termcap compile in termcap fallback support], 4130e3d5408SPeter Wemm [with_termcap=$enableval], 4140e3d5408SPeter Wemm [with_termcap=no]) 4150e3d5408SPeter WemmAC_MSG_RESULT($with_termcap) 4160e3d5408SPeter Wemm 4170e3d5408SPeter Wemmif test "$with_termcap" != "yes" ; then 4180e3d5408SPeter Wemm AC_DEFINE(PURE_TERMINFO) 4190e3d5408SPeter Wemmelse 4200e3d5408SPeter Wemm 4210e3d5408SPeter Wemm### use option --enable-getcap to use a hacked getcap for reading termcaps 4220e3d5408SPeter WemmAC_MSG_CHECKING(if fast termcap-loader is needed) 4230e3d5408SPeter WemmAC_ARG_ENABLE(getcap, 4240e3d5408SPeter Wemm [ --enable-getcap fast termcap load, no xrefs to terminfo], 4250e3d5408SPeter Wemm [with_getcap=$enableval], 4260e3d5408SPeter Wemm [with_getcap=no]) 4270e3d5408SPeter WemmAC_MSG_RESULT($with_getcap) 4280e3d5408SPeter Wemmtest "$with_getcap" = "yes" && AC_DEFINE(USE_GETCAP) 4290e3d5408SPeter Wemm 4300e3d5408SPeter WemmAC_MSG_CHECKING(if translated termcaps will be cached in ~/.terminfo) 4310e3d5408SPeter WemmAC_ARG_ENABLE(getcap-cache, 4320e3d5408SPeter Wemm [ --enable-getcap-cache cache translated termcaps in ~/.terminfo], 4330e3d5408SPeter Wemm [with_getcap_cache=$enableval], 4340e3d5408SPeter Wemm [with_getcap_cache=no]) 4350e3d5408SPeter WemmAC_MSG_RESULT($with_getcap_cache) 4360e3d5408SPeter Wemmtest "$with_getcap_cache" = "yes" && AC_DEFINE(USE_GETCAP_CACHE) 4370e3d5408SPeter Wemm 4380e3d5408SPeter Wemmfi 4390e3d5408SPeter Wemm 4400e3d5408SPeter Wemm### Use option --enable-symlinks to make tic use symlinks, not hard links 4410e3d5408SPeter Wemm### to reduce storage requirements for the terminfo database. 4420e3d5408SPeter WemmCF_LINK_FUNCS 4430e3d5408SPeter Wemm 4440e3d5408SPeter Wemmwith_links=no 4450e3d5408SPeter Wemmwith_symlinks=no 4460e3d5408SPeter Wemm 4470e3d5408SPeter Wemmif test "$ac_cv_func_link" != yes ; then 4480e3d5408SPeter Wemm AC_MSG_CHECKING(if tic should use symbolic links) 4490e3d5408SPeter Wemm if test "$ac_cv_func_symlink" = yes ; then 4500e3d5408SPeter Wemm with_symlinks=yes 4510e3d5408SPeter Wemm else 4520e3d5408SPeter Wemm with_symlinks=no 4530e3d5408SPeter Wemm fi 4540e3d5408SPeter Wemm AC_MSG_RESULT($with_symlinks) 4550e3d5408SPeter Wemmelif test "$ac_cv_func_symlink" != yes ; then 4560e3d5408SPeter Wemm AC_MSG_CHECKING(if tic should use hard links) 4570e3d5408SPeter Wemm if test "$ac_cv_func_link" = yes ; then 4580e3d5408SPeter Wemm with_links=yes 4590e3d5408SPeter Wemm else 4600e3d5408SPeter Wemm with_links=no 4610e3d5408SPeter Wemm fi 4620e3d5408SPeter Wemm AC_MSG_RESULT($with_links) 4630e3d5408SPeter Wemmelse 4640e3d5408SPeter Wemm AC_MSG_CHECKING(if tic should use symbolic links) 4650e3d5408SPeter Wemm AC_ARG_ENABLE(symlinks, 4660e3d5408SPeter Wemm [ --enable-symlinks make tic use symbolic links not hard links], 4670e3d5408SPeter Wemm [with_symlinks=$enableval], 4680e3d5408SPeter Wemm [with_symlinks=no]) 4690e3d5408SPeter Wemm AC_MSG_RESULT($with_symlinks) 4700e3d5408SPeter Wemmfi 4710e3d5408SPeter Wemm 4720e3d5408SPeter Wemmtest "$with_links" = yes && AC_DEFINE(USE_LINKS) 4730e3d5408SPeter Wemmtest "$with_symlinks" = yes && AC_DEFINE(USE_SYMLINKS) 4740e3d5408SPeter Wemm 4750e3d5408SPeter Wemm### use option --enable-bsdpad to have tputs process BSD-style prefix padding 4760e3d5408SPeter WemmAC_MSG_CHECKING(if tputs should process BSD-style prefix padding) 4770e3d5408SPeter WemmAC_ARG_ENABLE(bsdpad, 4780e3d5408SPeter Wemm [ --enable-bsdpad recognize BSD-style prefix padding], 4790e3d5408SPeter Wemm [with_bsdpad=$enableval], 4800e3d5408SPeter Wemm [with_bsdpad=no]) 4810e3d5408SPeter WemmAC_MSG_RESULT($with_bsdpad) 4820e3d5408SPeter Wemmtest "$with_bsdpad" = yes && AC_DEFINE(BSD_TPUTS) 4830e3d5408SPeter Wemm 4840e3d5408SPeter Wemm### use option --enable-const to turn on use of const beyond that in XSI. 4850e3d5408SPeter WemmAC_MSG_CHECKING(for extended use of const keyword) 4860e3d5408SPeter WemmAC_ARG_ENABLE(const, 4870e3d5408SPeter Wemm [ --enable-const compile with extra/non-standard const], 4880e3d5408SPeter Wemm [with_ext_const=$enableval], 4890e3d5408SPeter Wemm [with_ext_const=no]) 4900e3d5408SPeter WemmAC_MSG_RESULT($with_ext_const) 4910e3d5408SPeter WemmNCURSES_CONST="" 4920e3d5408SPeter Wemmif test "$with_ext_const" = yes ; then 4930e3d5408SPeter Wemm AC_DEFINE(NCURSES_CONST,const) 4940e3d5408SPeter Wemm NCURSES_CONST=const 4950e3d5408SPeter Wemmfi 4960e3d5408SPeter WemmAC_SUBST(NCURSES_CONST) 4970e3d5408SPeter Wemm 4980e3d5408SPeter Wemm### Enable compiling-in rcs id's 4990e3d5408SPeter WemmAC_MSG_CHECKING(if RCS identifiers should be compiled-in) 5000e3d5408SPeter WemmAC_ARG_WITH(rcs-ids, 5010e3d5408SPeter Wemm [ --with-rcs-ids compile-in RCS identifiers], 5020e3d5408SPeter Wemm [with_rcs_ids=$withval], 5030e3d5408SPeter Wemm [with_rcs_ids=no]) 5040e3d5408SPeter WemmAC_MSG_RESULT($with_rcs_ids) 5050e3d5408SPeter Wemmtest "$with_rcs_ids" = yes && AC_DEFINE(USE_RCS_IDS) 5060e3d5408SPeter Wemm 5070e3d5408SPeter Wemm############################################################################### 5080e3d5408SPeter WemmCF_HELP_MESSAGE(Experimental Code:) 5090e3d5408SPeter WemmAC_MSG_CHECKING(if you want all experimental code) 5100e3d5408SPeter WemmAC_ARG_WITH(develop, 5110e3d5408SPeter Wemm [ --with-develop enable all experimental options for testing], 5120e3d5408SPeter Wemm [with_develop=$withval], 5130e3d5408SPeter Wemm [with_develop=no]) 5140e3d5408SPeter WemmAC_MSG_RESULT($with_develop) 5150e3d5408SPeter Wemm 5160e3d5408SPeter Wemm### use option --enable-broken-linker to force on use of broken-linker support 5170e3d5408SPeter WemmAC_MSG_CHECKING(if you want broken-linker support code) 5180e3d5408SPeter WemmAC_ARG_ENABLE(broken_linker, 5190e3d5408SPeter Wemm [ --enable-broken_linker compile with broken-linker support code], 5200e3d5408SPeter Wemm [with_broken_linker=$enableval], 5210e3d5408SPeter Wemm [with_broken_linker=$BROKEN_LINKER]) 5220e3d5408SPeter WemmAC_MSG_RESULT($with_broken_linker) 5230e3d5408SPeter Wemmtest "$with_broken_linker" = yes && AC_DEFINE(BROKEN_LINKER) 5240e3d5408SPeter Wemm 5250e3d5408SPeter Wemm### use option --enable-hard-tabs to turn on use of hard-tabs optimize 5260e3d5408SPeter WemmAC_MSG_CHECKING(if you want experimental hard-tabs code) 5270e3d5408SPeter WemmAC_ARG_ENABLE(hard-tabs, 5280e3d5408SPeter Wemm [ --enable-hard-tabs compile with experimental hard-tabs code], 5290e3d5408SPeter Wemm [with_hardtabs=$enableval], 5300e3d5408SPeter Wemm [with_hardtabs=$with_develop]) 5310e3d5408SPeter WemmAC_MSG_RESULT($with_hardtabs) 5320e3d5408SPeter Wemmtest "$with_hardtabs" = yes && AC_DEFINE(USE_HARD_TABS) 5330e3d5408SPeter Wemm 5340e3d5408SPeter Wemm### use option --enable-hashmap to turn on use of hashmap scrolling logic 5350e3d5408SPeter WemmAC_MSG_CHECKING(if you want experimental hashmap code) 5360e3d5408SPeter WemmAC_ARG_ENABLE(hashmap, 5370e3d5408SPeter Wemm [ --enable-hashmap compile with experimental hashmap code], 5380e3d5408SPeter Wemm [with_hashmap=$enableval], 5390e3d5408SPeter Wemm [with_hashmap=yes]) 5400e3d5408SPeter WemmAC_MSG_RESULT($with_hashmap) 5410e3d5408SPeter Wemmtest "$with_hashmap" = yes && AC_DEFINE(USE_HASHMAP) 5420e3d5408SPeter Wemm 5430e3d5408SPeter WemmAC_MSG_CHECKING(if you want experimental no-padding code) 5440e3d5408SPeter WemmAC_ARG_ENABLE(no-padding, 5450e3d5408SPeter Wemm [ --enable-no-padding compile with experimental no-padding code], 5460e3d5408SPeter Wemm [with_no_padding=$enableval], 5470e3d5408SPeter Wemm [with_no_padding=yes]) 5480e3d5408SPeter WemmAC_MSG_RESULT($with_no_padding) 5490e3d5408SPeter Wemmtest "$with_no_padding" = yes && AC_DEFINE(NCURSES_NO_PADDING) 5500e3d5408SPeter Wemm 5510e3d5408SPeter WemmAC_MSG_CHECKING(if you want experimental safe-sprintf code) 5520e3d5408SPeter WemmAC_ARG_ENABLE(safe-sprintf, 5530e3d5408SPeter Wemm [ --enable-safe-sprintf compile with experimental safe-sprintf code], 5540e3d5408SPeter Wemm [with_safe_sprintf=$enableval], 5550e3d5408SPeter Wemm [with_safe_sprintf=no]) 5560e3d5408SPeter WemmAC_MSG_RESULT($with_safe_sprintf) 5570e3d5408SPeter Wemmtest "$with_safe_sprintf" = yes && AC_DEFINE(USE_SAFE_SPRINTF) 5580e3d5408SPeter Wemm 5590e3d5408SPeter Wemm### use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic 5600e3d5408SPeter WemmAC_MSG_CHECKING(if you want to experiment without scrolling-hints code) 5610e3d5408SPeter WemmAC_ARG_ENABLE(scroll-hints, 5620e3d5408SPeter Wemm [ --disable-scroll-hints compile hashmap without scroll-hints code], 5630e3d5408SPeter Wemm [with_scroll_hints=$enableval], 5640e3d5408SPeter Wemm [with_scroll_hints=yes; 5650e3d5408SPeter Wemm # when hashmap is used scroll hints are useless 5660e3d5408SPeter Wemm test $with_hashmap = yes && with_scroll_hints=no]) 5670e3d5408SPeter WemmAC_MSG_RESULT($with_scroll_hints) 5680e3d5408SPeter Wemmtest "$with_scroll_hints" = yes && AC_DEFINE(USE_SCROLL_HINTS) 5690e3d5408SPeter Wemm 5700e3d5408SPeter Wemm### use option --enable-tcap-names to allow user to define new capabilities 5710e3d5408SPeter WemmAC_MSG_CHECKING(if you want experimental definable names like termcap) 5720e3d5408SPeter WemmAC_ARG_ENABLE(tcap-names, 5730e3d5408SPeter Wemm [ --enable-tcap-names compile with experimental definable-name code], 5740e3d5408SPeter Wemm [with_tcap_names=$enableval], 5750e3d5408SPeter Wemm [with_tcap_names=$with_develop]) 5760e3d5408SPeter WemmAC_MSG_RESULT($with_tcap_names) 5770e3d5408SPeter WemmNCURSES_XNAMES=0 5780e3d5408SPeter Wemmtest "$with_tcap_names" = yes && NCURSES_XNAMES=1 5790e3d5408SPeter WemmAC_SUBST(NCURSES_XNAMES) 5800e3d5408SPeter Wemm 5810e3d5408SPeter Wemm### use option --enable-sigwinch to turn on use of SIGWINCH logic 5820e3d5408SPeter WemmAC_MSG_CHECKING(if you want experimental SIGWINCH handler) 5830e3d5408SPeter WemmAC_ARG_ENABLE(sigwinch, 5840e3d5408SPeter Wemm [ --enable-sigwinch compile with experimental SIGWINCH handler], 5850e3d5408SPeter Wemm [with_sigwinch=$enableval], 5860e3d5408SPeter Wemm [with_sigwinch=yes]) 5870e3d5408SPeter WemmAC_MSG_RESULT($with_sigwinch) 5880e3d5408SPeter Wemmtest "$with_sigwinch" = yes && AC_DEFINE(USE_SIGWINCH) 5890e3d5408SPeter Wemm 5900e3d5408SPeter Wemm### use option --enable-widec to turn on use of wide-character support 5910e3d5408SPeter WemmAC_MSG_CHECKING(if you want experimental wide-character code) 5920e3d5408SPeter WemmAC_ARG_ENABLE(widec, 5930e3d5408SPeter Wemm [ --enable-widec compile with experimental wide-char code], 5940e3d5408SPeter Wemm [with_widec=$enableval], 5950e3d5408SPeter Wemm [with_widec=no]) 5960e3d5408SPeter WemmAC_MSG_RESULT($with_widec) 5970e3d5408SPeter Wemmtest "$with_widec" = yes && AC_DEFINE(USE_WIDEC_SUPPORT) 5980e3d5408SPeter Wemm 5990e3d5408SPeter Wemm### use option --enable-xmc-glitch to turn on use of magic-cookie optimize 6000e3d5408SPeter WemmAC_MSG_CHECKING(if you want experimental xmc code) 6010e3d5408SPeter WemmAC_ARG_ENABLE(xmc-glitch, 6020e3d5408SPeter Wemm [ --enable-xmc-glitch compile with experimental xmc code], 6030e3d5408SPeter Wemm [with_xmc_glitch=$enableval], 6040e3d5408SPeter Wemm [with_xmc_glitch=$with_develop]) 6050e3d5408SPeter WemmAC_MSG_RESULT($with_xmc_glitch) 6060e3d5408SPeter Wemmtest "$with_xmc_glitch" = yes && AC_DEFINE(USE_XMC_SUPPORT) 6070e3d5408SPeter Wemm 6080e3d5408SPeter Wemm############################################################################### 6090e3d5408SPeter WemmCF_HELP_MESSAGE(Testing/development Options:) 6100e3d5408SPeter Wemm 6110e3d5408SPeter Wemm### use option --disable-echo to suppress full display compiling commands 6120e3d5408SPeter WemmAC_ARG_ENABLE(echo, 6130e3d5408SPeter Wemm [ --enable-echo build: display "compiling" commands (default)], 6140e3d5408SPeter Wemm [with_echo=$enableval], 6150e3d5408SPeter Wemm [with_echo=yes]) 6160e3d5408SPeter Wemmif test "$with_echo" = yes; then 6170e3d5408SPeter Wemm ECHO_LINK= 6180e3d5408SPeter Wemmelse 6190e3d5408SPeter Wemm ECHO_LINK='@ echo linking $@ ... ;' 6200e3d5408SPeter Wemmfi 6210e3d5408SPeter WemmAC_SUBST(ECHO_LINK) 6220e3d5408SPeter Wemm 6230e3d5408SPeter Wemm### use option --enable-warnings to turn on all gcc warnings 6240e3d5408SPeter WemmAC_ARG_ENABLE(warnings, 6250e3d5408SPeter Wemm [ --enable-warnings build: turn on GCC compiler warnings], 6260e3d5408SPeter Wemm [with_warnings=$enableval]) 6270e3d5408SPeter Wemmif test -n "$with_warnings"; then 6280e3d5408SPeter Wemm ADAFLAGS="$ADAFLAGS -gnatg" 6290e3d5408SPeter Wemm CF_GCC_WARNINGS 6300e3d5408SPeter Wemmfi 6310e3d5408SPeter WemmCF_GCC_ATTRIBUTES 6320e3d5408SPeter Wemm 6330e3d5408SPeter Wemm### use option --enable-assertions to turn on generation of assertion code 6340e3d5408SPeter WemmAC_ARG_ENABLE(assertions, 6350e3d5408SPeter Wemm [ --enable-assertions test: turn on generation of assertion code], 6360e3d5408SPeter Wemm [with_assertions=$enableval], 6370e3d5408SPeter Wemm [with_assertions=no]) 6380e3d5408SPeter Wemmif test -n "$GCC" 6390e3d5408SPeter Wemmthen 6400e3d5408SPeter Wemm if test $with_assertions = no 6410e3d5408SPeter Wemm then 6420e3d5408SPeter Wemm AC_DEFINE(NDEBUG) 6430e3d5408SPeter Wemm CPPFLAGS="$CPPFLAGS -DNDEBUG" 6440e3d5408SPeter Wemm else 6450e3d5408SPeter Wemm ADAFLAGS="$ADAFLAGS -gnata" 6460e3d5408SPeter Wemm fi 6470e3d5408SPeter Wemmfi 6480e3d5408SPeter Wemm 6490e3d5408SPeter Wemm### use option --disable-leaks to suppress "permanent" leaks, for testing 6500e3d5408SPeter WemmAC_ARG_ENABLE(leaks, 6510e3d5408SPeter Wemm [ --disable-leaks test: suppress permanent memory-leaks], 6520e3d5408SPeter Wemm [test $enableval = no && AC_DEFINE(NO_LEAKS)]) 6530e3d5408SPeter WemmAC_DEFINE(HAVE_NC_ALLOC_H) 6540e3d5408SPeter Wemm 6550e3d5408SPeter Wemm### use option --enable-expanded to generate certain macros as functions 6560e3d5408SPeter WemmAC_ARG_ENABLE(expanded, 6570e3d5408SPeter Wemm [ --enable-expanded test: generate functions for certain macros], 6580e3d5408SPeter Wemm [test $enableval = yes && AC_DEFINE(NCURSES_EXPANDED)]) 6590e3d5408SPeter Wemm 6600e3d5408SPeter Wemm### use option --disable-macros to suppress macros in favor of functions 6610e3d5408SPeter WemmAC_ARG_ENABLE(macros, 6620e3d5408SPeter Wemm [ --disable-macros test: use functions rather than macros], 6630e3d5408SPeter Wemm [test $enableval = no && AC_DEFINE(NCURSES_NOMACROS)]) 6640e3d5408SPeter Wemm 6650e3d5408SPeter Wemm### Checks for libraries. 6660e3d5408SPeter WemmAC_CHECK_FUNC(gettimeofday, 6670e3d5408SPeter Wemm AC_DEFINE(HAVE_GETTIMEOFDAY),[ 6680e3d5408SPeter Wemm 6690e3d5408SPeter WemmAC_CHECK_LIB(bsd, gettimeofday, 6700e3d5408SPeter Wemm AC_DEFINE(HAVE_GETTIMEOFDAY) 6710e3d5408SPeter Wemm LIBS="$LIBS -lbsd")])dnl CLIX: bzero, select, gettimeofday 6720e3d5408SPeter Wemm 6730e3d5408SPeter WemmMATH_LIB="" 6740e3d5408SPeter WemmAC_CHECK_FUNC(sin,, 6750e3d5408SPeter Wemm AC_CHECK_LIB(m, sin,[MATH_LIB="-lm"])) 6760e3d5408SPeter WemmAC_SUBST(MATH_LIB) 6770e3d5408SPeter Wemm 6780e3d5408SPeter Wemm### Checks for header files. 6790e3d5408SPeter WemmAC_STDC_HEADERS 6800e3d5408SPeter WemmAC_HEADER_DIRENT 6810e3d5408SPeter WemmCF_REGEX 6820e3d5408SPeter Wemm 6830e3d5408SPeter Wemmdnl These are some other potentially nonportable headers. 6840e3d5408SPeter WemmAC_CHECK_HEADERS( \ 6850e3d5408SPeter Wemmfcntl.h \ 6860e3d5408SPeter Wemmgetopt.h \ 6870e3d5408SPeter Wemmlibc.h \ 6880e3d5408SPeter Wemmlimits.h \ 6890e3d5408SPeter Wemmlocale.h \ 6900e3d5408SPeter Wemmsys/bsdtypes.h \ 6910e3d5408SPeter Wemmsys/ioctl.h \ 6920e3d5408SPeter Wemmsys/param.h \ 6930e3d5408SPeter Wemmpoll.h \ 6940e3d5408SPeter Wemmsys/select.h \ 6950e3d5408SPeter Wemmsys/stropts.h \ 6960e3d5408SPeter Wemmsys/time.h \ 6970e3d5408SPeter Wemmsys/times.h \ 6980e3d5408SPeter Wemmtermio.h \ 6990e3d5408SPeter Wemmtermios.h \ 7000e3d5408SPeter Wemmttyent.h \ 7010e3d5408SPeter Wemmunistd.h \ 7020e3d5408SPeter Wemmvalues.h \ 7030e3d5408SPeter Wemm) 7040e3d5408SPeter Wemm 7050e3d5408SPeter Wemm# check for ISC (this may also define _POSIX_SOURCE) 7060e3d5408SPeter Wemm# Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set 7070e3d5408SPeter Wemmif test "$ISC" = yes ; then 7080e3d5408SPeter Wemm AC_CHECK_LIB(cposix,main) 7090e3d5408SPeter Wemm AC_CHECK_LIB(inet,bzero,LIBS="$LIBS -linet")dnl also 'select()' 7100e3d5408SPeter Wemm AC_CHECK_HEADERS( sys/termio.h ) 7110e3d5408SPeter Wemmfi 7120e3d5408SPeter Wemm 7130e3d5408SPeter WemmCF_SYS_TIME_SELECT 7140e3d5408SPeter Wemm 7150e3d5408SPeter Wemm### checks for compiler characteristics 7160e3d5408SPeter WemmAC_LANG_C 7170e3d5408SPeter WemmAC_C_CONST 7180e3d5408SPeter WemmAC_C_INLINE 7190e3d5408SPeter Wemmtest $ac_cv_c_inline != no && AC_DEFINE(CC_HAS_INLINE_FUNCS) 7200e3d5408SPeter Wemm 7210e3d5408SPeter WemmCF_TYPEOF_CHTYPE 7220e3d5408SPeter WemmCF_WIDEC_SHIFT 7230e3d5408SPeter Wemm 7240e3d5408SPeter Wemm### Checks for external-data 7250e3d5408SPeter WemmCF_ERRNO 7260e3d5408SPeter WemmCF_LINK_DATAONLY 7270e3d5408SPeter WemmCF_SPEED_TYPE 7280e3d5408SPeter Wemm 7290e3d5408SPeter Wemm### Checks for library functions. 7300e3d5408SPeter WemmAC_CHECK_FUNCS( getcwd \ 7310e3d5408SPeter Wemmgetttynam \ 7320e3d5408SPeter Wemmmemccpy \ 7330e3d5408SPeter Wemmnanosleep \ 7340e3d5408SPeter Wemmpoll \ 7350e3d5408SPeter Wemmremove \ 7360e3d5408SPeter Wemmselect \ 7370e3d5408SPeter Wemmsetbuf \ 7380e3d5408SPeter Wemmsetbuffer \ 7390e3d5408SPeter Wemmsetvbuf \ 7400e3d5408SPeter Wemmsigaction \ 7410e3d5408SPeter Wemmsigvec \ 7420e3d5408SPeter Wemmstrdup \ 7430e3d5408SPeter Wemmstrstr \ 7440e3d5408SPeter Wemmtcgetattr \ 7450e3d5408SPeter Wemmtcgetpgrp \ 7460e3d5408SPeter Wemmtimes \ 7470e3d5408SPeter Wemmusleep \ 7480e3d5408SPeter Wemmvfscanf \ 7490e3d5408SPeter Wemmvsnprintf \ 7500e3d5408SPeter Wemmvsscanf \ 7510e3d5408SPeter Wemm) 7520e3d5408SPeter Wemm 7530e3d5408SPeter Wemmif test "$with_getcap" = "yes" ; then 7540e3d5408SPeter Wemm CF_CGETENT 7550e3d5408SPeter Wemmfi 7560e3d5408SPeter Wemm 7570e3d5408SPeter WemmCF_ISASCII 7580e3d5408SPeter WemmCF_STRUCT_SIGACTION 7590e3d5408SPeter WemmCF_STRUCT_TERMIOS 7600e3d5408SPeter Wemm 7610e3d5408SPeter Wemmdnl FIXME (may need this) AC_SYS_RESTARTABLE_SYSCALLS 7620e3d5408SPeter Wemmif test "$cross_compiling" = yes ; then 7630e3d5408SPeter Wemm AC_MSG_WARN(cross compiling: assume setvbuf params not reversed) 7640e3d5408SPeter Wemmelse 7650e3d5408SPeter Wemm AC_FUNC_SETVBUF_REVERSED 7660e3d5408SPeter Wemmfi 7670e3d5408SPeter WemmAC_TYPE_SIGNAL 7680e3d5408SPeter WemmCF_TYPE_SIGACTION 7690e3d5408SPeter WemmCF_SIZECHANGE 7700e3d5408SPeter WemmCF_FUNC_MEMMOVE 7710e3d5408SPeter Wemm 7720e3d5408SPeter Wemmdnl We'll do our own -g libraries, unless the user's overridden via $CFLAGS 7730e3d5408SPeter Wemmif test -z "$cf_user_CFLAGS" ; then 7740e3d5408SPeter Wemm CF_STRIP_G_OPT(CFLAGS) 7750e3d5408SPeter Wemm CF_STRIP_G_OPT(CXXFLAGS) 7760e3d5408SPeter Wemmfi 7770e3d5408SPeter Wemm 7780e3d5408SPeter Wemmdnl Check for C++ compiler characteristics (and ensure that it's there!) 7790e3d5408SPeter WemmCF_BOOL_DECL(cf_cv_cc_bool_type) 7800e3d5408SPeter Wemmif test -n "$CXX" ; then 7810e3d5408SPeter Wemm AC_LANG_CPLUSPLUS 7820e3d5408SPeter Wemm case "`${CXX-g++} --version`" in 7830e3d5408SPeter Wemm 2.7*) 7840e3d5408SPeter Wemm CF_CXX_LIBRARY 7850e3d5408SPeter Wemm ;; 7860e3d5408SPeter Wemm *) 7870e3d5408SPeter Wemm cf_cxx_library=yes 7880e3d5408SPeter Wemm ;; 7890e3d5408SPeter Wemm esac 7900e3d5408SPeter Wemm AC_CHECK_HEADERS(builtin.h typeinfo) 7910e3d5408SPeter Wemm CF_BOOL_DECL 7920e3d5408SPeter Wemm CF_BOOL_SIZE 7930e3d5408SPeter Wemm CF_ETIP_DEFINES 7940e3d5408SPeter Wemmelse 7950e3d5408SPeter Wemm cf_cxx_library=no 7960e3d5408SPeter Wemm cf_cv_builtin_bool=0 7970e3d5408SPeter Wemm 7980e3d5408SPeter Wemm # Just because we are not configuring against C++ right now does not 7990e3d5408SPeter Wemm # mean that a user will not want to use C++. Some distributors disable 8000e3d5408SPeter Wemm # the C++ portion of this configuration as a shortcut (or just to avoid 8010e3d5408SPeter Wemm # compiling the demo in the c++ directory). So we need a reasonable 8020e3d5408SPeter Wemm # default for the 'bool' type. 8030e3d5408SPeter Wemm # 8040e3d5408SPeter Wemm # Caveat: since the storage of the bool type is not standardized, it 8050e3d5408SPeter Wemm # may change. 8060e3d5408SPeter Wemm 8070e3d5408SPeter Wemm AC_MSG_CHECKING(for fallback type of bool) 8080e3d5408SPeter Wemm case "$host_cpu" in #(vi 8090e3d5408SPeter Wemm i?86) cf_cv_type_of_bool=char ;; #(vi 8100e3d5408SPeter Wemm *) cf_cv_type_of_bool=int ;; 8110e3d5408SPeter Wemm esac 8120e3d5408SPeter Wemm AC_MSG_RESULT($cf_cv_type_of_bool) 8130e3d5408SPeter Wemmfi 8140e3d5408SPeter WemmAC_SUBST(CXXLIBS) 8150e3d5408SPeter Wemm 8160e3d5408SPeter WemmCF_HELP_MESSAGE(Ada95 Binding Options:) 8170e3d5408SPeter Wemm 8180e3d5408SPeter Wemmdnl Check for availability of GNU Ada Translator (GNAT). 8190e3d5408SPeter Wemmdnl At the moment we support no other Ada95 compiler. 8200e3d5408SPeter Wemmif test "$cf_with_ada" != "no" ; then 8210e3d5408SPeter Wemmcf_ada_make=gnatmake 8220e3d5408SPeter WemmAC_CHECK_PROG(gnat_exists, $cf_ada_make, yes, no) 8230e3d5408SPeter Wemmif test "$ac_cv_prog_gnat_exists" = no; then 8240e3d5408SPeter Wemm cf_ada_make= 8250e3d5408SPeter Wemmelse 8260e3d5408SPeter Wemm CF_GNAT_VERSION 8270e3d5408SPeter Wemm AC_CHECK_PROG(m4_exists, m4, yes, no) 8280e3d5408SPeter Wemm if test "$ac_cv_prog_m4_exists" = no; then 8290e3d5408SPeter Wemm cf_cv_prog_gnat_correct=no 8300e3d5408SPeter Wemm echo Ada95 binding required program m4 not found. Ada95 binding disabled. 8310e3d5408SPeter Wemm fi 8320e3d5408SPeter Wemm if test "$cf_cv_prog_gnat_correct" = yes; then 8330e3d5408SPeter Wemm AC_MSG_CHECKING(if GNAT works) 8340e3d5408SPeter Wemm CF_GNAT_TRY_RUN([procedure conftest;], 8350e3d5408SPeter Wemm[with Text_IO; 8360e3d5408SPeter Wemmwith GNAT.OS_Lib; 8370e3d5408SPeter Wemmprocedure conftest is 8380e3d5408SPeter Wemmbegin 8390e3d5408SPeter Wemm Text_IO.Put ("Hello World"); 8400e3d5408SPeter Wemm Text_IO.New_Line; 8410e3d5408SPeter Wemm GNAT.OS_Lib.OS_Exit (0); 8420e3d5408SPeter Wemmend conftest;],[cf_cv_prog_gnat_correct=yes],[cf_cv_prog_gnat_correct=no]) 8430e3d5408SPeter Wemm AC_MSG_RESULT($cf_cv_prog_gnat_correct) 8440e3d5408SPeter Wemm fi 8450e3d5408SPeter Wemmfi 8460e3d5408SPeter Wemmif test "$cf_cv_prog_gnat_correct" = yes; then 8470e3d5408SPeter Wemm ADAFLAGS="-O3 -gnatpn $ADAFLAGS" 8480e3d5408SPeter Wemm 8490e3d5408SPeter Wemm AC_ARG_WITH(ada-compiler, 8500e3d5408SPeter Wemm [ --with-ada-compiler=CMD Specify Ada95 compiler command (default gnatmake)], 8510e3d5408SPeter Wemm [cf_ada_compiler=$withval], 8520e3d5408SPeter Wemm [cf_ada_compiler=gnatmake]) 8530e3d5408SPeter Wemm 8540e3d5408SPeter Wemm cf_ada_package=terminal_interface 8550e3d5408SPeter Wemm 8560e3d5408SPeter Wemm AC_SUBST(cf_ada_make) 8570e3d5408SPeter Wemm AC_SUBST(cf_ada_compiler) 8580e3d5408SPeter Wemm AC_SUBST(cf_ada_package) 8590e3d5408SPeter Wemm AC_SUBST(ADAFLAGS) 8600e3d5408SPeter Wemm AC_SUBST(cf_compile_generics) 8610e3d5408SPeter Wemm AC_SUBST(cf_generic_objects) 8620e3d5408SPeter Wemm 8630e3d5408SPeter Wemm CF_WITH_PATH(ada-include, 8640e3d5408SPeter Wemm [ --with-ada-include=DIR Ada includes are in DIR], 8650e3d5408SPeter Wemm ADA_INCLUDE, 8660e3d5408SPeter Wemm PREFIX/lib/gnu-Ada/adainclude, 8670e3d5408SPeter Wemm [$]prefix/lib/gnu-Ada/adainclude) 8680e3d5408SPeter Wemm AC_SUBST(ADA_INCLUDE) 8690e3d5408SPeter Wemm 8700e3d5408SPeter Wemm CF_WITH_PATH(ada-objects, 8710e3d5408SPeter Wemm [ --with-ada-objects=DIR Ada objects are in DIR], 8720e3d5408SPeter Wemm ADA_OBJECTS, 8730e3d5408SPeter Wemm PREFIX/lib/gnu-Ada/adalib, 8740e3d5408SPeter Wemm [$]prefix/lib/gnu-Ada/adalib) 8750e3d5408SPeter Wemm AC_SUBST(ADA_OBJECTS) 8760e3d5408SPeter Wemm 8770e3d5408SPeter Wemm if test $with_shared = no 8780e3d5408SPeter Wemm then 8790e3d5408SPeter Wemm AC_MSG_WARN(Ada95 applications will not link properly with static libraries) 8800e3d5408SPeter Wemm fi 8810e3d5408SPeter Wemmfi 8820e3d5408SPeter Wemmfi 8830e3d5408SPeter Wemm 8840e3d5408SPeter Wemm### It's not possible to appease gcc 2.6.3's conversion-warnings if we're 8850e3d5408SPeter Wemm### using a 'char' for bools. gcc 2.7.0's conversion-warnings are broken too 8860e3d5408SPeter Wemm### badly to consider using for development purposes, but 2.5.8 is okay. 8870e3d5408SPeter Wemmif test -n "$with_warnings"; then 8880e3d5408SPeter Wemm if test -n "$GCC"; then 8890e3d5408SPeter Wemm case "`$CC --version`" in 8900e3d5408SPeter Wemm 2.6.3) 8910e3d5408SPeter Wemm if test "$cf_cv_type_of_bool" != "char"; then 8920e3d5408SPeter Wemm EXTRA_CFLAGS="$EXTRA_CFLAGS -Wconversion" 8930e3d5408SPeter Wemm fi 8940e3d5408SPeter Wemm ;; 8950e3d5408SPeter Wemm 2.5*) 8960e3d5408SPeter Wemm EXTRA_CFLAGS="$EXTRA_CFLAGS -Wconversion" 8970e3d5408SPeter Wemm ;; 8980e3d5408SPeter Wemm esac 8990e3d5408SPeter Wemm fi 9000e3d5408SPeter Wemmfi 9010e3d5408SPeter Wemm 9020e3d5408SPeter Wemm### Construct the library-subsets, if any, from this set of keywords: 9030e3d5408SPeter Wemm### none, base, ext_funcs, termlib. 9040e3d5408SPeter WemmAC_MSG_CHECKING(for library subsets) 9050e3d5408SPeter Wemmif test "$with_termlib" = yes ; then 9060e3d5408SPeter Wemm LIB_SUBSETS="termlib " 9070e3d5408SPeter Wemmelse 9080e3d5408SPeter Wemm LIB_SUBSETS="termlib+" 9090e3d5408SPeter Wemmfi 9100e3d5408SPeter WemmLIB_SUBSETS="${LIB_SUBSETS}base" 9110e3d5408SPeter Wemmtest "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs" 9120e3d5408SPeter WemmAC_MSG_RESULT($LIB_SUBSETS) 9130e3d5408SPeter Wemm 9140e3d5408SPeter Wemm### Construct the list of include-directories to be generated 9150e3d5408SPeter WemmCF_INCLUDE_DIRS 9160e3d5408SPeter WemmCF_ADA_INCLUDE_DIRS 9170e3d5408SPeter Wemm 9180e3d5408SPeter Wemm### Set up low-level terminfo dependencies for makefiles. Note that we 9190e3d5408SPeter Wemm### could override this. 9200e3d5408SPeter Wemmif test "$with_termlib" = yes ; then 9210e3d5408SPeter Wemm TEST_DEPS="${LIB_PREFIX}${TINFO_NAME}${DFT_DEP_SUFFIX}" 9220e3d5408SPeter Wemm TEST_ARGS="-l${TINFO_NAME}${DFT_ARG_SUFFIX}" 9230e3d5408SPeter Wemmfi 9240e3d5408SPeter WemmPROG_DEPS="$TEST_DEPS" 9250e3d5408SPeter WemmPROG_ARGS="$TEST_ARGS" 9260e3d5408SPeter Wemm 9270e3d5408SPeter Wemm### Construct the list of subdirectories for which we'll customize makefiles 9280e3d5408SPeter Wemm### with the appropriate compile-rules. 9290e3d5408SPeter Wemm 9300e3d5408SPeter WemmCF_SRC_MODULES($modules_to_build) 9310e3d5408SPeter WemmCF_DIRS_TO_MAKE 9320e3d5408SPeter Wemm 9330e3d5408SPeter Wemm### Now that we're done running tests, add the compiler-warnings, if any 9340e3d5408SPeter WemmCFLAGS="$CFLAGS $EXTRA_CFLAGS" 9350e3d5408SPeter Wemm 9360e3d5408SPeter Wemm################################################################################ 9370e3d5408SPeter WemmAC_OUTPUT( \ 9380e3d5408SPeter Wemm include/MKterm.h.awk \ 9390e3d5408SPeter Wemm include/curses.h \ 9400e3d5408SPeter Wemm include/termcap.h \ 9410e3d5408SPeter Wemm include/unctrl.h \ 9420e3d5408SPeter Wemm $SUB_MAKEFILES \ 9430e3d5408SPeter Wemm Makefile,[ 9440e3d5408SPeter WemmCF_LIB_RULES 9450e3d5408SPeter Wemm],[ 9460e3d5408SPeter Wemm### Special initialization commands, used to pass information from the 9470e3d5408SPeter Wemm### configuration-run into config.status 9480e3d5408SPeter Wemm 9490e3d5408SPeter WemmAWK="$AWK" 9500e3d5408SPeter WemmCF_LIST_MODELS="$cf_list_models" 9510e3d5408SPeter WemmDFT_LWR_MODEL="$DFT_LWR_MODEL" 9520e3d5408SPeter WemmLDCONFIG="$LDCONFIG" 9530e3d5408SPeter WemmLIB_NAME="$LIB_NAME" 9540e3d5408SPeter WemmLIB_SUBSETS="$LIB_SUBSETS" 9550e3d5408SPeter WemmSRC_SUBDIRS="$SRC_SUBDIRS" 9560e3d5408SPeter WemmTINFO_NAME="$TINFO_NAME" 9570e3d5408SPeter WemmWITH_ECHO="$with_echo" 9580e3d5408SPeter WemmWITH_OVERWRITE="$with_overwrite" 9590e3d5408SPeter Wemmcf_cv_abi_version="$cf_cv_abi_version" 9600e3d5408SPeter Wemmcf_cv_do_symlinks="$cf_cv_do_symlinks" 9610e3d5408SPeter Wemmcf_cv_rel_version="$cf_cv_rel_version" 9620e3d5408SPeter Wemmcf_cv_rm_so_locs="$cf_cv_rm_so_locs" 9630e3d5408SPeter Wemmcf_cv_system_name="$cf_cv_system_name" 9640e3d5408SPeter Wemmcf_cxx_library="$cf_cxx_library" 9650e3d5408SPeter Wemmtarget="$target" 9660e3d5408SPeter Wemm 9670e3d5408SPeter Wemm],sort)dnl 9680e3d5408SPeter Wemm${MAKE-make} preinstall 969