3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13.20030927
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
15 # Initialize some variables set by options.
16 # The variables have the same names as the options, with
17 # dashes changed to underlines.
19 cache_file=./config.cache
28 program_transform_name=s,x,x,
36 bindir='${exec_prefix}/bin'
37 sbindir='${exec_prefix}/sbin'
38 libexecdir='${exec_prefix}/libexec'
39 datadir='${prefix}/share'
40 sysconfdir='${prefix}/etc'
41 sharedstatedir='${prefix}/com'
42 localstatedir='${prefix}/var'
43 libdir='${exec_prefix}/lib'
44 includedir='${prefix}/include'
45 oldincludedir='/usr/include'
46 infodir='${prefix}/info'
47 mandir='${prefix}/man'
49 # Initialize some other variables.
52 SHELL=${CONFIG_SHELL-/bin/sh}
53 # Maximum number of lines to put in a shell here document.
60 # If the previous option needs an argument, assign it.
61 if test -n "$ac_prev"; then
62 eval "$ac_prev=\$ac_option"
68 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
72 # Accept the important Cygnus configure options, so we can diagnose typos.
76 -bindir | --bindir | --bindi | --bind | --bin | --bi)
78 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
79 bindir="$ac_optarg" ;;
81 -build | --build | --buil | --bui | --bu)
83 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
86 -cache-file | --cache-file | --cache-fil | --cache-fi \
87 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
89 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
90 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
91 cache_file="$ac_optarg" ;;
93 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
95 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
97 datadir="$ac_optarg" ;;
99 -disable-* | --disable-*)
100 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
101 # Reject names that are not valid shell variable names.
102 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
103 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
105 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
106 eval "enable_${ac_feature}=no" ;;
108 -enable-* | --enable-*)
109 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
110 # Reject names that are not valid shell variable names.
111 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
112 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
114 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
119 eval "enable_${ac_feature}='$ac_optarg'" ;;
121 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
122 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
123 | --exec | --exe | --ex)
124 ac_prev=exec_prefix ;;
125 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
126 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
127 | --exec=* | --exe=* | --ex=*)
128 exec_prefix="$ac_optarg" ;;
130 -gas | --gas | --ga | --g)
131 # Obsolete; use --with-gas.
134 -help | --help | --hel | --he)
135 # Omit some internal or obsolete options to make the list less imposing.
136 # This message is too long to be a string in the A/UX 3.1 sh.
138 Usage: configure [options] [host]
139 Options: [defaults in brackets after descriptions]
141 --cache-file=FILE cache test results in FILE
142 --help print this message
143 --no-create do not create output files
144 --quiet, --silent do not print \`checking...' messages
145 --version print the version of autoconf that created configure
146 Directory and file names:
147 --prefix=PREFIX install architecture-independent files in PREFIX
149 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
151 --bindir=DIR user executables in DIR [EPREFIX/bin]
152 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
153 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
154 --datadir=DIR read-only architecture-independent data in DIR
156 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
157 --sharedstatedir=DIR modifiable architecture-independent data in DIR
159 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
160 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
161 --includedir=DIR C header files in DIR [PREFIX/include]
162 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
163 --infodir=DIR info documentation in DIR [PREFIX/info]
164 --mandir=DIR man documentation in DIR [PREFIX/man]
165 --srcdir=DIR find the sources in DIR [configure dir or ..]
166 --program-prefix=PREFIX prepend PREFIX to installed program names
167 --program-suffix=SUFFIX append SUFFIX to installed program names
168 --program-transform-name=PROGRAM
169 run sed PROGRAM on installed program names
173 --build=BUILD configure for building on BUILD [BUILD=HOST]
174 --host=HOST configure for HOST [guessed]
175 --target=TARGET configure for TARGET [TARGET=HOST]
176 Features and packages:
177 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
178 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
179 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
180 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
181 --x-includes=DIR X include files are in DIR
182 --x-libraries=DIR X library files are in DIR
185 --enable and --with options recognized:
186 --enable-warnings test: turn on gcc compiler warnings
187 --with-curses-dir=DIR directory in which (n)curses is installed
188 --with-5lib use SunOS sysv-libraries
189 --with-ncursesw use wide ncurses-libraries (installed)
190 --with-ncurses use ncurses-libraries (installed)
191 --with-pdcurses compile/link with pdcurses X11 library
195 -host | --host | --hos | --ho)
197 -host=* | --host=* | --hos=* | --ho=*)
200 -includedir | --includedir | --includedi | --included | --include \
201 | --includ | --inclu | --incl | --inc)
202 ac_prev=includedir ;;
203 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
204 | --includ=* | --inclu=* | --incl=* | --inc=*)
205 includedir="$ac_optarg" ;;
207 -infodir | --infodir | --infodi | --infod | --info | --inf)
209 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
210 infodir="$ac_optarg" ;;
212 -libdir | --libdir | --libdi | --libd)
214 -libdir=* | --libdir=* | --libdi=* | --libd=*)
215 libdir="$ac_optarg" ;;
217 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
218 | --libexe | --libex | --libe)
219 ac_prev=libexecdir ;;
220 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
221 | --libexe=* | --libex=* | --libe=*)
222 libexecdir="$ac_optarg" ;;
224 -localstatedir | --localstatedir | --localstatedi | --localstated \
225 | --localstate | --localstat | --localsta | --localst \
226 | --locals | --local | --loca | --loc | --lo)
227 ac_prev=localstatedir ;;
228 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
229 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
230 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
231 localstatedir="$ac_optarg" ;;
233 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
235 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
236 mandir="$ac_optarg" ;;
239 # Obsolete; use --without-fp.
242 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
246 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
247 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
250 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
251 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
252 | --oldin | --oldi | --old | --ol | --o)
253 ac_prev=oldincludedir ;;
254 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
255 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
256 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
257 oldincludedir="$ac_optarg" ;;
259 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
261 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
262 prefix="$ac_optarg" ;;
264 -program-prefix | --program-prefix | --program-prefi | --program-pref \
265 | --program-pre | --program-pr | --program-p)
266 ac_prev=program_prefix ;;
267 -program-prefix=* | --program-prefix=* | --program-prefi=* \
268 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
269 program_prefix="$ac_optarg" ;;
271 -program-suffix | --program-suffix | --program-suffi | --program-suff \
272 | --program-suf | --program-su | --program-s)
273 ac_prev=program_suffix ;;
274 -program-suffix=* | --program-suffix=* | --program-suffi=* \
275 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
276 program_suffix="$ac_optarg" ;;
278 -program-transform-name | --program-transform-name \
279 | --program-transform-nam | --program-transform-na \
280 | --program-transform-n | --program-transform- \
281 | --program-transform | --program-transfor \
282 | --program-transfo | --program-transf \
283 | --program-trans | --program-tran \
284 | --progr-tra | --program-tr | --program-t)
285 ac_prev=program_transform_name ;;
286 -program-transform-name=* | --program-transform-name=* \
287 | --program-transform-nam=* | --program-transform-na=* \
288 | --program-transform-n=* | --program-transform-=* \
289 | --program-transform=* | --program-transfor=* \
290 | --program-transfo=* | --program-transf=* \
291 | --program-trans=* | --program-tran=* \
292 | --progr-tra=* | --program-tr=* | --program-t=*)
293 program_transform_name="$ac_optarg" ;;
295 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
296 | -silent | --silent | --silen | --sile | --sil)
299 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
301 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
303 sbindir="$ac_optarg" ;;
305 -sharedstatedir | --sharedstatedir | --sharedstatedi \
306 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
307 | --sharedst | --shareds | --shared | --share | --shar \
309 ac_prev=sharedstatedir ;;
310 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
311 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
312 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
314 sharedstatedir="$ac_optarg" ;;
316 -site | --site | --sit)
318 -site=* | --site=* | --sit=*)
321 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
323 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
324 srcdir="$ac_optarg" ;;
326 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
327 | --syscon | --sysco | --sysc | --sys | --sy)
328 ac_prev=sysconfdir ;;
329 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
330 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
331 sysconfdir="$ac_optarg" ;;
333 -target | --target | --targe | --targ | --tar | --ta | --t)
335 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
336 target="$ac_optarg" ;;
338 -v | -verbose | --verbose | --verbos | --verbo | --verb)
341 -version | --version | --versio | --versi | --vers)
342 echo "configure generated by autoconf version 2.13.20030927"
346 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
347 # Reject names that are not valid shell variable names.
348 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
349 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
351 ac_package=`echo $ac_package| sed 's/-/_/g'`
356 eval "with_${ac_package}='$ac_optarg'" ;;
358 -without-* | --without-*)
359 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
360 # Reject names that are not valid shell variable names.
361 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
362 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
364 ac_package=`echo $ac_package| sed 's/-/_/g'`
365 eval "with_${ac_package}=no" ;;
368 # Obsolete; use --with-x.
371 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
372 | --x-incl | --x-inc | --x-in | --x-i)
373 ac_prev=x_includes ;;
374 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
375 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
376 x_includes="$ac_optarg" ;;
378 -x-libraries | --x-libraries | --x-librarie | --x-librari \
379 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
380 ac_prev=x_libraries ;;
381 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
382 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
383 x_libraries="$ac_optarg" ;;
385 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
389 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
390 echo "configure: warning: $ac_option: invalid host type" 1>&2
392 if test "x$nonopt" != xNONE; then
393 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
401 if test -n "$ac_prev"; then
402 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
405 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
407 # File descriptor usage:
410 # 2 errors and warnings
411 # 3 some systems may open it to /dev/tty
412 # 4 used on the Kubota Titan
413 # 6 checking for... messages and results
414 # 5 compiler messages saved in config.log
415 if test "$silent" = yes; then
423 This file contains any messages produced by compilers while
424 running configure, to aid debugging if configure makes a mistake.
427 # Strip out --no-create and --no-recursion so they do not pile up.
428 # Also quote any args containing shell metacharacters.
433 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
434 | --no-cr | --no-c) ;;
435 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
436 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
437 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
438 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
439 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
444 # Only set these to C if already set. These must not be set unconditionally
445 # because not all systems understand e.g. LANG=C (notably SCO).
446 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
447 # Non-C LC_CTYPE values break the ctype check.
448 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
449 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
450 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
451 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
453 # confdefs.h avoids OS command line length limits that DEFS can exceed.
454 rm -rf conftest* confdefs.h
455 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
458 # A filename unique to this package, relative to the directory that
459 # configure is in, which we can look for to find out if srcdir is correct.
460 ac_unique_file=tack.c
462 # Find the source files, if location was not specified.
463 if test -z "$srcdir"; then
464 ac_srcdir_defaulted=yes
465 # Try the directory containing this script, then its parent.
467 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
468 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
470 if test ! -r $srcdir/$ac_unique_file; then
474 ac_srcdir_defaulted=no
476 if test ! -r $srcdir/$ac_unique_file; then
477 if test "$ac_srcdir_defaulted" = yes; then
478 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
480 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
483 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
485 # Prefer explicitly selected file to automatically selected ones.
486 if test -z "$CONFIG_SITE"; then
487 if test "x$prefix" != xNONE; then
488 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
490 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
493 for ac_site_file in $CONFIG_SITE; do
494 if test -r "$ac_site_file"; then
495 echo "loading site script $ac_site_file"
500 if test -r "$cache_file"; then
501 echo "loading cache $cache_file"
504 echo "creating cache $cache_file"
509 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
510 ac_cpp='$CPP $CPPFLAGS'
511 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
512 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
513 cross_compiling=$ac_cv_prog_cc_cross
517 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
518 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
519 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
526 ac_n= ac_c='\c' ac_t=
533 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
536 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
539 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
540 if test -f $ac_dir/install-sh; then
542 ac_install_sh="$ac_aux_dir/install-sh -c"
544 elif test -f $ac_dir/install.sh; then
546 ac_install_sh="$ac_aux_dir/install.sh -c"
550 if test -z "$ac_aux_dir"; then
551 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
553 ac_config_guess=$ac_aux_dir/config.guess
554 ac_config_sub=$ac_aux_dir/config.sub
555 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
558 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
560 # Make sure we can run config.sub.
561 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
562 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
565 echo $ac_n "checking host system type""... $ac_c" 1>&6
566 echo "configure:567: checking host system type" >&5
569 case "$host_alias" in
573 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
574 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
576 *) host_alias=$nonopt ;;
580 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
581 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
582 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
583 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
584 echo "$ac_t""$host" 1>&6
586 system_name="$host_os"
588 system_name="`(uname -s -r) 2>/dev/null`"
589 if test -z "$system_name" ; then
590 system_name="`(hostname) 2>/dev/null`"
593 test -n "$system_name" && cat >> confdefs.h <<EOF
594 #define SYSTEM_NAME "$system_name"
597 if eval "test \"`echo '$''{'cf_cv_system_name'+set}'`\" = set"; then
598 echo $ac_n "(cached) $ac_c" 1>&6
600 cf_cv_system_name="$system_name"
604 test -z "$system_name" && system_name="$cf_cv_system_name"
605 test -n "$cf_cv_system_name" && echo "$ac_t""Configuring for $cf_cv_system_name" 1>&6
607 if test ".$system_name" != ".$cf_cv_system_name" ; then
608 echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6
609 { echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; }
613 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
614 echo "configure:615: checking whether ${MAKE-make} sets \${MAKE}" >&5
615 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
616 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
617 echo $ac_n "(cached) $ac_c" 1>&6
619 cat > conftestmake <<\EOF
621 @echo 'ac_maketemp="${MAKE}"'
623 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
624 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
625 if test -n "$ac_maketemp"; then
626 eval ac_cv_prog_make_${ac_make}_set=yes
628 eval ac_cv_prog_make_${ac_make}_set=no
632 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
633 echo "$ac_t""yes" 1>&6
636 echo "$ac_t""no" 1>&6
637 SET_MAKE="MAKE=${MAKE-make}"
640 # Extract the first word of "gcc", so it can be a program name with args.
641 set dummy gcc; ac_word=$2
642 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
643 echo "configure:644: checking for $ac_word" >&5
644 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
645 echo $ac_n "(cached) $ac_c" 1>&6
647 if test -n "$CC"; then
648 ac_cv_prog_CC="$CC" # Let the user override the test.
650 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
652 for ac_dir in $ac_dummy; do
653 test -z "$ac_dir" && ac_dir=.
654 if test -f $ac_dir/$ac_word; then
663 if test -n "$CC"; then
664 echo "$ac_t""$CC" 1>&6
666 echo "$ac_t""no" 1>&6
669 if test -z "$CC"; then
670 # Extract the first word of "cc", so it can be a program name with args.
671 set dummy cc; ac_word=$2
672 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
673 echo "configure:674: checking for $ac_word" >&5
674 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
675 echo $ac_n "(cached) $ac_c" 1>&6
677 if test -n "$CC"; then
678 ac_cv_prog_CC="$CC" # Let the user override the test.
680 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
683 for ac_dir in $ac_dummy; do
684 test -z "$ac_dir" && ac_dir=.
685 if test -f $ac_dir/$ac_word; then
686 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
695 if test $ac_prog_rejected = yes; then
696 # We found a bogon in the path, so make sure we never use it.
697 set dummy $ac_cv_prog_CC
699 if test $# -gt 0; then
700 # We chose a different compiler from the bogus one.
701 # However, it has the same basename, so the bogon will be chosen
702 # first if we set CC to just the basename; use the full file name.
704 set dummy "$ac_dir/$ac_word" "$@"
712 if test -n "$CC"; then
713 echo "$ac_t""$CC" 1>&6
715 echo "$ac_t""no" 1>&6
718 if test -z "$CC"; then
721 # Extract the first word of "cl", so it can be a program name with args.
722 set dummy cl; ac_word=$2
723 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
724 echo "configure:725: checking for $ac_word" >&5
725 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
726 echo $ac_n "(cached) $ac_c" 1>&6
728 if test -n "$CC"; then
729 ac_cv_prog_CC="$CC" # Let the user override the test.
731 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
733 for ac_dir in $ac_dummy; do
734 test -z "$ac_dir" && ac_dir=.
735 if test -f $ac_dir/$ac_word; then
744 if test -n "$CC"; then
745 echo "$ac_t""$CC" 1>&6
747 echo "$ac_t""no" 1>&6
752 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
755 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
756 echo "configure:757: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
759 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
760 ac_cpp='$CPP $CPPFLAGS'
761 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
762 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
763 cross_compiling=$ac_cv_prog_cc_cross
765 cat > conftest.$ac_ext << EOF
767 #line 768 "configure"
768 #include "confdefs.h"
772 if { (eval echo configure:773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
773 ac_cv_prog_cc_works=yes
774 # If we can't run a trivial program, we are probably using a cross compiler.
775 if (./conftest; exit) 2>/dev/null; then
776 ac_cv_prog_cc_cross=no
778 ac_cv_prog_cc_cross=yes
781 echo "configure: failed program was:" >&5
782 cat conftest.$ac_ext >&5
783 ac_cv_prog_cc_works=no
787 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
788 ac_cpp='$CPP $CPPFLAGS'
789 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
790 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
791 cross_compiling=$ac_cv_prog_cc_cross
793 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
794 if test $ac_cv_prog_cc_works = no; then
795 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
797 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
798 echo "configure:799: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
799 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
800 cross_compiling=$ac_cv_prog_cc_cross
802 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
803 echo "configure:804: checking whether we are using GNU C" >&5
804 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
805 echo $ac_n "(cached) $ac_c" 1>&6
807 cat > conftest.c <<EOF
812 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
819 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
821 if test $ac_cv_prog_gcc = yes; then
827 ac_test_CFLAGS="${CFLAGS+set}"
828 ac_save_CFLAGS="$CFLAGS"
830 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
831 echo "configure:832: checking whether ${CC-cc} accepts -g" >&5
832 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
833 echo $ac_n "(cached) $ac_c" 1>&6
835 echo 'void f(){}' > conftest.c
836 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
845 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
846 if test "$ac_test_CFLAGS" = set; then
847 CFLAGS="$ac_save_CFLAGS"
848 elif test $ac_cv_prog_cc_g = yes; then
849 if test "$GCC" = yes; then
855 if test "$GCC" = yes; then
862 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
863 echo "configure:864: checking how to run the C preprocessor" >&5
864 # On Suns, sometimes $CPP names a directory.
865 if test -n "$CPP" && test -d "$CPP"; then
868 if test -z "$CPP"; then
869 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
870 echo $ac_n "(cached) $ac_c" 1>&6
872 # This must be in double quotes, not single quotes, because CPP may get
873 # substituted into the Makefile and "${CC-cc}" will confuse make.
875 # On the NeXT, cc -E runs the code through the compiler's parser,
876 # not just through cpp.
877 cat > conftest.$ac_ext <<EOF
878 #line 879 "configure"
879 #include "confdefs.h"
883 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
884 { (eval echo configure:885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
885 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
886 if test -z "$ac_err"; then
890 echo "configure: failed program was:" >&5
891 cat conftest.$ac_ext >&5
893 CPP="${CC-cc} -E -traditional-cpp"
894 cat > conftest.$ac_ext <<EOF
895 #line 896 "configure"
896 #include "confdefs.h"
900 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
901 { (eval echo configure:902: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
902 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
903 if test -z "$ac_err"; then
907 echo "configure: failed program was:" >&5
908 cat conftest.$ac_ext >&5
910 CPP="${CC-cc} -nologo -E"
911 cat > conftest.$ac_ext <<EOF
912 #line 913 "configure"
913 #include "confdefs.h"
917 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
918 { (eval echo configure:919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
919 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
920 if test -z "$ac_err"; then
924 echo "configure: failed program was:" >&5
925 cat conftest.$ac_ext >&5
934 ac_cv_prog_CPP="$CPP"
936 CPP="$ac_cv_prog_CPP"
938 ac_cv_prog_CPP="$CPP"
940 echo "$ac_t""$CPP" 1>&6
942 for ac_prog in mawk gawk nawk awk
944 # Extract the first word of "$ac_prog", so it can be a program name with args.
945 set dummy $ac_prog; ac_word=$2
946 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
947 echo "configure:948: checking for $ac_word" >&5
948 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
949 echo $ac_n "(cached) $ac_c" 1>&6
951 if test -n "$AWK"; then
952 ac_cv_prog_AWK="$AWK" # Let the user override the test.
954 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
956 for ac_dir in $ac_dummy; do
957 test -z "$ac_dir" && ac_dir=.
958 if test -f $ac_dir/$ac_word; then
959 ac_cv_prog_AWK="$ac_prog"
966 AWK="$ac_cv_prog_AWK"
967 if test -n "$AWK"; then
968 echo "$ac_t""$AWK" 1>&6
970 echo "$ac_t""no" 1>&6
973 test -n "$AWK" && break
976 # Find a good install program. We prefer a C program (faster),
977 # so one script is as good as another. But avoid the broken or
978 # incompatible versions:
979 # SysV /etc/install, /usr/sbin/install
980 # SunOS /usr/etc/install
983 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
984 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
985 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
986 # ./install, which can be erroneously created by make from ./install.sh.
987 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
988 echo "configure:989: checking for a BSD compatible install" >&5
989 if test -z "$INSTALL"; then
990 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
991 echo $ac_n "(cached) $ac_c" 1>&6
993 IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
994 for ac_dir in $PATH; do
995 # Account for people who put trailing slashes in PATH elements.
997 /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
999 # OSF1 and SCO ODT 3.0 have their own names for install.
1000 # Don't use installbsd from OSF since it installs stuff as root
1002 for ac_prog in ginstall scoinst install; do
1003 if test -f $ac_dir/$ac_prog; then
1004 if test $ac_prog = install &&
1005 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1006 # AIX install. It has an incompatible calling convention.
1009 ac_cv_path_install="$ac_dir/$ac_prog -c"
1020 if test "${ac_cv_path_install+set}" = set; then
1021 INSTALL="$ac_cv_path_install"
1023 # As a last resort, use the slow shell script. We don't cache a
1024 # path for INSTALL within a source directory, because that will
1025 # break other packages using the cache if that directory is
1026 # removed, or if the path is relative.
1027 INSTALL="$ac_install_sh"
1030 echo "$ac_t""$INSTALL" 1>&6
1032 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1033 # It thinks the first close brace ends the variable substitution.
1034 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1036 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
1038 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1044 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
1045 test -z "$cf_dir" && cf_dir=.
1046 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
1050 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
1051 echo "configure:1052: checking whether ln -s works" >&5
1052 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
1053 echo $ac_n "(cached) $ac_c" 1>&6
1056 if ln -s X conftestdata 2>/dev/null
1059 ac_cv_prog_LN_S="ln -s"
1064 LN_S="$ac_cv_prog_LN_S"
1065 if test "$ac_cv_prog_LN_S" = "ln -s"; then
1066 echo "$ac_t""yes" 1>&6
1068 echo "$ac_t""no" 1>&6
1072 echo $ac_n "checking if filesystem supports mixed-case filenames""... $ac_c" 1>&6
1073 echo "configure:1074: checking if filesystem supports mixed-case filenames" >&5
1074 if eval "test \"`echo '$''{'cf_cv_mixedcase'+set}'`\" = set"; then
1075 echo $ac_n "(cached) $ac_c" 1>&6
1078 if test "$cross_compiling" = yes ; then
1079 case $target_alias in #(vi
1080 *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
1088 rm -f conftest CONFTEST
1090 if test -f CONFTEST ; then
1095 rm -f conftest CONFTEST
1100 echo "$ac_t""$cf_cv_mixedcase" 1>&6
1101 test "$cf_cv_mixedcase" = yes && cat >> confdefs.h <<\EOF
1102 #define MIXEDCASE_FILENAMES 1
1108 # Extract the first word of "ctags", so it can be a program name with args.
1109 set dummy ctags; ac_word=$2
1110 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1111 echo "configure:1112: checking for $ac_word" >&5
1112 if eval "test \"`echo '$''{'ac_cv_prog_MAKE_LOWER_TAGS'+set}'`\" = set"; then
1113 echo $ac_n "(cached) $ac_c" 1>&6
1115 if test -n "$MAKE_LOWER_TAGS"; then
1116 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
1118 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1120 for ac_dir in $ac_dummy; do
1121 test -z "$ac_dir" && ac_dir=.
1122 if test -f $ac_dir/$ac_word; then
1123 ac_cv_prog_MAKE_LOWER_TAGS="yes"
1128 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
1131 MAKE_LOWER_TAGS="$ac_cv_prog_MAKE_LOWER_TAGS"
1132 if test -n "$MAKE_LOWER_TAGS"; then
1133 echo "$ac_t""$MAKE_LOWER_TAGS" 1>&6
1135 echo "$ac_t""no" 1>&6
1139 if test "$cf_cv_mixedcase" = yes ; then
1140 # Extract the first word of "etags", so it can be a program name with args.
1141 set dummy etags; ac_word=$2
1142 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1143 echo "configure:1144: checking for $ac_word" >&5
1144 if eval "test \"`echo '$''{'ac_cv_prog_MAKE_UPPER_TAGS'+set}'`\" = set"; then
1145 echo $ac_n "(cached) $ac_c" 1>&6
1147 if test -n "$MAKE_UPPER_TAGS"; then
1148 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
1150 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1152 for ac_dir in $ac_dummy; do
1153 test -z "$ac_dir" && ac_dir=.
1154 if test -f $ac_dir/$ac_word; then
1155 ac_cv_prog_MAKE_UPPER_TAGS="yes"
1160 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
1163 MAKE_UPPER_TAGS="$ac_cv_prog_MAKE_UPPER_TAGS"
1164 if test -n "$MAKE_UPPER_TAGS"; then
1165 echo "$ac_t""$MAKE_UPPER_TAGS" 1>&6
1167 echo "$ac_t""no" 1>&6
1174 if test "$MAKE_UPPER_TAGS" = yes ; then
1181 if test "$MAKE_LOWER_TAGS" = yes ; then
1190 CC_SHARED_OPTS=unknown
1191 CPPFLAGS="$CPPFLAGS"
1194 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
1195 DFT_UPR_MODEL="NORMAL"
1196 ECHO_LINK='@ echo linking $@ ... ;'
1215 TINFO_ARGS='$(LIBS_CURSES)'
1216 cf_cv_abi_version=""
1217 cf_cv_rel_version=""
1225 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1226 echo "configure:1227: checking for Cygwin environment" >&5
1227 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1228 echo $ac_n "(cached) $ac_c" 1>&6
1230 cat > conftest.$ac_ext <<EOF
1231 #line 1232 "configure"
1232 #include "confdefs.h"
1237 #define __CYGWIN__ __CYGWIN32__
1242 if { (eval echo configure:1243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1246 echo "configure: failed program was:" >&5
1247 cat conftest.$ac_ext >&5
1255 echo "$ac_t""$ac_cv_cygwin" 1>&6
1257 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1258 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1259 echo "configure:1260: checking for mingw32 environment" >&5
1260 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1261 echo $ac_n "(cached) $ac_c" 1>&6
1263 cat > conftest.$ac_ext <<EOF
1264 #line 1265 "configure"
1265 #include "confdefs.h"
1271 if { (eval echo configure:1272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1275 echo "configure: failed program was:" >&5
1276 cat conftest.$ac_ext >&5
1284 echo "$ac_t""$ac_cv_mingw32" 1>&6
1286 test "$ac_cv_mingw32" = yes && MINGW32=yes
1289 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1290 echo "configure:1291: checking for executable suffix" >&5
1291 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1292 echo $ac_n "(cached) $ac_c" 1>&6
1294 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1298 echo 'int main () { return 0; }' > conftest.$ac_ext
1300 if { (eval echo configure:1301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1301 for file in conftest.*; do
1303 *.c | *.o | *.obj) ;;
1304 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1308 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1311 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1316 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1317 echo "$ac_t""${ac_cv_exeext}" 1>&6
1320 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1321 echo "configure:1322: checking for object suffix" >&5
1322 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1323 echo $ac_n "(cached) $ac_c" 1>&6
1326 echo 'int i = 1;' > conftest.$ac_ext
1327 if { (eval echo configure:1328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1328 for ac_file in conftest.*; do
1331 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1335 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1340 echo "$ac_t""$ac_cv_objext" 1>&6
1341 OBJEXT=$ac_cv_objext
1342 ac_objext=$ac_cv_objext
1346 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1347 echo "configure:1348: checking for ${CC-cc} option to accept ANSI C" >&5
1348 if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
1349 echo $ac_n "(cached) $ac_c" 1>&6
1353 cf_save_CFLAGS="$CFLAGS"
1354 cf_save_CPPFLAGS="$CPPFLAGS"
1355 # Don't try gcc -ansi; that turns off useful extensions and
1356 # breaks some systems' header files.
1357 # AIX -qlanglvl=ansi
1358 # Ultrix and OSF/1 -std1
1359 # HP-UX -Aa -D_HPUX_SOURCE
1361 # UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
1362 for cf_arg in "-DCC_HAS_PROTOS" \
1367 "-Aa -D_HPUX_SOURCE" \
1374 cf_new_extra_cppflags=
1376 for cf_add_cflags in $cf_arg
1378 case $cf_fix_cppflags in
1380 case $cf_add_cflags in #(vi
1381 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1382 case $cf_add_cflags in
1384 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1386 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1387 && test -z "${cf_tst_cflags}" \
1388 && cf_fix_cppflags=yes
1390 if test $cf_fix_cppflags = yes ; then
1391 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1393 elif test "${cf_tst_cflags}" = "\"'" ; then
1394 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1400 *$cf_add_cflags) #(vi
1403 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1408 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1413 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1415 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1417 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1418 && test -z "${cf_tst_cflags}" \
1419 && cf_fix_cppflags=no
1424 if test -n "$cf_new_cflags" ; then
1426 CFLAGS="$CFLAGS $cf_new_cflags"
1429 if test -n "$cf_new_cppflags" ; then
1431 CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
1434 if test -n "$cf_new_extra_cppflags" ; then
1436 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1442 cat > conftest.$ac_ext <<EOF
1443 #line 1444 "configure"
1444 #include "confdefs.h"
1446 #ifndef CC_HAS_PROTOS
1447 #if !defined(__STDC__) || (__STDC__ != 1)
1454 int test (int i, double x);
1455 struct s1 {int (*f) (int a);};
1456 struct s2 {int (*f) (double a);};
1459 if { (eval echo configure:1460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1461 cf_cv_ansi_cc="$cf_arg"; break
1463 echo "configure: failed program was:" >&5
1464 cat conftest.$ac_ext >&5
1468 CFLAGS="$cf_save_CFLAGS"
1469 CPPFLAGS="$cf_save_CPPFLAGS"
1473 echo "$ac_t""$cf_cv_ansi_cc" 1>&6
1475 if test "$cf_cv_ansi_cc" != "no"; then
1476 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
1481 cf_new_extra_cppflags=
1483 for cf_add_cflags in $cf_cv_ansi_cc
1485 case $cf_fix_cppflags in
1487 case $cf_add_cflags in #(vi
1488 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1489 case $cf_add_cflags in
1491 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1493 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1494 && test -z "${cf_tst_cflags}" \
1495 && cf_fix_cppflags=yes
1497 if test $cf_fix_cppflags = yes ; then
1498 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1500 elif test "${cf_tst_cflags}" = "\"'" ; then
1501 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1507 *$cf_add_cflags) #(vi
1510 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1515 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1520 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1522 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1524 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1525 && test -z "${cf_tst_cflags}" \
1526 && cf_fix_cppflags=no
1531 if test -n "$cf_new_cflags" ; then
1533 CFLAGS="$CFLAGS $cf_new_cflags"
1536 if test -n "$cf_new_cppflags" ; then
1538 CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
1541 if test -n "$cf_new_extra_cppflags" ; then
1543 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1550 cat >> confdefs.h <<\EOF
1551 #define CC_HAS_PROTOS 1
1558 if test "$cf_cv_ansi_cc" = "no"; then
1559 { echo "configure: error: Your compiler does not appear to recognize prototypes.
1560 You have the following choices:
1561 a. adjust your compiler options
1562 b. get an up-to-date compiler
1563 c. use a wrapper such as unproto" 1>&2; exit 1; }
1569 if test "$GCC" = yes ; then
1570 echo $ac_n "checking version of $CC""... $ac_c" 1>&6
1571 echo "configure:1572: checking version of $CC" >&5
1572 GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1573 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1574 echo "$ac_t""$GCC_VERSION" 1>&6
1578 if ( test "$GCC" = yes || test "$GXX" = yes )
1580 echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
1581 echo "configure:1582: checking if you want to turn on gcc warnings" >&5
1583 # Check whether --enable-warnings or --disable-warnings was given.
1584 if test "${enable_warnings+set}" = set; then
1585 enableval="$enable_warnings"
1586 test "$enableval" != yes && enableval=no
1587 if test "$enableval" != "no" ; then
1598 echo "$ac_t""$with_warnings" 1>&6
1599 if test "$with_warnings" = "yes"
1606 if test "$GCC" = yes ; then
1609 echo $ac_n "checking if this is really Intel C compiler""... $ac_c" 1>&6
1610 echo "configure:1611: checking if this is really Intel C compiler" >&5
1611 cf_save_CFLAGS="$CFLAGS"
1612 CFLAGS="$CFLAGS -no-gcc"
1613 cat > conftest.$ac_ext <<EOF
1614 #line 1615 "configure"
1615 #include "confdefs.h"
1619 #ifdef __INTEL_COMPILER
1626 if { (eval echo configure:1627: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1629 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
1632 echo "configure: failed program was:" >&5
1633 cat conftest.$ac_ext >&5
1636 CFLAGS="$cf_save_CFLAGS"
1637 echo "$ac_t""$INTEL_COMPILER" 1>&6
1643 cat > conftest.$ac_ext <<EOF
1644 #line 1645 "configure"
1645 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
1648 if test "$INTEL_COMPILER" = yes
1650 # The "-wdXXX" options suppress warnings:
1651 # remark #1419: external declaration in primary source file
1652 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
1653 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
1654 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
1655 # remark #193: zero used for undefined preprocessing identifier
1656 # remark #593: variable "curs_sb_left_arrow" was set but never used
1657 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
1658 # remark #869: parameter "tw" was never referenced
1659 # remark #981: operands are evaluated in unspecified order
1660 # warning #269: invalid format string conversion
1662 echo "checking for $CC warning options" 1>&6
1663 echo "configure:1664: checking for $CC warning options" >&5
1664 cf_save_CFLAGS="$CFLAGS"
1665 EXTRA_CFLAGS="-Wall"
1678 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
1679 if { (eval echo configure:1680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1680 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
1681 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
1684 CFLAGS="$cf_save_CFLAGS"
1686 elif test "$GCC" = yes
1688 echo "checking for $CC warning options" 1>&6
1689 echo "configure:1690: checking for $CC warning options" >&5
1690 cf_save_CFLAGS="$CFLAGS"
1691 EXTRA_CFLAGS="-W -Wall"
1693 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
1695 Wbad-function-cast \
1699 Wmissing-declarations \
1700 Wmissing-prototypes \
1704 Wstrict-prototypes \
1705 Wundef $cf_warn_CONST
1707 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
1708 if { (eval echo configure:1709: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1709 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
1710 case $cf_opt in #(vi
1712 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
1715 case $GCC_VERSION in
1717 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
1723 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
1726 CFLAGS="$cf_save_CFLAGS"
1736 if test "$GCC" = yes
1738 cat > conftest.i <<EOF
1740 #define GCC_PRINTF 0
1745 #ifndef GCC_NORETURN
1746 #define GCC_NORETURN /* nothing */
1749 #define GCC_UNUSED /* nothing */
1752 if test "$GCC" = yes
1754 echo "checking for $CC __attribute__ directives" 1>&6
1755 echo "configure:1756: checking for $CC __attribute__ directives" >&5
1756 cat > conftest.$ac_ext <<EOF
1757 #line 1758 "configure"
1758 #include "confdefs.h"
1759 #include "conftest.h"
1760 #include "conftest.i"
1762 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
1764 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
1767 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
1769 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
1771 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
1772 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
1773 extern void foo(void) GCC_NORETURN;
1774 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
1776 for cf_attribute in scanf printf unused noreturn
1779 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1781 cf_directive="__attribute__(($cf_attribute))"
1782 echo "checking for $CC $cf_directive" 1>&5
1783 case $cf_attribute in
1785 cat >conftest.h <<EOF
1786 #define GCC_$cf_ATTRIBUTE 1
1790 cat >conftest.h <<EOF
1791 #define GCC_$cf_ATTRIBUTE $cf_directive
1795 if { (eval echo configure:1796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1796 test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
1797 cat conftest.h >>confdefs.h
1801 fgrep define conftest.i >>confdefs.h
1807 echo $ac_n "checking if $CC -U and -D options work together""... $ac_c" 1>&6
1808 echo "configure:1809: checking if $CC -U and -D options work together" >&5
1809 if eval "test \"`echo '$''{'cf_cv_cc_u_d_options'+set}'`\" = set"; then
1810 echo $ac_n "(cached) $ac_c" 1>&6
1813 cf_save_CPPFLAGS="$CPPFLAGS"
1814 CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
1815 cat > conftest.$ac_ext <<EOF
1816 #line 1817 "configure"
1817 #include "confdefs.h"
1822 make an undefined-error
1825 make a defined-error
1830 if { (eval echo configure:1831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1833 cf_cv_cc_u_d_options=yes
1835 echo "configure: failed program was:" >&5
1836 cat conftest.$ac_ext >&5
1839 cf_cv_cc_u_d_options=no
1842 CPPFLAGS="$cf_save_CPPFLAGS"
1846 echo "$ac_t""$cf_cv_cc_u_d_options" 1>&6
1853 cf_POSIX_C_SOURCE=199506L
1855 case $host_os in #(vi
1857 CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
1860 # 5.x headers associate
1861 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
1862 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
1863 cf_POSIX_C_SOURCE=200112L
1865 CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1868 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
1871 CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
1875 echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
1876 echo "configure:1877: checking if we must define _GNU_SOURCE" >&5
1877 if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
1878 echo $ac_n "(cached) $ac_c" 1>&6
1881 cat > conftest.$ac_ext <<EOF
1882 #line 1883 "configure"
1883 #include "confdefs.h"
1884 #include <sys/types.h>
1887 #ifndef _XOPEN_SOURCE
1892 if { (eval echo configure:1893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1896 echo "configure: failed program was:" >&5
1897 cat conftest.$ac_ext >&5
1900 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1901 cat > conftest.$ac_ext <<EOF
1902 #line 1903 "configure"
1903 #include "confdefs.h"
1904 #include <sys/types.h>
1907 #ifdef _XOPEN_SOURCE
1912 if { (eval echo configure:1913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1916 echo "configure: failed program was:" >&5
1917 cat conftest.$ac_ext >&5
1919 cf_cv_gnu_source=yes
1929 echo "$ac_t""$cf_cv_gnu_source" 1>&6
1930 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1934 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
1937 # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
1940 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
1943 CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
1946 CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
1949 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
1952 CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
1955 echo $ac_n "checking if we should define _XOPEN_SOURCE""... $ac_c" 1>&6
1956 echo "configure:1957: checking if we should define _XOPEN_SOURCE" >&5
1957 if eval "test \"`echo '$''{'cf_cv_xopen_source'+set}'`\" = set"; then
1958 echo $ac_n "(cached) $ac_c" 1>&6
1961 cat > conftest.$ac_ext <<EOF
1962 #line 1963 "configure"
1963 #include "confdefs.h"
1964 #include <sys/types.h>
1967 #ifndef _XOPEN_SOURCE
1972 if { (eval echo configure:1973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1974 cf_cv_xopen_source=no
1976 echo "configure: failed program was:" >&5
1977 cat conftest.$ac_ext >&5
1980 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1981 cat > conftest.$ac_ext <<EOF
1982 #line 1983 "configure"
1983 #include "confdefs.h"
1984 #include <sys/types.h>
1987 #ifdef _XOPEN_SOURCE
1992 if { (eval echo configure:1993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1994 cf_cv_xopen_source=no
1996 echo "configure: failed program was:" >&5
1997 cat conftest.$ac_ext >&5
1999 cf_cv_xopen_source=$cf_XOPEN_SOURCE
2009 echo "$ac_t""$cf_cv_xopen_source" 1>&6
2010 if test "$cf_cv_xopen_source" != no ; then
2012 # remove _XOPEN_SOURCE symbol from $CFLAGS
2013 CFLAGS=`echo "$CFLAGS" | \
2014 sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
2015 -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
2018 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
2019 CPPFLAGS=`echo "$CPPFLAGS" | \
2020 sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
2021 -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
2023 test "$cf_cv_cc_u_d_options" = yes && \
2024 CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
2025 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
2028 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
2030 cf_save_CFLAGS="$CFLAGS"
2031 cf_save_CPPFLAGS="$CPPFLAGS"
2034 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
2035 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
2036 sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
2037 -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
2040 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
2041 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
2042 sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
2043 -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
2046 echo $ac_n "checking if we should define _POSIX_C_SOURCE""... $ac_c" 1>&6
2047 echo "configure:2048: checking if we should define _POSIX_C_SOURCE" >&5
2048 if eval "test \"`echo '$''{'cf_cv_posix_c_source'+set}'`\" = set"; then
2049 echo $ac_n "(cached) $ac_c" 1>&6
2053 echo "(line 2054) testing if the symbol is already defined go no further ..." 1>&5
2055 cat > conftest.$ac_ext <<EOF
2056 #line 2057 "configure"
2057 #include "confdefs.h"
2058 #include <sys/types.h>
2061 #ifndef _POSIX_C_SOURCE
2066 if { (eval echo configure:2067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2068 cf_cv_posix_c_source=no
2070 echo "configure: failed program was:" >&5
2071 cat conftest.$ac_ext >&5
2073 cf_want_posix_source=no
2074 case .$cf_POSIX_C_SOURCE in #(vi
2076 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2079 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2080 cf_want_posix_source=yes
2083 cf_want_posix_source=yes
2086 if test "$cf_want_posix_source" = yes ; then
2087 cat > conftest.$ac_ext <<EOF
2088 #line 2089 "configure"
2089 #include "confdefs.h"
2090 #include <sys/types.h>
2093 #ifdef _POSIX_SOURCE
2098 if { (eval echo configure:2099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2101 echo "configure: failed program was:" >&5
2102 cat conftest.$ac_ext >&5
2104 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
2109 echo "(line 2110) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
2111 CFLAGS="$cf_trim_CFLAGS"
2112 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
2114 echo "(line 2115) testing if the second compile does not leave our definition intact error ..." 1>&5
2116 cat > conftest.$ac_ext <<EOF
2117 #line 2118 "configure"
2118 #include "confdefs.h"
2119 #include <sys/types.h>
2122 #ifndef _POSIX_C_SOURCE
2127 if { (eval echo configure:2128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2130 echo "configure: failed program was:" >&5
2131 cat conftest.$ac_ext >&5
2133 cf_cv_posix_c_source=no
2136 CFLAGS="$cf_save_CFLAGS"
2137 CPPFLAGS="$cf_save_CPPFLAGS"
2144 echo "$ac_t""$cf_cv_posix_c_source" 1>&6
2146 if test "$cf_cv_posix_c_source" != no ; then
2147 CFLAGS="$cf_trim_CFLAGS"
2148 CPPFLAGS="$cf_trim_CPPFLAGS"
2149 if test "$cf_cv_cc_u_d_options" = yes ; then
2150 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
2151 sed -e 's/-D/-U/g' -e 's/=[^ ]*//g'`
2152 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
2154 CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
2164 # Check whether --with-curses-dir or --without-curses-dir was given.
2165 if test "${with_curses_dir+set}" = set; then
2166 withval="$with_curses_dir"
2168 if test "x$prefix" != xNONE; then
2169 cf_path_syntax="$prefix"
2171 cf_path_syntax="$ac_default_prefix"
2174 case ".$withval" in #(vi
2175 .\$\(*\)*|.\'*\'*) #(vi
2179 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2182 eval withval="$withval"
2183 case ".$withval" in #(vi
2185 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2190 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2193 { echo "configure: error: expected a pathname, not \"$withval\"" 1>&2; exit 1; }
2197 cf_cv_curses_dir=$withval
2205 # Check whether --with-5lib or --without-5lib was given.
2206 if test "${with_5lib+set}" = set; then
2207 withval="$with_5lib"
2208 LIBS="-L/usr/5lib $LIBS"
2209 CPPFLAGS="$CPPFLAGS -I/usr/5include"
2214 # Check whether --with-ncursesw or --without-ncursesw was given.
2215 if test "${with_ncursesw+set}" = set; then
2216 withval="$with_ncursesw"
2217 cf_cv_screen=ncursesw
2222 # Check whether --with-ncurses or --without-ncurses was given.
2223 if test "${with_ncurses+set}" = set; then
2224 withval="$with_ncurses"
2225 cf_cv_screen=ncurses
2230 # Check whether --with-pdcurses or --without-pdcurses was given.
2231 if test "${with_pdcurses+set}" = set; then
2232 withval="$with_pdcurses"
2233 cf_cv_screen=pdcurses
2241 case $cf_cv_screen in
2245 echo $ac_n "checking for extra include directories""... $ac_c" 1>&6
2246 echo "configure:2247: checking for extra include directories" >&5
2247 if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then
2248 echo $ac_n "(cached) $ac_c" 1>&6
2251 cf_cv_curses_incdir=no
2252 case $host_os in #(vi
2254 test -d /usr/include/curses_colr && \
2255 cf_cv_curses_incdir="-I/usr/include/curses_colr"
2258 test -d /usr/5lib && \
2259 test -d /usr/5include && \
2260 cf_cv_curses_incdir="-I/usr/5include"
2266 echo "$ac_t""$cf_cv_curses_incdir" 1>&6
2267 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$cf_cv_curses_incdir $CPPFLAGS"
2270 echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
2271 echo "configure:2272: checking if we have identified curses headers" >&5
2272 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
2273 echo $ac_n "(cached) $ac_c" 1>&6
2276 cf_cv_ncurses_header=none
2283 cat > conftest.$ac_ext <<EOF
2284 #line 2285 "configure"
2285 #include "confdefs.h"
2286 #include <${cf_header}>
2288 initscr(); tgoto("?", 0,0)
2291 if { (eval echo configure:2292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2293 cf_cv_ncurses_header=$cf_header; break
2295 echo "configure: failed program was:" >&5
2296 cat conftest.$ac_ext >&5
2303 echo "$ac_t""$cf_cv_ncurses_header" 1>&6
2305 if test "$cf_cv_ncurses_header" = none ; then
2306 { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
2309 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
2310 for ac_hdr in $cf_cv_ncurses_header
2312 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2313 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2314 echo "configure:2315: checking for $ac_hdr" >&5
2315 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2316 echo $ac_n "(cached) $ac_c" 1>&6
2318 cat > conftest.$ac_ext <<EOF
2319 #line 2320 "configure"
2320 #include "confdefs.h"
2323 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2324 { (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2325 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2326 if test -z "$ac_err"; then
2328 eval "ac_cv_header_$ac_safe=yes"
2331 echo "configure: failed program was:" >&5
2332 cat conftest.$ac_ext >&5
2334 eval "ac_cv_header_$ac_safe=no"
2338 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2339 echo "$ac_t""yes" 1>&6
2340 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2341 cat >> confdefs.h <<EOF
2342 #define $ac_tr_hdr 1
2346 echo "$ac_t""no" 1>&6
2352 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
2353 echo "configure:2354: checking for terminfo header" >&5
2354 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
2355 echo $ac_n "(cached) $ac_c" 1>&6
2358 case ${cf_cv_ncurses_header} in #(vi
2359 */ncurses.h|*/ncursesw.h) #(vi
2360 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
2363 cf_term_header=term.h
2367 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
2369 cat > conftest.$ac_ext <<EOF
2370 #line 2371 "configure"
2371 #include "confdefs.h"
2373 #include <${cf_cv_ncurses_header-curses.h}>
2377 int x = auto_left_margin
2380 if { (eval echo configure:2381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2383 cf_cv_term_header="$cf_test"
2385 echo "configure: failed program was:" >&5
2386 cat conftest.$ac_ext >&5
2389 cf_cv_term_header=unknown
2393 test "$cf_cv_term_header" != unknown && break
2398 echo "$ac_t""$cf_cv_term_header" 1>&6
2400 # Set definitions to allow ifdef'ing to accommodate subdirectories
2402 case $cf_cv_term_header in # (vi
2404 cat >> confdefs.h <<\EOF
2405 #define HAVE_TERM_H 1
2411 case $cf_cv_term_header in # (vi
2412 ncurses/term.h) #(vi
2413 cat >> confdefs.h <<\EOF
2414 #define HAVE_NCURSES_TERM_H 1
2419 cat >> confdefs.h <<\EOF
2420 #define HAVE_NCURSESW_TERM_H 1
2428 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
2429 echo "configure:2430: checking for ncurses version" >&5
2430 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
2431 echo $ac_n "(cached) $ac_c" 1>&6
2434 cf_cv_ncurses_version=no
2437 if test "$cross_compiling" = yes; then
2440 # This will not work if the preprocessor splits the line after the
2441 # Autoconf token. The 'unproto' program does that.
2442 cat > conftest.$ac_ext <<EOF
2443 #include <${cf_cv_ncurses_header-curses.h}>
2445 #ifdef NCURSES_VERSION
2446 Autoconf NCURSES_VERSION
2454 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
2455 { (eval echo configure:2456: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
2456 if test -f conftest.out ; then
2457 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
2458 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
2463 cat > conftest.$ac_ext <<EOF
2464 #line 2465 "configure"
2465 #include "confdefs.h"
2467 #include <${cf_cv_ncurses_header-curses.h}>
2471 FILE *fp = fopen("$cf_tempfile", "w");
2472 #ifdef NCURSES_VERSION
2473 # ifdef NCURSES_VERSION_PATCH
2474 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
2476 fprintf(fp, "%s\n", NCURSES_VERSION);
2480 fprintf(fp, "old\n");
2488 if { (eval echo configure:2489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2491 cf_cv_ncurses_version=`cat $cf_tempfile`
2493 echo "configure: failed program was:" >&5
2494 cat conftest.$ac_ext >&5
2503 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
2504 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
2511 echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
2512 echo "configure:2513: checking if we have identified curses libraries" >&5
2513 cat > conftest.$ac_ext <<EOF
2514 #line 2515 "configure"
2515 #include "confdefs.h"
2516 #include <${cf_cv_ncurses_header-curses.h}>
2518 initscr(); tgoto("?", 0,0)
2521 if { (eval echo configure:2522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2525 echo "configure: failed program was:" >&5
2526 cat conftest.$ac_ext >&5
2531 echo "$ac_t""$cf_result" 1>&6
2533 if test "$cf_result" = no ; then
2534 case $host_os in #(vi
2536 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
2537 echo "configure:2538: checking for tgoto in -lmytinfo" >&5
2538 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
2539 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2540 echo $ac_n "(cached) $ac_c" 1>&6
2542 ac_save_LIBS="$LIBS"
2543 LIBS="-lmytinfo $LIBS"
2544 cat > conftest.$ac_ext <<EOF
2545 #line 2546 "configure"
2546 #include "confdefs.h"
2547 /* Override any gcc2 internal prototype to avoid an error. */
2548 /* We use char because int might match the return type of a gcc2
2549 builtin and then its argument prototype would still apply. */
2556 if { (eval echo configure:2557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2558 eval "ac_cv_lib_$ac_lib_var=yes"
2560 echo "configure: failed program was:" >&5
2561 cat conftest.$ac_ext >&5
2563 eval "ac_cv_lib_$ac_lib_var=no"
2566 LIBS="$ac_save_LIBS"
2569 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2570 echo "$ac_t""yes" 1>&6
2571 LIBS="-lmytinfo $LIBS"
2573 echo "$ac_t""no" 1>&6
2578 echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
2579 echo "configure:2580: checking for initscr in -lcur_colr" >&5
2580 ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
2581 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2582 echo $ac_n "(cached) $ac_c" 1>&6
2584 ac_save_LIBS="$LIBS"
2585 LIBS="-lcur_colr $LIBS"
2586 cat > conftest.$ac_ext <<EOF
2587 #line 2588 "configure"
2588 #include "confdefs.h"
2589 /* Override any gcc2 internal prototype to avoid an error. */
2590 /* We use char because int might match the return type of a gcc2
2591 builtin and then its argument prototype would still apply. */
2598 if { (eval echo configure:2599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2600 eval "ac_cv_lib_$ac_lib_var=yes"
2602 echo "configure: failed program was:" >&5
2603 cat conftest.$ac_ext >&5
2605 eval "ac_cv_lib_$ac_lib_var=no"
2608 LIBS="$ac_save_LIBS"
2611 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2612 echo "$ac_t""yes" 1>&6
2614 LIBS="-lcur_colr $LIBS"
2615 ac_cv_func_initscr=yes
2618 echo "$ac_t""no" 1>&6
2620 echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
2621 echo "configure:2622: checking for initscr in -lHcurses" >&5
2622 ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
2623 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2624 echo $ac_n "(cached) $ac_c" 1>&6
2626 ac_save_LIBS="$LIBS"
2627 LIBS="-lHcurses $LIBS"
2628 cat > conftest.$ac_ext <<EOF
2629 #line 2630 "configure"
2630 #include "confdefs.h"
2631 /* Override any gcc2 internal prototype to avoid an error. */
2632 /* We use char because int might match the return type of a gcc2
2633 builtin and then its argument prototype would still apply. */
2640 if { (eval echo configure:2641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2642 eval "ac_cv_lib_$ac_lib_var=yes"
2644 echo "configure: failed program was:" >&5
2645 cat conftest.$ac_ext >&5
2647 eval "ac_cv_lib_$ac_lib_var=no"
2650 LIBS="$ac_save_LIBS"
2653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2654 echo "$ac_t""yes" 1>&6
2656 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
2657 LIBS="-lHcurses $LIBS"
2658 CPPFLAGS="-D__HP_CURSES -D_HP_CURSES $CPPFLAGS"
2659 ac_cv_func_initscr=yes
2662 echo "$ac_t""no" 1>&6
2668 linux*) # Suse Linux does not follow /usr/lib convention
2672 test -d /usr/5lib && \
2673 LIBS="$LIBS -L/usr/5lib -lcurses -ltermcap"
2674 ac_cv_func_initscr=yes
2678 if test ".$ac_cv_func_initscr" != .yes ; then
2679 cf_save_LIBS="$LIBS"
2683 if test ".${cf_cv_ncurses_version-no}" != .no
2685 cf_check_list="ncurses curses cursesX"
2687 cf_check_list="cursesX curses ncurses"
2690 # Check for library containing tgoto. Do this before curses library
2691 # because it may be needed to link the test-case for initscr.
2692 echo $ac_n "checking for tgoto""... $ac_c" 1>&6
2693 echo "configure:2694: checking for tgoto" >&5
2694 if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
2695 echo $ac_n "(cached) $ac_c" 1>&6
2697 cat > conftest.$ac_ext <<EOF
2698 #line 2699 "configure"
2699 #include "confdefs.h"
2700 /* System header to define __stub macros and hopefully few prototypes,
2701 which can conflict with char tgoto(); below. */
2703 /* Override any gcc2 internal prototype to avoid an error. */
2704 /* We use char because int might match the return type of a gcc2
2705 builtin and then its argument prototype would still apply. */
2710 /* The GNU C library defines this for functions which it implements
2711 to always fail with ENOSYS. Some functions are actually named
2712 something starting with __ and the normal name is an alias. */
2713 #if defined (__stub_tgoto) || defined (__stub___tgoto)
2721 if { (eval echo configure:2722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2723 eval "ac_cv_func_tgoto=yes"
2725 echo "configure: failed program was:" >&5
2726 cat conftest.$ac_ext >&5
2728 eval "ac_cv_func_tgoto=no"
2733 if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then
2734 echo "$ac_t""yes" 1>&6
2735 cf_term_lib=predefined
2737 echo "$ac_t""no" 1>&6
2739 for cf_term_lib in $cf_check_list termcap termlib unknown
2741 echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
2742 echo "configure:2743: checking for tgoto in -l$cf_term_lib" >&5
2743 ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
2744 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2745 echo $ac_n "(cached) $ac_c" 1>&6
2747 ac_save_LIBS="$LIBS"
2748 LIBS="-l$cf_term_lib $LIBS"
2749 cat > conftest.$ac_ext <<EOF
2750 #line 2751 "configure"
2751 #include "confdefs.h"
2752 /* Override any gcc2 internal prototype to avoid an error. */
2753 /* We use char because int might match the return type of a gcc2
2754 builtin and then its argument prototype would still apply. */
2761 if { (eval echo configure:2762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2763 eval "ac_cv_lib_$ac_lib_var=yes"
2765 echo "configure: failed program was:" >&5
2766 cat conftest.$ac_ext >&5
2768 eval "ac_cv_lib_$ac_lib_var=no"
2771 LIBS="$ac_save_LIBS"
2774 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2775 echo "$ac_t""yes" 1>&6
2778 echo "$ac_t""no" 1>&6
2786 # Check for library containing initscr
2787 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
2788 for cf_curs_lib in $cf_check_list xcurses jcurses unknown
2790 echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
2791 echo "configure:2792: checking for initscr in -l$cf_curs_lib" >&5
2792 ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
2793 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2794 echo $ac_n "(cached) $ac_c" 1>&6
2796 ac_save_LIBS="$LIBS"
2797 LIBS="-l$cf_curs_lib $LIBS"
2798 cat > conftest.$ac_ext <<EOF
2799 #line 2800 "configure"
2800 #include "confdefs.h"
2801 /* Override any gcc2 internal prototype to avoid an error. */
2802 /* We use char because int might match the return type of a gcc2
2803 builtin and then its argument prototype would still apply. */
2810 if { (eval echo configure:2811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2812 eval "ac_cv_lib_$ac_lib_var=yes"
2814 echo "configure: failed program was:" >&5
2815 cat conftest.$ac_ext >&5
2817 eval "ac_cv_lib_$ac_lib_var=no"
2820 LIBS="$ac_save_LIBS"
2823 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2824 echo "$ac_t""yes" 1>&6
2827 echo "$ac_t""no" 1>&6
2831 test $cf_curs_lib = unknown && { echo "configure: error: no curses library found" 1>&2; exit 1; }
2833 LIBS="-l$cf_curs_lib $cf_save_LIBS"
2834 if test "$cf_term_lib" = unknown ; then
2835 echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
2836 echo "configure:2837: checking if we can link with $cf_curs_lib library" >&5
2837 cat > conftest.$ac_ext <<EOF
2838 #line 2839 "configure"
2839 #include "confdefs.h"
2840 #include <${cf_cv_ncurses_header-curses.h}>
2845 if { (eval echo configure:2846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2849 echo "configure: failed program was:" >&5
2850 cat conftest.$ac_ext >&5
2855 echo "$ac_t""$cf_result" 1>&6
2856 test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; }
2857 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
2859 elif test "$cf_term_lib" != predefined ; then
2860 echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
2861 echo "configure:2862: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
2862 cat > conftest.$ac_ext <<EOF
2863 #line 2864 "configure"
2864 #include "confdefs.h"
2865 #include <${cf_cv_ncurses_header-curses.h}>
2867 initscr(); tgoto((char *)0, 0, 0);
2870 if { (eval echo configure:2871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2874 echo "configure: failed program was:" >&5
2875 cat conftest.$ac_ext >&5
2878 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
2879 cat > conftest.$ac_ext <<EOF
2880 #line 2881 "configure"
2881 #include "confdefs.h"
2882 #include <${cf_cv_ncurses_header-curses.h}>
2887 if { (eval echo configure:2888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2891 echo "configure: failed program was:" >&5
2892 cat conftest.$ac_ext >&5
2900 echo "$ac_t""$cf_result" 1>&6
2910 cf_ncuhdr_root=ncurses
2912 test -n "$cf_cv_curses_dir" && \
2913 test "$cf_cv_curses_dir" != "no" && \
2914 CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
2916 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
2917 echo "configure:2918: checking for $cf_ncuhdr_root header in include-path" >&5
2918 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
2919 echo $ac_n "(cached) $ac_c" 1>&6
2922 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
2923 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
2924 for cf_header in $cf_header_list
2927 cat > conftest.$ac_ext <<EOF
2928 #line 2929 "configure"
2929 #include "confdefs.h"
2932 #include <$cf_header>
2935 #ifdef NCURSES_VERSION
2937 printf("%s\n", NCURSES_VERSION);
2949 if { (eval echo configure:2950: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2951 cf_cv_ncurses_h=$cf_header
2954 echo "configure: failed program was:" >&5
2955 cat conftest.$ac_ext >&5
2961 test "$cf_cv_ncurses_h" != no && break
2966 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
2970 if test "$cf_cv_ncurses_h" != no ; then
2971 cf_cv_ncurses_header=$cf_cv_ncurses_h
2974 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
2975 echo "configure:2976: checking for $cf_ncuhdr_root include-path" >&5
2976 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
2977 echo $ac_n "(cached) $ac_c" 1>&6
2980 test -n "$verbose" && echo
2983 test -d "$HOME" && {
2984 test -n "$verbose" && echo " ... testing include-directories under $HOME"
2985 test -d "$HOME/include" && cf_search="$cf_search $HOME/include"
2986 test -d "$HOME/include/$cf_ncuhdr_root" && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
2987 test -d "$HOME/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
2990 # For other stuff under the home directory, it should be sufficient to put
2991 # a symbolic link for $HOME/$cf_ncuhdr_root to the actual package location:
2992 test -d "$HOME/$cf_ncuhdr_root" && {
2993 test -n "$verbose" && echo " ... testing include-directories under $HOME/$cf_ncuhdr_root"
2994 test -d "$HOME/$cf_ncuhdr_root/include" && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
2995 test -d "$HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
2998 test "$prefix" != /usr/local && \
2999 test -d /usr/local && {
3000 test -n "$verbose" && echo " ... testing include-directories under /usr/local"
3001 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
3002 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
3003 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
3004 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
3005 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3008 test "$prefix" != NONE && \
3009 test -d $prefix && {
3010 test -n "$verbose" && echo " ... testing include-directories under $prefix"
3011 test -d $prefix/include && cf_search="$cf_search $prefix/include"
3012 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
3013 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
3014 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
3015 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3018 test "$prefix" != /opt && \
3020 test -n "$verbose" && echo " ... testing include-directories under /opt"
3021 test -d /opt/include && cf_search="$cf_search /opt/include"
3022 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
3023 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
3024 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
3025 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3028 test "$prefix" != /usr && \
3030 test -n "$verbose" && echo " ... testing include-directories under /usr"
3031 test -d /usr/include && cf_search="$cf_search /usr/include"
3032 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
3033 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
3034 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
3037 test "$includedir" != NONE && \
3038 test "$includedir" != "/usr/include" && \
3039 test -d "$includedir" && {
3040 test -d $includedir && cf_search="$cf_search $includedir"
3041 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
3044 test "$oldincludedir" != NONE && \
3045 test "$oldincludedir" != "/usr/include" && \
3046 test -d "$oldincludedir" && {
3047 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
3048 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
3052 test -n "$verbose" && echo search path $cf_search
3053 cf_save2_CPPFLAGS="$CPPFLAGS"
3054 for cf_incdir in $cf_search
3057 for cf_add_incdir in $cf_incdir
3061 case $cf_add_incdir in
3064 /usr/local/include) # (vi
3065 if test "$GCC" = yes
3067 cf_save_CPPFLAGS="$CPPFLAGS"
3068 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3069 cat > conftest.$ac_ext <<EOF
3070 #line 3071 "configure"
3071 #include "confdefs.h"
3077 if { (eval echo configure:3078: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3080 echo "configure: failed program was:" >&5
3081 cat conftest.$ac_ext >&5
3083 CPPFLAGS="$cf_save_CPPFLAGS"
3089 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3092 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3093 test "$cf_top_incdir" = "$cf_add_incdir" && break
3094 cf_add_incdir="$cf_top_incdir"
3103 cat > conftest.$ac_ext <<EOF
3104 #line 3105 "configure"
3105 #include "confdefs.h"
3108 #include <$cf_header>
3111 #ifdef NCURSES_VERSION
3113 printf("%s\n", NCURSES_VERSION);
3125 if { (eval echo configure:3126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3127 cf_cv_ncurses_h2=$cf_header
3130 echo "configure: failed program was:" >&5
3131 cat conftest.$ac_ext >&5
3137 if test "$cf_cv_ncurses_h2" != no ; then
3138 cf_cv_ncurses_h2=$cf_incdir/$cf_header
3139 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
3142 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
3144 CPPFLAGS="$cf_save2_CPPFLAGS"
3145 test "$cf_cv_ncurses_h2" != no && break
3147 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
3151 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
3153 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
3154 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
3155 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
3156 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
3159 for cf_add_incdir in $cf_1st_incdir
3163 case $cf_add_incdir in
3166 /usr/local/include) # (vi
3167 if test "$GCC" = yes
3169 cf_save_CPPFLAGS="$CPPFLAGS"
3170 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3171 cat > conftest.$ac_ext <<EOF
3172 #line 3173 "configure"
3173 #include "confdefs.h"
3179 if { (eval echo configure:3180: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3182 echo "configure: failed program was:" >&5
3183 cat conftest.$ac_ext >&5
3185 CPPFLAGS="$cf_save_CPPFLAGS"
3191 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3194 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3195 test "$cf_top_incdir" = "$cf_add_incdir" && break
3196 cf_add_incdir="$cf_top_incdir"
3203 # Set definitions to allow ifdef'ing for ncurses.h
3205 case $cf_cv_ncurses_header in # (vi
3207 cat >> confdefs.h <<\EOF
3208 #define HAVE_NCURSES_H 1
3214 case $cf_cv_ncurses_header in # (vi
3215 ncurses/curses.h|ncurses/ncurses.h)
3216 cat >> confdefs.h <<\EOF
3217 #define HAVE_NCURSES_NCURSES_H 1
3221 ncursesw/curses.h|ncursesw/ncurses.h)
3222 cat >> confdefs.h <<\EOF
3223 #define HAVE_NCURSESW_NCURSES_H 1
3231 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
3232 echo "configure:3233: checking for terminfo header" >&5
3233 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
3234 echo $ac_n "(cached) $ac_c" 1>&6
3237 case ${cf_cv_ncurses_header} in #(vi
3238 */ncurses.h|*/ncursesw.h) #(vi
3239 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
3242 cf_term_header=term.h
3246 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
3248 cat > conftest.$ac_ext <<EOF
3249 #line 3250 "configure"
3250 #include "confdefs.h"
3252 #include <${cf_cv_ncurses_header-curses.h}>
3256 int x = auto_left_margin
3259 if { (eval echo configure:3260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3262 cf_cv_term_header="$cf_test"
3264 echo "configure: failed program was:" >&5
3265 cat conftest.$ac_ext >&5
3268 cf_cv_term_header=unknown
3272 test "$cf_cv_term_header" != unknown && break
3277 echo "$ac_t""$cf_cv_term_header" 1>&6
3279 # Set definitions to allow ifdef'ing to accommodate subdirectories
3281 case $cf_cv_term_header in # (vi
3283 cat >> confdefs.h <<\EOF
3284 #define HAVE_TERM_H 1
3290 case $cf_cv_term_header in # (vi
3291 ncurses/term.h) #(vi
3292 cat >> confdefs.h <<\EOF
3293 #define HAVE_NCURSES_TERM_H 1
3298 cat >> confdefs.h <<\EOF
3299 #define HAVE_NCURSESW_TERM_H 1
3306 # some applications need this, but should check for NCURSES_VERSION
3307 cat >> confdefs.h <<\EOF
3313 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
3314 echo "configure:3315: checking for ncurses version" >&5
3315 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
3316 echo $ac_n "(cached) $ac_c" 1>&6
3319 cf_cv_ncurses_version=no
3322 if test "$cross_compiling" = yes; then
3325 # This will not work if the preprocessor splits the line after the
3326 # Autoconf token. The 'unproto' program does that.
3327 cat > conftest.$ac_ext <<EOF
3328 #include <${cf_cv_ncurses_header-curses.h}>
3330 #ifdef NCURSES_VERSION
3331 Autoconf NCURSES_VERSION
3339 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
3340 { (eval echo configure:3341: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
3341 if test -f conftest.out ; then
3342 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
3343 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
3348 cat > conftest.$ac_ext <<EOF
3349 #line 3350 "configure"
3350 #include "confdefs.h"
3352 #include <${cf_cv_ncurses_header-curses.h}>
3356 FILE *fp = fopen("$cf_tempfile", "w");
3357 #ifdef NCURSES_VERSION
3358 # ifdef NCURSES_VERSION_PATCH
3359 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
3361 fprintf(fp, "%s\n", NCURSES_VERSION);
3365 fprintf(fp, "old\n");
3373 if { (eval echo configure:3374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3376 cf_cv_ncurses_version=`cat $cf_tempfile`
3378 echo "configure: failed program was:" >&5
3379 cat conftest.$ac_ext >&5
3388 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
3389 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
3397 cf_nculib_root=ncurses
3398 # This works, except for the special case where we find gpm, but
3399 # ncurses is in a nonstandard location via $LIBS, and we really want
3402 cf_ncurses_SAVE="$LIBS"
3403 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
3404 echo "configure:3405: checking for Gpm_Open in -lgpm" >&5
3405 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
3406 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3407 echo $ac_n "(cached) $ac_c" 1>&6
3409 ac_save_LIBS="$LIBS"
3411 cat > conftest.$ac_ext <<EOF
3412 #line 3413 "configure"
3413 #include "confdefs.h"
3414 /* Override any gcc2 internal prototype to avoid an error. */
3415 /* We use char because int might match the return type of a gcc2
3416 builtin and then its argument prototype would still apply. */
3423 if { (eval echo configure:3424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3425 eval "ac_cv_lib_$ac_lib_var=yes"
3427 echo "configure: failed program was:" >&5
3428 cat conftest.$ac_ext >&5
3430 eval "ac_cv_lib_$ac_lib_var=no"
3433 LIBS="$ac_save_LIBS"
3436 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3437 echo "$ac_t""yes" 1>&6
3438 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
3439 echo "configure:3440: checking for initscr in -lgpm" >&5
3440 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
3441 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3442 echo $ac_n "(cached) $ac_c" 1>&6
3444 ac_save_LIBS="$LIBS"
3446 cat > conftest.$ac_ext <<EOF
3447 #line 3448 "configure"
3448 #include "confdefs.h"
3449 /* Override any gcc2 internal prototype to avoid an error. */
3450 /* We use char because int might match the return type of a gcc2
3451 builtin and then its argument prototype would still apply. */
3458 if { (eval echo configure:3459: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3460 eval "ac_cv_lib_$ac_lib_var=yes"
3462 echo "configure: failed program was:" >&5
3463 cat conftest.$ac_ext >&5
3465 eval "ac_cv_lib_$ac_lib_var=no"
3468 LIBS="$ac_save_LIBS"
3471 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3472 echo "$ac_t""yes" 1>&6
3473 LIBS="$cf_ncurses_SAVE"
3475 echo "$ac_t""no" 1>&6
3476 cf_ncurses_LIBS="-lgpm"
3480 echo "$ac_t""no" 1>&6
3484 case $host_os in #(vi
3486 # This is only necessary if you are linking against an obsolete
3487 # version of ncurses (but it should do no harm, since it's static).
3488 if test "$cf_nculib_root" = ncurses ; then
3489 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
3490 echo "configure:3491: checking for tgoto in -lmytinfo" >&5
3491 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
3492 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3493 echo $ac_n "(cached) $ac_c" 1>&6
3495 ac_save_LIBS="$LIBS"
3496 LIBS="-lmytinfo $LIBS"
3497 cat > conftest.$ac_ext <<EOF
3498 #line 3499 "configure"
3499 #include "confdefs.h"
3500 /* Override any gcc2 internal prototype to avoid an error. */
3501 /* We use char because int might match the return type of a gcc2
3502 builtin and then its argument prototype would still apply. */
3509 if { (eval echo configure:3510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3511 eval "ac_cv_lib_$ac_lib_var=yes"
3513 echo "configure: failed program was:" >&5
3514 cat conftest.$ac_ext >&5
3516 eval "ac_cv_lib_$ac_lib_var=no"
3519 LIBS="$ac_save_LIBS"
3522 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3523 echo "$ac_t""yes" 1>&6
3524 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
3526 echo "$ac_t""no" 1>&6
3533 LIBS="$cf_ncurses_LIBS $LIBS"
3535 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3537 LIBS="-L$cf_cv_curses_dir/lib -l$cf_nculib_root $LIBS"
3540 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
3542 echo $ac_n "checking for initscr""... $ac_c" 1>&6
3543 echo "configure:3544: checking for initscr" >&5
3544 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
3545 echo $ac_n "(cached) $ac_c" 1>&6
3547 cat > conftest.$ac_ext <<EOF
3548 #line 3549 "configure"
3549 #include "confdefs.h"
3550 /* System header to define __stub macros and hopefully few prototypes,
3551 which can conflict with char initscr(); below. */
3553 /* Override any gcc2 internal prototype to avoid an error. */
3554 /* We use char because int might match the return type of a gcc2
3555 builtin and then its argument prototype would still apply. */
3560 /* The GNU C library defines this for functions which it implements
3561 to always fail with ENOSYS. Some functions are actually named
3562 something starting with __ and the normal name is an alias. */
3563 #if defined (__stub_initscr) || defined (__stub___initscr)
3571 if { (eval echo configure:3572: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3573 eval "ac_cv_func_initscr=yes"
3575 echo "configure: failed program was:" >&5
3576 cat conftest.$ac_ext >&5
3578 eval "ac_cv_func_initscr=no"
3583 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
3584 echo "$ac_t""yes" 1>&6
3585 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
3587 echo "$ac_t""no" 1>&6
3589 cf_save_LIBS="$LIBS"
3590 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
3591 echo "configure:3592: checking for initscr in -l$cf_nculib_root" >&5
3592 LIBS="-l$cf_nculib_root $LIBS"
3593 cat > conftest.$ac_ext <<EOF
3594 #line 3595 "configure"
3595 #include "confdefs.h"
3596 #include <${cf_cv_ncurses_header-curses.h}>
3601 if { (eval echo configure:3602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3603 echo "$ac_t""yes" 1>&6
3604 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
3607 echo "configure: failed program was:" >&5
3608 cat conftest.$ac_ext >&5
3610 echo "$ac_t""no" 1>&6
3613 test -d "$HOME" && {
3614 test -n "$verbose" && echo " ... testing lib-directories under $HOME"
3615 test -d "$HOME/lib" && cf_search="$cf_search $HOME/lib"
3616 test -d "$HOME/lib/$cf_nculib_root" && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
3617 test -d "$HOME/lib/$cf_nculib_root/lib" && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
3620 # For other stuff under the home directory, it should be sufficient to put
3621 # a symbolic link for $HOME/$cf_nculib_root to the actual package location:
3622 test -d "$HOME/$cf_nculib_root" && {
3623 test -n "$verbose" && echo " ... testing lib-directories under $HOME/$cf_nculib_root"
3624 test -d "$HOME/$cf_nculib_root/lib" && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
3625 test -d "$HOME/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
3628 test "$prefix" != /usr/local && \
3629 test -d /usr/local && {
3630 test -n "$verbose" && echo " ... testing lib-directories under /usr/local"
3631 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
3632 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
3633 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
3634 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
3635 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
3638 test "$prefix" != NONE && \
3639 test -d $prefix && {
3640 test -n "$verbose" && echo " ... testing lib-directories under $prefix"
3641 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
3642 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
3643 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
3644 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
3645 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
3648 test "$prefix" != /opt && \
3650 test -n "$verbose" && echo " ... testing lib-directories under /opt"
3651 test -d /opt/lib && cf_search="$cf_search /opt/lib"
3652 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
3653 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
3654 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
3655 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
3658 test "$prefix" != /usr && \
3660 test -n "$verbose" && echo " ... testing lib-directories under /usr"
3661 test -d /usr/lib && cf_search="$cf_search /usr/lib"
3662 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
3663 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
3664 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
3667 for cf_libdir in $cf_search
3669 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
3670 echo "configure:3671: checking for -l$cf_nculib_root in $cf_libdir" >&5
3671 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
3672 cat > conftest.$ac_ext <<EOF
3673 #line 3674 "configure"
3674 #include "confdefs.h"
3675 #include <${cf_cv_ncurses_header-curses.h}>
3680 if { (eval echo configure:3681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3682 echo "$ac_t""yes" 1>&6
3683 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
3686 echo "configure: failed program was:" >&5
3687 cat conftest.$ac_ext >&5
3689 echo "$ac_t""no" 1>&6
3690 LIBS="$cf_save_LIBS"
3700 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
3702 if test $cf_found_library = no ; then
3703 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
3709 if test -n "$cf_ncurses_LIBS" ; then
3710 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
3711 echo "configure:3712: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
3712 cf_ncurses_SAVE="$LIBS"
3713 for p in $cf_ncurses_LIBS ; do
3714 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
3715 if test "$q" != "$LIBS" ; then
3719 cat > conftest.$ac_ext <<EOF
3720 #line 3721 "configure"
3721 #include "confdefs.h"
3722 #include <${cf_cv_ncurses_header-curses.h}>
3724 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
3727 if { (eval echo configure:3728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3729 echo "$ac_t""yes" 1>&6
3731 echo "configure: failed program was:" >&5
3732 cat conftest.$ac_ext >&5
3734 echo "$ac_t""no" 1>&6
3735 LIBS="$cf_ncurses_SAVE"
3741 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3743 cat >> confdefs.h <<EOF
3744 #define $cf_nculib_ROOT 1
3753 cf_ncuhdr_root=ncursesw
3755 test -n "$cf_cv_curses_dir" && \
3756 test "$cf_cv_curses_dir" != "no" && \
3757 CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
3759 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
3760 echo "configure:3761: checking for $cf_ncuhdr_root header in include-path" >&5
3761 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
3762 echo $ac_n "(cached) $ac_c" 1>&6
3765 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
3766 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
3767 for cf_header in $cf_header_list
3770 cat > conftest.$ac_ext <<EOF
3771 #line 3772 "configure"
3772 #include "confdefs.h"
3775 #define _XOPEN_SOURCE_EXTENDED
3776 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
3777 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
3779 #include <$cf_header>
3782 #ifdef NCURSES_VERSION
3788 printf("%s\n", NCURSES_VERSION);
3800 if { (eval echo configure:3801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3802 cf_cv_ncurses_h=$cf_header
3805 echo "configure: failed program was:" >&5
3806 cat conftest.$ac_ext >&5
3812 test "$cf_cv_ncurses_h" != no && break
3817 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
3821 if test "$cf_cv_ncurses_h" != no ; then
3822 cf_cv_ncurses_header=$cf_cv_ncurses_h
3825 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
3826 echo "configure:3827: checking for $cf_ncuhdr_root include-path" >&5
3827 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
3828 echo $ac_n "(cached) $ac_c" 1>&6
3831 test -n "$verbose" && echo
3834 test -d "$HOME" && {
3835 test -n "$verbose" && echo " ... testing include-directories under $HOME"
3836 test -d "$HOME/include" && cf_search="$cf_search $HOME/include"
3837 test -d "$HOME/include/$cf_ncuhdr_root" && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
3838 test -d "$HOME/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
3841 # For other stuff under the home directory, it should be sufficient to put
3842 # a symbolic link for $HOME/$cf_ncuhdr_root to the actual package location:
3843 test -d "$HOME/$cf_ncuhdr_root" && {
3844 test -n "$verbose" && echo " ... testing include-directories under $HOME/$cf_ncuhdr_root"
3845 test -d "$HOME/$cf_ncuhdr_root/include" && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
3846 test -d "$HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3849 test "$prefix" != /usr/local && \
3850 test -d /usr/local && {
3851 test -n "$verbose" && echo " ... testing include-directories under /usr/local"
3852 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
3853 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
3854 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
3855 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
3856 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3859 test "$prefix" != NONE && \
3860 test -d $prefix && {
3861 test -n "$verbose" && echo " ... testing include-directories under $prefix"
3862 test -d $prefix/include && cf_search="$cf_search $prefix/include"
3863 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
3864 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
3865 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
3866 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3869 test "$prefix" != /opt && \
3871 test -n "$verbose" && echo " ... testing include-directories under /opt"
3872 test -d /opt/include && cf_search="$cf_search /opt/include"
3873 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
3874 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
3875 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
3876 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3879 test "$prefix" != /usr && \
3881 test -n "$verbose" && echo " ... testing include-directories under /usr"
3882 test -d /usr/include && cf_search="$cf_search /usr/include"
3883 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
3884 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
3885 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
3888 test "$includedir" != NONE && \
3889 test "$includedir" != "/usr/include" && \
3890 test -d "$includedir" && {
3891 test -d $includedir && cf_search="$cf_search $includedir"
3892 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
3895 test "$oldincludedir" != NONE && \
3896 test "$oldincludedir" != "/usr/include" && \
3897 test -d "$oldincludedir" && {
3898 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
3899 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
3903 test -n "$verbose" && echo search path $cf_search
3904 cf_save2_CPPFLAGS="$CPPFLAGS"
3905 for cf_incdir in $cf_search
3908 for cf_add_incdir in $cf_incdir
3912 case $cf_add_incdir in
3915 /usr/local/include) # (vi
3916 if test "$GCC" = yes
3918 cf_save_CPPFLAGS="$CPPFLAGS"
3919 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3920 cat > conftest.$ac_ext <<EOF
3921 #line 3922 "configure"
3922 #include "confdefs.h"
3928 if { (eval echo configure:3929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3931 echo "configure: failed program was:" >&5
3932 cat conftest.$ac_ext >&5
3934 CPPFLAGS="$cf_save_CPPFLAGS"
3940 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3943 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3944 test "$cf_top_incdir" = "$cf_add_incdir" && break
3945 cf_add_incdir="$cf_top_incdir"
3954 cat > conftest.$ac_ext <<EOF
3955 #line 3956 "configure"
3956 #include "confdefs.h"
3959 #include <$cf_header>
3962 #ifdef NCURSES_VERSION
3964 printf("%s\n", NCURSES_VERSION);
3976 if { (eval echo configure:3977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3978 cf_cv_ncurses_h2=$cf_header
3981 echo "configure: failed program was:" >&5
3982 cat conftest.$ac_ext >&5
3988 if test "$cf_cv_ncurses_h2" != no ; then
3989 cf_cv_ncurses_h2=$cf_incdir/$cf_header
3990 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
3993 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
3995 CPPFLAGS="$cf_save2_CPPFLAGS"
3996 test "$cf_cv_ncurses_h2" != no && break
3998 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
4002 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
4004 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4005 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4006 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4007 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4010 for cf_add_incdir in $cf_1st_incdir
4014 case $cf_add_incdir in
4017 /usr/local/include) # (vi
4018 if test "$GCC" = yes
4020 cf_save_CPPFLAGS="$CPPFLAGS"
4021 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4022 cat > conftest.$ac_ext <<EOF
4023 #line 4024 "configure"
4024 #include "confdefs.h"
4030 if { (eval echo configure:4031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4033 echo "configure: failed program was:" >&5
4034 cat conftest.$ac_ext >&5
4036 CPPFLAGS="$cf_save_CPPFLAGS"
4042 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4045 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4046 test "$cf_top_incdir" = "$cf_add_incdir" && break
4047 cf_add_incdir="$cf_top_incdir"
4054 # Set definitions to allow ifdef'ing for ncurses.h
4056 case $cf_cv_ncurses_header in # (vi
4058 cat >> confdefs.h <<\EOF
4059 #define HAVE_NCURSES_H 1
4065 case $cf_cv_ncurses_header in # (vi
4066 ncurses/curses.h|ncurses/ncurses.h)
4067 cat >> confdefs.h <<\EOF
4068 #define HAVE_NCURSES_NCURSES_H 1
4072 ncursesw/curses.h|ncursesw/ncurses.h)
4073 cat >> confdefs.h <<\EOF
4074 #define HAVE_NCURSESW_NCURSES_H 1
4082 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
4083 echo "configure:4084: checking for terminfo header" >&5
4084 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
4085 echo $ac_n "(cached) $ac_c" 1>&6
4088 case ${cf_cv_ncurses_header} in #(vi
4089 */ncurses.h|*/ncursesw.h) #(vi
4090 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4093 cf_term_header=term.h
4097 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4099 cat > conftest.$ac_ext <<EOF
4100 #line 4101 "configure"
4101 #include "confdefs.h"
4103 #include <${cf_cv_ncurses_header-curses.h}>
4107 int x = auto_left_margin
4110 if { (eval echo configure:4111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4113 cf_cv_term_header="$cf_test"
4115 echo "configure: failed program was:" >&5
4116 cat conftest.$ac_ext >&5
4119 cf_cv_term_header=unknown
4123 test "$cf_cv_term_header" != unknown && break
4128 echo "$ac_t""$cf_cv_term_header" 1>&6
4130 # Set definitions to allow ifdef'ing to accommodate subdirectories
4132 case $cf_cv_term_header in # (vi
4134 cat >> confdefs.h <<\EOF
4135 #define HAVE_TERM_H 1
4141 case $cf_cv_term_header in # (vi
4142 ncurses/term.h) #(vi
4143 cat >> confdefs.h <<\EOF
4144 #define HAVE_NCURSES_TERM_H 1
4149 cat >> confdefs.h <<\EOF
4150 #define HAVE_NCURSESW_TERM_H 1
4157 # some applications need this, but should check for NCURSES_VERSION
4158 cat >> confdefs.h <<\EOF
4164 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
4165 echo "configure:4166: checking for ncurses version" >&5
4166 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
4167 echo $ac_n "(cached) $ac_c" 1>&6
4170 cf_cv_ncurses_version=no
4173 if test "$cross_compiling" = yes; then
4176 # This will not work if the preprocessor splits the line after the
4177 # Autoconf token. The 'unproto' program does that.
4178 cat > conftest.$ac_ext <<EOF
4179 #include <${cf_cv_ncurses_header-curses.h}>
4181 #ifdef NCURSES_VERSION
4182 Autoconf NCURSES_VERSION
4190 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4191 { (eval echo configure:4192: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
4192 if test -f conftest.out ; then
4193 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4194 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4199 cat > conftest.$ac_ext <<EOF
4200 #line 4201 "configure"
4201 #include "confdefs.h"
4203 #include <${cf_cv_ncurses_header-curses.h}>
4207 FILE *fp = fopen("$cf_tempfile", "w");
4208 #ifdef NCURSES_VERSION
4209 # ifdef NCURSES_VERSION_PATCH
4210 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4212 fprintf(fp, "%s\n", NCURSES_VERSION);
4216 fprintf(fp, "old\n");
4224 if { (eval echo configure:4225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4227 cf_cv_ncurses_version=`cat $cf_tempfile`
4229 echo "configure: failed program was:" >&5
4230 cat conftest.$ac_ext >&5
4239 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
4240 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
4248 cf_nculib_root=ncursesw
4249 # This works, except for the special case where we find gpm, but
4250 # ncurses is in a nonstandard location via $LIBS, and we really want
4253 cf_ncurses_SAVE="$LIBS"
4254 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
4255 echo "configure:4256: checking for Gpm_Open in -lgpm" >&5
4256 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
4257 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4258 echo $ac_n "(cached) $ac_c" 1>&6
4260 ac_save_LIBS="$LIBS"
4262 cat > conftest.$ac_ext <<EOF
4263 #line 4264 "configure"
4264 #include "confdefs.h"
4265 /* Override any gcc2 internal prototype to avoid an error. */
4266 /* We use char because int might match the return type of a gcc2
4267 builtin and then its argument prototype would still apply. */
4274 if { (eval echo configure:4275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4276 eval "ac_cv_lib_$ac_lib_var=yes"
4278 echo "configure: failed program was:" >&5
4279 cat conftest.$ac_ext >&5
4281 eval "ac_cv_lib_$ac_lib_var=no"
4284 LIBS="$ac_save_LIBS"
4287 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4288 echo "$ac_t""yes" 1>&6
4289 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
4290 echo "configure:4291: checking for initscr in -lgpm" >&5
4291 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
4292 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4293 echo $ac_n "(cached) $ac_c" 1>&6
4295 ac_save_LIBS="$LIBS"
4297 cat > conftest.$ac_ext <<EOF
4298 #line 4299 "configure"
4299 #include "confdefs.h"
4300 /* Override any gcc2 internal prototype to avoid an error. */
4301 /* We use char because int might match the return type of a gcc2
4302 builtin and then its argument prototype would still apply. */
4309 if { (eval echo configure:4310: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4311 eval "ac_cv_lib_$ac_lib_var=yes"
4313 echo "configure: failed program was:" >&5
4314 cat conftest.$ac_ext >&5
4316 eval "ac_cv_lib_$ac_lib_var=no"
4319 LIBS="$ac_save_LIBS"
4322 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4323 echo "$ac_t""yes" 1>&6
4324 LIBS="$cf_ncurses_SAVE"
4326 echo "$ac_t""no" 1>&6
4327 cf_ncurses_LIBS="-lgpm"
4331 echo "$ac_t""no" 1>&6
4335 case $host_os in #(vi
4337 # This is only necessary if you are linking against an obsolete
4338 # version of ncurses (but it should do no harm, since it's static).
4339 if test "$cf_nculib_root" = ncurses ; then
4340 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
4341 echo "configure:4342: checking for tgoto in -lmytinfo" >&5
4342 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
4343 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4344 echo $ac_n "(cached) $ac_c" 1>&6
4346 ac_save_LIBS="$LIBS"
4347 LIBS="-lmytinfo $LIBS"
4348 cat > conftest.$ac_ext <<EOF
4349 #line 4350 "configure"
4350 #include "confdefs.h"
4351 /* Override any gcc2 internal prototype to avoid an error. */
4352 /* We use char because int might match the return type of a gcc2
4353 builtin and then its argument prototype would still apply. */
4360 if { (eval echo configure:4361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4362 eval "ac_cv_lib_$ac_lib_var=yes"
4364 echo "configure: failed program was:" >&5
4365 cat conftest.$ac_ext >&5
4367 eval "ac_cv_lib_$ac_lib_var=no"
4370 LIBS="$ac_save_LIBS"
4373 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4374 echo "$ac_t""yes" 1>&6
4375 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
4377 echo "$ac_t""no" 1>&6
4384 LIBS="$cf_ncurses_LIBS $LIBS"
4386 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4388 LIBS="-L$cf_cv_curses_dir/lib -l$cf_nculib_root $LIBS"
4391 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
4393 echo $ac_n "checking for initscr""... $ac_c" 1>&6
4394 echo "configure:4395: checking for initscr" >&5
4395 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
4396 echo $ac_n "(cached) $ac_c" 1>&6
4398 cat > conftest.$ac_ext <<EOF
4399 #line 4400 "configure"
4400 #include "confdefs.h"
4401 /* System header to define __stub macros and hopefully few prototypes,
4402 which can conflict with char initscr(); below. */
4404 /* Override any gcc2 internal prototype to avoid an error. */
4405 /* We use char because int might match the return type of a gcc2
4406 builtin and then its argument prototype would still apply. */
4411 /* The GNU C library defines this for functions which it implements
4412 to always fail with ENOSYS. Some functions are actually named
4413 something starting with __ and the normal name is an alias. */
4414 #if defined (__stub_initscr) || defined (__stub___initscr)
4422 if { (eval echo configure:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4424 eval "ac_cv_func_initscr=yes"
4426 echo "configure: failed program was:" >&5
4427 cat conftest.$ac_ext >&5
4429 eval "ac_cv_func_initscr=no"
4434 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
4435 echo "$ac_t""yes" 1>&6
4436 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4438 echo "$ac_t""no" 1>&6
4440 cf_save_LIBS="$LIBS"
4441 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
4442 echo "configure:4443: checking for initscr in -l$cf_nculib_root" >&5
4443 LIBS="-l$cf_nculib_root $LIBS"
4444 cat > conftest.$ac_ext <<EOF
4445 #line 4446 "configure"
4446 #include "confdefs.h"
4447 #include <${cf_cv_ncurses_header-curses.h}>
4452 if { (eval echo configure:4453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4454 echo "$ac_t""yes" 1>&6
4455 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4458 echo "configure: failed program was:" >&5
4459 cat conftest.$ac_ext >&5
4461 echo "$ac_t""no" 1>&6
4464 test -d "$HOME" && {
4465 test -n "$verbose" && echo " ... testing lib-directories under $HOME"
4466 test -d "$HOME/lib" && cf_search="$cf_search $HOME/lib"
4467 test -d "$HOME/lib/$cf_nculib_root" && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
4468 test -d "$HOME/lib/$cf_nculib_root/lib" && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
4471 # For other stuff under the home directory, it should be sufficient to put
4472 # a symbolic link for $HOME/$cf_nculib_root to the actual package location:
4473 test -d "$HOME/$cf_nculib_root" && {
4474 test -n "$verbose" && echo " ... testing lib-directories under $HOME/$cf_nculib_root"
4475 test -d "$HOME/$cf_nculib_root/lib" && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
4476 test -d "$HOME/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
4479 test "$prefix" != /usr/local && \
4480 test -d /usr/local && {
4481 test -n "$verbose" && echo " ... testing lib-directories under /usr/local"
4482 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
4483 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
4484 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
4485 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
4486 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
4489 test "$prefix" != NONE && \
4490 test -d $prefix && {
4491 test -n "$verbose" && echo " ... testing lib-directories under $prefix"
4492 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
4493 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
4494 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
4495 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
4496 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
4499 test "$prefix" != /opt && \
4501 test -n "$verbose" && echo " ... testing lib-directories under /opt"
4502 test -d /opt/lib && cf_search="$cf_search /opt/lib"
4503 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
4504 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
4505 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
4506 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
4509 test "$prefix" != /usr && \
4511 test -n "$verbose" && echo " ... testing lib-directories under /usr"
4512 test -d /usr/lib && cf_search="$cf_search /usr/lib"
4513 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
4514 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
4515 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
4518 for cf_libdir in $cf_search
4520 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
4521 echo "configure:4522: checking for -l$cf_nculib_root in $cf_libdir" >&5
4522 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
4523 cat > conftest.$ac_ext <<EOF
4524 #line 4525 "configure"
4525 #include "confdefs.h"
4526 #include <${cf_cv_ncurses_header-curses.h}>
4531 if { (eval echo configure:4532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4533 echo "$ac_t""yes" 1>&6
4534 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4537 echo "configure: failed program was:" >&5
4538 cat conftest.$ac_ext >&5
4540 echo "$ac_t""no" 1>&6
4541 LIBS="$cf_save_LIBS"
4551 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
4553 if test $cf_found_library = no ; then
4554 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
4560 if test -n "$cf_ncurses_LIBS" ; then
4561 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
4562 echo "configure:4563: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
4563 cf_ncurses_SAVE="$LIBS"
4564 for p in $cf_ncurses_LIBS ; do
4565 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
4566 if test "$q" != "$LIBS" ; then
4570 cat > conftest.$ac_ext <<EOF
4571 #line 4572 "configure"
4572 #include "confdefs.h"
4573 #include <${cf_cv_ncurses_header-curses.h}>
4575 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
4578 if { (eval echo configure:4579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4580 echo "$ac_t""yes" 1>&6
4582 echo "configure: failed program was:" >&5
4583 cat conftest.$ac_ext >&5
4585 echo "$ac_t""no" 1>&6
4586 LIBS="$cf_ncurses_SAVE"
4592 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4594 cat >> confdefs.h <<EOF
4595 #define $cf_nculib_ROOT 1
4604 # look for curses-related headers
4610 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4611 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4612 echo "configure:4613: checking for $ac_hdr" >&5
4613 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4614 echo $ac_n "(cached) $ac_c" 1>&6
4616 cat > conftest.$ac_ext <<EOF
4617 #line 4618 "configure"
4618 #include "confdefs.h"
4621 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4622 { (eval echo configure:4623: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4623 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4624 if test -z "$ac_err"; then
4626 eval "ac_cv_header_$ac_safe=yes"
4629 echo "configure: failed program was:" >&5
4630 cat conftest.$ac_ext >&5
4632 eval "ac_cv_header_$ac_safe=no"
4636 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4637 echo "$ac_t""yes" 1>&6
4638 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4639 cat >> confdefs.h <<EOF
4640 #define $ac_tr_hdr 1
4644 echo "$ac_t""no" 1>&6
4649 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
4650 echo "configure:4651: checking return type of signal handlers" >&5
4651 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
4652 echo $ac_n "(cached) $ac_c" 1>&6
4654 cat > conftest.$ac_ext <<EOF
4655 #line 4656 "configure"
4656 #include "confdefs.h"
4657 #include <sys/types.h>
4663 extern "C" void (*signal (int, void (*)(int)))(int);
4665 void (*signal ()) ();
4672 if { (eval echo configure:4673: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4674 ac_cv_type_signal=void
4676 echo "configure: failed program was:" >&5
4677 cat conftest.$ac_ext >&5
4679 ac_cv_type_signal=int
4684 echo "$ac_t""$ac_cv_type_signal" 1>&6
4685 cat >> confdefs.h <<EOF
4686 #define RETSIGTYPE $ac_cv_type_signal
4691 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
4692 echo "configure:4693: checking for ANSI C header files" >&5
4693 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
4694 echo $ac_n "(cached) $ac_c" 1>&6
4696 cat > conftest.$ac_ext <<EOF
4697 #line 4698 "configure"
4698 #include "confdefs.h"
4704 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4705 { (eval echo configure:4706: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4706 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4707 if test -z "$ac_err"; then
4709 ac_cv_header_stdc=yes
4712 echo "configure: failed program was:" >&5
4713 cat conftest.$ac_ext >&5
4715 ac_cv_header_stdc=no
4719 if test $ac_cv_header_stdc = yes; then
4720 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4721 cat > conftest.$ac_ext <<EOF
4722 #line 4723 "configure"
4723 #include "confdefs.h"
4726 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4727 egrep "memchr" >/dev/null 2>&1; then
4731 ac_cv_header_stdc=no
4737 if test $ac_cv_header_stdc = yes; then
4738 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4739 cat > conftest.$ac_ext <<EOF
4740 #line 4741 "configure"
4741 #include "confdefs.h"
4744 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4745 egrep "free" >/dev/null 2>&1; then
4749 ac_cv_header_stdc=no
4755 if test $ac_cv_header_stdc = yes; then
4756 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4757 if test "$cross_compiling" = yes; then
4760 cat > conftest.$ac_ext <<EOF
4761 #line 4762 "configure"
4762 #include "confdefs.h"
4764 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4765 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4766 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4767 int main () { int i; for (i = 0; i < 256; i++)
4768 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
4772 if { (eval echo configure:4773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4776 echo "configure: failed program was:" >&5
4777 cat conftest.$ac_ext >&5
4779 ac_cv_header_stdc=no
4787 echo "$ac_t""$ac_cv_header_stdc" 1>&6
4788 if test $ac_cv_header_stdc = yes; then
4789 cat >> confdefs.h <<\EOF
4790 #define STDC_HEADERS 1
4795 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
4796 echo "configure:4797: checking whether time.h and sys/time.h may both be included" >&5
4797 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
4798 echo $ac_n "(cached) $ac_c" 1>&6
4800 cat > conftest.$ac_ext <<EOF
4801 #line 4802 "configure"
4802 #include "confdefs.h"
4803 #include <sys/types.h>
4804 #include <sys/time.h>
4810 if { (eval echo configure:4811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4812 ac_cv_header_time=yes
4814 echo "configure: failed program was:" >&5
4815 cat conftest.$ac_ext >&5
4817 ac_cv_header_time=no
4822 echo "$ac_t""$ac_cv_header_time" 1>&6
4823 if test $ac_cv_header_time = yes; then
4824 cat >> confdefs.h <<\EOF
4825 #define TIME_WITH_SYS_TIME 1
4841 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4842 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4843 echo "configure:4844: checking for $ac_hdr" >&5
4844 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
4845 echo $ac_n "(cached) $ac_c" 1>&6
4847 cat > conftest.$ac_ext <<EOF
4848 #line 4849 "configure"
4849 #include "confdefs.h"
4852 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4853 { (eval echo configure:4854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4854 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4855 if test -z "$ac_err"; then
4857 eval "ac_cv_header_$ac_safe=yes"
4860 echo "configure: failed program was:" >&5
4861 cat conftest.$ac_ext >&5
4863 eval "ac_cv_header_$ac_safe=no"
4867 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4868 echo "$ac_t""yes" 1>&6
4869 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4870 cat >> confdefs.h <<EOF
4871 #define $ac_tr_hdr 1
4875 echo "$ac_t""no" 1>&6
4887 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
4888 echo "configure:4889: checking for $ac_func" >&5
4889 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
4890 echo $ac_n "(cached) $ac_c" 1>&6
4892 cat > conftest.$ac_ext <<EOF
4893 #line 4894 "configure"
4894 #include "confdefs.h"
4895 /* System header to define __stub macros and hopefully few prototypes,
4896 which can conflict with char $ac_func(); below. */
4898 /* Override any gcc2 internal prototype to avoid an error. */
4899 /* We use char because int might match the return type of a gcc2
4900 builtin and then its argument prototype would still apply. */
4905 /* The GNU C library defines this for functions which it implements
4906 to always fail with ENOSYS. Some functions are actually named
4907 something starting with __ and the normal name is an alias. */
4908 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4916 if { (eval echo configure:4917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4918 eval "ac_cv_func_$ac_func=yes"
4920 echo "configure: failed program was:" >&5
4921 cat conftest.$ac_ext >&5
4923 eval "ac_cv_func_$ac_func=no"
4928 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
4929 echo "$ac_t""yes" 1>&6
4930 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
4931 cat >> confdefs.h <<EOF
4932 #define $ac_tr_func 1
4936 echo "$ac_t""no" 1>&6
4942 echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
4943 echo "configure:4944: checking if sys/time.h works with sys/select.h" >&5
4944 if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
4945 echo $ac_n "(cached) $ac_c" 1>&6
4948 cat > conftest.$ac_ext <<EOF
4949 #line 4950 "configure"
4950 #include "confdefs.h"
4952 #include <sys/types.h>
4953 #ifdef HAVE_SYS_TIME_H
4954 #include <sys/time.h>
4956 #ifdef HAVE_SYS_SELECT_H
4957 #include <sys/select.h>
4964 if { (eval echo configure:4965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4966 cf_cv_sys_time_select=yes
4968 echo "configure: failed program was:" >&5
4969 cat conftest.$ac_ext >&5
4971 cf_cv_sys_time_select=no
4977 echo "$ac_t""$cf_cv_sys_time_select" 1>&6
4978 test "$cf_cv_sys_time_select" = yes && cat >> confdefs.h <<\EOF
4979 #define HAVE_SYS_TIME_SELECT 1
4989 cat > confcache <<\EOF
4990 # This file is a shell script that caches the results of configure
4991 # tests run on this system so they can be shared between configure
4992 # scripts and configure runs. It is not useful on other systems.
4993 # If it contains results you don't want to keep, you may remove or edit it.
4995 # By default, configure uses ./config.cache as the cache file,
4996 # creating it if it does not exist already. You can give configure
4997 # the --cache-file=FILE option to use a different cache file; that is
4998 # what configure does when it calls configure scripts in
4999 # subdirectories, so they share the cache.
5000 # Giving --cache-file=/dev/null disables caching, for debugging configure.
5001 # config.status only pays attention to the cache file if you give it the
5002 # --recheck option to rerun configure.
5005 # The following way of writing the cache mishandles newlines in values,
5006 # but we know of no workaround that is simple, portable, and efficient.
5007 # So, don't put newlines in cache variables' values.
5008 # Ultrix sh set writes to stderr and can't be redirected directly,
5009 # and sets the high bit in the cache file unless we assign to the vars.
5011 case `(ac_space=' '; set | grep ac_space) 2>&1` in
5013 # `set' does not quote correctly, so add quotes (double-quote substitution
5014 # turns \\\\ into \\, and sed turns \\ into \).
5016 -e "s/'/'\\\\''/g" \
5017 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
5020 # `set' quotes correctly as required by POSIX, so do not add quotes.
5021 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
5024 if cmp -s $cache_file confcache; then
5027 if test -w $cache_file; then
5028 echo "updating cache $cache_file"
5029 cat confcache > $cache_file
5031 echo "not updating unwritable cache $cache_file"
5036 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
5038 test "x$prefix" = xNONE && prefix=$ac_default_prefix
5039 # Let make expand exec_prefix.
5040 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
5042 # Any assignment to VPATH causes Sun make to only execute
5043 # the first set of double-colon rules, so remove it if not needed.
5044 # If there is a colon in the path, we need to keep it.
5045 if test "x$srcdir" = x.; then
5046 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
5049 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
5051 DEFS=-DHAVE_CONFIG_H
5053 # Without the "./", some shells look in PATH for config.status.
5054 : ${CONFIG_STATUS=./config.status}
5056 echo creating $CONFIG_STATUS
5057 rm -f $CONFIG_STATUS
5058 cat > $CONFIG_STATUS <<EOF
5060 # Generated automatically by configure.
5061 # Run this file to recreate the current configuration.
5062 # This directory was configured as follows,
5063 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
5065 # $0 $ac_configure_args
5067 # Compiler output produced by configure, useful for debugging
5068 # configure, is in ./config.log if it exists.
5070 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
5073 case "\$ac_option" in
5074 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5075 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
5076 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
5077 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
5078 echo "$CONFIG_STATUS generated by autoconf version 2.13.20030927"
5080 -help | --help | --hel | --he | --h)
5081 echo "\$ac_cs_usage"; exit 0 ;;
5082 *) echo "\$ac_cs_usage"; exit 1 ;;
5086 ac_given_srcdir=$srcdir
5087 ac_given_INSTALL="$INSTALL"
5089 trap 'rm -fr `echo "Makefile ncurses_cfg.h:ncurses_tst.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
5091 cat >> $CONFIG_STATUS <<EOF
5093 # Protect against being on the right side of a sed subst in config.status.
5094 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
5095 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
5099 s%@CFLAGS@%$CFLAGS%g
5100 s%@CPPFLAGS@%$CPPFLAGS%g
5101 s%@CXXFLAGS@%$CXXFLAGS%g
5102 s%@FFLAGS@%$FFLAGS%g
5104 s%@LDFLAGS@%$LDFLAGS%g
5106 s%@exec_prefix@%$exec_prefix%g
5107 s%@prefix@%$prefix%g
5108 s%@program_transform_name@%$program_transform_name%g
5109 s%@bindir@%$bindir%g
5110 s%@sbindir@%$sbindir%g
5111 s%@libexecdir@%$libexecdir%g
5112 s%@datadir@%$datadir%g
5113 s%@sysconfdir@%$sysconfdir%g
5114 s%@sharedstatedir@%$sharedstatedir%g
5115 s%@localstatedir@%$localstatedir%g
5116 s%@libdir@%$libdir%g
5117 s%@includedir@%$includedir%g
5118 s%@oldincludedir@%$oldincludedir%g
5119 s%@infodir@%$infodir%g
5120 s%@mandir@%$mandir%g
5122 s%@host_alias@%$host_alias%g
5123 s%@host_cpu@%$host_cpu%g
5124 s%@host_vendor@%$host_vendor%g
5125 s%@host_os@%$host_os%g
5126 s%@SET_MAKE@%$SET_MAKE%g
5130 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
5131 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
5132 s%@INSTALL_DATA@%$INSTALL_DATA%g
5134 s%@MAKE_LOWER_TAGS@%$MAKE_LOWER_TAGS%g
5135 s%@MAKE_UPPER_TAGS@%$MAKE_UPPER_TAGS%g
5136 s%@CC_G_OPT@%$CC_G_OPT%g
5137 s%@CC_SHARED_OPTS@%$CC_SHARED_OPTS%g
5138 s%@DESTDIR@%$DESTDIR%g
5139 s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g
5140 s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g
5141 s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
5142 s%@ECHO_LINK@%$ECHO_LINK%g
5143 s%@EXTRA_LDFLAGS@%$EXTRA_LDFLAGS%g
5145 s%@LDFLAGS_SHARED@%$LDFLAGS_SHARED%g
5146 s%@LD_MODEL@%$LD_MODEL%g
5147 s%@LD_SHARED_OPTS@%$LD_SHARED_OPTS%g
5148 s%@LIBTOOL@%$LIBTOOL%g
5149 s%@LIB_CLEAN@%$LIB_CLEAN%g
5150 s%@LIB_COMPILE@%$LIB_COMPILE%g
5151 s%@LIB_INSTALL@%$LIB_INSTALL%g
5152 s%@LIB_LINK@%$LIB_LINK%g
5153 s%@LIB_SUFFIX@%$LIB_SUFFIX%g
5154 s%@LIB_UNINSTALL@%$LIB_UNINSTALL%g
5155 s%@LINK_PROGS@%$LINK_PROGS%g
5157 s%@LINT_OPTS@%$LINT_OPTS%g
5158 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
5159 s%@MATH_LIB@%$MATH_LIB%g
5160 s%@TICS_ARGS@%$TICS_ARGS%g
5161 s%@TINFO_ARGS@%$TINFO_ARGS%g
5162 s%@cf_cv_abi_version@%$cf_cv_abi_version%g
5163 s%@cf_cv_rel_version@%$cf_cv_rel_version%g
5164 s%@NCURSES_TREE@%$NCURSES_TREE%g
5165 s%@EXEEXT@%$EXEEXT%g
5166 s%@OBJEXT@%$OBJEXT%g
5167 s%@EXTRA_CPPFLAGS@%$EXTRA_CPPFLAGS%g
5168 s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
5173 cat >> $CONFIG_STATUS <<\EOF
5175 # Split the substitutions into bite-sized pieces for seds with
5176 # small command number limits, like on Digital OSF/1 and HP-UX.
5177 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
5178 ac_file=1 # Number of current file.
5179 ac_beg=1 # First line for current file.
5180 ac_end=$ac_max_sed_cmds # Line after last line for current file.
5183 while $ac_more_lines; do
5184 if test $ac_beg -gt 1; then
5185 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
5187 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
5189 if test ! -s conftest.s$ac_file; then
5191 rm -f conftest.s$ac_file
5193 if test -z "$ac_sed_cmds"; then
5194 ac_sed_cmds="sed -f conftest.s$ac_file"
5196 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
5198 ac_file=`expr $ac_file + 1`
5200 ac_end=`expr $ac_end + $ac_max_sed_cmds`
5203 if test -z "$ac_sed_cmds"; then
5208 cat >> $CONFIG_STATUS <<EOF
5210 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
5212 cat >> $CONFIG_STATUS <<\EOF
5213 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
5214 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5216 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5217 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5218 *) ac_file_in="${ac_file}.in" ;;
5221 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
5223 # Remove last slash and all that follows it. Not all systems have dirname.
5224 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5225 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5226 # The file is in a subdirectory.
5227 test ! -d "$ac_dir" && mkdir "$ac_dir"
5228 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
5229 # A "../" for each directory in $ac_dir_suffix.
5230 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
5232 ac_dir_suffix= ac_dots=
5235 case "$ac_given_srcdir" in
5237 if test -z "$ac_dots"; then top_srcdir=.
5238 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
5239 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
5241 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
5242 top_srcdir="$ac_dots$ac_given_srcdir" ;;
5245 case "$ac_given_INSTALL" in
5246 [/$]*) INSTALL="$ac_given_INSTALL" ;;
5247 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
5250 echo creating "$ac_file"
5252 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
5254 *Makefile*) ac_comsub="1i\\
5255 # $configure_input" ;;
5259 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5261 s%@configure_input@%$configure_input%g
5262 s%@srcdir@%$srcdir%g
5263 s%@top_srcdir@%$top_srcdir%g
5264 s%@INSTALL@%$INSTALL%g
5265 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
5269 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
5270 # NAME is the cpp macro being defined and VALUE is the value it is being given.
5272 # ac_d sets the value in "#define NAME VALUE" lines.
5273 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
5274 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
5277 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
5278 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5279 ac_uB='\([ ]\)%\1#\2define\3'
5282 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
5283 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
5284 ac_eB='$%\1#\2define\3'
5288 if test "${CONFIG_HEADERS+set}" != set; then
5290 cat >> $CONFIG_STATUS <<EOF
5291 CONFIG_HEADERS="ncurses_cfg.h:ncurses_tst.hin"
5293 cat >> $CONFIG_STATUS <<\EOF
5295 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
5296 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
5298 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
5299 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
5300 *) ac_file_in="${ac_file}.in" ;;
5303 echo creating $ac_file
5305 rm -f conftest.frag conftest.in conftest.out
5306 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
5307 cat $ac_file_inputs > conftest.in
5312 # Transform confdefs.h into a list of #define's. We won't use it as a sed
5313 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
5314 # be either 'cat' or 'sort'.
5315 cat confdefs.h >conftest.vals
5317 # Break up conftest.vals because some shells have a limit on
5318 # the size of here documents, and old seds have small limits too.
5321 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
5324 ac_lines=`grep -c . conftest.vals`
5325 # grep -c gives empty output for an empty file on some AIX systems.
5326 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
5327 # Write chunks of a limited-size here document to conftest.frag.
5328 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
5329 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
5330 echo 'CEOF' >> $CONFIG_STATUS
5331 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
5333 mv conftest.tail conftest.vals
5337 # Run sed to substitute the contents of conftest.frag into conftest.in at the
5339 echo ' cat >> conftest.edit <<CEOF
5340 /@DEFS@/r conftest.frag
5343 sed -f conftest.edit conftest.in > conftest.out
5345 mv conftest.out conftest.in
5346 rm -f conftest.edit conftest.frag
5350 cat >> $CONFIG_STATUS <<\EOF
5351 rm -f conftest.frag conftest.h
5352 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
5353 cat conftest.in >> conftest.h
5355 if cmp -s $ac_file conftest.h 2>/dev/null; then
5356 echo "$ac_file is unchanged"
5359 # Remove last slash and all that follows it. Not all systems have dirname.
5360 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
5361 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
5362 # The file is in a subdirectory.
5363 test ! -d "$ac_dir" && mkdir "$ac_dir"
5366 mv conftest.h $ac_file
5371 cat >> $CONFIG_STATUS <<EOF
5372 # Extra initialization commands, if any
5377 cat >> $CONFIG_STATUS <<\EOF
5378 # Extra commands, if any
5383 if test ! -d $srcdir/$cf_dir; then
5385 elif test -f $srcdir/$cf_dir/programs; then
5386 $AWK -f $srcdir/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
5391 cat >>Makefile <<TEST_EOF
5393 # These rules are generated so we do not rely on suffix rules, which do not
5394 # work consistently for different make-programs (the '\$(MODEL)/' confuses
5395 # some, and the '\$x' confuses others).
5397 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
5400 cat >>Makefile <<TEST_EOF
5402 \$(MODEL)/$N.o : $N.c \\
5405 @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) $N.c
5411 chmod +x $CONFIG_STATUS
5412 rm -fr confdefs* $ac_clean_files
5413 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1