3 # From configure.in Revision: 1.126
5 # Guess values for system-dependent variables and create Makefiles.
6 # Generated automatically using autoconf version 2.12.971230
7 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
14 ac_default_prefix=/usr/local
15 # Any additions from configure.in:
17 # Initialize some variables set by options.
18 # The variables have the same names as the options, with
19 # dashes changed to underlines.
21 cache_file=./config.cache
30 program_transform_name=s,x,x,
38 bindir='${exec_prefix}/bin'
39 sbindir='${exec_prefix}/sbin'
40 libexecdir='${exec_prefix}/libexec'
41 datadir='${prefix}/share'
42 sysconfdir='${prefix}/etc'
43 sharedstatedir='${prefix}/com'
44 localstatedir='${prefix}/var'
45 libdir='${exec_prefix}/lib'
46 includedir='${prefix}/include'
47 oldincludedir='/usr/include'
48 infodir='${prefix}/info'
49 mandir='${prefix}/man'
51 # Initialize some other variables.
54 # Maximum number of lines to put in a shell here document.
61 # If the previous option needs an argument, assign it.
62 if test -n "$ac_prev"; then
63 eval "$ac_prev=\$ac_option"
69 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
73 # Accept the important Cygnus configure options, so we can diagnose typos.
77 -bindir | --bindir | --bindi | --bind | --bin | --bi)
79 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
80 bindir="$ac_optarg" ;;
82 -build | --build | --buil | --bui | --bu)
84 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
87 -cache-file | --cache-file | --cache-fil | --cache-fi \
88 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
90 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
91 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
92 cache_file="$ac_optarg" ;;
94 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
96 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
98 datadir="$ac_optarg" ;;
100 -disable-* | --disable-*)
101 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
102 # Reject names that are not valid shell variable names.
103 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
104 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
106 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
107 eval "enable_${ac_feature}=no" ;;
109 -enable-* | --enable-*)
110 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
111 # Reject names that are not valid shell variable names.
112 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
113 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
115 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
120 eval "enable_${ac_feature}='$ac_optarg'" ;;
122 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
123 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
124 | --exec | --exe | --ex)
125 ac_prev=exec_prefix ;;
126 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
127 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
128 | --exec=* | --exe=* | --ex=*)
129 exec_prefix="$ac_optarg" ;;
131 -gas | --gas | --ga | --g)
132 # Obsolete; use --with-gas.
135 -help | --help | --hel | --he)
136 # Omit some internal or obsolete options to make the list less imposing.
137 # This message is too long to be a string in the A/UX 3.1 sh.
139 Usage: configure [options] [host]
140 Options: [defaults in brackets after descriptions]
142 --cache-file=FILE cache test results in FILE
143 --help print this message
144 --no-create do not create output files
145 --quiet, --silent do not print \`checking...' messages
146 --version print the version of autoconf that created configure
147 Directory and file names:
148 --prefix=PREFIX install architecture-independent files in PREFIX
150 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
152 --bindir=DIR user executables in DIR [EPREFIX/bin]
153 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
154 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
155 --datadir=DIR read-only architecture-independent data in DIR
157 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
158 --sharedstatedir=DIR modifiable architecture-independent data in DIR
160 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
161 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
162 --includedir=DIR C header files in DIR [PREFIX/include]
163 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
164 --infodir=DIR info documentation in DIR [PREFIX/info]
165 --mandir=DIR man documentation in DIR [PREFIX/man]
166 --srcdir=DIR find the sources in DIR [configure dir or ..]
167 --program-prefix=PREFIX prepend PREFIX to installed program names
168 --program-suffix=SUFFIX append SUFFIX to installed program names
169 --program-transform-name=PROGRAM
170 run sed PROGRAM on installed program names
174 --build=BUILD configure for building on BUILD [BUILD=HOST]
175 --host=HOST configure for HOST [guessed]
176 --target=TARGET configure for TARGET [TARGET=HOST]
177 Features and packages:
178 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
179 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
180 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
181 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
182 --x-includes=DIR X include files are in DIR
183 --x-libraries=DIR X library files are in DIR
186 --enable and --with options recognized:
187 --with-system-type=XXX test: override derived host system-type
188 --enable-add-ons=DIR... used to check if we are a glibc add-on.
189 --without-cxx suppress check for C++, don't build demo
190 --without-progs suppress build with programs (e.g., tic)
191 --with-install-prefix prefixes actual install-location
192 Options to Specify the Libraries Built/Used:
193 --with-shared generate shared-libraries
194 --with-normal generate normal-libraries (default)
195 --with-debug generate debug-libraries (default)
196 --with-profile generate profile-libraries
197 --with-termlib generate separate terminfo library
198 --with-dbmalloc test: use Conor Cahill's dbmalloc library
199 --with-dmalloc test: use Gray Watson's dmalloc library
202 --with-gpm use Alessandro Rubini's GPM library
203 --enable-rpath use rpath option when generating shared libraries
204 Fine-Tuning Your Configuration:
205 --disable-overwrite leave out the link to -lcurses
206 --disable-database use only built-in data
207 --disable-ext-funcs disable function-extensions
208 --with-fallbacks=XXX specify list of fallback terminal descriptions
209 --enable-big-core assume machine has lots of memory
210 --enable-termcap compile in termcap fallback support
211 --enable-getcap fast termcap load, no xrefs to terminfo
212 --enable-getcap-cache cache translated termcaps in ~/.terminfo
213 --enable-symlinks make tic use symbolic links not hard links
216 --enable-bsdpad recognize BSD-style prefix padding
217 --enable-const compile with extra/non-standard const
218 --with-rcs-ids compile-in RCS identifiers
220 --with-develop enable all experimental options for testing
221 --enable-hard-tabs compile with experimental hard-tabs code
222 --enable-hashmap compile with experimental hashmap code
223 --disable-safe-sprintf compile with experimental safe-sprintf code
224 --disable-scroll-hints compile hashmap without scroll-hints code
225 --enable-sigwinch compile with experimental SIGWINCH handler
226 --enable-widec compile with experimental wide-char code
227 --enable-xmc-glitch compile with experimental xmc code
230 Testing/development Options:
231 --enable-echo build: display "compiling" commands (default)
232 --enable-warnings build: turn on GCC compiler warnings
233 --enable-assertions test: turn on generation of assertion code
234 --disable-leaks test: suppress permanent memory-leaks
235 --enable-expanded test: generate functions for certain macros
236 --disable-macros test: use functions rather than macros
237 Ada95 Binding Options:
238 --with-ada-include=DIR Ada includes are in DIR (default: EPREFIX/ada_include)
239 --with-ada-objects=DIR Ada objects are in DIR (default: EPREFIX/ada_objects)
243 -host | --host | --hos | --ho)
245 -host=* | --host=* | --hos=* | --ho=*)
248 -includedir | --includedir | --includedi | --included | --include \
249 | --includ | --inclu | --incl | --inc)
250 ac_prev=includedir ;;
251 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
252 | --includ=* | --inclu=* | --incl=* | --inc=*)
253 includedir="$ac_optarg" ;;
255 -infodir | --infodir | --infodi | --infod | --info | --inf)
257 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
258 infodir="$ac_optarg" ;;
260 -libdir | --libdir | --libdi | --libd)
262 -libdir=* | --libdir=* | --libdi=* | --libd=*)
263 libdir="$ac_optarg" ;;
265 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
266 | --libexe | --libex | --libe)
267 ac_prev=libexecdir ;;
268 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
269 | --libexe=* | --libex=* | --libe=*)
270 libexecdir="$ac_optarg" ;;
272 -localstatedir | --localstatedir | --localstatedi | --localstated \
273 | --localstate | --localstat | --localsta | --localst \
274 | --locals | --local | --loca | --loc | --lo)
275 ac_prev=localstatedir ;;
276 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
277 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
278 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
279 localstatedir="$ac_optarg" ;;
281 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
283 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
284 mandir="$ac_optarg" ;;
287 # Obsolete; use --without-fp.
290 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
294 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
295 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
298 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
299 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
300 | --oldin | --oldi | --old | --ol | --o)
301 ac_prev=oldincludedir ;;
302 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
303 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
304 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
305 oldincludedir="$ac_optarg" ;;
307 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
309 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
310 prefix="$ac_optarg" ;;
312 -program-prefix | --program-prefix | --program-prefi | --program-pref \
313 | --program-pre | --program-pr | --program-p)
314 ac_prev=program_prefix ;;
315 -program-prefix=* | --program-prefix=* | --program-prefi=* \
316 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
317 program_prefix="$ac_optarg" ;;
319 -program-suffix | --program-suffix | --program-suffi | --program-suff \
320 | --program-suf | --program-su | --program-s)
321 ac_prev=program_suffix ;;
322 -program-suffix=* | --program-suffix=* | --program-suffi=* \
323 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
324 program_suffix="$ac_optarg" ;;
326 -program-transform-name | --program-transform-name \
327 | --program-transform-nam | --program-transform-na \
328 | --program-transform-n | --program-transform- \
329 | --program-transform | --program-transfor \
330 | --program-transfo | --program-transf \
331 | --program-trans | --program-tran \
332 | --progr-tra | --program-tr | --program-t)
333 ac_prev=program_transform_name ;;
334 -program-transform-name=* | --program-transform-name=* \
335 | --program-transform-nam=* | --program-transform-na=* \
336 | --program-transform-n=* | --program-transform-=* \
337 | --program-transform=* | --program-transfor=* \
338 | --program-transfo=* | --program-transf=* \
339 | --program-trans=* | --program-tran=* \
340 | --progr-tra=* | --program-tr=* | --program-t=*)
341 program_transform_name="$ac_optarg" ;;
343 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
344 | -silent | --silent | --silen | --sile | --sil)
347 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
349 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
351 sbindir="$ac_optarg" ;;
353 -sharedstatedir | --sharedstatedir | --sharedstatedi \
354 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
355 | --sharedst | --shareds | --shared | --share | --shar \
357 ac_prev=sharedstatedir ;;
358 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
359 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
360 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
362 sharedstatedir="$ac_optarg" ;;
364 -site | --site | --sit)
366 -site=* | --site=* | --sit=*)
369 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
371 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
372 srcdir="$ac_optarg" ;;
374 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
375 | --syscon | --sysco | --sysc | --sys | --sy)
376 ac_prev=sysconfdir ;;
377 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
378 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
379 sysconfdir="$ac_optarg" ;;
381 -target | --target | --targe | --targ | --tar | --ta | --t)
383 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
384 target="$ac_optarg" ;;
386 -v | -verbose | --verbose | --verbos | --verbo | --verb)
389 -version | --version | --versio | --versi | --vers)
390 echo "configure generated by autoconf version 2.12.971230"
394 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
395 # Reject names that are not valid shell variable names.
396 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
397 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
399 ac_package=`echo $ac_package| sed 's/-/_/g'`
404 eval "with_${ac_package}='$ac_optarg'" ;;
406 -without-* | --without-*)
407 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
408 # Reject names that are not valid shell variable names.
409 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
410 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
412 ac_package=`echo $ac_package| sed 's/-/_/g'`
413 eval "with_${ac_package}=no" ;;
416 # Obsolete; use --with-x.
419 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
420 | --x-incl | --x-inc | --x-in | --x-i)
421 ac_prev=x_includes ;;
422 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
423 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
424 x_includes="$ac_optarg" ;;
426 -x-libraries | --x-libraries | --x-librarie | --x-librari \
427 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
428 ac_prev=x_libraries ;;
429 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
430 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
431 x_libraries="$ac_optarg" ;;
433 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
437 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
438 echo "configure: warning: $ac_option: invalid host type" 1>&2
440 if test "x$nonopt" != xNONE; then
441 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
449 if test -n "$ac_prev"; then
450 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
453 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
455 # File descriptor usage:
458 # 2 errors and warnings
459 # 3 some systems may open it to /dev/tty
460 # 4 used on the Kubota Titan
461 # 6 checking for... messages and results
462 # 5 compiler messages saved in config.log
463 if test "$silent" = yes; then
471 This file contains any messages produced by compilers while
472 running configure, to aid debugging if configure makes a mistake.
475 # Strip out --no-create and --no-recursion so they do not pile up.
476 # Also quote any args containing shell metacharacters.
481 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
482 | --no-cr | --no-c) ;;
483 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
484 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
485 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
486 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
487 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
492 # Only set these to C if already set. These must not be set unconditionally
493 # because not all systems understand e.g. LANG=C (notably SCO).
494 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
495 # Non-C LC_CTYPE values break the ctype check.
496 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
497 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
498 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
499 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
501 # confdefs.h avoids OS command line length limits that DEFS can exceed.
502 rm -rf conftest* confdefs.h
503 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
506 # A filename unique to this package, relative to the directory that
507 # configure is in, which we can look for to find out if srcdir is correct.
508 ac_unique_file=ncurses/lib_initscr.c
510 # Find the source files, if location was not specified.
511 if test -z "$srcdir"; then
512 ac_srcdir_defaulted=yes
513 # Try the directory containing this script, then its parent.
515 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
516 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
518 if test ! -r $srcdir/$ac_unique_file; then
522 ac_srcdir_defaulted=no
524 if test ! -r $srcdir/$ac_unique_file; then
525 if test "$ac_srcdir_defaulted" = yes; then
526 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
528 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
531 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
533 # Prefer explicitly selected file to automatically selected ones.
534 if test -z "$CONFIG_SITE"; then
535 if test "x$prefix" != xNONE; then
536 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
538 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
541 for ac_site_file in $CONFIG_SITE; do
542 if test -r "$ac_site_file"; then
543 echo "loading site script $ac_site_file"
548 if test -r "$cache_file"; then
549 echo "loading cache $cache_file"
552 echo "creating cache $cache_file"
557 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
558 ac_cpp='$CPP $CPPFLAGS'
559 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
560 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
561 cross_compiling=$ac_cv_prog_cc_cross
563 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
564 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
565 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
572 ac_n= ac_c='\c' ac_t=
579 NCURSES_MAJOR="`egrep '^NCURSES_MAJOR[ ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
580 NCURSES_MINOR="`egrep '^NCURSES_MINOR[ ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
581 NCURSES_PATCH="`egrep '^NCURSES_PATCH[ ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
582 cf_cv_abi_version=${NCURSES_MAJOR}
583 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
584 echo "$ac_t""Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version (`date`)" 1>&6
594 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
595 if test -f $ac_dir/install-sh; then
597 ac_install_sh="$ac_aux_dir/install-sh -c"
599 elif test -f $ac_dir/install.sh; then
601 ac_install_sh="$ac_aux_dir/install.sh -c"
605 if test -z "$ac_aux_dir"; then
606 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
608 ac_config_guess=$ac_aux_dir/config.guess
609 ac_config_sub=$ac_aux_dir/config.sub
610 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
613 if test -f $srcdir/config.guess ; then
615 # Make sure we can run config.sub.
616 if $ac_config_sub sun4 >/dev/null 2>&1; then :
617 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
620 echo $ac_n "checking host system type""... $ac_c" 1>&6
621 echo "configure:622: checking host system type" >&5
624 case "$host_alias" in
628 if host_alias=`$ac_config_guess`; then :
629 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
631 *) host_alias=$nonopt ;;
635 host=`$ac_config_sub $host_alias`
636 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
637 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
638 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
639 echo "$ac_t""$host" 1>&6
641 system_name="$host_os"
643 system_name="`(uname -s -r) 2>/dev/null`"
644 if test -z "$system_name" ; then
645 system_name="`(hostname) 2>/dev/null`"
648 test -n "$system_name" && cat >> confdefs.h <<EOF
649 #define SYSTEM_NAME "$system_name"
652 if eval "test \"`echo '$''{'cf_cv_system_name'+set}'`\" = set"; then
653 echo $ac_n "(cached) $ac_c" 1>&6
655 cf_cv_system_name="$system_name"
659 test -z "$system_name" && system_name="$cf_cv_system_name"
660 test -n "$cf_cv_system_name" && echo "$ac_t"""Configuring for $cf_cv_system_name"" 1>&6
662 if test ".$system_name" != ".$cf_cv_system_name" ; then
663 echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6
664 { echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; }
668 # Check whether --with-system-type or --without-system-type was given.
669 if test "${with_system_type+set}" = set; then
670 withval="$with_system_type"
671 echo "configure: warning: overriding system type to $withval" 1>&2
672 cf_cv_system_name=$withval
676 # We need a configure script only when compiling as part of GNU C library.
677 # Here we have to generate one of the files we need while compiling.
679 # The only problem is that users of the package might think they have to
680 # run configure themself and find it irritating when nothing happens.
682 # So we try here to find out whether we are called from the glibc configure
686 # Check whether --enable-add-ons or --disable-add-ons was given.
687 if test "${enable_add_ons+set}" = set; then
688 enableval="$enable_add_ons"
695 if test x"$glibc_add_on" = "xyes" ; then
698 rm -f $srcdir/Makefile
699 cp $srcdir/Makefile.glibc $srcdir/Makefile
700 echo "ncurses `grep \"^[ ]*ncurses-version[ ]*=.*$\" \
701 $srcdir/Makefile | sed -e \
702 's/^[ ]*ncurses-version[ ]*=[ ]*\([^ ^ ]*\)[ ]*$/\1/'`" > $srcdir/Banner
706 ### Save the given $CFLAGS to allow user-override.
707 cf_user_CFLAGS="$CFLAGS"
709 ### Default install-location
711 echo $ac_n "checking for prefix""... $ac_c" 1>&6
712 echo "configure:713: checking for prefix" >&5
713 if test "x$prefix" = "xNONE" ; then
714 case "$cf_cv_system_name" in
715 # non-vendor systems don't have a conflict
716 openbsd*|netbsd*|freebsd*|linux*)
719 *) prefix=$ac_default_prefix
723 echo "$ac_t""$prefix" 1>&6
725 if test "x$prefix" = "xNONE" ; then
726 echo $ac_n "checking for default include-directory""... $ac_c" 1>&6
727 echo "configure:728: checking for default include-directory" >&5
728 test -n "$verbose" && echo 1>&6
731 $includedir/ncurses \
733 $prefix/include/ncurses \
735 /usr/local/include/ncurses \
739 cf_dir=`eval echo $cf_symbol`
740 if test -f $cf_dir/curses.h ; then
741 if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
742 includedir="$cf_symbol"
743 test -n "$verbose" && echo $ac_n " found " 1>&6
747 test -n "$verbose" && echo " tested $cf_dir" 1>&6
749 echo "$ac_t""$includedir" 1>&6
753 ### Checks for programs.
754 # Extract the first word of "gcc", so it can be a program name with args.
755 set dummy gcc; ac_word=$2
756 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
757 echo "configure:758: checking for $ac_word" >&5
758 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
759 echo $ac_n "(cached) $ac_c" 1>&6
761 if test -n "$CC"; then
762 ac_cv_prog_CC="$CC" # Let the user override the test.
764 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
765 for ac_dir in $PATH; do
766 test -z "$ac_dir" && ac_dir=.
767 if test -f $ac_dir/$ac_word; then
776 if test -n "$CC"; then
777 echo "$ac_t""$CC" 1>&6
779 echo "$ac_t""no" 1>&6
782 if test -z "$CC"; then
783 # Extract the first word of "cc", so it can be a program name with args.
784 set dummy cc; ac_word=$2
785 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
786 echo "configure:787: checking for $ac_word" >&5
787 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
788 echo $ac_n "(cached) $ac_c" 1>&6
790 if test -n "$CC"; then
791 ac_cv_prog_CC="$CC" # Let the user override the test.
793 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
795 for ac_dir in $PATH; do
796 test -z "$ac_dir" && ac_dir=.
797 if test -f $ac_dir/$ac_word; then
798 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
807 if test $ac_prog_rejected = yes; then
808 # We found a bogon in the path, so make sure we never use it.
809 set dummy $ac_cv_prog_CC
811 if test $# -gt 0; then
812 # We chose a different compiler from the bogus one.
813 # However, it has the same basename, so the bogon will be chosen
814 # first if we set CC to just the basename; use the full file name.
816 set dummy "$ac_dir/$ac_word" "$@"
824 if test -n "$CC"; then
825 echo "$ac_t""$CC" 1>&6
827 echo "$ac_t""no" 1>&6
830 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
833 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
834 echo "configure:835: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
837 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
838 ac_cpp='$CPP $CPPFLAGS'
839 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
840 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
841 cross_compiling=$ac_cv_prog_cc_cross
843 cat > conftest.$ac_ext <<EOF
844 #line 845 "configure"
845 #include "confdefs.h"
848 if { (eval echo configure:849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
849 ac_cv_prog_cc_works=yes
850 # If we can't run a trivial program, we are probably using a cross compiler.
851 if (./conftest; exit) 2>/dev/null; then
852 ac_cv_prog_cc_cross=no
854 ac_cv_prog_cc_cross=yes
857 echo "configure: failed program was:" >&5
858 cat conftest.$ac_ext >&5
859 ac_cv_prog_cc_works=no
863 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
864 if test $ac_cv_prog_cc_works = no; then
865 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
867 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
868 echo "configure:869: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
869 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
870 cross_compiling=$ac_cv_prog_cc_cross
872 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
873 echo "configure:874: checking whether we are using GNU C" >&5
874 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
875 echo $ac_n "(cached) $ac_c" 1>&6
877 cat > conftest.c <<EOF
882 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
889 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
891 if test $ac_cv_prog_gcc = yes; then
893 ac_test_CFLAGS="${CFLAGS+set}"
894 ac_save_CFLAGS="$CFLAGS"
896 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
897 echo "configure:898: checking whether ${CC-cc} accepts -g" >&5
898 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
899 echo $ac_n "(cached) $ac_c" 1>&6
901 echo 'void f(){}' > conftest.c
902 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
911 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
912 if test "$ac_test_CFLAGS" = set; then
913 CFLAGS="$ac_save_CFLAGS"
914 elif test $ac_cv_prog_cc_g = yes; then
921 test "${CFLAGS+set}" = set || CFLAGS="-g"
924 if test -n "$GCC" ; then
925 echo $ac_n "checking version of gcc""... $ac_c" 1>&6
926 echo "configure:927: checking version of gcc" >&5
929 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
930 echo "configure:931: checking how to run the C preprocessor" >&5
931 # On Suns, sometimes $CPP names a directory.
932 if test -n "$CPP" && test -d "$CPP"; then
935 if test -z "$CPP"; then
936 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
937 echo $ac_n "(cached) $ac_c" 1>&6
939 # This must be in double quotes, not single quotes, because CPP may get
940 # substituted into the Makefile and "${CC-cc}" will confuse make.
942 # On the NeXT, cc -E runs the code through the compiler's parser,
943 # not just through cpp.
944 cat > conftest.$ac_ext <<EOF
945 #line 946 "configure"
946 #include "confdefs.h"
950 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
951 { (eval echo configure:952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
952 ac_err=`grep -v '^ *+' conftest.out`
953 if test -z "$ac_err"; then
957 echo "configure: failed program was:" >&5
958 cat conftest.$ac_ext >&5
960 CPP="${CC-cc} -E -traditional-cpp"
961 cat > conftest.$ac_ext <<EOF
962 #line 963 "configure"
963 #include "confdefs.h"
967 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
968 { (eval echo configure:969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
969 ac_err=`grep -v '^ *+' conftest.out`
970 if test -z "$ac_err"; then
974 echo "configure: failed program was:" >&5
975 cat conftest.$ac_ext >&5
982 ac_cv_prog_CPP="$CPP"
984 CPP="$ac_cv_prog_CPP"
986 ac_cv_prog_CPP="$CPP"
988 echo "$ac_t""$CPP" 1>&6
990 if test $ac_cv_prog_gcc = yes; then
991 echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
992 echo "configure:993: checking whether ${CC-cc} needs -traditional" >&5
993 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
994 echo $ac_n "(cached) $ac_c" 1>&6
996 ac_pattern="Autoconf.*'x'"
997 cat > conftest.$ac_ext <<EOF
998 #line 999 "configure"
999 #include "confdefs.h"
1003 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1004 egrep "$ac_pattern" >/dev/null 2>&1; then
1006 ac_cv_prog_gcc_traditional=yes
1009 ac_cv_prog_gcc_traditional=no
1014 if test $ac_cv_prog_gcc_traditional = no; then
1015 cat > conftest.$ac_ext <<EOF
1016 #line 1017 "configure"
1017 #include "confdefs.h"
1021 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
1022 egrep "$ac_pattern" >/dev/null 2>&1; then
1024 ac_cv_prog_gcc_traditional=yes
1031 echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
1032 if test $ac_cv_prog_gcc_traditional = yes; then
1033 CC="$CC -traditional"
1037 echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
1038 echo "configure:1039: checking for POSIXized ISC" >&5
1039 if test -d /etc/conf/kconfig.d &&
1040 grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
1042 echo "$ac_t""yes" 1>&6
1043 ISC=yes # If later tests want to check for ISC.
1044 cat >> confdefs.h <<\EOF
1045 #define _POSIX_SOURCE 1
1048 if test "$GCC" = yes; then
1054 echo "$ac_t""no" 1>&6
1058 # Extract the first word of "ldconfig", so it can be a program name with args.
1059 set dummy ldconfig; ac_word=$2
1060 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1061 echo "configure:1062: checking for $ac_word" >&5
1062 if eval "test \"`echo '$''{'ac_cv_path_LDCONFIG'+set}'`\" = set"; then
1063 echo $ac_n "(cached) $ac_c" 1>&6
1067 ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
1070 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1071 for ac_dir in $PATH:/sbin:/usr/sbin$ac_dummy; do
1072 test -z "$ac_dir" && ac_dir=.
1073 if test -f $ac_dir/$ac_word; then
1074 ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
1082 LDCONFIG="$ac_cv_path_LDCONFIG"
1083 if test -n "$LDCONFIG"; then
1084 echo "$ac_t""$LDCONFIG" 1>&6
1086 echo "$ac_t""no" 1>&6
1090 echo $ac_n "checking if you want to build with C++""... $ac_c" 1>&6
1091 echo "configure:1092: checking if you want to build with C++" >&5
1093 # Check whether --with-cxx or --without-cxx was given.
1094 if test "${with_cxx+set}" = set; then
1096 cf_with_cxx=$withval
1101 echo "$ac_t""$cf_with_cxx" 1>&6
1102 if test "X$cf_with_cxx" != Xno ; then
1103 for ac_prog in $CCC c++ g++ gcc CC cxx cc++
1105 # Extract the first word of "$ac_prog", so it can be a program name with args.
1106 set dummy $ac_prog; ac_word=$2
1107 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1108 echo "configure:1109: checking for $ac_word" >&5
1109 if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
1110 echo $ac_n "(cached) $ac_c" 1>&6
1112 if test -n "$CXX"; then
1113 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1115 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1116 for ac_dir in $PATH; do
1117 test -z "$ac_dir" && ac_dir=.
1118 if test -f $ac_dir/$ac_word; then
1119 ac_cv_prog_CXX="$ac_prog"
1126 CXX="$ac_cv_prog_CXX"
1127 if test -n "$CXX"; then
1128 echo "$ac_t""$CXX" 1>&6
1130 echo "$ac_t""no" 1>&6
1133 test -n "$CXX" && break
1135 test -n "$CXX" || CXX="gcc"
1138 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
1139 echo "configure:1140: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
1142 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1143 ac_cpp='$CXXCPP $CPPFLAGS'
1144 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1145 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1146 cross_compiling=$ac_cv_prog_cxx_cross
1148 cat > conftest.$ac_ext <<EOF
1149 #line 1150 "configure"
1150 #include "confdefs.h"
1153 if { (eval echo configure:1154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1154 ac_cv_prog_cxx_works=yes
1155 # If we can't run a trivial program, we are probably using a cross compiler.
1156 if (./conftest; exit) 2>/dev/null; then
1157 ac_cv_prog_cxx_cross=no
1159 ac_cv_prog_cxx_cross=yes
1162 echo "configure: failed program was:" >&5
1163 cat conftest.$ac_ext >&5
1164 ac_cv_prog_cxx_works=no
1168 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1169 ac_cpp='$CPP $CPPFLAGS'
1170 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1171 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1172 cross_compiling=$ac_cv_prog_cc_cross
1174 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
1175 if test $ac_cv_prog_cxx_works = no; then
1176 { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
1178 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1179 echo "configure:1180: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
1180 echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
1181 cross_compiling=$ac_cv_prog_cxx_cross
1183 echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
1184 echo "configure:1185: checking whether we are using GNU C++" >&5
1185 if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
1186 echo $ac_n "(cached) $ac_c" 1>&6
1188 cat > conftest.C <<EOF
1193 if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1194: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1200 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
1202 if test $ac_cv_prog_gxx = yes; then
1204 ac_test_CXXFLAGS="${CXXFLAGS+set}"
1205 ac_save_CXXFLAGS="$CXXFLAGS"
1207 echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
1208 echo "configure:1209: checking whether ${CXX-g++} accepts -g" >&5
1209 if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
1210 echo $ac_n "(cached) $ac_c" 1>&6
1212 echo 'void f(){}' > conftest.cc
1213 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
1214 ac_cv_prog_cxx_g=yes
1222 echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
1223 if test "$ac_test_CXXFLAGS" = set; then
1224 CXXFLAGS="$ac_save_CXXFLAGS"
1225 elif test $ac_cv_prog_cxx_g = yes; then
1232 test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
1236 if test -n "$GXX" ; then case "`${CXX-g++} --version`" in 1*|2.[0-6]*) GXX=""; CXX=""; ac_cv_prog_gxx=no; cf_cxx_library=no ; echo No: templates do not work;; esac; fi
1238 echo $ac_n "checking if you want to build programs such as tic""... $ac_c" 1>&6
1239 echo "configure:1240: checking if you want to build programs such as tic" >&5
1241 # Check whether --with-progs or --without-progs was given.
1242 if test "${with_progs+set}" = set; then
1243 withval="$with_progs"
1244 cf_with_progs=$withval
1249 echo "$ac_t""$cf_with_progs" 1>&6
1251 modules_to_build="ncurses"
1252 if test "X$cf_with_progs" != Xno ; then
1253 modules_to_build="$modules_to_build progs tack"
1255 modules_to_build="$modules_to_build panel menu form"
1257 for ac_prog in mawk gawk nawk awk
1259 # Extract the first word of "$ac_prog", so it can be a program name with args.
1260 set dummy $ac_prog; ac_word=$2
1261 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1262 echo "configure:1263: checking for $ac_word" >&5
1263 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1264 echo $ac_n "(cached) $ac_c" 1>&6
1266 if test -n "$AWK"; then
1267 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1269 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1270 for ac_dir in $PATH; do
1271 test -z "$ac_dir" && ac_dir=.
1272 if test -f $ac_dir/$ac_word; then
1273 ac_cv_prog_AWK="$ac_prog"
1280 AWK="$ac_cv_prog_AWK"
1281 if test -n "$AWK"; then
1282 echo "$ac_t""$AWK" 1>&6
1284 echo "$ac_t""no" 1>&6
1287 test -n "$AWK" && break
1290 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1291 echo "configure:1292: checking whether ${MAKE-make} sets \${MAKE}" >&5
1292 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1293 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
1294 echo $ac_n "(cached) $ac_c" 1>&6
1296 cat > conftestmake <<\EOF
1298 @echo 'ac_maketemp="${MAKE}"'
1300 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1301 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1302 if test -n "$ac_maketemp"; then
1303 eval ac_cv_prog_make_${ac_make}_set=yes
1305 eval ac_cv_prog_make_${ac_make}_set=no
1309 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1310 echo "$ac_t""yes" 1>&6
1313 echo "$ac_t""no" 1>&6
1314 SET_MAKE="MAKE=${MAKE-make}"
1317 # Find a good install program. We prefer a C program (faster),
1318 # so one script is as good as another. But avoid the broken or
1319 # incompatible versions:
1320 # SysV /etc/install, /usr/sbin/install
1321 # SunOS /usr/etc/install
1322 # IRIX /sbin/install
1324 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1325 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1326 # ./install, which can be erroneously created by make from ./install.sh.
1327 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1328 echo "configure:1329: checking for a BSD compatible install" >&5
1329 if test -z "$INSTALL"; then
1330 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
1331 echo $ac_n "(cached) $ac_c" 1>&6
1333 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
1334 for ac_dir in $PATH; do
1335 # Account for people who put trailing slashes in PATH elements.
1337 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1339 # OSF1 and SCO ODT 3.0 have their own names for install.
1340 for ac_prog in ginstall installbsd scoinst install; do
1341 if test -f $ac_dir/$ac_prog; then
1342 if test $ac_prog = install &&
1343 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1344 # AIX install. It has an incompatible calling convention.
1345 # OSF/1 installbsd also uses dspmsg, but is usable.
1348 ac_cv_path_install="$ac_dir/$ac_prog -c"
1359 if test "${ac_cv_path_install+set}" = set; then
1360 INSTALL="$ac_cv_path_install"
1362 # As a last resort, use the slow shell script. We don't cache a
1363 # path for INSTALL within a source directory, because that will
1364 # break other packages using the cache if that directory is
1365 # removed, or if the path is relative.
1366 INSTALL="$ac_install_sh"
1369 echo "$ac_t""$INSTALL" 1>&6
1371 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1372 # It thinks the first close brace ends the variable substitution.
1373 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1375 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1381 cf_dir=`echo $INSTALL|sed -e 's%/[^/]*$%%'`
1382 test -z "$cf_dir" && cf_dir=.
1383 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's:^.*/::'`
1387 echo $ac_n "checking for long file names""... $ac_c" 1>&6
1388 echo "configure:1389: checking for long file names" >&5
1389 if eval "test \"`echo '$''{'ac_cv_sys_long_file_names'+set}'`\" = set"; then
1390 echo $ac_n "(cached) $ac_c" 1>&6
1392 ac_cv_sys_long_file_names=yes
1393 # Test for long file names in all the places we know might matter:
1394 # . the current directory, where building will happen
1395 # $prefix/lib where we will be installing things
1396 # $exec_prefix/lib likewise
1397 # eval it to expand exec_prefix.
1398 # $TMPDIR if set, where it might want to write temporary files
1399 # if $TMPDIR is not set:
1400 # /tmp where it might want to write temporary files
1403 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
1404 ac_tmpdirs="$TMPDIR"
1406 ac_tmpdirs='/tmp /var/tmp /usr/tmp'
1408 for ac_dir in . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
1409 test -d $ac_dir || continue
1410 test -w $ac_dir || continue # It is less confusing to not echo anything here.
1411 (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
1412 (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
1413 val=`cat $ac_dir/conftest9012345 2>/dev/null`
1414 if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
1415 ac_cv_sys_long_file_names=no
1416 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
1419 rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
1423 echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
1424 if test $ac_cv_sys_long_file_names = yes; then
1425 cat >> confdefs.h <<\EOF
1426 #define HAVE_LONG_FILE_NAMES 1
1431 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1432 echo "configure:1433: checking whether ln -s works" >&5
1433 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1434 echo $ac_n "(cached) $ac_c" 1>&6
1437 if ln -s X conftestdata 2>/dev/null
1440 ac_cv_prog_LN_S="ln -s"
1445 LN_S="$ac_cv_prog_LN_S"
1446 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1447 echo "$ac_t""yes" 1>&6
1449 echo "$ac_t""no" 1>&6
1452 # Extract the first word of "ranlib", so it can be a program name with args.
1453 set dummy ranlib; ac_word=$2
1454 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1455 echo "configure:1456: checking for $ac_word" >&5
1456 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
1457 echo $ac_n "(cached) $ac_c" 1>&6
1459 if test -n "$RANLIB"; then
1460 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
1462 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1463 for ac_dir in $PATH; do
1464 test -z "$ac_dir" && ac_dir=.
1465 if test -f $ac_dir/$ac_word; then
1466 ac_cv_prog_RANLIB="ranlib"
1471 test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
1474 RANLIB="$ac_cv_prog_RANLIB"
1475 if test -n "$RANLIB"; then
1476 echo "$ac_t""$RANLIB" 1>&6
1478 echo "$ac_t""no" 1>&6
1481 for ac_prog in tdlint lint alint
1483 # Extract the first word of "$ac_prog", so it can be a program name with args.
1484 set dummy $ac_prog; ac_word=$2
1485 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1486 echo "configure:1487: checking for $ac_word" >&5
1487 if eval "test \"`echo '$''{'ac_cv_prog_LINT'+set}'`\" = set"; then
1488 echo $ac_n "(cached) $ac_c" 1>&6
1490 if test -n "$LINT"; then
1491 ac_cv_prog_LINT="$LINT" # Let the user override the test.
1493 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1494 for ac_dir in $PATH; do
1495 test -z "$ac_dir" && ac_dir=.
1496 if test -f $ac_dir/$ac_word; then
1497 ac_cv_prog_LINT="$ac_prog"
1504 LINT="$ac_cv_prog_LINT"
1505 if test -n "$LINT"; then
1506 echo "$ac_t""$LINT" 1>&6
1508 echo "$ac_t""no" 1>&6
1511 test -n "$LINT" && break
1514 for ac_prog in man man_db
1516 # Extract the first word of "$ac_prog", so it can be a program name with args.
1517 set dummy $ac_prog; ac_word=$2
1518 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1519 echo "configure:1520: checking for $ac_word" >&5
1520 if eval "test \"`echo '$''{'ac_cv_prog_MAN'+set}'`\" = set"; then
1521 echo $ac_n "(cached) $ac_c" 1>&6
1523 if test -n "$MAN"; then
1524 ac_cv_prog_MAN="$MAN" # Let the user override the test.
1526 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1527 for ac_dir in $PATH; do
1528 test -z "$ac_dir" && ac_dir=.
1529 if test -f $ac_dir/$ac_word; then
1530 ac_cv_prog_MAN="$ac_prog"
1537 MAN="$ac_cv_prog_MAN"
1538 if test -n "$MAN"; then
1539 echo "$ac_t""$MAN" 1>&6
1541 echo "$ac_t""no" 1>&6
1544 test -n "$MAN" && break
1549 if eval "test \"`echo '$''{'cf_cv_subst_LD'+set}'`\" = set"; then
1550 echo $ac_n "(cached) $ac_c" 1>&6
1553 echo $ac_n "checking for loader (symbol LD)""... $ac_c" 1>&6
1554 echo "configure:1555: checking for loader (symbol LD)" >&5
1555 test -z "$LD" && LD=ld
1556 echo "$ac_t""$LD" 1>&6
1561 LD=${cf_cv_subst_LD}
1563 if eval "test \"`echo '$''{'cf_cv_subst_AR'+set}'`\" = set"; then
1564 echo $ac_n "(cached) $ac_c" 1>&6
1567 echo $ac_n "checking for archiver (symbol AR)""... $ac_c" 1>&6
1568 echo "configure:1569: checking for archiver (symbol AR)" >&5
1569 test -z "$AR" && AR=ar
1570 echo "$ac_t""$AR" 1>&6
1575 AR=${cf_cv_subst_AR}
1577 if eval "test \"`echo '$''{'cf_cv_subst_AR_OPTS'+set}'`\" = set"; then
1578 echo $ac_n "(cached) $ac_c" 1>&6
1581 echo $ac_n "checking for archiver options (symbol AR_OPTS)""... $ac_c" 1>&6
1582 echo "configure:1583: checking for archiver options (symbol AR_OPTS)" >&5
1583 test -z "$AR_OPTS" && AR_OPTS=rv
1584 echo "$ac_t""$AR_OPTS" 1>&6
1586 cf_cv_subst_AR_OPTS=$AR_OPTS
1589 AR_OPTS=${cf_cv_subst_AR_OPTS}
1593 echo $ac_n "checking for makeflags variable""... $ac_c" 1>&6
1594 echo "configure:1595: checking for makeflags variable" >&5
1595 if eval "test \"`echo '$''{'cf_cv_makeflags'+set}'`\" = set"; then
1596 echo $ac_n "(cached) $ac_c" 1>&6
1600 for cf_option in '$(MFLAGS)' '-$(MAKEFLAGS)'
1602 cat >cf_makeflags.tmp <<CF_EOF
1606 set cf_result=`${MAKE-make} -f cf_makeflags.tmp 2>/dev/null`
1607 if test "$cf_result" != "."
1609 cf_cv_makeflags=$cf_option
1613 rm -f cf_makeflags.tmp
1616 echo "$ac_t""$cf_cv_makeflags" 1>&6
1619 echo $ac_n "checking format of man-pages""... $ac_c" 1>&6
1620 echo "configure:1621: checking format of man-pages" >&5
1621 if test -z "$MANPATH" ; then
1622 MANPATH="/usr/man:/usr/share/man"
1624 # look for the 'date' man-page (it's most likely to be installed!)
1625 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1627 for cf_dir in $MANPATH; do
1628 test -z "$cf_dir" && cf_dir=/usr/man
1631 for cf_name in $cf_dir/*/date.[01]* $cf_dir/*/date
1633 cf_test=`echo $cf_name | sed -e 's/*//'`
1634 if test "x$cf_test" = "x$cf_name" ; then
1636 *.gz) cf_form=gzip; cf_name=`basename $cf_name .gz`;;
1637 *.Z) cf_form=compress; cf_name=`basename $cf_name .Z`;;
1638 *.0) cf_form=BSDI; cf_format=yes;;
1644 if test "$cf_form" != "unknown" ; then
1649 if test "$prefix" = "NONE" ; then
1650 cf_prefix="$ac_default_prefix"
1655 # Debian 'man' program?
1656 test -f /etc/debian_version && \
1657 cf_rename=`cd $srcdir && pwd`/man/man_db.renames
1659 test ! -d man && mkdir man
1661 # Construct a sed-script to perform renaming within man-pages
1662 if test -n "$cf_rename" ; then
1663 $srcdir/man/make_sed.sh $cf_rename >man/edit_man.sed
1665 if test $cf_format = yes ; then
1666 cf_subdir='$mandir/cat'
1668 cf_subdir='$mandir/man'
1671 cat >man/edit_man.sh <<CF_EOF
1673 # this script is generated by the configure-script
1676 MKDIRS="`cd $srcdir && pwd`/mkinstalldirs"
1678 INSTALL_DATA="$INSTALL_DATA"
1679 TMP=\${TMPDIR-/tmp}/man\$\$
1680 trap "rm -f \$TMP" 0 1 2 5 15
1692 section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
1693 if test \$verb = installing ; then
1694 if test ! -d $cf_subdir\${section} ; then
1695 \$MKDIRS $cf_subdir\$section
1698 source=\`basename \$i\`
1700 if test -z "$cf_rename" ; then
1701 cat >>man/edit_man.sh <<CF_EOF
1702 target=$cf_subdir\${section}/\$source
1703 sed -e "s,@DATADIR@,\$datadir," < \$i >\$TMP
1706 cat >>man/edit_man.sh <<CF_EOF
1707 target=\`grep "^\$source" $cf_rename | $AWK '{print \$2}'\`
1708 if test -z "\$target" ; then
1709 echo '? missing rename for '\$source
1712 target="$cf_subdir\$section/\$target"
1713 test \$verb = installing && sed -e "s,@DATADIR@,\$datadir," < \$i | sed -f edit_man.sed >\$TMP
1716 if test \$verb = installing ; then
1717 if test $cf_format = yes ; then
1718 cat >>man/edit_man.sh <<CF_EOF
1719 nroff -man \$TMP >\$TMP.out
1726 cat >>man/edit_man.sh <<CF_EOF
1727 if test \$verb = installing ; then
1728 if ( compress -f \$TMP )
1737 cat >>man/edit_man.sh <<CF_EOF
1738 if test \$verb = installing ; then
1739 if ( gzip -f \$TMP )
1744 target="\$target.gz"
1748 cat >>man/edit_man.sh <<CF_EOF
1749 # BSDI installs only .0 suffixes in the cat directories
1750 target="\`echo \$target|sed -e 's/\.[1-9]\+.\?/.0/'\`"
1754 cat >>man/edit_man.sh <<CF_EOF
1755 echo \$verb \$target
1756 if test \$verb = installing ; then
1757 \$INSTALL_DATA \$TMP \$target
1765 chmod 755 man/edit_man.sh
1766 echo "$ac_t""$cf_form" 1>&6
1769 echo $ac_n "checking if you have specified an install-prefix""... $ac_c" 1>&6
1770 echo "configure:1771: checking if you have specified an install-prefix" >&5
1772 # Check whether --with-install-prefix or --without-install-prefix was given.
1773 if test "${with_install_prefix+set}" = set; then
1774 withval="$with_install_prefix"
1775 case "$withval" in #(vi
1778 *) INSTALL_PREFIX="$withval"
1783 echo "$ac_t""$INSTALL_PREFIX" 1>&6
1786 ###############################################################################
1789 ### Options to allow the user to specify the set of libraries which are used.
1790 ### Use "--without-normal --with-shared" to allow the default model to be
1791 ### shared, for example.
1794 echo $ac_n "checking if you want to build shared libraries""... $ac_c" 1>&6
1795 echo "configure:1796: checking if you want to build shared libraries" >&5
1797 # Check whether --with-shared or --without-shared was given.
1798 if test "${with_shared+set}" = set; then
1799 withval="$with_shared"
1800 with_shared=$withval
1805 echo "$ac_t""$with_shared" 1>&6
1806 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
1808 echo $ac_n "checking if you want to build static libraries""... $ac_c" 1>&6
1809 echo "configure:1810: checking if you want to build static libraries" >&5
1811 # Check whether --with-normal or --without-normal was given.
1812 if test "${with_normal+set}" = set; then
1813 withval="$with_normal"
1814 with_normal=$withval
1819 echo "$ac_t""$with_normal" 1>&6
1820 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
1822 echo $ac_n "checking if you want to build debug libraries""... $ac_c" 1>&6
1823 echo "configure:1824: checking if you want to build debug libraries" >&5
1825 # Check whether --with-debug or --without-debug was given.
1826 if test "${with_debug+set}" = set; then
1827 withval="$with_debug"
1833 echo "$ac_t""$with_debug" 1>&6
1834 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
1836 echo $ac_n "checking if you want to build profiling libraries""... $ac_c" 1>&6
1837 echo "configure:1838: checking if you want to build profiling libraries" >&5
1839 # Check whether --with-profile or --without-profile was given.
1840 if test "${with_profile+set}" = set; then
1841 withval="$with_profile"
1842 with_profile=$withval
1847 echo "$ac_t""$with_profile" 1>&6
1848 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
1850 echo $ac_n "checking if you want to build a separate terminfo library""... $ac_c" 1>&6
1851 echo "configure:1852: checking if you want to build a separate terminfo library" >&5
1853 # Check whether --with-termlib or --without-termlib was given.
1854 if test "${with_termlib+set}" = set; then
1855 withval="$with_termlib"
1856 with_termlib=$withval
1861 echo "$ac_t""$with_termlib" 1>&6
1863 ### Checks for special libraries, must be done up-front.
1864 echo $ac_n "checking if you want to link with dbmalloc for testing""... $ac_c" 1>&6
1865 echo "configure:1866: checking if you want to link with dbmalloc for testing" >&5
1867 # Check whether --with-dbmalloc or --without-dbmalloc was given.
1868 if test "${with_dbmalloc+set}" = set; then
1869 withval="$with_dbmalloc"
1875 echo "$ac_t""$with_dbmalloc" 1>&6
1876 if test $with_dbmalloc = yes ; then
1877 echo $ac_n "checking for debug_malloc in -ldbmalloc""... $ac_c" 1>&6
1878 echo "configure:1879: checking for debug_malloc in -ldbmalloc" >&5
1879 ac_lib_var=`echo dbmalloc'_'debug_malloc | sed 'y%./+-%__p_%'`
1880 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1881 echo $ac_n "(cached) $ac_c" 1>&6
1883 ac_save_LIBS="$LIBS"
1884 LIBS="-ldbmalloc $LIBS"
1885 cat > conftest.$ac_ext <<EOF
1886 #line 1887 "configure"
1887 #include "confdefs.h"
1888 /* Override any gcc2 internal prototype to avoid an error. */
1889 /* We use char because int might match the return type of a gcc2
1890 builtin and then its argument prototype would still apply. */
1891 char debug_malloc();
1897 if { (eval echo configure:1898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1899 eval "ac_cv_lib_$ac_lib_var=yes"
1901 echo "configure: failed program was:" >&5
1902 cat conftest.$ac_ext >&5
1904 eval "ac_cv_lib_$ac_lib_var=no"
1907 LIBS="$ac_save_LIBS"
1910 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1911 echo "$ac_t""yes" 1>&6
1912 ac_tr_lib=HAVE_LIB`echo dbmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1913 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1914 cat >> confdefs.h <<EOF
1915 #define $ac_tr_lib 1
1918 LIBS="-ldbmalloc $LIBS"
1921 echo "$ac_t""no" 1>&6
1926 echo $ac_n "checking if you want to link with dmalloc for testing""... $ac_c" 1>&6
1927 echo "configure:1928: checking if you want to link with dmalloc for testing" >&5
1929 # Check whether --with-dmalloc or --without-dmalloc was given.
1930 if test "${with_dmalloc+set}" = set; then
1931 withval="$with_dmalloc"
1937 echo "$ac_t""$with_dmalloc" 1>&6
1938 if test $with_dmalloc = yes ; then
1939 echo $ac_n "checking for dmalloc_debug in -ldmalloc""... $ac_c" 1>&6
1940 echo "configure:1941: checking for dmalloc_debug in -ldmalloc" >&5
1941 ac_lib_var=`echo dmalloc'_'dmalloc_debug | sed 'y%./+-%__p_%'`
1942 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1943 echo $ac_n "(cached) $ac_c" 1>&6
1945 ac_save_LIBS="$LIBS"
1946 LIBS="-ldmalloc $LIBS"
1947 cat > conftest.$ac_ext <<EOF
1948 #line 1949 "configure"
1949 #include "confdefs.h"
1950 /* Override any gcc2 internal prototype to avoid an error. */
1951 /* We use char because int might match the return type of a gcc2
1952 builtin and then its argument prototype would still apply. */
1953 char dmalloc_debug();
1959 if { (eval echo configure:1960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
1961 eval "ac_cv_lib_$ac_lib_var=yes"
1963 echo "configure: failed program was:" >&5
1964 cat conftest.$ac_ext >&5
1966 eval "ac_cv_lib_$ac_lib_var=no"
1969 LIBS="$ac_save_LIBS"
1972 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1973 echo "$ac_t""yes" 1>&6
1974 ac_tr_lib=HAVE_LIB`echo dmalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
1975 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
1976 cat >> confdefs.h <<EOF
1977 #define $ac_tr_lib 1
1980 LIBS="-ldmalloc $LIBS"
1983 echo "$ac_t""no" 1>&6
1988 echo $ac_n "checking if you want to link with the gpm mouse library""... $ac_c" 1>&6
1989 echo "configure:1990: checking if you want to link with the gpm mouse library" >&5
1991 # Check whether --with-gpm or --without-gpm was given.
1992 if test "${with_gpm+set}" = set; then
1999 echo "$ac_t""$with_gpm" 1>&6
2000 if test $with_gpm = yes ; then
2001 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
2002 echo "configure:2003: checking for Gpm_Open in -lgpm" >&5
2003 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
2004 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2005 echo $ac_n "(cached) $ac_c" 1>&6
2007 ac_save_LIBS="$LIBS"
2008 LIBS="-lgpm -lcurses -ltermcap $LIBS"
2009 cat > conftest.$ac_ext <<EOF
2010 #line 2011 "configure"
2011 #include "confdefs.h"
2012 /* Override any gcc2 internal prototype to avoid an error. */
2013 /* We use char because int might match the return type of a gcc2
2014 builtin and then its argument prototype would still apply. */
2021 if { (eval echo configure:2022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2023 eval "ac_cv_lib_$ac_lib_var=yes"
2025 echo "configure: failed program was:" >&5
2026 cat conftest.$ac_ext >&5
2028 eval "ac_cv_lib_$ac_lib_var=no"
2031 LIBS="$ac_save_LIBS"
2034 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2035 echo "$ac_t""yes" 1>&6
2037 EXTRA_LIBS="$EXTRA_LIBS -lgpm -lncurses"
2038 SHLIB_LIST="$SHLIB_DEPS -lgpm "
2039 cat >> confdefs.h <<\EOF
2040 #define HAVE_LIBGPM 1
2045 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2046 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2047 echo "configure:2048: checking for $ac_hdr" >&5
2048 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2049 echo $ac_n "(cached) $ac_c" 1>&6
2051 cat > conftest.$ac_ext <<EOF
2052 #line 2053 "configure"
2053 #include "confdefs.h"
2056 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2057 { (eval echo configure:2058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2058 ac_err=`grep -v '^ *+' conftest.out`
2059 if test -z "$ac_err"; then
2061 eval "ac_cv_header_$ac_safe=yes"
2064 echo "configure: failed program was:" >&5
2065 cat conftest.$ac_ext >&5
2067 eval "ac_cv_header_$ac_safe=no"
2071 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2072 echo "$ac_t""yes" 1>&6
2073 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2074 cat >> confdefs.h <<EOF
2075 #define $ac_tr_hdr 1
2079 echo "$ac_t""no" 1>&6
2085 echo "$ac_t""no" 1>&6
2093 echo $ac_n "checking for specified models""... $ac_c" 1>&6
2094 echo "configure:2095: checking for specified models" >&5
2095 test -z "$cf_list_models" && cf_list_models=normal
2096 echo "$ac_t""$cf_list_models" 1>&6
2098 ### Use the first model as the default, and save its suffix for use in building
2099 ### up test-applications.
2100 DFT_LWR_MODEL=`echo $cf_list_models | $AWK '{print $1}'`
2102 DFT_UPR_MODEL=`echo $DFT_LWR_MODEL | tr '[a-z]' '[A-Z]'`
2105 case $DFT_LWR_MODEL in
2106 normal) DFT_DEP_SUFFIX='.a' ;;
2107 debug) DFT_DEP_SUFFIX='_g.a' ;;
2108 profile) DFT_DEP_SUFFIX='_p.a' ;;
2110 case $cf_cv_system_name in
2111 openbsd*|netbsd*|freebsd*)
2112 DFT_DEP_SUFFIX='.so.$(REL_VERSION)' ;;
2113 hpux*) DFT_DEP_SUFFIX='.sl' ;;
2114 *) DFT_DEP_SUFFIX='.so' ;;
2118 case $DFT_LWR_MODEL in
2119 normal) DFT_ARG_SUFFIX='' ;;
2120 debug) DFT_ARG_SUFFIX='_g' ;;
2121 profile) DFT_ARG_SUFFIX='_p' ;;
2122 shared) DFT_ARG_SUFFIX='' ;;
2125 case $DFT_LWR_MODEL in
2126 normal) DFT_OBJ_SUBDIR='objects' ;;
2127 debug) DFT_OBJ_SUBDIR='obj_g' ;;
2128 profile) DFT_OBJ_SUBDIR='obj_p' ;;
2129 shared) DFT_OBJ_SUBDIR='obj_s' ;;
2140 case $cf_cv_system_name in
2141 os2) cf_prefix='' ;;
2142 *) cf_prefix='lib' ;;
2145 LIB_PREFIX=$LIB_DIR/$cf_prefix
2149 if test X"$CC_G_OPT" = X"" ; then
2151 test -n "$GCC" && test "${ac_cv_prog_cc_g}${ac_cv_prog_gcc_g}" != yes && CC_G_OPT=''
2155 if test X"$CXX_G_OPT" = X"" ; then
2157 test -n "$GXX" && test "${ac_cv_prog_cxx_g}${ac_cv_prog_gxx_g}" != yes && CXX_G_OPT=''
2161 case $DFT_LWR_MODEL in
2162 normal) LD_MODEL='' ;;
2163 debug) LD_MODEL=$CC_G_OPT ;;
2164 profile) LD_MODEL='-pg';;
2165 shared) LD_MODEL='' ;;
2168 echo $ac_n "checking if rpath option should be used""... $ac_c" 1>&6
2169 echo "configure:2170: checking if rpath option should be used" >&5
2171 # Check whether --enable-rpath or --disable-rpath was given.
2172 if test "${enable_rpath+set}" = set; then
2173 enableval="$enable_rpath"
2174 cf_cv_ld_rpath=$enableval
2179 echo "$ac_t""$cf_cv_ld_rpath" 1>&6
2186 INSTALL_LIB="-m 644"
2188 cf_cv_do_symlinks=no
2191 case $cf_cv_system_name in
2193 # (tested with gcc 2.7.2 -- I don't have c89)
2194 if test "${CC}" = "gcc"; then
2195 CC_SHARED_OPTS='-fPIC'
2196 LD_SHARED_OPTS='-Xlinker +b -Xlinker $(libdir)'
2199 LD_SHARED_OPTS='+b $(libdir)'
2201 MK_SHARED_LIB='$(LD) -b -o $@'
2202 # HP-UX shared libraries must be executable, and should be
2203 # readonly to exploit a quirk in the memory manager.
2204 INSTALL_LIB="-m 555"
2207 # tested with IRIX 5.2 and 'cc'.
2208 if test "${CC}" = "gcc"; then
2209 CC_SHARED_OPTS='-fPIC'
2211 CC_SHARED_OPTS='-KPIC'
2213 MK_SHARED_LIB='$(LD) -shared -rdata_shared -soname `basename $@` -o $@'
2214 cf_cv_rm_so_locs=yes
2217 # tested with Linux 2.0.29 and gcc 2.7.2 (ELF)
2218 CC_SHARED_OPTS='-fPIC'
2219 MK_SHARED_LIB='gcc -o $@.$(REL_VERSION) -L../lib -L\$(libdir) -shared -Wl,-soname,`basename $@.$(ABI_VERSION)`,-stats,$(SHLIB_LIST)-lc'
2220 test $cf_cv_ld_rpath = yes && cf_ld_rpath_opt="-Wl,-rpath,"
2221 if test $DFT_LWR_MODEL = "shared" ; then
2222 LOCAL_LDFLAGS='-Wl,-rpath,../lib'
2223 LOCAL_LDFLAGS2='-Wl,-rpath,../../lib'
2225 cf_cv_do_symlinks=yes
2227 openbsd*|netbsd*|freebsd*)
2228 CC_SHARED_OPTS='-fpic -DPIC'
2229 MK_SHARED_LIB='$(LD) -Bshareable -o $@'
2232 # tested with OSF/1 V3.2 and 'cc'
2233 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
2234 # link with shared libs).
2236 MK_SHARED_LIB='$(LD) -o $@.$(REL_VERSION) -set_version $(ABI_VERSION):$(REL_VERSION) -expect_unresolved "*" -shared -soname `basename $@.$(ABI_VERSION)`'
2237 test $cf_cv_ld_rpath = yes && cf_ld_rpath_opt="-rpath"
2240 MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
2243 if test $DFT_LWR_MODEL = "shared" ; then
2244 LOCAL_LDFLAGS='-Wl,-rpath,../lib'
2245 LOCAL_LDFLAGS2='-Wl,-rpath,../../lib'
2247 cf_cv_do_symlinks=yes
2248 cf_cv_rm_so_locs=yes
2251 # tested with SunOS 4.1.1 and gcc 2.7.0
2252 if test $ac_cv_prog_gcc = yes; then
2253 CC_SHARED_OPTS='-fpic'
2255 CC_SHARED_OPTS='-KPIC'
2257 MK_SHARED_LIB='$(LD) -assert pure-text -o $@.$(REL_VERSION)'
2258 cf_cv_do_symlinks=yes
2261 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
2262 if test $ac_cv_prog_gcc = yes; then
2263 CC_SHARED_OPTS='-fpic'
2265 CC_SHARED_OPTS='-KPIC'
2267 MK_SHARED_LIB='$(LD) -dy -G -h `basename $@.$(ABI_VERSION)` -o $@.$(REL_VERSION)'
2268 if test $cf_cv_ld_rpath = yes ; then
2269 cf_ld_rpath_opt="-R"
2270 EXTRA_LDFLAGS="-R ../lib:\$(libdir) $EXTRA_LDFLAGS"
2272 cf_cv_do_symlinks=yes
2275 # tested with UnixWare 1.1.2
2276 CC_SHARED_OPTS='-KPIC'
2277 MK_SHARED_LIB='$(LD) -d y -G -o $@'
2280 CC_SHARED_OPTS='unknown'
2281 MK_SHARED_LIB='echo unknown'
2285 if test -n "$cf_ld_rpath_opt" ; then
2286 echo $ac_n "checking if we need a space after rpath option""... $ac_c" 1>&6
2287 echo "configure:2288: checking if we need a space after rpath option" >&5
2288 cf_save_LIBS="$LIBS"
2289 LIBS="$LIBS ${cf_ld_rpath_opt}/usr/lib"
2290 cat > conftest.$ac_ext <<EOF
2291 #line 2292 "configure"
2292 #include "confdefs.h"
2298 if { (eval echo configure:2299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2302 echo "configure: failed program was:" >&5
2303 cat conftest.$ac_ext >&5
2308 LIBS="$cf_save_LIBS"
2309 echo "$ac_t""$cf_rpath_space" 1>&6
2310 test $cf_rpath_space = yes && cf_ld_rpath_opt="$cf_ld_rpath_opt "
2311 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\$(libdir)"
2323 if test "$CC_SHARED_OPTS" = "unknown"; then
2324 for model in $cf_list_models; do
2325 if test "$model" = "shared"; then
2326 { echo "configure: error: Shared libraries are not supported in this version" 1>&2; exit 1; }
2331 ###############################################################################
2334 ### use option --disable-overwrite to leave out the link to -lcurses
2335 echo $ac_n "checking if you wish to install ncurses overwriting curses""... $ac_c" 1>&6
2336 echo "configure:2337: checking if you wish to install ncurses overwriting curses" >&5
2338 # Check whether --enable-overwrite or --disable-overwrite was given.
2339 if test "${enable_overwrite+set}" = set; then
2340 enableval="$enable_overwrite"
2341 with_overwrite=$enableval
2342 test "$with_overwrite" = no && \
2343 test "x$includedir" = 'x${prefix}/include' && \
2344 includedir='$(prefix)/include/ncurses'
2350 echo "$ac_t""$with_overwrite" 1>&6
2351 echo $ac_n "checking where we will install curses.h""... $ac_c" 1>&6
2352 echo "configure:2353: checking where we will install curses.h" >&5
2353 echo "$ac_t""$includedir" 1>&6
2355 echo $ac_n "checking if external terminfo-database is used""... $ac_c" 1>&6
2356 echo "configure:2357: checking if external terminfo-database is used" >&5
2358 # Check whether --enable-database or --disable-database was given.
2359 if test "${enable_database+set}" = set; then
2360 enableval="$enable_database"
2361 with_database=$enableval
2366 echo "$ac_t""$with_database" 1>&6
2367 test $with_database != no && cat >> confdefs.h <<\EOF
2368 #define USE_DATABASE 1
2372 echo $ac_n "checking if you want to build with function extensions""... $ac_c" 1>&6
2373 echo "configure:2374: checking if you want to build with function extensions" >&5
2375 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
2376 if test "${enable_ext_funcs+set}" = set; then
2377 enableval="$enable_ext_funcs"
2378 with_ext_funcs=$enableval
2383 echo "$ac_t""$with_ext_funcs" 1>&6
2384 test "$with_ext_funcs" = yes && cat >> confdefs.h <<\EOF
2385 #define NCURSES_EXT_FUNCS 1
2389 echo $ac_n "checking for list of fallback descriptions""... $ac_c" 1>&6
2390 echo "configure:2391: checking for list of fallback descriptions" >&5
2392 # Check whether --with-fallbacks or --without-fallbacks was given.
2393 if test "${with_fallbacks+set}" = set; then
2394 withval="$with_fallbacks"
2395 with_fallback=$withval
2400 echo "$ac_t""$with_fallback" 1>&6
2401 FALLBACK_LIST=`echo $with_fallback|sed -e 's/,/ /'`
2404 if test $with_database = no ; then
2405 if test -z $with_fallback ; then
2406 { echo "configure: error: You have disabled the database w/o specifying fallbacks" 1>&2; exit 1; }
2410 ### use option --enable-big-core to make tic run faster on big machines
2411 echo $ac_n "checking if big-core option selected""... $ac_c" 1>&6
2412 echo "configure:2413: checking if big-core option selected" >&5
2414 # Check whether --enable-big-core or --disable-big-core was given.
2415 if test "${enable_big_core+set}" = set; then
2416 enableval="$enable_big_core"
2417 with_big_core=$enableval
2422 echo "$ac_t""$with_big_core" 1>&6
2423 test "$with_big_core" = "yes" && cat >> confdefs.h <<\EOF
2424 #define HAVE_BIG_CORE 1
2428 ### use option --enable-termcap to compile in the termcap fallback support
2429 echo $ac_n "checking if you want termcap-fallback support""... $ac_c" 1>&6
2430 echo "configure:2431: checking if you want termcap-fallback support" >&5
2432 # Check whether --enable-termcap or --disable-termcap was given.
2433 if test "${enable_termcap+set}" = set; then
2434 enableval="$enable_termcap"
2435 with_termcap=$enableval
2440 echo "$ac_t""$with_termcap" 1>&6
2442 if test "$with_termcap" != "yes" ; then
2443 cat >> confdefs.h <<\EOF
2444 #define PURE_TERMINFO 1
2449 ### use option --enable-getcap to use a hacked getcap for reading termcaps
2450 echo $ac_n "checking if fast termcap-loader is needed""... $ac_c" 1>&6
2451 echo "configure:2452: checking if fast termcap-loader is needed" >&5
2453 # Check whether --enable-getcap or --disable-getcap was given.
2454 if test "${enable_getcap+set}" = set; then
2455 enableval="$enable_getcap"
2456 with_getcap=$enableval
2461 echo "$ac_t""$with_getcap" 1>&6
2462 test "$with_getcap" = "yes" && cat >> confdefs.h <<\EOF
2463 #define USE_GETCAP 1
2467 echo $ac_n "checking if translated termcaps will be cached in ~/.terminfo""... $ac_c" 1>&6
2468 echo "configure:2469: checking if translated termcaps will be cached in ~/.terminfo" >&5
2470 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
2471 if test "${enable_getcap_cache+set}" = set; then
2472 enableval="$enable_getcap_cache"
2473 with_getcap_cache=$enableval
2475 with_getcap_cache=no
2478 echo "$ac_t""$with_getcap_cache" 1>&6
2479 test "$with_getcap_cache" = "yes" && cat >> confdefs.h <<\EOF
2480 #define USE_GETCAP_CACHE 1
2486 ### Use option --enable-symlinks to make tic use symlinks, not hard links
2487 ### to reduce storage requirements for the terminfo database.
2489 ### Most Unix systems have both link and symlink, a few don't have symlink.
2490 ### A few non-Unix systems implement symlink, but not link.
2491 ### A few non-systems implement neither.
2497 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
2498 echo "configure:2499: checking for $ac_func" >&5
2499 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
2500 echo $ac_n "(cached) $ac_c" 1>&6
2502 cat > conftest.$ac_ext <<EOF
2503 #line 2504 "configure"
2504 #include "confdefs.h"
2505 /* System header to define __stub macros and hopefully few prototypes,
2506 which can conflict with char $ac_func(); below. */
2508 /* Override any gcc2 internal prototype to avoid an error. */
2509 /* We use char because int might match the return type of a gcc2
2510 builtin and then its argument prototype would still apply. */
2515 /* The GNU C library defines this for functions which it implements
2516 to always fail with ENOSYS. Some functions are actually named
2517 something starting with __ and the normal name is an alias. */
2518 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
2526 if { (eval echo configure:2527: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
2528 eval "ac_cv_func_$ac_func=yes"
2530 echo "configure: failed program was:" >&5
2531 cat conftest.$ac_ext >&5
2533 eval "ac_cv_func_$ac_func=no"
2538 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
2539 echo "$ac_t""yes" 1>&6
2540 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
2541 cat >> confdefs.h <<EOF
2542 #define $ac_tr_func 1
2546 echo "$ac_t""no" 1>&6
2554 if test "$ac_cv_func_link" != yes ; then
2555 echo $ac_n "checking if tic should use symbolic links""... $ac_c" 1>&6
2556 echo "configure:2557: checking if tic should use symbolic links" >&5
2557 if test "$ac_cv_func_symlink" = yes ; then
2562 echo "$ac_t""$with_symlinks" 1>&6
2563 elif test "$ac_cv_func_symlink" != yes ; then
2564 echo $ac_n "checking if tic should use hard links""... $ac_c" 1>&6
2565 echo "configure:2566: checking if tic should use hard links" >&5
2566 if test "$ac_cv_func_link" = yes ; then
2571 echo "$ac_t""$with_links" 1>&6
2573 echo $ac_n "checking if tic should use symbolic links""... $ac_c" 1>&6
2574 echo "configure:2575: checking if tic should use symbolic links" >&5
2576 # Check whether --enable-symlinks or --disable-symlinks was given.
2577 if test "${enable_symlinks+set}" = set; then
2578 enableval="$enable_symlinks"
2579 with_symlinks=$enableval
2584 echo "$ac_t""$with_symlinks" 1>&6
2587 test "$with_links" = yes && cat >> confdefs.h <<\EOF
2591 test "$with_symlinks" = yes && cat >> confdefs.h <<\EOF
2592 #define USE_SYMLINKS 1
2596 ### use option --enable-bsdpad to have tputs process BSD-style prefix padding
2597 echo $ac_n "checking if tputs should process BSD-style prefix padding""... $ac_c" 1>&6
2598 echo "configure:2599: checking if tputs should process BSD-style prefix padding" >&5
2600 # Check whether --enable-bsdpad or --disable-bsdpad was given.
2601 if test "${enable_bsdpad+set}" = set; then
2602 enableval="$enable_bsdpad"
2603 with_bsdpad=$enableval
2608 echo "$ac_t""$with_bsdpad" 1>&6
2609 test "$with_bsdpad" = yes && cat >> confdefs.h <<\EOF
2614 ### use option --enable-const to turn on use of const beyond that in XSI.
2615 echo $ac_n "checking for extended use of const keyword""... $ac_c" 1>&6
2616 echo "configure:2617: checking for extended use of const keyword" >&5
2618 # Check whether --enable-const or --disable-const was given.
2619 if test "${enable_const+set}" = set; then
2620 enableval="$enable_const"
2621 with_ext_const=$enableval
2626 echo "$ac_t""$with_ext_const" 1>&6
2627 test "$with_ext_const" = yes && cat >> confdefs.h <<\EOF
2628 #define NCURSES_CONST const
2632 ### Enable compiling-in rcs id's
2633 echo $ac_n "checking if RCS identifiers should be compiled-in""... $ac_c" 1>&6
2634 echo "configure:2635: checking if RCS identifiers should be compiled-in" >&5
2636 # Check whether --with-rcs-ids or --without-rcs-ids was given.
2637 if test "${with_rcs_ids+set}" = set; then
2638 withval="$with_rcs_ids"
2639 with_rcs_ids=$enableval
2644 echo "$ac_t""$with_rcs_ids" 1>&6
2645 test "$with_rcs_ids" = yes && cat >> confdefs.h <<\EOF
2646 #define USE_RCS_IDS 1
2650 ###############################################################################
2652 echo $ac_n "checking if you want all experimental code""... $ac_c" 1>&6
2653 echo "configure:2654: checking if you want all experimental code" >&5
2655 # Check whether --with-develop or --without-develop was given.
2656 if test "${with_develop+set}" = set; then
2657 withval="$with_develop"
2658 with_develop=$withval
2663 echo "$ac_t""$with_develop" 1>&6
2665 ### use option --enable-hard-tabs to turn on use of hard-tabs optimize
2666 echo $ac_n "checking if you want experimental hard-tabs code""... $ac_c" 1>&6
2667 echo "configure:2668: checking if you want experimental hard-tabs code" >&5
2669 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
2670 if test "${enable_hard_tabs+set}" = set; then
2671 enableval="$enable_hard_tabs"
2672 with_hardtabs=$enableval
2674 with_hardtabs=$with_develop
2677 echo "$ac_t""$with_hardtabs" 1>&6
2678 test "$with_hardtabs" = yes && cat >> confdefs.h <<\EOF
2679 #define USE_HARD_TABS 1
2683 ### use option --enable-hashmap to turn on use of hashmap scrolling logic
2684 echo $ac_n "checking if you want experimental hashmap code""... $ac_c" 1>&6
2685 echo "configure:2686: checking if you want experimental hashmap code" >&5
2687 # Check whether --enable-hashmap or --disable-hashmap was given.
2688 if test "${enable_hashmap+set}" = set; then
2689 enableval="$enable_hashmap"
2690 with_hashmap=$enableval
2692 with_hashmap=$with_develop
2695 echo "$ac_t""$with_hashmap" 1>&6
2696 test "$with_hashmap" = yes && cat >> confdefs.h <<\EOF
2697 #define USE_HASHMAP 1
2701 echo $ac_n "checking if you want experimental safe-sprintf code""... $ac_c" 1>&6
2702 echo "configure:2703: checking if you want experimental safe-sprintf code" >&5
2704 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
2705 if test "${enable_safe_sprintf+set}" = set; then
2706 enableval="$enable_safe_sprintf"
2707 with_safe_sprintf=$enableval
2709 with_safe_sprintf=no
2712 echo "$ac_t""$with_safe_sprintf" 1>&6
2713 test "$with_safe_sprintf" = yes && cat >> confdefs.h <<\EOF
2714 #define USE_SAFE_SPRINTF 1
2718 ### use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
2719 echo $ac_n "checking if you want to experiment without scrolling-hints code""... $ac_c" 1>&6
2720 echo "configure:2721: checking if you want to experiment without scrolling-hints code" >&5
2722 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
2723 if test "${enable_scroll_hints+set}" = set; then
2724 enableval="$enable_scroll_hints"
2725 with_scroll_hints=$enableval
2727 with_scroll_hints=yes
2730 echo "$ac_t""$with_scroll_hints" 1>&6
2731 test "$with_scroll_hints" = yes && cat >> confdefs.h <<\EOF
2732 #define USE_SCROLL_HINTS 1
2736 ### use option --enable-sigwinch to turn on use of SIGWINCH logic
2737 echo $ac_n "checking if you want experimental SIGWINCH handler""... $ac_c" 1>&6
2738 echo "configure:2739: checking if you want experimental SIGWINCH handler" >&5
2740 # Check whether --enable-sigwinch or --disable-sigwinch was given.
2741 if test "${enable_sigwinch+set}" = set; then
2742 enableval="$enable_sigwinch"
2743 with_sigwinch=$enableval
2745 with_sigwinch=$with_develop
2748 echo "$ac_t""$with_sigwinch" 1>&6
2749 test "$with_sigwinch" = yes && cat >> confdefs.h <<\EOF
2750 #define USE_SIGWINCH 1
2754 ### use option --enable-widec to turn on use of wide-character support
2755 echo $ac_n "checking if you want experimental wide-character code""... $ac_c" 1>&6
2756 echo "configure:2757: checking if you want experimental wide-character code" >&5
2758 # Check whether --enable-widec or --disable-widec was given.
2759 if test "${enable_widec+set}" = set; then
2760 enableval="$enable_widec"
2761 with_widec=$enableval
2766 echo "$ac_t""$with_widec" 1>&6
2767 test "$with_widec" = yes && cat >> confdefs.h <<\EOF
2768 #define USE_WIDEC_SUPPORT 1
2772 ### use option --enable-xmc-glitch to turn on use of magic-cookie optimize
2773 echo $ac_n "checking if you want experimental xmc code""... $ac_c" 1>&6
2774 echo "configure:2775: checking if you want experimental xmc code" >&5
2776 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
2777 if test "${enable_xmc_glitch+set}" = set; then
2778 enableval="$enable_xmc_glitch"
2779 with_xmc_glitch=$enableval
2781 with_xmc_glitch=$with_develop
2784 echo "$ac_t""$with_xmc_glitch" 1>&6
2785 test "$with_xmc_glitch" = yes && cat >> confdefs.h <<\EOF
2786 #define USE_XMC_SUPPORT 1
2790 ###############################################################################
2793 ### use option --disable-echo to suppress full display compiling commands
2795 # Check whether --enable-echo or --disable-echo was given.
2796 if test "${enable_echo+set}" = set; then
2797 enableval="$enable_echo"
2798 with_echo=$enableval
2803 if test "$with_echo" = yes; then
2806 ECHO_LINK='@ echo linking $@ ... ;'
2810 ### use option --enable-warnings to turn on all gcc warnings
2812 # Check whether --enable-warnings or --disable-warnings was given.
2813 if test "${enable_warnings+set}" = set; then
2814 enableval="$enable_warnings"
2815 with_warnings=$enableval
2818 if test -n "$with_warnings"; then
2819 ADAFLAGS="$ADAFLAGS -gnatg"
2823 cat > conftest.$ac_ext <<EOF
2824 #line 2825 "configure"
2825 int main(int argc, char *argv[]) { return argv[argc-1] == 0; }
2827 echo "checking for gcc warning options" 1>&6
2828 echo "configure:2829: checking for gcc warning options" >&5
2829 cf_save_CFLAGS="$CFLAGS"
2830 EXTRA_CFLAGS="-W -Wall"
2832 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
2834 Wbad-function-cast \
2838 Wmissing-declarations \
2839 Wmissing-prototypes \
2843 Wstrict-prototypes $cf_warn_CONST
2845 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
2846 if { (eval echo configure:2847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2847 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
2848 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
2849 test "$cf_opt" = Wcast-qual && EXTRA_CFLAGS="$EXTRA_CFLAGS -DXTSTRINGDEFINES"
2853 CFLAGS="$cf_save_CFLAGS"
2861 cat > conftest.i <<EOF
2863 #define GCC_PRINTF 0
2868 #ifndef GCC_NORETURN
2869 #define GCC_NORETURN /* nothing */
2872 #define GCC_UNUSED /* nothing */
2877 echo "checking for gcc __attribute__ directives" 1>&6
2878 echo "configure:2879: checking for gcc __attribute__ directives" >&5
2879 cat > conftest.$ac_ext <<EOF
2880 #line 2881 "configure"
2881 #include "confdefs.h"
2882 #include "conftest.h"
2883 #include "conftest.i"
2885 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2887 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2890 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2892 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
2894 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2895 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2896 extern void foo(void) GCC_NORETURN;
2897 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2899 for cf_attribute in scanf printf unused noreturn
2902 CF_ATTRIBUTE=`echo $cf_attribute | tr '[a-z]' '[A-Z]'`
2904 cf_directive="__attribute__(($cf_attribute))"
2905 echo "checking for gcc $cf_directive" 1>&5
2906 case $cf_attribute in
2908 cat >conftest.h <<EOF
2909 #define GCC_$CF_ATTRIBUTE 1
2913 cat >conftest.h <<EOF
2914 #define GCC_$CF_ATTRIBUTE $cf_directive
2918 if { (eval echo configure:2919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2919 test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
2920 cat conftest.h >>confdefs.h
2922 # sed -e 's/__attr.*/\/*nothing*\//' conftest.h >>confdefs.h
2926 fgrep define conftest.i >>confdefs.h
2932 ### use option --enable-assertions to turn on generation of assertion code
2934 # Check whether --enable-assertions or --disable-assertions was given.
2935 if test "${enable_assertions+set}" = set; then
2936 enableval="$enable_assertions"
2937 with_assertions=$enableval
2944 if test $with_assertions = no
2946 cat >> confdefs.h <<\EOF
2950 CPPFLAGS="$CPPFLAGS -DNDEBUG"
2952 ADAFLAGS="$ADAFLAGS -gnata"
2956 ### use option --disable-leaks to suppress "permanent" leaks, for testing
2958 # Check whether --enable-leaks or --disable-leaks was given.
2959 if test "${enable_leaks+set}" = set; then
2960 enableval="$enable_leaks"
2961 test $enableval = no && cat >> confdefs.h <<\EOF
2967 cat >> confdefs.h <<\EOF
2968 #define HAVE_NC_ALLOC_H 1
2972 ### use option --enable-expanded to generate certain macros as functions
2974 # Check whether --enable-expanded or --disable-expanded was given.
2975 if test "${enable_expanded+set}" = set; then
2976 enableval="$enable_expanded"
2977 test $enableval = yes && cat >> confdefs.h <<\EOF
2978 #define NCURSES_EXPANDED 1
2984 ### use option --disable-macros to suppress macros in favor of functions
2986 # Check whether --enable-macros or --disable-macros was given.
2987 if test "${enable_macros+set}" = set; then
2988 enableval="$enable_macros"
2989 test $enableval = no && cat >> confdefs.h <<\EOF
2990 #define NCURSES_NOMACROS 1
2996 ### Checks for libraries.
2997 echo $ac_n "checking for gettimeofday""... $ac_c" 1>&6
2998 echo "configure:2999: checking for gettimeofday" >&5
2999 if eval "test \"`echo '$''{'ac_cv_func_gettimeofday'+set}'`\" = set"; then
3000 echo $ac_n "(cached) $ac_c" 1>&6
3002 cat > conftest.$ac_ext <<EOF
3003 #line 3004 "configure"
3004 #include "confdefs.h"
3005 /* System header to define __stub macros and hopefully few prototypes,
3006 which can conflict with char gettimeofday(); below. */
3008 /* Override any gcc2 internal prototype to avoid an error. */
3009 /* We use char because int might match the return type of a gcc2
3010 builtin and then its argument prototype would still apply. */
3011 char gettimeofday();
3015 /* The GNU C library defines this for functions which it implements
3016 to always fail with ENOSYS. Some functions are actually named
3017 something starting with __ and the normal name is an alias. */
3018 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
3026 if { (eval echo configure:3027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3028 eval "ac_cv_func_gettimeofday=yes"
3030 echo "configure: failed program was:" >&5
3031 cat conftest.$ac_ext >&5
3033 eval "ac_cv_func_gettimeofday=no"
3038 if eval "test \"`echo '$ac_cv_func_'gettimeofday`\" = yes"; then
3039 echo "$ac_t""yes" 1>&6
3040 cat >> confdefs.h <<\EOF
3041 #define HAVE_GETTIMEOFDAY 1
3045 echo "$ac_t""no" 1>&6
3048 echo $ac_n "checking for gettimeofday in -lbsd""... $ac_c" 1>&6
3049 echo "configure:3050: checking for gettimeofday in -lbsd" >&5
3050 ac_lib_var=`echo bsd'_'gettimeofday | sed 'y%./+-%__p_%'`
3051 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3052 echo $ac_n "(cached) $ac_c" 1>&6
3054 ac_save_LIBS="$LIBS"
3056 cat > conftest.$ac_ext <<EOF
3057 #line 3058 "configure"
3058 #include "confdefs.h"
3059 /* Override any gcc2 internal prototype to avoid an error. */
3060 /* We use char because int might match the return type of a gcc2
3061 builtin and then its argument prototype would still apply. */
3062 char gettimeofday();
3068 if { (eval echo configure:3069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3070 eval "ac_cv_lib_$ac_lib_var=yes"
3072 echo "configure: failed program was:" >&5
3073 cat conftest.$ac_ext >&5
3075 eval "ac_cv_lib_$ac_lib_var=no"
3078 LIBS="$ac_save_LIBS"
3081 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3082 echo "$ac_t""yes" 1>&6
3083 cat >> confdefs.h <<\EOF
3084 #define HAVE_GETTIMEOFDAY 1
3089 echo "$ac_t""no" 1>&6
3095 echo $ac_n "checking for sin""... $ac_c" 1>&6
3096 echo "configure:3097: checking for sin" >&5
3097 if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then
3098 echo $ac_n "(cached) $ac_c" 1>&6
3100 cat > conftest.$ac_ext <<EOF
3101 #line 3102 "configure"
3102 #include "confdefs.h"
3103 /* System header to define __stub macros and hopefully few prototypes,
3104 which can conflict with char sin(); below. */
3106 /* Override any gcc2 internal prototype to avoid an error. */
3107 /* We use char because int might match the return type of a gcc2
3108 builtin and then its argument prototype would still apply. */
3113 /* The GNU C library defines this for functions which it implements
3114 to always fail with ENOSYS. Some functions are actually named
3115 something starting with __ and the normal name is an alias. */
3116 #if defined (__stub_sin) || defined (__stub___sin)
3124 if { (eval echo configure:3125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3126 eval "ac_cv_func_sin=yes"
3128 echo "configure: failed program was:" >&5
3129 cat conftest.$ac_ext >&5
3131 eval "ac_cv_func_sin=no"
3136 if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then
3137 echo "$ac_t""yes" 1>&6
3140 echo "$ac_t""no" 1>&6
3141 echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
3142 echo "configure:3143: checking for sin in -lm" >&5
3143 ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
3144 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3145 echo $ac_n "(cached) $ac_c" 1>&6
3147 ac_save_LIBS="$LIBS"
3149 cat > conftest.$ac_ext <<EOF
3150 #line 3151 "configure"
3151 #include "confdefs.h"
3152 /* Override any gcc2 internal prototype to avoid an error. */
3153 /* We use char because int might match the return type of a gcc2
3154 builtin and then its argument prototype would still apply. */
3161 if { (eval echo configure:3162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3163 eval "ac_cv_lib_$ac_lib_var=yes"
3165 echo "configure: failed program was:" >&5
3166 cat conftest.$ac_ext >&5
3168 eval "ac_cv_lib_$ac_lib_var=no"
3171 LIBS="$ac_save_LIBS"
3174 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3175 echo "$ac_t""yes" 1>&6
3178 echo "$ac_t""no" 1>&6
3185 ### Checks for header files.
3186 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3187 echo "configure:3188: checking for ANSI C header files" >&5
3188 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3189 echo $ac_n "(cached) $ac_c" 1>&6
3191 cat > conftest.$ac_ext <<EOF
3192 #line 3193 "configure"
3193 #include "confdefs.h"
3199 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3200 { (eval echo configure:3201: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3201 ac_err=`grep -v '^ *+' conftest.out`
3202 if test -z "$ac_err"; then
3204 ac_cv_header_stdc=yes
3207 echo "configure: failed program was:" >&5
3208 cat conftest.$ac_ext >&5
3210 ac_cv_header_stdc=no
3214 if test $ac_cv_header_stdc = yes; then
3215 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3216 cat > conftest.$ac_ext <<EOF
3217 #line 3218 "configure"
3218 #include "confdefs.h"
3221 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3222 egrep "memchr" >/dev/null 2>&1; then
3226 ac_cv_header_stdc=no
3232 if test $ac_cv_header_stdc = yes; then
3233 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3234 cat > conftest.$ac_ext <<EOF
3235 #line 3236 "configure"
3236 #include "confdefs.h"
3239 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3240 egrep "free" >/dev/null 2>&1; then
3244 ac_cv_header_stdc=no
3250 if test $ac_cv_header_stdc = yes; then
3251 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3252 if test "$cross_compiling" = yes; then
3255 cat > conftest.$ac_ext <<EOF
3256 #line 3257 "configure"
3257 #include "confdefs.h"
3259 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3260 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3261 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3262 int main () { int i; for (i = 0; i < 256; i++)
3263 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3267 if { (eval echo configure:3268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
3271 echo "configure: failed program was:" >&5
3272 cat conftest.$ac_ext >&5
3274 ac_cv_header_stdc=no
3282 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3283 if test $ac_cv_header_stdc = yes; then
3284 cat >> confdefs.h <<\EOF
3285 #define STDC_HEADERS 1
3291 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
3293 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3294 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
3295 echo "configure:3296: checking for $ac_hdr that defines DIR" >&5
3296 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
3297 echo $ac_n "(cached) $ac_c" 1>&6
3299 cat > conftest.$ac_ext <<EOF
3300 #line 3301 "configure"
3301 #include "confdefs.h"
3302 #include <sys/types.h>
3308 if { (eval echo configure:3309: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3310 eval "ac_cv_header_dirent_$ac_safe=yes"
3312 echo "configure: failed program was:" >&5
3313 cat conftest.$ac_ext >&5
3315 eval "ac_cv_header_dirent_$ac_safe=no"
3319 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
3320 echo "$ac_t""yes" 1>&6
3321 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3322 cat >> confdefs.h <<EOF
3323 #define $ac_tr_hdr 1
3325 ac_header_dirent=$ac_hdr; break
3327 echo "$ac_t""no" 1>&6
3330 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
3331 if test $ac_header_dirent = dirent.h; then
3332 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
3333 echo "configure:3334: checking for opendir in -ldir" >&5
3334 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
3335 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3336 echo $ac_n "(cached) $ac_c" 1>&6
3338 ac_save_LIBS="$LIBS"
3340 cat > conftest.$ac_ext <<EOF
3341 #line 3342 "configure"
3342 #include "confdefs.h"
3343 /* Override any gcc2 internal prototype to avoid an error. */
3344 /* We use char because int might match the return type of a gcc2
3345 builtin and then its argument prototype would still apply. */
3352 if { (eval echo configure:3353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3354 eval "ac_cv_lib_$ac_lib_var=yes"
3356 echo "configure: failed program was:" >&5
3357 cat conftest.$ac_ext >&5
3359 eval "ac_cv_lib_$ac_lib_var=no"
3362 LIBS="$ac_save_LIBS"
3365 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3366 echo "$ac_t""yes" 1>&6
3369 echo "$ac_t""no" 1>&6
3373 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
3374 echo "configure:3375: checking for opendir in -lx" >&5
3375 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
3376 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3377 echo $ac_n "(cached) $ac_c" 1>&6
3379 ac_save_LIBS="$LIBS"
3381 cat > conftest.$ac_ext <<EOF
3382 #line 3383 "configure"
3383 #include "confdefs.h"
3384 /* Override any gcc2 internal prototype to avoid an error. */
3385 /* We use char because int might match the return type of a gcc2
3386 builtin and then its argument prototype would still apply. */
3393 if { (eval echo configure:3394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3395 eval "ac_cv_lib_$ac_lib_var=yes"
3397 echo "configure: failed program was:" >&5
3398 cat conftest.$ac_ext >&5
3400 eval "ac_cv_lib_$ac_lib_var=no"
3403 LIBS="$ac_save_LIBS"
3406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3407 echo "$ac_t""yes" 1>&6
3410 echo "$ac_t""no" 1>&6
3416 echo $ac_n "checking for regular-expression headers""... $ac_c" 1>&6
3417 echo "configure:3418: checking for regular-expression headers" >&5
3418 if eval "test \"`echo '$''{'cf_cv_regex'+set}'`\" = set"; then
3419 echo $ac_n "(cached) $ac_c" 1>&6
3422 cat > conftest.$ac_ext <<EOF
3423 #line 3424 "configure"
3424 #include "confdefs.h"
3425 #include <sys/types.h>
3430 int x = regcomp(p, "", 0);
3431 int y = regexec(p, "", 0, 0, 0);
3436 if { (eval echo configure:3437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3438 cf_cv_regex="regex.h"
3440 echo "configure: failed program was:" >&5
3441 cat conftest.$ac_ext >&5
3444 cat > conftest.$ac_ext <<EOF
3445 #line 3446 "configure"
3446 #include "confdefs.h"
3450 char *p = compile("", "", "", 0);
3451 int x = step("", "");
3455 if { (eval echo configure:3456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3457 cf_cv_regex="regexp.h"
3459 echo "configure: failed program was:" >&5
3460 cat conftest.$ac_ext >&5
3463 cf_save_LIBS="$LIBS"
3465 cat > conftest.$ac_ext <<EOF
3466 #line 3467 "configure"
3467 #include "confdefs.h"
3468 #include <regexpr.h>
3471 char *p = compile("", "", "");
3472 int x = step("", "");
3476 if { (eval echo configure:3477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3478 cf_cv_regex="regexpr.h"
3480 echo "configure: failed program was:" >&5
3481 cat conftest.$ac_ext >&5
3483 LIBS="$cf_save_LIBS"
3493 echo "$ac_t""$cf_cv_regex" 1>&6
3494 case $cf_cv_regex in
3495 regex.h) cat >> confdefs.h <<\EOF
3496 #define HAVE_REGEX_H_FUNCS 1
3499 regexp.h) cat >> confdefs.h <<\EOF
3500 #define HAVE_REGEXP_H_FUNCS 1
3503 regexpr.h) cat >> confdefs.h <<\EOF
3504 #define HAVE_REGEXPR_H_FUNCS 1
3531 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3532 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3533 echo "configure:3534: checking for $ac_hdr" >&5
3534 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3535 echo $ac_n "(cached) $ac_c" 1>&6
3537 cat > conftest.$ac_ext <<EOF
3538 #line 3539 "configure"
3539 #include "confdefs.h"
3542 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3543 { (eval echo configure:3544: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3544 ac_err=`grep -v '^ *+' conftest.out`
3545 if test -z "$ac_err"; then
3547 eval "ac_cv_header_$ac_safe=yes"
3550 echo "configure: failed program was:" >&5
3551 cat conftest.$ac_ext >&5
3553 eval "ac_cv_header_$ac_safe=no"
3557 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3558 echo "$ac_t""yes" 1>&6
3559 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3560 cat >> confdefs.h <<EOF
3561 #define $ac_tr_hdr 1
3565 echo "$ac_t""no" 1>&6
3571 case $cf_cv_system_name in
3573 # check for HPUX's ANSI compiler
3574 if test -z "$GCC"; then
3575 echo $ac_n "checking for HP/UX ANSI compiler""... $ac_c" 1>&6
3576 echo "configure:3577: checking for HP/UX ANSI compiler" >&5
3577 cf_save_CFLAGS="$CFLAGS"
3578 CFLAGS="$CFLAGS -Aa"
3579 cat > conftest.$ac_ext <<EOF
3580 #line 3581 "configure"
3581 #include "confdefs.h"
3587 if { (eval echo configure:3588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3591 echo "configure: failed program was:" >&5
3592 cat conftest.$ac_ext >&5
3597 echo "$ac_t""$cf_hpux_cc" 1>&6
3598 if test $cf_hpux_cc = yes; then
3599 cat >> confdefs.h <<\EOF
3600 #define _HPUX_SOURCE 1
3604 CFLAGS="$cf_save_CFLAGS"
3609 # We make sure -Zexe is not used -- it would interfere with @PROG_EXT@
3610 CFLAGS="$CFLAGS -Zmt -D__ST_MT_ERRNO__"
3611 LDFLAGS=`echo "$LDFLAGS -Zmt -Zcrtdll" | sed "s/-Zexe//g"`
3617 # check for ISC (this may also define _POSIX_SOURCE)
3618 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
3619 if test "$ISC" = yes ; then
3620 echo $ac_n "checking for main in -lcposix""... $ac_c" 1>&6
3621 echo "configure:3622: checking for main in -lcposix" >&5
3622 ac_lib_var=`echo cposix'_'main | sed 'y%./+-%__p_%'`
3623 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3624 echo $ac_n "(cached) $ac_c" 1>&6
3626 ac_save_LIBS="$LIBS"
3627 LIBS="-lcposix $LIBS"
3628 cat > conftest.$ac_ext <<EOF
3629 #line 3630 "configure"
3630 #include "confdefs.h"
3636 if { (eval echo configure:3637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3638 eval "ac_cv_lib_$ac_lib_var=yes"
3640 echo "configure: failed program was:" >&5
3641 cat conftest.$ac_ext >&5
3643 eval "ac_cv_lib_$ac_lib_var=no"
3646 LIBS="$ac_save_LIBS"
3649 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3650 echo "$ac_t""yes" 1>&6
3651 ac_tr_lib=HAVE_LIB`echo cposix | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3652 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3653 cat >> confdefs.h <<EOF
3654 #define $ac_tr_lib 1
3657 LIBS="-lcposix $LIBS"
3660 echo "$ac_t""no" 1>&6
3663 echo $ac_n "checking for bzero in -linet""... $ac_c" 1>&6
3664 echo "configure:3665: checking for bzero in -linet" >&5
3665 ac_lib_var=`echo inet'_'bzero | sed 'y%./+-%__p_%'`
3666 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3667 echo $ac_n "(cached) $ac_c" 1>&6
3669 ac_save_LIBS="$LIBS"
3671 cat > conftest.$ac_ext <<EOF
3672 #line 3673 "configure"
3673 #include "confdefs.h"
3674 /* Override any gcc2 internal prototype to avoid an error. */
3675 /* We use char because int might match the return type of a gcc2
3676 builtin and then its argument prototype would still apply. */
3683 if { (eval echo configure:3684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
3685 eval "ac_cv_lib_$ac_lib_var=yes"
3687 echo "configure: failed program was:" >&5
3688 cat conftest.$ac_ext >&5
3690 eval "ac_cv_lib_$ac_lib_var=no"
3693 LIBS="$ac_save_LIBS"
3696 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3697 echo "$ac_t""yes" 1>&6
3700 echo "$ac_t""no" 1>&6
3702 for ac_hdr in sys/termio.h
3704 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3705 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3706 echo "configure:3707: checking for $ac_hdr" >&5
3707 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3708 echo $ac_n "(cached) $ac_c" 1>&6
3710 cat > conftest.$ac_ext <<EOF
3711 #line 3712 "configure"
3712 #include "confdefs.h"
3715 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3716 { (eval echo configure:3717: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3717 ac_err=`grep -v '^ *+' conftest.out`
3718 if test -z "$ac_err"; then
3720 eval "ac_cv_header_$ac_safe=yes"
3723 echo "configure: failed program was:" >&5
3724 cat conftest.$ac_ext >&5
3726 eval "ac_cv_header_$ac_safe=no"
3730 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3731 echo "$ac_t""yes" 1>&6
3732 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3733 cat >> confdefs.h <<EOF
3734 #define $ac_tr_hdr 1
3738 echo "$ac_t""no" 1>&6
3745 echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
3746 echo "configure:3747: checking if sys/time.h works with sys/select.h" >&5
3747 if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
3748 echo $ac_n "(cached) $ac_c" 1>&6
3751 cat > conftest.$ac_ext <<EOF
3752 #line 3753 "configure"
3753 #include "confdefs.h"
3755 #include <sys/types.h>
3757 #include <sys/time.h>
3759 #if HAVE_SYS_SELECT_H
3760 #include <sys/select.h>
3767 if { (eval echo configure:3768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3769 cf_cv_sys_time_select=yes
3771 echo "configure: failed program was:" >&5
3772 cat conftest.$ac_ext >&5
3774 cf_cv_sys_time_select=no
3780 echo "$ac_t""$cf_cv_sys_time_select" 1>&6
3781 test $cf_cv_sys_time_select = yes && cat >> confdefs.h <<\EOF
3782 #define HAVE_SYS_TIME_SELECT 1
3787 ### checks for compiler characteristics
3789 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3790 ac_cpp='$CPP $CPPFLAGS'
3791 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3792 ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3793 cross_compiling=$ac_cv_prog_cc_cross
3795 echo $ac_n "checking for working const""... $ac_c" 1>&6
3796 echo "configure:3797: checking for working const" >&5
3797 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
3798 echo $ac_n "(cached) $ac_c" 1>&6
3800 cat > conftest.$ac_ext <<EOF
3801 #line 3802 "configure"
3802 #include "confdefs.h"
3806 /* Ultrix mips cc rejects this. */
3807 typedef int charset[2]; const charset x;
3808 /* SunOS 4.1.1 cc rejects this. */
3809 char const *const *ccp;
3811 /* NEC SVR4.0.2 mips cc rejects this. */
3812 struct point {int x, y;};
3813 static struct point const zero = {0,0};
3814 /* AIX XL C 1.02.0.0 rejects this.
3815 It does not let you subtract one const X* pointer from another in an arm
3816 of an if-expression whose if-part is not a constant expression */
3817 const char *g = "string";
3818 ccp = &g + (g ? g-g : 0);
3819 /* HPUX 7.0 cc rejects these. */
3822 ccp = (char const *const *) p;
3823 { /* SCO 3.2v4 cc rejects this. */
3825 char const *s = 0 ? (char *) 0 : (char const *) 0;
3829 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3831 const int *foo = &x[0];
3834 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3835 typedef const int *iptr;
3839 { /* AIX XL C 1.02.0.0 rejects this saying
3840 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3841 struct s { int j; const int *ap[3]; };
3842 struct s *b; b->j = 5;
3844 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3850 if { (eval echo configure:3851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3854 echo "configure: failed program was:" >&5
3855 cat conftest.$ac_ext >&5
3862 echo "$ac_t""$ac_cv_c_const" 1>&6
3863 if test $ac_cv_c_const = no; then
3864 cat >> confdefs.h <<\EOF
3870 echo $ac_n "checking for inline""... $ac_c" 1>&6
3871 echo "configure:3872: checking for inline" >&5
3872 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
3873 echo $ac_n "(cached) $ac_c" 1>&6
3876 for ac_kw in inline __inline__ __inline; do
3877 cat > conftest.$ac_ext <<EOF
3878 #line 3879 "configure"
3879 #include "confdefs.h"
3885 if { (eval echo configure:3886: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3887 ac_cv_c_inline=$ac_kw; break
3889 echo "configure: failed program was:" >&5
3890 cat conftest.$ac_ext >&5
3897 echo "$ac_t""$ac_cv_c_inline" 1>&6
3898 case "$ac_cv_c_inline" in
3900 no) cat >> confdefs.h <<\EOF
3904 *) cat >> confdefs.h <<EOF
3905 #define inline $ac_cv_c_inline
3910 test $ac_cv_c_inline != no && cat >> confdefs.h <<\EOF
3911 #define CC_HAS_INLINE_FUNCS 1
3916 echo $ac_n "checking if unsigned literals are legal""... $ac_c" 1>&6
3917 echo "configure:3918: checking if unsigned literals are legal" >&5
3918 if eval "test \"`echo '$''{'cf_cv_unsigned_literals'+set}'`\" = set"; then
3919 echo $ac_n "(cached) $ac_c" 1>&6
3922 cat > conftest.$ac_ext <<EOF
3923 #line 3924 "configure"
3924 #include "confdefs.h"
3927 long x = 1L + 1UL + 1U + 1
3930 if { (eval echo configure:3931: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3932 cf_cv_unsigned_literals=yes
3934 echo "configure: failed program was:" >&5
3935 cat conftest.$ac_ext >&5
3937 cf_cv_unsigned_literals=no
3943 echo "$ac_t""$cf_cv_unsigned_literals" 1>&6
3947 echo $ac_n "checking for type of chtype""... $ac_c" 1>&6
3948 echo "configure:3949: checking for type of chtype" >&5
3949 if eval "test \"`echo '$''{'cf_cv_typeof_chtype'+set}'`\" = set"; then
3950 echo $ac_n "(cached) $ac_c" 1>&6
3953 if test "$cross_compiling" = yes; then
3954 cf_cv_typeof_chtype=long
3956 cat > conftest.$ac_ext <<EOF
3957 #line 3958 "configure"
3958 #include "confdefs.h"
3960 #if USE_WIDEC_SUPPORT
3961 #include <stddef.h> /* we want wchar_t */
3962 #define WANT_BITS 39
3964 #define WANT_BITS 31
3969 FILE *fp = fopen("cf_test.out", "w");
3971 char *result = "long";
3972 #if USE_WIDEC_SUPPORT
3974 * If wchar_t is smaller than a long, it must be an int or a
3975 * short. We prefer not to use a short anyway.
3977 if (sizeof(unsigned long) > sizeof(wchar_t))
3980 if (sizeof(unsigned long) > sizeof(unsigned int)) {
3983 for (n = 0; n < WANT_BITS; n++) {
3984 unsigned int y = (x >> n);
3985 if (y != 1 || x == 0) {
3991 * If x is nonzero, an int is big enough for the bits
3994 result = (x != 0) ? "int" : "long";
4003 if { (eval echo configure:4004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4005 cf_cv_typeof_chtype=`cat cf_test.out`
4007 echo "configure: failed program was:" >&5
4008 cat conftest.$ac_ext >&5
4010 cf_cv_typeof_chtype=long
4019 echo "$ac_t""$cf_cv_typeof_chtype" 1>&6
4022 cat >> confdefs.h <<EOF
4023 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
4028 test "$cf_cv_unsigned_literals" = yes && cf_cv_1UL="${cf_cv_1UL}U"
4029 test "$cf_cv_typeof_chtype" = long && cf_cv_1UL="${cf_cv_1UL}L"
4035 echo $ac_n "checking for number of bits in chtype""... $ac_c" 1>&6
4036 echo "configure:4037: checking for number of bits in chtype" >&5
4037 if eval "test \"`echo '$''{'cf_cv_shift_limit'+set}'`\" = set"; then
4038 echo $ac_n "(cached) $ac_c" 1>&6
4041 if test "$cross_compiling" = yes; then
4042 cf_cv_shift_limit=32
4044 cat > conftest.$ac_ext <<EOF
4045 #line 4046 "configure"
4046 #include "confdefs.h"
4051 FILE *fp = fopen("cf_test.out", "w");
4054 unsigned TYPEOF_CHTYPE x = 1L;
4055 for (n = 0; ; n++) {
4056 unsigned long y = (x >> n);
4057 if (y != 1 || x == 0)
4061 fprintf(fp, "%d", n);
4068 if { (eval echo configure:4069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4070 cf_cv_shift_limit=`cat cf_test.out`
4072 echo "configure: failed program was:" >&5
4073 cat conftest.$ac_ext >&5
4075 cf_cv_shift_limit=32
4084 echo "$ac_t""$cf_cv_shift_limit" 1>&6
4087 echo $ac_n "checking for width of character-index""... $ac_c" 1>&6
4088 echo "configure:4089: checking for width of character-index" >&5
4089 if eval "test \"`echo '$''{'cf_cv_widec_shift'+set}'`\" = set"; then
4090 echo $ac_n "(cached) $ac_c" 1>&6
4093 if test ".$with_widec" = ".yes" ; then
4095 if ( expr $cf_cv_shift_limit \> $cf_attrs_width >/dev/null )
4097 cf_cv_widec_shift=`expr 16 + $cf_cv_shift_limit - $cf_attrs_width`
4099 cf_cv_widec_shift=16
4107 echo "$ac_t""$cf_cv_widec_shift" 1>&6
4111 ### Checks for external-data
4114 echo $ac_n "checking declaration of errno""... $ac_c" 1>&6
4115 echo "configure:4116: checking declaration of errno" >&5
4116 if eval "test \"`echo '$''{'cf_cv_dcl_errno'+set}'`\" = set"; then
4117 echo $ac_n "(cached) $ac_c" 1>&6
4120 cat > conftest.$ac_ext <<EOF
4121 #line 4122 "configure"
4122 #include "confdefs.h"
4125 #include <sys/types.h>
4128 long x = (long) errno
4131 if { (eval echo configure:4132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4133 eval 'cf_cv_dcl_'errno'=yes'
4135 echo "configure: failed program was:" >&5
4136 cat conftest.$ac_ext >&5
4138 eval 'cf_cv_dcl_'errno'=no'
4143 eval 'cf_result=$cf_cv_dcl_'errno
4144 echo "$ac_t""$cf_result" 1>&6
4146 # It's possible (for near-UNIX clones) that the data doesn't exist
4147 if eval "test \"`echo '$''{'cf_cv_have_errno'+set}'`\" = set"; then
4148 echo $ac_n "(cached) $ac_c" 1>&6
4151 if test $cf_result = no ; then
4152 eval 'cf_result=DECL_'errno
4154 cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'`
4156 cat >> confdefs.h <<EOF
4157 #define $cf_result 1
4160 echo $ac_n "checking existence of errno""... $ac_c" 1>&6
4161 echo "configure:4162: checking existence of errno" >&5
4162 cat > conftest.$ac_ext <<EOF
4163 #line 4164 "configure"
4164 #include "confdefs.h"
4173 if { (eval echo configure:4174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4175 eval 'cf_cv_have_'errno'=yes'
4177 echo "configure: failed program was:" >&5
4178 cat conftest.$ac_ext >&5
4180 eval 'cf_cv_have_'errno'=no'
4183 eval 'cf_result=$cf_cv_have_'errno
4184 echo "$ac_t""$cf_result" 1>&6
4186 eval 'cf_cv_have_'errno'=yes'
4191 eval 'cf_result=HAVE_'errno
4193 cf_result=`echo $cf_result | tr '[a-z]' '[A-Z]'`
4195 eval 'test $cf_cv_have_'errno' = yes && cat >> confdefs.h <<EOF
4196 #define $cf_result 1
4202 echo $ac_n "checking if data-only library module links""... $ac_c" 1>&6
4203 echo "configure:4204: checking if data-only library module links" >&5
4204 if eval "test \"`echo '$''{'cf_cv_link_dataonly'+set}'`\" = set"; then
4205 echo $ac_n "(cached) $ac_c" 1>&6
4209 cat >conftest.$ac_ext <<EOF
4210 #line 4211 "configure"
4211 int testdata[3] = { 123, 456, 789 };
4213 if { (eval echo configure:4214: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } ; then
4214 mv conftest.o data.o && \
4215 ( $AR $AR_OPTS conftest.a data.o ) 2>&5 1>/dev/null
4217 rm -f conftest.$ac_ext data.o
4218 cat >conftest.$ac_ext <<EOF
4219 #line 4220 "configure"
4223 exit(1); /* I'm told this linker is broken */
4225 extern int testdata[3];
4226 return testdata[0] == 123
4227 && testdata[1] == 456
4228 && testdata[2] == 789;
4232 if { (eval echo configure:4233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4233 mv conftest.o func.o && \
4234 ( $AR $AR_OPTS conftest.a func.o ) 2>&5 1>/dev/null
4236 rm -f conftest.$ac_ext func.o
4237 ( eval $ac_cv_prog_RANLIB conftest.a ) 2>&5 >/dev/null
4239 LIBS="conftest.a $LIBS"
4240 if test "$cross_compiling" = yes; then
4241 cf_cv_link_dataonly=unknown
4243 cat > conftest.$ac_ext <<EOF
4244 #line 4245 "configure"
4245 #include "confdefs.h"
4249 extern int testfunc();
4254 if { (eval echo configure:4255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4256 cf_cv_link_dataonly=yes
4258 echo "configure: failed program was:" >&5
4259 cat conftest.$ac_ext >&5
4261 cf_cv_link_dataonly=no
4270 echo "$ac_t""$cf_cv_link_dataonly" 1>&6
4271 test $cf_cv_link_dataonly = no && cat >> confdefs.h <<\EOF
4272 #define BROKEN_LINKER 1
4277 echo $ac_n "checking for speed_t""... $ac_c" 1>&6
4278 echo "configure:4279: checking for speed_t" >&5
4279 if eval "test \"`echo '$''{'cf_cv_type_speed_t'+set}'`\" = set"; then
4280 echo $ac_n "(cached) $ac_c" 1>&6
4283 cat > conftest.$ac_ext <<EOF
4284 #line 4285 "configure"
4285 #include "confdefs.h"
4287 #include <sys/types.h>
4289 #include <termios.h>
4295 if { (eval echo configure:4296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4297 cf_cv_type_speed_t=yes
4299 echo "configure: failed program was:" >&5
4300 cat conftest.$ac_ext >&5
4302 cf_cv_type_speed_t=no
4308 echo "$ac_t""$cf_cv_type_speed_t" 1>&6
4309 test $cf_cv_type_speed_t != yes && cat >> confdefs.h <<\EOF
4310 #define speed_t unsigned
4315 ### Checks for library functions.
4337 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4338 echo "configure:4339: checking for $ac_func" >&5
4339 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4340 echo $ac_n "(cached) $ac_c" 1>&6
4342 cat > conftest.$ac_ext <<EOF
4343 #line 4344 "configure"
4344 #include "confdefs.h"
4345 /* System header to define __stub macros and hopefully few prototypes,
4346 which can conflict with char $ac_func(); below. */
4348 /* Override any gcc2 internal prototype to avoid an error. */
4349 /* We use char because int might match the return type of a gcc2
4350 builtin and then its argument prototype would still apply. */
4355 /* The GNU C library defines this for functions which it implements
4356 to always fail with ENOSYS. Some functions are actually named
4357 something starting with __ and the normal name is an alias. */
4358 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4366 if { (eval echo configure:4367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4368 eval "ac_cv_func_$ac_func=yes"
4370 echo "configure: failed program was:" >&5
4371 cat conftest.$ac_ext >&5
4373 eval "ac_cv_func_$ac_func=no"
4378 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4379 echo "$ac_t""yes" 1>&6
4380 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4381 cat >> confdefs.h <<EOF
4382 #define $ac_tr_func 1
4386 echo "$ac_t""no" 1>&6
4391 if test "$with_getcap" = "yes" ; then
4393 echo $ac_n "checking for terminal-capability database functions""... $ac_c" 1>&6
4394 echo "configure:4395: checking for terminal-capability database functions" >&5
4395 if eval "test \"`echo '$''{'cf_cv_cgetent'+set}'`\" = set"; then
4396 echo $ac_n "(cached) $ac_c" 1>&6
4399 cat > conftest.$ac_ext <<EOF
4400 #line 4401 "configure"
4401 #include "confdefs.h"
4408 char *db_array = temp;
4409 cgetent(&buf, /* int *, */ &db_array, "vt100");
4410 cgetcap(buf, "tc", '=');
4411 cgetmatch(buf, "tc");
4415 if { (eval echo configure:4416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4419 echo "configure: failed program was:" >&5
4420 cat conftest.$ac_ext >&5
4428 echo "$ac_t""$cf_cv_cgetent" 1>&6
4429 test $cf_cv_cgetent = yes && cat >> confdefs.h <<\EOF
4430 #define HAVE_BSD_CGETENT 1
4437 echo $ac_n "checking for isascii""... $ac_c" 1>&6
4438 echo "configure:4439: checking for isascii" >&5
4439 if eval "test \"`echo '$''{'cf_cv_have_isascii'+set}'`\" = set"; then
4440 echo $ac_n "(cached) $ac_c" 1>&6
4443 cat > conftest.$ac_ext <<EOF
4444 #line 4445 "configure"
4445 #include "confdefs.h"
4448 int x = isascii(' ')
4451 if { (eval echo configure:4452: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4453 cf_cv_have_isascii=yes
4455 echo "configure: failed program was:" >&5
4456 cat conftest.$ac_ext >&5
4458 cf_cv_have_isascii=no
4463 echo "$ac_t""$cf_cv_have_isascii" 1>&6
4464 test $cf_cv_have_isascii = yes && cat >> confdefs.h <<\EOF
4465 #define HAVE_ISASCII 1
4470 if test $ac_cv_func_sigaction = yes; then
4471 echo $ac_n "checking whether sigaction needs _POSIX_SOURCE""... $ac_c" 1>&6
4472 echo "configure:4473: checking whether sigaction needs _POSIX_SOURCE" >&5
4473 cat > conftest.$ac_ext <<EOF
4474 #line 4475 "configure"
4475 #include "confdefs.h"
4477 #include <sys/types.h>
4480 struct sigaction act
4483 if { (eval echo configure:4484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4487 echo "configure: failed program was:" >&5
4488 cat conftest.$ac_ext >&5
4491 cat > conftest.$ac_ext <<EOF
4492 #line 4493 "configure"
4493 #include "confdefs.h"
4495 #define _POSIX_SOURCE
4496 #include <sys/types.h>
4499 struct sigaction act
4502 if { (eval echo configure:4503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4505 cat >> confdefs.h <<\EOF
4506 #define SVR4_ACTION 1
4510 echo "configure: failed program was:" >&5
4511 cat conftest.$ac_ext >&5
4518 echo "$ac_t""$sigact_bad" 1>&6
4522 if test $ac_cv_header_termios_h = yes ; then
4525 termios_bad=dunno ;;
4526 *) termios_bad=maybe ;;
4528 if test $termios_bad = maybe ; then
4529 echo $ac_n "checking whether termios.h needs _POSIX_SOURCE""... $ac_c" 1>&6
4530 echo "configure:4531: checking whether termios.h needs _POSIX_SOURCE" >&5
4531 cat > conftest.$ac_ext <<EOF
4532 #line 4533 "configure"
4533 #include "confdefs.h"
4534 #include <termios.h>
4536 struct termios foo; int x = foo.c_iflag
4539 if { (eval echo configure:4540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4543 echo "configure: failed program was:" >&5
4544 cat conftest.$ac_ext >&5
4547 cat > conftest.$ac_ext <<EOF
4548 #line 4549 "configure"
4549 #include "confdefs.h"
4551 #define _POSIX_SOURCE
4552 #include <termios.h>
4554 struct termios foo; int x = foo.c_iflag
4557 if { (eval echo configure:4558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4561 echo "configure: failed program was:" >&5
4562 cat conftest.$ac_ext >&5
4564 termios_bad=yes cat >> confdefs.h <<\EOF
4565 #define SVR4_TERMIO 1
4573 echo "$ac_t""$termios_bad" 1>&6
4578 if test "$cross_compiling" = yes ; then
4579 echo "configure: warning: cross compiling: assume setvbuf params not reversed" 1>&2
4581 echo $ac_n "checking whether setvbuf arguments are reversed""... $ac_c" 1>&6
4582 echo "configure:4583: checking whether setvbuf arguments are reversed" >&5
4583 if eval "test \"`echo '$''{'ac_cv_func_setvbuf_reversed'+set}'`\" = set"; then
4584 echo $ac_n "(cached) $ac_c" 1>&6
4586 if test "$cross_compiling" = yes; then
4587 { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
4589 cat > conftest.$ac_ext <<EOF
4590 #line 4591 "configure"
4591 #include "confdefs.h"
4593 /* If setvbuf has the reversed format, exit 0. */
4595 /* This call has the arguments reversed.
4596 A reversed system may check and see that the address of main
4597 is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */
4598 if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
4601 exit(0); /* Non-reversed systems segv here. */
4604 if { (eval echo configure:4605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
4606 ac_cv_func_setvbuf_reversed=yes
4608 echo "configure: failed program was:" >&5
4609 cat conftest.$ac_ext >&5
4611 ac_cv_func_setvbuf_reversed=no
4616 rm -f core core.* *.core
4619 echo "$ac_t""$ac_cv_func_setvbuf_reversed" 1>&6
4620 if test $ac_cv_func_setvbuf_reversed = yes; then
4621 cat >> confdefs.h <<\EOF
4622 #define SETVBUF_REVERSED 1
4628 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
4629 echo "configure:4630: checking return type of signal handlers" >&5
4630 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
4631 echo $ac_n "(cached) $ac_c" 1>&6
4633 cat > conftest.$ac_ext <<EOF
4634 #line 4635 "configure"
4635 #include "confdefs.h"
4636 #include <sys/types.h>
4642 extern "C" void (*signal (int, void (*)(int)))(int);
4644 void (*signal ()) ();
4651 if { (eval echo configure:4652: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4653 ac_cv_type_signal=void
4655 echo "configure: failed program was:" >&5
4656 cat conftest.$ac_ext >&5
4658 ac_cv_type_signal=int
4663 echo "$ac_t""$ac_cv_type_signal" 1>&6
4664 cat >> confdefs.h <<EOF
4665 #define RETSIGTYPE $ac_cv_type_signal
4670 echo $ac_n "checking for type sigaction_t""... $ac_c" 1>&6
4671 echo "configure:4672: checking for type sigaction_t" >&5
4672 if eval "test \"`echo '$''{'cf_cv_type_sigaction'+set}'`\" = set"; then
4673 echo $ac_n "(cached) $ac_c" 1>&6
4676 cat > conftest.$ac_ext <<EOF
4677 #line 4678 "configure"
4678 #include "confdefs.h"
4685 if { (eval echo configure:4686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4687 cf_cv_type_sigaction=yes
4689 echo "configure: failed program was:" >&5
4690 cat conftest.$ac_ext >&5
4692 cf_cv_type_sigaction=no
4697 echo "$ac_t""$cf_cv_type_sigaction" 1>&6
4698 test $cf_cv_type_sigaction = yes && cat >> confdefs.h <<\EOF
4699 #define HAVE_TYPE_SIGACTION 1
4704 echo $ac_n "checking declaration of size-change""... $ac_c" 1>&6
4705 echo "configure:4706: checking declaration of size-change" >&5
4706 if eval "test \"`echo '$''{'cf_cv_sizechange'+set}'`\" = set"; then
4707 echo $ac_n "(cached) $ac_c" 1>&6
4710 cf_cv_sizechange=unknown
4711 cf_save_CFLAGS="$CFLAGS"
4713 for cf_opts in "" "NEED_PTEM_H"
4716 CFLAGS="$cf_save_CFLAGS"
4717 test -n "$cf_opts" && CFLAGS="$CFLAGS -D$cf_opts"
4718 cat > conftest.$ac_ext <<EOF
4719 #line 4720 "configure"
4720 #include "confdefs.h"
4721 #include <sys/types.h>
4723 #include <termios.h>
4730 /* This is a workaround for SCO: they neglected to define struct winsize in
4731 * termios.h -- it's only in termio.h and ptem.h
4733 #include <sys/stream.h>
4734 #include <sys/ptem.h>
4736 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
4737 #include <sys/ioctl.h>
4743 struct ttysize win; /* FIXME: what system is this? */
4744 int y = win.ts_lines;
4745 int x = win.ts_cols;
4752 no TIOCGSIZE or TIOCGWINSZ
4753 #endif /* TIOCGWINSZ */
4754 #endif /* TIOCGSIZE */
4758 if { (eval echo configure:4759: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4760 cf_cv_sizechange=yes
4762 echo "configure: failed program was:" >&5
4763 cat conftest.$ac_ext >&5
4769 CFLAGS="$cf_save_CFLAGS"
4770 if test "$cf_cv_sizechange" = yes ; then
4771 echo "size-change succeeded ($cf_opts)" >&5
4772 test -n "$cf_opts" && cat >> confdefs.h <<EOF
4782 echo "$ac_t""$cf_cv_sizechange" 1>&6
4783 test $cf_cv_sizechange != no && cat >> confdefs.h <<\EOF
4784 #define HAVE_SIZECHANGE 1
4789 case "$cf_cv_system_name" in
4791 cat >> confdefs.h <<\EOF
4792 #define GOOD_SELECT 1
4798 if test -z "$cf_user_CFLAGS" ; then
4799 CFLAGS=`echo ${CFLAGS} | sed -e 's/-g //' -e 's/-g$//'`
4800 CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's/-g //' -e 's/-g$//'`
4803 if test -n "$CXX" ; then
4804 # Extract the first word of "$CXX", so it can be a program name with args.
4805 set dummy $CXX; ac_word=$2
4806 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4807 echo "configure:4808: checking for $ac_word" >&5
4808 if eval "test \"`echo '$''{'ac_cv_prog_CXX_EXISTS'+set}'`\" = set"; then
4809 echo $ac_n "(cached) $ac_c" 1>&6
4811 if test -n "$CXX_EXISTS"; then
4812 ac_cv_prog_CXX_EXISTS="$CXX_EXISTS" # Let the user override the test.
4814 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
4815 for ac_dir in $PATH; do
4816 test -z "$ac_dir" && ac_dir=.
4817 if test -f $ac_dir/$ac_word; then
4818 ac_cv_prog_CXX_EXISTS="yes"
4823 test -z "$ac_cv_prog_CXX_EXISTS" && ac_cv_prog_CXX_EXISTS="no"
4826 CXX_EXISTS="$ac_cv_prog_CXX_EXISTS"
4827 if test -n "$CXX_EXISTS"; then
4828 echo "$ac_t""$CXX_EXISTS" 1>&6
4830 echo "$ac_t""no" 1>&6
4834 ac_cv_prog_CXX_EXISTS=no
4836 if test "$ac_cv_prog_CXX_EXISTS" = yes; then
4838 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4839 ac_cpp='$CXXCPP $CPPFLAGS'
4840 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4841 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4842 cross_compiling=$ac_cv_prog_cxx_cross
4845 cf_cxx_library=unknown
4846 if test $ac_cv_prog_gxx = yes; then
4847 echo $ac_n "checking for libg++""... $ac_c" 1>&6
4848 echo "configure:4849: checking for libg++" >&5
4850 LIBS="$LIBS -lg++ -lm"
4851 cat > conftest.$ac_ext <<EOF
4852 #line 4853 "configure"
4853 #include "confdefs.h"
4855 #include <builtin.h>
4861 if { (eval echo configure:4862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4864 CXXLIBS="$CXXLIBS -lg++ -lm"
4866 echo "configure: failed program was:" >&5
4867 cat conftest.$ac_ext >&5
4873 echo "$ac_t""$cf_cxx_library" 1>&6
4876 echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
4877 echo "configure:4878: checking how to run the C++ preprocessor" >&5
4878 if test -z "$CXXCPP"; then
4879 if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
4880 echo $ac_n "(cached) $ac_c" 1>&6
4883 # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4884 ac_cpp='$CXXCPP $CPPFLAGS'
4885 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4886 ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4887 cross_compiling=$ac_cv_prog_cxx_cross
4888 CXXCPP="${CXX-g++} -E"
4889 cat > conftest.$ac_ext <<EOF
4890 #line 4891 "configure"
4891 #include "confdefs.h"
4894 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4895 { (eval echo configure:4896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4896 ac_err=`grep -v '^ *+' conftest.out`
4897 if test -z "$ac_err"; then
4901 echo "configure: failed program was:" >&5
4902 cat conftest.$ac_ext >&5
4907 ac_cv_prog_CXXCPP="$CXXCPP"
4910 CXXCPP="$ac_cv_prog_CXXCPP"
4911 echo "$ac_t""$CXXCPP" 1>&6
4913 for ac_hdr in builtin.h typeinfo
4915 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4916 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4917 echo "configure:4918: checking for $ac_hdr" >&5
4918 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4919 echo $ac_n "(cached) $ac_c" 1>&6
4921 cat > conftest.$ac_ext <<EOF
4922 #line 4923 "configure"
4923 #include "confdefs.h"
4926 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4927 { (eval echo configure:4928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4928 ac_err=`grep -v '^ *+' conftest.out`
4929 if test -z "$ac_err"; then
4931 eval "ac_cv_header_$ac_safe=yes"
4934 echo "configure: failed program was:" >&5
4935 cat conftest.$ac_ext >&5
4937 eval "ac_cv_header_$ac_safe=no"
4941 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4942 echo "$ac_t""yes" 1>&6
4943 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4944 cat >> confdefs.h <<EOF
4945 #define $ac_tr_hdr 1
4949 echo "$ac_t""no" 1>&6
4954 echo $ac_n "checking for builtin c++ bool type""... $ac_c" 1>&6
4955 echo "configure:4956: checking for builtin c++ bool type" >&5
4956 if eval "test \"`echo '$''{'cf_cv_builtin_bool'+set}'`\" = set"; then
4957 echo $ac_n "(cached) $ac_c" 1>&6
4960 cat > conftest.$ac_ext <<EOF
4961 #line 4962 "configure"
4962 #include "confdefs.h"
4968 if { (eval echo configure:4969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4970 cf_cv_builtin_bool=1
4972 echo "configure: failed program was:" >&5
4973 cat conftest.$ac_ext >&5
4975 cf_cv_builtin_bool=0
4981 if test $cf_cv_builtin_bool = 1
4982 then echo "$ac_t""yes" 1>&6
4983 else echo "$ac_t""no" 1>&6
4987 echo $ac_n "checking for size of c++ bool""... $ac_c" 1>&6
4988 echo "configure:4989: checking for size of c++ bool" >&5
4989 if eval "test \"`echo '$''{'cf_cv_type_of_bool'+set}'`\" = set"; then
4990 echo $ac_n "(cached) $ac_c" 1>&6
4994 if test "$cross_compiling" = yes; then
4995 cf_cv_type_of_bool=unknown
4997 cat > conftest.$ac_ext <<EOF
4998 #line 4999 "configure"
4999 #include "confdefs.h"
5001 extern "C" void exit(int);
5007 #include <builtin.h>
5011 FILE *fp = fopen("cf_test.out", "w");
5015 fputs("unsigned ", fp);
5016 if (sizeof(x) == sizeof(int)) fputs("int", fp);
5017 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
5018 else if (sizeof(x) == sizeof(short))fputs("short",fp);
5019 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
5026 if { (eval echo configure:5027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
5028 cf_cv_type_of_bool=`cat cf_test.out`
5030 echo "configure: failed program was:" >&5
5031 cat conftest.$ac_ext >&5
5033 cf_cv_type_of_bool=unknown
5042 echo "$ac_t""$cf_cv_type_of_bool" 1>&6
5043 if test "$cf_cv_type_of_bool" = unknown ; then
5044 echo "configure: warning: Assuming unsigned for type of bool" 1>&2
5045 cf_cv_type_of_bool=unsigned
5050 if eval "test \"`echo '$''{'cf_cv_builtin_bool'+set}'`\" = set"; then
5051 echo $ac_n "(cached) $ac_c" 1>&6
5053 cf_cv_builtin_bool=0
5056 if eval "test \"`echo '$''{'cf_cv_sizeof_bool'+set}'`\" = set"; then
5057 echo $ac_n "(cached) $ac_c" 1>&6
5059 cf_cv_sizeof_bool=int
5067 cf_ada_make=gnatmake
5068 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
5069 set dummy $cf_ada_make; ac_word=$2
5070 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5071 echo "configure:5072: checking for $ac_word" >&5
5072 if eval "test \"`echo '$''{'ac_cv_prog_gnat_exists'+set}'`\" = set"; then
5073 echo $ac_n "(cached) $ac_c" 1>&6
5075 if test -n "$gnat_exists"; then
5076 ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
5078 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5079 for ac_dir in $PATH; do
5080 test -z "$ac_dir" && ac_dir=.
5081 if test -f $ac_dir/$ac_word; then
5082 ac_cv_prog_gnat_exists="yes"
5087 test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
5090 gnat_exists="$ac_cv_prog_gnat_exists"
5091 if test -n "$gnat_exists"; then
5092 echo "$ac_t""$gnat_exists" 1>&6
5094 echo "$ac_t""no" 1>&6
5097 if test "$ac_cv_prog_gnat_exists" = no; then
5101 cf_cv_gnat_version=`$cf_ada_make -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
5102 sed -e 's/[^0-9 \.]//g' | $AWK '{print $1;}'`
5103 case $cf_cv_gnat_version in
5105 ac_cv_prog_gnat_correct=yes
5107 *) echo Unsupported GNAT version $cf_cv_gnat_version. Required is 3.10 or better. Disabling Ada95 binding.
5108 ac_cv_prog_gnat_correct=no
5111 case $cf_cv_gnat_version in
5113 cf_compile_generics=generics
5115 *) cf_compile_generics=
5119 # Extract the first word of "m4", so it can be a program name with args.
5120 set dummy m4; ac_word=$2
5121 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5122 echo "configure:5123: checking for $ac_word" >&5
5123 if eval "test \"`echo '$''{'ac_cv_prog_m4_exists'+set}'`\" = set"; then
5124 echo $ac_n "(cached) $ac_c" 1>&6
5126 if test -n "$m4_exists"; then
5127 ac_cv_prog_m4_exists="$m4_exists" # Let the user override the test.
5129 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
5130 for ac_dir in $PATH; do
5131 test -z "$ac_dir" && ac_dir=.
5132 if test -f $ac_dir/$ac_word; then
5133 ac_cv_prog_m4_exists="yes"
5138 test -z "$ac_cv_prog_m4_exists" && ac_cv_prog_m4_exists="no"
5141 m4_exists="$ac_cv_prog_m4_exists"
5142 if test -n "$m4_exists"; then
5143 echo "$ac_t""$m4_exists" 1>&6
5145 echo "$ac_t""no" 1>&6
5148 if test "$ac_cv_prog_m4_exists" = no; then
5149 ac_cv_prog_gnat_correct=no
5150 echo Ada95 binding required program m4 not found. Ada95 binding disabled.
5153 if test "$ac_cv_prog_gnat_correct" = yes; then
5154 ADAFLAGS="-O3 $ADAFLAGS"
5156 cf_ada_package=terminal_interface
5165 # Check whether --with-ada-include or --without-ada-include was given.
5166 if test "${with_ada_include+set}" = set; then
5167 withval="$with_ada_include"
5170 withval="${ADA_INCLUDE-$exec_prefix/ada_include}"
5172 case ".$withval" in #(vi
5176 eval withval="$withval"
5177 case ".$withval" in #(vi
5179 withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
5184 withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
5187 { echo "configure: error: expected a pathname for ada-include" 1>&2; exit 1; }
5190 eval ADA_INCLUDE="$withval"
5195 # Check whether --with-ada-objects or --without-ada-objects was given.
5196 if test "${with_ada_objects+set}" = set; then
5197 withval="$with_ada_objects"
5200 withval="${ADA_OBJECTS-$exec_prefix/ada_objects}"
5202 case ".$withval" in #(vi
5206 eval withval="$withval"
5207 case ".$withval" in #(vi
5209 withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
5214 withval=`echo $withval | sed -e s@NONE@$ac_default_prefix@`
5217 { echo "configure: error: expected a pathname for ada-objects" 1>&2; exit 1; }
5220 eval ADA_OBJECTS="$withval"
5226 ### It's not possible to appease gcc 2.6.3's conversion-warnings if we're
5227 ### using a 'char' for bools. gcc 2.7.0's conversion-warnings are broken too
5228 ### badly to consider using for development purposes, but 2.5.8 is okay.
5229 if test -n "$with_warnings"; then
5230 if test -n "$GCC"; then
5231 case "`$CC --version`" in
5233 if test "$cf_cv_sizeof_bool" != "char"; then
5234 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wconversion"
5238 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wconversion"
5244 ### Construct the library-subsets, if any, from this set of keywords:
5245 ### none, base, ext_funcs, termlib.
5246 echo $ac_n "checking for library subsets""... $ac_c" 1>&6
5247 echo "configure:5248: checking for library subsets" >&5
5248 if test "$with_termlib" = yes ; then
5249 LIB_SUBSETS="termlib "
5251 LIB_SUBSETS="termlib+"
5253 LIB_SUBSETS="${LIB_SUBSETS}base"
5254 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
5255 echo "$ac_t""$LIB_SUBSETS" 1>&6
5257 ### Construct the list of include-directories to be generated
5259 CPPFLAGS="$CPPFLAGS -I. -I../include"
5260 if test "$srcdir" != "."; then
5261 CPPFLAGS="$CPPFLAGS -I\$(srcdir)/../include"
5263 if test -z "$GCC"; then
5264 CPPFLAGS="$CPPFLAGS -I\$(includedir)"
5265 elif test "$includedir" != "/usr/include"; then
5266 if test "$includedir" = '${prefix}/include' ; then
5267 if test $prefix != /usr ; then
5268 CPPFLAGS="$CPPFLAGS -I\$(includedir)"
5271 CPPFLAGS="$CPPFLAGS -I\$(includedir)"
5277 ACPPFLAGS="$ACPPFLAGS -I. -I../../include"
5278 if test "$srcdir" != "."; then
5279 ACPPFLAGS="$ACPPFLAGS -I\$(srcdir)/../../include"
5281 if test -z "$GCC"; then
5282 ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
5283 elif test "$includedir" != "/usr/include"; then
5284 if test "$includedir" = '${prefix}/include' ; then
5285 if test $prefix != /usr ; then
5286 ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
5289 ACPPFLAGS="$ACPPFLAGS -I\$(includedir)"
5295 ### Set up low-level terminfo dependencies for makefiles. Note that we
5296 ### could override this.
5297 if test "$with_termlib" = yes ; then
5298 TEST_DEPS="${LIB_PREFIX}${TINFO_NAME}${DFT_DEP_SUFFIX}"
5299 TEST_ARGS="-l${TINFO_NAME}${DFT_ARG_SUFFIX}"
5301 PROG_DEPS="$TEST_DEPS"
5302 PROG_ARGS="$TEST_ARGS"
5304 ### Construct the list of subdirectories for which we'll customize makefiles
5305 ### with the appropriate compile-rules.
5308 echo $ac_n "checking for src modules""... $ac_c" 1>&6
5309 echo "configure:5310: checking for src modules" >&5
5311 # dependencies and linker-arguments for test-programs
5312 TEST_DEPS="${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
5313 TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
5315 # dependencies and linker-arguments for utility-programs
5316 PROG_ARGS="$TEST_ARGS"
5319 for cf_dir in $modules_to_build
5321 if test -f $srcdir/$cf_dir/modules; then
5323 # We may/may not have tack in the distribution, though the
5325 if test $cf_dir = tack ; then
5326 if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
5331 if test -z "$cf_cv_src_modules"; then
5332 cf_cv_src_modules=$cf_dir
5334 cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
5337 # Make the ncurses_cfg.h file record the library interface files as
5338 # well. These are header files that are the same name as their
5339 # directory. Ncurses is the only library that does not follow
5341 if test $cf_dir = tack ; then
5343 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
5345 cf_have_include=`echo $cf_dir | tr '[a-z]' '[A-Z]'`
5347 cat >> confdefs.h <<EOF
5348 #define HAVE_${cf_have_include}_H 1
5351 cat >> confdefs.h <<EOF
5352 #define HAVE_LIB${cf_have_include} 1
5355 TEST_DEPS="${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
5356 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
5360 echo "$ac_t""$cf_cv_src_modules" 1>&6
5361 TEST_ARGS="-L${LIB_DIR} -L\$(libdir) $TEST_ARGS"
5365 PROG_ARGS="-L${LIB_DIR} -L\$(libdir) $PROG_ARGS"
5368 SRC_SUBDIRS="man include"
5369 for cf_dir in $cf_cv_src_modules
5371 SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
5373 SRC_SUBDIRS="$SRC_SUBDIRS misc test"
5374 test $cf_cxx_library != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
5377 if test "$ac_cv_prog_gnat_correct" = yes && test -d $srcdir/Ada95; then
5378 SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
5379 ADA_SUBDIRS="gen ada_include samples"
5383 for cf_dir in $SRC_SUBDIRS
5385 SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
5388 if test -n "$ADA_SUBDIRS"; then
5389 for cf_dir in $ADA_SUBDIRS
5391 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
5398 for cf_item in $cf_list_models
5402 normal) cf_subdir='objects' ;;
5403 debug) cf_subdir='obj_g' ;;
5404 profile) cf_subdir='obj_p' ;;
5405 shared) cf_subdir='obj_s' ;;
5408 DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
5410 for cf_dir in $DIRS_TO_MAKE
5412 test ! -d $cf_dir && mkdir $cf_dir
5417 ### Now that we're done running tests, add the compiler-warnings, if any
5418 CFLAGS="$CFLAGS $EXTRA_CFLAGS"
5420 ################################################################################
5422 cat > confcache <<\EOF
5423 # This file is a shell script that caches the results of configure
5424 # tests run on this system so they can be shared between configure
5425 # scripts and configure runs. It is not useful on other systems.
5426 # If it contains results you don't want to keep, you may remove or edit it.
5428 # By default, configure uses ./config.cache as the cache file,
5429 # creating it if it does not exist already. You can give configure
5430 # the --cache-file=FILE option to use a different cache file; that is
5431 # what configure does when it calls configure scripts in
5432 # subdirectories, so they share the cache.
5433 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5434 # config.status only pays attention to the cache file if you give it the
5435 # --recheck option to rerun configure.
5438 # The following way of writing the cache mishandles newlines in values,
5439 # but we know of no workaround that is simple, portable, and efficient.
5440 # So, don't put newlines in cache variables' values.
5441 # Ultrix sh set writes to stderr and can't be redirected directly,
5442 # and sets the high bit in the cache file unless we assign to the vars.
5444 case `(ac_space=' '; set) 2>&1 | grep '^ac_space='` in
5446 # `set' does not quote correctly, so add quotes (double-quote substitution
5447 # turns \\\\ into \\, and sed turns \\ into \).
5449 -e "s/'/'\\\\''/g" \
5450 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5453 # `set' quotes correctly as required by POSIX, so do not add quotes.
5454 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5457 if cmp -s $cache_file confcache; then
5460 if test -w $cache_file; then
5461 echo "updating cache $cache_file"
5462 cat confcache > $cache_file
5464 echo "not updating unwritable cache $cache_file"
5469 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5471 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5472 # Let make expand exec_prefix.
5473 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5475 # Any assignment to VPATH causes Sun make to only execute
5476 # the first set of double-colon rules, so remove it if not needed.
5477 # If there is a colon in the path, we need to keep it.
5478 if test "x$srcdir" = x.; then
5479 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5482 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5484 DEFS=-DHAVE_CONFIG_H
5486 # Without the "./", some shells look in PATH for config.status.
5487 : ${CONFIG_STATUS=./config.status}
5489 echo creating $CONFIG_STATUS
5490 rm -f $CONFIG_STATUS
5491 cat > $CONFIG_STATUS <<EOF
5493 # Generated automatically by configure.
5494 # Run this file to recreate the current configuration.
5495 # This directory was configured as follows,
5496 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5498 # $0 $ac_configure_args
5500 # Compiler output produced by configure, useful for debugging
5501 # configure, is in ./config.log if it exists.
5503 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5506 case "\$ac_option" in
5507 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5508 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5509 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5510 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5511 echo "$CONFIG_STATUS generated by autoconf version 2.12.971230"
5513 -help | --help | --hel | --he | --h)
5514 echo "\$ac_cs_usage"; exit 0 ;;
5515 *) echo "\$ac_cs_usage"; exit 1 ;;
5519 ac_given_srcdir=$srcdir
5520 ac_given_INSTALL="$INSTALL"
5522 trap 'rm -fr `echo "\
5523 include/MKterm.h.awk \
5528 Makefile include/ncurses_cfg.h:include/ncurses_cfg.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5530 cat >> $CONFIG_STATUS <<EOF
5532 # Protect against being on the right side of a sed subst in config.status.
5533 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5534 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5537 s%@CFLAGS@%$CFLAGS%g
5538 s%@CPPFLAGS@%$CPPFLAGS%g
5539 s%@CXXFLAGS@%$CXXFLAGS%g
5541 s%@LDFLAGS@%$LDFLAGS%g
5543 s%@exec_prefix@%$exec_prefix%g
5544 s%@prefix@%$prefix%g
5545 s%@program_transform_name@%$program_transform_name%g
5546 s%@bindir@%$bindir%g
5547 s%@sbindir@%$sbindir%g
5548 s%@libexecdir@%$libexecdir%g
5549 s%@datadir@%$datadir%g
5550 s%@sysconfdir@%$sysconfdir%g
5551 s%@sharedstatedir@%$sharedstatedir%g
5552 s%@localstatedir@%$localstatedir%g
5553 s%@libdir@%$libdir%g
5554 s%@includedir@%$includedir%g
5555 s%@oldincludedir@%$oldincludedir%g
5556 s%@infodir@%$infodir%g
5557 s%@mandir@%$mandir%g
5558 s%@NCURSES_MAJOR@%$NCURSES_MAJOR%g
5559 s%@NCURSES_MINOR@%$NCURSES_MINOR%g
5560 s%@NCURSES_PATCH@%$NCURSES_PATCH%g
5561 s%@cf_cv_rel_version@%$cf_cv_rel_version%g
5562 s%@cf_cv_abi_version@%$cf_cv_abi_version%g
5563 s%@cf_cv_builtin_bool@%$cf_cv_builtin_bool%g
5564 s%@cf_cv_type_of_bool@%$cf_cv_type_of_bool%g
5566 s%@host_alias@%$host_alias%g
5567 s%@host_cpu@%$host_cpu%g
5568 s%@host_vendor@%$host_vendor%g
5569 s%@host_os@%$host_os%g
5572 s%@LDCONFIG@%$LDCONFIG%g
5575 s%@SET_MAKE@%$SET_MAKE%g
5576 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5577 s%@INSTALL_DATA@%$INSTALL_DATA%g
5579 s%@RANLIB@%$RANLIB%g
5582 s%@LINT_OPTS@%$LINT_OPTS%g
5585 s%@AR_OPTS@%$AR_OPTS%g
5586 s%@cf_cv_makeflags@%$cf_cv_makeflags%g
5587 s%@INSTALL_PREFIX@%$INSTALL_PREFIX%g
5588 s%@EXTRA_LIBS@%$EXTRA_LIBS%g
5589 s%@SHLIB_LIST@%$SHLIB_LIST%g
5590 s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g
5591 s%@DFT_LWR_MODEL@%$DFT_LWR_MODEL%g
5592 s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
5593 s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g
5594 s%@DFT_ARG_SUFFIX@%$DFT_ARG_SUFFIX%g
5595 s%@cf_list_models@%$cf_list_models%g
5596 s%@TINFO_NAME@%$TINFO_NAME%g
5597 s%@LIB_NAME@%$LIB_NAME%g
5598 s%@LIB_PREFIX@%$LIB_PREFIX%g
5599 s%@CC_G_OPT@%$CC_G_OPT%g
5600 s%@CXX_G_OPT@%$CXX_G_OPT%g
5601 s%@LD_MODEL@%$LD_MODEL%g
5602 s%@CC_SHARED_OPTS@%$CC_SHARED_OPTS%g
5603 s%@LD_SHARED_OPTS@%$LD_SHARED_OPTS%g
5604 s%@MK_SHARED_LIB@%$MK_SHARED_LIB%g
5605 s%@EXTRA_LDFLAGS@%$EXTRA_LDFLAGS%g
5606 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
5607 s%@LOCAL_LDFLAGS2@%$LOCAL_LDFLAGS2%g
5608 s%@INSTALL_LIB@%$INSTALL_LIB%g
5609 s%@FALLBACK_LIST@%$FALLBACK_LIST%g
5610 s%@ECHO_LINK@%$ECHO_LINK%g
5611 s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
5612 s%@MATH_LIB@%$MATH_LIB%g
5613 s%@PROG_EXT@%$PROG_EXT%g
5614 s%@cf_cv_typeof_chtype@%$cf_cv_typeof_chtype%g
5615 s%@cf_cv_1UL@%$cf_cv_1UL%g
5616 s%@cf_cv_shift_limit@%$cf_cv_shift_limit%g
5617 s%@cf_cv_widec_shift@%$cf_cv_widec_shift%g
5618 s%@CXX_EXISTS@%$CXX_EXISTS%g
5619 s%@CXXCPP@%$CXXCPP%g
5620 s%@CXXLIBS@%$CXXLIBS%g
5621 s%@gnat_exists@%$gnat_exists%g
5622 s%@m4_exists@%$m4_exists%g
5623 s%@cf_ada_make@%$cf_ada_make%g
5624 s%@cf_ada_compiler@%$cf_ada_compiler%g
5625 s%@cf_ada_package@%$cf_ada_package%g
5626 s%@ADAFLAGS@%$ADAFLAGS%g
5627 s%@cf_compile_generics@%$cf_compile_generics%g
5628 s%@ADA_INCLUDE@%$ADA_INCLUDE%g
5629 s%@ADA_OBJECTS@%$ADA_OBJECTS%g
5630 s%@ACPPFLAGS@%$ACPPFLAGS%g
5631 s%@TEST_DEPS@%$TEST_DEPS%g
5632 s%@TEST_ARGS@%$TEST_ARGS%g
5633 s%@PROG_ARGS@%$PROG_ARGS%g
5634 s%@ADA_SUBDIRS@%$ADA_SUBDIRS%g
5635 s%@DIRS_TO_MAKE@%$DIRS_TO_MAKE%g
5640 cat >> $CONFIG_STATUS <<\EOF
5642 # Split the substitutions into bite-sized pieces for seds with
5643 # small command number limits, like on Digital OSF/1 and HP-UX.
5644 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5645 ac_file=1 # Number of current file.
5646 ac_beg=1 # First line for current file.
5647 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5650 while $ac_more_lines; do
5651 if test $ac_beg -gt 1; then
5652 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5654 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5656 if test ! -s conftest.s$ac_file; then
5658 rm -f conftest.s$ac_file
5660 if test -z "$ac_sed_cmds"; then
5661 ac_sed_cmds="sed -f conftest.s$ac_file"
5663 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5665 ac_file=`expr $ac_file + 1`
5667 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5670 if test -z "$ac_sed_cmds"; then
5675 cat >> $CONFIG_STATUS <<EOF
5677 CONFIG_FILES=\${CONFIG_FILES-"\
5678 include/MKterm.h.awk \
5685 cat >> $CONFIG_STATUS <<\EOF
5686 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5687 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5689 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5690 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5691 *) ac_file_in="${ac_file}.in" ;;
5694 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5696 # Remove last slash and all that follows it. Not all systems have dirname.
5697 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5698 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5699 # The file is in a subdirectory.
5700 test ! -d "$ac_dir" && mkdir "$ac_dir"
5701 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5702 # A "../" for each directory in $ac_dir_suffix.
5703 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5705 ac_dir_suffix= ac_dots=
5708 case "$ac_given_srcdir" in
5710 if test -z "$ac_dots"; then top_srcdir=.
5711 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5712 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5714 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5715 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5718 case "$ac_given_INSTALL" in
5719 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5720 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5723 echo creating "$ac_file"
5725 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5727 *Makefile*) ac_comsub="1i\\
5728 # $configure_input" ;;
5732 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5734 s%@configure_input@%$configure_input%g
5735 s%@srcdir@%$srcdir%g
5736 s%@top_srcdir@%$top_srcdir%g
5737 s%@INSTALL@%$INSTALL%g
5738 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5742 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5743 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5745 # ac_d sets the value in "#define NAME VALUE" lines.
5746 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5747 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5750 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5751 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5752 ac_uB='\([ ]\)%\1#\2define\3'
5755 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5756 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5757 ac_eB='$%\1#\2define\3'
5761 if test "${CONFIG_HEADERS+set}" != set; then
5763 cat >> $CONFIG_STATUS <<EOF
5764 CONFIG_HEADERS="include/ncurses_cfg.h:include/ncurses_cfg.hin"
5766 cat >> $CONFIG_STATUS <<\EOF
5768 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5769 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5771 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5772 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5773 *) ac_file_in="${ac_file}.in" ;;
5776 echo creating $ac_file
5778 rm -f conftest.frag conftest.in conftest.out
5779 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5780 cat $ac_file_inputs > conftest.in
5785 # Transform confdefs.h into a list of #define's. We won't use it as a sed
5786 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
5787 # be either 'cat' or 'sort'.
5788 sort confdefs.h >conftest.vals
5790 # Break up conftest.vals because some shells have a limit on
5791 # the size of here documents, and old seds have small limits too.
5794 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
5797 ac_lines=`grep -c . conftest.vals`
5798 # grep -c gives empty output for an empty file on some AIX systems.
5799 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5800 # Write chunks of a limited-size here document to conftest.frag.
5801 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
5802 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5803 echo 'CEOF' >> $CONFIG_STATUS
5804 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5806 mv conftest.tail conftest.vals
5810 # Run sed to substitute the contents of conftest.frag into conftest.in at the
5812 echo ' cat >> conftest.edit <<CEOF
5813 /@DEFS@/r conftest.frag
5816 sed -f conftest.edit conftest.in > conftest.out
5818 mv conftest.out conftest.in
5819 rm -f conftest.edit conftest.frag
5823 cat >> $CONFIG_STATUS <<\EOF
5824 rm -f conftest.frag conftest.h
5825 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5826 cat conftest.in >> conftest.h
5828 if cmp -s $ac_file conftest.h 2>/dev/null; then
5829 echo "$ac_file is unchanged"
5832 # Remove last slash and all that follows it. Not all systems have dirname.
5833 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5834 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5835 # The file is in a subdirectory.
5836 test ! -d "$ac_dir" && mkdir "$ac_dir"
5839 mv conftest.h $ac_file
5844 cat >> $CONFIG_STATUS <<EOF
5845 # Extra initialization commands, if any
5847 ### Special initialization commands, used to pass information from the
5848 ### configuration-run into config.status
5851 CF_LIST_MODELS="$cf_list_models"
5852 DFT_LWR_MODEL="$DFT_LWR_MODEL"
5853 LDCONFIG="$LDCONFIG"
5854 LIB_NAME="$LIB_NAME"
5855 LIB_SUBSETS="$LIB_SUBSETS"
5856 SRC_SUBDIRS="$SRC_SUBDIRS"
5857 TINFO_NAME="$TINFO_NAME"
5858 WITH_ECHO="$with_echo"
5859 WITH_OVERWRITE="$with_overwrite"
5860 cf_cv_abi_version="$cf_cv_abi_version"
5861 cf_cv_do_symlinks="$cf_cv_do_symlinks"
5862 cf_cv_rel_version="$cf_cv_rel_version"
5863 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
5864 cf_cv_system_name="$cf_cv_system_name"
5865 cf_cxx_library="$cf_cxx_library"
5870 cat >> $CONFIG_STATUS <<\EOF
5871 # Extra commands, if any
5875 case $cf_cv_system_name in
5876 os2) cf_prefix='' ;;
5877 *) cf_prefix='lib' ;;
5881 for cf_dir in $SRC_SUBDIRS
5883 if test -f $srcdir/$cf_dir/modules; then
5886 for cf_item in $CF_LIST_MODELS
5891 normal) cf_suffix='.a' ;;
5892 debug) cf_suffix='_g.a' ;;
5893 profile) cf_suffix='_p.a' ;;
5895 case $cf_cv_system_name in
5896 openbsd*|netbsd*|freebsd*)
5897 cf_suffix='.so.$(REL_VERSION)' ;;
5898 hpux*) cf_suffix='.sl' ;;
5899 *) cf_suffix='.so' ;;
5903 cf_libs_to_make="$cf_libs_to_make ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
5906 if test $cf_dir = ncurses ; then
5907 case "$LIB_SUBSETS" in
5911 cf_item=`echo $cf_libs_to_make |sed -e s/$LIB_NAME/$TINFO_NAME/g`
5912 cf_libs_to_make="$cf_libs_to_make $cf_item"
5917 sed -e "s@\@LIBS_TO_MAKE\@@$cf_libs_to_make@" \
5918 $cf_dir/Makefile >$cf_dir/Makefile.out
5919 mv $cf_dir/Makefile.out $cf_dir/Makefile
5921 $AWK -f $srcdir/mk-0th.awk \
5923 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
5925 for cf_item in $CF_LIST_MODELS
5927 echo 'Appending rules for '$cf_item' model ('$cf_dir')'
5929 CF_ITEM=`echo $cf_item | tr '[a-z]' '[A-Z]'`
5934 normal) cf_suffix='.a' ;;
5935 debug) cf_suffix='_g.a' ;;
5936 profile) cf_suffix='_p.a' ;;
5938 case $cf_cv_system_name in
5939 openbsd*|netbsd*|freebsd*)
5940 cf_suffix='.so.$(REL_VERSION)' ;;
5941 hpux*) cf_suffix='.sl' ;;
5942 *) cf_suffix='.so' ;;
5948 normal) cf_subdir='objects' ;;
5949 debug) cf_subdir='obj_g' ;;
5950 profile) cf_subdir='obj_p' ;;
5951 shared) cf_subdir='obj_s' ;;
5955 # These dependencies really are for development, not
5956 # builds, but they are useful in porting, too.
5957 cf_depend="../include/ncurses_cfg.h"
5958 if test "$srcdir" = "."; then
5961 cf_reldir="\$(srcdir)"
5964 if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
5965 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
5966 elif test -f $srcdir/$cf_dir/curses.priv.h; then
5967 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
5970 for cf_subset in $LIB_SUBSETS
5972 $AWK -f $srcdir/mk-1st.awk \
5979 DoLinks=$cf_cv_do_symlinks \
5980 rmSoLocs=$cf_cv_rm_so_locs \
5981 ldconfig="$LDCONFIG" \
5982 overwrite=$WITH_OVERWRITE \
5983 depend="$cf_depend" \
5985 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
5986 test $cf_dir = ncurses && WITH_OVERWRITE=no
5987 $AWK -f $srcdir/mk-2nd.awk \
5994 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
5999 echo ' cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) $@' >>Makefile
6002 for cf_dir in $SRC_SUBDIRS
6004 if test -f $cf_dir/Makefile ; then
6007 echo 'install.libs \' >> Makefile
6008 echo 'uninstall.libs ::' >> Makefile
6009 echo ' cd '$cf_dir' && $(MAKE) $(CF_MFLAGS) $@' >> Makefile
6014 if test -f $srcdir/$cf_dir/modules; then
6016 if test -f $srcdir/$cf_dir/headers; then
6017 cat >> Makefile <<CF_EOF
6019 uninstall.includes \\
6022 if test "$cf_dir" != "c++" ; then
6023 echo 'lint \' >> Makefile
6025 cat >> Makefile <<CF_EOF
6030 uninstall.$cf_dir ::
6031 cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \$@
6033 elif test -f $srcdir/$cf_dir/headers; then
6034 cat >> Makefile <<CF_EOF
6039 uninstall.includes ::
6040 cd $cf_dir && \$(MAKE) \$(CF_MFLAGS) \$@
6045 cat >> Makefile <<CF_EOF
6048 cd misc && \$(MAKE) \$(CF_MFLAGS) \$@
6051 cd man && \$(MAKE) \$(CF_MFLAGS) \$@
6054 rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
6055 rm -f headers.sh headers.sed
6056 rm -rf \$(DIRS_TO_MAKE)
6060 rm -f headers.sed headers.sh
6062 echo creating headers.sh
6063 cat >headers.sh <<CF_EOF
6065 # This shell script is generated by the 'configure' script. It is invoked in a
6066 # subdirectory of the build tree. It generates a sed-script in the parent
6067 # directory that is used to adjust includes for header files that reside in a
6068 # subdirectory of /usr/include, etc.
6072 PRG="\$PRG \$1"; shift
6077 echo installing \$SRC in \$DST
6080 TMP=\${TMPDIR-/tmp}/\`basename \$SRC\`
6081 if test ! -f ../headers.sed ; then
6082 END=\`basename \$DST\`
6083 for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
6085 NAME=\`basename \$i\`
6086 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> ../headers.sed
6090 sed -f ../headers.sed \$SRC > \$TMP
6091 eval \$PRG \$TMP \$DST
6095 eval \$PRG \$SRC \$DST
6100 chmod 0755 headers.sh
6102 for cf_dir in $SRC_SUBDIRS
6104 if test -f $srcdir/$cf_dir/headers; then
6105 cat >>$cf_dir/Makefile <<CF_EOF
6106 \$(INSTALL_PREFIX)\$(includedir) :
6107 \$(srcdir)/../mkinstalldirs \$@
6111 install.includes :: \$(INSTALL_PREFIX)\$(includedir) \\
6114 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
6116 test -n "$j" && echo " $j \\" >>$cf_dir/Makefile
6119 echo " $j" >>$cf_dir/Makefile
6120 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
6122 echo " @ (cd \$(INSTALL_PREFIX)\$(includedir) && rm -f `basename $i`) ; ../headers.sh \$(INSTALL_DATA) \$(INSTALL_PREFIX)\$(includedir) \$(srcdir) $i" >>$cf_dir/Makefile
6123 test $i = curses.h && echo " @ (cd \$(INSTALL_PREFIX)\$(includedir) && rm -f ncurses.h && \$(LN_S) curses.h ncurses.h)" >>$cf_dir/Makefile
6126 cat >>$cf_dir/Makefile <<CF_EOF
6130 uninstall.includes ::
6132 for i in `cat $srcdir/$cf_dir/headers |fgrep -v "#"`
6135 echo " -@ (cd \$(INSTALL_PREFIX)\$(includedir) && rm -f $i)" >>$cf_dir/Makefile
6136 test $i = curses.h && echo " -@ (cd \$(INSTALL_PREFIX)\$(includedir) && rm -f ncurses.h)" >>$cf_dir/Makefile
6145 chmod +x $CONFIG_STATUS
6146 rm -fr confdefs* $ac_clean_files
6147 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
6148 ${MAKE-make} preinstall