3 # From configure.in Revision: 1.220
7 # Guess values for system-dependent variables and create Makefiles.
8 # Generated automatically using autoconf version 2.13.20000819
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 --without-cxx do not adjust ncurses bool to match C++
193 --without-cxx-binding do not build C++ binding and demo
194 --without-ada suppress check for Ada95, don't build demo
195 --without-progs suppress build with programs (e.g., tic)
196 --without-curses-h install curses.h as ncurses.h only
197 --with-install-prefix prefixes actual install-location
198 Options to Specify the Libraries Built/Used:
199 --with-libtool generate libraries with libtool
200 --with-shared generate shared-libraries
201 --with-normal generate normal-libraries (default)
202 --with-debug generate debug-libraries (default)
205 --with-profile generate profile-libraries
206 --with-termlib generate separate terminfo library
207 --with-dbmalloc test: use Conor Cahill's dbmalloc library
208 --with-dmalloc test: use Gray Watson's dmalloc library
209 --with-gpm use Alessandro Rubini's GPM library
210 --enable-rpath use rpath option when generating shared libraries
211 --with-shlib-version=X Specify rel or abi version for shared libs
212 Fine-Tuning Your Configuration:
213 --disable-overwrite leave out the link to -lcurses
214 --disable-database use only built-in data
215 --with-database=XXX specify terminfo source to install
216 --with-fallbacks=XXX specify list of fallback terminal descriptions
219 --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
220 --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
221 --disable-big-core assume machine has little memory
222 --enable-termcap compile in termcap fallback support
223 --enable-getcap fast termcap load, no xrefs to terminfo
224 --enable-getcap-cache cache translated termcaps in ~/.terminfo
225 --enable-symlinks make tic use symbolic links not hard links
226 --enable-broken_linker compile with broken-linker support code
227 --enable-bsdpad recognize BSD-style prefix padding
228 --with-rcs-ids compile-in RCS identifiers
229 Options to Specify How Manpages are Installed:
230 --with-manpage-format specify manpage-format: gzip/compress/BSDI/normal and
231 optionally formatted, e.g., gzip,formatted
234 --with-manpage-renames specify manpage-renaming
235 --with-manpage-symlinks specify manpage-symlinks
236 --with-manpage-tbl specify manpage processing with tbl
238 --disable-ext-funcs disable function-extensions
239 --enable-const compile with extra/non-standard const
240 --enable-no-padding compile with \$NCURSES_NO_PADDING code
241 --enable-sigwinch compile with SIGWINCH handler
242 --enable-tcap-names compile with user-definable terminal capabilities
244 --with-develop enable all development options
245 --enable-colorfgbg compile with \$COLORFGBG code
248 --enable-hard-tabs compile with hard-tabs code
249 --disable-root-environ limit environment when running as root
250 --enable-xmc-glitch compile with limited support for xmc
252 --disable-assumed-color do not assume anything about default-colors
253 --disable-hashmap compile without hashmap scrolling-optimization
254 --enable-safe-sprintf compile with experimental safe-sprintf code
255 --disable-scroll-hints compile without scroll-hints code
256 --enable-widec compile with experimental wide-char/UTF-8 code
257 Testing/development Options:
258 --enable-echo build: display "compiling" commands (default)
259 --enable-warnings build: turn on GCC compiler warnings
262 --enable-assertions test: turn on generation of assertion code
263 --disable-leaks test: suppress permanent memory-leaks
264 --enable-expanded test: generate functions for certain macros
265 --disable-macros test: use functions rather than macros
266 Ada95 Binding Options:
267 --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
268 --with-ada-include=DIR Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
269 --with-ada-objects=DIR Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
273 -host | --host | --hos | --ho)
275 -host=* | --host=* | --hos=* | --ho=*)
278 -includedir | --includedir | --includedi | --included | --include \
279 | --includ | --inclu | --incl | --inc)
280 ac_prev=includedir ;;
281 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
282 | --includ=* | --inclu=* | --incl=* | --inc=*)
283 includedir="$ac_optarg" ;;
285 -infodir | --infodir | --infodi | --infod | --info | --inf)
287 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
288 infodir="$ac_optarg" ;;
290 -libdir | --libdir | --libdi | --libd)
292 -libdir=* | --libdir=* | --libdi=* | --libd=*)
293 libdir="$ac_optarg" ;;
295 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
296 | --libexe | --libex | --libe)
297 ac_prev=libexecdir ;;
298 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
299 | --libexe=* | --libex=* | --libe=*)
300 libexecdir="$ac_optarg" ;;
302 -localstatedir | --localstatedir | --localstatedi | --localstated \
303 | --localstate | --localstat | --localsta | --localst \
304 | --locals | --local | --loca | --loc | --lo)
305 ac_prev=localstatedir ;;
306 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
307 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
308 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
309 localstatedir="$ac_optarg" ;;
311 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
313 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
314 mandir="$ac_optarg" ;;
317 # Obsolete; use --without-fp.
320 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
324 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
325 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
329 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
330 | --oldin | --oldi | --old | --ol | --o)
331 ac_prev=oldincludedir ;;
332 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
333 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
334 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
335 oldincludedir="$ac_optarg" ;;
337 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
339 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
340 prefix="$ac_optarg" ;;
342 -program-prefix | --program-prefix | --program-prefi | --program-pref \
343 | --program-pre | --program-pr | --program-p)
344 ac_prev=program_prefix ;;
345 -program-prefix=* | --program-prefix=* | --program-prefi=* \
346 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
347 program_prefix="$ac_optarg" ;;
349 -program-suffix | --program-suffix | --program-suffi | --program-suff \
350 | --program-suf | --program-su | --program-s)
351 ac_prev=program_suffix ;;
352 -program-suffix=* | --program-suffix=* | --program-suffi=* \
353 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
354 program_suffix="$ac_optarg" ;;
356 -program-transform-name | --program-transform-name \
357 | --program-transform-nam | --program-transform-na \
358 | --program-transform-n | --program-transform- \
359 | --program-transform | --program-transfor \
360 | --program-transfo | --program-transf \
361 | --program-trans | --program-tran \
362 | --progr-tra | --program-tr | --program-t)
363 ac_prev=program_transform_name ;;
364 -program-transform-name=* | --program-transform-name=* \
365 | --program-transform-nam=* | --program-transform-na=* \
366 | --program-transform-n=* | --program-transform-=* \
367 | --program-transform=* | --program-transfor=* \
368 | --program-transfo=* | --program-transf=* \
369 | --program-trans=* | --program-tran=* \
370 | --progr-tra=* | --program-tr=* | --program-t=*)
371 program_transform_name="$ac_optarg" ;;
373 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
374 | -silent | --silent | --silen | --sile | --sil)
377 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
379 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
381 sbindir="$ac_optarg" ;;
383 -sharedstatedir | --sharedstatedir | --sharedstatedi \
384 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
385 | --sharedst | --shareds | --shared | --share | --shar \
387 ac_prev=sharedstatedir ;;
388 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
389 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
390 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
392 sharedstatedir="$ac_optarg" ;;
394 -site | --site | --sit)
396 -site=* | --site=* | --sit=*)
399 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
401 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
402 srcdir="$ac_optarg" ;;
404 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
405 | --syscon | --sysco | --sysc | --sys | --sy)
406 ac_prev=sysconfdir ;;
407 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
408 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
409 sysconfdir="$ac_optarg" ;;
411 -target | --target | --targe | --targ | --tar | --ta | --t)
413 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
414 target="$ac_optarg" ;;
416 -v | -verbose | --verbose | --verbos | --verbo | --verb)
419 -version | --version | --versio | --versi | --vers)
420 echo "configure generated by autoconf version 2.13.20000819"
424 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
425 # Reject names that are not valid shell variable names.
426 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
427 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
429 ac_package=`echo $ac_package| sed 's/-/_/g'`
434 eval "with_${ac_package}='$ac_optarg'" ;;
436 -without-* | --without-*)
437 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
438 # Reject names that are not valid shell variable names.
439 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
440 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
442 ac_package=`echo $ac_package| sed 's/-/_/g'`
443 eval "with_${ac_package}=no" ;;
446 # Obsolete; use --with-x.
449 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
450 | --x-incl | --x-inc | --x-in | --x-i)
451 ac_prev=x_includes ;;
452 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
453 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
454 x_includes="$ac_optarg" ;;
456 -x-libraries | --x-libraries | --x-librarie | --x-librari \
457 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
458 ac_prev=x_libraries ;;
459 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
460 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
461 x_libraries="$ac_optarg" ;;
463 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
467 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
468 echo "configure: warning: $ac_option: invalid host type" 1>&2
470 if test "x$nonopt" != xNONE; then
471 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
479 if test -n "$ac_prev"; then
480 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
483 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
485 # File descriptor usage:
488 # 2 errors and warnings
489 # 3 some systems may open it to /dev/tty
490 # 4 used on the Kubota Titan
491 # 6 checking for... messages and results
492 # 5 compiler messages saved in config.log
493 if test "$silent" = yes; then
501 This file contains any messages produced by compilers while
502 running configure, to aid debugging if configure makes a mistake.
505 # Strip out --no-create and --no-recursion so they do not pile up.
506 # Also quote any args containing shell metacharacters.
511 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
512 | --no-cr | --no-c) ;;
513 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
514 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
515 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
516 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
517 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
522 # Only set these to C if already set. These must not be set unconditionally
523 # because not all systems understand e.g. LANG=C (notably SCO).
524 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
525 # Non-C LC_CTYPE values break the ctype check.
526 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
527 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
528 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
529 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
531 # confdefs.h avoids OS command line length limits that DEFS can exceed.
532 rm -rf conftest* confdefs.h
533 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
536 # A filename unique to this package, relative to the directory that
537 # configure is in, which we can look for to find out if srcdir is correct.
538 ac_unique_file=ncurses/base/lib_initscr.c
540 # Find the source files, if location was not specified.
541 if test -z "$srcdir"; then
542 ac_srcdir_defaulted=yes
543 # Try the directory containing this script, then its parent.
545 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
546 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548 if test ! -r $srcdir/$ac_unique_file; then
552 ac_srcdir_defaulted=no
554 if test ! -r $srcdir/$ac_unique_file; then
555 if test "$ac_srcdir_defaulted" = yes; then
556 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
558 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
561 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
563 # Prefer explicitly selected file to automatically selected ones.
564 if test -z "$CONFIG_SITE"; then
565 if test "x$prefix" != xNONE; then
566 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
568 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
571 for ac_site_file in $CONFIG_SITE; do
572 if test -r "$ac_site_file"; then
573 echo "loading site script $ac_site_file"
578 if test -r "$cache_file"; then
579 echo "loading cache $cache_file"
582 echo "creating cache $cache_file"
587 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
588 ac_cpp='$CPP $CPPFLAGS'
589 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
590 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
591 cross_compiling=$ac_cv_prog_cc_cross
595 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
596 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
597 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
604 ac_n= ac_c='\c' ac_t=
611 NCURSES_MAJOR="`egrep '^NCURSES_MAJOR[ ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
612 NCURSES_MINOR="`egrep '^NCURSES_MINOR[ ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
613 NCURSES_PATCH="`egrep '^NCURSES_PATCH[ ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
614 cf_cv_abi_version=${NCURSES_MAJOR}
615 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
616 echo "$ac_t""Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version (`date`)" 1>&6
626 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
627 if test -f $ac_dir/install-sh; then
629 ac_install_sh="$ac_aux_dir/install-sh -c"
631 elif test -f $ac_dir/install.sh; then
633 ac_install_sh="$ac_aux_dir/install.sh -c"
637 if test -z "$ac_aux_dir"; then
638 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
640 ac_config_guess=$ac_aux_dir/config.guess
641 ac_config_sub=$ac_aux_dir/config.sub
642 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
645 if test -f $srcdir/config.guess ; then
647 # Do some error checking and defaulting for the host and target type.
649 # configure --host=HOST --target=TARGET --build=BUILD NONOPT
652 # 1. You are not allowed to specify --host, --target, and nonopt at the
654 # 2. Host defaults to nonopt.
655 # 3. If nonopt is not specified, then host defaults to the current host,
656 # as determined by config.guess.
657 # 4. Target and build default to nonopt.
658 # 5. If nonopt is not specified, then target and build default to host.
660 # The aliases save the names the user supplied, while $host etc.
661 # will get canonicalized.
662 case $host---$target---$nonopt in
663 NONE---*---* | *---NONE---* | *---*---NONE) ;;
664 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
668 # Make sure we can run config.sub.
669 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
670 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
673 echo $ac_n "checking host system type""... $ac_c" 1>&6
674 echo "configure:675: checking host system type" >&5
677 case "$host_alias" in
681 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
682 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
684 *) host_alias=$nonopt ;;
688 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
689 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
690 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
691 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
692 echo "$ac_t""$host" 1>&6
694 echo $ac_n "checking target system type""... $ac_c" 1>&6
695 echo "configure:696: checking target system type" >&5
698 case "$target_alias" in
701 NONE) target_alias=$host_alias ;;
702 *) target_alias=$nonopt ;;
706 target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
707 target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
708 target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
709 target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
710 echo "$ac_t""$target" 1>&6
712 echo $ac_n "checking build system type""... $ac_c" 1>&6
713 echo "configure:714: checking build system type" >&5
716 case "$build_alias" in
719 NONE) build_alias=$host_alias ;;
720 *) build_alias=$nonopt ;;
724 build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
725 build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
726 build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
727 build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
728 echo "$ac_t""$build" 1>&6
730 test "$host_alias" != "$target_alias" &&
731 test "$program_prefix$program_suffix$program_transform_name" = \
733 program_prefix=${target_alias}-
735 system_name="$host_os"
737 system_name="`(uname -s -r) 2>/dev/null`"
738 if test -z "$system_name" ; then
739 system_name="`(hostname) 2>/dev/null`"
742 test -n "$system_name" && cat >> confdefs.h <<EOF
743 #define SYSTEM_NAME "$system_name"
746 if eval "test \"`echo '$''{'cf_cv_system_name'+set}'`\" = set"; then
747 echo $ac_n "(cached) $ac_c" 1>&6
749 cf_cv_system_name="$system_name"
753 test -z "$system_name" && system_name="$cf_cv_system_name"
754 test -n "$cf_cv_system_name" && echo "$ac_t"""Configuring for $cf_cv_system_name"" 1>&6
756 if test ".$system_name" != ".$cf_cv_system_name" ; then
757 echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6
758 { echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; }
762 # Check whether --with-system-type or --without-system-type was given.
763 if test "${with_system_type+set}" = set; then
764 withval="$with_system_type"
765 echo "configure: warning: overriding system type to $withval" 1>&2
766 cf_cv_system_name=$withval
770 # We need a configure script only when compiling as part of GNU C library.
771 # Here we have to generate one of the files we need while compiling.
773 # The only problem is that users of the package might think they have to
774 # run configure themself and find it irritating when nothing happens.
776 # So we try here to find out whether we are called from the glibc configure
780 # Check whether --enable-add-ons or --disable-add-ons was given.
781 if test "${enable_add_ons+set}" = set; then
782 enableval="$enable_add_ons"
789 if test x"$glibc_add_on" = "xyes" ; then
792 rm -f $srcdir/Makefile
793 cp $srcdir/Makefile.glibc $srcdir/Makefile
794 echo "ncurses `grep \"^[ ]*ncurses-version[ ]*=.*$\" \
795 $srcdir/Makefile | sed -e \
796 's/^[ ]*ncurses-version[ ]*=[ ]*\([^ ^ ]*\)[ ]*$/\1/'`" > $srcdir/Banner
800 ### Save the given $CFLAGS to allow user-override.
801 cf_user_CFLAGS="$CFLAGS"
803 ### Default install-location
805 echo $ac_n "checking for prefix""... $ac_c" 1>&6
806 echo "configure:807: checking for prefix" >&5
807 if test "x$prefix" = "xNONE" ; then
808 case "$cf_cv_system_name" in
809 # non-vendor systems don't have a conflict
810 openbsd*|netbsd*|freebsd*|linux*)
813 *) prefix=$ac_default_prefix
817 echo "$ac_t""$prefix" 1>&6
819 if test "x$prefix" = "xNONE" ; then
820 echo $ac_n "checking for default include-directory""... $ac_c" 1>&6
821 echo "configure:822: checking for default include-directory" >&5
822 test -n "$verbose" && echo 1>&6
825 $includedir/ncurses \
827 $prefix/include/ncurses \
829 /usr/local/include/ncurses \
833 cf_dir=`eval echo $cf_symbol`
834 if test -f $cf_dir/curses.h ; then
835 if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
836 includedir="$cf_symbol"
837 test -n "$verbose" && echo $ac_n " found " 1>&6
841 test -n "$verbose" && echo " tested $cf_dir" 1>&6
843 echo "$ac_t""$includedir" 1>&6
847 ### Checks for programs.
848 # Extract the first word of "gcc", so it can be a program name with args.
849 set dummy gcc; ac_word=$2
850 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
851 echo "configure:852: checking for $ac_word" >&5
852 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
853 echo $ac_n "(cached) $ac_c" 1>&6
855 if test -n "$CC"; then
856 ac_cv_prog_CC="$CC" # Let the user override the test.
858 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
860 for ac_dir in $ac_dummy; do
861 test -z "$ac_dir" && ac_dir=.
862 if test -f $ac_dir/$ac_word; then
871 if test -n "$CC"; then
872 echo "$ac_t""$CC" 1>&6
874 echo "$ac_t""no" 1>&6
877 if test -z "$CC"; then
878 # Extract the first word of "cc", so it can be a program name with args.
879 set dummy cc; ac_word=$2
880 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
881 echo "configure:882: checking for $ac_word" >&5
882 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
883 echo $ac_n "(cached) $ac_c" 1>&6
885 if test -n "$CC"; then
886 ac_cv_prog_CC="$CC" # Let the user override the test.
888 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
891 for ac_dir in $ac_dummy; do
892 test -z "$ac_dir" && ac_dir=.
893 if test -f $ac_dir/$ac_word; then
894 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
903 if test $ac_prog_rejected = yes; then
904 # We found a bogon in the path, so make sure we never use it.
905 set dummy $ac_cv_prog_CC
907 if test $# -gt 0; then
908 # We chose a different compiler from the bogus one.
909 # However, it has the same basename, so the bogon will be chosen
910 # first if we set CC to just the basename; use the full file name.
912 set dummy "$ac_dir/$ac_word" "$@"
920 if test -n "$CC"; then
921 echo "$ac_t""$CC" 1>&6
923 echo "$ac_t""no" 1>&6
926 if test -z "$CC"; then
929 # Extract the first word of "cl", so it can be a program name with args.
930 set dummy cl; ac_word=$2
931 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
932 echo "configure:933: checking for $ac_word" >&5
933 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
934 echo $ac_n "(cached) $ac_c" 1>&6
936 if test -n "$CC"; then
937 ac_cv_prog_CC="$CC" # Let the user override the test.
939 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
941 for ac_dir in $ac_dummy; do
942 test -z "$ac_dir" && ac_dir=.
943 if test -f $ac_dir/$ac_word; then
952 if test -n "$CC"; then
953 echo "$ac_t""$CC" 1>&6
955 echo "$ac_t""no" 1>&6
960 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
963 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
964 echo "configure:965: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
967 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
968 ac_cpp='$CPP $CPPFLAGS'
969 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
970 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
971 cross_compiling=$ac_cv_prog_cc_cross
973 cat > conftest.$ac_ext << EOF
975 #line 976 "configure"
976 #include "confdefs.h"
980 if { (eval echo configure:981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
981 ac_cv_prog_cc_works=yes
982 # If we can't run a trivial program, we are probably using a cross compiler.
983 if (./conftest; exit) 2>/dev/null; then
984 ac_cv_prog_cc_cross=no
986 ac_cv_prog_cc_cross=yes
989 echo "configure: failed program was:" >&5
990 cat conftest.$ac_ext >&5
991 ac_cv_prog_cc_works=no
995 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
996 ac_cpp='$CPP $CPPFLAGS'
997 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
998 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
999 cross_compiling=$ac_cv_prog_cc_cross
1001 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1002 if test $ac_cv_prog_cc_works = no; then
1003 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1005 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1006 echo "configure:1007: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1007 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1008 cross_compiling=$ac_cv_prog_cc_cross
1010 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1011 echo "configure:1012: checking whether we are using GNU C" >&5
1012 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1013 echo $ac_n "(cached) $ac_c" 1>&6
1015 cat > conftest.c <<EOF
1020 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1027 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1029 if test $ac_cv_prog_gcc = yes; then
1035 ac_test_CFLAGS="${CFLAGS+set}"
1036 ac_save_CFLAGS="$CFLAGS"
1038 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1039 echo "configure:1040: checking whether ${CC-cc} accepts -g" >&5
1040 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1041 echo $ac_n "(cached) $ac_c" 1>&6
1043 echo 'void f(){}' > conftest.c
1044 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1053 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1054 if test "$ac_test_CFLAGS" = set; then
1055 CFLAGS="$ac_save_CFLAGS"
1056 elif test $ac_cv_prog_cc_g = yes; then
1057 if test "$GCC" = yes; then
1063 if test "$GCC" = yes; then
1070 if test "$GCC" = yes ; then
1071 echo $ac_n "checking version of gcc""... $ac_c" 1>&6
1072 echo "configure:1073: checking version of gcc" >&5
1073 eval "$CC --version"
1075 if test "$host" != $build; then
1076 for ac_prog in $CC gcc cc
1078 # Extract the first word of "$ac_prog", so it can be a program name with args.
1079 set dummy $ac_prog; ac_word=$2
1080 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1081 echo "configure:1082: checking for $ac_word" >&5
1082 if eval "test \"`echo '$''{'ac_cv_prog_BUILD_CC'+set}'`\" = set"; then
1083 echo $ac_n "(cached) $ac_c" 1>&6
1085 if test -n "$BUILD_CC"; then
1086 ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
1088 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1090 for ac_dir in $ac_dummy; do
1091 test -z "$ac_dir" && ac_dir=.
1092 if test -f $ac_dir/$ac_word; then
1093 ac_cv_prog_BUILD_CC="$ac_prog"
1100 BUILD_CC="$ac_cv_prog_BUILD_CC"
1101 if test -n "$BUILD_CC"; then
1102 echo "$ac_t""$BUILD_CC" 1>&6
1104 echo "$ac_t""no" 1>&6
1107 test -n "$BUILD_CC" && break
1114 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1115 echo "configure:1116: checking how to run the C preprocessor" >&5
1116 # On Suns, sometimes $CPP names a directory.
1117 if test -n "$CPP" && test -d "$CPP"; then
1120 if test -z "$CPP"; then
1121 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1122 echo $ac_n "(cached) $ac_c" 1>&6
1124 # This must be in double quotes, not single quotes, because CPP may get
1125 # substituted into the Makefile and "${CC-cc}" will confuse make.
1127 # On the NeXT, cc -E runs the code through the compiler's parser,
1128 # not just through cpp.
1129 cat > conftest.$ac_ext <<EOF
1130 #line 1131 "configure"
1131 #include "confdefs.h"
1135 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1136 { (eval echo configure:1137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1137 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1138 if test -z "$ac_err"; then
1142 echo "configure: failed program was:" >&5
1143 cat conftest.$ac_ext >&5
1145 CPP="${CC-cc} -E -traditional-cpp"
1146 cat > conftest.$ac_ext <<EOF
1147 #line 1148 "configure"
1148 #include "confdefs.h"
1152 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1153 { (eval echo configure:1154: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1154 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1155 if test -z "$ac_err"; then
1159 echo "configure: failed program was:" >&5
1160 cat conftest.$ac_ext >&5
1162 CPP="${CC-cc} -nologo -E"
1163 cat > conftest.$ac_ext <<EOF
1164 #line 1165 "configure"
1165 #include "confdefs.h"
1169 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1170 { (eval echo configure:1171: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1171 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1172 if test -z "$ac_err"; then
1176 echo "configure: failed program was:" >&5
1177 cat conftest.$ac_ext >&5
1186 ac_cv_prog_CPP="$CPP"
1188 CPP="$ac_cv_prog_CPP"
1190 ac_cv_prog_CPP="$CPP"
1192 echo "$ac_t""$CPP" 1>&6
1194 if test $ac_cv_prog_gcc = yes; then
1195 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
1196 echo "configure:1197: checking whether ${CC-cc} needs -traditional" >&5
1197 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
1198 echo $ac_n "(cached) $ac_c" 1>&6
1200 ac_pattern="Autoconf.*'x'"
1201 cat > conftest.$ac_ext <<EOF
1202 #line 1203 "configure"
1203 #include "confdefs.h"
1207 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1208 egrep "$ac_pattern" >/dev/null 2>&1; then
1210 ac_cv_prog_gcc_traditional=yes
1213 ac_cv_prog_gcc_traditional=no
1218 if test $ac_cv_prog_gcc_traditional = no; then
1219 cat > conftest.$ac_ext <<EOF
1220 #line 1221 "configure"
1221 #include "confdefs.h"
1225 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1226 egrep "$ac_pattern" >/dev/null 2>&1; then
1228 ac_cv_prog_gcc_traditional=yes
1235 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1236 if test $ac_cv_prog_gcc_traditional = yes; then
1237 CC="$CC -traditional"
1241 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1242 echo "configure:1243: checking for POSIXized ISC" >&5
1243 if test -d /etc/conf/kconfig.d &&
1244 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1246 echo "$ac_t""yes" 1>&6
1247 ISC=yes # If later tests want to check for ISC.
1248 cat >> confdefs.h <<\EOF
1249 #define _POSIX_SOURCE 1
1252 if test "$GCC" = yes; then
1258 echo "$ac_t""no" 1>&6
1263 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1264 echo "configure:1265: checking for ${CC-cc} option to accept ANSI C" >&5
1265 if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
1266 echo $ac_n "(cached) $ac_c" 1>&6
1270 cf_save_CFLAGS="$CFLAGS"
1271 # Don't try gcc -ansi; that turns off useful extensions and
1272 # breaks some systems' header files.
1273 # AIX -qlanglvl=ansi
1274 # Ultrix and OSF/1 -std1
1275 # HP-UX -Aa -D_HPUX_SOURCE
1277 # UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
1278 for cf_arg in "-DCC_HAS_PROTOS" \
1283 "-Aa -D_HPUX_SOURCE" \
1286 CFLAGS="$cf_save_CFLAGS $cf_arg"
1287 cat > conftest.$ac_ext <<EOF
1288 #line 1289 "configure"
1289 #include "confdefs.h"
1291 #ifndef CC_HAS_PROTOS
1292 #if !defined(__STDC__) || (__STDC__ != 1)
1299 int test (int i, double x);
1300 struct s1 {int (*f) (int a);};
1301 struct s2 {int (*f) (double a);};
1304 if { (eval echo configure:1305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1306 cf_cv_ansi_cc="$cf_arg"; break
1308 echo "configure: failed program was:" >&5
1309 cat conftest.$ac_ext >&5
1313 CFLAGS="$cf_save_CFLAGS"
1317 echo "$ac_t""$cf_cv_ansi_cc" 1>&6
1319 if test "$cf_cv_ansi_cc" != "no"; then
1320 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
1321 CFLAGS="$CFLAGS $cf_cv_ansi_cc"
1323 cat >> confdefs.h <<\EOF
1324 #define CC_HAS_PROTOS 1
1331 if test "$cf_cv_ansi_cc" = "no"; then
1332 { echo "configure: error: Your compiler does not appear to recognize prototypes.
1333 You have the following choices:
1334 a. adjust your compiler options
1335 b. get an up-to-date compiler
1336 c. use a wrapper such as unproto" 1>&2; exit 1; }
1342 case $cf_cv_system_name in
1344 # We make sure -Zexe is not used -- it would interfere with @PROG_EXT@
1345 CFLAGS="$CFLAGS -Zmt -D__ST_MT_ERRNO__"
1346 CXXFLAGS="$CXXFLAGS -Zmt -D__ST_MT_ERRNO__"
1347 LDFLAGS=`echo "$LDFLAGS -Zmt -Zcrtdll" | sed "s/-Zexe//g"`
1357 case "$cf_cv_system_name" in
1359 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
1361 *) LDPATH=$PATH:/sbin:/usr/sbin
1362 # Extract the first word of "ldconfig", so it can be a program name with args.
1363 set dummy ldconfig; ac_word=$2
1364 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1365 echo "configure:1366: checking for $ac_word" >&5
1366 if eval "test \"`echo '$''{'ac_cv_path_LDCONFIG'+set}'`\" = set"; then
1367 echo $ac_n "(cached) $ac_c" 1>&6
1371 ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
1374 ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a dos path.
1377 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1379 for ac_dir in $ac_dummy; do
1380 test -z "$ac_dir" && ac_dir=.
1381 if test -f $ac_dir/$ac_word; then
1382 ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
1390 LDCONFIG="$ac_cv_path_LDCONFIG"
1391 if test -n "$LDCONFIG"; then
1392 echo "$ac_t""$LDCONFIG" 1>&6
1394 echo "$ac_t""no" 1>&6
1401 echo $ac_n "checking if you want to ensure bool is consistent with C++""... $ac_c" 1>&6
1402 echo "configure:1403: checking if you want to ensure bool is consistent with C++" >&5
1404 # Check whether --with-cxx or --without-cxx was given.
1405 if test "${with_cxx+set}" = set; then
1407 cf_with_cxx=$withval
1412 echo "$ac_t""$cf_with_cxx" 1>&6
1413 if test "X$cf_with_cxx" = Xno ; then
1417 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1419 # Extract the first word of "$ac_prog", so it can be a program name with args.
1420 set dummy $ac_prog; ac_word=$2
1421 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1422 echo "configure:1423: checking for $ac_word" >&5
1423 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1424 echo $ac_n "(cached) $ac_c" 1>&6
1426 if test -n "$CXX"; then
1427 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1429 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1431 for ac_dir in $ac_dummy; do
1432 test -z "$ac_dir" && ac_dir=.
1433 if test -f $ac_dir/$ac_word; then
1434 ac_cv_prog_CXX="$ac_prog"
1441 CXX="$ac_cv_prog_CXX"
1442 if test -n "$CXX"; then
1443 echo "$ac_t""$CXX" 1>&6
1445 echo "$ac_t""no" 1>&6
1448 test -n "$CXX" && break
1450 test -n "$CXX" || CXX="gcc"
1453 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1454 echo "configure:1455: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1457 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1458 ac_cpp='$CXXCPP $CPPFLAGS'
1459 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1460 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1461 cross_compiling=$ac_cv_prog_cxx_cross
1463 cat > conftest.$ac_ext << EOF
1465 #line 1466 "configure"
1466 #include "confdefs.h"
1468 int main(){return(0);}
1470 if { (eval echo configure:1471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1471 ac_cv_prog_cxx_works=yes
1472 # If we can't run a trivial program, we are probably using a cross compiler.
1473 if (./conftest; exit) 2>/dev/null; then
1474 ac_cv_prog_cxx_cross=no
1476 ac_cv_prog_cxx_cross=yes
1479 echo "configure: failed program was:" >&5
1480 cat conftest.$ac_ext >&5
1481 ac_cv_prog_cxx_works=no
1485 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1486 ac_cpp='$CPP $CPPFLAGS'
1487 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1488 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1489 cross_compiling=$ac_cv_prog_cc_cross
1491 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1492 if test $ac_cv_prog_cxx_works = no; then
1493 echo "$ac_t""You don't have any C++ compiler, too bad" 1>&6; cf_with_cxx=no; CXX=""; GXX="";
1495 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1496 echo "configure:1497: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1497 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1498 cross_compiling=$ac_cv_prog_cxx_cross
1500 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1501 echo "configure:1502: checking whether we are using GNU C++" >&5
1502 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1503 echo $ac_n "(cached) $ac_c" 1>&6
1505 cat > conftest.C <<EOF
1510 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1517 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1519 if test $ac_cv_prog_gxx = yes; then
1525 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1526 ac_save_CXXFLAGS="$CXXFLAGS"
1528 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1529 echo "configure:1530: checking whether ${CXX-g++} accepts -g" >&5
1530 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1531 echo $ac_n "(cached) $ac_c" 1>&6
1533 echo 'void f(){}' > conftest.cc
1534 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1535 ac_cv_prog_cxx_g=yes
1543 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1544 if test "$ac_test_CXXFLAGS" = set; then
1545 CXXFLAGS="$ac_save_CXXFLAGS"
1546 elif test $ac_cv_prog_cxx_g = yes; then
1547 if test "$GXX" = yes; then
1553 if test "$GXX" = yes; then
1562 if test "$GXX" = yes; then
1563 case "`${CXX-g++} --version`" in
1565 GXX=""; CXX=""; ac_cv_prog_gxx=no
1567 echo No: templates do not work
1572 echo $ac_n "checking if you want to build C++ binding and demo""... $ac_c" 1>&6
1573 echo "configure:1574: checking if you want to build C++ binding and demo" >&5
1575 # Check whether --with-cxx-binding or --without-cxx-binding was given.
1576 if test "${with_cxx_binding+set}" = set; then
1577 withval="$with_cxx_binding"
1578 cf_with_cxx_binding=$withval
1580 cf_with_cxx_binding=$cf_with_cxx
1583 echo "$ac_t""$cf_with_cxx_binding" 1>&6
1585 echo $ac_n "checking if you want to build with Ada95""... $ac_c" 1>&6
1586 echo "configure:1587: checking if you want to build with Ada95" >&5
1588 # Check whether --with-ada or --without-ada was given.
1589 if test "${with_ada+set}" = set; then
1591 cf_with_ada=$withval
1596 echo "$ac_t""$cf_with_ada" 1>&6
1598 echo $ac_n "checking if you want to build programs such as tic""... $ac_c" 1>&6
1599 echo "configure:1600: checking if you want to build programs such as tic" >&5
1601 # Check whether --with-progs or --without-progs was given.
1602 if test "${with_progs+set}" = set; then
1603 withval="$with_progs"
1604 cf_with_progs=$withval
1609 echo "$ac_t""$cf_with_progs" 1>&6
1611 echo $ac_n "checking if you wish to install curses.h""... $ac_c" 1>&6
1612 echo "configure:1613: checking if you wish to install curses.h" >&5
1614 # Check whether --with-curses-h or --without-curses-h was given.
1615 if test "${with_curses_h+set}" = set; then
1616 withval="$with_curses_h"
1617 with_curses_h=$withval
1622 echo "$ac_t""$with_curses_h" 1>&6
1624 modules_to_build="ncurses"
1625 if test "X$cf_with_progs" != Xno ; then
1626 modules_to_build="$modules_to_build progs tack"
1628 modules_to_build="$modules_to_build panel menu form"
1630 if test "$program_transform_name" = s,x,x,; then
1631 program_transform_name=
1633 # Double any \ or $. echo might interpret backslashes.
1634 cat <<\EOF_SED > conftestsed
1635 s,\\,\\\\,g; s,\$,$$,g
1637 program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1640 test "$program_prefix" != NONE &&
1641 program_transform_name="s,^,${program_prefix},; $program_transform_name"
1642 # Use a double $ so make ignores it.
1643 test "$program_suffix" != NONE &&
1644 program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
1646 # sed with no file args requires a program.
1647 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1649 for ac_prog in mawk gawk nawk awk
1651 # Extract the first word of "$ac_prog", so it can be a program name with args.
1652 set dummy $ac_prog; ac_word=$2
1653 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1654 echo "configure:1655: checking for $ac_word" >&5
1655 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1656 echo $ac_n "(cached) $ac_c" 1>&6
1658 if test -n "$AWK"; then
1659 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1661 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1663 for ac_dir in $ac_dummy; do
1664 test -z "$ac_dir" && ac_dir=.
1665 if test -f $ac_dir/$ac_word; then
1666 ac_cv_prog_AWK="$ac_prog"
1673 AWK="$ac_cv_prog_AWK"
1674 if test -n "$AWK"; then
1675 echo "$ac_t""$AWK" 1>&6
1677 echo "$ac_t""no" 1>&6
1680 test -n "$AWK" && break
1683 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1684 echo "configure:1685: checking whether ${MAKE-make} sets \${MAKE}" >&5
1685 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1686 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1687 echo $ac_n "(cached) $ac_c" 1>&6
1689 cat > conftestmake <<\EOF
1691 @echo 'ac_maketemp="${MAKE}"'
1693 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1694 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1695 if test -n "$ac_maketemp"; then
1696 eval ac_cv_prog_make_${ac_make}_set=yes
1698 eval ac_cv_prog_make_${ac_make}_set=no
1702 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1703 echo "$ac_t""yes" 1>&6
1706 echo "$ac_t""no" 1>&6
1707 SET_MAKE="MAKE=${MAKE-make}"
1710 # Find a good install program. We prefer a C program (faster),
1711 # so one script is as good as another. But avoid the broken or
1712 # incompatible versions:
1713 # SysV /etc/install, /usr/sbin/install
1714 # SunOS /usr/etc/install
1715 # IRIX /sbin/install
1717 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1718 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1719 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1720 # ./install, which can be erroneously created by make from ./install.sh.
1721 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1722 echo "configure:1723: checking for a BSD compatible install" >&5
1723 if test -z "$INSTALL"; then
1724 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1725 echo $ac_n "(cached) $ac_c" 1>&6
1727 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
1728 for ac_dir in $PATH; do
1729 # Account for people who put trailing slashes in PATH elements.
1731 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1733 # OSF1 and SCO ODT 3.0 have their own names for install.
1734 # Don't use installbsd from OSF since it installs stuff as root
1736 for ac_prog in ginstall scoinst install; do
1737 if test -f $ac_dir/$ac_prog; then
1738 if test $ac_prog = install &&
1739 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1740 # AIX install. It has an incompatible calling convention.
1743 ac_cv_path_install="$ac_dir/$ac_prog -c"
1754 if test "${ac_cv_path_install+set}" = set; then
1755 INSTALL="$ac_cv_path_install"
1757 # As a last resort, use the slow shell script. We don't cache a
1758 # path for INSTALL within a source directory, because that will
1759 # break other packages using the cache if that directory is
1760 # removed, or if the path is relative.
1761 INSTALL="$ac_install_sh"
1764 echo "$ac_t""$INSTALL" 1>&6
1766 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1767 # It thinks the first close brace ends the variable substitution.
1768 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1770 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1772 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1778 cf_dir=`echo $INSTALL|sed -e 's%/[^/]*$%%'`
1779 test -z "$cf_dir" && cf_dir=.
1780 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's:^.*/::'`
1784 echo $ac_n "checking for long file names""... $ac_c" 1>&6
1785 echo "configure:1786: checking for long file names" >&5
1786 if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
1787 echo $ac_n "(cached) $ac_c" 1>&6
1789 ac_cv_sys_long_file_names=yes
1790 # Test for long file names in all the places we know might matter:
1791 # . the current directory, where building will happen
1792 # $prefix/lib where we will be installing things
1793 # $exec_prefix/lib likewise
1794 # eval it to expand exec_prefix.
1795 # $TMPDIR if set, where it might want to write temporary files
1796 # if $TMPDIR is not set:
1797 # /tmp where it might want to write temporary files
1800 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
1801 ac_tmpdirs="$TMPDIR"
1803 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
1805 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
1806 test -d $ac_dir || continue
1807 test -w $ac_dir || continue # It is less confusing to not echo anything here.
1808 (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
1809 (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
1810 val=`cat $ac_dir/conftest9012345 2>/dev/null`
1811 if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
1812 ac_cv_sys_long_file_names=no
1813 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
1816 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
1820 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
1821 if test $ac_cv_sys_long_file_names = yes; then
1822 cat >> confdefs.h <<\EOF
1823 #define HAVE_LONG_FILE_NAMES 1
1829 echo $ac_n "checking if filesystem supports mixed-case filenames""... $ac_c" 1>&6
1830 echo "configure:1831: checking if filesystem supports mixed-case filenames" >&5
1831 if eval "test \"`echo '$''{'cf_cv_mixedcase'+set}'`\" = set"; then
1832 echo $ac_n "(cached) $ac_c" 1>&6
1835 rm -f conftest CONFTEST
1837 if test -f CONFTEST ; then
1842 rm -f conftest CONFTEST
1846 echo "$ac_t""$cf_cv_mixedcase" 1>&6
1847 test "$cf_cv_mixedcase" = yes && cat >> confdefs.h <<\EOF
1848 #define MIXEDCASE_FILENAMES 1
1852 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1853 echo "configure:1854: checking whether ln -s works" >&5
1854 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1855 echo $ac_n "(cached) $ac_c" 1>&6
1858 if ln -s X conftestdata 2>/dev/null
1861 ac_cv_prog_LN_S="ln -s"
1866 LN_S="$ac_cv_prog_LN_S"
1867 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1868 echo "$ac_t""yes" 1>&6
1870 echo "$ac_t""no" 1>&6
1873 # Extract the first word of "ranlib", so it can be a program name with args.
1874 set dummy ranlib; ac_word=$2
1875 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1876 echo "configure:1877: checking for $ac_word" >&5
1877 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1878 echo $ac_n "(cached) $ac_c" 1>&6
1880 if test -n "$RANLIB"; then
1881 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1883 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1885 for ac_dir in $ac_dummy; do
1886 test -z "$ac_dir" && ac_dir=.
1887 if test -f $ac_dir/$ac_word; then
1888 ac_cv_prog_RANLIB="ranlib"
1893 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1896 RANLIB="$ac_cv_prog_RANLIB"
1897 if test -n "$RANLIB"; then
1898 echo "$ac_t""$RANLIB" 1>&6
1900 echo "$ac_t""no" 1>&6
1905 # Extract the first word of "ctags", so it can be a program name with args.
1906 set dummy ctags; ac_word=$2
1907 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1908 echo "configure:1909: checking for $ac_word" >&5
1909 if eval "test \"`echo '$''{'ac_cv_prog_MAKE_LOWER_TAGS'+set}'`\" = set"; then
1910 echo $ac_n "(cached) $ac_c" 1>&6
1912 if test -n "$MAKE_LOWER_TAGS"; then
1913 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
1915 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1917 for ac_dir in $ac_dummy; do
1918 test -z "$ac_dir" && ac_dir=.
1919 if test -f $ac_dir/$ac_word; then
1920 ac_cv_prog_MAKE_LOWER_TAGS="yes"
1925 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
1928 MAKE_LOWER_TAGS="$ac_cv_prog_MAKE_LOWER_TAGS"
1929 if test -n "$MAKE_LOWER_TAGS"; then
1930 echo "$ac_t""$MAKE_LOWER_TAGS" 1>&6
1932 echo "$ac_t""no" 1>&6
1936 if test "$cf_cv_mixedcase" = yes ; then
1937 # Extract the first word of "etags", so it can be a program name with args.
1938 set dummy etags; ac_word=$2
1939 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1940 echo "configure:1941: checking for $ac_word" >&5
1941 if eval "test \"`echo '$''{'ac_cv_prog_MAKE_UPPER_TAGS'+set}'`\" = set"; then
1942 echo $ac_n "(cached) $ac_c" 1>&6
1944 if test -n "$MAKE_UPPER_TAGS"; then
1945 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
1947 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1949 for ac_dir in $ac_dummy; do
1950 test -z "$ac_dir" && ac_dir=.
1951 if test -f $ac_dir/$ac_word; then
1952 ac_cv_prog_MAKE_UPPER_TAGS="yes"
1957 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
1960 MAKE_UPPER_TAGS="$ac_cv_prog_MAKE_UPPER_TAGS"
1961 if test -n "$MAKE_UPPER_TAGS"; then
1962 echo "$ac_t""$MAKE_UPPER_TAGS" 1>&6
1964 echo "$ac_t""no" 1>&6
1971 if test "$MAKE_UPPER_TAGS" = yes ; then
1978 if test "$MAKE_LOWER_TAGS" = yes ; then
1985 for ac_prog in tdlint lint alint
1987 # Extract the first word of "$ac_prog", so it can be a program name with args.
1988 set dummy $ac_prog; ac_word=$2
1989 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1990 echo "configure:1991: checking for $ac_word" >&5
1991 if eval "test \"`echo '$''{'ac_cv_prog_LINT'+set}'`\" = set"; then
1992 echo $ac_n "(cached) $ac_c" 1>&6
1994 if test -n "$LINT"; then
1995 ac_cv_prog_LINT="$LINT" # Let the user override the test.
1997 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1999 for ac_dir in $ac_dummy; do
2000 test -z "$ac_dir" && ac_dir=.
2001 if test -f $ac_dir/$ac_word; then
2002 ac_cv_prog_LINT="$ac_prog"
2009 LINT="$ac_cv_prog_LINT"
2010 if test -n "$LINT"; then
2011 echo "$ac_t""$LINT" 1>&6
2013 echo "$ac_t""no" 1>&6
2016 test -n "$LINT" && break
2019 for ac_prog in man man_db
2021 # Extract the first word of "$ac_prog", so it can be a program name with args.
2022 set dummy $ac_prog; ac_word=$2
2023 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2024 echo "configure:2025: checking for $ac_word" >&5
2025 if eval "test \"`echo '$''{'ac_cv_prog_MAN'+set}'`\" = set"; then
2026 echo $ac_n "(cached) $ac_c" 1>&6
2028 if test -n "$MAN"; then
2029 ac_cv_prog_MAN="$MAN" # Let the user override the test.
2031 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2033 for ac_dir in $ac_dummy; do
2034 test -z "$ac_dir" && ac_dir=.
2035 if test -f $ac_dir/$ac_word; then
2036 ac_cv_prog_MAN="$ac_prog"
2043 MAN="$ac_cv_prog_MAN"
2044 if test -n "$MAN"; then
2045 echo "$ac_t""$MAN" 1>&6
2047 echo "$ac_t""no" 1>&6
2050 test -n "$MAN" && break
2055 if eval "test \"`echo '$''{'cf_cv_subst_LD'+set}'`\" = set"; then
2056 echo $ac_n "(cached) $ac_c" 1>&6
2059 echo $ac_n "checking for loader (symbol LD)""... $ac_c" 1>&6
2060 echo "configure:2061: checking for loader (symbol LD)" >&5
2061 test -z "$LD" && LD=ld
2062 echo "$ac_t""$LD" 1>&6
2067 LD=${cf_cv_subst_LD}
2069 if eval "test \"`echo '$''{'cf_cv_subst_AR'+set}'`\" = set"; then
2070 echo $ac_n "(cached) $ac_c" 1>&6
2073 echo $ac_n "checking for archiver (symbol AR)""... $ac_c" 1>&6
2074 echo "configure:2075: checking for archiver (symbol AR)" >&5
2075 test -z "$AR" && AR=ar
2076 echo "$ac_t""$AR" 1>&6
2081 AR=${cf_cv_subst_AR}
2083 if eval "test \"`echo '$''{'cf_cv_subst_AR_OPTS'+set}'`\" = set"; then
2084 echo $ac_n "(cached) $ac_c" 1>&6
2087 echo $ac_n "checking for archiver options (symbol AR_OPTS)""... $ac_c" 1>&6
2088 echo "configure:2089: checking for archiver options (symbol AR_OPTS)" >&5
2089 test -z "$AR_OPTS" && AR_OPTS=rv
2090 echo "$ac_t""$AR_OPTS" 1>&6
2092 cf_cv_subst_AR_OPTS=$AR_OPTS
2095 AR_OPTS=${cf_cv_subst_AR_OPTS}
2099 echo $ac_n "checking for makeflags variable""... $ac_c" 1>&6
2100 echo "configure:2101: checking for makeflags variable" >&5
2101 if eval "test \"`echo '$''{'cf_cv_makeflags'+set}'`\" = set"; then
2102 echo $ac_n "(cached) $ac_c" 1>&6
2106 for cf_option in '-$(MAKEFLAGS)' '$(MFLAGS)'
2108 cat >cf_makeflags.tmp <<CF_EOF
2110 @ echo '.$cf_option'
2112 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null`
2113 case "$cf_result" in
2115 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
2116 case "$cf_result" in
2117 .*CC=*) cf_cv_makeflags=
2119 *) cf_cv_makeflags=$cf_option
2124 *) echo no match "$cf_result"
2128 rm -f cf_makeflags.tmp
2131 echo "$ac_t""$cf_cv_makeflags" 1>&6
2135 echo $ac_n "checking if you have specified an install-prefix""... $ac_c" 1>&6
2136 echo "configure:2137: checking if you have specified an install-prefix" >&5
2138 # Check whether --with-install-prefix or --without-install-prefix was given.
2139 if test "${with_install_prefix+set}" = set; then
2140 withval="$with_install_prefix"
2141 case "$withval" in #(vi
2144 *) DESTDIR="$withval"
2149 echo "$ac_t""$DESTDIR" 1>&6
2152 ###############################################################################
2155 ### Options to allow the user to specify the set of libraries which are used.
2156 ### Use "--without-normal --with-shared" to allow the default model to be
2157 ### shared, for example.
2160 echo $ac_n "checking if you want to build libraries with libtool""... $ac_c" 1>&6
2161 echo "configure:2162: checking if you want to build libraries with libtool" >&5
2163 # Check whether --with-libtool or --without-libtool was given.
2164 if test "${with_libtool+set}" = set; then
2165 withval="$with_libtool"
2166 with_libtool=$withval
2171 echo "$ac_t""$with_libtool" 1>&6
2172 if test "$with_libtool" = "yes"; then
2173 cf_list_models="$cf_list_models libtool"
2174 test -z "$LIBTOOL" && LIBTOOL=libtool
2180 echo $ac_n "checking if you want to build shared libraries""... $ac_c" 1>&6
2181 echo "configure:2182: checking if you want to build shared libraries" >&5
2183 # Check whether --with-shared or --without-shared was given.
2184 if test "${with_shared+set}" = set; then
2185 withval="$with_shared"
2186 with_shared=$withval
2191 echo "$ac_t""$with_shared" 1>&6
2192 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
2194 echo $ac_n "checking if you want to build static libraries""... $ac_c" 1>&6
2195 echo "configure:2196: checking if you want to build static libraries" >&5
2197 # Check whether --with-normal or --without-normal was given.
2198 if test "${with_normal+set}" = set; then
2199 withval="$with_normal"
2200 with_normal=$withval
2205 echo "$ac_t""$with_normal" 1>&6
2206 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
2208 echo $ac_n "checking if you want to build debug libraries""... $ac_c" 1>&6
2209 echo "configure:2210: checking if you want to build debug libraries" >&5
2211 # Check whether --with-debug or --without-debug was given.
2212 if test "${with_debug+set}" = set; then
2213 withval="$with_debug"
2219 echo "$ac_t""$with_debug" 1>&6
2220 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
2222 echo $ac_n "checking if you want to build profiling libraries""... $ac_c" 1>&6
2223 echo "configure:2224: checking if you want to build profiling libraries" >&5
2225 # Check whether --with-profile or --without-profile was given.
2226 if test "${with_profile+set}" = set; then
2227 withval="$with_profile"
2228 with_profile=$withval
2233 echo "$ac_t""$with_profile" 1>&6
2234 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
2236 ###############################################################################
2238 echo $ac_n "checking for specified models""... $ac_c" 1>&6
2239 echo "configure:2240: checking for specified models" >&5
2240 test -z "$cf_list_models" && cf_list_models=normal
2241 test "$with_libtool" = "yes" && cf_list_models=libtool
2242 echo "$ac_t""$cf_list_models" 1>&6
2244 ### Use the first model as the default, and save its suffix for use in building
2245 ### up test-applications.
2246 echo $ac_n "checking for default model""... $ac_c" 1>&6
2247 echo "configure:2248: checking for default model" >&5
2248 DFT_LWR_MODEL=`echo $cf_list_models | $AWK '{print $1}'`
2249 echo "$ac_t""$DFT_LWR_MODEL" 1>&6
2252 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2263 case $cf_cv_system_name in
2264 os2) LIB_PREFIX='' ;;
2265 *) LIB_PREFIX='lib' ;;
2267 cf_prefix=$LIB_PREFIX
2270 LIB_PREFIX=$cf_prefix
2276 ###############################################################################
2278 echo $ac_n "checking if you want to build a separate terminfo library""... $ac_c" 1>&6
2279 echo "configure:2280: checking if you want to build a separate terminfo library" >&5
2281 # Check whether --with-termlib or --without-termlib was given.
2282 if test "${with_termlib+set}" = set; then
2283 withval="$with_termlib"
2284 with_termlib=$withval
2289 echo "$ac_t""$with_termlib" 1>&6
2291 ### Checks for special libraries, must be done up-front.
2292 echo $ac_n "checking if you want to link with dbmalloc for testing""... $ac_c" 1>&6
2293 echo "configure:2294: checking if you want to link with dbmalloc for testing" >&5
2295 # Check whether --with-dbmalloc or --without-dbmalloc was given.
2296 if test "${with_dbmalloc+set}" = set; then
2297 withval="$with_dbmalloc"
2298 with_dbmalloc=$withval
2303 echo "$ac_t""$with_dbmalloc" 1>&6
2304 if test "$with_dbmalloc" = yes ; then
2305 echo $ac_n "checking for debug_malloc in -ldbmalloc""... $ac_c" 1>&6
2306 echo "configure:2307: checking for debug_malloc in -ldbmalloc" >&5
2307 ac_lib_var=`echo dbmalloc'_'debug_malloc | sed 'y%./+-%__p_%'`
2308 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2309 echo $ac_n "(cached) $ac_c" 1>&6
2311 ac_save_LIBS="$LIBS"
2312 LIBS="-ldbmalloc $LIBS"
2313 cat > conftest.$ac_ext <<EOF
2314 #line 2315 "configure"
2315 #include "confdefs.h"
2316 /* Override any gcc2 internal prototype to avoid an error. */
2317 /* We use char because int might match the return type of a gcc2
2318 builtin and then its argument prototype would still apply. */
2319 char debug_malloc();
2325 if { (eval echo configure:2326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2327 eval "ac_cv_lib_$ac_lib_var=yes"
2329 echo "configure: failed program was:" >&5
2330 cat conftest.$ac_ext >&5
2332 eval "ac_cv_lib_$ac_lib_var=no"
2335 LIBS="$ac_save_LIBS"
2338 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2339 echo "$ac_t""yes" 1>&6
2340 ac_tr_lib=HAVE_LIB`echo dbmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2341 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2342 cat >> confdefs.h <<EOF
2343 #define $ac_tr_lib 1
2346 LIBS="-ldbmalloc $LIBS"
2349 echo "$ac_t""no" 1>&6
2354 echo $ac_n "checking if you want to link with dmalloc for testing""... $ac_c" 1>&6
2355 echo "configure:2356: checking if you want to link with dmalloc for testing" >&5
2357 # Check whether --with-dmalloc or --without-dmalloc was given.
2358 if test "${with_dmalloc+set}" = set; then
2359 withval="$with_dmalloc"
2360 with_dmalloc=$withval
2365 echo "$ac_t""$with_dmalloc" 1>&6
2366 if test "$with_dmalloc" = yes ; then
2367 echo $ac_n "checking for dmalloc_debug in -ldmalloc""... $ac_c" 1>&6
2368 echo "configure:2369: checking for dmalloc_debug in -ldmalloc" >&5
2369 ac_lib_var=`echo dmalloc'_'dmalloc_debug | sed 'y%./+-%__p_%'`
2370 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2371 echo $ac_n "(cached) $ac_c" 1>&6
2373 ac_save_LIBS="$LIBS"
2374 LIBS="-ldmalloc $LIBS"
2375 cat > conftest.$ac_ext <<EOF
2376 #line 2377 "configure"
2377 #include "confdefs.h"
2378 /* Override any gcc2 internal prototype to avoid an error. */
2379 /* We use char because int might match the return type of a gcc2
2380 builtin and then its argument prototype would still apply. */
2381 char dmalloc_debug();
2387 if { (eval echo configure:2388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2389 eval "ac_cv_lib_$ac_lib_var=yes"
2391 echo "configure: failed program was:" >&5
2392 cat conftest.$ac_ext >&5
2394 eval "ac_cv_lib_$ac_lib_var=no"
2397 LIBS="$ac_save_LIBS"
2400 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2401 echo "$ac_t""yes" 1>&6
2402 ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
2403 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
2404 cat >> confdefs.h <<EOF
2405 #define $ac_tr_lib 1
2408 LIBS="-ldmalloc $LIBS"
2411 echo "$ac_t""no" 1>&6
2417 echo $ac_n "checking if you want to link with the gpm mouse library""... $ac_c" 1>&6
2418 echo "configure:2419: checking if you want to link with the gpm mouse library" >&5
2420 # Check whether --with-gpm or --without-gpm was given.
2421 if test "${with_gpm+set}" = set; then
2428 echo "$ac_t""$with_gpm" 1>&6
2429 if test "$with_gpm" = yes ; then
2430 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
2431 echo "configure:2432: checking for Gpm_Open in -lgpm" >&5
2432 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
2433 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2434 echo $ac_n "(cached) $ac_c" 1>&6
2436 ac_save_LIBS="$LIBS"
2438 cat > conftest.$ac_ext <<EOF
2439 #line 2440 "configure"
2440 #include "confdefs.h"
2441 /* Override any gcc2 internal prototype to avoid an error. */
2442 /* We use char because int might match the return type of a gcc2
2443 builtin and then its argument prototype would still apply. */
2450 if { (eval echo configure:2451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2452 eval "ac_cv_lib_$ac_lib_var=yes"
2454 echo "configure: failed program was:" >&5
2455 cat conftest.$ac_ext >&5
2457 eval "ac_cv_lib_$ac_lib_var=no"
2460 LIBS="$ac_save_LIBS"
2463 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2464 echo "$ac_t""yes" 1>&6
2466 EXTRA_LIBS="-lgpm -lncurses $EXTRA_LIBS"
2467 SHLIB_LIST="-lgpm $SHLIB_LIST"
2468 cat >> confdefs.h <<\EOF
2469 #define HAVE_LIBGPM 1
2474 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2475 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2476 echo "configure:2477: checking for $ac_hdr" >&5
2477 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2478 echo $ac_n "(cached) $ac_c" 1>&6
2480 cat > conftest.$ac_ext <<EOF
2481 #line 2482 "configure"
2482 #include "confdefs.h"
2485 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2486 { (eval echo configure:2487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2487 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2488 if test -z "$ac_err"; then
2490 eval "ac_cv_header_$ac_safe=yes"
2493 echo "configure: failed program was:" >&5
2494 cat conftest.$ac_ext >&5
2496 eval "ac_cv_header_$ac_safe=no"
2500 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2501 echo "$ac_t""yes" 1>&6
2502 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2503 cat >> confdefs.h <<EOF
2504 #define $ac_tr_hdr 1
2508 echo "$ac_t""no" 1>&6
2514 echo "$ac_t""no" 1>&6
2515 echo "configure: warning: Cannot link with gpm library - read the FAQ" 1>&2
2521 if test X"$CC_G_OPT" = X"" ; then
2523 test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
2527 if test X"$CXX_G_OPT" = X"" ; then
2529 test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
2533 echo $ac_n "checking for default loader flags""... $ac_c" 1>&6
2534 echo "configure:2535: checking for default loader flags" >&5
2535 case $DFT_LWR_MODEL in
2536 libtool) LD_MODEL='' ;;
2537 normal) LD_MODEL='' ;;
2538 debug) LD_MODEL=$CC_G_OPT ;;
2539 profile) LD_MODEL='-pg';;
2540 shared) LD_MODEL='' ;;
2542 echo "$ac_t""$LD_MODEL" 1>&6
2544 echo $ac_n "checking if rpath option should be used""... $ac_c" 1>&6
2545 echo "configure:2546: checking if rpath option should be used" >&5
2547 # Check whether --enable-rpath or --disable-rpath was given.
2548 if test "${enable_rpath+set}" = set; then
2549 enableval="$enable_rpath"
2550 cf_cv_ld_rpath=$enableval
2555 echo "$ac_t""$cf_cv_ld_rpath" 1>&6
2562 INSTALL_LIB="-m 644"
2564 cf_cv_do_symlinks=no
2566 echo $ac_n "checking if release/abi version should be used for shared libs""... $ac_c" 1>&6
2567 echo "configure:2568: checking if release/abi version should be used for shared libs" >&5
2569 # Check whether --with-shlib-version or --without-shlib-version was given.
2570 if test "${with_shlib_version+set}" = set; then
2571 withval="$with_shlib_version"
2572 test -z "$withval" && withval=auto
2573 case $withval in #(vi
2575 cf_cv_shlib_version=auto
2577 rel|abi|auto|no) #(vi
2578 cf_cv_shlib_version=$withval
2581 { echo "configure: error: option value must be one of: rel, abi, auto or no" 1>&2; exit 1; }
2586 cf_cv_shlib_version=auto
2589 echo "$ac_t""$cf_cv_shlib_version" 1>&6
2593 # Some less-capable ports of gcc support only -fpic
2595 if test "$GCC" = yes
2597 echo $ac_n "checking which $CC option to use""... $ac_c" 1>&6
2598 echo "configure:2599: checking which $CC option to use" >&5
2599 cf_save_CFLAGS="$CFLAGS"
2600 for CC_SHARED_OPTS in -fPIC -fpic ''
2602 CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
2603 cat > conftest.$ac_ext <<EOF
2604 #line 2605 "configure"
2605 #include "confdefs.h"
2611 if { (eval echo configure:2612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2615 echo "configure: failed program was:" >&5
2616 cat conftest.$ac_ext >&5
2620 echo "$ac_t""$CC_SHARED_OPTS" 1>&6
2621 CFLAGS="$cf_save_CFLAGS"
2624 case $cf_cv_system_name in
2626 MK_SHARED_LIB='$(CC) -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
2629 # (tested with gcc 2.7.2 -- I don't have c89)
2630 if test "$GCC" = yes; then
2631 LD_SHARED_OPTS='-Xlinker +b -Xlinker $(libdir)'
2634 LD_SHARED_OPTS='-Wl,+b,$(libdir)'
2636 MK_SHARED_LIB='$(LD) +b $(libdir) -b -o $@'
2637 # HP-UX shared libraries must be executable, and should be
2638 # readonly to exploit a quirk in the memory manager.
2639 INSTALL_LIB="-m 555"
2642 if test "$cf_cv_ld_rpath" = yes ; then
2643 cf_ld_rpath_opt="-Wl,-rpath,"
2644 EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
2646 # tested with IRIX 5.2 and 'cc'.
2647 if test "$GCC" != yes; then
2648 CC_SHARED_OPTS='-KPIC'
2650 MK_SHARED_LIB='$(LD) -shared -rdata_shared -soname `basename $@` -o $@'
2651 cf_cv_rm_so_locs=yes
2654 if test "$DFT_LWR_MODEL" = "shared" ; then
2655 LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
2656 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
2658 if test "$cf_cv_ld_rpath" = yes ; then
2659 cf_ld_rpath_opt="-Wl,-rpath,"
2660 EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
2662 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
2663 MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@ .$(REL_VERSION)`.$(ABI_VERSION),-stats,-lc -o $@'
2666 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
2667 MK_SHARED_LIB='$(LD) -Bshareable -soname,`basename $@.$(ABI_VERSION)` -o $@'
2670 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
2671 MK_SHARED_LIB='$(LD) -Bshareable -o $@'
2672 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
2675 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
2676 test "$cf_cv_ld_rpath" = yes && cf_ld_rpath_opt="-Wl,-rpath,"
2677 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
2678 LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
2679 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
2680 EXTRA_LDFLAGS="-Wl,-rpath,\$(libdir) $EXTRA_LDFLAGS"
2681 MK_SHARED_LIB='$(CC) -shared -Wl,-soname,`basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
2682 if test "$cf_cv_shlib_version" = auto; then
2683 if test ! -f /usr/libexec/ld.elf_so; then
2684 cf_cv_shlib_version=rel
2688 MK_SHARED_LIB='$(LD) -Bshareable -o $@'
2692 # tested with OSF/1 V3.2 and 'cc'
2693 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
2694 # link with shared libs).
2695 MK_SHARED_LIB='$(LD) -set_version $(REL_VERSION):$(ABI_VERSION) -expect_unresolved "*" -shared -soname `basename $@`'
2698 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
2701 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
2702 if test "$DFT_LWR_MODEL" = "shared" ; then
2703 LOCAL_LDFLAGS="-Wl,-rpath,`pwd`/lib"
2704 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
2706 if test "$cf_cv_ld_rpath" = yes ; then
2707 cf_ld_rpath_opt="-rpath"
2708 # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
2710 cf_cv_rm_so_locs=yes
2712 sco3.2v5*) # (also uw2* and UW7) hops 13-Apr-98
2713 # tested with osr5.0.5
2714 if test "$ac_cv_prog_gcc" != yes; then
2715 CC_SHARED_OPTS='-belf -KPIC'
2717 MK_SHARED_LIB='$(LD) -dy -G -h `basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
2718 if test "$cf_cv_ld_rpath" = yes ; then
2719 # only way is to set LD_RUN_PATH but no switch for it
2722 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
2723 LINK_PROGS='LD_RUN_PATH=$(libdir)'
2724 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
2727 # tested with SunOS 4.1.1 and gcc 2.7.0
2728 if test "$ac_cv_prog_gcc" != yes; then
2729 CC_SHARED_OPTS='-KPIC'
2731 MK_SHARED_LIB='$(LD) -assert pure-text -o $@'
2732 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
2735 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
2736 if test "$ac_cv_prog_gcc" != yes; then
2737 CC_SHARED_OPTS='-KPIC'
2739 MK_SHARED_LIB='$(LD) -dy -G -h `basename $@ .$(REL_VERSION)`.$(ABI_VERSION) -o $@'
2740 if test "$DFT_LWR_MODEL" = "shared" ; then
2741 LOCAL_LDFLAGS="-R `pwd`/lib:\$(libdir)"
2742 LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
2744 if test "$cf_cv_ld_rpath" = yes ; then
2745 cf_ld_rpath_opt="-R"
2746 EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
2748 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
2751 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
2752 if test "$ac_cv_prog_gcc" != yes; then
2753 CC_SHARED_OPTS='-KPIC'
2755 MK_SHARED_LIB='$(LD) -d y -G -o $@'
2758 CC_SHARED_OPTS='unknown'
2759 MK_SHARED_LIB='echo unknown'
2763 # This works if the last tokens in $MK_SHARED_LIB are the -o target.
2764 case "$cf_cv_shlib_version" in #(vi
2766 case "$MK_SHARED_LIB" in #(vi
2768 test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
2771 echo "configure: warning: ignored --with-shlib-version" 1>&2
2777 if test -n "$cf_ld_rpath_opt" ; then
2778 echo $ac_n "checking if we need a space after rpath option""... $ac_c" 1>&6
2779 echo "configure:2780: checking if we need a space after rpath option" >&5
2780 cf_save_LIBS="$LIBS"
2781 LIBS="$LIBS ${cf_ld_rpath_opt}$libdir"
2782 cat > conftest.$ac_ext <<EOF
2783 #line 2784 "configure"
2784 #include "confdefs.h"
2790 if { (eval echo configure:2791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2794 echo "configure: failed program was:" >&5
2795 cat conftest.$ac_ext >&5
2800 LIBS="$cf_save_LIBS"
2801 echo "$ac_t""$cf_rpath_space" 1>&6
2802 test "$cf_rpath_space" = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
2803 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\$(libdir)"
2816 if test "$CC_SHARED_OPTS" = "unknown"; then
2817 for model in $cf_list_models; do
2818 if test "$model" = "shared"; then
2819 { echo "configure: error: Shared libraries are not supported in this version" 1>&2; exit 1; }
2824 ###############################################################################
2827 ### use option --disable-overwrite to leave out the link to -lcurses
2828 echo $ac_n "checking if you wish to install ncurses overwriting curses""... $ac_c" 1>&6
2829 echo "configure:2830: checking if you wish to install ncurses overwriting curses" >&5
2831 # Check whether --enable-overwrite or --disable-overwrite was given.
2832 if test "${enable_overwrite+set}" = set; then
2833 enableval="$enable_overwrite"
2834 with_overwrite=$enableval
2839 echo "$ac_t""$with_overwrite" 1>&6
2841 echo $ac_n "checking if external terminfo-database is used""... $ac_c" 1>&6
2842 echo "configure:2843: checking if external terminfo-database is used" >&5
2844 # Check whether --enable-database or --disable-database was given.
2845 if test "${enable_database+set}" = set; then
2846 enableval="$enable_database"
2847 use_database=$enableval
2852 echo "$ac_t""$use_database" 1>&6
2854 case $host_os in #(vi
2856 TERMINFO_SRC='${top_srcdir}/misc/emx.src'
2859 TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
2864 if test "$use_database" != no ; then
2865 cat >> confdefs.h <<\EOF
2866 #define USE_DATABASE 1
2869 echo $ac_n "checking which terminfo source-file will be installed""... $ac_c" 1>&6
2870 echo "configure:2871: checking which terminfo source-file will be installed" >&5
2872 # Check whether --enable-database or --disable-database was given.
2873 if test "${enable_database+set}" = set; then
2874 enableval="$enable_database"
2875 TERMINFO_SRC=$withval
2878 echo "$ac_t""$TERMINFO_SRC" 1>&6
2881 echo $ac_n "checking for list of fallback descriptions""... $ac_c" 1>&6
2882 echo "configure:2883: checking for list of fallback descriptions" >&5
2884 # Check whether --with-fallbacks or --without-fallbacks was given.
2885 if test "${with_fallbacks+set}" = set; then
2886 withval="$with_fallbacks"
2887 with_fallback=$withval
2892 echo "$ac_t""$with_fallback" 1>&6
2893 FALLBACK_LIST=`echo $with_fallback|sed -e 's/,/ /g'`
2896 if test "$use_database" = no ; then
2897 if test -z $with_fallback ; then
2898 { echo "configure: error: You have disabled the database w/o specifying fallbacks" 1>&2; exit 1; }
2900 TERMINFO="${datadir}/terminfo"
2903 echo $ac_n "checking for list of terminfo directories""... $ac_c" 1>&6
2904 echo "configure:2905: checking for list of terminfo directories" >&5
2907 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
2908 if test "${with_terminfo_dirs+set}" = set; then
2909 withval="$with_terminfo_dirs"
2912 withval="${TERMINFO_DIRS-${datadir}/terminfo}"
2915 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
2917 for cf_src_path in $withval
2920 case ".$cf_src_path" in #(vi
2923 .a-zA-Z:\\/*) #(vi OS/2 EMX
2926 eval cf_src_path="$cf_src_path"
2927 case ".$cf_src_path" in #(vi
2929 cf_src_path=`echo $cf_src_path | sed -e s@NONE@$ac_default_prefix@`
2934 cf_src_path=`echo $cf_src_path | sed -e s@NONE@$ac_default_prefix@`
2937 { echo "configure: error: expected a pathname" 1>&2; exit 1; }
2941 test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
2942 cf_dst_path="${cf_dst_path}${cf_src_path}"
2946 eval TERMINFO_DIRS="$cf_dst_path"
2948 echo "$ac_t""$TERMINFO_DIRS" 1>&6
2949 test -n "$TERMINFO_DIRS" && cat >> confdefs.h <<EOF
2950 #define TERMINFO_DIRS "$TERMINFO_DIRS"
2954 echo $ac_n "checking for default terminfo directory""... $ac_c" 1>&6
2955 echo "configure:2956: checking for default terminfo directory" >&5
2957 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
2958 if test "${with_default_terminfo_dir+set}" = set; then
2959 withval="$with_default_terminfo_dir"
2962 withval="${TERMINFO-${datadir}/terminfo}"
2965 case ".$withval" in #(vi
2968 .a-zA-Z:\\/*) #(vi OS/2 EMX
2971 eval withval="$withval"
2972 case ".$withval" in #(vi
2974 withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
2979 withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
2982 { echo "configure: error: expected a pathname" 1>&2; exit 1; }
2986 eval TERMINFO="$withval"
2988 echo "$ac_t""$TERMINFO" 1>&6
2989 cat >> confdefs.h <<EOF
2990 #define TERMINFO "$TERMINFO"
2998 ### use option --disable-big-core to make tic run on small machines
2999 ### We need 4Mb, check if we can allocate 50% more than that.
3000 echo $ac_n "checking if big-core option selected""... $ac_c" 1>&6
3001 echo "configure:3002: checking if big-core option selected" >&5
3003 # Check whether --enable-big-core or --disable-big-core was given.
3004 if test "${enable_big_core+set}" = set; then
3005 enableval="$enable_big_core"
3006 with_big_core=$enableval
3008 if test "$cross_compiling" = yes; then
3011 cat > conftest.$ac_ext <<EOF
3012 #line 3013 "configure"
3013 #include "confdefs.h"
3018 unsigned long n = 6000000L;
3019 char *s = malloc(n);
3025 if { (eval echo configure:3026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3029 echo "configure: failed program was:" >&5
3030 cat conftest.$ac_ext >&5
3039 echo "$ac_t""$with_big_core" 1>&6
3040 test "$with_big_core" = "yes" && cat >> confdefs.h <<\EOF
3041 #define HAVE_BIG_CORE 1
3045 ### use option --enable-termcap to compile in the termcap fallback support
3046 echo $ac_n "checking if you want termcap-fallback support""... $ac_c" 1>&6
3047 echo "configure:3048: checking if you want termcap-fallback support" >&5
3049 # Check whether --enable-termcap or --disable-termcap was given.
3050 if test "${enable_termcap+set}" = set; then
3051 enableval="$enable_termcap"
3052 with_termcap=$enableval
3057 echo "$ac_t""$with_termcap" 1>&6
3059 if test "$with_termcap" != "yes" ; then
3060 cat >> confdefs.h <<\EOF
3061 #define PURE_TERMINFO 1
3066 ### use option --enable-getcap to use a hacked getcap for reading termcaps
3067 echo $ac_n "checking if fast termcap-loader is needed""... $ac_c" 1>&6
3068 echo "configure:3069: checking if fast termcap-loader is needed" >&5
3070 # Check whether --enable-getcap or --disable-getcap was given.
3071 if test "${enable_getcap+set}" = set; then
3072 enableval="$enable_getcap"
3073 with_getcap=$enableval
3078 echo "$ac_t""$with_getcap" 1>&6
3079 test "$with_getcap" = "yes" && cat >> confdefs.h <<\EOF
3080 #define USE_GETCAP 1
3084 echo $ac_n "checking if translated termcaps will be cached in ~/.terminfo""... $ac_c" 1>&6
3085 echo "configure:3086: checking if translated termcaps will be cached in ~/.terminfo" >&5
3087 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
3088 if test "${enable_getcap_cache+set}" = set; then
3089 enableval="$enable_getcap_cache"
3090 with_getcap_cache=$enableval
3092 with_getcap_cache=no
3095 echo "$ac_t""$with_getcap_cache" 1>&6
3096 test "$with_getcap_cache" = "yes" && cat >> confdefs.h <<\EOF
3097 #define USE_GETCAP_CACHE 1
3103 ### Use option --enable-symlinks to make tic use symlinks, not hard links
3104 ### to reduce storage requirements for the terminfo database.
3110 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3111 echo "configure:3112: checking for $ac_func" >&5
3112 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3113 echo $ac_n "(cached) $ac_c" 1>&6
3115 cat > conftest.$ac_ext <<EOF
3116 #line 3117 "configure"
3117 #include "confdefs.h"
3118 /* System header to define __stub macros and hopefully few prototypes,
3119 which can conflict with char $ac_func(); below. */
3121 /* Override any gcc2 internal prototype to avoid an error. */
3122 /* We use char because int might match the return type of a gcc2
3123 builtin and then its argument prototype would still apply. */
3128 /* The GNU C library defines this for functions which it implements
3129 to always fail with ENOSYS. Some functions are actually named
3130 something starting with __ and the normal name is an alias. */
3131 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3139 if { (eval echo configure:3140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3141 eval "ac_cv_func_$ac_func=yes"
3143 echo "configure: failed program was:" >&5
3144 cat conftest.$ac_ext >&5
3146 eval "ac_cv_func_$ac_func=no"
3151 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3152 echo "$ac_t""yes" 1>&6
3153 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3154 cat >> confdefs.h <<EOF
3155 #define $ac_tr_func 1
3159 echo "$ac_t""no" 1>&6
3164 if test "$ac_cv_prog_cc_cross" = yes ; then
3169 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3170 echo "configure:3171: checking for $ac_func" >&5
3171 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3172 echo $ac_n "(cached) $ac_c" 1>&6
3174 cat > conftest.$ac_ext <<EOF
3175 #line 3176 "configure"
3176 #include "confdefs.h"
3177 /* System header to define __stub macros and hopefully few prototypes,
3178 which can conflict with char $ac_func(); below. */
3180 /* Override any gcc2 internal prototype to avoid an error. */
3181 /* We use char because int might match the return type of a gcc2
3182 builtin and then its argument prototype would still apply. */
3187 /* The GNU C library defines this for functions which it implements
3188 to always fail with ENOSYS. Some functions are actually named
3189 something starting with __ and the normal name is an alias. */
3190 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3198 if { (eval echo configure:3199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3200 eval "ac_cv_func_$ac_func=yes"
3202 echo "configure: failed program was:" >&5
3203 cat conftest.$ac_ext >&5
3205 eval "ac_cv_func_$ac_func=no"
3210 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3211 echo "$ac_t""yes" 1>&6
3212 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3213 cat >> confdefs.h <<EOF
3214 #define $ac_tr_func 1
3218 echo "$ac_t""no" 1>&6
3223 echo $ac_n "checking if link/symlink functions work""... $ac_c" 1>&6
3224 echo "configure:3225: checking if link/symlink functions work" >&5
3225 if eval "test \"`echo '$''{'cf_cv_link_funcs'+set}'`\" = set"; then
3226 echo $ac_n "(cached) $ac_c" 1>&6
3230 for cf_func in link symlink ; do
3231 if test "$cross_compiling" = yes; then
3233 eval 'ac_cv_func_'$cf_func'=error'
3235 cat > conftest.$ac_ext <<EOF
3236 #line 3237 "configure"
3237 #include "confdefs.h"
3239 #include <sys/types.h>
3240 #include <sys/stat.h>
3241 #ifdef HAVE_UNISTD_H
3247 char *src = "config.log";
3248 char *dst = "conftest.chk";
3253 fail = ($cf_func("config.log", "conftest.chk") < 0)
3254 || (stat(dst, &dst_sb) < 0)
3255 || (dst_sb.st_mtime != src_sb.st_mtime);
3265 if { (eval echo configure:3266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3268 cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
3269 eval 'ac_cv_func_'$cf_func'=yes'
3271 echo "configure: failed program was:" >&5
3272 cat conftest.$ac_ext >&5
3275 eval 'ac_cv_func_'$cf_func'=no'
3281 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
3285 echo "$ac_t""$cf_cv_link_funcs" 1>&6
3286 test "$ac_cv_func_link" = yes && cat >> confdefs.h <<\EOF
3290 test "$ac_cv_func_symlink" = yes && cat >> confdefs.h <<\EOF
3291 #define HAVE_SYMLINK 1
3300 if test "$ac_cv_func_link" != yes ; then
3301 echo $ac_n "checking if tic should use symbolic links""... $ac_c" 1>&6
3302 echo "configure:3303: checking if tic should use symbolic links" >&5
3303 if test "$ac_cv_func_symlink" = yes ; then
3308 echo "$ac_t""$with_symlinks" 1>&6
3309 elif test "$ac_cv_func_symlink" != yes ; then
3310 echo $ac_n "checking if tic should use hard links""... $ac_c" 1>&6
3311 echo "configure:3312: checking if tic should use hard links" >&5
3312 if test "$ac_cv_func_link" = yes ; then
3317 echo "$ac_t""$with_links" 1>&6
3319 echo $ac_n "checking if tic should use symbolic links""... $ac_c" 1>&6
3320 echo "configure:3321: checking if tic should use symbolic links" >&5
3322 # Check whether --enable-symlinks or --disable-symlinks was given.
3323 if test "${enable_symlinks+set}" = set; then
3324 enableval="$enable_symlinks"
3325 with_symlinks=$enableval
3330 echo "$ac_t""$with_symlinks" 1>&6
3333 test "$with_links" = yes && cat >> confdefs.h <<\EOF
3337 test "$with_symlinks" = yes && cat >> confdefs.h <<\EOF
3338 #define USE_SYMLINKS 1
3342 ### use option --enable-broken-linker to force on use of broken-linker support
3343 echo $ac_n "checking if you want broken-linker support code""... $ac_c" 1>&6
3344 echo "configure:3345: checking if you want broken-linker support code" >&5
3346 # Check whether --enable-broken_linker or --disable-broken_linker was given.
3347 if test "${enable_broken_linker+set}" = set; then
3348 enableval="$enable_broken_linker"
3349 with_broken_linker=$enableval
3351 with_broken_linker=$BROKEN_LINKER
3354 echo "$ac_t""$with_broken_linker" 1>&6
3355 test "$with_broken_linker" = yes && cat >> confdefs.h <<\EOF
3356 #define BROKEN_LINKER 1
3360 ### use option --enable-bsdpad to have tputs process BSD-style prefix padding
3361 echo $ac_n "checking if tputs should process BSD-style prefix padding""... $ac_c" 1>&6
3362 echo "configure:3363: checking if tputs should process BSD-style prefix padding" >&5
3364 # Check whether --enable-bsdpad or --disable-bsdpad was given.
3365 if test "${enable_bsdpad+set}" = set; then
3366 enableval="$enable_bsdpad"
3367 with_bsdpad=$enableval
3372 echo "$ac_t""$with_bsdpad" 1>&6
3373 test "$with_bsdpad" = yes && cat >> confdefs.h <<\EOF
3378 ### Enable compiling-in rcs id's
3379 echo $ac_n "checking if RCS identifiers should be compiled-in""... $ac_c" 1>&6
3380 echo "configure:3381: checking if RCS identifiers should be compiled-in" >&5
3382 # Check whether --with-rcs-ids or --without-rcs-ids was given.
3383 if test "${with_rcs_ids+set}" = set; then
3384 withval="$with_rcs_ids"
3385 with_rcs_ids=$withval
3390 echo "$ac_t""$with_rcs_ids" 1>&6
3391 test "$with_rcs_ids" = yes && cat >> confdefs.h <<\EOF
3392 #define USE_RCS_IDS 1
3396 ###############################################################################
3399 echo $ac_n "checking format of man-pages""... $ac_c" 1>&6
3400 echo "configure:3401: checking format of man-pages" >&5
3403 # Check whether --with-manpage-format or --without-manpage-format was given.
3404 if test "${with_manpage_format+set}" = set; then
3405 withval="$with_manpage_format"
3406 cf_manpage_form=$withval
3408 cf_manpage_form=unknown
3412 case ".$cf_manpage_form" in
3413 .gzip|.compress|.BSDI|.normal|.formatted) # (vi
3416 if test -z "$MANPATH" ; then
3417 MANPATH="/usr/man:/usr/share/man"
3419 # look for the 'date' man-page (it's most likely to be installed!)
3420 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
3421 cf_manpage_form=unknown
3422 for cf_dir in $MANPATH; do
3423 test -z "$cf_dir" && cf_dir=/usr/man
3424 for cf_name in $cf_dir/*/date.[01]* $cf_dir/*/date
3426 cf_test=`echo $cf_name | sed -e 's/*//'`
3427 if test "x$cf_test" = "x$cf_name" ; then
3429 *.gz) cf_manpage_form=gzip;;
3430 *.Z) cf_manpage_form=compress;;
3431 *.0) cf_manpage_form=BSDI,formatted;;
3432 *) cf_manpage_form=normal;;
3437 if test "$cf_manpage_form" != "unknown" ; then
3444 echo "configure: warning: Unexpected manpage-format" 1>&2
3448 echo "$ac_t""$cf_manpage_form" 1>&6
3451 echo $ac_n "checking for manpage renaming""... $ac_c" 1>&6
3452 echo "configure:3453: checking for manpage renaming" >&5
3455 # Check whether --with-manpage-renames or --without-manpage-renames was given.
3456 if test "${with_manpage_renames+set}" = set; then
3457 withval="$with_manpage_renames"
3458 cf_manpage_renames=$withval
3460 cf_manpage_renames=yes
3464 case ".$cf_manpage_renames" in #(vi
3468 # Debian 'man' program?
3469 if test -f /etc/debian_version ; then
3470 cf_manpage_renames=`cd $srcdir && pwd`/man/man_db.renames
3472 cf_manpage_renames=no
3477 if test "$cf_manpage_renames" != no ; then
3478 if test ! -f $cf_manpage_renames ; then
3479 { echo "configure: error: not a filename: $cf_manpage_renames" 1>&2; exit 1; }
3482 test ! -d man && mkdir man
3484 # Construct a sed-script to perform renaming within man-pages
3485 if test -n "$cf_manpage_renames" ; then
3486 test ! -d man && mkdir man
3487 $srcdir/man/make_sed.sh $cf_manpage_renames >man/edit_man.sed
3491 echo "$ac_t""$cf_manpage_renames" 1>&6
3494 echo $ac_n "checking for manpage symlinks""... $ac_c" 1>&6
3495 echo "configure:3496: checking for manpage symlinks" >&5
3498 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
3499 if test "${with_manpage_symlinks+set}" = set; then
3500 withval="$with_manpage_symlinks"
3501 cf_manpage_symlinks=$withval
3503 cf_manpage_symlinks=yes
3507 echo "$ac_t""$cf_manpage_symlinks" 1>&6
3510 echo $ac_n "checking for manpage tbl""... $ac_c" 1>&6
3511 echo "configure:3512: checking for manpage tbl" >&5
3514 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
3515 if test "${with_manpage_tbl+set}" = set; then
3516 withval="$with_manpage_tbl"
3517 cf_manpage_tbl=$withval
3523 echo "$ac_t""$cf_manpage_tbl" 1>&6
3526 if test "$prefix" = "NONE" ; then
3527 cf_prefix="$ac_default_prefix"
3532 case "$cf_manpage_form" in # (vi
3534 cf_subdir='$mandir/cat'
3538 cf_subdir='$mandir/man'
3543 test ! -d man && mkdir man
3544 cat >man/edit_man.sh <<CF_EOF
3546 # this script is generated by the configure-script
3549 TERMINFO="$TERMINFO"
3550 MKDIRS="`cd $srcdir && pwd`/mkinstalldirs"
3552 INSTALL_DATA="$INSTALL_DATA"
3553 transform="$program_transform_name"
3555 TMP=\${TMPDIR-/tmp}/man\$\$
3556 trap "rm -f \$TMP" 0 1 2 5 15
3569 *.orig|*.rej) ;; #(vi
3571 section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
3572 if test \$verb = installing ; then
3573 if test ! -d $cf_subdir\${section} ; then
3574 \$MKDIRS $cf_subdir\$section
3578 source=\`basename \$i\`
3580 test ! -f \$inalias && inalias="\$srcdir/\$inalias"
3581 if test ! -f \$inalias ; then
3582 echo .. skipped \$source
3586 if test "$cf_manpage_symlinks" = yes ; then
3587 cat >>man/edit_man.sh <<CF_EOF
3588 aliases=\`sed -f \$srcdir/manlinks.sed \$inalias | sort -u\`
3591 if test "$cf_manpage_renames" = no ; then
3592 cat >>man/edit_man.sh <<CF_EOF
3593 # perform program transformations for section 1 man pages
3594 if test \$section = 1 ; then
3595 target=$cf_subdir\${section}/\`echo \$source|sed "\${transform}"\`
3597 target=$cf_subdir\${section}/\$source
3600 # replace variables in man page
3603 for cf_name in captoinfo clear infocmp infotocap tic toe tput
3605 cat >>man/edit_man.sh <<CF_EOF
3606 prog_$cf_name=\`echo $cf_name|sed "\${transform}"\`
3610 cat >>man/edit_man.sh <<CF_EOF
3611 sed -e "s,@DATADIR@,\$datadir," \\
3612 -e "s,@TERMINFO@,\$TERMINFO," \\
3615 for cf_name in captoinfo clear infocmp infotocap tic toe tput
3617 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3618 cat >>man/edit_man.sh <<CF_EOF
3619 -e "s,@$cf_NAME@,\$prog_$cf_name," \\
3623 cat >>man/edit_man.sh <<CF_EOF
3627 cat >>man/edit_man.sh <<CF_EOF
3628 target=\`grep "^\$source" $cf_manpage_renames | $AWK '{print \$2}'\`
3629 if test -z "\$target" ; then
3630 echo '? missing rename for '\$source
3633 target="$cf_subdir\$section/\$target"
3634 test \$verb = installing && sed -e "s,@DATADIR@,\$datadir," < \$i | sed -f edit_man.sed >\$TMP
3637 if test $cf_manpage_tbl = yes ; then
3638 cat >>man/edit_man.sh <<CF_EOF
3639 tbl \$TMP >\$TMP.out
3643 if test $with_curses_h != yes ; then
3644 cat >>man/edit_man.sh <<CF_EOF
3645 sed -e "/\#[ ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
3649 if test $cf_format = yes ; then
3650 cat >>man/edit_man.sh <<CF_EOF
3651 nroff -man \$TMP >\$TMP.out
3655 case "$cf_manpage_form" in #(vi
3657 cat >>man/edit_man.sh <<CF_EOF
3658 if test \$verb = installing ; then
3659 if ( compress -f \$TMP )
3668 cat >>man/edit_man.sh <<CF_EOF
3669 if test \$verb = installing ; then
3670 if ( gzip -f \$TMP )
3675 target="\$target.gz"
3679 cat >>man/edit_man.sh <<CF_EOF
3680 # BSDI installs only .0 suffixes in the cat directories
3681 target="\`echo \$target|sed -e 's/\.[1-9]\+.\?/.0/'\`"
3685 cat >>man/edit_man.sh <<CF_EOF
3686 suffix=\`basename \$target | sed -e 's/^[^.]*//'\`
3687 if test \$verb = installing ; then
3688 echo \$verb \$target
3689 \$INSTALL_DATA \$TMP \$target
3690 test -n "\$aliases" && (
3691 cd $cf_subdir\${section} && (
3692 target=\`basename \$target\`
3693 for cf_alias in \$aliases
3695 if test \$section = 1 ; then
3696 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
3699 if test -f \$cf_alias\${suffix} ; then
3700 if ( cmp -s \$target \$cf_alias\${suffix} )
3704 echo .. \$verb alias \$cf_alias\${suffix}
3705 rm -f \$cf_alias\${suffix}
3706 $LN_S \$target \$cf_alias\${suffix}
3709 echo .. \$verb alias \$cf_alias\${suffix}
3710 rm -f \$cf_alias\${suffix}
3711 $LN_S \$target \$cf_alias\${suffix}
3716 elif test \$verb = removing ; then
3717 echo \$verb \$target
3719 test -n "\$aliases" && (
3720 cd $cf_subdir\${section} && (
3721 for cf_alias in \$aliases
3723 if test \$section = 1 ; then
3724 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
3727 echo .. \$verb alias \$cf_alias\${suffix}
3728 rm -f \$cf_alias\${suffix}
3741 chmod 755 man/edit_man.sh
3745 ###############################################################################
3748 ### Note that some functions (such as const) are normally disabled anyway.
3749 echo $ac_n "checking if you want to build with function extensions""... $ac_c" 1>&6
3750 echo "configure:3751: checking if you want to build with function extensions" >&5
3752 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
3753 if test "${enable_ext_funcs+set}" = set; then
3754 enableval="$enable_ext_funcs"
3755 with_ext_funcs=$enableval
3760 echo "$ac_t""$with_ext_funcs" 1>&6
3761 if test "$with_ext_funcs" = yes ; then
3762 cat >> confdefs.h <<\EOF
3763 #define HAVE_CURSES_VERSION 1
3766 cat >> confdefs.h <<\EOF
3767 #define HAVE_HAS_KEY 1
3770 cat >> confdefs.h <<\EOF
3771 #define HAVE_RESIZETERM 1
3774 cat >> confdefs.h <<\EOF
3775 #define HAVE_USE_DEFAULT_COLORS 1
3778 cat >> confdefs.h <<\EOF
3779 #define HAVE_WRESIZE 1
3782 cat >> confdefs.h <<\EOF
3783 #define NCURSES_EXT_FUNCS 1
3788 ### use option --enable-const to turn on use of const beyond that in XSI.
3789 echo $ac_n "checking for extended use of const keyword""... $ac_c" 1>&6
3790 echo "configure:3791: checking for extended use of const keyword" >&5
3792 # Check whether --enable-const or --disable-const was given.
3793 if test "${enable_const+set}" = set; then
3794 enableval="$enable_const"
3795 with_ext_const=$enableval
3800 echo "$ac_t""$with_ext_const" 1>&6
3801 NCURSES_CONST='/*nothing*/'
3802 if test "$with_ext_const" = yes ; then
3807 echo $ac_n "checking if you want \$NCURSES_NO_PADDING code""... $ac_c" 1>&6
3808 echo "configure:3809: checking if you want \$NCURSES_NO_PADDING code" >&5
3810 # Check whether --enable-no-padding or --disable-no-padding was given.
3811 if test "${enable_no_padding+set}" = set; then
3812 enableval="$enable_no_padding"
3813 with_no_padding=$enableval
3815 with_no_padding=$with_ext_funcs
3818 echo "$ac_t""$with_no_padding" 1>&6
3819 test "$with_no_padding" = yes && cat >> confdefs.h <<\EOF
3820 #define NCURSES_NO_PADDING 1
3824 ### use option --enable-sigwinch to turn on use of SIGWINCH logic
3825 echo $ac_n "checking if you want SIGWINCH handler""... $ac_c" 1>&6
3826 echo "configure:3827: checking if you want SIGWINCH handler" >&5
3828 # Check whether --enable-sigwinch or --disable-sigwinch was given.
3829 if test "${enable_sigwinch+set}" = set; then
3830 enableval="$enable_sigwinch"
3831 with_sigwinch=$enableval
3833 with_sigwinch=$with_ext_funcs
3836 echo "$ac_t""$with_sigwinch" 1>&6
3837 test "$with_sigwinch" = yes && cat >> confdefs.h <<\EOF
3838 #define USE_SIGWINCH 1
3842 ### use option --enable-tcap-names to allow user to define new capabilities
3843 echo $ac_n "checking if you want user-definable terminal capabilities like termcap""... $ac_c" 1>&6
3844 echo "configure:3845: checking if you want user-definable terminal capabilities like termcap" >&5
3846 # Check whether --enable-tcap-names or --disable-tcap-names was given.
3847 if test "${enable_tcap_names+set}" = set; then
3848 enableval="$enable_tcap_names"
3849 with_tcap_names=$enableval
3851 with_tcap_names=$with_ext_funcs
3854 echo "$ac_t""$with_tcap_names" 1>&6
3856 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
3859 ###############################################################################
3860 # These options are relatively safe to experiment with.
3862 echo $ac_n "checking if you want all development code""... $ac_c" 1>&6
3863 echo "configure:3864: checking if you want all development code" >&5
3865 # Check whether --with-develop or --without-develop was given.
3866 if test "${with_develop+set}" = set; then
3867 withval="$with_develop"
3868 with_develop=$withval
3873 echo "$ac_t""$with_develop" 1>&6
3875 ### use option --enable-colorfgbg to turn on use of $COLORFGBG environment
3876 echo $ac_n "checking if you want colorfgbg code""... $ac_c" 1>&6
3877 echo "configure:3878: checking if you want colorfgbg code" >&5
3879 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
3880 if test "${enable_hard_tabs+set}" = set; then
3881 enableval="$enable_hard_tabs"
3882 with_colorfgbg=$enableval
3884 with_colorfgbg=$with_develop
3887 echo "$ac_t""$with_colorfgbg" 1>&6
3888 test "$with_colorfgbg" = yes && cat >> confdefs.h <<\EOF
3889 #define USE_COLORFGBG 1
3893 ### use option --enable-hard-tabs to turn on use of hard-tabs optimize
3894 echo $ac_n "checking if you want hard-tabs code""... $ac_c" 1>&6
3895 echo "configure:3896: checking if you want hard-tabs code" >&5
3897 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
3898 if test "${enable_hard_tabs+set}" = set; then
3899 enableval="$enable_hard_tabs"
3900 with_hardtabs=$enableval
3902 with_hardtabs=$with_develop
3905 echo "$ac_t""$with_hardtabs" 1>&6
3906 test "$with_hardtabs" = yes && cat >> confdefs.h <<\EOF
3907 #define USE_HARD_TABS 1
3911 echo $ac_n "checking if you want to use restrict environment when running as root""... $ac_c" 1>&6
3912 echo "configure:3913: checking if you want to use restrict environment when running as root" >&5
3914 # Check whether --enable-root-environ or --disable-root-environ was given.
3915 if test "${enable_root_environ+set}" = set; then
3916 enableval="$enable_root_environ"
3917 with_root_environ=$enableval
3919 with_root_environ=yes
3922 echo "$ac_t""$with_root_environ" 1>&6
3923 test "$with_root_environ" = yes && cat >> confdefs.h <<\EOF
3924 #define USE_ROOT_ENVIRON 1
3928 ### use option --enable-xmc-glitch to turn on use of magic-cookie optimize
3929 echo $ac_n "checking if you want limited support for xmc""... $ac_c" 1>&6
3930 echo "configure:3931: checking if you want limited support for xmc" >&5
3932 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
3933 if test "${enable_xmc_glitch+set}" = set; then
3934 enableval="$enable_xmc_glitch"
3935 with_xmc_glitch=$enableval
3937 with_xmc_glitch=$with_develop
3940 echo "$ac_t""$with_xmc_glitch" 1>&6
3941 test "$with_xmc_glitch" = yes && cat >> confdefs.h <<\EOF
3942 #define USE_XMC_SUPPORT 1
3946 ###############################################################################
3947 # These are just experimental, probably should not be in a package:
3950 echo $ac_n "checking if you do not want to assume colors are white-on-black""... $ac_c" 1>&6
3951 echo "configure:3952: checking if you do not want to assume colors are white-on-black" >&5
3953 # Check whether --enable-assumed-color or --disable-assumed-color was given.
3954 if test "${enable_assumed_color+set}" = set; then
3955 enableval="$enable_assumed_color"
3956 with_assumed_color=$enableval
3958 with_assumed_color=yes
3961 echo "$ac_t""$with_assumed_color" 1>&6
3962 test "$with_assumed_color" = yes && cat >> confdefs.h <<\EOF
3963 #define USE_ASSUMED_COLOR 1
3967 ### use option --enable-hashmap to turn on use of hashmap scrolling logic
3968 echo $ac_n "checking if you want hashmap scrolling-optimization code""... $ac_c" 1>&6
3969 echo "configure:3970: checking if you want hashmap scrolling-optimization code" >&5
3971 # Check whether --enable-hashmap or --disable-hashmap was given.
3972 if test "${enable_hashmap+set}" = set; then
3973 enableval="$enable_hashmap"
3974 with_hashmap=$enableval
3979 echo "$ac_t""$with_hashmap" 1>&6
3980 test "$with_hashmap" = yes && cat >> confdefs.h <<\EOF
3981 #define USE_HASHMAP 1
3985 echo $ac_n "checking if you want experimental safe-sprintf code""... $ac_c" 1>&6
3986 echo "configure:3987: checking if you want experimental safe-sprintf code" >&5
3988 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
3989 if test "${enable_safe_sprintf+set}" = set; then
3990 enableval="$enable_safe_sprintf"
3991 with_safe_sprintf=$enableval
3993 with_safe_sprintf=no
3996 echo "$ac_t""$with_safe_sprintf" 1>&6
3997 test "$with_safe_sprintf" = yes && cat >> confdefs.h <<\EOF
3998 #define USE_SAFE_SPRINTF 1
4002 ### use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
4003 # when hashmap is used scroll hints are useless
4004 if test "$with_hashmap" = no ; then
4005 echo $ac_n "checking if you want to experiment without scrolling-hints code""... $ac_c" 1>&6
4006 echo "configure:4007: checking if you want to experiment without scrolling-hints code" >&5
4008 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
4009 if test "${enable_scroll_hints+set}" = set; then
4010 enableval="$enable_scroll_hints"
4011 with_scroll_hints=$enableval
4013 with_scroll_hints=yes
4016 echo "$ac_t""$with_scroll_hints" 1>&6
4017 test "$with_scroll_hints" = yes && cat >> confdefs.h <<\EOF
4018 #define USE_SCROLL_HINTS 1
4023 ### use option --enable-widec to turn on use of wide-character support
4024 echo $ac_n "checking if you want experimental wide-character code""... $ac_c" 1>&6
4025 echo "configure:4026: checking if you want experimental wide-character code" >&5
4027 # Check whether --enable-widec or --disable-widec was given.
4028 if test "${enable_widec+set}" = set; then
4029 enableval="$enable_widec"
4030 with_widec=$enableval
4035 echo "$ac_t""$with_widec" 1>&6
4036 if test "$with_widec" = yes ; then
4037 LIB_SUFFIX="w${LIB_SUFFIX}"
4038 cat >> confdefs.h <<\EOF
4039 #define USE_WIDEC_SUPPORT 1
4044 ###############################################################################
4047 ### use option --disable-echo to suppress full display compiling commands
4048 echo $ac_n "checking if you want to display full commands during build""... $ac_c" 1>&6
4049 echo "configure:4050: checking if you want to display full commands during build" >&5
4051 # Check whether --enable-echo or --disable-echo was given.
4052 if test "${enable_echo+set}" = set; then
4053 enableval="$enable_echo"
4054 with_echo=$enableval
4059 if test "$with_echo" = yes; then
4062 ECHO_LINK='@ echo linking $@ ... ;'
4063 test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
4065 echo "$ac_t""$with_echo" 1>&6
4068 ### use option --enable-warnings to turn on all gcc warnings
4069 echo $ac_n "checking if you want to see compiler warnings""... $ac_c" 1>&6
4070 echo "configure:4071: checking if you want to see compiler warnings" >&5
4072 # Check whether --enable-warnings or --disable-warnings was given.
4073 if test "${enable_warnings+set}" = set; then
4074 enableval="$enable_warnings"
4075 with_warnings=$enableval
4078 echo "$ac_t""$with_warnings" 1>&6
4080 if test -n "$with_warnings"; then
4081 ADAFLAGS="$ADAFLAGS -gnatg"
4083 if test "$GCC" = yes
4085 cat > conftest.$ac_ext <<EOF
4086 #line 4087 "configure"
4087 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
4089 echo "checking for $CC warning options" 1>&6
4090 echo "configure:4091: checking for $CC warning options" >&5
4091 cf_save_CFLAGS="$CFLAGS"
4092 EXTRA_CFLAGS="-W -Wall"
4094 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
4096 Wbad-function-cast \
4100 Wmissing-declarations \
4101 Wmissing-prototypes \
4105 Wstrict-prototypes $cf_warn_CONST
4107 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4108 if { (eval echo configure:4109: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4109 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
4110 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4111 test "$cf_opt" = Wcast-qual && EXTRA_CFLAGS="$EXTRA_CFLAGS -DXTSTRINGDEFINES"
4115 CFLAGS="$cf_save_CFLAGS"
4121 if test "$GCC" = yes
4123 cat > conftest.i <<EOF
4125 #define GCC_PRINTF 0
4130 #ifndef GCC_NORETURN
4131 #define GCC_NORETURN /* nothing */
4134 #define GCC_UNUSED /* nothing */
4137 if test "$GCC" = yes
4139 echo "checking for $CC __attribute__ directives" 1>&6
4140 echo "configure:4141: checking for $CC __attribute__ directives" >&5
4141 cat > conftest.$ac_ext <<EOF
4142 #line 4143 "configure"
4143 #include "confdefs.h"
4144 #include "conftest.h"
4145 #include "conftest.i"
4147 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
4149 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
4152 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
4154 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
4156 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
4157 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
4158 extern void foo(void) GCC_NORETURN;
4159 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
4161 for cf_attribute in scanf printf unused noreturn
4164 CF_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4166 cf_directive="__attribute__(($cf_attribute))"
4167 echo "checking for $CC $cf_directive" 1>&5
4168 case $cf_attribute in
4170 cat >conftest.h <<EOF
4171 #define GCC_$CF_ATTRIBUTE 1
4175 cat >conftest.h <<EOF
4176 #define GCC_$CF_ATTRIBUTE $cf_directive
4180 if { (eval echo configure:4181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4181 test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
4182 cat conftest.h >>confdefs.h
4184 # sed -e 's/__attr.*/\/*nothing*\//' conftest.h >>confdefs.h
4188 fgrep define conftest.i >>confdefs.h
4194 ### use option --enable-assertions to turn on generation of assertion code
4195 echo $ac_n "checking if you want to enable runtime assertions""... $ac_c" 1>&6
4196 echo "configure:4197: checking if you want to enable runtime assertions" >&5
4198 # Check whether --enable-assertions or --disable-assertions was given.
4199 if test "${enable_assertions+set}" = set; then
4200 enableval="$enable_assertions"
4201 with_assertions=$enableval
4206 echo "$ac_t""$with_assertions" 1>&6
4209 if test "$with_assertions" = no
4211 cat >> confdefs.h <<\EOF
4215 CPPFLAGS="$CPPFLAGS -DNDEBUG"
4217 ADAFLAGS="$ADAFLAGS -gnata"
4221 ### use option --disable-leaks to suppress "permanent" leaks, for testing
4223 # Check whether --enable-leaks or --disable-leaks was given.
4224 if test "${enable_leaks+set}" = set; then
4225 enableval="$enable_leaks"
4226 test "$enableval" = no && cat >> confdefs.h <<\EOF
4232 cat >> confdefs.h <<\EOF
4233 #define HAVE_NC_ALLOC_H 1
4237 ### use option --enable-expanded to generate certain macros as functions
4239 # Check whether --enable-expanded or --disable-expanded was given.
4240 if test "${enable_expanded+set}" = set; then
4241 enableval="$enable_expanded"
4242 test "$enableval" = yes && cat >> confdefs.h <<\EOF
4243 #define NCURSES_EXPANDED 1
4249 ### use option --disable-macros to suppress macros in favor of functions
4251 # Check whether --enable-macros or --disable-macros was given.
4252 if test "${enable_macros+set}" = set; then
4253 enableval="$enable_macros"
4254 test "$enableval" = no && cat >> confdefs.h <<\EOF
4255 #define NCURSES_NOMACROS 1
4261 ### Checks for libraries.
4262 echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
4263 echo "configure:4264: checking for gettimeofday" >&5
4264 if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
4265 echo $ac_n "(cached) $ac_c" 1>&6
4267 cat > conftest.$ac_ext <<EOF
4268 #line 4269 "configure"
4269 #include "confdefs.h"
4270 /* System header to define __stub macros and hopefully few prototypes,
4271 which can conflict with char gettimeofday(); below. */
4273 /* Override any gcc2 internal prototype to avoid an error. */
4274 /* We use char because int might match the return type of a gcc2
4275 builtin and then its argument prototype would still apply. */
4276 char gettimeofday();
4280 /* The GNU C library defines this for functions which it implements
4281 to always fail with ENOSYS. Some functions are actually named
4282 something starting with __ and the normal name is an alias. */
4283 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
4291 if { (eval echo configure:4292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4293 eval "ac_cv_func_gettimeofday=yes"
4295 echo "configure: failed program was:" >&5
4296 cat conftest.$ac_ext >&5
4298 eval "ac_cv_func_gettimeofday=no"
4303 if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
4304 echo "$ac_t""yes" 1>&6
4305 cat >> confdefs.h <<\EOF
4306 #define HAVE_GETTIMEOFDAY 1
4310 echo "$ac_t""no" 1>&6
4313 echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
4314 echo "configure:4315: checking for gettimeofday in -lbsd" >&5
4315 ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
4316 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4317 echo $ac_n "(cached) $ac_c" 1>&6
4319 ac_save_LIBS="$LIBS"
4321 cat > conftest.$ac_ext <<EOF
4322 #line 4323 "configure"
4323 #include "confdefs.h"
4324 /* Override any gcc2 internal prototype to avoid an error. */
4325 /* We use char because int might match the return type of a gcc2
4326 builtin and then its argument prototype would still apply. */
4327 char gettimeofday();
4333 if { (eval echo configure:4334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4335 eval "ac_cv_lib_$ac_lib_var=yes"
4337 echo "configure: failed program was:" >&5
4338 cat conftest.$ac_ext >&5
4340 eval "ac_cv_lib_$ac_lib_var=no"
4343 LIBS="$ac_save_LIBS"
4346 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4347 echo "$ac_t""yes" 1>&6
4348 cat >> confdefs.h <<\EOF
4349 #define HAVE_GETTIMEOFDAY 1
4354 echo "$ac_t""no" 1>&6
4360 echo $ac_n "checking if -lm needed for math functions""... $ac_c" 1>&6
4361 echo "configure:4362: checking if -lm needed for math functions" >&5
4362 if eval "test \"`echo '$''{'cf_cv_need_libm'+set}'`\" = set"; then
4363 echo $ac_n "(cached) $ac_c" 1>&6
4366 cat > conftest.$ac_ext <<EOF
4367 #line 4368 "configure"
4368 #include "confdefs.h"
4374 double x = rand(); printf("result = %g\n", sin(x))
4377 if { (eval echo configure:4378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4381 echo "configure: failed program was:" >&5
4382 cat conftest.$ac_ext >&5
4389 echo "$ac_t""$cf_cv_need_libm" 1>&6
4390 if test "$cf_cv_need_libm" = yes
4397 ### Checks for header files.
4398 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4399 echo "configure:4400: checking for ANSI C header files" >&5
4400 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4401 echo $ac_n "(cached) $ac_c" 1>&6
4403 cat > conftest.$ac_ext <<EOF
4404 #line 4405 "configure"
4405 #include "confdefs.h"
4411 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4412 { (eval echo configure:4413: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4413 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4414 if test -z "$ac_err"; then
4416 ac_cv_header_stdc=yes
4419 echo "configure: failed program was:" >&5
4420 cat conftest.$ac_ext >&5
4422 ac_cv_header_stdc=no
4426 if test $ac_cv_header_stdc = yes; then
4427 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4428 cat > conftest.$ac_ext <<EOF
4429 #line 4430 "configure"
4430 #include "confdefs.h"
4433 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4434 egrep "memchr" >/dev/null 2>&1; then
4438 ac_cv_header_stdc=no
4444 if test $ac_cv_header_stdc = yes; then
4445 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4446 cat > conftest.$ac_ext <<EOF
4447 #line 4448 "configure"
4448 #include "confdefs.h"
4451 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4452 egrep "free" >/dev/null 2>&1; then
4456 ac_cv_header_stdc=no
4462 if test $ac_cv_header_stdc = yes; then
4463 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4464 if test "$cross_compiling" = yes; then
4467 cat > conftest.$ac_ext <<EOF
4468 #line 4469 "configure"
4469 #include "confdefs.h"
4471 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4472 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4473 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4474 int main () { int i; for (i = 0; i < 256; i++)
4475 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4479 if { (eval echo configure:4480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4483 echo "configure: failed program was:" >&5
4484 cat conftest.$ac_ext >&5
4486 ac_cv_header_stdc=no
4494 echo "$ac_t""$ac_cv_header_stdc" 1>&6
4495 if test $ac_cv_header_stdc = yes; then
4496 cat >> confdefs.h <<\EOF
4497 #define STDC_HEADERS 1
4503 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
4505 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4506 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
4507 echo "configure:4508: checking for $ac_hdr that defines DIR" >&5
4508 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
4509 echo $ac_n "(cached) $ac_c" 1>&6
4511 cat > conftest.$ac_ext <<EOF
4512 #line 4513 "configure"
4513 #include "confdefs.h"
4514 #include <sys/types.h>
4520 if { (eval echo configure:4521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4522 eval "ac_cv_header_dirent_$ac_safe=yes"
4524 echo "configure: failed program was:" >&5
4525 cat conftest.$ac_ext >&5
4527 eval "ac_cv_header_dirent_$ac_safe=no"
4531 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
4532 echo "$ac_t""yes" 1>&6
4533 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4534 cat >> confdefs.h <<EOF
4535 #define $ac_tr_hdr 1
4537 ac_header_dirent=$ac_hdr; break
4539 echo "$ac_t""no" 1>&6
4542 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4543 if test $ac_header_dirent = dirent.h; then
4544 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
4545 echo "configure:4546: checking for opendir in -ldir" >&5
4546 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
4547 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4548 echo $ac_n "(cached) $ac_c" 1>&6
4550 ac_save_LIBS="$LIBS"
4552 cat > conftest.$ac_ext <<EOF
4553 #line 4554 "configure"
4554 #include "confdefs.h"
4555 /* Override any gcc2 internal prototype to avoid an error. */
4556 /* We use char because int might match the return type of a gcc2
4557 builtin and then its argument prototype would still apply. */
4564 if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4566 eval "ac_cv_lib_$ac_lib_var=yes"
4568 echo "configure: failed program was:" >&5
4569 cat conftest.$ac_ext >&5
4571 eval "ac_cv_lib_$ac_lib_var=no"
4574 LIBS="$ac_save_LIBS"
4577 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4578 echo "$ac_t""yes" 1>&6
4581 echo "$ac_t""no" 1>&6
4585 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
4586 echo "configure:4587: checking for opendir in -lx" >&5
4587 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
4588 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4589 echo $ac_n "(cached) $ac_c" 1>&6
4591 ac_save_LIBS="$LIBS"
4593 cat > conftest.$ac_ext <<EOF
4594 #line 4595 "configure"
4595 #include "confdefs.h"
4596 /* Override any gcc2 internal prototype to avoid an error. */
4597 /* We use char because int might match the return type of a gcc2
4598 builtin and then its argument prototype would still apply. */
4605 if { (eval echo configure:4606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4607 eval "ac_cv_lib_$ac_lib_var=yes"
4609 echo "configure: failed program was:" >&5
4610 cat conftest.$ac_ext >&5
4612 eval "ac_cv_lib_$ac_lib_var=no"
4615 LIBS="$ac_save_LIBS"
4618 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4619 echo "$ac_t""yes" 1>&6
4622 echo "$ac_t""no" 1>&6
4628 echo $ac_n "checking for regular-expression headers""... $ac_c" 1>&6
4629 echo "configure:4630: checking for regular-expression headers" >&5
4630 if eval "test \"`echo '$''{'cf_cv_regex'+set}'`\" = set"; then
4631 echo $ac_n "(cached) $ac_c" 1>&6
4634 cat > conftest.$ac_ext <<EOF
4635 #line 4636 "configure"
4636 #include "confdefs.h"
4637 #include <sys/types.h>
4642 int x = regcomp(p, "", 0);
4643 int y = regexec(p, "", 0, 0, 0);
4648 if { (eval echo configure:4649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4650 cf_cv_regex="regex.h"
4652 echo "configure: failed program was:" >&5
4653 cat conftest.$ac_ext >&5
4656 cat > conftest.$ac_ext <<EOF
4657 #line 4658 "configure"
4658 #include "confdefs.h"
4662 char *p = compile("", "", "", 0);
4663 int x = step("", "");
4667 if { (eval echo configure:4668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4669 cf_cv_regex="regexp.h"
4671 echo "configure: failed program was:" >&5
4672 cat conftest.$ac_ext >&5
4675 cf_save_LIBS="$LIBS"
4677 cat > conftest.$ac_ext <<EOF
4678 #line 4679 "configure"
4679 #include "confdefs.h"
4680 #include <regexpr.h>
4683 char *p = compile("", "", "");
4684 int x = step("", "");
4688 if { (eval echo configure:4689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4690 cf_cv_regex="regexpr.h"
4692 echo "configure: failed program was:" >&5
4693 cat conftest.$ac_ext >&5
4695 LIBS="$cf_save_LIBS"
4705 echo "$ac_t""$cf_cv_regex" 1>&6
4706 case $cf_cv_regex in
4707 regex.h) cat >> confdefs.h <<\EOF
4708 #define HAVE_REGEX_H_FUNCS 1
4711 regexp.h) cat >> confdefs.h <<\EOF
4712 #define HAVE_REGEXP_H_FUNCS 1
4715 regexpr.h) cat >> confdefs.h <<\EOF
4716 #define HAVE_REGEXPR_H_FUNCS 1
4740 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4741 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4742 echo "configure:4743: checking for $ac_hdr" >&5
4743 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4744 echo $ac_n "(cached) $ac_c" 1>&6
4746 cat > conftest.$ac_ext <<EOF
4747 #line 4748 "configure"
4748 #include "confdefs.h"
4751 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4752 { (eval echo configure:4753: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4753 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4754 if test -z "$ac_err"; then
4756 eval "ac_cv_header_$ac_safe=yes"
4759 echo "configure: failed program was:" >&5
4760 cat conftest.$ac_ext >&5
4762 eval "ac_cv_header_$ac_safe=no"
4766 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4767 echo "$ac_t""yes" 1>&6
4768 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4769 cat >> confdefs.h <<EOF
4770 #define $ac_tr_hdr 1
4774 echo "$ac_t""no" 1>&6
4779 # check for ISC (this may also define _POSIX_SOURCE)
4780 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
4781 if test "$ISC" = yes ; then
4782 echo $ac_n "checking for main in -lcposix""... $ac_c" 1>&6
4783 echo "configure:4784: checking for main in -lcposix" >&5
4784 ac_lib_var=`echo cposix'_'main | sed 'y%./+-%__p_%'`
4785 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4786 echo $ac_n "(cached) $ac_c" 1>&6
4788 ac_save_LIBS="$LIBS"
4789 LIBS="-lcposix $LIBS"
4790 cat > conftest.$ac_ext <<EOF
4791 #line 4792 "configure"
4792 #include "confdefs.h"
4798 if { (eval echo configure:4799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4800 eval "ac_cv_lib_$ac_lib_var=yes"
4802 echo "configure: failed program was:" >&5
4803 cat conftest.$ac_ext >&5
4805 eval "ac_cv_lib_$ac_lib_var=no"
4808 LIBS="$ac_save_LIBS"
4811 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4812 echo "$ac_t""yes" 1>&6
4813 ac_tr_lib=HAVE_LIB`echo cposix | sed -e 's/[^a-zA-Z0-9_]/_/g' \
4814 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
4815 cat >> confdefs.h <<EOF
4816 #define $ac_tr_lib 1
4819 LIBS="-lcposix $LIBS"
4822 echo "$ac_t""no" 1>&6
4825 echo $ac_n "checking for bzero in -linet""... $ac_c" 1>&6
4826 echo "configure:4827: checking for bzero in -linet" >&5
4827 ac_lib_var=`echo inet'_'bzero | sed 'y%./+-%__p_%'`
4828 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4829 echo $ac_n "(cached) $ac_c" 1>&6
4831 ac_save_LIBS="$LIBS"
4833 cat > conftest.$ac_ext <<EOF
4834 #line 4835 "configure"
4835 #include "confdefs.h"
4836 /* Override any gcc2 internal prototype to avoid an error. */
4837 /* We use char because int might match the return type of a gcc2
4838 builtin and then its argument prototype would still apply. */
4845 if { (eval echo configure:4846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4847 eval "ac_cv_lib_$ac_lib_var=yes"
4849 echo "configure: failed program was:" >&5
4850 cat conftest.$ac_ext >&5
4852 eval "ac_cv_lib_$ac_lib_var=no"
4855 LIBS="$ac_save_LIBS"
4858 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4859 echo "$ac_t""yes" 1>&6
4862 echo "$ac_t""no" 1>&6
4867 echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
4868 echo "configure:4869: checking if sys/time.h works with sys/select.h" >&5
4869 if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
4870 echo $ac_n "(cached) $ac_c" 1>&6
4873 cat > conftest.$ac_ext <<EOF
4874 #line 4875 "configure"
4875 #include "confdefs.h"
4877 #include <sys/types.h>
4878 #ifdef HAVE_SYS_TIME_H
4879 #include <sys/time.h>
4881 #ifdef HAVE_SYS_SELECT_H
4882 #include <sys/select.h>
4889 if { (eval echo configure:4890: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4891 cf_cv_sys_time_select=yes
4893 echo "configure: failed program was:" >&5
4894 cat conftest.$ac_ext >&5
4896 cf_cv_sys_time_select=no
4902 echo "$ac_t""$cf_cv_sys_time_select" 1>&6
4903 test "$cf_cv_sys_time_select" = yes && cat >> confdefs.h <<\EOF
4904 #define HAVE_SYS_TIME_SELECT 1
4909 ### checks for compiler characteristics
4911 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4912 ac_cpp='$CPP $CPPFLAGS'
4913 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4914 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4915 cross_compiling=$ac_cv_prog_cc_cross
4917 echo $ac_n "checking for working const""... $ac_c" 1>&6
4918 echo "configure:4919: checking for working const" >&5
4919 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
4920 echo $ac_n "(cached) $ac_c" 1>&6
4922 cat > conftest.$ac_ext <<EOF
4923 #line 4924 "configure"
4924 #include "confdefs.h"
4928 /* Ultrix mips cc rejects this. */
4929 typedef int charset[2]; const charset x;
4930 /* SunOS 4.1.1 cc rejects this. */
4931 char const *const *ccp;
4933 /* NEC SVR4.0.2 mips cc rejects this. */
4934 struct point {int x, y;};
4935 static struct point const zero = {0,0};
4936 /* AIX XL C 1.02.0.0 rejects this.
4937 It does not let you subtract one const X* pointer from another in an arm
4938 of an if-expression whose if-part is not a constant expression */
4939 const char *g = "string";
4940 ccp = &g + (g ? g-g : 0);
4941 /* HPUX 7.0 cc rejects these. */
4944 ccp = (char const *const *) p;
4945 { /* SCO 3.2v4 cc rejects this. */
4947 char const *s = 0 ? (char *) 0 : (char const *) 0;
4951 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
4953 const int *foo = &x[0];
4956 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4957 typedef const int *iptr;
4961 { /* AIX XL C 1.02.0.0 rejects this saying
4962 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4963 struct s { int j; const int *ap[3]; };
4964 struct s *b; b->j = 5;
4966 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4972 if { (eval echo configure:4973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4976 echo "configure: failed program was:" >&5
4977 cat conftest.$ac_ext >&5
4984 echo "$ac_t""$ac_cv_c_const" 1>&6
4985 if test $ac_cv_c_const = no; then
4986 cat >> confdefs.h <<\EOF
4992 echo $ac_n "checking for inline""... $ac_c" 1>&6
4993 echo "configure:4994: checking for inline" >&5
4994 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
4995 echo $ac_n "(cached) $ac_c" 1>&6
4998 for ac_kw in inline __inline__ __inline; do
4999 cat > conftest.$ac_ext <<EOF
5000 #line 5001 "configure"
5001 #include "confdefs.h"
5007 if { (eval echo configure:5008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5009 ac_cv_c_inline=$ac_kw; break
5011 echo "configure: failed program was:" >&5
5012 cat conftest.$ac_ext >&5
5019 echo "$ac_t""$ac_cv_c_inline" 1>&6
5020 case "$ac_cv_c_inline" in
5022 no) cat >> confdefs.h <<\EOF
5026 *) cat >> confdefs.h <<EOF
5027 #define inline $ac_cv_c_inline
5032 test "$ac_cv_c_inline" != no && cat >> confdefs.h <<\EOF
5033 #define CC_HAS_INLINE_FUNCS 1
5038 echo $ac_n "checking if unsigned literals are legal""... $ac_c" 1>&6
5039 echo "configure:5040: checking if unsigned literals are legal" >&5
5040 if eval "test \"`echo '$''{'cf_cv_unsigned_literals'+set}'`\" = set"; then
5041 echo $ac_n "(cached) $ac_c" 1>&6
5044 cat > conftest.$ac_ext <<EOF
5045 #line 5046 "configure"
5046 #include "confdefs.h"
5049 long x = 1L + 1UL + 1U + 1
5052 if { (eval echo configure:5053: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5054 cf_cv_unsigned_literals=yes
5056 echo "configure: failed program was:" >&5
5057 cat conftest.$ac_ext >&5
5059 cf_cv_unsigned_literals=no
5065 echo "$ac_t""$cf_cv_unsigned_literals" 1>&6
5069 echo $ac_n "checking for type of chtype""... $ac_c" 1>&6
5070 echo "configure:5071: checking for type of chtype" >&5
5071 if eval "test \"`echo '$''{'cf_cv_typeof_chtype'+set}'`\" = set"; then
5072 echo $ac_n "(cached) $ac_c" 1>&6
5075 if test "$cross_compiling" = yes; then
5076 cf_cv_typeof_chtype=long
5078 cat > conftest.$ac_ext <<EOF
5079 #line 5080 "configure"
5080 #include "confdefs.h"
5082 #ifdef USE_WIDEC_SUPPORT
5083 #include <stddef.h> /* we want wchar_t */
5084 #define WANT_BITS 39
5086 #define WANT_BITS 31
5091 FILE *fp = fopen("cf_test.out", "w");
5093 char *result = "long";
5094 #ifdef USE_WIDEC_SUPPORT
5096 * If wchar_t is smaller than a long, it must be an int or a
5097 * short. We prefer not to use a short anyway.
5099 if (sizeof(unsigned long) > sizeof(wchar_t))
5102 if (sizeof(unsigned long) > sizeof(unsigned int)) {
5105 for (n = 0; n < WANT_BITS; n++) {
5106 unsigned int y = (x >> n);
5107 if (y != 1 || x == 0) {
5113 * If x is nonzero, an int is big enough for the bits
5116 result = (x != 0) ? "int" : "long";
5125 if { (eval echo configure:5126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5127 cf_cv_typeof_chtype=`cat cf_test.out`
5129 echo "configure: failed program was:" >&5
5130 cat conftest.$ac_ext >&5
5132 cf_cv_typeof_chtype=long
5141 echo "$ac_t""$cf_cv_typeof_chtype" 1>&6
5144 cat >> confdefs.h <<EOF
5145 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
5150 test "$cf_cv_unsigned_literals" = yes && cf_cv_1UL="${cf_cv_1UL}U"
5151 test "$cf_cv_typeof_chtype" = long && cf_cv_1UL="${cf_cv_1UL}L"
5157 echo $ac_n "checking for number of bits in chtype""... $ac_c" 1>&6
5158 echo "configure:5159: checking for number of bits in chtype" >&5
5159 if eval "test \"`echo '$''{'cf_cv_shift_limit'+set}'`\" = set"; then
5160 echo $ac_n "(cached) $ac_c" 1>&6
5163 if test "$cross_compiling" = yes; then
5164 cf_cv_shift_limit=32
5166 cat > conftest.$ac_ext <<EOF
5167 #line 5168 "configure"
5168 #include "confdefs.h"
5173 FILE *fp = fopen("cf_test.out", "w");
5176 unsigned TYPEOF_CHTYPE x = 1L;
5177 for (n = 0; ; n++) {
5178 unsigned long y = (x >> n);
5179 if (y != 1 || x == 0)
5183 fprintf(fp, "%d", n);
5190 if { (eval echo configure:5191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5192 cf_cv_shift_limit=`cat cf_test.out`
5194 echo "configure: failed program was:" >&5
5195 cat conftest.$ac_ext >&5
5197 cf_cv_shift_limit=32
5206 echo "$ac_t""$cf_cv_shift_limit" 1>&6
5209 echo $ac_n "checking for width of character-index""... $ac_c" 1>&6
5210 echo "configure:5211: checking for width of character-index" >&5
5211 if eval "test \"`echo '$''{'cf_cv_widec_shift'+set}'`\" = set"; then
5212 echo $ac_n "(cached) $ac_c" 1>&6
5215 if test ".$with_widec" = ".yes" ; then
5217 if ( expr $cf_cv_shift_limit \> $cf_attrs_width >/dev/null )
5219 cf_cv_widec_shift=`expr 16 + $cf_cv_shift_limit - $cf_attrs_width`
5221 cf_cv_widec_shift=16
5229 echo "$ac_t""$cf_cv_widec_shift" 1>&6
5233 ### Checks for external-data
5236 echo $ac_n "checking if external errno is declared""... $ac_c" 1>&6
5237 echo "configure:5238: checking if external errno is declared" >&5
5238 if eval "test \"`echo '$''{'cf_cv_dcl_errno'+set}'`\" = set"; then
5239 echo $ac_n "(cached) $ac_c" 1>&6
5242 cat > conftest.$ac_ext <<EOF
5243 #line 5244 "configure"
5244 #include "confdefs.h"
5246 #ifdef HAVE_STDLIB_H
5250 #include <sys/types.h>
5253 long x = (long) errno
5256 if { (eval echo configure:5257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5258 eval 'cf_cv_dcl_'errno'=yes'
5260 echo "configure: failed program was:" >&5
5261 cat conftest.$ac_ext >&5
5263 eval 'cf_cv_dcl_'errno'=no'
5270 eval 'cf_result=$cf_cv_dcl_'errno
5271 echo "$ac_t""$cf_result" 1>&6
5273 if test "$cf_result" = no ; then
5274 eval 'cf_result=DECL_'errno
5276 cf_result=`echo "$cf_result" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5278 cat >> confdefs.h <<EOF
5279 #define $cf_result 1
5284 # It's possible (for near-UNIX clones) that the data doesn't exist
5286 echo $ac_n "checking if external errno exists""... $ac_c" 1>&6
5287 echo "configure:5288: checking if external errno exists" >&5
5288 if eval "test \"`echo '$''{'cf_cv_have_errno'+set}'`\" = set"; then
5289 echo $ac_n "(cached) $ac_c" 1>&6
5292 cat > conftest.$ac_ext <<EOF
5293 #line 5294 "configure"
5294 #include "confdefs.h"
5303 if { (eval echo configure:5304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5305 eval 'cf_cv_have_'errno'=yes'
5307 echo "configure: failed program was:" >&5
5308 cat conftest.$ac_ext >&5
5310 eval 'cf_cv_have_'errno'=no'
5316 eval 'cf_result=$cf_cv_have_'errno
5317 echo "$ac_t""$cf_result" 1>&6
5319 if test "$cf_result" = yes ; then
5320 eval 'cf_result=HAVE_'errno
5322 cf_result=`echo "$cf_result" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5324 cat >> confdefs.h <<EOF
5325 #define $cf_result 1
5334 echo $ac_n "checking if data-only library module links""... $ac_c" 1>&6
5335 echo "configure:5336: checking if data-only library module links" >&5
5336 if eval "test \"`echo '$''{'cf_cv_link_dataonly'+set}'`\" = set"; then
5337 echo $ac_n "(cached) $ac_c" 1>&6
5341 cat >conftest.$ac_ext <<EOF
5342 #line 5343 "configure"
5343 int testdata[3] = { 123, 456, 789 };
5345 if { (eval echo configure:5346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } ; then
5346 mv conftest.o data.o && \
5347 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
5349 rm -f conftest.$ac_ext data.o
5350 cat >conftest.$ac_ext <<EOF
5351 #line 5352 "configure"
5355 exit(1); /* I'm told this linker is broken */
5357 extern int testdata[3];
5358 return testdata[0] == 123
5359 && testdata[1] == 456
5360 && testdata[2] == 789;
5364 if { (eval echo configure:5365: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5365 mv conftest.o func.o && \
5366 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
5368 rm -f conftest.$ac_ext func.o
5369 ( eval $ac_cv_prog_RANLIB conftest.a ) 2>&5 >/dev/null
5371 LIBS="conftest.a $LIBS"
5372 if test "$cross_compiling" = yes; then
5373 cf_cv_link_dataonly=unknown
5375 cat > conftest.$ac_ext <<EOF
5376 #line 5377 "configure"
5377 #include "confdefs.h"
5381 extern int testfunc();
5386 if { (eval echo configure:5387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5388 cf_cv_link_dataonly=yes
5390 echo "configure: failed program was:" >&5
5391 cat conftest.$ac_ext >&5
5393 cf_cv_link_dataonly=no
5402 echo "$ac_t""$cf_cv_link_dataonly" 1>&6
5403 test "$cf_cv_link_dataonly" = no && cat >> confdefs.h <<\EOF
5404 #define BROKEN_LINKER 1
5409 ### Checks for library functions.
5436 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
5437 echo "configure:5438: checking for $ac_func" >&5
5438 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
5439 echo $ac_n "(cached) $ac_c" 1>&6
5441 cat > conftest.$ac_ext <<EOF
5442 #line 5443 "configure"
5443 #include "confdefs.h"
5444 /* System header to define __stub macros and hopefully few prototypes,
5445 which can conflict with char $ac_func(); below. */
5447 /* Override any gcc2 internal prototype to avoid an error. */
5448 /* We use char because int might match the return type of a gcc2
5449 builtin and then its argument prototype would still apply. */
5454 /* The GNU C library defines this for functions which it implements
5455 to always fail with ENOSYS. Some functions are actually named
5456 something starting with __ and the normal name is an alias. */
5457 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5465 if { (eval echo configure:5466: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5467 eval "ac_cv_func_$ac_func=yes"
5469 echo "configure: failed program was:" >&5
5470 cat conftest.$ac_ext >&5
5472 eval "ac_cv_func_$ac_func=no"
5477 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
5478 echo "$ac_t""yes" 1>&6
5479 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
5480 cat >> confdefs.h <<EOF
5481 #define $ac_tr_func 1
5485 echo "$ac_t""no" 1>&6
5489 if test "$with_getcap" = "yes" ; then
5491 echo $ac_n "checking for terminal-capability database functions""... $ac_c" 1>&6
5492 echo "configure:5493: checking for terminal-capability database functions" >&5
5493 if eval "test \"`echo '$''{'cf_cv_cgetent'+set}'`\" = set"; then
5494 echo $ac_n "(cached) $ac_c" 1>&6
5497 cat > conftest.$ac_ext <<EOF
5498 #line 5499 "configure"
5499 #include "confdefs.h"
5506 char *db_array = temp;
5507 cgetent(&buf, /* int *, */ &db_array, "vt100");
5508 cgetcap(buf, "tc", '=');
5509 cgetmatch(buf, "tc");
5513 if { (eval echo configure:5514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5517 echo "configure: failed program was:" >&5
5518 cat conftest.$ac_ext >&5
5526 echo "$ac_t""$cf_cv_cgetent" 1>&6
5527 test "$cf_cv_cgetent" = yes && cat >> confdefs.h <<\EOF
5528 #define HAVE_BSD_CGETENT 1
5535 echo $ac_n "checking for isascii""... $ac_c" 1>&6
5536 echo "configure:5537: checking for isascii" >&5
5537 if eval "test \"`echo '$''{'cf_cv_have_isascii'+set}'`\" = set"; then
5538 echo $ac_n "(cached) $ac_c" 1>&6
5541 cat > conftest.$ac_ext <<EOF
5542 #line 5543 "configure"
5543 #include "confdefs.h"
5546 int x = isascii(' ')
5549 if { (eval echo configure:5550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5551 cf_cv_have_isascii=yes
5553 echo "configure: failed program was:" >&5
5554 cat conftest.$ac_ext >&5
5556 cf_cv_have_isascii=no
5561 echo "$ac_t""$cf_cv_have_isascii" 1>&6
5562 test "$cf_cv_have_isascii" = yes && cat >> confdefs.h <<\EOF
5563 #define HAVE_ISASCII 1
5568 if test "$ac_cv_func_sigaction" = yes; then
5569 echo $ac_n "checking whether sigaction needs _POSIX_SOURCE""... $ac_c" 1>&6
5570 echo "configure:5571: checking whether sigaction needs _POSIX_SOURCE" >&5
5571 cat > conftest.$ac_ext <<EOF
5572 #line 5573 "configure"
5573 #include "confdefs.h"
5575 #include <sys/types.h>
5578 struct sigaction act
5581 if { (eval echo configure:5582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5585 echo "configure: failed program was:" >&5
5586 cat conftest.$ac_ext >&5
5589 cat > conftest.$ac_ext <<EOF
5590 #line 5591 "configure"
5591 #include "confdefs.h"
5593 #define _POSIX_SOURCE
5594 #include <sys/types.h>
5597 struct sigaction act
5600 if { (eval echo configure:5601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5603 cat >> confdefs.h <<\EOF
5604 #define SVR4_ACTION 1
5608 echo "configure: failed program was:" >&5
5609 cat conftest.$ac_ext >&5
5616 echo "$ac_t""$sigact_bad" 1>&6
5626 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5627 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5628 echo "configure:5629: checking for $ac_hdr" >&5
5629 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5630 echo $ac_n "(cached) $ac_c" 1>&6
5632 cat > conftest.$ac_ext <<EOF
5633 #line 5634 "configure"
5634 #include "confdefs.h"
5637 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5638 { (eval echo configure:5639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5639 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5640 if test -z "$ac_err"; then
5642 eval "ac_cv_header_$ac_safe=yes"
5645 echo "configure: failed program was:" >&5
5646 cat conftest.$ac_ext >&5
5648 eval "ac_cv_header_$ac_safe=no"
5652 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5653 echo "$ac_t""yes" 1>&6
5654 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5655 cat >> confdefs.h <<EOF
5656 #define $ac_tr_hdr 1
5660 echo "$ac_t""no" 1>&6
5664 if test "$ISC" = yes ; then
5665 for ac_hdr in sys/termio.h
5667 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5668 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5669 echo "configure:5670: checking for $ac_hdr" >&5
5670 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5671 echo $ac_n "(cached) $ac_c" 1>&6
5673 cat > conftest.$ac_ext <<EOF
5674 #line 5675 "configure"
5675 #include "confdefs.h"
5678 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5679 { (eval echo configure:5680: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5680 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5681 if test -z "$ac_err"; then
5683 eval "ac_cv_header_$ac_safe=yes"
5686 echo "configure: failed program was:" >&5
5687 cat conftest.$ac_ext >&5
5689 eval "ac_cv_header_$ac_safe=no"
5693 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5694 echo "$ac_t""yes" 1>&6
5695 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5696 cat >> confdefs.h <<EOF
5697 #define $ac_tr_hdr 1
5701 echo "$ac_t""no" 1>&6
5706 if test "$ac_cv_header_termios_h" = yes ; then
5709 termios_bad=dunno ;;
5710 *) termios_bad=maybe ;;
5712 if test "$termios_bad" = maybe ; then
5713 echo $ac_n "checking whether termios.h needs _POSIX_SOURCE""... $ac_c" 1>&6
5714 echo "configure:5715: checking whether termios.h needs _POSIX_SOURCE" >&5
5715 cat > conftest.$ac_ext <<EOF
5716 #line 5717 "configure"
5717 #include "confdefs.h"
5718 #include <termios.h>
5720 struct termios foo; int x = foo.c_iflag
5723 if { (eval echo configure:5724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5727 echo "configure: failed program was:" >&5
5728 cat conftest.$ac_ext >&5
5731 cat > conftest.$ac_ext <<EOF
5732 #line 5733 "configure"
5733 #include "confdefs.h"
5735 #define _POSIX_SOURCE
5736 #include <termios.h>
5738 struct termios foo; int x = foo.c_iflag
5741 if { (eval echo configure:5742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5745 echo "configure: failed program was:" >&5
5746 cat conftest.$ac_ext >&5
5748 termios_bad=yes cat >> confdefs.h <<\EOF
5749 #define SVR4_TERMIO 1
5757 echo "$ac_t""$termios_bad" 1>&6
5763 echo $ac_n "checking for tcgetattr""... $ac_c" 1>&6
5764 echo "configure:5765: checking for tcgetattr" >&5
5765 if eval "test \"`echo '$''{'cf_cv_have_tcgetattr'+set}'`\" = set"; then
5766 echo $ac_n "(cached) $ac_c" 1>&6
5769 cat > conftest.$ac_ext <<EOF
5770 #line 5771 "configure"
5771 #include "confdefs.h"
5773 #include <sys/types.h>
5774 #ifdef HAVE_UNISTD_H
5777 #ifdef HAVE_TERMIOS_H
5778 #include <termios.h>
5779 #define TTY struct termios
5781 #ifdef HAVE_TERMIO_H
5783 #define TTY struct termio
5793 if { (eval echo configure:5794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5795 cf_cv_have_tcgetattr=yes
5797 echo "configure: failed program was:" >&5
5798 cat conftest.$ac_ext >&5
5800 cf_cv_have_tcgetattr=no
5805 echo "$ac_t""$cf_cv_have_tcgetattr" 1>&6
5806 test "$cf_cv_have_tcgetattr" = yes && cat >> confdefs.h <<\EOF
5807 #define HAVE_TCGETATTR 1
5812 if test "$cross_compiling" = yes ; then
5813 echo "configure: warning: cross compiling: assume setvbuf params not reversed" 1>&2
5815 echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6
5816 echo "configure:5817: checking whether setvbuf arguments are reversed" >&5
5817 if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then
5818 echo $ac_n "(cached) $ac_c" 1>&6
5820 if test "$cross_compiling" = yes; then
5821 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
5823 cat > conftest.$ac_ext <<EOF
5824 #line 5825 "configure"
5825 #include "confdefs.h"
5827 /* If setvbuf has the reversed format, exit 0. */
5829 /* This call has the arguments reversed.
5830 A reversed system may check and see that the address of main
5831 is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */
5832 if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
5835 exit(0); /* Non-reversed systems segv here. */
5838 if { (eval echo configure:5839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5840 ac_cv_func_setvbuf_reversed=yes
5842 echo "configure: failed program was:" >&5
5843 cat conftest.$ac_ext >&5
5845 ac_cv_func_setvbuf_reversed=no
5850 rm -f core core.* *.core
5853 echo "$ac_t""$ac_cv_func_setvbuf_reversed" 1>&6
5854 if test $ac_cv_func_setvbuf_reversed = yes; then
5855 cat >> confdefs.h <<\EOF
5856 #define SETVBUF_REVERSED 1
5862 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
5863 echo "configure:5864: checking return type of signal handlers" >&5
5864 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
5865 echo $ac_n "(cached) $ac_c" 1>&6
5867 cat > conftest.$ac_ext <<EOF
5868 #line 5869 "configure"
5869 #include "confdefs.h"
5870 #include <sys/types.h>
5876 extern "C" void (*signal (int, void (*)(int)))(int);
5878 void (*signal ()) ();
5885 if { (eval echo configure:5886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5887 ac_cv_type_signal=void
5889 echo "configure: failed program was:" >&5
5890 cat conftest.$ac_ext >&5
5892 ac_cv_type_signal=int
5897 echo "$ac_t""$ac_cv_type_signal" 1>&6
5898 cat >> confdefs.h <<EOF
5899 #define RETSIGTYPE $ac_cv_type_signal
5904 echo $ac_n "checking for type sigaction_t""... $ac_c" 1>&6
5905 echo "configure:5906: checking for type sigaction_t" >&5
5906 if eval "test \"`echo '$''{'cf_cv_type_sigaction'+set}'`\" = set"; then
5907 echo $ac_n "(cached) $ac_c" 1>&6
5910 cat > conftest.$ac_ext <<EOF
5911 #line 5912 "configure"
5912 #include "confdefs.h"
5919 if { (eval echo configure:5920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5921 cf_cv_type_sigaction=yes
5923 echo "configure: failed program was:" >&5
5924 cat conftest.$ac_ext >&5
5926 cf_cv_type_sigaction=no
5931 echo "$ac_t""$cf_cv_type_sigaction" 1>&6
5932 test "$cf_cv_type_sigaction" = yes && cat >> confdefs.h <<\EOF
5933 #define HAVE_TYPE_SIGACTION 1
5939 echo $ac_n "checking declaration of size-change""... $ac_c" 1>&6
5940 echo "configure:5941: checking declaration of size-change" >&5
5941 if eval "test \"`echo '$''{'cf_cv_sizechange'+set}'`\" = set"; then
5942 echo $ac_n "(cached) $ac_c" 1>&6
5945 cf_cv_sizechange=unknown
5946 cf_save_CFLAGS="$CFLAGS"
5948 for cf_opts in "" "NEED_PTEM_H"
5951 CFLAGS="$cf_save_CFLAGS"
5952 test -n "$cf_opts" && CFLAGS="$CFLAGS -D$cf_opts"
5953 cat > conftest.$ac_ext <<EOF
5954 #line 5955 "configure"
5955 #include "confdefs.h"
5956 #include <sys/types.h>
5957 #ifdef HAVE_TERMIOS_H
5958 #include <termios.h>
5960 #ifdef HAVE_TERMIO_H
5965 /* This is a workaround for SCO: they neglected to define struct winsize in
5966 * termios.h -- it's only in termio.h and ptem.h
5968 #include <sys/stream.h>
5969 #include <sys/ptem.h>
5971 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
5972 #include <sys/ioctl.h>
5978 struct ttysize win; /* FIXME: what system is this? */
5979 int y = win.ts_lines;
5980 int x = win.ts_cols;
5987 no TIOCGSIZE or TIOCGWINSZ
5988 #endif /* TIOCGWINSZ */
5989 #endif /* TIOCGSIZE */
5993 if { (eval echo configure:5994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5995 cf_cv_sizechange=yes
5997 echo "configure: failed program was:" >&5
5998 cat conftest.$ac_ext >&5
6004 CFLAGS="$cf_save_CFLAGS"
6005 if test "$cf_cv_sizechange" = yes ; then
6006 echo "size-change succeeded ($cf_opts)" >&5
6007 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
6014 echo "$ac_t""$cf_cv_sizechange" 1>&6
6015 if test "$cf_cv_sizechange" != no ; then
6016 cat >> confdefs.h <<\EOF
6017 #define HAVE_SIZECHANGE 1
6020 case $cf_cv_sizechange in #(vi
6022 cat >> confdefs.h <<EOF
6023 #define $cf_cv_sizechange 1
6031 echo $ac_n "checking for memmove""... $ac_c" 1>&6
6032 echo "configure:6033: checking for memmove" >&5
6033 if eval "test \"`echo '$''{'ac_cv_func_memmove'+set}'`\" = set"; then
6034 echo $ac_n "(cached) $ac_c" 1>&6
6036 cat > conftest.$ac_ext <<EOF
6037 #line 6038 "configure"
6038 #include "confdefs.h"
6039 /* System header to define __stub macros and hopefully few prototypes,
6040 which can conflict with char memmove(); below. */
6042 /* Override any gcc2 internal prototype to avoid an error. */
6043 /* We use char because int might match the return type of a gcc2
6044 builtin and then its argument prototype would still apply. */
6049 /* The GNU C library defines this for functions which it implements
6050 to always fail with ENOSYS. Some functions are actually named
6051 something starting with __ and the normal name is an alias. */
6052 #if defined (__stub_memmove) || defined (__stub___memmove)
6060 if { (eval echo configure:6061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6062 eval "ac_cv_func_memmove=yes"
6064 echo "configure: failed program was:" >&5
6065 cat conftest.$ac_ext >&5
6067 eval "ac_cv_func_memmove=no"
6072 if eval "test \"`echo '$ac_cv_func_'memmove`\" = yes"; then
6073 echo "$ac_t""yes" 1>&6
6076 echo "$ac_t""no" 1>&6
6078 echo $ac_n "checking for bcopy""... $ac_c" 1>&6
6079 echo "configure:6080: checking for bcopy" >&5
6080 if eval "test \"`echo '$''{'ac_cv_func_bcopy'+set}'`\" = set"; then
6081 echo $ac_n "(cached) $ac_c" 1>&6
6083 cat > conftest.$ac_ext <<EOF
6084 #line 6085 "configure"
6085 #include "confdefs.h"
6086 /* System header to define __stub macros and hopefully few prototypes,
6087 which can conflict with char bcopy(); below. */
6089 /* Override any gcc2 internal prototype to avoid an error. */
6090 /* We use char because int might match the return type of a gcc2
6091 builtin and then its argument prototype would still apply. */
6096 /* The GNU C library defines this for functions which it implements
6097 to always fail with ENOSYS. Some functions are actually named
6098 something starting with __ and the normal name is an alias. */
6099 #if defined (__stub_bcopy) || defined (__stub___bcopy)
6107 if { (eval echo configure:6108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6109 eval "ac_cv_func_bcopy=yes"
6111 echo "configure: failed program was:" >&5
6112 cat conftest.$ac_ext >&5
6114 eval "ac_cv_func_bcopy=no"
6119 if eval "test \"`echo '$ac_cv_func_'bcopy`\" = yes"; then
6120 echo "$ac_t""yes" 1>&6
6122 echo $ac_n "checking if bcopy does overlapping moves""... $ac_c" 1>&6
6123 echo "configure:6124: checking if bcopy does overlapping moves" >&5
6124 if eval "test \"`echo '$''{'cf_cv_good_bcopy'+set}'`\" = set"; then
6125 echo $ac_n "(cached) $ac_c" 1>&6
6128 if test "$cross_compiling" = yes; then
6129 cf_cv_good_bcopy=unknown
6131 cat > conftest.$ac_ext <<EOF
6132 #line 6133 "configure"
6133 #include "confdefs.h"
6136 static char data[] = "abcdefghijklmnopqrstuwwxyz";
6138 bcopy(data, temp, sizeof(data));
6139 bcopy(temp+10, temp, 15);
6140 bcopy(temp+5, temp+15, 10);
6141 exit (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
6145 if { (eval echo configure:6146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6147 cf_cv_good_bcopy=yes
6149 echo "configure: failed program was:" >&5
6150 cat conftest.$ac_ext >&5
6160 echo "$ac_t""$cf_cv_good_bcopy" 1>&6
6163 echo "$ac_t""no" 1>&6
6167 if test "$cf_cv_good_bcopy" = yes ; then
6168 cat >> confdefs.h <<\EOF
6169 #define USE_OK_BCOPY 1
6173 cat >> confdefs.h <<\EOF
6174 #define USE_MY_MEMMOVE 1
6182 echo $ac_n "checking if poll really works""... $ac_c" 1>&6
6183 echo "configure:6184: checking if poll really works" >&5
6184 if eval "test \"`echo '$''{'cf_cv_working_poll'+set}'`\" = set"; then
6185 echo $ac_n "(cached) $ac_c" 1>&6
6188 if test "$cross_compiling" = yes; then
6189 cf_cv_working_poll=unknown
6191 cat > conftest.$ac_ext <<EOF
6192 #line 6193 "configure"
6193 #include "confdefs.h"
6199 #include <sys/poll.h>
6202 struct pollfd myfds;
6206 myfds.events = POLLIN;
6208 ret = poll(&myfds, 1, 100);
6212 if { (eval echo configure:6213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6214 cf_cv_working_poll=yes
6216 echo "configure: failed program was:" >&5
6217 cat conftest.$ac_ext >&5
6219 cf_cv_working_poll=no
6226 echo "$ac_t""$cf_cv_working_poll" 1>&6
6227 test "$cf_cv_working_poll" = "yes" && cat >> confdefs.h <<\EOF
6228 #define HAVE_WORKING_POLL 1
6233 if test -z "$cf_user_CFLAGS" ; then
6234 CFLAGS=`echo ${CFLAGS} | sed -e 's/-g //' -e 's/-g$//'`
6235 CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's/-g //' -e 's/-g$//'`
6239 echo $ac_n "checking for builtin bool type""... $ac_c" 1>&6
6240 echo "configure:6241: checking for builtin bool type" >&5
6241 if eval "test \"`echo '$''{'cf_cv_cc_bool_type'+set}'`\" = set"; then
6242 echo $ac_n "(cached) $ac_c" 1>&6
6245 cat > conftest.$ac_ext <<EOF
6246 #line 6247 "configure"
6247 #include "confdefs.h"
6250 #include <sys/types.h>
6256 if { (eval echo configure:6257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6258 cf_cv_cc_bool_type=1
6260 echo "configure: failed program was:" >&5
6261 cat conftest.$ac_ext >&5
6263 cf_cv_cc_bool_type=0
6269 if test "$cf_cv_cc_bool_type" = 1
6270 then echo "$ac_t""yes" 1>&6
6271 else echo "$ac_t""no" 1>&6
6274 if test -n "$CXX" ; then
6276 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
6277 ac_cpp='$CXXCPP $CPPFLAGS'
6278 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
6279 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
6280 cross_compiling=$ac_cv_prog_cxx_cross
6283 if test -n "$GXX" ; then
6284 case $cf_cv_system_name in #(vi
6286 cf_stdcpp_libname=stdcpp
6289 cf_stdcpp_libname=stdc++
6292 echo $ac_n "checking for library $cf_stdcpp_libname""... $ac_c" 1>&6
6293 echo "configure:6294: checking for library $cf_stdcpp_libname" >&5
6294 if eval "test \"`echo '$''{'cf_cv_libstdcpp'+set}'`\" = set"; then
6295 echo $ac_n "(cached) $ac_c" 1>&6
6299 LIBS="$LIBS -l$cf_stdcpp_libname"
6300 cat > conftest.$ac_ext <<EOF
6301 #line 6302 "configure"
6302 #include "confdefs.h"
6304 #include <strstream.h>
6308 strstreambuf foo(buf, sizeof(buf))
6312 if { (eval echo configure:6313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6316 echo "configure: failed program was:" >&5
6317 cat conftest.$ac_ext >&5
6326 echo "$ac_t""$cf_cv_libstdcpp" 1>&6
6327 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
6330 if test "$GXX" = yes; then
6331 case "`${CXX-g++} --version`" in
6337 cf_cxx_library=unknown
6338 case $cf_cv_system_name in #(vi
6346 if test "$ac_cv_prog_gxx" = yes; then
6347 echo $ac_n "checking for lib$cf_gpp_libname""... $ac_c" 1>&6
6348 echo "configure:6349: checking for lib$cf_gpp_libname" >&5
6350 LIBS="$LIBS -l$cf_gpp_libname"
6351 cat > conftest.$ac_ext <<EOF
6352 #line 6353 "configure"
6353 #include "confdefs.h"
6355 #include <$cf_gpp_libname/builtin.h>
6358 two_arg_error_handler_t foo2 = lib_error_handler
6361 if { (eval echo configure:6362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6364 CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
6365 if test "$cf_gpp_libname" = cpp ; then
6366 cat >> confdefs.h <<\EOF
6367 #define HAVE_GPP_BUILTIN_H 1
6371 cat >> confdefs.h <<\EOF
6372 #define HAVE_GXX_BUILTIN_H 1
6377 echo "configure: failed program was:" >&5
6378 cat conftest.$ac_ext >&5
6380 cat > conftest.$ac_ext <<EOF
6381 #line 6382 "configure"
6382 #include "confdefs.h"
6384 #include <builtin.h>
6387 two_arg_error_handler_t foo2 = lib_error_handler
6390 if { (eval echo configure:6391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6393 CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
6394 cat >> confdefs.h <<\EOF
6395 #define HAVE_BUILTIN_H 1
6399 echo "configure: failed program was:" >&5
6400 cat conftest.$ac_ext >&5
6408 echo "$ac_t""$cf_cxx_library" 1>&6
6419 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
6420 echo "configure:6421: checking how to run the C++ preprocessor" >&5
6421 if test -z "$CXXCPP"; then
6422 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
6423 echo $ac_n "(cached) $ac_c" 1>&6
6426 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
6427 ac_cpp='$CXXCPP $CPPFLAGS'
6428 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
6429 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
6430 cross_compiling=$ac_cv_prog_cxx_cross
6431 CXXCPP="${CXX-g++} -E"
6432 cat > conftest.$ac_ext <<EOF
6433 #line 6434 "configure"
6434 #include "confdefs.h"
6437 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6438 { (eval echo configure:6439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6439 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6440 if test -z "$ac_err"; then
6444 echo "configure: failed program was:" >&5
6445 cat conftest.$ac_ext >&5
6450 ac_cv_prog_CXXCPP="$CXXCPP"
6452 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
6453 ac_cpp='$CXXCPP $CPPFLAGS'
6454 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
6455 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
6456 cross_compiling=$ac_cv_prog_cxx_cross
6459 CXXCPP="$ac_cv_prog_CXXCPP"
6460 echo "$ac_t""$CXXCPP" 1>&6
6462 for ac_hdr in typeinfo
6464 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6465 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6466 echo "configure:6467: checking for $ac_hdr" >&5
6467 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6468 echo $ac_n "(cached) $ac_c" 1>&6
6470 cat > conftest.$ac_ext <<EOF
6471 #line 6472 "configure"
6472 #include "confdefs.h"
6475 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6476 { (eval echo configure:6477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6477 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6478 if test -z "$ac_err"; then
6480 eval "ac_cv_header_$ac_safe=yes"
6483 echo "configure: failed program was:" >&5
6484 cat conftest.$ac_ext >&5
6486 eval "ac_cv_header_$ac_safe=no"
6490 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6491 echo "$ac_t""yes" 1>&6
6492 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6493 cat >> confdefs.h <<EOF
6494 #define $ac_tr_hdr 1
6498 echo "$ac_t""no" 1>&6
6503 echo $ac_n "checking for builtin bool type""... $ac_c" 1>&6
6504 echo "configure:6505: checking for builtin bool type" >&5
6505 if eval "test \"`echo '$''{'cf_cv_builtin_bool'+set}'`\" = set"; then
6506 echo $ac_n "(cached) $ac_c" 1>&6
6509 cat > conftest.$ac_ext <<EOF
6510 #line 6511 "configure"
6511 #include "confdefs.h"
6514 #include <sys/types.h>
6520 if { (eval echo configure:6521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6522 cf_cv_builtin_bool=1
6524 echo "configure: failed program was:" >&5
6525 cat conftest.$ac_ext >&5
6527 cf_cv_builtin_bool=0
6533 if test "$cf_cv_builtin_bool" = 1
6534 then echo "$ac_t""yes" 1>&6
6535 else echo "$ac_t""no" 1>&6
6539 echo $ac_n "checking for size of bool""... $ac_c" 1>&6
6540 echo "configure:6541: checking for size of bool" >&5
6541 if eval "test \"`echo '$''{'cf_cv_type_of_bool'+set}'`\" = set"; then
6542 echo $ac_n "(cached) $ac_c" 1>&6
6546 if test "$cross_compiling" = yes; then
6547 cf_cv_type_of_bool=unknown
6549 cat > conftest.$ac_ext <<EOF
6550 #line 6551 "configure"
6551 #include "confdefs.h"
6553 extern "C" void exit(int);
6558 #ifdef HAVE_GXX_BUILTIN_H
6559 #include <g++/builtin.h>
6560 #elif HAVE_GPP_BUILTIN_H
6561 #include <gpp/builtin.h>
6562 #elif HAVE_BUILTIN_H
6563 #include <builtin.h>
6567 FILE *fp = fopen("cf_test.out", "w");
6570 if ((bool)(-x) >= 0)
6571 fputs("unsigned ", fp);
6572 if (sizeof(x) == sizeof(int)) fputs("int", fp);
6573 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
6574 else if (sizeof(x) == sizeof(short))fputs("short",fp);
6575 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
6582 if { (eval echo configure:6583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6584 cf_cv_type_of_bool=`cat cf_test.out`
6586 echo "configure: failed program was:" >&5
6587 cat conftest.$ac_ext >&5
6589 cf_cv_type_of_bool=unknown
6598 echo "$ac_t""$cf_cv_type_of_bool" 1>&6
6599 if test "$cf_cv_type_of_bool" = unknown ; then
6600 echo "configure: warning: Assuming unsigned for type of bool" 1>&2
6601 cf_cv_type_of_bool=unsigned
6605 echo $ac_n "checking for special defines needed for etip.h""... $ac_c" 1>&6
6606 echo "configure:6607: checking for special defines needed for etip.h" >&5
6607 cf_save_CXXFLAGS="$CXXFLAGS"
6609 for cf_math in "" MATH_H
6611 for cf_excp in "" MATH_EXCEPTION
6613 CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu"
6614 test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
6615 test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
6616 cat > conftest.$ac_ext <<EOF
6617 #line 6618 "configure"
6618 #include "confdefs.h"
6620 #include <etip.h.in>
6626 if { (eval echo configure:6627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6629 test -n "$cf_math" && cat >> confdefs.h <<EOF
6630 #define ETIP_NEEDS_${cf_math} 1
6633 test -n "$cf_excp" && cat >> confdefs.h <<EOF
6634 #define ETIP_NEEDS_${cf_excp} 1
6637 cf_result="$cf_math $cf_excp"
6641 echo "configure: failed program was:" >&5
6642 cat conftest.$ac_ext >&5
6647 echo "$ac_t""$cf_result" 1>&6
6648 CXXFLAGS="$cf_save_CXXFLAGS"
6651 if test "$CXX" = yes ; then
6652 echo $ac_n "checking if $CXX accepts parameter initialization""... $ac_c" 1>&6
6653 echo "configure:6654: checking if $CXX accepts parameter initialization" >&5
6654 if eval "test \"`echo '$''{'cf_cv_cpp_param_init'+set}'`\" = set"; then
6655 echo $ac_n "(cached) $ac_c" 1>&6
6659 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
6660 ac_cpp='$CXXCPP $CPPFLAGS'
6661 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
6662 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
6663 cross_compiling=$ac_cv_prog_cxx_cross
6665 if test "$cross_compiling" = yes; then
6666 cf_cv_cpp_param_init=unknown
6668 cat > conftest.$ac_ext <<EOF
6669 #line 6670 "configure"
6670 #include "confdefs.h"
6672 extern "C" void exit(int);
6683 TEST::TEST(int x = 1) // some compilers do not like second initializer
6690 if { (eval echo configure:6691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6692 cf_cv_cpp_param_init=yes
6694 echo "configure: failed program was:" >&5
6695 cat conftest.$ac_ext >&5
6697 cf_cv_cpp_param_init=no
6705 echo "$ac_t""$cf_cv_cpp_param_init" 1>&6
6707 test "$cf_cv_cpp_param_init" = yes && cat >> confdefs.h <<\EOF
6708 #define CPP_HAS_PARAM_INIT 1
6712 case $cf_cv_system_name in #(vi
6714 CXXLDFLAGS="-u main"
6720 cf_cv_builtin_bool=1
6722 # Just because we are not configuring against C++ right now does not
6723 # mean that a user will not want to use C++. Some distributors disable
6724 # the C++ portion of this configuration as a shortcut (or just to avoid
6725 # compiling the demo in the c++ directory). So we need a reasonable
6726 # default for the 'bool' type.
6728 # Caveat: since the storage of the bool type is not standardized, it
6731 echo $ac_n "checking for fallback type of bool""... $ac_c" 1>&6
6732 echo "configure:6733: checking for fallback type of bool" >&5
6733 case "$host_cpu" in #(vi
6734 i?86) cf_cv_type_of_bool=char ;; #(vi
6735 *) cf_cv_type_of_bool=int ;;
6737 echo "$ac_t""$cf_cv_type_of_bool" 1>&6
6743 if test "$cf_with_ada" != "no" ; then
6744 cf_ada_make=gnatmake
6745 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
6746 set dummy $cf_ada_make; ac_word=$2
6747 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6748 echo "configure:6749: checking for $ac_word" >&5
6749 if eval "test \"`echo '$''{'ac_cv_prog_gnat_exists'+set}'`\" = set"; then
6750 echo $ac_n "(cached) $ac_c" 1>&6
6752 if test -n "$gnat_exists"; then
6753 ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
6755 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6757 for ac_dir in $ac_dummy; do
6758 test -z "$ac_dir" && ac_dir=.
6759 if test -f $ac_dir/$ac_word; then
6760 ac_cv_prog_gnat_exists="yes"
6765 test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
6768 gnat_exists="$ac_cv_prog_gnat_exists"
6769 if test -n "$gnat_exists"; then
6770 echo "$ac_t""$gnat_exists" 1>&6
6772 echo "$ac_t""no" 1>&6
6775 if test "$ac_cv_prog_gnat_exists" = no; then
6779 cf_cv_gnat_version=`$cf_ada_make -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
6780 sed -e 's/[^0-9 \.]//g' | $AWK '{print $1;}'`
6781 case $cf_cv_gnat_version in
6782 3.1[1-9]*|3.[2-9]*|[4-9].*)
6783 cf_cv_prog_gnat_correct=yes
6785 *) echo Unsupported GNAT version $cf_cv_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
6786 cf_cv_prog_gnat_correct=no
6789 case $cf_cv_gnat_version in
6791 cf_compile_generics=generics
6792 cf_generic_objects="\$(GENOBJS)"
6794 *) cf_compile_generics=
6799 # Extract the first word of "m4", so it can be a program name with args.
6800 set dummy m4; ac_word=$2
6801 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6802 echo "configure:6803: checking for $ac_word" >&5
6803 if eval "test \"`echo '$''{'ac_cv_prog_M4_exists'+set}'`\" = set"; then
6804 echo $ac_n "(cached) $ac_c" 1>&6
6806 if test -n "$M4_exists"; then
6807 ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
6809 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6811 for ac_dir in $ac_dummy; do
6812 test -z "$ac_dir" && ac_dir=.
6813 if test -f $ac_dir/$ac_word; then
6814 ac_cv_prog_M4_exists="yes"
6819 test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
6822 M4_exists="$ac_cv_prog_M4_exists"
6823 if test -n "$M4_exists"; then
6824 echo "$ac_t""$M4_exists" 1>&6
6826 echo "$ac_t""no" 1>&6
6829 if test "$ac_cv_prog_M4_exists" = no; then
6830 cf_cv_prog_gnat_correct=no
6831 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
6833 if test "$cf_cv_prog_gnat_correct" = yes; then
6834 echo $ac_n "checking if GNAT works""... $ac_c" 1>&6
6835 echo "configure:6836: checking if GNAT works" >&5
6838 cat >>conftest.ads <<CF_EOF
6841 cat >>conftest.adb <<CF_EOF
6844 procedure conftest is
6846 Text_IO.Put ("Hello World");
6848 GNAT.OS_Lib.OS_Exit (0);
6851 if ( $cf_ada_make conftest 1>&5 2>&1 ) ; then
6852 if ( ./conftest 1>&5 2>&1 ) ; then
6853 cf_cv_prog_gnat_correct=yes
6855 cf_cv_prog_gnat_correct=no
6858 cf_cv_prog_gnat_correct=no
6862 echo "$ac_t""$cf_cv_prog_gnat_correct" 1>&6
6865 if test "$cf_cv_prog_gnat_correct" = yes; then
6866 ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
6869 # Check whether --with-ada-compiler or --without-ada-compiler was given.
6870 if test "${with_ada_compiler+set}" = set; then
6871 withval="$with_ada_compiler"
6872 cf_ada_compiler=$withval
6874 cf_ada_compiler=gnatmake
6878 cf_ada_package=terminal_interface
6888 # Check whether --with-ada-include or --without-ada-include was given.
6889 if test "${with_ada_include+set}" = set; then
6890 withval="$with_ada_include"
6893 withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
6896 case ".$withval" in #(vi
6899 .a-zA-Z:\\/*) #(vi OS/2 EMX
6902 eval withval="$withval"
6903 case ".$withval" in #(vi
6905 withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
6910 withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
6913 { echo "configure: error: expected a pathname" 1>&2; exit 1; }
6917 eval ADA_INCLUDE="$withval"
6922 # Check whether --with-ada-objects or --without-ada-objects was given.
6923 if test "${with_ada_objects+set}" = set; then
6924 withval="$with_ada_objects"
6927 withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
6930 case ".$withval" in #(vi
6933 .a-zA-Z:\\/*) #(vi OS/2 EMX
6936 eval withval="$withval"
6937 case ".$withval" in #(vi
6939 withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
6944 withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
6947 { echo "configure: error: expected a pathname" 1>&2; exit 1; }
6951 eval ADA_OBJECTS="$withval"
6958 ### It's not possible to appease gcc 2.6.3's conversion-warnings if we're
6959 ### using a 'char' for bools. gcc 2.7.0's conversion-warnings are broken too
6960 ### badly to consider using for development purposes, but 2.5.8 is okay.
6961 if test -n "$with_warnings"; then
6962 if test "$GCC" = yes; then
6963 case "`$CC --version`" in
6965 if test "$cf_cv_type_of_bool" != "char"; then
6966 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wconversion"
6970 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wconversion"
6976 ### Construct the library-subsets, if any, from this set of keywords:
6977 ### none, base, ext_funcs, termlib.
6978 echo $ac_n "checking for library subsets""... $ac_c" 1>&6
6979 echo "configure:6980: checking for library subsets" >&5
6980 if test "$with_termlib" = yes ; then
6981 LIB_SUBSETS="termlib "
6983 LIB_SUBSETS="termlib+"
6985 LIB_SUBSETS="${LIB_SUBSETS}base"
6986 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
6987 echo "$ac_t""$LIB_SUBSETS" 1>&6
6996 ### Construct the list of include-directories to be generated
6998 CPPFLAGS="$CPPFLAGS -I. -I../include"
6999 if test "$srcdir" != "."; then
7000 CPPFLAGS="$CPPFLAGS -I\$(srcdir)/../include"
7002 if test "$GCC" != yes; then
7003 CPPFLAGS="$CPPFLAGS -I\$(includedir)"
7004 elif test "$includedir" != "/usr/include"; then
7005 if test "$includedir" = '${prefix}/include' ; then
7006 if test $prefix != /usr ; then
7007 CPPFLAGS="$CPPFLAGS -I\$(includedir)"
7010 CPPFLAGS="$CPPFLAGS -I\$(includedir)"
7016 ACPPFLAGS="$ACPPFLAGS -I. -I../../include"
7017 if test "$srcdir" != "."; then
7018 ACPPFLAGS="$ACPPFLAGS -I\$(srcdir)/../../include"
7020 if test "$GCC" != yes; then
7021 ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
7022 elif test "$includedir" != "/usr/include"; then
7023 if test "$includedir" = '${prefix}/include' ; then
7024 if test $prefix != /usr ; then
7025 ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
7028 ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
7034 ### Build up pieces for makefile rules
7035 echo $ac_n "checking default library suffix""... $ac_c" 1>&6
7036 echo "configure:7037: checking default library suffix" >&5
7038 case $DFT_LWR_MODEL in
7039 libtool) DFT_ARG_SUFFIX='' ;;
7040 normal) DFT_ARG_SUFFIX='' ;;
7041 debug) DFT_ARG_SUFFIX='_g' ;;
7042 profile) DFT_ARG_SUFFIX='_p' ;;
7043 shared) DFT_ARG_SUFFIX='' ;;
7045 test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
7046 echo "$ac_t""$DFT_ARG_SUFFIX" 1>&6
7048 echo $ac_n "checking default library-dependency suffix""... $ac_c" 1>&6
7049 echo "configure:7050: checking default library-dependency suffix" >&5
7052 case $DFT_LWR_MODEL in
7053 libtool) DFT_DEP_SUFFIX='.la' ;;
7054 normal) DFT_DEP_SUFFIX='.a' ;;
7055 debug) DFT_DEP_SUFFIX='_g.a' ;;
7056 profile) DFT_DEP_SUFFIX='_p.a' ;;
7058 case $cf_cv_system_name in
7059 hpux*) DFT_DEP_SUFFIX='.sl' ;;
7060 *) DFT_DEP_SUFFIX='.so' ;;
7063 test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
7064 echo "$ac_t""$DFT_DEP_SUFFIX" 1>&6
7066 echo $ac_n "checking default object directory""... $ac_c" 1>&6
7067 echo "configure:7068: checking default object directory" >&5
7069 case $DFT_LWR_MODEL in
7070 libtool) DFT_OBJ_SUBDIR='obj_lo' ;;
7071 normal) DFT_OBJ_SUBDIR='objects' ;;
7072 debug) DFT_OBJ_SUBDIR='obj_g' ;;
7073 profile) DFT_OBJ_SUBDIR='obj_p' ;;
7074 shared) DFT_OBJ_SUBDIR='obj_s' ;;
7076 echo "$ac_t""$DFT_OBJ_SUBDIR" 1>&6
7078 # libtool thinks it can make c++ shared libraries (perhaps only g++)
7079 echo $ac_n "checking c++ library-dependency suffux""... $ac_c" 1>&6
7080 echo "configure:7081: checking c++ library-dependency suffux" >&5
7081 if test "$with_libtool" = "yes"; then
7082 CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
7087 libtool) CXX_LIB_SUFFIX='.la' ;;
7088 normal) CXX_LIB_SUFFIX='.a' ;;
7089 debug) CXX_LIB_SUFFIX='_g.a' ;;
7090 profile) CXX_LIB_SUFFIX='_p.a' ;;
7092 case $cf_cv_system_name in
7093 hpux*) CXX_LIB_SUFFIX='.sl' ;;
7094 *) CXX_LIB_SUFFIX='.so' ;;
7097 test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
7099 echo "$ac_t""$CXX_LIB_SUFFIX" 1>&6
7102 TINFO_LIST="$SHLIB_LIST"
7103 test "$with_termlib" = yes && SHLIB_LIST="$SHLIB_LIST -ltinfo${LIB_SUFFIX}"
7105 echo $ac_n "checking where we will install curses.h""... $ac_c" 1>&6
7106 echo "configure:7107: checking where we will install curses.h" >&5
7107 test "$with_overwrite" = no && \
7108 test "x$includedir" = 'x${prefix}/include' && \
7109 includedir='$(prefix)/include/ncurses'${LIB_SUFFIX}
7110 echo "$ac_t""$includedir" 1>&6
7116 ### Set up low-level terminfo dependencies for makefiles. Note that we
7117 ### could override this.
7118 if test "$with_termlib" = yes ; then
7119 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_NAME}${DFT_DEP_SUFFIX}"
7120 if test "$DFT_LWR_MODEL" = "libtool"; then
7121 TEST_ARGS="${TEST_DEPS}"
7123 TEST_ARGS="-l${TINFO_NAME}${DFT_ARG_SUFFIX}"
7126 PROG_DEPS="$TEST_DEPS"
7127 PROG_ARGS="$TEST_ARGS"
7129 ### Construct the list of subdirectories for which we'll customize makefiles
7130 ### with the appropriate compile-rules.
7133 echo $ac_n "checking for src modules""... $ac_c" 1>&6
7134 echo "configure:7135: checking for src modules" >&5
7136 # dependencies and linker-arguments for test-programs
7137 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
7138 if test "$DFT_LWR_MODEL" = "libtool"; then
7139 TEST_ARGS="${TEST_DEPS}"
7141 TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
7144 # dependencies and linker-arguments for utility-programs
7145 PROG_ARGS="$TEST_ARGS"
7148 for cf_dir in $modules_to_build
7150 if test -f $srcdir/$cf_dir/modules; then
7152 # We may/may not have tack in the distribution, though the
7154 if test $cf_dir = tack ; then
7155 if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
7160 if test -z "$cf_cv_src_modules"; then
7161 cf_cv_src_modules=$cf_dir
7163 cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
7166 # Make the ncurses_cfg.h file record the library interface files as
7167 # well. These are header files that are the same name as their
7168 # directory. Ncurses is the only library that does not follow
7170 if test $cf_dir = tack ; then
7172 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
7174 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7176 cat >> confdefs.h <<EOF
7177 #define HAVE_${cf_have_include}_H 1
7180 cat >> confdefs.h <<EOF
7181 #define HAVE_LIB${cf_have_include} 1
7184 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
7185 if test "$DFT_LWR_MODEL" = "libtool"; then
7186 TEST_ARGS="${TEST_DEPS}"
7188 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
7193 echo "$ac_t""$cf_cv_src_modules" 1>&6
7194 TEST_ARGS="-L${LIB_DIR} -L\$(libdir) $TEST_ARGS"
7198 PROG_ARGS="-L${LIB_DIR} -L\$(libdir) $PROG_ARGS"
7201 SRC_SUBDIRS="man include"
7202 for cf_dir in $cf_cv_src_modules
7204 SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
7206 SRC_SUBDIRS="$SRC_SUBDIRS misc test"
7207 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
7210 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
7211 SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
7212 ADA_SUBDIRS="gen src samples"
7216 for cf_dir in $SRC_SUBDIRS
7218 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
7221 if test -n "$ADA_SUBDIRS"; then
7222 for cf_dir in $ADA_SUBDIRS
7224 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
7231 for cf_item in $cf_list_models
7235 libtool) cf_subdir='obj_lo' ;;
7236 normal) cf_subdir='objects' ;;
7237 debug) cf_subdir='obj_g' ;;
7238 profile) cf_subdir='obj_p' ;;
7239 shared) cf_subdir='obj_s' ;;
7242 DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
7244 for cf_dir in $DIRS_TO_MAKE
7246 test ! -d $cf_dir && mkdir $cf_dir
7251 ### Now that we're done running tests, add the compiler-warnings, if any
7252 CFLAGS="$CFLAGS $EXTRA_CFLAGS"
7254 ################################################################################
7256 cat > confcache <<\EOF
7257 # This file is a shell script that caches the results of configure
7258 # tests run on this system so they can be shared between configure
7259 # scripts and configure runs. It is not useful on other systems.
7260 # If it contains results you don't want to keep, you may remove or edit it.
7262 # By default, configure uses ./config.cache as the cache file,
7263 # creating it if it does not exist already. You can give configure
7264 # the --cache-file=FILE option to use a different cache file; that is
7265 # what configure does when it calls configure scripts in
7266 # subdirectories, so they share the cache.
7267 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7268 # config.status only pays attention to the cache file if you give it the
7269 # --recheck option to rerun configure.
7272 # The following way of writing the cache mishandles newlines in values,
7273 # but we know of no workaround that is simple, portable, and efficient.
7274 # So, don't put newlines in cache variables' values.
7275 # Ultrix sh set writes to stderr and can't be redirected directly,
7276 # and sets the high bit in the cache file unless we assign to the vars.
7278 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7280 # `set' does not quote correctly, so add quotes (double-quote substitution
7281 # turns \\\\ into \\, and sed turns \\ into \).
7283 -e "s/'/'\\\\''/g" \
7284 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7287 # `set' quotes correctly as required by POSIX, so do not add quotes.
7288 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7291 if cmp -s $cache_file confcache; then
7294 if test -w $cache_file; then
7295 echo "updating cache $cache_file"
7296 cat confcache > $cache_file
7298 echo "not updating unwritable cache $cache_file"
7303 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7305 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7306 # Let make expand exec_prefix.
7307 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7309 # Any assignment to VPATH causes Sun make to only execute
7310 # the first set of double-colon rules, so remove it if not needed.
7311 # If there is a colon in the path, we need to keep it.
7312 if test "x$srcdir" = x.; then
7313 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7316 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7318 DEFS=-DHAVE_CONFIG_H
7320 # Without the "./", some shells look in PATH for config.status.
7321 : ${CONFIG_STATUS=./config.status}
7323 echo creating $CONFIG_STATUS
7324 rm -f $CONFIG_STATUS
7325 cat > $CONFIG_STATUS <<EOF
7327 # Generated automatically by configure.
7328 # Run this file to recreate the current configuration.
7329 # This directory was configured as follows,
7330 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7332 # $0 $ac_configure_args
7334 # Compiler output produced by configure, useful for debugging
7335 # configure, is in ./config.log if it exists.
7337 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7340 case "\$ac_option" in
7341 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7342 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7343 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7344 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7345 echo "$CONFIG_STATUS generated by autoconf version 2.13.20000819"
7347 -help | --help | --hel | --he | --h)
7348 echo "\$ac_cs_usage"; exit 0 ;;
7349 *) echo "\$ac_cs_usage"; exit 1 ;;
7353 ac_given_srcdir=$srcdir
7354 ac_given_INSTALL="$INSTALL"
7356 trap 'rm -fr `echo "\
7357 include/MKterm.h.awk \
7361 misc/run_tic.sh:misc/run_tic.in \
7363 Makefile include/ncurses_cfg.h:include/ncurses_cfg.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7365 cat >> $CONFIG_STATUS <<EOF
7367 # Protect against being on the right side of a sed subst in config.status.
7368 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7369 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7373 s%@CFLAGS@%$CFLAGS%g
7374 s%@CPPFLAGS@%$CPPFLAGS%g
7375 s%@CXXFLAGS@%$CXXFLAGS%g
7376 s%@FFLAGS@%$FFLAGS%g
7378 s%@LDFLAGS@%$LDFLAGS%g
7380 s%@exec_prefix@%$exec_prefix%g
7381 s%@prefix@%$prefix%g
7382 s%@program_transform_name@%$program_transform_name%g
7383 s%@bindir@%$bindir%g
7384 s%@sbindir@%$sbindir%g
7385 s%@libexecdir@%$libexecdir%g
7386 s%@datadir@%$datadir%g
7387 s%@sysconfdir@%$sysconfdir%g
7388 s%@sharedstatedir@%$sharedstatedir%g
7389 s%@localstatedir@%$localstatedir%g
7390 s%@libdir@%$libdir%g
7391 s%@includedir@%$includedir%g
7392 s%@oldincludedir@%$oldincludedir%g
7393 s%@infodir@%$infodir%g
7394 s%@mandir@%$mandir%g
7395 s%@NCURSES_MAJOR@%$NCURSES_MAJOR%g
7396 s%@NCURSES_MINOR@%$NCURSES_MINOR%g
7397 s%@NCURSES_PATCH@%$NCURSES_PATCH%g
7398 s%@cf_cv_rel_version@%$cf_cv_rel_version%g
7399 s%@cf_cv_abi_version@%$cf_cv_abi_version%g
7400 s%@cf_cv_cc_bool_type@%$cf_cv_cc_bool_type%g
7401 s%@cf_cv_builtin_bool@%$cf_cv_builtin_bool%g
7402 s%@cf_cv_type_of_bool@%$cf_cv_type_of_bool%g
7404 s%@host_alias@%$host_alias%g
7405 s%@host_cpu@%$host_cpu%g
7406 s%@host_vendor@%$host_vendor%g
7407 s%@host_os@%$host_os%g
7408 s%@target@%$target%g
7409 s%@target_alias@%$target_alias%g
7410 s%@target_cpu@%$target_cpu%g
7411 s%@target_vendor@%$target_vendor%g
7412 s%@target_os@%$target_os%g
7414 s%@build_alias@%$build_alias%g
7415 s%@build_cpu@%$build_cpu%g
7416 s%@build_vendor@%$build_vendor%g
7417 s%@build_os@%$build_os%g
7419 s%@BUILD_CC@%$BUILD_CC%g
7421 s%@PROG_EXT@%$PROG_EXT%g
7422 s%@LDCONFIG@%$LDCONFIG%g
7425 s%@SET_MAKE@%$SET_MAKE%g
7426 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
7427 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
7428 s%@INSTALL_DATA@%$INSTALL_DATA%g
7430 s%@RANLIB@%$RANLIB%g
7431 s%@MAKE_LOWER_TAGS@%$MAKE_LOWER_TAGS%g
7432 s%@MAKE_UPPER_TAGS@%$MAKE_UPPER_TAGS%g
7435 s%@LINT_OPTS@%$LINT_OPTS%g
7438 s%@AR_OPTS@%$AR_OPTS%g
7439 s%@cf_cv_makeflags@%$cf_cv_makeflags%g
7440 s%@DESTDIR@%$DESTDIR%g
7441 s%@cf_list_models@%$cf_list_models%g
7442 s%@LIBTOOL@%$LIBTOOL%g
7443 s%@DFT_LWR_MODEL@%$DFT_LWR_MODEL%g
7444 s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
7445 s%@TINFO_NAME@%$TINFO_NAME%g
7446 s%@LIB_NAME@%$LIB_NAME%g
7447 s%@LIB_PREFIX@%$LIB_PREFIX%g
7448 s%@LIB_SUFFIX@%$LIB_SUFFIX%g
7449 s%@CC_G_OPT@%$CC_G_OPT%g
7450 s%@CXX_G_OPT@%$CXX_G_OPT%g
7451 s%@LD_MODEL@%$LD_MODEL%g
7452 s%@CC_SHARED_OPTS@%$CC_SHARED_OPTS%g
7453 s%@LD_SHARED_OPTS@%$LD_SHARED_OPTS%g
7454 s%@MK_SHARED_LIB@%$MK_SHARED_LIB%g
7455 s%@LINK_PROGS@%$LINK_PROGS%g
7456 s%@LINK_TESTS@%$LINK_TESTS%g
7457 s%@EXTRA_LDFLAGS@%$EXTRA_LDFLAGS%g
7458 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
7459 s%@LOCAL_LDFLAGS2@%$LOCAL_LDFLAGS2%g
7460 s%@INSTALL_LIB@%$INSTALL_LIB%g
7461 s%@TERMINFO_SRC@%$TERMINFO_SRC%g
7462 s%@FALLBACK_LIST@%$FALLBACK_LIST%g
7463 s%@TERMINFO_DIRS@%$TERMINFO_DIRS%g
7464 s%@TERMINFO@%$TERMINFO%g
7465 s%@NCURSES_CONST@%$NCURSES_CONST%g
7466 s%@NCURSES_XNAMES@%$NCURSES_XNAMES%g
7467 s%@ECHO_LINK@%$ECHO_LINK%g
7468 s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
7469 s%@MATH_LIB@%$MATH_LIB%g
7470 s%@cf_cv_typeof_chtype@%$cf_cv_typeof_chtype%g
7471 s%@cf_cv_1UL@%$cf_cv_1UL%g
7472 s%@cf_cv_shift_limit@%$cf_cv_shift_limit%g
7473 s%@cf_cv_widec_shift@%$cf_cv_widec_shift%g
7474 s%@CXXCPP@%$CXXCPP%g
7475 s%@CXXLDFLAGS@%$CXXLDFLAGS%g
7476 s%@CXXLIBS@%$CXXLIBS%g
7477 s%@gnat_exists@%$gnat_exists%g
7478 s%@M4_exists@%$M4_exists%g
7479 s%@cf_ada_make@%$cf_ada_make%g
7480 s%@cf_ada_compiler@%$cf_ada_compiler%g
7481 s%@cf_ada_package@%$cf_ada_package%g
7482 s%@ADAFLAGS@%$ADAFLAGS%g
7483 s%@cf_compile_generics@%$cf_compile_generics%g
7484 s%@cf_generic_objects@%$cf_generic_objects%g
7485 s%@ADA_INCLUDE@%$ADA_INCLUDE%g
7486 s%@ADA_OBJECTS@%$ADA_OBJECTS%g
7487 s%@ACPPFLAGS@%$ACPPFLAGS%g
7488 s%@DFT_ARG_SUFFIX@%$DFT_ARG_SUFFIX%g
7489 s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g
7490 s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g
7491 s%@CXX_LIB_SUFFIX@%$CXX_LIB_SUFFIX%g
7492 s%@EXTRA_LIBS@%$EXTRA_LIBS%g
7493 s%@TINFO_LIST@%$TINFO_LIST%g
7494 s%@SHLIB_LIST@%$SHLIB_LIST%g
7495 s%@TEST_DEPS@%$TEST_DEPS%g
7496 s%@TEST_ARGS@%$TEST_ARGS%g
7497 s%@PROG_ARGS@%$PROG_ARGS%g
7498 s%@ADA_SUBDIRS@%$ADA_SUBDIRS%g
7499 s%@DIRS_TO_MAKE@%$DIRS_TO_MAKE%g
7504 cat >> $CONFIG_STATUS <<\EOF
7506 # Split the substitutions into bite-sized pieces for seds with
7507 # small command number limits, like on Digital OSF/1 and HP-UX.
7508 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7509 ac_file=1 # Number of current file.
7510 ac_beg=1 # First line for current file.
7511 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7514 while $ac_more_lines; do
7515 if test $ac_beg -gt 1; then
7516 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7518 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7520 if test ! -s conftest.s$ac_file; then
7522 rm -f conftest.s$ac_file
7524 if test -z "$ac_sed_cmds"; then
7525 ac_sed_cmds="sed -f conftest.s$ac_file"
7527 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7529 ac_file=`expr $ac_file + 1`
7531 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7534 if test -z "$ac_sed_cmds"; then
7539 cat >> $CONFIG_STATUS <<EOF
7541 CONFIG_FILES=\${CONFIG_FILES-"\
7542 include/MKterm.h.awk \
7546 misc/run_tic.sh:misc/run_tic.in \
7550 cat >> $CONFIG_STATUS <<\EOF
7551 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7552 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7554 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7555 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7556 *) ac_file_in="${ac_file}.in" ;;
7559 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7561 # Remove last slash and all that follows it. Not all systems have dirname.
7562 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7563 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7564 # The file is in a subdirectory.
7565 test ! -d "$ac_dir" && mkdir "$ac_dir"
7566 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7567 # A "../" for each directory in $ac_dir_suffix.
7568 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7570 ac_dir_suffix= ac_dots=
7573 case "$ac_given_srcdir" in
7575 if test -z "$ac_dots"; then top_srcdir=.
7576 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7577 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7579 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7580 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7583 case "$ac_given_INSTALL" in
7584 [/$]*) INSTALL="$ac_given_INSTALL" ;;
7585 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
7588 echo creating "$ac_file"
7590 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7592 *Makefile*) ac_comsub="1i\\
7593 # $configure_input" ;;
7597 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7599 s%@configure_input@%$configure_input%g
7600 s%@srcdir@%$srcdir%g
7601 s%@top_srcdir@%$top_srcdir%g
7602 s%@INSTALL@%$INSTALL%g
7603 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7607 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7608 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7610 # ac_d sets the value in "#define NAME VALUE" lines.
7611 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7612 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7615 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7616 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7617 ac_uB='\([ ]\)%\1#\2define\3'
7620 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7621 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7622 ac_eB='$%\1#\2define\3'
7626 if test "${CONFIG_HEADERS+set}" != set; then
7628 cat >> $CONFIG_STATUS <<EOF
7629 CONFIG_HEADERS="include/ncurses_cfg.h:include/ncurses_cfg.hin"
7631 cat >> $CONFIG_STATUS <<\EOF
7633 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7634 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7636 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7637 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7638 *) ac_file_in="${ac_file}.in" ;;
7641 echo creating $ac_file
7643 rm -f conftest.frag conftest.in conftest.out
7644 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7645 cat $ac_file_inputs > conftest.in
7650 # Transform confdefs.h into a list of #define's. We won't use it as a sed
7651 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
7652 # be either 'cat' or 'sort'.
7653 sort confdefs.h >conftest.vals
7655 # Break up conftest.vals because some shells have a limit on
7656 # the size of here documents, and old seds have small limits too.
7659 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
7662 ac_lines=`grep -c . conftest.vals`
7663 # grep -c gives empty output for an empty file on some AIX systems.
7664 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7665 # Write chunks of a limited-size here document to conftest.frag.
7666 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
7667 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7668 echo 'CEOF' >> $CONFIG_STATUS
7669 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7671 mv conftest.tail conftest.vals
7675 # Run sed to substitute the contents of conftest.frag into conftest.in at the
7677 echo ' cat >> conftest.edit <<CEOF
7678 /@DEFS@/r conftest.frag
7681 sed -f conftest.edit conftest.in > conftest.out
7683 mv conftest.out conftest.in
7684 rm -f conftest.edit conftest.frag
7688 cat >> $CONFIG_STATUS <<\EOF
7689 rm -f conftest.frag conftest.h
7690 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7691 cat conftest.in >> conftest.h
7693 if cmp -s $ac_file conftest.h 2>/dev/null; then
7694 echo "$ac_file is unchanged"
7697 # Remove last slash and all that follows it. Not all systems have dirname.
7698 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7699 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7700 # The file is in a subdirectory.
7701 test ! -d "$ac_dir" && mkdir "$ac_dir"
7704 mv conftest.h $ac_file
7709 cat >> $CONFIG_STATUS <<EOF
7710 # Extra initialization commands, if any
7712 ### Special initialization commands, used to pass information from the
7713 ### configuration-run into config.status
7716 CF_LIST_MODELS="$cf_list_models"
7717 DFT_LWR_MODEL="$DFT_LWR_MODEL"
7718 LDCONFIG="$LDCONFIG"
7719 LIB_NAME="$LIB_NAME"
7720 LIB_SUFFIX="$LIB_SUFFIX"
7721 LIB_SUBSETS="$LIB_SUBSETS"
7722 LIB_TRACING="$LIB_TRACING"
7723 SRC_SUBDIRS="$SRC_SUBDIRS"
7724 TERMINFO="$TERMINFO"
7725 TINFO_NAME="$TINFO_NAME"
7726 WITH_ECHO="$with_echo"
7727 WITH_OVERWRITE="$with_overwrite"
7728 WITH_CURSES_H="$with_curses_h"
7729 cf_cv_abi_version="$cf_cv_abi_version"
7730 cf_cv_do_symlinks="$cf_cv_do_symlinks"
7731 cf_cv_rel_version="$cf_cv_rel_version"
7732 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
7733 cf_cv_system_name="$cf_cv_system_name"
7734 cf_with_cxx_binding="$cf_with_cxx_binding"
7735 cf_cv_shlib_version="$cf_cv_shlib_version"
7740 cat >> $CONFIG_STATUS <<\EOF
7741 # Extra commands, if any
7745 case $cf_cv_system_name in
7746 os2) LIB_PREFIX='' ;;
7747 *) LIB_PREFIX='lib' ;;
7749 cf_prefix=$LIB_PREFIX
7753 for cf_dir in $SRC_SUBDIRS
7755 if test -f $srcdir/$cf_dir/modules; then
7758 for cf_item in $CF_LIST_MODELS
7763 libtool) cf_suffix='.la' ;;
7764 normal) cf_suffix='.a' ;;
7765 debug) cf_suffix='_g.a' ;;
7766 profile) cf_suffix='_p.a' ;;
7768 case $cf_cv_system_name in
7769 hpux*) cf_suffix='.sl' ;;
7770 *) cf_suffix='.so' ;;
7773 test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
7775 if test $cf_item = shared ; then
7776 if test "$cf_cv_do_symlinks" = yes ; then
7777 case "$cf_cv_shlib_version" in #(vi
7778 rel) cf_suffix="$cf_suffix"'.$(REL_VERSION)' ;; #(vi
7779 abi) cf_suffix="$cf_suffix"'.$(ABI_VERSION)' ;;
7783 cf_libs_to_make="$cf_libs_to_make ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
7786 if test $cf_dir = ncurses ; then
7787 case "$LIB_SUBSETS" in #(vi
7791 cf_item=`echo $cf_libs_to_make |sed -e s/$LIB_NAME/$TINFO_NAME/g`
7792 cf_libs_to_make="$cf_item $cf_libs_to_make"
7797 sed -e "s@\@LIBS_TO_MAKE\@@$cf_libs_to_make@" \
7798 $cf_dir/Makefile >$cf_dir/Makefile.out
7799 mv $cf_dir/Makefile.out $cf_dir/Makefile
7801 $AWK -f $srcdir/mk-0th.awk \
7803 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
7805 for cf_item in $CF_LIST_MODELS
7807 echo 'Appending rules for '$cf_item' model ('$cf_dir')'
7809 CF_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7814 libtool) cf_suffix='.la' ;;
7815 normal) cf_suffix='.a' ;;
7816 debug) cf_suffix='_g.a' ;;
7817 profile) cf_suffix='_p.a' ;;
7819 case $cf_cv_system_name in
7820 hpux*) cf_suffix='.sl' ;;
7821 *) cf_suffix='.so' ;;
7824 test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
7828 libtool) cf_subdir='obj_lo' ;;
7829 normal) cf_subdir='objects' ;;
7830 debug) cf_subdir='obj_g' ;;
7831 profile) cf_subdir='obj_p' ;;
7832 shared) cf_subdir='obj_s' ;;
7836 # These dependencies really are for development, not
7837 # builds, but they are useful in porting, too.
7838 cf_depend="../include/ncurses_cfg.h"
7839 if test "$srcdir" = "."; then
7842 cf_reldir="\$(srcdir)"
7845 if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
7846 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
7847 elif test -f $srcdir/$cf_dir/curses.priv.h; then
7848 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
7851 for cf_subset in $LIB_SUBSETS
7853 $AWK -f $srcdir/mk-1st.awk \
7855 traces=$LIB_TRACING \
7861 ShlibVer=$cf_cv_shlib_version \
7862 DoLinks=$cf_cv_do_symlinks \
7863 rmSoLocs=$cf_cv_rm_so_locs \
7864 ldconfig="$LDCONFIG" \
7865 overwrite=$WITH_OVERWRITE \
7866 depend="$cf_depend" \
7868 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
7869 test $cf_dir = ncurses && WITH_OVERWRITE=no
7870 $AWK -f $srcdir/mk-2nd.awk \
7872 traces=$LIB_TRACING \
7878 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
7883 echo ' cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) $@' >>Makefile
7886 for cf_dir in $SRC_SUBDIRS
7888 if test -f $cf_dir/Makefile ; then
7891 echo 'libs \' >> Makefile
7892 echo 'install.libs \' >> Makefile
7893 echo 'uninstall.libs ::' >> Makefile
7894 echo ' cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) $@' >> Makefile
7899 if test -f $srcdir/$cf_dir/modules; then
7901 if test -f $srcdir/$cf_dir/headers; then
7902 cat >> Makefile <<CF_EOF
7904 uninstall.includes \\
7907 if test "$cf_dir" != "c++" ; then
7908 echo 'lint \' >> Makefile
7910 cat >> Makefile <<CF_EOF
7916 uninstall.$cf_dir ::
7917 cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \$@
7919 elif test -f $srcdir/$cf_dir/headers; then
7920 cat >> Makefile <<CF_EOF
7926 uninstall.includes ::
7927 cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \$@
7932 cat >> Makefile <<CF_EOF
7936 cd misc && \$(MAKE) \$(CF_MFLAGS) \$@
7940 cd man && \$(MAKE) \$(CF_MFLAGS) \$@
7943 rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
7944 rm -f headers.sh headers.sed
7945 rm -rf \$(DIRS_TO_MAKE)
7948 # Special case: tack's manpage lives in its own directory.
7949 if test -d tack ; then
7950 if test -f $srcdir/$tack.h; then
7951 cat >> Makefile <<CF_EOF
7955 cd tack && \$(MAKE) \$(CF_MFLAGS) \$@
7961 rm -f headers.sed headers.sh
7963 echo creating headers.sh
7964 cat >headers.sh <<CF_EOF
7966 # This shell script is generated by the 'configure' script. It is invoked in a
7967 # subdirectory of the build tree. It generates a sed-script in the parent
7968 # directory that is used to adjust includes for header files that reside in a
7969 # subdirectory of /usr/include, etc.
7973 PRG="\$PRG \$1"; shift
7978 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
7979 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
7980 echo installing \$SRC in \$DST
7982 if test $WITH_CURSES_H = yes; then
7983 cat >>headers.sh <<CF_EOF
7986 END=\`basename \$DST\`
7987 for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
7989 NAME=\`basename \$i\`
7990 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
7999 cat >>headers.sh <<CF_EOF
8002 END=\`basename \$DST\`
8003 for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
8005 NAME=\`basename \$i\`
8006 if test "\$NAME" = "curses.h"
8008 echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
8011 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
8015 echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
8020 cat >>headers.sh <<CF_EOF
8022 sed -f \$TMPSED \$SRC > \$TMPSRC
8023 NAME=\`basename \$SRC\`
8025 if test $WITH_CURSES_H != yes; then
8026 cat >>headers.sh <<CF_EOF
8027 test "\$NAME" = "curses.h" && NAME=ncurses.h
8030 cat >>headers.sh <<CF_EOF
8031 eval \$PRG \$TMPSRC \$DST/\$NAME
8032 rm -f \$TMPSRC \$TMPSED
8035 chmod 0755 headers.sh
8037 for cf_dir in $SRC_SUBDIRS
8039 if test -f $srcdir/$cf_dir/headers; then
8040 cat >>$cf_dir/Makefile <<CF_EOF
8041 \$(DESTDIR)\$(includedir) :
8042 \$(srcdir)/../mkinstalldirs \$@
8046 install.includes :: \$(AUTO_SRC) \$(DESTDIR)\$(includedir) \\
8049 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
8051 test -n "$j" && echo " $j \\" >>$cf_dir/Makefile
8054 echo " $j" >>$cf_dir/Makefile
8055 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
8057 echo " @ (cd \$(DESTDIR)\$(includedir) && rm -f `basename $i`) ; ../headers.sh \$(INSTALL_DATA) \$(DESTDIR)\$(includedir) \$(srcdir) $i" >>$cf_dir/Makefile
8058 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
8061 cat >>$cf_dir/Makefile <<CF_EOF
8065 uninstall.includes ::
8067 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
8070 echo " -@ (cd \$(DESTDIR)\$(includedir) && rm -f $i)" >>$cf_dir/Makefile
8071 test $i = curses.h && echo " -@ (cd \$(DESTDIR)\$(includedir) && rm -f ncurses.h)" >>$cf_dir/Makefile
8080 chmod +x $CONFIG_STATUS
8081 rm -fr confdefs* $ac_clean_files
8082 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
8083 ${MAKE-make} preinstall