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 --disable-echo display "compiling" commands
187 --enable-warnings test: turn on gcc compiler warnings
188 --with-curses-dir=DIR directory in which (n)curses is installed
189 --with-5lib use SunOS sysv-libraries
190 --with-ncursesw use wide ncurses-libraries (installed)
191 --with-ncurses use ncurses-libraries (installed)
192 --with-pdcurses compile/link with pdcurses X11 library
193 --with-x use the X Window System
194 --with-Xaw3d link with Xaw 3d library
195 --with-neXtaw link with neXT Athena library
196 --with-XawPlus link with Athena-Plus library
197 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
201 -host | --host | --hos | --ho)
203 -host=* | --host=* | --hos=* | --ho=*)
206 -includedir | --includedir | --includedi | --included | --include \
207 | --includ | --inclu | --incl | --inc)
208 ac_prev=includedir ;;
209 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
210 | --includ=* | --inclu=* | --incl=* | --inc=*)
211 includedir="$ac_optarg" ;;
213 -infodir | --infodir | --infodi | --infod | --info | --inf)
215 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
216 infodir="$ac_optarg" ;;
218 -libdir | --libdir | --libdi | --libd)
220 -libdir=* | --libdir=* | --libdi=* | --libd=*)
221 libdir="$ac_optarg" ;;
223 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
224 | --libexe | --libex | --libe)
225 ac_prev=libexecdir ;;
226 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
227 | --libexe=* | --libex=* | --libe=*)
228 libexecdir="$ac_optarg" ;;
230 -localstatedir | --localstatedir | --localstatedi | --localstated \
231 | --localstate | --localstat | --localsta | --localst \
232 | --locals | --local | --loca | --loc | --lo)
233 ac_prev=localstatedir ;;
234 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
235 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
236 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
237 localstatedir="$ac_optarg" ;;
239 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
241 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
242 mandir="$ac_optarg" ;;
245 # Obsolete; use --without-fp.
248 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
252 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
253 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
256 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
257 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
258 | --oldin | --oldi | --old | --ol | --o)
259 ac_prev=oldincludedir ;;
260 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
261 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
262 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
263 oldincludedir="$ac_optarg" ;;
265 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
267 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
268 prefix="$ac_optarg" ;;
270 -program-prefix | --program-prefix | --program-prefi | --program-pref \
271 | --program-pre | --program-pr | --program-p)
272 ac_prev=program_prefix ;;
273 -program-prefix=* | --program-prefix=* | --program-prefi=* \
274 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
275 program_prefix="$ac_optarg" ;;
277 -program-suffix | --program-suffix | --program-suffi | --program-suff \
278 | --program-suf | --program-su | --program-s)
279 ac_prev=program_suffix ;;
280 -program-suffix=* | --program-suffix=* | --program-suffi=* \
281 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
282 program_suffix="$ac_optarg" ;;
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 ac_prev=program_transform_name ;;
292 -program-transform-name=* | --program-transform-name=* \
293 | --program-transform-nam=* | --program-transform-na=* \
294 | --program-transform-n=* | --program-transform-=* \
295 | --program-transform=* | --program-transfor=* \
296 | --program-transfo=* | --program-transf=* \
297 | --program-trans=* | --program-tran=* \
298 | --progr-tra=* | --program-tr=* | --program-t=*)
299 program_transform_name="$ac_optarg" ;;
301 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
302 | -silent | --silent | --silen | --sile | --sil)
305 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
307 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
309 sbindir="$ac_optarg" ;;
311 -sharedstatedir | --sharedstatedir | --sharedstatedi \
312 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
313 | --sharedst | --shareds | --shared | --share | --shar \
315 ac_prev=sharedstatedir ;;
316 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
317 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
318 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
320 sharedstatedir="$ac_optarg" ;;
322 -site | --site | --sit)
324 -site=* | --site=* | --sit=*)
327 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
329 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
330 srcdir="$ac_optarg" ;;
332 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
333 | --syscon | --sysco | --sysc | --sys | --sy)
334 ac_prev=sysconfdir ;;
335 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
336 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
337 sysconfdir="$ac_optarg" ;;
339 -target | --target | --targe | --targ | --tar | --ta | --t)
341 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
342 target="$ac_optarg" ;;
344 -v | -verbose | --verbose | --verbos | --verbo | --verb)
347 -version | --version | --versio | --versi | --vers)
348 echo "configure generated by autoconf version 2.13.20030927"
352 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
353 # Reject names that are not valid shell variable names.
354 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
355 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
357 ac_package=`echo $ac_package| sed 's/-/_/g'`
362 eval "with_${ac_package}='$ac_optarg'" ;;
364 -without-* | --without-*)
365 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
366 # Reject names that are not valid shell variable names.
367 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
368 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
370 ac_package=`echo $ac_package| sed 's/-/_/g'`
371 eval "with_${ac_package}=no" ;;
374 # Obsolete; use --with-x.
377 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
378 | --x-incl | --x-inc | --x-in | --x-i)
379 ac_prev=x_includes ;;
380 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
381 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
382 x_includes="$ac_optarg" ;;
384 -x-libraries | --x-libraries | --x-librarie | --x-librari \
385 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
386 ac_prev=x_libraries ;;
387 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
388 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
389 x_libraries="$ac_optarg" ;;
391 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
395 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
396 echo "configure: warning: $ac_option: invalid host type" 1>&2
398 if test "x$nonopt" != xNONE; then
399 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
407 if test -n "$ac_prev"; then
408 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
411 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
413 # File descriptor usage:
416 # 2 errors and warnings
417 # 3 some systems may open it to /dev/tty
418 # 4 used on the Kubota Titan
419 # 6 checking for... messages and results
420 # 5 compiler messages saved in config.log
421 if test "$silent" = yes; then
429 This file contains any messages produced by compilers while
430 running configure, to aid debugging if configure makes a mistake.
433 # Strip out --no-create and --no-recursion so they do not pile up.
434 # Also quote any args containing shell metacharacters.
439 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
440 | --no-cr | --no-c) ;;
441 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
442 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
443 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
444 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
445 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
450 # Only set these to C if already set. These must not be set unconditionally
451 # because not all systems understand e.g. LANG=C (notably SCO).
452 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
453 # Non-C LC_CTYPE values break the ctype check.
454 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
455 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
456 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
457 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
459 # confdefs.h avoids OS command line length limits that DEFS can exceed.
460 rm -rf conftest* confdefs.h
461 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
464 # A filename unique to this package, relative to the directory that
465 # configure is in, which we can look for to find out if srcdir is correct.
466 ac_unique_file=ncurses.c
468 # Find the source files, if location was not specified.
469 if test -z "$srcdir"; then
470 ac_srcdir_defaulted=yes
471 # Try the directory containing this script, then its parent.
473 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
474 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
476 if test ! -r $srcdir/$ac_unique_file; then
480 ac_srcdir_defaulted=no
482 if test ! -r $srcdir/$ac_unique_file; then
483 if test "$ac_srcdir_defaulted" = yes; then
484 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
486 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
489 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
491 # Prefer explicitly selected file to automatically selected ones.
492 if test -z "$CONFIG_SITE"; then
493 if test "x$prefix" != xNONE; then
494 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
496 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
499 for ac_site_file in $CONFIG_SITE; do
500 if test -r "$ac_site_file"; then
501 echo "loading site script $ac_site_file"
506 if test -r "$cache_file"; then
507 echo "loading cache $cache_file"
510 echo "creating cache $cache_file"
515 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
516 ac_cpp='$CPP $CPPFLAGS'
517 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
518 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
519 cross_compiling=$ac_cv_prog_cc_cross
523 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
524 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
525 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
532 ac_n= ac_c='\c' ac_t=
535 # If we find X, set shell vars x_includes and x_libraries to the
536 # paths, otherwise set no_x=yes.
537 # Uses ac_ vars as temps to allow command line to override cache and checks.
538 # --without-x overrides everything else, but does not touch the cache.
539 echo $ac_n "checking for X""... $ac_c" 1>&6
540 echo "configure:541: checking for X" >&5
543 # Check whether --with-x or --without-x was given.
544 if test "${with_x+set}" = set; then
549 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
550 if test "x$with_x" = xno; then
551 # The user explicitly disabled X.
554 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
555 # Both variables are already set.
558 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
559 echo $ac_n "(cached) $ac_c" 1>&6
561 # One or both of the vars are not set, and there is no cached value.
562 ac_x_includes=NO ac_x_libraries=NO
564 if mkdir conftestdir; then
566 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
567 cat > Imakefile <<'EOF'
569 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
571 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
572 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
573 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
574 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
575 for ac_extension in a so sl; do
576 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
577 test -f $ac_im_libdir/libX11.$ac_extension; then
578 ac_im_usrlibdir=$ac_im_libdir; break
581 # Screen out bogus values from the imake configuration. They are
582 # bogus both because they are the default anyway, and because
583 # using them would break gcc on systems where it needs fixed includes.
584 case "$ac_im_incroot" in
586 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
588 case "$ac_im_usrlibdir" in
590 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
597 if test "$ac_x_includes" = NO; then
598 # Guess where to find include files, by looking for this one X11 .h file.
599 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
601 # First, try using that file with no special directory specified.
602 cat > conftest.$ac_ext <<EOF
603 #line 604 "configure"
604 #include "confdefs.h"
605 #include <$x_direct_test_include>
607 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
608 { (eval echo configure:609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
609 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
610 if test -z "$ac_err"; then
612 # We can compile using X headers with no special include directory.
616 echo "configure: failed program was:" >&5
617 cat conftest.$ac_ext >&5
619 # Look for the header file in a standard set of common directories.
620 # Check X11 before X11Rn because it is often a symlink to the current release.
632 /usr/local/X11/include \
633 /usr/local/X11R6/include \
634 /usr/local/X11R5/include \
635 /usr/local/X11R4/include \
637 /usr/local/include/X11 \
638 /usr/local/include/X11R6 \
639 /usr/local/include/X11R5 \
640 /usr/local/include/X11R4 \
644 /usr/XFree86/include/X11 \
648 /usr/unsupported/include \
649 /usr/athena/include \
650 /usr/local/x11r5/include \
651 /usr/lpp/Xamples/include \
653 /usr/openwin/include \
654 /usr/openwin/share/include \
657 if test -r "$ac_dir/$x_direct_test_include"; then
658 ac_x_includes=$ac_dir
664 fi # $ac_x_includes = NO
666 if test "$ac_x_libraries" = NO; then
667 # Check for the libraries.
669 test -z "$x_direct_test_library" && x_direct_test_library=Xt
670 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
672 # See if we find them without any special options.
673 # Don't add to $LIBS permanently.
675 LIBS="-l$x_direct_test_library $LIBS"
676 cat > conftest.$ac_ext <<EOF
677 #line 678 "configure"
678 #include "confdefs.h"
681 ${x_direct_test_function}()
684 if { (eval echo configure:685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
687 # We can link X programs with no special library path.
690 echo "configure: failed program was:" >&5
691 cat conftest.$ac_ext >&5
694 # First see if replacing the include by lib works.
695 # Check X11 before X11Rn because it is often a symlink to the current release.
696 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
708 /usr/local/X11R6/lib \
709 /usr/local/X11R5/lib \
710 /usr/local/X11R4/lib \
713 /usr/local/lib/X11R6 \
714 /usr/local/lib/X11R5 \
715 /usr/local/lib/X11R4 \
719 /usr/XFree86/lib/X11 \
723 /usr/unsupported/lib \
725 /usr/local/x11r5/lib \
726 /usr/lpp/Xamples/lib \
730 /usr/openwin/share/lib \
733 for ac_extension in a so sl; do
734 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
735 ac_x_libraries=$ac_dir
742 fi # $ac_x_libraries = NO
744 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
745 # Didn't find X anywhere. Cache the known absence of X.
746 ac_cv_have_x="have_x=no"
748 # Record where we found X for the cache.
749 ac_cv_have_x="have_x=yes \
750 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
757 if test "$have_x" != yes; then
758 echo "$ac_t""$have_x" 1>&6
761 # If each of the values was on the command line, it overrides each guess.
762 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
763 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
764 # Update the cache value to reflect the command line values.
765 ac_cv_have_x="have_x=yes \
766 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
767 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
774 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
777 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
780 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
781 if test -f $ac_dir/install-sh; then
783 ac_install_sh="$ac_aux_dir/install-sh -c"
785 elif test -f $ac_dir/install.sh; then
787 ac_install_sh="$ac_aux_dir/install.sh -c"
791 if test -z "$ac_aux_dir"; then
792 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
794 ac_config_guess=$ac_aux_dir/config.guess
795 ac_config_sub=$ac_aux_dir/config.sub
796 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
799 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
801 # Make sure we can run config.sub.
802 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
803 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
806 echo $ac_n "checking host system type""... $ac_c" 1>&6
807 echo "configure:808: checking host system type" >&5
810 case "$host_alias" in
814 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
815 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
817 *) host_alias=$nonopt ;;
821 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
822 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
823 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
824 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
825 echo "$ac_t""$host" 1>&6
827 system_name="$host_os"
829 system_name="`(uname -s -r) 2>/dev/null`"
830 if test -z "$system_name" ; then
831 system_name="`(hostname) 2>/dev/null`"
834 test -n "$system_name" && cat >> confdefs.h <<EOF
835 #define SYSTEM_NAME "$system_name"
838 if eval "test \"`echo '$''{'cf_cv_system_name'+set}'`\" = set"; then
839 echo $ac_n "(cached) $ac_c" 1>&6
841 cf_cv_system_name="$system_name"
845 test -z "$system_name" && system_name="$cf_cv_system_name"
846 test -n "$cf_cv_system_name" && echo "$ac_t""Configuring for $cf_cv_system_name" 1>&6
848 if test ".$system_name" != ".$cf_cv_system_name" ; then
849 echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6
850 { echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; }
854 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
855 echo "configure:856: checking whether ${MAKE-make} sets \${MAKE}" >&5
856 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
857 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
858 echo $ac_n "(cached) $ac_c" 1>&6
860 cat > conftestmake <<\EOF
862 @echo 'ac_maketemp="${MAKE}"'
864 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
865 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
866 if test -n "$ac_maketemp"; then
867 eval ac_cv_prog_make_${ac_make}_set=yes
869 eval ac_cv_prog_make_${ac_make}_set=no
873 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
874 echo "$ac_t""yes" 1>&6
877 echo "$ac_t""no" 1>&6
878 SET_MAKE="MAKE=${MAKE-make}"
881 # Extract the first word of "gcc", so it can be a program name with args.
882 set dummy gcc; ac_word=$2
883 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
884 echo "configure:885: checking for $ac_word" >&5
885 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
886 echo $ac_n "(cached) $ac_c" 1>&6
888 if test -n "$CC"; then
889 ac_cv_prog_CC="$CC" # Let the user override the test.
891 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
893 for ac_dir in $ac_dummy; do
894 test -z "$ac_dir" && ac_dir=.
895 if test -f $ac_dir/$ac_word; then
904 if test -n "$CC"; then
905 echo "$ac_t""$CC" 1>&6
907 echo "$ac_t""no" 1>&6
910 if test -z "$CC"; then
911 # Extract the first word of "cc", so it can be a program name with args.
912 set dummy cc; ac_word=$2
913 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
914 echo "configure:915: checking for $ac_word" >&5
915 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
916 echo $ac_n "(cached) $ac_c" 1>&6
918 if test -n "$CC"; then
919 ac_cv_prog_CC="$CC" # Let the user override the test.
921 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
924 for ac_dir in $ac_dummy; do
925 test -z "$ac_dir" && ac_dir=.
926 if test -f $ac_dir/$ac_word; then
927 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
936 if test $ac_prog_rejected = yes; then
937 # We found a bogon in the path, so make sure we never use it.
938 set dummy $ac_cv_prog_CC
940 if test $# -gt 0; then
941 # We chose a different compiler from the bogus one.
942 # However, it has the same basename, so the bogon will be chosen
943 # first if we set CC to just the basename; use the full file name.
945 set dummy "$ac_dir/$ac_word" "$@"
953 if test -n "$CC"; then
954 echo "$ac_t""$CC" 1>&6
956 echo "$ac_t""no" 1>&6
959 if test -z "$CC"; then
962 # Extract the first word of "cl", so it can be a program name with args.
963 set dummy cl; ac_word=$2
964 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
965 echo "configure:966: checking for $ac_word" >&5
966 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
967 echo $ac_n "(cached) $ac_c" 1>&6
969 if test -n "$CC"; then
970 ac_cv_prog_CC="$CC" # Let the user override the test.
972 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
974 for ac_dir in $ac_dummy; do
975 test -z "$ac_dir" && ac_dir=.
976 if test -f $ac_dir/$ac_word; then
985 if test -n "$CC"; then
986 echo "$ac_t""$CC" 1>&6
988 echo "$ac_t""no" 1>&6
993 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
996 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
997 echo "configure:998: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1000 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1001 ac_cpp='$CPP $CPPFLAGS'
1002 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1003 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1004 cross_compiling=$ac_cv_prog_cc_cross
1006 cat > conftest.$ac_ext << EOF
1008 #line 1009 "configure"
1009 #include "confdefs.h"
1013 if { (eval echo configure:1014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1014 ac_cv_prog_cc_works=yes
1015 # If we can't run a trivial program, we are probably using a cross compiler.
1016 if (./conftest; exit) 2>/dev/null; then
1017 ac_cv_prog_cc_cross=no
1019 ac_cv_prog_cc_cross=yes
1022 echo "configure: failed program was:" >&5
1023 cat conftest.$ac_ext >&5
1024 ac_cv_prog_cc_works=no
1028 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1029 ac_cpp='$CPP $CPPFLAGS'
1030 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1031 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1032 cross_compiling=$ac_cv_prog_cc_cross
1034 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1035 if test $ac_cv_prog_cc_works = no; then
1036 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1038 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1039 echo "configure:1040: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1040 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1041 cross_compiling=$ac_cv_prog_cc_cross
1043 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1044 echo "configure:1045: checking whether we are using GNU C" >&5
1045 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1046 echo $ac_n "(cached) $ac_c" 1>&6
1048 cat > conftest.c <<EOF
1053 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1060 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1062 if test $ac_cv_prog_gcc = yes; then
1068 ac_test_CFLAGS="${CFLAGS+set}"
1069 ac_save_CFLAGS="$CFLAGS"
1071 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1072 echo "configure:1073: checking whether ${CC-cc} accepts -g" >&5
1073 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1074 echo $ac_n "(cached) $ac_c" 1>&6
1076 echo 'void f(){}' > conftest.c
1077 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1086 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1087 if test "$ac_test_CFLAGS" = set; then
1088 CFLAGS="$ac_save_CFLAGS"
1089 elif test $ac_cv_prog_cc_g = yes; then
1090 if test "$GCC" = yes; then
1096 if test "$GCC" = yes; then
1103 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1104 echo "configure:1105: checking how to run the C preprocessor" >&5
1105 # On Suns, sometimes $CPP names a directory.
1106 if test -n "$CPP" && test -d "$CPP"; then
1109 if test -z "$CPP"; then
1110 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1111 echo $ac_n "(cached) $ac_c" 1>&6
1113 # This must be in double quotes, not single quotes, because CPP may get
1114 # substituted into the Makefile and "${CC-cc}" will confuse make.
1116 # On the NeXT, cc -E runs the code through the compiler's parser,
1117 # not just through cpp.
1118 cat > conftest.$ac_ext <<EOF
1119 #line 1120 "configure"
1120 #include "confdefs.h"
1124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1125 { (eval echo configure:1126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1127 if test -z "$ac_err"; then
1131 echo "configure: failed program was:" >&5
1132 cat conftest.$ac_ext >&5
1134 CPP="${CC-cc} -E -traditional-cpp"
1135 cat > conftest.$ac_ext <<EOF
1136 #line 1137 "configure"
1137 #include "confdefs.h"
1141 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1142 { (eval echo configure:1143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1143 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1144 if test -z "$ac_err"; then
1148 echo "configure: failed program was:" >&5
1149 cat conftest.$ac_ext >&5
1151 CPP="${CC-cc} -nologo -E"
1152 cat > conftest.$ac_ext <<EOF
1153 #line 1154 "configure"
1154 #include "confdefs.h"
1158 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1159 { (eval echo configure:1160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1160 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1161 if test -z "$ac_err"; then
1165 echo "configure: failed program was:" >&5
1166 cat conftest.$ac_ext >&5
1175 ac_cv_prog_CPP="$CPP"
1177 CPP="$ac_cv_prog_CPP"
1179 ac_cv_prog_CPP="$CPP"
1181 echo "$ac_t""$CPP" 1>&6
1183 for ac_prog in mawk gawk nawk awk
1185 # Extract the first word of "$ac_prog", so it can be a program name with args.
1186 set dummy $ac_prog; ac_word=$2
1187 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1188 echo "configure:1189: checking for $ac_word" >&5
1189 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1190 echo $ac_n "(cached) $ac_c" 1>&6
1192 if test -n "$AWK"; then
1193 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1195 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1197 for ac_dir in $ac_dummy; do
1198 test -z "$ac_dir" && ac_dir=.
1199 if test -f $ac_dir/$ac_word; then
1200 ac_cv_prog_AWK="$ac_prog"
1207 AWK="$ac_cv_prog_AWK"
1208 if test -n "$AWK"; then
1209 echo "$ac_t""$AWK" 1>&6
1211 echo "$ac_t""no" 1>&6
1214 test -n "$AWK" && break
1218 echo $ac_n "checking if filesystem supports mixed-case filenames""... $ac_c" 1>&6
1219 echo "configure:1220: checking if filesystem supports mixed-case filenames" >&5
1220 if eval "test \"`echo '$''{'cf_cv_mixedcase'+set}'`\" = set"; then
1221 echo $ac_n "(cached) $ac_c" 1>&6
1224 if test "$cross_compiling" = yes ; then
1225 case $target_alias in #(vi
1226 *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
1234 rm -f conftest CONFTEST
1236 if test -f CONFTEST ; then
1241 rm -f conftest CONFTEST
1246 echo "$ac_t""$cf_cv_mixedcase" 1>&6
1247 test "$cf_cv_mixedcase" = yes && cat >> confdefs.h <<\EOF
1248 #define MIXEDCASE_FILENAMES 1
1255 for ac_prog in exctags ctags
1257 # Extract the first word of "$ac_prog", so it can be a program name with args.
1258 set dummy $ac_prog; ac_word=$2
1259 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1260 echo "configure:1261: checking for $ac_word" >&5
1261 if eval "test \"`echo '$''{'ac_cv_prog_CTAGS'+set}'`\" = set"; then
1262 echo $ac_n "(cached) $ac_c" 1>&6
1264 if test -n "$CTAGS"; then
1265 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
1267 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1269 for ac_dir in $ac_dummy; do
1270 test -z "$ac_dir" && ac_dir=.
1271 if test -f $ac_dir/$ac_word; then
1272 ac_cv_prog_CTAGS="$ac_prog"
1279 CTAGS="$ac_cv_prog_CTAGS"
1280 if test -n "$CTAGS"; then
1281 echo "$ac_t""$CTAGS" 1>&6
1283 echo "$ac_t""no" 1>&6
1286 test -n "$CTAGS" && break
1289 for ac_prog in exetags etags
1291 # Extract the first word of "$ac_prog", so it can be a program name with args.
1292 set dummy $ac_prog; ac_word=$2
1293 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1294 echo "configure:1295: checking for $ac_word" >&5
1295 if eval "test \"`echo '$''{'ac_cv_prog_ETAGS'+set}'`\" = set"; then
1296 echo $ac_n "(cached) $ac_c" 1>&6
1298 if test -n "$ETAGS"; then
1299 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
1301 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1303 for ac_dir in $ac_dummy; do
1304 test -z "$ac_dir" && ac_dir=.
1305 if test -f $ac_dir/$ac_word; then
1306 ac_cv_prog_ETAGS="$ac_prog"
1313 ETAGS="$ac_cv_prog_ETAGS"
1314 if test -n "$ETAGS"; then
1315 echo "$ac_t""$ETAGS" 1>&6
1317 echo "$ac_t""no" 1>&6
1320 test -n "$ETAGS" && break
1324 # Extract the first word of "${CTAGS-ctags}", so it can be a program name with args.
1325 set dummy ${CTAGS-ctags}; ac_word=$2
1326 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1327 echo "configure:1328: checking for $ac_word" >&5
1328 if eval "test \"`echo '$''{'ac_cv_prog_MAKE_LOWER_TAGS'+set}'`\" = set"; then
1329 echo $ac_n "(cached) $ac_c" 1>&6
1331 if test -n "$MAKE_LOWER_TAGS"; then
1332 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
1334 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1336 for ac_dir in $ac_dummy; do
1337 test -z "$ac_dir" && ac_dir=.
1338 if test -f $ac_dir/$ac_word; then
1339 ac_cv_prog_MAKE_LOWER_TAGS="yes"
1344 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
1347 MAKE_LOWER_TAGS="$ac_cv_prog_MAKE_LOWER_TAGS"
1348 if test -n "$MAKE_LOWER_TAGS"; then
1349 echo "$ac_t""$MAKE_LOWER_TAGS" 1>&6
1351 echo "$ac_t""no" 1>&6
1355 if test "$cf_cv_mixedcase" = yes ; then
1356 # Extract the first word of "${ETAGS-etags}", so it can be a program name with args.
1357 set dummy ${ETAGS-etags}; ac_word=$2
1358 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1359 echo "configure:1360: checking for $ac_word" >&5
1360 if eval "test \"`echo '$''{'ac_cv_prog_MAKE_UPPER_TAGS'+set}'`\" = set"; then
1361 echo $ac_n "(cached) $ac_c" 1>&6
1363 if test -n "$MAKE_UPPER_TAGS"; then
1364 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
1366 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1368 for ac_dir in $ac_dummy; do
1369 test -z "$ac_dir" && ac_dir=.
1370 if test -f $ac_dir/$ac_word; then
1371 ac_cv_prog_MAKE_UPPER_TAGS="yes"
1376 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
1379 MAKE_UPPER_TAGS="$ac_cv_prog_MAKE_UPPER_TAGS"
1380 if test -n "$MAKE_UPPER_TAGS"; then
1381 echo "$ac_t""$MAKE_UPPER_TAGS" 1>&6
1383 echo "$ac_t""no" 1>&6
1390 if test "$MAKE_UPPER_TAGS" = yes ; then
1396 if test "$MAKE_LOWER_TAGS" = yes ; then
1410 CC_SHARED_OPTS=unknown
1411 CPPFLAGS="$CPPFLAGS"
1413 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
1414 DFT_UPR_MODEL="NORMAL"
1433 TINFO_ARGS='$(LIBS_CURSES)'
1434 cf_cv_abi_version=""
1435 cf_cv_rel_version=""
1440 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1441 echo "configure:1442: checking for Cygwin environment" >&5
1442 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1443 echo $ac_n "(cached) $ac_c" 1>&6
1445 cat > conftest.$ac_ext <<EOF
1446 #line 1447 "configure"
1447 #include "confdefs.h"
1452 #define __CYGWIN__ __CYGWIN32__
1457 if { (eval echo configure:1458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1461 echo "configure: failed program was:" >&5
1462 cat conftest.$ac_ext >&5
1470 echo "$ac_t""$ac_cv_cygwin" 1>&6
1472 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1473 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1474 echo "configure:1475: checking for mingw32 environment" >&5
1475 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1476 echo $ac_n "(cached) $ac_c" 1>&6
1478 cat > conftest.$ac_ext <<EOF
1479 #line 1480 "configure"
1480 #include "confdefs.h"
1486 if { (eval echo configure:1487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1490 echo "configure: failed program was:" >&5
1491 cat conftest.$ac_ext >&5
1499 echo "$ac_t""$ac_cv_mingw32" 1>&6
1501 test "$ac_cv_mingw32" = yes && MINGW32=yes
1504 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1505 echo "configure:1506: checking for executable suffix" >&5
1506 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1507 echo $ac_n "(cached) $ac_c" 1>&6
1509 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1513 echo 'int main () { return 0; }' > conftest.$ac_ext
1515 if { (eval echo configure:1516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1516 for file in conftest.*; do
1518 *.c | *.o | *.obj) ;;
1519 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1523 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1526 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1531 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1532 echo "$ac_t""${ac_cv_exeext}" 1>&6
1535 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1536 echo "configure:1537: checking for object suffix" >&5
1537 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1538 echo $ac_n "(cached) $ac_c" 1>&6
1541 echo 'int i = 1;' > conftest.$ac_ext
1542 if { (eval echo configure:1543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1543 for ac_file in conftest.*; do
1546 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1550 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1555 echo "$ac_t""$ac_cv_objext" 1>&6
1556 OBJEXT=$ac_cv_objext
1557 ac_objext=$ac_cv_objext
1561 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1562 echo "configure:1563: checking for ${CC-cc} option to accept ANSI C" >&5
1563 if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
1564 echo $ac_n "(cached) $ac_c" 1>&6
1568 cf_save_CFLAGS="$CFLAGS"
1569 cf_save_CPPFLAGS="$CPPFLAGS"
1570 # Don't try gcc -ansi; that turns off useful extensions and
1571 # breaks some systems' header files.
1572 # AIX -qlanglvl=ansi
1573 # Ultrix and OSF/1 -std1
1574 # HP-UX -Aa -D_HPUX_SOURCE
1576 # UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
1577 for cf_arg in "-DCC_HAS_PROTOS" \
1582 "-Aa -D_HPUX_SOURCE" \
1589 cf_new_extra_cppflags=
1591 for cf_add_cflags in $cf_arg
1593 case $cf_fix_cppflags in
1595 case $cf_add_cflags in #(vi
1596 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1597 case $cf_add_cflags in
1599 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1601 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1602 && test -z "${cf_tst_cflags}" \
1603 && cf_fix_cppflags=yes
1605 if test $cf_fix_cppflags = yes ; then
1606 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1608 elif test "${cf_tst_cflags}" = "\"'" ; then
1609 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1615 *$cf_add_cflags) #(vi
1618 case $cf_add_cflags in #(vi
1620 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1622 CPPFLAGS=`echo "$CPPFLAGS" | \
1623 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1624 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1628 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1633 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1638 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1640 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1642 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1643 && test -z "${cf_tst_cflags}" \
1644 && cf_fix_cppflags=no
1649 if test -n "$cf_new_cflags" ; then
1651 CFLAGS="$CFLAGS $cf_new_cflags"
1654 if test -n "$cf_new_cppflags" ; then
1656 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1659 if test -n "$cf_new_extra_cppflags" ; then
1661 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1667 cat > conftest.$ac_ext <<EOF
1668 #line 1669 "configure"
1669 #include "confdefs.h"
1671 #ifndef CC_HAS_PROTOS
1672 #if !defined(__STDC__) || (__STDC__ != 1)
1679 int test (int i, double x);
1680 struct s1 {int (*f) (int a);};
1681 struct s2 {int (*f) (double a);};
1684 if { (eval echo configure:1685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1686 cf_cv_ansi_cc="$cf_arg"; break
1688 echo "configure: failed program was:" >&5
1689 cat conftest.$ac_ext >&5
1693 CFLAGS="$cf_save_CFLAGS"
1694 CPPFLAGS="$cf_save_CPPFLAGS"
1698 echo "$ac_t""$cf_cv_ansi_cc" 1>&6
1700 if test "$cf_cv_ansi_cc" != "no"; then
1701 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
1706 cf_new_extra_cppflags=
1708 for cf_add_cflags in $cf_cv_ansi_cc
1710 case $cf_fix_cppflags in
1712 case $cf_add_cflags in #(vi
1713 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1714 case $cf_add_cflags in
1716 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1718 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1719 && test -z "${cf_tst_cflags}" \
1720 && cf_fix_cppflags=yes
1722 if test $cf_fix_cppflags = yes ; then
1723 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1725 elif test "${cf_tst_cflags}" = "\"'" ; then
1726 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1732 *$cf_add_cflags) #(vi
1735 case $cf_add_cflags in #(vi
1737 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1739 CPPFLAGS=`echo "$CPPFLAGS" | \
1740 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1741 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1745 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1750 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1755 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1757 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1759 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1760 && test -z "${cf_tst_cflags}" \
1761 && cf_fix_cppflags=no
1766 if test -n "$cf_new_cflags" ; then
1768 CFLAGS="$CFLAGS $cf_new_cflags"
1771 if test -n "$cf_new_cppflags" ; then
1773 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1776 if test -n "$cf_new_extra_cppflags" ; then
1778 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1785 cat >> confdefs.h <<\EOF
1786 #define CC_HAS_PROTOS 1
1793 if test "$cf_cv_ansi_cc" = "no"; then
1794 { echo "configure: error: Your compiler does not appear to recognize prototypes.
1795 You have the following choices:
1796 a. adjust your compiler options
1797 b. get an up-to-date compiler
1798 c. use a wrapper such as unproto" 1>&2; exit 1; }
1802 if test "$GCC" = yes
1804 cat > conftest.i <<EOF
1806 #define GCC_PRINTF 0
1811 #ifndef GCC_NORETURN
1812 #define GCC_NORETURN /* nothing */
1815 #define GCC_UNUSED /* nothing */
1818 if test "$GCC" = yes
1820 echo "checking for $CC __attribute__ directives" 1>&6
1821 echo "configure:1822: checking for $CC __attribute__ directives" >&5
1822 cat > conftest.$ac_ext <<EOF
1823 #line 1824 "${as_me-configure}"
1824 #include "confdefs.h"
1825 #include "conftest.h"
1826 #include "conftest.i"
1828 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
1830 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
1833 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
1835 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
1837 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
1838 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
1839 extern void foo(void) GCC_NORETURN;
1840 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
1842 cf_printf_attribute=no
1843 cf_scanf_attribute=no
1844 for cf_attribute in scanf printf unused noreturn
1847 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1849 cf_directive="__attribute__(($cf_attribute))"
1850 echo "checking for $CC $cf_directive" 1>&5
1852 case $cf_attribute in #(vi
1854 cf_printf_attribute=yes
1855 cat >conftest.h <<EOF
1856 #define GCC_$cf_ATTRIBUTE 1
1860 cf_scanf_attribute=yes
1861 cat >conftest.h <<EOF
1862 #define GCC_$cf_ATTRIBUTE 1
1866 cat >conftest.h <<EOF
1867 #define GCC_$cf_ATTRIBUTE $cf_directive
1872 if { (eval echo configure:1873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1873 test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
1874 cat conftest.h >>confdefs.h
1875 case $cf_attribute in #(vi
1877 if test "$cf_printf_attribute" = no ; then
1878 cat >>confdefs.h <<EOF
1879 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
1882 cat >>confdefs.h <<EOF
1883 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
1888 if test "$cf_scanf_attribute" = no ; then
1889 cat >>confdefs.h <<EOF
1890 #define GCC_SCANFLIKE(fmt,var) /* nothing */
1893 cat >>confdefs.h <<EOF
1894 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
1902 fgrep define conftest.i >>confdefs.h
1910 cf_POSIX_C_SOURCE=199506L
1913 case $host_os in #(vi
1915 cf_xopen_source="-D_ALL_SOURCE"
1918 cf_xopen_source="-D_APPLE_C_SOURCE"
1921 cf_xopen_source="-D_DARWIN_C_SOURCE"
1923 freebsd*|dragonfly*) #(vi
1924 # 5.x headers associate
1925 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
1926 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
1927 cf_POSIX_C_SOURCE=200112L
1929 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1932 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
1935 cf_xopen_source="-D_HPUX_SOURCE"
1938 cf_xopen_source="-D_SGI_SOURCE"
1940 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
1942 echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
1943 echo "configure:1944: checking if we must define _GNU_SOURCE" >&5
1944 if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
1945 echo $ac_n "(cached) $ac_c" 1>&6
1948 cat > conftest.$ac_ext <<EOF
1949 #line 1950 "configure"
1950 #include "confdefs.h"
1951 #include <sys/types.h>
1954 #ifndef _XOPEN_SOURCE
1959 if { (eval echo configure:1960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1963 echo "configure: failed program was:" >&5
1964 cat conftest.$ac_ext >&5
1967 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1968 cat > conftest.$ac_ext <<EOF
1969 #line 1970 "configure"
1970 #include "confdefs.h"
1971 #include <sys/types.h>
1974 #ifdef _XOPEN_SOURCE
1979 if { (eval echo configure:1980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1983 echo "configure: failed program was:" >&5
1984 cat conftest.$ac_ext >&5
1986 cf_cv_gnu_source=yes
1996 echo "$ac_t""$cf_cv_gnu_source" 1>&6
1997 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2001 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
2004 # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
2007 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
2010 cf_xopen_source="-D_OSF_SOURCE"
2013 cf_xopen_source="-D_QNX_SOURCE"
2016 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
2018 solaris2.1[0-9]) #(vi
2019 cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2021 solaris2.[1-9]) #(vi
2022 cf_xopen_source="-D__EXTENSIONS__"
2025 echo $ac_n "checking if we should define _XOPEN_SOURCE""... $ac_c" 1>&6
2026 echo "configure:2027: checking if we should define _XOPEN_SOURCE" >&5
2027 if eval "test \"`echo '$''{'cf_cv_xopen_source'+set}'`\" = set"; then
2028 echo $ac_n "(cached) $ac_c" 1>&6
2031 cat > conftest.$ac_ext <<EOF
2032 #line 2033 "configure"
2033 #include "confdefs.h"
2034 #include <sys/types.h>
2037 #ifndef _XOPEN_SOURCE
2042 if { (eval echo configure:2043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2044 cf_cv_xopen_source=no
2046 echo "configure: failed program was:" >&5
2047 cat conftest.$ac_ext >&5
2050 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2051 cat > conftest.$ac_ext <<EOF
2052 #line 2053 "configure"
2053 #include "confdefs.h"
2054 #include <sys/types.h>
2057 #ifdef _XOPEN_SOURCE
2062 if { (eval echo configure:2063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2064 cf_cv_xopen_source=no
2066 echo "configure: failed program was:" >&5
2067 cat conftest.$ac_ext >&5
2069 cf_cv_xopen_source=$cf_XOPEN_SOURCE
2079 echo "$ac_t""$cf_cv_xopen_source" 1>&6
2080 if test "$cf_cv_xopen_source" != no ; then
2082 CFLAGS=`echo "$CFLAGS" | \
2083 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
2084 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
2087 CPPFLAGS=`echo "$CPPFLAGS" | \
2088 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
2089 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
2091 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
2096 cf_new_extra_cppflags=
2098 for cf_add_cflags in $cf_temp_xopen_source
2100 case $cf_fix_cppflags in
2102 case $cf_add_cflags in #(vi
2103 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2104 case $cf_add_cflags in
2106 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2108 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2109 && test -z "${cf_tst_cflags}" \
2110 && cf_fix_cppflags=yes
2112 if test $cf_fix_cppflags = yes ; then
2113 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2115 elif test "${cf_tst_cflags}" = "\"'" ; then
2116 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2122 *$cf_add_cflags) #(vi
2125 case $cf_add_cflags in #(vi
2127 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2129 CPPFLAGS=`echo "$CPPFLAGS" | \
2130 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2131 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2135 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2140 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2145 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2147 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2149 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2150 && test -z "${cf_tst_cflags}" \
2151 && cf_fix_cppflags=no
2156 if test -n "$cf_new_cflags" ; then
2158 CFLAGS="$CFLAGS $cf_new_cflags"
2161 if test -n "$cf_new_cppflags" ; then
2163 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2166 if test -n "$cf_new_extra_cppflags" ; then
2168 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2176 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
2178 cf_save_CFLAGS="$CFLAGS"
2179 cf_save_CPPFLAGS="$CPPFLAGS"
2182 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
2183 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
2184 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
2187 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
2188 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
2189 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
2192 echo $ac_n "checking if we should define _POSIX_C_SOURCE""... $ac_c" 1>&6
2193 echo "configure:2194: checking if we should define _POSIX_C_SOURCE" >&5
2194 if eval "test \"`echo '$''{'cf_cv_posix_c_source'+set}'`\" = set"; then
2195 echo $ac_n "(cached) $ac_c" 1>&6
2199 echo "${as_me-configure}:2200: testing if the symbol is already defined go no further ..." 1>&5
2201 cat > conftest.$ac_ext <<EOF
2202 #line 2203 "configure"
2203 #include "confdefs.h"
2204 #include <sys/types.h>
2207 #ifndef _POSIX_C_SOURCE
2212 if { (eval echo configure:2213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2214 cf_cv_posix_c_source=no
2216 echo "configure: failed program was:" >&5
2217 cat conftest.$ac_ext >&5
2219 cf_want_posix_source=no
2220 case .$cf_POSIX_C_SOURCE in #(vi
2222 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2225 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2226 cf_want_posix_source=yes
2229 cf_want_posix_source=yes
2232 if test "$cf_want_posix_source" = yes ; then
2233 cat > conftest.$ac_ext <<EOF
2234 #line 2235 "configure"
2235 #include "confdefs.h"
2236 #include <sys/types.h>
2239 #ifdef _POSIX_SOURCE
2244 if { (eval echo configure:2245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2247 echo "configure: failed program was:" >&5
2248 cat conftest.$ac_ext >&5
2250 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
2255 echo "${as_me-configure}:2256: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
2257 CFLAGS="$cf_trim_CFLAGS"
2258 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
2260 echo "${as_me-configure}:2261: testing if the second compile does not leave our definition intact error ..." 1>&5
2262 cat > conftest.$ac_ext <<EOF
2263 #line 2264 "configure"
2264 #include "confdefs.h"
2265 #include <sys/types.h>
2268 #ifndef _POSIX_C_SOURCE
2273 if { (eval echo configure:2274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2276 echo "configure: failed program was:" >&5
2277 cat conftest.$ac_ext >&5
2279 cf_cv_posix_c_source=no
2282 CFLAGS="$cf_save_CFLAGS"
2283 CPPFLAGS="$cf_save_CPPFLAGS"
2290 echo "$ac_t""$cf_cv_posix_c_source" 1>&6
2292 if test "$cf_cv_posix_c_source" != no ; then
2293 CFLAGS="$cf_trim_CFLAGS"
2294 CPPFLAGS="$cf_trim_CPPFLAGS"
2299 cf_new_extra_cppflags=
2301 for cf_add_cflags in $cf_cv_posix_c_source
2303 case $cf_fix_cppflags in
2305 case $cf_add_cflags in #(vi
2306 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2307 case $cf_add_cflags in
2309 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2311 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2312 && test -z "${cf_tst_cflags}" \
2313 && cf_fix_cppflags=yes
2315 if test $cf_fix_cppflags = yes ; then
2316 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2318 elif test "${cf_tst_cflags}" = "\"'" ; then
2319 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2325 *$cf_add_cflags) #(vi
2328 case $cf_add_cflags in #(vi
2330 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2332 CPPFLAGS=`echo "$CPPFLAGS" | \
2333 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2334 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2338 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2343 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2348 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2350 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2352 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2353 && test -z "${cf_tst_cflags}" \
2354 && cf_fix_cppflags=no
2359 if test -n "$cf_new_cflags" ; then
2361 CFLAGS="$CFLAGS $cf_new_cflags"
2364 if test -n "$cf_new_cppflags" ; then
2366 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2369 if test -n "$cf_new_extra_cppflags" ; then
2371 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2383 if test -n "$cf_xopen_source" ; then
2388 cf_new_extra_cppflags=
2390 for cf_add_cflags in $cf_xopen_source
2392 case $cf_fix_cppflags in
2394 case $cf_add_cflags in #(vi
2395 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2396 case $cf_add_cflags in
2398 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2400 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2401 && test -z "${cf_tst_cflags}" \
2402 && cf_fix_cppflags=yes
2404 if test $cf_fix_cppflags = yes ; then
2405 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2407 elif test "${cf_tst_cflags}" = "\"'" ; then
2408 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2414 *$cf_add_cflags) #(vi
2417 case $cf_add_cflags in #(vi
2419 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2421 CPPFLAGS=`echo "$CPPFLAGS" | \
2422 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2423 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2427 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2432 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2437 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2439 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2441 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2442 && test -z "${cf_tst_cflags}" \
2443 && cf_fix_cppflags=no
2448 if test -n "$cf_new_cflags" ; then
2450 CFLAGS="$CFLAGS $cf_new_cflags"
2453 if test -n "$cf_new_cppflags" ; then
2455 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2458 if test -n "$cf_new_extra_cppflags" ; then
2460 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2468 echo $ac_n "checking for working const""... $ac_c" 1>&6
2469 echo "configure:2470: checking for working const" >&5
2470 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2471 echo $ac_n "(cached) $ac_c" 1>&6
2473 cat > conftest.$ac_ext <<EOF
2474 #line 2475 "configure"
2475 #include "confdefs.h"
2479 /* Ultrix mips cc rejects this. */
2480 typedef int charset[2]; const charset x;
2481 /* SunOS 4.1.1 cc rejects this. */
2482 char const *const *ccp;
2484 /* NEC SVR4.0.2 mips cc rejects this. */
2485 struct point {int x, y;};
2486 static struct point const zero = {0,0};
2487 /* AIX XL C 1.02.0.0 rejects this.
2488 It does not let you subtract one const X* pointer from another in an arm
2489 of an if-expression whose if-part is not a constant expression */
2490 const char *g = "string";
2491 ccp = &g + (g ? g-g : 0);
2492 /* HPUX 7.0 cc rejects these. */
2495 ccp = (char const *const *) p;
2496 { /* SCO 3.2v4 cc rejects this. */
2498 char const *s = 0 ? (char *) 0 : (char const *) 0;
2502 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2504 const int *foo = &x[0];
2507 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2508 typedef const int *iptr;
2512 { /* AIX XL C 1.02.0.0 rejects this saying
2513 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2514 struct s { int j; const int *ap[3]; };
2515 struct s *b; b->j = 5;
2517 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2523 if { (eval echo configure:2524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2527 echo "configure: failed program was:" >&5
2528 cat conftest.$ac_ext >&5
2535 echo "$ac_t""$ac_cv_c_const" 1>&6
2536 if test $ac_cv_c_const = no; then
2537 cat >> confdefs.h <<\EOF
2544 echo $ac_n "checking for signal global datatype""... $ac_c" 1>&6
2545 echo "configure:2546: checking for signal global datatype" >&5
2546 if eval "test \"`echo '$''{'cf_cv_sig_atomic_t'+set}'`\" = set"; then
2547 echo $ac_n "(cached) $ac_c" 1>&6
2551 "volatile sig_atomic_t" \
2555 cat > conftest.$ac_ext <<EOF
2556 #line 2557 "configure"
2557 #include "confdefs.h"
2559 #include <sys/types.h>
2565 static void handler(int sig)
2570 signal(SIGINT, handler);
2574 if { (eval echo configure:2575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2576 cf_cv_sig_atomic_t=$cf_type
2578 echo "configure: failed program was:" >&5
2579 cat conftest.$ac_ext >&5
2581 cf_cv_sig_atomic_t=no
2584 test "$cf_cv_sig_atomic_t" != no && break
2589 echo "$ac_t""$cf_cv_sig_atomic_t" 1>&6
2590 test "$cf_cv_sig_atomic_t" != no && cat >> confdefs.h <<EOF
2591 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
2597 echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6
2598 echo "configure:2599: checking if you want to see long compiling messages" >&5
2600 # Check whether --enable-echo or --disable-echo was given.
2601 if test "${enable_echo+set}" = set; then
2602 enableval="$enable_echo"
2603 test "$enableval" != no && enableval=yes
2604 if test "$enableval" != "yes" ; then
2607 ECHO_LD='@echo linking $@;'
2608 RULE_CC='@echo compiling $<'
2609 SHOW_CC='@echo compiling $@'
2633 echo "$ac_t""$enableval" 1>&6
2643 if test "$GCC" = yes ; then
2644 echo $ac_n "checking version of $CC""... $ac_c" 1>&6
2645 echo "configure:2646: checking version of $CC" >&5
2646 GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2647 test -z "$GCC_VERSION" && GCC_VERSION=unknown
2648 echo "$ac_t""$GCC_VERSION" 1>&6
2652 if ( test "$GCC" = yes || test "$GXX" = yes )
2654 echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
2655 echo "configure:2656: checking if you want to turn on gcc warnings" >&5
2657 # Check whether --enable-warnings or --disable-warnings was given.
2658 if test "${enable_warnings+set}" = set; then
2659 enableval="$enable_warnings"
2660 test "$enableval" != yes && enableval=no
2661 if test "$enableval" != "no" ; then
2672 echo "$ac_t""$with_warnings" 1>&6
2673 if test "$with_warnings" = "yes"
2676 if test "$GCC" = yes
2678 cat > conftest.i <<EOF
2680 #define GCC_PRINTF 0
2685 #ifndef GCC_NORETURN
2686 #define GCC_NORETURN /* nothing */
2689 #define GCC_UNUSED /* nothing */
2692 if test "$GCC" = yes
2694 echo "checking for $CC __attribute__ directives" 1>&6
2695 echo "configure:2696: checking for $CC __attribute__ directives" >&5
2696 cat > conftest.$ac_ext <<EOF
2697 #line 2698 "${as_me-configure}"
2698 #include "confdefs.h"
2699 #include "conftest.h"
2700 #include "conftest.i"
2702 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2704 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2707 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2709 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
2711 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2712 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2713 extern void foo(void) GCC_NORETURN;
2714 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2716 cf_printf_attribute=no
2717 cf_scanf_attribute=no
2718 for cf_attribute in scanf printf unused noreturn
2721 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2723 cf_directive="__attribute__(($cf_attribute))"
2724 echo "checking for $CC $cf_directive" 1>&5
2726 case $cf_attribute in #(vi
2728 cf_printf_attribute=yes
2729 cat >conftest.h <<EOF
2730 #define GCC_$cf_ATTRIBUTE 1
2734 cf_scanf_attribute=yes
2735 cat >conftest.h <<EOF
2736 #define GCC_$cf_ATTRIBUTE 1
2740 cat >conftest.h <<EOF
2741 #define GCC_$cf_ATTRIBUTE $cf_directive
2746 if { (eval echo configure:2747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2747 test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
2748 cat conftest.h >>confdefs.h
2749 case $cf_attribute in #(vi
2751 if test "$cf_printf_attribute" = no ; then
2752 cat >>confdefs.h <<EOF
2753 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
2756 cat >>confdefs.h <<EOF
2757 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2762 if test "$cf_scanf_attribute" = no ; then
2763 cat >>confdefs.h <<EOF
2764 #define GCC_SCANFLIKE(fmt,var) /* nothing */
2767 cat >>confdefs.h <<EOF
2768 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2776 fgrep define conftest.i >>confdefs.h
2786 if test "$GCC" = yes ; then
2789 echo $ac_n "checking if this is really Intel C compiler""... $ac_c" 1>&6
2790 echo "configure:2791: checking if this is really Intel C compiler" >&5
2791 cf_save_CFLAGS="$CFLAGS"
2792 CFLAGS="$CFLAGS -no-gcc"
2793 cat > conftest.$ac_ext <<EOF
2794 #line 2795 "configure"
2795 #include "confdefs.h"
2799 #ifdef __INTEL_COMPILER
2806 if { (eval echo configure:2807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2809 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
2812 echo "configure: failed program was:" >&5
2813 cat conftest.$ac_ext >&5
2816 CFLAGS="$cf_save_CFLAGS"
2817 echo "$ac_t""$INTEL_COMPILER" 1>&6
2823 cat > conftest.$ac_ext <<EOF
2824 #line 2825 "${as_me-configure}"
2825 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
2828 if test "$INTEL_COMPILER" = yes
2830 # The "-wdXXX" options suppress warnings:
2831 # remark #1419: external declaration in primary source file
2832 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
2833 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
2834 # remark #193: zero used for undefined preprocessing identifier
2835 # remark #593: variable "curs_sb_left_arrow" was set but never used
2836 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
2837 # remark #869: parameter "tw" was never referenced
2838 # remark #981: operands are evaluated in unspecified order
2839 # warning #279: controlling expression is constant
2841 echo "checking for $CC warning options" 1>&6
2842 echo "configure:2843: checking for $CC warning options" >&5
2843 cf_save_CFLAGS="$CFLAGS"
2844 EXTRA_CFLAGS="-Wall"
2856 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
2857 if { (eval echo configure:2858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2858 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
2859 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
2862 CFLAGS="$cf_save_CFLAGS"
2864 elif test "$GCC" = yes
2866 echo "checking for $CC warning options" 1>&6
2867 echo "configure:2868: checking for $CC warning options" >&5
2868 cf_save_CFLAGS="$CFLAGS"
2869 EXTRA_CFLAGS="-W -Wall"
2871 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
2873 Wbad-function-cast \
2877 Wmissing-declarations \
2878 Wmissing-prototypes \
2882 Wstrict-prototypes \
2883 Wundef $cf_warn_CONST
2885 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
2886 if { (eval echo configure:2887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2887 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
2888 case $cf_opt in #(vi
2890 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
2893 case $GCC_VERSION in
2895 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
2897 echo "${as_me-configure}:2898: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
2904 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
2907 CFLAGS="$cf_save_CFLAGS"
2919 # Check whether --with-curses-dir or --without-curses-dir was given.
2920 if test "${with_curses_dir+set}" = set; then
2921 withval="$with_curses_dir"
2923 if test "x$prefix" != xNONE; then
2924 cf_path_syntax="$prefix"
2926 cf_path_syntax="$ac_default_prefix"
2929 case ".$withval" in #(vi
2930 .\$\(*\)*|.\'*\'*) #(vi
2934 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2937 eval withval="$withval"
2938 case ".$withval" in #(vi
2940 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2945 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2948 { echo "configure: error: expected a pathname, not \"$withval\"" 1>&2; exit 1; }
2952 cf_cv_curses_dir=$withval
2960 # Check whether --with-5lib or --without-5lib was given.
2961 if test "${with_5lib+set}" = set; then
2962 withval="$with_5lib"
2963 LIBS="-L/usr/5lib $LIBS"
2964 CPPFLAGS="$CPPFLAGS -I/usr/5include"
2969 # Check whether --with-ncursesw or --without-ncursesw was given.
2970 if test "${with_ncursesw+set}" = set; then
2971 withval="$with_ncursesw"
2972 cf_cv_screen=ncursesw
2977 # Check whether --with-ncurses or --without-ncurses was given.
2978 if test "${with_ncurses+set}" = set; then
2979 withval="$with_ncurses"
2980 cf_cv_screen=ncurses
2985 # Check whether --with-pdcurses or --without-pdcurses was given.
2986 if test "${with_pdcurses+set}" = set; then
2987 withval="$with_pdcurses"
2988 cf_cv_screen=pdcurses
2996 case $cf_cv_screen in
3001 echo $ac_n "checking for extra include directories""... $ac_c" 1>&6
3002 echo "configure:3003: checking for extra include directories" >&5
3003 if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then
3004 echo $ac_n "(cached) $ac_c" 1>&6
3007 cf_cv_curses_incdir=no
3008 case $host_os in #(vi
3010 test -d /usr/include/curses_colr && \
3011 cf_cv_curses_incdir="-I/usr/include/curses_colr"
3014 test -d /usr/5lib && \
3015 test -d /usr/5include && \
3016 cf_cv_curses_incdir="-I/usr/5include"
3022 echo "$ac_t""$cf_cv_curses_incdir" 1>&6
3023 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
3026 echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
3027 echo "configure:3028: checking if we have identified curses headers" >&5
3028 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
3029 echo $ac_n "(cached) $ac_c" 1>&6
3032 cf_cv_ncurses_header=none
3039 cat > conftest.$ac_ext <<EOF
3040 #line 3041 "configure"
3041 #include "confdefs.h"
3042 #include <${cf_header}>
3044 initscr(); tgoto("?", 0,0)
3047 if { (eval echo configure:3048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3049 cf_cv_ncurses_header=$cf_header; break
3051 echo "configure: failed program was:" >&5
3052 cat conftest.$ac_ext >&5
3059 echo "$ac_t""$cf_cv_ncurses_header" 1>&6
3061 if test "$cf_cv_ncurses_header" = none ; then
3062 { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
3065 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
3066 for ac_hdr in $cf_cv_ncurses_header
3068 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3069 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3070 echo "configure:3071: checking for $ac_hdr" >&5
3071 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3072 echo $ac_n "(cached) $ac_c" 1>&6
3074 cat > conftest.$ac_ext <<EOF
3075 #line 3076 "configure"
3076 #include "confdefs.h"
3079 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3080 { (eval echo configure:3081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3081 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3082 if test -z "$ac_err"; then
3084 eval "ac_cv_header_$ac_safe=yes"
3087 echo "configure: failed program was:" >&5
3088 cat conftest.$ac_ext >&5
3090 eval "ac_cv_header_$ac_safe=no"
3094 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3095 echo "$ac_t""yes" 1>&6
3096 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3097 cat >> confdefs.h <<EOF
3098 #define $ac_tr_hdr 1
3102 echo "$ac_t""no" 1>&6
3108 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
3109 echo "configure:3110: checking for terminfo header" >&5
3110 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
3111 echo $ac_n "(cached) $ac_c" 1>&6
3114 case ${cf_cv_ncurses_header} in #(vi
3115 */ncurses.h|*/ncursesw.h) #(vi
3116 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
3119 cf_term_header=term.h
3123 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
3125 cat > conftest.$ac_ext <<EOF
3126 #line 3127 "configure"
3127 #include "confdefs.h"
3129 #include <${cf_cv_ncurses_header-curses.h}>
3133 int x = auto_left_margin
3136 if { (eval echo configure:3137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3139 cf_cv_term_header="$cf_test"
3141 echo "configure: failed program was:" >&5
3142 cat conftest.$ac_ext >&5
3145 cf_cv_term_header=unknown
3149 test "$cf_cv_term_header" != unknown && break
3154 echo "$ac_t""$cf_cv_term_header" 1>&6
3156 # Set definitions to allow ifdef'ing to accommodate subdirectories
3158 case $cf_cv_term_header in # (vi
3160 cat >> confdefs.h <<\EOF
3161 #define HAVE_TERM_H 1
3167 case $cf_cv_term_header in # (vi
3168 ncurses/term.h) #(vi
3169 cat >> confdefs.h <<\EOF
3170 #define HAVE_NCURSES_TERM_H 1
3175 cat >> confdefs.h <<\EOF
3176 #define HAVE_NCURSESW_TERM_H 1
3184 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
3185 echo "configure:3186: checking for ncurses version" >&5
3186 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
3187 echo $ac_n "(cached) $ac_c" 1>&6
3190 cf_cv_ncurses_version=no
3193 if test "$cross_compiling" = yes; then
3196 # This will not work if the preprocessor splits the line after the
3197 # Autoconf token. The 'unproto' program does that.
3198 cat > conftest.$ac_ext <<EOF
3199 #include <${cf_cv_ncurses_header-curses.h}>
3201 #ifdef NCURSES_VERSION
3202 Autoconf NCURSES_VERSION
3210 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
3211 { (eval echo configure:3212: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
3212 if test -f conftest.out ; then
3213 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
3214 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
3219 cat > conftest.$ac_ext <<EOF
3220 #line 3221 "configure"
3221 #include "confdefs.h"
3223 #include <${cf_cv_ncurses_header-curses.h}>
3227 FILE *fp = fopen("$cf_tempfile", "w");
3228 #ifdef NCURSES_VERSION
3229 # ifdef NCURSES_VERSION_PATCH
3230 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
3232 fprintf(fp, "%s\n", NCURSES_VERSION);
3236 fprintf(fp, "old\n");
3241 ${cf_cv_main_return-return}(0);
3244 if { (eval echo configure:3245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3247 cf_cv_ncurses_version=`cat $cf_tempfile`
3249 echo "configure: failed program was:" >&5
3250 cat conftest.$ac_ext >&5
3259 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
3260 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
3267 echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
3268 echo "configure:3269: checking if we have identified curses libraries" >&5
3269 cat > conftest.$ac_ext <<EOF
3270 #line 3271 "configure"
3271 #include "confdefs.h"
3272 #include <${cf_cv_ncurses_header-curses.h}>
3274 initscr(); tgoto("?", 0,0)
3277 if { (eval echo configure:3278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3281 echo "configure: failed program was:" >&5
3282 cat conftest.$ac_ext >&5
3287 echo "$ac_t""$cf_result" 1>&6
3289 if test "$cf_result" = no ; then
3290 case $host_os in #(vi
3292 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
3293 echo "configure:3294: checking for tgoto in -lmytinfo" >&5
3294 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
3295 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3296 echo $ac_n "(cached) $ac_c" 1>&6
3298 ac_save_LIBS="$LIBS"
3299 LIBS="-lmytinfo $LIBS"
3300 cat > conftest.$ac_ext <<EOF
3301 #line 3302 "configure"
3302 #include "confdefs.h"
3303 /* Override any gcc2 internal prototype to avoid an error. */
3304 /* We use char because int might match the return type of a gcc2
3305 builtin and then its argument prototype would still apply. */
3312 if { (eval echo configure:3313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3314 eval "ac_cv_lib_$ac_lib_var=yes"
3316 echo "configure: failed program was:" >&5
3317 cat conftest.$ac_ext >&5
3319 eval "ac_cv_lib_$ac_lib_var=no"
3322 LIBS="$ac_save_LIBS"
3325 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3326 echo "$ac_t""yes" 1>&6
3327 LIBS="-lmytinfo $LIBS"
3329 echo "$ac_t""no" 1>&6
3334 echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
3335 echo "configure:3336: checking for initscr in -lcur_colr" >&5
3336 ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
3337 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3338 echo $ac_n "(cached) $ac_c" 1>&6
3340 ac_save_LIBS="$LIBS"
3341 LIBS="-lcur_colr $LIBS"
3342 cat > conftest.$ac_ext <<EOF
3343 #line 3344 "configure"
3344 #include "confdefs.h"
3345 /* Override any gcc2 internal prototype to avoid an error. */
3346 /* We use char because int might match the return type of a gcc2
3347 builtin and then its argument prototype would still apply. */
3354 if { (eval echo configure:3355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3356 eval "ac_cv_lib_$ac_lib_var=yes"
3358 echo "configure: failed program was:" >&5
3359 cat conftest.$ac_ext >&5
3361 eval "ac_cv_lib_$ac_lib_var=no"
3364 LIBS="$ac_save_LIBS"
3367 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3368 echo "$ac_t""yes" 1>&6
3370 LIBS="-lcur_colr $LIBS"
3371 ac_cv_func_initscr=yes
3374 echo "$ac_t""no" 1>&6
3376 echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
3377 echo "configure:3378: checking for initscr in -lHcurses" >&5
3378 ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
3379 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3380 echo $ac_n "(cached) $ac_c" 1>&6
3382 ac_save_LIBS="$LIBS"
3383 LIBS="-lHcurses $LIBS"
3384 cat > conftest.$ac_ext <<EOF
3385 #line 3386 "configure"
3386 #include "confdefs.h"
3387 /* Override any gcc2 internal prototype to avoid an error. */
3388 /* We use char because int might match the return type of a gcc2
3389 builtin and then its argument prototype would still apply. */
3396 if { (eval echo configure:3397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3398 eval "ac_cv_lib_$ac_lib_var=yes"
3400 echo "configure: failed program was:" >&5
3401 cat conftest.$ac_ext >&5
3403 eval "ac_cv_lib_$ac_lib_var=no"
3406 LIBS="$ac_save_LIBS"
3409 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3410 echo "$ac_t""yes" 1>&6
3412 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
3413 LIBS="-lHcurses $LIBS"
3414 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
3415 ac_cv_func_initscr=yes
3418 echo "$ac_t""no" 1>&6
3424 linux*) # Suse Linux does not follow /usr/lib convention
3426 if test -n "/lib" ; then
3427 for cf_add_libdir in /lib
3429 if test $cf_add_libdir = /usr/lib ; then
3431 elif test -d $cf_add_libdir
3434 if test -n "$LDFLAGS$LIBS" ; then
3435 # a loop is needed to ensure we can add subdirs of existing dirs
3436 for cf_test_libdir in $LDFLAGS $LIBS ; do
3437 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3438 cf_have_libdir=yes; break
3442 if test "$cf_have_libdir" = no ; then
3443 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
3445 echo "${as_me-configure}:3446: testing adding $cf_add_libdir to library-path ..." 1>&5
3448 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3456 if test -d /usr/5lib ; then
3458 if test -n "/usr/5lib" ; then
3459 for cf_add_libdir in /usr/5lib
3461 if test $cf_add_libdir = /usr/lib ; then
3463 elif test -d $cf_add_libdir
3466 if test -n "$LDFLAGS$LIBS" ; then
3467 # a loop is needed to ensure we can add subdirs of existing dirs
3468 for cf_test_libdir in $LDFLAGS $LIBS ; do
3469 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3470 cf_have_libdir=yes; break
3474 if test "$cf_have_libdir" = no ; then
3475 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
3477 echo "${as_me-configure}:3478: testing adding $cf_add_libdir to library-path ..." 1>&5
3480 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3486 LIBS="$LIBS -lcurses -ltermcap"
3488 ac_cv_func_initscr=yes
3492 if test ".$ac_cv_func_initscr" != .yes ; then
3493 cf_save_LIBS="$LIBS"
3497 if test ".${cf_cv_ncurses_version-no}" != .no
3499 cf_check_list="ncurses curses cursesX"
3501 cf_check_list="cursesX curses ncurses"
3504 # Check for library containing tgoto. Do this before curses library
3505 # because it may be needed to link the test-case for initscr.
3506 echo $ac_n "checking for tgoto""... $ac_c" 1>&6
3507 echo "configure:3508: checking for tgoto" >&5
3508 if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
3509 echo $ac_n "(cached) $ac_c" 1>&6
3511 cat > conftest.$ac_ext <<EOF
3512 #line 3513 "configure"
3513 #include "confdefs.h"
3514 /* System header to define __stub macros and hopefully few prototypes,
3515 which can conflict with char tgoto(); below. */
3517 /* Override any gcc2 internal prototype to avoid an error. */
3518 /* We use char because int might match the return type of a gcc2
3519 builtin and then its argument prototype would still apply. */
3524 /* The GNU C library defines this for functions which it implements
3525 to always fail with ENOSYS. Some functions are actually named
3526 something starting with __ and the normal name is an alias. */
3527 #if defined (__stub_tgoto) || defined (__stub___tgoto)
3535 if { (eval echo configure:3536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3537 eval "ac_cv_func_tgoto=yes"
3539 echo "configure: failed program was:" >&5
3540 cat conftest.$ac_ext >&5
3542 eval "ac_cv_func_tgoto=no"
3547 if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then
3548 echo "$ac_t""yes" 1>&6
3549 cf_term_lib=predefined
3551 echo "$ac_t""no" 1>&6
3553 for cf_term_lib in $cf_check_list termcap termlib unknown
3555 echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
3556 echo "configure:3557: checking for tgoto in -l$cf_term_lib" >&5
3557 ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
3558 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3559 echo $ac_n "(cached) $ac_c" 1>&6
3561 ac_save_LIBS="$LIBS"
3562 LIBS="-l$cf_term_lib $LIBS"
3563 cat > conftest.$ac_ext <<EOF
3564 #line 3565 "configure"
3565 #include "confdefs.h"
3566 /* Override any gcc2 internal prototype to avoid an error. */
3567 /* We use char because int might match the return type of a gcc2
3568 builtin and then its argument prototype would still apply. */
3575 if { (eval echo configure:3576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3577 eval "ac_cv_lib_$ac_lib_var=yes"
3579 echo "configure: failed program was:" >&5
3580 cat conftest.$ac_ext >&5
3582 eval "ac_cv_lib_$ac_lib_var=no"
3585 LIBS="$ac_save_LIBS"
3588 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3589 echo "$ac_t""yes" 1>&6
3592 echo "$ac_t""no" 1>&6
3600 # Check for library containing initscr
3601 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
3602 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
3604 echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
3605 echo "configure:3606: checking for initscr in -l$cf_curs_lib" >&5
3606 ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
3607 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3608 echo $ac_n "(cached) $ac_c" 1>&6
3610 ac_save_LIBS="$LIBS"
3611 LIBS="-l$cf_curs_lib $LIBS"
3612 cat > conftest.$ac_ext <<EOF
3613 #line 3614 "configure"
3614 #include "confdefs.h"
3615 /* Override any gcc2 internal prototype to avoid an error. */
3616 /* We use char because int might match the return type of a gcc2
3617 builtin and then its argument prototype would still apply. */
3624 if { (eval echo configure:3625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3626 eval "ac_cv_lib_$ac_lib_var=yes"
3628 echo "configure: failed program was:" >&5
3629 cat conftest.$ac_ext >&5
3631 eval "ac_cv_lib_$ac_lib_var=no"
3634 LIBS="$ac_save_LIBS"
3637 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3638 echo "$ac_t""yes" 1>&6
3641 echo "$ac_t""no" 1>&6
3645 test $cf_curs_lib = unknown && { echo "configure: error: no curses library found" 1>&2; exit 1; }
3647 LIBS="-l$cf_curs_lib $cf_save_LIBS"
3648 if test "$cf_term_lib" = unknown ; then
3649 echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
3650 echo "configure:3651: checking if we can link with $cf_curs_lib library" >&5
3651 cat > conftest.$ac_ext <<EOF
3652 #line 3653 "configure"
3653 #include "confdefs.h"
3654 #include <${cf_cv_ncurses_header-curses.h}>
3659 if { (eval echo configure:3660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3663 echo "configure: failed program was:" >&5
3664 cat conftest.$ac_ext >&5
3669 echo "$ac_t""$cf_result" 1>&6
3670 test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; }
3671 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
3673 elif test "$cf_term_lib" != predefined ; then
3674 echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
3675 echo "configure:3676: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
3676 cat > conftest.$ac_ext <<EOF
3677 #line 3678 "configure"
3678 #include "confdefs.h"
3679 #include <${cf_cv_ncurses_header-curses.h}>
3681 initscr(); tgoto((char *)0, 0, 0);
3684 if { (eval echo configure:3685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3688 echo "configure: failed program was:" >&5
3689 cat conftest.$ac_ext >&5
3692 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
3693 cat > conftest.$ac_ext <<EOF
3694 #line 3695 "configure"
3695 #include "confdefs.h"
3696 #include <${cf_cv_ncurses_header-curses.h}>
3701 if { (eval echo configure:3702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3705 echo "configure: failed program was:" >&5
3706 cat conftest.$ac_ext >&5
3714 echo "$ac_t""$cf_result" 1>&6
3724 cf_ncuconfig_root=ncurses
3726 echo "Looking for ${cf_ncuconfig_root}-config"
3727 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
3729 # Extract the first word of "$ac_prog", so it can be a program name with args.
3730 set dummy $ac_prog; ac_word=$2
3731 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3732 echo "configure:3733: checking for $ac_word" >&5
3733 if eval "test \"`echo '$''{'ac_cv_path_NCURSES_CONFIG'+set}'`\" = set"; then
3734 echo $ac_n "(cached) $ac_c" 1>&6
3736 case "$NCURSES_CONFIG" in
3738 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
3741 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a dos path.
3744 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3746 for ac_dir in $ac_dummy; do
3747 test -z "$ac_dir" && ac_dir=.
3748 if test -f $ac_dir/$ac_word; then
3749 ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
3757 NCURSES_CONFIG="$ac_cv_path_NCURSES_CONFIG"
3758 if test -n "$NCURSES_CONFIG"; then
3759 echo "$ac_t""$NCURSES_CONFIG" 1>&6
3761 echo "$ac_t""no" 1>&6
3764 test -n "$NCURSES_CONFIG" && break
3766 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
3769 if test "$NCURSES_CONFIG" != none ; then
3771 cf_cv_ncurses_header=curses.h
3773 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
3774 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
3776 cat >> confdefs.h <<\EOF
3782 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3784 cat >> confdefs.h <<EOF
3785 #define $cf_nculib_ROOT 1
3789 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
3795 cf_ncuhdr_root=ncurses
3797 test -n "$cf_cv_curses_dir" && \
3798 test "$cf_cv_curses_dir" != "no" && { \
3800 if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
3801 for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
3803 while test $cf_add_incdir != /usr/include
3805 if test -d $cf_add_incdir
3808 if test -n "$CFLAGS$CPPFLAGS" ; then
3809 # a loop is needed to ensure we can add subdirs of existing dirs
3810 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3811 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3812 cf_have_incdir=yes; break
3817 if test "$cf_have_incdir" = no ; then
3818 if test "$cf_add_incdir" = /usr/local/include ; then
3819 if test "$GCC" = yes
3821 cf_save_CPPFLAGS=$CPPFLAGS
3822 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3823 cat > conftest.$ac_ext <<EOF
3824 #line 3825 "configure"
3825 #include "confdefs.h"
3831 if { (eval echo configure:3832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3834 echo "configure: failed program was:" >&5
3835 cat conftest.$ac_ext >&5
3840 CPPFLAGS=$cf_save_CPPFLAGS
3845 if test "$cf_have_incdir" = no ; then
3846 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3848 echo "${as_me-configure}:3849: testing adding $cf_add_incdir to include-path ..." 1>&5
3851 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3853 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3854 test "$cf_top_incdir" = "$cf_add_incdir" && break
3855 cf_add_incdir="$cf_top_incdir"
3866 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
3867 echo "configure:3868: checking for $cf_ncuhdr_root header in include-path" >&5
3868 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
3869 echo $ac_n "(cached) $ac_c" 1>&6
3872 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
3873 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
3874 for cf_header in $cf_header_list
3877 cat > conftest.$ac_ext <<EOF
3878 #line 3879 "configure"
3879 #include "confdefs.h"
3882 #include <$cf_header>
3885 #ifdef NCURSES_VERSION
3887 printf("%s\n", NCURSES_VERSION);
3899 if { (eval echo configure:3900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3901 cf_cv_ncurses_h=$cf_header
3904 echo "configure: failed program was:" >&5
3905 cat conftest.$ac_ext >&5
3911 test "$cf_cv_ncurses_h" != no && break
3916 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
3920 if test "$cf_cv_ncurses_h" != no ; then
3921 cf_cv_ncurses_header=$cf_cv_ncurses_h
3924 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
3925 echo "configure:3926: checking for $cf_ncuhdr_root include-path" >&5
3926 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
3927 echo $ac_n "(cached) $ac_c" 1>&6
3930 test -n "$verbose" && echo
3933 cf_header_path_list=""
3934 if test -n "${CFLAGS}${CPPFLAGS}" ; then
3935 for cf_header_path in $CPPFLAGS $CFLAGS
3937 case $cf_header_path in #(vi
3939 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
3941 test "$cf_header_path" != "NONE" && \
3942 test -d "$cf_header_path" && \
3944 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
3945 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
3946 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
3947 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
3948 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
3949 test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3952 cf_header_path_list="$cf_header_path_list $cf_search"
3961 test "/usr" != "$prefix" && \
3963 (test $prefix = NONE || test -d $prefix) && {
3964 test -n "$verbose" && echo " ... testing for include-directories under /usr"
3965 test -d /usr/include && cf_search="$cf_search /usr/include"
3966 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
3967 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
3968 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
3969 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3973 test "$prefix" != "NONE" && \
3974 test -d "$prefix" && \
3976 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
3977 test -d $prefix/include && cf_search="$cf_search $prefix/include"
3978 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
3979 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
3980 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
3981 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3985 test "/usr/local" != "$prefix" && \
3986 test -d "/usr/local" && \
3987 (test $prefix = NONE || test -d $prefix) && {
3988 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
3989 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
3990 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
3991 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
3992 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
3993 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3997 test "/opt" != "$prefix" && \
3999 (test $prefix = NONE || test -d $prefix) && {
4000 test -n "$verbose" && echo " ... testing for include-directories under /opt"
4001 test -d /opt/include && cf_search="$cf_search /opt/include"
4002 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
4003 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
4004 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
4005 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4009 test "$HOME" != "$prefix" && \
4010 test -d "$HOME" && \
4011 (test $prefix = NONE || test -d $prefix) && {
4012 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
4013 test -d $HOME/include && cf_search="$cf_search $HOME/include"
4014 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
4015 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
4016 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
4017 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4022 test "$includedir" != NONE && \
4023 test "$includedir" != "/usr/include" && \
4024 test -d "$includedir" && {
4025 test -d $includedir && cf_search="$cf_search $includedir"
4026 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4029 test "$oldincludedir" != NONE && \
4030 test "$oldincludedir" != "/usr/include" && \
4031 test -d "$oldincludedir" && {
4032 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
4033 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4036 cf_search="$cf_header_path_list $cf_search"
4038 test -n "$verbose" && echo search path $cf_search
4039 cf_save2_CPPFLAGS="$CPPFLAGS"
4040 for cf_incdir in $cf_search
4043 if test -n "$cf_incdir" ; then
4044 for cf_add_incdir in $cf_incdir
4046 while test $cf_add_incdir != /usr/include
4048 if test -d $cf_add_incdir
4051 if test -n "$CFLAGS$CPPFLAGS" ; then
4052 # a loop is needed to ensure we can add subdirs of existing dirs
4053 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4054 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4055 cf_have_incdir=yes; break
4060 if test "$cf_have_incdir" = no ; then
4061 if test "$cf_add_incdir" = /usr/local/include ; then
4062 if test "$GCC" = yes
4064 cf_save_CPPFLAGS=$CPPFLAGS
4065 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4066 cat > conftest.$ac_ext <<EOF
4067 #line 4068 "configure"
4068 #include "confdefs.h"
4074 if { (eval echo configure:4075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4077 echo "configure: failed program was:" >&5
4078 cat conftest.$ac_ext >&5
4083 CPPFLAGS=$cf_save_CPPFLAGS
4088 if test "$cf_have_incdir" = no ; then
4089 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4091 echo "${as_me-configure}:4092: testing adding $cf_add_incdir to include-path ..." 1>&5
4094 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4096 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4097 test "$cf_top_incdir" = "$cf_add_incdir" && break
4098 cf_add_incdir="$cf_top_incdir"
4112 cat > conftest.$ac_ext <<EOF
4113 #line 4114 "configure"
4114 #include "confdefs.h"
4117 #include <$cf_header>
4120 #ifdef NCURSES_VERSION
4122 printf("%s\n", NCURSES_VERSION);
4134 if { (eval echo configure:4135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4136 cf_cv_ncurses_h2=$cf_header
4139 echo "configure: failed program was:" >&5
4140 cat conftest.$ac_ext >&5
4146 if test "$cf_cv_ncurses_h2" != no ; then
4147 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4148 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
4151 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
4153 CPPFLAGS="$cf_save2_CPPFLAGS"
4154 test "$cf_cv_ncurses_h2" != no && break
4156 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
4160 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
4162 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4163 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4164 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4165 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4168 if test -n "$cf_1st_incdir" ; then
4169 for cf_add_incdir in $cf_1st_incdir
4171 while test $cf_add_incdir != /usr/include
4173 if test -d $cf_add_incdir
4176 if test -n "$CFLAGS$CPPFLAGS" ; then
4177 # a loop is needed to ensure we can add subdirs of existing dirs
4178 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4179 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4180 cf_have_incdir=yes; break
4185 if test "$cf_have_incdir" = no ; then
4186 if test "$cf_add_incdir" = /usr/local/include ; then
4187 if test "$GCC" = yes
4189 cf_save_CPPFLAGS=$CPPFLAGS
4190 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4191 cat > conftest.$ac_ext <<EOF
4192 #line 4193 "configure"
4193 #include "confdefs.h"
4199 if { (eval echo configure:4200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4202 echo "configure: failed program was:" >&5
4203 cat conftest.$ac_ext >&5
4208 CPPFLAGS=$cf_save_CPPFLAGS
4213 if test "$cf_have_incdir" = no ; then
4214 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4216 echo "${as_me-configure}:4217: testing adding $cf_add_incdir to include-path ..." 1>&5
4219 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4221 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4222 test "$cf_top_incdir" = "$cf_add_incdir" && break
4223 cf_add_incdir="$cf_top_incdir"
4235 # Set definitions to allow ifdef'ing for ncurses.h
4237 case $cf_cv_ncurses_header in # (vi
4239 cat >> confdefs.h <<\EOF
4240 #define HAVE_NCURSES_H 1
4246 case $cf_cv_ncurses_header in # (vi
4247 ncurses/curses.h|ncurses/ncurses.h)
4248 cat >> confdefs.h <<\EOF
4249 #define HAVE_NCURSES_NCURSES_H 1
4253 ncursesw/curses.h|ncursesw/ncurses.h)
4254 cat >> confdefs.h <<\EOF
4255 #define HAVE_NCURSESW_NCURSES_H 1
4263 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
4264 echo "configure:4265: checking for terminfo header" >&5
4265 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
4266 echo $ac_n "(cached) $ac_c" 1>&6
4269 case ${cf_cv_ncurses_header} in #(vi
4270 */ncurses.h|*/ncursesw.h) #(vi
4271 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4274 cf_term_header=term.h
4278 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4280 cat > conftest.$ac_ext <<EOF
4281 #line 4282 "configure"
4282 #include "confdefs.h"
4284 #include <${cf_cv_ncurses_header-curses.h}>
4288 int x = auto_left_margin
4291 if { (eval echo configure:4292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4294 cf_cv_term_header="$cf_test"
4296 echo "configure: failed program was:" >&5
4297 cat conftest.$ac_ext >&5
4300 cf_cv_term_header=unknown
4304 test "$cf_cv_term_header" != unknown && break
4309 echo "$ac_t""$cf_cv_term_header" 1>&6
4311 # Set definitions to allow ifdef'ing to accommodate subdirectories
4313 case $cf_cv_term_header in # (vi
4315 cat >> confdefs.h <<\EOF
4316 #define HAVE_TERM_H 1
4322 case $cf_cv_term_header in # (vi
4323 ncurses/term.h) #(vi
4324 cat >> confdefs.h <<\EOF
4325 #define HAVE_NCURSES_TERM_H 1
4330 cat >> confdefs.h <<\EOF
4331 #define HAVE_NCURSESW_TERM_H 1
4338 # some applications need this, but should check for NCURSES_VERSION
4339 cat >> confdefs.h <<\EOF
4345 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
4346 echo "configure:4347: checking for ncurses version" >&5
4347 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
4348 echo $ac_n "(cached) $ac_c" 1>&6
4351 cf_cv_ncurses_version=no
4354 if test "$cross_compiling" = yes; then
4357 # This will not work if the preprocessor splits the line after the
4358 # Autoconf token. The 'unproto' program does that.
4359 cat > conftest.$ac_ext <<EOF
4360 #include <${cf_cv_ncurses_header-curses.h}>
4362 #ifdef NCURSES_VERSION
4363 Autoconf NCURSES_VERSION
4371 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4372 { (eval echo configure:4373: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
4373 if test -f conftest.out ; then
4374 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4375 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4380 cat > conftest.$ac_ext <<EOF
4381 #line 4382 "configure"
4382 #include "confdefs.h"
4384 #include <${cf_cv_ncurses_header-curses.h}>
4388 FILE *fp = fopen("$cf_tempfile", "w");
4389 #ifdef NCURSES_VERSION
4390 # ifdef NCURSES_VERSION_PATCH
4391 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4393 fprintf(fp, "%s\n", NCURSES_VERSION);
4397 fprintf(fp, "old\n");
4402 ${cf_cv_main_return-return}(0);
4405 if { (eval echo configure:4406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4408 cf_cv_ncurses_version=`cat $cf_tempfile`
4410 echo "configure: failed program was:" >&5
4411 cat conftest.$ac_ext >&5
4420 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
4421 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
4429 cf_nculib_root=ncurses
4430 # This works, except for the special case where we find gpm, but
4431 # ncurses is in a nonstandard location via $LIBS, and we really want
4434 cf_ncurses_SAVE="$LIBS"
4435 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
4436 echo "configure:4437: checking for Gpm_Open in -lgpm" >&5
4437 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
4438 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4439 echo $ac_n "(cached) $ac_c" 1>&6
4441 ac_save_LIBS="$LIBS"
4443 cat > conftest.$ac_ext <<EOF
4444 #line 4445 "configure"
4445 #include "confdefs.h"
4446 /* Override any gcc2 internal prototype to avoid an error. */
4447 /* We use char because int might match the return type of a gcc2
4448 builtin and then its argument prototype would still apply. */
4455 if { (eval echo configure:4456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4457 eval "ac_cv_lib_$ac_lib_var=yes"
4459 echo "configure: failed program was:" >&5
4460 cat conftest.$ac_ext >&5
4462 eval "ac_cv_lib_$ac_lib_var=no"
4465 LIBS="$ac_save_LIBS"
4468 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4469 echo "$ac_t""yes" 1>&6
4470 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
4471 echo "configure:4472: checking for initscr in -lgpm" >&5
4472 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
4473 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4474 echo $ac_n "(cached) $ac_c" 1>&6
4476 ac_save_LIBS="$LIBS"
4478 cat > conftest.$ac_ext <<EOF
4479 #line 4480 "configure"
4480 #include "confdefs.h"
4481 /* Override any gcc2 internal prototype to avoid an error. */
4482 /* We use char because int might match the return type of a gcc2
4483 builtin and then its argument prototype would still apply. */
4490 if { (eval echo configure:4491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4492 eval "ac_cv_lib_$ac_lib_var=yes"
4494 echo "configure: failed program was:" >&5
4495 cat conftest.$ac_ext >&5
4497 eval "ac_cv_lib_$ac_lib_var=no"
4500 LIBS="$ac_save_LIBS"
4503 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4504 echo "$ac_t""yes" 1>&6
4505 LIBS="$cf_ncurses_SAVE"
4507 echo "$ac_t""no" 1>&6
4508 cf_ncurses_LIBS="-lgpm"
4512 echo "$ac_t""no" 1>&6
4516 case $host_os in #(vi
4518 # This is only necessary if you are linking against an obsolete
4519 # version of ncurses (but it should do no harm, since it's static).
4520 if test "$cf_nculib_root" = ncurses ; then
4521 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
4522 echo "configure:4523: checking for tgoto in -lmytinfo" >&5
4523 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
4524 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4525 echo $ac_n "(cached) $ac_c" 1>&6
4527 ac_save_LIBS="$LIBS"
4528 LIBS="-lmytinfo $LIBS"
4529 cat > conftest.$ac_ext <<EOF
4530 #line 4531 "configure"
4531 #include "confdefs.h"
4532 /* Override any gcc2 internal prototype to avoid an error. */
4533 /* We use char because int might match the return type of a gcc2
4534 builtin and then its argument prototype would still apply. */
4541 if { (eval echo configure:4542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4543 eval "ac_cv_lib_$ac_lib_var=yes"
4545 echo "configure: failed program was:" >&5
4546 cat conftest.$ac_ext >&5
4548 eval "ac_cv_lib_$ac_lib_var=no"
4551 LIBS="$ac_save_LIBS"
4554 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4555 echo "$ac_t""yes" 1>&6
4556 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
4558 echo "$ac_t""no" 1>&6
4565 LIBS="$cf_ncurses_LIBS $LIBS"
4567 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4570 if test -n "$cf_cv_curses_dir/lib" ; then
4571 for cf_add_libdir in $cf_cv_curses_dir/lib
4573 if test $cf_add_libdir = /usr/lib ; then
4575 elif test -d $cf_add_libdir
4578 if test -n "$LDFLAGS$LIBS" ; then
4579 # a loop is needed to ensure we can add subdirs of existing dirs
4580 for cf_test_libdir in $LDFLAGS $LIBS ; do
4581 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4582 cf_have_libdir=yes; break
4586 if test "$cf_have_libdir" = no ; then
4587 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4589 echo "${as_me-configure}:4590: testing adding $cf_add_libdir to library-path ..." 1>&5
4592 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4598 LIBS="-l$cf_nculib_root $LIBS"
4601 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
4603 echo $ac_n "checking for initscr""... $ac_c" 1>&6
4604 echo "configure:4605: checking for initscr" >&5
4605 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
4606 echo $ac_n "(cached) $ac_c" 1>&6
4608 cat > conftest.$ac_ext <<EOF
4609 #line 4610 "configure"
4610 #include "confdefs.h"
4611 /* System header to define __stub macros and hopefully few prototypes,
4612 which can conflict with char initscr(); below. */
4614 /* Override any gcc2 internal prototype to avoid an error. */
4615 /* We use char because int might match the return type of a gcc2
4616 builtin and then its argument prototype would still apply. */
4621 /* The GNU C library defines this for functions which it implements
4622 to always fail with ENOSYS. Some functions are actually named
4623 something starting with __ and the normal name is an alias. */
4624 #if defined (__stub_initscr) || defined (__stub___initscr)
4632 if { (eval echo configure:4633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4634 eval "ac_cv_func_initscr=yes"
4636 echo "configure: failed program was:" >&5
4637 cat conftest.$ac_ext >&5
4639 eval "ac_cv_func_initscr=no"
4644 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
4645 echo "$ac_t""yes" 1>&6
4646 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4648 echo "$ac_t""no" 1>&6
4650 cf_save_LIBS="$LIBS"
4651 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
4652 echo "configure:4653: checking for initscr in -l$cf_nculib_root" >&5
4653 LIBS="-l$cf_nculib_root $LIBS"
4654 cat > conftest.$ac_ext <<EOF
4655 #line 4656 "configure"
4656 #include "confdefs.h"
4657 #include <${cf_cv_ncurses_header-curses.h}>
4662 if { (eval echo configure:4663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4664 echo "$ac_t""yes" 1>&6
4665 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4668 echo "configure: failed program was:" >&5
4669 cat conftest.$ac_ext >&5
4671 echo "$ac_t""no" 1>&6
4674 cf_library_path_list=""
4675 if test -n "${LDFLAGS}${LIBS}" ; then
4676 for cf_library_path in $LDFLAGS $LIBS
4678 case $cf_library_path in #(vi
4680 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
4682 test "$cf_library_path" != "NONE" && \
4683 test -d "$cf_library_path" && \
4685 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
4686 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
4687 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
4688 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
4689 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
4690 test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
4693 cf_library_path_list="$cf_library_path_list $cf_search"
4702 test "/usr" != "$prefix" && \
4704 (test $prefix = NONE || test -d $prefix) && {
4705 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
4706 test -d /usr/lib && cf_search="$cf_search /usr/lib"
4707 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
4708 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
4709 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
4710 test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
4714 test "$prefix" != "NONE" && \
4715 test -d "$prefix" && \
4717 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
4718 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
4719 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
4720 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
4721 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
4722 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
4726 test "/usr/local" != "$prefix" && \
4727 test -d "/usr/local" && \
4728 (test $prefix = NONE || test -d $prefix) && {
4729 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
4730 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
4731 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
4732 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
4733 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
4734 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
4738 test "/opt" != "$prefix" && \
4740 (test $prefix = NONE || test -d $prefix) && {
4741 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
4742 test -d /opt/lib && cf_search="$cf_search /opt/lib"
4743 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
4744 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
4745 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
4746 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
4750 test "$HOME" != "$prefix" && \
4751 test -d "$HOME" && \
4752 (test $prefix = NONE || test -d $prefix) && {
4753 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
4754 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
4755 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
4756 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
4757 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
4758 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
4763 cf_search="$cf_library_path_list $cf_search"
4765 for cf_libdir in $cf_search
4767 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
4768 echo "configure:4769: checking for -l$cf_nculib_root in $cf_libdir" >&5
4769 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
4770 cat > conftest.$ac_ext <<EOF
4771 #line 4772 "configure"
4772 #include "confdefs.h"
4773 #include <${cf_cv_ncurses_header-curses.h}>
4778 if { (eval echo configure:4779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4780 echo "$ac_t""yes" 1>&6
4781 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4784 echo "configure: failed program was:" >&5
4785 cat conftest.$ac_ext >&5
4787 echo "$ac_t""no" 1>&6
4788 LIBS="$cf_save_LIBS"
4798 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
4800 if test $cf_found_library = no ; then
4801 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
4807 if test -n "$cf_ncurses_LIBS" ; then
4808 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
4809 echo "configure:4810: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
4810 cf_ncurses_SAVE="$LIBS"
4811 for p in $cf_ncurses_LIBS ; do
4812 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
4813 if test "$q" != "$LIBS" ; then
4817 cat > conftest.$ac_ext <<EOF
4818 #line 4819 "configure"
4819 #include "confdefs.h"
4820 #include <${cf_cv_ncurses_header-curses.h}>
4822 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
4825 if { (eval echo configure:4826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4827 echo "$ac_t""yes" 1>&6
4829 echo "configure: failed program was:" >&5
4830 cat conftest.$ac_ext >&5
4832 echo "$ac_t""no" 1>&6
4833 LIBS="$cf_ncurses_SAVE"
4839 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4841 cat >> confdefs.h <<EOF
4842 #define $cf_nculib_ROOT 1
4853 echo $ac_n "checking for multibyte character support""... $ac_c" 1>&6
4854 echo "configure:4855: checking for multibyte character support" >&5
4855 if eval "test \"`echo '$''{'cf_cv_utf8_lib'+set}'`\" = set"; then
4856 echo $ac_n "(cached) $ac_c" 1>&6
4859 cf_save_LIBS="$LIBS"
4860 cat > conftest.$ac_ext <<EOF
4861 #line 4862 "configure"
4862 #include "confdefs.h"
4869 if { (eval echo configure:4870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4873 echo "configure: failed program was:" >&5
4874 cat conftest.$ac_ext >&5
4878 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
4879 # will be set on completion of the AC_TRY_LINK below.
4880 cf_cv_header_path_utf8=
4881 cf_cv_library_path_utf8=
4884 echo "${as_me-configure}:4885: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
4887 cat > conftest.$ac_ext <<EOF
4888 #line 4889 "configure"
4889 #include "confdefs.h"
4891 #include <libutf8.h>
4896 if { (eval echo configure:4897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4899 cf_cv_find_linkage_utf8=yes
4902 echo "configure: failed program was:" >&5
4903 cat conftest.$ac_ext >&5
4907 cf_save_LIBS="$LIBS"
4908 LIBS="-lutf8 $cf_save_LIBS"
4910 cat > conftest.$ac_ext <<EOF
4911 #line 4912 "configure"
4912 #include "confdefs.h"
4914 #include <libutf8.h>
4919 if { (eval echo configure:4920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4922 cf_cv_find_linkage_utf8=yes
4923 cf_cv_library_file_utf8="-lutf8"
4926 echo "configure: failed program was:" >&5
4927 cat conftest.$ac_ext >&5
4930 cf_cv_find_linkage_utf8=no
4931 LIBS="$cf_save_LIBS"
4933 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
4935 echo "${as_me-configure}:4936: testing find linkage for utf8 library ..." 1>&5
4939 echo "${as_me-configure}:4940: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
4942 cf_save_CPPFLAGS="$CPPFLAGS"
4943 cf_test_CPPFLAGS="$CPPFLAGS"
4947 cf_header_path_list=""
4948 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4949 for cf_header_path in $CPPFLAGS $CFLAGS
4951 case $cf_header_path in #(vi
4953 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4955 test "$cf_header_path" != "NONE" && \
4956 test -d "$cf_header_path" && \
4958 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
4959 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
4960 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
4961 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
4962 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
4963 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
4966 cf_header_path_list="$cf_header_path_list $cf_search"
4975 test "/usr" != "$prefix" && \
4977 (test $prefix = NONE || test -d $prefix) && {
4978 test -n "$verbose" && echo " ... testing for include-directories under /usr"
4979 test -d /usr/include && cf_search="$cf_search /usr/include"
4980 test -d /usr/include/utf8 && cf_search="$cf_search /usr/include/utf8"
4981 test -d /usr/include/utf8/include && cf_search="$cf_search /usr/include/utf8/include"
4982 test -d /usr/utf8/include && cf_search="$cf_search /usr/utf8/include"
4983 test -d /usr/utf8/include/utf8 && cf_search="$cf_search /usr/utf8/include/utf8"
4987 test "$prefix" != "NONE" && \
4988 test -d "$prefix" && \
4990 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
4991 test -d $prefix/include && cf_search="$cf_search $prefix/include"
4992 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
4993 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
4994 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
4995 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
4999 test "/usr/local" != "$prefix" && \
5000 test -d "/usr/local" && \
5001 (test $prefix = NONE || test -d $prefix) && {
5002 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
5003 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
5004 test -d /usr/local/include/utf8 && cf_search="$cf_search /usr/local/include/utf8"
5005 test -d /usr/local/include/utf8/include && cf_search="$cf_search /usr/local/include/utf8/include"
5006 test -d /usr/local/utf8/include && cf_search="$cf_search /usr/local/utf8/include"
5007 test -d /usr/local/utf8/include/utf8 && cf_search="$cf_search /usr/local/utf8/include/utf8"
5011 test "/opt" != "$prefix" && \
5013 (test $prefix = NONE || test -d $prefix) && {
5014 test -n "$verbose" && echo " ... testing for include-directories under /opt"
5015 test -d /opt/include && cf_search="$cf_search /opt/include"
5016 test -d /opt/include/utf8 && cf_search="$cf_search /opt/include/utf8"
5017 test -d /opt/include/utf8/include && cf_search="$cf_search /opt/include/utf8/include"
5018 test -d /opt/utf8/include && cf_search="$cf_search /opt/utf8/include"
5019 test -d /opt/utf8/include/utf8 && cf_search="$cf_search /opt/utf8/include/utf8"
5023 test "$HOME" != "$prefix" && \
5024 test -d "$HOME" && \
5025 (test $prefix = NONE || test -d $prefix) && {
5026 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
5027 test -d $HOME/include && cf_search="$cf_search $HOME/include"
5028 test -d $HOME/include/utf8 && cf_search="$cf_search $HOME/include/utf8"
5029 test -d $HOME/include/utf8/include && cf_search="$cf_search $HOME/include/utf8/include"
5030 test -d $HOME/utf8/include && cf_search="$cf_search $HOME/utf8/include"
5031 test -d $HOME/utf8/include/utf8 && cf_search="$cf_search $HOME/utf8/include/utf8"
5036 test "$includedir" != NONE && \
5037 test "$includedir" != "/usr/include" && \
5038 test -d "$includedir" && {
5039 test -d $includedir && cf_search="$cf_search $includedir"
5040 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
5043 test "$oldincludedir" != NONE && \
5044 test "$oldincludedir" != "/usr/include" && \
5045 test -d "$oldincludedir" && {
5046 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5047 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
5050 cf_search="$cf_header_path_list $cf_search"
5052 for cf_cv_header_path_utf8 in $cf_search
5054 if test -d $cf_cv_header_path_utf8 ; then
5055 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
5057 echo "${as_me-configure}:5058: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
5060 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
5061 cat > conftest.$ac_ext <<EOF
5062 #line 5063 "configure"
5063 #include "confdefs.h"
5065 #include <libutf8.h>
5070 if { (eval echo configure:5071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5073 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
5075 echo "${as_me-configure}:5076: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
5078 cf_cv_find_linkage_utf8=maybe
5079 cf_test_CPPFLAGS="$CPPFLAGS"
5082 echo "configure: failed program was:" >&5
5083 cat conftest.$ac_ext >&5
5086 CPPFLAGS="$cf_save_CPPFLAGS"
5093 if test "$cf_cv_find_linkage_utf8" = maybe ; then
5096 echo "${as_me-configure}:5097: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
5099 cf_save_LIBS="$LIBS"
5100 cf_save_LDFLAGS="$LDFLAGS"
5104 if test "$cf_cv_find_linkage_utf8" != yes ; then
5107 cf_library_path_list=""
5108 if test -n "${LDFLAGS}${LIBS}" ; then
5109 for cf_library_path in $LDFLAGS $LIBS
5111 case $cf_library_path in #(vi
5113 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5115 test "$cf_library_path" != "NONE" && \
5116 test -d "$cf_library_path" && \
5118 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5119 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5120 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
5121 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
5122 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
5123 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
5126 cf_library_path_list="$cf_library_path_list $cf_search"
5135 test "/usr" != "$prefix" && \
5137 (test $prefix = NONE || test -d $prefix) && {
5138 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
5139 test -d /usr/lib && cf_search="$cf_search /usr/lib"
5140 test -d /usr/lib/utf8 && cf_search="$cf_search /usr/lib/utf8"
5141 test -d /usr/lib/utf8/lib && cf_search="$cf_search /usr/lib/utf8/lib"
5142 test -d /usr/utf8/lib && cf_search="$cf_search /usr/utf8/lib"
5143 test -d /usr/utf8/lib/utf8 && cf_search="$cf_search /usr/utf8/lib/utf8"
5147 test "$prefix" != "NONE" && \
5148 test -d "$prefix" && \
5150 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5151 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5152 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
5153 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
5154 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
5155 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
5159 test "/usr/local" != "$prefix" && \
5160 test -d "/usr/local" && \
5161 (test $prefix = NONE || test -d $prefix) && {
5162 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
5163 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
5164 test -d /usr/local/lib/utf8 && cf_search="$cf_search /usr/local/lib/utf8"
5165 test -d /usr/local/lib/utf8/lib && cf_search="$cf_search /usr/local/lib/utf8/lib"
5166 test -d /usr/local/utf8/lib && cf_search="$cf_search /usr/local/utf8/lib"
5167 test -d /usr/local/utf8/lib/utf8 && cf_search="$cf_search /usr/local/utf8/lib/utf8"
5171 test "/opt" != "$prefix" && \
5173 (test $prefix = NONE || test -d $prefix) && {
5174 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
5175 test -d /opt/lib && cf_search="$cf_search /opt/lib"
5176 test -d /opt/lib/utf8 && cf_search="$cf_search /opt/lib/utf8"
5177 test -d /opt/lib/utf8/lib && cf_search="$cf_search /opt/lib/utf8/lib"
5178 test -d /opt/utf8/lib && cf_search="$cf_search /opt/utf8/lib"
5179 test -d /opt/utf8/lib/utf8 && cf_search="$cf_search /opt/utf8/lib/utf8"
5183 test "$HOME" != "$prefix" && \
5184 test -d "$HOME" && \
5185 (test $prefix = NONE || test -d $prefix) && {
5186 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
5187 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
5188 test -d $HOME/lib/utf8 && cf_search="$cf_search $HOME/lib/utf8"
5189 test -d $HOME/lib/utf8/lib && cf_search="$cf_search $HOME/lib/utf8/lib"
5190 test -d $HOME/utf8/lib && cf_search="$cf_search $HOME/utf8/lib"
5191 test -d $HOME/utf8/lib/utf8 && cf_search="$cf_search $HOME/utf8/lib/utf8"
5196 cf_search="$cf_library_path_list $cf_search"
5198 for cf_cv_library_path_utf8 in $cf_search
5200 if test -d $cf_cv_library_path_utf8 ; then
5201 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
5203 echo "${as_me-configure}:5204: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
5206 CPPFLAGS="$cf_test_CPPFLAGS"
5207 LIBS="-lutf8 $cf_save_LIBS"
5208 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
5209 cat > conftest.$ac_ext <<EOF
5210 #line 5211 "configure"
5211 #include "confdefs.h"
5213 #include <libutf8.h>
5218 if { (eval echo configure:5219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5221 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
5223 echo "${as_me-configure}:5224: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
5226 cf_cv_find_linkage_utf8=yes
5227 cf_cv_library_file_utf8="-lutf8"
5230 echo "configure: failed program was:" >&5
5231 cat conftest.$ac_ext >&5
5234 CPPFLAGS="$cf_save_CPPFLAGS"
5235 LIBS="$cf_save_LIBS"
5236 LDFLAGS="$cf_save_LDFLAGS"
5242 LIBS="$cf_save_LIBS"
5243 CPPFLAGS="$cf_save_CPPFLAGS"
5244 LDFLAGS="$cf_save_LDFLAGS"
5248 cf_cv_find_linkage_utf8=no
5257 if test "$cf_cv_find_linkage_utf8" = yes ; then
5258 cf_cv_utf8_lib=add-on
5268 echo "$ac_t""$cf_cv_utf8_lib" 1>&6
5270 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
5272 if test "$cf_cv_utf8_lib" = "add-on" ; then
5273 cat >> confdefs.h <<\EOF
5274 #define HAVE_LIBUTF8_H 1
5278 if test -n "$cf_cv_header_path_utf8" ; then
5279 for cf_add_incdir in $cf_cv_header_path_utf8
5281 while test $cf_add_incdir != /usr/include
5283 if test -d $cf_add_incdir
5286 if test -n "$CFLAGS$CPPFLAGS" ; then
5287 # a loop is needed to ensure we can add subdirs of existing dirs
5288 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5289 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5290 cf_have_incdir=yes; break
5295 if test "$cf_have_incdir" = no ; then
5296 if test "$cf_add_incdir" = /usr/local/include ; then
5297 if test "$GCC" = yes
5299 cf_save_CPPFLAGS=$CPPFLAGS
5300 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5301 cat > conftest.$ac_ext <<EOF
5302 #line 5303 "configure"
5303 #include "confdefs.h"
5309 if { (eval echo configure:5310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5312 echo "configure: failed program was:" >&5
5313 cat conftest.$ac_ext >&5
5318 CPPFLAGS=$cf_save_CPPFLAGS
5323 if test "$cf_have_incdir" = no ; then
5324 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5326 echo "${as_me-configure}:5327: testing adding $cf_add_incdir to include-path ..." 1>&5
5329 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5331 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5332 test "$cf_top_incdir" = "$cf_add_incdir" && break
5333 cf_add_incdir="$cf_top_incdir"
5343 if test -n "$cf_cv_library_path_utf8" ; then
5344 for cf_add_libdir in $cf_cv_library_path_utf8
5346 if test $cf_add_libdir = /usr/lib ; then
5348 elif test -d $cf_add_libdir
5351 if test -n "$LDFLAGS$LIBS" ; then
5352 # a loop is needed to ensure we can add subdirs of existing dirs
5353 for cf_test_libdir in $LDFLAGS $LIBS ; do
5354 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5355 cf_have_libdir=yes; break
5359 if test "$cf_have_libdir" = no ; then
5360 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5362 echo "${as_me-configure}:5363: testing adding $cf_add_libdir to library-path ..." 1>&5
5365 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5375 cf_ncuconfig_root=ncursesw
5377 echo "Looking for ${cf_ncuconfig_root}-config"
5378 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5380 # Extract the first word of "$ac_prog", so it can be a program name with args.
5381 set dummy $ac_prog; ac_word=$2
5382 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5383 echo "configure:5384: checking for $ac_word" >&5
5384 if eval "test \"`echo '$''{'ac_cv_path_NCURSES_CONFIG'+set}'`\" = set"; then
5385 echo $ac_n "(cached) $ac_c" 1>&6
5387 case "$NCURSES_CONFIG" in
5389 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
5392 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a dos path.
5395 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5397 for ac_dir in $ac_dummy; do
5398 test -z "$ac_dir" && ac_dir=.
5399 if test -f $ac_dir/$ac_word; then
5400 ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
5408 NCURSES_CONFIG="$ac_cv_path_NCURSES_CONFIG"
5409 if test -n "$NCURSES_CONFIG"; then
5410 echo "$ac_t""$NCURSES_CONFIG" 1>&6
5412 echo "$ac_t""no" 1>&6
5415 test -n "$NCURSES_CONFIG" && break
5417 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
5420 if test "$NCURSES_CONFIG" != none ; then
5422 cf_cv_ncurses_header=curses.h
5424 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5425 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
5427 cat >> confdefs.h <<\EOF
5433 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5435 cat >> confdefs.h <<EOF
5436 #define $cf_nculib_ROOT 1
5440 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
5446 cf_ncuhdr_root=ncursesw
5448 test -n "$cf_cv_curses_dir" && \
5449 test "$cf_cv_curses_dir" != "no" && { \
5451 if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5452 for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
5454 while test $cf_add_incdir != /usr/include
5456 if test -d $cf_add_incdir
5459 if test -n "$CFLAGS$CPPFLAGS" ; then
5460 # a loop is needed to ensure we can add subdirs of existing dirs
5461 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5462 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5463 cf_have_incdir=yes; break
5468 if test "$cf_have_incdir" = no ; then
5469 if test "$cf_add_incdir" = /usr/local/include ; then
5470 if test "$GCC" = yes
5472 cf_save_CPPFLAGS=$CPPFLAGS
5473 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5474 cat > conftest.$ac_ext <<EOF
5475 #line 5476 "configure"
5476 #include "confdefs.h"
5482 if { (eval echo configure:5483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5485 echo "configure: failed program was:" >&5
5486 cat conftest.$ac_ext >&5
5491 CPPFLAGS=$cf_save_CPPFLAGS
5496 if test "$cf_have_incdir" = no ; then
5497 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5499 echo "${as_me-configure}:5500: testing adding $cf_add_incdir to include-path ..." 1>&5
5502 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5504 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5505 test "$cf_top_incdir" = "$cf_add_incdir" && break
5506 cf_add_incdir="$cf_top_incdir"
5517 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
5518 echo "configure:5519: checking for $cf_ncuhdr_root header in include-path" >&5
5519 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
5520 echo $ac_n "(cached) $ac_c" 1>&6
5523 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5524 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
5525 for cf_header in $cf_header_list
5528 cat > conftest.$ac_ext <<EOF
5529 #line 5530 "configure"
5530 #include "confdefs.h"
5533 #define _XOPEN_SOURCE_EXTENDED
5534 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
5535 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
5537 #include <$cf_header>
5540 #ifdef NCURSES_VERSION
5546 printf("%s\n", NCURSES_VERSION);
5558 if { (eval echo configure:5559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5560 cf_cv_ncurses_h=$cf_header
5563 echo "configure: failed program was:" >&5
5564 cat conftest.$ac_ext >&5
5570 test "$cf_cv_ncurses_h" != no && break
5575 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
5579 if test "$cf_cv_ncurses_h" != no ; then
5580 cf_cv_ncurses_header=$cf_cv_ncurses_h
5583 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
5584 echo "configure:5585: checking for $cf_ncuhdr_root include-path" >&5
5585 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
5586 echo $ac_n "(cached) $ac_c" 1>&6
5589 test -n "$verbose" && echo
5592 cf_header_path_list=""
5593 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5594 for cf_header_path in $CPPFLAGS $CFLAGS
5596 case $cf_header_path in #(vi
5598 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5600 test "$cf_header_path" != "NONE" && \
5601 test -d "$cf_header_path" && \
5603 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5604 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5605 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5606 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5607 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5608 test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5611 cf_header_path_list="$cf_header_path_list $cf_search"
5620 test "/usr" != "$prefix" && \
5622 (test $prefix = NONE || test -d $prefix) && {
5623 test -n "$verbose" && echo " ... testing for include-directories under /usr"
5624 test -d /usr/include && cf_search="$cf_search /usr/include"
5625 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
5626 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
5627 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
5628 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5632 test "$prefix" != "NONE" && \
5633 test -d "$prefix" && \
5635 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5636 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5637 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5638 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5639 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5640 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5644 test "/usr/local" != "$prefix" && \
5645 test -d "/usr/local" && \
5646 (test $prefix = NONE || test -d $prefix) && {
5647 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
5648 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
5649 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
5650 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
5651 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
5652 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5656 test "/opt" != "$prefix" && \
5658 (test $prefix = NONE || test -d $prefix) && {
5659 test -n "$verbose" && echo " ... testing for include-directories under /opt"
5660 test -d /opt/include && cf_search="$cf_search /opt/include"
5661 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
5662 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
5663 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
5664 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5668 test "$HOME" != "$prefix" && \
5669 test -d "$HOME" && \
5670 (test $prefix = NONE || test -d $prefix) && {
5671 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
5672 test -d $HOME/include && cf_search="$cf_search $HOME/include"
5673 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
5674 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
5675 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
5676 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5681 test "$includedir" != NONE && \
5682 test "$includedir" != "/usr/include" && \
5683 test -d "$includedir" && {
5684 test -d $includedir && cf_search="$cf_search $includedir"
5685 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5688 test "$oldincludedir" != NONE && \
5689 test "$oldincludedir" != "/usr/include" && \
5690 test -d "$oldincludedir" && {
5691 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5692 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5695 cf_search="$cf_header_path_list $cf_search"
5697 test -n "$verbose" && echo search path $cf_search
5698 cf_save2_CPPFLAGS="$CPPFLAGS"
5699 for cf_incdir in $cf_search
5702 if test -n "$cf_incdir" ; then
5703 for cf_add_incdir in $cf_incdir
5705 while test $cf_add_incdir != /usr/include
5707 if test -d $cf_add_incdir
5710 if test -n "$CFLAGS$CPPFLAGS" ; then
5711 # a loop is needed to ensure we can add subdirs of existing dirs
5712 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5713 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5714 cf_have_incdir=yes; break
5719 if test "$cf_have_incdir" = no ; then
5720 if test "$cf_add_incdir" = /usr/local/include ; then
5721 if test "$GCC" = yes
5723 cf_save_CPPFLAGS=$CPPFLAGS
5724 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5725 cat > conftest.$ac_ext <<EOF
5726 #line 5727 "configure"
5727 #include "confdefs.h"
5733 if { (eval echo configure:5734: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5736 echo "configure: failed program was:" >&5
5737 cat conftest.$ac_ext >&5
5742 CPPFLAGS=$cf_save_CPPFLAGS
5747 if test "$cf_have_incdir" = no ; then
5748 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5750 echo "${as_me-configure}:5751: testing adding $cf_add_incdir to include-path ..." 1>&5
5753 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5755 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5756 test "$cf_top_incdir" = "$cf_add_incdir" && break
5757 cf_add_incdir="$cf_top_incdir"
5771 cat > conftest.$ac_ext <<EOF
5772 #line 5773 "configure"
5773 #include "confdefs.h"
5776 #include <$cf_header>
5779 #ifdef NCURSES_VERSION
5781 printf("%s\n", NCURSES_VERSION);
5793 if { (eval echo configure:5794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5795 cf_cv_ncurses_h2=$cf_header
5798 echo "configure: failed program was:" >&5
5799 cat conftest.$ac_ext >&5
5805 if test "$cf_cv_ncurses_h2" != no ; then
5806 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5807 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
5810 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5812 CPPFLAGS="$cf_save2_CPPFLAGS"
5813 test "$cf_cv_ncurses_h2" != no && break
5815 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
5819 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
5821 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
5822 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
5823 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
5824 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
5827 if test -n "$cf_1st_incdir" ; then
5828 for cf_add_incdir in $cf_1st_incdir
5830 while test $cf_add_incdir != /usr/include
5832 if test -d $cf_add_incdir
5835 if test -n "$CFLAGS$CPPFLAGS" ; then
5836 # a loop is needed to ensure we can add subdirs of existing dirs
5837 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5838 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5839 cf_have_incdir=yes; break
5844 if test "$cf_have_incdir" = no ; then
5845 if test "$cf_add_incdir" = /usr/local/include ; then
5846 if test "$GCC" = yes
5848 cf_save_CPPFLAGS=$CPPFLAGS
5849 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5850 cat > conftest.$ac_ext <<EOF
5851 #line 5852 "configure"
5852 #include "confdefs.h"
5858 if { (eval echo configure:5859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5861 echo "configure: failed program was:" >&5
5862 cat conftest.$ac_ext >&5
5867 CPPFLAGS=$cf_save_CPPFLAGS
5872 if test "$cf_have_incdir" = no ; then
5873 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5875 echo "${as_me-configure}:5876: testing adding $cf_add_incdir to include-path ..." 1>&5
5878 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5880 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5881 test "$cf_top_incdir" = "$cf_add_incdir" && break
5882 cf_add_incdir="$cf_top_incdir"
5894 # Set definitions to allow ifdef'ing for ncurses.h
5896 case $cf_cv_ncurses_header in # (vi
5898 cat >> confdefs.h <<\EOF
5899 #define HAVE_NCURSES_H 1
5905 case $cf_cv_ncurses_header in # (vi
5906 ncurses/curses.h|ncurses/ncurses.h)
5907 cat >> confdefs.h <<\EOF
5908 #define HAVE_NCURSES_NCURSES_H 1
5912 ncursesw/curses.h|ncursesw/ncurses.h)
5913 cat >> confdefs.h <<\EOF
5914 #define HAVE_NCURSESW_NCURSES_H 1
5922 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
5923 echo "configure:5924: checking for terminfo header" >&5
5924 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
5925 echo $ac_n "(cached) $ac_c" 1>&6
5928 case ${cf_cv_ncurses_header} in #(vi
5929 */ncurses.h|*/ncursesw.h) #(vi
5930 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5933 cf_term_header=term.h
5937 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5939 cat > conftest.$ac_ext <<EOF
5940 #line 5941 "configure"
5941 #include "confdefs.h"
5943 #include <${cf_cv_ncurses_header-curses.h}>
5947 int x = auto_left_margin
5950 if { (eval echo configure:5951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5953 cf_cv_term_header="$cf_test"
5955 echo "configure: failed program was:" >&5
5956 cat conftest.$ac_ext >&5
5959 cf_cv_term_header=unknown
5963 test "$cf_cv_term_header" != unknown && break
5968 echo "$ac_t""$cf_cv_term_header" 1>&6
5970 # Set definitions to allow ifdef'ing to accommodate subdirectories
5972 case $cf_cv_term_header in # (vi
5974 cat >> confdefs.h <<\EOF
5975 #define HAVE_TERM_H 1
5981 case $cf_cv_term_header in # (vi
5982 ncurses/term.h) #(vi
5983 cat >> confdefs.h <<\EOF
5984 #define HAVE_NCURSES_TERM_H 1
5989 cat >> confdefs.h <<\EOF
5990 #define HAVE_NCURSESW_TERM_H 1
5997 # some applications need this, but should check for NCURSES_VERSION
5998 cat >> confdefs.h <<\EOF
6004 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
6005 echo "configure:6006: checking for ncurses version" >&5
6006 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
6007 echo $ac_n "(cached) $ac_c" 1>&6
6010 cf_cv_ncurses_version=no
6013 if test "$cross_compiling" = yes; then
6016 # This will not work if the preprocessor splits the line after the
6017 # Autoconf token. The 'unproto' program does that.
6018 cat > conftest.$ac_ext <<EOF
6019 #include <${cf_cv_ncurses_header-curses.h}>
6021 #ifdef NCURSES_VERSION
6022 Autoconf NCURSES_VERSION
6030 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6031 { (eval echo configure:6032: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
6032 if test -f conftest.out ; then
6033 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6034 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6039 cat > conftest.$ac_ext <<EOF
6040 #line 6041 "configure"
6041 #include "confdefs.h"
6043 #include <${cf_cv_ncurses_header-curses.h}>
6047 FILE *fp = fopen("$cf_tempfile", "w");
6048 #ifdef NCURSES_VERSION
6049 # ifdef NCURSES_VERSION_PATCH
6050 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6052 fprintf(fp, "%s\n", NCURSES_VERSION);
6056 fprintf(fp, "old\n");
6061 ${cf_cv_main_return-return}(0);
6064 if { (eval echo configure:6065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6067 cf_cv_ncurses_version=`cat $cf_tempfile`
6069 echo "configure: failed program was:" >&5
6070 cat conftest.$ac_ext >&5
6079 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
6080 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
6088 cf_nculib_root=ncursesw
6089 # This works, except for the special case where we find gpm, but
6090 # ncurses is in a nonstandard location via $LIBS, and we really want
6093 cf_ncurses_SAVE="$LIBS"
6094 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
6095 echo "configure:6096: checking for Gpm_Open in -lgpm" >&5
6096 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
6097 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6098 echo $ac_n "(cached) $ac_c" 1>&6
6100 ac_save_LIBS="$LIBS"
6102 cat > conftest.$ac_ext <<EOF
6103 #line 6104 "configure"
6104 #include "confdefs.h"
6105 /* Override any gcc2 internal prototype to avoid an error. */
6106 /* We use char because int might match the return type of a gcc2
6107 builtin and then its argument prototype would still apply. */
6114 if { (eval echo configure:6115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6116 eval "ac_cv_lib_$ac_lib_var=yes"
6118 echo "configure: failed program was:" >&5
6119 cat conftest.$ac_ext >&5
6121 eval "ac_cv_lib_$ac_lib_var=no"
6124 LIBS="$ac_save_LIBS"
6127 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6128 echo "$ac_t""yes" 1>&6
6129 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
6130 echo "configure:6131: checking for initscr in -lgpm" >&5
6131 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
6132 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6133 echo $ac_n "(cached) $ac_c" 1>&6
6135 ac_save_LIBS="$LIBS"
6137 cat > conftest.$ac_ext <<EOF
6138 #line 6139 "configure"
6139 #include "confdefs.h"
6140 /* Override any gcc2 internal prototype to avoid an error. */
6141 /* We use char because int might match the return type of a gcc2
6142 builtin and then its argument prototype would still apply. */
6149 if { (eval echo configure:6150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6151 eval "ac_cv_lib_$ac_lib_var=yes"
6153 echo "configure: failed program was:" >&5
6154 cat conftest.$ac_ext >&5
6156 eval "ac_cv_lib_$ac_lib_var=no"
6159 LIBS="$ac_save_LIBS"
6162 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6163 echo "$ac_t""yes" 1>&6
6164 LIBS="$cf_ncurses_SAVE"
6166 echo "$ac_t""no" 1>&6
6167 cf_ncurses_LIBS="-lgpm"
6171 echo "$ac_t""no" 1>&6
6175 case $host_os in #(vi
6177 # This is only necessary if you are linking against an obsolete
6178 # version of ncurses (but it should do no harm, since it's static).
6179 if test "$cf_nculib_root" = ncurses ; then
6180 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
6181 echo "configure:6182: checking for tgoto in -lmytinfo" >&5
6182 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
6183 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6184 echo $ac_n "(cached) $ac_c" 1>&6
6186 ac_save_LIBS="$LIBS"
6187 LIBS="-lmytinfo $LIBS"
6188 cat > conftest.$ac_ext <<EOF
6189 #line 6190 "configure"
6190 #include "confdefs.h"
6191 /* Override any gcc2 internal prototype to avoid an error. */
6192 /* We use char because int might match the return type of a gcc2
6193 builtin and then its argument prototype would still apply. */
6200 if { (eval echo configure:6201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6202 eval "ac_cv_lib_$ac_lib_var=yes"
6204 echo "configure: failed program was:" >&5
6205 cat conftest.$ac_ext >&5
6207 eval "ac_cv_lib_$ac_lib_var=no"
6210 LIBS="$ac_save_LIBS"
6213 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6214 echo "$ac_t""yes" 1>&6
6215 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6217 echo "$ac_t""no" 1>&6
6224 LIBS="$cf_ncurses_LIBS $LIBS"
6226 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6229 if test -n "$cf_cv_curses_dir/lib" ; then
6230 for cf_add_libdir in $cf_cv_curses_dir/lib
6232 if test $cf_add_libdir = /usr/lib ; then
6234 elif test -d $cf_add_libdir
6237 if test -n "$LDFLAGS$LIBS" ; then
6238 # a loop is needed to ensure we can add subdirs of existing dirs
6239 for cf_test_libdir in $LDFLAGS $LIBS ; do
6240 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6241 cf_have_libdir=yes; break
6245 if test "$cf_have_libdir" = no ; then
6246 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6248 echo "${as_me-configure}:6249: testing adding $cf_add_libdir to library-path ..." 1>&5
6251 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6257 LIBS="-l$cf_nculib_root $LIBS"
6260 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
6262 echo $ac_n "checking for initscr""... $ac_c" 1>&6
6263 echo "configure:6264: checking for initscr" >&5
6264 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
6265 echo $ac_n "(cached) $ac_c" 1>&6
6267 cat > conftest.$ac_ext <<EOF
6268 #line 6269 "configure"
6269 #include "confdefs.h"
6270 /* System header to define __stub macros and hopefully few prototypes,
6271 which can conflict with char initscr(); below. */
6273 /* Override any gcc2 internal prototype to avoid an error. */
6274 /* We use char because int might match the return type of a gcc2
6275 builtin and then its argument prototype would still apply. */
6280 /* The GNU C library defines this for functions which it implements
6281 to always fail with ENOSYS. Some functions are actually named
6282 something starting with __ and the normal name is an alias. */
6283 #if defined (__stub_initscr) || defined (__stub___initscr)
6291 if { (eval echo configure:6292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6293 eval "ac_cv_func_initscr=yes"
6295 echo "configure: failed program was:" >&5
6296 cat conftest.$ac_ext >&5
6298 eval "ac_cv_func_initscr=no"
6303 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
6304 echo "$ac_t""yes" 1>&6
6305 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6307 echo "$ac_t""no" 1>&6
6309 cf_save_LIBS="$LIBS"
6310 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
6311 echo "configure:6312: checking for initscr in -l$cf_nculib_root" >&5
6312 LIBS="-l$cf_nculib_root $LIBS"
6313 cat > conftest.$ac_ext <<EOF
6314 #line 6315 "configure"
6315 #include "confdefs.h"
6316 #include <${cf_cv_ncurses_header-curses.h}>
6321 if { (eval echo configure:6322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6323 echo "$ac_t""yes" 1>&6
6324 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6327 echo "configure: failed program was:" >&5
6328 cat conftest.$ac_ext >&5
6330 echo "$ac_t""no" 1>&6
6333 cf_library_path_list=""
6334 if test -n "${LDFLAGS}${LIBS}" ; then
6335 for cf_library_path in $LDFLAGS $LIBS
6337 case $cf_library_path in #(vi
6339 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6341 test "$cf_library_path" != "NONE" && \
6342 test -d "$cf_library_path" && \
6344 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6345 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6346 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6347 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6348 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6349 test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
6352 cf_library_path_list="$cf_library_path_list $cf_search"
6361 test "/usr" != "$prefix" && \
6363 (test $prefix = NONE || test -d $prefix) && {
6364 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
6365 test -d /usr/lib && cf_search="$cf_search /usr/lib"
6366 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
6367 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
6368 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
6369 test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
6373 test "$prefix" != "NONE" && \
6374 test -d "$prefix" && \
6376 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6377 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6378 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6379 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6380 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6381 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6385 test "/usr/local" != "$prefix" && \
6386 test -d "/usr/local" && \
6387 (test $prefix = NONE || test -d $prefix) && {
6388 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
6389 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
6390 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
6391 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
6392 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
6393 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
6397 test "/opt" != "$prefix" && \
6399 (test $prefix = NONE || test -d $prefix) && {
6400 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
6401 test -d /opt/lib && cf_search="$cf_search /opt/lib"
6402 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
6403 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
6404 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
6405 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
6409 test "$HOME" != "$prefix" && \
6410 test -d "$HOME" && \
6411 (test $prefix = NONE || test -d $prefix) && {
6412 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
6413 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
6414 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
6415 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
6416 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
6417 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
6422 cf_search="$cf_library_path_list $cf_search"
6424 for cf_libdir in $cf_search
6426 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
6427 echo "configure:6428: checking for -l$cf_nculib_root in $cf_libdir" >&5
6428 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6429 cat > conftest.$ac_ext <<EOF
6430 #line 6431 "configure"
6431 #include "confdefs.h"
6432 #include <${cf_cv_ncurses_header-curses.h}>
6437 if { (eval echo configure:6438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6439 echo "$ac_t""yes" 1>&6
6440 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6443 echo "configure: failed program was:" >&5
6444 cat conftest.$ac_ext >&5
6446 echo "$ac_t""no" 1>&6
6447 LIBS="$cf_save_LIBS"
6457 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
6459 if test $cf_found_library = no ; then
6460 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
6466 if test -n "$cf_ncurses_LIBS" ; then
6467 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
6468 echo "configure:6469: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6469 cf_ncurses_SAVE="$LIBS"
6470 for p in $cf_ncurses_LIBS ; do
6471 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
6472 if test "$q" != "$LIBS" ; then
6476 cat > conftest.$ac_ext <<EOF
6477 #line 6478 "configure"
6478 #include "confdefs.h"
6479 #include <${cf_cv_ncurses_header-curses.h}>
6481 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6484 if { (eval echo configure:6485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6486 echo "$ac_t""yes" 1>&6
6488 echo "configure: failed program was:" >&5
6489 cat conftest.$ac_ext >&5
6491 echo "$ac_t""no" 1>&6
6492 LIBS="$cf_ncurses_SAVE"
6498 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6500 cat >> confdefs.h <<EOF
6501 #define $cf_nculib_ROOT 1
6510 if test "$no_x" = yes; then
6511 # Not all programs may use this symbol, but it does not hurt to define it.
6512 cat >> confdefs.h <<\EOF
6513 #define X_DISPLAY_MISSING 1
6516 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6518 if test -n "$x_includes"; then
6519 X_CFLAGS="$X_CFLAGS -I$x_includes"
6522 # It would also be nice to do this for all -L options, not just this one.
6523 if test -n "$x_libraries"; then
6524 X_LIBS="$X_LIBS -L$x_libraries"
6525 # For Solaris; some versions of Sun CC require a space after -R and
6526 # others require no space. Words are not sufficient . . . .
6527 case "`(uname -sr) 2>/dev/null`" in
6529 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
6530 echo "configure:6531: checking whether -R must be followed by a space" >&5
6531 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
6532 cat > conftest.$ac_ext <<EOF
6533 #line 6534 "configure"
6534 #include "confdefs.h"
6540 if { (eval echo configure:6541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6544 echo "configure: failed program was:" >&5
6545 cat conftest.$ac_ext >&5
6550 if test $ac_R_nospace = yes; then
6551 echo "$ac_t""no" 1>&6
6552 X_LIBS="$X_LIBS -R$x_libraries"
6554 LIBS="$ac_xsave_LIBS -R $x_libraries"
6555 cat > conftest.$ac_ext <<EOF
6556 #line 6557 "configure"
6557 #include "confdefs.h"
6563 if { (eval echo configure:6564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6567 echo "configure: failed program was:" >&5
6568 cat conftest.$ac_ext >&5
6573 if test $ac_R_space = yes; then
6574 echo "$ac_t""yes" 1>&6
6575 X_LIBS="$X_LIBS -R $x_libraries"
6577 echo "$ac_t""neither works" 1>&6
6580 LIBS="$ac_xsave_LIBS"
6584 # Check for system-dependent libraries X programs must link with.
6585 # Do this before checking for the system-independent R6 libraries
6586 # (-lICE), since we may need -lsocket or whatever for X linking.
6588 if test "$ISC" = yes; then
6589 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6591 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
6592 # libraries were built with DECnet support. And karl@cs.umb.edu says
6593 # the Alpha needs dnet_stub (dnet does not exist).
6594 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
6595 echo "configure:6596: checking for dnet_ntoa in -ldnet" >&5
6596 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6597 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6598 echo $ac_n "(cached) $ac_c" 1>&6
6600 ac_save_LIBS="$LIBS"
6602 cat > conftest.$ac_ext <<EOF
6603 #line 6604 "configure"
6604 #include "confdefs.h"
6605 /* Override any gcc2 internal prototype to avoid an error. */
6606 /* We use char because int might match the return type of a gcc2
6607 builtin and then its argument prototype would still apply. */
6614 if { (eval echo configure:6615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6616 eval "ac_cv_lib_$ac_lib_var=yes"
6618 echo "configure: failed program was:" >&5
6619 cat conftest.$ac_ext >&5
6621 eval "ac_cv_lib_$ac_lib_var=no"
6624 LIBS="$ac_save_LIBS"
6627 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6628 echo "$ac_t""yes" 1>&6
6629 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6631 echo "$ac_t""no" 1>&6
6634 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6635 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
6636 echo "configure:6637: checking for dnet_ntoa in -ldnet_stub" >&5
6637 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6638 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6639 echo $ac_n "(cached) $ac_c" 1>&6
6641 ac_save_LIBS="$LIBS"
6642 LIBS="-ldnet_stub $LIBS"
6643 cat > conftest.$ac_ext <<EOF
6644 #line 6645 "configure"
6645 #include "confdefs.h"
6646 /* Override any gcc2 internal prototype to avoid an error. */
6647 /* We use char because int might match the return type of a gcc2
6648 builtin and then its argument prototype would still apply. */
6655 if { (eval echo configure:6656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6657 eval "ac_cv_lib_$ac_lib_var=yes"
6659 echo "configure: failed program was:" >&5
6660 cat conftest.$ac_ext >&5
6662 eval "ac_cv_lib_$ac_lib_var=no"
6665 LIBS="$ac_save_LIBS"
6668 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6669 echo "$ac_t""yes" 1>&6
6670 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6672 echo "$ac_t""no" 1>&6
6677 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6678 # to get the SysV transport functions.
6679 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
6681 # The nsl library prevents programs from opening the X display
6682 # on Irix 5.2, according to dickey@clark.net.
6683 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
6684 echo "configure:6685: checking for gethostbyname" >&5
6685 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
6686 echo $ac_n "(cached) $ac_c" 1>&6
6688 cat > conftest.$ac_ext <<EOF
6689 #line 6690 "configure"
6690 #include "confdefs.h"
6691 /* System header to define __stub macros and hopefully few prototypes,
6692 which can conflict with char gethostbyname(); below. */
6694 /* Override any gcc2 internal prototype to avoid an error. */
6695 /* We use char because int might match the return type of a gcc2
6696 builtin and then its argument prototype would still apply. */
6697 char gethostbyname();
6701 /* The GNU C library defines this for functions which it implements
6702 to always fail with ENOSYS. Some functions are actually named
6703 something starting with __ and the normal name is an alias. */
6704 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6712 if { (eval echo configure:6713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6714 eval "ac_cv_func_gethostbyname=yes"
6716 echo "configure: failed program was:" >&5
6717 cat conftest.$ac_ext >&5
6719 eval "ac_cv_func_gethostbyname=no"
6724 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
6725 echo "$ac_t""yes" 1>&6
6728 echo "$ac_t""no" 1>&6
6731 if test $ac_cv_func_gethostbyname = no; then
6732 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
6733 echo "configure:6734: checking for gethostbyname in -lnsl" >&5
6734 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
6735 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6736 echo $ac_n "(cached) $ac_c" 1>&6
6738 ac_save_LIBS="$LIBS"
6740 cat > conftest.$ac_ext <<EOF
6741 #line 6742 "configure"
6742 #include "confdefs.h"
6743 /* Override any gcc2 internal prototype to avoid an error. */
6744 /* We use char because int might match the return type of a gcc2
6745 builtin and then its argument prototype would still apply. */
6746 char gethostbyname();
6752 if { (eval echo configure:6753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6754 eval "ac_cv_lib_$ac_lib_var=yes"
6756 echo "configure: failed program was:" >&5
6757 cat conftest.$ac_ext >&5
6759 eval "ac_cv_lib_$ac_lib_var=no"
6762 LIBS="$ac_save_LIBS"
6765 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6766 echo "$ac_t""yes" 1>&6
6767 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6769 echo "$ac_t""no" 1>&6
6774 # lieder@skyler.mavd.honeywell.com says without -lsocket,
6775 # socket/setsockopt and other routines are undefined under SCO ODT
6776 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
6777 # on later versions), says simon@lia.di.epfl.ch: it contains
6778 # gethostby* variants that don't use the nameserver (or something).
6779 # -lsocket must be given before -lnsl if both are needed.
6780 # We assume that if connect needs -lnsl, so does gethostbyname.
6781 echo $ac_n "checking for connect""... $ac_c" 1>&6
6782 echo "configure:6783: checking for connect" >&5
6783 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
6784 echo $ac_n "(cached) $ac_c" 1>&6
6786 cat > conftest.$ac_ext <<EOF
6787 #line 6788 "configure"
6788 #include "confdefs.h"
6789 /* System header to define __stub macros and hopefully few prototypes,
6790 which can conflict with char connect(); below. */
6792 /* Override any gcc2 internal prototype to avoid an error. */
6793 /* We use char because int might match the return type of a gcc2
6794 builtin and then its argument prototype would still apply. */
6799 /* The GNU C library defines this for functions which it implements
6800 to always fail with ENOSYS. Some functions are actually named
6801 something starting with __ and the normal name is an alias. */
6802 #if defined (__stub_connect) || defined (__stub___connect)
6810 if { (eval echo configure:6811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6812 eval "ac_cv_func_connect=yes"
6814 echo "configure: failed program was:" >&5
6815 cat conftest.$ac_ext >&5
6817 eval "ac_cv_func_connect=no"
6822 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6823 echo "$ac_t""yes" 1>&6
6826 echo "$ac_t""no" 1>&6
6829 if test $ac_cv_func_connect = no; then
6830 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
6831 echo "configure:6832: checking for connect in -lsocket" >&5
6832 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6833 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6834 echo $ac_n "(cached) $ac_c" 1>&6
6836 ac_save_LIBS="$LIBS"
6837 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6838 cat > conftest.$ac_ext <<EOF
6839 #line 6840 "configure"
6840 #include "confdefs.h"
6841 /* Override any gcc2 internal prototype to avoid an error. */
6842 /* We use char because int might match the return type of a gcc2
6843 builtin and then its argument prototype would still apply. */
6850 if { (eval echo configure:6851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6852 eval "ac_cv_lib_$ac_lib_var=yes"
6854 echo "configure: failed program was:" >&5
6855 cat conftest.$ac_ext >&5
6857 eval "ac_cv_lib_$ac_lib_var=no"
6860 LIBS="$ac_save_LIBS"
6863 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6864 echo "$ac_t""yes" 1>&6
6865 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6867 echo "$ac_t""no" 1>&6
6872 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6873 echo $ac_n "checking for remove""... $ac_c" 1>&6
6874 echo "configure:6875: checking for remove" >&5
6875 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
6876 echo $ac_n "(cached) $ac_c" 1>&6
6878 cat > conftest.$ac_ext <<EOF
6879 #line 6880 "configure"
6880 #include "confdefs.h"
6881 /* System header to define __stub macros and hopefully few prototypes,
6882 which can conflict with char remove(); below. */
6884 /* Override any gcc2 internal prototype to avoid an error. */
6885 /* We use char because int might match the return type of a gcc2
6886 builtin and then its argument prototype would still apply. */
6891 /* The GNU C library defines this for functions which it implements
6892 to always fail with ENOSYS. Some functions are actually named
6893 something starting with __ and the normal name is an alias. */
6894 #if defined (__stub_remove) || defined (__stub___remove)
6902 if { (eval echo configure:6903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6904 eval "ac_cv_func_remove=yes"
6906 echo "configure: failed program was:" >&5
6907 cat conftest.$ac_ext >&5
6909 eval "ac_cv_func_remove=no"
6914 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6915 echo "$ac_t""yes" 1>&6
6918 echo "$ac_t""no" 1>&6
6921 if test $ac_cv_func_remove = no; then
6922 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6923 echo "configure:6924: checking for remove in -lposix" >&5
6924 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6925 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6926 echo $ac_n "(cached) $ac_c" 1>&6
6928 ac_save_LIBS="$LIBS"
6929 LIBS="-lposix $LIBS"
6930 cat > conftest.$ac_ext <<EOF
6931 #line 6932 "configure"
6932 #include "confdefs.h"
6933 /* Override any gcc2 internal prototype to avoid an error. */
6934 /* We use char because int might match the return type of a gcc2
6935 builtin and then its argument prototype would still apply. */
6942 if { (eval echo configure:6943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6944 eval "ac_cv_lib_$ac_lib_var=yes"
6946 echo "configure: failed program was:" >&5
6947 cat conftest.$ac_ext >&5
6949 eval "ac_cv_lib_$ac_lib_var=no"
6952 LIBS="$ac_save_LIBS"
6955 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6956 echo "$ac_t""yes" 1>&6
6957 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6959 echo "$ac_t""no" 1>&6
6964 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6965 echo $ac_n "checking for shmat""... $ac_c" 1>&6
6966 echo "configure:6967: checking for shmat" >&5
6967 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
6968 echo $ac_n "(cached) $ac_c" 1>&6
6970 cat > conftest.$ac_ext <<EOF
6971 #line 6972 "configure"
6972 #include "confdefs.h"
6973 /* System header to define __stub macros and hopefully few prototypes,
6974 which can conflict with char shmat(); below. */
6976 /* Override any gcc2 internal prototype to avoid an error. */
6977 /* We use char because int might match the return type of a gcc2
6978 builtin and then its argument prototype would still apply. */
6983 /* The GNU C library defines this for functions which it implements
6984 to always fail with ENOSYS. Some functions are actually named
6985 something starting with __ and the normal name is an alias. */
6986 #if defined (__stub_shmat) || defined (__stub___shmat)
6994 if { (eval echo configure:6995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6996 eval "ac_cv_func_shmat=yes"
6998 echo "configure: failed program was:" >&5
6999 cat conftest.$ac_ext >&5
7001 eval "ac_cv_func_shmat=no"
7006 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
7007 echo "$ac_t""yes" 1>&6
7010 echo "$ac_t""no" 1>&6
7013 if test $ac_cv_func_shmat = no; then
7014 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
7015 echo "configure:7016: checking for shmat in -lipc" >&5
7016 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
7017 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7018 echo $ac_n "(cached) $ac_c" 1>&6
7020 ac_save_LIBS="$LIBS"
7022 cat > conftest.$ac_ext <<EOF
7023 #line 7024 "configure"
7024 #include "confdefs.h"
7025 /* Override any gcc2 internal prototype to avoid an error. */
7026 /* We use char because int might match the return type of a gcc2
7027 builtin and then its argument prototype would still apply. */
7034 if { (eval echo configure:7035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7036 eval "ac_cv_lib_$ac_lib_var=yes"
7038 echo "configure: failed program was:" >&5
7039 cat conftest.$ac_ext >&5
7041 eval "ac_cv_lib_$ac_lib_var=no"
7044 LIBS="$ac_save_LIBS"
7047 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7048 echo "$ac_t""yes" 1>&6
7049 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7051 echo "$ac_t""no" 1>&6
7057 # Check for libraries that X11R6 Xt/Xaw programs need.
7058 ac_save_LDFLAGS="$LDFLAGS"
7059 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7060 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7061 # check for ICE first), but we must link in the order -lSM -lICE or
7062 # we get undefined symbols. So assume we have SM if we have ICE.
7063 # These have to be linked with before -lX11, unlike the other
7064 # libraries we check for below, so use a different variable.
7065 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
7066 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
7067 echo "configure:7068: checking for IceConnectionNumber in -lICE" >&5
7068 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
7069 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7070 echo $ac_n "(cached) $ac_c" 1>&6
7072 ac_save_LIBS="$LIBS"
7073 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7074 cat > conftest.$ac_ext <<EOF
7075 #line 7076 "configure"
7076 #include "confdefs.h"
7077 /* Override any gcc2 internal prototype to avoid an error. */
7078 /* We use char because int might match the return type of a gcc2
7079 builtin and then its argument prototype would still apply. */
7080 char IceConnectionNumber();
7083 IceConnectionNumber()
7086 if { (eval echo configure:7087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7088 eval "ac_cv_lib_$ac_lib_var=yes"
7090 echo "configure: failed program was:" >&5
7091 cat conftest.$ac_ext >&5
7093 eval "ac_cv_lib_$ac_lib_var=no"
7096 LIBS="$ac_save_LIBS"
7099 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7100 echo "$ac_t""yes" 1>&6
7101 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7103 echo "$ac_t""no" 1>&6
7106 LDFLAGS="$ac_save_LDFLAGS"
7114 # SYSTEM_NAME=`echo "$cf_cv_system_name"|tr ' ' -`
7118 LDFLAGS="$X_LIBS $LDFLAGS"
7120 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
7122 echo "${as_me-configure}:7123: testing checking additions to CFLAGS ..." 1>&5
7125 cf_check_cflags="$CFLAGS"
7126 cf_check_cppflags="$CPPFLAGS"
7131 cf_new_extra_cppflags=
7133 for cf_add_cflags in $X_CFLAGS
7135 case $cf_fix_cppflags in
7137 case $cf_add_cflags in #(vi
7138 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7139 case $cf_add_cflags in
7141 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7143 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7144 && test -z "${cf_tst_cflags}" \
7145 && cf_fix_cppflags=yes
7147 if test $cf_fix_cppflags = yes ; then
7148 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7150 elif test "${cf_tst_cflags}" = "\"'" ; then
7151 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7157 *$cf_add_cflags) #(vi
7160 case $cf_add_cflags in #(vi
7162 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7164 CPPFLAGS=`echo "$CPPFLAGS" | \
7165 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7166 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7170 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7175 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7180 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7182 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7184 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7185 && test -z "${cf_tst_cflags}" \
7186 && cf_fix_cppflags=no
7191 if test -n "$cf_new_cflags" ; then
7192 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
7194 echo "${as_me-configure}:7195: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
7197 CFLAGS="$CFLAGS $cf_new_cflags"
7200 if test -n "$cf_new_cppflags" ; then
7201 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
7203 echo "${as_me-configure}:7204: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
7206 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7209 if test -n "$cf_new_extra_cppflags" ; then
7210 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
7212 echo "${as_me-configure}:7213: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
7215 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7221 if test "$cf_check_cflags" != "$CFLAGS" ; then
7222 cat > conftest.$ac_ext <<EOF
7223 #line 7224 "configure"
7224 #include "confdefs.h"
7227 printf("Hello world");
7230 if { (eval echo configure:7231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7233 echo "configure: failed program was:" >&5
7234 cat conftest.$ac_ext >&5
7236 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
7238 echo "${as_me-configure}:7239: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
7241 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
7242 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
7244 echo "${as_me-configure}:7245: testing but keeping change to \$CPPFLAGS ..." 1>&5
7248 CFLAGS="$cf_check_flags"
7254 echo $ac_n "checking for XOpenDisplay""... $ac_c" 1>&6
7255 echo "configure:7256: checking for XOpenDisplay" >&5
7256 if eval "test \"`echo '$''{'ac_cv_func_XOpenDisplay'+set}'`\" = set"; then
7257 echo $ac_n "(cached) $ac_c" 1>&6
7259 cat > conftest.$ac_ext <<EOF
7260 #line 7261 "configure"
7261 #include "confdefs.h"
7262 /* System header to define __stub macros and hopefully few prototypes,
7263 which can conflict with char XOpenDisplay(); below. */
7265 /* Override any gcc2 internal prototype to avoid an error. */
7266 /* We use char because int might match the return type of a gcc2
7267 builtin and then its argument prototype would still apply. */
7268 char XOpenDisplay();
7272 /* The GNU C library defines this for functions which it implements
7273 to always fail with ENOSYS. Some functions are actually named
7274 something starting with __ and the normal name is an alias. */
7275 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
7283 if { (eval echo configure:7284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7285 eval "ac_cv_func_XOpenDisplay=yes"
7287 echo "configure: failed program was:" >&5
7288 cat conftest.$ac_ext >&5
7290 eval "ac_cv_func_XOpenDisplay=no"
7295 if eval "test \"`echo '$ac_cv_func_'XOpenDisplay`\" = yes"; then
7296 echo "$ac_t""yes" 1>&6
7299 echo "$ac_t""no" 1>&6
7301 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
7302 echo "configure:7303: checking for XOpenDisplay in -lX11" >&5
7303 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
7304 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7305 echo $ac_n "(cached) $ac_c" 1>&6
7307 ac_save_LIBS="$LIBS"
7308 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
7309 cat > conftest.$ac_ext <<EOF
7310 #line 7311 "configure"
7311 #include "confdefs.h"
7312 /* Override any gcc2 internal prototype to avoid an error. */
7313 /* We use char because int might match the return type of a gcc2
7314 builtin and then its argument prototype would still apply. */
7315 char XOpenDisplay();
7321 if { (eval echo configure:7322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7323 eval "ac_cv_lib_$ac_lib_var=yes"
7325 echo "configure: failed program was:" >&5
7326 cat conftest.$ac_ext >&5
7328 eval "ac_cv_lib_$ac_lib_var=no"
7331 LIBS="$ac_save_LIBS"
7334 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7335 echo "$ac_t""yes" 1>&6
7338 echo "$ac_t""no" 1>&6
7344 echo $ac_n "checking for XtAppInitialize""... $ac_c" 1>&6
7345 echo "configure:7346: checking for XtAppInitialize" >&5
7346 if eval "test \"`echo '$''{'ac_cv_func_XtAppInitialize'+set}'`\" = set"; then
7347 echo $ac_n "(cached) $ac_c" 1>&6
7349 cat > conftest.$ac_ext <<EOF
7350 #line 7351 "configure"
7351 #include "confdefs.h"
7352 /* System header to define __stub macros and hopefully few prototypes,
7353 which can conflict with char XtAppInitialize(); below. */
7355 /* Override any gcc2 internal prototype to avoid an error. */
7356 /* We use char because int might match the return type of a gcc2
7357 builtin and then its argument prototype would still apply. */
7358 char XtAppInitialize();
7362 /* The GNU C library defines this for functions which it implements
7363 to always fail with ENOSYS. Some functions are actually named
7364 something starting with __ and the normal name is an alias. */
7365 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
7373 if { (eval echo configure:7374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7375 eval "ac_cv_func_XtAppInitialize=yes"
7377 echo "configure: failed program was:" >&5
7378 cat conftest.$ac_ext >&5
7380 eval "ac_cv_func_XtAppInitialize=no"
7385 if eval "test \"`echo '$ac_cv_func_'XtAppInitialize`\" = yes"; then
7386 echo "$ac_t""yes" 1>&6
7389 echo "$ac_t""no" 1>&6
7391 echo $ac_n "checking for XtAppInitialize in -lXt""... $ac_c" 1>&6
7392 echo "configure:7393: checking for XtAppInitialize in -lXt" >&5
7393 ac_lib_var=`echo Xt'_'XtAppInitialize | sed 'y%./+-%__p_%'`
7394 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7395 echo $ac_n "(cached) $ac_c" 1>&6
7397 ac_save_LIBS="$LIBS"
7398 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
7399 cat > conftest.$ac_ext <<EOF
7400 #line 7401 "configure"
7401 #include "confdefs.h"
7402 /* Override any gcc2 internal prototype to avoid an error. */
7403 /* We use char because int might match the return type of a gcc2
7404 builtin and then its argument prototype would still apply. */
7405 char XtAppInitialize();
7411 if { (eval echo configure:7412: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7413 eval "ac_cv_lib_$ac_lib_var=yes"
7415 echo "configure: failed program was:" >&5
7416 cat conftest.$ac_ext >&5
7418 eval "ac_cv_lib_$ac_lib_var=no"
7421 LIBS="$ac_save_LIBS"
7424 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7425 echo "$ac_t""yes" 1>&6
7426 cat >> confdefs.h <<\EOF
7427 #define HAVE_LIBXT 1
7431 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
7433 echo "$ac_t""no" 1>&6
7439 if test $cf_have_X_LIBS = no ; then
7440 echo "configure: warning: Unable to successfully link X Toolkit library (-lXt) with
7441 test program. You will have to check and add the proper libraries by hand
7446 cf_x_athena=${cf_x_athena-Xaw}
7448 echo $ac_n "checking if you want to link with Xaw 3d library""... $ac_c" 1>&6
7449 echo "configure:7450: checking if you want to link with Xaw 3d library" >&5
7452 # Check whether --with-Xaw3d or --without-Xaw3d was given.
7453 if test "${with_Xaw3d+set}" = set; then
7454 withval="$with_Xaw3d"
7458 if test "$withval" = yes ; then
7460 echo "$ac_t""yes" 1>&6
7462 echo "$ac_t""no" 1>&6
7465 echo $ac_n "checking if you want to link with neXT Athena library""... $ac_c" 1>&6
7466 echo "configure:7467: checking if you want to link with neXT Athena library" >&5
7469 # Check whether --with-neXtaw or --without-neXtaw was given.
7470 if test "${with_neXtaw+set}" = set; then
7471 withval="$with_neXtaw"
7475 if test "$withval" = yes ; then
7477 echo "$ac_t""yes" 1>&6
7479 echo "$ac_t""no" 1>&6
7482 echo $ac_n "checking if you want to link with Athena-Plus library""... $ac_c" 1>&6
7483 echo "configure:7484: checking if you want to link with Athena-Plus library" >&5
7486 # Check whether --with-XawPlus or --without-XawPlus was given.
7487 if test "${with_XawPlus+set}" = set; then
7488 withval="$with_XawPlus"
7492 if test "$withval" = yes ; then
7494 echo "$ac_t""yes" 1>&6
7496 echo "$ac_t""no" 1>&6
7499 echo $ac_n "checking for XextCreateExtension in -lXext""... $ac_c" 1>&6
7500 echo "configure:7501: checking for XextCreateExtension in -lXext" >&5
7501 ac_lib_var=`echo Xext'_'XextCreateExtension | sed 'y%./+-%__p_%'`
7502 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7503 echo $ac_n "(cached) $ac_c" 1>&6
7505 ac_save_LIBS="$LIBS"
7507 cat > conftest.$ac_ext <<EOF
7508 #line 7509 "configure"
7509 #include "confdefs.h"
7510 /* Override any gcc2 internal prototype to avoid an error. */
7511 /* We use char because int might match the return type of a gcc2
7512 builtin and then its argument prototype would still apply. */
7513 char XextCreateExtension();
7516 XextCreateExtension()
7519 if { (eval echo configure:7520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7521 eval "ac_cv_lib_$ac_lib_var=yes"
7523 echo "configure: failed program was:" >&5
7524 cat conftest.$ac_ext >&5
7526 eval "ac_cv_lib_$ac_lib_var=no"
7529 LIBS="$ac_save_LIBS"
7532 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7533 echo "$ac_t""yes" 1>&6
7536 echo "$ac_t""no" 1>&6
7543 cf_x_athena_root=$cf_x_athena
7544 cf_x_athena_include=""
7546 for cf_path in default \
7547 /usr/contrib/X11R6 \
7548 /usr/contrib/X11R5 \
7552 if test -z "$cf_x_athena_include" ; then
7554 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
7555 if test $cf_path != default ; then
7556 CPPFLAGS="$cf_save -I$cf_path/include"
7557 echo $ac_n "checking for $cf_test in $cf_path""... $ac_c" 1>&6
7558 echo "configure:7559: checking for $cf_test in $cf_path" >&5
7560 echo $ac_n "checking for $cf_test""... $ac_c" 1>&6
7561 echo "configure:7562: checking for $cf_test" >&5
7563 cat > conftest.$ac_ext <<EOF
7564 #line 7565 "configure"
7565 #include "confdefs.h"
7567 #include <X11/Intrinsic.h>
7573 if { (eval echo configure:7574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7577 echo "configure: failed program was:" >&5
7578 cat conftest.$ac_ext >&5
7583 echo "$ac_t""$cf_result" 1>&6
7584 if test "$cf_result" = yes ; then
7585 cf_x_athena_include=$cf_path
7593 if test -z "$cf_x_athena_include" ; then
7594 echo "configure: warning: Unable to successfully find Athena header files with test program" 1>&2
7595 elif test "$cf_x_athena_include" != default ; then
7596 CPPFLAGS="$CPPFLAGS -I$cf_x_athena_include"
7600 cf_x_athena_root=$cf_x_athena
7603 for cf_path in default \
7604 /usr/contrib/X11R6 \
7605 /usr/contrib/X11R5 \
7610 "-l$cf_x_athena_root -lXmu" \
7611 "-l$cf_x_athena_root -lXpm -lXmu" \
7612 "-l${cf_x_athena_root}_s -lXmu_s"
7614 if test -z "$cf_x_athena_lib" ; then
7616 cf_test=XawSimpleMenuAddGlobalActions
7617 if test $cf_path != default ; then
7618 LIBS="-L$cf_path/lib $cf_lib $LIBS"
7619 echo $ac_n "checking for $cf_lib in $cf_path""... $ac_c" 1>&6
7620 echo "configure:7621: checking for $cf_lib in $cf_path" >&5
7622 LIBS="$cf_lib $LIBS"
7623 echo $ac_n "checking for $cf_test in $cf_lib""... $ac_c" 1>&6
7624 echo "configure:7625: checking for $cf_test in $cf_lib" >&5
7626 cat > conftest.$ac_ext <<EOF
7627 #line 7628 "configure"
7628 #include "confdefs.h"
7634 if { (eval echo configure:7635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7638 echo "configure: failed program was:" >&5
7639 cat conftest.$ac_ext >&5
7644 echo "$ac_t""$cf_result" 1>&6
7645 if test "$cf_result" = yes ; then
7646 cf_x_athena_lib="$cf_lib"
7654 if test -z "$cf_x_athena_lib" ; then
7655 { echo "configure: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" 1>&2; exit 1; }
7659 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7661 cat >> confdefs.h <<EOF
7662 #define $cf_x_athena_LIBS 1
7670 for ac_prog in xcurses-config
7672 # Extract the first word of "$ac_prog", so it can be a program name with args.
7673 set dummy $ac_prog; ac_word=$2
7674 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7675 echo "configure:7676: checking for $ac_word" >&5
7676 if eval "test \"`echo '$''{'ac_cv_path_XCURSES_CONFIG'+set}'`\" = set"; then
7677 echo $ac_n "(cached) $ac_c" 1>&6
7679 case "$XCURSES_CONFIG" in
7681 ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a path.
7684 ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a dos path.
7687 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7689 for ac_dir in $ac_dummy; do
7690 test -z "$ac_dir" && ac_dir=.
7691 if test -f $ac_dir/$ac_word; then
7692 ac_cv_path_XCURSES_CONFIG="$ac_dir/$ac_word"
7700 XCURSES_CONFIG="$ac_cv_path_XCURSES_CONFIG"
7701 if test -n "$XCURSES_CONFIG"; then
7702 echo "$ac_t""$XCURSES_CONFIG" 1>&6
7704 echo "$ac_t""no" 1>&6
7707 test -n "$XCURSES_CONFIG" && break
7709 test -n "$XCURSES_CONFIG" || XCURSES_CONFIG="none"
7712 if test "$XCURSES_CONFIG" != none ; then
7714 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
7715 LIBS="`$XCURSES_CONFIG --libs` $LIBS"
7717 cf_cv_lib_XCurses=yes
7721 LDFLAGS="$LDFLAGS $X_LIBS"
7723 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
7725 echo "${as_me-configure}:7726: testing checking additions to CFLAGS ..." 1>&5
7728 cf_check_cflags="$CFLAGS"
7729 cf_check_cppflags="$CPPFLAGS"
7734 cf_new_extra_cppflags=
7736 for cf_add_cflags in $X_CFLAGS
7738 case $cf_fix_cppflags in
7740 case $cf_add_cflags in #(vi
7741 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7742 case $cf_add_cflags in
7744 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7746 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7747 && test -z "${cf_tst_cflags}" \
7748 && cf_fix_cppflags=yes
7750 if test $cf_fix_cppflags = yes ; then
7751 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7753 elif test "${cf_tst_cflags}" = "\"'" ; then
7754 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7760 *$cf_add_cflags) #(vi
7763 case $cf_add_cflags in #(vi
7765 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7767 CPPFLAGS=`echo "$CPPFLAGS" | \
7768 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7769 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7773 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7778 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7783 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7785 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7787 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7788 && test -z "${cf_tst_cflags}" \
7789 && cf_fix_cppflags=no
7794 if test -n "$cf_new_cflags" ; then
7795 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
7797 echo "${as_me-configure}:7798: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
7800 CFLAGS="$CFLAGS $cf_new_cflags"
7803 if test -n "$cf_new_cppflags" ; then
7804 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
7806 echo "${as_me-configure}:7807: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
7809 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7812 if test -n "$cf_new_extra_cppflags" ; then
7813 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
7815 echo "${as_me-configure}:7816: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
7818 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7824 if test "$cf_check_cflags" != "$CFLAGS" ; then
7825 cat > conftest.$ac_ext <<EOF
7826 #line 7827 "configure"
7827 #include "confdefs.h"
7830 printf("Hello world");
7833 if { (eval echo configure:7834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7836 echo "configure: failed program was:" >&5
7837 cat conftest.$ac_ext >&5
7839 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
7841 echo "${as_me-configure}:7842: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
7844 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
7845 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
7847 echo "${as_me-configure}:7848: testing but keeping change to \$CPPFLAGS ..." 1>&5
7851 CFLAGS="$cf_check_flags"
7856 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
7857 echo "configure:7858: checking for XOpenDisplay in -lX11" >&5
7858 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
7859 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7860 echo $ac_n "(cached) $ac_c" 1>&6
7862 ac_save_LIBS="$LIBS"
7863 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
7864 cat > conftest.$ac_ext <<EOF
7865 #line 7866 "configure"
7866 #include "confdefs.h"
7867 /* Override any gcc2 internal prototype to avoid an error. */
7868 /* We use char because int might match the return type of a gcc2
7869 builtin and then its argument prototype would still apply. */
7870 char XOpenDisplay();
7876 if { (eval echo configure:7877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7878 eval "ac_cv_lib_$ac_lib_var=yes"
7880 echo "configure: failed program was:" >&5
7881 cat conftest.$ac_ext >&5
7883 eval "ac_cv_lib_$ac_lib_var=no"
7886 LIBS="$ac_save_LIBS"
7889 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7890 echo "$ac_t""yes" 1>&6
7893 echo "$ac_t""no" 1>&6
7896 echo $ac_n "checking for XCurses library""... $ac_c" 1>&6
7897 echo "configure:7898: checking for XCurses library" >&5
7898 if eval "test \"`echo '$''{'cf_cv_lib_XCurses'+set}'`\" = set"; then
7899 echo $ac_n "(cached) $ac_c" 1>&6
7902 LIBS="-lXCurses $LIBS"
7903 cat > conftest.$ac_ext <<EOF
7904 #line 7905 "configure"
7905 #include "confdefs.h"
7907 #include <xcurses.h>
7908 char *XCursesProgramName = "test";
7914 if { (eval echo configure:7915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7916 cf_cv_lib_XCurses=yes
7918 echo "configure: failed program was:" >&5
7919 cat conftest.$ac_ext >&5
7921 cf_cv_lib_XCurses=no
7927 echo "$ac_t""$cf_cv_lib_XCurses" 1>&6
7931 if test $cf_cv_lib_XCurses = yes ; then
7932 cat >> confdefs.h <<\EOF
7936 cat >> confdefs.h <<\EOF
7940 cat >> confdefs.h <<\EOF
7941 #define HAVE_XCURSES 1
7945 { echo "configure: error: Cannot link with XCurses" 1>&2; exit 1; }
7953 case $cf_cv_screen in #(vi
7957 # look for curses-related libraries
7958 echo $ac_n "checking for new_panel in -lpanel$cf_cv_libtype""... $ac_c" 1>&6
7959 echo "configure:7960: checking for new_panel in -lpanel$cf_cv_libtype" >&5
7960 ac_lib_var=`echo panel$cf_cv_libtype'_'new_panel | sed 'y%./+-%__p_%'`
7961 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7962 echo $ac_n "(cached) $ac_c" 1>&6
7964 ac_save_LIBS="$LIBS"
7965 LIBS="-lpanel$cf_cv_libtype $LIBS"
7966 cat > conftest.$ac_ext <<EOF
7967 #line 7968 "configure"
7968 #include "confdefs.h"
7969 /* Override any gcc2 internal prototype to avoid an error. */
7970 /* We use char because int might match the return type of a gcc2
7971 builtin and then its argument prototype would still apply. */
7978 if { (eval echo configure:7979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7980 eval "ac_cv_lib_$ac_lib_var=yes"
7982 echo "configure: failed program was:" >&5
7983 cat conftest.$ac_ext >&5
7985 eval "ac_cv_lib_$ac_lib_var=no"
7988 LIBS="$ac_save_LIBS"
7991 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7992 echo "$ac_t""yes" 1>&6
7993 ac_tr_lib=HAVE_LIB`echo panel$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7994 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7995 cat >> confdefs.h <<EOF
7996 #define $ac_tr_lib 1
7999 LIBS="-lpanel$cf_cv_libtype $LIBS"
8002 echo "$ac_t""no" 1>&6
8005 echo $ac_n "checking for menu_driver in -lmenu$cf_cv_libtype""... $ac_c" 1>&6
8006 echo "configure:8007: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
8007 ac_lib_var=`echo menu$cf_cv_libtype'_'menu_driver | sed 'y%./+-%__p_%'`
8008 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8009 echo $ac_n "(cached) $ac_c" 1>&6
8011 ac_save_LIBS="$LIBS"
8012 LIBS="-lmenu$cf_cv_libtype $LIBS"
8013 cat > conftest.$ac_ext <<EOF
8014 #line 8015 "configure"
8015 #include "confdefs.h"
8016 /* Override any gcc2 internal prototype to avoid an error. */
8017 /* We use char because int might match the return type of a gcc2
8018 builtin and then its argument prototype would still apply. */
8025 if { (eval echo configure:8026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8027 eval "ac_cv_lib_$ac_lib_var=yes"
8029 echo "configure: failed program was:" >&5
8030 cat conftest.$ac_ext >&5
8032 eval "ac_cv_lib_$ac_lib_var=no"
8035 LIBS="$ac_save_LIBS"
8038 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8039 echo "$ac_t""yes" 1>&6
8040 ac_tr_lib=HAVE_LIB`echo menu$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8041 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8042 cat >> confdefs.h <<EOF
8043 #define $ac_tr_lib 1
8046 LIBS="-lmenu$cf_cv_libtype $LIBS"
8049 echo "$ac_t""no" 1>&6
8052 echo $ac_n "checking for form_driver in -lform$cf_cv_libtype""... $ac_c" 1>&6
8053 echo "configure:8054: checking for form_driver in -lform$cf_cv_libtype" >&5
8054 ac_lib_var=`echo form$cf_cv_libtype'_'form_driver | sed 'y%./+-%__p_%'`
8055 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8056 echo $ac_n "(cached) $ac_c" 1>&6
8058 ac_save_LIBS="$LIBS"
8059 LIBS="-lform$cf_cv_libtype $LIBS"
8060 cat > conftest.$ac_ext <<EOF
8061 #line 8062 "configure"
8062 #include "confdefs.h"
8063 /* Override any gcc2 internal prototype to avoid an error. */
8064 /* We use char because int might match the return type of a gcc2
8065 builtin and then its argument prototype would still apply. */
8072 if { (eval echo configure:8073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8074 eval "ac_cv_lib_$ac_lib_var=yes"
8076 echo "configure: failed program was:" >&5
8077 cat conftest.$ac_ext >&5
8079 eval "ac_cv_lib_$ac_lib_var=no"
8082 LIBS="$ac_save_LIBS"
8085 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8086 echo "$ac_t""yes" 1>&6
8087 ac_tr_lib=HAVE_LIB`echo form$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8088 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8089 cat >> confdefs.h <<EOF
8090 #define $ac_tr_lib 1
8093 LIBS="-lform$cf_cv_libtype $LIBS"
8096 echo "$ac_t""no" 1>&6
8100 # look for curses-related headers
8109 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8110 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8111 echo "configure:8112: checking for $ac_hdr" >&5
8112 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8113 echo $ac_n "(cached) $ac_c" 1>&6
8115 cat > conftest.$ac_ext <<EOF
8116 #line 8117 "configure"
8117 #include "confdefs.h"
8120 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8121 { (eval echo configure:8122: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8122 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8123 if test -z "$ac_err"; then
8125 eval "ac_cv_header_$ac_safe=yes"
8128 echo "configure: failed program was:" >&5
8129 cat conftest.$ac_ext >&5
8131 eval "ac_cv_header_$ac_safe=no"
8135 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8136 echo "$ac_t""yes" 1>&6
8137 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8138 cat >> confdefs.h <<EOF
8139 #define $ac_tr_hdr 1
8143 echo "$ac_t""no" 1>&6
8150 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
8151 echo "configure:8152: checking return type of signal handlers" >&5
8152 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
8153 echo $ac_n "(cached) $ac_c" 1>&6
8155 cat > conftest.$ac_ext <<EOF
8156 #line 8157 "configure"
8157 #include "confdefs.h"
8158 #include <sys/types.h>
8164 extern "C" void (*signal (int, void (*)(int)))(int);
8166 void (*signal ()) ();
8173 if { (eval echo configure:8174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8175 ac_cv_type_signal=void
8177 echo "configure: failed program was:" >&5
8178 cat conftest.$ac_ext >&5
8180 ac_cv_type_signal=int
8185 echo "$ac_t""$ac_cv_type_signal" 1>&6
8186 cat >> confdefs.h <<EOF
8187 #define RETSIGTYPE $ac_cv_type_signal
8192 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8193 echo "configure:8194: checking for ANSI C header files" >&5
8194 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
8195 echo $ac_n "(cached) $ac_c" 1>&6
8197 cat > conftest.$ac_ext <<EOF
8198 #line 8199 "configure"
8199 #include "confdefs.h"
8205 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8206 { (eval echo configure:8207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8207 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8208 if test -z "$ac_err"; then
8210 ac_cv_header_stdc=yes
8213 echo "configure: failed program was:" >&5
8214 cat conftest.$ac_ext >&5
8216 ac_cv_header_stdc=no
8220 if test $ac_cv_header_stdc = yes; then
8221 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8222 cat > conftest.$ac_ext <<EOF
8223 #line 8224 "configure"
8224 #include "confdefs.h"
8227 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8228 egrep "memchr" >/dev/null 2>&1; then
8232 ac_cv_header_stdc=no
8238 if test $ac_cv_header_stdc = yes; then
8239 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8240 cat > conftest.$ac_ext <<EOF
8241 #line 8242 "configure"
8242 #include "confdefs.h"
8245 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8246 egrep "free" >/dev/null 2>&1; then
8250 ac_cv_header_stdc=no
8256 if test $ac_cv_header_stdc = yes; then
8257 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8258 if test "$cross_compiling" = yes; then
8261 cat > conftest.$ac_ext <<EOF
8262 #line 8263 "configure"
8263 #include "confdefs.h"
8265 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8266 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8267 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8268 int main () { int i; for (i = 0; i < 256; i++)
8269 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8273 if { (eval echo configure:8274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8277 echo "configure: failed program was:" >&5
8278 cat conftest.$ac_ext >&5
8280 ac_cv_header_stdc=no
8288 echo "$ac_t""$ac_cv_header_stdc" 1>&6
8289 if test $ac_cv_header_stdc = yes; then
8290 cat >> confdefs.h <<\EOF
8291 #define STDC_HEADERS 1
8296 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
8297 echo "configure:8298: checking whether time.h and sys/time.h may both be included" >&5
8298 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
8299 echo $ac_n "(cached) $ac_c" 1>&6
8301 cat > conftest.$ac_ext <<EOF
8302 #line 8303 "configure"
8303 #include "confdefs.h"
8304 #include <sys/types.h>
8305 #include <sys/time.h>
8311 if { (eval echo configure:8312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8313 ac_cv_header_time=yes
8315 echo "configure: failed program was:" >&5
8316 cat conftest.$ac_ext >&5
8318 ac_cv_header_time=no
8323 echo "$ac_t""$ac_cv_header_time" 1>&6
8324 if test $ac_cv_header_time = yes; then
8325 cat >> confdefs.h <<\EOF
8326 #define TIME_WITH_SYS_TIME 1
8342 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8343 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8344 echo "configure:8345: checking for $ac_hdr" >&5
8345 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8346 echo $ac_n "(cached) $ac_c" 1>&6
8348 cat > conftest.$ac_ext <<EOF
8349 #line 8350 "configure"
8350 #include "confdefs.h"
8353 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8354 { (eval echo configure:8355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8355 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8356 if test -z "$ac_err"; then
8358 eval "ac_cv_header_$ac_safe=yes"
8361 echo "configure: failed program was:" >&5
8362 cat conftest.$ac_ext >&5
8364 eval "ac_cv_header_$ac_safe=no"
8368 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8369 echo "$ac_t""yes" 1>&6
8370 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8371 cat >> confdefs.h <<EOF
8372 #define $ac_tr_hdr 1
8376 echo "$ac_t""no" 1>&6
8394 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8395 echo "configure:8396: checking for $ac_func" >&5
8396 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8397 echo $ac_n "(cached) $ac_c" 1>&6
8399 cat > conftest.$ac_ext <<EOF
8400 #line 8401 "configure"
8401 #include "confdefs.h"
8402 /* System header to define __stub macros and hopefully few prototypes,
8403 which can conflict with char $ac_func(); below. */
8405 /* Override any gcc2 internal prototype to avoid an error. */
8406 /* We use char because int might match the return type of a gcc2
8407 builtin and then its argument prototype would still apply. */
8412 /* The GNU C library defines this for functions which it implements
8413 to always fail with ENOSYS. Some functions are actually named
8414 something starting with __ and the normal name is an alias. */
8415 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8423 if { (eval echo configure:8424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8425 eval "ac_cv_func_$ac_func=yes"
8427 echo "configure: failed program was:" >&5
8428 cat conftest.$ac_ext >&5
8430 eval "ac_cv_func_$ac_func=no"
8435 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8436 echo "$ac_t""yes" 1>&6
8437 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8438 cat >> confdefs.h <<EOF
8439 #define $ac_tr_func 1
8443 echo "$ac_t""no" 1>&6
8449 echo $ac_n "checking if we must define _XOPEN_SOURCE_EXTENDED""... $ac_c" 1>&6
8450 echo "configure:8451: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8451 if eval "test \"`echo '$''{'cf_cv_need_xopen_extension'+set}'`\" = set"; then
8452 echo $ac_n "(cached) $ac_c" 1>&6
8455 cat > conftest.$ac_ext <<EOF
8456 #line 8457 "configure"
8457 #include "confdefs.h"
8460 #include <${cf_cv_ncurses_header-curses.h}>
8463 long x = winnstr(stdscr, "", 0);
8465 getbegyx(stdscr, y1, x1)
8468 if { (eval echo configure:8469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8470 cf_cv_need_xopen_extension=no
8472 echo "configure: failed program was:" >&5
8473 cat conftest.$ac_ext >&5
8475 cat > conftest.$ac_ext <<EOF
8476 #line 8477 "configure"
8477 #include "confdefs.h"
8479 #define _XOPEN_SOURCE_EXTENDED
8481 #include <${cf_cv_ncurses_header-curses.h}>
8484 long x = winnstr(stdscr, "", 0);
8486 getbegyx(stdscr, y1, x1)
8489 if { (eval echo configure:8490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8491 cf_cv_need_xopen_extension=yes
8493 echo "configure: failed program was:" >&5
8494 cat conftest.$ac_ext >&5
8496 cf_cv_need_xopen_extension=unknown
8503 echo "$ac_t""$cf_cv_need_xopen_extension" 1>&6
8504 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8508 echo $ac_n "checking for term.h""... $ac_c" 1>&6
8509 echo "configure:8510: checking for term.h" >&5
8510 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
8511 echo $ac_n "(cached) $ac_c" 1>&6
8515 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
8516 # for <term.h> if we do not find the variant.
8518 `echo ${cf_cv_ncurses_header-curses.h} | sed -e 's%/.*%/%'`term.h \
8521 cat > conftest.$ac_ext <<EOF
8522 #line 8523 "configure"
8523 #include "confdefs.h"
8525 #include <${cf_cv_ncurses_header-curses.h}>
8526 #include <${cf_header}>
8531 if { (eval echo configure:8532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8533 cf_cv_term_header=$cf_header
8536 echo "configure: failed program was:" >&5
8537 cat conftest.$ac_ext >&5
8539 cf_cv_term_header=no
8544 case $cf_cv_term_header in #(vi
8546 # If curses is ncurses, some packagers still mess it up by trying to make
8547 # us use GNU termcap. This handles the most common case.
8548 for cf_header in ncurses/term.h ncursesw/term.h
8550 cat > conftest.$ac_ext <<EOF
8551 #line 8552 "configure"
8552 #include "confdefs.h"
8554 #include <${cf_cv_ncurses_header-curses.h}>
8555 #ifdef NCURSES_VERSION
8556 #include <${cf_header}>
8564 if { (eval echo configure:8565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8566 cf_cv_term_header=$cf_header
8569 echo "configure: failed program was:" >&5
8570 cat conftest.$ac_ext >&5
8572 cf_cv_term_header=no
8581 echo "$ac_t""$cf_cv_term_header" 1>&6
8583 case $cf_cv_term_header in #(vi
8585 cat >> confdefs.h <<\EOF
8586 #define HAVE_TERM_H 1
8590 ncurses/term.h) #(vi
8591 cat >> confdefs.h <<\EOF
8592 #define HAVE_NCURSES_TERM_H 1
8597 cat >> confdefs.h <<\EOF
8598 #define HAVE_NCURSESW_TERM_H 1
8632 use_default_colors \
8641 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8643 echo $ac_n "checking for ${cf_func}""... $ac_c" 1>&6
8644 echo "configure:8645: checking for ${cf_func}" >&5
8646 echo "${as_me-configure}:8647: testing ${cf_func} ..." 1>&5
8648 if eval "test \"`echo '$''{'cf_cv_func_$cf_func'+set}'`\" = set"; then
8649 echo $ac_n "(cached) $ac_c" 1>&6
8652 eval cf_result='$ac_cv_func_'$cf_func
8653 if test ".$cf_result" != ".no"; then
8654 cat > conftest.$ac_ext <<EOF
8655 #line 8656 "configure"
8656 #include "confdefs.h"
8659 #include <xcurses.h>
8660 char * XCursesProgramName = "test";
8662 #include <${cf_cv_ncurses_header-curses.h}>
8663 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
8664 #include <ncursesw/term.h>
8665 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
8666 #include <ncurses/term.h>
8667 #elif defined(HAVE_TERM_H)
8675 long foo = (long)(&${cf_func});
8676 ${cf_cv_main_return-return}(foo == 0);
8681 if { (eval echo configure:8682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8685 echo "configure: failed program was:" >&5
8686 cat conftest.$ac_ext >&5
8692 eval 'cf_cv_func_'$cf_func'=$cf_result'
8696 # use the computed/retrieved cache-value:
8697 eval 'cf_result=$cf_cv_func_'$cf_func
8698 echo "$ac_t""$cf_result" 1>&6
8699 if test $cf_result != no; then
8700 cat >> confdefs.h <<EOF
8701 #define HAVE_${cf_tr_func} 1
8709 echo $ac_n "checking for ncurses extended functions""... $ac_c" 1>&6
8710 echo "configure:8711: checking for ncurses extended functions" >&5
8711 if eval "test \"`echo '$''{'cf_cv_ncurses_ext_funcs'+set}'`\" = set"; then
8712 echo $ac_n "(cached) $ac_c" 1>&6
8715 cat > conftest.$ac_ext <<EOF
8716 #line 8717 "configure"
8717 #include "confdefs.h"
8719 #include <${cf_cv_ncurses_header-curses.h}>
8722 int x = NCURSES_EXT_FUNCS
8726 if { (eval echo configure:8727: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8728 cf_cv_ncurses_ext_funcs=defined
8730 echo "configure: failed program was:" >&5
8731 cat conftest.$ac_ext >&5
8734 cat > conftest.$ac_ext <<EOF
8735 #line 8736 "configure"
8736 #include "confdefs.h"
8738 #include <${cf_cv_ncurses_header-curses.h}>
8741 (void) assume_default_colors (0, 0);
8742 (void) curses_version ();
8743 (void) define_key (0, 0);
8744 (void) is_term_resized (0, 0);
8745 (void) key_defined (0);
8746 (void) keybound (0, 0);
8747 (void) keyok (0, 0);
8748 (void) resize_term (0, 0);
8749 (void) resizeterm (0, 0);
8750 (void) use_default_colors ();
8751 (void) use_extended_names (0);
8752 (void) wresize (0, 0, 0);
8755 if { (eval echo configure:8756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8757 cf_cv_ncurses_ext_funcs=yes
8759 echo "configure: failed program was:" >&5
8760 cat conftest.$ac_ext >&5
8762 cf_cv_ncurses_ext_funcs=no
8771 echo "$ac_t""$cf_cv_ncurses_ext_funcs" 1>&6
8772 test "$cf_cv_ncurses_ext_funcs" == yes && cat >> confdefs.h <<\EOF
8773 #define NCURSES_EXT_FUNCS 1
8778 echo $ac_n "checking for wide-character functions""... $ac_c" 1>&6
8779 echo "configure:8780: checking for wide-character functions" >&5
8780 if eval "test \"`echo '$''{'cf_cv_widechar_funcs'+set}'`\" = set"; then
8781 echo $ac_n "(cached) $ac_c" 1>&6
8784 cat > conftest.$ac_ext <<EOF
8785 #line 8786 "configure"
8786 #include "confdefs.h"
8788 #include <${cf_cv_ncurses_header-curses.h}>
8791 static wchar_t src_wchar[2];
8792 static cchar_t dst_cchar;
8793 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
8797 if { (eval echo configure:8798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8799 cf_cv_widechar_funcs=yes
8801 echo "configure: failed program was:" >&5
8802 cat conftest.$ac_ext >&5
8804 cf_cv_widechar_funcs=no
8810 echo "$ac_t""$cf_cv_widechar_funcs" 1>&6
8811 if test "$cf_cv_widechar_funcs" != no ; then
8812 cat >> confdefs.h <<\EOF
8813 #define USE_WIDEC_SUPPORT 1
8817 cat >> confdefs.h <<\EOF
8818 #define USE_WIDEC_SUPPORT 0
8823 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
8824 echo "configure:8825: checking for pid_t" >&5
8825 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
8826 echo $ac_n "(cached) $ac_c" 1>&6
8828 cat > conftest.$ac_ext <<EOF
8829 #line 8830 "configure"
8830 #include "confdefs.h"
8831 #include <sys/types.h>
8837 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8838 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
8840 ac_cv_type_pid_t=yes
8848 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
8849 if test $ac_cv_type_pid_t = no; then
8850 cat >> confdefs.h <<\EOF
8856 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
8857 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
8858 echo "configure:8859: checking for vfork.h" >&5
8859 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8860 echo $ac_n "(cached) $ac_c" 1>&6
8862 cat > conftest.$ac_ext <<EOF
8863 #line 8864 "configure"
8864 #include "confdefs.h"
8867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8868 { (eval echo configure:8869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8869 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8870 if test -z "$ac_err"; then
8872 eval "ac_cv_header_$ac_safe=yes"
8875 echo "configure: failed program was:" >&5
8876 cat conftest.$ac_ext >&5
8878 eval "ac_cv_header_$ac_safe=no"
8882 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8883 echo "$ac_t""yes" 1>&6
8884 cat >> confdefs.h <<\EOF
8885 #define HAVE_VFORK_H 1
8889 echo "$ac_t""no" 1>&6
8892 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
8893 echo "configure:8894: checking for working vfork" >&5
8894 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
8895 echo $ac_n "(cached) $ac_c" 1>&6
8897 if test "$cross_compiling" = yes; then
8898 echo $ac_n "checking for vfork""... $ac_c" 1>&6
8899 echo "configure:8900: checking for vfork" >&5
8900 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
8901 echo $ac_n "(cached) $ac_c" 1>&6
8903 cat > conftest.$ac_ext <<EOF
8904 #line 8905 "configure"
8905 #include "confdefs.h"
8906 /* System header to define __stub macros and hopefully few prototypes,
8907 which can conflict with char vfork(); below. */
8909 /* Override any gcc2 internal prototype to avoid an error. */
8910 /* We use char because int might match the return type of a gcc2
8911 builtin and then its argument prototype would still apply. */
8916 /* The GNU C library defines this for functions which it implements
8917 to always fail with ENOSYS. Some functions are actually named
8918 something starting with __ and the normal name is an alias. */
8919 #if defined (__stub_vfork) || defined (__stub___vfork)
8927 if { (eval echo configure:8928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8929 eval "ac_cv_func_vfork=yes"
8931 echo "configure: failed program was:" >&5
8932 cat conftest.$ac_ext >&5
8934 eval "ac_cv_func_vfork=no"
8939 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
8940 echo "$ac_t""yes" 1>&6
8943 echo "$ac_t""no" 1>&6
8946 ac_cv_func_vfork_works=$ac_cv_func_vfork
8948 cat > conftest.$ac_ext <<EOF
8949 #line 8950 "configure"
8950 #include "confdefs.h"
8951 /* Thanks to Paul Eggert for this test. */
8953 #include <sys/types.h>
8954 #include <sys/stat.h>
8955 #ifdef HAVE_UNISTD_H
8961 /* On some sparc systems, changes by the child to local and incoming
8962 argument registers are propagated back to the parent.
8963 The compiler is told about this with #include <vfork.h>,
8964 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
8965 Test for this by using a static variable whose address
8966 is put into a register that is clobbered by the vfork. */
8969 sparc_address_test (int arg)
8971 sparc_address_test (arg) int arg;
8989 pid_t parent = getpid ();
8992 sparc_address_test ();
8997 /* Here is another test for sparc vfork register problems.
8998 This test uses lots of local variables, at least
8999 as many local variables as main has allocated so far
9000 including compiler temporaries. 4 locals are enough for
9001 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
9002 A buggy compiler should reuse the register of parent
9003 for one of the local variables, since it will think that
9004 parent can't possibly be used any more in this routine.
9005 Assigning to the local variable will thus munge parent
9006 in the parent process. */
9008 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9009 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9010 /* Convince the compiler that p..p7 are live; otherwise, it might
9011 use the same hardware register for all 8 local variables. */
9012 if (p != p1 || p != p2 || p != p3 || p != p4
9013 || p != p5 || p != p6 || p != p7)
9016 /* On some systems (e.g. IRIX 3.3),
9017 vfork doesn't separate parent from child file descriptors.
9018 If the child closes a descriptor before it execs or exits,
9019 this munges the parent's descriptor as well.
9020 Test for this by closing stdout in the child. */
9021 _exit(close(fileno(stdout)) != 0);
9026 while (wait(&status) != child)
9029 /* Was there some problem with vforking? */
9032 /* Did the child fail? (This shouldn't happen.) */
9035 /* Did the vfork/compiler bug occur? */
9036 || parent != getpid()
9038 /* Did the file descriptor bug occur? */
9039 || fstat(fileno(stdout), &st) != 0
9044 if { (eval echo configure:9045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9046 ac_cv_func_vfork_works=yes
9048 echo "configure: failed program was:" >&5
9049 cat conftest.$ac_ext >&5
9051 ac_cv_func_vfork_works=no
9058 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
9059 if test $ac_cv_func_vfork_works = no; then
9060 cat >> confdefs.h <<\EOF
9067 echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
9068 echo "configure:9069: checking if sys/time.h works with sys/select.h" >&5
9069 if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
9070 echo $ac_n "(cached) $ac_c" 1>&6
9073 cat > conftest.$ac_ext <<EOF
9074 #line 9075 "configure"
9075 #include "confdefs.h"
9077 #include <sys/types.h>
9078 #ifdef HAVE_SYS_TIME_H
9079 #include <sys/time.h>
9081 #ifdef HAVE_SYS_SELECT_H
9082 #include <sys/select.h>
9089 if { (eval echo configure:9090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9091 cf_cv_sys_time_select=yes
9093 echo "configure: failed program was:" >&5
9094 cat conftest.$ac_ext >&5
9096 cf_cv_sys_time_select=no
9102 echo "$ac_t""$cf_cv_sys_time_select" 1>&6
9103 test "$cf_cv_sys_time_select" = yes && cat >> confdefs.h <<\EOF
9104 #define HAVE_SYS_TIME_SELECT 1
9109 echo $ac_n "checking for function curses_version""... $ac_c" 1>&6
9110 echo "configure:9111: checking for function curses_version" >&5
9111 if eval "test \"`echo '$''{'cf_cv_func_curses_version'+set}'`\" = set"; then
9112 echo $ac_n "(cached) $ac_c" 1>&6
9115 if test "$cross_compiling" = yes; then
9116 cf_cv_func_curses_version=unknown
9118 cat > conftest.$ac_ext <<EOF
9119 #line 9120 "configure"
9120 #include "confdefs.h"
9122 #include <${cf_cv_ncurses_header-curses.h}>
9126 sprintf(temp, "%s\n", curses_version());
9127 ${cf_cv_main_return-return}(0);
9131 if { (eval echo configure:9132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9133 cf_cv_func_curses_version=yes
9136 echo "configure: failed program was:" >&5
9137 cat conftest.$ac_ext >&5
9139 cf_cv_func_curses_version=no
9148 echo "$ac_t""$cf_cv_func_curses_version" 1>&6
9149 test "$cf_cv_func_curses_version" = yes && cat >> confdefs.h <<\EOF
9150 #define HAVE_CURSES_VERSION 1
9155 echo $ac_n "checking for ncurses wrap-prefix""... $ac_c" 1>&6
9156 echo "configure:9157: checking for ncurses wrap-prefix" >&5
9158 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
9159 if test "${with_ncurses_wrap_prefix+set}" = set; then
9160 withval="$with_ncurses_wrap_prefix"
9161 NCURSES_WRAP_PREFIX=$withval
9163 NCURSES_WRAP_PREFIX=_nc_
9166 echo "$ac_t""$NCURSES_WRAP_PREFIX" 1>&6
9171 echo $ac_n "checking for alternate character set array""... $ac_c" 1>&6
9172 echo "configure:9173: checking for alternate character set array" >&5
9173 if eval "test \"`echo '$''{'cf_cv_curses_acs_map'+set}'`\" = set"; then
9174 echo $ac_n "(cached) $ac_c" 1>&6
9177 cf_cv_curses_acs_map=unknown
9178 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
9180 cat > conftest.$ac_ext <<EOF
9181 #line 9182 "configure"
9182 #include "confdefs.h"
9184 #include <${cf_cv_ncurses_header-curses.h}>
9188 $name['k'] = ACS_PLUS
9192 if { (eval echo configure:9193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9194 cf_cv_curses_acs_map=$name; break
9196 echo "configure: failed program was:" >&5
9197 cat conftest.$ac_ext >&5
9204 echo "$ac_t""$cf_cv_curses_acs_map" 1>&6
9206 test "$cf_cv_curses_acs_map" != unknown && cat >> confdefs.h <<EOF
9207 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
9212 echo $ac_n "checking for wide alternate character set array""... $ac_c" 1>&6
9213 echo "configure:9214: checking for wide alternate character set array" >&5
9214 if eval "test \"`echo '$''{'cf_cv_curses_wacs_map'+set}'`\" = set"; then
9215 echo $ac_n "(cached) $ac_c" 1>&6
9218 cf_cv_curses_wacs_map=unknown
9219 for name in wacs_map _wacs_map __wacs_map _nc_wacs
9221 cat > conftest.$ac_ext <<EOF
9222 #line 9223 "configure"
9223 #include "confdefs.h"
9225 #ifndef _XOPEN_SOURCE_EXTENDED
9226 #define _XOPEN_SOURCE_EXTENDED
9228 #include <${cf_cv_ncurses_header-curses.h}>
9230 $name['k'] = *WACS_PLUS
9233 if { (eval echo configure:9234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9235 cf_cv_curses_wacs_map=$name
9238 echo "configure: failed program was:" >&5
9239 cat conftest.$ac_ext >&5
9245 echo "$ac_t""$cf_cv_curses_wacs_map" 1>&6
9249 echo $ac_n "checking for type attr_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
9250 echo "configure:9251: checking for type attr_t in ${cf_cv_ncurses_header-curses.h}" >&5
9251 cat > conftest.$ac_ext <<EOF
9252 #line 9253 "configure"
9253 #include "confdefs.h"
9255 #ifndef _XOPEN_SOURCE_EXTENDED
9256 #define _XOPEN_SOURCE_EXTENDED
9258 #include <${cf_cv_ncurses_header-curses.h}>
9265 if { (eval echo configure:9266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9269 echo "configure: failed program was:" >&5
9270 cat conftest.$ac_ext >&5
9275 echo "$ac_t""$cf_result" 1>&6
9276 if test $cf_result = yes ; then
9278 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9280 cat >> confdefs.h <<EOF
9281 #define $cf_result 1
9285 cat >> confdefs.h <<EOF
9293 # This is needed on Tru64 5.0 to declare mbstate_t
9294 echo $ac_n "checking if we must include wchar.h to declare mbstate_t""... $ac_c" 1>&6
9295 echo "configure:9296: checking if we must include wchar.h to declare mbstate_t" >&5
9296 if eval "test \"`echo '$''{'cf_cv_mbstate_t'+set}'`\" = set"; then
9297 echo $ac_n "(cached) $ac_c" 1>&6
9300 cat > conftest.$ac_ext <<EOF
9301 #line 9302 "configure"
9302 #include "confdefs.h"
9307 #ifdef HAVE_LIBUTF8_H
9308 #include <libutf8.h>
9314 if { (eval echo configure:9315: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9318 echo "configure: failed program was:" >&5
9319 cat conftest.$ac_ext >&5
9321 cat > conftest.$ac_ext <<EOF
9322 #line 9323 "configure"
9323 #include "confdefs.h"
9329 #ifdef HAVE_LIBUTF8_H
9330 #include <libutf8.h>
9336 if { (eval echo configure:9337: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9340 echo "configure: failed program was:" >&5
9341 cat conftest.$ac_ext >&5
9343 cf_cv_mbstate_t=unknown
9350 echo "$ac_t""$cf_cv_mbstate_t" 1>&6
9352 if test "$cf_cv_mbstate_t" = yes ; then
9353 cat >> confdefs.h <<\EOF
9354 #define NEED_WCHAR_H 1
9361 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9362 if test "$cf_cv_mbstate_t" = unknown ; then
9367 # if we find mbstate_t in either place, use substitution to provide a fallback.
9368 if test "$cf_cv_mbstate_t" != unknown ; then
9369 NCURSES_OK_MBSTATE_T=1
9374 # This is needed on Tru64 5.0 to declare wchar_t
9375 echo $ac_n "checking if we must include wchar.h to declare wchar_t""... $ac_c" 1>&6
9376 echo "configure:9377: checking if we must include wchar.h to declare wchar_t" >&5
9377 if eval "test \"`echo '$''{'cf_cv_wchar_t'+set}'`\" = set"; then
9378 echo $ac_n "(cached) $ac_c" 1>&6
9381 cat > conftest.$ac_ext <<EOF
9382 #line 9383 "configure"
9383 #include "confdefs.h"
9388 #ifdef HAVE_LIBUTF8_H
9389 #include <libutf8.h>
9395 if { (eval echo configure:9396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9399 echo "configure: failed program was:" >&5
9400 cat conftest.$ac_ext >&5
9402 cat > conftest.$ac_ext <<EOF
9403 #line 9404 "configure"
9404 #include "confdefs.h"
9410 #ifdef HAVE_LIBUTF8_H
9411 #include <libutf8.h>
9417 if { (eval echo configure:9418: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9421 echo "configure: failed program was:" >&5
9422 cat conftest.$ac_ext >&5
9424 cf_cv_wchar_t=unknown
9431 echo "$ac_t""$cf_cv_wchar_t" 1>&6
9433 if test "$cf_cv_wchar_t" = yes ; then
9434 cat >> confdefs.h <<\EOF
9435 #define NEED_WCHAR_H 1
9442 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9443 if test "$cf_cv_wchar_t" = unknown ; then
9448 # if we find wchar_t in either place, use substitution to provide a fallback.
9449 if test "$cf_cv_wchar_t" != unknown ; then
9450 NCURSES_OK_WCHAR_T=1
9455 # This is needed on Tru64 5.0 to declare wint_t
9456 echo $ac_n "checking if we must include wchar.h to declare wint_t""... $ac_c" 1>&6
9457 echo "configure:9458: checking if we must include wchar.h to declare wint_t" >&5
9458 if eval "test \"`echo '$''{'cf_cv_wint_t'+set}'`\" = set"; then
9459 echo $ac_n "(cached) $ac_c" 1>&6
9462 cat > conftest.$ac_ext <<EOF
9463 #line 9464 "configure"
9464 #include "confdefs.h"
9469 #ifdef HAVE_LIBUTF8_H
9470 #include <libutf8.h>
9476 if { (eval echo configure:9477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9480 echo "configure: failed program was:" >&5
9481 cat conftest.$ac_ext >&5
9483 cat > conftest.$ac_ext <<EOF
9484 #line 9485 "configure"
9485 #include "confdefs.h"
9491 #ifdef HAVE_LIBUTF8_H
9492 #include <libutf8.h>
9498 if { (eval echo configure:9499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9502 echo "configure: failed program was:" >&5
9503 cat conftest.$ac_ext >&5
9505 cf_cv_wint_t=unknown
9512 echo "$ac_t""$cf_cv_wint_t" 1>&6
9514 if test "$cf_cv_wint_t" = yes ; then
9515 cat >> confdefs.h <<\EOF
9516 #define NEED_WCHAR_H 1
9523 # if we do not find wint_t in either place, use substitution to provide a fallback.
9524 if test "$cf_cv_wint_t" = unknown ; then
9529 # if we find wint_t in either place, use substitution to provide a fallback.
9530 if test "$cf_cv_wint_t" != unknown ; then
9536 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
9538 echo $ac_n "checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
9539 echo "configure:9540: checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}" >&5
9540 cat > conftest.$ac_ext <<EOF
9541 #line 9542 "configure"
9542 #include "confdefs.h"
9544 #ifndef _XOPEN_SOURCE_EXTENDED
9545 #define _XOPEN_SOURCE_EXTENDED
9547 #include <${cf_cv_ncurses_header-curses.h}>
9554 if { (eval echo configure:9555: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9558 echo "configure: failed program was:" >&5
9559 cat conftest.$ac_ext >&5
9564 echo "$ac_t""$cf_result" 1>&6
9565 if test $cf_result = yes ; then
9567 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9569 cat >> confdefs.h <<EOF
9570 #define $cf_result 1
9574 cat >> confdefs.h <<EOF
9575 #define mbstate_t long
9582 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
9584 echo $ac_n "checking for type wchar_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
9585 echo "configure:9586: checking for type wchar_t in ${cf_cv_ncurses_header-curses.h}" >&5
9586 cat > conftest.$ac_ext <<EOF
9587 #line 9588 "configure"
9588 #include "confdefs.h"
9590 #ifndef _XOPEN_SOURCE_EXTENDED
9591 #define _XOPEN_SOURCE_EXTENDED
9593 #include <${cf_cv_ncurses_header-curses.h}>
9600 if { (eval echo configure:9601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9604 echo "configure: failed program was:" >&5
9605 cat conftest.$ac_ext >&5
9610 echo "$ac_t""$cf_result" 1>&6
9611 if test $cf_result = yes ; then
9613 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9615 cat >> confdefs.h <<EOF
9616 #define $cf_result 1
9620 cat >> confdefs.h <<EOF
9621 #define wchar_t long
9628 if test "$NCURSES_OK_WINT_T" = 0 ; then
9630 echo $ac_n "checking for type wint_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
9631 echo "configure:9632: checking for type wint_t in ${cf_cv_ncurses_header-curses.h}" >&5
9632 cat > conftest.$ac_ext <<EOF
9633 #line 9634 "configure"
9634 #include "confdefs.h"
9636 #ifndef _XOPEN_SOURCE_EXTENDED
9637 #define _XOPEN_SOURCE_EXTENDED
9639 #include <${cf_cv_ncurses_header-curses.h}>
9646 if { (eval echo configure:9647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9650 echo "configure: failed program was:" >&5
9651 cat conftest.$ac_ext >&5
9656 echo "$ac_t""$cf_result" 1>&6
9657 if test $cf_result = yes ; then
9659 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9661 cat >> confdefs.h <<EOF
9662 #define $cf_result 1
9666 cat >> confdefs.h <<EOF
9675 echo $ac_n "checking for data boolnames declaration in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
9676 echo "configure:9677: checking for data boolnames declaration in ${cf_cv_ncurses_header-curses.h}" >&5
9677 cat > conftest.$ac_ext <<EOF
9678 #line 9679 "configure"
9679 #include "confdefs.h"
9682 #include <xcurses.h>
9683 char * XCursesProgramName = "test";
9685 #include <${cf_cv_ncurses_header-curses.h}>
9686 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
9687 #include <ncursesw/term.h>
9688 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
9689 #include <ncurses/term.h>
9690 #elif defined(HAVE_TERM_H)
9697 void *foo = &(boolnames)
9701 if { (eval echo configure:9702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9705 echo "configure: failed program was:" >&5
9706 cat conftest.$ac_ext >&5
9711 echo "$ac_t""$cf_result" 1>&6
9712 if test $cf_result = yes ; then
9714 cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9716 cat >> confdefs.h <<EOF
9717 #define $cf_result 1
9721 echo $ac_n "checking for data boolnames in library""... $ac_c" 1>&6
9722 echo "configure:9723: checking for data boolnames in library" >&5
9723 cat > conftest.$ac_ext <<EOF
9724 #line 9725 "configure"
9725 #include "confdefs.h"
9728 #include <xcurses.h>
9729 char * XCursesProgramName = "test";
9731 #include <${cf_cv_ncurses_header-curses.h}>
9732 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
9733 #include <ncursesw/term.h>
9734 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
9735 #include <ncurses/term.h>
9736 #elif defined(HAVE_TERM_H)
9741 extern char boolnames;
9745 void *foo = &(boolnames);
9746 ${cf_cv_main_return-return}(foo == 0);
9751 if { (eval echo configure:9752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9755 echo "configure: failed program was:" >&5
9756 cat conftest.$ac_ext >&5
9761 echo "$ac_t""$cf_result" 1>&6
9762 if test $cf_result = yes ; then
9764 cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9766 cat >> confdefs.h <<EOF
9767 #define $cf_result 1
9774 echo $ac_n "checking for data boolfnames declaration in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
9775 echo "configure:9776: checking for data boolfnames declaration in ${cf_cv_ncurses_header-curses.h}" >&5
9776 cat > conftest.$ac_ext <<EOF
9777 #line 9778 "configure"
9778 #include "confdefs.h"
9781 #include <xcurses.h>
9782 char * XCursesProgramName = "test";
9784 #include <${cf_cv_ncurses_header-curses.h}>
9785 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
9786 #include <ncursesw/term.h>
9787 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
9788 #include <ncurses/term.h>
9789 #elif defined(HAVE_TERM_H)
9796 void *foo = &(boolfnames)
9800 if { (eval echo configure:9801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9804 echo "configure: failed program was:" >&5
9805 cat conftest.$ac_ext >&5
9810 echo "$ac_t""$cf_result" 1>&6
9811 if test $cf_result = yes ; then
9813 cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9815 cat >> confdefs.h <<EOF
9816 #define $cf_result 1
9820 echo $ac_n "checking for data boolfnames in library""... $ac_c" 1>&6
9821 echo "configure:9822: checking for data boolfnames in library" >&5
9822 cat > conftest.$ac_ext <<EOF
9823 #line 9824 "configure"
9824 #include "confdefs.h"
9827 #include <xcurses.h>
9828 char * XCursesProgramName = "test";
9830 #include <${cf_cv_ncurses_header-curses.h}>
9831 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
9832 #include <ncursesw/term.h>
9833 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
9834 #include <ncurses/term.h>
9835 #elif defined(HAVE_TERM_H)
9840 extern char boolfnames;
9844 void *foo = &(boolfnames);
9845 ${cf_cv_main_return-return}(foo == 0);
9850 if { (eval echo configure:9851: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9854 echo "configure: failed program was:" >&5
9855 cat conftest.$ac_ext >&5
9860 echo "$ac_t""$cf_result" 1>&6
9861 if test $cf_result = yes ; then
9863 cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9865 cat >> confdefs.h <<EOF
9866 #define $cf_result 1
9878 cat > confcache <<\EOF
9879 # This file is a shell script that caches the results of configure
9880 # tests run on this system so they can be shared between configure
9881 # scripts and configure runs. It is not useful on other systems.
9882 # If it contains results you don't want to keep, you may remove or edit it.
9884 # By default, configure uses ./config.cache as the cache file,
9885 # creating it if it does not exist already. You can give configure
9886 # the --cache-file=FILE option to use a different cache file; that is
9887 # what configure does when it calls configure scripts in
9888 # subdirectories, so they share the cache.
9889 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9890 # config.status only pays attention to the cache file if you give it the
9891 # --recheck option to rerun configure.
9894 # The following way of writing the cache mishandles newlines in values,
9895 # but we know of no workaround that is simple, portable, and efficient.
9896 # So, don't put newlines in cache variables' values.
9897 # Ultrix sh set writes to stderr and can't be redirected directly,
9898 # and sets the high bit in the cache file unless we assign to the vars.
9900 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9902 # `set' does not quote correctly, so add quotes (double-quote substitution
9903 # turns \\\\ into \\, and sed turns \\ into \).
9905 -e "s/'/'\\\\''/g" \
9906 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9909 # `set' quotes correctly as required by POSIX, so do not add quotes.
9910 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9913 if cmp -s $cache_file confcache; then
9916 if test -w $cache_file; then
9917 echo "updating cache $cache_file"
9918 cat confcache > $cache_file
9920 echo "not updating unwritable cache $cache_file"
9925 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9927 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9928 # Let make expand exec_prefix.
9929 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9931 # Any assignment to VPATH causes Sun make to only execute
9932 # the first set of double-colon rules, so remove it if not needed.
9933 # If there is a colon in the path, we need to keep it.
9934 if test "x$srcdir" = x.; then
9935 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9938 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9940 DEFS=-DHAVE_CONFIG_H
9942 # Without the "./", some shells look in PATH for config.status.
9943 : ${CONFIG_STATUS=./config.status}
9945 echo creating $CONFIG_STATUS
9946 rm -f $CONFIG_STATUS
9947 cat > $CONFIG_STATUS <<EOF
9949 # Generated automatically by configure.
9950 # Run this file to recreate the current configuration.
9951 # This directory was configured as follows,
9952 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9954 # $0 $ac_configure_args
9956 # Compiler output produced by configure, useful for debugging
9957 # configure, is in ./config.log if it exists.
9959 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9962 case "\$ac_option" in
9963 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9964 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9965 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9966 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9967 echo "$CONFIG_STATUS generated by autoconf version 2.13.20030927"
9969 -help | --help | --hel | --he | --h)
9970 echo "\$ac_cs_usage"; exit 0 ;;
9971 *) echo "\$ac_cs_usage"; exit 1 ;;
9975 ac_given_srcdir=$srcdir
9977 trap 'rm -fr `echo "Makefile ncurses_cfg.h:ncurses_tst.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9979 cat >> $CONFIG_STATUS <<EOF
9981 # Protect against being on the right side of a sed subst in config.status.
9982 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9983 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9987 s%@CFLAGS@%$CFLAGS%g
9988 s%@CPPFLAGS@%$CPPFLAGS%g
9989 s%@CXXFLAGS@%$CXXFLAGS%g
9990 s%@FFLAGS@%$FFLAGS%g
9992 s%@LDFLAGS@%$LDFLAGS%g
9994 s%@exec_prefix@%$exec_prefix%g
9995 s%@prefix@%$prefix%g
9996 s%@program_transform_name@%$program_transform_name%g
9997 s%@bindir@%$bindir%g
9998 s%@sbindir@%$sbindir%g
9999 s%@libexecdir@%$libexecdir%g
10000 s%@datadir@%$datadir%g
10001 s%@sysconfdir@%$sysconfdir%g
10002 s%@sharedstatedir@%$sharedstatedir%g
10003 s%@localstatedir@%$localstatedir%g
10004 s%@libdir@%$libdir%g
10005 s%@includedir@%$includedir%g
10006 s%@oldincludedir@%$oldincludedir%g
10007 s%@infodir@%$infodir%g
10008 s%@mandir@%$mandir%g
10010 s%@host_alias@%$host_alias%g
10011 s%@host_cpu@%$host_cpu%g
10012 s%@host_vendor@%$host_vendor%g
10013 s%@host_os@%$host_os%g
10014 s%@SET_MAKE@%$SET_MAKE%g
10020 s%@MAKE_LOWER_TAGS@%$MAKE_LOWER_TAGS%g
10021 s%@MAKE_UPPER_TAGS@%$MAKE_UPPER_TAGS%g
10022 s%@CC_G_OPT@%$CC_G_OPT%g
10023 s%@CC_SHARED_OPTS@%$CC_SHARED_OPTS%g
10024 s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g
10025 s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g
10026 s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
10028 s%@LDFLAGS_SHARED@%$LDFLAGS_SHARED%g
10029 s%@LDFLAGS_STATIC@%$LDFLAGS_STATIC%g
10030 s%@LD_MODEL@%$LD_MODEL%g
10031 s%@LD_SHARED_OPTS@%$LD_SHARED_OPTS%g
10032 s%@LIBTOOL@%$LIBTOOL%g
10033 s%@LIB_CLEAN@%$LIB_CLEAN%g
10034 s%@LIB_COMPILE@%$LIB_COMPILE%g
10035 s%@LIB_LINK@%$LIB_LINK%g
10036 s%@LINK_TESTS@%$LINK_TESTS%g
10038 s%@LINT_OPTS@%$LINT_OPTS%g
10039 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
10040 s%@MATH_LIB@%$MATH_LIB%g
10041 s%@PTHREAD@%$PTHREAD%g
10042 s%@TEST_ARGS@%$TEST_ARGS%g
10043 s%@TEST_DEPS@%$TEST_DEPS%g
10044 s%@TEST_LIBS@%$TEST_LIBS%g
10045 s%@TINFO_ARGS@%$TINFO_ARGS%g
10046 s%@cf_cv_abi_version@%$cf_cv_abi_version%g
10047 s%@cf_cv_rel_version@%$cf_cv_rel_version%g
10048 s%@EXEEXT@%$EXEEXT%g
10049 s%@OBJEXT@%$OBJEXT%g
10050 s%@EXTRA_CPPFLAGS@%$EXTRA_CPPFLAGS%g
10051 s%@ECHO_LT@%$ECHO_LT%g
10052 s%@ECHO_LD@%$ECHO_LD%g
10053 s%@RULE_CC@%$RULE_CC%g
10054 s%@SHOW_CC@%$SHOW_CC%g
10055 s%@ECHO_CC@%$ECHO_CC%g
10056 s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
10057 s%@NCURSES_CONFIG@%$NCURSES_CONFIG%g
10058 s%@X_CFLAGS@%$X_CFLAGS%g
10059 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
10060 s%@X_LIBS@%$X_LIBS%g
10061 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
10062 s%@XCURSES_CONFIG@%$XCURSES_CONFIG%g
10063 s%@NCURSES_WRAP_PREFIX@%$NCURSES_WRAP_PREFIX%g
10068 cat >> $CONFIG_STATUS <<\EOF
10070 # Split the substitutions into bite-sized pieces for seds with
10071 # small command number limits, like on Digital OSF/1 and HP-UX.
10072 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
10073 ac_file=1 # Number of current file.
10074 ac_beg=1 # First line for current file.
10075 ac_end=$ac_max_sed_cmds # Line after last line for current file.
10078 while $ac_more_lines; do
10079 if test $ac_beg -gt 1; then
10080 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10082 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10084 if test ! -s conftest.s$ac_file; then
10085 ac_more_lines=false
10086 rm -f conftest.s$ac_file
10088 if test -z "$ac_sed_cmds"; then
10089 ac_sed_cmds="sed -f conftest.s$ac_file"
10091 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10093 ac_file=`expr $ac_file + 1`
10095 ac_end=`expr $ac_end + $ac_max_sed_cmds`
10098 if test -z "$ac_sed_cmds"; then
10103 cat >> $CONFIG_STATUS <<EOF
10105 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
10107 cat >> $CONFIG_STATUS <<\EOF
10108 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
10109 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10111 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10112 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10113 *) ac_file_in="${ac_file}.in" ;;
10116 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
10118 # Remove last slash and all that follows it. Not all systems have dirname.
10119 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10120 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10121 # The file is in a subdirectory.
10122 test ! -d "$ac_dir" && mkdir "$ac_dir"
10123 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
10124 # A "../" for each directory in $ac_dir_suffix.
10125 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
10127 ac_dir_suffix= ac_dots=
10130 case "$ac_given_srcdir" in
10132 if test -z "$ac_dots"; then top_srcdir=.
10133 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
10134 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
10135 *) # Relative path.
10136 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
10137 top_srcdir="$ac_dots$ac_given_srcdir" ;;
10141 echo creating "$ac_file"
10143 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
10145 *Makefile*) ac_comsub="1i\\
10146 # $configure_input" ;;
10150 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10152 s%@configure_input@%$configure_input%g
10153 s%@srcdir@%$srcdir%g
10154 s%@top_srcdir@%$top_srcdir%g
10155 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
10159 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10160 # NAME is the cpp macro being defined and VALUE is the value it is being given.
10162 # ac_d sets the value in "#define NAME VALUE" lines.
10163 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
10164 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
10167 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
10168 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10169 ac_uB='\([ ]\)%\1#\2define\3'
10172 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
10173 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10174 ac_eB='$%\1#\2define\3'
10178 if test "${CONFIG_HEADERS+set}" != set; then
10180 cat >> $CONFIG_STATUS <<EOF
10181 CONFIG_HEADERS="ncurses_cfg.h:ncurses_tst.hin"
10183 cat >> $CONFIG_STATUS <<\EOF
10185 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
10186 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10188 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10189 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10190 *) ac_file_in="${ac_file}.in" ;;
10193 echo creating $ac_file
10195 rm -f conftest.frag conftest.in conftest.out
10196 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10197 cat $ac_file_inputs > conftest.in
10202 # Transform confdefs.h into a list of #define's. We won't use it as a sed
10203 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
10204 # be either 'cat' or 'sort'.
10205 cat confdefs.h >conftest.vals
10207 # Break up conftest.vals because some shells have a limit on
10208 # the size of here documents, and old seds have small limits too.
10210 rm -f conftest.tail
10211 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
10214 ac_lines=`grep -c . conftest.vals`
10215 # grep -c gives empty output for an empty file on some AIX systems.
10216 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
10217 # Write chunks of a limited-size here document to conftest.frag.
10218 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
10219 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
10220 echo 'CEOF' >> $CONFIG_STATUS
10221 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
10222 rm -f conftest.vals
10223 mv conftest.tail conftest.vals
10225 rm -f conftest.vals
10227 # Run sed to substitute the contents of conftest.frag into conftest.in at the
10229 echo ' cat >> conftest.edit <<CEOF
10230 /@DEFS@/r conftest.frag
10233 sed -f conftest.edit conftest.in > conftest.out
10235 mv conftest.out conftest.in
10236 rm -f conftest.edit conftest.frag
10237 ' >> $CONFIG_STATUS
10240 cat >> $CONFIG_STATUS <<\EOF
10241 rm -f conftest.frag conftest.h
10242 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
10243 cat conftest.in >> conftest.h
10245 if cmp -s $ac_file conftest.h 2>/dev/null; then
10246 echo "$ac_file is unchanged"
10249 # Remove last slash and all that follows it. Not all systems have dirname.
10250 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10251 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10252 # The file is in a subdirectory.
10253 test ! -d "$ac_dir" && mkdir "$ac_dir"
10256 mv conftest.h $ac_file
10261 cat >> $CONFIG_STATUS <<EOF
10262 # Extra initialization commands, if any
10268 cat >> $CONFIG_STATUS <<\EOF
10269 # Extra commands, if any
10274 if test ! -d $srcdir/$cf_dir; then
10276 elif test -f $srcdir/$cf_dir/programs; then
10277 $AWK -f $srcdir/mk-test.awk ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
10282 cat >>Makefile <<TEST_EOF
10284 # These rules are generated so we do not rely on suffix rules, which do not
10285 # work consistently for different make-programs (the '\$(MODEL)/' confuses
10286 # some, and the '\$x' confuses others).
10288 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
10291 cat >>Makefile <<TEST_EOF
10293 \$(MODEL)/$N.o : $N.c \\
10296 @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) $N.c
10302 chmod +x $CONFIG_STATUS
10303 rm -fr confdefs* $ac_clean_files
10304 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1