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 --with-curses-dir=DIR directory in which (n)curses is installed
187 --with-5lib use SunOS sysv-libraries
188 --with-ncursesw use wide ncurses-libraries (installed)
189 --with-ncurses use ncurses-libraries (installed)
193 -host | --host | --hos | --ho)
195 -host=* | --host=* | --hos=* | --ho=*)
198 -includedir | --includedir | --includedi | --included | --include \
199 | --includ | --inclu | --incl | --inc)
200 ac_prev=includedir ;;
201 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
202 | --includ=* | --inclu=* | --incl=* | --inc=*)
203 includedir="$ac_optarg" ;;
205 -infodir | --infodir | --infodi | --infod | --info | --inf)
207 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
208 infodir="$ac_optarg" ;;
210 -libdir | --libdir | --libdi | --libd)
212 -libdir=* | --libdir=* | --libdi=* | --libd=*)
213 libdir="$ac_optarg" ;;
215 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
216 | --libexe | --libex | --libe)
217 ac_prev=libexecdir ;;
218 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
219 | --libexe=* | --libex=* | --libe=*)
220 libexecdir="$ac_optarg" ;;
222 -localstatedir | --localstatedir | --localstatedi | --localstated \
223 | --localstate | --localstat | --localsta | --localst \
224 | --locals | --local | --loca | --loc | --lo)
225 ac_prev=localstatedir ;;
226 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
227 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
228 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
229 localstatedir="$ac_optarg" ;;
231 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
233 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
234 mandir="$ac_optarg" ;;
237 # Obsolete; use --without-fp.
240 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
244 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
245 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
248 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
249 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
250 | --oldin | --oldi | --old | --ol | --o)
251 ac_prev=oldincludedir ;;
252 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
253 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
254 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
255 oldincludedir="$ac_optarg" ;;
257 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
259 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
260 prefix="$ac_optarg" ;;
262 -program-prefix | --program-prefix | --program-prefi | --program-pref \
263 | --program-pre | --program-pr | --program-p)
264 ac_prev=program_prefix ;;
265 -program-prefix=* | --program-prefix=* | --program-prefi=* \
266 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
267 program_prefix="$ac_optarg" ;;
269 -program-suffix | --program-suffix | --program-suffi | --program-suff \
270 | --program-suf | --program-su | --program-s)
271 ac_prev=program_suffix ;;
272 -program-suffix=* | --program-suffix=* | --program-suffi=* \
273 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
274 program_suffix="$ac_optarg" ;;
276 -program-transform-name | --program-transform-name \
277 | --program-transform-nam | --program-transform-na \
278 | --program-transform-n | --program-transform- \
279 | --program-transform | --program-transfor \
280 | --program-transfo | --program-transf \
281 | --program-trans | --program-tran \
282 | --progr-tra | --program-tr | --program-t)
283 ac_prev=program_transform_name ;;
284 -program-transform-name=* | --program-transform-name=* \
285 | --program-transform-nam=* | --program-transform-na=* \
286 | --program-transform-n=* | --program-transform-=* \
287 | --program-transform=* | --program-transfor=* \
288 | --program-transfo=* | --program-transf=* \
289 | --program-trans=* | --program-tran=* \
290 | --progr-tra=* | --program-tr=* | --program-t=*)
291 program_transform_name="$ac_optarg" ;;
293 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
294 | -silent | --silent | --silen | --sile | --sil)
297 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
299 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
301 sbindir="$ac_optarg" ;;
303 -sharedstatedir | --sharedstatedir | --sharedstatedi \
304 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
305 | --sharedst | --shareds | --shared | --share | --shar \
307 ac_prev=sharedstatedir ;;
308 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
309 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
310 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
312 sharedstatedir="$ac_optarg" ;;
314 -site | --site | --sit)
316 -site=* | --site=* | --sit=*)
319 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
321 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
322 srcdir="$ac_optarg" ;;
324 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
325 | --syscon | --sysco | --sysc | --sys | --sy)
326 ac_prev=sysconfdir ;;
327 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
328 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
329 sysconfdir="$ac_optarg" ;;
331 -target | --target | --targe | --targ | --tar | --ta | --t)
333 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
334 target="$ac_optarg" ;;
336 -v | -verbose | --verbose | --verbos | --verbo | --verb)
339 -version | --version | --versio | --versi | --vers)
340 echo "configure generated by autoconf version 2.13.20030927"
344 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
345 # Reject names that are not valid shell variable names.
346 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
347 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
349 ac_package=`echo $ac_package| sed 's/-/_/g'`
354 eval "with_${ac_package}='$ac_optarg'" ;;
356 -without-* | --without-*)
357 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
358 # Reject names that are not valid shell variable names.
359 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
360 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
362 ac_package=`echo $ac_package| sed 's/-/_/g'`
363 eval "with_${ac_package}=no" ;;
366 # Obsolete; use --with-x.
369 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
370 | --x-incl | --x-inc | --x-in | --x-i)
371 ac_prev=x_includes ;;
372 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
373 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
374 x_includes="$ac_optarg" ;;
376 -x-libraries | --x-libraries | --x-librarie | --x-librari \
377 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
378 ac_prev=x_libraries ;;
379 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
380 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
381 x_libraries="$ac_optarg" ;;
383 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
387 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
388 echo "configure: warning: $ac_option: invalid host type" 1>&2
390 if test "x$nonopt" != xNONE; then
391 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
399 if test -n "$ac_prev"; then
400 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
403 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
405 # File descriptor usage:
408 # 2 errors and warnings
409 # 3 some systems may open it to /dev/tty
410 # 4 used on the Kubota Titan
411 # 6 checking for... messages and results
412 # 5 compiler messages saved in config.log
413 if test "$silent" = yes; then
421 This file contains any messages produced by compilers while
422 running configure, to aid debugging if configure makes a mistake.
425 # Strip out --no-create and --no-recursion so they do not pile up.
426 # Also quote any args containing shell metacharacters.
431 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
432 | --no-cr | --no-c) ;;
433 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
434 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
435 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
436 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
437 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
442 # Only set these to C if already set. These must not be set unconditionally
443 # because not all systems understand e.g. LANG=C (notably SCO).
444 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
445 # Non-C LC_CTYPE values break the ctype check.
446 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
447 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
448 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
449 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
451 # confdefs.h avoids OS command line length limits that DEFS can exceed.
452 rm -rf conftest* confdefs.h
453 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
456 # A filename unique to this package, relative to the directory that
457 # configure is in, which we can look for to find out if srcdir is correct.
458 ac_unique_file=ncurses.c
460 # Find the source files, if location was not specified.
461 if test -z "$srcdir"; then
462 ac_srcdir_defaulted=yes
463 # Try the directory containing this script, then its parent.
465 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
466 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
468 if test ! -r $srcdir/$ac_unique_file; then
472 ac_srcdir_defaulted=no
474 if test ! -r $srcdir/$ac_unique_file; then
475 if test "$ac_srcdir_defaulted" = yes; then
476 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
478 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
481 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
483 # Prefer explicitly selected file to automatically selected ones.
484 if test -z "$CONFIG_SITE"; then
485 if test "x$prefix" != xNONE; then
486 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
488 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
491 for ac_site_file in $CONFIG_SITE; do
492 if test -r "$ac_site_file"; then
493 echo "loading site script $ac_site_file"
498 if test -r "$cache_file"; then
499 echo "loading cache $cache_file"
502 echo "creating cache $cache_file"
507 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
508 ac_cpp='$CPP $CPPFLAGS'
509 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
510 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
511 cross_compiling=$ac_cv_prog_cc_cross
515 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
516 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
517 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
524 ac_n= ac_c='\c' ac_t=
531 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
534 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
537 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
538 if test -f $ac_dir/install-sh; then
540 ac_install_sh="$ac_aux_dir/install-sh -c"
542 elif test -f $ac_dir/install.sh; then
544 ac_install_sh="$ac_aux_dir/install.sh -c"
548 if test -z "$ac_aux_dir"; then
549 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
551 ac_config_guess=$ac_aux_dir/config.guess
552 ac_config_sub=$ac_aux_dir/config.sub
553 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
556 if test -f $srcdir/config.guess ; then
558 # Make sure we can run config.sub.
559 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
560 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
563 echo $ac_n "checking host system type""... $ac_c" 1>&6
564 echo "configure:565: checking host system type" >&5
567 case "$host_alias" in
571 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
572 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
574 *) host_alias=$nonopt ;;
578 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
579 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
580 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
581 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
582 echo "$ac_t""$host" 1>&6
584 system_name="$host_os"
586 system_name="`(uname -s -r) 2>/dev/null`"
587 if test -z "$system_name" ; then
588 system_name="`(hostname) 2>/dev/null`"
591 test -n "$system_name" && cat >> confdefs.h <<EOF
592 #define SYSTEM_NAME "$system_name"
595 if eval "test \"`echo '$''{'cf_cv_system_name'+set}'`\" = set"; then
596 echo $ac_n "(cached) $ac_c" 1>&6
598 cf_cv_system_name="$system_name"
602 test -z "$system_name" && system_name="$cf_cv_system_name"
603 test -n "$cf_cv_system_name" && echo "$ac_t""Configuring for $cf_cv_system_name" 1>&6
605 if test ".$system_name" != ".$cf_cv_system_name" ; then
606 echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6
607 { echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; }
611 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
612 echo "configure:613: checking whether ${MAKE-make} sets \${MAKE}" >&5
613 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
614 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
615 echo $ac_n "(cached) $ac_c" 1>&6
617 cat > conftestmake <<\EOF
619 @echo 'ac_maketemp="${MAKE}"'
621 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
622 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
623 if test -n "$ac_maketemp"; then
624 eval ac_cv_prog_make_${ac_make}_set=yes
626 eval ac_cv_prog_make_${ac_make}_set=no
630 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
631 echo "$ac_t""yes" 1>&6
634 echo "$ac_t""no" 1>&6
635 SET_MAKE="MAKE=${MAKE-make}"
638 # Extract the first word of "gcc", so it can be a program name with args.
639 set dummy gcc; ac_word=$2
640 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
641 echo "configure:642: checking for $ac_word" >&5
642 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
643 echo $ac_n "(cached) $ac_c" 1>&6
645 if test -n "$CC"; then
646 ac_cv_prog_CC="$CC" # Let the user override the test.
648 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
650 for ac_dir in $ac_dummy; do
651 test -z "$ac_dir" && ac_dir=.
652 if test -f $ac_dir/$ac_word; then
661 if test -n "$CC"; then
662 echo "$ac_t""$CC" 1>&6
664 echo "$ac_t""no" 1>&6
667 if test -z "$CC"; then
668 # Extract the first word of "cc", so it can be a program name with args.
669 set dummy cc; ac_word=$2
670 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
671 echo "configure:672: checking for $ac_word" >&5
672 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
673 echo $ac_n "(cached) $ac_c" 1>&6
675 if test -n "$CC"; then
676 ac_cv_prog_CC="$CC" # Let the user override the test.
678 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
681 for ac_dir in $ac_dummy; do
682 test -z "$ac_dir" && ac_dir=.
683 if test -f $ac_dir/$ac_word; then
684 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
693 if test $ac_prog_rejected = yes; then
694 # We found a bogon in the path, so make sure we never use it.
695 set dummy $ac_cv_prog_CC
697 if test $# -gt 0; then
698 # We chose a different compiler from the bogus one.
699 # However, it has the same basename, so the bogon will be chosen
700 # first if we set CC to just the basename; use the full file name.
702 set dummy "$ac_dir/$ac_word" "$@"
710 if test -n "$CC"; then
711 echo "$ac_t""$CC" 1>&6
713 echo "$ac_t""no" 1>&6
716 if test -z "$CC"; then
719 # Extract the first word of "cl", so it can be a program name with args.
720 set dummy cl; ac_word=$2
721 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
722 echo "configure:723: checking for $ac_word" >&5
723 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
724 echo $ac_n "(cached) $ac_c" 1>&6
726 if test -n "$CC"; then
727 ac_cv_prog_CC="$CC" # Let the user override the test.
729 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
731 for ac_dir in $ac_dummy; do
732 test -z "$ac_dir" && ac_dir=.
733 if test -f $ac_dir/$ac_word; then
742 if test -n "$CC"; then
743 echo "$ac_t""$CC" 1>&6
745 echo "$ac_t""no" 1>&6
750 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
753 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
754 echo "configure:755: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
757 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
758 ac_cpp='$CPP $CPPFLAGS'
759 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
760 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
761 cross_compiling=$ac_cv_prog_cc_cross
763 cat > conftest.$ac_ext << EOF
765 #line 766 "configure"
766 #include "confdefs.h"
770 if { (eval echo configure:771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
771 ac_cv_prog_cc_works=yes
772 # If we can't run a trivial program, we are probably using a cross compiler.
773 if (./conftest; exit) 2>/dev/null; then
774 ac_cv_prog_cc_cross=no
776 ac_cv_prog_cc_cross=yes
779 echo "configure: failed program was:" >&5
780 cat conftest.$ac_ext >&5
781 ac_cv_prog_cc_works=no
785 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
786 ac_cpp='$CPP $CPPFLAGS'
787 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
788 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
789 cross_compiling=$ac_cv_prog_cc_cross
791 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
792 if test $ac_cv_prog_cc_works = no; then
793 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
795 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
796 echo "configure:797: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
797 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
798 cross_compiling=$ac_cv_prog_cc_cross
800 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
801 echo "configure:802: checking whether we are using GNU C" >&5
802 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
803 echo $ac_n "(cached) $ac_c" 1>&6
805 cat > conftest.c <<EOF
810 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
817 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
819 if test $ac_cv_prog_gcc = yes; then
825 ac_test_CFLAGS="${CFLAGS+set}"
826 ac_save_CFLAGS="$CFLAGS"
828 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
829 echo "configure:830: checking whether ${CC-cc} accepts -g" >&5
830 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
831 echo $ac_n "(cached) $ac_c" 1>&6
833 echo 'void f(){}' > conftest.c
834 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
843 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
844 if test "$ac_test_CFLAGS" = set; then
845 CFLAGS="$ac_save_CFLAGS"
846 elif test $ac_cv_prog_cc_g = yes; then
847 if test "$GCC" = yes; then
853 if test "$GCC" = yes; then
860 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
861 echo "configure:862: checking how to run the C preprocessor" >&5
862 # On Suns, sometimes $CPP names a directory.
863 if test -n "$CPP" && test -d "$CPP"; then
866 if test -z "$CPP"; then
867 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
868 echo $ac_n "(cached) $ac_c" 1>&6
870 # This must be in double quotes, not single quotes, because CPP may get
871 # substituted into the Makefile and "${CC-cc}" will confuse make.
873 # On the NeXT, cc -E runs the code through the compiler's parser,
874 # not just through cpp.
875 cat > conftest.$ac_ext <<EOF
876 #line 877 "configure"
877 #include "confdefs.h"
881 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
882 { (eval echo configure:883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
883 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
884 if test -z "$ac_err"; then
888 echo "configure: failed program was:" >&5
889 cat conftest.$ac_ext >&5
891 CPP="${CC-cc} -E -traditional-cpp"
892 cat > conftest.$ac_ext <<EOF
893 #line 894 "configure"
894 #include "confdefs.h"
898 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
899 { (eval echo configure:900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
900 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
901 if test -z "$ac_err"; then
905 echo "configure: failed program was:" >&5
906 cat conftest.$ac_ext >&5
908 CPP="${CC-cc} -nologo -E"
909 cat > conftest.$ac_ext <<EOF
910 #line 911 "configure"
911 #include "confdefs.h"
915 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
916 { (eval echo configure:917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
917 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
918 if test -z "$ac_err"; then
922 echo "configure: failed program was:" >&5
923 cat conftest.$ac_ext >&5
932 ac_cv_prog_CPP="$CPP"
934 CPP="$ac_cv_prog_CPP"
936 ac_cv_prog_CPP="$CPP"
938 echo "$ac_t""$CPP" 1>&6
942 CC_SHARED_OPTS=unknown
945 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
946 DFT_UPR_MODEL="NORMAL"
947 ECHO_LINK='@ echo linking $@ ... ;'
972 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
973 echo "configure:974: checking for Cygwin environment" >&5
974 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
975 echo $ac_n "(cached) $ac_c" 1>&6
977 cat > conftest.$ac_ext <<EOF
978 #line 979 "configure"
979 #include "confdefs.h"
984 #define __CYGWIN__ __CYGWIN32__
989 if { (eval echo configure:990: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
993 echo "configure: failed program was:" >&5
994 cat conftest.$ac_ext >&5
1002 echo "$ac_t""$ac_cv_cygwin" 1>&6
1004 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1005 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1006 echo "configure:1007: checking for mingw32 environment" >&5
1007 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1008 echo $ac_n "(cached) $ac_c" 1>&6
1010 cat > conftest.$ac_ext <<EOF
1011 #line 1012 "configure"
1012 #include "confdefs.h"
1018 if { (eval echo configure:1019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1022 echo "configure: failed program was:" >&5
1023 cat conftest.$ac_ext >&5
1031 echo "$ac_t""$ac_cv_mingw32" 1>&6
1033 test "$ac_cv_mingw32" = yes && MINGW32=yes
1036 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1037 echo "configure:1038: checking for executable suffix" >&5
1038 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1039 echo $ac_n "(cached) $ac_c" 1>&6
1041 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1045 echo 'int main () { return 0; }' > conftest.$ac_ext
1047 if { (eval echo configure:1048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1048 for file in conftest.*; do
1050 *.c | *.o | *.obj) ;;
1051 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1055 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1058 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1063 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1064 echo "$ac_t""${ac_cv_exeext}" 1>&6
1067 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1068 echo "configure:1069: checking for object suffix" >&5
1069 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1070 echo $ac_n "(cached) $ac_c" 1>&6
1073 echo 'int i = 1;' > conftest.$ac_ext
1074 if { (eval echo configure:1075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1075 for ac_file in conftest.*; do
1078 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1082 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1087 echo "$ac_t""$ac_cv_objext" 1>&6
1088 OBJEXT=$ac_cv_objext
1089 ac_objext=$ac_cv_objext
1092 echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
1093 echo "configure:1094: checking if we must define _GNU_SOURCE" >&5
1094 if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
1095 echo $ac_n "(cached) $ac_c" 1>&6
1098 cat > conftest.$ac_ext <<EOF
1099 #line 1100 "configure"
1100 #include "confdefs.h"
1101 #include <sys/types.h>
1104 #ifndef _XOPEN_SOURCE
1109 if { (eval echo configure:1110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1113 echo "configure: failed program was:" >&5
1114 cat conftest.$ac_ext >&5
1117 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1118 cat > conftest.$ac_ext <<EOF
1119 #line 1120 "configure"
1120 #include "confdefs.h"
1121 #include <sys/types.h>
1124 #ifdef _XOPEN_SOURCE
1129 if { (eval echo configure:1130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1133 echo "configure: failed program was:" >&5
1134 cat conftest.$ac_ext >&5
1136 cf_cv_gnu_source=yes
1146 echo "$ac_t""$cf_cv_gnu_source" 1>&6
1147 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1151 # Check whether --with-curses-dir or --without-curses-dir was given.
1152 if test "${with_curses_dir+set}" = set; then
1153 withval="$with_curses_dir"
1155 case ".$withval" in #(vi
1156 .\$\(*\)*|.\'*\'*) #(vi
1160 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
1163 eval withval="$withval"
1164 case ".$withval" in #(vi
1166 withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
1171 withval=`echo $withval | sed -e s%NONE%$ac_default_prefix%`
1174 { echo "configure: error: expected a pathname, not \"$withval\"" 1>&2; exit 1; }
1178 cf_cv_curses_dir=$withval
1186 # Check whether --with-5lib or --without-5lib was given.
1187 if test "${with_5lib+set}" = set; then
1188 withval="$with_5lib"
1189 LIBS="-L/usr/5lib $LIBS"
1190 CPPFLAGS="$CPPFLAGS -I/usr/5include"
1195 # Check whether --with-ncursesw or --without-ncursesw was given.
1196 if test "${with_ncursesw+set}" = set; then
1197 withval="$with_ncursesw"
1198 cf_cv_screen=ncursesw
1203 # Check whether --with-ncurses or --without-ncurses was given.
1204 if test "${with_ncurses+set}" = set; then
1205 withval="$with_ncurses"
1206 cf_cv_screen=ncurses
1210 case $cf_cv_screen in
1214 echo $ac_n "checking for extra include directories""... $ac_c" 1>&6
1215 echo "configure:1216: checking for extra include directories" >&5
1216 if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then
1217 echo $ac_n "(cached) $ac_c" 1>&6
1220 cf_cv_curses_incdir=no
1221 case $host_os in #(vi
1222 hpux10.*|hpux11.*) #(vi
1223 test -d /usr/include/curses_colr && \
1224 cf_cv_curses_incdir="-I/usr/include/curses_colr"
1227 test -d /usr/5lib && \
1228 test -d /usr/5include && \
1229 cf_cv_curses_incdir="-I/usr/5include"
1235 echo "$ac_t""$cf_cv_curses_incdir" 1>&6
1236 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$cf_cv_curses_incdir $CPPFLAGS"
1238 echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
1239 echo "configure:1240: checking if we have identified curses headers" >&5
1240 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
1241 echo $ac_n "(cached) $ac_c" 1>&6
1244 cf_cv_ncurses_header=none
1251 cat > conftest.$ac_ext <<EOF
1252 #line 1253 "configure"
1253 #include "confdefs.h"
1254 #include <${cf_header}>
1256 initscr(); tgoto("?", 0,0)
1259 if { (eval echo configure:1260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1261 cf_cv_ncurses_header=$cf_header; break
1263 echo "configure: failed program was:" >&5
1264 cat conftest.$ac_ext >&5
1271 echo "$ac_t""$cf_cv_ncurses_header" 1>&6
1273 if test "$cf_cv_ncurses_header" = none ; then
1274 { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
1277 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
1278 for ac_hdr in $cf_cv_ncurses_header
1280 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
1281 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
1282 echo "configure:1283: checking for $ac_hdr" >&5
1283 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
1284 echo $ac_n "(cached) $ac_c" 1>&6
1286 cat > conftest.$ac_ext <<EOF
1287 #line 1288 "configure"
1288 #include "confdefs.h"
1291 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1292 { (eval echo configure:1293: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1293 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1294 if test -z "$ac_err"; then
1296 eval "ac_cv_header_$ac_safe=yes"
1299 echo "configure: failed program was:" >&5
1300 cat conftest.$ac_ext >&5
1302 eval "ac_cv_header_$ac_safe=no"
1306 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
1307 echo "$ac_t""yes" 1>&6
1308 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
1309 cat >> confdefs.h <<EOF
1310 #define $ac_tr_hdr 1
1314 echo "$ac_t""no" 1>&6
1321 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
1322 echo "configure:1323: checking for ncurses version" >&5
1323 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
1324 echo $ac_n "(cached) $ac_c" 1>&6
1327 cf_cv_ncurses_version=no
1330 if test "$cross_compiling" = yes; then
1333 # This will not work if the preprocessor splits the line after the
1334 # Autoconf token. The 'unproto' program does that.
1335 cat > conftest.$ac_ext <<EOF
1336 #include <${cf_cv_ncurses_header-curses.h}>
1338 #ifdef NCURSES_VERSION
1339 Autoconf NCURSES_VERSION
1347 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
1348 { (eval echo configure:1349: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
1349 if test -f conftest.out ; then
1350 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
1351 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
1356 cat > conftest.$ac_ext <<EOF
1357 #line 1358 "configure"
1358 #include "confdefs.h"
1360 #include <${cf_cv_ncurses_header-curses.h}>
1364 FILE *fp = fopen("$cf_tempfile", "w");
1365 #ifdef NCURSES_VERSION
1366 # ifdef NCURSES_VERSION_PATCH
1367 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
1369 fprintf(fp, "%s\n", NCURSES_VERSION);
1373 fprintf(fp, "old\n");
1381 if { (eval echo configure:1382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
1384 cf_cv_ncurses_version=`cat $cf_tempfile`
1386 echo "configure: failed program was:" >&5
1387 cat conftest.$ac_ext >&5
1396 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
1397 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
1404 echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
1405 echo "configure:1406: checking if we have identified curses libraries" >&5
1406 cat > conftest.$ac_ext <<EOF
1407 #line 1408 "configure"
1408 #include "confdefs.h"
1409 #include <${cf_cv_ncurses_header-curses.h}>
1411 initscr(); tgoto("?", 0,0)
1414 if { (eval echo configure:1415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1418 echo "configure: failed program was:" >&5
1419 cat conftest.$ac_ext >&5
1424 echo "$ac_t""$cf_result" 1>&6
1426 if test "$cf_result" = no ; then
1427 case $host_os in #(vi
1429 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
1430 echo "configure:1431: checking for tgoto in -lmytinfo" >&5
1431 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
1432 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1433 echo $ac_n "(cached) $ac_c" 1>&6
1435 ac_save_LIBS="$LIBS"
1436 LIBS="-lmytinfo $LIBS"
1437 cat > conftest.$ac_ext <<EOF
1438 #line 1439 "configure"
1439 #include "confdefs.h"
1440 /* Override any gcc2 internal prototype to avoid an error. */
1441 /* We use char because int might match the return type of a gcc2
1442 builtin and then its argument prototype would still apply. */
1449 if { (eval echo configure:1450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1451 eval "ac_cv_lib_$ac_lib_var=yes"
1453 echo "configure: failed program was:" >&5
1454 cat conftest.$ac_ext >&5
1456 eval "ac_cv_lib_$ac_lib_var=no"
1459 LIBS="$ac_save_LIBS"
1462 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1463 echo "$ac_t""yes" 1>&6
1464 LIBS="-lmytinfo $LIBS"
1466 echo "$ac_t""no" 1>&6
1470 hpux10.*|hpux11.*) #(vi
1471 echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
1472 echo "configure:1473: checking for initscr in -lcur_colr" >&5
1473 ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
1474 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1475 echo $ac_n "(cached) $ac_c" 1>&6
1477 ac_save_LIBS="$LIBS"
1478 LIBS="-lcur_colr $LIBS"
1479 cat > conftest.$ac_ext <<EOF
1480 #line 1481 "configure"
1481 #include "confdefs.h"
1482 /* Override any gcc2 internal prototype to avoid an error. */
1483 /* We use char because int might match the return type of a gcc2
1484 builtin and then its argument prototype would still apply. */
1491 if { (eval echo configure:1492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1493 eval "ac_cv_lib_$ac_lib_var=yes"
1495 echo "configure: failed program was:" >&5
1496 cat conftest.$ac_ext >&5
1498 eval "ac_cv_lib_$ac_lib_var=no"
1501 LIBS="$ac_save_LIBS"
1504 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1505 echo "$ac_t""yes" 1>&6
1507 LIBS="-lcur_colr $LIBS"
1508 ac_cv_func_initscr=yes
1511 echo "$ac_t""no" 1>&6
1513 echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
1514 echo "configure:1515: checking for initscr in -lHcurses" >&5
1515 ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
1516 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1517 echo $ac_n "(cached) $ac_c" 1>&6
1519 ac_save_LIBS="$LIBS"
1520 LIBS="-lHcurses $LIBS"
1521 cat > conftest.$ac_ext <<EOF
1522 #line 1523 "configure"
1523 #include "confdefs.h"
1524 /* Override any gcc2 internal prototype to avoid an error. */
1525 /* We use char because int might match the return type of a gcc2
1526 builtin and then its argument prototype would still apply. */
1533 if { (eval echo configure:1534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1535 eval "ac_cv_lib_$ac_lib_var=yes"
1537 echo "configure: failed program was:" >&5
1538 cat conftest.$ac_ext >&5
1540 eval "ac_cv_lib_$ac_lib_var=no"
1543 LIBS="$ac_save_LIBS"
1546 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1547 echo "$ac_t""yes" 1>&6
1549 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
1550 LIBS="-lHcurses $LIBS"
1551 CPPFLAGS="-D__HP_CURSES -D_HP_CURSES $CPPFLAGS"
1552 ac_cv_func_initscr=yes
1555 echo "$ac_t""no" 1>&6
1561 linux*) # Suse Linux does not follow /usr/lib convention
1565 test -d /usr/5lib && \
1566 LIBS="$LIBS -L/usr/5lib -lcurses -ltermcap"
1567 ac_cv_func_initscr=yes
1571 if test ".$ac_cv_func_initscr" != .yes ; then
1572 cf_save_LIBS="$LIBS"
1576 if test ".${cf_cv_ncurses_version-no}" != .no
1578 cf_check_list="ncurses curses cursesX"
1580 cf_check_list="cursesX curses ncurses"
1583 # Check for library containing tgoto. Do this before curses library
1584 # because it may be needed to link the test-case for initscr.
1585 echo $ac_n "checking for tgoto""... $ac_c" 1>&6
1586 echo "configure:1587: checking for tgoto" >&5
1587 if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
1588 echo $ac_n "(cached) $ac_c" 1>&6
1590 cat > conftest.$ac_ext <<EOF
1591 #line 1592 "configure"
1592 #include "confdefs.h"
1593 /* System header to define __stub macros and hopefully few prototypes,
1594 which can conflict with char tgoto(); below. */
1596 /* Override any gcc2 internal prototype to avoid an error. */
1597 /* We use char because int might match the return type of a gcc2
1598 builtin and then its argument prototype would still apply. */
1603 /* The GNU C library defines this for functions which it implements
1604 to always fail with ENOSYS. Some functions are actually named
1605 something starting with __ and the normal name is an alias. */
1606 #if defined (__stub_tgoto) || defined (__stub___tgoto)
1614 if { (eval echo configure:1615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1616 eval "ac_cv_func_tgoto=yes"
1618 echo "configure: failed program was:" >&5
1619 cat conftest.$ac_ext >&5
1621 eval "ac_cv_func_tgoto=no"
1626 if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then
1627 echo "$ac_t""yes" 1>&6
1628 cf_term_lib=predefined
1630 echo "$ac_t""no" 1>&6
1632 for cf_term_lib in $cf_check_list termcap termlib unknown
1634 echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
1635 echo "configure:1636: checking for tgoto in -l$cf_term_lib" >&5
1636 ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
1637 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1638 echo $ac_n "(cached) $ac_c" 1>&6
1640 ac_save_LIBS="$LIBS"
1641 LIBS="-l$cf_term_lib $LIBS"
1642 cat > conftest.$ac_ext <<EOF
1643 #line 1644 "configure"
1644 #include "confdefs.h"
1645 /* Override any gcc2 internal prototype to avoid an error. */
1646 /* We use char because int might match the return type of a gcc2
1647 builtin and then its argument prototype would still apply. */
1654 if { (eval echo configure:1655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1656 eval "ac_cv_lib_$ac_lib_var=yes"
1658 echo "configure: failed program was:" >&5
1659 cat conftest.$ac_ext >&5
1661 eval "ac_cv_lib_$ac_lib_var=no"
1664 LIBS="$ac_save_LIBS"
1667 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1668 echo "$ac_t""yes" 1>&6
1671 echo "$ac_t""no" 1>&6
1679 # Check for library containing initscr
1680 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
1681 for cf_curs_lib in $cf_check_list xcurses jcurses unknown
1683 echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
1684 echo "configure:1685: checking for initscr in -l$cf_curs_lib" >&5
1685 ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
1686 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
1687 echo $ac_n "(cached) $ac_c" 1>&6
1689 ac_save_LIBS="$LIBS"
1690 LIBS="-l$cf_curs_lib $LIBS"
1691 cat > conftest.$ac_ext <<EOF
1692 #line 1693 "configure"
1693 #include "confdefs.h"
1694 /* Override any gcc2 internal prototype to avoid an error. */
1695 /* We use char because int might match the return type of a gcc2
1696 builtin and then its argument prototype would still apply. */
1703 if { (eval echo configure:1704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1705 eval "ac_cv_lib_$ac_lib_var=yes"
1707 echo "configure: failed program was:" >&5
1708 cat conftest.$ac_ext >&5
1710 eval "ac_cv_lib_$ac_lib_var=no"
1713 LIBS="$ac_save_LIBS"
1716 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
1717 echo "$ac_t""yes" 1>&6
1720 echo "$ac_t""no" 1>&6
1724 test $cf_curs_lib = unknown && { echo "configure: error: no curses library found" 1>&2; exit 1; }
1726 LIBS="-l$cf_curs_lib $cf_save_LIBS"
1727 if test "$cf_term_lib" = unknown ; then
1728 echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
1729 echo "configure:1730: checking if we can link with $cf_curs_lib library" >&5
1730 cat > conftest.$ac_ext <<EOF
1731 #line 1732 "configure"
1732 #include "confdefs.h"
1733 #include <${cf_cv_ncurses_header-curses.h}>
1738 if { (eval echo configure:1739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1742 echo "configure: failed program was:" >&5
1743 cat conftest.$ac_ext >&5
1748 echo "$ac_t""$cf_result" 1>&6
1749 test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; }
1750 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
1752 elif test "$cf_term_lib" != predefined ; then
1753 echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
1754 echo "configure:1755: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
1755 cat > conftest.$ac_ext <<EOF
1756 #line 1757 "configure"
1757 #include "confdefs.h"
1758 #include <${cf_cv_ncurses_header-curses.h}>
1760 initscr(); tgoto((char *)0, 0, 0);
1763 if { (eval echo configure:1764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1767 echo "configure: failed program was:" >&5
1768 cat conftest.$ac_ext >&5
1771 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
1772 cat > conftest.$ac_ext <<EOF
1773 #line 1774 "configure"
1774 #include "confdefs.h"
1775 #include <${cf_cv_ncurses_header-curses.h}>
1780 if { (eval echo configure:1781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1784 echo "configure: failed program was:" >&5
1785 cat conftest.$ac_ext >&5
1793 echo "$ac_t""$cf_result" 1>&6
1803 cf_ncuhdr_root=ncurses
1805 test -n "$cf_cv_curses_dir" && \
1806 test "$cf_cv_curses_dir" != "no" && \
1807 CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
1809 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
1810 echo "configure:1811: checking for $cf_ncuhdr_root header in include-path" >&5
1811 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
1812 echo $ac_n "(cached) $ac_c" 1>&6
1815 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
1816 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
1817 for cf_header in $cf_header_list
1820 cat > conftest.$ac_ext <<EOF
1821 #line 1822 "configure"
1822 #include "confdefs.h"
1825 #include <$cf_header>
1828 #ifdef NCURSES_VERSION
1830 printf("%s\n", NCURSES_VERSION);
1842 if { (eval echo configure:1843: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1844 cf_cv_ncurses_h=$cf_header
1847 echo "configure: failed program was:" >&5
1848 cat conftest.$ac_ext >&5
1854 test "$cf_cv_ncurses_h" != no && break
1859 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
1861 if test "$cf_cv_ncurses_h" != no ; then
1862 cf_cv_ncurses_header=$cf_cv_ncurses_h
1864 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
1865 echo "configure:1866: checking for $cf_ncuhdr_root include-path" >&5
1866 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
1867 echo $ac_n "(cached) $ac_c" 1>&6
1870 test -n "$verbose" && echo
1874 test -n "$verbose" && echo " ... testing include-directories under $HOME"
1875 test -d $HOME/include && cf_search="$cf_search $HOME/include"
1876 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
1877 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
1880 # For other stuff under the home directory, it should be sufficient to put
1881 # a symbolic link for $HOME/$cf_ncuhdr_root to the actual package location:
1882 test -d $HOME/$cf_ncuhdr_root && {
1883 test -n "$verbose" && echo " ... testing include-directories under $HOME/$cf_ncuhdr_root"
1884 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
1885 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
1888 test "$prefix" != /usr/local && \
1889 test -d /usr/local && {
1890 test -n "$verbose" && echo " ... testing include-directories under /usr/local"
1891 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
1892 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
1893 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
1894 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
1895 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
1898 test "$prefix" != NONE && \
1899 test -d $prefix && {
1900 test -n "$verbose" && echo " ... testing include-directories under $prefix"
1901 test -d $prefix/include && cf_search="$cf_search $prefix/include"
1902 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
1903 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
1904 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
1905 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
1908 test "$prefix" != /opt && \
1910 test -n "$verbose" && echo " ... testing include-directories under /opt"
1911 test -d /opt/include && cf_search="$cf_search /opt/include"
1912 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
1913 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
1914 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
1915 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
1918 test "$prefix" != /usr && \
1920 test -n "$verbose" && echo " ... testing include-directories under /usr"
1921 test -d /usr/include && cf_search="$cf_search /usr/include"
1922 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
1923 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
1924 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
1927 test "$includedir" != NONE && \
1928 test "$includedir" != "/usr/include" && \
1929 test -d "$includedir" && {
1930 test -d $includedir && cf_search="$cf_search $includedir"
1931 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
1934 test "$oldincludedir" != NONE && \
1935 test "$oldincludedir" != "/usr/include" && \
1936 test -d "$oldincludedir" && {
1937 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
1938 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
1942 test -n "$verbose" && echo search path $cf_search
1943 cf_save2_CPPFLAGS="$CPPFLAGS"
1944 for cf_incdir in $cf_search
1947 for cf_add_incdir in $cf_incdir
1951 case $cf_add_incdir in
1954 /usr/local/include) # (vi
1955 if test "$GCC" = yes
1957 cf_save_CPPFLAGS="$CPPFLAGS"
1958 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
1959 cat > conftest.$ac_ext <<EOF
1960 #line 1961 "configure"
1961 #include "confdefs.h"
1967 if { (eval echo configure:1968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1970 echo "configure: failed program was:" >&5
1971 cat conftest.$ac_ext >&5
1973 CPPFLAGS="$cf_save_CPPFLAGS"
1979 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
1982 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
1983 test "$cf_top_incdir" = "$cf_add_incdir" && break
1984 cf_add_incdir="$cf_top_incdir"
1993 cat > conftest.$ac_ext <<EOF
1994 #line 1995 "configure"
1995 #include "confdefs.h"
1998 #include <$cf_header>
2001 #ifdef NCURSES_VERSION
2003 printf("%s\n", NCURSES_VERSION);
2015 if { (eval echo configure:2016: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2017 cf_cv_ncurses_h2=$cf_header
2020 echo "configure: failed program was:" >&5
2021 cat conftest.$ac_ext >&5
2027 if test "$cf_cv_ncurses_h2" != no ; then
2028 cf_cv_ncurses_h2=$cf_incdir/$cf_header
2029 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
2032 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
2034 CPPFLAGS="$cf_save2_CPPFLAGS"
2035 test "$cf_cv_ncurses_h2" != no && break
2037 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
2041 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
2043 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
2044 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
2045 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
2046 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
2049 for cf_add_incdir in $cf_1st_incdir
2053 case $cf_add_incdir in
2056 /usr/local/include) # (vi
2057 if test "$GCC" = yes
2059 cf_save_CPPFLAGS="$CPPFLAGS"
2060 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
2061 cat > conftest.$ac_ext <<EOF
2062 #line 2063 "configure"
2063 #include "confdefs.h"
2069 if { (eval echo configure:2070: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2072 echo "configure: failed program was:" >&5
2073 cat conftest.$ac_ext >&5
2075 CPPFLAGS="$cf_save_CPPFLAGS"
2081 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
2084 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
2085 test "$cf_top_incdir" = "$cf_add_incdir" && break
2086 cf_add_incdir="$cf_top_incdir"
2093 cat >> confdefs.h <<\EOF
2098 case $cf_cv_ncurses_header in # (vi
2100 cat >> confdefs.h <<\EOF
2101 #define HAVE_NCURSES_H 1
2107 case $cf_cv_ncurses_header in # (vi
2108 ncurses/curses.h|ncurses/ncurses.h)
2109 cat >> confdefs.h <<\EOF
2110 #define HAVE_NCURSES_NCURSES_H 1
2114 ncursesw/curses.h|ncursesw/ncurses.h)
2115 cat >> confdefs.h <<\EOF
2116 #define HAVE_NCURSESW_NCURSES_H 1
2123 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
2124 echo "configure:2125: checking for ncurses version" >&5
2125 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
2126 echo $ac_n "(cached) $ac_c" 1>&6
2129 cf_cv_ncurses_version=no
2132 if test "$cross_compiling" = yes; then
2135 # This will not work if the preprocessor splits the line after the
2136 # Autoconf token. The 'unproto' program does that.
2137 cat > conftest.$ac_ext <<EOF
2138 #include <${cf_cv_ncurses_header-curses.h}>
2140 #ifdef NCURSES_VERSION
2141 Autoconf NCURSES_VERSION
2149 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
2150 { (eval echo configure:2151: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
2151 if test -f conftest.out ; then
2152 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
2153 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
2158 cat > conftest.$ac_ext <<EOF
2159 #line 2160 "configure"
2160 #include "confdefs.h"
2162 #include <${cf_cv_ncurses_header-curses.h}>
2166 FILE *fp = fopen("$cf_tempfile", "w");
2167 #ifdef NCURSES_VERSION
2168 # ifdef NCURSES_VERSION_PATCH
2169 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
2171 fprintf(fp, "%s\n", NCURSES_VERSION);
2175 fprintf(fp, "old\n");
2183 if { (eval echo configure:2184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2186 cf_cv_ncurses_version=`cat $cf_tempfile`
2188 echo "configure: failed program was:" >&5
2189 cat conftest.$ac_ext >&5
2198 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
2199 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
2207 cf_nculib_root=ncurses
2208 # This works, except for the special case where we find gpm, but
2209 # ncurses is in a nonstandard location via $LIBS, and we really want
2212 cf_ncurses_SAVE="$LIBS"
2213 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
2214 echo "configure:2215: checking for Gpm_Open in -lgpm" >&5
2215 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
2216 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2217 echo $ac_n "(cached) $ac_c" 1>&6
2219 ac_save_LIBS="$LIBS"
2221 cat > conftest.$ac_ext <<EOF
2222 #line 2223 "configure"
2223 #include "confdefs.h"
2224 /* Override any gcc2 internal prototype to avoid an error. */
2225 /* We use char because int might match the return type of a gcc2
2226 builtin and then its argument prototype would still apply. */
2233 if { (eval echo configure:2234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2235 eval "ac_cv_lib_$ac_lib_var=yes"
2237 echo "configure: failed program was:" >&5
2238 cat conftest.$ac_ext >&5
2240 eval "ac_cv_lib_$ac_lib_var=no"
2243 LIBS="$ac_save_LIBS"
2246 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2247 echo "$ac_t""yes" 1>&6
2248 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
2249 echo "configure:2250: checking for initscr in -lgpm" >&5
2250 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
2251 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2252 echo $ac_n "(cached) $ac_c" 1>&6
2254 ac_save_LIBS="$LIBS"
2256 cat > conftest.$ac_ext <<EOF
2257 #line 2258 "configure"
2258 #include "confdefs.h"
2259 /* Override any gcc2 internal prototype to avoid an error. */
2260 /* We use char because int might match the return type of a gcc2
2261 builtin and then its argument prototype would still apply. */
2268 if { (eval echo configure:2269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2270 eval "ac_cv_lib_$ac_lib_var=yes"
2272 echo "configure: failed program was:" >&5
2273 cat conftest.$ac_ext >&5
2275 eval "ac_cv_lib_$ac_lib_var=no"
2278 LIBS="$ac_save_LIBS"
2281 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2282 echo "$ac_t""yes" 1>&6
2283 LIBS="$cf_ncurses_SAVE"
2285 echo "$ac_t""no" 1>&6
2286 cf_ncurses_LIBS="-lgpm"
2290 echo "$ac_t""no" 1>&6
2294 case $host_os in #(vi
2296 # This is only necessary if you are linking against an obsolete
2297 # version of ncurses (but it should do no harm, since it's static).
2298 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
2299 echo "configure:2300: checking for tgoto in -lmytinfo" >&5
2300 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
2301 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2302 echo $ac_n "(cached) $ac_c" 1>&6
2304 ac_save_LIBS="$LIBS"
2305 LIBS="-lmytinfo $LIBS"
2306 cat > conftest.$ac_ext <<EOF
2307 #line 2308 "configure"
2308 #include "confdefs.h"
2309 /* Override any gcc2 internal prototype to avoid an error. */
2310 /* We use char because int might match the return type of a gcc2
2311 builtin and then its argument prototype would still apply. */
2318 if { (eval echo configure:2319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2320 eval "ac_cv_lib_$ac_lib_var=yes"
2322 echo "configure: failed program was:" >&5
2323 cat conftest.$ac_ext >&5
2325 eval "ac_cv_lib_$ac_lib_var=no"
2328 LIBS="$ac_save_LIBS"
2331 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2332 echo "$ac_t""yes" 1>&6
2333 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
2335 echo "$ac_t""no" 1>&6
2341 LIBS="$cf_ncurses_LIBS $LIBS"
2343 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
2345 LIBS="-L$cf_cv_curses_dir/lib -l$cf_nculib_root $LIBS"
2348 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
2350 echo $ac_n "checking for initscr""... $ac_c" 1>&6
2351 echo "configure:2352: checking for initscr" >&5
2352 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
2353 echo $ac_n "(cached) $ac_c" 1>&6
2355 cat > conftest.$ac_ext <<EOF
2356 #line 2357 "configure"
2357 #include "confdefs.h"
2358 /* System header to define __stub macros and hopefully few prototypes,
2359 which can conflict with char initscr(); below. */
2361 /* Override any gcc2 internal prototype to avoid an error. */
2362 /* We use char because int might match the return type of a gcc2
2363 builtin and then its argument prototype would still apply. */
2368 /* The GNU C library defines this for functions which it implements
2369 to always fail with ENOSYS. Some functions are actually named
2370 something starting with __ and the normal name is an alias. */
2371 #if defined (__stub_initscr) || defined (__stub___initscr)
2379 if { (eval echo configure:2380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2381 eval "ac_cv_func_initscr=yes"
2383 echo "configure: failed program was:" >&5
2384 cat conftest.$ac_ext >&5
2386 eval "ac_cv_func_initscr=no"
2391 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
2392 echo "$ac_t""yes" 1>&6
2393 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
2395 echo "$ac_t""no" 1>&6
2397 cf_save_LIBS="$LIBS"
2398 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
2399 echo "configure:2400: checking for initscr in -l$cf_nculib_root" >&5
2400 LIBS="-l$cf_nculib_root $LIBS"
2401 cat > conftest.$ac_ext <<EOF
2402 #line 2403 "configure"
2403 #include "confdefs.h"
2404 #include <${cf_cv_ncurses_header-curses.h}>
2409 if { (eval echo configure:2410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2411 echo "$ac_t""yes" 1>&6
2412 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
2415 echo "configure: failed program was:" >&5
2416 cat conftest.$ac_ext >&5
2418 echo "$ac_t""no" 1>&6
2422 test -n "$verbose" && echo " ... testing lib-directories under $HOME"
2423 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
2424 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
2425 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
2428 # For other stuff under the home directory, it should be sufficient to put
2429 # a symbolic link for $HOME/$cf_nculib_root to the actual package location:
2430 test -d $HOME/$cf_nculib_root && {
2431 test -n "$verbose" && echo " ... testing lib-directories under $HOME/$cf_nculib_root"
2432 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
2433 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
2436 test "$prefix" != /usr/local && \
2437 test -d /usr/local && {
2438 test -n "$verbose" && echo " ... testing lib-directories under /usr/local"
2439 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
2440 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
2441 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
2442 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
2443 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
2446 test "$prefix" != NONE && \
2447 test -d $prefix && {
2448 test -n "$verbose" && echo " ... testing lib-directories under $prefix"
2449 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
2450 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
2451 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
2452 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
2453 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
2456 test "$prefix" != /opt && \
2458 test -n "$verbose" && echo " ... testing lib-directories under /opt"
2459 test -d /opt/lib && cf_search="$cf_search /opt/lib"
2460 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
2461 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
2462 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
2463 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
2466 test "$prefix" != /usr && \
2468 test -n "$verbose" && echo " ... testing lib-directories under /usr"
2469 test -d /usr/lib && cf_search="$cf_search /usr/lib"
2470 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
2471 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
2472 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
2475 for cf_libdir in $cf_search
2477 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
2478 echo "configure:2479: checking for -l$cf_nculib_root in $cf_libdir" >&5
2479 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
2480 cat > conftest.$ac_ext <<EOF
2481 #line 2482 "configure"
2482 #include "confdefs.h"
2483 #include <${cf_cv_ncurses_header-curses.h}>
2488 if { (eval echo configure:2489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2490 echo "$ac_t""yes" 1>&6
2491 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
2494 echo "configure: failed program was:" >&5
2495 cat conftest.$ac_ext >&5
2497 echo "$ac_t""no" 1>&6
2498 LIBS="$cf_save_LIBS"
2508 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
2510 if test $cf_found_library = no ; then
2511 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
2517 if test -n "$cf_ncurses_LIBS" ; then
2518 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
2519 echo "configure:2520: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
2520 cf_ncurses_SAVE="$LIBS"
2521 for p in $cf_ncurses_LIBS ; do
2522 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
2523 if test "$q" != "$LIBS" ; then
2527 cat > conftest.$ac_ext <<EOF
2528 #line 2529 "configure"
2529 #include "confdefs.h"
2530 #include <${cf_cv_ncurses_header-curses.h}>
2532 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
2535 if { (eval echo configure:2536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2537 echo "$ac_t""yes" 1>&6
2539 echo "configure: failed program was:" >&5
2540 cat conftest.$ac_ext >&5
2542 echo "$ac_t""no" 1>&6
2543 LIBS="$cf_ncurses_SAVE"
2549 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2551 cat >> confdefs.h <<EOF
2552 #define $cf_nculib_ROOT 1
2561 echo $ac_n "checking for multibyte character support""... $ac_c" 1>&6
2562 echo "configure:2563: checking for multibyte character support" >&5
2563 if eval "test \"`echo '$''{'cf_cv_utf8_lib'+set}'`\" = set"; then
2564 echo $ac_n "(cached) $ac_c" 1>&6
2567 cf_save_LIBS="$LIBS"
2568 cat > conftest.$ac_ext <<EOF
2569 #line 2570 "configure"
2570 #include "confdefs.h"
2577 if { (eval echo configure:2578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2581 echo "configure: failed program was:" >&5
2582 cat conftest.$ac_ext >&5
2585 cat > conftest.$ac_ext <<EOF
2586 #line 2587 "configure"
2587 #include "confdefs.h"
2589 #include <libutf8.h>
2594 if { (eval echo configure:2595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2596 cf_cv_utf8_lib=add-on
2598 echo "configure: failed program was:" >&5
2599 cat conftest.$ac_ext >&5
2604 LIBS="$cf_save_LIBS"
2610 echo "$ac_t""$cf_cv_utf8_lib" 1>&6
2612 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
2614 if test "$cf_cv_utf8_lib" = "add-on" ; then
2615 cat >> confdefs.h <<\EOF
2616 #define HAVE_LIBUTF8_H 1
2623 echo $ac_n "checking if we must define _XOPEN_SOURCE""... $ac_c" 1>&6
2624 echo "configure:2625: checking if we must define _XOPEN_SOURCE" >&5
2625 cat > conftest.$ac_ext <<EOF
2626 #line 2627 "configure"
2627 #include "confdefs.h"
2628 #include <sys/types.h>
2632 #ifndef _XOPEN_SOURCE
2637 if { (eval echo configure:2638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2641 echo "configure: failed program was:" >&5
2642 cat conftest.$ac_ext >&5
2647 echo "$ac_t""$cf_result" 1>&6
2649 if test "$cf_result" = yes ; then
2650 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
2651 elif test "x500" != "x" ; then
2652 echo $ac_n "checking checking for compatible value versus 500""... $ac_c" 1>&6
2653 echo "configure:2654: checking checking for compatible value versus 500" >&5
2654 cat > conftest.$ac_ext <<EOF
2655 #line 2656 "configure"
2656 #include "confdefs.h"
2657 #include <sys/types.h>
2661 #if _XOPEN_SOURCE-500 < 0
2666 if { (eval echo configure:2667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2670 echo "configure: failed program was:" >&5
2671 cat conftest.$ac_ext >&5
2676 echo "$ac_t""$cf_result" 1>&6
2677 if test "$cf_result" = no ; then
2678 # perhaps we can override it - try...
2679 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=500"
2684 echo $ac_n "checking if we must define _XOPEN_SOURCE_EXTENDED""... $ac_c" 1>&6
2685 echo "configure:2686: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
2686 cat > conftest.$ac_ext <<EOF
2687 #line 2688 "configure"
2688 #include "confdefs.h"
2689 #include <sys/types.h>
2693 #ifndef _XOPEN_SOURCE_EXTENDED
2698 if { (eval echo configure:2699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2702 echo "configure: failed program was:" >&5
2703 cat conftest.$ac_ext >&5
2708 echo "$ac_t""$cf_result" 1>&6
2710 if test "$cf_result" = yes ; then
2711 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
2712 elif test "x" != "x" ; then
2713 echo $ac_n "checking checking for compatible value versus ""... $ac_c" 1>&6
2714 echo "configure:2715: checking checking for compatible value versus " >&5
2715 cat > conftest.$ac_ext <<EOF
2716 #line 2717 "configure"
2717 #include "confdefs.h"
2718 #include <sys/types.h>
2722 #if _XOPEN_SOURCE_EXTENDED- < 0
2727 if { (eval echo configure:2728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2731 echo "configure: failed program was:" >&5
2732 cat conftest.$ac_ext >&5
2737 echo "$ac_t""$cf_result" 1>&6
2738 if test "$cf_result" = no ; then
2739 # perhaps we can override it - try...
2740 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
2746 cf_ncuhdr_root=ncursesw
2748 test -n "$cf_cv_curses_dir" && \
2749 test "$cf_cv_curses_dir" != "no" && \
2750 CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
2752 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
2753 echo "configure:2754: checking for $cf_ncuhdr_root header in include-path" >&5
2754 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
2755 echo $ac_n "(cached) $ac_c" 1>&6
2758 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
2759 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
2760 for cf_header in $cf_header_list
2763 cat > conftest.$ac_ext <<EOF
2764 #line 2765 "configure"
2765 #include "confdefs.h"
2768 #define _XOPEN_SOURCE_EXTENDED
2769 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
2770 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
2772 #include <$cf_header>
2775 #ifdef NCURSES_VERSION
2781 printf("%s\n", NCURSES_VERSION);
2793 if { (eval echo configure:2794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2795 cf_cv_ncurses_h=$cf_header
2798 echo "configure: failed program was:" >&5
2799 cat conftest.$ac_ext >&5
2805 test "$cf_cv_ncurses_h" != no && break
2810 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
2812 if test "$cf_cv_ncurses_h" != no ; then
2813 cf_cv_ncurses_header=$cf_cv_ncurses_h
2815 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
2816 echo "configure:2817: checking for $cf_ncuhdr_root include-path" >&5
2817 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
2818 echo $ac_n "(cached) $ac_c" 1>&6
2821 test -n "$verbose" && echo
2825 test -n "$verbose" && echo " ... testing include-directories under $HOME"
2826 test -d $HOME/include && cf_search="$cf_search $HOME/include"
2827 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
2828 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
2831 # For other stuff under the home directory, it should be sufficient to put
2832 # a symbolic link for $HOME/$cf_ncuhdr_root to the actual package location:
2833 test -d $HOME/$cf_ncuhdr_root && {
2834 test -n "$verbose" && echo " ... testing include-directories under $HOME/$cf_ncuhdr_root"
2835 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
2836 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
2839 test "$prefix" != /usr/local && \
2840 test -d /usr/local && {
2841 test -n "$verbose" && echo " ... testing include-directories under /usr/local"
2842 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
2843 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
2844 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
2845 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
2846 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
2849 test "$prefix" != NONE && \
2850 test -d $prefix && {
2851 test -n "$verbose" && echo " ... testing include-directories under $prefix"
2852 test -d $prefix/include && cf_search="$cf_search $prefix/include"
2853 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
2854 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
2855 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
2856 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
2859 test "$prefix" != /opt && \
2861 test -n "$verbose" && echo " ... testing include-directories under /opt"
2862 test -d /opt/include && cf_search="$cf_search /opt/include"
2863 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
2864 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
2865 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
2866 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
2869 test "$prefix" != /usr && \
2871 test -n "$verbose" && echo " ... testing include-directories under /usr"
2872 test -d /usr/include && cf_search="$cf_search /usr/include"
2873 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
2874 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
2875 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
2878 test "$includedir" != NONE && \
2879 test "$includedir" != "/usr/include" && \
2880 test -d "$includedir" && {
2881 test -d $includedir && cf_search="$cf_search $includedir"
2882 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
2885 test "$oldincludedir" != NONE && \
2886 test "$oldincludedir" != "/usr/include" && \
2887 test -d "$oldincludedir" && {
2888 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
2889 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
2893 test -n "$verbose" && echo search path $cf_search
2894 cf_save2_CPPFLAGS="$CPPFLAGS"
2895 for cf_incdir in $cf_search
2898 for cf_add_incdir in $cf_incdir
2902 case $cf_add_incdir in
2905 /usr/local/include) # (vi
2906 if test "$GCC" = yes
2908 cf_save_CPPFLAGS="$CPPFLAGS"
2909 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
2910 cat > conftest.$ac_ext <<EOF
2911 #line 2912 "configure"
2912 #include "confdefs.h"
2918 if { (eval echo configure:2919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2921 echo "configure: failed program was:" >&5
2922 cat conftest.$ac_ext >&5
2924 CPPFLAGS="$cf_save_CPPFLAGS"
2930 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
2933 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
2934 test "$cf_top_incdir" = "$cf_add_incdir" && break
2935 cf_add_incdir="$cf_top_incdir"
2944 cat > conftest.$ac_ext <<EOF
2945 #line 2946 "configure"
2946 #include "confdefs.h"
2949 #define _XOPEN_SOURCE_EXTENDED
2950 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
2951 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
2953 #include <$cf_header>
2956 #ifdef NCURSES_VERSION
2962 printf("%s\n", NCURSES_VERSION);
2974 if { (eval echo configure:2975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2976 cf_cv_ncurses_h2=$cf_header
2979 echo "configure: failed program was:" >&5
2980 cat conftest.$ac_ext >&5
2986 if test "$cf_cv_ncurses_h2" != no ; then
2987 cf_cv_ncurses_h2=$cf_incdir/$cf_header
2988 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
2991 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
2993 CPPFLAGS="$cf_save2_CPPFLAGS"
2994 test "$cf_cv_ncurses_h2" != no && break
2996 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
3000 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
3002 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
3003 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
3004 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
3005 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
3008 for cf_add_incdir in $cf_1st_incdir
3012 case $cf_add_incdir in
3015 /usr/local/include) # (vi
3016 if test "$GCC" = yes
3018 cf_save_CPPFLAGS="$CPPFLAGS"
3019 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3020 cat > conftest.$ac_ext <<EOF
3021 #line 3022 "configure"
3022 #include "confdefs.h"
3028 if { (eval echo configure:3029: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3031 echo "configure: failed program was:" >&5
3032 cat conftest.$ac_ext >&5
3034 CPPFLAGS="$cf_save_CPPFLAGS"
3040 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3043 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3044 test "$cf_top_incdir" = "$cf_add_incdir" && break
3045 cf_add_incdir="$cf_top_incdir"
3052 cat >> confdefs.h <<\EOF
3057 case $cf_cv_ncurses_header in # (vi
3059 cat >> confdefs.h <<\EOF
3060 #define HAVE_NCURSES_H 1
3066 case $cf_cv_ncurses_header in # (vi
3067 ncurses/curses.h|ncurses/ncurses.h)
3068 cat >> confdefs.h <<\EOF
3069 #define HAVE_NCURSES_NCURSES_H 1
3073 ncursesw/curses.h|ncursesw/ncurses.h)
3074 cat >> confdefs.h <<\EOF
3075 #define HAVE_NCURSESW_NCURSES_H 1
3082 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
3083 echo "configure:3084: checking for ncurses version" >&5
3084 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
3085 echo $ac_n "(cached) $ac_c" 1>&6
3088 cf_cv_ncurses_version=no
3091 if test "$cross_compiling" = yes; then
3094 # This will not work if the preprocessor splits the line after the
3095 # Autoconf token. The 'unproto' program does that.
3096 cat > conftest.$ac_ext <<EOF
3097 #include <${cf_cv_ncurses_header-curses.h}>
3099 #ifdef NCURSES_VERSION
3100 Autoconf NCURSES_VERSION
3108 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
3109 { (eval echo configure:3110: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
3110 if test -f conftest.out ; then
3111 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
3112 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
3117 cat > conftest.$ac_ext <<EOF
3118 #line 3119 "configure"
3119 #include "confdefs.h"
3121 #include <${cf_cv_ncurses_header-curses.h}>
3125 FILE *fp = fopen("$cf_tempfile", "w");
3126 #ifdef NCURSES_VERSION
3127 # ifdef NCURSES_VERSION_PATCH
3128 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
3130 fprintf(fp, "%s\n", NCURSES_VERSION);
3134 fprintf(fp, "old\n");
3142 if { (eval echo configure:3143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3145 cf_cv_ncurses_version=`cat $cf_tempfile`
3147 echo "configure: failed program was:" >&5
3148 cat conftest.$ac_ext >&5
3157 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
3158 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
3166 cf_nculib_root=ncursesw
3167 # This works, except for the special case where we find gpm, but
3168 # ncurses is in a nonstandard location via $LIBS, and we really want
3171 cf_ncurses_SAVE="$LIBS"
3172 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
3173 echo "configure:3174: checking for Gpm_Open in -lgpm" >&5
3174 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
3175 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3176 echo $ac_n "(cached) $ac_c" 1>&6
3178 ac_save_LIBS="$LIBS"
3180 cat > conftest.$ac_ext <<EOF
3181 #line 3182 "configure"
3182 #include "confdefs.h"
3183 /* Override any gcc2 internal prototype to avoid an error. */
3184 /* We use char because int might match the return type of a gcc2
3185 builtin and then its argument prototype would still apply. */
3192 if { (eval echo configure:3193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3194 eval "ac_cv_lib_$ac_lib_var=yes"
3196 echo "configure: failed program was:" >&5
3197 cat conftest.$ac_ext >&5
3199 eval "ac_cv_lib_$ac_lib_var=no"
3202 LIBS="$ac_save_LIBS"
3205 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3206 echo "$ac_t""yes" 1>&6
3207 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
3208 echo "configure:3209: checking for initscr in -lgpm" >&5
3209 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
3210 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3211 echo $ac_n "(cached) $ac_c" 1>&6
3213 ac_save_LIBS="$LIBS"
3215 cat > conftest.$ac_ext <<EOF
3216 #line 3217 "configure"
3217 #include "confdefs.h"
3218 /* Override any gcc2 internal prototype to avoid an error. */
3219 /* We use char because int might match the return type of a gcc2
3220 builtin and then its argument prototype would still apply. */
3227 if { (eval echo configure:3228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3229 eval "ac_cv_lib_$ac_lib_var=yes"
3231 echo "configure: failed program was:" >&5
3232 cat conftest.$ac_ext >&5
3234 eval "ac_cv_lib_$ac_lib_var=no"
3237 LIBS="$ac_save_LIBS"
3240 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3241 echo "$ac_t""yes" 1>&6
3242 LIBS="$cf_ncurses_SAVE"
3244 echo "$ac_t""no" 1>&6
3245 cf_ncurses_LIBS="-lgpm"
3249 echo "$ac_t""no" 1>&6
3253 case $host_os in #(vi
3255 # This is only necessary if you are linking against an obsolete
3256 # version of ncurses (but it should do no harm, since it's static).
3257 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
3258 echo "configure:3259: checking for tgoto in -lmytinfo" >&5
3259 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
3260 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3261 echo $ac_n "(cached) $ac_c" 1>&6
3263 ac_save_LIBS="$LIBS"
3264 LIBS="-lmytinfo $LIBS"
3265 cat > conftest.$ac_ext <<EOF
3266 #line 3267 "configure"
3267 #include "confdefs.h"
3268 /* Override any gcc2 internal prototype to avoid an error. */
3269 /* We use char because int might match the return type of a gcc2
3270 builtin and then its argument prototype would still apply. */
3277 if { (eval echo configure:3278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3279 eval "ac_cv_lib_$ac_lib_var=yes"
3281 echo "configure: failed program was:" >&5
3282 cat conftest.$ac_ext >&5
3284 eval "ac_cv_lib_$ac_lib_var=no"
3287 LIBS="$ac_save_LIBS"
3290 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3291 echo "$ac_t""yes" 1>&6
3292 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
3294 echo "$ac_t""no" 1>&6
3300 LIBS="$cf_ncurses_LIBS $LIBS"
3302 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3304 LIBS="-L$cf_cv_curses_dir/lib -l$cf_nculib_root $LIBS"
3307 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
3309 echo $ac_n "checking for initscr""... $ac_c" 1>&6
3310 echo "configure:3311: checking for initscr" >&5
3311 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
3312 echo $ac_n "(cached) $ac_c" 1>&6
3314 cat > conftest.$ac_ext <<EOF
3315 #line 3316 "configure"
3316 #include "confdefs.h"
3317 /* System header to define __stub macros and hopefully few prototypes,
3318 which can conflict with char initscr(); below. */
3320 /* Override any gcc2 internal prototype to avoid an error. */
3321 /* We use char because int might match the return type of a gcc2
3322 builtin and then its argument prototype would still apply. */
3327 /* The GNU C library defines this for functions which it implements
3328 to always fail with ENOSYS. Some functions are actually named
3329 something starting with __ and the normal name is an alias. */
3330 #if defined (__stub_initscr) || defined (__stub___initscr)
3338 if { (eval echo configure:3339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3340 eval "ac_cv_func_initscr=yes"
3342 echo "configure: failed program was:" >&5
3343 cat conftest.$ac_ext >&5
3345 eval "ac_cv_func_initscr=no"
3350 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
3351 echo "$ac_t""yes" 1>&6
3352 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
3354 echo "$ac_t""no" 1>&6
3356 cf_save_LIBS="$LIBS"
3357 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
3358 echo "configure:3359: checking for initscr in -l$cf_nculib_root" >&5
3359 LIBS="-l$cf_nculib_root $LIBS"
3360 cat > conftest.$ac_ext <<EOF
3361 #line 3362 "configure"
3362 #include "confdefs.h"
3363 #include <${cf_cv_ncurses_header-curses.h}>
3368 if { (eval echo configure:3369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3370 echo "$ac_t""yes" 1>&6
3371 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
3374 echo "configure: failed program was:" >&5
3375 cat conftest.$ac_ext >&5
3377 echo "$ac_t""no" 1>&6
3381 test -n "$verbose" && echo " ... testing lib-directories under $HOME"
3382 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
3383 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
3384 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
3387 # For other stuff under the home directory, it should be sufficient to put
3388 # a symbolic link for $HOME/$cf_nculib_root to the actual package location:
3389 test -d $HOME/$cf_nculib_root && {
3390 test -n "$verbose" && echo " ... testing lib-directories under $HOME/$cf_nculib_root"
3391 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
3392 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
3395 test "$prefix" != /usr/local && \
3396 test -d /usr/local && {
3397 test -n "$verbose" && echo " ... testing lib-directories under /usr/local"
3398 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
3399 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
3400 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
3401 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
3402 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
3405 test "$prefix" != NONE && \
3406 test -d $prefix && {
3407 test -n "$verbose" && echo " ... testing lib-directories under $prefix"
3408 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
3409 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
3410 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
3411 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
3412 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
3415 test "$prefix" != /opt && \
3417 test -n "$verbose" && echo " ... testing lib-directories under /opt"
3418 test -d /opt/lib && cf_search="$cf_search /opt/lib"
3419 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
3420 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
3421 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
3422 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
3425 test "$prefix" != /usr && \
3427 test -n "$verbose" && echo " ... testing lib-directories under /usr"
3428 test -d /usr/lib && cf_search="$cf_search /usr/lib"
3429 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
3430 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
3431 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
3434 for cf_libdir in $cf_search
3436 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
3437 echo "configure:3438: checking for -l$cf_nculib_root in $cf_libdir" >&5
3438 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
3439 cat > conftest.$ac_ext <<EOF
3440 #line 3441 "configure"
3441 #include "confdefs.h"
3442 #include <${cf_cv_ncurses_header-curses.h}>
3447 if { (eval echo configure:3448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3449 echo "$ac_t""yes" 1>&6
3450 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
3453 echo "configure: failed program was:" >&5
3454 cat conftest.$ac_ext >&5
3456 echo "$ac_t""no" 1>&6
3457 LIBS="$cf_save_LIBS"
3467 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
3469 if test $cf_found_library = no ; then
3470 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
3476 if test -n "$cf_ncurses_LIBS" ; then
3477 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
3478 echo "configure:3479: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
3479 cf_ncurses_SAVE="$LIBS"
3480 for p in $cf_ncurses_LIBS ; do
3481 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
3482 if test "$q" != "$LIBS" ; then
3486 cat > conftest.$ac_ext <<EOF
3487 #line 3488 "configure"
3488 #include "confdefs.h"
3489 #include <${cf_cv_ncurses_header-curses.h}>
3491 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
3494 if { (eval echo configure:3495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3496 echo "$ac_t""yes" 1>&6
3498 echo "configure: failed program was:" >&5
3499 cat conftest.$ac_ext >&5
3501 echo "$ac_t""no" 1>&6
3502 LIBS="$cf_ncurses_SAVE"
3508 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3510 cat >> confdefs.h <<EOF
3511 #define $cf_nculib_ROOT 1
3521 echo $ac_n "checking for form_driver in -lform$cf_cv_libtype""... $ac_c" 1>&6
3522 echo "configure:3523: checking for form_driver in -lform$cf_cv_libtype" >&5
3523 ac_lib_var=`echo form$cf_cv_libtype'_'form_driver | sed 'y%./+-%__p_%'`
3524 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3525 echo $ac_n "(cached) $ac_c" 1>&6
3527 ac_save_LIBS="$LIBS"
3528 LIBS="-lform$cf_cv_libtype $LIBS"
3529 cat > conftest.$ac_ext <<EOF
3530 #line 3531 "configure"
3531 #include "confdefs.h"
3532 /* Override any gcc2 internal prototype to avoid an error. */
3533 /* We use char because int might match the return type of a gcc2
3534 builtin and then its argument prototype would still apply. */
3541 if { (eval echo configure:3542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3543 eval "ac_cv_lib_$ac_lib_var=yes"
3545 echo "configure: failed program was:" >&5
3546 cat conftest.$ac_ext >&5
3548 eval "ac_cv_lib_$ac_lib_var=no"
3551 LIBS="$ac_save_LIBS"
3554 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3555 echo "$ac_t""yes" 1>&6
3556 ac_tr_lib=HAVE_LIB`echo form$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3557 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3558 cat >> confdefs.h <<EOF
3559 #define $ac_tr_lib 1
3562 LIBS="-lform$cf_cv_libtype $LIBS"
3565 echo "$ac_t""no" 1>&6
3568 echo $ac_n "checking for menu_driver in -lmenu$cf_cv_libtype""... $ac_c" 1>&6
3569 echo "configure:3570: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
3570 ac_lib_var=`echo menu$cf_cv_libtype'_'menu_driver | sed 'y%./+-%__p_%'`
3571 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3572 echo $ac_n "(cached) $ac_c" 1>&6
3574 ac_save_LIBS="$LIBS"
3575 LIBS="-lmenu$cf_cv_libtype $LIBS"
3576 cat > conftest.$ac_ext <<EOF
3577 #line 3578 "configure"
3578 #include "confdefs.h"
3579 /* Override any gcc2 internal prototype to avoid an error. */
3580 /* We use char because int might match the return type of a gcc2
3581 builtin and then its argument prototype would still apply. */
3588 if { (eval echo configure:3589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3590 eval "ac_cv_lib_$ac_lib_var=yes"
3592 echo "configure: failed program was:" >&5
3593 cat conftest.$ac_ext >&5
3595 eval "ac_cv_lib_$ac_lib_var=no"
3598 LIBS="$ac_save_LIBS"
3601 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3602 echo "$ac_t""yes" 1>&6
3603 ac_tr_lib=HAVE_LIB`echo menu$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3604 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3605 cat >> confdefs.h <<EOF
3606 #define $ac_tr_lib 1
3609 LIBS="-lmenu$cf_cv_libtype $LIBS"
3612 echo "$ac_t""no" 1>&6
3615 echo $ac_n "checking for new_panel in -lpanel$cf_cv_libtype""... $ac_c" 1>&6
3616 echo "configure:3617: checking for new_panel in -lpanel$cf_cv_libtype" >&5
3617 ac_lib_var=`echo panel$cf_cv_libtype'_'new_panel | sed 'y%./+-%__p_%'`
3618 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3619 echo $ac_n "(cached) $ac_c" 1>&6
3621 ac_save_LIBS="$LIBS"
3622 LIBS="-lpanel$cf_cv_libtype $LIBS"
3623 cat > conftest.$ac_ext <<EOF
3624 #line 3625 "configure"
3625 #include "confdefs.h"
3626 /* Override any gcc2 internal prototype to avoid an error. */
3627 /* We use char because int might match the return type of a gcc2
3628 builtin and then its argument prototype would still apply. */
3635 if { (eval echo configure:3636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3637 eval "ac_cv_lib_$ac_lib_var=yes"
3639 echo "configure: failed program was:" >&5
3640 cat conftest.$ac_ext >&5
3642 eval "ac_cv_lib_$ac_lib_var=no"
3645 LIBS="$ac_save_LIBS"
3648 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3649 echo "$ac_t""yes" 1>&6
3650 ac_tr_lib=HAVE_LIB`echo panel$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
3651 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
3652 cat >> confdefs.h <<EOF
3653 #define $ac_tr_lib 1
3656 LIBS="-lpanel$cf_cv_libtype $LIBS"
3659 echo "$ac_t""no" 1>&6
3663 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
3664 echo "configure:3665: checking return type of signal handlers" >&5
3665 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
3666 echo $ac_n "(cached) $ac_c" 1>&6
3668 cat > conftest.$ac_ext <<EOF
3669 #line 3670 "configure"
3670 #include "confdefs.h"
3671 #include <sys/types.h>
3677 extern "C" void (*signal (int, void (*)(int)))(int);
3679 void (*signal ()) ();
3686 if { (eval echo configure:3687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3688 ac_cv_type_signal=void
3690 echo "configure: failed program was:" >&5
3691 cat conftest.$ac_ext >&5
3693 ac_cv_type_signal=int
3698 echo "$ac_t""$ac_cv_type_signal" 1>&6
3699 cat >> confdefs.h <<EOF
3700 #define RETSIGTYPE $ac_cv_type_signal
3705 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
3706 echo "configure:3707: checking for ANSI C header files" >&5
3707 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
3708 echo $ac_n "(cached) $ac_c" 1>&6
3710 cat > conftest.$ac_ext <<EOF
3711 #line 3712 "configure"
3712 #include "confdefs.h"
3718 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3719 { (eval echo configure:3720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3720 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3721 if test -z "$ac_err"; then
3723 ac_cv_header_stdc=yes
3726 echo "configure: failed program was:" >&5
3727 cat conftest.$ac_ext >&5
3729 ac_cv_header_stdc=no
3733 if test $ac_cv_header_stdc = yes; then
3734 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3735 cat > conftest.$ac_ext <<EOF
3736 #line 3737 "configure"
3737 #include "confdefs.h"
3740 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3741 egrep "memchr" >/dev/null 2>&1; then
3745 ac_cv_header_stdc=no
3751 if test $ac_cv_header_stdc = yes; then
3752 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3753 cat > conftest.$ac_ext <<EOF
3754 #line 3755 "configure"
3755 #include "confdefs.h"
3758 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3759 egrep "free" >/dev/null 2>&1; then
3763 ac_cv_header_stdc=no
3769 if test $ac_cv_header_stdc = yes; then
3770 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3771 if test "$cross_compiling" = yes; then
3774 cat > conftest.$ac_ext <<EOF
3775 #line 3776 "configure"
3776 #include "confdefs.h"
3778 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3779 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3780 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3781 int main () { int i; for (i = 0; i < 256; i++)
3782 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
3786 if { (eval echo configure:3787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3790 echo "configure: failed program was:" >&5
3791 cat conftest.$ac_ext >&5
3793 ac_cv_header_stdc=no
3801 echo "$ac_t""$ac_cv_header_stdc" 1>&6
3802 if test $ac_cv_header_stdc = yes; then
3803 cat >> confdefs.h <<\EOF
3804 #define STDC_HEADERS 1
3809 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
3810 echo "configure:3811: checking whether time.h and sys/time.h may both be included" >&5
3811 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
3812 echo $ac_n "(cached) $ac_c" 1>&6
3814 cat > conftest.$ac_ext <<EOF
3815 #line 3816 "configure"
3816 #include "confdefs.h"
3817 #include <sys/types.h>
3818 #include <sys/time.h>
3824 if { (eval echo configure:3825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3826 ac_cv_header_time=yes
3828 echo "configure: failed program was:" >&5
3829 cat conftest.$ac_ext >&5
3831 ac_cv_header_time=no
3836 echo "$ac_t""$ac_cv_header_time" 1>&6
3837 if test $ac_cv_header_time = yes; then
3838 cat >> confdefs.h <<\EOF
3839 #define TIME_WITH_SYS_TIME 1
3859 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3860 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3861 echo "configure:3862: checking for $ac_hdr" >&5
3862 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3863 echo $ac_n "(cached) $ac_c" 1>&6
3865 cat > conftest.$ac_ext <<EOF
3866 #line 3867 "configure"
3867 #include "confdefs.h"
3870 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3871 { (eval echo configure:3872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3872 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3873 if test -z "$ac_err"; then
3875 eval "ac_cv_header_$ac_safe=yes"
3878 echo "configure: failed program was:" >&5
3879 cat conftest.$ac_ext >&5
3881 eval "ac_cv_header_$ac_safe=no"
3885 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3886 echo "$ac_t""yes" 1>&6
3887 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3888 cat >> confdefs.h <<EOF
3889 #define $ac_tr_hdr 1
3893 echo "$ac_t""no" 1>&6
3907 use_default_colors \
3913 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
3914 echo "configure:3915: checking for $ac_func" >&5
3915 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
3916 echo $ac_n "(cached) $ac_c" 1>&6
3918 cat > conftest.$ac_ext <<EOF
3919 #line 3920 "configure"
3920 #include "confdefs.h"
3921 /* System header to define __stub macros and hopefully few prototypes,
3922 which can conflict with char $ac_func(); below. */
3924 /* Override any gcc2 internal prototype to avoid an error. */
3925 /* We use char because int might match the return type of a gcc2
3926 builtin and then its argument prototype would still apply. */
3931 /* The GNU C library defines this for functions which it implements
3932 to always fail with ENOSYS. Some functions are actually named
3933 something starting with __ and the normal name is an alias. */
3934 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3942 if { (eval echo configure:3943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3944 eval "ac_cv_func_$ac_func=yes"
3946 echo "configure: failed program was:" >&5
3947 cat conftest.$ac_ext >&5
3949 eval "ac_cv_func_$ac_func=no"
3954 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
3955 echo "$ac_t""yes" 1>&6
3956 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
3957 cat >> confdefs.h <<EOF
3958 #define $ac_tr_func 1
3962 echo "$ac_t""no" 1>&6
3967 cat > conftest.$ac_ext <<EOF
3968 #line 3969 "configure"
3969 #include "confdefs.h"
3971 #include <${cf_cv_ncurses_header-curses.h}>
3974 (void) assume_default_colors (0, 0);
3975 (void) curses_version ();
3976 (void) define_key (0, 0);
3977 (void) is_term_resized (0, 0);
3978 (void) key_defined (0);
3979 (void) keybound (0, 0);
3980 (void) keyok (0, 0);
3981 (void) resize_term (0, 0);
3982 (void) resizeterm (0, 0);
3983 (void) use_default_colors ();
3984 (void) use_extended_names (0);
3985 (void) wresize (0, 0, 0);
3989 if { (eval echo configure:3990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3991 cat >> confdefs.h <<\EOF
3992 #define NCURSES_EXT_FUNCS 1
3996 echo "configure: failed program was:" >&5
3997 cat conftest.$ac_ext >&5
4002 echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
4003 echo "configure:4004: checking if sys/time.h works with sys/select.h" >&5
4004 if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
4005 echo $ac_n "(cached) $ac_c" 1>&6
4008 cat > conftest.$ac_ext <<EOF
4009 #line 4010 "configure"
4010 #include "confdefs.h"
4012 #include <sys/types.h>
4013 #ifdef HAVE_SYS_TIME_H
4014 #include <sys/time.h>
4016 #ifdef HAVE_SYS_SELECT_H
4017 #include <sys/select.h>
4024 if { (eval echo configure:4025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4026 cf_cv_sys_time_select=yes
4028 echo "configure: failed program was:" >&5
4029 cat conftest.$ac_ext >&5
4031 cf_cv_sys_time_select=no
4037 echo "$ac_t""$cf_cv_sys_time_select" 1>&6
4038 test "$cf_cv_sys_time_select" = yes && cat >> confdefs.h <<\EOF
4039 #define HAVE_SYS_TIME_SELECT 1
4044 echo $ac_n "checking for function curses_version""... $ac_c" 1>&6
4045 echo "configure:4046: checking for function curses_version" >&5
4046 if eval "test \"`echo '$''{'cf_cv_func_curses_version'+set}'`\" = set"; then
4047 echo $ac_n "(cached) $ac_c" 1>&6
4050 if test "$cross_compiling" = yes; then
4051 cf_cv_func_curses_version=unknown
4053 cat > conftest.$ac_ext <<EOF
4054 #line 4055 "configure"
4055 #include "confdefs.h"
4057 #include <${cf_cv_ncurses_header-curses.h}>
4061 sprintf(temp, "%s\n", curses_version());
4066 if { (eval echo configure:4067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4068 cf_cv_func_curses_version=yes
4071 echo "configure: failed program was:" >&5
4072 cat conftest.$ac_ext >&5
4074 cf_cv_func_curses_version=no
4083 echo "$ac_t""$cf_cv_func_curses_version" 1>&6
4084 test "$cf_cv_func_curses_version" = yes && cat >> confdefs.h <<\EOF
4085 #define HAVE_CURSES_VERSION 1
4090 echo $ac_n "checking for alternate character set array""... $ac_c" 1>&6
4091 echo "configure:4092: checking for alternate character set array" >&5
4092 if eval "test \"`echo '$''{'cf_cv_curses_acs_map'+set}'`\" = set"; then
4093 echo $ac_n "(cached) $ac_c" 1>&6
4096 cf_cv_curses_acs_map=unknown
4097 for name in acs_map _acs_map __acs_map _nc_acs_map
4099 cat > conftest.$ac_ext <<EOF
4100 #line 4101 "configure"
4101 #include "confdefs.h"
4103 #include <${cf_cv_ncurses_header-curses.h}>
4107 $name['k'] = ACS_PLUS
4111 if { (eval echo configure:4112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4113 cf_cv_curses_acs_map=$name; break
4115 echo "configure: failed program was:" >&5
4116 cat conftest.$ac_ext >&5
4123 echo "$ac_t""$cf_cv_curses_acs_map" 1>&6
4125 test "$cf_cv_curses_acs_map" != unknown && cat >> confdefs.h <<EOF
4126 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
4131 echo $ac_n "checking for wide alternate character set array""... $ac_c" 1>&6
4132 echo "configure:4133: checking for wide alternate character set array" >&5
4133 if eval "test \"`echo '$''{'cf_cv_curses_wacs_map'+set}'`\" = set"; then
4134 echo $ac_n "(cached) $ac_c" 1>&6
4137 cf_cv_curses_wacs_map=unknown
4138 for name in wacs_map _wacs_map __wacs_map _nc_wacs
4140 cat > conftest.$ac_ext <<EOF
4141 #line 4142 "configure"
4142 #include "confdefs.h"
4144 #ifndef _XOPEN_SOURCE_EXTENDED
4145 #define _XOPEN_SOURCE_EXTENDED
4147 #include <${cf_cv_ncurses_header-curses.h}>
4149 $name['k'] = *WACS_PLUS
4152 if { (eval echo configure:4153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4154 cf_cv_curses_wacs_map=$name
4157 echo "configure: failed program was:" >&5
4158 cat conftest.$ac_ext >&5
4164 echo "$ac_t""$cf_cv_curses_wacs_map" 1>&6
4167 echo $ac_n "checking for type attr_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
4168 echo "configure:4169: checking for type attr_t in ${cf_cv_ncurses_header-curses.h}" >&5
4169 cat > conftest.$ac_ext <<EOF
4170 #line 4171 "configure"
4171 #include "confdefs.h"
4173 #ifndef _XOPEN_SOURCE_EXTENDED
4174 #define _XOPEN_SOURCE_EXTENDED
4176 #include <${cf_cv_ncurses_header-curses.h}>
4183 if { (eval echo configure:4184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4187 echo "configure: failed program was:" >&5
4188 cat conftest.$ac_ext >&5
4193 echo "$ac_t""$cf_result" 1>&6
4194 if test $cf_result = yes ; then
4196 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4198 cat >> confdefs.h <<EOF
4199 #define $cf_result 1
4203 cat >> confdefs.h <<EOF
4210 echo $ac_n "checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
4211 echo "configure:4212: checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}" >&5
4212 cat > conftest.$ac_ext <<EOF
4213 #line 4214 "configure"
4214 #include "confdefs.h"
4216 #ifndef _XOPEN_SOURCE_EXTENDED
4217 #define _XOPEN_SOURCE_EXTENDED
4219 #include <${cf_cv_ncurses_header-curses.h}>
4226 if { (eval echo configure:4227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4230 echo "configure: failed program was:" >&5
4231 cat conftest.$ac_ext >&5
4236 echo "$ac_t""$cf_result" 1>&6
4237 if test $cf_result = yes ; then
4239 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4241 cat >> confdefs.h <<EOF
4242 #define $cf_result 1
4246 cat >> confdefs.h <<EOF
4247 #define mbstate_t long
4255 cat > confcache <<\EOF
4256 # This file is a shell script that caches the results of configure
4257 # tests run on this system so they can be shared between configure
4258 # scripts and configure runs. It is not useful on other systems.
4259 # If it contains results you don't want to keep, you may remove or edit it.
4261 # By default, configure uses ./config.cache as the cache file,
4262 # creating it if it does not exist already. You can give configure
4263 # the --cache-file=FILE option to use a different cache file; that is
4264 # what configure does when it calls configure scripts in
4265 # subdirectories, so they share the cache.
4266 # Giving --cache-file=/dev/null disables caching, for debugging configure.
4267 # config.status only pays attention to the cache file if you give it the
4268 # --recheck option to rerun configure.
4271 # The following way of writing the cache mishandles newlines in values,
4272 # but we know of no workaround that is simple, portable, and efficient.
4273 # So, don't put newlines in cache variables' values.
4274 # Ultrix sh set writes to stderr and can't be redirected directly,
4275 # and sets the high bit in the cache file unless we assign to the vars.
4277 case `(ac_space=' '; set | grep ac_space) 2>&1` in
4279 # `set' does not quote correctly, so add quotes (double-quote substitution
4280 # turns \\\\ into \\, and sed turns \\ into \).
4282 -e "s/'/'\\\\''/g" \
4283 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
4286 # `set' quotes correctly as required by POSIX, so do not add quotes.
4287 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
4290 if cmp -s $cache_file confcache; then
4293 if test -w $cache_file; then
4294 echo "updating cache $cache_file"
4295 cat confcache > $cache_file
4297 echo "not updating unwritable cache $cache_file"
4302 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
4304 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4305 # Let make expand exec_prefix.
4306 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4308 # Any assignment to VPATH causes Sun make to only execute
4309 # the first set of double-colon rules, so remove it if not needed.
4310 # If there is a colon in the path, we need to keep it.
4311 if test "x$srcdir" = x.; then
4312 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
4315 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
4317 DEFS=-DHAVE_CONFIG_H
4319 # Without the "./", some shells look in PATH for config.status.
4320 : ${CONFIG_STATUS=./config.status}
4322 echo creating $CONFIG_STATUS
4323 rm -f $CONFIG_STATUS
4324 cat > $CONFIG_STATUS <<EOF
4326 # Generated automatically by configure.
4327 # Run this file to recreate the current configuration.
4328 # This directory was configured as follows,
4329 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4331 # $0 $ac_configure_args
4333 # Compiler output produced by configure, useful for debugging
4334 # configure, is in ./config.log if it exists.
4336 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
4339 case "\$ac_option" in
4340 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
4341 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
4342 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
4343 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
4344 echo "$CONFIG_STATUS generated by autoconf version 2.13.20030927"
4346 -help | --help | --hel | --he | --h)
4347 echo "\$ac_cs_usage"; exit 0 ;;
4348 *) echo "\$ac_cs_usage"; exit 1 ;;
4352 ac_given_srcdir=$srcdir
4354 trap 'rm -fr `echo "Makefile ncurses_cfg.h:ncurses_tst.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
4356 cat >> $CONFIG_STATUS <<EOF
4358 # Protect against being on the right side of a sed subst in config.status.
4359 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
4360 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
4364 s%@CFLAGS@%$CFLAGS%g
4365 s%@CPPFLAGS@%$CPPFLAGS%g
4366 s%@CXXFLAGS@%$CXXFLAGS%g
4367 s%@FFLAGS@%$FFLAGS%g
4369 s%@LDFLAGS@%$LDFLAGS%g
4371 s%@exec_prefix@%$exec_prefix%g
4372 s%@prefix@%$prefix%g
4373 s%@program_transform_name@%$program_transform_name%g
4374 s%@bindir@%$bindir%g
4375 s%@sbindir@%$sbindir%g
4376 s%@libexecdir@%$libexecdir%g
4377 s%@datadir@%$datadir%g
4378 s%@sysconfdir@%$sysconfdir%g
4379 s%@sharedstatedir@%$sharedstatedir%g
4380 s%@localstatedir@%$localstatedir%g
4381 s%@libdir@%$libdir%g
4382 s%@includedir@%$includedir%g
4383 s%@oldincludedir@%$oldincludedir%g
4384 s%@infodir@%$infodir%g
4385 s%@mandir@%$mandir%g
4387 s%@host_alias@%$host_alias%g
4388 s%@host_cpu@%$host_cpu%g
4389 s%@host_vendor@%$host_vendor%g
4390 s%@host_os@%$host_os%g
4391 s%@SET_MAKE@%$SET_MAKE%g
4394 s%@CC_G_OPT@%$CC_G_OPT%g
4395 s%@CC_SHARED_OPTS@%$CC_SHARED_OPTS%g
4396 s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g
4397 s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g
4398 s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
4399 s%@ECHO_LINK@%$ECHO_LINK%g
4400 s%@EXTRA_LIBS@%$EXTRA_LIBS%g
4402 s%@LDFLAGS_SHARED@%$LDFLAGS_SHARED%g
4403 s%@LD_MODEL@%$LD_MODEL%g
4404 s%@LD_SHARED_OPTS@%$LD_SHARED_OPTS%g
4405 s%@LIBTOOL@%$LIBTOOL%g
4406 s%@LIB_CLEAN@%$LIB_CLEAN%g
4407 s%@LIB_COMPILE@%$LIB_COMPILE%g
4408 s%@LIB_LINK@%$LIB_LINK%g
4409 s%@LIB_NAME@%$LIB_NAME%g
4410 s%@LIB_PREFIX@%$LIB_PREFIX%g
4411 s%@LINK_TESTS@%$LINK_TESTS%g
4413 s%@LINT_OPTS@%$LINT_OPTS%g
4414 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
4415 s%@MATH_LIB@%$MATH_LIB%g
4416 s%@TEST_ARGS@%$TEST_ARGS%g
4417 s%@TEST_DEPS@%$TEST_DEPS%g
4418 s%@cf_cv_abi_version@%$cf_cv_abi_version%g
4419 s%@cf_cv_rel_version@%$cf_cv_rel_version%g
4420 s%@EXEEXT@%$EXEEXT%g
4421 s%@OBJEXT@%$OBJEXT%g
4426 cat >> $CONFIG_STATUS <<\EOF
4428 # Split the substitutions into bite-sized pieces for seds with
4429 # small command number limits, like on Digital OSF/1 and HP-UX.
4430 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
4431 ac_file=1 # Number of current file.
4432 ac_beg=1 # First line for current file.
4433 ac_end=$ac_max_sed_cmds # Line after last line for current file.
4436 while $ac_more_lines; do
4437 if test $ac_beg -gt 1; then
4438 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
4440 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
4442 if test ! -s conftest.s$ac_file; then
4444 rm -f conftest.s$ac_file
4446 if test -z "$ac_sed_cmds"; then
4447 ac_sed_cmds="sed -f conftest.s$ac_file"
4449 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
4451 ac_file=`expr $ac_file + 1`
4453 ac_end=`expr $ac_end + $ac_max_sed_cmds`
4456 if test -z "$ac_sed_cmds"; then
4461 cat >> $CONFIG_STATUS <<EOF
4463 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
4465 cat >> $CONFIG_STATUS <<\EOF
4466 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
4467 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4469 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4470 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4471 *) ac_file_in="${ac_file}.in" ;;
4474 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
4476 # Remove last slash and all that follows it. Not all systems have dirname.
4477 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4478 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4479 # The file is in a subdirectory.
4480 test ! -d "$ac_dir" && mkdir "$ac_dir"
4481 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
4482 # A "../" for each directory in $ac_dir_suffix.
4483 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
4485 ac_dir_suffix= ac_dots=
4488 case "$ac_given_srcdir" in
4490 if test -z "$ac_dots"; then top_srcdir=.
4491 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
4492 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
4494 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
4495 top_srcdir="$ac_dots$ac_given_srcdir" ;;
4499 echo creating "$ac_file"
4501 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
4503 *Makefile*) ac_comsub="1i\\
4504 # $configure_input" ;;
4508 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4510 s%@configure_input@%$configure_input%g
4511 s%@srcdir@%$srcdir%g
4512 s%@top_srcdir@%$top_srcdir%g
4513 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
4517 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
4518 # NAME is the cpp macro being defined and VALUE is the value it is being given.
4520 # ac_d sets the value in "#define NAME VALUE" lines.
4521 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
4522 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
4525 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
4526 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4527 ac_uB='\([ ]\)%\1#\2define\3'
4530 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
4531 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
4532 ac_eB='$%\1#\2define\3'
4536 if test "${CONFIG_HEADERS+set}" != set; then
4538 cat >> $CONFIG_STATUS <<EOF
4539 CONFIG_HEADERS="ncurses_cfg.h:ncurses_tst.hin"
4541 cat >> $CONFIG_STATUS <<\EOF
4543 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
4544 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
4546 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
4547 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
4548 *) ac_file_in="${ac_file}.in" ;;
4551 echo creating $ac_file
4553 rm -f conftest.frag conftest.in conftest.out
4554 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
4555 cat $ac_file_inputs > conftest.in
4560 # Transform confdefs.h into a list of #define's. We won't use it as a sed
4561 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
4562 # be either 'cat' or 'sort'.
4563 sort confdefs.h >conftest.vals
4565 # Break up conftest.vals because some shells have a limit on
4566 # the size of here documents, and old seds have small limits too.
4569 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
4572 ac_lines=`grep -c . conftest.vals`
4573 # grep -c gives empty output for an empty file on some AIX systems.
4574 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
4575 # Write chunks of a limited-size here document to conftest.frag.
4576 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
4577 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
4578 echo 'CEOF' >> $CONFIG_STATUS
4579 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
4581 mv conftest.tail conftest.vals
4585 # Run sed to substitute the contents of conftest.frag into conftest.in at the
4587 echo ' cat >> conftest.edit <<CEOF
4588 /@DEFS@/r conftest.frag
4591 sed -f conftest.edit conftest.in > conftest.out
4593 mv conftest.out conftest.in
4594 rm -f conftest.edit conftest.frag
4598 cat >> $CONFIG_STATUS <<\EOF
4599 rm -f conftest.frag conftest.h
4600 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
4601 cat conftest.in >> conftest.h
4603 if cmp -s $ac_file conftest.h 2>/dev/null; then
4604 echo "$ac_file is unchanged"
4607 # Remove last slash and all that follows it. Not all systems have dirname.
4608 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
4609 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
4610 # The file is in a subdirectory.
4611 test ! -d "$ac_dir" && mkdir "$ac_dir"
4614 mv conftest.h $ac_file
4619 cat >> $CONFIG_STATUS <<EOF
4620 # Extra initialization commands, if any
4623 cat >> $CONFIG_STATUS <<\EOF
4624 # Extra commands, if any
4626 cat >>Makefile <<TEST_EOF
4628 # These rules are generated so we do not rely on suffix rules, which do not
4629 # work consistently for different make-programs (the '\$(MODEL)/' confuses
4630 # some, and the '\$x' confuses others).
4632 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
4635 cat >>Makefile <<TEST_EOF
4637 \$(MODEL)/$N.o : $N.c \\
4640 @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) $N.c
4646 chmod +x $CONFIG_STATUS
4647 rm -fr confdefs* $ac_clean_files
4648 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1