3 # From configure.in Revision: 1.268
7 # Guess values for system-dependent variables and create Makefiles.
8 # Generated automatically using autoconf version 2.13.20020210
9 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
11 # This configure script is free software; the Free Software Foundation
12 # gives unlimited permission to copy, distribute and modify it.
16 ac_default_prefix=/usr/local
17 # Any additions from configure.in:
19 # Initialize some variables set by options.
20 # The variables have the same names as the options, with
21 # dashes changed to underlines.
23 cache_file=./config.cache
32 program_transform_name=s,x,x,
40 bindir='${exec_prefix}/bin'
41 sbindir='${exec_prefix}/sbin'
42 libexecdir='${exec_prefix}/libexec'
43 datadir='${prefix}/share'
44 sysconfdir='${prefix}/etc'
45 sharedstatedir='${prefix}/com'
46 localstatedir='${prefix}/var'
47 libdir='${exec_prefix}/lib'
48 includedir='${prefix}/include'
49 oldincludedir='/usr/include'
50 infodir='${prefix}/info'
51 mandir='${prefix}/man'
53 # Initialize some other variables.
56 SHELL=${CONFIG_SHELL-/bin/sh}
57 # Maximum number of lines to put in a shell here document.
64 # If the previous option needs an argument, assign it.
65 if test -n "$ac_prev"; then
66 eval "$ac_prev=\$ac_option"
72 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
76 # Accept the important Cygnus configure options, so we can diagnose typos.
80 -bindir | --bindir | --bindi | --bind | --bin | --bi)
82 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
83 bindir="$ac_optarg" ;;
85 -build | --build | --buil | --bui | --bu)
87 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
90 -cache-file | --cache-file | --cache-fil | --cache-fi \
91 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
93 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
94 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
95 cache_file="$ac_optarg" ;;
97 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
99 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
101 datadir="$ac_optarg" ;;
103 -disable-* | --disable-*)
104 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
105 # Reject names that are not valid shell variable names.
106 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
107 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
109 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
110 eval "enable_${ac_feature}=no" ;;
112 -enable-* | --enable-*)
113 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
114 # Reject names that are not valid shell variable names.
115 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
116 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
118 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
123 eval "enable_${ac_feature}='$ac_optarg'" ;;
125 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
126 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
127 | --exec | --exe | --ex)
128 ac_prev=exec_prefix ;;
129 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
130 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
131 | --exec=* | --exe=* | --ex=*)
132 exec_prefix="$ac_optarg" ;;
134 -gas | --gas | --ga | --g)
135 # Obsolete; use --with-gas.
138 -help | --help | --hel | --he)
139 # Omit some internal or obsolete options to make the list less imposing.
140 # This message is too long to be a string in the A/UX 3.1 sh.
142 Usage: configure [options] [host]
143 Options: [defaults in brackets after descriptions]
145 --cache-file=FILE cache test results in FILE
146 --help print this message
147 --no-create do not create output files
148 --quiet, --silent do not print \`checking...' messages
149 --version print the version of autoconf that created configure
150 Directory and file names:
151 --prefix=PREFIX install architecture-independent files in PREFIX
153 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
155 --bindir=DIR user executables in DIR [EPREFIX/bin]
156 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
157 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
158 --datadir=DIR read-only architecture-independent data in DIR
160 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
161 --sharedstatedir=DIR modifiable architecture-independent data in DIR
163 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
164 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
165 --includedir=DIR C header files in DIR [PREFIX/include]
166 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
167 --infodir=DIR info documentation in DIR [PREFIX/info]
168 --mandir=DIR man documentation in DIR [PREFIX/man]
169 --srcdir=DIR find the sources in DIR [configure dir or ..]
170 --program-prefix=PREFIX prepend PREFIX to installed program names
171 --program-suffix=SUFFIX append SUFFIX to installed program names
172 --program-transform-name=PROGRAM
173 run sed PROGRAM on installed program names
177 --build=BUILD configure for building on BUILD [BUILD=HOST]
178 --host=HOST configure for HOST [guessed]
179 --target=TARGET configure for TARGET [TARGET=HOST]
180 Features and packages:
181 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
182 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
183 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
184 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
185 --x-includes=DIR X include files are in DIR
186 --x-libraries=DIR X library files are in DIR
189 --enable and --with options recognized:
190 --with-system-type=XXX test: override derived host system-type
191 --enable-add-ons=DIR... used to check if we are a glibc add-on.
192 --with-build-cc=XXX if cross-compiling, the host C compiler (\$BUILD_CC)
193 --with-build-cflags=XXX if cross-compiling, the host C compiler-flags
194 --with-build-ldflags=XXX if cross-compiling, the host linker-flags
195 --with-build-libs=XXX if cross-compiling, the host libraries
196 --without-cxx do not adjust ncurses bool to match C++
197 --without-cxx-binding do not build C++ binding and demo
198 --without-ada suppress check for Ada95, don't build demo
199 --without-progs suppress build with programs (e.g., tic)
200 --without-curses-h install curses.h as ncurses.h only
201 --with-install-prefix prefixes actual install-location (\$DESTDIR)
202 Options to Specify the Libraries Built/Used:
205 --with-libtool generate libraries with libtool
206 --with-shared generate shared-libraries
207 --with-normal generate normal-libraries (default)
208 --with-debug generate debug-libraries (default)
209 --with-profile generate profile-libraries
210 --with-termlib generate separate terminfo library
211 --with-dbmalloc test: use Conor Cahill's dbmalloc library
212 --with-dmalloc test: use Gray Watson's dmalloc library
213 --with-gpm use Alessandro Rubini's GPM library
214 --enable-rpath use rpath option when generating shared libraries
215 --with-shlib-version=X Specify rel or abi version for shared libs
216 Fine-Tuning Your Configuration:
219 --disable-overwrite leave out the link to -lcurses
220 --disable-database do not use terminfo, only fallbacks/termcap
221 --with-database=XXX specify terminfo source to install
222 --with-fallbacks=XXX specify list of fallback terminal descriptions
223 --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
224 --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
225 --disable-big-core assume machine has little memory
226 --enable-termcap compile in termcap fallback support
227 --with-termpath=XXX specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
228 --enable-getcap fast termcap load, no xrefs to terminfo
229 --enable-getcap-cache cache translated termcaps in ~/.terminfo
230 --enable-symlinks make tic use symbolic links not hard links
233 --enable-broken_linker compile with broken-linker support code
234 --with-bool=TYPE override fallback type of bool variable
235 --with-ospeed=TYPE override type of ospeed variable
236 --enable-bsdpad recognize BSD-style prefix padding
237 --with-rcs-ids compile-in RCS identifiers
238 Options to Specify How Manpages are Installed:
239 --with-manpage-format specify manpage-format: gzip/compress/BSDI/normal and
240 optionally formatted, e.g., gzip,formatted
241 --with-manpage-renames specify manpage-renaming
242 --with-manpage-symlinks specify manpage-symlinks
243 --with-manpage-tbl specify manpage processing with tbl
245 --disable-ext-funcs disable function-extensions
248 --enable-const compile with extra/non-standard const
249 --enable-no-padding compile with \$NCURSES_NO_PADDING code
250 --enable-sigwinch compile with SIGWINCH handler
251 --enable-tcap-names compile with user-definable terminal capabilities
253 --with-develop enable all development options
254 --enable-hard-tabs compile with hard-tabs code
255 --disable-root-environ limit environment when running as root
256 --enable-xmc-glitch compile with limited support for xmc
258 --disable-assumed-color do not assume anything about default-colors
259 --disable-hashmap compile without hashmap scrolling-optimization
262 --enable-colorfgbg compile with \$COLORFGBG code
263 --enable-safe-sprintf compile with experimental safe-sprintf code
264 --disable-scroll-hints compile without scroll-hints code
265 --enable-widec compile with experimental wide-char/UTF-8 code
266 --with-caps=alt compile with experimental alternate Caps file
267 Testing/development Options:
268 --enable-echo build: display "compiling" commands (default)
269 --enable-warnings build: turn on GCC compiler warnings
270 --enable-assertions test: turn on generation of assertion code
271 --disable-leaks test: suppress permanent memory-leaks
272 --enable-expanded test: generate functions for certain macros
273 --disable-macros test: use functions rather than macros
276 Ada95 Binding Options:
277 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
278 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
279 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
283 -host | --host | --hos | --ho)
285 -host=* | --host=* | --hos=* | --ho=*)
288 -includedir | --includedir | --includedi | --included | --include \
289 | --includ | --inclu | --incl | --inc)
290 ac_prev=includedir ;;
291 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
292 | --includ=* | --inclu=* | --incl=* | --inc=*)
293 includedir="$ac_optarg" ;;
295 -infodir | --infodir | --infodi | --infod | --info | --inf)
297 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
298 infodir="$ac_optarg" ;;
300 -libdir | --libdir | --libdi | --libd)
302 -libdir=* | --libdir=* | --libdi=* | --libd=*)
303 libdir="$ac_optarg" ;;
305 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
306 | --libexe | --libex | --libe)
307 ac_prev=libexecdir ;;
308 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
309 | --libexe=* | --libex=* | --libe=*)
310 libexecdir="$ac_optarg" ;;
312 -localstatedir | --localstatedir | --localstatedi | --localstated \
313 | --localstate | --localstat | --localsta | --localst \
314 | --locals | --local | --loca | --loc | --lo)
315 ac_prev=localstatedir ;;
316 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
317 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
318 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
319 localstatedir="$ac_optarg" ;;
321 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
323 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
324 mandir="$ac_optarg" ;;
327 # Obsolete; use --without-fp.
330 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
334 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
335 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
338 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
339 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
340 | --oldin | --oldi | --old | --ol | --o)
341 ac_prev=oldincludedir ;;
342 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
343 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
344 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
345 oldincludedir="$ac_optarg" ;;
347 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
349 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
350 prefix="$ac_optarg" ;;
352 -program-prefix | --program-prefix | --program-prefi | --program-pref \
353 | --program-pre | --program-pr | --program-p)
354 ac_prev=program_prefix ;;
355 -program-prefix=* | --program-prefix=* | --program-prefi=* \
356 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
357 program_prefix="$ac_optarg" ;;
359 -program-suffix | --program-suffix | --program-suffi | --program-suff \
360 | --program-suf | --program-su | --program-s)
361 ac_prev=program_suffix ;;
362 -program-suffix=* | --program-suffix=* | --program-suffi=* \
363 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
364 program_suffix="$ac_optarg" ;;
366 -program-transform-name | --program-transform-name \
367 | --program-transform-nam | --program-transform-na \
368 | --program-transform-n | --program-transform- \
369 | --program-transform | --program-transfor \
370 | --program-transfo | --program-transf \
371 | --program-trans | --program-tran \
372 | --progr-tra | --program-tr | --program-t)
373 ac_prev=program_transform_name ;;
374 -program-transform-name=* | --program-transform-name=* \
375 | --program-transform-nam=* | --program-transform-na=* \
376 | --program-transform-n=* | --program-transform-=* \
377 | --program-transform=* | --program-transfor=* \
378 | --program-transfo=* | --program-transf=* \
379 | --program-trans=* | --program-tran=* \
380 | --progr-tra=* | --program-tr=* | --program-t=*)
381 program_transform_name="$ac_optarg" ;;
383 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
384 | -silent | --silent | --silen | --sile | --sil)
387 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
389 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
391 sbindir="$ac_optarg" ;;
393 -sharedstatedir | --sharedstatedir | --sharedstatedi \
394 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
395 | --sharedst | --shareds | --shared | --share | --shar \
397 ac_prev=sharedstatedir ;;
398 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
399 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
400 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
402 sharedstatedir="$ac_optarg" ;;
404 -site | --site | --sit)
406 -site=* | --site=* | --sit=*)
409 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
411 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
412 srcdir="$ac_optarg" ;;
414 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
415 | --syscon | --sysco | --sysc | --sys | --sy)
416 ac_prev=sysconfdir ;;
417 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
418 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
419 sysconfdir="$ac_optarg" ;;
421 -target | --target | --targe | --targ | --tar | --ta | --t)
423 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
424 target="$ac_optarg" ;;
426 -v | -verbose | --verbose | --verbos | --verbo | --verb)
429 -version | --version | --versio | --versi | --vers)
430 echo "configure generated by autoconf version 2.13.20020210"
434 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
435 # Reject names that are not valid shell variable names.
436 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
437 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
439 ac_package=`echo $ac_package| sed 's/-/_/g'`
444 eval "with_${ac_package}='$ac_optarg'" ;;
446 -without-* | --without-*)
447 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
448 # Reject names that are not valid shell variable names.
449 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
450 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
452 ac_package=`echo $ac_package| sed 's/-/_/g'`
453 eval "with_${ac_package}=no" ;;
456 # Obsolete; use --with-x.
459 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
460 | --x-incl | --x-inc | --x-in | --x-i)
461 ac_prev=x_includes ;;
462 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
463 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
464 x_includes="$ac_optarg" ;;
466 -x-libraries | --x-libraries | --x-librarie | --x-librari \
467 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
468 ac_prev=x_libraries ;;
469 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
470 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
471 x_libraries="$ac_optarg" ;;
473 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
477 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
478 echo "configure: warning: $ac_option: invalid host type" 1>&2
480 if test "x$nonopt" != xNONE; then
481 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
489 if test -n "$ac_prev"; then
490 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
493 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
495 # File descriptor usage:
498 # 2 errors and warnings
499 # 3 some systems may open it to /dev/tty
500 # 4 used on the Kubota Titan
501 # 6 checking for... messages and results
502 # 5 compiler messages saved in config.log
503 if test "$silent" = yes; then
511 This file contains any messages produced by compilers while
512 running configure, to aid debugging if configure makes a mistake.
515 # Strip out --no-create and --no-recursion so they do not pile up.
516 # Also quote any args containing shell metacharacters.
521 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
522 | --no-cr | --no-c) ;;
523 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
524 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
525 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
526 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
527 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
532 # Only set these to C if already set. These must not be set unconditionally
533 # because not all systems understand e.g. LANG=C (notably SCO).
534 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
535 # Non-C LC_CTYPE values break the ctype check.
536 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
537 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
538 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
539 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
541 # confdefs.h avoids OS command line length limits that DEFS can exceed.
542 rm -rf conftest* confdefs.h
543 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
546 # A filename unique to this package, relative to the directory that
547 # configure is in, which we can look for to find out if srcdir is correct.
548 ac_unique_file=ncurses/base/lib_initscr.c
550 # Find the source files, if location was not specified.
551 if test -z "$srcdir"; then
552 ac_srcdir_defaulted=yes
553 # Try the directory containing this script, then its parent.
555 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
556 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
558 if test ! -r $srcdir/$ac_unique_file; then
562 ac_srcdir_defaulted=no
564 if test ! -r $srcdir/$ac_unique_file; then
565 if test "$ac_srcdir_defaulted" = yes; then
566 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
568 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
571 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
573 # Prefer explicitly selected file to automatically selected ones.
574 if test -z "$CONFIG_SITE"; then
575 if test "x$prefix" != xNONE; then
576 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
578 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
581 for ac_site_file in $CONFIG_SITE; do
582 if test -r "$ac_site_file"; then
583 echo "loading site script $ac_site_file"
588 if test -r "$cache_file"; then
589 echo "loading cache $cache_file"
592 echo "creating cache $cache_file"
597 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
598 ac_cpp='$CPP $CPPFLAGS'
599 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
600 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
601 cross_compiling=$ac_cv_prog_cc_cross
605 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
606 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
607 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
614 ac_n= ac_c='\c' ac_t=
621 NCURSES_MAJOR="`egrep '^NCURSES_MAJOR[ ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
622 NCURSES_MINOR="`egrep '^NCURSES_MINOR[ ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
623 NCURSES_PATCH="`egrep '^NCURSES_PATCH[ ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
624 cf_cv_abi_version=${NCURSES_MAJOR}
625 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
626 cf_cv_timestamp=`date`
627 echo "$ac_t""Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" 1>&6
638 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
639 if test -f $ac_dir/install-sh; then
641 ac_install_sh="$ac_aux_dir/install-sh -c"
643 elif test -f $ac_dir/install.sh; then
645 ac_install_sh="$ac_aux_dir/install.sh -c"
649 if test -z "$ac_aux_dir"; then
650 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
652 ac_config_guess=$ac_aux_dir/config.guess
653 ac_config_sub=$ac_aux_dir/config.sub
654 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
657 if test -f $srcdir/config.guess ; then
659 # Do some error checking and defaulting for the host and target type.
661 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
664 # 1. You are not allowed to specify --host, --target, and nonopt at the
666 # 2. Host defaults to nonopt.
667 # 3. If nonopt is not specified, then host defaults to the current host,
668 # as determined by config.guess.
669 # 4. Target and build default to nonopt.
670 # 5. If nonopt is not specified, then target and build default to host.
672 # The aliases save the names the user supplied, while $host etc.
673 # will get canonicalized.
674 case $host---$target---$nonopt in
675 NONE---*---* | *---NONE---* | *---*---NONE) ;;
676 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
680 # Make sure we can run config.sub.
681 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
682 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
685 echo $ac_n "checking host system type""... $ac_c" 1>&6
686 echo "configure:687: checking host system type" >&5
689 case "$host_alias" in
693 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
694 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
696 *) host_alias=$nonopt ;;
700 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
701 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
702 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
703 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
704 echo "$ac_t""$host" 1>&6
706 echo $ac_n "checking target system type""... $ac_c" 1>&6
707 echo "configure:708: checking target system type" >&5
710 case "$target_alias" in
713 NONE) target_alias=$host_alias ;;
714 *) target_alias=$nonopt ;;
718 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
719 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
720 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
721 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
722 echo "$ac_t""$target" 1>&6
724 echo $ac_n "checking build system type""... $ac_c" 1>&6
725 echo "configure:726: checking build system type" >&5
728 case "$build_alias" in
731 NONE) build_alias=$host_alias ;;
732 *) build_alias=$nonopt ;;
736 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
737 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
738 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
739 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
740 echo "$ac_t""$build" 1>&6
742 test "$host_alias" != "$target_alias" &&
743 test "$program_prefix$program_suffix$program_transform_name" = \
745 program_prefix=${target_alias}-
747 system_name="$host_os"
749 system_name="`(uname -s -r) 2>/dev/null`"
750 if test -z "$system_name" ; then
751 system_name="`(hostname) 2>/dev/null`"
754 test -n "$system_name" && cat >> confdefs.h <<EOF
755 #define SYSTEM_NAME "$system_name"
758 if eval "test \"`echo '$''{'cf_cv_system_name'+set}'`\" = set"; then
759 echo $ac_n "(cached) $ac_c" 1>&6
761 cf_cv_system_name="$system_name"
765 test -z "$system_name" && system_name="$cf_cv_system_name"
766 test -n "$cf_cv_system_name" && echo "$ac_t""Configuring for $cf_cv_system_name" 1>&6
768 if test ".$system_name" != ".$cf_cv_system_name" ; then
769 echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6
770 { echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; }
774 # Check whether --with-system-type or --without-system-type was given.
775 if test "${with_system_type+set}" = set; then
776 withval="$with_system_type"
777 echo "configure: warning: overriding system type to $withval" 1>&2
778 cf_cv_system_name=$withval
782 # We need a configure script only when compiling as part of GNU C library.
783 # Here we have to generate one of the files we need while compiling.
785 # The only problem is that users of the package might think they have to
786 # run configure themself and find it irritating when nothing happens.
788 # So we try here to find out whether we are called from the glibc configure
792 # Check whether --enable-add-ons or --disable-add-ons was given.
793 if test "${enable_add_ons+set}" = set; then
794 enableval="$enable_add_ons"
801 if test x"$glibc_add_on" = "xyes" ; then
804 rm -f $srcdir/Makefile
805 cp $srcdir/Makefile.glibc $srcdir/Makefile
806 echo "ncurses `grep \"^[ ]*ncurses-version[ ]*=.*$\" \
807 $srcdir/Makefile | sed -e \
808 's/^[ ]*ncurses-version[ ]*=[ ]*\([^ ^ ]*\)[ ]*$/\1/'`" > $srcdir/Banner
812 ### Save the given $CFLAGS to allow user-override.
813 cf_user_CFLAGS="$CFLAGS"
815 ### Default install-location
817 echo $ac_n "checking for prefix""... $ac_c" 1>&6
818 echo "configure:819: checking for prefix" >&5
819 if test "x$prefix" = "xNONE" ; then
820 case "$cf_cv_system_name" in
821 # non-vendor systems don't have a conflict
822 openbsd*|netbsd*|freebsd*|linux*|cygwin*)
825 *) prefix=$ac_default_prefix
829 echo "$ac_t""$prefix" 1>&6
831 if test "x$prefix" = "xNONE" ; then
832 echo $ac_n "checking for default include-directory""... $ac_c" 1>&6
833 echo "configure:834: checking for default include-directory" >&5
834 test -n "$verbose" && echo 1>&6
837 $includedir/ncurses \
839 $prefix/include/ncurses \
841 /usr/local/include/ncurses \
845 cf_dir=`eval echo $cf_symbol`
846 if test -f $cf_dir/curses.h ; then
847 if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
848 includedir="$cf_symbol"
849 test -n "$verbose" && echo $ac_n " found " 1>&6
853 test -n "$verbose" && echo " tested $cf_dir" 1>&6
855 echo "$ac_t""$includedir" 1>&6
859 ### Checks for programs.
860 # Extract the first word of "gcc", so it can be a program name with args.
861 set dummy gcc; ac_word=$2
862 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
863 echo "configure:864: checking for $ac_word" >&5
864 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
865 echo $ac_n "(cached) $ac_c" 1>&6
867 if test -n "$CC"; then
868 ac_cv_prog_CC="$CC" # Let the user override the test.
870 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
872 for ac_dir in $ac_dummy; do
873 test -z "$ac_dir" && ac_dir=.
874 if test -f $ac_dir/$ac_word; then
883 if test -n "$CC"; then
884 echo "$ac_t""$CC" 1>&6
886 echo "$ac_t""no" 1>&6
889 if test -z "$CC"; then
890 # Extract the first word of "cc", so it can be a program name with args.
891 set dummy cc; ac_word=$2
892 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
893 echo "configure:894: checking for $ac_word" >&5
894 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
895 echo $ac_n "(cached) $ac_c" 1>&6
897 if test -n "$CC"; then
898 ac_cv_prog_CC="$CC" # Let the user override the test.
900 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
903 for ac_dir in $ac_dummy; do
904 test -z "$ac_dir" && ac_dir=.
905 if test -f $ac_dir/$ac_word; then
906 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
915 if test $ac_prog_rejected = yes; then
916 # We found a bogon in the path, so make sure we never use it.
917 set dummy $ac_cv_prog_CC
919 if test $# -gt 0; then
920 # We chose a different compiler from the bogus one.
921 # However, it has the same basename, so the bogon will be chosen
922 # first if we set CC to just the basename; use the full file name.
924 set dummy "$ac_dir/$ac_word" "$@"
932 if test -n "$CC"; then
933 echo "$ac_t""$CC" 1>&6
935 echo "$ac_t""no" 1>&6
938 if test -z "$CC"; then
941 # Extract the first word of "cl", so it can be a program name with args.
942 set dummy cl; ac_word=$2
943 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
944 echo "configure:945: checking for $ac_word" >&5
945 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
946 echo $ac_n "(cached) $ac_c" 1>&6
948 if test -n "$CC"; then
949 ac_cv_prog_CC="$CC" # Let the user override the test.
951 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
953 for ac_dir in $ac_dummy; do
954 test -z "$ac_dir" && ac_dir=.
955 if test -f $ac_dir/$ac_word; then
964 if test -n "$CC"; then
965 echo "$ac_t""$CC" 1>&6
967 echo "$ac_t""no" 1>&6
972 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
975 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
976 echo "configure:977: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
979 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
980 ac_cpp='$CPP $CPPFLAGS'
981 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
982 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
983 cross_compiling=$ac_cv_prog_cc_cross
985 cat > conftest.$ac_ext << EOF
987 #line 988 "configure"
988 #include "confdefs.h"
992 if { (eval echo configure:993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
993 ac_cv_prog_cc_works=yes
994 # If we can't run a trivial program, we are probably using a cross compiler.
995 if (./conftest; exit) 2>/dev/null; then
996 ac_cv_prog_cc_cross=no
998 ac_cv_prog_cc_cross=yes
1001 echo "configure: failed program was:" >&5
1002 cat conftest.$ac_ext >&5
1003 ac_cv_prog_cc_works=no
1007 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1008 ac_cpp='$CPP $CPPFLAGS'
1009 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1010 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1011 cross_compiling=$ac_cv_prog_cc_cross
1013 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1014 if test $ac_cv_prog_cc_works = no; then
1015 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1017 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1018 echo "configure:1019: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1019 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1020 cross_compiling=$ac_cv_prog_cc_cross
1022 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1023 echo "configure:1024: checking whether we are using GNU C" >&5
1024 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1025 echo $ac_n "(cached) $ac_c" 1>&6
1027 cat > conftest.c <<EOF
1032 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1033: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1039 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1041 if test $ac_cv_prog_gcc = yes; then
1047 ac_test_CFLAGS="${CFLAGS+set}"
1048 ac_save_CFLAGS="$CFLAGS"
1050 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1051 echo "configure:1052: checking whether ${CC-cc} accepts -g" >&5
1052 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1053 echo $ac_n "(cached) $ac_c" 1>&6
1055 echo 'void f(){}' > conftest.c
1056 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1065 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1066 if test "$ac_test_CFLAGS" = set; then
1067 CFLAGS="$ac_save_CFLAGS"
1068 elif test $ac_cv_prog_cc_g = yes; then
1069 if test "$GCC" = yes; then
1075 if test "$GCC" = yes; then
1083 if test "$GCC" = yes ; then
1084 echo $ac_n "checking version of gcc""... $ac_c" 1>&6
1085 echo "configure:1086: checking version of gcc" >&5
1086 GCC_VERSION="`${CC} --version|head -1`"
1087 echo "$ac_t""$GCC_VERSION" 1>&6
1090 # If we're cross-compiling, allow the user to override the tools and their
1091 # options. The configure script is oriented toward identifying the target
1092 # compiler, etc., but we need a host compiler to generate parts of the source.
1094 BUILD_CFLAGS='$(CFLAGS)'
1095 BUILD_LDFLAGS='$(LDFLAGS)'
1096 BUILD_LIBS='$(LIBS)'
1097 if test "$host_alias" != "$target_alias" ; then
1099 # Check whether --with-build-cc or --without-build-cc was given.
1100 if test "${with_build_cc+set}" = set; then
1101 withval="$with_build_cc"
1104 for ac_prog in $CC gcc cc
1106 # Extract the first word of "$ac_prog", so it can be a program name with args.
1107 set dummy $ac_prog; ac_word=$2
1108 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1109 echo "configure:1110: checking for $ac_word" >&5
1110 if eval "test \"`echo '$''{'ac_cv_prog_BUILD_CC'+set}'`\" = set"; then
1111 echo $ac_n "(cached) $ac_c" 1>&6
1113 if test -n "$BUILD_CC"; then
1114 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
1116 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1118 for ac_dir in $ac_dummy; do
1119 test -z "$ac_dir" && ac_dir=.
1120 if test -f $ac_dir/$ac_word; then
1121 ac_cv_prog_BUILD_CC="$ac_prog"
1128 BUILD_CC="$ac_cv_prog_BUILD_CC"
1129 if test -n "$BUILD_CC"; then
1130 echo "$ac_t""$BUILD_CC" 1>&6
1132 echo "$ac_t""no" 1>&6
1135 test -n "$BUILD_CC" && break
1141 # Check whether --with-build-cflags or --without-build-cflags was given.
1142 if test "${with_build_cflags+set}" = set; then
1143 withval="$with_build_cflags"
1144 BUILD_CFLAGS="$withval"
1148 # Check whether --with-build-ldflags or --without-build-ldflags was given.
1149 if test "${with_build_ldflags+set}" = set; then
1150 withval="$with_build_ldflags"
1151 BUILD_LDFLAGS="$withval"
1155 # Check whether --with-build-libs or --without-build-libs was given.
1156 if test "${with_build_libs+set}" = set; then
1157 withval="$with_build_libs"
1158 BUILD_LIBS="$withval"
1167 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1168 echo "configure:1169: checking how to run the C preprocessor" >&5
1169 # On Suns, sometimes $CPP names a directory.
1170 if test -n "$CPP" && test -d "$CPP"; then
1173 if test -z "$CPP"; then
1174 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1175 echo $ac_n "(cached) $ac_c" 1>&6
1177 # This must be in double quotes, not single quotes, because CPP may get
1178 # substituted into the Makefile and "${CC-cc}" will confuse make.
1180 # On the NeXT, cc -E runs the code through the compiler's parser,
1181 # not just through cpp.
1182 cat > conftest.$ac_ext <<EOF
1183 #line 1184 "configure"
1184 #include "confdefs.h"
1188 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1189 { (eval echo configure:1190: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1190 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1191 if test -z "$ac_err"; then
1195 echo "configure: failed program was:" >&5
1196 cat conftest.$ac_ext >&5
1198 CPP="${CC-cc} -E -traditional-cpp"
1199 cat > conftest.$ac_ext <<EOF
1200 #line 1201 "configure"
1201 #include "confdefs.h"
1205 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1206 { (eval echo configure:1207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1207 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1208 if test -z "$ac_err"; then
1212 echo "configure: failed program was:" >&5
1213 cat conftest.$ac_ext >&5
1215 CPP="${CC-cc} -nologo -E"
1216 cat > conftest.$ac_ext <<EOF
1217 #line 1218 "configure"
1218 #include "confdefs.h"
1222 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1223 { (eval echo configure:1224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1224 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1225 if test -z "$ac_err"; then
1229 echo "configure: failed program was:" >&5
1230 cat conftest.$ac_ext >&5
1239 ac_cv_prog_CPP="$CPP"
1241 CPP="$ac_cv_prog_CPP"
1243 ac_cv_prog_CPP="$CPP"
1245 echo "$ac_t""$CPP" 1>&6
1247 if test $ac_cv_prog_gcc = yes; then
1248 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1249 echo "configure:1250: checking whether ${CC-cc} needs -traditional" >&5
1250 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1251 echo $ac_n "(cached) $ac_c" 1>&6
1253 ac_pattern="Autoconf.*'x'"
1254 cat > conftest.$ac_ext <<EOF
1255 #line 1256 "configure"
1256 #include "confdefs.h"
1260 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1261 egrep "$ac_pattern" >/dev/null 2>&1; then
1263 ac_cv_prog_gcc_traditional=yes
1266 ac_cv_prog_gcc_traditional=no
1271 if test $ac_cv_prog_gcc_traditional = no; then
1272 cat > conftest.$ac_ext <<EOF
1273 #line 1274 "configure"
1274 #include "confdefs.h"
1278 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1279 egrep "$ac_pattern" >/dev/null 2>&1; then
1281 ac_cv_prog_gcc_traditional=yes
1288 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1289 if test $ac_cv_prog_gcc_traditional = yes; then
1290 CC="$CC -traditional"
1294 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1295 echo "configure:1296: checking for POSIXized ISC" >&5
1296 if test -d /etc/conf/kconfig.d &&
1297 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1299 echo "$ac_t""yes" 1>&6
1300 ISC=yes # If later tests want to check for ISC.
1301 cat >> confdefs.h <<\EOF
1302 #define _POSIX_SOURCE 1
1305 if test "$GCC" = yes; then
1311 echo "$ac_t""no" 1>&6
1316 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1317 echo "configure:1318: checking for ${CC-cc} option to accept ANSI C" >&5
1318 if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
1319 echo $ac_n "(cached) $ac_c" 1>&6
1323 cf_save_CFLAGS="$CFLAGS"
1324 cf_save_CPPFLAGS="$CPPFLAGS"
1325 # Don't try gcc -ansi; that turns off useful extensions and
1326 # breaks some systems' header files.
1327 # AIX -qlanglvl=ansi
1328 # Ultrix and OSF/1 -std1
1329 # HP-UX -Aa -D_HPUX_SOURCE
1331 # UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
1332 for cf_arg in "-DCC_HAS_PROTOS" \
1337 "-Aa -D_HPUX_SOURCE" \
1343 for cf_add_cflags in $cf_arg
1345 case $cf_add_cflags in #(vi
1346 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1348 *$cf_add_cflags) #(vi
1351 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1356 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1361 if test -n "$cf_new_cflags" ; then
1363 CFLAGS="$CFLAGS $cf_new_cflags"
1366 if test -n "$cf_new_cppflags" ; then
1368 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1372 cat > conftest.$ac_ext <<EOF
1373 #line 1374 "configure"
1374 #include "confdefs.h"
1376 #ifndef CC_HAS_PROTOS
1377 #if !defined(__STDC__) || (__STDC__ != 1)
1384 int test (int i, double x);
1385 struct s1 {int (*f) (int a);};
1386 struct s2 {int (*f) (double a);};
1389 if { (eval echo configure:1390: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1391 cf_cv_ansi_cc="$cf_arg"; break
1393 echo "configure: failed program was:" >&5
1394 cat conftest.$ac_ext >&5
1398 CFLAGS="$cf_save_CFLAGS"
1399 CPPFLAGS="$cf_save_CPPFLAGS"
1403 echo "$ac_t""$cf_cv_ansi_cc" 1>&6
1405 if test "$cf_cv_ansi_cc" != "no"; then
1406 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
1410 for cf_add_cflags in $cf_cv_ansi_cc
1412 case $cf_add_cflags in #(vi
1413 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1415 *$cf_add_cflags) #(vi
1418 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1423 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1428 if test -n "$cf_new_cflags" ; then
1430 CFLAGS="$CFLAGS $cf_new_cflags"
1433 if test -n "$cf_new_cppflags" ; then
1435 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1440 cat >> confdefs.h <<\EOF
1441 #define CC_HAS_PROTOS 1
1448 if test "$cf_cv_ansi_cc" = "no"; then
1449 { echo "configure: error: Your compiler does not appear to recognize prototypes.
1450 You have the following choices:
1451 a. adjust your compiler options
1452 b. get an up-to-date compiler
1453 c. use a wrapper such as unproto" 1>&2; exit 1; }
1459 case $cf_cv_system_name in
1461 # We make sure -Zexe is not used -- it would interfere with @PROG_EXT@
1462 CFLAGS="$CFLAGS -Zmt"
1463 CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
1464 CXXFLAGS="$CXXFLAGS -Zmt"
1465 LDFLAGS=`echo "$LDFLAGS -Zmt -Zcrtdll" | sed "s/-Zexe//g"`
1473 test -n "$PROG_EXT" && cat >> confdefs.h <<EOF
1474 #define PROG_EXT "$PROG_EXT"
1479 case "$cf_cv_system_name" in
1481 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
1483 *) LDPATH=$PATH:/sbin:/usr/sbin
1484 # Extract the first word of "ldconfig", so it can be a program name with args.
1485 set dummy ldconfig; ac_word=$2
1486 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1487 echo "configure:1488: checking for $ac_word" >&5
1488 if eval "test \"`echo '$''{'ac_cv_path_LDCONFIG'+set}'`\" = set"; then
1489 echo $ac_n "(cached) $ac_c" 1>&6
1493 ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
1496 ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a dos path.
1499 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1501 for ac_dir in $ac_dummy; do
1502 test -z "$ac_dir" && ac_dir=.
1503 if test -f $ac_dir/$ac_word; then
1504 ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
1512 LDCONFIG="$ac_cv_path_LDCONFIG"
1513 if test -n "$LDCONFIG"; then
1514 echo "$ac_t""$LDCONFIG" 1>&6
1516 echo "$ac_t""no" 1>&6
1523 echo $ac_n "checking if you want to ensure bool is consistent with C++""... $ac_c" 1>&6
1524 echo "configure:1525: checking if you want to ensure bool is consistent with C++" >&5
1526 # Check whether --with-cxx or --without-cxx was given.
1527 if test "${with_cxx+set}" = set; then
1529 cf_with_cxx=$withval
1534 echo "$ac_t""$cf_with_cxx" 1>&6
1535 if test "X$cf_with_cxx" = Xno ; then
1539 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1541 # Extract the first word of "$ac_prog", so it can be a program name with args.
1542 set dummy $ac_prog; ac_word=$2
1543 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1544 echo "configure:1545: checking for $ac_word" >&5
1545 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1546 echo $ac_n "(cached) $ac_c" 1>&6
1548 if test -n "$CXX"; then
1549 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1551 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1553 for ac_dir in $ac_dummy; do
1554 test -z "$ac_dir" && ac_dir=.
1555 if test -f $ac_dir/$ac_word; then
1556 ac_cv_prog_CXX="$ac_prog"
1563 CXX="$ac_cv_prog_CXX"
1564 if test -n "$CXX"; then
1565 echo "$ac_t""$CXX" 1>&6
1567 echo "$ac_t""no" 1>&6
1570 test -n "$CXX" && break
1572 test -n "$CXX" || CXX="gcc"
1575 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1576 echo "configure:1577: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1579 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1580 ac_cpp='$CXXCPP $CPPFLAGS'
1581 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1582 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1583 cross_compiling=$ac_cv_prog_cxx_cross
1585 cat > conftest.$ac_ext << EOF
1587 #line 1588 "configure"
1588 #include "confdefs.h"
1590 int main(){return(0);}
1592 if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1593 ac_cv_prog_cxx_works=yes
1594 # If we can't run a trivial program, we are probably using a cross compiler.
1595 if (./conftest; exit) 2>/dev/null; then
1596 ac_cv_prog_cxx_cross=no
1598 ac_cv_prog_cxx_cross=yes
1601 echo "configure: failed program was:" >&5
1602 cat conftest.$ac_ext >&5
1603 ac_cv_prog_cxx_works=no
1607 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1608 ac_cpp='$CPP $CPPFLAGS'
1609 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1610 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1611 cross_compiling=$ac_cv_prog_cc_cross
1613 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1614 if test $ac_cv_prog_cxx_works = no; then
1615 echo "$ac_t""You don't have any C++ compiler, too bad" 1>&6; cf_with_cxx=no; CXX=""; GXX="";
1617 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1618 echo "configure:1619: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1619 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1620 cross_compiling=$ac_cv_prog_cxx_cross
1622 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1623 echo "configure:1624: checking whether we are using GNU C++" >&5
1624 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1625 echo $ac_n "(cached) $ac_c" 1>&6
1627 cat > conftest.C <<EOF
1632 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1633: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1639 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1641 if test $ac_cv_prog_gxx = yes; then
1647 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1648 ac_save_CXXFLAGS="$CXXFLAGS"
1650 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1651 echo "configure:1652: checking whether ${CXX-g++} accepts -g" >&5
1652 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1653 echo $ac_n "(cached) $ac_c" 1>&6
1655 echo 'void f(){}' > conftest.cc
1656 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1657 ac_cv_prog_cxx_g=yes
1665 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1666 if test "$ac_test_CXXFLAGS" = set; then
1667 CXXFLAGS="$ac_save_CXXFLAGS"
1668 elif test $ac_cv_prog_cxx_g = yes; then
1669 if test "$GXX" = yes; then
1675 if test "$GXX" = yes; then
1685 if test "$GXX" = yes; then
1686 echo $ac_n "checking version of g++""... $ac_c" 1>&6
1687 echo "configure:1688: checking version of g++" >&5
1688 GXX_VERSION="`${CXX-g++} --version|head -1`"
1689 echo "$ac_t""$GXX_VERSION" 1>&6
1690 case $GXX_VERSION in
1692 GXX=""; CXX=""; ac_cv_prog_gxx=no
1694 echo "configure: warning: templates do not work" 1>&2
1699 echo $ac_n "checking if you want to build C++ binding and demo""... $ac_c" 1>&6
1700 echo "configure:1701: checking if you want to build C++ binding and demo" >&5
1702 # Check whether --with-cxx-binding or --without-cxx-binding was given.
1703 if test "${with_cxx_binding+set}" = set; then
1704 withval="$with_cxx_binding"
1705 cf_with_cxx_binding=$withval
1707 cf_with_cxx_binding=$cf_with_cxx
1710 echo "$ac_t""$cf_with_cxx_binding" 1>&6
1712 echo $ac_n "checking if you want to build with Ada95""... $ac_c" 1>&6
1713 echo "configure:1714: checking if you want to build with Ada95" >&5
1715 # Check whether --with-ada or --without-ada was given.
1716 if test "${with_ada+set}" = set; then
1718 cf_with_ada=$withval
1723 echo "$ac_t""$cf_with_ada" 1>&6
1725 echo $ac_n "checking if you want to build programs such as tic""... $ac_c" 1>&6
1726 echo "configure:1727: checking if you want to build programs such as tic" >&5
1728 # Check whether --with-progs or --without-progs was given.
1729 if test "${with_progs+set}" = set; then
1730 withval="$with_progs"
1731 cf_with_progs=$withval
1736 echo "$ac_t""$cf_with_progs" 1>&6
1738 echo $ac_n "checking if you wish to install curses.h""... $ac_c" 1>&6
1739 echo "configure:1740: checking if you wish to install curses.h" >&5
1741 # Check whether --with-curses-h or --without-curses-h was given.
1742 if test "${with_curses_h+set}" = set; then
1743 withval="$with_curses_h"
1744 with_curses_h=$withval
1749 echo "$ac_t""$with_curses_h" 1>&6
1751 modules_to_build="ncurses"
1752 if test "X$cf_with_progs" != Xno ; then
1753 modules_to_build="$modules_to_build progs tack"
1755 modules_to_build="$modules_to_build panel menu form"
1757 if test "$program_transform_name" = s,x,x,; then
1758 program_transform_name=
1760 # Double any \ or $. echo might interpret backslashes.
1761 cat <<\EOF_SED > conftestsed
1762 s,\\,\\\\,g; s,\$,$$,g
1764 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1767 test "$program_prefix" != NONE &&
1768 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1769 # Use a double $ so make ignores it.
1770 test "$program_suffix" != NONE &&
1771 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1773 # sed with no file args requires a program.
1774 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1776 for ac_prog in mawk gawk nawk awk
1778 # Extract the first word of "$ac_prog", so it can be a program name with args.
1779 set dummy $ac_prog; ac_word=$2
1780 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1781 echo "configure:1782: checking for $ac_word" >&5
1782 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1783 echo $ac_n "(cached) $ac_c" 1>&6
1785 if test -n "$AWK"; then
1786 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1788 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1790 for ac_dir in $ac_dummy; do
1791 test -z "$ac_dir" && ac_dir=.
1792 if test -f $ac_dir/$ac_word; then
1793 ac_cv_prog_AWK="$ac_prog"
1800 AWK="$ac_cv_prog_AWK"
1801 if test -n "$AWK"; then
1802 echo "$ac_t""$AWK" 1>&6
1804 echo "$ac_t""no" 1>&6
1807 test -n "$AWK" && break
1810 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1811 echo "configure:1812: checking whether ${MAKE-make} sets \${MAKE}" >&5
1812 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1813 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1814 echo $ac_n "(cached) $ac_c" 1>&6
1816 cat > conftestmake <<\EOF
1818 @echo 'ac_maketemp="${MAKE}"'
1820 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1821 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1822 if test -n "$ac_maketemp"; then
1823 eval ac_cv_prog_make_${ac_make}_set=yes
1825 eval ac_cv_prog_make_${ac_make}_set=no
1829 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1830 echo "$ac_t""yes" 1>&6
1833 echo "$ac_t""no" 1>&6
1834 SET_MAKE="MAKE=${MAKE-make}"
1837 # Find a good install program. We prefer a C program (faster),
1838 # so one script is as good as another. But avoid the broken or
1839 # incompatible versions:
1840 # SysV /etc/install, /usr/sbin/install
1841 # SunOS /usr/etc/install
1842 # IRIX /sbin/install
1844 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1845 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1846 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1847 # ./install, which can be erroneously created by make from ./install.sh.
1848 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1849 echo "configure:1850: checking for a BSD compatible install" >&5
1850 if test -z "$INSTALL"; then
1851 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1852 echo $ac_n "(cached) $ac_c" 1>&6
1854 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1855 for ac_dir in $PATH; do
1856 # Account for people who put trailing slashes in PATH elements.
1858 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1860 # OSF1 and SCO ODT 3.0 have their own names for install.
1861 # Don't use installbsd from OSF since it installs stuff as root
1863 for ac_prog in ginstall scoinst install; do
1864 if test -f $ac_dir/$ac_prog; then
1865 if test $ac_prog = install &&
1866 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1867 # AIX install. It has an incompatible calling convention.
1870 ac_cv_path_install="$ac_dir/$ac_prog -c"
1881 if test "${ac_cv_path_install+set}" = set; then
1882 INSTALL="$ac_cv_path_install"
1884 # As a last resort, use the slow shell script. We don't cache a
1885 # path for INSTALL within a source directory, because that will
1886 # break other packages using the cache if that directory is
1887 # removed, or if the path is relative.
1888 INSTALL="$ac_install_sh"
1891 echo "$ac_t""$INSTALL" 1>&6
1893 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1894 # It thinks the first close brace ends the variable substitution.
1895 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1897 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1899 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1905 cf_dir=`echo $INSTALL | sed -e 's:/[^/]*$::'`
1906 test -z "$cf_dir" && cf_dir=.
1907 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's:^.*/::'`
1911 echo $ac_n "checking for long file names""... $ac_c" 1>&6
1912 echo "configure:1913: checking for long file names" >&5
1913 if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
1914 echo $ac_n "(cached) $ac_c" 1>&6
1916 ac_cv_sys_long_file_names=yes
1917 # Test for long file names in all the places we know might matter:
1918 # . the current directory, where building will happen
1919 # $prefix/lib where we will be installing things
1920 # $exec_prefix/lib likewise
1921 # eval it to expand exec_prefix.
1922 # $TMPDIR if set, where it might want to write temporary files
1923 # if $TMPDIR is not set:
1924 # /tmp where it might want to write temporary files
1927 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
1928 ac_tmpdirs="$TMPDIR"
1930 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
1932 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
1933 test -d $ac_dir || continue
1934 test -w $ac_dir || continue # It is less confusing to not echo anything here.
1935 (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
1936 (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
1937 val=`cat $ac_dir/conftest9012345 2>/dev/null`
1938 if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
1939 ac_cv_sys_long_file_names=no
1940 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
1943 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
1947 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
1948 if test $ac_cv_sys_long_file_names = yes; then
1949 cat >> confdefs.h <<\EOF
1950 #define HAVE_LONG_FILE_NAMES 1
1956 echo $ac_n "checking if filesystem supports mixed-case filenames""... $ac_c" 1>&6
1957 echo "configure:1958: checking if filesystem supports mixed-case filenames" >&5
1958 if eval "test \"`echo '$''{'cf_cv_mixedcase'+set}'`\" = set"; then
1959 echo $ac_n "(cached) $ac_c" 1>&6
1962 rm -f conftest CONFTEST
1964 if test -f CONFTEST ; then
1969 rm -f conftest CONFTEST
1973 echo "$ac_t""$cf_cv_mixedcase" 1>&6
1974 test "$cf_cv_mixedcase" = yes && cat >> confdefs.h <<\EOF
1975 #define MIXEDCASE_FILENAMES 1
1979 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1980 echo "configure:1981: checking whether ln -s works" >&5
1981 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1982 echo $ac_n "(cached) $ac_c" 1>&6
1985 if ln -s X conftestdata 2>/dev/null
1988 ac_cv_prog_LN_S="ln -s"
1993 LN_S="$ac_cv_prog_LN_S"
1994 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1995 echo "$ac_t""yes" 1>&6
1997 echo "$ac_t""no" 1>&6
2000 # Extract the first word of "ranlib", so it can be a program name with args.
2001 set dummy ranlib; ac_word=$2
2002 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2003 echo "configure:2004: checking for $ac_word" >&5
2004 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
2005 echo $ac_n "(cached) $ac_c" 1>&6
2007 if test -n "$RANLIB"; then
2008 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
2010 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2012 for ac_dir in $ac_dummy; do
2013 test -z "$ac_dir" && ac_dir=.
2014 if test -f $ac_dir/$ac_word; then
2015 ac_cv_prog_RANLIB="ranlib"
2020 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
2023 RANLIB="$ac_cv_prog_RANLIB"
2024 if test -n "$RANLIB"; then
2025 echo "$ac_t""$RANLIB" 1>&6
2027 echo "$ac_t""no" 1>&6
2032 # Extract the first word of "ctags", so it can be a program name with args.
2033 set dummy ctags; ac_word=$2
2034 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2035 echo "configure:2036: checking for $ac_word" >&5
2036 if eval "test \"`echo '$''{'ac_cv_prog_MAKE_LOWER_TAGS'+set}'`\" = set"; then
2037 echo $ac_n "(cached) $ac_c" 1>&6
2039 if test -n "$MAKE_LOWER_TAGS"; then
2040 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2042 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2044 for ac_dir in $ac_dummy; do
2045 test -z "$ac_dir" && ac_dir=.
2046 if test -f $ac_dir/$ac_word; then
2047 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2052 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2055 MAKE_LOWER_TAGS="$ac_cv_prog_MAKE_LOWER_TAGS"
2056 if test -n "$MAKE_LOWER_TAGS"; then
2057 echo "$ac_t""$MAKE_LOWER_TAGS" 1>&6
2059 echo "$ac_t""no" 1>&6
2063 if test "$cf_cv_mixedcase" = yes ; then
2064 # Extract the first word of "etags", so it can be a program name with args.
2065 set dummy etags; ac_word=$2
2066 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2067 echo "configure:2068: checking for $ac_word" >&5
2068 if eval "test \"`echo '$''{'ac_cv_prog_MAKE_UPPER_TAGS'+set}'`\" = set"; then
2069 echo $ac_n "(cached) $ac_c" 1>&6
2071 if test -n "$MAKE_UPPER_TAGS"; then
2072 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2074 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2076 for ac_dir in $ac_dummy; do
2077 test -z "$ac_dir" && ac_dir=.
2078 if test -f $ac_dir/$ac_word; then
2079 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2084 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2087 MAKE_UPPER_TAGS="$ac_cv_prog_MAKE_UPPER_TAGS"
2088 if test -n "$MAKE_UPPER_TAGS"; then
2089 echo "$ac_t""$MAKE_UPPER_TAGS" 1>&6
2091 echo "$ac_t""no" 1>&6
2098 if test "$MAKE_UPPER_TAGS" = yes ; then
2105 if test "$MAKE_LOWER_TAGS" = yes ; then
2112 for ac_prog in tdlint lint alint
2114 # Extract the first word of "$ac_prog", so it can be a program name with args.
2115 set dummy $ac_prog; ac_word=$2
2116 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2117 echo "configure:2118: checking for $ac_word" >&5
2118 if eval "test \"`echo '$''{'ac_cv_prog_LINT'+set}'`\" = set"; then
2119 echo $ac_n "(cached) $ac_c" 1>&6
2121 if test -n "$LINT"; then
2122 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2124 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2126 for ac_dir in $ac_dummy; do
2127 test -z "$ac_dir" && ac_dir=.
2128 if test -f $ac_dir/$ac_word; then
2129 ac_cv_prog_LINT="$ac_prog"
2136 LINT="$ac_cv_prog_LINT"
2137 if test -n "$LINT"; then
2138 echo "$ac_t""$LINT" 1>&6
2140 echo "$ac_t""no" 1>&6
2143 test -n "$LINT" && break
2146 for ac_prog in man man_db
2148 # Extract the first word of "$ac_prog", so it can be a program name with args.
2149 set dummy $ac_prog; ac_word=$2
2150 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2151 echo "configure:2152: checking for $ac_word" >&5
2152 if eval "test \"`echo '$''{'ac_cv_prog_MAN'+set}'`\" = set"; then
2153 echo $ac_n "(cached) $ac_c" 1>&6
2155 if test -n "$MAN"; then
2156 ac_cv_prog_MAN="$MAN" # Let the user override the test.
2158 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2160 for ac_dir in $ac_dummy; do
2161 test -z "$ac_dir" && ac_dir=.
2162 if test -f $ac_dir/$ac_word; then
2163 ac_cv_prog_MAN="$ac_prog"
2170 MAN="$ac_cv_prog_MAN"
2171 if test -n "$MAN"; then
2172 echo "$ac_t""$MAN" 1>&6
2174 echo "$ac_t""no" 1>&6
2177 test -n "$MAN" && break
2182 if eval "test \"`echo '$''{'cf_cv_subst_LD'+set}'`\" = set"; then
2183 echo $ac_n "(cached) $ac_c" 1>&6
2186 echo $ac_n "checking for loader (symbol LD)""... $ac_c" 1>&6
2187 echo "configure:2188: checking for loader (symbol LD)" >&5
2188 test -z "$LD" && LD=ld
2189 echo "$ac_t""$LD" 1>&6
2194 LD=${cf_cv_subst_LD}
2196 if eval "test \"`echo '$''{'cf_cv_subst_AR'+set}'`\" = set"; then
2197 echo $ac_n "(cached) $ac_c" 1>&6
2200 echo $ac_n "checking for archiver (symbol AR)""... $ac_c" 1>&6
2201 echo "configure:2202: checking for archiver (symbol AR)" >&5
2202 test -z "$AR" && AR=ar
2203 echo "$ac_t""$AR" 1>&6
2208 AR=${cf_cv_subst_AR}
2210 if eval "test \"`echo '$''{'cf_cv_subst_AR_OPTS'+set}'`\" = set"; then
2211 echo $ac_n "(cached) $ac_c" 1>&6
2214 echo $ac_n "checking for archiver options (symbol AR_OPTS)""... $ac_c" 1>&6
2215 echo "configure:2216: checking for archiver options (symbol AR_OPTS)" >&5
2216 test -z "$AR_OPTS" && AR_OPTS=rv
2217 echo "$ac_t""$AR_OPTS" 1>&6
2219 cf_cv_subst_AR_OPTS=$AR_OPTS
2222 AR_OPTS=${cf_cv_subst_AR_OPTS}
2226 echo $ac_n "checking for makeflags variable""... $ac_c" 1>&6
2227 echo "configure:2228: checking for makeflags variable" >&5
2228 if eval "test \"`echo '$''{'cf_cv_makeflags'+set}'`\" = set"; then
2229 echo $ac_n "(cached) $ac_c" 1>&6
2233 for cf_option in '-$(MAKEFLAGS)' '$(MFLAGS)'
2235 cat >cf_makeflags.tmp <<CF_EOF
2238 @ echo '.$cf_option'
2240 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null`
2241 case "$cf_result" in
2243 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
2244 case "$cf_result" in
2245 .*CC=*) cf_cv_makeflags=
2247 *) cf_cv_makeflags=$cf_option
2252 *) echo no match "$cf_result"
2256 rm -f cf_makeflags.tmp
2260 echo "$ac_t""$cf_cv_makeflags" 1>&6
2265 echo $ac_n "checking if you have specified an install-prefix""... $ac_c" 1>&6
2266 echo "configure:2267: checking if you have specified an install-prefix" >&5
2268 # Check whether --with-install-prefix or --without-install-prefix was given.
2269 if test "${with_install_prefix+set}" = set; then
2270 withval="$with_install_prefix"
2271 case "$withval" in #(vi
2274 *) DESTDIR="$withval"
2279 echo "$ac_t""$DESTDIR" 1>&6
2282 ###############################################################################
2285 ### Options to allow the user to specify the set of libraries which are used.
2286 ### Use "--without-normal --with-shared" to allow the default model to be
2287 ### shared, for example.
2290 echo $ac_n "checking if you want to build libraries with libtool""... $ac_c" 1>&6
2291 echo "configure:2292: checking if you want to build libraries with libtool" >&5
2293 # Check whether --with-libtool or --without-libtool was given.
2294 if test "${with_libtool+set}" = set; then
2295 withval="$with_libtool"
2296 with_libtool=$withval
2301 echo "$ac_t""$with_libtool" 1>&6
2302 if test "$with_libtool" = "yes"; then
2303 cf_list_models="$cf_list_models libtool"
2304 test -z "$LIBTOOL" && LIBTOOL=libtool
2310 echo $ac_n "checking if you want to build shared libraries""... $ac_c" 1>&6
2311 echo "configure:2312: checking if you want to build shared libraries" >&5
2313 # Check whether --with-shared or --without-shared was given.
2314 if test "${with_shared+set}" = set; then
2315 withval="$with_shared"
2316 with_shared=$withval
2321 echo "$ac_t""$with_shared" 1>&6
2322 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
2324 echo $ac_n "checking if you want to build static libraries""... $ac_c" 1>&6
2325 echo "configure:2326: checking if you want to build static libraries" >&5
2327 # Check whether --with-normal or --without-normal was given.
2328 if test "${with_normal+set}" = set; then
2329 withval="$with_normal"
2330 with_normal=$withval
2335 echo "$ac_t""$with_normal" 1>&6
2336 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
2338 echo $ac_n "checking if you want to build debug libraries""... $ac_c" 1>&6
2339 echo "configure:2340: checking if you want to build debug libraries" >&5
2341 # Check whether --with-debug or --without-debug was given.
2342 if test "${with_debug+set}" = set; then
2343 withval="$with_debug"
2349 echo "$ac_t""$with_debug" 1>&6
2350 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
2352 echo $ac_n "checking if you want to build profiling libraries""... $ac_c" 1>&6
2353 echo "configure:2354: checking if you want to build profiling libraries" >&5
2355 # Check whether --with-profile or --without-profile was given.
2356 if test "${with_profile+set}" = set; then
2357 withval="$with_profile"
2358 with_profile=$withval
2363 echo "$ac_t""$with_profile" 1>&6
2364 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
2366 ###############################################################################
2368 echo $ac_n "checking for specified models""... $ac_c" 1>&6
2369 echo "configure:2370: checking for specified models" >&5
2370 test -z "$cf_list_models" && cf_list_models=normal
2371 test "$with_libtool" = "yes" && cf_list_models=libtool
2372 echo "$ac_t""$cf_list_models" 1>&6
2374 ### Use the first model as the default, and save its suffix for use in building
2375 ### up test-applications.
2376 echo $ac_n "checking for default model""... $ac_c" 1>&6
2377 echo "configure:2378: checking for default model" >&5
2378 DFT_LWR_MODEL=`echo $cf_list_models | $AWK '{print $1}'`
2379 echo "$ac_t""$DFT_LWR_MODEL" 1>&6
2382 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2393 case $cf_cv_system_name in
2394 OS/2*) LIB_PREFIX='' ;;
2395 os2*) LIB_PREFIX='' ;;
2396 *) LIB_PREFIX='lib' ;;
2398 cf_prefix=$LIB_PREFIX
2401 LIB_PREFIX=$cf_prefix
2407 ###############################################################################
2409 echo $ac_n "checking if you want to build a separate terminfo library""... $ac_c" 1>&6
2410 echo "configure:2411: checking if you want to build a separate terminfo library" >&5
2412 # Check whether --with-termlib or --without-termlib was given.
2413 if test "${with_termlib+set}" = set; then
2414 withval="$with_termlib"
2415 with_termlib=$withval
2420 echo "$ac_t""$with_termlib" 1>&6
2422 ### Checks for special libraries, must be done up-front.
2423 echo $ac_n "checking if you want to link with dbmalloc for testing""... $ac_c" 1>&6
2424 echo "configure:2425: checking if you want to link with dbmalloc for testing" >&5
2426 # Check whether --with-dbmalloc or --without-dbmalloc was given.
2427 if test "${with_dbmalloc+set}" = set; then
2428 withval="$with_dbmalloc"
2429 with_dbmalloc=$withval
2434 echo "$ac_t""$with_dbmalloc" 1>&6
2435 if test "$with_dbmalloc" = yes ; then
2436 echo $ac_n "checking for debug_malloc in -ldbmalloc""... $ac_c" 1>&6
2437 echo "configure:2438: checking for debug_malloc in -ldbmalloc" >&5
2438 ac_lib_var=`echo dbmalloc'_'debug_malloc | sed 'y%./+-%__p_%'`
2439 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2440 echo $ac_n "(cached) $ac_c" 1>&6
2442 ac_save_LIBS="$LIBS"
2443 LIBS="-ldbmalloc $LIBS"
2444 cat > conftest.$ac_ext <<EOF
2445 #line 2446 "configure"
2446 #include "confdefs.h"
2447 /* Override any gcc2 internal prototype to avoid an error. */
2448 /* We use char because int might match the return type of a gcc2
2449 builtin and then its argument prototype would still apply. */
2450 char debug_malloc();
2456 if { (eval echo configure:2457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2458 eval "ac_cv_lib_$ac_lib_var=yes"
2460 echo "configure: failed program was:" >&5
2461 cat conftest.$ac_ext >&5
2463 eval "ac_cv_lib_$ac_lib_var=no"
2466 LIBS="$ac_save_LIBS"
2469 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2470 echo "$ac_t""yes" 1>&6
2471 ac_tr_lib=HAVE_LIB`echo dbmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2472 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2473 cat >> confdefs.h <<EOF
2474 #define $ac_tr_lib 1
2477 LIBS="-ldbmalloc $LIBS"
2480 echo "$ac_t""no" 1>&6
2485 echo $ac_n "checking if you want to link with dmalloc for testing""... $ac_c" 1>&6
2486 echo "configure:2487: checking if you want to link with dmalloc for testing" >&5
2488 # Check whether --with-dmalloc or --without-dmalloc was given.
2489 if test "${with_dmalloc+set}" = set; then
2490 withval="$with_dmalloc"
2491 with_dmalloc=$withval
2496 echo "$ac_t""$with_dmalloc" 1>&6
2497 if test "$with_dmalloc" = yes ; then
2498 echo $ac_n "checking for dmalloc_debug in -ldmalloc""... $ac_c" 1>&6
2499 echo "configure:2500: checking for dmalloc_debug in -ldmalloc" >&5
2500 ac_lib_var=`echo dmalloc'_'dmalloc_debug | sed 'y%./+-%__p_%'`
2501 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2502 echo $ac_n "(cached) $ac_c" 1>&6
2504 ac_save_LIBS="$LIBS"
2505 LIBS="-ldmalloc $LIBS"
2506 cat > conftest.$ac_ext <<EOF
2507 #line 2508 "configure"
2508 #include "confdefs.h"
2509 /* Override any gcc2 internal prototype to avoid an error. */
2510 /* We use char because int might match the return type of a gcc2
2511 builtin and then its argument prototype would still apply. */
2512 char dmalloc_debug();
2518 if { (eval echo configure:2519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2520 eval "ac_cv_lib_$ac_lib_var=yes"
2522 echo "configure: failed program was:" >&5
2523 cat conftest.$ac_ext >&5
2525 eval "ac_cv_lib_$ac_lib_var=no"
2528 LIBS="$ac_save_LIBS"
2531 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2532 echo "$ac_t""yes" 1>&6
2533 ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2534 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2535 cat >> confdefs.h <<EOF
2536 #define $ac_tr_lib 1
2539 LIBS="-ldmalloc $LIBS"
2542 echo "$ac_t""no" 1>&6
2548 echo $ac_n "checking if you want to link with the gpm mouse library""... $ac_c" 1>&6
2549 echo "configure:2550: checking if you want to link with the gpm mouse library" >&5
2551 # Check whether --with-gpm or --without-gpm was given.
2552 if test "${with_gpm+set}" = set; then
2559 echo "$ac_t""$with_gpm" 1>&6
2560 if test "$with_gpm" = yes ; then
2561 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
2562 echo "configure:2563: checking for Gpm_Open in -lgpm" >&5
2563 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
2564 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2565 echo $ac_n "(cached) $ac_c" 1>&6
2567 ac_save_LIBS="$LIBS"
2569 cat > conftest.$ac_ext <<EOF
2570 #line 2571 "configure"
2571 #include "confdefs.h"
2572 /* Override any gcc2 internal prototype to avoid an error. */
2573 /* We use char because int might match the return type of a gcc2
2574 builtin and then its argument prototype would still apply. */
2581 if { (eval echo configure:2582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2583 eval "ac_cv_lib_$ac_lib_var=yes"
2585 echo "configure: failed program was:" >&5
2586 cat conftest.$ac_ext >&5
2588 eval "ac_cv_lib_$ac_lib_var=no"
2591 LIBS="$ac_save_LIBS"
2594 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2595 echo "$ac_t""yes" 1>&6
2597 EXTRA_LIBS="-lgpm -lncurses $EXTRA_LIBS"
2598 SHLIB_LIST="-lgpm $SHLIB_LIST"
2599 cat >> confdefs.h <<\EOF
2600 #define HAVE_LIBGPM 1
2605 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2606 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2607 echo "configure:2608: checking for $ac_hdr" >&5
2608 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2609 echo $ac_n "(cached) $ac_c" 1>&6
2611 cat > conftest.$ac_ext <<EOF
2612 #line 2613 "configure"
2613 #include "confdefs.h"
2616 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2617 { (eval echo configure:2618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2618 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2619 if test -z "$ac_err"; then
2621 eval "ac_cv_header_$ac_safe=yes"
2624 echo "configure: failed program was:" >&5
2625 cat conftest.$ac_ext >&5
2627 eval "ac_cv_header_$ac_safe=no"
2631 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2632 echo "$ac_t""yes" 1>&6
2633 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2634 cat >> confdefs.h <<EOF
2635 #define $ac_tr_hdr 1
2639 echo "$ac_t""no" 1>&6
2645 echo "$ac_t""no" 1>&6
2646 echo "configure: warning: Cannot link with gpm library - read the FAQ" 1>&2
2652 if test X"$CC_G_OPT" = X"" ; then
2654 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
2658 if test X"$CXX_G_OPT" = X"" ; then
2660 test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
2664 echo $ac_n "checking for default loader flags""... $ac_c" 1>&6
2665 echo "configure:2666: checking for default loader flags" >&5
2666 case $DFT_LWR_MODEL in
2667 libtool) LD_MODEL='' ;;
2668 normal) LD_MODEL='' ;;
2669 debug) LD_MODEL=$CC_G_OPT ;;
2670 profile) LD_MODEL='-pg';;
2671 shared) LD_MODEL='' ;;
2673 echo "$ac_t""$LD_MODEL" 1>&6
2675 echo $ac_n "checking if rpath option should be used""... $ac_c" 1>&6
2676 echo "configure:2677: checking if rpath option should be used" >&5
2678 # Check whether --enable-rpath or --disable-rpath was given.
2679 if test "${enable_rpath+set}" = set; then
2680 enableval="$enable_rpath"
2681 cf_cv_ld_rpath=$enableval
2686 echo "$ac_t""$cf_cv_ld_rpath" 1>&6
2693 INSTALL_LIB="-m 644"
2695 cf_cv_do_symlinks=no
2697 echo $ac_n "checking if release/abi version should be used for shared libs""... $ac_c" 1>&6
2698 echo "configure:2699: checking if release/abi version should be used for shared libs" >&5
2700 # Check whether --with-shlib-version or --without-shlib-version was given.
2701 if test "${with_shlib_version+set}" = set; then
2702 withval="$with_shlib_version"
2703 test -z "$withval" && withval=auto
2704 case $withval in #(vi
2706 cf_cv_shlib_version=auto
2708 rel|abi|auto|no) #(vi
2709 cf_cv_shlib_version=$withval
2712 { echo "configure: error: option value must be one of: rel, abi, auto or no" 1>&2; exit 1; }
2717 cf_cv_shlib_version=auto
2720 echo "$ac_t""$cf_cv_shlib_version" 1>&6
2724 # Some less-capable ports of gcc support only -fpic
2726 if test "$GCC" = yes
2728 echo $ac_n "checking which $CC option to use""... $ac_c" 1>&6
2729 echo "configure:2730: checking which $CC option to use" >&5
2730 cf_save_CFLAGS="$CFLAGS"
2731 for CC_SHARED_OPTS in -fPIC -fpic ''
2733 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
2734 cat > conftest.$ac_ext <<EOF
2735 #line 2736 "configure"
2736 #include "confdefs.h"
2742 if { (eval echo configure:2743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2746 echo "configure: failed program was:" >&5
2747 cat conftest.$ac_ext >&5
2751 echo "$ac_t""$CC_SHARED_OPTS" 1>&6
2752 CFLAGS="$cf_save_CFLAGS"
2755 cf_cv_shlib_version_infix=no
2757 case $cf_cv_system_name in
2759 MK_SHARED_LIB='$(CC) -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
2763 MK_SHARED_LIB='$(CC) -shared -Wl,--out-implib=$(IMPORT_LIB) -Wl,--export-all-symbols -o $(SHARED_LIB)'
2764 cf_cv_shlib_version=cygdll
2765 cf_cv_shlib_version_infix=cygdll
2768 EXTRA_CFLAGS="-no-cpp-precomp"
2769 CC_SHARED_OPTS="-dynamic"
2770 MK_SHARED_LIB='$(CC) -dynamiclib -install_name $(DESTDIR)$(libdir)/`basename $@` -compatibility_version $(ABI_VERSION) -current_version $(ABI_VERSION) -o $@'
2771 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
2772 cf_cv_shlib_version_infix=yes
2775 # (tested with gcc 2.7.2 -- I don't have c89)
2776 if test "$GCC" = yes; then
2777 LD_SHARED_OPTS='-Xlinker +b -Xlinker $(libdir)'
2780 LD_SHARED_OPTS='-Wl,+b,$(libdir)'
2782 MK_SHARED_LIB='$(LD) +b $(libdir) -b -o $@'
2783 # HP-UX shared libraries must be executable, and should be
2784 # readonly to exploit a quirk in the memory manager.
2785 INSTALL_LIB="-m 555"
2788 if test "$cf_cv_ld_rpath" = yes ; then
2789 cf_ld_rpath_opt="-Wl,-rpath,"
2790 EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
2792 # tested with IRIX 5.2 and 'cc'.
2793 if test "$GCC" != yes; then
2794 CC_SHARED_OPTS='-KPIC'
2796 MK_SHARED_LIB='$(LD) -shared -rdata_shared -soname `basename $@` -o $@'
2797 cf_cv_rm_so_locs=yes
2800 if test "$DFT_LWR_MODEL" = "shared" ; then
2801 LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
2802 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
2804 if test "$cf_cv_ld_rpath" = yes ; then
2805 cf_ld_rpath_opt="-Wl,-rpath,"
2806 EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
2808 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
2809 MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@ .$(REL_VERSION)`.$(ABI_VERSION),-stats,-lc -o $@'
2812 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
2813 MK_SHARED_LIB='$(LD) -Bshareable -soname,`basename $@.$(ABI_VERSION)` -o $@'
2816 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
2817 MK_SHARED_LIB='$(LD) -Bshareable -o $@'
2818 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
2821 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
2822 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
2823 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
2824 LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
2825 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
2826 EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
2827 MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
2828 if test "$cf_cv_shlib_version" = auto; then
2829 if test ! -f /usr/libexec/ld.elf_so; then
2830 cf_cv_shlib_version=rel
2834 MK_SHARED_LIB='$(LD) -Bshareable -o $@'
2838 # tested with OSF/1 V3.2 and 'cc'
2839 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
2840 # link with shared libs).
2841 MK_SHARED_LIB='$(LD) -set_version $(REL_VERSION):$(ABI_VERSION) -expect_unresolved "*" -shared -soname `basename $@`'
2844 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
2847 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
2848 if test "$DFT_LWR_MODEL" = "shared" ; then
2849 LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
2850 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
2852 if test "$cf_cv_ld_rpath" = yes ; then
2853 cf_ld_rpath_opt="-rpath"
2854 # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
2856 cf_cv_rm_so_locs=yes
2858 sco3.2v5*) # (also uw2* and UW7) hops 13-Apr-98
2859 # tested with osr5.0.5
2860 if test "$ac_cv_prog_gcc" != yes; then
2861 CC_SHARED_OPTS='-belf -KPIC'
2863 MK_SHARED_LIB='$(LD) -dy -G -h `basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
2864 if test "$cf_cv_ld_rpath" = yes ; then
2865 # only way is to set LD_RUN_PATH but no switch for it
2868 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
2869 LINK_PROGS='LD_RUN_PATH=$(libdir)'
2870 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
2873 # tested with SunOS 4.1.1 and gcc 2.7.0
2874 if test "$ac_cv_prog_gcc" != yes; then
2875 CC_SHARED_OPTS='-KPIC'
2877 MK_SHARED_LIB='$(LD) -assert pure-text -o $@'
2878 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
2881 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
2882 if test "$ac_cv_prog_gcc" != yes; then
2883 CC_SHARED_OPTS='-KPIC'
2885 MK_SHARED_LIB='$(LD) -dy -G -h `basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
2886 if test "$DFT_LWR_MODEL" = "shared" ; then
2887 LOCAL_LDFLAGS="-R `pwd`/lib:\$(libdir)"
2888 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
2890 if test "$cf_cv_ld_rpath" = yes ; then
2891 cf_ld_rpath_opt="-R"
2892 EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
2894 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
2897 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
2898 if test "$ac_cv_prog_gcc" != yes; then
2899 CC_SHARED_OPTS='-KPIC'
2901 MK_SHARED_LIB='$(LD) -d y -G -o $@'
2904 CC_SHARED_OPTS='unknown'
2905 MK_SHARED_LIB='echo unknown'
2909 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
2910 case "$cf_cv_shlib_version" in #(vi
2912 case "$MK_SHARED_LIB" in #(vi
2914 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
2917 echo "configure: warning: ignored --with-shlib-version" 1>&2
2923 if test -n "$cf_ld_rpath_opt" ; then
2924 echo $ac_n "checking if we need a space after rpath option""... $ac_c" 1>&6
2925 echo "configure:2926: checking if we need a space after rpath option" >&5
2926 cf_save_LIBS="$LIBS"
2927 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
2928 cat > conftest.$ac_ext <<EOF
2929 #line 2930 "configure"
2930 #include "confdefs.h"
2936 if { (eval echo configure:2937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2940 echo "configure: failed program was:" >&5
2941 cat conftest.$ac_ext >&5
2946 LIBS="$cf_save_LIBS"
2947 echo "$ac_t""$cf_rpath_space" 1>&6
2948 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
2949 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\$(libdir)"
2962 if test "$CC_SHARED_OPTS" = "unknown"; then
2963 for model in $cf_list_models; do
2964 if test "$model" = "shared"; then
2965 { echo "configure: error: Shared libraries are not supported in this version" 1>&2; exit 1; }
2970 ###############################################################################
2973 ### use option --disable-overwrite to leave out the link to -lcurses
2974 echo $ac_n "checking if you wish to install ncurses overwriting curses""... $ac_c" 1>&6
2975 echo "configure:2976: checking if you wish to install ncurses overwriting curses" >&5
2977 # Check whether --enable-overwrite or --disable-overwrite was given.
2978 if test "${enable_overwrite+set}" = set; then
2979 enableval="$enable_overwrite"
2980 with_overwrite=$enableval
2982 if test "$prefix" != "/usr/local" ; then with_overwrite=yes; else with_overwrite=no; fi
2985 echo "$ac_t""$with_overwrite" 1>&6
2987 echo $ac_n "checking if external terminfo-database is used""... $ac_c" 1>&6
2988 echo "configure:2989: checking if external terminfo-database is used" >&5
2990 # Check whether --enable-database or --disable-database was given.
2991 if test "${enable_database+set}" = set; then
2992 enableval="$enable_database"
2993 use_database=$enableval
2998 echo "$ac_t""$use_database" 1>&6
3000 case $host_os in #(vi
3002 TERMINFO_SRC='${top_srcdir}/misc/emx.src'
3005 TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
3011 case $cf_cv_system_name in
3012 os2*) PATHSEP=';' ;;
3018 if test "$use_database" != no ; then
3019 cat >> confdefs.h <<\EOF
3020 #define USE_DATABASE 1
3023 echo $ac_n "checking which terminfo source-file will be installed""... $ac_c" 1>&6
3024 echo "configure:3025: checking which terminfo source-file will be installed" >&5
3026 # Check whether --enable-database or --disable-database was given.
3027 if test "${enable_database+set}" = set; then
3028 enableval="$enable_database"
3029 TERMINFO_SRC=$withval
3032 echo "$ac_t""$TERMINFO_SRC" 1>&6
3035 echo $ac_n "checking for list of fallback descriptions""... $ac_c" 1>&6
3036 echo "configure:3037: checking for list of fallback descriptions" >&5
3038 # Check whether --with-fallbacks or --without-fallbacks was given.
3039 if test "${with_fallbacks+set}" = set; then
3040 withval="$with_fallbacks"
3041 with_fallback=$withval
3046 echo "$ac_t""$with_fallback" 1>&6
3047 FALLBACK_LIST=`echo $with_fallback|sed -e 's/,/ /g'`
3051 if test "$use_database" = no ; then
3052 TERMINFO="${datadir}/terminfo"
3056 echo $ac_n "checking for list of terminfo directories""... $ac_c" 1>&6
3057 echo "configure:3058: checking for list of terminfo directories" >&5
3061 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
3062 if test "${with_terminfo_dirs+set}" = set; then
3063 withval="$with_terminfo_dirs"
3066 withval=${TERMINFO_DIRS-${datadir}/terminfo}
3069 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
3071 for cf_src_path in $withval
3074 case ".$cf_src_path" in #(vi
3075 .\$\(*\)*|.\'*\'*) #(vi
3079 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3082 eval cf_src_path="$cf_src_path"
3083 case ".$cf_src_path" in #(vi
3085 cf_src_path=`echo $cf_src_path | sed -e s@NONE@$ac_default_prefix@`
3090 cf_src_path=`echo $cf_src_path | sed -e s@NONE@$ac_default_prefix@`
3093 { echo "configure: error: expected a pathname, not \"$cf_src_path\"" 1>&2; exit 1; }
3097 test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
3098 cf_dst_path="${cf_dst_path}${cf_src_path}"
3104 eval 'TERMINFO_DIRS="$cf_dst_path"'
3107 echo "$ac_t""$TERMINFO_DIRS" 1>&6
3108 test -n "$TERMINFO_DIRS" && cat >> confdefs.h <<EOF
3109 #define TERMINFO_DIRS "$TERMINFO_DIRS"
3113 echo $ac_n "checking for default terminfo directory""... $ac_c" 1>&6
3114 echo "configure:3115: checking for default terminfo directory" >&5
3116 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
3117 if test "${with_default_terminfo_dir+set}" = set; then
3118 withval="$with_default_terminfo_dir"
3121 withval="${TERMINFO-${datadir}/terminfo}"
3124 case ".$withval" in #(vi
3125 .\$\(*\)*|.\'*\'*) #(vi
3129 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3132 eval withval="$withval"
3133 case ".$withval" in #(vi
3135 withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
3140 withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
3143 { echo "configure: error: expected a pathname, not \"$withval\"" 1>&2; exit 1; }
3147 eval TERMINFO="$withval"
3149 echo "$ac_t""$TERMINFO" 1>&6
3150 cat >> confdefs.h <<EOF
3151 #define TERMINFO "$TERMINFO"
3160 ### use option --disable-big-core to make tic run on small machines
3161 ### We need 4Mb, check if we can allocate 50% more than that.
3162 echo $ac_n "checking if big-core option selected""... $ac_c" 1>&6
3163 echo "configure:3164: checking if big-core option selected" >&5
3165 # Check whether --enable-big-core or --disable-big-core was given.
3166 if test "${enable_big_core+set}" = set; then
3167 enableval="$enable_big_core"
3168 with_big_core=$enableval
3170 if test "$cross_compiling" = yes; then
3173 cat > conftest.$ac_ext <<EOF
3174 #line 3175 "configure"
3175 #include "confdefs.h"
3180 unsigned long n = 6000000L;
3181 char *s = malloc(n);
3187 if { (eval echo configure:3188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3191 echo "configure: failed program was:" >&5
3192 cat conftest.$ac_ext >&5
3201 echo "$ac_t""$with_big_core" 1>&6
3202 test "$with_big_core" = "yes" && cat >> confdefs.h <<\EOF
3203 #define HAVE_BIG_CORE 1
3207 ### use option --enable-termcap to compile in the termcap fallback support
3208 echo $ac_n "checking if you want termcap-fallback support""... $ac_c" 1>&6
3209 echo "configure:3210: checking if you want termcap-fallback support" >&5
3211 # Check whether --enable-termcap or --disable-termcap was given.
3212 if test "${enable_termcap+set}" = set; then
3213 enableval="$enable_termcap"
3214 with_termcap=$enableval
3219 echo "$ac_t""$with_termcap" 1>&6
3221 if test "$with_termcap" != "yes" ; then
3222 if test "$use_database" = no ; then
3223 if test -z $with_fallback ; then
3224 { echo "configure: error: You have disabled the database w/o specifying fallbacks" 1>&2; exit 1; }
3227 cat >> confdefs.h <<\EOF
3228 #define PURE_TERMINFO 1
3233 cat >> confdefs.h <<\EOF
3234 #define USE_TERMCAP 1
3237 echo $ac_n "checking for list of termcap files""... $ac_c" 1>&6
3238 echo "configure:3239: checking for list of termcap files" >&5
3242 # Check whether --with-termpath or --without-termpath was given.
3243 if test "${with_termpath+set}" = set; then
3244 withval="$with_termpath"
3247 withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
3250 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
3252 for cf_src_path in $withval
3255 case ".$cf_src_path" in #(vi
3256 .\$\(*\)*|.\'*\'*) #(vi
3260 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3263 eval cf_src_path="$cf_src_path"
3264 case ".$cf_src_path" in #(vi
3266 cf_src_path=`echo $cf_src_path | sed -e s@NONE@$ac_default_prefix@`
3271 cf_src_path=`echo $cf_src_path | sed -e s@NONE@$ac_default_prefix@`
3274 { echo "configure: error: expected a pathname, not \"$cf_src_path\"" 1>&2; exit 1; }
3278 test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
3279 cf_dst_path="${cf_dst_path}${cf_src_path}"
3285 eval 'TERMPATH="$cf_dst_path"'
3288 echo "$ac_t""$TERMPATH" 1>&6
3289 test -n "$TERMPATH" && cat >> confdefs.h <<EOF
3290 #define TERMPATH "$TERMPATH"
3294 ### use option --enable-getcap to use a hacked getcap for reading termcaps
3295 echo $ac_n "checking if fast termcap-loader is needed""... $ac_c" 1>&6
3296 echo "configure:3297: checking if fast termcap-loader is needed" >&5
3298 # Check whether --enable-getcap or --disable-getcap was given.
3299 if test "${enable_getcap+set}" = set; then
3300 enableval="$enable_getcap"
3301 with_getcap=$enableval
3306 echo "$ac_t""$with_getcap" 1>&6
3307 test "$with_getcap" = "yes" && cat >> confdefs.h <<\EOF
3308 #define USE_GETCAP 1
3312 echo $ac_n "checking if translated termcaps will be cached in ~/.terminfo""... $ac_c" 1>&6
3313 echo "configure:3314: checking if translated termcaps will be cached in ~/.terminfo" >&5
3315 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
3316 if test "${enable_getcap_cache+set}" = set; then
3317 enableval="$enable_getcap_cache"
3318 with_getcap_cache=$enableval
3320 with_getcap_cache=no
3323 echo "$ac_t""$with_getcap_cache" 1>&6
3324 test "$with_getcap_cache" = "yes" && cat >> confdefs.h <<\EOF
3325 #define USE_GETCAP_CACHE 1
3331 ### Use option --enable-symlinks to make tic use symlinks, not hard links
3332 ### to reduce storage requirements for the terminfo database.
3338 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3339 echo "configure:3340: checking for $ac_func" >&5
3340 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3341 echo $ac_n "(cached) $ac_c" 1>&6
3343 cat > conftest.$ac_ext <<EOF
3344 #line 3345 "configure"
3345 #include "confdefs.h"
3346 /* System header to define __stub macros and hopefully few prototypes,
3347 which can conflict with char $ac_func(); below. */
3349 /* Override any gcc2 internal prototype to avoid an error. */
3350 /* We use char because int might match the return type of a gcc2
3351 builtin and then its argument prototype would still apply. */
3356 /* The GNU C library defines this for functions which it implements
3357 to always fail with ENOSYS. Some functions are actually named
3358 something starting with __ and the normal name is an alias. */
3359 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3367 if { (eval echo configure:3368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3369 eval "ac_cv_func_$ac_func=yes"
3371 echo "configure: failed program was:" >&5
3372 cat conftest.$ac_ext >&5
3374 eval "ac_cv_func_$ac_func=no"
3379 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3380 echo "$ac_t""yes" 1>&6
3381 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3382 cat >> confdefs.h <<EOF
3383 #define $ac_tr_func 1
3387 echo "$ac_t""no" 1>&6
3392 if test "$ac_cv_prog_cc_cross" = yes ; then
3397 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3398 echo "configure:3399: checking for $ac_func" >&5
3399 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3400 echo $ac_n "(cached) $ac_c" 1>&6
3402 cat > conftest.$ac_ext <<EOF
3403 #line 3404 "configure"
3404 #include "confdefs.h"
3405 /* System header to define __stub macros and hopefully few prototypes,
3406 which can conflict with char $ac_func(); below. */
3408 /* Override any gcc2 internal prototype to avoid an error. */
3409 /* We use char because int might match the return type of a gcc2
3410 builtin and then its argument prototype would still apply. */
3415 /* The GNU C library defines this for functions which it implements
3416 to always fail with ENOSYS. Some functions are actually named
3417 something starting with __ and the normal name is an alias. */
3418 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3426 if { (eval echo configure:3427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3428 eval "ac_cv_func_$ac_func=yes"
3430 echo "configure: failed program was:" >&5
3431 cat conftest.$ac_ext >&5
3433 eval "ac_cv_func_$ac_func=no"
3438 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3439 echo "$ac_t""yes" 1>&6
3440 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3441 cat >> confdefs.h <<EOF
3442 #define $ac_tr_func 1
3446 echo "$ac_t""no" 1>&6
3451 echo $ac_n "checking if link/symlink functions work""... $ac_c" 1>&6
3452 echo "configure:3453: checking if link/symlink functions work" >&5
3453 if eval "test \"`echo '$''{'cf_cv_link_funcs'+set}'`\" = set"; then
3454 echo $ac_n "(cached) $ac_c" 1>&6
3458 for cf_func in link symlink ; do
3459 if test "$cross_compiling" = yes; then
3461 eval 'ac_cv_func_'$cf_func'=error'
3463 cat > conftest.$ac_ext <<EOF
3464 #line 3465 "configure"
3465 #include "confdefs.h"
3467 #include <sys/types.h>
3468 #include <sys/stat.h>
3469 #ifdef HAVE_UNISTD_H
3475 char *src = "config.log";
3476 char *dst = "conftest.chk";
3481 fail = ($cf_func("config.log", "conftest.chk") < 0)
3482 || (stat(dst, &dst_sb) < 0)
3483 || (dst_sb.st_mtime != src_sb.st_mtime);
3493 if { (eval echo configure:3494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3496 cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
3497 eval 'ac_cv_func_'$cf_func'=yes'
3499 echo "configure: failed program was:" >&5
3500 cat conftest.$ac_ext >&5
3503 eval 'ac_cv_func_'$cf_func'=no'
3509 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
3513 echo "$ac_t""$cf_cv_link_funcs" 1>&6
3514 test "$ac_cv_func_link" = yes && cat >> confdefs.h <<\EOF
3518 test "$ac_cv_func_symlink" = yes && cat >> confdefs.h <<\EOF
3519 #define HAVE_SYMLINK 1
3528 if test "$ac_cv_func_link" != yes ; then
3529 echo $ac_n "checking if tic should use symbolic links""... $ac_c" 1>&6
3530 echo "configure:3531: checking if tic should use symbolic links" >&5
3531 if test "$ac_cv_func_symlink" = yes ; then
3536 echo "$ac_t""$with_symlinks" 1>&6
3537 elif test "$ac_cv_func_symlink" != yes ; then
3538 echo $ac_n "checking if tic should use hard links""... $ac_c" 1>&6
3539 echo "configure:3540: checking if tic should use hard links" >&5
3540 if test "$ac_cv_func_link" = yes ; then
3545 echo "$ac_t""$with_links" 1>&6
3547 echo $ac_n "checking if tic should use symbolic links""... $ac_c" 1>&6
3548 echo "configure:3549: checking if tic should use symbolic links" >&5
3550 # Check whether --enable-symlinks or --disable-symlinks was given.
3551 if test "${enable_symlinks+set}" = set; then
3552 enableval="$enable_symlinks"
3553 with_symlinks=$enableval
3558 echo "$ac_t""$with_symlinks" 1>&6
3561 test "$with_links" = yes && cat >> confdefs.h <<\EOF
3565 test "$with_symlinks" = yes && cat >> confdefs.h <<\EOF
3566 #define USE_SYMLINKS 1
3570 ### use option --enable-broken-linker to force on use of broken-linker support
3571 echo $ac_n "checking if you want broken-linker support code""... $ac_c" 1>&6
3572 echo "configure:3573: checking if you want broken-linker support code" >&5
3574 # Check whether --enable-broken_linker or --disable-broken_linker was given.
3575 if test "${enable_broken_linker+set}" = set; then
3576 enableval="$enable_broken_linker"
3577 with_broken_linker=$enableval
3579 with_broken_linker=$BROKEN_LINKER
3582 echo "$ac_t""$with_broken_linker" 1>&6
3585 if test "$with_broken_linker" = yes ; then
3586 cat >> confdefs.h <<\EOF
3587 #define BROKEN_LINKER 1
3591 elif test $DFT_LWR_MODEL = shared ; then
3592 case $cf_cv_system_name in #(vi
3594 cat >> confdefs.h <<\EOF
3595 #define BROKEN_LINKER 1
3599 test -n "$verbose" && echo " cygwin linker is broken anyway" 1>&6
3606 ### use option --with-bool to override bool's type
3607 echo $ac_n "checking for type of bool""... $ac_c" 1>&6
3608 echo "configure:3609: checking for type of bool" >&5
3610 # Check whether --with-bool or --without-bool was given.
3611 if test "${with_bool+set}" = set; then
3612 withval="$with_bool"
3613 NCURSES_BOOL="$withval"
3618 echo "$ac_t""$NCURSES_BOOL" 1>&6
3621 ### use option --with-ospeed to override ospeed's type
3622 echo $ac_n "checking for type of ospeed""... $ac_c" 1>&6
3623 echo "configure:3624: checking for type of ospeed" >&5
3625 # Check whether --with-ospeed or --without-ospeed was given.
3626 if test "${with_ospeed+set}" = set; then
3627 withval="$with_ospeed"
3628 NCURSES_OSPEED="$withval"
3630 NCURSES_OSPEED=short
3633 echo "$ac_t""$NCURSES_OSPEED" 1>&6
3636 ### use option --enable-bsdpad to have tputs process BSD-style prefix padding
3637 echo $ac_n "checking if tputs should process BSD-style prefix padding""... $ac_c" 1>&6
3638 echo "configure:3639: checking if tputs should process BSD-style prefix padding" >&5
3640 # Check whether --enable-bsdpad or --disable-bsdpad was given.
3641 if test "${enable_bsdpad+set}" = set; then
3642 enableval="$enable_bsdpad"
3643 with_bsdpad=$enableval
3648 echo "$ac_t""$with_bsdpad" 1>&6
3649 test "$with_bsdpad" = yes && cat >> confdefs.h <<\EOF
3654 ### Enable compiling-in rcs id's
3655 echo $ac_n "checking if RCS identifiers should be compiled-in""... $ac_c" 1>&6
3656 echo "configure:3657: checking if RCS identifiers should be compiled-in" >&5
3658 # Check whether --with-rcs-ids or --without-rcs-ids was given.
3659 if test "${with_rcs_ids+set}" = set; then
3660 withval="$with_rcs_ids"
3661 with_rcs_ids=$withval
3666 echo "$ac_t""$with_rcs_ids" 1>&6
3667 test "$with_rcs_ids" = yes && cat >> confdefs.h <<\EOF
3668 #define USE_RCS_IDS 1
3672 ###############################################################################
3677 echo $ac_n "checking format of man-pages""... $ac_c" 1>&6
3678 echo "configure:3679: checking format of man-pages" >&5
3681 # Check whether --with-manpage-format or --without-manpage-format was given.
3682 if test "${with_manpage_format+set}" = set; then
3683 withval="$with_manpage_format"
3684 MANPAGE_FORMAT=$withval
3686 MANPAGE_FORMAT=unknown
3690 case ".$MANPAGE_FORMAT" in
3691 .gzip|.compress|.BSDI|.normal|.formatted) # (vi
3694 if test -z "$MANPATH" ; then
3695 MANPATH="/usr/man:/usr/share/man"
3697 # look for the 'date' man-page (it's most likely to be installed!)
3698 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
3699 MANPAGE_FORMAT=unknown
3700 for cf_dir in $MANPATH; do
3701 test -z "$cf_dir" && cf_dir=/usr/man
3702 for cf_name in $cf_dir/*/date.[01]* $cf_dir/*/date
3704 cf_test=`echo $cf_name | sed -e 's/*//'`
3705 if test "x$cf_test" = "x$cf_name" ; then
3707 *.gz) MANPAGE_FORMAT=gzip;;
3708 *.Z) MANPAGE_FORMAT=compress;;
3709 *.0) MANPAGE_FORMAT=BSDI,formatted;;
3710 *) MANPAGE_FORMAT=normal;;
3715 if test "$MANPAGE_FORMAT" != "unknown" ; then
3722 echo "configure: warning: Unexpected manpage-format" 1>&2
3726 echo "$ac_t""$MANPAGE_FORMAT" 1>&6
3729 echo $ac_n "checking for manpage renaming""... $ac_c" 1>&6
3730 echo "configure:3731: checking for manpage renaming" >&5
3733 # Check whether --with-manpage-renames or --without-manpage-renames was given.
3734 if test "${with_manpage_renames+set}" = set; then
3735 withval="$with_manpage_renames"
3736 MANPAGE_RENAMES=$withval
3742 case ".$MANPAGE_RENAMES" in #(vi
3746 # Debian 'man' program?
3747 if test -f /etc/debian_version ; then
3748 MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
3755 if test "$MANPAGE_RENAMES" != no ; then
3756 if test -f $srcdir/man/$MANPAGE_RENAMES ; then
3757 MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
3758 elif test ! -f $MANPAGE_RENAMES ; then
3759 { echo "configure: error: not a filename: $MANPAGE_RENAMES" 1>&2; exit 1; }
3762 test ! -d man && mkdir man
3764 # Construct a sed-script to perform renaming within man-pages
3765 if test -n "$MANPAGE_RENAMES" ; then
3766 test ! -d man && mkdir man
3767 sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >man/edit_man.sed
3771 echo "$ac_t""$MANPAGE_RENAMES" 1>&6
3775 echo $ac_n "checking for manpage symlinks""... $ac_c" 1>&6
3776 echo "configure:3777: checking for manpage symlinks" >&5
3779 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
3780 if test "${with_manpage_symlinks+set}" = set; then
3781 withval="$with_manpage_symlinks"
3782 MANPAGE_SYMLINKS=$withval
3784 MANPAGE_SYMLINKS=yes
3788 echo "$ac_t""$MANPAGE_SYMLINKS" 1>&6
3791 echo $ac_n "checking for manpage tbl""... $ac_c" 1>&6
3792 echo "configure:3793: checking for manpage tbl" >&5
3795 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
3796 if test "${with_manpage_tbl+set}" = set; then
3797 withval="$with_manpage_tbl"
3798 MANPAGE_TBL=$withval
3804 echo "$ac_t""$MANPAGE_TBL" 1>&6
3807 if test "$prefix" = "NONE" ; then
3808 cf_prefix="$ac_default_prefix"
3813 case "$MANPAGE_FORMAT" in # (vi
3815 cf_subdir='$mandir/cat'
3819 cf_subdir='$mandir/man'
3824 test ! -d man && mkdir man
3825 cat >man/edit_man.sh <<CF_EOF
3827 # this script is generated by the configure-script
3830 NCURSES_OSPEED="$NCURSES_OSPEED"
3831 TERMINFO="$TERMINFO"
3832 MKDIRS="sh `cd $srcdir && pwd`/mkinstalldirs"
3834 INSTALL_DATA="$INSTALL_DATA"
3835 transform="$program_transform_name"
3837 TMP=\${TMPDIR-/tmp}/man\$\$
3838 trap "rm -f \$TMP" 0 1 2 5 15
3851 *.orig|*.rej) ;; #(vi
3853 section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
3854 if test \$verb = installing ; then
3855 if test ! -d $cf_subdir\${section} ; then
3856 \$MKDIRS $cf_subdir\$section
3860 source=\`basename \$i\`
3862 test ! -f \$inalias && inalias="\$srcdir/\$inalias"
3863 if test ! -f \$inalias ; then
3864 echo .. skipped \$source
3868 if test "$MANPAGE_SYMLINKS" = yes ; then
3869 cat >>man/edit_man.sh <<CF_EOF
3870 aliases=\`sed -f \$srcdir/manlinks.sed \$inalias | sort -u\`
3874 if test "$MANPAGE_RENAMES" = no ; then
3875 cat >>man/edit_man.sh <<CF_EOF
3876 # perform program transformations for section 1 man pages
3877 if test \$section = 1 ; then
3878 target=$cf_subdir\${section}/\`echo \$source|sed "\${transform}"\`
3880 target=$cf_subdir\${section}/\$source
3884 cat >>man/edit_man.sh <<CF_EOF
3885 target=\`grep "^\$source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
3886 if test -z "\$target" ; then
3887 echo '? missing rename for '\$source
3890 target="$cf_subdir\${section}/\${target}"
3894 # replace variables in man page
3896 for cf_name in captoinfo clear infocmp infotocap tic toe tput
3898 cat >>man/edit_man.sh <<CF_EOF
3899 prog_$cf_name=\`echo $cf_name|sed "\${transform}"\`
3903 cat >>man/edit_man.sh <<CF_EOF
3904 sed -e "s,@DATADIR@,\$datadir," \\
3905 -e "s,@TERMINFO@,\$TERMINFO," \\
3906 -e "s,@NCURSES_OSPEED@,\$NCURSES_OSPEED," \\
3909 for cf_name in captoinfo clear infocmp infotocap tic toe tput
3911 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3912 cat >>man/edit_man.sh <<CF_EOF
3913 -e "s,@$cf_NAME@,\$prog_$cf_name," \\
3917 if test -f $MANPAGE_RENAMES ; then
3918 cat >>man/edit_man.sh <<CF_EOF
3919 < \$i | sed -f edit_man.sed >\$TMP
3922 cat >>man/edit_man.sh <<CF_EOF
3926 if test $MANPAGE_TBL = yes ; then
3927 cat >>man/edit_man.sh <<CF_EOF
3928 tbl \$TMP >\$TMP.out
3932 if test $with_curses_h != yes ; then
3933 cat >>man/edit_man.sh <<CF_EOF
3934 sed -e "/\#[ ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
3938 if test $cf_format = yes ; then
3939 cat >>man/edit_man.sh <<CF_EOF
3940 nroff -man \$TMP >\$TMP.out
3944 case "$MANPAGE_FORMAT" in #(vi
3946 cat >>man/edit_man.sh <<CF_EOF
3947 if test \$verb = installing ; then
3948 if ( compress -f \$TMP )
3957 cat >>man/edit_man.sh <<CF_EOF
3958 if test \$verb = installing ; then
3959 if ( gzip -f \$TMP )
3964 target="\$target.gz"
3968 cat >>man/edit_man.sh <<CF_EOF
3969 # BSDI installs only .0 suffixes in the cat directories
3970 target="\`echo \$target|sed -e 's/\.[1-9]\+.\?/.0/'\`"
3974 cat >>man/edit_man.sh <<CF_EOF
3975 suffix=\`basename \$target | sed -e 's/^[^.]*//'\`
3976 if test \$verb = installing ; then
3977 echo \$verb \$target
3978 \$INSTALL_DATA \$TMP \$target
3979 test -n "\$aliases" && (
3980 cd $cf_subdir\${section} && (
3981 target=\`basename \$target\`
3982 for cf_alias in \$aliases
3984 if test \$section = 1 ; then
3985 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
3988 if test -f \$cf_alias\${suffix} ; then
3989 if ( cmp -s \$target \$cf_alias\${suffix} )
3993 echo .. \$verb alias \$cf_alias\${suffix}
3994 rm -f \$cf_alias\${suffix}
3995 $LN_S \$target \$cf_alias\${suffix}
3998 echo .. \$verb alias \$cf_alias\${suffix}
3999 rm -f \$cf_alias\${suffix}
4000 $LN_S \$target \$cf_alias\${suffix}
4005 elif test \$verb = removing ; then
4006 echo \$verb \$target
4008 test -n "\$aliases" && (
4009 cd $cf_subdir\${section} && (
4010 for cf_alias in \$aliases
4012 if test \$section = 1 ; then
4013 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
4016 echo .. \$verb alias \$cf_alias\${suffix}
4017 rm -f \$cf_alias\${suffix}
4030 chmod 755 man/edit_man.sh
4034 ###############################################################################
4037 ### Note that some functions (such as const) are normally disabled anyway.
4038 echo $ac_n "checking if you want to build with function extensions""... $ac_c" 1>&6
4039 echo "configure:4040: checking if you want to build with function extensions" >&5
4041 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
4042 if test "${enable_ext_funcs+set}" = set; then
4043 enableval="$enable_ext_funcs"
4044 with_ext_funcs=$enableval
4049 echo "$ac_t""$with_ext_funcs" 1>&6
4050 if test "$with_ext_funcs" = yes ; then
4052 cat >> confdefs.h <<\EOF
4053 #define HAVE_CURSES_VERSION 1
4056 cat >> confdefs.h <<\EOF
4057 #define HAVE_HAS_KEY 1
4060 cat >> confdefs.h <<\EOF
4061 #define HAVE_RESIZETERM 1
4064 cat >> confdefs.h <<\EOF
4065 #define HAVE_USE_DEFAULT_COLORS 1
4068 cat >> confdefs.h <<\EOF
4069 #define HAVE_WRESIZE 1
4072 cat >> confdefs.h <<\EOF
4073 #define NCURSES_EXT_FUNCS 1
4081 ### use option --enable-const to turn on use of const beyond that in XSI.
4082 echo $ac_n "checking for extended use of const keyword""... $ac_c" 1>&6
4083 echo "configure:4084: checking for extended use of const keyword" >&5
4085 # Check whether --enable-const or --disable-const was given.
4086 if test "${enable_const+set}" = set; then
4087 enableval="$enable_const"
4088 with_ext_const=$enableval
4093 echo "$ac_t""$with_ext_const" 1>&6
4094 NCURSES_CONST='/*nothing*/'
4095 if test "$with_ext_const" = yes ; then
4100 echo $ac_n "checking if you want \$NCURSES_NO_PADDING code""... $ac_c" 1>&6
4101 echo "configure:4102: checking if you want \$NCURSES_NO_PADDING code" >&5
4103 # Check whether --enable-no-padding or --disable-no-padding was given.
4104 if test "${enable_no_padding+set}" = set; then
4105 enableval="$enable_no_padding"
4106 with_no_padding=$enableval
4108 with_no_padding=$with_ext_funcs
4111 echo "$ac_t""$with_no_padding" 1>&6
4112 test "$with_no_padding" = yes && cat >> confdefs.h <<\EOF
4113 #define NCURSES_NO_PADDING 1
4117 ### use option --enable-sigwinch to turn on use of SIGWINCH logic
4118 echo $ac_n "checking if you want SIGWINCH handler""... $ac_c" 1>&6
4119 echo "configure:4120: checking if you want SIGWINCH handler" >&5
4121 # Check whether --enable-sigwinch or --disable-sigwinch was given.
4122 if test "${enable_sigwinch+set}" = set; then
4123 enableval="$enable_sigwinch"
4124 with_sigwinch=$enableval
4126 with_sigwinch=$with_ext_funcs
4129 echo "$ac_t""$with_sigwinch" 1>&6
4130 test "$with_sigwinch" = yes && cat >> confdefs.h <<\EOF
4131 #define USE_SIGWINCH 1
4135 ### use option --enable-tcap-names to allow user to define new capabilities
4136 echo $ac_n "checking if you want user-definable terminal capabilities like termcap""... $ac_c" 1>&6
4137 echo "configure:4138: checking if you want user-definable terminal capabilities like termcap" >&5
4139 # Check whether --enable-tcap-names or --disable-tcap-names was given.
4140 if test "${enable_tcap_names+set}" = set; then
4141 enableval="$enable_tcap_names"
4142 with_tcap_names=$enableval
4144 with_tcap_names=$with_ext_funcs
4147 echo "$ac_t""$with_tcap_names" 1>&6
4149 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
4152 ###############################################################################
4153 # These options are relatively safe to experiment with.
4155 echo $ac_n "checking if you want all development code""... $ac_c" 1>&6
4156 echo "configure:4157: checking if you want all development code" >&5
4158 # Check whether --with-develop or --without-develop was given.
4159 if test "${with_develop+set}" = set; then
4160 withval="$with_develop"
4161 with_develop=$withval
4166 echo "$ac_t""$with_develop" 1>&6
4168 ### use option --enable-hard-tabs to turn on use of hard-tabs optimize
4169 echo $ac_n "checking if you want hard-tabs code""... $ac_c" 1>&6
4170 echo "configure:4171: checking if you want hard-tabs code" >&5
4172 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
4173 if test "${enable_hard_tabs+set}" = set; then
4174 enableval="$enable_hard_tabs"
4175 with_hardtabs=$enableval
4177 with_hardtabs=$with_develop
4180 echo "$ac_t""$with_hardtabs" 1>&6
4181 test "$with_hardtabs" = yes && cat >> confdefs.h <<\EOF
4182 #define USE_HARD_TABS 1
4186 echo $ac_n "checking if you want to use restrict environment when running as root""... $ac_c" 1>&6
4187 echo "configure:4188: checking if you want to use restrict environment when running as root" >&5
4189 # Check whether --enable-root-environ or --disable-root-environ was given.
4190 if test "${enable_root_environ+set}" = set; then
4191 enableval="$enable_root_environ"
4192 with_root_environ=$enableval
4194 with_root_environ=yes
4197 echo "$ac_t""$with_root_environ" 1>&6
4198 test "$with_root_environ" = yes && cat >> confdefs.h <<\EOF
4199 #define USE_ROOT_ENVIRON 1
4203 ### use option --enable-xmc-glitch to turn on use of magic-cookie optimize
4204 echo $ac_n "checking if you want limited support for xmc""... $ac_c" 1>&6
4205 echo "configure:4206: checking if you want limited support for xmc" >&5
4207 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
4208 if test "${enable_xmc_glitch+set}" = set; then
4209 enableval="$enable_xmc_glitch"
4210 with_xmc_glitch=$enableval
4212 with_xmc_glitch=$with_develop
4215 echo "$ac_t""$with_xmc_glitch" 1>&6
4216 test "$with_xmc_glitch" = yes && cat >> confdefs.h <<\EOF
4217 #define USE_XMC_SUPPORT 1
4221 ###############################################################################
4222 # These are just experimental, probably should not be in a package:
4225 echo $ac_n "checking if you do not want to assume colors are white-on-black""... $ac_c" 1>&6
4226 echo "configure:4227: checking if you do not want to assume colors are white-on-black" >&5
4228 # Check whether --enable-assumed-color or --disable-assumed-color was given.
4229 if test "${enable_assumed_color+set}" = set; then
4230 enableval="$enable_assumed_color"
4231 with_assumed_color=$enableval
4233 with_assumed_color=yes
4236 echo "$ac_t""$with_assumed_color" 1>&6
4237 test "$with_assumed_color" = yes && cat >> confdefs.h <<\EOF
4238 #define USE_ASSUMED_COLOR 1
4242 ### use option --enable-hashmap to turn on use of hashmap scrolling logic
4243 echo $ac_n "checking if you want hashmap scrolling-optimization code""... $ac_c" 1>&6
4244 echo "configure:4245: checking if you want hashmap scrolling-optimization code" >&5
4246 # Check whether --enable-hashmap or --disable-hashmap was given.
4247 if test "${enable_hashmap+set}" = set; then
4248 enableval="$enable_hashmap"
4249 with_hashmap=$enableval
4254 echo "$ac_t""$with_hashmap" 1>&6
4255 test "$with_hashmap" = yes && cat >> confdefs.h <<\EOF
4256 #define USE_HASHMAP 1
4260 ### use option --enable-colorfgbg to turn on use of $COLORFGBG environment
4261 echo $ac_n "checking if you want colorfgbg code""... $ac_c" 1>&6
4262 echo "configure:4263: checking if you want colorfgbg code" >&5
4264 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
4265 if test "${enable_colorfgbg+set}" = set; then
4266 enableval="$enable_colorfgbg"
4267 with_colorfgbg=$enableval
4272 echo "$ac_t""$with_colorfgbg" 1>&6
4273 test "$with_colorfgbg" = yes && cat >> confdefs.h <<\EOF
4274 #define USE_COLORFGBG 1
4278 echo $ac_n "checking if you want experimental safe-sprintf code""... $ac_c" 1>&6
4279 echo "configure:4280: checking if you want experimental safe-sprintf code" >&5
4281 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
4282 if test "${enable_safe_sprintf+set}" = set; then
4283 enableval="$enable_safe_sprintf"
4284 with_safe_sprintf=$enableval
4286 with_safe_sprintf=no
4289 echo "$ac_t""$with_safe_sprintf" 1>&6
4290 test "$with_safe_sprintf" = yes && cat >> confdefs.h <<\EOF
4291 #define USE_SAFE_SPRINTF 1
4295 ### use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
4296 # when hashmap is used scroll hints are useless
4297 if test "$with_hashmap" = no ; then
4298 echo $ac_n "checking if you want to experiment without scrolling-hints code""... $ac_c" 1>&6
4299 echo "configure:4300: checking if you want to experiment without scrolling-hints code" >&5
4301 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
4302 if test "${enable_scroll_hints+set}" = set; then
4303 enableval="$enable_scroll_hints"
4304 with_scroll_hints=$enableval
4306 with_scroll_hints=yes
4309 echo "$ac_t""$with_scroll_hints" 1>&6
4310 test "$with_scroll_hints" = yes && cat >> confdefs.h <<\EOF
4311 #define USE_SCROLL_HINTS 1
4316 ### use option --enable-widec to turn on use of wide-character support
4320 echo $ac_n "checking if you want experimental wide-character code""... $ac_c" 1>&6
4321 echo "configure:4322: checking if you want experimental wide-character code" >&5
4323 # Check whether --enable-widec or --disable-widec was given.
4324 if test "${enable_widec+set}" = set; then
4325 enableval="$enable_widec"
4326 with_widec=$enableval
4331 echo "$ac_t""$with_widec" 1>&6
4332 if test "$with_widec" = yes ; then
4333 LIB_SUFFIX="w${LIB_SUFFIX}"
4334 cat >> confdefs.h <<\EOF
4335 #define USE_WIDEC_SUPPORT 1
4338 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
4340 NCURSES_CH_T=cchar_t
4341 echo $ac_n "checking for putwc""... $ac_c" 1>&6
4342 echo "configure:4343: checking for putwc" >&5
4343 if eval "test \"`echo '$''{'ac_cv_func_putwc'+set}'`\" = set"; then
4344 echo $ac_n "(cached) $ac_c" 1>&6
4346 cat > conftest.$ac_ext <<EOF
4347 #line 4348 "configure"
4348 #include "confdefs.h"
4349 /* System header to define __stub macros and hopefully few prototypes,
4350 which can conflict with char putwc(); below. */
4352 /* Override any gcc2 internal prototype to avoid an error. */
4353 /* We use char because int might match the return type of a gcc2
4354 builtin and then its argument prototype would still apply. */
4359 /* The GNU C library defines this for functions which it implements
4360 to always fail with ENOSYS. Some functions are actually named
4361 something starting with __ and the normal name is an alias. */
4362 #if defined (__stub_putwc) || defined (__stub___putwc)
4370 if { (eval echo configure:4371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4372 eval "ac_cv_func_putwc=yes"
4374 echo "configure: failed program was:" >&5
4375 cat conftest.$ac_ext >&5
4377 eval "ac_cv_func_putwc=no"
4382 if eval "test \"`echo '$ac_cv_func_'putwc`\" = yes"; then
4383 echo "$ac_t""yes" 1>&6
4386 echo "$ac_t""no" 1>&6
4389 if test "$ac_cv_func_putwc" != yes ; then
4391 echo $ac_n "checking for putwc in libutf8""... $ac_c" 1>&6
4392 echo "configure:4393: checking for putwc in libutf8" >&5
4393 if eval "test \"`echo '$''{'cf_cv_libutf8'+set}'`\" = set"; then
4394 echo $ac_n "(cached) $ac_c" 1>&6
4397 cf_save_LIBS="$LIBS"
4399 cat > conftest.$ac_ext <<EOF
4400 #line 4401 "configure"
4401 #include "confdefs.h"
4403 #include <libutf8.h>
4408 if { (eval echo configure:4409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4412 echo "configure: failed program was:" >&5
4413 cat conftest.$ac_ext >&5
4418 LIBS="$cf_save_LIBS"
4422 echo "$ac_t""$cf_cv_libutf8" 1>&6
4424 if test "$cf_cv_libutf8" = yes ; then
4425 cat >> confdefs.h <<\EOF
4426 #define HAVE_LIBUTF8_H 1
4432 if test "$cf_cv_libutf8" = yes ; then
4437 # This is needed on Tru64 5.0 to declare mbstate_t
4438 echo $ac_n "checking if we must include wchar.h to declare mbstate_t""... $ac_c" 1>&6
4439 echo "configure:4440: checking if we must include wchar.h to declare mbstate_t" >&5
4440 if eval "test \"`echo '$''{'cf_cv_mbstate_t'+set}'`\" = set"; then
4441 echo $ac_n "(cached) $ac_c" 1>&6
4444 cat > conftest.$ac_ext <<EOF
4445 #line 4446 "configure"
4446 #include "confdefs.h"
4449 #ifdef HAVE_LIBUTF8_H
4450 #include <libutf8.h>
4456 if { (eval echo configure:4457: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4460 echo "configure: failed program was:" >&5
4461 cat conftest.$ac_ext >&5
4463 cat > conftest.$ac_ext <<EOF
4464 #line 4465 "configure"
4465 #include "confdefs.h"
4469 #ifdef HAVE_LIBUTF8_H
4470 #include <libutf8.h>
4476 if { (eval echo configure:4477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4480 echo "configure: failed program was:" >&5
4481 cat conftest.$ac_ext >&5
4483 cf_cv_mbstate_t=unknown
4490 echo "$ac_t""$cf_cv_mbstate_t" 1>&6
4492 if test "$cf_cv_mbstate_t" = yes ; then
4493 cat >> confdefs.h <<\EOF
4494 #define NEED_WCHAR_H 1
4499 if test "$cf_cv_mbstate_t" != unknown ; then
4500 cat >> confdefs.h <<\EOF
4501 #define HAVE_MBSTATE_T 1
4506 if test $cf_cv_mbstate_t = yes ; then
4514 echo $ac_n "checking for terminal capabilities file""... $ac_c" 1>&6
4515 echo "configure:4516: checking for terminal capabilities file" >&5
4517 # Check whether --with-caps or --without-caps was given.
4518 if test "${with_caps+set}" = set; then
4519 withval="$with_caps"
4520 TERMINFO_CAPS=Caps.$withval
4525 test -f ${srcdir}/include/${TERMINFO_CAPS} || TERMINFO_CAPS=Caps
4526 echo "$ac_t""$TERMINFO_CAPS" 1>&6
4529 ###############################################################################
4532 ### use option --disable-echo to suppress full display compiling commands
4533 echo $ac_n "checking if you want to display full commands during build""... $ac_c" 1>&6
4534 echo "configure:4535: checking if you want to display full commands during build" >&5
4536 # Check whether --enable-echo or --disable-echo was given.
4537 if test "${enable_echo+set}" = set; then
4538 enableval="$enable_echo"
4539 with_echo=$enableval
4544 if test "$with_echo" = yes; then
4547 ECHO_LINK='@ echo linking $@ ... ;'
4548 test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
4550 echo "$ac_t""$with_echo" 1>&6
4553 ### use option --enable-warnings to turn on all gcc warnings
4554 echo $ac_n "checking if you want to see compiler warnings""... $ac_c" 1>&6
4555 echo "configure:4556: checking if you want to see compiler warnings" >&5
4557 # Check whether --enable-warnings or --disable-warnings was given.
4558 if test "${enable_warnings+set}" = set; then
4559 enableval="$enable_warnings"
4560 with_warnings=$enableval
4563 echo "$ac_t""$with_warnings" 1>&6
4565 if test -n "$with_warnings"; then
4566 ADAFLAGS="$ADAFLAGS -gnatg"
4568 if test "$GCC" = yes
4570 cat > conftest.$ac_ext <<EOF
4571 #line 4572 "configure"
4572 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
4574 echo "checking for $CC warning options" 1>&6
4575 echo "configure:4576: checking for $CC warning options" >&5
4576 cf_save_CFLAGS="$CFLAGS"
4577 EXTRA_CFLAGS="-W -Wall"
4579 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
4581 Wbad-function-cast \
4585 Wmissing-declarations \
4586 Wmissing-prototypes \
4590 Wstrict-prototypes $cf_warn_CONST
4592 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4593 if { (eval echo configure:4594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4594 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
4595 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4596 test "$cf_opt" = Wcast-qual && EXTRA_CFLAGS="$EXTRA_CFLAGS -DXTSTRINGDEFINES"
4600 CFLAGS="$cf_save_CFLAGS"
4606 if test "$GCC" = yes
4608 cat > conftest.i <<EOF
4610 #define GCC_PRINTF 0
4615 #ifndef GCC_NORETURN
4616 #define GCC_NORETURN /* nothing */
4619 #define GCC_UNUSED /* nothing */
4622 if test "$GCC" = yes
4624 echo "checking for $CC __attribute__ directives" 1>&6
4625 echo "configure:4626: checking for $CC __attribute__ directives" >&5
4626 cat > conftest.$ac_ext <<EOF
4627 #line 4628 "configure"
4628 #include "confdefs.h"
4629 #include "conftest.h"
4630 #include "conftest.i"
4632 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
4634 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
4637 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
4639 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
4641 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
4642 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
4643 extern void foo(void) GCC_NORETURN;
4644 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
4646 for cf_attribute in scanf printf unused noreturn
4649 CF_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4651 cf_directive="__attribute__(($cf_attribute))"
4652 echo "checking for $CC $cf_directive" 1>&5
4653 case $cf_attribute in
4655 cat >conftest.h <<EOF
4656 #define GCC_$CF_ATTRIBUTE 1
4660 cat >conftest.h <<EOF
4661 #define GCC_$CF_ATTRIBUTE $cf_directive
4665 if { (eval echo configure:4666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4666 test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
4667 cat conftest.h >>confdefs.h
4669 # sed -e 's/__attr.*/\/*nothing*\//' conftest.h >>confdefs.h
4673 fgrep define conftest.i >>confdefs.h
4679 ### use option --enable-assertions to turn on generation of assertion code
4680 echo $ac_n "checking if you want to enable runtime assertions""... $ac_c" 1>&6
4681 echo "configure:4682: checking if you want to enable runtime assertions" >&5
4683 # Check whether --enable-assertions or --disable-assertions was given.
4684 if test "${enable_assertions+set}" = set; then
4685 enableval="$enable_assertions"
4686 with_assertions=$enableval
4691 echo "$ac_t""$with_assertions" 1>&6
4694 if test "$with_assertions" = no
4696 cat >> confdefs.h <<\EOF
4700 CPPFLAGS="$CPPFLAGS -DNDEBUG"
4702 ADAFLAGS="$ADAFLAGS -gnata"
4706 ### use option --disable-leaks to suppress "permanent" leaks, for testing
4708 # Check whether --enable-leaks or --disable-leaks was given.
4709 if test "${enable_leaks+set}" = set; then
4710 enableval="$enable_leaks"
4711 test "$enableval" = no && cat >> confdefs.h <<\EOF
4717 cat >> confdefs.h <<\EOF
4718 #define HAVE_NC_ALLOC_H 1
4722 ### use option --enable-expanded to generate certain macros as functions
4724 # Check whether --enable-expanded or --disable-expanded was given.
4725 if test "${enable_expanded+set}" = set; then
4726 enableval="$enable_expanded"
4727 test "$enableval" = yes && cat >> confdefs.h <<\EOF
4728 #define NCURSES_EXPANDED 1
4734 ### use option --disable-macros to suppress macros in favor of functions
4736 # Check whether --enable-macros or --disable-macros was given.
4737 if test "${enable_macros+set}" = set; then
4738 enableval="$enable_macros"
4739 test "$enableval" = no && cat >> confdefs.h <<\EOF
4740 #define NCURSES_NOMACROS 1
4746 ### Checks for libraries.
4747 echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
4748 echo "configure:4749: checking for gettimeofday" >&5
4749 if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
4750 echo $ac_n "(cached) $ac_c" 1>&6
4752 cat > conftest.$ac_ext <<EOF
4753 #line 4754 "configure"
4754 #include "confdefs.h"
4755 /* System header to define __stub macros and hopefully few prototypes,
4756 which can conflict with char gettimeofday(); below. */
4758 /* Override any gcc2 internal prototype to avoid an error. */
4759 /* We use char because int might match the return type of a gcc2
4760 builtin and then its argument prototype would still apply. */
4761 char gettimeofday();
4765 /* The GNU C library defines this for functions which it implements
4766 to always fail with ENOSYS. Some functions are actually named
4767 something starting with __ and the normal name is an alias. */
4768 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
4776 if { (eval echo configure:4777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4778 eval "ac_cv_func_gettimeofday=yes"
4780 echo "configure: failed program was:" >&5
4781 cat conftest.$ac_ext >&5
4783 eval "ac_cv_func_gettimeofday=no"
4788 if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
4789 echo "$ac_t""yes" 1>&6
4790 cat >> confdefs.h <<\EOF
4791 #define HAVE_GETTIMEOFDAY 1
4795 echo "$ac_t""no" 1>&6
4798 echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
4799 echo "configure:4800: checking for gettimeofday in -lbsd" >&5
4800 ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
4801 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4802 echo $ac_n "(cached) $ac_c" 1>&6
4804 ac_save_LIBS="$LIBS"
4806 cat > conftest.$ac_ext <<EOF
4807 #line 4808 "configure"
4808 #include "confdefs.h"
4809 /* Override any gcc2 internal prototype to avoid an error. */
4810 /* We use char because int might match the return type of a gcc2
4811 builtin and then its argument prototype would still apply. */
4812 char gettimeofday();
4818 if { (eval echo configure:4819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4820 eval "ac_cv_lib_$ac_lib_var=yes"
4822 echo "configure: failed program was:" >&5
4823 cat conftest.$ac_ext >&5
4825 eval "ac_cv_lib_$ac_lib_var=no"
4828 LIBS="$ac_save_LIBS"
4831 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4832 echo "$ac_t""yes" 1>&6
4833 cat >> confdefs.h <<\EOF
4834 #define HAVE_GETTIMEOFDAY 1
4839 echo "$ac_t""no" 1>&6
4845 echo $ac_n "checking if -lm needed for math functions""... $ac_c" 1>&6
4846 echo "configure:4847: checking if -lm needed for math functions" >&5
4847 if eval "test \"`echo '$''{'cf_cv_need_libm'+set}'`\" = set"; then
4848 echo $ac_n "(cached) $ac_c" 1>&6
4851 cat > conftest.$ac_ext <<EOF
4852 #line 4853 "configure"
4853 #include "confdefs.h"
4859 double x = rand(); printf("result = %g\n", sin(x))
4862 if { (eval echo configure:4863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4866 echo "configure: failed program was:" >&5
4867 cat conftest.$ac_ext >&5
4874 echo "$ac_t""$cf_cv_need_libm" 1>&6
4875 if test "$cf_cv_need_libm" = yes
4882 ### Checks for header files.
4884 echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
4885 echo "configure:4886: checking if we must define _GNU_SOURCE" >&5
4886 if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
4887 echo $ac_n "(cached) $ac_c" 1>&6
4890 cat > conftest.$ac_ext <<EOF
4891 #line 4892 "configure"
4892 #include "confdefs.h"
4893 #include <sys/types.h>
4896 #ifndef _XOPEN_SOURCE
4901 if { (eval echo configure:4902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4905 echo "configure: failed program was:" >&5
4906 cat conftest.$ac_ext >&5
4909 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
4910 cat > conftest.$ac_ext <<EOF
4911 #line 4912 "configure"
4912 #include "confdefs.h"
4913 #include <sys/types.h>
4916 #ifdef _XOPEN_SOURCE
4921 if { (eval echo configure:4922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4925 echo "configure: failed program was:" >&5
4926 cat conftest.$ac_ext >&5
4928 cf_cv_gnu_source=yes
4938 echo "$ac_t""$cf_cv_gnu_source" 1>&6
4939 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
4941 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4942 echo "configure:4943: checking for ANSI C header files" >&5
4943 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4944 echo $ac_n "(cached) $ac_c" 1>&6
4946 cat > conftest.$ac_ext <<EOF
4947 #line 4948 "configure"
4948 #include "confdefs.h"
4954 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4955 { (eval echo configure:4956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4956 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4957 if test -z "$ac_err"; then
4959 ac_cv_header_stdc=yes
4962 echo "configure: failed program was:" >&5
4963 cat conftest.$ac_ext >&5
4965 ac_cv_header_stdc=no
4969 if test $ac_cv_header_stdc = yes; then
4970 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4971 cat > conftest.$ac_ext <<EOF
4972 #line 4973 "configure"
4973 #include "confdefs.h"
4976 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4977 egrep "memchr" >/dev/null 2>&1; then
4981 ac_cv_header_stdc=no
4987 if test $ac_cv_header_stdc = yes; then
4988 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4989 cat > conftest.$ac_ext <<EOF
4990 #line 4991 "configure"
4991 #include "confdefs.h"
4994 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4995 egrep "free" >/dev/null 2>&1; then
4999 ac_cv_header_stdc=no
5005 if test $ac_cv_header_stdc = yes; then
5006 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5007 if test "$cross_compiling" = yes; then
5010 cat > conftest.$ac_ext <<EOF
5011 #line 5012 "configure"
5012 #include "confdefs.h"
5014 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5015 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5016 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5017 int main () { int i; for (i = 0; i < 256; i++)
5018 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
5022 if { (eval echo configure:5023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5026 echo "configure: failed program was:" >&5
5027 cat conftest.$ac_ext >&5
5029 ac_cv_header_stdc=no
5037 echo "$ac_t""$ac_cv_header_stdc" 1>&6
5038 if test $ac_cv_header_stdc = yes; then
5039 cat >> confdefs.h <<\EOF
5040 #define STDC_HEADERS 1
5046 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
5048 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5049 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
5050 echo "configure:5051: checking for $ac_hdr that defines DIR" >&5
5051 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
5052 echo $ac_n "(cached) $ac_c" 1>&6
5054 cat > conftest.$ac_ext <<EOF
5055 #line 5056 "configure"
5056 #include "confdefs.h"
5057 #include <sys/types.h>
5063 if { (eval echo configure:5064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5065 eval "ac_cv_header_dirent_$ac_safe=yes"
5067 echo "configure: failed program was:" >&5
5068 cat conftest.$ac_ext >&5
5070 eval "ac_cv_header_dirent_$ac_safe=no"
5074 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
5075 echo "$ac_t""yes" 1>&6
5076 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5077 cat >> confdefs.h <<EOF
5078 #define $ac_tr_hdr 1
5080 ac_header_dirent=$ac_hdr; break
5082 echo "$ac_t""no" 1>&6
5085 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5086 if test $ac_header_dirent = dirent.h; then
5087 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
5088 echo "configure:5089: checking for opendir in -ldir" >&5
5089 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
5090 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5091 echo $ac_n "(cached) $ac_c" 1>&6
5093 ac_save_LIBS="$LIBS"
5095 cat > conftest.$ac_ext <<EOF
5096 #line 5097 "configure"
5097 #include "confdefs.h"
5098 /* Override any gcc2 internal prototype to avoid an error. */
5099 /* We use char because int might match the return type of a gcc2
5100 builtin and then its argument prototype would still apply. */
5107 if { (eval echo configure:5108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5109 eval "ac_cv_lib_$ac_lib_var=yes"
5111 echo "configure: failed program was:" >&5
5112 cat conftest.$ac_ext >&5
5114 eval "ac_cv_lib_$ac_lib_var=no"
5117 LIBS="$ac_save_LIBS"
5120 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5121 echo "$ac_t""yes" 1>&6
5124 echo "$ac_t""no" 1>&6
5128 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
5129 echo "configure:5130: checking for opendir in -lx" >&5
5130 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
5131 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5132 echo $ac_n "(cached) $ac_c" 1>&6
5134 ac_save_LIBS="$LIBS"
5136 cat > conftest.$ac_ext <<EOF
5137 #line 5138 "configure"
5138 #include "confdefs.h"
5139 /* Override any gcc2 internal prototype to avoid an error. */
5140 /* We use char because int might match the return type of a gcc2
5141 builtin and then its argument prototype would still apply. */
5148 if { (eval echo configure:5149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5150 eval "ac_cv_lib_$ac_lib_var=yes"
5152 echo "configure: failed program was:" >&5
5153 cat conftest.$ac_ext >&5
5155 eval "ac_cv_lib_$ac_lib_var=no"
5158 LIBS="$ac_save_LIBS"
5161 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5162 echo "$ac_t""yes" 1>&6
5165 echo "$ac_t""no" 1>&6
5170 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
5171 echo "configure:5172: checking whether time.h and sys/time.h may both be included" >&5
5172 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
5173 echo $ac_n "(cached) $ac_c" 1>&6
5175 cat > conftest.$ac_ext <<EOF
5176 #line 5177 "configure"
5177 #include "confdefs.h"
5178 #include <sys/types.h>
5179 #include <sys/time.h>
5185 if { (eval echo configure:5186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5187 ac_cv_header_time=yes
5189 echo "configure: failed program was:" >&5
5190 cat conftest.$ac_ext >&5
5192 ac_cv_header_time=no
5197 echo "$ac_t""$ac_cv_header_time" 1>&6
5198 if test $ac_cv_header_time = yes; then
5199 cat >> confdefs.h <<\EOF
5200 #define TIME_WITH_SYS_TIME 1
5206 echo $ac_n "checking for regular-expression headers""... $ac_c" 1>&6
5207 echo "configure:5208: checking for regular-expression headers" >&5
5208 if eval "test \"`echo '$''{'cf_cv_regex'+set}'`\" = set"; then
5209 echo $ac_n "(cached) $ac_c" 1>&6
5212 cat > conftest.$ac_ext <<EOF
5213 #line 5214 "configure"
5214 #include "confdefs.h"
5215 #include <sys/types.h>
5220 int x = regcomp(p, "", 0);
5221 int y = regexec(p, "", 0, 0, 0);
5226 if { (eval echo configure:5227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5228 cf_cv_regex="regex.h"
5230 echo "configure: failed program was:" >&5
5231 cat conftest.$ac_ext >&5
5234 cat > conftest.$ac_ext <<EOF
5235 #line 5236 "configure"
5236 #include "confdefs.h"
5240 char *p = compile("", "", "", 0);
5241 int x = step("", "");
5245 if { (eval echo configure:5246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5247 cf_cv_regex="regexp.h"
5249 echo "configure: failed program was:" >&5
5250 cat conftest.$ac_ext >&5
5253 cf_save_LIBS="$LIBS"
5255 cat > conftest.$ac_ext <<EOF
5256 #line 5257 "configure"
5257 #include "confdefs.h"
5258 #include <regexpr.h>
5261 char *p = compile("", "", "");
5262 int x = step("", "");
5266 if { (eval echo configure:5267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5268 cf_cv_regex="regexpr.h"
5270 echo "configure: failed program was:" >&5
5271 cat conftest.$ac_ext >&5
5273 LIBS="$cf_save_LIBS"
5283 echo "$ac_t""$cf_cv_regex" 1>&6
5284 case $cf_cv_regex in
5285 regex.h) cat >> confdefs.h <<\EOF
5286 #define HAVE_REGEX_H_FUNCS 1
5289 regexp.h) cat >> confdefs.h <<\EOF
5290 #define HAVE_REGEXP_H_FUNCS 1
5293 regexpr.h) cat >> confdefs.h <<\EOF
5294 #define HAVE_REGEXPR_H_FUNCS 1
5318 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5319 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5320 echo "configure:5321: checking for $ac_hdr" >&5
5321 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5322 echo $ac_n "(cached) $ac_c" 1>&6
5324 cat > conftest.$ac_ext <<EOF
5325 #line 5326 "configure"
5326 #include "confdefs.h"
5329 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5330 { (eval echo configure:5331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5331 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5332 if test -z "$ac_err"; then
5334 eval "ac_cv_header_$ac_safe=yes"
5337 echo "configure: failed program was:" >&5
5338 cat conftest.$ac_ext >&5
5340 eval "ac_cv_header_$ac_safe=no"
5344 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5345 echo "$ac_t""yes" 1>&6
5346 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5347 cat >> confdefs.h <<EOF
5348 #define $ac_tr_hdr 1
5352 echo "$ac_t""no" 1>&6
5357 # check for ISC (this may also define _POSIX_SOURCE)
5358 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
5359 if test "$ISC" = yes ; then
5360 echo $ac_n "checking for main in -lcposix""... $ac_c" 1>&6
5361 echo "configure:5362: checking for main in -lcposix" >&5
5362 ac_lib_var=`echo cposix'_'main | sed 'y%./+-%__p_%'`
5363 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5364 echo $ac_n "(cached) $ac_c" 1>&6
5366 ac_save_LIBS="$LIBS"
5367 LIBS="-lcposix $LIBS"
5368 cat > conftest.$ac_ext <<EOF
5369 #line 5370 "configure"
5370 #include "confdefs.h"
5376 if { (eval echo configure:5377: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5378 eval "ac_cv_lib_$ac_lib_var=yes"
5380 echo "configure: failed program was:" >&5
5381 cat conftest.$ac_ext >&5
5383 eval "ac_cv_lib_$ac_lib_var=no"
5386 LIBS="$ac_save_LIBS"
5389 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5390 echo "$ac_t""yes" 1>&6
5391 ac_tr_lib=HAVE_LIB`echo cposix | sed -e 's/[^a-zA-Z0-9_]/_/g' \
5392 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
5393 cat >> confdefs.h <<EOF
5394 #define $ac_tr_lib 1
5397 LIBS="-lcposix $LIBS"
5400 echo "$ac_t""no" 1>&6
5403 echo $ac_n "checking for bzero in -linet""... $ac_c" 1>&6
5404 echo "configure:5405: checking for bzero in -linet" >&5
5405 ac_lib_var=`echo inet'_'bzero | sed 'y%./+-%__p_%'`
5406 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5407 echo $ac_n "(cached) $ac_c" 1>&6
5409 ac_save_LIBS="$LIBS"
5411 cat > conftest.$ac_ext <<EOF
5412 #line 5413 "configure"
5413 #include "confdefs.h"
5414 /* Override any gcc2 internal prototype to avoid an error. */
5415 /* We use char because int might match the return type of a gcc2
5416 builtin and then its argument prototype would still apply. */
5423 if { (eval echo configure:5424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5425 eval "ac_cv_lib_$ac_lib_var=yes"
5427 echo "configure: failed program was:" >&5
5428 cat conftest.$ac_ext >&5
5430 eval "ac_cv_lib_$ac_lib_var=no"
5433 LIBS="$ac_save_LIBS"
5436 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5437 echo "$ac_t""yes" 1>&6
5440 echo "$ac_t""no" 1>&6
5445 echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
5446 echo "configure:5447: checking if sys/time.h works with sys/select.h" >&5
5447 if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
5448 echo $ac_n "(cached) $ac_c" 1>&6
5451 cat > conftest.$ac_ext <<EOF
5452 #line 5453 "configure"
5453 #include "confdefs.h"
5455 #include <sys/types.h>
5456 #ifdef HAVE_SYS_TIME_H
5457 #include <sys/time.h>
5459 #ifdef HAVE_SYS_SELECT_H
5460 #include <sys/select.h>
5467 if { (eval echo configure:5468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5469 cf_cv_sys_time_select=yes
5471 echo "configure: failed program was:" >&5
5472 cat conftest.$ac_ext >&5
5474 cf_cv_sys_time_select=no
5480 echo "$ac_t""$cf_cv_sys_time_select" 1>&6
5481 test "$cf_cv_sys_time_select" = yes && cat >> confdefs.h <<\EOF
5482 #define HAVE_SYS_TIME_SELECT 1
5487 ### checks for compiler characteristics
5489 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
5490 ac_cpp='$CPP $CPPFLAGS'
5491 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
5492 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
5493 cross_compiling=$ac_cv_prog_cc_cross
5495 echo $ac_n "checking for working const""... $ac_c" 1>&6
5496 echo "configure:5497: checking for working const" >&5
5497 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
5498 echo $ac_n "(cached) $ac_c" 1>&6
5500 cat > conftest.$ac_ext <<EOF
5501 #line 5502 "configure"
5502 #include "confdefs.h"
5506 /* Ultrix mips cc rejects this. */
5507 typedef int charset[2]; const charset x;
5508 /* SunOS 4.1.1 cc rejects this. */
5509 char const *const *ccp;
5511 /* NEC SVR4.0.2 mips cc rejects this. */
5512 struct point {int x, y;};
5513 static struct point const zero = {0,0};
5514 /* AIX XL C 1.02.0.0 rejects this.
5515 It does not let you subtract one const X* pointer from another in an arm
5516 of an if-expression whose if-part is not a constant expression */
5517 const char *g = "string";
5518 ccp = &g + (g ? g-g : 0);
5519 /* HPUX 7.0 cc rejects these. */
5522 ccp = (char const *const *) p;
5523 { /* SCO 3.2v4 cc rejects this. */
5525 char const *s = 0 ? (char *) 0 : (char const *) 0;
5529 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
5531 const int *foo = &x[0];
5534 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
5535 typedef const int *iptr;
5539 { /* AIX XL C 1.02.0.0 rejects this saying
5540 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
5541 struct s { int j; const int *ap[3]; };
5542 struct s *b; b->j = 5;
5544 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
5550 if { (eval echo configure:5551: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5554 echo "configure: failed program was:" >&5
5555 cat conftest.$ac_ext >&5
5562 echo "$ac_t""$ac_cv_c_const" 1>&6
5563 if test $ac_cv_c_const = no; then
5564 cat >> confdefs.h <<\EOF
5570 echo $ac_n "checking for inline""... $ac_c" 1>&6
5571 echo "configure:5572: checking for inline" >&5
5572 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
5573 echo $ac_n "(cached) $ac_c" 1>&6
5576 for ac_kw in inline __inline__ __inline; do
5577 cat > conftest.$ac_ext <<EOF
5578 #line 5579 "configure"
5579 #include "confdefs.h"
5585 if { (eval echo configure:5586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5587 ac_cv_c_inline=$ac_kw; break
5589 echo "configure: failed program was:" >&5
5590 cat conftest.$ac_ext >&5
5597 echo "$ac_t""$ac_cv_c_inline" 1>&6
5598 case "$ac_cv_c_inline" in
5600 no) cat >> confdefs.h <<\EOF
5604 *) cat >> confdefs.h <<EOF
5605 #define inline $ac_cv_c_inline
5610 test "$ac_cv_c_inline" != no && cat >> confdefs.h <<\EOF
5611 #define CC_HAS_INLINE_FUNCS 1
5616 echo $ac_n "checking if unsigned literals are legal""... $ac_c" 1>&6
5617 echo "configure:5618: checking if unsigned literals are legal" >&5
5618 if eval "test \"`echo '$''{'cf_cv_unsigned_literals'+set}'`\" = set"; then
5619 echo $ac_n "(cached) $ac_c" 1>&6
5622 cat > conftest.$ac_ext <<EOF
5623 #line 5624 "configure"
5624 #include "confdefs.h"
5627 long x = 1L + 1UL + 1U + 1
5630 if { (eval echo configure:5631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5632 cf_cv_unsigned_literals=yes
5634 echo "configure: failed program was:" >&5
5635 cat conftest.$ac_ext >&5
5637 cf_cv_unsigned_literals=no
5643 echo "$ac_t""$cf_cv_unsigned_literals" 1>&6
5647 echo $ac_n "checking for type of chtype""... $ac_c" 1>&6
5648 echo "configure:5649: checking for type of chtype" >&5
5649 if eval "test \"`echo '$''{'cf_cv_typeof_chtype'+set}'`\" = set"; then
5650 echo $ac_n "(cached) $ac_c" 1>&6
5653 if test "$cross_compiling" = yes; then
5654 cf_cv_typeof_chtype=long
5656 cat > conftest.$ac_ext <<EOF
5657 #line 5658 "configure"
5658 #include "confdefs.h"
5660 #ifdef USE_WIDEC_SUPPORT
5661 #include <stddef.h> /* we want wchar_t */
5662 #define WANT_BITS 39
5664 #define WANT_BITS 31
5669 FILE *fp = fopen("cf_test.out", "w");
5671 char *result = "long";
5672 #ifdef USE_WIDEC_SUPPORT
5674 * If wchar_t is smaller than a long, it must be an int or a
5675 * short. We prefer not to use a short anyway.
5677 if (sizeof(unsigned long) > sizeof(wchar_t))
5680 if (sizeof(unsigned long) > sizeof(unsigned int)) {
5683 for (n = 0; n < WANT_BITS; n++) {
5684 unsigned int y = (x >> n);
5685 if (y != 1 || x == 0) {
5691 * If x is nonzero, an int is big enough for the bits
5694 result = (x != 0) ? "int" : "long";
5703 if { (eval echo configure:5704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5705 cf_cv_typeof_chtype=`cat cf_test.out`
5707 echo "configure: failed program was:" >&5
5708 cat conftest.$ac_ext >&5
5710 cf_cv_typeof_chtype=long
5719 echo "$ac_t""$cf_cv_typeof_chtype" 1>&6
5722 cat >> confdefs.h <<EOF
5723 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
5728 test "$cf_cv_unsigned_literals" = yes && cf_cv_1UL="${cf_cv_1UL}U"
5729 test "$cf_cv_typeof_chtype" = long && cf_cv_1UL="${cf_cv_1UL}L"
5734 ### Checks for external-data
5737 echo $ac_n "checking if external errno is declared""... $ac_c" 1>&6
5738 echo "configure:5739: checking if external errno is declared" >&5
5739 if eval "test \"`echo '$''{'cf_cv_dcl_errno'+set}'`\" = set"; then
5740 echo $ac_n "(cached) $ac_c" 1>&6
5743 cat > conftest.$ac_ext <<EOF
5744 #line 5745 "configure"
5745 #include "confdefs.h"
5747 #ifdef HAVE_STDLIB_H
5751 #include <sys/types.h>
5754 long x = (long) errno
5757 if { (eval echo configure:5758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5761 echo "configure: failed program was:" >&5
5762 cat conftest.$ac_ext >&5
5770 echo "$ac_t""$cf_cv_dcl_errno" 1>&6
5772 if test "$cf_cv_dcl_errno" = no ; then
5774 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5776 cat >> confdefs.h <<EOF
5777 #define $cf_result 1
5782 # It's possible (for near-UNIX clones) that the data doesn't exist
5784 echo $ac_n "checking if external errno exists""... $ac_c" 1>&6
5785 echo "configure:5786: checking if external errno exists" >&5
5786 if eval "test \"`echo '$''{'cf_cv_have_errno'+set}'`\" = set"; then
5787 echo $ac_n "(cached) $ac_c" 1>&6
5790 cat > conftest.$ac_ext <<EOF
5791 #line 5792 "configure"
5792 #include "confdefs.h"
5801 if { (eval echo configure:5802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5803 cf_cv_have_errno=yes
5805 echo "configure: failed program was:" >&5
5806 cat conftest.$ac_ext >&5
5814 echo "$ac_t""$cf_cv_have_errno" 1>&6
5816 if test "$cf_cv_have_errno" = yes ; then
5818 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5820 cat >> confdefs.h <<EOF
5821 #define $cf_result 1
5830 echo $ac_n "checking if data-only library module links""... $ac_c" 1>&6
5831 echo "configure:5832: checking if data-only library module links" >&5
5832 if eval "test \"`echo '$''{'cf_cv_link_dataonly'+set}'`\" = set"; then
5833 echo $ac_n "(cached) $ac_c" 1>&6
5837 cat >conftest.$ac_ext <<EOF
5838 #line 5839 "configure"
5839 int testdata[3] = { 123, 456, 789 };
5841 if { (eval echo configure:5842: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } ; then
5842 mv conftest.o data.o && \
5843 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
5845 rm -f conftest.$ac_ext data.o
5846 cat >conftest.$ac_ext <<EOF
5847 #line 5848 "configure"
5851 exit(1); /* I'm told this linker is broken */
5853 extern int testdata[3];
5854 return testdata[0] == 123
5855 && testdata[1] == 456
5856 && testdata[2] == 789;
5860 if { (eval echo configure:5861: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5861 mv conftest.o func.o && \
5862 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
5864 rm -f conftest.$ac_ext func.o
5865 ( eval $ac_cv_prog_RANLIB conftest.a ) 2>&5 >/dev/null
5867 LIBS="conftest.a $LIBS"
5868 if test "$cross_compiling" = yes; then
5869 cf_cv_link_dataonly=unknown
5871 cat > conftest.$ac_ext <<EOF
5872 #line 5873 "configure"
5873 #include "confdefs.h"
5877 extern int testfunc();
5882 if { (eval echo configure:5883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5884 cf_cv_link_dataonly=yes
5886 echo "configure: failed program was:" >&5
5887 cat conftest.$ac_ext >&5
5889 cf_cv_link_dataonly=no
5898 echo "$ac_t""$cf_cv_link_dataonly" 1>&6
5900 if test "$cf_cv_link_dataonly" = no ; then
5901 cat >> confdefs.h <<\EOF
5902 #define BROKEN_LINKER 1
5910 ### Checks for library functions.
5934 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5935 echo "configure:5936: checking for $ac_func" >&5
5936 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5937 echo $ac_n "(cached) $ac_c" 1>&6
5939 cat > conftest.$ac_ext <<EOF
5940 #line 5941 "configure"
5941 #include "confdefs.h"
5942 /* System header to define __stub macros and hopefully few prototypes,
5943 which can conflict with char $ac_func(); below. */
5945 /* Override any gcc2 internal prototype to avoid an error. */
5946 /* We use char because int might match the return type of a gcc2
5947 builtin and then its argument prototype would still apply. */
5952 /* The GNU C library defines this for functions which it implements
5953 to always fail with ENOSYS. Some functions are actually named
5954 something starting with __ and the normal name is an alias. */
5955 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5963 if { (eval echo configure:5964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5965 eval "ac_cv_func_$ac_func=yes"
5967 echo "configure: failed program was:" >&5
5968 cat conftest.$ac_ext >&5
5970 eval "ac_cv_func_$ac_func=no"
5975 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5976 echo "$ac_t""yes" 1>&6
5977 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5978 cat >> confdefs.h <<EOF
5979 #define $ac_tr_func 1
5983 echo "$ac_t""no" 1>&6
5987 if test "$with_getcap" = "yes" ; then
5989 echo $ac_n "checking for terminal-capability database functions""... $ac_c" 1>&6
5990 echo "configure:5991: checking for terminal-capability database functions" >&5
5991 if eval "test \"`echo '$''{'cf_cv_cgetent'+set}'`\" = set"; then
5992 echo $ac_n "(cached) $ac_c" 1>&6
5995 cat > conftest.$ac_ext <<EOF
5996 #line 5997 "configure"
5997 #include "confdefs.h"
6004 char *db_array = temp;
6005 cgetent(&buf, /* int *, */ &db_array, "vt100");
6006 cgetcap(buf, "tc", '=');
6007 cgetmatch(buf, "tc");
6011 if { (eval echo configure:6012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6015 echo "configure: failed program was:" >&5
6016 cat conftest.$ac_ext >&5
6024 echo "$ac_t""$cf_cv_cgetent" 1>&6
6025 test "$cf_cv_cgetent" = yes && cat >> confdefs.h <<\EOF
6026 #define HAVE_BSD_CGETENT 1
6033 echo $ac_n "checking for isascii""... $ac_c" 1>&6
6034 echo "configure:6035: checking for isascii" >&5
6035 if eval "test \"`echo '$''{'cf_cv_have_isascii'+set}'`\" = set"; then
6036 echo $ac_n "(cached) $ac_c" 1>&6
6039 cat > conftest.$ac_ext <<EOF
6040 #line 6041 "configure"
6041 #include "confdefs.h"
6044 int x = isascii(' ')
6047 if { (eval echo configure:6048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6049 cf_cv_have_isascii=yes
6051 echo "configure: failed program was:" >&5
6052 cat conftest.$ac_ext >&5
6054 cf_cv_have_isascii=no
6059 echo "$ac_t""$cf_cv_have_isascii" 1>&6
6060 test "$cf_cv_have_isascii" = yes && cat >> confdefs.h <<\EOF
6061 #define HAVE_ISASCII 1
6066 if test "$ac_cv_func_sigaction" = yes; then
6067 echo $ac_n "checking whether sigaction needs _POSIX_SOURCE""... $ac_c" 1>&6
6068 echo "configure:6069: checking whether sigaction needs _POSIX_SOURCE" >&5
6069 cat > conftest.$ac_ext <<EOF
6070 #line 6071 "configure"
6071 #include "confdefs.h"
6073 #include <sys/types.h>
6076 struct sigaction act
6079 if { (eval echo configure:6080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6083 echo "configure: failed program was:" >&5
6084 cat conftest.$ac_ext >&5
6087 cat > conftest.$ac_ext <<EOF
6088 #line 6089 "configure"
6089 #include "confdefs.h"
6091 #define _POSIX_SOURCE
6092 #include <sys/types.h>
6095 struct sigaction act
6098 if { (eval echo configure:6099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6101 cat >> confdefs.h <<\EOF
6102 #define SVR4_ACTION 1
6106 echo "configure: failed program was:" >&5
6107 cat conftest.$ac_ext >&5
6114 echo "$ac_t""$sigact_bad" 1>&6
6124 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6125 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6126 echo "configure:6127: checking for $ac_hdr" >&5
6127 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6128 echo $ac_n "(cached) $ac_c" 1>&6
6130 cat > conftest.$ac_ext <<EOF
6131 #line 6132 "configure"
6132 #include "confdefs.h"
6135 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6136 { (eval echo configure:6137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6137 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6138 if test -z "$ac_err"; then
6140 eval "ac_cv_header_$ac_safe=yes"
6143 echo "configure: failed program was:" >&5
6144 cat conftest.$ac_ext >&5
6146 eval "ac_cv_header_$ac_safe=no"
6150 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6151 echo "$ac_t""yes" 1>&6
6152 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6153 cat >> confdefs.h <<EOF
6154 #define $ac_tr_hdr 1
6158 echo "$ac_t""no" 1>&6
6162 if test "$ISC" = yes ; then
6163 for ac_hdr in sys/termio.h
6165 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6166 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6167 echo "configure:6168: checking for $ac_hdr" >&5
6168 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6169 echo $ac_n "(cached) $ac_c" 1>&6
6171 cat > conftest.$ac_ext <<EOF
6172 #line 6173 "configure"
6173 #include "confdefs.h"
6176 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6177 { (eval echo configure:6178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6178 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6179 if test -z "$ac_err"; then
6181 eval "ac_cv_header_$ac_safe=yes"
6184 echo "configure: failed program was:" >&5
6185 cat conftest.$ac_ext >&5
6187 eval "ac_cv_header_$ac_safe=no"
6191 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6192 echo "$ac_t""yes" 1>&6
6193 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6194 cat >> confdefs.h <<EOF
6195 #define $ac_tr_hdr 1
6199 echo "$ac_t""no" 1>&6
6204 if test "$ac_cv_header_termios_h" = yes ; then
6205 case "$CFLAGS $CPPFLAGS" in
6207 termios_bad=dunno ;;
6208 *) termios_bad=maybe ;;
6210 if test "$termios_bad" = maybe ; then
6211 echo $ac_n "checking whether termios.h needs _POSIX_SOURCE""... $ac_c" 1>&6
6212 echo "configure:6213: checking whether termios.h needs _POSIX_SOURCE" >&5
6213 cat > conftest.$ac_ext <<EOF
6214 #line 6215 "configure"
6215 #include "confdefs.h"
6216 #include <termios.h>
6218 struct termios foo; int x = foo.c_iflag
6221 if { (eval echo configure:6222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6225 echo "configure: failed program was:" >&5
6226 cat conftest.$ac_ext >&5
6229 cat > conftest.$ac_ext <<EOF
6230 #line 6231 "configure"
6231 #include "confdefs.h"
6233 #define _POSIX_SOURCE
6234 #include <termios.h>
6236 struct termios foo; int x = foo.c_iflag
6239 if { (eval echo configure:6240: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6243 echo "configure: failed program was:" >&5
6244 cat conftest.$ac_ext >&5
6246 termios_bad=yes cat >> confdefs.h <<\EOF
6247 #define SVR4_TERMIO 1
6255 echo "$ac_t""$termios_bad" 1>&6
6261 echo $ac_n "checking for tcgetattr""... $ac_c" 1>&6
6262 echo "configure:6263: checking for tcgetattr" >&5
6263 if eval "test \"`echo '$''{'cf_cv_have_tcgetattr'+set}'`\" = set"; then
6264 echo $ac_n "(cached) $ac_c" 1>&6
6267 cat > conftest.$ac_ext <<EOF
6268 #line 6269 "configure"
6269 #include "confdefs.h"
6271 #include <sys/types.h>
6272 #ifdef HAVE_UNISTD_H
6275 #ifdef HAVE_TERMIOS_H
6276 #include <termios.h>
6277 #define TTY struct termios
6279 #ifdef HAVE_TERMIO_H
6281 #define TTY struct termio
6291 if { (eval echo configure:6292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6293 cf_cv_have_tcgetattr=yes
6295 echo "configure: failed program was:" >&5
6296 cat conftest.$ac_ext >&5
6298 cf_cv_have_tcgetattr=no
6303 echo "$ac_t""$cf_cv_have_tcgetattr" 1>&6
6304 test "$cf_cv_have_tcgetattr" = yes && cat >> confdefs.h <<\EOF
6305 #define HAVE_TCGETATTR 1
6310 echo $ac_n "checking for vsscanf function or workaround""... $ac_c" 1>&6
6311 echo "configure:6312: checking for vsscanf function or workaround" >&5
6312 if eval "test \"`echo '$''{'cf_cv_func_vsscanf'+set}'`\" = set"; then
6313 echo $ac_n "(cached) $ac_c" 1>&6
6316 cat > conftest.$ac_ext <<EOF
6317 #line 6318 "configure"
6318 #include "confdefs.h"
6325 vsscanf("from", "%d", ap)
6328 if { (eval echo configure:6329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6330 cf_cv_func_vsscanf=vsscanf
6332 echo "configure: failed program was:" >&5
6333 cat conftest.$ac_ext >&5
6336 cat > conftest.$ac_ext <<EOF
6337 #line 6338 "configure"
6338 #include "confdefs.h"
6347 strbuf._flag = _IOREAD;
6348 strbuf._ptr = strbuf._base = (unsigned char *) str;
6349 strbuf._cnt = strlen(str);
6350 strbuf._file = _NFILE;
6351 return (vfscanf(&strbuf, "%d", ap))
6354 if { (eval echo configure:6355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6356 cf_cv_func_vsscanf=vfscanf
6358 echo "configure: failed program was:" >&5
6359 cat conftest.$ac_ext >&5
6362 cat > conftest.$ac_ext <<EOF
6363 #line 6364 "configure"
6364 #include "confdefs.h"
6373 strbuf._flag = _IOREAD;
6374 strbuf._ptr = strbuf._base = (unsigned char *) str;
6375 strbuf._cnt = strlen(str);
6376 strbuf._file = _NFILE;
6377 return (_doscan(&strbuf, "%d", ap))
6380 if { (eval echo configure:6381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6382 cf_cv_func_vsscanf=_doscan
6384 echo "configure: failed program was:" >&5
6385 cat conftest.$ac_ext >&5
6388 cf_cv_func_vsscanf=no
6397 echo "$ac_t""$cf_cv_func_vsscanf" 1>&6
6399 case $cf_cv_func_vsscanf in #(vi
6400 vsscanf) cat >> confdefs.h <<\EOF
6401 #define HAVE_VSSCANF 1
6404 vfscanf) cat >> confdefs.h <<\EOF
6405 #define HAVE_VFSCANF 1
6408 _doscan) cat >> confdefs.h <<\EOF
6409 #define HAVE__DOSCAN 1
6416 echo $ac_n "checking for working mkstemp""... $ac_c" 1>&6
6417 echo "configure:6418: checking for working mkstemp" >&5
6418 if eval "test \"`echo '$''{'cf_cv_func_mkstemp'+set}'`\" = set"; then
6419 echo $ac_n "(cached) $ac_c" 1>&6
6423 if test "$cross_compiling" = yes; then
6424 echo $ac_n "checking for mkstemp""... $ac_c" 1>&6
6425 echo "configure:6426: checking for mkstemp" >&5
6426 if eval "test \"`echo '$''{'ac_cv_func_mkstemp'+set}'`\" = set"; then
6427 echo $ac_n "(cached) $ac_c" 1>&6
6429 cat > conftest.$ac_ext <<EOF
6430 #line 6431 "configure"
6431 #include "confdefs.h"
6432 /* System header to define __stub macros and hopefully few prototypes,
6433 which can conflict with char mkstemp(); below. */
6435 /* Override any gcc2 internal prototype to avoid an error. */
6436 /* We use char because int might match the return type of a gcc2
6437 builtin and then its argument prototype would still apply. */
6442 /* The GNU C library defines this for functions which it implements
6443 to always fail with ENOSYS. Some functions are actually named
6444 something starting with __ and the normal name is an alias. */
6445 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
6453 if { (eval echo configure:6454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6455 eval "ac_cv_func_mkstemp=yes"
6457 echo "configure: failed program was:" >&5
6458 cat conftest.$ac_ext >&5
6460 eval "ac_cv_func_mkstemp=no"
6465 if eval "test \"`echo '$ac_cv_func_'mkstemp`\" = yes"; then
6466 echo "$ac_t""yes" 1>&6
6469 echo "$ac_t""no" 1>&6
6474 cat > conftest.$ac_ext <<EOF
6475 #line 6476 "configure"
6476 #include "confdefs.h"
6478 #include <sys/types.h>
6482 #include <sys/stat.h>
6485 char *tmpl = "conftestXXXXXX";
6493 for (n = 0; n < 2; ++n) {
6494 strcpy(name[n], tmpl);
6495 if ((fd = mkstemp(name[n])) >= 0) {
6496 if (!strcmp(name[n], tmpl)
6497 || stat(name[n], &sb) != 0
6498 || (sb.st_mode & S_IFMT) != S_IFREG
6499 || (sb.st_mode & 077) != 0) {
6506 && !strcmp(name[0], name[1]))
6512 if { (eval echo configure:6513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6514 cf_cv_func_mkstemp=yes
6517 echo "configure: failed program was:" >&5
6518 cat conftest.$ac_ext >&5
6520 cf_cv_func_mkstemp=no
6529 echo "$ac_t""$cf_cv_func_mkstemp" 1>&6
6530 if test "$cf_cv_func_mkstemp" = yes ; then
6531 cat >> confdefs.h <<\EOF
6532 #define HAVE_MKSTEMP 1
6538 # setup for prototype of fallback for vsscanf()
6539 if test "$cf_cv_func_vsscanf" = vsscanf ; then
6546 if test "$cross_compiling" = yes ; then
6547 echo "configure: warning: cross compiling: assume setvbuf params not reversed" 1>&2
6549 echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6
6550 echo "configure:6551: checking whether setvbuf arguments are reversed" >&5
6551 if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then
6552 echo $ac_n "(cached) $ac_c" 1>&6
6554 if test "$cross_compiling" = yes; then
6555 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
6557 cat > conftest.$ac_ext <<EOF
6558 #line 6559 "configure"
6559 #include "confdefs.h"
6561 /* If setvbuf has the reversed format, exit 0. */
6563 /* This call has the arguments reversed.
6564 A reversed system may check and see that the address of main
6565 is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */
6566 if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
6569 exit(0); /* Non-reversed systems segv here. */
6572 if { (eval echo configure:6573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6574 ac_cv_func_setvbuf_reversed=yes
6576 echo "configure: failed program was:" >&5
6577 cat conftest.$ac_ext >&5
6579 ac_cv_func_setvbuf_reversed=no
6584 rm -f core core.* *.core
6587 echo "$ac_t""$ac_cv_func_setvbuf_reversed" 1>&6
6588 if test $ac_cv_func_setvbuf_reversed = yes; then
6589 cat >> confdefs.h <<\EOF
6590 #define SETVBUF_REVERSED 1
6596 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
6597 echo "configure:6598: checking return type of signal handlers" >&5
6598 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
6599 echo $ac_n "(cached) $ac_c" 1>&6
6601 cat > conftest.$ac_ext <<EOF
6602 #line 6603 "configure"
6603 #include "confdefs.h"
6604 #include <sys/types.h>
6610 extern "C" void (*signal (int, void (*)(int)))(int);
6612 void (*signal ()) ();
6619 if { (eval echo configure:6620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6621 ac_cv_type_signal=void
6623 echo "configure: failed program was:" >&5
6624 cat conftest.$ac_ext >&5
6626 ac_cv_type_signal=int
6631 echo "$ac_t""$ac_cv_type_signal" 1>&6
6632 cat >> confdefs.h <<EOF
6633 #define RETSIGTYPE $ac_cv_type_signal
6638 echo $ac_n "checking for type sigaction_t""... $ac_c" 1>&6
6639 echo "configure:6640: checking for type sigaction_t" >&5
6640 if eval "test \"`echo '$''{'cf_cv_type_sigaction'+set}'`\" = set"; then
6641 echo $ac_n "(cached) $ac_c" 1>&6
6644 cat > conftest.$ac_ext <<EOF
6645 #line 6646 "configure"
6646 #include "confdefs.h"
6653 if { (eval echo configure:6654: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6655 cf_cv_type_sigaction=yes
6657 echo "configure: failed program was:" >&5
6658 cat conftest.$ac_ext >&5
6660 cf_cv_type_sigaction=no
6665 echo "$ac_t""$cf_cv_type_sigaction" 1>&6
6666 test "$cf_cv_type_sigaction" = yes && cat >> confdefs.h <<\EOF
6667 #define HAVE_TYPE_SIGACTION 1
6673 echo $ac_n "checking declaration of size-change""... $ac_c" 1>&6
6674 echo "configure:6675: checking declaration of size-change" >&5
6675 if eval "test \"`echo '$''{'cf_cv_sizechange'+set}'`\" = set"; then
6676 echo $ac_n "(cached) $ac_c" 1>&6
6679 cf_cv_sizechange=unknown
6680 cf_save_CPPFLAGS="$CPPFLAGS"
6682 for cf_opts in "" "NEED_PTEM_H"
6685 CPPFLAGS="$cf_save_CPPFLAGS"
6686 test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
6687 cat > conftest.$ac_ext <<EOF
6688 #line 6689 "configure"
6689 #include "confdefs.h"
6690 #include <sys/types.h>
6691 #ifdef HAVE_TERMIOS_H
6692 #include <termios.h>
6694 #ifdef HAVE_TERMIO_H
6699 /* This is a workaround for SCO: they neglected to define struct winsize in
6700 * termios.h -- it's only in termio.h and ptem.h
6702 #include <sys/stream.h>
6703 #include <sys/ptem.h>
6705 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
6706 #include <sys/ioctl.h>
6712 struct ttysize win; /* FIXME: what system is this? */
6713 int y = win.ts_lines;
6714 int x = win.ts_cols;
6721 no TIOCGSIZE or TIOCGWINSZ
6722 #endif /* TIOCGWINSZ */
6723 #endif /* TIOCGSIZE */
6727 if { (eval echo configure:6728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6729 cf_cv_sizechange=yes
6731 echo "configure: failed program was:" >&5
6732 cat conftest.$ac_ext >&5
6738 CPPFLAGS="$cf_save_CPPFLAGS"
6739 if test "$cf_cv_sizechange" = yes ; then
6740 echo "size-change succeeded ($cf_opts)" >&5
6741 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
6748 echo "$ac_t""$cf_cv_sizechange" 1>&6
6749 if test "$cf_cv_sizechange" != no ; then
6750 cat >> confdefs.h <<\EOF
6751 #define HAVE_SIZECHANGE 1
6754 case $cf_cv_sizechange in #(vi
6756 cat >> confdefs.h <<EOF
6757 #define $cf_cv_sizechange 1
6765 echo $ac_n "checking for memmove""... $ac_c" 1>&6
6766 echo "configure:6767: checking for memmove" >&5
6767 if eval "test \"`echo '$''{'ac_cv_func_memmove'+set}'`\" = set"; then
6768 echo $ac_n "(cached) $ac_c" 1>&6
6770 cat > conftest.$ac_ext <<EOF
6771 #line 6772 "configure"
6772 #include "confdefs.h"
6773 /* System header to define __stub macros and hopefully few prototypes,
6774 which can conflict with char memmove(); below. */
6776 /* Override any gcc2 internal prototype to avoid an error. */
6777 /* We use char because int might match the return type of a gcc2
6778 builtin and then its argument prototype would still apply. */
6783 /* The GNU C library defines this for functions which it implements
6784 to always fail with ENOSYS. Some functions are actually named
6785 something starting with __ and the normal name is an alias. */
6786 #if defined (__stub_memmove) || defined (__stub___memmove)
6794 if { (eval echo configure:6795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6796 eval "ac_cv_func_memmove=yes"
6798 echo "configure: failed program was:" >&5
6799 cat conftest.$ac_ext >&5
6801 eval "ac_cv_func_memmove=no"
6806 if eval "test \"`echo '$ac_cv_func_'memmove`\" = yes"; then
6807 echo "$ac_t""yes" 1>&6
6810 echo "$ac_t""no" 1>&6
6812 echo $ac_n "checking for bcopy""... $ac_c" 1>&6
6813 echo "configure:6814: checking for bcopy" >&5
6814 if eval "test \"`echo '$''{'ac_cv_func_bcopy'+set}'`\" = set"; then
6815 echo $ac_n "(cached) $ac_c" 1>&6
6817 cat > conftest.$ac_ext <<EOF
6818 #line 6819 "configure"
6819 #include "confdefs.h"
6820 /* System header to define __stub macros and hopefully few prototypes,
6821 which can conflict with char bcopy(); below. */
6823 /* Override any gcc2 internal prototype to avoid an error. */
6824 /* We use char because int might match the return type of a gcc2
6825 builtin and then its argument prototype would still apply. */
6830 /* The GNU C library defines this for functions which it implements
6831 to always fail with ENOSYS. Some functions are actually named
6832 something starting with __ and the normal name is an alias. */
6833 #if defined (__stub_bcopy) || defined (__stub___bcopy)
6841 if { (eval echo configure:6842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6843 eval "ac_cv_func_bcopy=yes"
6845 echo "configure: failed program was:" >&5
6846 cat conftest.$ac_ext >&5
6848 eval "ac_cv_func_bcopy=no"
6853 if eval "test \"`echo '$ac_cv_func_'bcopy`\" = yes"; then
6854 echo "$ac_t""yes" 1>&6
6856 echo $ac_n "checking if bcopy does overlapping moves""... $ac_c" 1>&6
6857 echo "configure:6858: checking if bcopy does overlapping moves" >&5
6858 if eval "test \"`echo '$''{'cf_cv_good_bcopy'+set}'`\" = set"; then
6859 echo $ac_n "(cached) $ac_c" 1>&6
6862 if test "$cross_compiling" = yes; then
6863 cf_cv_good_bcopy=unknown
6865 cat > conftest.$ac_ext <<EOF
6866 #line 6867 "configure"
6867 #include "confdefs.h"
6870 static char data[] = "abcdefghijklmnopqrstuwwxyz";
6872 bcopy(data, temp, sizeof(data));
6873 bcopy(temp+10, temp, 15);
6874 bcopy(temp+5, temp+15, 10);
6875 exit (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
6879 if { (eval echo configure:6880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6881 cf_cv_good_bcopy=yes
6883 echo "configure: failed program was:" >&5
6884 cat conftest.$ac_ext >&5
6894 echo "$ac_t""$cf_cv_good_bcopy" 1>&6
6897 echo "$ac_t""no" 1>&6
6901 if test "$cf_cv_good_bcopy" = yes ; then
6902 cat >> confdefs.h <<\EOF
6903 #define USE_OK_BCOPY 1
6907 cat >> confdefs.h <<\EOF
6908 #define USE_MY_MEMMOVE 1
6916 echo $ac_n "checking if poll really works""... $ac_c" 1>&6
6917 echo "configure:6918: checking if poll really works" >&5
6918 if eval "test \"`echo '$''{'cf_cv_working_poll'+set}'`\" = set"; then
6919 echo $ac_n "(cached) $ac_c" 1>&6
6922 if test "$cross_compiling" = yes; then
6923 cf_cv_working_poll=unknown
6925 cat > conftest.$ac_ext <<EOF
6926 #line 6927 "configure"
6927 #include "confdefs.h"
6933 #include <sys/poll.h>
6936 struct pollfd myfds;
6940 myfds.events = POLLIN;
6942 ret = poll(&myfds, 1, 100);
6946 if { (eval echo configure:6947: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6948 cf_cv_working_poll=yes
6950 echo "configure: failed program was:" >&5
6951 cat conftest.$ac_ext >&5
6953 cf_cv_working_poll=no
6960 echo "$ac_t""$cf_cv_working_poll" 1>&6
6961 test "$cf_cv_working_poll" = "yes" && cat >> confdefs.h <<\EOF
6962 #define HAVE_WORKING_POLL 1
6967 if test -z "$cf_user_CFLAGS" ; then
6968 CFLAGS=`echo ${CFLAGS} | sed -e 's/-g //' -e 's/-g$//'`
6969 CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's/-g //' -e 's/-g$//'`
6973 ac_safe=`echo "stdbool.h" | sed 'y%./+-%__p_%'`
6974 echo $ac_n "checking for stdbool.h""... $ac_c" 1>&6
6975 echo "configure:6976: checking for stdbool.h" >&5
6976 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6977 echo $ac_n "(cached) $ac_c" 1>&6
6979 cat > conftest.$ac_ext <<EOF
6980 #line 6981 "configure"
6981 #include "confdefs.h"
6982 #include <stdbool.h>
6984 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6985 { (eval echo configure:6986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6986 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6987 if test -z "$ac_err"; then
6989 eval "ac_cv_header_$ac_safe=yes"
6992 echo "configure: failed program was:" >&5
6993 cat conftest.$ac_ext >&5
6995 eval "ac_cv_header_$ac_safe=no"
6999 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7000 echo "$ac_t""yes" 1>&6
7001 cf_cv_header_stdbool_h=1
7003 echo "$ac_t""no" 1>&6
7004 cf_cv_header_stdbool_h=0
7007 echo $ac_n "checking for builtin bool type""... $ac_c" 1>&6
7008 echo "configure:7009: checking for builtin bool type" >&5
7009 if eval "test \"`echo '$''{'cf_cv_cc_bool_type'+set}'`\" = set"; then
7010 echo $ac_n "(cached) $ac_c" 1>&6
7013 cat > conftest.$ac_ext <<EOF
7014 #line 7015 "configure"
7015 #include "confdefs.h"
7018 #include <sys/types.h>
7024 if { (eval echo configure:7025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7026 cf_cv_cc_bool_type=1
7028 echo "configure: failed program was:" >&5
7029 cat conftest.$ac_ext >&5
7031 cf_cv_cc_bool_type=0
7037 if test "$cf_cv_cc_bool_type" = 1
7038 then echo "$ac_t""yes" 1>&6
7039 else echo "$ac_t""no" 1>&6
7042 if test -n "$CXX" ; then
7044 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
7045 ac_cpp='$CXXCPP $CPPFLAGS'
7046 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
7047 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
7048 cross_compiling=$ac_cv_prog_cxx_cross
7051 if test -n "$GXX" ; then
7052 case $cf_cv_system_name in #(vi
7054 cf_stdcpp_libname=stdcpp
7057 cf_stdcpp_libname=stdc++
7060 echo $ac_n "checking for library $cf_stdcpp_libname""... $ac_c" 1>&6
7061 echo "configure:7062: checking for library $cf_stdcpp_libname" >&5
7062 if eval "test \"`echo '$''{'cf_cv_libstdcpp'+set}'`\" = set"; then
7063 echo $ac_n "(cached) $ac_c" 1>&6
7067 LIBS="$LIBS -l$cf_stdcpp_libname"
7068 cat > conftest.$ac_ext <<EOF
7069 #line 7070 "configure"
7070 #include "confdefs.h"
7072 #include <strstream.h>
7076 strstreambuf foo(buf, sizeof(buf))
7080 if { (eval echo configure:7081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7084 echo "configure: failed program was:" >&5
7085 cat conftest.$ac_ext >&5
7094 echo "$ac_t""$cf_cv_libstdcpp" 1>&6
7095 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
7099 case $GXX_VERSION in
7105 cf_cxx_library=unknown
7106 case $cf_cv_system_name in #(vi
7114 if test "$ac_cv_prog_gxx" = yes; then
7115 echo $ac_n "checking for lib$cf_gpp_libname""... $ac_c" 1>&6
7116 echo "configure:7117: checking for lib$cf_gpp_libname" >&5
7118 LIBS="$LIBS -l$cf_gpp_libname"
7119 cat > conftest.$ac_ext <<EOF
7120 #line 7121 "configure"
7121 #include "confdefs.h"
7123 #include <$cf_gpp_libname/builtin.h>
7126 two_arg_error_handler_t foo2 = lib_error_handler
7129 if { (eval echo configure:7130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7132 CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
7133 if test "$cf_gpp_libname" = cpp ; then
7134 cat >> confdefs.h <<\EOF
7135 #define HAVE_GPP_BUILTIN_H 1
7139 cat >> confdefs.h <<\EOF
7140 #define HAVE_GXX_BUILTIN_H 1
7145 echo "configure: failed program was:" >&5
7146 cat conftest.$ac_ext >&5
7148 cat > conftest.$ac_ext <<EOF
7149 #line 7150 "configure"
7150 #include "confdefs.h"
7152 #include <builtin.h>
7155 two_arg_error_handler_t foo2 = lib_error_handler
7158 if { (eval echo configure:7159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7161 CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
7162 cat >> confdefs.h <<\EOF
7163 #define HAVE_BUILTIN_H 1
7167 echo "configure: failed program was:" >&5
7168 cat conftest.$ac_ext >&5
7176 echo "$ac_t""$cf_cxx_library" 1>&6
7185 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
7186 echo "configure:7187: checking how to run the C++ preprocessor" >&5
7187 if test -z "$CXXCPP"; then
7188 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
7189 echo $ac_n "(cached) $ac_c" 1>&6
7192 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
7193 ac_cpp='$CXXCPP $CPPFLAGS'
7194 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
7195 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
7196 cross_compiling=$ac_cv_prog_cxx_cross
7197 CXXCPP="${CXX-g++} -E"
7198 cat > conftest.$ac_ext <<EOF
7199 #line 7200 "configure"
7200 #include "confdefs.h"
7203 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7204 { (eval echo configure:7205: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7205 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7206 if test -z "$ac_err"; then
7210 echo "configure: failed program was:" >&5
7211 cat conftest.$ac_ext >&5
7216 ac_cv_prog_CXXCPP="$CXXCPP"
7218 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
7219 ac_cpp='$CXXCPP $CPPFLAGS'
7220 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
7221 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
7222 cross_compiling=$ac_cv_prog_cxx_cross
7225 CXXCPP="$ac_cv_prog_CXXCPP"
7226 echo "$ac_t""$CXXCPP" 1>&6
7228 for ac_hdr in typeinfo
7230 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7231 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7232 echo "configure:7233: checking for $ac_hdr" >&5
7233 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7234 echo $ac_n "(cached) $ac_c" 1>&6
7236 cat > conftest.$ac_ext <<EOF
7237 #line 7238 "configure"
7238 #include "confdefs.h"
7241 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7242 { (eval echo configure:7243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7243 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7244 if test -z "$ac_err"; then
7246 eval "ac_cv_header_$ac_safe=yes"
7249 echo "configure: failed program was:" >&5
7250 cat conftest.$ac_ext >&5
7252 eval "ac_cv_header_$ac_safe=no"
7256 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7257 echo "$ac_t""yes" 1>&6
7258 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7259 cat >> confdefs.h <<EOF
7260 #define $ac_tr_hdr 1
7264 echo "$ac_t""no" 1>&6
7270 ac_safe=`echo "stdbool.h" | sed 'y%./+-%__p_%'`
7271 echo $ac_n "checking for stdbool.h""... $ac_c" 1>&6
7272 echo "configure:7273: checking for stdbool.h" >&5
7273 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7274 echo $ac_n "(cached) $ac_c" 1>&6
7276 cat > conftest.$ac_ext <<EOF
7277 #line 7278 "configure"
7278 #include "confdefs.h"
7279 #include <stdbool.h>
7281 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7282 { (eval echo configure:7283: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7283 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7284 if test -z "$ac_err"; then
7286 eval "ac_cv_header_$ac_safe=yes"
7289 echo "configure: failed program was:" >&5
7290 cat conftest.$ac_ext >&5
7292 eval "ac_cv_header_$ac_safe=no"
7296 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7297 echo "$ac_t""yes" 1>&6
7298 cf_cv_header_stdbool_h=1
7300 echo "$ac_t""no" 1>&6
7301 cf_cv_header_stdbool_h=0
7304 echo $ac_n "checking for builtin bool type""... $ac_c" 1>&6
7305 echo "configure:7306: checking for builtin bool type" >&5
7306 if eval "test \"`echo '$''{'cf_cv_builtin_bool'+set}'`\" = set"; then
7307 echo $ac_n "(cached) $ac_c" 1>&6
7310 cat > conftest.$ac_ext <<EOF
7311 #line 7312 "configure"
7312 #include "confdefs.h"
7315 #include <sys/types.h>
7321 if { (eval echo configure:7322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7323 cf_cv_builtin_bool=1
7325 echo "configure: failed program was:" >&5
7326 cat conftest.$ac_ext >&5
7328 cf_cv_builtin_bool=0
7334 if test "$cf_cv_builtin_bool" = 1
7335 then echo "$ac_t""yes" 1>&6
7336 else echo "$ac_t""no" 1>&6
7340 echo $ac_n "checking for size of bool""... $ac_c" 1>&6
7341 echo "configure:7342: checking for size of bool" >&5
7342 if eval "test \"`echo '$''{'cf_cv_type_of_bool'+set}'`\" = set"; then
7343 echo $ac_n "(cached) $ac_c" 1>&6
7347 if test "$cross_compiling" = yes; then
7348 cf_cv_type_of_bool=unknown
7350 cat > conftest.$ac_ext <<EOF
7351 #line 7352 "configure"
7352 #include "confdefs.h"
7354 extern "C" void exit(int);
7360 #if defined(__cplusplus)
7362 #ifdef HAVE_GXX_BUILTIN_H
7363 #include <g++/builtin.h>
7364 #elif HAVE_GPP_BUILTIN_H
7365 #include <gpp/builtin.h>
7366 #elif HAVE_BUILTIN_H
7367 #include <builtin.h>
7372 #if $cf_cv_header_stdbool_h
7373 #include <stdbool.h>
7380 FILE *fp = fopen("cf_test.out", "w");
7383 if ((bool)(-x) >= 0)
7384 fputs("unsigned ", fp);
7385 if (sizeof(x) == sizeof(int)) fputs("int", fp);
7386 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
7387 else if (sizeof(x) == sizeof(short))fputs("short",fp);
7388 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
7395 if { (eval echo configure:7396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7397 cf_cv_type_of_bool=`cat cf_test.out`
7398 if test -z "$cf_cv_type_of_bool"; then
7399 cf_cv_type_of_bool=unknown
7402 echo "configure: failed program was:" >&5
7403 cat conftest.$ac_ext >&5
7405 cf_cv_type_of_bool=unknown
7414 echo "$ac_t""$cf_cv_type_of_bool" 1>&6
7415 if test "$cf_cv_type_of_bool" = unknown ; then
7416 case .$NCURSES_BOOL in #(vi
7417 .auto|.) NCURSES_BOOL=unsigned;;
7419 echo "configure: warning: Assuming $NCURSES_BOOL for type of bool" 1>&2
7420 cf_cv_type_of_bool=$NCURSES_BOOL
7424 echo $ac_n "checking for special defines needed for etip.h""... $ac_c" 1>&6
7425 echo "configure:7426: checking for special defines needed for etip.h" >&5
7426 cf_save_CXXFLAGS="$CXXFLAGS"
7428 for cf_math in "" MATH_H
7430 for cf_excp in "" MATH_EXCEPTION
7432 CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu"
7433 test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
7434 test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
7435 cat > conftest.$ac_ext <<EOF
7436 #line 7437 "configure"
7437 #include "confdefs.h"
7439 #include <etip.h.in>
7445 if { (eval echo configure:7446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7448 test -n "$cf_math" && cat >> confdefs.h <<EOF
7449 #define ETIP_NEEDS_${cf_math} 1
7452 test -n "$cf_excp" && cat >> confdefs.h <<EOF
7453 #define ETIP_NEEDS_${cf_excp} 1
7456 cf_result="$cf_math $cf_excp"
7460 echo "configure: failed program was:" >&5
7461 cat conftest.$ac_ext >&5
7466 echo "$ac_t""$cf_result" 1>&6
7467 CXXFLAGS="$cf_save_CXXFLAGS"
7470 if test -n "$CXX"; then
7471 echo $ac_n "checking if $CXX accepts parameter initialization""... $ac_c" 1>&6
7472 echo "configure:7473: checking if $CXX accepts parameter initialization" >&5
7473 if eval "test \"`echo '$''{'cf_cv_cpp_param_init'+set}'`\" = set"; then
7474 echo $ac_n "(cached) $ac_c" 1>&6
7479 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
7480 ac_cpp='$CXXCPP $CPPFLAGS'
7481 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
7482 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
7483 cross_compiling=$ac_cv_prog_cxx_cross
7485 if test "$cross_compiling" = yes; then
7486 cf_cv_cpp_param_init=unknown
7488 cat > conftest.$ac_ext <<EOF
7489 #line 7490 "configure"
7490 #include "confdefs.h"
7492 extern "C" void exit(int);
7503 TEST::TEST(int x = 1) // some compilers do not like second initializer
7510 if { (eval echo configure:7511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7512 cf_cv_cpp_param_init=yes
7514 echo "configure: failed program was:" >&5
7515 cat conftest.$ac_ext >&5
7517 cf_cv_cpp_param_init=no
7523 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
7524 ac_cpp='$CXXCPP $CPPFLAGS'
7525 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
7526 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
7527 cross_compiling=$ac_cv_prog_cxx_cross
7532 echo "$ac_t""$cf_cv_cpp_param_init" 1>&6
7534 test "$cf_cv_cpp_param_init" = yes && cat >> confdefs.h <<\EOF
7535 #define CPP_HAS_PARAM_INIT 1
7540 if test -n "$CXX"; then
7544 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
7545 ac_cpp='$CXXCPP $CPPFLAGS'
7546 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
7547 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
7548 cross_compiling=$ac_cv_prog_cxx_cross
7550 for ac_hdr in strstream.h
7552 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7553 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7554 echo "configure:7555: checking for $ac_hdr" >&5
7555 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7556 echo $ac_n "(cached) $ac_c" 1>&6
7558 cat > conftest.$ac_ext <<EOF
7559 #line 7560 "configure"
7560 #include "confdefs.h"
7563 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7564 { (eval echo configure:7565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7565 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7566 if test -z "$ac_err"; then
7568 eval "ac_cv_header_$ac_safe=yes"
7571 echo "configure: failed program was:" >&5
7572 cat conftest.$ac_ext >&5
7574 eval "ac_cv_header_$ac_safe=no"
7578 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7579 echo "$ac_t""yes" 1>&6
7580 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7581 cat >> confdefs.h <<EOF
7582 #define $ac_tr_hdr 1
7586 echo "$ac_t""no" 1>&6
7591 echo $ac_n "checking if $CXX supports vscan function""... $ac_c" 1>&6
7592 echo "configure:7593: checking if $CXX supports vscan function" >&5
7593 if eval "test \"`echo '$''{'cf_cv_cpp_vscan_func'+set}'`\" = set"; then
7594 echo $ac_n "(cached) $ac_c" 1>&6
7597 for cf_vscan_func in strstream strstream_cast stdio
7599 case $cf_vscan_func in #(vi
7600 stdio) cf_vscan_defs=USE_STDIO_VSCAN ;; #(vi
7601 strstream) cf_vscan_defs=USE_STRSTREAM_VSCAN ;;
7602 strstream_cast) cf_vscan_defs=USE_STRSTREAM_VSCAN_CAST ;;
7604 cat > conftest.$ac_ext <<EOF
7605 #line 7606 "configure"
7606 #include "confdefs.h"
7610 #define $cf_vscan_defs 1
7611 #if defined(USE_STDIO_VSCAN)
7612 #elif defined(HAVE_STRSTREAM_H) && defined(USE_STRSTREAM_VSCAN)
7613 #include <strstream.h>
7616 int scanw(const char* fmt, ...)
7622 va_start(args, fmt);
7623 #if defined(USE_STDIO_VSCAN)
7624 if (::vsscanf(buf, fmt, args) != -1)
7626 #elif defined(USE_STRSTREAM_VSCAN)
7627 strstreambuf ss(buf, sizeof(buf));
7628 if (ss.vscan(fmt, args) != -1)
7630 #elif defined(USE_STRSTREAM_VSCAN_CAST)
7631 strstreambuf ss(buf, sizeof(buf));
7632 if (ss.vscan(fmt, (_IO_va_list)args) != -1)
7635 #error case $cf_vscan_func failed
7642 int tmp, foo = scanw("%d", &tmp)
7645 if { (eval echo configure:7646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7647 cf_cv_cpp_vscan_func=$cf_vscan_func; break
7649 echo "configure: failed program was:" >&5
7650 cat conftest.$ac_ext >&5
7652 cf_cv_cpp_vscan_func=no
7655 test "$cf_cv_cpp_vscan_func" != no && break
7660 echo "$ac_t""$cf_cv_cpp_vscan_func" 1>&6
7663 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
7664 ac_cpp='$CXXCPP $CPPFLAGS'
7665 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
7666 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
7667 cross_compiling=$ac_cv_prog_cxx_cross
7671 case $cf_cv_cpp_vscan_func in #(vi
7673 cat >> confdefs.h <<\EOF
7674 #define CPP_HAS_VSCAN_FUNC 1
7677 cat >> confdefs.h <<\EOF
7678 #define USE_STDIO_VSCAN 1
7683 cat >> confdefs.h <<\EOF
7684 #define CPP_HAS_VSCAN_FUNC 1
7687 cat >> confdefs.h <<\EOF
7688 #define USE_STRSTREAM_VSCAN 1
7693 cat >> confdefs.h <<\EOF
7694 #define CPP_HAS_VSCAN_FUNC 1
7697 cat >> confdefs.h <<\EOF
7698 #define USE_STRSTREAM_VSCAN_CAST 1
7706 CXX_AR_OPTS='$(AR_OPTS)'
7707 case $cf_cv_system_name in #(vi
7709 if test "$GXX" != yes ; then
7711 CXX_AR_OPTS='-ar -o'
7715 CXXLDFLAGS="-u main"
7718 if test "$GXX" != yes ; then
7720 CXX_AR_OPTS='-xar -o'
7729 cf_cv_builtin_bool=1
7731 # Just because we are not configuring against C++ right now does not
7732 # mean that a user will not want to use C++. Some distributors disable
7733 # the C++ portion of this configuration as a shortcut (or just to avoid
7734 # compiling the demo in the c++ directory). So we need a reasonable
7735 # default for the 'bool' type.
7737 # Caveat: since the storage of the bool type is not standardized, it
7740 if test "$NCURSES_BOOL" != auto ; then
7741 cf_cv_type_of_bool=$NCURSES_AUTO
7743 if test "$cf_cv_header_stdbool_h" = 1 ; then
7745 echo $ac_n "checking for size of bool""... $ac_c" 1>&6
7746 echo "configure:7747: checking for size of bool" >&5
7747 if eval "test \"`echo '$''{'cf_cv_type_of_bool'+set}'`\" = set"; then
7748 echo $ac_n "(cached) $ac_c" 1>&6
7752 if test "$cross_compiling" = yes; then
7753 cf_cv_type_of_bool=unknown
7755 cat > conftest.$ac_ext <<EOF
7756 #line 7757 "configure"
7757 #include "confdefs.h"
7759 extern "C" void exit(int);
7765 #if defined(__cplusplus)
7767 #ifdef HAVE_GXX_BUILTIN_H
7768 #include <g++/builtin.h>
7769 #elif HAVE_GPP_BUILTIN_H
7770 #include <gpp/builtin.h>
7771 #elif HAVE_BUILTIN_H
7772 #include <builtin.h>
7777 #if $cf_cv_header_stdbool_h
7778 #include <stdbool.h>
7785 FILE *fp = fopen("cf_test.out", "w");
7788 if ((bool)(-x) >= 0)
7789 fputs("unsigned ", fp);
7790 if (sizeof(x) == sizeof(int)) fputs("int", fp);
7791 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
7792 else if (sizeof(x) == sizeof(short))fputs("short",fp);
7793 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
7800 if { (eval echo configure:7801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7802 cf_cv_type_of_bool=`cat cf_test.out`
7803 if test -z "$cf_cv_type_of_bool"; then
7804 cf_cv_type_of_bool=unknown
7807 echo "configure: failed program was:" >&5
7808 cat conftest.$ac_ext >&5
7810 cf_cv_type_of_bool=unknown
7819 echo "$ac_t""$cf_cv_type_of_bool" 1>&6
7820 if test "$cf_cv_type_of_bool" = unknown ; then
7821 case .$NCURSES_BOOL in #(vi
7822 .auto|.) NCURSES_BOOL=unsigned;;
7824 echo "configure: warning: Assuming $NCURSES_BOOL for type of bool" 1>&2
7825 cf_cv_type_of_bool=$NCURSES_BOOL
7829 echo $ac_n "checking for fallback type of bool""... $ac_c" 1>&6
7830 echo "configure:7831: checking for fallback type of bool" >&5
7831 case "$host_cpu" in #(vi
7832 i?86) cf_cv_type_of_bool=char ;; #(vi
7833 *) cf_cv_type_of_bool=int ;;
7835 echo "$ac_t""$cf_cv_type_of_bool" 1>&6
7843 if test "$cf_with_ada" != "no" ; then
7844 cf_ada_make=gnatmake
7845 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
7846 set dummy $cf_ada_make; ac_word=$2
7847 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7848 echo "configure:7849: checking for $ac_word" >&5
7849 if eval "test \"`echo '$''{'ac_cv_prog_gnat_exists'+set}'`\" = set"; then
7850 echo $ac_n "(cached) $ac_c" 1>&6
7852 if test -n "$gnat_exists"; then
7853 ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
7855 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7857 for ac_dir in $ac_dummy; do
7858 test -z "$ac_dir" && ac_dir=.
7859 if test -f $ac_dir/$ac_word; then
7860 ac_cv_prog_gnat_exists="yes"
7865 test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
7868 gnat_exists="$ac_cv_prog_gnat_exists"
7869 if test -n "$gnat_exists"; then
7870 echo "$ac_t""$gnat_exists" 1>&6
7872 echo "$ac_t""no" 1>&6
7875 if test "$ac_cv_prog_gnat_exists" = no; then
7879 cf_cv_gnat_version=`$cf_ada_make -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
7880 sed -e 's/[^0-9 \.]//g' | $AWK '{print $1;}'`
7881 case $cf_cv_gnat_version in
7882 3.1[1-9]*|3.[2-9]*|[4-9].*)
7883 cf_cv_prog_gnat_correct=yes
7885 *) echo Unsupported GNAT version $cf_cv_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
7886 cf_cv_prog_gnat_correct=no
7889 case $cf_cv_gnat_version in
7891 cf_compile_generics=generics
7892 cf_generic_objects="\$(GENOBJS)"
7894 *) cf_compile_generics=
7899 # Extract the first word of "m4", so it can be a program name with args.
7900 set dummy m4; ac_word=$2
7901 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7902 echo "configure:7903: checking for $ac_word" >&5
7903 if eval "test \"`echo '$''{'ac_cv_prog_M4_exists'+set}'`\" = set"; then
7904 echo $ac_n "(cached) $ac_c" 1>&6
7906 if test -n "$M4_exists"; then
7907 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
7909 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7911 for ac_dir in $ac_dummy; do
7912 test -z "$ac_dir" && ac_dir=.
7913 if test -f $ac_dir/$ac_word; then
7914 ac_cv_prog_M4_exists="yes"
7919 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
7922 M4_exists="$ac_cv_prog_M4_exists"
7923 if test -n "$M4_exists"; then
7924 echo "$ac_t""$M4_exists" 1>&6
7926 echo "$ac_t""no" 1>&6
7929 if test "$ac_cv_prog_M4_exists" = no; then
7930 cf_cv_prog_gnat_correct=no
7931 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
7933 if test "$cf_cv_prog_gnat_correct" = yes; then
7934 echo $ac_n "checking if GNAT works""... $ac_c" 1>&6
7935 echo "configure:7936: checking if GNAT works" >&5
7938 cat >>conftest.ads <<CF_EOF
7941 cat >>conftest.adb <<CF_EOF
7944 procedure conftest is
7946 Text_IO.Put ("Hello World");
7948 GNAT.OS_Lib.OS_Exit (0);
7951 if ( $cf_ada_make conftest 1>&5 2>&1 ) ; then
7952 if ( ./conftest 1>&5 2>&1 ) ; then
7953 cf_cv_prog_gnat_correct=yes
7955 cf_cv_prog_gnat_correct=no
7958 cf_cv_prog_gnat_correct=no
7962 echo "$ac_t""$cf_cv_prog_gnat_correct" 1>&6
7965 if test "$cf_cv_prog_gnat_correct" = yes; then
7966 ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
7969 # Check whether --with-ada-compiler or --without-ada-compiler was given.
7970 if test "${with_ada_compiler+set}" = set; then
7971 withval="$with_ada_compiler"
7972 cf_ada_compiler=$withval
7974 cf_ada_compiler=gnatmake
7978 cf_ada_package=terminal_interface
7988 # Check whether --with-ada-include or --without-ada-include was given.
7989 if test "${with_ada_include+set}" = set; then
7990 withval="$with_ada_include"
7993 withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
7996 case ".$withval" in #(vi
7997 .\$\(*\)*|.\'*\'*) #(vi
8001 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
8004 eval withval="$withval"
8005 case ".$withval" in #(vi
8007 withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
8012 withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
8015 { echo "configure: error: expected a pathname, not \"$withval\"" 1>&2; exit 1; }
8019 eval ADA_INCLUDE="$withval"
8024 # Check whether --with-ada-objects or --without-ada-objects was given.
8025 if test "${with_ada_objects+set}" = set; then
8026 withval="$with_ada_objects"
8029 withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
8032 case ".$withval" in #(vi
8033 .\$\(*\)*|.\'*\'*) #(vi
8037 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
8040 eval withval="$withval"
8041 case ".$withval" in #(vi
8043 withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
8048 withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
8051 { echo "configure: error: expected a pathname, not \"$withval\"" 1>&2; exit 1; }
8055 eval ADA_OBJECTS="$withval"
8062 ### It's not possible to appease gcc 2.6.3's conversion-warnings if we're
8063 ### using a 'char' for bools. gcc 2.7.0's conversion-warnings are broken too
8064 ### badly to consider using for development purposes, but 2.5.8 is okay.
8065 if test -n "$with_warnings"; then
8066 case $GCC_VERSION in
8068 if test "$cf_cv_type_of_bool" != "char"; then
8069 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wconversion"
8073 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wconversion"
8078 ### Construct the library-subsets, if any, from this set of keywords:
8079 ### none, base, ext_funcs, termlib.
8080 echo $ac_n "checking for library subsets""... $ac_c" 1>&6
8081 echo "configure:8082: checking for library subsets" >&5
8082 if test "$with_termlib" = yes ; then
8083 LIB_SUBSETS="termlib "
8085 LIB_SUBSETS="termlib+"
8087 LIB_SUBSETS="${LIB_SUBSETS}base"
8088 test "$with_widec" = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
8089 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
8090 echo "$ac_t""$LIB_SUBSETS" 1>&6
8094 case "$CFLAGS $CPPFLAGS" in
8102 ### Construct the list of include-directories to be generated
8104 CPPFLAGS="$CPPFLAGS -I. -I../include"
8105 if test "$srcdir" != "."; then
8106 CPPFLAGS="$CPPFLAGS -I\$(srcdir)/../include"
8108 if test "$GCC" != yes; then
8109 CPPFLAGS="$CPPFLAGS -I\$(includedir)"
8110 elif test "$includedir" != "/usr/include"; then
8111 if test "$includedir" = '${prefix}/include' ; then
8112 if test $prefix != /usr ; then
8113 CPPFLAGS="$CPPFLAGS -I\$(includedir)"
8116 CPPFLAGS="$CPPFLAGS -I\$(includedir)"
8122 ACPPFLAGS="$ACPPFLAGS -I. -I../../include"
8123 if test "$srcdir" != "."; then
8124 ACPPFLAGS="$ACPPFLAGS -I\$(srcdir)/../../include"
8126 if test "$GCC" != yes; then
8127 ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
8128 elif test "$includedir" != "/usr/include"; then
8129 if test "$includedir" = '${prefix}/include' ; then
8130 if test $prefix != /usr ; then
8131 ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
8134 ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
8140 ### Build up pieces for makefile rules
8141 echo $ac_n "checking default library suffix""... $ac_c" 1>&6
8142 echo "configure:8143: checking default library suffix" >&5
8144 case $DFT_LWR_MODEL in
8145 libtool) DFT_ARG_SUFFIX='' ;;
8146 normal) DFT_ARG_SUFFIX='' ;;
8147 debug) DFT_ARG_SUFFIX='_g' ;;
8148 profile) DFT_ARG_SUFFIX='_p' ;;
8149 shared) DFT_ARG_SUFFIX='' ;;
8151 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
8152 echo "$ac_t""$DFT_ARG_SUFFIX" 1>&6
8154 echo $ac_n "checking default library-dependency suffix""... $ac_c" 1>&6
8155 echo "configure:8156: checking default library-dependency suffix" >&5
8158 case $DFT_LWR_MODEL in
8159 libtool) DFT_DEP_SUFFIX='.la' ;;
8160 normal) DFT_DEP_SUFFIX='.a' ;;
8161 debug) DFT_DEP_SUFFIX='_g.a' ;;
8162 profile) DFT_DEP_SUFFIX='_p.a' ;;
8164 case $cf_cv_system_name in
8165 cygwin*) DFT_DEP_SUFFIX='.dll' ;;
8166 darwin*) DFT_DEP_SUFFIX='.dylib' ;;
8167 hpux*) DFT_DEP_SUFFIX='.sl' ;;
8168 *) DFT_DEP_SUFFIX='.so' ;;
8171 test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
8172 if test $DFT_LWR_MODEL = shared ; then
8173 case $cf_cv_system_name in #(vi
8175 DFT_DEP_SUFFIX=".dll.a"
8179 echo "$ac_t""$DFT_DEP_SUFFIX" 1>&6
8181 echo $ac_n "checking default object directory""... $ac_c" 1>&6
8182 echo "configure:8183: checking default object directory" >&5
8184 case $DFT_LWR_MODEL in
8185 libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
8186 normal) DFT_OBJ_SUBDIR='objects' ;;
8187 debug) DFT_OBJ_SUBDIR='obj_g' ;;
8188 profile) DFT_OBJ_SUBDIR='obj_p' ;;
8190 case $cf_cv_system_name in #(vi
8192 DFT_OBJ_SUBDIR='objects' ;;
8194 DFT_OBJ_SUBDIR='obj_s' ;;
8197 echo "$ac_t""$DFT_OBJ_SUBDIR" 1>&6
8199 # libtool thinks it can make c++ shared libraries (perhaps only g++)
8200 echo $ac_n "checking c++ library-dependency suffix""... $ac_c" 1>&6
8201 echo "configure:8202: checking c++ library-dependency suffix" >&5
8202 if test "$with_libtool" = "yes"; then
8203 CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
8208 libtool) CXX_LIB_SUFFIX='.la' ;;
8209 normal) CXX_LIB_SUFFIX='.a' ;;
8210 debug) CXX_LIB_SUFFIX='_g.a' ;;
8211 profile) CXX_LIB_SUFFIX='_p.a' ;;
8213 case $cf_cv_system_name in
8214 cygwin*) CXX_LIB_SUFFIX='.dll' ;;
8215 darwin*) CXX_LIB_SUFFIX='.dylib' ;;
8216 hpux*) CXX_LIB_SUFFIX='.sl' ;;
8217 *) CXX_LIB_SUFFIX='.so' ;;
8220 test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
8222 echo "$ac_t""$CXX_LIB_SUFFIX" 1>&6
8225 TINFO_LIST="$SHLIB_LIST"
8226 test "$with_termlib" = yes && SHLIB_LIST="$SHLIB_LIST -ltinfo${LIB_SUFFIX}"
8228 echo $ac_n "checking where we will install curses.h""... $ac_c" 1>&6
8229 echo "configure:8230: checking where we will install curses.h" >&5
8230 test "$with_overwrite" = no && \
8231 test "x$includedir" = 'x${prefix}/include' && \
8232 includedir='$(prefix)/include/ncurses'${LIB_SUFFIX}
8233 echo "$ac_t""$includedir" 1>&6
8239 ### Set up low-level terminfo dependencies for makefiles. Note that we
8240 ### could override this.
8241 if test "$with_termlib" = yes ; then
8242 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_NAME}${DFT_DEP_SUFFIX}"
8243 if test "$DFT_LWR_MODEL" = "libtool"; then
8244 TEST_ARGS="${TEST_DEPS}"
8246 TEST_ARGS="-l${TINFO_NAME}${DFT_ARG_SUFFIX}"
8249 PROG_DEPS="$TEST_DEPS"
8250 PROG_ARGS="$TEST_ARGS"
8252 ### Construct the list of subdirectories for which we'll customize makefiles
8253 ### with the appropriate compile-rules.
8256 echo $ac_n "checking for src modules""... $ac_c" 1>&6
8257 echo "configure:8258: checking for src modules" >&5
8259 # dependencies and linker-arguments for test-programs
8260 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
8261 if test "$DFT_LWR_MODEL" = "libtool"; then
8262 TEST_ARGS="${TEST_DEPS}"
8264 TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
8267 # dependencies and linker-arguments for utility-programs
8268 PROG_ARGS="$TEST_ARGS"
8271 for cf_dir in $modules_to_build
8273 if test -f $srcdir/$cf_dir/modules; then
8275 # We may/may not have tack in the distribution, though the
8277 if test $cf_dir = tack ; then
8278 if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
8283 if test -z "$cf_cv_src_modules"; then
8284 cf_cv_src_modules=$cf_dir
8286 cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
8289 # Make the ncurses_cfg.h file record the library interface files as
8290 # well. These are header files that are the same name as their
8291 # directory. Ncurses is the only library that does not follow
8293 if test $cf_dir = tack ; then
8295 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
8297 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8299 cat >> confdefs.h <<EOF
8300 #define HAVE_${cf_have_include}_H 1
8303 cat >> confdefs.h <<EOF
8304 #define HAVE_LIB${cf_have_include} 1
8307 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
8308 if test "$DFT_LWR_MODEL" = "libtool"; then
8309 TEST_ARGS="${TEST_DEPS}"
8311 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
8316 echo "$ac_t""$cf_cv_src_modules" 1>&6
8317 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
8321 PROG_ARGS="-L${LIB_DIR} $PROG_ARGS"
8324 SRC_SUBDIRS="man include"
8325 for cf_dir in $cf_cv_src_modules
8327 SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
8329 SRC_SUBDIRS="$SRC_SUBDIRS test"
8330 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
8331 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
8334 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
8335 SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
8336 ADA_SUBDIRS="gen src samples"
8340 for cf_dir in $SRC_SUBDIRS
8342 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
8345 if test -n "$ADA_SUBDIRS"; then
8346 for cf_dir in $ADA_SUBDIRS
8348 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
8355 for cf_item in $cf_list_models
8359 libtool) cf_subdir='obj_lo' ;;
8360 normal) cf_subdir='objects' ;;
8361 debug) cf_subdir='obj_g' ;;
8362 profile) cf_subdir='obj_p' ;;
8364 case $cf_cv_system_name in #(vi
8366 cf_subdir='objects' ;;
8368 cf_subdir='obj_s' ;;
8372 for cf_item2 in $DIRS_TO_MAKE
8374 test $cf_item2 = $cf_subdir && break
8376 test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
8378 for cf_dir in $DIRS_TO_MAKE
8380 test ! -d $cf_dir && mkdir $cf_dir
8385 cat >> confdefs.h <<EOF
8386 #define NCURSES_PATHSEP '$PATHSEP'
8390 ### Now that we're done running tests, add the compiler-warnings, if any
8391 CFLAGS="$CFLAGS $EXTRA_CFLAGS"
8393 ################################################################################
8395 cat > confcache <<\EOF
8396 # This file is a shell script that caches the results of configure
8397 # tests run on this system so they can be shared between configure
8398 # scripts and configure runs. It is not useful on other systems.
8399 # If it contains results you don't want to keep, you may remove or edit it.
8401 # By default, configure uses ./config.cache as the cache file,
8402 # creating it if it does not exist already. You can give configure
8403 # the --cache-file=FILE option to use a different cache file; that is
8404 # what configure does when it calls configure scripts in
8405 # subdirectories, so they share the cache.
8406 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8407 # config.status only pays attention to the cache file if you give it the
8408 # --recheck option to rerun configure.
8411 # The following way of writing the cache mishandles newlines in values,
8412 # but we know of no workaround that is simple, portable, and efficient.
8413 # So, don't put newlines in cache variables' values.
8414 # Ultrix sh set writes to stderr and can't be redirected directly,
8415 # and sets the high bit in the cache file unless we assign to the vars.
8417 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8419 # `set' does not quote correctly, so add quotes (double-quote substitution
8420 # turns \\\\ into \\, and sed turns \\ into \).
8422 -e "s/'/'\\\\''/g" \
8423 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8426 # `set' quotes correctly as required by POSIX, so do not add quotes.
8427 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8430 if cmp -s $cache_file confcache; then
8433 if test -w $cache_file; then
8434 echo "updating cache $cache_file"
8435 cat confcache > $cache_file
8437 echo "not updating unwritable cache $cache_file"
8442 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8444 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8445 # Let make expand exec_prefix.
8446 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8448 # Any assignment to VPATH causes Sun make to only execute
8449 # the first set of double-colon rules, so remove it if not needed.
8450 # If there is a colon in the path, we need to keep it.
8451 if test "x$srcdir" = x.; then
8452 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8455 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8457 DEFS=-DHAVE_CONFIG_H
8459 # Without the "./", some shells look in PATH for config.status.
8460 : ${CONFIG_STATUS=./config.status}
8462 echo creating $CONFIG_STATUS
8463 rm -f $CONFIG_STATUS
8464 cat > $CONFIG_STATUS <<EOF
8466 # Generated automatically by configure.
8467 # Run this file to recreate the current configuration.
8468 # This directory was configured as follows,
8469 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8471 # $0 $ac_configure_args
8473 # Compiler output produced by configure, useful for debugging
8474 # configure, is in ./config.log if it exists.
8476 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8479 case "\$ac_option" in
8480 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8481 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8482 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8483 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8484 echo "$CONFIG_STATUS generated by autoconf version 2.13.20020210"
8486 -help | --help | --hel | --he | --h)
8487 echo "\$ac_cs_usage"; exit 0 ;;
8488 *) echo "\$ac_cs_usage"; exit 1 ;;
8492 ac_given_srcdir=$srcdir
8493 ac_given_INSTALL="$INSTALL"
8495 trap 'rm -fr `echo "\
8496 include/MKterm.h.awk \
8497 include/curses.head:include/curses.h.in \
8500 misc/run_tic.sh:misc/run_tic.in \
8502 Makefile include/ncurses_cfg.h:include/ncurses_cfg.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8504 cat >> $CONFIG_STATUS <<EOF
8506 # Protect against being on the right side of a sed subst in config.status.
8507 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8508 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8512 s%@CFLAGS@%$CFLAGS%g
8513 s%@CPPFLAGS@%$CPPFLAGS%g
8514 s%@CXXFLAGS@%$CXXFLAGS%g
8515 s%@FFLAGS@%$FFLAGS%g
8517 s%@LDFLAGS@%$LDFLAGS%g
8519 s%@exec_prefix@%$exec_prefix%g
8520 s%@prefix@%$prefix%g
8521 s%@program_transform_name@%$program_transform_name%g
8522 s%@bindir@%$bindir%g
8523 s%@sbindir@%$sbindir%g
8524 s%@libexecdir@%$libexecdir%g
8525 s%@datadir@%$datadir%g
8526 s%@sysconfdir@%$sysconfdir%g
8527 s%@sharedstatedir@%$sharedstatedir%g
8528 s%@localstatedir@%$localstatedir%g
8529 s%@libdir@%$libdir%g
8530 s%@includedir@%$includedir%g
8531 s%@oldincludedir@%$oldincludedir%g
8532 s%@infodir@%$infodir%g
8533 s%@mandir@%$mandir%g
8534 s%@NCURSES_MAJOR@%$NCURSES_MAJOR%g
8535 s%@NCURSES_MINOR@%$NCURSES_MINOR%g
8536 s%@NCURSES_PATCH@%$NCURSES_PATCH%g
8537 s%@cf_cv_rel_version@%$cf_cv_rel_version%g
8538 s%@cf_cv_abi_version@%$cf_cv_abi_version%g
8539 s%@cf_cv_cc_bool_type@%$cf_cv_cc_bool_type%g
8540 s%@cf_cv_builtin_bool@%$cf_cv_builtin_bool%g
8541 s%@cf_cv_header_stdbool_h@%$cf_cv_header_stdbool_h%g
8542 s%@cf_cv_type_of_bool@%$cf_cv_type_of_bool%g
8544 s%@host_alias@%$host_alias%g
8545 s%@host_cpu@%$host_cpu%g
8546 s%@host_vendor@%$host_vendor%g
8547 s%@host_os@%$host_os%g
8548 s%@target@%$target%g
8549 s%@target_alias@%$target_alias%g
8550 s%@target_cpu@%$target_cpu%g
8551 s%@target_vendor@%$target_vendor%g
8552 s%@target_os@%$target_os%g
8554 s%@build_alias@%$build_alias%g
8555 s%@build_cpu@%$build_cpu%g
8556 s%@build_vendor@%$build_vendor%g
8557 s%@build_os@%$build_os%g
8559 s%@BUILD_CC@%$BUILD_CC%g
8560 s%@BUILD_CFLAGS@%$BUILD_CFLAGS%g
8561 s%@BUILD_LDFLAGS@%$BUILD_LDFLAGS%g
8562 s%@BUILD_LIBS@%$BUILD_LIBS%g
8564 s%@PROG_EXT@%$PROG_EXT%g
8565 s%@LDCONFIG@%$LDCONFIG%g
8568 s%@SET_MAKE@%$SET_MAKE%g
8569 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
8570 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
8571 s%@INSTALL_DATA@%$INSTALL_DATA%g
8573 s%@RANLIB@%$RANLIB%g
8574 s%@MAKE_LOWER_TAGS@%$MAKE_LOWER_TAGS%g
8575 s%@MAKE_UPPER_TAGS@%$MAKE_UPPER_TAGS%g
8578 s%@LINT_OPTS@%$LINT_OPTS%g
8581 s%@AR_OPTS@%$AR_OPTS%g
8582 s%@cf_cv_makeflags@%$cf_cv_makeflags%g
8583 s%@DESTDIR@%$DESTDIR%g
8584 s%@cf_list_models@%$cf_list_models%g
8585 s%@LIBTOOL@%$LIBTOOL%g
8586 s%@DFT_LWR_MODEL@%$DFT_LWR_MODEL%g
8587 s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
8588 s%@TINFO_NAME@%$TINFO_NAME%g
8589 s%@LIB_NAME@%$LIB_NAME%g
8590 s%@LIB_PREFIX@%$LIB_PREFIX%g
8591 s%@LIB_SUFFIX@%$LIB_SUFFIX%g
8592 s%@CC_G_OPT@%$CC_G_OPT%g
8593 s%@CXX_G_OPT@%$CXX_G_OPT%g
8594 s%@LD_MODEL@%$LD_MODEL%g
8595 s%@CC_SHARED_OPTS@%$CC_SHARED_OPTS%g
8596 s%@LD_SHARED_OPTS@%$LD_SHARED_OPTS%g
8597 s%@MK_SHARED_LIB@%$MK_SHARED_LIB%g
8598 s%@LINK_PROGS@%$LINK_PROGS%g
8599 s%@LINK_TESTS@%$LINK_TESTS%g
8600 s%@EXTRA_LDFLAGS@%$EXTRA_LDFLAGS%g
8601 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
8602 s%@LOCAL_LDFLAGS2@%$LOCAL_LDFLAGS2%g
8603 s%@INSTALL_LIB@%$INSTALL_LIB%g
8604 s%@TERMINFO_SRC@%$TERMINFO_SRC%g
8605 s%@PATHSEP@%$PATHSEP%g
8606 s%@FALLBACK_LIST@%$FALLBACK_LIST%g
8607 s%@TERMINFO_DIRS@%$TERMINFO_DIRS%g
8608 s%@TERMINFO@%$TERMINFO%g
8609 s%@MAKE_TERMINFO@%$MAKE_TERMINFO%g
8610 s%@TERMPATH@%$TERMPATH%g
8611 s%@BROKEN_LINKER@%$BROKEN_LINKER%g
8612 s%@NCURSES_BOOL@%$NCURSES_BOOL%g
8613 s%@NCURSES_OSPEED@%$NCURSES_OSPEED%g
8614 s%@MANPAGE_RENAMES@%$MANPAGE_RENAMES%g
8615 s%@NCURSES_EXT_FUNCS@%$NCURSES_EXT_FUNCS%g
8616 s%@NCURSES_CONST@%$NCURSES_CONST%g
8617 s%@NCURSES_XNAMES@%$NCURSES_XNAMES%g
8618 s%@NCURSES_CH_T@%$NCURSES_CH_T%g
8619 s%@NCURSES_LIBUTF8@%$NCURSES_LIBUTF8%g
8620 s%@NCURSES_MBSTATE_T@%$NCURSES_MBSTATE_T%g
8621 s%@TERMINFO_CAPS@%$TERMINFO_CAPS%g
8622 s%@ECHO_LINK@%$ECHO_LINK%g
8623 s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
8624 s%@MATH_LIB@%$MATH_LIB%g
8625 s%@cf_cv_typeof_chtype@%$cf_cv_typeof_chtype%g
8626 s%@cf_cv_1UL@%$cf_cv_1UL%g
8627 s%@HAVE_VSSCANF@%$HAVE_VSSCANF%g
8628 s%@CXXCPP@%$CXXCPP%g
8629 s%@CXXLDFLAGS@%$CXXLDFLAGS%g
8630 s%@CXX_AR@%$CXX_AR%g
8631 s%@CXX_AR_OPTS@%$CXX_AR_OPTS%g
8632 s%@CXXLIBS@%$CXXLIBS%g
8633 s%@gnat_exists@%$gnat_exists%g
8634 s%@M4_exists@%$M4_exists%g
8635 s%@cf_ada_make@%$cf_ada_make%g
8636 s%@cf_ada_compiler@%$cf_ada_compiler%g
8637 s%@cf_ada_package@%$cf_ada_package%g
8638 s%@ADAFLAGS@%$ADAFLAGS%g
8639 s%@cf_compile_generics@%$cf_compile_generics%g
8640 s%@cf_generic_objects@%$cf_generic_objects%g
8641 s%@ADA_INCLUDE@%$ADA_INCLUDE%g
8642 s%@ADA_OBJECTS@%$ADA_OBJECTS%g
8643 s%@ADA_TRACE@%$ADA_TRACE%g
8644 s%@ACPPFLAGS@%$ACPPFLAGS%g
8645 s%@DFT_ARG_SUFFIX@%$DFT_ARG_SUFFIX%g
8646 s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g
8647 s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g
8648 s%@CXX_LIB_SUFFIX@%$CXX_LIB_SUFFIX%g
8649 s%@EXTRA_LIBS@%$EXTRA_LIBS%g
8650 s%@TINFO_LIST@%$TINFO_LIST%g
8651 s%@SHLIB_LIST@%$SHLIB_LIST%g
8652 s%@TEST_DEPS@%$TEST_DEPS%g
8653 s%@TEST_ARGS@%$TEST_ARGS%g
8654 s%@PROG_ARGS@%$PROG_ARGS%g
8655 s%@ADA_SUBDIRS@%$ADA_SUBDIRS%g
8656 s%@DIRS_TO_MAKE@%$DIRS_TO_MAKE%g
8661 cat >> $CONFIG_STATUS <<\EOF
8663 # Split the substitutions into bite-sized pieces for seds with
8664 # small command number limits, like on Digital OSF/1 and HP-UX.
8665 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8666 ac_file=1 # Number of current file.
8667 ac_beg=1 # First line for current file.
8668 ac_end=$ac_max_sed_cmds # Line after last line for current file.
8671 while $ac_more_lines; do
8672 if test $ac_beg -gt 1; then
8673 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8675 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8677 if test ! -s conftest.s$ac_file; then
8679 rm -f conftest.s$ac_file
8681 if test -z "$ac_sed_cmds"; then
8682 ac_sed_cmds="sed -f conftest.s$ac_file"
8684 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8686 ac_file=`expr $ac_file + 1`
8688 ac_end=`expr $ac_end + $ac_max_sed_cmds`
8691 if test -z "$ac_sed_cmds"; then
8696 cat >> $CONFIG_STATUS <<EOF
8698 CONFIG_FILES=\${CONFIG_FILES-"\
8699 include/MKterm.h.awk \
8700 include/curses.head:include/curses.h.in \
8703 misc/run_tic.sh:misc/run_tic.in \
8707 cat >> $CONFIG_STATUS <<\EOF
8708 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8709 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8711 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8712 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8713 *) ac_file_in="${ac_file}.in" ;;
8716 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8718 # Remove last slash and all that follows it. Not all systems have dirname.
8719 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8720 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8721 # The file is in a subdirectory.
8722 test ! -d "$ac_dir" && mkdir "$ac_dir"
8723 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8724 # A "../" for each directory in $ac_dir_suffix.
8725 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8727 ac_dir_suffix= ac_dots=
8730 case "$ac_given_srcdir" in
8732 if test -z "$ac_dots"; then top_srcdir=.
8733 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8734 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8736 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8737 top_srcdir="$ac_dots$ac_given_srcdir" ;;
8740 case "$ac_given_INSTALL" in
8741 [/$]*) INSTALL="$ac_given_INSTALL" ;;
8742 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
8745 echo creating "$ac_file"
8747 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8749 *Makefile*) ac_comsub="1i\\
8750 # $configure_input" ;;
8754 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8756 s%@configure_input@%$configure_input%g
8757 s%@srcdir@%$srcdir%g
8758 s%@top_srcdir@%$top_srcdir%g
8759 s%@INSTALL@%$INSTALL%g
8760 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8764 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8765 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8767 # ac_d sets the value in "#define NAME VALUE" lines.
8768 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
8769 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
8772 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8773 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8774 ac_uB='\([ ]\)%\1#\2define\3'
8777 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8778 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8779 ac_eB='$%\1#\2define\3'
8783 if test "${CONFIG_HEADERS+set}" != set; then
8785 cat >> $CONFIG_STATUS <<EOF
8786 CONFIG_HEADERS="include/ncurses_cfg.h:include/ncurses_cfg.hin"
8788 cat >> $CONFIG_STATUS <<\EOF
8790 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8791 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8793 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8794 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8795 *) ac_file_in="${ac_file}.in" ;;
8798 echo creating $ac_file
8800 rm -f conftest.frag conftest.in conftest.out
8801 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8802 cat $ac_file_inputs > conftest.in
8807 # Transform confdefs.h into a list of #define's. We won't use it as a sed
8808 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
8809 # be either 'cat' or 'sort'.
8810 sort confdefs.h >conftest.vals
8812 # Break up conftest.vals because some shells have a limit on
8813 # the size of here documents, and old seds have small limits too.
8816 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
8819 ac_lines=`grep -c . conftest.vals`
8820 # grep -c gives empty output for an empty file on some AIX systems.
8821 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8822 # Write chunks of a limited-size here document to conftest.frag.
8823 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
8824 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8825 echo 'CEOF' >> $CONFIG_STATUS
8826 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8828 mv conftest.tail conftest.vals
8832 # Run sed to substitute the contents of conftest.frag into conftest.in at the
8834 echo ' cat >> conftest.edit <<CEOF
8835 /@DEFS@/r conftest.frag
8838 sed -f conftest.edit conftest.in > conftest.out
8840 mv conftest.out conftest.in
8841 rm -f conftest.edit conftest.frag
8845 cat >> $CONFIG_STATUS <<\EOF
8846 rm -f conftest.frag conftest.h
8847 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
8848 cat conftest.in >> conftest.h
8850 if cmp -s $ac_file conftest.h 2>/dev/null; then
8851 echo "$ac_file is unchanged"
8854 # Remove last slash and all that follows it. Not all systems have dirname.
8855 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8856 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8857 # The file is in a subdirectory.
8858 test ! -d "$ac_dir" && mkdir "$ac_dir"
8861 mv conftest.h $ac_file
8866 cat >> $CONFIG_STATUS <<EOF
8867 # Extra initialization commands, if any
8869 ### Special initialization commands, used to pass information from the
8870 ### configuration-run into config.status
8873 CF_LIST_MODELS="$cf_list_models"
8874 DFT_LWR_MODEL="$DFT_LWR_MODEL"
8875 LDCONFIG="$LDCONFIG"
8876 LIB_NAME="$LIB_NAME"
8877 LIB_SUBSETS="$LIB_SUBSETS"
8878 LIB_SUFFIX="$LIB_SUFFIX"
8879 LIB_TRACING="$LIB_TRACING"
8880 MAKE_TERMINFO="$MAKE_TERMINFO"
8881 NCURSES_OSPEED="$NCURSES_OSPEED"
8882 SRC_SUBDIRS="$SRC_SUBDIRS"
8883 TERMINFO="$TERMINFO"
8884 TINFO_NAME="$TINFO_NAME"
8885 WITH_CURSES_H="$with_curses_h"
8886 WITH_ECHO="$with_echo"
8887 WITH_OVERWRITE="$with_overwrite"
8888 cf_cv_abi_version="$cf_cv_abi_version"
8889 cf_cv_do_symlinks="$cf_cv_do_symlinks"
8890 cf_cv_rel_version="$cf_cv_rel_version"
8891 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
8892 cf_cv_shlib_version="$cf_cv_shlib_version"
8893 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
8894 cf_cv_system_name="$cf_cv_system_name"
8895 cf_with_cxx_binding="$cf_with_cxx_binding"
8900 cat >> $CONFIG_STATUS <<\EOF
8901 # Extra commands, if any
8905 case $cf_cv_system_name in
8906 OS/2*) LIB_PREFIX='' ;;
8907 os2*) LIB_PREFIX='' ;;
8908 *) LIB_PREFIX='lib' ;;
8910 cf_prefix=$LIB_PREFIX
8914 for cf_dir in $SRC_SUBDIRS
8916 if test -f $srcdir/$cf_dir/modules; then
8921 for cf_item in $CF_LIST_MODELS
8926 libtool) cf_suffix='.la' ;;
8927 normal) cf_suffix='.a' ;;
8928 debug) cf_suffix='_g.a' ;;
8929 profile) cf_suffix='_p.a' ;;
8931 case $cf_cv_system_name in
8932 cygwin*) cf_suffix='.dll' ;;
8933 darwin*) cf_suffix='.dylib' ;;
8934 hpux*) cf_suffix='.sl' ;;
8935 *) cf_suffix='.so' ;;
8938 test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
8940 if test $cf_item = shared ; then
8941 if test "$cf_cv_do_symlinks" = yes ; then
8942 case "$cf_cv_shlib_version" in #(vi
8944 case "$cf_cv_system_name" in #(vi
8945 darwin*) cf_suffix='.$(REL_VERSION)'"$cf_suffix" ;; #(vi
8946 *) cf_suffix="$cf_suffix"'.$(REL_VERSION)' ;;
8950 case "$cf_cv_system_name" in #(vi
8951 darwin*) cf_suffix='.$(ABI_VERSION)'"$cf_suffix" ;; #(vi
8952 *) cf_suffix="$cf_suffix"'.$(ABI_VERSION)' ;;
8957 # cygwin needs import library, and has unique naming convention
8958 if test $cf_cv_shlib_version = cygdll ; then
8959 SHARED_LIB="../lib/${cf_prefix}${cf_dir}\$(ABI_VERSION).dll"
8960 IMPORT_LIB="../lib/${cf_prefix}${cf_dir}.dll.a"
8961 LIBS_TO_MAKE="$LIBS_TO_MAKE \$(SHARED_LIB) \$(IMPORT_LIB)"
8965 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
8968 if test $cf_dir = ncurses ; then
8969 cf_subsets="$LIB_SUBSETS"
8970 case "$LIB_SUBSETS" in #(vi
8974 cf_item=`echo $LIBS_TO_MAKE |sed -e s/$LIB_NAME/$TINFO_NAME/g`
8975 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
8979 cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib //'`
8982 sed -e "s@\@LIBS_TO_MAKE\@@$LIBS_TO_MAKE@" \
8983 -e "s@\@IMPORT_LIB\@@$IMPORT_LIB@" \
8984 -e "s@\@SHARED_LIB\@@$SHARED_LIB@" \
8985 $cf_dir/Makefile >$cf_dir/Makefile.out
8986 mv $cf_dir/Makefile.out $cf_dir/Makefile
8988 $AWK -f $srcdir/mk-0th.awk \
8989 libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
8990 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
8992 for cf_subset in $cf_subsets
8995 for cf_item in $CF_LIST_MODELS
8997 echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
8999 CF_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9004 libtool) cf_suffix='.la' ;;
9005 normal) cf_suffix='.a' ;;
9006 debug) cf_suffix='_g.a' ;;
9007 profile) cf_suffix='_p.a' ;;
9009 case $cf_cv_system_name in
9010 cygwin*) cf_suffix='.dll' ;;
9011 darwin*) cf_suffix='.dylib' ;;
9012 hpux*) cf_suffix='.sl' ;;
9013 *) cf_suffix='.so' ;;
9016 test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
9020 libtool) cf_subdir='obj_lo' ;;
9021 normal) cf_subdir='objects' ;;
9022 debug) cf_subdir='obj_g' ;;
9023 profile) cf_subdir='obj_p' ;;
9025 case $cf_cv_system_name in #(vi
9027 cf_subdir='objects' ;;
9029 cf_subdir='obj_s' ;;
9034 # These dependencies really are for development, not
9035 # builds, but they are useful in porting, too.
9036 cf_depend="../include/ncurses_cfg.h"
9037 if test "$srcdir" = "."; then
9040 cf_reldir="\$(srcdir)"
9043 if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
9044 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
9045 elif test -f $srcdir/$cf_dir/curses.priv.h; then
9046 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
9049 $AWK -f $srcdir/mk-1st.awk \
9051 traces=$LIB_TRACING \
9057 ShlibVer=$cf_cv_shlib_version \
9058 ShlibVerInfix=$cf_cv_shlib_version_infix \
9059 DoLinks=$cf_cv_do_symlinks \
9060 rmSoLocs=$cf_cv_rm_so_locs \
9061 ldconfig="$LDCONFIG" \
9062 overwrite=$WITH_OVERWRITE \
9063 depend="$cf_depend" \
9065 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
9066 for cf_subdir2 in $cf_subdirs lib
9068 test $cf_subdir = $cf_subdir2 && break
9070 test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
9071 $AWK -f $srcdir/mk-2nd.awk \
9073 traces=$LIB_TRACING \
9079 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
9080 cf_subdirs="$cf_subdirs $cf_subdir"
9085 echo ' cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) $@' >>Makefile
9088 for cf_dir in $SRC_SUBDIRS
9090 if test -f $cf_dir/Makefile ; then
9093 echo 'libs \' >> Makefile
9094 echo 'install.libs \' >> Makefile
9095 echo 'uninstall.libs ::' >> Makefile
9096 echo ' cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) $@' >> Makefile
9101 if test -f $srcdir/$cf_dir/modules; then
9103 if test -f $srcdir/$cf_dir/headers; then
9104 cat >> Makefile <<CF_EOF
9106 uninstall.includes \\
9109 if test "$cf_dir" != "c++" ; then
9110 echo 'lint \' >> Makefile
9112 cat >> Makefile <<CF_EOF
9118 uninstall.$cf_dir ::
9119 cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \$@
9121 elif test -f $srcdir/$cf_dir/headers; then
9122 cat >> Makefile <<CF_EOF
9128 uninstall.includes ::
9129 cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \$@
9134 cat >> Makefile <<CF_EOF
9138 $MAKE_TERMINFO cd misc && \$(MAKE) \$(CF_MFLAGS) \$@
9142 cd man && \$(MAKE) \$(CF_MFLAGS) \$@
9145 rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
9146 rm -f headers.sh headers.sed
9147 rm -rf \$(DIRS_TO_MAKE)
9150 # Special case: tack's manpage lives in its own directory.
9151 if test -d tack ; then
9152 if test -f $srcdir/$tack.h; then
9153 cat >> Makefile <<CF_EOF
9157 cd tack && \$(MAKE) \$(CF_MFLAGS) \$@
9163 rm -f headers.sed headers.sh
9165 echo creating headers.sh
9166 cat >headers.sh <<CF_EOF
9168 # This shell script is generated by the 'configure' script. It is invoked in a
9169 # subdirectory of the build tree. It generates a sed-script in the parent
9170 # directory that is used to adjust includes for header files that reside in a
9171 # subdirectory of /usr/include, etc.
9175 PRG="\$PRG \$1"; shift
9180 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
9181 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
9182 echo installing \$SRC in \$DST
9184 if test $WITH_CURSES_H = yes; then
9185 cat >>headers.sh <<CF_EOF
9188 END=\`basename \$DST\`
9189 for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
9191 NAME=\`basename \$i\`
9192 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
9201 cat >>headers.sh <<CF_EOF
9204 END=\`basename \$DST\`
9205 for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
9207 NAME=\`basename \$i\`
9208 if test "\$NAME" = "curses.h"
9210 echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
9213 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
9217 echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
9222 cat >>headers.sh <<CF_EOF
9224 sed -f \$TMPSED \$SRC > \$TMPSRC
9225 NAME=\`basename \$SRC\`
9227 if test $WITH_CURSES_H != yes; then
9228 cat >>headers.sh <<CF_EOF
9229 test "\$NAME" = "curses.h" && NAME=ncurses.h
9232 cat >>headers.sh <<CF_EOF
9233 # Just in case someone gzip'd manpages, remove the conflicting copy.
9234 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
9236 eval \$PRG \$TMPSRC \$DST/\$NAME
9237 rm -f \$TMPSRC \$TMPSED
9240 chmod 0755 headers.sh
9242 for cf_dir in $SRC_SUBDIRS
9244 if test -f $srcdir/$cf_dir/headers; then
9245 cat >>$cf_dir/Makefile <<CF_EOF
9246 \$(DESTDIR)\$(includedir) :
9247 sh \$(srcdir)/../mkinstalldirs \$@
9251 install.includes :: \$(AUTO_SRC) \$(DESTDIR)\$(includedir) \\
9254 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
9256 test -n "$j" && echo " $j \\" >>$cf_dir/Makefile
9259 echo " $j" >>$cf_dir/Makefile
9260 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
9262 echo " @ (cd \$(DESTDIR)\$(includedir) && rm -f `basename $i`) ; ../headers.sh \$(INSTALL_DATA) \$(DESTDIR)\$(includedir) \$(srcdir) $i" >>$cf_dir/Makefile
9263 test $i = curses.h && test $WITH_CURSES_H = yes && echo " @ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h && \$(LN_S) curses.h ncurses.h)" >>$cf_dir/Makefile
9266 cat >>$cf_dir/Makefile <<CF_EOF
9270 uninstall.includes ::
9272 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
9275 echo " -@ (cd \$(DESTDIR)\$(includedir) && rm -f $i)" >>$cf_dir/Makefile
9276 test $i = curses.h && echo " -@ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h)" >>$cf_dir/Makefile
9280 if test -f $srcdir/$cf_dir/modules; then
9281 if test "$cf_dir" != "c++" ; then
9282 cat >>$cf_dir/Makefile <<"CF_EOF"
9283 depend : $(AUTO_SRC)
9284 makedepend -- $(CPPFLAGS) -- $(C_SRC)
9286 # DO NOT DELETE THIS LINE -- make depend depends on it.
9296 chmod +x $CONFIG_STATUS
9297 rm -fr confdefs* $ac_clean_files
9298 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
9299 ${MAKE-make} preinstall