1#! /bin/sh 2 3# From configure.in Revision: 1.194 4 5 6 7# Guess values for system-dependent variables and create Makefiles. 8# Generated automatically using autoconf version 2.13.19990117 9# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. 10# 11# This configure script is free software; the Free Software Foundation 12# gives unlimited permission to copy, distribute and modify it. 13 14# Defaults: 15ac_help= 16ac_default_prefix=/usr/local 17# Any additions from configure.in: 18 19# Initialize some variables set by options. 20# The variables have the same names as the options, with 21# dashes changed to underlines. 22build=NONE 23cache_file=./config.cache 24exec_prefix=NONE 25host=NONE 26no_create= 27nonopt=NONE 28no_recursion= 29prefix=NONE 30program_prefix=NONE 31program_suffix=NONE 32program_transform_name=s,x,x, 33silent= 34site= 35srcdir= 36target=NONE 37verbose= 38x_includes=NONE 39x_libraries=NONE 40bindir='${exec_prefix}/bin' 41sbindir='${exec_prefix}/sbin' 42libexecdir='${exec_prefix}/libexec' 43datadir='${prefix}/share' 44sysconfdir='${prefix}/etc' 45sharedstatedir='${prefix}/com' 46localstatedir='${prefix}/var' 47libdir='${exec_prefix}/lib' 48includedir='${prefix}/include' 49oldincludedir='/usr/include' 50infodir='${prefix}/info' 51mandir='${prefix}/man' 52 53# Initialize some other variables. 54subdirs= 55MFLAGS= MAKEFLAGS= 56SHELL=${CONFIG_SHELL-/bin/sh} 57# Maximum number of lines to put in a shell here document. 58ac_max_here_lines=12 59 60ac_prev= 61for ac_option 62do 63 64 # If the previous option needs an argument, assign it. 65 if test -n "$ac_prev"; then 66 eval "$ac_prev=\$ac_option" 67 ac_prev= 68 continue 69 fi 70 71 case "$ac_option" in 72 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; 73 *) ac_optarg= ;; 74 esac 75 76 # Accept the important Cygnus configure options, so we can diagnose typos. 77 78 case "$ac_option" in 79 80 -bindir | --bindir | --bindi | --bind | --bin | --bi) 81 ac_prev=bindir ;; 82 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) 83 bindir="$ac_optarg" ;; 84 85 -build | --build | --buil | --bui | --bu) 86 ac_prev=build ;; 87 -build=* | --build=* | --buil=* | --bui=* | --bu=*) 88 build="$ac_optarg" ;; 89 90 -cache-file | --cache-file | --cache-fil | --cache-fi \ 91 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) 92 ac_prev=cache_file ;; 93 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ 94 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) 95 cache_file="$ac_optarg" ;; 96 97 -datadir | --datadir | --datadi | --datad | --data | --dat | --da) 98 ac_prev=datadir ;; 99 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ 100 | --da=*) 101 datadir="$ac_optarg" ;; 102 103 -disable-* | --disable-*) 104 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` 105 # Reject names that are not valid shell variable names. 106 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then 107 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } 108 fi 109 ac_feature=`echo $ac_feature| sed 's/-/_/g'` 110 eval "enable_${ac_feature}=no" ;; 111 112 -enable-* | --enable-*) 113 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` 114 # Reject names that are not valid shell variable names. 115 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then 116 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } 117 fi 118 ac_feature=`echo $ac_feature| sed 's/-/_/g'` 119 case "$ac_option" in 120 *=*) ;; 121 *) ac_optarg=yes ;; 122 esac 123 eval "enable_${ac_feature}='$ac_optarg'" ;; 124 125 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ 126 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ 127 | --exec | --exe | --ex) 128 ac_prev=exec_prefix ;; 129 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ 130 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ 131 | --exec=* | --exe=* | --ex=*) 132 exec_prefix="$ac_optarg" ;; 133 134 -gas | --gas | --ga | --g) 135 # Obsolete; use --with-gas. 136 with_gas=yes ;; 137 138 -help | --help | --hel | --he) 139 # Omit some internal or obsolete options to make the list less imposing. 140 # This message is too long to be a string in the A/UX 3.1 sh. 141 cat << EOF 142Usage: configure [options] [host] 143Options: [defaults in brackets after descriptions] 144Configuration: 145 --cache-file=FILE cache test results in FILE 146 --help print this message 147 --no-create do not create output files 148 --quiet, --silent do not print \`checking...' messages 149 --version print the version of autoconf that created configure 150Directory and file names: 151 --prefix=PREFIX install architecture-independent files in PREFIX 152 [$ac_default_prefix] 153 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 154 [same as prefix] 155 --bindir=DIR user executables in DIR [EPREFIX/bin] 156 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] 157 --libexecdir=DIR program executables in DIR [EPREFIX/libexec] 158 --datadir=DIR read-only architecture-independent data in DIR 159 [PREFIX/share] 160 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] 161 --sharedstatedir=DIR modifiable architecture-independent data in DIR 162 [PREFIX/com] 163 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] 164 --libdir=DIR object code libraries in DIR [EPREFIX/lib] 165 --includedir=DIR C header files in DIR [PREFIX/include] 166 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] 167 --infodir=DIR info documentation in DIR [PREFIX/info] 168 --mandir=DIR man documentation in DIR [PREFIX/man] 169 --srcdir=DIR find the sources in DIR [configure dir or ..] 170 --program-prefix=PREFIX prepend PREFIX to installed program names 171 --program-suffix=SUFFIX append SUFFIX to installed program names 172 --program-transform-name=PROGRAM 173 run sed PROGRAM on installed program names 174EOF 175 cat << EOF 176Host type: 177 --build=BUILD configure for building on BUILD [BUILD=HOST] 178 --host=HOST configure for HOST [guessed] 179 --target=TARGET configure for TARGET [TARGET=HOST] 180Features and packages: 181 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 182 --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 183 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 184 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 185 --x-includes=DIR X include files are in DIR 186 --x-libraries=DIR X library files are in DIR 187EOF 188cat <<EOF 189--enable and --with options recognized: 190 --with-system-type=XXX test: override derived host system-type 191 --enable-add-ons=DIR... used to check if we are a glibc add-on. 192 --without-cxx do not adjust ncurses bool to match C++ 193 --without-cxx-binding do not build C++ binding and demo 194 --without-ada suppress check for Ada95, don't build demo 195 --without-progs suppress build with programs (e.g., tic) 196 --with-install-prefix prefixes actual install-location 197Options to Specify How Manpages are Installed: 198 --with-manpage-format specify manpage-format: gzip/compress/BSDI/normal and 199 optionally formatted, e.g., gzip,formatted 200 --with-manpage-renames specify manpage-renaming 201 --with-manpage-symlinks specify manpage-symlinks 202Options to Specify the Libraries Built/Used: 203 --with-shared generate shared-libraries 204EOF 205cat <<EOF 206 --with-normal generate normal-libraries (default) 207 --with-debug generate debug-libraries (default) 208 --with-profile generate profile-libraries 209 --with-termlib generate separate terminfo library 210 --with-dbmalloc test: use Conor Cahill's dbmalloc library 211 --with-dmalloc test: use Gray Watson's dmalloc library 212 --with-gpm use Alessandro Rubini's GPM library 213 --enable-rpath use rpath option when generating shared libraries 214 --with-shlib-version=X Specify rel or abi version for shared libs 215Fine-Tuning Your Configuration: 216 --disable-overwrite leave out the link to -lcurses 217 --disable-database use only built-in data 218EOF 219cat <<EOF 220 --with-fallbacks=XXX specify list of fallback terminal descriptions 221 --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo) 222 --disable-big-core assume machine has little memory 223 --enable-termcap compile in termcap fallback support 224 --enable-getcap fast termcap load, no xrefs to terminfo 225 --enable-getcap-cache cache translated termcaps in ~/.terminfo 226 --enable-symlinks make tic use symbolic links not hard links 227 --enable-broken_linker compile with broken-linker support code 228 --enable-bsdpad recognize BSD-style prefix padding 229 --with-rcs-ids compile-in RCS identifiers 230Extensions: 231 --disable-ext-funcs disable function-extensions 232EOF 233cat <<EOF 234 --enable-const compile with extra/non-standard const 235 --enable-hashmap compile with hashmap scrolling-optimization code 236 --enable-no-padding compile with \$NCURSES_NO_PADDING code 237 --enable-sigwinch compile with SIGWINCH handler 238 --enable-tcap-names compile with user-definable terminal capabilities 239Experimental Code: 240 --with-develop enable all experimental options for testing 241 --enable-colorfgbg compile with experimental \$COLORFGBG code 242 --enable-hard-tabs compile with experimental hard-tabs code 243 --enable-safe-sprintf compile with experimental safe-sprintf code 244 --disable-scroll-hints compile without scroll-hints code 245 --enable-widec compile with experimental wide-char code 246EOF 247cat <<EOF 248 --enable-xmc-glitch compile with experimental xmc code 249Testing/development Options: 250 --enable-echo build: display "compiling" commands (default) 251 --enable-warnings build: turn on GCC compiler warnings 252 --enable-assertions test: turn on generation of assertion code 253 --disable-leaks test: suppress permanent memory-leaks 254 --enable-expanded test: generate functions for certain macros 255 --disable-macros test: use functions rather than macros 256Ada95 Binding Options: 257 --with-ada-compiler=CMD Specify Ada95 compiler command (default gnatmake) 258 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/lib/ada/adainclude) 259 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib) 260EOF 261cat <<EOF 262EOF 263 exit 0 ;; 264 265 -host | --host | --hos | --ho) 266 ac_prev=host ;; 267 -host=* | --host=* | --hos=* | --ho=*) 268 host="$ac_optarg" ;; 269 270 -includedir | --includedir | --includedi | --included | --include \ 271 | --includ | --inclu | --incl | --inc) 272 ac_prev=includedir ;; 273 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ 274 | --includ=* | --inclu=* | --incl=* | --inc=*) 275 includedir="$ac_optarg" ;; 276 277 -infodir | --infodir | --infodi | --infod | --info | --inf) 278 ac_prev=infodir ;; 279 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) 280 infodir="$ac_optarg" ;; 281 282 -libdir | --libdir | --libdi | --libd) 283 ac_prev=libdir ;; 284 -libdir=* | --libdir=* | --libdi=* | --libd=*) 285 libdir="$ac_optarg" ;; 286 287 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ 288 | --libexe | --libex | --libe) 289 ac_prev=libexecdir ;; 290 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ 291 | --libexe=* | --libex=* | --libe=*) 292 libexecdir="$ac_optarg" ;; 293 294 -localstatedir | --localstatedir | --localstatedi | --localstated \ 295 | --localstate | --localstat | --localsta | --localst \ 296 | --locals | --local | --loca | --loc | --lo) 297 ac_prev=localstatedir ;; 298 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ 299 | --localstate=* | --localstat=* | --localsta=* | --localst=* \ 300 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) 301 localstatedir="$ac_optarg" ;; 302 303 -mandir | --mandir | --mandi | --mand | --man | --ma | --m) 304 ac_prev=mandir ;; 305 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) 306 mandir="$ac_optarg" ;; 307 308 -nfp | --nfp | --nf) 309 # Obsolete; use --without-fp. 310 with_fp=no ;; 311 312 -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 313 | --no-cr | --no-c) 314 no_create=yes ;; 315 316 -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 317 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) 318 no_recursion=yes ;; 319 320 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ 321 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ 322 | --oldin | --oldi | --old | --ol | --o) 323 ac_prev=oldincludedir ;; 324 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ 325 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ 326 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) 327 oldincludedir="$ac_optarg" ;; 328 329 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) 330 ac_prev=prefix ;; 331 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) 332 prefix="$ac_optarg" ;; 333 334 -program-prefix | --program-prefix | --program-prefi | --program-pref \ 335 | --program-pre | --program-pr | --program-p) 336 ac_prev=program_prefix ;; 337 -program-prefix=* | --program-prefix=* | --program-prefi=* \ 338 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) 339 program_prefix="$ac_optarg" ;; 340 341 -program-suffix | --program-suffix | --program-suffi | --program-suff \ 342 | --program-suf | --program-su | --program-s) 343 ac_prev=program_suffix ;; 344 -program-suffix=* | --program-suffix=* | --program-suffi=* \ 345 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) 346 program_suffix="$ac_optarg" ;; 347 348 -program-transform-name | --program-transform-name \ 349 | --program-transform-nam | --program-transform-na \ 350 | --program-transform-n | --program-transform- \ 351 | --program-transform | --program-transfor \ 352 | --program-transfo | --program-transf \ 353 | --program-trans | --program-tran \ 354 | --progr-tra | --program-tr | --program-t) 355 ac_prev=program_transform_name ;; 356 -program-transform-name=* | --program-transform-name=* \ 357 | --program-transform-nam=* | --program-transform-na=* \ 358 | --program-transform-n=* | --program-transform-=* \ 359 | --program-transform=* | --program-transfor=* \ 360 | --program-transfo=* | --program-transf=* \ 361 | --program-trans=* | --program-tran=* \ 362 | --progr-tra=* | --program-tr=* | --program-t=*) 363 program_transform_name="$ac_optarg" ;; 364 365 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 366 | -silent | --silent | --silen | --sile | --sil) 367 silent=yes ;; 368 369 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 370 ac_prev=sbindir ;; 371 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ 372 | --sbi=* | --sb=*) 373 sbindir="$ac_optarg" ;; 374 375 -sharedstatedir | --sharedstatedir | --sharedstatedi \ 376 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ 377 | --sharedst | --shareds | --shared | --share | --shar \ 378 | --sha | --sh) 379 ac_prev=sharedstatedir ;; 380 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ 381 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ 382 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ 383 | --sha=* | --sh=*) 384 sharedstatedir="$ac_optarg" ;; 385 386 -site | --site | --sit) 387 ac_prev=site ;; 388 -site=* | --site=* | --sit=*) 389 site="$ac_optarg" ;; 390 391 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) 392 ac_prev=srcdir ;; 393 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) 394 srcdir="$ac_optarg" ;; 395 396 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ 397 | --syscon | --sysco | --sysc | --sys | --sy) 398 ac_prev=sysconfdir ;; 399 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ 400 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) 401 sysconfdir="$ac_optarg" ;; 402 403 -target | --target | --targe | --targ | --tar | --ta | --t) 404 ac_prev=target ;; 405 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) 406 target="$ac_optarg" ;; 407 408 -v | -verbose | --verbose | --verbos | --verbo | --verb) 409 verbose=yes ;; 410 411 -version | --version | --versio | --versi | --vers) 412 echo "configure generated by autoconf version 2.13.19990117" 413 exit 0 ;; 414 415 -with-* | --with-*) 416 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` 417 # Reject names that are not valid shell variable names. 418 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then 419 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } 420 fi 421 ac_package=`echo $ac_package| sed 's/-/_/g'` 422 case "$ac_option" in 423 *=*) ;; 424 *) ac_optarg=yes ;; 425 esac 426 eval "with_${ac_package}='$ac_optarg'" ;; 427 428 -without-* | --without-*) 429 ac_package=`echo $ac_option|sed -e 's/-*without-//'` 430 # Reject names that are not valid shell variable names. 431 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then 432 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } 433 fi 434 ac_package=`echo $ac_package| sed 's/-/_/g'` 435 eval "with_${ac_package}=no" ;; 436 437 --x) 438 # Obsolete; use --with-x. 439 with_x=yes ;; 440 441 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ 442 | --x-incl | --x-inc | --x-in | --x-i) 443 ac_prev=x_includes ;; 444 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ 445 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) 446 x_includes="$ac_optarg" ;; 447 448 -x-libraries | --x-libraries | --x-librarie | --x-librari \ 449 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) 450 ac_prev=x_libraries ;; 451 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ 452 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) 453 x_libraries="$ac_optarg" ;; 454 455 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } 456 ;; 457 458 *) 459 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then 460 echo "configure: warning: $ac_option: invalid host type" 1>&2 461 fi 462 if test "x$nonopt" != xNONE; then 463 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } 464 fi 465 nonopt="$ac_option" 466 ;; 467 468 esac 469done 470 471if test -n "$ac_prev"; then 472 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } 473fi 474 475trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 476 477# File descriptor usage: 478# 0 standard input 479# 1 file creation 480# 2 errors and warnings 481# 3 some systems may open it to /dev/tty 482# 4 used on the Kubota Titan 483# 6 checking for... messages and results 484# 5 compiler messages saved in config.log 485if test "$silent" = yes; then 486 exec 6>/dev/null 487else 488 exec 6>&1 489fi 490exec 5>./config.log 491 492echo "\ 493This file contains any messages produced by compilers while 494running configure, to aid debugging if configure makes a mistake. 495" 1>&5 496 497# Strip out --no-create and --no-recursion so they do not pile up. 498# Also quote any args containing shell metacharacters. 499ac_configure_args= 500for ac_arg 501do 502 case "$ac_arg" in 503 -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 504 | --no-cr | --no-c) ;; 505 -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 506 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; 507 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) 508 ac_configure_args="$ac_configure_args '$ac_arg'" ;; 509 *) ac_configure_args="$ac_configure_args $ac_arg" ;; 510 esac 511done 512 513# NLS nuisances. 514# Only set these to C if already set. These must not be set unconditionally 515# because not all systems understand e.g. LANG=C (notably SCO). 516# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! 517# Non-C LC_CTYPE values break the ctype check. 518if test "${LANG+set}" = set; then LANG=C; export LANG; fi 519if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi 520if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi 521if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi 522 523# confdefs.h avoids OS command line length limits that DEFS can exceed. 524rm -rf conftest* confdefs.h 525# AIX cpp loses on an empty file, so make sure it contains at least a newline. 526echo > confdefs.h 527 528# A filename unique to this package, relative to the directory that 529# configure is in, which we can look for to find out if srcdir is correct. 530ac_unique_file=ncurses/base/lib_initscr.c 531 532# Find the source files, if location was not specified. 533if test -z "$srcdir"; then 534 ac_srcdir_defaulted=yes 535 # Try the directory containing this script, then its parent. 536 ac_prog=$0 537 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` 538 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. 539 srcdir=$ac_confdir 540 if test ! -r $srcdir/$ac_unique_file; then 541 srcdir=.. 542 fi 543else 544 ac_srcdir_defaulted=no 545fi 546if test ! -r $srcdir/$ac_unique_file; then 547 if test "$ac_srcdir_defaulted" = yes; then 548 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } 549 else 550 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } 551 fi 552fi 553srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` 554 555# Prefer explicitly selected file to automatically selected ones. 556if test -z "$CONFIG_SITE"; then 557 if test "x$prefix" != xNONE; then 558 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" 559 else 560 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" 561 fi 562fi 563for ac_site_file in $CONFIG_SITE; do 564 if test -r "$ac_site_file"; then 565 echo "loading site script $ac_site_file" 566 . "$ac_site_file" 567 fi 568done 569 570if test -r "$cache_file"; then 571 echo "loading cache $cache_file" 572 . $cache_file 573else 574 echo "creating cache $cache_file" 575 > $cache_file 576fi 577 578ac_ext=c 579# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 580ac_cpp='$CPP $CPPFLAGS' 581ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 582ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 583cross_compiling=$ac_cv_prog_cc_cross 584 585ac_exeext= 586ac_objext=o 587if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then 588 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. 589 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then 590 ac_n= ac_c=' 591' ac_t=' ' 592 else 593 ac_n=-n ac_c= ac_t= 594 fi 595else 596 ac_n= ac_c='\c' ac_t= 597fi 598 599 600 601 602 603NCURSES_MAJOR="`egrep '^NCURSES_MAJOR[ ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`" 604NCURSES_MINOR="`egrep '^NCURSES_MINOR[ ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`" 605NCURSES_PATCH="`egrep '^NCURSES_PATCH[ ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`" 606cf_cv_abi_version=${NCURSES_MAJOR} 607cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR} 608echo "$ac_t""Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version (`date`)" 1>&6 609 610 611 612 613 614 615 616 617ac_aux_dir= 618for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do 619 if test -f $ac_dir/install-sh; then 620 ac_aux_dir=$ac_dir 621 ac_install_sh="$ac_aux_dir/install-sh -c" 622 break 623 elif test -f $ac_dir/install.sh; then 624 ac_aux_dir=$ac_dir 625 ac_install_sh="$ac_aux_dir/install.sh -c" 626 break 627 fi 628done 629if test -z "$ac_aux_dir"; then 630 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } 631fi 632ac_config_guess=$ac_aux_dir/config.guess 633ac_config_sub=$ac_aux_dir/config.sub 634ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. 635 636 637if test -f $srcdir/config.guess ; then 638 639# Make sure we can run config.sub. 640if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : 641else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } 642fi 643 644echo $ac_n "checking host system type""... $ac_c" 1>&6 645echo "configure:646: checking host system type" >&5 646 647host_alias=$host 648case "$host_alias" in 649NONE) 650 case $nonopt in 651 NONE) 652 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : 653 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } 654 fi ;; 655 *) host_alias=$nonopt ;; 656 esac ;; 657esac 658 659host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` 660host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 661host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 662host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 663echo "$ac_t""$host" 1>&6 664 665 system_name="$host_os" 666else 667 system_name="`(uname -s -r) 2>/dev/null`" 668 if test -z "$system_name" ; then 669 system_name="`(hostname) 2>/dev/null`" 670 fi 671fi 672test -n "$system_name" && cat >> confdefs.h <<EOF 673#define SYSTEM_NAME "$system_name" 674EOF 675 676if eval "test \"`echo '$''{'cf_cv_system_name'+set}'`\" = set"; then 677 echo $ac_n "(cached) $ac_c" 1>&6 678else 679 cf_cv_system_name="$system_name" 680fi 681 682 683test -z "$system_name" && system_name="$cf_cv_system_name" 684test -n "$cf_cv_system_name" && echo "$ac_t"""Configuring for $cf_cv_system_name"" 1>&6 685 686if test ".$system_name" != ".$cf_cv_system_name" ; then 687 echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6 688 { echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; } 689fi 690 691 692# Check whether --with-system-type or --without-system-type was given. 693if test "${with_system_type+set}" = set; then 694 withval="$with_system_type" 695 echo "configure: warning: overriding system type to $withval" 1>&2 696 cf_cv_system_name=$withval 697fi 698 699 700# We need a configure script only when compiling as part of GNU C library. 701# Here we have to generate one of the files we need while compiling. 702# 703# The only problem is that users of the package might think they have to 704# run configure themself and find it irritating when nothing happens. 705# 706# So we try here to find out whether we are called from the glibc configure 707# or by a user. 708# 709 710# Check whether --enable-add-ons or --disable-add-ons was given. 711if test "${enable_add_ons+set}" = set; then 712 enableval="$enable_add_ons" 713 glibc_add_on=yes 714else 715 glibc_add_on= 716fi 717 718 719if test x"$glibc_add_on" = "xyes" ; then 720 rm -f $srcdir/Banner 721 # We are in glibc. 722 rm -f $srcdir/Makefile 723 cp $srcdir/Makefile.glibc $srcdir/Makefile 724 echo "ncurses `grep \"^[ ]*ncurses-version[ ]*=.*$\" \ 725 $srcdir/Makefile | sed -e \ 726 's/^[ ]*ncurses-version[ ]*=[ ]*\([^ ^ ]*\)[ ]*$/\1/'`" > $srcdir/Banner 727 exit 0 728fi 729 730### Save the given $CFLAGS to allow user-override. 731cf_user_CFLAGS="$CFLAGS" 732 733### Default install-location 734 735echo $ac_n "checking for prefix""... $ac_c" 1>&6 736echo "configure:737: checking for prefix" >&5 737if test "x$prefix" = "xNONE" ; then 738 case "$cf_cv_system_name" in 739 # non-vendor systems don't have a conflict 740 openbsd*|netbsd*|freebsd*|linux*) 741 prefix=/usr 742 ;; 743 *) prefix=$ac_default_prefix 744 ;; 745 esac 746fi 747echo "$ac_t""$prefix" 1>&6 748 749if test "x$prefix" = "xNONE" ; then 750echo $ac_n "checking for default include-directory""... $ac_c" 1>&6 751echo "configure:752: checking for default include-directory" >&5 752test -n "$verbose" && echo 1>&6 753for cf_symbol in \ 754 $includedir \ 755 $includedir/ncurses \ 756 $prefix/include \ 757 $prefix/include/ncurses \ 758 /usr/local/include \ 759 /usr/local/include/ncurses \ 760 /usr/include \ 761 /usr/include/ncurses 762do 763 cf_dir=`eval echo $cf_symbol` 764 if test -f $cf_dir/curses.h ; then 765 if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then 766 includedir="$cf_symbol" 767 test -n "$verbose" && echo $ac_n " found " 1>&6 768 break 769 fi 770 fi 771 test -n "$verbose" && echo " tested $cf_dir" 1>&6 772done 773echo "$ac_t""$includedir" 1>&6 774fi 775 776 777### Checks for programs. 778# Extract the first word of "gcc", so it can be a program name with args. 779set dummy gcc; ac_word=$2 780echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 781echo "configure:782: checking for $ac_word" >&5 782if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 783 echo $ac_n "(cached) $ac_c" 1>&6 784else 785 if test -n "$CC"; then 786 ac_cv_prog_CC="$CC" # Let the user override the test. 787else 788 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 789 ac_dummy="$PATH" 790 for ac_dir in $ac_dummy; do 791 test -z "$ac_dir" && ac_dir=. 792 if test -f $ac_dir/$ac_word; then 793 ac_cv_prog_CC="gcc" 794 break 795 fi 796 done 797 IFS="$ac_save_ifs" 798fi 799fi 800CC="$ac_cv_prog_CC" 801if test -n "$CC"; then 802 echo "$ac_t""$CC" 1>&6 803else 804 echo "$ac_t""no" 1>&6 805fi 806 807if test -z "$CC"; then 808 # Extract the first word of "cc", so it can be a program name with args. 809set dummy cc; ac_word=$2 810echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 811echo "configure:812: checking for $ac_word" >&5 812if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 813 echo $ac_n "(cached) $ac_c" 1>&6 814else 815 if test -n "$CC"; then 816 ac_cv_prog_CC="$CC" # Let the user override the test. 817else 818 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 819 ac_prog_rejected=no 820 ac_dummy="$PATH" 821 for ac_dir in $ac_dummy; do 822 test -z "$ac_dir" && ac_dir=. 823 if test -f $ac_dir/$ac_word; then 824 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then 825 ac_prog_rejected=yes 826 continue 827 fi 828 ac_cv_prog_CC="cc" 829 break 830 fi 831 done 832 IFS="$ac_save_ifs" 833if test $ac_prog_rejected = yes; then 834 # We found a bogon in the path, so make sure we never use it. 835 set dummy $ac_cv_prog_CC 836 shift 837 if test $# -gt 0; then 838 # We chose a different compiler from the bogus one. 839 # However, it has the same basename, so the bogon will be chosen 840 # first if we set CC to just the basename; use the full file name. 841 shift 842 set dummy "$ac_dir/$ac_word" "$@" 843 shift 844 ac_cv_prog_CC="$@" 845 fi 846fi 847fi 848fi 849CC="$ac_cv_prog_CC" 850if test -n "$CC"; then 851 echo "$ac_t""$CC" 1>&6 852else 853 echo "$ac_t""no" 1>&6 854fi 855 856 if test -z "$CC"; then 857 case "`uname -s`" in 858 *win32* | *WIN32*) 859 # Extract the first word of "cl", so it can be a program name with args. 860set dummy cl; ac_word=$2 861echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 862echo "configure:863: checking for $ac_word" >&5 863if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 864 echo $ac_n "(cached) $ac_c" 1>&6 865else 866 if test -n "$CC"; then 867 ac_cv_prog_CC="$CC" # Let the user override the test. 868else 869 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 870 ac_dummy="$PATH" 871 for ac_dir in $ac_dummy; do 872 test -z "$ac_dir" && ac_dir=. 873 if test -f $ac_dir/$ac_word; then 874 ac_cv_prog_CC="cl" 875 break 876 fi 877 done 878 IFS="$ac_save_ifs" 879fi 880fi 881CC="$ac_cv_prog_CC" 882if test -n "$CC"; then 883 echo "$ac_t""$CC" 1>&6 884else 885 echo "$ac_t""no" 1>&6 886fi 887 ;; 888 esac 889 fi 890 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } 891fi 892 893echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 894echo "configure:895: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 895 896ac_ext=c 897# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 898ac_cpp='$CPP $CPPFLAGS' 899ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 900ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 901cross_compiling=$ac_cv_prog_cc_cross 902 903cat > conftest.$ac_ext << EOF 904 905#line 906 "configure" 906#include "confdefs.h" 907 908main(){return(0);} 909EOF 910if { (eval echo configure:911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 911 ac_cv_prog_cc_works=yes 912 # If we can't run a trivial program, we are probably using a cross compiler. 913 if (./conftest; exit) 2>/dev/null; then 914 ac_cv_prog_cc_cross=no 915 else 916 ac_cv_prog_cc_cross=yes 917 fi 918else 919 echo "configure: failed program was:" >&5 920 cat conftest.$ac_ext >&5 921 ac_cv_prog_cc_works=no 922fi 923rm -fr conftest* 924ac_ext=c 925# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 926ac_cpp='$CPP $CPPFLAGS' 927ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 928ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 929cross_compiling=$ac_cv_prog_cc_cross 930 931echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 932if test $ac_cv_prog_cc_works = no; then 933 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } 934fi 935echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 936echo "configure:937: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 937echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 938cross_compiling=$ac_cv_prog_cc_cross 939 940echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 941echo "configure:942: checking whether we are using GNU C" >&5 942if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then 943 echo $ac_n "(cached) $ac_c" 1>&6 944else 945 cat > conftest.c <<EOF 946#ifdef __GNUC__ 947 yes; 948#endif 949EOF 950if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then 951 ac_cv_prog_gcc=yes 952else 953 ac_cv_prog_gcc=no 954fi 955fi 956 957echo "$ac_t""$ac_cv_prog_gcc" 1>&6 958 959if test $ac_cv_prog_gcc = yes; then 960 GCC=yes 961else 962 GCC= 963fi 964 965ac_test_CFLAGS="${CFLAGS+set}" 966ac_save_CFLAGS="$CFLAGS" 967CFLAGS= 968echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 969echo "configure:970: checking whether ${CC-cc} accepts -g" >&5 970if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then 971 echo $ac_n "(cached) $ac_c" 1>&6 972else 973 echo 'void f(){}' > conftest.c 974if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then 975 ac_cv_prog_cc_g=yes 976else 977 ac_cv_prog_cc_g=no 978fi 979rm -f conftest* 980 981fi 982 983echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 984if test "$ac_test_CFLAGS" = set; then 985 CFLAGS="$ac_save_CFLAGS" 986elif test $ac_cv_prog_cc_g = yes; then 987 if test "$GCC" = yes; then 988 CFLAGS="-g -O2" 989 else 990 CFLAGS="-g" 991 fi 992else 993 if test "$GCC" = yes; then 994 CFLAGS="-O2" 995 else 996 CFLAGS= 997 fi 998fi 999 1000if test -n "$GCC" ; then 1001echo $ac_n "checking version of gcc""... $ac_c" 1>&6 1002echo "configure:1003: checking version of gcc" >&5 1003eval "$CC --version" 1004fi 1005if test $host != $build; then 1006 for ac_prog in $CC gcc cc 1007do 1008# Extract the first word of "$ac_prog", so it can be a program name with args. 1009set dummy $ac_prog; ac_word=$2 1010echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1011echo "configure:1012: checking for $ac_word" >&5 1012if eval "test \"`echo '$''{'ac_cv_prog_BUILD_CC'+set}'`\" = set"; then 1013 echo $ac_n "(cached) $ac_c" 1>&6 1014else 1015 if test -n "$BUILD_CC"; then 1016 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test. 1017else 1018 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 1019 ac_dummy="$PATH" 1020 for ac_dir in $ac_dummy; do 1021 test -z "$ac_dir" && ac_dir=. 1022 if test -f $ac_dir/$ac_word; then 1023 ac_cv_prog_BUILD_CC="$ac_prog" 1024 break 1025 fi 1026 done 1027 IFS="$ac_save_ifs" 1028fi 1029fi 1030BUILD_CC="$ac_cv_prog_BUILD_CC" 1031if test -n "$BUILD_CC"; then 1032 echo "$ac_t""$BUILD_CC" 1>&6 1033else 1034 echo "$ac_t""no" 1>&6 1035fi 1036 1037test -n "$BUILD_CC" && break 1038done 1039 1040fi 1041echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 1042echo "configure:1043: checking how to run the C preprocessor" >&5 1043# On Suns, sometimes $CPP names a directory. 1044if test -n "$CPP" && test -d "$CPP"; then 1045 CPP= 1046fi 1047if test -z "$CPP"; then 1048if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then 1049 echo $ac_n "(cached) $ac_c" 1>&6 1050else 1051 # This must be in double quotes, not single quotes, because CPP may get 1052 # substituted into the Makefile and "${CC-cc}" will confuse make. 1053 CPP="${CC-cc} -E" 1054 # On the NeXT, cc -E runs the code through the compiler's parser, 1055 # not just through cpp. 1056 cat > conftest.$ac_ext <<EOF 1057#line 1058 "configure" 1058#include "confdefs.h" 1059#include <assert.h> 1060Syntax Error 1061EOF 1062ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1063{ (eval echo configure:1064: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1064ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1065if test -z "$ac_err"; then 1066 : 1067else 1068 echo "$ac_err" >&5 1069 echo "configure: failed program was:" >&5 1070 cat conftest.$ac_ext >&5 1071 rm -rf conftest* 1072 CPP="${CC-cc} -E -traditional-cpp" 1073 cat > conftest.$ac_ext <<EOF 1074#line 1075 "configure" 1075#include "confdefs.h" 1076#include <assert.h> 1077Syntax Error 1078EOF 1079ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1080{ (eval echo configure:1081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1081ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1082if test -z "$ac_err"; then 1083 : 1084else 1085 echo "$ac_err" >&5 1086 echo "configure: failed program was:" >&5 1087 cat conftest.$ac_ext >&5 1088 rm -rf conftest* 1089 CPP="${CC-cc} -nologo -E" 1090 cat > conftest.$ac_ext <<EOF 1091#line 1092 "configure" 1092#include "confdefs.h" 1093#include <assert.h> 1094Syntax Error 1095EOF 1096ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 1097{ (eval echo configure:1098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 1098ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 1099if test -z "$ac_err"; then 1100 : 1101else 1102 echo "$ac_err" >&5 1103 echo "configure: failed program was:" >&5 1104 cat conftest.$ac_ext >&5 1105 rm -rf conftest* 1106 CPP=/lib/cpp 1107fi 1108rm -f conftest* 1109fi 1110rm -f conftest* 1111fi 1112rm -f conftest* 1113 ac_cv_prog_CPP="$CPP" 1114fi 1115 CPP="$ac_cv_prog_CPP" 1116else 1117 ac_cv_prog_CPP="$CPP" 1118fi 1119echo "$ac_t""$CPP" 1>&6 1120 1121if test $ac_cv_prog_gcc = yes; then 1122 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 1123echo "configure:1124: checking whether ${CC-cc} needs -traditional" >&5 1124if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then 1125 echo $ac_n "(cached) $ac_c" 1>&6 1126else 1127 ac_pattern="Autoconf.*'x'" 1128 cat > conftest.$ac_ext <<EOF 1129#line 1130 "configure" 1130#include "confdefs.h" 1131#include <sgtty.h> 1132Autoconf TIOCGETP 1133EOF 1134if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 1135 egrep "$ac_pattern" >/dev/null 2>&1; then 1136 rm -rf conftest* 1137 ac_cv_prog_gcc_traditional=yes 1138else 1139 rm -rf conftest* 1140 ac_cv_prog_gcc_traditional=no 1141fi 1142rm -f conftest* 1143 1144 1145 if test $ac_cv_prog_gcc_traditional = no; then 1146 cat > conftest.$ac_ext <<EOF 1147#line 1148 "configure" 1148#include "confdefs.h" 1149#include <termio.h> 1150Autoconf TCGETA 1151EOF 1152if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 1153 egrep "$ac_pattern" >/dev/null 2>&1; then 1154 rm -rf conftest* 1155 ac_cv_prog_gcc_traditional=yes 1156fi 1157rm -f conftest* 1158 1159 fi 1160fi 1161 1162echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6 1163 if test $ac_cv_prog_gcc_traditional = yes; then 1164 CC="$CC -traditional" 1165 fi 1166fi 1167 1168echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6 1169echo "configure:1170: checking for POSIXized ISC" >&5 1170if test -d /etc/conf/kconfig.d && 1171 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1 1172then 1173 echo "$ac_t""yes" 1>&6 1174 ISC=yes # If later tests want to check for ISC. 1175 cat >> confdefs.h <<\EOF 1176#define _POSIX_SOURCE 1 1177EOF 1178 1179 if test "$GCC" = yes; then 1180 CC="$CC -posix" 1181 else 1182 CC="$CC -Xp" 1183 fi 1184else 1185 echo "$ac_t""no" 1>&6 1186 ISC= 1187fi 1188 1189 1190echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 1191echo "configure:1192: checking for ${CC-cc} option to accept ANSI C" >&5 1192if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then 1193 echo $ac_n "(cached) $ac_c" 1>&6 1194else 1195 1196cf_cv_ansi_cc=no 1197cf_save_CFLAGS="$CFLAGS" 1198# Don't try gcc -ansi; that turns off useful extensions and 1199# breaks some systems' header files. 1200# AIX -qlanglvl=ansi 1201# Ultrix and OSF/1 -std1 1202# HP-UX -Aa -D_HPUX_SOURCE 1203# SVR4 -Xc 1204# UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes) 1205for cf_arg in "-DCC_HAS_PROTOS" \ 1206 "" \ 1207 -qlanglvl=ansi \ 1208 -std1 \ 1209 -Ae \ 1210 "-Aa -D_HPUX_SOURCE" \ 1211 -Xc 1212do 1213 CFLAGS="$cf_save_CFLAGS $cf_arg" 1214 cat > conftest.$ac_ext <<EOF 1215#line 1216 "configure" 1216#include "confdefs.h" 1217 1218#ifndef CC_HAS_PROTOS 1219#if !defined(__STDC__) || (__STDC__ != 1) 1220choke me 1221#endif 1222#endif 1223 1224int main() { 1225 1226 int test (int i, double x); 1227 struct s1 {int (*f) (int a);}; 1228 struct s2 {int (*f) (double a);}; 1229; return 0; } 1230EOF 1231if { (eval echo configure:1232: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 1232 rm -rf conftest* 1233 cf_cv_ansi_cc="$cf_arg"; break 1234else 1235 echo "configure: failed program was:" >&5 1236 cat conftest.$ac_ext >&5 1237fi 1238rm -f conftest* 1239done 1240CFLAGS="$cf_save_CFLAGS" 1241 1242fi 1243 1244echo "$ac_t""$cf_cv_ansi_cc" 1>&6 1245 1246if test "$cf_cv_ansi_cc" != "no"; then 1247if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then 1248 CFLAGS="$CFLAGS $cf_cv_ansi_cc" 1249else 1250 cat >> confdefs.h <<\EOF 1251#define CC_HAS_PROTOS 1 1252EOF 1253 1254fi 1255fi 1256 1257 1258if test "$cf_cv_ansi_cc" = "no"; then 1259 { echo "configure: error: Your compiler does not appear to recognize prototypes. 1260You have the following choices: 1261 a. adjust your compiler options 1262 b. get an up-to-date compiler 1263 c. use a wrapper such as unproto" 1>&2; exit 1; } 1264fi 1265 1266 1267 1268PROG_EXT= 1269case $cf_cv_system_name in 1270os2*) 1271 # We make sure -Zexe is not used -- it would interfere with @PROG_EXT@ 1272 CFLAGS="$CFLAGS -Zmt -D__ST_MT_ERRNO__" 1273 CXXFLAGS="$CXXFLAGS -Zmt -D__ST_MT_ERRNO__" 1274 LDFLAGS=`echo "$LDFLAGS -Zmt -Zcrtdll" | sed "s/-Zexe//g"` 1275 PROG_EXT=".exe" 1276 ;; 1277cygwin*) 1278 PROG_EXT=".exe" 1279 ;; 1280esac 1281 1282 1283 1284case "$cf_cv_system_name" in 1285freebsd*) #(vi 1286 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R" 1287 ;; 1288*) LDPATH=$PATH:/sbin:/usr/sbin 1289 # Extract the first word of "ldconfig", so it can be a program name with args. 1290set dummy ldconfig; ac_word=$2 1291echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1292echo "configure:1293: checking for $ac_word" >&5 1293if eval "test \"`echo '$''{'ac_cv_path_LDCONFIG'+set}'`\" = set"; then 1294 echo $ac_n "(cached) $ac_c" 1>&6 1295else 1296 case "$LDCONFIG" in 1297 /*) 1298 ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path. 1299 ;; 1300 ?:/*) 1301 ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a dos path. 1302 ;; 1303 *) 1304 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 1305 ac_dummy="$LDPATH" 1306 for ac_dir in $ac_dummy; do 1307 test -z "$ac_dir" && ac_dir=. 1308 if test -f $ac_dir/$ac_word; then 1309 ac_cv_path_LDCONFIG="$ac_dir/$ac_word" 1310 break 1311 fi 1312 done 1313 IFS="$ac_save_ifs" 1314 ;; 1315esac 1316fi 1317LDCONFIG="$ac_cv_path_LDCONFIG" 1318if test -n "$LDCONFIG"; then 1319 echo "$ac_t""$LDCONFIG" 1>&6 1320else 1321 echo "$ac_t""no" 1>&6 1322fi 1323 1324 ;; 1325esac 1326 1327 1328echo $ac_n "checking if you want to ensure bool is consistent with C++""... $ac_c" 1>&6 1329echo "configure:1330: checking if you want to ensure bool is consistent with C++" >&5 1330 1331# Check whether --with-cxx or --without-cxx was given. 1332if test "${with_cxx+set}" = set; then 1333 withval="$with_cxx" 1334 cf_with_cxx=$withval 1335else 1336 cf_with_cxx=yes 1337fi 1338 1339echo "$ac_t""$cf_with_cxx" 1>&6 1340if test "X$cf_with_cxx" = Xno ; then 1341 CXX="" 1342 GXX="" 1343else 1344 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl 1345do 1346# Extract the first word of "$ac_prog", so it can be a program name with args. 1347set dummy $ac_prog; ac_word=$2 1348echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1349echo "configure:1350: checking for $ac_word" >&5 1350if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then 1351 echo $ac_n "(cached) $ac_c" 1>&6 1352else 1353 if test -n "$CXX"; then 1354 ac_cv_prog_CXX="$CXX" # Let the user override the test. 1355else 1356 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 1357 ac_dummy="$PATH" 1358 for ac_dir in $ac_dummy; do 1359 test -z "$ac_dir" && ac_dir=. 1360 if test -f $ac_dir/$ac_word; then 1361 ac_cv_prog_CXX="$ac_prog" 1362 break 1363 fi 1364 done 1365 IFS="$ac_save_ifs" 1366fi 1367fi 1368CXX="$ac_cv_prog_CXX" 1369if test -n "$CXX"; then 1370 echo "$ac_t""$CXX" 1>&6 1371else 1372 echo "$ac_t""no" 1>&6 1373fi 1374 1375test -n "$CXX" && break 1376done 1377test -n "$CXX" || CXX="gcc" 1378 1379 1380echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 1381echo "configure:1382: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5 1382 1383ac_ext=C 1384# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 1385ac_cpp='$CXXCPP $CPPFLAGS' 1386ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 1387ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 1388cross_compiling=$ac_cv_prog_cxx_cross 1389 1390cat > conftest.$ac_ext << EOF 1391 1392#line 1393 "configure" 1393#include "confdefs.h" 1394 1395int main(){return(0);} 1396EOF 1397if { (eval echo configure:1398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 1398 ac_cv_prog_cxx_works=yes 1399 # If we can't run a trivial program, we are probably using a cross compiler. 1400 if (./conftest; exit) 2>/dev/null; then 1401 ac_cv_prog_cxx_cross=no 1402 else 1403 ac_cv_prog_cxx_cross=yes 1404 fi 1405else 1406 echo "configure: failed program was:" >&5 1407 cat conftest.$ac_ext >&5 1408 ac_cv_prog_cxx_works=no 1409fi 1410rm -fr conftest* 1411ac_ext=c 1412# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 1413ac_cpp='$CPP $CPPFLAGS' 1414ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 1415ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 1416cross_compiling=$ac_cv_prog_cc_cross 1417 1418echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 1419if test $ac_cv_prog_cxx_works = no; then 1420 echo "$ac_t""You don't have any C++ compiler, too bad" 1>&6; cf_with_cxx=no; CXX=""; GXX=""; 1421fi 1422echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 1423echo "configure:1424: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5 1424echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6 1425cross_compiling=$ac_cv_prog_cxx_cross 1426 1427echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6 1428echo "configure:1429: checking whether we are using GNU C++" >&5 1429if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then 1430 echo $ac_n "(cached) $ac_c" 1>&6 1431else 1432 cat > conftest.C <<EOF 1433#ifdef __GNUC__ 1434 yes; 1435#endif 1436EOF 1437if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then 1438 ac_cv_prog_gxx=yes 1439else 1440 ac_cv_prog_gxx=no 1441fi 1442fi 1443 1444echo "$ac_t""$ac_cv_prog_gxx" 1>&6 1445 1446if test $ac_cv_prog_gxx = yes; then 1447 GXX=yes 1448else 1449 GXX= 1450fi 1451 1452ac_test_CXXFLAGS="${CXXFLAGS+set}" 1453ac_save_CXXFLAGS="$CXXFLAGS" 1454CXXFLAGS= 1455echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 1456echo "configure:1457: checking whether ${CXX-g++} accepts -g" >&5 1457if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then 1458 echo $ac_n "(cached) $ac_c" 1>&6 1459else 1460 echo 'void f(){}' > conftest.cc 1461if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then 1462 ac_cv_prog_cxx_g=yes 1463else 1464 ac_cv_prog_cxx_g=no 1465fi 1466rm -f conftest* 1467 1468fi 1469 1470echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 1471if test "$ac_test_CXXFLAGS" = set; then 1472 CXXFLAGS="$ac_save_CXXFLAGS" 1473elif test $ac_cv_prog_cxx_g = yes; then 1474 if test "$GXX" = yes; then 1475 CXXFLAGS="-g -O2" 1476 else 1477 CXXFLAGS="-g" 1478 fi 1479else 1480 if test "$GXX" = yes; then 1481 CXXFLAGS="-O2" 1482 else 1483 CXXFLAGS= 1484 fi 1485fi 1486 1487 fi 1488if 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 1489 1490echo $ac_n "checking if you want to build C++ binding and demo""... $ac_c" 1>&6 1491echo "configure:1492: checking if you want to build C++ binding and demo" >&5 1492 1493# Check whether --with-cxx-binding or --without-cxx-binding was given. 1494if test "${with_cxx_binding+set}" = set; then 1495 withval="$with_cxx_binding" 1496 cf_with_cxx_binding=$withval 1497else 1498 cf_with_cxx_binding=$cf_with_cxx 1499fi 1500 1501echo "$ac_t""$cf_with_cxx_binding" 1>&6 1502 1503echo $ac_n "checking if you want to build with Ada95""... $ac_c" 1>&6 1504echo "configure:1505: checking if you want to build with Ada95" >&5 1505 1506# Check whether --with-ada or --without-ada was given. 1507if test "${with_ada+set}" = set; then 1508 withval="$with_ada" 1509 cf_with_ada=$withval 1510else 1511 cf_with_ada=yes 1512fi 1513 1514echo "$ac_t""$cf_with_ada" 1>&6 1515 1516echo $ac_n "checking if you want to build programs such as tic""... $ac_c" 1>&6 1517echo "configure:1518: checking if you want to build programs such as tic" >&5 1518 1519# Check whether --with-progs or --without-progs was given. 1520if test "${with_progs+set}" = set; then 1521 withval="$with_progs" 1522 cf_with_progs=$withval 1523else 1524 cf_with_progs=yes 1525fi 1526 1527echo "$ac_t""$cf_with_progs" 1>&6 1528 1529modules_to_build="ncurses" 1530if test "X$cf_with_progs" != Xno ; then 1531modules_to_build="$modules_to_build progs tack" 1532fi 1533modules_to_build="$modules_to_build panel menu form" 1534 1535for ac_prog in mawk gawk nawk awk 1536do 1537# Extract the first word of "$ac_prog", so it can be a program name with args. 1538set dummy $ac_prog; ac_word=$2 1539echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1540echo "configure:1541: checking for $ac_word" >&5 1541if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then 1542 echo $ac_n "(cached) $ac_c" 1>&6 1543else 1544 if test -n "$AWK"; then 1545 ac_cv_prog_AWK="$AWK" # Let the user override the test. 1546else 1547 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 1548 ac_dummy="$PATH" 1549 for ac_dir in $ac_dummy; do 1550 test -z "$ac_dir" && ac_dir=. 1551 if test -f $ac_dir/$ac_word; then 1552 ac_cv_prog_AWK="$ac_prog" 1553 break 1554 fi 1555 done 1556 IFS="$ac_save_ifs" 1557fi 1558fi 1559AWK="$ac_cv_prog_AWK" 1560if test -n "$AWK"; then 1561 echo "$ac_t""$AWK" 1>&6 1562else 1563 echo "$ac_t""no" 1>&6 1564fi 1565 1566test -n "$AWK" && break 1567done 1568 1569echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 1570echo "configure:1571: checking whether ${MAKE-make} sets \${MAKE}" >&5 1571set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` 1572if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then 1573 echo $ac_n "(cached) $ac_c" 1>&6 1574else 1575 cat > conftestmake <<\EOF 1576all: 1577 @echo 'ac_maketemp="${MAKE}"' 1578EOF 1579# GNU make sometimes prints "make[1]: Entering...", which would confuse us. 1580eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=` 1581if test -n "$ac_maketemp"; then 1582 eval ac_cv_prog_make_${ac_make}_set=yes 1583else 1584 eval ac_cv_prog_make_${ac_make}_set=no 1585fi 1586rm -f conftestmake 1587fi 1588if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then 1589 echo "$ac_t""yes" 1>&6 1590 SET_MAKE= 1591else 1592 echo "$ac_t""no" 1>&6 1593 SET_MAKE="MAKE=${MAKE-make}" 1594fi 1595 1596# Find a good install program. We prefer a C program (faster), 1597# so one script is as good as another. But avoid the broken or 1598# incompatible versions: 1599# SysV /etc/install, /usr/sbin/install 1600# SunOS /usr/etc/install 1601# IRIX /sbin/install 1602# AIX /bin/install 1603# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag 1604# AFS /usr/afsws/bin/install, which mishandles nonexistent args 1605# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" 1606# ./install, which can be erroneously created by make from ./install.sh. 1607echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 1608echo "configure:1609: checking for a BSD compatible install" >&5 1609if test -z "$INSTALL"; then 1610if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then 1611 echo $ac_n "(cached) $ac_c" 1>&6 1612else 1613 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" 1614 for ac_dir in $PATH; do 1615 # Account for people who put trailing slashes in PATH elements. 1616 case "$ac_dir/" in 1617 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; 1618 *) 1619 # OSF1 and SCO ODT 3.0 have their own names for install. 1620 # Don't use installbsd from OSF since it installs stuff as root 1621 # by default. 1622 for ac_prog in ginstall scoinst install; do 1623 if test -f $ac_dir/$ac_prog; then 1624 if test $ac_prog = install && 1625 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then 1626 # AIX install. It has an incompatible calling convention. 1627 : 1628 else 1629 ac_cv_path_install="$ac_dir/$ac_prog -c" 1630 break 2 1631 fi 1632 fi 1633 done 1634 ;; 1635 esac 1636 done 1637 IFS="$ac_save_IFS" 1638 1639fi 1640 if test "${ac_cv_path_install+set}" = set; then 1641 INSTALL="$ac_cv_path_install" 1642 else 1643 # As a last resort, use the slow shell script. We don't cache a 1644 # path for INSTALL within a source directory, because that will 1645 # break other packages using the cache if that directory is 1646 # removed, or if the path is relative. 1647 INSTALL="$ac_install_sh" 1648 fi 1649fi 1650echo "$ac_t""$INSTALL" 1>&6 1651 1652# Use test -z because SunOS4 sh mishandles braces in ${var-val}. 1653# It thinks the first close brace ends the variable substitution. 1654test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' 1655 1656test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' 1657 1658test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' 1659 1660case $INSTALL in 1661/*) 1662 ;; 1663*) 1664 cf_dir=`echo $INSTALL|sed -e 's%/[^/]*$%%'` 1665 test -z "$cf_dir" && cf_dir=. 1666 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's:^.*/::'` 1667 ;; 1668esac 1669 1670echo $ac_n "checking for long file names""... $ac_c" 1>&6 1671echo "configure:1672: checking for long file names" >&5 1672if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then 1673 echo $ac_n "(cached) $ac_c" 1>&6 1674else 1675 ac_cv_sys_long_file_names=yes 1676# Test for long file names in all the places we know might matter: 1677# . the current directory, where building will happen 1678# $prefix/lib where we will be installing things 1679# $exec_prefix/lib likewise 1680# eval it to expand exec_prefix. 1681# $TMPDIR if set, where it might want to write temporary files 1682# if $TMPDIR is not set: 1683# /tmp where it might want to write temporary files 1684# /var/tmp likewise 1685# /usr/tmp likewise 1686if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then 1687 ac_tmpdirs="$TMPDIR" 1688else 1689 ac_tmpdirs='/tmp /var/tmp /usr/tmp' 1690fi 1691for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do 1692 test -d $ac_dir || continue 1693 test -w $ac_dir || continue # It is less confusing to not echo anything here. 1694 (echo 1 > $ac_dir/conftest9012345) 2>/dev/null 1695 (echo 2 > $ac_dir/conftest9012346) 2>/dev/null 1696 val=`cat $ac_dir/conftest9012345 2>/dev/null` 1697 if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then 1698 ac_cv_sys_long_file_names=no 1699 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null 1700 break 1701 fi 1702 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null 1703done 1704fi 1705 1706echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6 1707if test $ac_cv_sys_long_file_names = yes; then 1708 cat >> confdefs.h <<\EOF 1709#define HAVE_LONG_FILE_NAMES 1 1710EOF 1711 1712fi 1713 1714echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 1715echo "configure:1716: checking whether ln -s works" >&5 1716if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then 1717 echo $ac_n "(cached) $ac_c" 1>&6 1718else 1719 rm -f conftestdata 1720if ln -s X conftestdata 2>/dev/null 1721then 1722 rm -f conftestdata 1723 ac_cv_prog_LN_S="ln -s" 1724else 1725 ac_cv_prog_LN_S=ln 1726fi 1727fi 1728LN_S="$ac_cv_prog_LN_S" 1729if test "$ac_cv_prog_LN_S" = "ln -s"; then 1730 echo "$ac_t""yes" 1>&6 1731else 1732 echo "$ac_t""no" 1>&6 1733fi 1734 1735# Extract the first word of "ranlib", so it can be a program name with args. 1736set dummy ranlib; ac_word=$2 1737echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1738echo "configure:1739: checking for $ac_word" >&5 1739if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then 1740 echo $ac_n "(cached) $ac_c" 1>&6 1741else 1742 if test -n "$RANLIB"; then 1743 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. 1744else 1745 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 1746 ac_dummy="$PATH" 1747 for ac_dir in $ac_dummy; do 1748 test -z "$ac_dir" && ac_dir=. 1749 if test -f $ac_dir/$ac_word; then 1750 ac_cv_prog_RANLIB="ranlib" 1751 break 1752 fi 1753 done 1754 IFS="$ac_save_ifs" 1755 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" 1756fi 1757fi 1758RANLIB="$ac_cv_prog_RANLIB" 1759if test -n "$RANLIB"; then 1760 echo "$ac_t""$RANLIB" 1>&6 1761else 1762 echo "$ac_t""no" 1>&6 1763fi 1764 1765for ac_prog in tdlint lint alint 1766do 1767# Extract the first word of "$ac_prog", so it can be a program name with args. 1768set dummy $ac_prog; ac_word=$2 1769echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1770echo "configure:1771: checking for $ac_word" >&5 1771if eval "test \"`echo '$''{'ac_cv_prog_LINT'+set}'`\" = set"; then 1772 echo $ac_n "(cached) $ac_c" 1>&6 1773else 1774 if test -n "$LINT"; then 1775 ac_cv_prog_LINT="$LINT" # Let the user override the test. 1776else 1777 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 1778 ac_dummy="$PATH" 1779 for ac_dir in $ac_dummy; do 1780 test -z "$ac_dir" && ac_dir=. 1781 if test -f $ac_dir/$ac_word; then 1782 ac_cv_prog_LINT="$ac_prog" 1783 break 1784 fi 1785 done 1786 IFS="$ac_save_ifs" 1787fi 1788fi 1789LINT="$ac_cv_prog_LINT" 1790if test -n "$LINT"; then 1791 echo "$ac_t""$LINT" 1>&6 1792else 1793 echo "$ac_t""no" 1>&6 1794fi 1795 1796test -n "$LINT" && break 1797done 1798 1799for ac_prog in man man_db 1800do 1801# Extract the first word of "$ac_prog", so it can be a program name with args. 1802set dummy $ac_prog; ac_word=$2 1803echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 1804echo "configure:1805: checking for $ac_word" >&5 1805if eval "test \"`echo '$''{'ac_cv_prog_MAN'+set}'`\" = set"; then 1806 echo $ac_n "(cached) $ac_c" 1>&6 1807else 1808 if test -n "$MAN"; then 1809 ac_cv_prog_MAN="$MAN" # Let the user override the test. 1810else 1811 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 1812 ac_dummy="$PATH" 1813 for ac_dir in $ac_dummy; do 1814 test -z "$ac_dir" && ac_dir=. 1815 if test -f $ac_dir/$ac_word; then 1816 ac_cv_prog_MAN="$ac_prog" 1817 break 1818 fi 1819 done 1820 IFS="$ac_save_ifs" 1821fi 1822fi 1823MAN="$ac_cv_prog_MAN" 1824if test -n "$MAN"; then 1825 echo "$ac_t""$MAN" 1>&6 1826else 1827 echo "$ac_t""no" 1>&6 1828fi 1829 1830test -n "$MAN" && break 1831done 1832 1833 1834 1835if eval "test \"`echo '$''{'cf_cv_subst_LD'+set}'`\" = set"; then 1836 echo $ac_n "(cached) $ac_c" 1>&6 1837else 1838 1839echo $ac_n "checking for loader (symbol LD)""... $ac_c" 1>&6 1840echo "configure:1841: checking for loader (symbol LD)" >&5 1841test -z "$LD" && LD=ld 1842echo "$ac_t""$LD" 1>&6 1843 1844cf_cv_subst_LD=$LD 1845fi 1846 1847LD=${cf_cv_subst_LD} 1848 1849if eval "test \"`echo '$''{'cf_cv_subst_AR'+set}'`\" = set"; then 1850 echo $ac_n "(cached) $ac_c" 1>&6 1851else 1852 1853echo $ac_n "checking for archiver (symbol AR)""... $ac_c" 1>&6 1854echo "configure:1855: checking for archiver (symbol AR)" >&5 1855test -z "$AR" && AR=ar 1856echo "$ac_t""$AR" 1>&6 1857 1858cf_cv_subst_AR=$AR 1859fi 1860 1861AR=${cf_cv_subst_AR} 1862 1863if eval "test \"`echo '$''{'cf_cv_subst_AR_OPTS'+set}'`\" = set"; then 1864 echo $ac_n "(cached) $ac_c" 1>&6 1865else 1866 1867echo $ac_n "checking for archiver options (symbol AR_OPTS)""... $ac_c" 1>&6 1868echo "configure:1869: checking for archiver options (symbol AR_OPTS)" >&5 1869test -z "$AR_OPTS" && AR_OPTS=rv 1870echo "$ac_t""$AR_OPTS" 1>&6 1871 1872cf_cv_subst_AR_OPTS=$AR_OPTS 1873fi 1874 1875AR_OPTS=${cf_cv_subst_AR_OPTS} 1876 1877 1878 1879echo $ac_n "checking for makeflags variable""... $ac_c" 1>&6 1880echo "configure:1881: checking for makeflags variable" >&5 1881if eval "test \"`echo '$''{'cf_cv_makeflags'+set}'`\" = set"; then 1882 echo $ac_n "(cached) $ac_c" 1>&6 1883else 1884 1885 cf_cv_makeflags='' 1886 for cf_option in '-$(MAKEFLAGS)' '$(MFLAGS)' 1887 do 1888 cat >cf_makeflags.tmp <<CF_EOF 1889all : 1890 @ echo '.$cf_option' 1891CF_EOF 1892 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null` 1893 case "$cf_result" in 1894 .*k) 1895 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null` 1896 case "$cf_result" in 1897 .*CC=*) cf_cv_makeflags= 1898 ;; 1899 *) cf_cv_makeflags=$cf_option 1900 ;; 1901 esac 1902 break 1903 ;; 1904 *) echo no match "$cf_result" 1905 ;; 1906 esac 1907 done 1908 rm -f cf_makeflags.tmp 1909fi 1910 1911echo "$ac_t""$cf_cv_makeflags" 1>&6 1912 1913 1914 1915echo $ac_n "checking if you have specified an install-prefix""... $ac_c" 1>&6 1916echo "configure:1917: checking if you have specified an install-prefix" >&5 1917 1918# Check whether --with-install-prefix or --without-install-prefix was given. 1919if test "${with_install_prefix+set}" = set; then 1920 withval="$with_install_prefix" 1921 case "$withval" in #(vi 1922 yes|no) #(vi 1923 ;; 1924 *) INSTALL_PREFIX="$withval" 1925 ;; 1926 esac 1927fi 1928 1929echo "$ac_t""$INSTALL_PREFIX" 1>&6 1930 1931 1932############################################################################### 1933 1934 1935 echo $ac_n "checking format of man-pages""... $ac_c" 1>&6 1936echo "configure:1937: checking format of man-pages" >&5 1937 1938 1939# Check whether --with-manpage-format or --without-manpage-format was given. 1940if test "${with_manpage_format+set}" = set; then 1941 withval="$with_manpage_format" 1942 cf_manpage_form=$withval 1943else 1944 cf_manpage_form=unknown 1945fi 1946 1947 1948case ".$cf_manpage_form" in 1949.gzip|.compress|.BSDI|.normal|.formatted) # (vi 1950 ;; 1951.unknown|.) # (vi 1952 if test -z "$MANPATH" ; then 1953 MANPATH="/usr/man:/usr/share/man" 1954 fi 1955 # look for the 'date' man-page (it's most likely to be installed!) 1956 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 1957 cf_manpage_form=unknown 1958 for cf_dir in $MANPATH; do 1959 test -z "$cf_dir" && cf_dir=/usr/man 1960 for cf_name in $cf_dir/*/date.[01]* $cf_dir/*/date 1961 do 1962 cf_test=`echo $cf_name | sed -e 's/*//'` 1963 if test "x$cf_test" = "x$cf_name" ; then 1964 case "$cf_name" in 1965 *.gz) cf_manpage_form=gzip;; 1966 *.Z) cf_manpage_form=compress;; 1967 *.0) cf_manpage_form=BSDI,formatted;; 1968 *) cf_manpage_form=normal;; 1969 esac 1970 break 1971 fi 1972 done 1973 if test "$cf_manpage_form" != "unknown" ; then 1974 break 1975 fi 1976 done 1977 IFS="$ac_save_ifs" 1978 ;; 1979.*) # (vi 1980 echo "configure: warning: Unexpected manpage-format" 1>&2 1981 ;; 1982esac 1983 1984echo "$ac_t""$cf_manpage_form" 1>&6 1985 1986 1987echo $ac_n "checking for manpage renaming""... $ac_c" 1>&6 1988echo "configure:1989: checking for manpage renaming" >&5 1989 1990 1991# Check whether --with-manpage-renames or --without-manpage-renames was given. 1992if test "${with_manpage_renames+set}" = set; then 1993 withval="$with_manpage_renames" 1994 cf_manpage_renames=$withval 1995else 1996 cf_manpage_renames=yes 1997fi 1998 1999 2000case ".$cf_manpage_renames" in #(vi 2001.no) #(vi 2002 ;; 2003.|.yes) 2004 # Debian 'man' program? 2005 if test -f /etc/debian_version ; then 2006 cf_manpage_renames=`cd $srcdir && pwd`/man/man_db.renames 2007 else 2008 cf_manpage_renames=no 2009 fi 2010 ;; 2011esac 2012 2013if test "$cf_manpage_renames" != no ; then 2014 if test ! -f $cf_manpage_renames ; then 2015 { echo "configure: error: not a filename: $cf_manpage_renames" 1>&2; exit 1; } 2016 fi 2017 2018 test ! -d man && mkdir man 2019 2020 # Construct a sed-script to perform renaming within man-pages 2021 if test -n "$cf_manpage_renames" ; then 2022 test ! -d man && mkdir man 2023 $srcdir/man/make_sed.sh $cf_manpage_renames >man/edit_man.sed 2024 fi 2025fi 2026 2027echo "$ac_t""$cf_manpage_renames" 1>&6 2028 2029 2030echo $ac_n "checking for manpage symlinks""... $ac_c" 1>&6 2031echo "configure:2032: checking for manpage symlinks" >&5 2032 2033 2034# Check whether --with-manpage-symlinks or --without-manpage-symlinks was given. 2035if test "${with_manpage_symlinks+set}" = set; then 2036 withval="$with_manpage_symlinks" 2037 cf_manpage_symlinks=$withval 2038else 2039 cf_manpage_symlinks=yes 2040fi 2041 2042 2043echo "$ac_t""$cf_manpage_symlinks" 1>&6 2044 2045 2046 if test "$prefix" = "NONE" ; then 2047 cf_prefix="$ac_default_prefix" 2048 else 2049 cf_prefix="$prefix" 2050 fi 2051 2052 case "$cf_manpage_form" in # (vi 2053 *formatted*) # (vi 2054 cf_subdir='$mandir/cat' 2055 cf_format=yes 2056 ;; 2057 *) 2058 cf_subdir='$mandir/man' 2059 cf_format=no 2060 ;; 2061 esac 2062 2063test ! -d man && mkdir man 2064cat >man/edit_man.sh <<CF_EOF 2065#! /bin/sh 2066# this script is generated by the configure-script 2067prefix="$cf_prefix" 2068datadir="$datadir" 2069MKDIRS="`cd $srcdir && pwd`/mkinstalldirs" 2070INSTALL="$INSTALL" 2071INSTALL_DATA="$INSTALL_DATA" 2072 2073TMP=\${TMPDIR-/tmp}/man\$\$ 2074trap "rm -f \$TMP" 0 1 2 5 15 2075 2076verb=\$1 2077shift 2078 2079mandir=\$1 2080shift 2081 2082srcdir=\$1 2083shift 2084 2085for i in \$* ; do 2086case \$i in #(vi 2087*.orig|*.rej) ;; #(vi 2088*.[0-9]*) 2089 section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`; 2090 if test \$verb = installing ; then 2091 if test ! -d $cf_subdir\${section} ; then 2092 \$MKDIRS $cf_subdir\$section 2093 fi 2094 fi 2095 aliases= 2096 source=\`basename \$i\` 2097CF_EOF 2098if test "$cf_manpage_symlinks" = yes ; then 2099cat >>man/edit_man.sh <<CF_EOF 2100 aliases=\`sed -f \$srcdir/manlinks.sed \$source | sort -u\` 2101CF_EOF 2102fi 2103if test "$cf_manpage_renames" = no ; then 2104cat >>man/edit_man.sh <<CF_EOF 2105 target=$cf_subdir\${section}/\$source 2106 sed -e "s,@DATADIR@,\$datadir," < \$i >\$TMP 2107CF_EOF 2108else 2109cat >>man/edit_man.sh <<CF_EOF 2110 target=\`grep "^\$source" $cf_manpage_renames | $AWK '{print \$2}'\` 2111 if test -z "\$target" ; then 2112 echo '? missing rename for '\$source 2113 target="\$source" 2114 fi 2115 target="$cf_subdir\$section/\$target" 2116 test \$verb = installing && sed -e "s,@DATADIR@,\$datadir," < \$i | sed -f edit_man.sed >\$TMP 2117CF_EOF 2118fi 2119if test $cf_format = yes ; then 2120cat >>man/edit_man.sh <<CF_EOF 2121 nroff -man \$TMP >\$TMP.out 2122 mv \$TMP.out \$TMP 2123CF_EOF 2124fi 2125case "$cf_manpage_form" in #(vi 2126*compress*) #(vi 2127cat >>man/edit_man.sh <<CF_EOF 2128 if test \$verb = installing ; then 2129 if ( compress -f \$TMP ) 2130 then 2131 mv \$TMP.Z \$TMP 2132 fi 2133 fi 2134 target="\$target.Z" 2135CF_EOF 2136 ;; 2137*gzip*) #(vi 2138cat >>man/edit_man.sh <<CF_EOF 2139 if test \$verb = installing ; then 2140 if ( gzip -f \$TMP ) 2141 then 2142 mv \$TMP.gz \$TMP 2143 fi 2144 fi 2145 target="\$target.gz" 2146CF_EOF 2147 ;; 2148*BSDI*) 2149cat >>man/edit_man.sh <<CF_EOF 2150 # BSDI installs only .0 suffixes in the cat directories 2151 target="\`echo \$target|sed -e 's/\.[1-9]\+.\?/.0/'\`" 2152CF_EOF 2153 ;; 2154esac 2155cat >>man/edit_man.sh <<CF_EOF 2156 echo \$verb \$target 2157 suffix=\`basename \$target | sed -e 's/^[^.]*//'\` 2158 if test \$verb = installing ; then 2159 \$INSTALL_DATA \$TMP \$target 2160 test -n "\$aliases" && ( 2161 cd $cf_subdir\${section} && ( 2162 target=\`basename \$target\` 2163 for cf_alias in \$aliases 2164 do 2165 if test -f \$cf_alias\${suffix} ; then 2166 if ( cmp -s \$target \$cf_alias\${suffix} ) 2167 then 2168 : 2169 else 2170 echo .. \$verb alias \$cf_alias\${suffix} 2171 rm -f \$cf_alias\${suffix} 2172 $LN_S \$target \$cf_alias\${suffix} 2173 fi 2174 else 2175 echo .. \$verb alias \$cf_alias\${suffix} 2176 rm -f \$cf_alias\${suffix} 2177 $LN_S \$target \$cf_alias\${suffix} 2178 fi 2179 done 2180 ) 2181 ) 2182 else 2183 rm -f \$target 2184 test -n "\$aliases" && ( 2185 cd $cf_subdir\${section} && ( 2186 for cf_alias in \$aliases 2187 do 2188 echo .. \$verb alias \$cf_alias\${suffix} 2189 rm -f \$cf_alias\${suffix} 2190 done 2191 ) 2192 ) 2193 fi 2194 ;; 2195esac 2196done 2197exit 0 2198CF_EOF 2199chmod 755 man/edit_man.sh 2200 2201 2202 2203############################################################################### 2204 2205 2206### Options to allow the user to specify the set of libraries which are used. 2207### Use "--without-normal --with-shared" to allow the default model to be 2208### shared, for example. 2209cf_list_models="" 2210 2211echo $ac_n "checking if you want to build shared libraries""... $ac_c" 1>&6 2212echo "configure:2213: checking if you want to build shared libraries" >&5 2213 2214# Check whether --with-shared or --without-shared was given. 2215if test "${with_shared+set}" = set; then 2216 withval="$with_shared" 2217 with_shared=$withval 2218else 2219 with_shared=no 2220fi 2221 2222echo "$ac_t""$with_shared" 1>&6 2223test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared" 2224 2225echo $ac_n "checking if you want to build static libraries""... $ac_c" 1>&6 2226echo "configure:2227: checking if you want to build static libraries" >&5 2227 2228# Check whether --with-normal or --without-normal was given. 2229if test "${with_normal+set}" = set; then 2230 withval="$with_normal" 2231 with_normal=$withval 2232else 2233 with_normal=yes 2234fi 2235 2236echo "$ac_t""$with_normal" 1>&6 2237test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal" 2238 2239echo $ac_n "checking if you want to build debug libraries""... $ac_c" 1>&6 2240echo "configure:2241: checking if you want to build debug libraries" >&5 2241 2242# Check whether --with-debug or --without-debug was given. 2243if test "${with_debug+set}" = set; then 2244 withval="$with_debug" 2245 with_debug=$withval 2246else 2247 with_debug=yes 2248fi 2249 2250echo "$ac_t""$with_debug" 1>&6 2251test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug" 2252 2253echo $ac_n "checking if you want to build profiling libraries""... $ac_c" 1>&6 2254echo "configure:2255: checking if you want to build profiling libraries" >&5 2255 2256# Check whether --with-profile or --without-profile was given. 2257if test "${with_profile+set}" = set; then 2258 withval="$with_profile" 2259 with_profile=$withval 2260else 2261 with_profile=no 2262fi 2263 2264echo "$ac_t""$with_profile" 1>&6 2265test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile" 2266 2267############################################################################### 2268 2269echo $ac_n "checking for specified models""... $ac_c" 1>&6 2270echo "configure:2271: checking for specified models" >&5 2271test -z "$cf_list_models" && cf_list_models=normal 2272echo "$ac_t""$cf_list_models" 1>&6 2273 2274### Use the first model as the default, and save its suffix for use in building 2275### up test-applications. 2276echo $ac_n "checking for default model""... $ac_c" 1>&6 2277echo "configure:2278: checking for default model" >&5 2278DFT_LWR_MODEL=`echo $cf_list_models | $AWK '{print $1}'` 2279echo "$ac_t""$DFT_LWR_MODEL" 1>&6 2280 2281 2282DFT_UPR_MODEL=`echo $DFT_LWR_MODEL | tr '[a-z]' '[A-Z]'` 2283 2284 2285TINFO_NAME=tinfo 2286 2287 2288LIB_NAME=ncurses 2289 2290 2291LIB_DIR=../lib 2292 2293 case $cf_cv_system_name in 2294 os2) LIB_PREFIX='' ;; 2295 *) LIB_PREFIX='lib' ;; 2296 esac 2297cf_prefix=$LIB_PREFIX 2298 2299 2300LIB_PREFIX=$cf_prefix 2301 2302 2303LIB_SUFFIX= 2304 2305 2306############################################################################### 2307 2308echo $ac_n "checking if you want to build a separate terminfo library""... $ac_c" 1>&6 2309echo "configure:2310: checking if you want to build a separate terminfo library" >&5 2310 2311# Check whether --with-termlib or --without-termlib was given. 2312if test "${with_termlib+set}" = set; then 2313 withval="$with_termlib" 2314 with_termlib=$withval 2315else 2316 with_termlib=no 2317fi 2318 2319echo "$ac_t""$with_termlib" 1>&6 2320 2321### Checks for special libraries, must be done up-front. 2322echo $ac_n "checking if you want to link with dbmalloc for testing""... $ac_c" 1>&6 2323echo "configure:2324: checking if you want to link with dbmalloc for testing" >&5 2324 2325# Check whether --with-dbmalloc or --without-dbmalloc was given. 2326if test "${with_dbmalloc+set}" = set; then 2327 withval="$with_dbmalloc" 2328 with_dbmalloc=$withval 2329else 2330 with_dbmalloc=no 2331fi 2332 2333echo "$ac_t""$with_dbmalloc" 1>&6 2334if test $with_dbmalloc = yes ; then 2335 echo $ac_n "checking for debug_malloc in -ldbmalloc""... $ac_c" 1>&6 2336echo "configure:2337: checking for debug_malloc in -ldbmalloc" >&5 2337ac_lib_var=`echo dbmalloc'_'debug_malloc | sed 'y%./+-%__p_%'` 2338if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 2339 echo $ac_n "(cached) $ac_c" 1>&6 2340else 2341 ac_save_LIBS="$LIBS" 2342LIBS="-ldbmalloc $LIBS" 2343cat > conftest.$ac_ext <<EOF 2344#line 2345 "configure" 2345#include "confdefs.h" 2346/* Override any gcc2 internal prototype to avoid an error. */ 2347/* We use char because int might match the return type of a gcc2 2348 builtin and then its argument prototype would still apply. */ 2349char debug_malloc(); 2350 2351int main() { 2352debug_malloc() 2353; return 0; } 2354EOF 2355if { (eval echo configure:2356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2356 rm -rf conftest* 2357 eval "ac_cv_lib_$ac_lib_var=yes" 2358else 2359 echo "configure: failed program was:" >&5 2360 cat conftest.$ac_ext >&5 2361 rm -rf conftest* 2362 eval "ac_cv_lib_$ac_lib_var=no" 2363fi 2364rm -f conftest* 2365LIBS="$ac_save_LIBS" 2366 2367fi 2368if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 2369 echo "$ac_t""yes" 1>&6 2370 ac_tr_lib=HAVE_LIB`echo dbmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \ 2371 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` 2372 cat >> confdefs.h <<EOF 2373#define $ac_tr_lib 1 2374EOF 2375 2376 LIBS="-ldbmalloc $LIBS" 2377 2378else 2379 echo "$ac_t""no" 1>&6 2380fi 2381 2382fi 2383 2384echo $ac_n "checking if you want to link with dmalloc for testing""... $ac_c" 1>&6 2385echo "configure:2386: checking if you want to link with dmalloc for testing" >&5 2386 2387# Check whether --with-dmalloc or --without-dmalloc was given. 2388if test "${with_dmalloc+set}" = set; then 2389 withval="$with_dmalloc" 2390 with_dmalloc=$withval 2391else 2392 with_dmalloc=no 2393fi 2394 2395echo "$ac_t""$with_dmalloc" 1>&6 2396if test $with_dmalloc = yes ; then 2397 echo $ac_n "checking for dmalloc_debug in -ldmalloc""... $ac_c" 1>&6 2398echo "configure:2399: checking for dmalloc_debug in -ldmalloc" >&5 2399ac_lib_var=`echo dmalloc'_'dmalloc_debug | sed 'y%./+-%__p_%'` 2400if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 2401 echo $ac_n "(cached) $ac_c" 1>&6 2402else 2403 ac_save_LIBS="$LIBS" 2404LIBS="-ldmalloc $LIBS" 2405cat > conftest.$ac_ext <<EOF 2406#line 2407 "configure" 2407#include "confdefs.h" 2408/* Override any gcc2 internal prototype to avoid an error. */ 2409/* We use char because int might match the return type of a gcc2 2410 builtin and then its argument prototype would still apply. */ 2411char dmalloc_debug(); 2412 2413int main() { 2414dmalloc_debug() 2415; return 0; } 2416EOF 2417if { (eval echo configure:2418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2418 rm -rf conftest* 2419 eval "ac_cv_lib_$ac_lib_var=yes" 2420else 2421 echo "configure: failed program was:" >&5 2422 cat conftest.$ac_ext >&5 2423 rm -rf conftest* 2424 eval "ac_cv_lib_$ac_lib_var=no" 2425fi 2426rm -f conftest* 2427LIBS="$ac_save_LIBS" 2428 2429fi 2430if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 2431 echo "$ac_t""yes" 1>&6 2432 ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \ 2433 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` 2434 cat >> confdefs.h <<EOF 2435#define $ac_tr_lib 1 2436EOF 2437 2438 LIBS="-ldmalloc $LIBS" 2439 2440else 2441 echo "$ac_t""no" 1>&6 2442fi 2443 2444fi 2445 2446SHLIB_LIST="" 2447echo $ac_n "checking if you want to link with the gpm mouse library""... $ac_c" 1>&6 2448echo "configure:2449: checking if you want to link with the gpm mouse library" >&5 2449 2450# Check whether --with-gpm or --without-gpm was given. 2451if test "${with_gpm+set}" = set; then 2452 withval="$with_gpm" 2453 with_gpm=$withval 2454else 2455 with_gpm=no 2456fi 2457 2458echo "$ac_t""$with_gpm" 1>&6 2459if test $with_gpm = yes ; then 2460 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6 2461echo "configure:2462: checking for Gpm_Open in -lgpm" >&5 2462ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'` 2463if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 2464 echo $ac_n "(cached) $ac_c" 1>&6 2465else 2466 ac_save_LIBS="$LIBS" 2467LIBS="-lgpm $LIBS" 2468cat > conftest.$ac_ext <<EOF 2469#line 2470 "configure" 2470#include "confdefs.h" 2471/* Override any gcc2 internal prototype to avoid an error. */ 2472/* We use char because int might match the return type of a gcc2 2473 builtin and then its argument prototype would still apply. */ 2474char Gpm_Open(); 2475 2476int main() { 2477Gpm_Open() 2478; return 0; } 2479EOF 2480if { (eval echo configure:2481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2481 rm -rf conftest* 2482 eval "ac_cv_lib_$ac_lib_var=yes" 2483else 2484 echo "configure: failed program was:" >&5 2485 cat conftest.$ac_ext >&5 2486 rm -rf conftest* 2487 eval "ac_cv_lib_$ac_lib_var=no" 2488fi 2489rm -f conftest* 2490LIBS="$ac_save_LIBS" 2491 2492fi 2493if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 2494 echo "$ac_t""yes" 1>&6 2495 2496 EXTRA_LIBS="-lgpm -lncurses $EXTRA_LIBS" 2497 SHLIB_LIST="-lgpm $SHLIB_LIST" 2498 cat >> confdefs.h <<\EOF 2499#define HAVE_LIBGPM 1 2500EOF 2501 2502 for ac_hdr in gpm.h 2503do 2504ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` 2505echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 2506echo "configure:2507: checking for $ac_hdr" >&5 2507if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 2508 echo $ac_n "(cached) $ac_c" 1>&6 2509else 2510 cat > conftest.$ac_ext <<EOF 2511#line 2512 "configure" 2512#include "confdefs.h" 2513#include <$ac_hdr> 2514EOF 2515ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 2516{ (eval echo configure:2517: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 2517ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 2518if test -z "$ac_err"; then 2519 rm -rf conftest* 2520 eval "ac_cv_header_$ac_safe=yes" 2521else 2522 echo "$ac_err" >&5 2523 echo "configure: failed program was:" >&5 2524 cat conftest.$ac_ext >&5 2525 rm -rf conftest* 2526 eval "ac_cv_header_$ac_safe=no" 2527fi 2528rm -f conftest* 2529fi 2530if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 2531 echo "$ac_t""yes" 1>&6 2532 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` 2533 cat >> confdefs.h <<EOF 2534#define $ac_tr_hdr 1 2535EOF 2536 2537else 2538 echo "$ac_t""no" 1>&6 2539fi 2540done 2541 2542 2543else 2544 echo "$ac_t""no" 1>&6 2545echo "configure: warning: Cannot link with gpm library - read the FAQ" 1>&2 2546fi 2547 2548fi 2549 2550 2551if test X"$CC_G_OPT" = X"" ; then 2552 CC_G_OPT='-g' 2553 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT='' 2554fi 2555 2556 2557if test X"$CXX_G_OPT" = X"" ; then 2558 CXX_G_OPT='-g' 2559 test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT='' 2560fi 2561 2562 2563echo $ac_n "checking for default loader flags""... $ac_c" 1>&6 2564echo "configure:2565: checking for default loader flags" >&5 2565case $DFT_LWR_MODEL in 2566normal) LD_MODEL='' ;; 2567debug) LD_MODEL=$CC_G_OPT ;; 2568profile) LD_MODEL='-pg';; 2569shared) LD_MODEL='' ;; 2570esac 2571echo "$ac_t""$LD_MODEL" 1>&6 2572 2573echo $ac_n "checking if rpath option should be used""... $ac_c" 1>&6 2574echo "configure:2575: checking if rpath option should be used" >&5 2575 2576# Check whether --enable-rpath or --disable-rpath was given. 2577if test "${enable_rpath+set}" = set; then 2578 enableval="$enable_rpath" 2579 cf_cv_ld_rpath=$enableval 2580else 2581 cf_cv_ld_rpath=no 2582fi 2583 2584echo "$ac_t""$cf_cv_ld_rpath" 1>&6 2585 2586 2587 2588 LOCAL_LDFLAGS= 2589 LOCAL_LDFLAGS2= 2590 LD_SHARED_OPTS= 2591 INSTALL_LIB="-m 644" 2592 2593 cf_cv_do_symlinks=no 2594 2595 echo $ac_n "checking if release/abi version should be used for shared libs""... $ac_c" 1>&6 2596echo "configure:2597: checking if release/abi version should be used for shared libs" >&5 2597 2598# Check whether --with-shlib-version or --without-shlib-version was given. 2599if test "${with_shlib_version+set}" = set; then 2600 withval="$with_shlib_version" 2601 test -z "$withval" && withval=auto 2602 case $withval in #(vi 2603 yes) #(vi 2604 cf_cv_shlib_version=auto 2605 ;; 2606 rel|abi|auto|no) #(vi 2607 cf_cv_shlib_version=$withval 2608 ;; 2609 *) 2610 { echo "configure: error: option value must be one of: rel, abi, auto or no" 1>&2; exit 1; } 2611 ;; 2612 esac 2613 2614else 2615 cf_cv_shlib_version=auto 2616fi 2617 2618 echo "$ac_t""$cf_cv_shlib_version" 1>&6 2619 2620 cf_cv_rm_so_locs=no 2621 2622 # Some less-capable ports of gcc support only -fpic 2623 CC_SHARED_OPTS= 2624 if test -n "$GCC" 2625 then 2626 echo $ac_n "checking which $CC option to use""... $ac_c" 1>&6 2627echo "configure:2628: checking which $CC option to use" >&5 2628 cf_save_CFLAGS="$CFLAGS" 2629 for CC_SHARED_OPTS in -fPIC -fpic '' 2630 do 2631 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS" 2632 cat > conftest.$ac_ext <<EOF 2633#line 2634 "configure" 2634#include "confdefs.h" 2635#include <stdio.h> 2636int main() { 2637int x = 1 2638; return 0; } 2639EOF 2640if { (eval echo configure:2641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 2641 rm -rf conftest* 2642 break 2643else 2644 echo "configure: failed program was:" >&5 2645 cat conftest.$ac_ext >&5 2646fi 2647rm -f conftest* 2648 done 2649 echo "$ac_t""$CC_SHARED_OPTS" 1>&6 2650 CFLAGS="$cf_save_CFLAGS" 2651 fi 2652 2653 case $cf_cv_system_name in 2654 beos*) 2655 MK_SHARED_LIB='$(CC) -o $@ -Xlinker -soname=`basename $@` -nostart -e 0' 2656 ;; 2657 hpux10.*) 2658 # (tested with gcc 2.7.2 -- I don't have c89) 2659 if test -n "$GCC"; then 2660 LD_SHARED_OPTS='-Xlinker +b -Xlinker $(libdir)' 2661 else 2662 CC_SHARED_OPTS='+Z' 2663 LD_SHARED_OPTS='-Wl,+b,$(libdir)' 2664 fi 2665 MK_SHARED_LIB='$(LD) +b $(libdir) -b +h `basename $@` -o $@' 2666 # HP-UX shared libraries must be executable, and should be 2667 # readonly to exploit a quirk in the memory manager. 2668 INSTALL_LIB="-m 555" 2669 cf_cv_do_symlinks=reverse 2670 ;; 2671 hpux*) 2672 # (tested with gcc 2.7.2 -- I don't have c89) 2673 if test -n "$GCC"; then 2674 LD_SHARED_OPTS='-Xlinker +b -Xlinker $(libdir)' 2675 else 2676 CC_SHARED_OPTS='+Z' 2677 LD_SHARED_OPTS='-Wl,+b,$(libdir)' 2678 fi 2679 MK_SHARED_LIB='$(LD) +b $(libdir) -b -o $@' 2680 # HP-UX shared libraries must be executable, and should be 2681 # readonly to exploit a quirk in the memory manager. 2682 INSTALL_LIB="-m 555" 2683 ;; 2684 irix*) 2685 # tested with IRIX 5.2 and 'cc'. 2686 if test -z "$GCC"; then 2687 CC_SHARED_OPTS='-KPIC' 2688 fi 2689 MK_SHARED_LIB='$(LD) -shared -rdata_shared -soname `basename $@` -o $@' 2690 cf_cv_rm_so_locs=yes 2691 ;; 2692 linux*|gnu*) 2693 # tested with Linux 2.0.29 and gcc 2.7.2 (ELF) 2694 test $cf_cv_ld_rpath = yes && cf_ld_rpath_opt="-Wl,-rpath," 2695 if test $DFT_LWR_MODEL = "shared" ; then 2696 LOCAL_LDFLAGS='-Wl,-rpath,../lib' 2697 LOCAL_LDFLAGS2='-Wl,-rpath,../../lib' 2698 fi 2699 test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel 2700 if test $cf_cv_shlib_version = no ; then 2701 MK_SHARED_LIB='$(CC) -shared -Wl,-stats,-lc -o $@' 2702 else 2703 MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@.$(ABI_VERSION)`,-stats,-lc -o $@' 2704 fi 2705 ;; 2706 openbsd2*) 2707 CC_SHARED_OPTS='$CC_SHARED_OPTS -DPIC' 2708 MK_SHARED_LIB='$(LD) -Bshareable -soname,`basename $@.$(ABI_VERSION)` -o $@' 2709 ;; 2710 openbsd*|freebsd*) 2711 CC_SHARED_OPTS='$CC_SHARED_OPTS -DPIC' 2712 MK_SHARED_LIB='$(LD) -Bshareable -o $@' 2713 test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel 2714 ;; 2715 netbsd*) 2716 CC_SHARED_OPTS='$CC_SHARED_OPTS -DPIC' 2717 test $cf_cv_ld_rpath = yes && cf_ld_rpath_opt="-Wl,-rpath," 2718 if test $DFT_LWR_MODEL = "shared" && test $cf_cv_ld_rpath = yes ; then 2719 LOCAL_LDFLAGS='-Wl,-rpath,../lib' 2720 LOCAL_LDFLAGS2='-Wl,-rpath,../../lib' 2721 EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS" 2722 MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@.$(ABI_VERSION)` -o $@' 2723 test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel 2724 else 2725 MK_SHARED_LIB='$(LD) -Bshareable -o $@' 2726 fi 2727 ;; 2728 osf*|mls+*) 2729 # tested with OSF/1 V3.2 and 'cc' 2730 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't 2731 # link with shared libs). 2732 MK_SHARED_LIB='$(LD) -set_version $(REL_VERSION):$(ABI_VERSION) -expect_unresolved "*" -shared -soname `basename $@`' 2733 test $cf_cv_ld_rpath = yes && cf_ld_rpath_opt="-rpath" 2734 case $host_os in 2735 osf4*) 2736 MK_SHARED_LIB="${MK_SHARED_LIB} -msym" 2737 ;; 2738 esac 2739 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@' 2740 if test $DFT_LWR_MODEL = "shared" ; then 2741 LOCAL_LDFLAGS='-Wl,-rpath,../lib' 2742 LOCAL_LDFLAGS2='-Wl,-rpath,../../lib' 2743 fi 2744 cf_cv_rm_so_locs=yes 2745 ;; 2746 sco3.2v5*) # (also uw2* and UW7) hops 13-Apr-98 2747 # tested with osr5.0.5 2748 if test $ac_cv_prog_gcc != yes; then 2749 CC_SHARED_OPTS='-belf -KPIC' 2750 fi 2751 MK_SHARED_LIB='$(LD) -dy -G -h `basename $@.$(ABI_VERSION)` -o $@' 2752 if test $cf_cv_ld_rpath = yes ; then 2753 # only way is to set LD_RUN_PATH but no switch for it 2754 RUN_PATH=$libdir 2755 fi 2756 test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel 2757 LINK_PROGS='LD_RUN_PATH=$(libdir)' 2758 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib' 2759 ;; 2760 sunos4*) 2761 # tested with SunOS 4.1.1 and gcc 2.7.0 2762 if test $ac_cv_prog_gcc != yes; then 2763 CC_SHARED_OPTS='-KPIC' 2764 fi 2765 MK_SHARED_LIB='$(LD) -assert pure-text -o $@' 2766 test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel 2767 ;; 2768 solaris2*) 2769 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2 2770 if test $ac_cv_prog_gcc != yes; then 2771 CC_SHARED_OPTS='-KPIC' 2772 fi 2773 MK_SHARED_LIB='$(LD) -dy -G -h `basename $@.$(ABI_VERSION)` -o $@' 2774 if test $cf_cv_ld_rpath = yes ; then 2775 cf_ld_rpath_opt="-R" 2776 EXTRA_LDFLAGS="-R ../lib:\$(libdir) $EXTRA_LDFLAGS" 2777 fi 2778 test $cf_cv_shlib_version = auto && cf_cv_shlib_version=rel 2779 ;; 2780 sysv5uw7*|unix_sv*) 2781 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc) 2782 if test $ac_cv_prog_gcc != yes; then 2783 CC_SHARED_OPTS='-KPIC' 2784 fi 2785 MK_SHARED_LIB='$(LD) -d y -G -o $@' 2786 ;; 2787 *) 2788 CC_SHARED_OPTS='unknown' 2789 MK_SHARED_LIB='echo unknown' 2790 ;; 2791 esac 2792 2793 # This works if the last tokens in $MK_SHARED_LIB are the -o target. 2794 case "$cf_cv_shlib_version" in #(vi 2795 rel|abi) 2796 case "$MK_SHARED_LIB" in #(vi 2797 *'-o $@') 2798 if test "$cf_cv_do_symlinks" = reverse ; then 2799 { echo "configure: error: cannot use --with-shlib-version with this platform" 1>&2; exit 1; } 2800 fi 2801 if test "$cf_cv_shlib_version" = rel ; then 2802 MK_SHARED_LIB="$MK_SHARED_LIB"'.$(REL_VERSION)' 2803 else 2804 MK_SHARED_LIB="$MK_SHARED_LIB"'.$(ABI_VERSION)' 2805 fi 2806 cf_cv_do_symlinks=yes 2807 ;; 2808 *) 2809 echo "configure: warning: ignored --with-shlib-version" 1>&2 2810 ;; 2811 esac 2812 ;; 2813 esac 2814 2815 if test -n "$cf_ld_rpath_opt" ; then 2816 echo $ac_n "checking if we need a space after rpath option""... $ac_c" 1>&6 2817echo "configure:2818: checking if we need a space after rpath option" >&5 2818 cf_save_LIBS="$LIBS" 2819 LIBS="$LIBS ${cf_ld_rpath_opt}/usr/lib" 2820 cat > conftest.$ac_ext <<EOF 2821#line 2822 "configure" 2822#include "confdefs.h" 2823 2824int main() { 2825 2826; return 0; } 2827EOF 2828if { (eval echo configure:2829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 2829 rm -rf conftest* 2830 cf_rpath_space=no 2831else 2832 echo "configure: failed program was:" >&5 2833 cat conftest.$ac_ext >&5 2834 rm -rf conftest* 2835 cf_rpath_space=yes 2836fi 2837rm -f conftest* 2838 LIBS="$cf_save_LIBS" 2839 echo "$ac_t""$cf_rpath_space" 1>&6 2840 test $cf_rpath_space = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt " 2841 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\$(libdir)" 2842 fi 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854if test "$CC_SHARED_OPTS" = "unknown"; then 2855 for model in $cf_list_models; do 2856 if test "$model" = "shared"; then 2857 { echo "configure: error: Shared libraries are not supported in this version" 1>&2; exit 1; } 2858 fi 2859 done 2860fi 2861 2862############################################################################### 2863 2864 2865### use option --disable-overwrite to leave out the link to -lcurses 2866echo $ac_n "checking if you wish to install ncurses overwriting curses""... $ac_c" 1>&6 2867echo "configure:2868: checking if you wish to install ncurses overwriting curses" >&5 2868 2869# Check whether --enable-overwrite or --disable-overwrite was given. 2870if test "${enable_overwrite+set}" = set; then 2871 enableval="$enable_overwrite" 2872 with_overwrite=$enableval 2873else 2874 with_overwrite=yes 2875fi 2876 2877echo "$ac_t""$with_overwrite" 1>&6 2878 2879echo $ac_n "checking if external terminfo-database is used""... $ac_c" 1>&6 2880echo "configure:2881: checking if external terminfo-database is used" >&5 2881 2882# Check whether --enable-database or --disable-database was given. 2883if test "${enable_database+set}" = set; then 2884 enableval="$enable_database" 2885 with_database=$enableval 2886else 2887 with_database=yes 2888fi 2889 2890echo "$ac_t""$with_database" 1>&6 2891test $with_database != no && cat >> confdefs.h <<\EOF 2892#define USE_DATABASE 1 2893EOF 2894 2895 2896echo $ac_n "checking for list of fallback descriptions""... $ac_c" 1>&6 2897echo "configure:2898: checking for list of fallback descriptions" >&5 2898 2899# Check whether --with-fallbacks or --without-fallbacks was given. 2900if test "${with_fallbacks+set}" = set; then 2901 withval="$with_fallbacks" 2902 with_fallback=$withval 2903else 2904 with_fallback= 2905fi 2906 2907echo "$ac_t""$with_fallback" 1>&6 2908FALLBACK_LIST=`echo $with_fallback|sed -e 's/,/ /g'` 2909 2910 2911echo $ac_n "checking for list of terminfo directories""... $ac_c" 1>&6 2912echo "configure:2913: checking for list of terminfo directories" >&5 2913 2914 2915# Check whether --with-terminfo-dirs or --without-terminfo-dirs was given. 2916if test "${with_terminfo_dirs+set}" = set; then 2917 withval="$with_terminfo_dirs" 2918 : 2919else 2920 withval="${TERMINFO_DIRS-${datadir}/terminfo}" 2921fi 2922 2923IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 2924cf_dst_path= 2925for cf_src_path in $withval 2926do 2927 2928case ".$cf_src_path" in #(vi 2929./*) #(vi 2930 ;; 2931.a-zA-Z:\\/*) #(vi OS/2 EMX 2932 ;; 2933.\${*prefix}*) #(vi 2934 eval cf_src_path="$cf_src_path" 2935 case ".$cf_src_path" in #(vi 2936 .NONE/*) 2937 cf_src_path=`echo $cf_src_path | sed -e s@NONE@$ac_default_prefix@` 2938 ;; 2939 esac 2940 ;; #(vi 2941.NONE/*) 2942 cf_src_path=`echo $cf_src_path | sed -e s@NONE@$ac_default_prefix@` 2943 ;; 2944*) 2945 { echo "configure: error: expected a pathname" 1>&2; exit 1; } 2946 ;; 2947esac 2948 2949 test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:" 2950 cf_dst_path="${cf_dst_path}${cf_src_path}" 2951done 2952IFS="$ac_save_ifs" 2953 2954eval TERMINFO_DIRS="$cf_dst_path" 2955 2956echo "$ac_t""$TERMINFO_DIRS" 1>&6 2957test -n "$TERMINFO_DIRS" && cat >> confdefs.h <<EOF 2958#define TERMINFO_DIRS "$TERMINFO_DIRS" 2959EOF 2960 2961 2962if test $with_database = no ; then 2963 if test -z $with_fallback ; then 2964 { echo "configure: error: You have disabled the database w/o specifying fallbacks" 1>&2; exit 1; } 2965 fi 2966fi 2967 2968### use option --disable-big-core to make tic run on small machines 2969### We need 4Mb, check if we can allocate 50% more than that. 2970echo $ac_n "checking if big-core option selected""... $ac_c" 1>&6 2971echo "configure:2972: checking if big-core option selected" >&5 2972 2973# Check whether --enable-big-core or --disable-big-core was given. 2974if test "${enable_big_core+set}" = set; then 2975 enableval="$enable_big_core" 2976 with_big_core=$enableval 2977else 2978 if test "$cross_compiling" = yes; then 2979 with_big_core=no 2980else 2981 cat > conftest.$ac_ext <<EOF 2982#line 2983 "configure" 2983#include "confdefs.h" 2984 2985#include <stdlib.h> 2986#include <string.h> 2987int main() { exit(malloc(6000000L) == 0); } 2988EOF 2989if { (eval echo configure:2990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 2990then 2991 with_big_core=yes 2992else 2993 echo "configure: failed program was:" >&5 2994 cat conftest.$ac_ext >&5 2995 rm -fr conftest* 2996 with_big_core=no 2997fi 2998rm -fr conftest* 2999fi 3000 3001fi 3002 3003echo "$ac_t""$with_big_core" 1>&6 3004test "$with_big_core" = "yes" && cat >> confdefs.h <<\EOF 3005#define HAVE_BIG_CORE 1 3006EOF 3007 3008 3009### use option --enable-termcap to compile in the termcap fallback support 3010echo $ac_n "checking if you want termcap-fallback support""... $ac_c" 1>&6 3011echo "configure:3012: checking if you want termcap-fallback support" >&5 3012 3013# Check whether --enable-termcap or --disable-termcap was given. 3014if test "${enable_termcap+set}" = set; then 3015 enableval="$enable_termcap" 3016 with_termcap=$enableval 3017else 3018 with_termcap=no 3019fi 3020 3021echo "$ac_t""$with_termcap" 1>&6 3022 3023if test "$with_termcap" != "yes" ; then 3024 cat >> confdefs.h <<\EOF 3025#define PURE_TERMINFO 1 3026EOF 3027 3028else 3029 3030### use option --enable-getcap to use a hacked getcap for reading termcaps 3031echo $ac_n "checking if fast termcap-loader is needed""... $ac_c" 1>&6 3032echo "configure:3033: checking if fast termcap-loader is needed" >&5 3033 3034# Check whether --enable-getcap or --disable-getcap was given. 3035if test "${enable_getcap+set}" = set; then 3036 enableval="$enable_getcap" 3037 with_getcap=$enableval 3038else 3039 with_getcap=no 3040fi 3041 3042echo "$ac_t""$with_getcap" 1>&6 3043test "$with_getcap" = "yes" && cat >> confdefs.h <<\EOF 3044#define USE_GETCAP 1 3045EOF 3046 3047 3048echo $ac_n "checking if translated termcaps will be cached in ~/.terminfo""... $ac_c" 1>&6 3049echo "configure:3050: checking if translated termcaps will be cached in ~/.terminfo" >&5 3050 3051# Check whether --enable-getcap-cache or --disable-getcap-cache was given. 3052if test "${enable_getcap_cache+set}" = set; then 3053 enableval="$enable_getcap_cache" 3054 with_getcap_cache=$enableval 3055else 3056 with_getcap_cache=no 3057fi 3058 3059echo "$ac_t""$with_getcap_cache" 1>&6 3060test "$with_getcap_cache" = "yes" && cat >> confdefs.h <<\EOF 3061#define USE_GETCAP_CACHE 1 3062EOF 3063 3064 3065fi 3066 3067### Use option --enable-symlinks to make tic use symlinks, not hard links 3068### to reduce storage requirements for the terminfo database. 3069 3070for ac_func in \ 3071 remove \ 3072 unlink 3073do 3074echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 3075echo "configure:3076: checking for $ac_func" >&5 3076if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 3077 echo $ac_n "(cached) $ac_c" 1>&6 3078else 3079 cat > conftest.$ac_ext <<EOF 3080#line 3081 "configure" 3081#include "confdefs.h" 3082/* System header to define __stub macros and hopefully few prototypes, 3083 which can conflict with char $ac_func(); below. */ 3084#include <assert.h> 3085/* Override any gcc2 internal prototype to avoid an error. */ 3086/* We use char because int might match the return type of a gcc2 3087 builtin and then its argument prototype would still apply. */ 3088char $ac_func(); 3089 3090int main() { 3091 3092/* The GNU C library defines this for functions which it implements 3093 to always fail with ENOSYS. Some functions are actually named 3094 something starting with __ and the normal name is an alias. */ 3095#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 3096choke me 3097#else 3098$ac_func(); 3099#endif 3100 3101; return 0; } 3102EOF 3103if { (eval echo configure:3104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3104 rm -rf conftest* 3105 eval "ac_cv_func_$ac_func=yes" 3106else 3107 echo "configure: failed program was:" >&5 3108 cat conftest.$ac_ext >&5 3109 rm -rf conftest* 3110 eval "ac_cv_func_$ac_func=no" 3111fi 3112rm -f conftest* 3113fi 3114 3115if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 3116 echo "$ac_t""yes" 1>&6 3117 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 3118 cat >> confdefs.h <<EOF 3119#define $ac_tr_func 1 3120EOF 3121 3122else 3123 echo "$ac_t""no" 1>&6 3124fi 3125done 3126 3127 3128if test "$ac_cv_prog_cc_cross" = yes ; then 3129 for ac_func in \ 3130 link \ 3131 symlink 3132do 3133echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 3134echo "configure:3135: checking for $ac_func" >&5 3135if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 3136 echo $ac_n "(cached) $ac_c" 1>&6 3137else 3138 cat > conftest.$ac_ext <<EOF 3139#line 3140 "configure" 3140#include "confdefs.h" 3141/* System header to define __stub macros and hopefully few prototypes, 3142 which can conflict with char $ac_func(); below. */ 3143#include <assert.h> 3144/* Override any gcc2 internal prototype to avoid an error. */ 3145/* We use char because int might match the return type of a gcc2 3146 builtin and then its argument prototype would still apply. */ 3147char $ac_func(); 3148 3149int main() { 3150 3151/* The GNU C library defines this for functions which it implements 3152 to always fail with ENOSYS. Some functions are actually named 3153 something starting with __ and the normal name is an alias. */ 3154#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 3155choke me 3156#else 3157$ac_func(); 3158#endif 3159 3160; return 0; } 3161EOF 3162if { (eval echo configure:3163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3163 rm -rf conftest* 3164 eval "ac_cv_func_$ac_func=yes" 3165else 3166 echo "configure: failed program was:" >&5 3167 cat conftest.$ac_ext >&5 3168 rm -rf conftest* 3169 eval "ac_cv_func_$ac_func=no" 3170fi 3171rm -f conftest* 3172fi 3173 3174if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 3175 echo "$ac_t""yes" 1>&6 3176 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 3177 cat >> confdefs.h <<EOF 3178#define $ac_tr_func 1 3179EOF 3180 3181else 3182 echo "$ac_t""no" 1>&6 3183fi 3184done 3185 3186else 3187 echo $ac_n "checking if link/symlink functions work""... $ac_c" 1>&6 3188echo "configure:3189: checking if link/symlink functions work" >&5 3189if eval "test \"`echo '$''{'cf_cv_link_funcs'+set}'`\" = set"; then 3190 echo $ac_n "(cached) $ac_c" 1>&6 3191else 3192 3193 cf_cv_link_funcs= 3194 for cf_func in link symlink ; do 3195 if test "$cross_compiling" = yes; then 3196 3197 eval 'ac_cv_func_'$cf_func'=error' 3198else 3199 cat > conftest.$ac_ext <<EOF 3200#line 3201 "configure" 3201#include "confdefs.h" 3202 3203#include <sys/types.h> 3204#include <sys/stat.h> 3205#ifdef HAVE_UNISTD_H 3206#include <unistd.h> 3207#endif 3208int main() 3209{ 3210 int fail = 0; 3211 char *src = "config.log"; 3212 char *dst = "conftest.chk"; 3213 struct stat src_sb; 3214 struct stat dst_sb; 3215 3216 stat(src, &src_sb); 3217 fail = ($cf_func("config.log", "conftest.chk") < 0) 3218 || (stat(dst, &dst_sb) < 0) 3219 || (dst_sb.st_mtime != src_sb.st_mtime); 3220#ifdef HAVE_UNLINK 3221 unlink(dst); 3222#else 3223 remove(dst); 3224#endif 3225 exit (fail); 3226} 3227 3228EOF 3229if { (eval echo configure:3230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 3230then 3231 3232 cf_cv_link_funcs="$cf_cv_link_funcs $cf_func" 3233 eval 'ac_cv_func_'$cf_func'=yes' 3234 3235cf_FUNC=`echo $cf_func | tr '[a-z]' '[A-Z]'` 3236 3237 cat >> confdefs.h <<EOF 3238#define HAVE_$cf_FUNC 1 3239EOF 3240 3241else 3242 echo "configure: failed program was:" >&5 3243 cat conftest.$ac_ext >&5 3244 rm -fr conftest* 3245 3246 eval 'ac_cv_func_'$cf_func'=no' 3247fi 3248rm -fr conftest* 3249fi 3250 3251 done 3252 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no 3253 3254fi 3255 3256echo "$ac_t""$cf_cv_link_funcs" 1>&6 3257fi 3258 3259 3260with_links=no 3261with_symlinks=no 3262 3263if test "$ac_cv_func_link" != yes ; then 3264 echo $ac_n "checking if tic should use symbolic links""... $ac_c" 1>&6 3265echo "configure:3266: checking if tic should use symbolic links" >&5 3266 if test "$ac_cv_func_symlink" = yes ; then 3267 with_symlinks=yes 3268 else 3269 with_symlinks=no 3270 fi 3271 echo "$ac_t""$with_symlinks" 1>&6 3272elif test "$ac_cv_func_symlink" != yes ; then 3273 echo $ac_n "checking if tic should use hard links""... $ac_c" 1>&6 3274echo "configure:3275: checking if tic should use hard links" >&5 3275 if test "$ac_cv_func_link" = yes ; then 3276 with_links=yes 3277 else 3278 with_links=no 3279 fi 3280 echo "$ac_t""$with_links" 1>&6 3281else 3282 echo $ac_n "checking if tic should use symbolic links""... $ac_c" 1>&6 3283echo "configure:3284: checking if tic should use symbolic links" >&5 3284 3285# Check whether --enable-symlinks or --disable-symlinks was given. 3286if test "${enable_symlinks+set}" = set; then 3287 enableval="$enable_symlinks" 3288 with_symlinks=$enableval 3289else 3290 with_symlinks=no 3291fi 3292 3293 echo "$ac_t""$with_symlinks" 1>&6 3294fi 3295 3296test "$with_links" = yes && cat >> confdefs.h <<\EOF 3297#define USE_LINKS 1 3298EOF 3299 3300test "$with_symlinks" = yes && cat >> confdefs.h <<\EOF 3301#define USE_SYMLINKS 1 3302EOF 3303 3304 3305### use option --enable-broken-linker to force on use of broken-linker support 3306echo $ac_n "checking if you want broken-linker support code""... $ac_c" 1>&6 3307echo "configure:3308: checking if you want broken-linker support code" >&5 3308 3309# Check whether --enable-broken_linker or --disable-broken_linker was given. 3310if test "${enable_broken_linker+set}" = set; then 3311 enableval="$enable_broken_linker" 3312 with_broken_linker=$enableval 3313else 3314 with_broken_linker=$BROKEN_LINKER 3315fi 3316 3317echo "$ac_t""$with_broken_linker" 1>&6 3318test "$with_broken_linker" = yes && cat >> confdefs.h <<\EOF 3319#define BROKEN_LINKER 1 3320EOF 3321 3322 3323### use option --enable-bsdpad to have tputs process BSD-style prefix padding 3324echo $ac_n "checking if tputs should process BSD-style prefix padding""... $ac_c" 1>&6 3325echo "configure:3326: checking if tputs should process BSD-style prefix padding" >&5 3326 3327# Check whether --enable-bsdpad or --disable-bsdpad was given. 3328if test "${enable_bsdpad+set}" = set; then 3329 enableval="$enable_bsdpad" 3330 with_bsdpad=$enableval 3331else 3332 with_bsdpad=no 3333fi 3334 3335echo "$ac_t""$with_bsdpad" 1>&6 3336test "$with_bsdpad" = yes && cat >> confdefs.h <<\EOF 3337#define BSD_TPUTS 1 3338EOF 3339 3340 3341### Enable compiling-in rcs id's 3342echo $ac_n "checking if RCS identifiers should be compiled-in""... $ac_c" 1>&6 3343echo "configure:3344: checking if RCS identifiers should be compiled-in" >&5 3344 3345# Check whether --with-rcs-ids or --without-rcs-ids was given. 3346if test "${with_rcs_ids+set}" = set; then 3347 withval="$with_rcs_ids" 3348 with_rcs_ids=$withval 3349else 3350 with_rcs_ids=no 3351fi 3352 3353echo "$ac_t""$with_rcs_ids" 1>&6 3354test "$with_rcs_ids" = yes && cat >> confdefs.h <<\EOF 3355#define USE_RCS_IDS 1 3356EOF 3357 3358 3359############################################################################### 3360 3361 3362### Note that some functions (such as const) are normally disabled anyway. 3363echo $ac_n "checking if you want to build with function extensions""... $ac_c" 1>&6 3364echo "configure:3365: checking if you want to build with function extensions" >&5 3365 3366# Check whether --enable-ext-funcs or --disable-ext-funcs was given. 3367if test "${enable_ext_funcs+set}" = set; then 3368 enableval="$enable_ext_funcs" 3369 with_ext_funcs=$enableval 3370else 3371 with_ext_funcs=yes 3372fi 3373 3374echo "$ac_t""$with_ext_funcs" 1>&6 3375if test "$with_ext_funcs" = yes ; then 3376 cat >> confdefs.h <<\EOF 3377#define HAVE_HAS_KEY 1 3378EOF 3379 3380 cat >> confdefs.h <<\EOF 3381#define HAVE_RESIZETERM 1 3382EOF 3383 3384 cat >> confdefs.h <<\EOF 3385#define HAVE_USE_DEFAULT_COLORS 1 3386EOF 3387 3388 cat >> confdefs.h <<\EOF 3389#define HAVE_WRESIZE 1 3390EOF 3391 3392 cat >> confdefs.h <<\EOF 3393#define NCURSES_EXT_FUNCS 1 3394EOF 3395 3396fi 3397 3398### use option --enable-const to turn on use of const beyond that in XSI. 3399echo $ac_n "checking for extended use of const keyword""... $ac_c" 1>&6 3400echo "configure:3401: checking for extended use of const keyword" >&5 3401 3402# Check whether --enable-const or --disable-const was given. 3403if test "${enable_const+set}" = set; then 3404 enableval="$enable_const" 3405 with_ext_const=$enableval 3406else 3407 with_ext_const=no 3408fi 3409 3410echo "$ac_t""$with_ext_const" 1>&6 3411NCURSES_CONST="" 3412if test "$with_ext_const" = yes ; then 3413 cat >> confdefs.h <<\EOF 3414#define NCURSES_CONST const 3415EOF 3416 3417 NCURSES_CONST=const 3418fi 3419 3420 3421### use option --enable-hashmap to turn on use of hashmap scrolling logic 3422echo $ac_n "checking if you want hashmap scrolling-optimization code""... $ac_c" 1>&6 3423echo "configure:3424: checking if you want hashmap scrolling-optimization code" >&5 3424 3425# Check whether --enable-hashmap or --disable-hashmap was given. 3426if test "${enable_hashmap+set}" = set; then 3427 enableval="$enable_hashmap" 3428 with_hashmap=$enableval 3429else 3430 with_hashmap=yes 3431fi 3432 3433echo "$ac_t""$with_hashmap" 1>&6 3434test "$with_hashmap" = yes && cat >> confdefs.h <<\EOF 3435#define USE_HASHMAP 1 3436EOF 3437 3438 3439echo $ac_n "checking if you want \$NCURSES_NO_PADDING code""... $ac_c" 1>&6 3440echo "configure:3441: checking if you want \$NCURSES_NO_PADDING code" >&5 3441 3442# Check whether --enable-no-padding or --disable-no-padding was given. 3443if test "${enable_no_padding+set}" = set; then 3444 enableval="$enable_no_padding" 3445 with_no_padding=$enableval 3446else 3447 with_no_padding=$with_ext_funcs 3448fi 3449 3450echo "$ac_t""$with_no_padding" 1>&6 3451test "$with_no_padding" = yes && cat >> confdefs.h <<\EOF 3452#define NCURSES_NO_PADDING 1 3453EOF 3454 3455 3456### use option --enable-sigwinch to turn on use of SIGWINCH logic 3457echo $ac_n "checking if you want SIGWINCH handler""... $ac_c" 1>&6 3458echo "configure:3459: checking if you want SIGWINCH handler" >&5 3459 3460# Check whether --enable-sigwinch or --disable-sigwinch was given. 3461if test "${enable_sigwinch+set}" = set; then 3462 enableval="$enable_sigwinch" 3463 with_sigwinch=$enableval 3464else 3465 with_sigwinch=$with_ext_funcs 3466fi 3467 3468echo "$ac_t""$with_sigwinch" 1>&6 3469test "$with_sigwinch" = yes && cat >> confdefs.h <<\EOF 3470#define USE_SIGWINCH 1 3471EOF 3472 3473 3474### use option --enable-tcap-names to allow user to define new capabilities 3475echo $ac_n "checking if you want user-definable terminal capabilities like termcap""... $ac_c" 1>&6 3476echo "configure:3477: checking if you want user-definable terminal capabilities like termcap" >&5 3477 3478# Check whether --enable-tcap-names or --disable-tcap-names was given. 3479if test "${enable_tcap_names+set}" = set; then 3480 enableval="$enable_tcap_names" 3481 with_tcap_names=$enableval 3482else 3483 with_tcap_names=$with_ext_funcs 3484fi 3485 3486echo "$ac_t""$with_tcap_names" 1>&6 3487NCURSES_XNAMES=0 3488test "$with_tcap_names" = yes && NCURSES_XNAMES=1 3489 3490 3491############################################################################### 3492 3493echo $ac_n "checking if you want all experimental code""... $ac_c" 1>&6 3494echo "configure:3495: checking if you want all experimental code" >&5 3495 3496# Check whether --with-develop or --without-develop was given. 3497if test "${with_develop+set}" = set; then 3498 withval="$with_develop" 3499 with_develop=$withval 3500else 3501 with_develop=no 3502fi 3503 3504echo "$ac_t""$with_develop" 1>&6 3505 3506### use option --enable-colorfgbg to turn on use of $COLORFGBG environment 3507echo $ac_n "checking if you want experimental colorfgbg code""... $ac_c" 1>&6 3508echo "configure:3509: checking if you want experimental colorfgbg code" >&5 3509 3510# Check whether --enable-hard-tabs or --disable-hard-tabs was given. 3511if test "${enable_hard_tabs+set}" = set; then 3512 enableval="$enable_hard_tabs" 3513 with_colorfgbg=$enableval 3514else 3515 with_colorfgbg=$with_develop 3516fi 3517 3518echo "$ac_t""$with_colorfgbg" 1>&6 3519test "$with_colorfgbg" = yes && cat >> confdefs.h <<\EOF 3520#define USE_COLORFGBG 1 3521EOF 3522 3523 3524### use option --enable-hard-tabs to turn on use of hard-tabs optimize 3525echo $ac_n "checking if you want experimental hard-tabs code""... $ac_c" 1>&6 3526echo "configure:3527: checking if you want experimental hard-tabs code" >&5 3527 3528# Check whether --enable-hard-tabs or --disable-hard-tabs was given. 3529if test "${enable_hard_tabs+set}" = set; then 3530 enableval="$enable_hard_tabs" 3531 with_hardtabs=$enableval 3532else 3533 with_hardtabs=$with_develop 3534fi 3535 3536echo "$ac_t""$with_hardtabs" 1>&6 3537test "$with_hardtabs" = yes && cat >> confdefs.h <<\EOF 3538#define USE_HARD_TABS 1 3539EOF 3540 3541 3542echo $ac_n "checking if you want experimental safe-sprintf code""... $ac_c" 1>&6 3543echo "configure:3544: checking if you want experimental safe-sprintf code" >&5 3544 3545# Check whether --enable-safe-sprintf or --disable-safe-sprintf was given. 3546if test "${enable_safe_sprintf+set}" = set; then 3547 enableval="$enable_safe_sprintf" 3548 with_safe_sprintf=$enableval 3549else 3550 with_safe_sprintf=no 3551fi 3552 3553echo "$ac_t""$with_safe_sprintf" 1>&6 3554test "$with_safe_sprintf" = yes && cat >> confdefs.h <<\EOF 3555#define USE_SAFE_SPRINTF 1 3556EOF 3557 3558 3559### use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic 3560# when hashmap is used scroll hints are useless 3561if test "$with_hashmap" = no ; then 3562echo $ac_n "checking if you want to experiment without scrolling-hints code""... $ac_c" 1>&6 3563echo "configure:3564: checking if you want to experiment without scrolling-hints code" >&5 3564 3565# Check whether --enable-scroll-hints or --disable-scroll-hints was given. 3566if test "${enable_scroll_hints+set}" = set; then 3567 enableval="$enable_scroll_hints" 3568 with_scroll_hints=$enableval 3569else 3570 with_scroll_hints=yes 3571fi 3572 3573echo "$ac_t""$with_scroll_hints" 1>&6 3574test "$with_scroll_hints" = yes && cat >> confdefs.h <<\EOF 3575#define USE_SCROLL_HINTS 1 3576EOF 3577 3578fi 3579 3580### use option --enable-widec to turn on use of wide-character support 3581echo $ac_n "checking if you want experimental wide-character code""... $ac_c" 1>&6 3582echo "configure:3583: checking if you want experimental wide-character code" >&5 3583 3584# Check whether --enable-widec or --disable-widec was given. 3585if test "${enable_widec+set}" = set; then 3586 enableval="$enable_widec" 3587 with_widec=$enableval 3588else 3589 with_widec=no 3590fi 3591 3592echo "$ac_t""$with_widec" 1>&6 3593if test "$with_widec" = yes ; then 3594 LIB_SUFFIX="w${LIB_SUFFIX}" 3595 cat >> confdefs.h <<\EOF 3596#define USE_WIDEC_SUPPORT 1 3597EOF 3598 3599fi 3600 3601### use option --enable-xmc-glitch to turn on use of magic-cookie optimize 3602echo $ac_n "checking if you want experimental xmc code""... $ac_c" 1>&6 3603echo "configure:3604: checking if you want experimental xmc code" >&5 3604 3605# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given. 3606if test "${enable_xmc_glitch+set}" = set; then 3607 enableval="$enable_xmc_glitch" 3608 with_xmc_glitch=$enableval 3609else 3610 with_xmc_glitch=$with_develop 3611fi 3612 3613echo "$ac_t""$with_xmc_glitch" 1>&6 3614test "$with_xmc_glitch" = yes && cat >> confdefs.h <<\EOF 3615#define USE_XMC_SUPPORT 1 3616EOF 3617 3618 3619############################################################################### 3620 3621 3622### use option --disable-echo to suppress full display compiling commands 3623 3624# Check whether --enable-echo or --disable-echo was given. 3625if test "${enable_echo+set}" = set; then 3626 enableval="$enable_echo" 3627 with_echo=$enableval 3628else 3629 with_echo=yes 3630fi 3631 3632if test "$with_echo" = yes; then 3633 ECHO_LINK= 3634else 3635 ECHO_LINK='@ echo linking $@ ... ;' 3636fi 3637 3638 3639### use option --enable-warnings to turn on all gcc warnings 3640 3641# Check whether --enable-warnings or --disable-warnings was given. 3642if test "${enable_warnings+set}" = set; then 3643 enableval="$enable_warnings" 3644 with_warnings=$enableval 3645fi 3646 3647if test -n "$with_warnings"; then 3648 ADAFLAGS="$ADAFLAGS -gnatg" 3649 3650if test -n "$GCC" 3651then 3652 cat > conftest.$ac_ext <<EOF 3653#line 3654 "configure" 3654int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; } 3655EOF 3656 echo "checking for $CC warning options" 1>&6 3657echo "configure:3658: checking for $CC warning options" >&5 3658 cf_save_CFLAGS="$CFLAGS" 3659 EXTRA_CFLAGS="-W -Wall" 3660 cf_warn_CONST="" 3661 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings" 3662 for cf_opt in \ 3663 Wbad-function-cast \ 3664 Wcast-align \ 3665 Wcast-qual \ 3666 Winline \ 3667 Wmissing-declarations \ 3668 Wmissing-prototypes \ 3669 Wnested-externs \ 3670 Wpointer-arith \ 3671 Wshadow \ 3672 Wstrict-prototypes $cf_warn_CONST 3673 do 3674 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt" 3675 if { (eval echo configure:3676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 3676 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6 3677 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt" 3678 test "$cf_opt" = Wcast-qual && EXTRA_CFLAGS="$EXTRA_CFLAGS -DXTSTRINGDEFINES" 3679 fi 3680 done 3681 rm -f conftest* 3682 CFLAGS="$cf_save_CFLAGS" 3683fi 3684 3685 3686fi 3687 3688if test -n "$GCC" 3689then 3690cat > conftest.i <<EOF 3691#ifndef GCC_PRINTF 3692#define GCC_PRINTF 0 3693#endif 3694#ifndef GCC_SCANF 3695#define GCC_SCANF 0 3696#endif 3697#ifndef GCC_NORETURN 3698#define GCC_NORETURN /* nothing */ 3699#endif 3700#ifndef GCC_UNUSED 3701#define GCC_UNUSED /* nothing */ 3702#endif 3703EOF 3704if test -n "$GCC" 3705then 3706 echo "checking for $CC __attribute__ directives" 1>&6 3707echo "configure:3708: checking for $CC __attribute__ directives" >&5 3708 cat > conftest.$ac_ext <<EOF 3709#line 3710 "configure" 3710#include "confdefs.h" 3711#include "conftest.h" 3712#include "conftest.i" 3713#if GCC_PRINTF 3714#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var))) 3715#else 3716#define GCC_PRINTFLIKE(fmt,var) /*nothing*/ 3717#endif 3718#if GCC_SCANF 3719#define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var))) 3720#else 3721#define GCC_SCANFLIKE(fmt,var) /*nothing*/ 3722#endif 3723extern void wow(char *,...) GCC_SCANFLIKE(1,2); 3724extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN; 3725extern void foo(void) GCC_NORETURN; 3726int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; } 3727EOF 3728 for cf_attribute in scanf printf unused noreturn 3729 do 3730 3731CF_ATTRIBUTE=`echo $cf_attribute | tr '[a-z]' '[A-Z]'` 3732 3733 cf_directive="__attribute__(($cf_attribute))" 3734 echo "checking for $CC $cf_directive" 1>&5 3735 case $cf_attribute in 3736 scanf|printf) 3737 cat >conftest.h <<EOF 3738#define GCC_$CF_ATTRIBUTE 1 3739EOF 3740 ;; 3741 *) 3742 cat >conftest.h <<EOF 3743#define GCC_$CF_ATTRIBUTE $cf_directive 3744EOF 3745 ;; 3746 esac 3747 if { (eval echo configure:3748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 3748 test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6 3749 cat conftest.h >>confdefs.h 3750# else 3751# sed -e 's/__attr.*/\/*nothing*\//' conftest.h >>confdefs.h 3752 fi 3753 done 3754else 3755 fgrep define conftest.i >>confdefs.h 3756fi 3757rm -rf conftest* 3758fi 3759 3760 3761### use option --enable-assertions to turn on generation of assertion code 3762 3763# Check whether --enable-assertions or --disable-assertions was given. 3764if test "${enable_assertions+set}" = set; then 3765 enableval="$enable_assertions" 3766 with_assertions=$enableval 3767else 3768 with_assertions=no 3769fi 3770 3771if test -n "$GCC" 3772then 3773 if test $with_assertions = no 3774 then 3775 cat >> confdefs.h <<\EOF 3776#define NDEBUG 1 3777EOF 3778 3779 CPPFLAGS="$CPPFLAGS -DNDEBUG" 3780 else 3781 ADAFLAGS="$ADAFLAGS -gnata" 3782 fi 3783fi 3784 3785### use option --disable-leaks to suppress "permanent" leaks, for testing 3786 3787# Check whether --enable-leaks or --disable-leaks was given. 3788if test "${enable_leaks+set}" = set; then 3789 enableval="$enable_leaks" 3790 test $enableval = no && cat >> confdefs.h <<\EOF 3791#define NO_LEAKS 1 3792EOF 3793 3794fi 3795 3796cat >> confdefs.h <<\EOF 3797#define HAVE_NC_ALLOC_H 1 3798EOF 3799 3800 3801### use option --enable-expanded to generate certain macros as functions 3802 3803# Check whether --enable-expanded or --disable-expanded was given. 3804if test "${enable_expanded+set}" = set; then 3805 enableval="$enable_expanded" 3806 test $enableval = yes && cat >> confdefs.h <<\EOF 3807#define NCURSES_EXPANDED 1 3808EOF 3809 3810fi 3811 3812 3813### use option --disable-macros to suppress macros in favor of functions 3814 3815# Check whether --enable-macros or --disable-macros was given. 3816if test "${enable_macros+set}" = set; then 3817 enableval="$enable_macros" 3818 test $enableval = no && cat >> confdefs.h <<\EOF 3819#define NCURSES_NOMACROS 1 3820EOF 3821 3822fi 3823 3824 3825### Checks for libraries. 3826echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6 3827echo "configure:3828: checking for gettimeofday" >&5 3828if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then 3829 echo $ac_n "(cached) $ac_c" 1>&6 3830else 3831 cat > conftest.$ac_ext <<EOF 3832#line 3833 "configure" 3833#include "confdefs.h" 3834/* System header to define __stub macros and hopefully few prototypes, 3835 which can conflict with char gettimeofday(); below. */ 3836#include <assert.h> 3837/* Override any gcc2 internal prototype to avoid an error. */ 3838/* We use char because int might match the return type of a gcc2 3839 builtin and then its argument prototype would still apply. */ 3840char gettimeofday(); 3841 3842int main() { 3843 3844/* The GNU C library defines this for functions which it implements 3845 to always fail with ENOSYS. Some functions are actually named 3846 something starting with __ and the normal name is an alias. */ 3847#if defined (__stub_gettimeofday) || defined (__stub___gettimeofday) 3848choke me 3849#else 3850gettimeofday(); 3851#endif 3852 3853; return 0; } 3854EOF 3855if { (eval echo configure:3856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3856 rm -rf conftest* 3857 eval "ac_cv_func_gettimeofday=yes" 3858else 3859 echo "configure: failed program was:" >&5 3860 cat conftest.$ac_ext >&5 3861 rm -rf conftest* 3862 eval "ac_cv_func_gettimeofday=no" 3863fi 3864rm -f conftest* 3865fi 3866 3867if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then 3868 echo "$ac_t""yes" 1>&6 3869 cat >> confdefs.h <<\EOF 3870#define HAVE_GETTIMEOFDAY 1 3871EOF 3872 3873else 3874 echo "$ac_t""no" 1>&6 3875 3876 3877echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6 3878echo "configure:3879: checking for gettimeofday in -lbsd" >&5 3879ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'` 3880if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 3881 echo $ac_n "(cached) $ac_c" 1>&6 3882else 3883 ac_save_LIBS="$LIBS" 3884LIBS="-lbsd $LIBS" 3885cat > conftest.$ac_ext <<EOF 3886#line 3887 "configure" 3887#include "confdefs.h" 3888/* Override any gcc2 internal prototype to avoid an error. */ 3889/* We use char because int might match the return type of a gcc2 3890 builtin and then its argument prototype would still apply. */ 3891char gettimeofday(); 3892 3893int main() { 3894gettimeofday() 3895; return 0; } 3896EOF 3897if { (eval echo configure:3898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3898 rm -rf conftest* 3899 eval "ac_cv_lib_$ac_lib_var=yes" 3900else 3901 echo "configure: failed program was:" >&5 3902 cat conftest.$ac_ext >&5 3903 rm -rf conftest* 3904 eval "ac_cv_lib_$ac_lib_var=no" 3905fi 3906rm -f conftest* 3907LIBS="$ac_save_LIBS" 3908 3909fi 3910if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 3911 echo "$ac_t""yes" 1>&6 3912 cat >> confdefs.h <<\EOF 3913#define HAVE_GETTIMEOFDAY 1 3914EOF 3915 3916 LIBS="$LIBS -lbsd" 3917else 3918 echo "$ac_t""no" 1>&6 3919fi 3920 3921fi 3922 3923 3924echo $ac_n "checking if -lm needed for math functions""... $ac_c" 1>&6 3925echo "configure:3926: checking if -lm needed for math functions" >&5 3926if eval "test \"`echo '$''{'cf_cv_need_libm'+set}'`\" = set"; then 3927 echo $ac_n "(cached) $ac_c" 1>&6 3928else 3929 3930 cat > conftest.$ac_ext <<EOF 3931#line 3932 "configure" 3932#include "confdefs.h" 3933 3934 #include <stdio.h> 3935 #include <math.h> 3936 3937int main() { 3938double x = rand(); printf("result = %g\n", sin(x)) 3939; return 0; } 3940EOF 3941if { (eval echo configure:3942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 3942 rm -rf conftest* 3943 cf_cv_need_libm=no 3944else 3945 echo "configure: failed program was:" >&5 3946 cat conftest.$ac_ext >&5 3947 rm -rf conftest* 3948 cf_cv_need_libm=yes 3949fi 3950rm -f conftest* 3951fi 3952 3953echo "$ac_t""$cf_cv_need_libm" 1>&6 3954if test "$cf_cv_need_libm" = yes 3955then 3956MATH_LIB=-lm 3957fi 3958 3959 3960 3961### Checks for header files. 3962echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 3963echo "configure:3964: checking for ANSI C header files" >&5 3964if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then 3965 echo $ac_n "(cached) $ac_c" 1>&6 3966else 3967 cat > conftest.$ac_ext <<EOF 3968#line 3969 "configure" 3969#include "confdefs.h" 3970#include <stdlib.h> 3971#include <stdarg.h> 3972#include <string.h> 3973#include <float.h> 3974EOF 3975ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 3976{ (eval echo configure:3977: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 3977ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 3978if test -z "$ac_err"; then 3979 rm -rf conftest* 3980 ac_cv_header_stdc=yes 3981else 3982 echo "$ac_err" >&5 3983 echo "configure: failed program was:" >&5 3984 cat conftest.$ac_ext >&5 3985 rm -rf conftest* 3986 ac_cv_header_stdc=no 3987fi 3988rm -f conftest* 3989 3990if test $ac_cv_header_stdc = yes; then 3991 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 3992cat > conftest.$ac_ext <<EOF 3993#line 3994 "configure" 3994#include "confdefs.h" 3995#include <string.h> 3996EOF 3997if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 3998 egrep "memchr" >/dev/null 2>&1; then 3999 : 4000else 4001 rm -rf conftest* 4002 ac_cv_header_stdc=no 4003fi 4004rm -f conftest* 4005 4006fi 4007 4008if test $ac_cv_header_stdc = yes; then 4009 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 4010cat > conftest.$ac_ext <<EOF 4011#line 4012 "configure" 4012#include "confdefs.h" 4013#include <stdlib.h> 4014EOF 4015if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 4016 egrep "free" >/dev/null 2>&1; then 4017 : 4018else 4019 rm -rf conftest* 4020 ac_cv_header_stdc=no 4021fi 4022rm -f conftest* 4023 4024fi 4025 4026if test $ac_cv_header_stdc = yes; then 4027 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. 4028if test "$cross_compiling" = yes; then 4029 : 4030else 4031 cat > conftest.$ac_ext <<EOF 4032#line 4033 "configure" 4033#include "confdefs.h" 4034#include <ctype.h> 4035#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') 4036#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) 4037#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) 4038int main () { int i; for (i = 0; i < 256; i++) 4039if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); 4040exit (0); } 4041 4042EOF 4043if { (eval echo configure:4044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 4044then 4045 : 4046else 4047 echo "configure: failed program was:" >&5 4048 cat conftest.$ac_ext >&5 4049 rm -fr conftest* 4050 ac_cv_header_stdc=no 4051fi 4052rm -fr conftest* 4053fi 4054 4055fi 4056fi 4057 4058echo "$ac_t""$ac_cv_header_stdc" 1>&6 4059if test $ac_cv_header_stdc = yes; then 4060 cat >> confdefs.h <<\EOF 4061#define STDC_HEADERS 1 4062EOF 4063 4064fi 4065 4066ac_header_dirent=no 4067for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h 4068do 4069ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` 4070echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 4071echo "configure:4072: checking for $ac_hdr that defines DIR" >&5 4072if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then 4073 echo $ac_n "(cached) $ac_c" 1>&6 4074else 4075 cat > conftest.$ac_ext <<EOF 4076#line 4077 "configure" 4077#include "confdefs.h" 4078#include <sys/types.h> 4079#include <$ac_hdr> 4080int main() { 4081DIR *dirp = 0; 4082; return 0; } 4083EOF 4084if { (eval echo configure:4085: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 4085 rm -rf conftest* 4086 eval "ac_cv_header_dirent_$ac_safe=yes" 4087else 4088 echo "configure: failed program was:" >&5 4089 cat conftest.$ac_ext >&5 4090 rm -rf conftest* 4091 eval "ac_cv_header_dirent_$ac_safe=no" 4092fi 4093rm -f conftest* 4094fi 4095if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then 4096 echo "$ac_t""yes" 1>&6 4097 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` 4098 cat >> confdefs.h <<EOF 4099#define $ac_tr_hdr 1 4100EOF 4101 ac_header_dirent=$ac_hdr; break 4102else 4103 echo "$ac_t""no" 1>&6 4104fi 4105done 4106# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. 4107if test $ac_header_dirent = dirent.h; then 4108echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 4109echo "configure:4110: checking for opendir in -ldir" >&5 4110ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` 4111if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 4112 echo $ac_n "(cached) $ac_c" 1>&6 4113else 4114 ac_save_LIBS="$LIBS" 4115LIBS="-ldir $LIBS" 4116cat > conftest.$ac_ext <<EOF 4117#line 4118 "configure" 4118#include "confdefs.h" 4119/* Override any gcc2 internal prototype to avoid an error. */ 4120/* We use char because int might match the return type of a gcc2 4121 builtin and then its argument prototype would still apply. */ 4122char opendir(); 4123 4124int main() { 4125opendir() 4126; return 0; } 4127EOF 4128if { (eval echo configure:4129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4129 rm -rf conftest* 4130 eval "ac_cv_lib_$ac_lib_var=yes" 4131else 4132 echo "configure: failed program was:" >&5 4133 cat conftest.$ac_ext >&5 4134 rm -rf conftest* 4135 eval "ac_cv_lib_$ac_lib_var=no" 4136fi 4137rm -f conftest* 4138LIBS="$ac_save_LIBS" 4139 4140fi 4141if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 4142 echo "$ac_t""yes" 1>&6 4143 LIBS="$LIBS -ldir" 4144else 4145 echo "$ac_t""no" 1>&6 4146fi 4147 4148else 4149echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 4150echo "configure:4151: checking for opendir in -lx" >&5 4151ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` 4152if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 4153 echo $ac_n "(cached) $ac_c" 1>&6 4154else 4155 ac_save_LIBS="$LIBS" 4156LIBS="-lx $LIBS" 4157cat > conftest.$ac_ext <<EOF 4158#line 4159 "configure" 4159#include "confdefs.h" 4160/* Override any gcc2 internal prototype to avoid an error. */ 4161/* We use char because int might match the return type of a gcc2 4162 builtin and then its argument prototype would still apply. */ 4163char opendir(); 4164 4165int main() { 4166opendir() 4167; return 0; } 4168EOF 4169if { (eval echo configure:4170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4170 rm -rf conftest* 4171 eval "ac_cv_lib_$ac_lib_var=yes" 4172else 4173 echo "configure: failed program was:" >&5 4174 cat conftest.$ac_ext >&5 4175 rm -rf conftest* 4176 eval "ac_cv_lib_$ac_lib_var=no" 4177fi 4178rm -f conftest* 4179LIBS="$ac_save_LIBS" 4180 4181fi 4182if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 4183 echo "$ac_t""yes" 1>&6 4184 LIBS="$LIBS -lx" 4185else 4186 echo "$ac_t""no" 1>&6 4187fi 4188 4189fi 4190 4191 4192echo $ac_n "checking for regular-expression headers""... $ac_c" 1>&6 4193echo "configure:4194: checking for regular-expression headers" >&5 4194if eval "test \"`echo '$''{'cf_cv_regex'+set}'`\" = set"; then 4195 echo $ac_n "(cached) $ac_c" 1>&6 4196else 4197 4198cat > conftest.$ac_ext <<EOF 4199#line 4200 "configure" 4200#include "confdefs.h" 4201#include <sys/types.h> 4202#include <regex.h> 4203int main() { 4204 4205 regex_t *p; 4206 int x = regcomp(p, "", 0); 4207 int y = regexec(p, "", 0, 0, 0); 4208 regfree(p); 4209 4210; return 0; } 4211EOF 4212if { (eval echo configure:4213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4213 rm -rf conftest* 4214 cf_cv_regex="regex.h" 4215else 4216 echo "configure: failed program was:" >&5 4217 cat conftest.$ac_ext >&5 4218 rm -rf conftest* 4219 4220 cat > conftest.$ac_ext <<EOF 4221#line 4222 "configure" 4222#include "confdefs.h" 4223#include <regexp.h> 4224int main() { 4225 4226 char *p = compile("", "", "", 0); 4227 int x = step("", ""); 4228 4229; return 0; } 4230EOF 4231if { (eval echo configure:4232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4232 rm -rf conftest* 4233 cf_cv_regex="regexp.h" 4234else 4235 echo "configure: failed program was:" >&5 4236 cat conftest.$ac_ext >&5 4237 rm -rf conftest* 4238 4239 cf_save_LIBS="$LIBS" 4240 LIBS="-lgen $LIBS" 4241 cat > conftest.$ac_ext <<EOF 4242#line 4243 "configure" 4243#include "confdefs.h" 4244#include <regexpr.h> 4245int main() { 4246 4247 char *p = compile("", "", ""); 4248 int x = step("", ""); 4249 4250; return 0; } 4251EOF 4252if { (eval echo configure:4253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4253 rm -rf conftest* 4254 cf_cv_regex="regexpr.h" 4255else 4256 echo "configure: failed program was:" >&5 4257 cat conftest.$ac_ext >&5 4258 rm -rf conftest* 4259 LIBS="$cf_save_LIBS" 4260fi 4261rm -f conftest* 4262fi 4263rm -f conftest* 4264fi 4265rm -f conftest* 4266 4267fi 4268 4269echo "$ac_t""$cf_cv_regex" 1>&6 4270case $cf_cv_regex in 4271 regex.h) cat >> confdefs.h <<\EOF 4272#define HAVE_REGEX_H_FUNCS 1 4273EOF 4274 ;; 4275 regexp.h) cat >> confdefs.h <<\EOF 4276#define HAVE_REGEXP_H_FUNCS 1 4277EOF 4278 ;; 4279 regexpr.h) cat >> confdefs.h <<\EOF 4280#define HAVE_REGEXPR_H_FUNCS 1 4281EOF 4282 ;; 4283esac 4284 4285 4286for ac_hdr in \ 4287fcntl.h \ 4288getopt.h \ 4289libc.h \ 4290limits.h \ 4291locale.h \ 4292poll.h \ 4293sys/bsdtypes.h \ 4294sys/ioctl.h \ 4295sys/param.h \ 4296sys/poll.h \ 4297sys/select.h \ 4298sys/time.h \ 4299sys/times.h \ 4300termio.h \ 4301termios.h \ 4302ttyent.h \ 4303unistd.h \ 4304 4305do 4306ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` 4307echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 4308echo "configure:4309: checking for $ac_hdr" >&5 4309if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 4310 echo $ac_n "(cached) $ac_c" 1>&6 4311else 4312 cat > conftest.$ac_ext <<EOF 4313#line 4314 "configure" 4314#include "confdefs.h" 4315#include <$ac_hdr> 4316EOF 4317ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 4318{ (eval echo configure:4319: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 4319ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 4320if test -z "$ac_err"; then 4321 rm -rf conftest* 4322 eval "ac_cv_header_$ac_safe=yes" 4323else 4324 echo "$ac_err" >&5 4325 echo "configure: failed program was:" >&5 4326 cat conftest.$ac_ext >&5 4327 rm -rf conftest* 4328 eval "ac_cv_header_$ac_safe=no" 4329fi 4330rm -f conftest* 4331fi 4332if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 4333 echo "$ac_t""yes" 1>&6 4334 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` 4335 cat >> confdefs.h <<EOF 4336#define $ac_tr_hdr 1 4337EOF 4338 4339else 4340 echo "$ac_t""no" 1>&6 4341fi 4342done 4343 4344 4345# check for ISC (this may also define _POSIX_SOURCE) 4346# Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set 4347if test "$ISC" = yes ; then 4348 echo $ac_n "checking for main in -lcposix""... $ac_c" 1>&6 4349echo "configure:4350: checking for main in -lcposix" >&5 4350ac_lib_var=`echo cposix'_'main | sed 'y%./+-%__p_%'` 4351if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 4352 echo $ac_n "(cached) $ac_c" 1>&6 4353else 4354 ac_save_LIBS="$LIBS" 4355LIBS="-lcposix $LIBS" 4356cat > conftest.$ac_ext <<EOF 4357#line 4358 "configure" 4358#include "confdefs.h" 4359 4360int main() { 4361main() 4362; return 0; } 4363EOF 4364if { (eval echo configure:4365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4365 rm -rf conftest* 4366 eval "ac_cv_lib_$ac_lib_var=yes" 4367else 4368 echo "configure: failed program was:" >&5 4369 cat conftest.$ac_ext >&5 4370 rm -rf conftest* 4371 eval "ac_cv_lib_$ac_lib_var=no" 4372fi 4373rm -f conftest* 4374LIBS="$ac_save_LIBS" 4375 4376fi 4377if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 4378 echo "$ac_t""yes" 1>&6 4379 ac_tr_lib=HAVE_LIB`echo cposix | sed -e 's/[^a-zA-Z0-9_]/_/g' \ 4380 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` 4381 cat >> confdefs.h <<EOF 4382#define $ac_tr_lib 1 4383EOF 4384 4385 LIBS="-lcposix $LIBS" 4386 4387else 4388 echo "$ac_t""no" 1>&6 4389fi 4390 4391 echo $ac_n "checking for bzero in -linet""... $ac_c" 1>&6 4392echo "configure:4393: checking for bzero in -linet" >&5 4393ac_lib_var=`echo inet'_'bzero | sed 'y%./+-%__p_%'` 4394if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 4395 echo $ac_n "(cached) $ac_c" 1>&6 4396else 4397 ac_save_LIBS="$LIBS" 4398LIBS="-linet $LIBS" 4399cat > conftest.$ac_ext <<EOF 4400#line 4401 "configure" 4401#include "confdefs.h" 4402/* Override any gcc2 internal prototype to avoid an error. */ 4403/* We use char because int might match the return type of a gcc2 4404 builtin and then its argument prototype would still apply. */ 4405char bzero(); 4406 4407int main() { 4408bzero() 4409; return 0; } 4410EOF 4411if { (eval echo configure:4412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4412 rm -rf conftest* 4413 eval "ac_cv_lib_$ac_lib_var=yes" 4414else 4415 echo "configure: failed program was:" >&5 4416 cat conftest.$ac_ext >&5 4417 rm -rf conftest* 4418 eval "ac_cv_lib_$ac_lib_var=no" 4419fi 4420rm -f conftest* 4421LIBS="$ac_save_LIBS" 4422 4423fi 4424if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then 4425 echo "$ac_t""yes" 1>&6 4426 LIBS="$LIBS -linet" 4427else 4428 echo "$ac_t""no" 1>&6 4429fi 4430 for ac_hdr in sys/termio.h 4431do 4432ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` 4433echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 4434echo "configure:4435: checking for $ac_hdr" >&5 4435if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 4436 echo $ac_n "(cached) $ac_c" 1>&6 4437else 4438 cat > conftest.$ac_ext <<EOF 4439#line 4440 "configure" 4440#include "confdefs.h" 4441#include <$ac_hdr> 4442EOF 4443ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 4444{ (eval echo configure:4445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 4445ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 4446if test -z "$ac_err"; then 4447 rm -rf conftest* 4448 eval "ac_cv_header_$ac_safe=yes" 4449else 4450 echo "$ac_err" >&5 4451 echo "configure: failed program was:" >&5 4452 cat conftest.$ac_ext >&5 4453 rm -rf conftest* 4454 eval "ac_cv_header_$ac_safe=no" 4455fi 4456rm -f conftest* 4457fi 4458if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 4459 echo "$ac_t""yes" 1>&6 4460 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` 4461 cat >> confdefs.h <<EOF 4462#define $ac_tr_hdr 1 4463EOF 4464 4465else 4466 echo "$ac_t""no" 1>&6 4467fi 4468done 4469 4470fi 4471 4472 4473echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6 4474echo "configure:4475: checking if sys/time.h works with sys/select.h" >&5 4475if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then 4476 echo $ac_n "(cached) $ac_c" 1>&6 4477else 4478 4479cat > conftest.$ac_ext <<EOF 4480#line 4481 "configure" 4481#include "confdefs.h" 4482 4483#include <sys/types.h> 4484#if HAVE_SYS_TIME_H 4485#include <sys/time.h> 4486#endif 4487#if HAVE_SYS_SELECT_H 4488#include <sys/select.h> 4489#endif 4490 4491int main() { 4492 4493; return 0; } 4494EOF 4495if { (eval echo configure:4496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 4496 rm -rf conftest* 4497 cf_cv_sys_time_select=yes 4498else 4499 echo "configure: failed program was:" >&5 4500 cat conftest.$ac_ext >&5 4501 rm -rf conftest* 4502 cf_cv_sys_time_select=no 4503fi 4504rm -f conftest* 4505 4506fi 4507 4508echo "$ac_t""$cf_cv_sys_time_select" 1>&6 4509test $cf_cv_sys_time_select = yes && cat >> confdefs.h <<\EOF 4510#define HAVE_SYS_TIME_SELECT 1 4511EOF 4512 4513 4514 4515### checks for compiler characteristics 4516ac_ext=c 4517# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 4518ac_cpp='$CPP $CPPFLAGS' 4519ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 4520ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 4521cross_compiling=$ac_cv_prog_cc_cross 4522 4523echo $ac_n "checking for working const""... $ac_c" 1>&6 4524echo "configure:4525: checking for working const" >&5 4525if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then 4526 echo $ac_n "(cached) $ac_c" 1>&6 4527else 4528 cat > conftest.$ac_ext <<EOF 4529#line 4530 "configure" 4530#include "confdefs.h" 4531 4532int main() { 4533 4534/* Ultrix mips cc rejects this. */ 4535typedef int charset[2]; const charset x; 4536/* SunOS 4.1.1 cc rejects this. */ 4537char const *const *ccp; 4538char **p; 4539/* NEC SVR4.0.2 mips cc rejects this. */ 4540struct point {int x, y;}; 4541static struct point const zero = {0,0}; 4542/* AIX XL C 1.02.0.0 rejects this. 4543 It does not let you subtract one const X* pointer from another in an arm 4544 of an if-expression whose if-part is not a constant expression */ 4545const char *g = "string"; 4546ccp = &g + (g ? g-g : 0); 4547/* HPUX 7.0 cc rejects these. */ 4548++ccp; 4549p = (char**) ccp; 4550ccp = (char const *const *) p; 4551{ /* SCO 3.2v4 cc rejects this. */ 4552 char *t; 4553 char const *s = 0 ? (char *) 0 : (char const *) 0; 4554 4555 *t++ = 0; 4556} 4557{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ 4558 int x[] = {25, 17}; 4559 const int *foo = &x[0]; 4560 ++foo; 4561} 4562{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ 4563 typedef const int *iptr; 4564 iptr p = 0; 4565 ++p; 4566} 4567{ /* AIX XL C 1.02.0.0 rejects this saying 4568 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ 4569 struct s { int j; const int *ap[3]; }; 4570 struct s *b; b->j = 5; 4571} 4572{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ 4573 const int foo = 10; 4574} 4575 4576; return 0; } 4577EOF 4578if { (eval echo configure:4579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 4579 rm -rf conftest* 4580 ac_cv_c_const=yes 4581else 4582 echo "configure: failed program was:" >&5 4583 cat conftest.$ac_ext >&5 4584 rm -rf conftest* 4585 ac_cv_c_const=no 4586fi 4587rm -f conftest* 4588fi 4589 4590echo "$ac_t""$ac_cv_c_const" 1>&6 4591if test $ac_cv_c_const = no; then 4592 cat >> confdefs.h <<\EOF 4593#define const 4594EOF 4595 4596fi 4597 4598echo $ac_n "checking for inline""... $ac_c" 1>&6 4599echo "configure:4600: checking for inline" >&5 4600if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then 4601 echo $ac_n "(cached) $ac_c" 1>&6 4602else 4603 ac_cv_c_inline=no 4604for ac_kw in inline __inline__ __inline; do 4605 cat > conftest.$ac_ext <<EOF 4606#line 4607 "configure" 4607#include "confdefs.h" 4608 4609int main() { 4610} $ac_kw foo() { 4611; return 0; } 4612EOF 4613if { (eval echo configure:4614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 4614 rm -rf conftest* 4615 ac_cv_c_inline=$ac_kw; break 4616else 4617 echo "configure: failed program was:" >&5 4618 cat conftest.$ac_ext >&5 4619fi 4620rm -f conftest* 4621done 4622 4623fi 4624 4625echo "$ac_t""$ac_cv_c_inline" 1>&6 4626case "$ac_cv_c_inline" in 4627 inline | yes) ;; 4628 no) cat >> confdefs.h <<\EOF 4629#define inline 4630EOF 4631 ;; 4632 *) cat >> confdefs.h <<EOF 4633#define inline $ac_cv_c_inline 4634EOF 4635 ;; 4636esac 4637 4638test $ac_cv_c_inline != no && cat >> confdefs.h <<\EOF 4639#define CC_HAS_INLINE_FUNCS 1 4640EOF 4641 4642 4643 4644echo $ac_n "checking if unsigned literals are legal""... $ac_c" 1>&6 4645echo "configure:4646: checking if unsigned literals are legal" >&5 4646if eval "test \"`echo '$''{'cf_cv_unsigned_literals'+set}'`\" = set"; then 4647 echo $ac_n "(cached) $ac_c" 1>&6 4648else 4649 4650 cat > conftest.$ac_ext <<EOF 4651#line 4652 "configure" 4652#include "confdefs.h" 4653 4654int main() { 4655long x = 1L + 1UL + 1U + 1 4656; return 0; } 4657EOF 4658if { (eval echo configure:4659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 4659 rm -rf conftest* 4660 cf_cv_unsigned_literals=yes 4661else 4662 echo "configure: failed program was:" >&5 4663 cat conftest.$ac_ext >&5 4664 rm -rf conftest* 4665 cf_cv_unsigned_literals=no 4666fi 4667rm -f conftest* 4668 4669fi 4670 4671echo "$ac_t""$cf_cv_unsigned_literals" 1>&6 4672 4673 4674 4675echo $ac_n "checking for type of chtype""... $ac_c" 1>&6 4676echo "configure:4677: checking for type of chtype" >&5 4677if eval "test \"`echo '$''{'cf_cv_typeof_chtype'+set}'`\" = set"; then 4678 echo $ac_n "(cached) $ac_c" 1>&6 4679else 4680 4681 if test "$cross_compiling" = yes; then 4682 cf_cv_typeof_chtype=long 4683else 4684 cat > conftest.$ac_ext <<EOF 4685#line 4686 "configure" 4686#include "confdefs.h" 4687 4688#if USE_WIDEC_SUPPORT 4689#include <stddef.h> /* we want wchar_t */ 4690#define WANT_BITS 39 4691#else 4692#define WANT_BITS 31 4693#endif 4694#include <stdio.h> 4695int main() 4696{ 4697 FILE *fp = fopen("cf_test.out", "w"); 4698 if (fp != 0) { 4699 char *result = "long"; 4700#if USE_WIDEC_SUPPORT 4701 /* 4702 * If wchar_t is smaller than a long, it must be an int or a 4703 * short. We prefer not to use a short anyway. 4704 */ 4705 if (sizeof(unsigned long) > sizeof(wchar_t)) 4706 result = "int"; 4707#endif 4708 if (sizeof(unsigned long) > sizeof(unsigned int)) { 4709 int n; 4710 unsigned int x; 4711 for (n = 0; n < WANT_BITS; n++) { 4712 unsigned int y = (x >> n); 4713 if (y != 1 || x == 0) { 4714 x = 0; 4715 break; 4716 } 4717 } 4718 /* 4719 * If x is nonzero, an int is big enough for the bits 4720 * that we want. 4721 */ 4722 result = (x != 0) ? "int" : "long"; 4723 } 4724 fputs(result, fp); 4725 fclose(fp); 4726 } 4727 exit(0); 4728} 4729 4730EOF 4731if { (eval echo configure:4732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 4732then 4733 cf_cv_typeof_chtype=`cat cf_test.out` 4734else 4735 echo "configure: failed program was:" >&5 4736 cat conftest.$ac_ext >&5 4737 rm -fr conftest* 4738 cf_cv_typeof_chtype=long 4739fi 4740rm -fr conftest* 4741fi 4742 4743 rm -f cf_test.out 4744 4745fi 4746 4747echo "$ac_t""$cf_cv_typeof_chtype" 1>&6 4748 4749 4750cat >> confdefs.h <<EOF 4751#define TYPEOF_CHTYPE $cf_cv_typeof_chtype 4752EOF 4753 4754 4755cf_cv_1UL="1" 4756test "$cf_cv_unsigned_literals" = yes && cf_cv_1UL="${cf_cv_1UL}U" 4757test "$cf_cv_typeof_chtype" = long && cf_cv_1UL="${cf_cv_1UL}L" 4758 4759 4760 4761 4762 4763echo $ac_n "checking for number of bits in chtype""... $ac_c" 1>&6 4764echo "configure:4765: checking for number of bits in chtype" >&5 4765if eval "test \"`echo '$''{'cf_cv_shift_limit'+set}'`\" = set"; then 4766 echo $ac_n "(cached) $ac_c" 1>&6 4767else 4768 4769 if test "$cross_compiling" = yes; then 4770 cf_cv_shift_limit=32 4771else 4772 cat > conftest.$ac_ext <<EOF 4773#line 4774 "configure" 4774#include "confdefs.h" 4775 4776#include <stdio.h> 4777int main() 4778{ 4779 FILE *fp = fopen("cf_test.out", "w"); 4780 if (fp != 0) { 4781 int n; 4782 unsigned TYPEOF_CHTYPE x = 1L; 4783 for (n = 0; ; n++) { 4784 unsigned long y = (x >> n); 4785 if (y != 1 || x == 0) 4786 break; 4787 x <<= 1; 4788 } 4789 fprintf(fp, "%d", n); 4790 fclose(fp); 4791 } 4792 exit(0); 4793} 4794 4795EOF 4796if { (eval echo configure:4797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 4797then 4798 cf_cv_shift_limit=`cat cf_test.out` 4799else 4800 echo "configure: failed program was:" >&5 4801 cat conftest.$ac_ext >&5 4802 rm -fr conftest* 4803 cf_cv_shift_limit=32 4804fi 4805rm -fr conftest* 4806fi 4807 4808 rm -f cf_test.out 4809 4810fi 4811 4812echo "$ac_t""$cf_cv_shift_limit" 1>&6 4813 4814 4815echo $ac_n "checking for width of character-index""... $ac_c" 1>&6 4816echo "configure:4817: checking for width of character-index" >&5 4817if eval "test \"`echo '$''{'cf_cv_widec_shift'+set}'`\" = set"; then 4818 echo $ac_n "(cached) $ac_c" 1>&6 4819else 4820 4821if test ".$with_widec" = ".yes" ; then 4822 cf_attrs_width=39 4823 if ( expr $cf_cv_shift_limit \> $cf_attrs_width >/dev/null ) 4824 then 4825 cf_cv_widec_shift=`expr 16 + $cf_cv_shift_limit - $cf_attrs_width` 4826 else 4827 cf_cv_widec_shift=16 4828 fi 4829else 4830 cf_cv_widec_shift=8 4831fi 4832 4833fi 4834 4835echo "$ac_t""$cf_cv_widec_shift" 1>&6 4836 4837 4838 4839### Checks for external-data 4840 4841 4842echo $ac_n "checking if external errno is declared""... $ac_c" 1>&6 4843echo "configure:4844: checking if external errno is declared" >&5 4844if eval "test \"`echo '$''{'cf_cv_dcl_errno'+set}'`\" = set"; then 4845 echo $ac_n "(cached) $ac_c" 1>&6 4846else 4847 4848 cat > conftest.$ac_ext <<EOF 4849#line 4850 "configure" 4850#include "confdefs.h" 4851 4852#ifdef HAVE_STDLIB_H 4853#include <stdlib.h> 4854#endif 4855#include <stdio.h> 4856#include <sys/types.h> 4857#include <errno.h> 4858int main() { 4859long x = (long) errno 4860; return 0; } 4861EOF 4862if { (eval echo configure:4863: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 4863 rm -rf conftest* 4864 eval 'cf_cv_dcl_'errno'=yes' 4865else 4866 echo "configure: failed program was:" >&5 4867 cat conftest.$ac_ext >&5 4868 rm -rf conftest* 4869 eval 'cf_cv_dcl_'errno'=no' 4870fi 4871rm -f conftest* 4872 4873fi 4874 4875 4876eval 'cf_result=$cf_cv_dcl_'errno 4877echo "$ac_t""$cf_result" 1>&6 4878 4879if test "$cf_result" = no ; then 4880 eval 'cf_result=DECL_'errno 4881 4882cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'` 4883 4884 cat >> confdefs.h <<EOF 4885#define $cf_result 1 4886EOF 4887 4888fi 4889 4890# It's possible (for near-UNIX clones) that the data doesn't exist 4891 4892echo $ac_n "checking if external errno exists""... $ac_c" 1>&6 4893echo "configure:4894: checking if external errno exists" >&5 4894if eval "test \"`echo '$''{'cf_cv_have_errno'+set}'`\" = set"; then 4895 echo $ac_n "(cached) $ac_c" 1>&6 4896else 4897 4898 cat > conftest.$ac_ext <<EOF 4899#line 4900 "configure" 4900#include "confdefs.h" 4901 4902#undef errno 4903extern int errno; 4904 4905int main() { 4906errno = 2 4907; return 0; } 4908EOF 4909if { (eval echo configure:4910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 4910 rm -rf conftest* 4911 eval 'cf_cv_have_'errno'=yes' 4912else 4913 echo "configure: failed program was:" >&5 4914 cat conftest.$ac_ext >&5 4915 rm -rf conftest* 4916 eval 'cf_cv_have_'errno'=no' 4917fi 4918rm -f conftest* 4919fi 4920 4921 4922eval 'cf_result=$cf_cv_have_'errno 4923echo "$ac_t""$cf_result" 1>&6 4924 4925if test "$cf_result" = yes ; then 4926 eval 'cf_result=HAVE_'errno 4927 4928cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'` 4929 4930 cat >> confdefs.h <<EOF 4931#define $cf_result 1 4932EOF 4933 4934fi 4935 4936 4937 4938 4939 4940echo $ac_n "checking if data-only library module links""... $ac_c" 1>&6 4941echo "configure:4942: checking if data-only library module links" >&5 4942if eval "test \"`echo '$''{'cf_cv_link_dataonly'+set}'`\" = set"; then 4943 echo $ac_n "(cached) $ac_c" 1>&6 4944else 4945 4946 rm -f conftest.a 4947 cat >conftest.$ac_ext <<EOF 4948#line 4949 "configure" 4949int testdata[3] = { 123, 456, 789 }; 4950EOF 4951 if { (eval echo configure:4952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } ; then 4952 mv conftest.o data.o && \ 4953 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null 4954 fi 4955 rm -f conftest.$ac_ext data.o 4956 cat >conftest.$ac_ext <<EOF 4957#line 4958 "configure" 4958int testfunc() 4959{ 4960#if defined(NeXT) 4961 exit(1); /* I'm told this linker is broken */ 4962#else 4963 extern int testdata[3]; 4964 return testdata[0] == 123 4965 && testdata[1] == 456 4966 && testdata[2] == 789; 4967#endif 4968} 4969EOF 4970 if { (eval echo configure:4971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 4971 mv conftest.o func.o && \ 4972 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null 4973 fi 4974 rm -f conftest.$ac_ext func.o 4975 ( eval $ac_cv_prog_RANLIB conftest.a ) 2>&5 >/dev/null 4976 cf_saveLIBS="$LIBS" 4977 LIBS="conftest.a $LIBS" 4978 if test "$cross_compiling" = yes; then 4979 cf_cv_link_dataonly=unknown 4980else 4981 cat > conftest.$ac_ext <<EOF 4982#line 4983 "configure" 4983#include "confdefs.h" 4984 4985 int main() 4986 { 4987 extern int testfunc(); 4988 exit (!testfunc()); 4989 } 4990 4991EOF 4992if { (eval echo configure:4993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 4993then 4994 cf_cv_link_dataonly=yes 4995else 4996 echo "configure: failed program was:" >&5 4997 cat conftest.$ac_ext >&5 4998 rm -fr conftest* 4999 cf_cv_link_dataonly=no 5000fi 5001rm -fr conftest* 5002fi 5003 5004 LIBS="$cf_saveLIBS" 5005 5006fi 5007 5008echo "$ac_t""$cf_cv_link_dataonly" 1>&6 5009test $cf_cv_link_dataonly = no && cat >> confdefs.h <<\EOF 5010#define BROKEN_LINKER 1 5011EOF 5012 5013 5014 5015echo $ac_n "checking for speed_t""... $ac_c" 1>&6 5016echo "configure:5017: checking for speed_t" >&5 5017OSPEED_INCLUDES= 5018cat > conftest.$ac_ext <<EOF 5019#line 5020 "configure" 5020#include "confdefs.h" 5021#include <sys/types.h> 5022int main() { 5023speed_t some_variable = 0 5024; return 0; } 5025EOF 5026if { (eval echo configure:5027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5027 rm -rf conftest* 5028 OSPEED_TYPE=speed_t 5029else 5030 echo "configure: failed program was:" >&5 5031 cat conftest.$ac_ext >&5 5032 rm -rf conftest* 5033 OSPEED_TYPE=unsigned 5034fi 5035rm -f conftest* 5036cat > conftest.$ac_ext <<EOF 5037#line 5038 "configure" 5038#include "confdefs.h" 5039#include <termios.h> 5040int main() { 5041speed_t some_variable = 0 5042; return 0; } 5043EOF 5044if { (eval echo configure:5045: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5045 rm -rf conftest* 5046 OSPEED_TYPE=speed_t 5047 OSPEED_INCLUDES="#include <termios.h>" 5048else 5049 echo "configure: failed program was:" >&5 5050 cat conftest.$ac_ext >&5 5051fi 5052rm -f conftest* 5053 5054 5055if test "$OSPEED_TYPE" = "unsigned" ; then 5056 echo "$ac_t""no" 1>&6 5057 cat >> confdefs.h <<\EOF 5058#define speed_t unsigned 5059EOF 5060 5061else 5062 echo "$ac_t""yes" 1>&6 5063fi 5064 5065 5066### Checks for library functions. 5067for ac_func in \ 5068getcwd \ 5069getttynam \ 5070memccpy \ 5071mkstemp \ 5072nanosleep \ 5073poll \ 5074remove \ 5075select \ 5076setbuf \ 5077setbuffer \ 5078setvbuf \ 5079sigaction \ 5080sigvec \ 5081strdup \ 5082strstr \ 5083tcgetattr \ 5084tcgetpgrp \ 5085times \ 5086vfscanf \ 5087vsnprintf \ 5088vsscanf \ 5089 5090do 5091echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 5092echo "configure:5093: checking for $ac_func" >&5 5093if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 5094 echo $ac_n "(cached) $ac_c" 1>&6 5095else 5096 cat > conftest.$ac_ext <<EOF 5097#line 5098 "configure" 5098#include "confdefs.h" 5099/* System header to define __stub macros and hopefully few prototypes, 5100 which can conflict with char $ac_func(); below. */ 5101#include <assert.h> 5102/* Override any gcc2 internal prototype to avoid an error. */ 5103/* We use char because int might match the return type of a gcc2 5104 builtin and then its argument prototype would still apply. */ 5105char $ac_func(); 5106 5107int main() { 5108 5109/* The GNU C library defines this for functions which it implements 5110 to always fail with ENOSYS. Some functions are actually named 5111 something starting with __ and the normal name is an alias. */ 5112#if defined (__stub_$ac_func) || defined (__stub___$ac_func) 5113choke me 5114#else 5115$ac_func(); 5116#endif 5117 5118; return 0; } 5119EOF 5120if { (eval echo configure:5121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 5121 rm -rf conftest* 5122 eval "ac_cv_func_$ac_func=yes" 5123else 5124 echo "configure: failed program was:" >&5 5125 cat conftest.$ac_ext >&5 5126 rm -rf conftest* 5127 eval "ac_cv_func_$ac_func=no" 5128fi 5129rm -f conftest* 5130fi 5131 5132if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then 5133 echo "$ac_t""yes" 1>&6 5134 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` 5135 cat >> confdefs.h <<EOF 5136#define $ac_tr_func 1 5137EOF 5138 5139else 5140 echo "$ac_t""no" 1>&6 5141fi 5142done 5143 5144if test "$with_getcap" = "yes" ; then 5145 5146echo $ac_n "checking for terminal-capability database functions""... $ac_c" 1>&6 5147echo "configure:5148: checking for terminal-capability database functions" >&5 5148if eval "test \"`echo '$''{'cf_cv_cgetent'+set}'`\" = set"; then 5149 echo $ac_n "(cached) $ac_c" 1>&6 5150else 5151 5152cat > conftest.$ac_ext <<EOF 5153#line 5154 "configure" 5154#include "confdefs.h" 5155 5156#include <stdlib.h> 5157int main() { 5158 5159 char temp[128]; 5160 char *buf = temp; 5161 char *db_array = temp; 5162 cgetent(&buf, /* int *, */ &db_array, "vt100"); 5163 cgetcap(buf, "tc", '='); 5164 cgetmatch(buf, "tc"); 5165 5166; return 0; } 5167EOF 5168if { (eval echo configure:5169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 5169 rm -rf conftest* 5170 cf_cv_cgetent=yes 5171else 5172 echo "configure: failed program was:" >&5 5173 cat conftest.$ac_ext >&5 5174 rm -rf conftest* 5175 cf_cv_cgetent=no 5176fi 5177rm -f conftest* 5178 5179fi 5180 5181echo "$ac_t""$cf_cv_cgetent" 1>&6 5182test $cf_cv_cgetent = yes && cat >> confdefs.h <<\EOF 5183#define HAVE_BSD_CGETENT 1 5184EOF 5185 5186 5187fi 5188 5189 5190echo $ac_n "checking for isascii""... $ac_c" 1>&6 5191echo "configure:5192: checking for isascii" >&5 5192if eval "test \"`echo '$''{'cf_cv_have_isascii'+set}'`\" = set"; then 5193 echo $ac_n "(cached) $ac_c" 1>&6 5194else 5195 5196 cat > conftest.$ac_ext <<EOF 5197#line 5198 "configure" 5198#include "confdefs.h" 5199#include <ctype.h> 5200int main() { 5201int x = isascii(' ') 5202; return 0; } 5203EOF 5204if { (eval echo configure:5205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 5205 rm -rf conftest* 5206 cf_cv_have_isascii=yes 5207else 5208 echo "configure: failed program was:" >&5 5209 cat conftest.$ac_ext >&5 5210 rm -rf conftest* 5211 cf_cv_have_isascii=no 5212fi 5213rm -f conftest* 5214 5215fi 5216echo "$ac_t""$cf_cv_have_isascii" 1>&6 5217test $cf_cv_have_isascii = yes && cat >> confdefs.h <<\EOF 5218#define HAVE_ISASCII 1 5219EOF 5220 5221 5222 5223if test $ac_cv_func_sigaction = yes; then 5224echo $ac_n "checking whether sigaction needs _POSIX_SOURCE""... $ac_c" 1>&6 5225echo "configure:5226: checking whether sigaction needs _POSIX_SOURCE" >&5 5226cat > conftest.$ac_ext <<EOF 5227#line 5228 "configure" 5228#include "confdefs.h" 5229 5230#include <sys/types.h> 5231#include <signal.h> 5232int main() { 5233struct sigaction act 5234; return 0; } 5235EOF 5236if { (eval echo configure:5237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5237 rm -rf conftest* 5238 sigact_bad=no 5239else 5240 echo "configure: failed program was:" >&5 5241 cat conftest.$ac_ext >&5 5242 rm -rf conftest* 5243 5244cat > conftest.$ac_ext <<EOF 5245#line 5246 "configure" 5246#include "confdefs.h" 5247 5248#define _POSIX_SOURCE 5249#include <sys/types.h> 5250#include <signal.h> 5251int main() { 5252struct sigaction act 5253; return 0; } 5254EOF 5255if { (eval echo configure:5256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5256 rm -rf conftest* 5257 sigact_bad=yes 5258 cat >> confdefs.h <<\EOF 5259#define SVR4_ACTION 1 5260EOF 5261 5262else 5263 echo "configure: failed program was:" >&5 5264 cat conftest.$ac_ext >&5 5265 rm -rf conftest* 5266 sigact_bad=unknown 5267fi 5268rm -f conftest* 5269fi 5270rm -f conftest* 5271echo "$ac_t""$sigact_bad" 1>&6 5272fi 5273 5274 5275if test $ac_cv_header_termios_h = yes ; then 5276 case "$CFLAGS" in 5277 *-D_POSIX_SOURCE*) 5278 termios_bad=dunno ;; 5279 *) termios_bad=maybe ;; 5280 esac 5281 if test $termios_bad = maybe ; then 5282 echo $ac_n "checking whether termios.h needs _POSIX_SOURCE""... $ac_c" 1>&6 5283echo "configure:5284: checking whether termios.h needs _POSIX_SOURCE" >&5 5284 cat > conftest.$ac_ext <<EOF 5285#line 5286 "configure" 5286#include "confdefs.h" 5287#include <termios.h> 5288int main() { 5289struct termios foo; int x = foo.c_iflag 5290; return 0; } 5291EOF 5292if { (eval echo configure:5293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5293 rm -rf conftest* 5294 termios_bad=no 5295else 5296 echo "configure: failed program was:" >&5 5297 cat conftest.$ac_ext >&5 5298 rm -rf conftest* 5299 5300 cat > conftest.$ac_ext <<EOF 5301#line 5302 "configure" 5302#include "confdefs.h" 5303 5304#define _POSIX_SOURCE 5305#include <termios.h> 5306int main() { 5307struct termios foo; int x = foo.c_iflag 5308; return 0; } 5309EOF 5310if { (eval echo configure:5311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5311 rm -rf conftest* 5312 termios_bad=unknown 5313else 5314 echo "configure: failed program was:" >&5 5315 cat conftest.$ac_ext >&5 5316 rm -rf conftest* 5317 termios_bad=yes cat >> confdefs.h <<\EOF 5318#define SVR4_TERMIO 1 5319EOF 5320 5321fi 5322rm -f conftest* 5323 5324fi 5325rm -f conftest* 5326 echo "$ac_t""$termios_bad" 1>&6 5327 fi 5328fi 5329 5330 5331if test "$cross_compiling" = yes ; then 5332 echo "configure: warning: cross compiling: assume setvbuf params not reversed" 1>&2 5333else 5334 echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6 5335echo "configure:5336: checking whether setvbuf arguments are reversed" >&5 5336if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then 5337 echo $ac_n "(cached) $ac_c" 1>&6 5338else 5339 if test "$cross_compiling" = yes; then 5340 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } 5341else 5342 cat > conftest.$ac_ext <<EOF 5343#line 5344 "configure" 5344#include "confdefs.h" 5345#include <stdio.h> 5346/* If setvbuf has the reversed format, exit 0. */ 5347main () { 5348 /* This call has the arguments reversed. 5349 A reversed system may check and see that the address of main 5350 is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */ 5351 if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0) 5352 exit(1); 5353 putc('\r', stdout); 5354 exit(0); /* Non-reversed systems segv here. */ 5355} 5356EOF 5357if { (eval echo configure:5358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 5358then 5359 ac_cv_func_setvbuf_reversed=yes 5360else 5361 echo "configure: failed program was:" >&5 5362 cat conftest.$ac_ext >&5 5363 rm -fr conftest* 5364 ac_cv_func_setvbuf_reversed=no 5365fi 5366rm -fr conftest* 5367fi 5368 5369rm -f core core.* *.core 5370fi 5371 5372echo "$ac_t""$ac_cv_func_setvbuf_reversed" 1>&6 5373if test $ac_cv_func_setvbuf_reversed = yes; then 5374 cat >> confdefs.h <<\EOF 5375#define SETVBUF_REVERSED 1 5376EOF 5377 5378fi 5379 5380fi 5381echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 5382echo "configure:5383: checking return type of signal handlers" >&5 5383if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then 5384 echo $ac_n "(cached) $ac_c" 1>&6 5385else 5386 cat > conftest.$ac_ext <<EOF 5387#line 5388 "configure" 5388#include "confdefs.h" 5389#include <sys/types.h> 5390#include <signal.h> 5391#ifdef signal 5392#undef signal 5393#endif 5394#ifdef __cplusplus 5395extern "C" void (*signal (int, void (*)(int)))(int); 5396#else 5397void (*signal ()) (); 5398#endif 5399 5400int main() { 5401int i; 5402; return 0; } 5403EOF 5404if { (eval echo configure:5405: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5405 rm -rf conftest* 5406 ac_cv_type_signal=void 5407else 5408 echo "configure: failed program was:" >&5 5409 cat conftest.$ac_ext >&5 5410 rm -rf conftest* 5411 ac_cv_type_signal=int 5412fi 5413rm -f conftest* 5414fi 5415 5416echo "$ac_t""$ac_cv_type_signal" 1>&6 5417cat >> confdefs.h <<EOF 5418#define RETSIGTYPE $ac_cv_type_signal 5419EOF 5420 5421 5422 5423echo $ac_n "checking for type sigaction_t""... $ac_c" 1>&6 5424echo "configure:5425: checking for type sigaction_t" >&5 5425if eval "test \"`echo '$''{'cf_cv_type_sigaction'+set}'`\" = set"; then 5426 echo $ac_n "(cached) $ac_c" 1>&6 5427else 5428 5429 cat > conftest.$ac_ext <<EOF 5430#line 5431 "configure" 5431#include "confdefs.h" 5432 5433#include <signal.h> 5434int main() { 5435sigaction_t x 5436; return 0; } 5437EOF 5438if { (eval echo configure:5439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5439 rm -rf conftest* 5440 cf_cv_type_sigaction=yes 5441else 5442 echo "configure: failed program was:" >&5 5443 cat conftest.$ac_ext >&5 5444 rm -rf conftest* 5445 cf_cv_type_sigaction=no 5446fi 5447rm -f conftest* 5448fi 5449 5450echo "$ac_t""$cf_cv_type_sigaction" 1>&6 5451test $cf_cv_type_sigaction = yes && cat >> confdefs.h <<\EOF 5452#define HAVE_TYPE_SIGACTION 1 5453EOF 5454 5455 5456 5457echo $ac_n "checking declaration of size-change""... $ac_c" 1>&6 5458echo "configure:5459: checking declaration of size-change" >&5 5459if eval "test \"`echo '$''{'cf_cv_sizechange'+set}'`\" = set"; then 5460 echo $ac_n "(cached) $ac_c" 1>&6 5461else 5462 5463 cf_cv_sizechange=unknown 5464 cf_save_CFLAGS="$CFLAGS" 5465 5466for cf_opts in "" "NEED_PTEM_H" 5467do 5468 5469 CFLAGS="$cf_save_CFLAGS" 5470 test -n "$cf_opts" && CFLAGS="$CFLAGS -D$cf_opts" 5471 cat > conftest.$ac_ext <<EOF 5472#line 5473 "configure" 5473#include "confdefs.h" 5474#include <sys/types.h> 5475#if HAVE_TERMIOS_H 5476#include <termios.h> 5477#else 5478#if HAVE_TERMIO_H 5479#include <termio.h> 5480#endif 5481#endif 5482#if NEED_PTEM_H 5483/* This is a workaround for SCO: they neglected to define struct winsize in 5484 * termios.h -- it's only in termio.h and ptem.h 5485 */ 5486#include <sys/stream.h> 5487#include <sys/ptem.h> 5488#endif 5489#if !defined(sun) || !defined(HAVE_TERMIOS_H) 5490#include <sys/ioctl.h> 5491#endif 5492 5493int main() { 5494 5495#ifdef TIOCGSIZE 5496 struct ttysize win; /* FIXME: what system is this? */ 5497 int y = win.ts_lines; 5498 int x = win.ts_cols; 5499#else 5500#ifdef TIOCGWINSZ 5501 struct winsize win; 5502 int y = win.ws_row; 5503 int x = win.ws_col; 5504#else 5505 no TIOCGSIZE or TIOCGWINSZ 5506#endif /* TIOCGWINSZ */ 5507#endif /* TIOCGSIZE */ 5508 5509; return 0; } 5510EOF 5511if { (eval echo configure:5512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5512 rm -rf conftest* 5513 cf_cv_sizechange=yes 5514else 5515 echo "configure: failed program was:" >&5 5516 cat conftest.$ac_ext >&5 5517 rm -rf conftest* 5518 cf_cv_sizechange=no 5519fi 5520rm -f conftest* 5521 5522 CFLAGS="$cf_save_CFLAGS" 5523 if test "$cf_cv_sizechange" = yes ; then 5524 echo "size-change succeeded ($cf_opts)" >&5 5525 test -n "$cf_opts" && cat >> confdefs.h <<EOF 5526#define $cf_opts 1 5527EOF 5528 5529 break 5530 fi 5531done 5532 5533fi 5534 5535echo "$ac_t""$cf_cv_sizechange" 1>&6 5536test $cf_cv_sizechange != no && cat >> confdefs.h <<\EOF 5537#define HAVE_SIZECHANGE 1 5538EOF 5539 5540 5541 5542echo $ac_n "checking for memmove""... $ac_c" 1>&6 5543echo "configure:5544: checking for memmove" >&5 5544if eval "test \"`echo '$''{'ac_cv_func_memmove'+set}'`\" = set"; then 5545 echo $ac_n "(cached) $ac_c" 1>&6 5546else 5547 cat > conftest.$ac_ext <<EOF 5548#line 5549 "configure" 5549#include "confdefs.h" 5550/* System header to define __stub macros and hopefully few prototypes, 5551 which can conflict with char memmove(); below. */ 5552#include <assert.h> 5553/* Override any gcc2 internal prototype to avoid an error. */ 5554/* We use char because int might match the return type of a gcc2 5555 builtin and then its argument prototype would still apply. */ 5556char memmove(); 5557 5558int main() { 5559 5560/* The GNU C library defines this for functions which it implements 5561 to always fail with ENOSYS. Some functions are actually named 5562 something starting with __ and the normal name is an alias. */ 5563#if defined (__stub_memmove) || defined (__stub___memmove) 5564choke me 5565#else 5566memmove(); 5567#endif 5568 5569; return 0; } 5570EOF 5571if { (eval echo configure:5572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 5572 rm -rf conftest* 5573 eval "ac_cv_func_memmove=yes" 5574else 5575 echo "configure: failed program was:" >&5 5576 cat conftest.$ac_ext >&5 5577 rm -rf conftest* 5578 eval "ac_cv_func_memmove=no" 5579fi 5580rm -f conftest* 5581fi 5582 5583if eval "test \"`echo '$ac_cv_func_'memmove`\" = yes"; then 5584 echo "$ac_t""yes" 1>&6 5585 : 5586else 5587 echo "$ac_t""no" 1>&6 5588 5589echo $ac_n "checking for bcopy""... $ac_c" 1>&6 5590echo "configure:5591: checking for bcopy" >&5 5591if eval "test \"`echo '$''{'ac_cv_func_bcopy'+set}'`\" = set"; then 5592 echo $ac_n "(cached) $ac_c" 1>&6 5593else 5594 cat > conftest.$ac_ext <<EOF 5595#line 5596 "configure" 5596#include "confdefs.h" 5597/* System header to define __stub macros and hopefully few prototypes, 5598 which can conflict with char bcopy(); below. */ 5599#include <assert.h> 5600/* Override any gcc2 internal prototype to avoid an error. */ 5601/* We use char because int might match the return type of a gcc2 5602 builtin and then its argument prototype would still apply. */ 5603char bcopy(); 5604 5605int main() { 5606 5607/* The GNU C library defines this for functions which it implements 5608 to always fail with ENOSYS. Some functions are actually named 5609 something starting with __ and the normal name is an alias. */ 5610#if defined (__stub_bcopy) || defined (__stub___bcopy) 5611choke me 5612#else 5613bcopy(); 5614#endif 5615 5616; return 0; } 5617EOF 5618if { (eval echo configure:5619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 5619 rm -rf conftest* 5620 eval "ac_cv_func_bcopy=yes" 5621else 5622 echo "configure: failed program was:" >&5 5623 cat conftest.$ac_ext >&5 5624 rm -rf conftest* 5625 eval "ac_cv_func_bcopy=no" 5626fi 5627rm -f conftest* 5628fi 5629 5630if eval "test \"`echo '$ac_cv_func_'bcopy`\" = yes"; then 5631 echo "$ac_t""yes" 1>&6 5632 5633 echo $ac_n "checking if bcopy does overlapping moves""... $ac_c" 1>&6 5634echo "configure:5635: checking if bcopy does overlapping moves" >&5 5635if eval "test \"`echo '$''{'cf_cv_good_bcopy'+set}'`\" = set"; then 5636 echo $ac_n "(cached) $ac_c" 1>&6 5637else 5638 5639 if test "$cross_compiling" = yes; then 5640 cf_cv_good_bcopy=unknown 5641else 5642 cat > conftest.$ac_ext <<EOF 5643#line 5644 "configure" 5644#include "confdefs.h" 5645 5646int main() { 5647 static char data[] = "abcdefghijklmnopqrstuwwxyz"; 5648 char temp[40]; 5649 bcopy(data, temp, sizeof(data)); 5650 bcopy(temp+10, temp, 15); 5651 bcopy(temp+5, temp+15, 10); 5652 exit (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz")); 5653} 5654 5655EOF 5656if { (eval echo configure:5657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 5657then 5658 cf_cv_good_bcopy=yes 5659else 5660 echo "configure: failed program was:" >&5 5661 cat conftest.$ac_ext >&5 5662 rm -fr conftest* 5663 cf_cv_good_bcopy=no 5664fi 5665rm -fr conftest* 5666fi 5667 5668 5669fi 5670 5671echo "$ac_t""$cf_cv_good_bcopy" 1>&6 5672 5673else 5674 echo "$ac_t""no" 1>&6 5675cf_cv_good_bcopy=no 5676fi 5677 5678 if test $cf_cv_good_bcopy = yes ; then 5679 cat >> confdefs.h <<\EOF 5680#define USE_OK_BCOPY 1 5681EOF 5682 5683 else 5684 cat >> confdefs.h <<\EOF 5685#define USE_MY_MEMMOVE 1 5686EOF 5687 5688 fi 5689 5690fi 5691 5692 5693echo $ac_n "checking if poll really works""... $ac_c" 1>&6 5694echo "configure:5695: checking if poll really works" >&5 5695if eval "test \"`echo '$''{'cf_cv_working_poll'+set}'`\" = set"; then 5696 echo $ac_n "(cached) $ac_c" 1>&6 5697else 5698 5699if test "$cross_compiling" = yes; then 5700 cf_cv_working_poll=unknown 5701else 5702 cat > conftest.$ac_ext <<EOF 5703#line 5704 "configure" 5704#include "confdefs.h" 5705 5706#include <stdio.h> 5707#ifdef HAVE_POLL_H 5708#include <poll.h> 5709#else 5710#include <sys/poll.h> 5711#endif 5712int main() { 5713 struct pollfd myfds; 5714 int ret; 5715 5716 myfds.fd = 0; 5717 myfds.events = POLLIN; 5718 5719 ret = poll(&myfds, 1, 100); 5720 exit(ret != 0); 5721} 5722EOF 5723if { (eval echo configure:5724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 5724then 5725 cf_cv_working_poll=yes 5726else 5727 echo "configure: failed program was:" >&5 5728 cat conftest.$ac_ext >&5 5729 rm -fr conftest* 5730 cf_cv_working_poll=no 5731fi 5732rm -fr conftest* 5733fi 5734 5735fi 5736 5737echo "$ac_t""$cf_cv_working_poll" 1>&6 5738test "$cf_cv_working_poll" = "yes" && cat >> confdefs.h <<\EOF 5739#define HAVE_WORKING_POLL 1 5740EOF 5741 5742 5743 5744if test -z "$cf_user_CFLAGS" ; then 5745 CFLAGS=`echo ${CFLAGS} | sed -e 's/-g //' -e 's/-g$//'` 5746 CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's/-g //' -e 's/-g$//'` 5747fi 5748 5749 5750echo $ac_n "checking for builtin $CC bool type""... $ac_c" 1>&6 5751echo "configure:5752: checking for builtin $CC bool type" >&5 5752if eval "test \"`echo '$''{'cf_cv_cc_bool_type'+set}'`\" = set"; then 5753 echo $ac_n "(cached) $ac_c" 1>&6 5754else 5755 5756 cat > conftest.$ac_ext <<EOF 5757#line 5758 "configure" 5758#include "confdefs.h" 5759 5760#include <stdio.h> 5761#include <sys/types.h> 5762 5763int main() { 5764bool x = false 5765; return 0; } 5766EOF 5767if { (eval echo configure:5768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 5768 rm -rf conftest* 5769 cf_cv_cc_bool_type=1 5770else 5771 echo "configure: failed program was:" >&5 5772 cat conftest.$ac_ext >&5 5773 rm -rf conftest* 5774 cf_cv_cc_bool_type=0 5775fi 5776rm -f conftest* 5777 5778fi 5779 5780if test $cf_cv_cc_bool_type = 1 5781then echo "$ac_t""yes" 1>&6 5782else echo "$ac_t""no" 1>&6 5783fi 5784 5785if test -n "$CXX" ; then 5786 ac_ext=C 5787# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 5788ac_cpp='$CXXCPP $CPPFLAGS' 5789ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 5790ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 5791cross_compiling=$ac_cv_prog_cxx_cross 5792 5793 5794if test -n "$GXX" ; then 5795case $cf_cv_system_name in #(vi 5796os2*) #(vi 5797 cf_stdcpp_libname=stdcpp 5798 ;; 5799*) 5800 cf_stdcpp_libname=stdc++ 5801 ;; 5802esac 5803echo $ac_n "checking for library $cf_stdcpp_libname""... $ac_c" 1>&6 5804echo "configure:5805: checking for library $cf_stdcpp_libname" >&5 5805if eval "test \"`echo '$''{'cf_cv_libstdcpp'+set}'`\" = set"; then 5806 echo $ac_n "(cached) $ac_c" 1>&6 5807else 5808 5809 cf_save="$LIBS" 5810 LIBS="$LIBS -l$cf_stdcpp_libname" 5811cat > conftest.$ac_ext <<EOF 5812#line 5813 "configure" 5813#include "confdefs.h" 5814 5815#include <strstream.h> 5816int main() { 5817 5818char buf[80]; 5819strstreambuf foo(buf, sizeof(buf)) 5820 5821; return 0; } 5822EOF 5823if { (eval echo configure:5824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 5824 rm -rf conftest* 5825 cf_cv_libstdcpp=yes 5826else 5827 echo "configure: failed program was:" >&5 5828 cat conftest.$ac_ext >&5 5829 rm -rf conftest* 5830 cf_cv_libstdcpp=no 5831fi 5832rm -f conftest* 5833 LIBS="$cf_save" 5834 5835fi 5836 5837echo "$ac_t""$cf_cv_libstdcpp" 1>&6 5838test $cf_cv_libstdcpp = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname" 5839fi 5840 5841 case "`${CXX-g++} --version`" in 5842 1*|2.0-6*) 5843 cf_cxx_library=yes 5844 ;; 5845 2.7*) 5846 5847cf_cxx_library=unknown 5848case $cf_cv_system_name in #(vi 5849os2*) #(vi 5850 cf_gpp_libname=gpp 5851 ;; 5852*) 5853 cf_gpp_libname=g++ 5854 ;; 5855esac 5856if test $ac_cv_prog_gxx = yes; then 5857 echo $ac_n "checking for lib$cf_gpp_libname""... $ac_c" 1>&6 5858echo "configure:5859: checking for lib$cf_gpp_libname" >&5 5859 cf_save="$LIBS" 5860 LIBS="$LIBS -l$cf_gpp_libname" 5861 cat > conftest.$ac_ext <<EOF 5862#line 5863 "configure" 5863#include "confdefs.h" 5864 5865#include <$cf_gpp_libname/builtin.h> 5866 5867int main() { 5868two_arg_error_handler_t foo2 = lib_error_handler 5869; return 0; } 5870EOF 5871if { (eval echo configure:5872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 5872 rm -rf conftest* 5873 cf_cxx_library=yes 5874 CXXLIBS="$CXXLIBS -l$cf_gpp_libname" 5875 if test "$cf_gpp_libname" = cpp ; then 5876 cat >> confdefs.h <<\EOF 5877#define HAVE_GPP_BUILTIN_H 1 5878EOF 5879 5880 else 5881 cat >> confdefs.h <<\EOF 5882#define HAVE_GXX_BUILTIN_H 1 5883EOF 5884 5885 fi 5886else 5887 echo "configure: failed program was:" >&5 5888 cat conftest.$ac_ext >&5 5889 rm -rf conftest* 5890 cat > conftest.$ac_ext <<EOF 5891#line 5892 "configure" 5892#include "confdefs.h" 5893 5894#include <builtin.h> 5895 5896int main() { 5897two_arg_error_handler_t foo2 = lib_error_handler 5898; return 0; } 5899EOF 5900if { (eval echo configure:5901: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 5901 rm -rf conftest* 5902 cf_cxx_library=yes 5903 CXXLIBS="$CXXLIBS -l$cf_gpp_libname" 5904 cat >> confdefs.h <<\EOF 5905#define HAVE_BUILTIN_H 1 5906EOF 5907 5908else 5909 echo "configure: failed program was:" >&5 5910 cat conftest.$ac_ext >&5 5911 rm -rf conftest* 5912 cf_cxx_library=no 5913fi 5914rm -f conftest* 5915fi 5916rm -f conftest* 5917 LIBS="$cf_save" 5918 echo "$ac_t""$cf_cxx_library" 1>&6 5919fi 5920 5921 ;; 5922 *) 5923 cf_cxx_library=no 5924 ;; 5925 esac 5926 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6 5927echo "configure:5928: checking how to run the C++ preprocessor" >&5 5928if test -z "$CXXCPP"; then 5929if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then 5930 echo $ac_n "(cached) $ac_c" 1>&6 5931else 5932 ac_ext=C 5933# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 5934ac_cpp='$CXXCPP $CPPFLAGS' 5935ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 5936ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 5937cross_compiling=$ac_cv_prog_cxx_cross 5938 CXXCPP="${CXX-g++} -E" 5939 cat > conftest.$ac_ext <<EOF 5940#line 5941 "configure" 5941#include "confdefs.h" 5942#include <stdlib.h> 5943EOF 5944ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 5945{ (eval echo configure:5946: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 5946ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 5947if test -z "$ac_err"; then 5948 : 5949else 5950 echo "$ac_err" >&5 5951 echo "configure: failed program was:" >&5 5952 cat conftest.$ac_ext >&5 5953 rm -rf conftest* 5954 CXXCPP=/lib/cpp 5955fi 5956rm -f conftest* 5957 ac_cv_prog_CXXCPP="$CXXCPP" 5958ac_ext=C 5959# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 5960ac_cpp='$CXXCPP $CPPFLAGS' 5961ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 5962ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 5963cross_compiling=$ac_cv_prog_cxx_cross 5964fi 5965fi 5966CXXCPP="$ac_cv_prog_CXXCPP" 5967echo "$ac_t""$CXXCPP" 1>&6 5968 5969for ac_hdr in typeinfo 5970do 5971ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` 5972echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 5973echo "configure:5974: checking for $ac_hdr" >&5 5974if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 5975 echo $ac_n "(cached) $ac_c" 1>&6 5976else 5977 cat > conftest.$ac_ext <<EOF 5978#line 5979 "configure" 5979#include "confdefs.h" 5980#include <$ac_hdr> 5981EOF 5982ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 5983{ (eval echo configure:5984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 5984ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 5985if test -z "$ac_err"; then 5986 rm -rf conftest* 5987 eval "ac_cv_header_$ac_safe=yes" 5988else 5989 echo "$ac_err" >&5 5990 echo "configure: failed program was:" >&5 5991 cat conftest.$ac_ext >&5 5992 rm -rf conftest* 5993 eval "ac_cv_header_$ac_safe=no" 5994fi 5995rm -f conftest* 5996fi 5997if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then 5998 echo "$ac_t""yes" 1>&6 5999 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` 6000 cat >> confdefs.h <<EOF 6001#define $ac_tr_hdr 1 6002EOF 6003 6004else 6005 echo "$ac_t""no" 1>&6 6006fi 6007done 6008 6009 6010echo $ac_n "checking for builtin $CXX bool type""... $ac_c" 1>&6 6011echo "configure:6012: checking for builtin $CXX bool type" >&5 6012if eval "test \"`echo '$''{'cf_cv_builtin_bool'+set}'`\" = set"; then 6013 echo $ac_n "(cached) $ac_c" 1>&6 6014else 6015 6016 cat > conftest.$ac_ext <<EOF 6017#line 6018 "configure" 6018#include "confdefs.h" 6019 6020#include <stdio.h> 6021#include <sys/types.h> 6022 6023int main() { 6024bool x = false 6025; return 0; } 6026EOF 6027if { (eval echo configure:6028: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 6028 rm -rf conftest* 6029 cf_cv_builtin_bool=1 6030else 6031 echo "configure: failed program was:" >&5 6032 cat conftest.$ac_ext >&5 6033 rm -rf conftest* 6034 cf_cv_builtin_bool=0 6035fi 6036rm -f conftest* 6037 6038fi 6039 6040if test $cf_cv_builtin_bool = 1 6041then echo "$ac_t""yes" 1>&6 6042else echo "$ac_t""no" 1>&6 6043fi 6044 6045 6046echo $ac_n "checking for size of $CXX bool""... $ac_c" 1>&6 6047echo "configure:6048: checking for size of $CXX bool" >&5 6048if eval "test \"`echo '$''{'cf_cv_type_of_bool'+set}'`\" = set"; then 6049 echo $ac_n "(cached) $ac_c" 1>&6 6050else 6051 6052 rm -f cf_test.out 6053 if test "$cross_compiling" = yes; then 6054 cf_cv_type_of_bool=unknown 6055else 6056 cat > conftest.$ac_ext <<EOF 6057#line 6058 "configure" 6058#include "confdefs.h" 6059#ifdef __cplusplus 6060extern "C" void exit(int); 6061#endif 6062 6063#include <stdlib.h> 6064#include <stdio.h> 6065#if HAVE_GXX_BUILTIN_H 6066#include <g++/builtin.h> 6067#elif HAVE_GPP_BUILTIN_H 6068#include <gpp/builtin.h> 6069#elif HAVE_BUILTIN_H 6070#include <builtin.h> 6071#endif 6072main() 6073{ 6074 FILE *fp = fopen("cf_test.out", "w"); 6075 if (fp != 0) { 6076 bool x = true; 6077 if ((bool)(-x) >= 0) 6078 fputs("unsigned ", fp); 6079 if (sizeof(x) == sizeof(int)) fputs("int", fp); 6080 else if (sizeof(x) == sizeof(char)) fputs("char", fp); 6081 else if (sizeof(x) == sizeof(short))fputs("short",fp); 6082 else if (sizeof(x) == sizeof(long)) fputs("long", fp); 6083 fclose(fp); 6084 } 6085 exit(0); 6086} 6087 6088EOF 6089if { (eval echo configure:6090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 6090then 6091 cf_cv_type_of_bool=`cat cf_test.out` 6092else 6093 echo "configure: failed program was:" >&5 6094 cat conftest.$ac_ext >&5 6095 rm -fr conftest* 6096 cf_cv_type_of_bool=unknown 6097fi 6098rm -fr conftest* 6099fi 6100 6101 6102fi 6103 6104 rm -f cf_test.out 6105echo "$ac_t""$cf_cv_type_of_bool" 1>&6 6106if test "$cf_cv_type_of_bool" = unknown ; then 6107 echo "configure: warning: Assuming unsigned for type of bool" 1>&2 6108 cf_cv_type_of_bool=unsigned 6109fi 6110 6111 6112echo $ac_n "checking for special defines needed for etip.h""... $ac_c" 1>&6 6113echo "configure:6114: checking for special defines needed for etip.h" >&5 6114cf_save_CXXFLAGS="$CXXFLAGS" 6115cf_result="none" 6116for cf_math in "" MATH_H 6117do 6118for cf_excp in "" MATH_EXCEPTION 6119do 6120 CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu" 6121 test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}" 6122 test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}" 6123cat > conftest.$ac_ext <<EOF 6124#line 6125 "configure" 6125#include "confdefs.h" 6126 6127#include <etip.h.in> 6128 6129int main() { 6130 6131; return 0; } 6132EOF 6133if { (eval echo configure:6134: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 6134 rm -rf conftest* 6135 6136 test -n "$cf_math" && cat >> confdefs.h <<EOF 6137#define ETIP_NEEDS_${cf_math} 1 6138EOF 6139 6140 test -n "$cf_excp" && cat >> confdefs.h <<EOF 6141#define ETIP_NEEDS_${cf_excp} 1 6142EOF 6143 6144 cf_result="$cf_math $cf_excp" 6145 break 6146 6147else 6148 echo "configure: failed program was:" >&5 6149 cat conftest.$ac_ext >&5 6150fi 6151rm -f conftest* 6152done 6153done 6154echo "$ac_t""$cf_result" 1>&6 6155CXXFLAGS="$cf_save_CXXFLAGS" 6156 6157 6158if test -n "$CXX" ; then 6159echo $ac_n "checking if $CXX accepts parameter initialization""... $ac_c" 1>&6 6160echo "configure:6161: checking if $CXX accepts parameter initialization" >&5 6161if eval "test \"`echo '$''{'cf_cv_cpp_param_init'+set}'`\" = set"; then 6162 echo $ac_n "(cached) $ac_c" 1>&6 6163else 6164 6165 ac_ext=C 6166# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. 6167ac_cpp='$CXXCPP $CPPFLAGS' 6168ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' 6169ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' 6170cross_compiling=$ac_cv_prog_cxx_cross 6171 6172 if test "$cross_compiling" = yes; then 6173 cf_cv_cpp_param_init=unknown 6174else 6175 cat > conftest.$ac_ext <<EOF 6176#line 6177 "configure" 6177#include "confdefs.h" 6178#ifdef __cplusplus 6179extern "C" void exit(int); 6180#endif 6181 6182class TEST { 6183private: 6184 int value; 6185public: 6186 TEST(int x = 1); 6187 ~TEST(); 6188}; 6189 6190TEST::TEST(int x = 1) // some compilers do not like second initializer 6191{ 6192 value = x; 6193} 6194void main() { } 6195 6196EOF 6197if { (eval echo configure:6198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 6198then 6199 cf_cv_cpp_param_init=yes 6200else 6201 echo "configure: failed program was:" >&5 6202 cat conftest.$ac_ext >&5 6203 rm -fr conftest* 6204 cf_cv_cpp_param_init=no 6205fi 6206rm -fr conftest* 6207fi 6208 6209 6210fi 6211 6212echo "$ac_t""$cf_cv_cpp_param_init" 1>&6 6213fi 6214test "$cf_cv_cpp_param_init" = yes && cat >> confdefs.h <<\EOF 6215#define CPP_HAS_PARAM_INIT 1 6216EOF 6217 6218 6219 case $cf_cv_system_name in #(vi 6220 sco3.2v5*) 6221 CXXLDFLAGS="-u main" 6222 ;; 6223 esac 6224 6225else 6226 cf_cxx_library=no 6227 cf_cv_builtin_bool=1 6228 6229 # Just because we are not configuring against C++ right now does not 6230 # mean that a user will not want to use C++. Some distributors disable 6231 # the C++ portion of this configuration as a shortcut (or just to avoid 6232 # compiling the demo in the c++ directory). So we need a reasonable 6233 # default for the 'bool' type. 6234 # 6235 # Caveat: since the storage of the bool type is not standardized, it 6236 # may change. 6237 6238 echo $ac_n "checking for fallback type of bool""... $ac_c" 1>&6 6239echo "configure:6240: checking for fallback type of bool" >&5 6240 case "$host_cpu" in #(vi 6241 i?86) cf_cv_type_of_bool=char ;; #(vi 6242 *) cf_cv_type_of_bool=int ;; 6243 esac 6244 echo "$ac_t""$cf_cv_type_of_bool" 1>&6 6245fi 6246 6247 6248 6249 6250if test "$cf_with_ada" != "no" ; then 6251cf_ada_make=gnatmake 6252# Extract the first word of "$cf_ada_make", so it can be a program name with args. 6253set dummy $cf_ada_make; ac_word=$2 6254echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 6255echo "configure:6256: checking for $ac_word" >&5 6256if eval "test \"`echo '$''{'ac_cv_prog_gnat_exists'+set}'`\" = set"; then 6257 echo $ac_n "(cached) $ac_c" 1>&6 6258else 6259 if test -n "$gnat_exists"; then 6260 ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test. 6261else 6262 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 6263 ac_dummy="$PATH" 6264 for ac_dir in $ac_dummy; do 6265 test -z "$ac_dir" && ac_dir=. 6266 if test -f $ac_dir/$ac_word; then 6267 ac_cv_prog_gnat_exists="yes" 6268 break 6269 fi 6270 done 6271 IFS="$ac_save_ifs" 6272 test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no" 6273fi 6274fi 6275gnat_exists="$ac_cv_prog_gnat_exists" 6276if test -n "$gnat_exists"; then 6277 echo "$ac_t""$gnat_exists" 1>&6 6278else 6279 echo "$ac_t""no" 1>&6 6280fi 6281 6282if test "$ac_cv_prog_gnat_exists" = no; then 6283 cf_ada_make= 6284else 6285 6286cf_cv_gnat_version=`$cf_ada_make -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\ 6287 sed -e 's/[^0-9 \.]//g' | $AWK '{print $1;}'` 6288case $cf_cv_gnat_version in 6289 3.1[1-9]*|3.[2-9]*|[4-9].*) 6290 cf_cv_prog_gnat_correct=yes 6291 ;; 6292 *) echo Unsupported GNAT version $cf_cv_gnat_version. Required is 3.11 or better. Disabling Ada95 binding. 6293 cf_cv_prog_gnat_correct=no 6294 ;; 6295esac 6296case $cf_cv_gnat_version in 6297 3.1*|[4-9].*) 6298 cf_compile_generics=generics 6299 cf_generic_objects="\$(GENOBJS)" 6300 ;; 6301 *) cf_compile_generics= 6302 cf_generic_objects= 6303 ;; 6304esac 6305 6306 # Extract the first word of "m4", so it can be a program name with args. 6307set dummy m4; ac_word=$2 6308echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 6309echo "configure:6310: checking for $ac_word" >&5 6310if eval "test \"`echo '$''{'ac_cv_prog_m4_exists'+set}'`\" = set"; then 6311 echo $ac_n "(cached) $ac_c" 1>&6 6312else 6313 if test -n "$m4_exists"; then 6314 ac_cv_prog_m4_exists="$m4_exists" # Let the user override the test. 6315else 6316 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 6317 ac_dummy="$PATH" 6318 for ac_dir in $ac_dummy; do 6319 test -z "$ac_dir" && ac_dir=. 6320 if test -f $ac_dir/$ac_word; then 6321 ac_cv_prog_m4_exists="yes" 6322 break 6323 fi 6324 done 6325 IFS="$ac_save_ifs" 6326 test -z "$ac_cv_prog_m4_exists" && ac_cv_prog_m4_exists="no" 6327fi 6328fi 6329m4_exists="$ac_cv_prog_m4_exists" 6330if test -n "$m4_exists"; then 6331 echo "$ac_t""$m4_exists" 1>&6 6332else 6333 echo "$ac_t""no" 1>&6 6334fi 6335 6336 if test "$ac_cv_prog_m4_exists" = no; then 6337 cf_cv_prog_gnat_correct=no 6338 echo Ada95 binding required program m4 not found. Ada95 binding disabled. 6339 fi 6340 if test "$cf_cv_prog_gnat_correct" = yes; then 6341 echo $ac_n "checking if GNAT works""... $ac_c" 1>&6 6342echo "configure:6343: checking if GNAT works" >&5 6343 6344rm -f conftest* 6345cat >>conftest.ads <<CF_EOF 6346procedure conftest; 6347CF_EOF 6348cat >>conftest.adb <<CF_EOF 6349with Text_IO; 6350with GNAT.OS_Lib; 6351procedure conftest is 6352begin 6353 Text_IO.Put ("Hello World"); 6354 Text_IO.New_Line; 6355 GNAT.OS_Lib.OS_Exit (0); 6356end conftest; 6357CF_EOF 6358if ( $cf_ada_make conftest 1>&5 2>&1 ) ; then 6359 if ( ./conftest 1>&5 2>&1 ) ; then 6360 cf_cv_prog_gnat_correct=yes 6361 else 6362 cf_cv_prog_gnat_correct=no 6363 fi 6364else 6365 cf_cv_prog_gnat_correct=no 6366fi 6367rm -f conftest* 6368 6369 echo "$ac_t""$cf_cv_prog_gnat_correct" 1>&6 6370 fi 6371fi 6372if test "$cf_cv_prog_gnat_correct" = yes; then 6373 ADAFLAGS="-O3 -gnatpn $ADAFLAGS" 6374 6375 6376# Check whether --with-ada-compiler or --without-ada-compiler was given. 6377if test "${with_ada_compiler+set}" = set; then 6378 withval="$with_ada_compiler" 6379 cf_ada_compiler=$withval 6380else 6381 cf_ada_compiler=gnatmake 6382fi 6383 6384 6385 cf_ada_package=terminal_interface 6386 6387 6388 6389 6390 6391 6392 6393 6394 6395# Check whether --with-ada-include or --without-ada-include was given. 6396if test "${with_ada_include+set}" = set; then 6397 withval="$with_ada_include" 6398 : 6399else 6400 withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}" 6401fi 6402 6403case ".$withval" in #(vi 6404./*) #(vi 6405 ;; 6406.a-zA-Z:\\/*) #(vi OS/2 EMX 6407 ;; 6408.\${*prefix}*) #(vi 6409 eval withval="$withval" 6410 case ".$withval" in #(vi 6411 .NONE/*) 6412 withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@` 6413 ;; 6414 esac 6415 ;; #(vi 6416.NONE/*) 6417 withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@` 6418 ;; 6419*) 6420 { echo "configure: error: expected a pathname" 1>&2; exit 1; } 6421 ;; 6422esac 6423 6424eval ADA_INCLUDE="$withval" 6425 6426 6427 6428 6429# Check whether --with-ada-objects or --without-ada-objects was given. 6430if test "${with_ada_objects+set}" = set; then 6431 withval="$with_ada_objects" 6432 : 6433else 6434 withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}" 6435fi 6436 6437case ".$withval" in #(vi 6438./*) #(vi 6439 ;; 6440.a-zA-Z:\\/*) #(vi OS/2 EMX 6441 ;; 6442.\${*prefix}*) #(vi 6443 eval withval="$withval" 6444 case ".$withval" in #(vi 6445 .NONE/*) 6446 withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@` 6447 ;; 6448 esac 6449 ;; #(vi 6450.NONE/*) 6451 withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@` 6452 ;; 6453*) 6454 { echo "configure: error: expected a pathname" 1>&2; exit 1; } 6455 ;; 6456esac 6457 6458eval ADA_OBJECTS="$withval" 6459 6460 6461 6462# This has been fixed! 6463# if test $with_shared = no 6464# then 6465# AC_MSG_WARN(Ada95 applications will not link properly with static libraries) 6466# fi 6467fi 6468fi 6469 6470### It's not possible to appease gcc 2.6.3's conversion-warnings if we're 6471### using a 'char' for bools. gcc 2.7.0's conversion-warnings are broken too 6472### badly to consider using for development purposes, but 2.5.8 is okay. 6473if test -n "$with_warnings"; then 6474 if test -n "$GCC"; then 6475 case "`$CC --version`" in 6476 2.6.3) 6477 if test "$cf_cv_type_of_bool" != "char"; then 6478 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wconversion" 6479 fi 6480 ;; 6481 2.5*) 6482 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wconversion" 6483 ;; 6484 esac 6485 fi 6486fi 6487 6488### Construct the library-subsets, if any, from this set of keywords: 6489### none, base, ext_funcs, termlib. 6490echo $ac_n "checking for library subsets""... $ac_c" 1>&6 6491echo "configure:6492: checking for library subsets" >&5 6492if test "$with_termlib" = yes ; then 6493 LIB_SUBSETS="termlib " 6494else 6495 LIB_SUBSETS="termlib+" 6496fi 6497LIB_SUBSETS="${LIB_SUBSETS}base" 6498test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs" 6499echo "$ac_t""$LIB_SUBSETS" 1>&6 6500 6501LIB_TRACING=DEBUG 6502case "$CFLAGS" in 6503*-DTRACE*) 6504 LIB_TRACING=all 6505 ;; 6506esac 6507 6508### Construct the list of include-directories to be generated 6509 6510CPPFLAGS="$CPPFLAGS -I. -I../include" 6511if test "$srcdir" != "."; then 6512 CPPFLAGS="$CPPFLAGS -I\$(srcdir)/../include" 6513fi 6514if test -z "$GCC"; then 6515 CPPFLAGS="$CPPFLAGS -I\$(includedir)" 6516elif test "$includedir" != "/usr/include"; then 6517 if test "$includedir" = '${prefix}/include' ; then 6518 if test $prefix != /usr ; then 6519 CPPFLAGS="$CPPFLAGS -I\$(includedir)" 6520 fi 6521 else 6522 CPPFLAGS="$CPPFLAGS -I\$(includedir)" 6523 fi 6524fi 6525 6526 6527 6528ACPPFLAGS="$ACPPFLAGS -I. -I../../include" 6529if test "$srcdir" != "."; then 6530 ACPPFLAGS="$ACPPFLAGS -I\$(srcdir)/../../include" 6531fi 6532if test -z "$GCC"; then 6533 ACPPFLAGS="$ACPPFLAGS -I\$(includedir)" 6534elif test "$includedir" != "/usr/include"; then 6535 if test "$includedir" = '${prefix}/include' ; then 6536 if test $prefix != /usr ; then 6537 ACPPFLAGS="$ACPPFLAGS -I\$(includedir)" 6538 fi 6539 else 6540 ACPPFLAGS="$ACPPFLAGS -I\$(includedir)" 6541 fi 6542fi 6543 6544 6545 6546### Build up pieces for makefile rules 6547echo $ac_n "checking default library suffix""... $ac_c" 1>&6 6548echo "configure:6549: checking default library suffix" >&5 6549 6550 case $DFT_LWR_MODEL in 6551 normal) DFT_ARG_SUFFIX='' ;; 6552 debug) DFT_ARG_SUFFIX='_g' ;; 6553 profile) DFT_ARG_SUFFIX='_p' ;; 6554 shared) DFT_ARG_SUFFIX='' ;; 6555 esac 6556 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}" 6557echo "$ac_t""$DFT_ARG_SUFFIX" 1>&6 6558 6559echo $ac_n "checking default library-dependency suffix""... $ac_c" 1>&6 6560echo "configure:6561: checking default library-dependency suffix" >&5 6561 6562 6563 case $DFT_LWR_MODEL in 6564 normal) DFT_DEP_SUFFIX='.a' ;; 6565 debug) DFT_DEP_SUFFIX='_g.a' ;; 6566 profile) DFT_DEP_SUFFIX='_p.a' ;; 6567 shared) 6568 case $cf_cv_system_name in 6569 openbsd*|freebsd*) 6570 DFT_DEP_SUFFIX='.so.$(REL_VERSION)' ;; 6571 netbsd*) 6572 if test -f /usr/libexec/ld.elf_so; then 6573 DFT_DEP_SUFFIX='.so' 6574 else 6575 DFT_DEP_SUFFIX='.so.$(REL_VERSION)' 6576 fi 6577 ;; 6578 hpux*) DFT_DEP_SUFFIX='.sl' ;; 6579 *) DFT_DEP_SUFFIX='.so' ;; 6580 esac 6581 esac 6582 test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}" 6583echo "$ac_t""$DFT_DEP_SUFFIX" 1>&6 6584 6585echo $ac_n "checking default object directory""... $ac_c" 1>&6 6586echo "configure:6587: checking default object directory" >&5 6587 6588 case $DFT_LWR_MODEL in 6589 normal) DFT_OBJ_SUBDIR='objects' ;; 6590 debug) DFT_OBJ_SUBDIR='obj_g' ;; 6591 profile) DFT_OBJ_SUBDIR='obj_p' ;; 6592 shared) DFT_OBJ_SUBDIR='obj_s' ;; 6593 esac 6594echo "$ac_t""$DFT_OBJ_SUBDIR" 1>&6 6595 6596TINFO_LIST="$SHLIB_LIST" 6597test $with_termlib = yes && SHLIB_LIST="$SHLIB_LIST -ltinfo${LIB_SUFFIX}" 6598 6599echo $ac_n "checking where we will install curses.h""... $ac_c" 1>&6 6600echo "configure:6601: checking where we will install curses.h" >&5 6601test "$with_overwrite" = no && \ 6602test "x$includedir" = 'x${prefix}/include' && \ 6603 includedir='$(prefix)/include/ncurses'${LIB_SUFFIX} 6604echo "$ac_t""$includedir" 1>&6 6605 6606 6607 6608 6609 6610### Set up low-level terminfo dependencies for makefiles. Note that we 6611### could override this. 6612if test "$with_termlib" = yes ; then 6613 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_NAME}${DFT_DEP_SUFFIX}" 6614 TEST_ARGS="-l${TINFO_NAME}${DFT_ARG_SUFFIX}" 6615fi 6616PROG_DEPS="$TEST_DEPS" 6617PROG_ARGS="$TEST_ARGS" 6618 6619### Construct the list of subdirectories for which we'll customize makefiles 6620### with the appropriate compile-rules. 6621 6622 6623echo $ac_n "checking for src modules""... $ac_c" 1>&6 6624echo "configure:6625: checking for src modules" >&5 6625 6626# dependencies and linker-arguments for test-programs 6627TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS" 6628TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS" 6629 6630# dependencies and linker-arguments for utility-programs 6631PROG_ARGS="$TEST_ARGS" 6632 6633cf_cv_src_modules= 6634for cf_dir in $modules_to_build 6635do 6636 if test -f $srcdir/$cf_dir/modules; then 6637 6638 # We may/may not have tack in the distribution, though the 6639 # makefile is. 6640 if test $cf_dir = tack ; then 6641 if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then 6642 continue 6643 fi 6644 fi 6645 6646 if test -z "$cf_cv_src_modules"; then 6647 cf_cv_src_modules=$cf_dir 6648 else 6649 cf_cv_src_modules="$cf_cv_src_modules $cf_dir" 6650 fi 6651 6652 # Make the ncurses_cfg.h file record the library interface files as 6653 # well. These are header files that are the same name as their 6654 # directory. Ncurses is the only library that does not follow 6655 # that pattern. 6656 if test $cf_dir = tack ; then 6657 continue 6658 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then 6659 6660cf_have_include=`echo $cf_dir | tr '[a-z]' '[A-Z]'` 6661 6662 cat >> confdefs.h <<EOF 6663#define HAVE_${cf_have_include}_H 1 6664EOF 6665 6666 cat >> confdefs.h <<EOF 6667#define HAVE_LIB${cf_have_include} 1 6668EOF 6669 6670 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS" 6671 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS" 6672 fi 6673 fi 6674done 6675echo "$ac_t""$cf_cv_src_modules" 1>&6 6676TEST_ARGS="-L${LIB_DIR} -L\$(libdir) $TEST_ARGS" 6677 6678 6679 6680PROG_ARGS="-L${LIB_DIR} -L\$(libdir) $PROG_ARGS" 6681 6682 6683SRC_SUBDIRS="man include" 6684for cf_dir in $cf_cv_src_modules 6685do 6686 SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir" 6687done 6688SRC_SUBDIRS="$SRC_SUBDIRS misc test" 6689test $cf_with_cxx_binding != no && SRC_SUBDIRS="$SRC_SUBDIRS c++" 6690 6691ADA_SUBDIRS= 6692if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then 6693 SRC_SUBDIRS="$SRC_SUBDIRS Ada95" 6694 ADA_SUBDIRS="gen src samples" 6695fi 6696 6697SUB_MAKEFILES= 6698for cf_dir in $SRC_SUBDIRS 6699do 6700 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile" 6701done 6702 6703if test -n "$ADA_SUBDIRS"; then 6704 for cf_dir in $ADA_SUBDIRS 6705 do 6706 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile" 6707 done 6708 6709fi 6710 6711 6712DIRS_TO_MAKE="lib" 6713for cf_item in $cf_list_models 6714do 6715 6716 case $cf_item in 6717 normal) cf_subdir='objects' ;; 6718 debug) cf_subdir='obj_g' ;; 6719 profile) cf_subdir='obj_p' ;; 6720 shared) cf_subdir='obj_s' ;; 6721 esac 6722 6723 DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir" 6724done 6725for cf_dir in $DIRS_TO_MAKE 6726do 6727 test ! -d $cf_dir && mkdir $cf_dir 6728done 6729 6730 6731 6732### Now that we're done running tests, add the compiler-warnings, if any 6733CFLAGS="$CFLAGS $EXTRA_CFLAGS" 6734 6735################################################################################ 6736trap '' 1 2 15 6737cat > confcache <<\EOF 6738# This file is a shell script that caches the results of configure 6739# tests run on this system so they can be shared between configure 6740# scripts and configure runs. It is not useful on other systems. 6741# If it contains results you don't want to keep, you may remove or edit it. 6742# 6743# By default, configure uses ./config.cache as the cache file, 6744# creating it if it does not exist already. You can give configure 6745# the --cache-file=FILE option to use a different cache file; that is 6746# what configure does when it calls configure scripts in 6747# subdirectories, so they share the cache. 6748# Giving --cache-file=/dev/null disables caching, for debugging configure. 6749# config.status only pays attention to the cache file if you give it the 6750# --recheck option to rerun configure. 6751# 6752EOF 6753# The following way of writing the cache mishandles newlines in values, 6754# but we know of no workaround that is simple, portable, and efficient. 6755# So, don't put newlines in cache variables' values. 6756# Ultrix sh set writes to stderr and can't be redirected directly, 6757# and sets the high bit in the cache file unless we assign to the vars. 6758(set) 2>&1 | 6759 case `(ac_space=' '; set | grep ac_space) 2>&1` in 6760 *ac_space=\ *) 6761 # `set' does not quote correctly, so add quotes (double-quote substitution 6762 # turns \\\\ into \\, and sed turns \\ into \). 6763 sed -n \ 6764 -e "s/'/'\\\\''/g" \ 6765 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" 6766 ;; 6767 *) 6768 # `set' quotes correctly as required by POSIX, so do not add quotes. 6769 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' 6770 ;; 6771 esac >> confcache 6772if cmp -s $cache_file confcache; then 6773 : 6774else 6775 if test -w $cache_file; then 6776 echo "updating cache $cache_file" 6777 cat confcache > $cache_file 6778 else 6779 echo "not updating unwritable cache $cache_file" 6780 fi 6781fi 6782rm -f confcache 6783 6784trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 6785 6786test "x$prefix" = xNONE && prefix=$ac_default_prefix 6787# Let make expand exec_prefix. 6788test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' 6789 6790# Any assignment to VPATH causes Sun make to only execute 6791# the first set of double-colon rules, so remove it if not needed. 6792# If there is a colon in the path, we need to keep it. 6793if test "x$srcdir" = x.; then 6794 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' 6795fi 6796 6797trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 6798 6799DEFS=-DHAVE_CONFIG_H 6800 6801# Without the "./", some shells look in PATH for config.status. 6802: ${CONFIG_STATUS=./config.status} 6803 6804echo creating $CONFIG_STATUS 6805rm -f $CONFIG_STATUS 6806cat > $CONFIG_STATUS <<EOF 6807#! /bin/sh 6808# Generated automatically by configure. 6809# Run this file to recreate the current configuration. 6810# This directory was configured as follows, 6811# on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 6812# 6813# $0 $ac_configure_args 6814# 6815# Compiler output produced by configure, useful for debugging 6816# configure, is in ./config.log if it exists. 6817 6818ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" 6819for ac_option 6820do 6821 case "\$ac_option" in 6822 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 6823 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" 6824 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; 6825 -version | --version | --versio | --versi | --vers | --ver | --ve | --v) 6826 echo "$CONFIG_STATUS generated by autoconf version 2.13.19990117" 6827 exit 0 ;; 6828 -help | --help | --hel | --he | --h) 6829 echo "\$ac_cs_usage"; exit 0 ;; 6830 *) echo "\$ac_cs_usage"; exit 1 ;; 6831 esac 6832done 6833 6834ac_given_srcdir=$srcdir 6835ac_given_INSTALL="$INSTALL" 6836 6837trap 'rm -fr `echo "\ 6838 include/MKterm.h.awk \ 6839 include/curses.h \ 6840 include/termcap.h \ 6841 include/unctrl.h \ 6842 $SUB_MAKEFILES \ 6843 Makefile include/ncurses_cfg.h:include/ncurses_cfg.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 6844EOF 6845cat >> $CONFIG_STATUS <<EOF 6846 6847# Protect against being on the right side of a sed subst in config.status. 6848sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; 6849 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF 6850$ac_vpsub 6851$extrasub 6852s%@SHELL@%$SHELL%g 6853s%@CFLAGS@%$CFLAGS%g 6854s%@CPPFLAGS@%$CPPFLAGS%g 6855s%@CXXFLAGS@%$CXXFLAGS%g 6856s%@FFLAGS@%$FFLAGS%g 6857s%@DEFS@%$DEFS%g 6858s%@LDFLAGS@%$LDFLAGS%g 6859s%@LIBS@%$LIBS%g 6860s%@exec_prefix@%$exec_prefix%g 6861s%@prefix@%$prefix%g 6862s%@program_transform_name@%$program_transform_name%g 6863s%@bindir@%$bindir%g 6864s%@sbindir@%$sbindir%g 6865s%@libexecdir@%$libexecdir%g 6866s%@datadir@%$datadir%g 6867s%@sysconfdir@%$sysconfdir%g 6868s%@sharedstatedir@%$sharedstatedir%g 6869s%@localstatedir@%$localstatedir%g 6870s%@libdir@%$libdir%g 6871s%@includedir@%$includedir%g 6872s%@oldincludedir@%$oldincludedir%g 6873s%@infodir@%$infodir%g 6874s%@mandir@%$mandir%g 6875s%@NCURSES_MAJOR@%$NCURSES_MAJOR%g 6876s%@NCURSES_MINOR@%$NCURSES_MINOR%g 6877s%@NCURSES_PATCH@%$NCURSES_PATCH%g 6878s%@cf_cv_rel_version@%$cf_cv_rel_version%g 6879s%@cf_cv_abi_version@%$cf_cv_abi_version%g 6880s%@cf_cv_cc_bool_type@%$cf_cv_cc_bool_type%g 6881s%@cf_cv_builtin_bool@%$cf_cv_builtin_bool%g 6882s%@cf_cv_type_of_bool@%$cf_cv_type_of_bool%g 6883s%@host@%$host%g 6884s%@host_alias@%$host_alias%g 6885s%@host_cpu@%$host_cpu%g 6886s%@host_vendor@%$host_vendor%g 6887s%@host_os@%$host_os%g 6888s%@CC@%$CC%g 6889s%@BUILD_CC@%$BUILD_CC%g 6890s%@CPP@%$CPP%g 6891s%@PROG_EXT@%$PROG_EXT%g 6892s%@LDCONFIG@%$LDCONFIG%g 6893s%@CXX@%$CXX%g 6894s%@AWK@%$AWK%g 6895s%@SET_MAKE@%$SET_MAKE%g 6896s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g 6897s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g 6898s%@INSTALL_DATA@%$INSTALL_DATA%g 6899s%@LN_S@%$LN_S%g 6900s%@RANLIB@%$RANLIB%g 6901s%@LINT@%$LINT%g 6902s%@MAN@%$MAN%g 6903s%@LINT_OPTS@%$LINT_OPTS%g 6904s%@LD@%$LD%g 6905s%@AR@%$AR%g 6906s%@AR_OPTS@%$AR_OPTS%g 6907s%@cf_cv_makeflags@%$cf_cv_makeflags%g 6908s%@INSTALL_PREFIX@%$INSTALL_PREFIX%g 6909s%@cf_list_models@%$cf_list_models%g 6910s%@DFT_LWR_MODEL@%$DFT_LWR_MODEL%g 6911s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g 6912s%@TINFO_NAME@%$TINFO_NAME%g 6913s%@LIB_NAME@%$LIB_NAME%g 6914s%@LIB_PREFIX@%$LIB_PREFIX%g 6915s%@LIB_SUFFIX@%$LIB_SUFFIX%g 6916s%@CC_G_OPT@%$CC_G_OPT%g 6917s%@CXX_G_OPT@%$CXX_G_OPT%g 6918s%@LD_MODEL@%$LD_MODEL%g 6919s%@CC_SHARED_OPTS@%$CC_SHARED_OPTS%g 6920s%@LD_SHARED_OPTS@%$LD_SHARED_OPTS%g 6921s%@MK_SHARED_LIB@%$MK_SHARED_LIB%g 6922s%@LINK_PROGS@%$LINK_PROGS%g 6923s%@LINK_TESTS@%$LINK_TESTS%g 6924s%@EXTRA_LDFLAGS@%$EXTRA_LDFLAGS%g 6925s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g 6926s%@LOCAL_LDFLAGS2@%$LOCAL_LDFLAGS2%g 6927s%@INSTALL_LIB@%$INSTALL_LIB%g 6928s%@FALLBACK_LIST@%$FALLBACK_LIST%g 6929s%@TERMINFO_DIRS@%$TERMINFO_DIRS%g 6930s%@NCURSES_CONST@%$NCURSES_CONST%g 6931s%@NCURSES_XNAMES@%$NCURSES_XNAMES%g 6932s%@ECHO_LINK@%$ECHO_LINK%g 6933s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g 6934s%@MATH_LIB@%$MATH_LIB%g 6935s%@cf_cv_typeof_chtype@%$cf_cv_typeof_chtype%g 6936s%@cf_cv_1UL@%$cf_cv_1UL%g 6937s%@cf_cv_shift_limit@%$cf_cv_shift_limit%g 6938s%@cf_cv_widec_shift@%$cf_cv_widec_shift%g 6939s%@OSPEED_TYPE@%$OSPEED_TYPE%g 6940s%@OSPEED_INCLUDES@%$OSPEED_INCLUDES%g 6941s%@CXXCPP@%$CXXCPP%g 6942s%@CXXLDFLAGS@%$CXXLDFLAGS%g 6943s%@CXXLIBS@%$CXXLIBS%g 6944s%@gnat_exists@%$gnat_exists%g 6945s%@m4_exists@%$m4_exists%g 6946s%@cf_ada_make@%$cf_ada_make%g 6947s%@cf_ada_compiler@%$cf_ada_compiler%g 6948s%@cf_ada_package@%$cf_ada_package%g 6949s%@ADAFLAGS@%$ADAFLAGS%g 6950s%@cf_compile_generics@%$cf_compile_generics%g 6951s%@cf_generic_objects@%$cf_generic_objects%g 6952s%@ADA_INCLUDE@%$ADA_INCLUDE%g 6953s%@ADA_OBJECTS@%$ADA_OBJECTS%g 6954s%@ACPPFLAGS@%$ACPPFLAGS%g 6955s%@DFT_ARG_SUFFIX@%$DFT_ARG_SUFFIX%g 6956s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g 6957s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g 6958s%@EXTRA_LIBS@%$EXTRA_LIBS%g 6959s%@TINFO_LIST@%$TINFO_LIST%g 6960s%@SHLIB_LIST@%$SHLIB_LIST%g 6961s%@TEST_DEPS@%$TEST_DEPS%g 6962s%@TEST_ARGS@%$TEST_ARGS%g 6963s%@PROG_ARGS@%$PROG_ARGS%g 6964s%@ADA_SUBDIRS@%$ADA_SUBDIRS%g 6965s%@DIRS_TO_MAKE@%$DIRS_TO_MAKE%g 6966 6967CEOF 6968EOF 6969 6970cat >> $CONFIG_STATUS <<\EOF 6971 6972# Split the substitutions into bite-sized pieces for seds with 6973# small command number limits, like on Digital OSF/1 and HP-UX. 6974ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. 6975ac_file=1 # Number of current file. 6976ac_beg=1 # First line for current file. 6977ac_end=$ac_max_sed_cmds # Line after last line for current file. 6978ac_more_lines=: 6979ac_sed_cmds="" 6980while $ac_more_lines; do 6981 if test $ac_beg -gt 1; then 6982 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file 6983 else 6984 sed "${ac_end}q" conftest.subs > conftest.s$ac_file 6985 fi 6986 if test ! -s conftest.s$ac_file; then 6987 ac_more_lines=false 6988 rm -f conftest.s$ac_file 6989 else 6990 if test -z "$ac_sed_cmds"; then 6991 ac_sed_cmds="sed -f conftest.s$ac_file" 6992 else 6993 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" 6994 fi 6995 ac_file=`expr $ac_file + 1` 6996 ac_beg=$ac_end 6997 ac_end=`expr $ac_end + $ac_max_sed_cmds` 6998 fi 6999done 7000if test -z "$ac_sed_cmds"; then 7001 ac_sed_cmds=cat 7002fi 7003EOF 7004 7005cat >> $CONFIG_STATUS <<EOF 7006 7007CONFIG_FILES=\${CONFIG_FILES-"\ 7008 include/MKterm.h.awk \ 7009 include/curses.h \ 7010 include/termcap.h \ 7011 include/unctrl.h \ 7012 $SUB_MAKEFILES \ 7013 Makefile"} 7014EOF 7015cat >> $CONFIG_STATUS <<\EOF 7016for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then 7017 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". 7018 case "$ac_file" in 7019 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` 7020 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; 7021 *) ac_file_in="${ac_file}.in" ;; 7022 esac 7023 7024 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. 7025 7026 # Remove last slash and all that follows it. Not all systems have dirname. 7027 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` 7028 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then 7029 # The file is in a subdirectory. 7030 test ! -d "$ac_dir" && mkdir "$ac_dir" 7031 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" 7032 # A "../" for each directory in $ac_dir_suffix. 7033 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` 7034 else 7035 ac_dir_suffix= ac_dots= 7036 fi 7037 7038 case "$ac_given_srcdir" in 7039 .) srcdir=. 7040 if test -z "$ac_dots"; then top_srcdir=. 7041 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; 7042 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; 7043 *) # Relative path. 7044 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" 7045 top_srcdir="$ac_dots$ac_given_srcdir" ;; 7046 esac 7047 7048 case "$ac_given_INSTALL" in 7049 [/$]*) INSTALL="$ac_given_INSTALL" ;; 7050 *) INSTALL="$ac_dots$ac_given_INSTALL" ;; 7051 esac 7052 7053 echo creating "$ac_file" 7054 rm -f "$ac_file" 7055 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." 7056 case "$ac_file" in 7057 *Makefile*) ac_comsub="1i\\ 7058# $configure_input" ;; 7059 *) ac_comsub= ;; 7060 esac 7061 7062 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` 7063 sed -e "$ac_comsub 7064s%@configure_input@%$configure_input%g 7065s%@srcdir@%$srcdir%g 7066s%@top_srcdir@%$top_srcdir%g 7067s%@INSTALL@%$INSTALL%g 7068" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file 7069fi; done 7070rm -f conftest.s* 7071 7072# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where 7073# NAME is the cpp macro being defined and VALUE is the value it is being given. 7074# 7075# ac_d sets the value in "#define NAME VALUE" lines. 7076ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' 7077ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' 7078ac_dC='\3' 7079ac_dD='%g' 7080# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". 7081ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' 7082ac_uB='\([ ]\)%\1#\2define\3' 7083ac_uC=' ' 7084ac_uD='\4%g' 7085# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". 7086ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' 7087ac_eB='$%\1#\2define\3' 7088ac_eC=' ' 7089ac_eD='%g' 7090 7091if test "${CONFIG_HEADERS+set}" != set; then 7092EOF 7093cat >> $CONFIG_STATUS <<EOF 7094 CONFIG_HEADERS="include/ncurses_cfg.h:include/ncurses_cfg.hin" 7095EOF 7096cat >> $CONFIG_STATUS <<\EOF 7097fi 7098for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then 7099 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". 7100 case "$ac_file" in 7101 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` 7102 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; 7103 *) ac_file_in="${ac_file}.in" ;; 7104 esac 7105 7106 echo creating $ac_file 7107 7108 rm -f conftest.frag conftest.in conftest.out 7109 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` 7110 cat $ac_file_inputs > conftest.in 7111 7112EOF 7113 7114 7115# Transform confdefs.h into a list of #define's. We won't use it as a sed 7116# script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to 7117# be either 'cat' or 'sort'. 7118sort confdefs.h >conftest.vals 7119 7120# Break up conftest.vals because some shells have a limit on 7121# the size of here documents, and old seds have small limits too. 7122 7123rm -f conftest.tail 7124echo ' rm -f conftest.frag' >> $CONFIG_STATUS 7125while : 7126do 7127 ac_lines=`grep -c . conftest.vals` 7128 # grep -c gives empty output for an empty file on some AIX systems. 7129 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi 7130 # Write chunks of a limited-size here document to conftest.frag. 7131 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS 7132 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS 7133 echo 'CEOF' >> $CONFIG_STATUS 7134 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail 7135 rm -f conftest.vals 7136 mv conftest.tail conftest.vals 7137done 7138rm -f conftest.vals 7139 7140# Run sed to substitute the contents of conftest.frag into conftest.in at the 7141# marker @DEFS@. 7142echo ' cat >> conftest.edit <<CEOF 7143/@DEFS@/r conftest.frag 7144/@DEFS@/d 7145CEOF 7146sed -f conftest.edit conftest.in > conftest.out 7147rm -f conftest.in 7148mv conftest.out conftest.in 7149rm -f conftest.edit conftest.frag 7150' >> $CONFIG_STATUS 7151 7152 7153cat >> $CONFIG_STATUS <<\EOF 7154 rm -f conftest.frag conftest.h 7155 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h 7156 cat conftest.in >> conftest.h 7157 rm -f conftest.in 7158 if cmp -s $ac_file conftest.h 2>/dev/null; then 7159 echo "$ac_file is unchanged" 7160 rm -f conftest.h 7161 else 7162 # Remove last slash and all that follows it. Not all systems have dirname. 7163 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` 7164 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then 7165 # The file is in a subdirectory. 7166 test ! -d "$ac_dir" && mkdir "$ac_dir" 7167 fi 7168 rm -f $ac_file 7169 mv conftest.h $ac_file 7170 fi 7171fi; done 7172 7173EOF 7174cat >> $CONFIG_STATUS <<EOF 7175# Extra initialization commands, if any 7176 7177### Special initialization commands, used to pass information from the 7178### configuration-run into config.status 7179 7180AWK="$AWK" 7181CF_LIST_MODELS="$cf_list_models" 7182DFT_LWR_MODEL="$DFT_LWR_MODEL" 7183LDCONFIG="$LDCONFIG" 7184LIB_NAME="$LIB_NAME" 7185LIB_SUFFIX="$LIB_SUFFIX" 7186LIB_SUBSETS="$LIB_SUBSETS" 7187LIB_TRACING="$LIB_TRACING" 7188SRC_SUBDIRS="$SRC_SUBDIRS" 7189TINFO_NAME="$TINFO_NAME" 7190WITH_ECHO="$with_echo" 7191WITH_OVERWRITE="$with_overwrite" 7192cf_cv_abi_version="$cf_cv_abi_version" 7193cf_cv_do_symlinks="$cf_cv_do_symlinks" 7194cf_cv_rel_version="$cf_cv_rel_version" 7195cf_cv_rm_so_locs="$cf_cv_rm_so_locs" 7196cf_cv_system_name="$cf_cv_system_name" 7197cf_with_cxx_binding="$cf_with_cxx_binding" 7198target="$target" 7199 7200 7201EOF 7202cat >> $CONFIG_STATUS <<\EOF 7203# Extra commands, if any 7204 7205 7206 7207 case $cf_cv_system_name in 7208 os2) LIB_PREFIX='' ;; 7209 *) LIB_PREFIX='lib' ;; 7210 esac 7211cf_prefix=$LIB_PREFIX 7212 7213 7214 7215for cf_dir in $SRC_SUBDIRS 7216do 7217 if test -f $srcdir/$cf_dir/modules; then 7218 7219 cf_libs_to_make= 7220 for cf_item in $CF_LIST_MODELS 7221 do 7222 7223 7224 case $cf_item in 7225 normal) cf_suffix='.a' ;; 7226 debug) cf_suffix='_g.a' ;; 7227 profile) cf_suffix='_p.a' ;; 7228 shared) 7229 case $cf_cv_system_name in 7230 openbsd*|freebsd*) 7231 cf_suffix='.so.$(REL_VERSION)' ;; 7232 netbsd*) 7233 if test -f /usr/libexec/ld.elf_so; then 7234 cf_suffix='.so' 7235 else 7236 cf_suffix='.so.$(REL_VERSION)' 7237 fi 7238 ;; 7239 hpux*) cf_suffix='.sl' ;; 7240 *) cf_suffix='.so' ;; 7241 esac 7242 esac 7243 test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}" 7244 7245 cf_libs_to_make="$cf_libs_to_make ../lib/${cf_prefix}${cf_dir}${cf_suffix}" 7246 done 7247 7248 if test $cf_dir = ncurses ; then 7249 case "$LIB_SUBSETS" in 7250 termlib+*) #(vi 7251 ;; 7252 *) #(vi 7253 cf_item=`echo $cf_libs_to_make |sed -e s/$LIB_NAME/$TINFO_NAME/g` 7254 cf_libs_to_make="$cf_item $cf_libs_to_make" 7255 ;; 7256 esac 7257 fi 7258 7259 sed -e "s@\@LIBS_TO_MAKE\@@$cf_libs_to_make@" \ 7260 $cf_dir/Makefile >$cf_dir/Makefile.out 7261 mv $cf_dir/Makefile.out $cf_dir/Makefile 7262 7263 $AWK -f $srcdir/mk-0th.awk \ 7264 name=$cf_dir \ 7265 $srcdir/$cf_dir/modules >>$cf_dir/Makefile 7266 7267 for cf_item in $CF_LIST_MODELS 7268 do 7269 echo 'Appending rules for '$cf_item' model ('$cf_dir')' 7270 7271CF_ITEM=`echo $cf_item | tr '[a-z]' '[A-Z]'` 7272 7273 7274 7275 case $cf_item in 7276 normal) cf_suffix='.a' ;; 7277 debug) cf_suffix='_g.a' ;; 7278 profile) cf_suffix='_p.a' ;; 7279 shared) 7280 case $cf_cv_system_name in 7281 openbsd*|freebsd*) 7282 cf_suffix='.so.$(REL_VERSION)' ;; 7283 netbsd*) 7284 if test -f /usr/libexec/ld.elf_so; then 7285 cf_suffix='.so' 7286 else 7287 cf_suffix='.so.$(REL_VERSION)' 7288 fi 7289 ;; 7290 hpux*) cf_suffix='.sl' ;; 7291 *) cf_suffix='.so' ;; 7292 esac 7293 esac 7294 test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}" 7295 7296 7297 case $cf_item in 7298 normal) cf_subdir='objects' ;; 7299 debug) cf_subdir='obj_g' ;; 7300 profile) cf_subdir='obj_p' ;; 7301 shared) cf_subdir='obj_s' ;; 7302 esac 7303 7304 7305 # These dependencies really are for development, not 7306 # builds, but they are useful in porting, too. 7307 cf_depend="../include/ncurses_cfg.h" 7308 if test "$srcdir" = "."; then 7309 cf_reldir="." 7310 else 7311 cf_reldir="\$(srcdir)" 7312 fi 7313 7314 if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then 7315 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h" 7316 elif test -f $srcdir/$cf_dir/curses.priv.h; then 7317 cf_depend="$cf_depend $cf_reldir/curses.priv.h" 7318 fi 7319 7320 for cf_subset in $LIB_SUBSETS 7321 do 7322 $AWK -f $srcdir/mk-1st.awk \ 7323 name=$cf_dir \ 7324 traces=$LIB_TRACING \ 7325 MODEL=$CF_ITEM \ 7326 model=$cf_subdir \ 7327 prefix=$cf_prefix \ 7328 suffix=$cf_suffix \ 7329 subset=$cf_subset \ 7330 DoLinks=$cf_cv_do_symlinks \ 7331 rmSoLocs=$cf_cv_rm_so_locs \ 7332 ldconfig="$LDCONFIG" \ 7333 overwrite=$WITH_OVERWRITE \ 7334 depend="$cf_depend" \ 7335 target="$target" \ 7336 $srcdir/$cf_dir/modules >>$cf_dir/Makefile 7337 test $cf_dir = ncurses && WITH_OVERWRITE=no 7338 $AWK -f $srcdir/mk-2nd.awk \ 7339 name=$cf_dir \ 7340 traces=$LIB_TRACING \ 7341 MODEL=$CF_ITEM \ 7342 model=$cf_subdir \ 7343 subset=$cf_subset \ 7344 srcdir=$srcdir \ 7345 echo=$WITH_ECHO \ 7346 $srcdir/$cf_dir/modules >>$cf_dir/Makefile 7347 done 7348 done 7349 fi 7350 7351 echo ' cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) $@' >>Makefile 7352done 7353 7354for cf_dir in $SRC_SUBDIRS 7355do 7356 if test -f $cf_dir/Makefile ; then 7357 case "$cf_dir" in 7358 Ada95) #(vi 7359 echo 'libs \' >> Makefile 7360 echo 'install.libs \' >> Makefile 7361 echo 'uninstall.libs ::' >> Makefile 7362 echo ' cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) $@' >> Makefile 7363 ;; 7364 esac 7365 fi 7366 7367 if test -f $srcdir/$cf_dir/modules; then 7368 echo >> Makefile 7369 if test -f $srcdir/$cf_dir/headers; then 7370cat >> Makefile <<CF_EOF 7371install.includes \\ 7372uninstall.includes \\ 7373CF_EOF 7374 fi 7375if test "$cf_dir" != "c++" ; then 7376echo 'lint \' >> Makefile 7377fi 7378cat >> Makefile <<CF_EOF 7379libs \\ 7380lintlib \\ 7381install.libs \\ 7382uninstall.libs \\ 7383install.$cf_dir \\ 7384uninstall.$cf_dir :: 7385 cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \$@ 7386CF_EOF 7387 elif test -f $srcdir/$cf_dir/headers; then 7388cat >> Makefile <<CF_EOF 7389 7390libs \\ 7391install.libs \\ 7392uninstall.libs \\ 7393install.includes \\ 7394uninstall.includes :: 7395 cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \$@ 7396CF_EOF 7397fi 7398done 7399 7400cat >> Makefile <<CF_EOF 7401 7402install.data \ 7403uninstall.data :: 7404 cd misc && \$(MAKE) \$(CF_MFLAGS) \$@ 7405 7406install.man \ 7407uninstall.man :: 7408 cd man && \$(MAKE) \$(CF_MFLAGS) \$@ 7409 7410distclean :: 7411 rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h 7412 rm -f headers.sh headers.sed 7413 rm -rf \$(DIRS_TO_MAKE) 7414CF_EOF 7415 7416 7417rm -f headers.sed headers.sh 7418 7419echo creating headers.sh 7420cat >headers.sh <<CF_EOF 7421#! /bin/sh 7422# This shell script is generated by the 'configure' script. It is invoked in a 7423# subdirectory of the build tree. It generates a sed-script in the parent 7424# directory that is used to adjust includes for header files that reside in a 7425# subdirectory of /usr/include, etc. 7426PRG="" 7427while test \$# != 3 7428do 7429PRG="\$PRG \$1"; shift 7430done 7431DST=\$1 7432REF=\$2 7433SRC=\$3 7434echo installing \$SRC in \$DST 7435case \$DST in 7436/*/include/*) 7437 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$ 7438 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$ 7439 END=\`basename \$DST\` 7440 for i in \`cat \$REF/../*/headers |fgrep -v "#"\` 7441 do 7442 NAME=\`basename \$i\` 7443 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED 7444 done 7445 rm -f \$TMPSRC 7446 sed -f \$TMPSED \$SRC > \$TMPSRC 7447 eval \$PRG \$TMPSRC \$DST/\$SRC 7448 rm -f \$TMPSRC \$TMPSED 7449 ;; 7450*) 7451 eval \$PRG \$SRC \$DST 7452 ;; 7453esac 7454CF_EOF 7455 7456chmod 0755 headers.sh 7457 7458for cf_dir in $SRC_SUBDIRS 7459do 7460 if test -f $srcdir/$cf_dir/headers; then 7461 cat >>$cf_dir/Makefile <<CF_EOF 7462\$(INSTALL_PREFIX)\$(includedir) : 7463 \$(srcdir)/../mkinstalldirs \$@ 7464 7465install \\ 7466install.libs \\ 7467install.includes :: \$(INSTALL_PREFIX)\$(includedir) \\ 7468CF_EOF 7469 j="" 7470 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"` 7471 do 7472 test -n "$j" && echo " $j \\" >>$cf_dir/Makefile 7473 j=$i 7474 done 7475 echo " $j" >>$cf_dir/Makefile 7476 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"` 7477 do 7478 echo " @ (cd \$(INSTALL_PREFIX)\$(includedir) && rm -f `basename $i`) ; ../headers.sh \$(INSTALL_DATA) \$(INSTALL_PREFIX)\$(includedir) \$(srcdir) $i" >>$cf_dir/Makefile 7479 test $i = curses.h && echo " @ (cd \$(INSTALL_PREFIX)\$(includedir) && rm -f ncurses.h && \$(LN_S) curses.h ncurses.h)" >>$cf_dir/Makefile 7480 done 7481 7482 cat >>$cf_dir/Makefile <<CF_EOF 7483 7484uninstall \\ 7485uninstall.libs \\ 7486uninstall.includes :: 7487CF_EOF 7488 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"` 7489 do 7490 i=`basename $i` 7491 echo " -@ (cd \$(INSTALL_PREFIX)\$(includedir) && rm -f $i)" >>$cf_dir/Makefile 7492 test $i = curses.h && echo " -@ (cd \$(INSTALL_PREFIX)\$(includedir) && rm -f ncurses.h)" >>$cf_dir/Makefile 7493 done 7494 fi 7495done 7496 7497 7498 7499exit 0 7500EOF 7501chmod +x $CONFIG_STATUS 7502rm -fr confdefs* $ac_clean_files 7503test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 7504${MAKE-make} preinstall 7505