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