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 2>/dev/null | 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"
2871 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
2872 for cf_opt in W Wall \
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
3035 ncurses.h ncurses/curses.h ncurses/ncurses.h
3037 cat > conftest.$ac_ext <<EOF
3038 #line 3039 "configure"
3039 #include "confdefs.h"
3040 #include <${cf_header}>
3042 initscr(); tgoto("?", 0,0)
3045 if { (eval echo configure:3046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3047 cf_cv_ncurses_header=$cf_header; break
3049 echo "configure: failed program was:" >&5
3050 cat conftest.$ac_ext >&5
3057 echo "$ac_t""$cf_cv_ncurses_header" 1>&6
3059 if test "$cf_cv_ncurses_header" = none ; then
3060 { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
3063 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
3064 for ac_hdr in $cf_cv_ncurses_header
3066 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3067 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3068 echo "configure:3069: checking for $ac_hdr" >&5
3069 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3070 echo $ac_n "(cached) $ac_c" 1>&6
3072 cat > conftest.$ac_ext <<EOF
3073 #line 3074 "configure"
3074 #include "confdefs.h"
3077 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3078 { (eval echo configure:3079: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3079 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3080 if test -z "$ac_err"; then
3082 eval "ac_cv_header_$ac_safe=yes"
3085 echo "configure: failed program was:" >&5
3086 cat conftest.$ac_ext >&5
3088 eval "ac_cv_header_$ac_safe=no"
3092 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3093 echo "$ac_t""yes" 1>&6
3094 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3095 cat >> confdefs.h <<EOF
3096 #define $ac_tr_hdr 1
3100 echo "$ac_t""no" 1>&6
3106 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
3107 echo "configure:3108: checking for terminfo header" >&5
3108 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
3109 echo $ac_n "(cached) $ac_c" 1>&6
3112 case ${cf_cv_ncurses_header} in #(vi
3113 */ncurses.h|*/ncursesw.h) #(vi
3114 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
3117 cf_term_header=term.h
3121 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
3123 cat > conftest.$ac_ext <<EOF
3124 #line 3125 "configure"
3125 #include "confdefs.h"
3127 #include <${cf_cv_ncurses_header-curses.h}>
3131 int x = auto_left_margin
3134 if { (eval echo configure:3135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3137 cf_cv_term_header="$cf_test"
3139 echo "configure: failed program was:" >&5
3140 cat conftest.$ac_ext >&5
3143 cf_cv_term_header=unknown
3147 test "$cf_cv_term_header" != unknown && break
3152 echo "$ac_t""$cf_cv_term_header" 1>&6
3154 # Set definitions to allow ifdef'ing to accommodate subdirectories
3156 case $cf_cv_term_header in # (vi
3158 cat >> confdefs.h <<\EOF
3159 #define HAVE_TERM_H 1
3165 case $cf_cv_term_header in # (vi
3166 ncurses/term.h) #(vi
3167 cat >> confdefs.h <<\EOF
3168 #define HAVE_NCURSES_TERM_H 1
3173 cat >> confdefs.h <<\EOF
3174 #define HAVE_NCURSESW_TERM_H 1
3182 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
3183 echo "configure:3184: checking for ncurses version" >&5
3184 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
3185 echo $ac_n "(cached) $ac_c" 1>&6
3188 cf_cv_ncurses_version=no
3191 if test "$cross_compiling" = yes; then
3194 # This will not work if the preprocessor splits the line after the
3195 # Autoconf token. The 'unproto' program does that.
3196 cat > conftest.$ac_ext <<EOF
3197 #include <${cf_cv_ncurses_header-curses.h}>
3199 #ifdef NCURSES_VERSION
3200 Autoconf NCURSES_VERSION
3208 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
3209 { (eval echo configure:3210: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
3210 if test -f conftest.out ; then
3211 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
3212 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
3217 cat > conftest.$ac_ext <<EOF
3218 #line 3219 "configure"
3219 #include "confdefs.h"
3221 #include <${cf_cv_ncurses_header-curses.h}>
3225 FILE *fp = fopen("$cf_tempfile", "w");
3226 #ifdef NCURSES_VERSION
3227 # ifdef NCURSES_VERSION_PATCH
3228 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
3230 fprintf(fp, "%s\n", NCURSES_VERSION);
3234 fprintf(fp, "old\n");
3239 ${cf_cv_main_return-return}(0);
3242 if { (eval echo configure:3243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3245 cf_cv_ncurses_version=`cat $cf_tempfile`
3247 echo "configure: failed program was:" >&5
3248 cat conftest.$ac_ext >&5
3257 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
3258 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
3265 echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
3266 echo "configure:3267: checking if we have identified curses libraries" >&5
3267 cat > conftest.$ac_ext <<EOF
3268 #line 3269 "configure"
3269 #include "confdefs.h"
3270 #include <${cf_cv_ncurses_header-curses.h}>
3272 initscr(); tgoto("?", 0,0)
3275 if { (eval echo configure:3276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3279 echo "configure: failed program was:" >&5
3280 cat conftest.$ac_ext >&5
3285 echo "$ac_t""$cf_result" 1>&6
3287 if test "$cf_result" = no ; then
3288 case $host_os in #(vi
3290 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
3291 echo "configure:3292: checking for tgoto in -lmytinfo" >&5
3292 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
3293 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3294 echo $ac_n "(cached) $ac_c" 1>&6
3296 ac_save_LIBS="$LIBS"
3297 LIBS="-lmytinfo $LIBS"
3298 cat > conftest.$ac_ext <<EOF
3299 #line 3300 "configure"
3300 #include "confdefs.h"
3301 /* Override any gcc2 internal prototype to avoid an error. */
3302 /* We use char because int might match the return type of a gcc2
3303 builtin and then its argument prototype would still apply. */
3310 if { (eval echo configure:3311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3312 eval "ac_cv_lib_$ac_lib_var=yes"
3314 echo "configure: failed program was:" >&5
3315 cat conftest.$ac_ext >&5
3317 eval "ac_cv_lib_$ac_lib_var=no"
3320 LIBS="$ac_save_LIBS"
3323 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3324 echo "$ac_t""yes" 1>&6
3325 LIBS="-lmytinfo $LIBS"
3327 echo "$ac_t""no" 1>&6
3332 echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
3333 echo "configure:3334: checking for initscr in -lcur_colr" >&5
3334 ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
3335 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3336 echo $ac_n "(cached) $ac_c" 1>&6
3338 ac_save_LIBS="$LIBS"
3339 LIBS="-lcur_colr $LIBS"
3340 cat > conftest.$ac_ext <<EOF
3341 #line 3342 "configure"
3342 #include "confdefs.h"
3343 /* Override any gcc2 internal prototype to avoid an error. */
3344 /* We use char because int might match the return type of a gcc2
3345 builtin and then its argument prototype would still apply. */
3352 if { (eval echo configure:3353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3354 eval "ac_cv_lib_$ac_lib_var=yes"
3356 echo "configure: failed program was:" >&5
3357 cat conftest.$ac_ext >&5
3359 eval "ac_cv_lib_$ac_lib_var=no"
3362 LIBS="$ac_save_LIBS"
3365 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3366 echo "$ac_t""yes" 1>&6
3368 LIBS="-lcur_colr $LIBS"
3369 ac_cv_func_initscr=yes
3372 echo "$ac_t""no" 1>&6
3374 echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
3375 echo "configure:3376: checking for initscr in -lHcurses" >&5
3376 ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
3377 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3378 echo $ac_n "(cached) $ac_c" 1>&6
3380 ac_save_LIBS="$LIBS"
3381 LIBS="-lHcurses $LIBS"
3382 cat > conftest.$ac_ext <<EOF
3383 #line 3384 "configure"
3384 #include "confdefs.h"
3385 /* Override any gcc2 internal prototype to avoid an error. */
3386 /* We use char because int might match the return type of a gcc2
3387 builtin and then its argument prototype would still apply. */
3394 if { (eval echo configure:3395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3396 eval "ac_cv_lib_$ac_lib_var=yes"
3398 echo "configure: failed program was:" >&5
3399 cat conftest.$ac_ext >&5
3401 eval "ac_cv_lib_$ac_lib_var=no"
3404 LIBS="$ac_save_LIBS"
3407 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3408 echo "$ac_t""yes" 1>&6
3410 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
3411 LIBS="-lHcurses $LIBS"
3412 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
3413 ac_cv_func_initscr=yes
3416 echo "$ac_t""no" 1>&6
3422 linux*) # Suse Linux does not follow /usr/lib convention
3424 if test -n "/lib" ; then
3425 for cf_add_libdir in /lib
3427 if test $cf_add_libdir = /usr/lib ; then
3429 elif test -d $cf_add_libdir
3432 if test -n "$LDFLAGS$LIBS" ; then
3433 # a loop is needed to ensure we can add subdirs of existing dirs
3434 for cf_test_libdir in $LDFLAGS $LIBS ; do
3435 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3436 cf_have_libdir=yes; break
3440 if test "$cf_have_libdir" = no ; then
3441 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
3443 echo "${as_me-configure}:3444: testing adding $cf_add_libdir to library-path ..." 1>&5
3446 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3454 if test -d /usr/5lib ; then
3456 if test -n "/usr/5lib" ; then
3457 for cf_add_libdir in /usr/5lib
3459 if test $cf_add_libdir = /usr/lib ; then
3461 elif test -d $cf_add_libdir
3464 if test -n "$LDFLAGS$LIBS" ; then
3465 # a loop is needed to ensure we can add subdirs of existing dirs
3466 for cf_test_libdir in $LDFLAGS $LIBS ; do
3467 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3468 cf_have_libdir=yes; break
3472 if test "$cf_have_libdir" = no ; then
3473 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
3475 echo "${as_me-configure}:3476: testing adding $cf_add_libdir to library-path ..." 1>&5
3478 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3484 LIBS="$LIBS -lcurses -ltermcap"
3486 ac_cv_func_initscr=yes
3490 if test ".$ac_cv_func_initscr" != .yes ; then
3491 cf_save_LIBS="$LIBS"
3495 if test ".${cf_cv_ncurses_version-no}" != .no
3497 cf_check_list="ncurses curses cursesX"
3499 cf_check_list="cursesX curses ncurses"
3502 # Check for library containing tgoto. Do this before curses library
3503 # because it may be needed to link the test-case for initscr.
3504 echo $ac_n "checking for tgoto""... $ac_c" 1>&6
3505 echo "configure:3506: checking for tgoto" >&5
3506 if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
3507 echo $ac_n "(cached) $ac_c" 1>&6
3509 cat > conftest.$ac_ext <<EOF
3510 #line 3511 "configure"
3511 #include "confdefs.h"
3512 /* System header to define __stub macros and hopefully few prototypes,
3513 which can conflict with char tgoto(); below. */
3515 /* Override any gcc2 internal prototype to avoid an error. */
3516 /* We use char because int might match the return type of a gcc2
3517 builtin and then its argument prototype would still apply. */
3522 /* The GNU C library defines this for functions which it implements
3523 to always fail with ENOSYS. Some functions are actually named
3524 something starting with __ and the normal name is an alias. */
3525 #if defined (__stub_tgoto) || defined (__stub___tgoto)
3533 if { (eval echo configure:3534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3535 eval "ac_cv_func_tgoto=yes"
3537 echo "configure: failed program was:" >&5
3538 cat conftest.$ac_ext >&5
3540 eval "ac_cv_func_tgoto=no"
3545 if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then
3546 echo "$ac_t""yes" 1>&6
3547 cf_term_lib=predefined
3549 echo "$ac_t""no" 1>&6
3551 for cf_term_lib in $cf_check_list termcap termlib unknown
3553 echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
3554 echo "configure:3555: checking for tgoto in -l$cf_term_lib" >&5
3555 ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
3556 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3557 echo $ac_n "(cached) $ac_c" 1>&6
3559 ac_save_LIBS="$LIBS"
3560 LIBS="-l$cf_term_lib $LIBS"
3561 cat > conftest.$ac_ext <<EOF
3562 #line 3563 "configure"
3563 #include "confdefs.h"
3564 /* Override any gcc2 internal prototype to avoid an error. */
3565 /* We use char because int might match the return type of a gcc2
3566 builtin and then its argument prototype would still apply. */
3573 if { (eval echo configure:3574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3575 eval "ac_cv_lib_$ac_lib_var=yes"
3577 echo "configure: failed program was:" >&5
3578 cat conftest.$ac_ext >&5
3580 eval "ac_cv_lib_$ac_lib_var=no"
3583 LIBS="$ac_save_LIBS"
3586 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3587 echo "$ac_t""yes" 1>&6
3590 echo "$ac_t""no" 1>&6
3598 # Check for library containing initscr
3599 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
3600 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
3602 echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
3603 echo "configure:3604: checking for initscr in -l$cf_curs_lib" >&5
3604 ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
3605 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3606 echo $ac_n "(cached) $ac_c" 1>&6
3608 ac_save_LIBS="$LIBS"
3609 LIBS="-l$cf_curs_lib $LIBS"
3610 cat > conftest.$ac_ext <<EOF
3611 #line 3612 "configure"
3612 #include "confdefs.h"
3613 /* Override any gcc2 internal prototype to avoid an error. */
3614 /* We use char because int might match the return type of a gcc2
3615 builtin and then its argument prototype would still apply. */
3622 if { (eval echo configure:3623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3624 eval "ac_cv_lib_$ac_lib_var=yes"
3626 echo "configure: failed program was:" >&5
3627 cat conftest.$ac_ext >&5
3629 eval "ac_cv_lib_$ac_lib_var=no"
3632 LIBS="$ac_save_LIBS"
3635 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3636 echo "$ac_t""yes" 1>&6
3639 echo "$ac_t""no" 1>&6
3643 test $cf_curs_lib = unknown && { echo "configure: error: no curses library found" 1>&2; exit 1; }
3645 LIBS="-l$cf_curs_lib $cf_save_LIBS"
3646 if test "$cf_term_lib" = unknown ; then
3647 echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
3648 echo "configure:3649: checking if we can link with $cf_curs_lib library" >&5
3649 cat > conftest.$ac_ext <<EOF
3650 #line 3651 "configure"
3651 #include "confdefs.h"
3652 #include <${cf_cv_ncurses_header-curses.h}>
3657 if { (eval echo configure:3658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3661 echo "configure: failed program was:" >&5
3662 cat conftest.$ac_ext >&5
3667 echo "$ac_t""$cf_result" 1>&6
3668 test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; }
3669 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
3671 elif test "$cf_term_lib" != predefined ; then
3672 echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
3673 echo "configure:3674: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
3674 cat > conftest.$ac_ext <<EOF
3675 #line 3676 "configure"
3676 #include "confdefs.h"
3677 #include <${cf_cv_ncurses_header-curses.h}>
3679 initscr(); tgoto((char *)0, 0, 0);
3682 if { (eval echo configure:3683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3686 echo "configure: failed program was:" >&5
3687 cat conftest.$ac_ext >&5
3690 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
3691 cat > conftest.$ac_ext <<EOF
3692 #line 3693 "configure"
3693 #include "confdefs.h"
3694 #include <${cf_cv_ncurses_header-curses.h}>
3699 if { (eval echo configure:3700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3703 echo "configure: failed program was:" >&5
3704 cat conftest.$ac_ext >&5
3712 echo "$ac_t""$cf_result" 1>&6
3722 cf_ncuconfig_root=ncurses
3724 echo "Looking for ${cf_ncuconfig_root}-config"
3725 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
3727 # Extract the first word of "$ac_prog", so it can be a program name with args.
3728 set dummy $ac_prog; ac_word=$2
3729 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3730 echo "configure:3731: checking for $ac_word" >&5
3731 if eval "test \"`echo '$''{'ac_cv_path_NCURSES_CONFIG'+set}'`\" = set"; then
3732 echo $ac_n "(cached) $ac_c" 1>&6
3734 case "$NCURSES_CONFIG" in
3736 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
3739 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a dos path.
3742 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3744 for ac_dir in $ac_dummy; do
3745 test -z "$ac_dir" && ac_dir=.
3746 if test -f $ac_dir/$ac_word; then
3747 ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
3755 NCURSES_CONFIG="$ac_cv_path_NCURSES_CONFIG"
3756 if test -n "$NCURSES_CONFIG"; then
3757 echo "$ac_t""$NCURSES_CONFIG" 1>&6
3759 echo "$ac_t""no" 1>&6
3762 test -n "$NCURSES_CONFIG" && break
3764 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
3767 if test "$NCURSES_CONFIG" != none ; then
3769 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
3770 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
3772 # even with config script, some packages use no-override for curses.h
3774 echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
3775 echo "configure:3776: checking if we have identified curses headers" >&5
3776 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
3777 echo $ac_n "(cached) $ac_c" 1>&6
3780 cf_cv_ncurses_header=none
3787 cat > conftest.$ac_ext <<EOF
3788 #line 3789 "configure"
3789 #include "confdefs.h"
3790 #include <${cf_header}>
3792 initscr(); tgoto("?", 0,0)
3795 if { (eval echo configure:3796: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3797 cf_cv_ncurses_header=$cf_header; break
3799 echo "configure: failed program was:" >&5
3800 cat conftest.$ac_ext >&5
3807 echo "$ac_t""$cf_cv_ncurses_header" 1>&6
3809 if test "$cf_cv_ncurses_header" = none ; then
3810 { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
3813 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
3814 for ac_hdr in $cf_cv_ncurses_header
3816 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3817 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3818 echo "configure:3819: checking for $ac_hdr" >&5
3819 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3820 echo $ac_n "(cached) $ac_c" 1>&6
3822 cat > conftest.$ac_ext <<EOF
3823 #line 3824 "configure"
3824 #include "confdefs.h"
3827 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3828 { (eval echo configure:3829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3829 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3830 if test -z "$ac_err"; then
3832 eval "ac_cv_header_$ac_safe=yes"
3835 echo "configure: failed program was:" >&5
3836 cat conftest.$ac_ext >&5
3838 eval "ac_cv_header_$ac_safe=no"
3842 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3843 echo "$ac_t""yes" 1>&6
3844 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3845 cat >> confdefs.h <<EOF
3846 #define $ac_tr_hdr 1
3850 echo "$ac_t""no" 1>&6
3856 cat >> confdefs.h <<\EOF
3862 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3864 cat >> confdefs.h <<EOF
3865 #define $cf_nculib_ROOT 1
3869 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
3875 cf_ncuhdr_root=ncurses
3877 test -n "$cf_cv_curses_dir" && \
3878 test "$cf_cv_curses_dir" != "no" && { \
3880 if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
3881 for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
3883 while test $cf_add_incdir != /usr/include
3885 if test -d $cf_add_incdir
3888 if test -n "$CFLAGS$CPPFLAGS" ; then
3889 # a loop is needed to ensure we can add subdirs of existing dirs
3890 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3891 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3892 cf_have_incdir=yes; break
3897 if test "$cf_have_incdir" = no ; then
3898 if test "$cf_add_incdir" = /usr/local/include ; then
3899 if test "$GCC" = yes
3901 cf_save_CPPFLAGS=$CPPFLAGS
3902 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3903 cat > conftest.$ac_ext <<EOF
3904 #line 3905 "configure"
3905 #include "confdefs.h"
3911 if { (eval echo configure:3912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3914 echo "configure: failed program was:" >&5
3915 cat conftest.$ac_ext >&5
3920 CPPFLAGS=$cf_save_CPPFLAGS
3925 if test "$cf_have_incdir" = no ; then
3926 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3928 echo "${as_me-configure}:3929: testing adding $cf_add_incdir to include-path ..." 1>&5
3931 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3933 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3934 test "$cf_top_incdir" = "$cf_add_incdir" && break
3935 cf_add_incdir="$cf_top_incdir"
3946 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
3947 echo "configure:3948: checking for $cf_ncuhdr_root header in include-path" >&5
3948 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
3949 echo $ac_n "(cached) $ac_c" 1>&6
3952 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
3953 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
3954 for cf_header in $cf_header_list
3957 cat > conftest.$ac_ext <<EOF
3958 #line 3959 "configure"
3959 #include "confdefs.h"
3962 #include <$cf_header>
3965 #ifdef NCURSES_VERSION
3967 printf("%s\n", NCURSES_VERSION);
3979 if { (eval echo configure:3980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3981 cf_cv_ncurses_h=$cf_header
3984 echo "configure: failed program was:" >&5
3985 cat conftest.$ac_ext >&5
3991 test "$cf_cv_ncurses_h" != no && break
3996 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
4000 if test "$cf_cv_ncurses_h" != no ; then
4001 cf_cv_ncurses_header=$cf_cv_ncurses_h
4004 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
4005 echo "configure:4006: checking for $cf_ncuhdr_root include-path" >&5
4006 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
4007 echo $ac_n "(cached) $ac_c" 1>&6
4010 test -n "$verbose" && echo
4014 # collect the current set of include-directories from compiler flags
4015 cf_header_path_list=""
4016 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4017 for cf_header_path in $CPPFLAGS $CFLAGS
4019 case $cf_header_path in #(vi
4021 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4023 test "$cf_header_path" != "NONE" && \
4024 test -d "$cf_header_path" && \
4026 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
4027 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
4028 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
4029 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
4030 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
4031 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"
4034 cf_header_path_list="$cf_header_path_list $cf_search"
4040 # add the variations for the package we are looking for
4045 test "/usr" != "$prefix" && \
4047 (test $prefix = NONE || test -d $prefix) && {
4048 test -n "$verbose" && echo " ... testing for include-directories under /usr"
4049 test -d /usr/include && cf_search="$cf_search /usr/include"
4050 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
4051 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
4052 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
4053 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4057 test "$prefix" != "NONE" && \
4058 test -d "$prefix" && \
4060 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
4061 test -d $prefix/include && cf_search="$cf_search $prefix/include"
4062 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4063 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4064 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4065 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4069 test "/usr/local" != "$prefix" && \
4070 test -d "/usr/local" && \
4071 (test $prefix = NONE || test -d $prefix) && {
4072 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
4073 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
4074 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
4075 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
4076 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
4077 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4081 test "/opt" != "$prefix" && \
4083 (test $prefix = NONE || test -d $prefix) && {
4084 test -n "$verbose" && echo " ... testing for include-directories under /opt"
4085 test -d /opt/include && cf_search="$cf_search /opt/include"
4086 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
4087 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
4088 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
4089 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4093 test "$HOME" != "$prefix" && \
4094 test -d "$HOME" && \
4095 (test $prefix = NONE || test -d $prefix) && {
4096 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
4097 test -d $HOME/include && cf_search="$cf_search $HOME/include"
4098 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
4099 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
4100 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
4101 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4106 test "$includedir" != NONE && \
4107 test "$includedir" != "/usr/include" && \
4108 test -d "$includedir" && {
4109 test -d $includedir && cf_search="$cf_search $includedir"
4110 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4113 test "$oldincludedir" != NONE && \
4114 test "$oldincludedir" != "/usr/include" && \
4115 test -d "$oldincludedir" && {
4116 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
4117 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4120 cf_search="$cf_search $cf_header_path_list"
4122 test -n "$verbose" && echo search path $cf_search
4123 cf_save2_CPPFLAGS="$CPPFLAGS"
4124 for cf_incdir in $cf_search
4127 if test -n "$cf_incdir" ; then
4128 for cf_add_incdir in $cf_incdir
4130 while test $cf_add_incdir != /usr/include
4132 if test -d $cf_add_incdir
4135 if test -n "$CFLAGS$CPPFLAGS" ; then
4136 # a loop is needed to ensure we can add subdirs of existing dirs
4137 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4138 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4139 cf_have_incdir=yes; break
4144 if test "$cf_have_incdir" = no ; then
4145 if test "$cf_add_incdir" = /usr/local/include ; then
4146 if test "$GCC" = yes
4148 cf_save_CPPFLAGS=$CPPFLAGS
4149 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4150 cat > conftest.$ac_ext <<EOF
4151 #line 4152 "configure"
4152 #include "confdefs.h"
4158 if { (eval echo configure:4159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4161 echo "configure: failed program was:" >&5
4162 cat conftest.$ac_ext >&5
4167 CPPFLAGS=$cf_save_CPPFLAGS
4172 if test "$cf_have_incdir" = no ; then
4173 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4175 echo "${as_me-configure}:4176: testing adding $cf_add_incdir to include-path ..." 1>&5
4178 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4180 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4181 test "$cf_top_incdir" = "$cf_add_incdir" && break
4182 cf_add_incdir="$cf_top_incdir"
4196 cat > conftest.$ac_ext <<EOF
4197 #line 4198 "configure"
4198 #include "confdefs.h"
4201 #include <$cf_header>
4204 #ifdef NCURSES_VERSION
4206 printf("%s\n", NCURSES_VERSION);
4218 if { (eval echo configure:4219: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4220 cf_cv_ncurses_h2=$cf_header
4223 echo "configure: failed program was:" >&5
4224 cat conftest.$ac_ext >&5
4230 if test "$cf_cv_ncurses_h2" != no ; then
4231 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4232 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
4235 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
4237 CPPFLAGS="$cf_save2_CPPFLAGS"
4238 test "$cf_cv_ncurses_h2" != no && break
4240 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
4244 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
4246 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4247 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4248 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4249 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4252 if test -n "$cf_1st_incdir" ; then
4253 for cf_add_incdir in $cf_1st_incdir
4255 while test $cf_add_incdir != /usr/include
4257 if test -d $cf_add_incdir
4260 if test -n "$CFLAGS$CPPFLAGS" ; then
4261 # a loop is needed to ensure we can add subdirs of existing dirs
4262 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4263 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4264 cf_have_incdir=yes; break
4269 if test "$cf_have_incdir" = no ; then
4270 if test "$cf_add_incdir" = /usr/local/include ; then
4271 if test "$GCC" = yes
4273 cf_save_CPPFLAGS=$CPPFLAGS
4274 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4275 cat > conftest.$ac_ext <<EOF
4276 #line 4277 "configure"
4277 #include "confdefs.h"
4283 if { (eval echo configure:4284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4286 echo "configure: failed program was:" >&5
4287 cat conftest.$ac_ext >&5
4292 CPPFLAGS=$cf_save_CPPFLAGS
4297 if test "$cf_have_incdir" = no ; then
4298 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4300 echo "${as_me-configure}:4301: testing adding $cf_add_incdir to include-path ..." 1>&5
4303 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4305 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4306 test "$cf_top_incdir" = "$cf_add_incdir" && break
4307 cf_add_incdir="$cf_top_incdir"
4319 # Set definitions to allow ifdef'ing for ncurses.h
4321 case $cf_cv_ncurses_header in # (vi
4323 cat >> confdefs.h <<\EOF
4324 #define HAVE_NCURSES_H 1
4330 case $cf_cv_ncurses_header in # (vi
4331 ncurses/curses.h|ncurses/ncurses.h)
4332 cat >> confdefs.h <<\EOF
4333 #define HAVE_NCURSES_NCURSES_H 1
4337 ncursesw/curses.h|ncursesw/ncurses.h)
4338 cat >> confdefs.h <<\EOF
4339 #define HAVE_NCURSESW_NCURSES_H 1
4347 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
4348 echo "configure:4349: checking for terminfo header" >&5
4349 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
4350 echo $ac_n "(cached) $ac_c" 1>&6
4353 case ${cf_cv_ncurses_header} in #(vi
4354 */ncurses.h|*/ncursesw.h) #(vi
4355 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4358 cf_term_header=term.h
4362 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4364 cat > conftest.$ac_ext <<EOF
4365 #line 4366 "configure"
4366 #include "confdefs.h"
4368 #include <${cf_cv_ncurses_header-curses.h}>
4372 int x = auto_left_margin
4375 if { (eval echo configure:4376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4378 cf_cv_term_header="$cf_test"
4380 echo "configure: failed program was:" >&5
4381 cat conftest.$ac_ext >&5
4384 cf_cv_term_header=unknown
4388 test "$cf_cv_term_header" != unknown && break
4393 echo "$ac_t""$cf_cv_term_header" 1>&6
4395 # Set definitions to allow ifdef'ing to accommodate subdirectories
4397 case $cf_cv_term_header in # (vi
4399 cat >> confdefs.h <<\EOF
4400 #define HAVE_TERM_H 1
4406 case $cf_cv_term_header in # (vi
4407 ncurses/term.h) #(vi
4408 cat >> confdefs.h <<\EOF
4409 #define HAVE_NCURSES_TERM_H 1
4414 cat >> confdefs.h <<\EOF
4415 #define HAVE_NCURSESW_TERM_H 1
4422 # some applications need this, but should check for NCURSES_VERSION
4423 cat >> confdefs.h <<\EOF
4429 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
4430 echo "configure:4431: checking for ncurses version" >&5
4431 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
4432 echo $ac_n "(cached) $ac_c" 1>&6
4435 cf_cv_ncurses_version=no
4438 if test "$cross_compiling" = yes; then
4441 # This will not work if the preprocessor splits the line after the
4442 # Autoconf token. The 'unproto' program does that.
4443 cat > conftest.$ac_ext <<EOF
4444 #include <${cf_cv_ncurses_header-curses.h}>
4446 #ifdef NCURSES_VERSION
4447 Autoconf NCURSES_VERSION
4455 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4456 { (eval echo configure:4457: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
4457 if test -f conftest.out ; then
4458 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4459 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4464 cat > conftest.$ac_ext <<EOF
4465 #line 4466 "configure"
4466 #include "confdefs.h"
4468 #include <${cf_cv_ncurses_header-curses.h}>
4472 FILE *fp = fopen("$cf_tempfile", "w");
4473 #ifdef NCURSES_VERSION
4474 # ifdef NCURSES_VERSION_PATCH
4475 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4477 fprintf(fp, "%s\n", NCURSES_VERSION);
4481 fprintf(fp, "old\n");
4486 ${cf_cv_main_return-return}(0);
4489 if { (eval echo configure:4490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4492 cf_cv_ncurses_version=`cat $cf_tempfile`
4494 echo "configure: failed program was:" >&5
4495 cat conftest.$ac_ext >&5
4504 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
4505 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
4513 cf_nculib_root=ncurses
4514 # This works, except for the special case where we find gpm, but
4515 # ncurses is in a nonstandard location via $LIBS, and we really want
4518 cf_ncurses_SAVE="$LIBS"
4519 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
4520 echo "configure:4521: checking for Gpm_Open in -lgpm" >&5
4521 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
4522 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4523 echo $ac_n "(cached) $ac_c" 1>&6
4525 ac_save_LIBS="$LIBS"
4527 cat > conftest.$ac_ext <<EOF
4528 #line 4529 "configure"
4529 #include "confdefs.h"
4530 /* Override any gcc2 internal prototype to avoid an error. */
4531 /* We use char because int might match the return type of a gcc2
4532 builtin and then its argument prototype would still apply. */
4539 if { (eval echo configure:4540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4541 eval "ac_cv_lib_$ac_lib_var=yes"
4543 echo "configure: failed program was:" >&5
4544 cat conftest.$ac_ext >&5
4546 eval "ac_cv_lib_$ac_lib_var=no"
4549 LIBS="$ac_save_LIBS"
4552 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4553 echo "$ac_t""yes" 1>&6
4554 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
4555 echo "configure:4556: checking for initscr in -lgpm" >&5
4556 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
4557 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4558 echo $ac_n "(cached) $ac_c" 1>&6
4560 ac_save_LIBS="$LIBS"
4562 cat > conftest.$ac_ext <<EOF
4563 #line 4564 "configure"
4564 #include "confdefs.h"
4565 /* Override any gcc2 internal prototype to avoid an error. */
4566 /* We use char because int might match the return type of a gcc2
4567 builtin and then its argument prototype would still apply. */
4574 if { (eval echo configure:4575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4576 eval "ac_cv_lib_$ac_lib_var=yes"
4578 echo "configure: failed program was:" >&5
4579 cat conftest.$ac_ext >&5
4581 eval "ac_cv_lib_$ac_lib_var=no"
4584 LIBS="$ac_save_LIBS"
4587 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4588 echo "$ac_t""yes" 1>&6
4589 LIBS="$cf_ncurses_SAVE"
4591 echo "$ac_t""no" 1>&6
4592 cf_ncurses_LIBS="-lgpm"
4596 echo "$ac_t""no" 1>&6
4600 case $host_os in #(vi
4602 # This is only necessary if you are linking against an obsolete
4603 # version of ncurses (but it should do no harm, since it's static).
4604 if test "$cf_nculib_root" = ncurses ; then
4605 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
4606 echo "configure:4607: checking for tgoto in -lmytinfo" >&5
4607 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
4608 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4609 echo $ac_n "(cached) $ac_c" 1>&6
4611 ac_save_LIBS="$LIBS"
4612 LIBS="-lmytinfo $LIBS"
4613 cat > conftest.$ac_ext <<EOF
4614 #line 4615 "configure"
4615 #include "confdefs.h"
4616 /* Override any gcc2 internal prototype to avoid an error. */
4617 /* We use char because int might match the return type of a gcc2
4618 builtin and then its argument prototype would still apply. */
4625 if { (eval echo configure:4626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4627 eval "ac_cv_lib_$ac_lib_var=yes"
4629 echo "configure: failed program was:" >&5
4630 cat conftest.$ac_ext >&5
4632 eval "ac_cv_lib_$ac_lib_var=no"
4635 LIBS="$ac_save_LIBS"
4638 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4639 echo "$ac_t""yes" 1>&6
4640 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
4642 echo "$ac_t""no" 1>&6
4649 LIBS="$cf_ncurses_LIBS $LIBS"
4651 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4654 if test -n "$cf_cv_curses_dir/lib" ; then
4655 for cf_add_libdir in $cf_cv_curses_dir/lib
4657 if test $cf_add_libdir = /usr/lib ; then
4659 elif test -d $cf_add_libdir
4662 if test -n "$LDFLAGS$LIBS" ; then
4663 # a loop is needed to ensure we can add subdirs of existing dirs
4664 for cf_test_libdir in $LDFLAGS $LIBS ; do
4665 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4666 cf_have_libdir=yes; break
4670 if test "$cf_have_libdir" = no ; then
4671 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4673 echo "${as_me-configure}:4674: testing adding $cf_add_libdir to library-path ..." 1>&5
4676 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4682 LIBS="-l$cf_nculib_root $LIBS"
4685 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
4687 echo $ac_n "checking for initscr""... $ac_c" 1>&6
4688 echo "configure:4689: checking for initscr" >&5
4689 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
4690 echo $ac_n "(cached) $ac_c" 1>&6
4692 cat > conftest.$ac_ext <<EOF
4693 #line 4694 "configure"
4694 #include "confdefs.h"
4695 /* System header to define __stub macros and hopefully few prototypes,
4696 which can conflict with char initscr(); below. */
4698 /* Override any gcc2 internal prototype to avoid an error. */
4699 /* We use char because int might match the return type of a gcc2
4700 builtin and then its argument prototype would still apply. */
4705 /* The GNU C library defines this for functions which it implements
4706 to always fail with ENOSYS. Some functions are actually named
4707 something starting with __ and the normal name is an alias. */
4708 #if defined (__stub_initscr) || defined (__stub___initscr)
4716 if { (eval echo configure:4717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4718 eval "ac_cv_func_initscr=yes"
4720 echo "configure: failed program was:" >&5
4721 cat conftest.$ac_ext >&5
4723 eval "ac_cv_func_initscr=no"
4728 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
4729 echo "$ac_t""yes" 1>&6
4730 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4732 echo "$ac_t""no" 1>&6
4734 cf_save_LIBS="$LIBS"
4735 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
4736 echo "configure:4737: checking for initscr in -l$cf_nculib_root" >&5
4737 LIBS="-l$cf_nculib_root $LIBS"
4738 cat > conftest.$ac_ext <<EOF
4739 #line 4740 "configure"
4740 #include "confdefs.h"
4741 #include <${cf_cv_ncurses_header-curses.h}>
4746 if { (eval echo configure:4747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4748 echo "$ac_t""yes" 1>&6
4749 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4752 echo "configure: failed program was:" >&5
4753 cat conftest.$ac_ext >&5
4755 echo "$ac_t""no" 1>&6
4758 cf_library_path_list=""
4759 if test -n "${LDFLAGS}${LIBS}" ; then
4760 for cf_library_path in $LDFLAGS $LIBS
4762 case $cf_library_path in #(vi
4764 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
4766 test "$cf_library_path" != "NONE" && \
4767 test -d "$cf_library_path" && \
4769 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
4770 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
4771 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
4772 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
4773 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
4774 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"
4777 cf_library_path_list="$cf_library_path_list $cf_search"
4787 test "/usr" != "$prefix" && \
4789 (test $prefix = NONE || test -d $prefix) && {
4790 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
4791 test -d /usr/lib && cf_search="$cf_search /usr/lib"
4792 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
4793 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
4794 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
4795 test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
4799 test "$prefix" != "NONE" && \
4800 test -d "$prefix" && \
4802 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
4803 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
4804 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
4805 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
4806 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
4807 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
4811 test "/usr/local" != "$prefix" && \
4812 test -d "/usr/local" && \
4813 (test $prefix = NONE || test -d $prefix) && {
4814 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
4815 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
4816 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
4817 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
4818 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
4819 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
4823 test "/opt" != "$prefix" && \
4825 (test $prefix = NONE || test -d $prefix) && {
4826 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
4827 test -d /opt/lib && cf_search="$cf_search /opt/lib"
4828 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
4829 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
4830 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
4831 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
4835 test "$HOME" != "$prefix" && \
4836 test -d "$HOME" && \
4837 (test $prefix = NONE || test -d $prefix) && {
4838 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
4839 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
4840 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
4841 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
4842 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
4843 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
4848 cf_search="$cf_library_path_list $cf_search"
4850 for cf_libdir in $cf_search
4852 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
4853 echo "configure:4854: checking for -l$cf_nculib_root in $cf_libdir" >&5
4854 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
4855 cat > conftest.$ac_ext <<EOF
4856 #line 4857 "configure"
4857 #include "confdefs.h"
4858 #include <${cf_cv_ncurses_header-curses.h}>
4863 if { (eval echo configure:4864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4865 echo "$ac_t""yes" 1>&6
4866 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4869 echo "configure: failed program was:" >&5
4870 cat conftest.$ac_ext >&5
4872 echo "$ac_t""no" 1>&6
4873 LIBS="$cf_save_LIBS"
4883 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
4885 if test $cf_found_library = no ; then
4886 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
4892 if test -n "$cf_ncurses_LIBS" ; then
4893 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
4894 echo "configure:4895: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
4895 cf_ncurses_SAVE="$LIBS"
4896 for p in $cf_ncurses_LIBS ; do
4897 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
4898 if test "$q" != "$LIBS" ; then
4902 cat > conftest.$ac_ext <<EOF
4903 #line 4904 "configure"
4904 #include "confdefs.h"
4905 #include <${cf_cv_ncurses_header-curses.h}>
4907 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
4910 if { (eval echo configure:4911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4912 echo "$ac_t""yes" 1>&6
4914 echo "configure: failed program was:" >&5
4915 cat conftest.$ac_ext >&5
4917 echo "$ac_t""no" 1>&6
4918 LIBS="$cf_ncurses_SAVE"
4924 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4926 cat >> confdefs.h <<EOF
4927 #define $cf_nculib_ROOT 1
4938 echo $ac_n "checking for multibyte character support""... $ac_c" 1>&6
4939 echo "configure:4940: checking for multibyte character support" >&5
4940 if eval "test \"`echo '$''{'cf_cv_utf8_lib'+set}'`\" = set"; then
4941 echo $ac_n "(cached) $ac_c" 1>&6
4944 cf_save_LIBS="$LIBS"
4945 cat > conftest.$ac_ext <<EOF
4946 #line 4947 "configure"
4947 #include "confdefs.h"
4954 if { (eval echo configure:4955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4958 echo "configure: failed program was:" >&5
4959 cat conftest.$ac_ext >&5
4963 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
4964 # will be set on completion of the AC_TRY_LINK below.
4965 cf_cv_header_path_utf8=
4966 cf_cv_library_path_utf8=
4969 echo "${as_me-configure}:4970: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
4972 cf_save_LIBS="$LIBS"
4974 cat > conftest.$ac_ext <<EOF
4975 #line 4976 "configure"
4976 #include "confdefs.h"
4978 #include <libutf8.h>
4983 if { (eval echo configure:4984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4986 cf_cv_find_linkage_utf8=yes
4987 cf_cv_header_path_utf8=/usr/include
4988 cf_cv_library_path_utf8=/usr/lib
4991 echo "configure: failed program was:" >&5
4992 cat conftest.$ac_ext >&5
4996 LIBS="-lutf8 $cf_save_LIBS"
4998 cat > conftest.$ac_ext <<EOF
4999 #line 5000 "configure"
5000 #include "confdefs.h"
5002 #include <libutf8.h>
5007 if { (eval echo configure:5008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5010 cf_cv_find_linkage_utf8=yes
5011 cf_cv_header_path_utf8=/usr/include
5012 cf_cv_library_path_utf8=/usr/lib
5013 cf_cv_library_file_utf8="-lutf8"
5016 echo "configure: failed program was:" >&5
5017 cat conftest.$ac_ext >&5
5020 cf_cv_find_linkage_utf8=no
5021 LIBS="$cf_save_LIBS"
5023 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
5025 echo "${as_me-configure}:5026: testing find linkage for utf8 library ..." 1>&5
5029 echo "${as_me-configure}:5030: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
5032 cf_save_CPPFLAGS="$CPPFLAGS"
5033 cf_test_CPPFLAGS="$CPPFLAGS"
5038 # collect the current set of include-directories from compiler flags
5039 cf_header_path_list=""
5040 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5041 for cf_header_path in $CPPFLAGS $CFLAGS
5043 case $cf_header_path in #(vi
5045 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5047 test "$cf_header_path" != "NONE" && \
5048 test -d "$cf_header_path" && \
5050 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5051 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5052 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
5053 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
5054 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
5055 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
5058 cf_header_path_list="$cf_header_path_list $cf_search"
5064 # add the variations for the package we are looking for
5069 test "/usr" != "$prefix" && \
5071 (test $prefix = NONE || test -d $prefix) && {
5072 test -n "$verbose" && echo " ... testing for include-directories under /usr"
5073 test -d /usr/include && cf_search="$cf_search /usr/include"
5074 test -d /usr/include/utf8 && cf_search="$cf_search /usr/include/utf8"
5075 test -d /usr/include/utf8/include && cf_search="$cf_search /usr/include/utf8/include"
5076 test -d /usr/utf8/include && cf_search="$cf_search /usr/utf8/include"
5077 test -d /usr/utf8/include/utf8 && cf_search="$cf_search /usr/utf8/include/utf8"
5081 test "$prefix" != "NONE" && \
5082 test -d "$prefix" && \
5084 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5085 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5086 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
5087 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
5088 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
5089 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
5093 test "/usr/local" != "$prefix" && \
5094 test -d "/usr/local" && \
5095 (test $prefix = NONE || test -d $prefix) && {
5096 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
5097 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
5098 test -d /usr/local/include/utf8 && cf_search="$cf_search /usr/local/include/utf8"
5099 test -d /usr/local/include/utf8/include && cf_search="$cf_search /usr/local/include/utf8/include"
5100 test -d /usr/local/utf8/include && cf_search="$cf_search /usr/local/utf8/include"
5101 test -d /usr/local/utf8/include/utf8 && cf_search="$cf_search /usr/local/utf8/include/utf8"
5105 test "/opt" != "$prefix" && \
5107 (test $prefix = NONE || test -d $prefix) && {
5108 test -n "$verbose" && echo " ... testing for include-directories under /opt"
5109 test -d /opt/include && cf_search="$cf_search /opt/include"
5110 test -d /opt/include/utf8 && cf_search="$cf_search /opt/include/utf8"
5111 test -d /opt/include/utf8/include && cf_search="$cf_search /opt/include/utf8/include"
5112 test -d /opt/utf8/include && cf_search="$cf_search /opt/utf8/include"
5113 test -d /opt/utf8/include/utf8 && cf_search="$cf_search /opt/utf8/include/utf8"
5117 test "$HOME" != "$prefix" && \
5118 test -d "$HOME" && \
5119 (test $prefix = NONE || test -d $prefix) && {
5120 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
5121 test -d $HOME/include && cf_search="$cf_search $HOME/include"
5122 test -d $HOME/include/utf8 && cf_search="$cf_search $HOME/include/utf8"
5123 test -d $HOME/include/utf8/include && cf_search="$cf_search $HOME/include/utf8/include"
5124 test -d $HOME/utf8/include && cf_search="$cf_search $HOME/utf8/include"
5125 test -d $HOME/utf8/include/utf8 && cf_search="$cf_search $HOME/utf8/include/utf8"
5130 test "$includedir" != NONE && \
5131 test "$includedir" != "/usr/include" && \
5132 test -d "$includedir" && {
5133 test -d $includedir && cf_search="$cf_search $includedir"
5134 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
5137 test "$oldincludedir" != NONE && \
5138 test "$oldincludedir" != "/usr/include" && \
5139 test -d "$oldincludedir" && {
5140 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5141 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
5144 cf_search="$cf_search $cf_header_path_list"
5146 for cf_cv_header_path_utf8 in $cf_search
5148 if test -d $cf_cv_header_path_utf8 ; then
5149 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
5151 echo "${as_me-configure}:5152: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
5154 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
5155 cat > conftest.$ac_ext <<EOF
5156 #line 5157 "configure"
5157 #include "confdefs.h"
5159 #include <libutf8.h>
5164 if { (eval echo configure:5165: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5167 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
5169 echo "${as_me-configure}:5170: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
5172 cf_cv_find_linkage_utf8=maybe
5173 cf_test_CPPFLAGS="$CPPFLAGS"
5176 echo "configure: failed program was:" >&5
5177 cat conftest.$ac_ext >&5
5180 CPPFLAGS="$cf_save_CPPFLAGS"
5187 if test "$cf_cv_find_linkage_utf8" = maybe ; then
5190 echo "${as_me-configure}:5191: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
5193 cf_save_LIBS="$LIBS"
5194 cf_save_LDFLAGS="$LDFLAGS"
5198 if test "$cf_cv_find_linkage_utf8" != yes ; then
5201 cf_library_path_list=""
5202 if test -n "${LDFLAGS}${LIBS}" ; then
5203 for cf_library_path in $LDFLAGS $LIBS
5205 case $cf_library_path in #(vi
5207 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5209 test "$cf_library_path" != "NONE" && \
5210 test -d "$cf_library_path" && \
5212 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5213 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5214 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
5215 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
5216 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
5217 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
5220 cf_library_path_list="$cf_library_path_list $cf_search"
5230 test "/usr" != "$prefix" && \
5232 (test $prefix = NONE || test -d $prefix) && {
5233 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
5234 test -d /usr/lib && cf_search="$cf_search /usr/lib"
5235 test -d /usr/lib/utf8 && cf_search="$cf_search /usr/lib/utf8"
5236 test -d /usr/lib/utf8/lib && cf_search="$cf_search /usr/lib/utf8/lib"
5237 test -d /usr/utf8/lib && cf_search="$cf_search /usr/utf8/lib"
5238 test -d /usr/utf8/lib/utf8 && cf_search="$cf_search /usr/utf8/lib/utf8"
5242 test "$prefix" != "NONE" && \
5243 test -d "$prefix" && \
5245 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5246 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5247 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
5248 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
5249 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
5250 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
5254 test "/usr/local" != "$prefix" && \
5255 test -d "/usr/local" && \
5256 (test $prefix = NONE || test -d $prefix) && {
5257 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
5258 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
5259 test -d /usr/local/lib/utf8 && cf_search="$cf_search /usr/local/lib/utf8"
5260 test -d /usr/local/lib/utf8/lib && cf_search="$cf_search /usr/local/lib/utf8/lib"
5261 test -d /usr/local/utf8/lib && cf_search="$cf_search /usr/local/utf8/lib"
5262 test -d /usr/local/utf8/lib/utf8 && cf_search="$cf_search /usr/local/utf8/lib/utf8"
5266 test "/opt" != "$prefix" && \
5268 (test $prefix = NONE || test -d $prefix) && {
5269 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
5270 test -d /opt/lib && cf_search="$cf_search /opt/lib"
5271 test -d /opt/lib/utf8 && cf_search="$cf_search /opt/lib/utf8"
5272 test -d /opt/lib/utf8/lib && cf_search="$cf_search /opt/lib/utf8/lib"
5273 test -d /opt/utf8/lib && cf_search="$cf_search /opt/utf8/lib"
5274 test -d /opt/utf8/lib/utf8 && cf_search="$cf_search /opt/utf8/lib/utf8"
5278 test "$HOME" != "$prefix" && \
5279 test -d "$HOME" && \
5280 (test $prefix = NONE || test -d $prefix) && {
5281 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
5282 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
5283 test -d $HOME/lib/utf8 && cf_search="$cf_search $HOME/lib/utf8"
5284 test -d $HOME/lib/utf8/lib && cf_search="$cf_search $HOME/lib/utf8/lib"
5285 test -d $HOME/utf8/lib && cf_search="$cf_search $HOME/utf8/lib"
5286 test -d $HOME/utf8/lib/utf8 && cf_search="$cf_search $HOME/utf8/lib/utf8"
5291 cf_search="$cf_library_path_list $cf_search"
5293 for cf_cv_library_path_utf8 in $cf_search
5295 if test -d $cf_cv_library_path_utf8 ; then
5296 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
5298 echo "${as_me-configure}:5299: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
5301 CPPFLAGS="$cf_test_CPPFLAGS"
5302 LIBS="-lutf8 $cf_save_LIBS"
5303 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
5304 cat > conftest.$ac_ext <<EOF
5305 #line 5306 "configure"
5306 #include "confdefs.h"
5308 #include <libutf8.h>
5313 if { (eval echo configure:5314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5316 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
5318 echo "${as_me-configure}:5319: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
5321 cf_cv_find_linkage_utf8=yes
5322 cf_cv_library_file_utf8="-lutf8"
5325 echo "configure: failed program was:" >&5
5326 cat conftest.$ac_ext >&5
5329 CPPFLAGS="$cf_save_CPPFLAGS"
5330 LIBS="$cf_save_LIBS"
5331 LDFLAGS="$cf_save_LDFLAGS"
5337 CPPFLAGS="$cf_save_CPPFLAGS"
5338 LDFLAGS="$cf_save_LDFLAGS"
5342 cf_cv_find_linkage_utf8=no
5351 LIBS="$cf_save_LIBS"
5353 if test "$cf_cv_find_linkage_utf8" = yes ; then
5354 cf_cv_utf8_lib=add-on
5364 echo "$ac_t""$cf_cv_utf8_lib" 1>&6
5366 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
5368 if test "$cf_cv_utf8_lib" = "add-on" ; then
5369 cat >> confdefs.h <<\EOF
5370 #define HAVE_LIBUTF8_H 1
5374 if test -n "$cf_cv_header_path_utf8" ; then
5375 for cf_add_incdir in $cf_cv_header_path_utf8
5377 while test $cf_add_incdir != /usr/include
5379 if test -d $cf_add_incdir
5382 if test -n "$CFLAGS$CPPFLAGS" ; then
5383 # a loop is needed to ensure we can add subdirs of existing dirs
5384 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5385 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5386 cf_have_incdir=yes; break
5391 if test "$cf_have_incdir" = no ; then
5392 if test "$cf_add_incdir" = /usr/local/include ; then
5393 if test "$GCC" = yes
5395 cf_save_CPPFLAGS=$CPPFLAGS
5396 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5397 cat > conftest.$ac_ext <<EOF
5398 #line 5399 "configure"
5399 #include "confdefs.h"
5405 if { (eval echo configure:5406: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5408 echo "configure: failed program was:" >&5
5409 cat conftest.$ac_ext >&5
5414 CPPFLAGS=$cf_save_CPPFLAGS
5419 if test "$cf_have_incdir" = no ; then
5420 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5422 echo "${as_me-configure}:5423: testing adding $cf_add_incdir to include-path ..." 1>&5
5425 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5427 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5428 test "$cf_top_incdir" = "$cf_add_incdir" && break
5429 cf_add_incdir="$cf_top_incdir"
5439 if test -n "$cf_cv_library_path_utf8" ; then
5440 for cf_add_libdir in $cf_cv_library_path_utf8
5442 if test $cf_add_libdir = /usr/lib ; then
5444 elif test -d $cf_add_libdir
5447 if test -n "$LDFLAGS$LIBS" ; then
5448 # a loop is needed to ensure we can add subdirs of existing dirs
5449 for cf_test_libdir in $LDFLAGS $LIBS ; do
5450 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5451 cf_have_libdir=yes; break
5455 if test "$cf_have_libdir" = no ; then
5456 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5458 echo "${as_me-configure}:5459: testing adding $cf_add_libdir to library-path ..." 1>&5
5461 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5467 LIBS="$cf_cv_library_file_utf8 $LIBS"
5471 cf_ncuconfig_root=ncursesw
5473 echo "Looking for ${cf_ncuconfig_root}-config"
5474 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5476 # Extract the first word of "$ac_prog", so it can be a program name with args.
5477 set dummy $ac_prog; ac_word=$2
5478 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5479 echo "configure:5480: checking for $ac_word" >&5
5480 if eval "test \"`echo '$''{'ac_cv_path_NCURSES_CONFIG'+set}'`\" = set"; then
5481 echo $ac_n "(cached) $ac_c" 1>&6
5483 case "$NCURSES_CONFIG" in
5485 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
5488 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a dos path.
5491 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5493 for ac_dir in $ac_dummy; do
5494 test -z "$ac_dir" && ac_dir=.
5495 if test -f $ac_dir/$ac_word; then
5496 ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
5504 NCURSES_CONFIG="$ac_cv_path_NCURSES_CONFIG"
5505 if test -n "$NCURSES_CONFIG"; then
5506 echo "$ac_t""$NCURSES_CONFIG" 1>&6
5508 echo "$ac_t""no" 1>&6
5511 test -n "$NCURSES_CONFIG" && break
5513 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
5516 if test "$NCURSES_CONFIG" != none ; then
5518 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5519 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
5521 # even with config script, some packages use no-override for curses.h
5523 echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
5524 echo "configure:5525: checking if we have identified curses headers" >&5
5525 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
5526 echo $ac_n "(cached) $ac_c" 1>&6
5529 cf_cv_ncurses_header=none
5532 ncursesw/ncurses.h \
5536 cat > conftest.$ac_ext <<EOF
5537 #line 5538 "configure"
5538 #include "confdefs.h"
5539 #include <${cf_header}>
5541 initscr(); tgoto("?", 0,0)
5544 if { (eval echo configure:5545: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5546 cf_cv_ncurses_header=$cf_header; break
5548 echo "configure: failed program was:" >&5
5549 cat conftest.$ac_ext >&5
5556 echo "$ac_t""$cf_cv_ncurses_header" 1>&6
5558 if test "$cf_cv_ncurses_header" = none ; then
5559 { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
5562 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5563 for ac_hdr in $cf_cv_ncurses_header
5565 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5566 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5567 echo "configure:5568: checking for $ac_hdr" >&5
5568 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5569 echo $ac_n "(cached) $ac_c" 1>&6
5571 cat > conftest.$ac_ext <<EOF
5572 #line 5573 "configure"
5573 #include "confdefs.h"
5576 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5577 { (eval echo configure:5578: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5578 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5579 if test -z "$ac_err"; then
5581 eval "ac_cv_header_$ac_safe=yes"
5584 echo "configure: failed program was:" >&5
5585 cat conftest.$ac_ext >&5
5587 eval "ac_cv_header_$ac_safe=no"
5591 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5592 echo "$ac_t""yes" 1>&6
5593 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5594 cat >> confdefs.h <<EOF
5595 #define $ac_tr_hdr 1
5599 echo "$ac_t""no" 1>&6
5605 cat >> confdefs.h <<\EOF
5611 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5613 cat >> confdefs.h <<EOF
5614 #define $cf_nculib_ROOT 1
5618 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
5624 cf_ncuhdr_root=ncursesw
5626 test -n "$cf_cv_curses_dir" && \
5627 test "$cf_cv_curses_dir" != "no" && { \
5629 if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5630 for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
5632 while test $cf_add_incdir != /usr/include
5634 if test -d $cf_add_incdir
5637 if test -n "$CFLAGS$CPPFLAGS" ; then
5638 # a loop is needed to ensure we can add subdirs of existing dirs
5639 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5640 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5641 cf_have_incdir=yes; break
5646 if test "$cf_have_incdir" = no ; then
5647 if test "$cf_add_incdir" = /usr/local/include ; then
5648 if test "$GCC" = yes
5650 cf_save_CPPFLAGS=$CPPFLAGS
5651 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5652 cat > conftest.$ac_ext <<EOF
5653 #line 5654 "configure"
5654 #include "confdefs.h"
5660 if { (eval echo configure:5661: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5663 echo "configure: failed program was:" >&5
5664 cat conftest.$ac_ext >&5
5669 CPPFLAGS=$cf_save_CPPFLAGS
5674 if test "$cf_have_incdir" = no ; then
5675 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5677 echo "${as_me-configure}:5678: testing adding $cf_add_incdir to include-path ..." 1>&5
5680 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5682 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5683 test "$cf_top_incdir" = "$cf_add_incdir" && break
5684 cf_add_incdir="$cf_top_incdir"
5695 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
5696 echo "configure:5697: checking for $cf_ncuhdr_root header in include-path" >&5
5697 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
5698 echo $ac_n "(cached) $ac_c" 1>&6
5701 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5702 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
5703 for cf_header in $cf_header_list
5706 cat > conftest.$ac_ext <<EOF
5707 #line 5708 "configure"
5708 #include "confdefs.h"
5711 #define _XOPEN_SOURCE_EXTENDED
5712 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
5713 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
5715 #include <$cf_header>
5718 #ifdef NCURSES_VERSION
5724 printf("%s\n", NCURSES_VERSION);
5736 if { (eval echo configure:5737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5738 cf_cv_ncurses_h=$cf_header
5741 echo "configure: failed program was:" >&5
5742 cat conftest.$ac_ext >&5
5748 test "$cf_cv_ncurses_h" != no && break
5753 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
5757 if test "$cf_cv_ncurses_h" != no ; then
5758 cf_cv_ncurses_header=$cf_cv_ncurses_h
5761 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
5762 echo "configure:5763: checking for $cf_ncuhdr_root include-path" >&5
5763 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
5764 echo $ac_n "(cached) $ac_c" 1>&6
5767 test -n "$verbose" && echo
5771 # collect the current set of include-directories from compiler flags
5772 cf_header_path_list=""
5773 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5774 for cf_header_path in $CPPFLAGS $CFLAGS
5776 case $cf_header_path in #(vi
5778 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5780 test "$cf_header_path" != "NONE" && \
5781 test -d "$cf_header_path" && \
5783 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5784 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5785 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5786 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5787 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5788 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"
5791 cf_header_path_list="$cf_header_path_list $cf_search"
5797 # add the variations for the package we are looking for
5802 test "/usr" != "$prefix" && \
5804 (test $prefix = NONE || test -d $prefix) && {
5805 test -n "$verbose" && echo " ... testing for include-directories under /usr"
5806 test -d /usr/include && cf_search="$cf_search /usr/include"
5807 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
5808 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
5809 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
5810 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5814 test "$prefix" != "NONE" && \
5815 test -d "$prefix" && \
5817 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5818 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5819 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5820 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5821 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5822 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5826 test "/usr/local" != "$prefix" && \
5827 test -d "/usr/local" && \
5828 (test $prefix = NONE || test -d $prefix) && {
5829 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
5830 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
5831 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
5832 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
5833 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
5834 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5838 test "/opt" != "$prefix" && \
5840 (test $prefix = NONE || test -d $prefix) && {
5841 test -n "$verbose" && echo " ... testing for include-directories under /opt"
5842 test -d /opt/include && cf_search="$cf_search /opt/include"
5843 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
5844 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
5845 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
5846 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5850 test "$HOME" != "$prefix" && \
5851 test -d "$HOME" && \
5852 (test $prefix = NONE || test -d $prefix) && {
5853 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
5854 test -d $HOME/include && cf_search="$cf_search $HOME/include"
5855 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
5856 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
5857 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
5858 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5863 test "$includedir" != NONE && \
5864 test "$includedir" != "/usr/include" && \
5865 test -d "$includedir" && {
5866 test -d $includedir && cf_search="$cf_search $includedir"
5867 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5870 test "$oldincludedir" != NONE && \
5871 test "$oldincludedir" != "/usr/include" && \
5872 test -d "$oldincludedir" && {
5873 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5874 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5877 cf_search="$cf_search $cf_header_path_list"
5879 test -n "$verbose" && echo search path $cf_search
5880 cf_save2_CPPFLAGS="$CPPFLAGS"
5881 for cf_incdir in $cf_search
5884 if test -n "$cf_incdir" ; then
5885 for cf_add_incdir in $cf_incdir
5887 while test $cf_add_incdir != /usr/include
5889 if test -d $cf_add_incdir
5892 if test -n "$CFLAGS$CPPFLAGS" ; then
5893 # a loop is needed to ensure we can add subdirs of existing dirs
5894 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5895 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5896 cf_have_incdir=yes; break
5901 if test "$cf_have_incdir" = no ; then
5902 if test "$cf_add_incdir" = /usr/local/include ; then
5903 if test "$GCC" = yes
5905 cf_save_CPPFLAGS=$CPPFLAGS
5906 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5907 cat > conftest.$ac_ext <<EOF
5908 #line 5909 "configure"
5909 #include "confdefs.h"
5915 if { (eval echo configure:5916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5918 echo "configure: failed program was:" >&5
5919 cat conftest.$ac_ext >&5
5924 CPPFLAGS=$cf_save_CPPFLAGS
5929 if test "$cf_have_incdir" = no ; then
5930 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5932 echo "${as_me-configure}:5933: testing adding $cf_add_incdir to include-path ..." 1>&5
5935 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5937 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5938 test "$cf_top_incdir" = "$cf_add_incdir" && break
5939 cf_add_incdir="$cf_top_incdir"
5953 cat > conftest.$ac_ext <<EOF
5954 #line 5955 "configure"
5955 #include "confdefs.h"
5958 #include <$cf_header>
5961 #ifdef NCURSES_VERSION
5963 printf("%s\n", NCURSES_VERSION);
5975 if { (eval echo configure:5976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5977 cf_cv_ncurses_h2=$cf_header
5980 echo "configure: failed program was:" >&5
5981 cat conftest.$ac_ext >&5
5987 if test "$cf_cv_ncurses_h2" != no ; then
5988 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5989 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
5992 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5994 CPPFLAGS="$cf_save2_CPPFLAGS"
5995 test "$cf_cv_ncurses_h2" != no && break
5997 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
6001 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
6003 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6004 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6005 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6006 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6009 if test -n "$cf_1st_incdir" ; then
6010 for cf_add_incdir in $cf_1st_incdir
6012 while test $cf_add_incdir != /usr/include
6014 if test -d $cf_add_incdir
6017 if test -n "$CFLAGS$CPPFLAGS" ; then
6018 # a loop is needed to ensure we can add subdirs of existing dirs
6019 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6020 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6021 cf_have_incdir=yes; break
6026 if test "$cf_have_incdir" = no ; then
6027 if test "$cf_add_incdir" = /usr/local/include ; then
6028 if test "$GCC" = yes
6030 cf_save_CPPFLAGS=$CPPFLAGS
6031 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6032 cat > conftest.$ac_ext <<EOF
6033 #line 6034 "configure"
6034 #include "confdefs.h"
6040 if { (eval echo configure:6041: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6043 echo "configure: failed program was:" >&5
6044 cat conftest.$ac_ext >&5
6049 CPPFLAGS=$cf_save_CPPFLAGS
6054 if test "$cf_have_incdir" = no ; then
6055 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6057 echo "${as_me-configure}:6058: testing adding $cf_add_incdir to include-path ..." 1>&5
6060 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6062 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6063 test "$cf_top_incdir" = "$cf_add_incdir" && break
6064 cf_add_incdir="$cf_top_incdir"
6076 # Set definitions to allow ifdef'ing for ncurses.h
6078 case $cf_cv_ncurses_header in # (vi
6080 cat >> confdefs.h <<\EOF
6081 #define HAVE_NCURSES_H 1
6087 case $cf_cv_ncurses_header in # (vi
6088 ncurses/curses.h|ncurses/ncurses.h)
6089 cat >> confdefs.h <<\EOF
6090 #define HAVE_NCURSES_NCURSES_H 1
6094 ncursesw/curses.h|ncursesw/ncurses.h)
6095 cat >> confdefs.h <<\EOF
6096 #define HAVE_NCURSESW_NCURSES_H 1
6104 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
6105 echo "configure:6106: checking for terminfo header" >&5
6106 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
6107 echo $ac_n "(cached) $ac_c" 1>&6
6110 case ${cf_cv_ncurses_header} in #(vi
6111 */ncurses.h|*/ncursesw.h) #(vi
6112 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6115 cf_term_header=term.h
6119 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6121 cat > conftest.$ac_ext <<EOF
6122 #line 6123 "configure"
6123 #include "confdefs.h"
6125 #include <${cf_cv_ncurses_header-curses.h}>
6129 int x = auto_left_margin
6132 if { (eval echo configure:6133: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6135 cf_cv_term_header="$cf_test"
6137 echo "configure: failed program was:" >&5
6138 cat conftest.$ac_ext >&5
6141 cf_cv_term_header=unknown
6145 test "$cf_cv_term_header" != unknown && break
6150 echo "$ac_t""$cf_cv_term_header" 1>&6
6152 # Set definitions to allow ifdef'ing to accommodate subdirectories
6154 case $cf_cv_term_header in # (vi
6156 cat >> confdefs.h <<\EOF
6157 #define HAVE_TERM_H 1
6163 case $cf_cv_term_header in # (vi
6164 ncurses/term.h) #(vi
6165 cat >> confdefs.h <<\EOF
6166 #define HAVE_NCURSES_TERM_H 1
6171 cat >> confdefs.h <<\EOF
6172 #define HAVE_NCURSESW_TERM_H 1
6179 # some applications need this, but should check for NCURSES_VERSION
6180 cat >> confdefs.h <<\EOF
6186 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
6187 echo "configure:6188: checking for ncurses version" >&5
6188 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
6189 echo $ac_n "(cached) $ac_c" 1>&6
6192 cf_cv_ncurses_version=no
6195 if test "$cross_compiling" = yes; then
6198 # This will not work if the preprocessor splits the line after the
6199 # Autoconf token. The 'unproto' program does that.
6200 cat > conftest.$ac_ext <<EOF
6201 #include <${cf_cv_ncurses_header-curses.h}>
6203 #ifdef NCURSES_VERSION
6204 Autoconf NCURSES_VERSION
6212 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
6213 { (eval echo configure:6214: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
6214 if test -f conftest.out ; then
6215 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
6216 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
6221 cat > conftest.$ac_ext <<EOF
6222 #line 6223 "configure"
6223 #include "confdefs.h"
6225 #include <${cf_cv_ncurses_header-curses.h}>
6229 FILE *fp = fopen("$cf_tempfile", "w");
6230 #ifdef NCURSES_VERSION
6231 # ifdef NCURSES_VERSION_PATCH
6232 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6234 fprintf(fp, "%s\n", NCURSES_VERSION);
6238 fprintf(fp, "old\n");
6243 ${cf_cv_main_return-return}(0);
6246 if { (eval echo configure:6247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6249 cf_cv_ncurses_version=`cat $cf_tempfile`
6251 echo "configure: failed program was:" >&5
6252 cat conftest.$ac_ext >&5
6261 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
6262 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
6270 cf_nculib_root=ncursesw
6271 # This works, except for the special case where we find gpm, but
6272 # ncurses is in a nonstandard location via $LIBS, and we really want
6275 cf_ncurses_SAVE="$LIBS"
6276 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
6277 echo "configure:6278: checking for Gpm_Open in -lgpm" >&5
6278 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
6279 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6280 echo $ac_n "(cached) $ac_c" 1>&6
6282 ac_save_LIBS="$LIBS"
6284 cat > conftest.$ac_ext <<EOF
6285 #line 6286 "configure"
6286 #include "confdefs.h"
6287 /* Override any gcc2 internal prototype to avoid an error. */
6288 /* We use char because int might match the return type of a gcc2
6289 builtin and then its argument prototype would still apply. */
6296 if { (eval echo configure:6297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6298 eval "ac_cv_lib_$ac_lib_var=yes"
6300 echo "configure: failed program was:" >&5
6301 cat conftest.$ac_ext >&5
6303 eval "ac_cv_lib_$ac_lib_var=no"
6306 LIBS="$ac_save_LIBS"
6309 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6310 echo "$ac_t""yes" 1>&6
6311 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
6312 echo "configure:6313: checking for initscr in -lgpm" >&5
6313 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
6314 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6315 echo $ac_n "(cached) $ac_c" 1>&6
6317 ac_save_LIBS="$LIBS"
6319 cat > conftest.$ac_ext <<EOF
6320 #line 6321 "configure"
6321 #include "confdefs.h"
6322 /* Override any gcc2 internal prototype to avoid an error. */
6323 /* We use char because int might match the return type of a gcc2
6324 builtin and then its argument prototype would still apply. */
6331 if { (eval echo configure:6332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6333 eval "ac_cv_lib_$ac_lib_var=yes"
6335 echo "configure: failed program was:" >&5
6336 cat conftest.$ac_ext >&5
6338 eval "ac_cv_lib_$ac_lib_var=no"
6341 LIBS="$ac_save_LIBS"
6344 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6345 echo "$ac_t""yes" 1>&6
6346 LIBS="$cf_ncurses_SAVE"
6348 echo "$ac_t""no" 1>&6
6349 cf_ncurses_LIBS="-lgpm"
6353 echo "$ac_t""no" 1>&6
6357 case $host_os in #(vi
6359 # This is only necessary if you are linking against an obsolete
6360 # version of ncurses (but it should do no harm, since it's static).
6361 if test "$cf_nculib_root" = ncurses ; then
6362 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
6363 echo "configure:6364: checking for tgoto in -lmytinfo" >&5
6364 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
6365 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6366 echo $ac_n "(cached) $ac_c" 1>&6
6368 ac_save_LIBS="$LIBS"
6369 LIBS="-lmytinfo $LIBS"
6370 cat > conftest.$ac_ext <<EOF
6371 #line 6372 "configure"
6372 #include "confdefs.h"
6373 /* Override any gcc2 internal prototype to avoid an error. */
6374 /* We use char because int might match the return type of a gcc2
6375 builtin and then its argument prototype would still apply. */
6382 if { (eval echo configure:6383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6384 eval "ac_cv_lib_$ac_lib_var=yes"
6386 echo "configure: failed program was:" >&5
6387 cat conftest.$ac_ext >&5
6389 eval "ac_cv_lib_$ac_lib_var=no"
6392 LIBS="$ac_save_LIBS"
6395 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6396 echo "$ac_t""yes" 1>&6
6397 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6399 echo "$ac_t""no" 1>&6
6406 LIBS="$cf_ncurses_LIBS $LIBS"
6408 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6411 if test -n "$cf_cv_curses_dir/lib" ; then
6412 for cf_add_libdir in $cf_cv_curses_dir/lib
6414 if test $cf_add_libdir = /usr/lib ; then
6416 elif test -d $cf_add_libdir
6419 if test -n "$LDFLAGS$LIBS" ; then
6420 # a loop is needed to ensure we can add subdirs of existing dirs
6421 for cf_test_libdir in $LDFLAGS $LIBS ; do
6422 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6423 cf_have_libdir=yes; break
6427 if test "$cf_have_libdir" = no ; then
6428 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6430 echo "${as_me-configure}:6431: testing adding $cf_add_libdir to library-path ..." 1>&5
6433 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6439 LIBS="-l$cf_nculib_root $LIBS"
6442 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
6444 echo $ac_n "checking for initscr""... $ac_c" 1>&6
6445 echo "configure:6446: checking for initscr" >&5
6446 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
6447 echo $ac_n "(cached) $ac_c" 1>&6
6449 cat > conftest.$ac_ext <<EOF
6450 #line 6451 "configure"
6451 #include "confdefs.h"
6452 /* System header to define __stub macros and hopefully few prototypes,
6453 which can conflict with char initscr(); below. */
6455 /* Override any gcc2 internal prototype to avoid an error. */
6456 /* We use char because int might match the return type of a gcc2
6457 builtin and then its argument prototype would still apply. */
6462 /* The GNU C library defines this for functions which it implements
6463 to always fail with ENOSYS. Some functions are actually named
6464 something starting with __ and the normal name is an alias. */
6465 #if defined (__stub_initscr) || defined (__stub___initscr)
6473 if { (eval echo configure:6474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6475 eval "ac_cv_func_initscr=yes"
6477 echo "configure: failed program was:" >&5
6478 cat conftest.$ac_ext >&5
6480 eval "ac_cv_func_initscr=no"
6485 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
6486 echo "$ac_t""yes" 1>&6
6487 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6489 echo "$ac_t""no" 1>&6
6491 cf_save_LIBS="$LIBS"
6492 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
6493 echo "configure:6494: checking for initscr in -l$cf_nculib_root" >&5
6494 LIBS="-l$cf_nculib_root $LIBS"
6495 cat > conftest.$ac_ext <<EOF
6496 #line 6497 "configure"
6497 #include "confdefs.h"
6498 #include <${cf_cv_ncurses_header-curses.h}>
6503 if { (eval echo configure:6504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6505 echo "$ac_t""yes" 1>&6
6506 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6509 echo "configure: failed program was:" >&5
6510 cat conftest.$ac_ext >&5
6512 echo "$ac_t""no" 1>&6
6515 cf_library_path_list=""
6516 if test -n "${LDFLAGS}${LIBS}" ; then
6517 for cf_library_path in $LDFLAGS $LIBS
6519 case $cf_library_path in #(vi
6521 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6523 test "$cf_library_path" != "NONE" && \
6524 test -d "$cf_library_path" && \
6526 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6527 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6528 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6529 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6530 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6531 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"
6534 cf_library_path_list="$cf_library_path_list $cf_search"
6544 test "/usr" != "$prefix" && \
6546 (test $prefix = NONE || test -d $prefix) && {
6547 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
6548 test -d /usr/lib && cf_search="$cf_search /usr/lib"
6549 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
6550 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
6551 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
6552 test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
6556 test "$prefix" != "NONE" && \
6557 test -d "$prefix" && \
6559 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6560 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6561 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6562 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6563 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6564 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6568 test "/usr/local" != "$prefix" && \
6569 test -d "/usr/local" && \
6570 (test $prefix = NONE || test -d $prefix) && {
6571 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
6572 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
6573 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
6574 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
6575 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
6576 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
6580 test "/opt" != "$prefix" && \
6582 (test $prefix = NONE || test -d $prefix) && {
6583 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
6584 test -d /opt/lib && cf_search="$cf_search /opt/lib"
6585 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
6586 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
6587 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
6588 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
6592 test "$HOME" != "$prefix" && \
6593 test -d "$HOME" && \
6594 (test $prefix = NONE || test -d $prefix) && {
6595 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
6596 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
6597 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
6598 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
6599 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
6600 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
6605 cf_search="$cf_library_path_list $cf_search"
6607 for cf_libdir in $cf_search
6609 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
6610 echo "configure:6611: checking for -l$cf_nculib_root in $cf_libdir" >&5
6611 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6612 cat > conftest.$ac_ext <<EOF
6613 #line 6614 "configure"
6614 #include "confdefs.h"
6615 #include <${cf_cv_ncurses_header-curses.h}>
6620 if { (eval echo configure:6621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6622 echo "$ac_t""yes" 1>&6
6623 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6626 echo "configure: failed program was:" >&5
6627 cat conftest.$ac_ext >&5
6629 echo "$ac_t""no" 1>&6
6630 LIBS="$cf_save_LIBS"
6640 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
6642 if test $cf_found_library = no ; then
6643 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
6649 if test -n "$cf_ncurses_LIBS" ; then
6650 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
6651 echo "configure:6652: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6652 cf_ncurses_SAVE="$LIBS"
6653 for p in $cf_ncurses_LIBS ; do
6654 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
6655 if test "$q" != "$LIBS" ; then
6659 cat > conftest.$ac_ext <<EOF
6660 #line 6661 "configure"
6661 #include "confdefs.h"
6662 #include <${cf_cv_ncurses_header-curses.h}>
6664 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6667 if { (eval echo configure:6668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6669 echo "$ac_t""yes" 1>&6
6671 echo "configure: failed program was:" >&5
6672 cat conftest.$ac_ext >&5
6674 echo "$ac_t""no" 1>&6
6675 LIBS="$cf_ncurses_SAVE"
6681 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6683 cat >> confdefs.h <<EOF
6684 #define $cf_nculib_ROOT 1
6693 if test "$no_x" = yes; then
6694 # Not all programs may use this symbol, but it does not hurt to define it.
6695 cat >> confdefs.h <<\EOF
6696 #define X_DISPLAY_MISSING 1
6699 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6701 if test -n "$x_includes"; then
6702 X_CFLAGS="$X_CFLAGS -I$x_includes"
6705 # It would also be nice to do this for all -L options, not just this one.
6706 if test -n "$x_libraries"; then
6707 X_LIBS="$X_LIBS -L$x_libraries"
6708 # For Solaris; some versions of Sun CC require a space after -R and
6709 # others require no space. Words are not sufficient . . . .
6710 case "`(uname -sr) 2>/dev/null`" in
6712 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
6713 echo "configure:6714: checking whether -R must be followed by a space" >&5
6714 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
6715 cat > conftest.$ac_ext <<EOF
6716 #line 6717 "configure"
6717 #include "confdefs.h"
6723 if { (eval echo configure:6724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6727 echo "configure: failed program was:" >&5
6728 cat conftest.$ac_ext >&5
6733 if test $ac_R_nospace = yes; then
6734 echo "$ac_t""no" 1>&6
6735 X_LIBS="$X_LIBS -R$x_libraries"
6737 LIBS="$ac_xsave_LIBS -R $x_libraries"
6738 cat > conftest.$ac_ext <<EOF
6739 #line 6740 "configure"
6740 #include "confdefs.h"
6746 if { (eval echo configure:6747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6750 echo "configure: failed program was:" >&5
6751 cat conftest.$ac_ext >&5
6756 if test $ac_R_space = yes; then
6757 echo "$ac_t""yes" 1>&6
6758 X_LIBS="$X_LIBS -R $x_libraries"
6760 echo "$ac_t""neither works" 1>&6
6763 LIBS="$ac_xsave_LIBS"
6767 # Check for system-dependent libraries X programs must link with.
6768 # Do this before checking for the system-independent R6 libraries
6769 # (-lICE), since we may need -lsocket or whatever for X linking.
6771 if test "$ISC" = yes; then
6772 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6774 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
6775 # libraries were built with DECnet support. And karl@cs.umb.edu says
6776 # the Alpha needs dnet_stub (dnet does not exist).
6777 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
6778 echo "configure:6779: checking for dnet_ntoa in -ldnet" >&5
6779 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6780 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6781 echo $ac_n "(cached) $ac_c" 1>&6
6783 ac_save_LIBS="$LIBS"
6785 cat > conftest.$ac_ext <<EOF
6786 #line 6787 "configure"
6787 #include "confdefs.h"
6788 /* Override any gcc2 internal prototype to avoid an error. */
6789 /* We use char because int might match the return type of a gcc2
6790 builtin and then its argument prototype would still apply. */
6797 if { (eval echo configure:6798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6799 eval "ac_cv_lib_$ac_lib_var=yes"
6801 echo "configure: failed program was:" >&5
6802 cat conftest.$ac_ext >&5
6804 eval "ac_cv_lib_$ac_lib_var=no"
6807 LIBS="$ac_save_LIBS"
6810 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6811 echo "$ac_t""yes" 1>&6
6812 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6814 echo "$ac_t""no" 1>&6
6817 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6818 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
6819 echo "configure:6820: checking for dnet_ntoa in -ldnet_stub" >&5
6820 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6821 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6822 echo $ac_n "(cached) $ac_c" 1>&6
6824 ac_save_LIBS="$LIBS"
6825 LIBS="-ldnet_stub $LIBS"
6826 cat > conftest.$ac_ext <<EOF
6827 #line 6828 "configure"
6828 #include "confdefs.h"
6829 /* Override any gcc2 internal prototype to avoid an error. */
6830 /* We use char because int might match the return type of a gcc2
6831 builtin and then its argument prototype would still apply. */
6838 if { (eval echo configure:6839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6840 eval "ac_cv_lib_$ac_lib_var=yes"
6842 echo "configure: failed program was:" >&5
6843 cat conftest.$ac_ext >&5
6845 eval "ac_cv_lib_$ac_lib_var=no"
6848 LIBS="$ac_save_LIBS"
6851 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6852 echo "$ac_t""yes" 1>&6
6853 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6855 echo "$ac_t""no" 1>&6
6860 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6861 # to get the SysV transport functions.
6862 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
6864 # The nsl library prevents programs from opening the X display
6865 # on Irix 5.2, according to dickey@clark.net.
6866 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
6867 echo "configure:6868: checking for gethostbyname" >&5
6868 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
6869 echo $ac_n "(cached) $ac_c" 1>&6
6871 cat > conftest.$ac_ext <<EOF
6872 #line 6873 "configure"
6873 #include "confdefs.h"
6874 /* System header to define __stub macros and hopefully few prototypes,
6875 which can conflict with char gethostbyname(); below. */
6877 /* Override any gcc2 internal prototype to avoid an error. */
6878 /* We use char because int might match the return type of a gcc2
6879 builtin and then its argument prototype would still apply. */
6880 char gethostbyname();
6884 /* The GNU C library defines this for functions which it implements
6885 to always fail with ENOSYS. Some functions are actually named
6886 something starting with __ and the normal name is an alias. */
6887 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6895 if { (eval echo configure:6896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6897 eval "ac_cv_func_gethostbyname=yes"
6899 echo "configure: failed program was:" >&5
6900 cat conftest.$ac_ext >&5
6902 eval "ac_cv_func_gethostbyname=no"
6907 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
6908 echo "$ac_t""yes" 1>&6
6911 echo "$ac_t""no" 1>&6
6914 if test $ac_cv_func_gethostbyname = no; then
6915 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
6916 echo "configure:6917: checking for gethostbyname in -lnsl" >&5
6917 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
6918 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6919 echo $ac_n "(cached) $ac_c" 1>&6
6921 ac_save_LIBS="$LIBS"
6923 cat > conftest.$ac_ext <<EOF
6924 #line 6925 "configure"
6925 #include "confdefs.h"
6926 /* Override any gcc2 internal prototype to avoid an error. */
6927 /* We use char because int might match the return type of a gcc2
6928 builtin and then its argument prototype would still apply. */
6929 char gethostbyname();
6935 if { (eval echo configure:6936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6937 eval "ac_cv_lib_$ac_lib_var=yes"
6939 echo "configure: failed program was:" >&5
6940 cat conftest.$ac_ext >&5
6942 eval "ac_cv_lib_$ac_lib_var=no"
6945 LIBS="$ac_save_LIBS"
6948 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6949 echo "$ac_t""yes" 1>&6
6950 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6952 echo "$ac_t""no" 1>&6
6957 # lieder@skyler.mavd.honeywell.com says without -lsocket,
6958 # socket/setsockopt and other routines are undefined under SCO ODT
6959 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
6960 # on later versions), says simon@lia.di.epfl.ch: it contains
6961 # gethostby* variants that don't use the nameserver (or something).
6962 # -lsocket must be given before -lnsl if both are needed.
6963 # We assume that if connect needs -lnsl, so does gethostbyname.
6964 echo $ac_n "checking for connect""... $ac_c" 1>&6
6965 echo "configure:6966: checking for connect" >&5
6966 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
6967 echo $ac_n "(cached) $ac_c" 1>&6
6969 cat > conftest.$ac_ext <<EOF
6970 #line 6971 "configure"
6971 #include "confdefs.h"
6972 /* System header to define __stub macros and hopefully few prototypes,
6973 which can conflict with char connect(); below. */
6975 /* Override any gcc2 internal prototype to avoid an error. */
6976 /* We use char because int might match the return type of a gcc2
6977 builtin and then its argument prototype would still apply. */
6982 /* The GNU C library defines this for functions which it implements
6983 to always fail with ENOSYS. Some functions are actually named
6984 something starting with __ and the normal name is an alias. */
6985 #if defined (__stub_connect) || defined (__stub___connect)
6993 if { (eval echo configure:6994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6995 eval "ac_cv_func_connect=yes"
6997 echo "configure: failed program was:" >&5
6998 cat conftest.$ac_ext >&5
7000 eval "ac_cv_func_connect=no"
7005 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
7006 echo "$ac_t""yes" 1>&6
7009 echo "$ac_t""no" 1>&6
7012 if test $ac_cv_func_connect = no; then
7013 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
7014 echo "configure:7015: checking for connect in -lsocket" >&5
7015 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
7016 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7017 echo $ac_n "(cached) $ac_c" 1>&6
7019 ac_save_LIBS="$LIBS"
7020 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
7021 cat > conftest.$ac_ext <<EOF
7022 #line 7023 "configure"
7023 #include "confdefs.h"
7024 /* Override any gcc2 internal prototype to avoid an error. */
7025 /* We use char because int might match the return type of a gcc2
7026 builtin and then its argument prototype would still apply. */
7033 if { (eval echo configure:7034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7035 eval "ac_cv_lib_$ac_lib_var=yes"
7037 echo "configure: failed program was:" >&5
7038 cat conftest.$ac_ext >&5
7040 eval "ac_cv_lib_$ac_lib_var=no"
7043 LIBS="$ac_save_LIBS"
7046 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7047 echo "$ac_t""yes" 1>&6
7048 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
7050 echo "$ac_t""no" 1>&6
7055 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
7056 echo $ac_n "checking for remove""... $ac_c" 1>&6
7057 echo "configure:7058: checking for remove" >&5
7058 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
7059 echo $ac_n "(cached) $ac_c" 1>&6
7061 cat > conftest.$ac_ext <<EOF
7062 #line 7063 "configure"
7063 #include "confdefs.h"
7064 /* System header to define __stub macros and hopefully few prototypes,
7065 which can conflict with char remove(); below. */
7067 /* Override any gcc2 internal prototype to avoid an error. */
7068 /* We use char because int might match the return type of a gcc2
7069 builtin and then its argument prototype would still apply. */
7074 /* The GNU C library defines this for functions which it implements
7075 to always fail with ENOSYS. Some functions are actually named
7076 something starting with __ and the normal name is an alias. */
7077 #if defined (__stub_remove) || defined (__stub___remove)
7085 if { (eval echo configure:7086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7087 eval "ac_cv_func_remove=yes"
7089 echo "configure: failed program was:" >&5
7090 cat conftest.$ac_ext >&5
7092 eval "ac_cv_func_remove=no"
7097 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
7098 echo "$ac_t""yes" 1>&6
7101 echo "$ac_t""no" 1>&6
7104 if test $ac_cv_func_remove = no; then
7105 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
7106 echo "configure:7107: checking for remove in -lposix" >&5
7107 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
7108 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7109 echo $ac_n "(cached) $ac_c" 1>&6
7111 ac_save_LIBS="$LIBS"
7112 LIBS="-lposix $LIBS"
7113 cat > conftest.$ac_ext <<EOF
7114 #line 7115 "configure"
7115 #include "confdefs.h"
7116 /* Override any gcc2 internal prototype to avoid an error. */
7117 /* We use char because int might match the return type of a gcc2
7118 builtin and then its argument prototype would still apply. */
7125 if { (eval echo configure:7126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7127 eval "ac_cv_lib_$ac_lib_var=yes"
7129 echo "configure: failed program was:" >&5
7130 cat conftest.$ac_ext >&5
7132 eval "ac_cv_lib_$ac_lib_var=no"
7135 LIBS="$ac_save_LIBS"
7138 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7139 echo "$ac_t""yes" 1>&6
7140 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7142 echo "$ac_t""no" 1>&6
7147 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7148 echo $ac_n "checking for shmat""... $ac_c" 1>&6
7149 echo "configure:7150: checking for shmat" >&5
7150 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
7151 echo $ac_n "(cached) $ac_c" 1>&6
7153 cat > conftest.$ac_ext <<EOF
7154 #line 7155 "configure"
7155 #include "confdefs.h"
7156 /* System header to define __stub macros and hopefully few prototypes,
7157 which can conflict with char shmat(); below. */
7159 /* Override any gcc2 internal prototype to avoid an error. */
7160 /* We use char because int might match the return type of a gcc2
7161 builtin and then its argument prototype would still apply. */
7166 /* The GNU C library defines this for functions which it implements
7167 to always fail with ENOSYS. Some functions are actually named
7168 something starting with __ and the normal name is an alias. */
7169 #if defined (__stub_shmat) || defined (__stub___shmat)
7177 if { (eval echo configure:7178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7179 eval "ac_cv_func_shmat=yes"
7181 echo "configure: failed program was:" >&5
7182 cat conftest.$ac_ext >&5
7184 eval "ac_cv_func_shmat=no"
7189 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
7190 echo "$ac_t""yes" 1>&6
7193 echo "$ac_t""no" 1>&6
7196 if test $ac_cv_func_shmat = no; then
7197 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
7198 echo "configure:7199: checking for shmat in -lipc" >&5
7199 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
7200 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7201 echo $ac_n "(cached) $ac_c" 1>&6
7203 ac_save_LIBS="$LIBS"
7205 cat > conftest.$ac_ext <<EOF
7206 #line 7207 "configure"
7207 #include "confdefs.h"
7208 /* Override any gcc2 internal prototype to avoid an error. */
7209 /* We use char because int might match the return type of a gcc2
7210 builtin and then its argument prototype would still apply. */
7217 if { (eval echo configure:7218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7219 eval "ac_cv_lib_$ac_lib_var=yes"
7221 echo "configure: failed program was:" >&5
7222 cat conftest.$ac_ext >&5
7224 eval "ac_cv_lib_$ac_lib_var=no"
7227 LIBS="$ac_save_LIBS"
7230 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7231 echo "$ac_t""yes" 1>&6
7232 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7234 echo "$ac_t""no" 1>&6
7240 # Check for libraries that X11R6 Xt/Xaw programs need.
7241 ac_save_LDFLAGS="$LDFLAGS"
7242 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7243 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7244 # check for ICE first), but we must link in the order -lSM -lICE or
7245 # we get undefined symbols. So assume we have SM if we have ICE.
7246 # These have to be linked with before -lX11, unlike the other
7247 # libraries we check for below, so use a different variable.
7248 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
7249 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
7250 echo "configure:7251: checking for IceConnectionNumber in -lICE" >&5
7251 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
7252 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7253 echo $ac_n "(cached) $ac_c" 1>&6
7255 ac_save_LIBS="$LIBS"
7256 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7257 cat > conftest.$ac_ext <<EOF
7258 #line 7259 "configure"
7259 #include "confdefs.h"
7260 /* Override any gcc2 internal prototype to avoid an error. */
7261 /* We use char because int might match the return type of a gcc2
7262 builtin and then its argument prototype would still apply. */
7263 char IceConnectionNumber();
7266 IceConnectionNumber()
7269 if { (eval echo configure:7270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7271 eval "ac_cv_lib_$ac_lib_var=yes"
7273 echo "configure: failed program was:" >&5
7274 cat conftest.$ac_ext >&5
7276 eval "ac_cv_lib_$ac_lib_var=no"
7279 LIBS="$ac_save_LIBS"
7282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7283 echo "$ac_t""yes" 1>&6
7284 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7286 echo "$ac_t""no" 1>&6
7289 LDFLAGS="$ac_save_LDFLAGS"
7297 # SYSTEM_NAME=`echo "$cf_cv_system_name"|tr ' ' -`
7301 LDFLAGS="$X_LIBS $LDFLAGS"
7303 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
7305 echo "${as_me-configure}:7306: testing checking additions to CFLAGS ..." 1>&5
7308 cf_check_cflags="$CFLAGS"
7309 cf_check_cppflags="$CPPFLAGS"
7314 cf_new_extra_cppflags=
7316 for cf_add_cflags in $X_CFLAGS
7318 case $cf_fix_cppflags in
7320 case $cf_add_cflags in #(vi
7321 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7322 case $cf_add_cflags in
7324 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7326 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7327 && test -z "${cf_tst_cflags}" \
7328 && cf_fix_cppflags=yes
7330 if test $cf_fix_cppflags = yes ; then
7331 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7333 elif test "${cf_tst_cflags}" = "\"'" ; then
7334 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7340 *$cf_add_cflags) #(vi
7343 case $cf_add_cflags in #(vi
7345 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7347 CPPFLAGS=`echo "$CPPFLAGS" | \
7348 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7349 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7353 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7358 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7363 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7365 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7367 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7368 && test -z "${cf_tst_cflags}" \
7369 && cf_fix_cppflags=no
7374 if test -n "$cf_new_cflags" ; then
7375 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
7377 echo "${as_me-configure}:7378: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
7380 CFLAGS="$CFLAGS $cf_new_cflags"
7383 if test -n "$cf_new_cppflags" ; then
7384 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
7386 echo "${as_me-configure}:7387: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
7389 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7392 if test -n "$cf_new_extra_cppflags" ; then
7393 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
7395 echo "${as_me-configure}:7396: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
7398 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7404 if test "$cf_check_cflags" != "$CFLAGS" ; then
7405 cat > conftest.$ac_ext <<EOF
7406 #line 7407 "configure"
7407 #include "confdefs.h"
7410 printf("Hello world");
7413 if { (eval echo configure:7414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7416 echo "configure: failed program was:" >&5
7417 cat conftest.$ac_ext >&5
7419 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
7421 echo "${as_me-configure}:7422: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
7424 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
7425 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
7427 echo "${as_me-configure}:7428: testing but keeping change to \$CPPFLAGS ..." 1>&5
7431 CFLAGS="$cf_check_flags"
7437 echo $ac_n "checking for XOpenDisplay""... $ac_c" 1>&6
7438 echo "configure:7439: checking for XOpenDisplay" >&5
7439 if eval "test \"`echo '$''{'ac_cv_func_XOpenDisplay'+set}'`\" = set"; then
7440 echo $ac_n "(cached) $ac_c" 1>&6
7442 cat > conftest.$ac_ext <<EOF
7443 #line 7444 "configure"
7444 #include "confdefs.h"
7445 /* System header to define __stub macros and hopefully few prototypes,
7446 which can conflict with char XOpenDisplay(); below. */
7448 /* Override any gcc2 internal prototype to avoid an error. */
7449 /* We use char because int might match the return type of a gcc2
7450 builtin and then its argument prototype would still apply. */
7451 char XOpenDisplay();
7455 /* The GNU C library defines this for functions which it implements
7456 to always fail with ENOSYS. Some functions are actually named
7457 something starting with __ and the normal name is an alias. */
7458 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
7466 if { (eval echo configure:7467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7468 eval "ac_cv_func_XOpenDisplay=yes"
7470 echo "configure: failed program was:" >&5
7471 cat conftest.$ac_ext >&5
7473 eval "ac_cv_func_XOpenDisplay=no"
7478 if eval "test \"`echo '$ac_cv_func_'XOpenDisplay`\" = yes"; then
7479 echo "$ac_t""yes" 1>&6
7482 echo "$ac_t""no" 1>&6
7484 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
7485 echo "configure:7486: checking for XOpenDisplay in -lX11" >&5
7486 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
7487 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7488 echo $ac_n "(cached) $ac_c" 1>&6
7490 ac_save_LIBS="$LIBS"
7491 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
7492 cat > conftest.$ac_ext <<EOF
7493 #line 7494 "configure"
7494 #include "confdefs.h"
7495 /* Override any gcc2 internal prototype to avoid an error. */
7496 /* We use char because int might match the return type of a gcc2
7497 builtin and then its argument prototype would still apply. */
7498 char XOpenDisplay();
7504 if { (eval echo configure:7505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7506 eval "ac_cv_lib_$ac_lib_var=yes"
7508 echo "configure: failed program was:" >&5
7509 cat conftest.$ac_ext >&5
7511 eval "ac_cv_lib_$ac_lib_var=no"
7514 LIBS="$ac_save_LIBS"
7517 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7518 echo "$ac_t""yes" 1>&6
7521 echo "$ac_t""no" 1>&6
7527 echo $ac_n "checking for XtAppInitialize""... $ac_c" 1>&6
7528 echo "configure:7529: checking for XtAppInitialize" >&5
7529 if eval "test \"`echo '$''{'ac_cv_func_XtAppInitialize'+set}'`\" = set"; then
7530 echo $ac_n "(cached) $ac_c" 1>&6
7532 cat > conftest.$ac_ext <<EOF
7533 #line 7534 "configure"
7534 #include "confdefs.h"
7535 /* System header to define __stub macros and hopefully few prototypes,
7536 which can conflict with char XtAppInitialize(); below. */
7538 /* Override any gcc2 internal prototype to avoid an error. */
7539 /* We use char because int might match the return type of a gcc2
7540 builtin and then its argument prototype would still apply. */
7541 char XtAppInitialize();
7545 /* The GNU C library defines this for functions which it implements
7546 to always fail with ENOSYS. Some functions are actually named
7547 something starting with __ and the normal name is an alias. */
7548 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
7556 if { (eval echo configure:7557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7558 eval "ac_cv_func_XtAppInitialize=yes"
7560 echo "configure: failed program was:" >&5
7561 cat conftest.$ac_ext >&5
7563 eval "ac_cv_func_XtAppInitialize=no"
7568 if eval "test \"`echo '$ac_cv_func_'XtAppInitialize`\" = yes"; then
7569 echo "$ac_t""yes" 1>&6
7572 echo "$ac_t""no" 1>&6
7574 echo $ac_n "checking for XtAppInitialize in -lXt""... $ac_c" 1>&6
7575 echo "configure:7576: checking for XtAppInitialize in -lXt" >&5
7576 ac_lib_var=`echo Xt'_'XtAppInitialize | sed 'y%./+-%__p_%'`
7577 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7578 echo $ac_n "(cached) $ac_c" 1>&6
7580 ac_save_LIBS="$LIBS"
7581 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
7582 cat > conftest.$ac_ext <<EOF
7583 #line 7584 "configure"
7584 #include "confdefs.h"
7585 /* Override any gcc2 internal prototype to avoid an error. */
7586 /* We use char because int might match the return type of a gcc2
7587 builtin and then its argument prototype would still apply. */
7588 char XtAppInitialize();
7594 if { (eval echo configure:7595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7596 eval "ac_cv_lib_$ac_lib_var=yes"
7598 echo "configure: failed program was:" >&5
7599 cat conftest.$ac_ext >&5
7601 eval "ac_cv_lib_$ac_lib_var=no"
7604 LIBS="$ac_save_LIBS"
7607 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7608 echo "$ac_t""yes" 1>&6
7609 cat >> confdefs.h <<\EOF
7610 #define HAVE_LIBXT 1
7614 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
7616 echo "$ac_t""no" 1>&6
7622 if test $cf_have_X_LIBS = no ; then
7623 echo "configure: warning: Unable to successfully link X Toolkit library (-lXt) with
7624 test program. You will have to check and add the proper libraries by hand
7629 cf_x_athena=${cf_x_athena-Xaw}
7631 echo $ac_n "checking if you want to link with Xaw 3d library""... $ac_c" 1>&6
7632 echo "configure:7633: checking if you want to link with Xaw 3d library" >&5
7635 # Check whether --with-Xaw3d or --without-Xaw3d was given.
7636 if test "${with_Xaw3d+set}" = set; then
7637 withval="$with_Xaw3d"
7641 if test "$withval" = yes ; then
7643 echo "$ac_t""yes" 1>&6
7645 echo "$ac_t""no" 1>&6
7648 echo $ac_n "checking if you want to link with neXT Athena library""... $ac_c" 1>&6
7649 echo "configure:7650: checking if you want to link with neXT Athena library" >&5
7652 # Check whether --with-neXtaw or --without-neXtaw was given.
7653 if test "${with_neXtaw+set}" = set; then
7654 withval="$with_neXtaw"
7658 if test "$withval" = yes ; then
7660 echo "$ac_t""yes" 1>&6
7662 echo "$ac_t""no" 1>&6
7665 echo $ac_n "checking if you want to link with Athena-Plus library""... $ac_c" 1>&6
7666 echo "configure:7667: checking if you want to link with Athena-Plus library" >&5
7669 # Check whether --with-XawPlus or --without-XawPlus was given.
7670 if test "${with_XawPlus+set}" = set; then
7671 withval="$with_XawPlus"
7675 if test "$withval" = yes ; then
7677 echo "$ac_t""yes" 1>&6
7679 echo "$ac_t""no" 1>&6
7682 echo $ac_n "checking for XextCreateExtension in -lXext""... $ac_c" 1>&6
7683 echo "configure:7684: checking for XextCreateExtension in -lXext" >&5
7684 ac_lib_var=`echo Xext'_'XextCreateExtension | sed 'y%./+-%__p_%'`
7685 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7686 echo $ac_n "(cached) $ac_c" 1>&6
7688 ac_save_LIBS="$LIBS"
7690 cat > conftest.$ac_ext <<EOF
7691 #line 7692 "configure"
7692 #include "confdefs.h"
7693 /* Override any gcc2 internal prototype to avoid an error. */
7694 /* We use char because int might match the return type of a gcc2
7695 builtin and then its argument prototype would still apply. */
7696 char XextCreateExtension();
7699 XextCreateExtension()
7702 if { (eval echo configure:7703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7704 eval "ac_cv_lib_$ac_lib_var=yes"
7706 echo "configure: failed program was:" >&5
7707 cat conftest.$ac_ext >&5
7709 eval "ac_cv_lib_$ac_lib_var=no"
7712 LIBS="$ac_save_LIBS"
7715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7716 echo "$ac_t""yes" 1>&6
7719 echo "$ac_t""no" 1>&6
7726 cf_x_athena_root=$cf_x_athena
7727 cf_x_athena_include=""
7729 for cf_path in default \
7730 /usr/contrib/X11R6 \
7731 /usr/contrib/X11R5 \
7735 if test -z "$cf_x_athena_include" ; then
7737 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
7738 if test $cf_path != default ; then
7739 CPPFLAGS="$cf_save -I$cf_path/include"
7740 echo $ac_n "checking for $cf_test in $cf_path""... $ac_c" 1>&6
7741 echo "configure:7742: checking for $cf_test in $cf_path" >&5
7743 echo $ac_n "checking for $cf_test""... $ac_c" 1>&6
7744 echo "configure:7745: checking for $cf_test" >&5
7746 cat > conftest.$ac_ext <<EOF
7747 #line 7748 "configure"
7748 #include "confdefs.h"
7750 #include <X11/Intrinsic.h>
7756 if { (eval echo configure:7757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7760 echo "configure: failed program was:" >&5
7761 cat conftest.$ac_ext >&5
7766 echo "$ac_t""$cf_result" 1>&6
7767 if test "$cf_result" = yes ; then
7768 cf_x_athena_include=$cf_path
7776 if test -z "$cf_x_athena_include" ; then
7777 echo "configure: warning: Unable to successfully find Athena header files with test program" 1>&2
7778 elif test "$cf_x_athena_include" != default ; then
7779 CPPFLAGS="$CPPFLAGS -I$cf_x_athena_include"
7783 cf_x_athena_root=$cf_x_athena
7786 for cf_path in default \
7787 /usr/contrib/X11R6 \
7788 /usr/contrib/X11R5 \
7793 "-l$cf_x_athena_root -lXmu" \
7794 "-l$cf_x_athena_root -lXpm -lXmu" \
7795 "-l${cf_x_athena_root}_s -lXmu_s"
7797 if test -z "$cf_x_athena_lib" ; then
7799 cf_test=XawSimpleMenuAddGlobalActions
7800 if test $cf_path != default ; then
7801 LIBS="-L$cf_path/lib $cf_lib $LIBS"
7802 echo $ac_n "checking for $cf_lib in $cf_path""... $ac_c" 1>&6
7803 echo "configure:7804: checking for $cf_lib in $cf_path" >&5
7805 LIBS="$cf_lib $LIBS"
7806 echo $ac_n "checking for $cf_test in $cf_lib""... $ac_c" 1>&6
7807 echo "configure:7808: checking for $cf_test in $cf_lib" >&5
7809 cat > conftest.$ac_ext <<EOF
7810 #line 7811 "configure"
7811 #include "confdefs.h"
7817 if { (eval echo configure:7818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7821 echo "configure: failed program was:" >&5
7822 cat conftest.$ac_ext >&5
7827 echo "$ac_t""$cf_result" 1>&6
7828 if test "$cf_result" = yes ; then
7829 cf_x_athena_lib="$cf_lib"
7837 if test -z "$cf_x_athena_lib" ; then
7838 { echo "configure: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" 1>&2; exit 1; }
7842 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7844 cat >> confdefs.h <<EOF
7845 #define $cf_x_athena_LIBS 1
7853 for ac_prog in xcurses-config
7855 # Extract the first word of "$ac_prog", so it can be a program name with args.
7856 set dummy $ac_prog; ac_word=$2
7857 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7858 echo "configure:7859: checking for $ac_word" >&5
7859 if eval "test \"`echo '$''{'ac_cv_path_XCURSES_CONFIG'+set}'`\" = set"; then
7860 echo $ac_n "(cached) $ac_c" 1>&6
7862 case "$XCURSES_CONFIG" in
7864 ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a path.
7867 ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a dos path.
7870 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7872 for ac_dir in $ac_dummy; do
7873 test -z "$ac_dir" && ac_dir=.
7874 if test -f $ac_dir/$ac_word; then
7875 ac_cv_path_XCURSES_CONFIG="$ac_dir/$ac_word"
7883 XCURSES_CONFIG="$ac_cv_path_XCURSES_CONFIG"
7884 if test -n "$XCURSES_CONFIG"; then
7885 echo "$ac_t""$XCURSES_CONFIG" 1>&6
7887 echo "$ac_t""no" 1>&6
7890 test -n "$XCURSES_CONFIG" && break
7892 test -n "$XCURSES_CONFIG" || XCURSES_CONFIG="none"
7895 if test "$XCURSES_CONFIG" != none ; then
7897 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
7898 LIBS="`$XCURSES_CONFIG --libs` $LIBS"
7900 cf_cv_lib_XCurses=yes
7904 LDFLAGS="$LDFLAGS $X_LIBS"
7906 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
7908 echo "${as_me-configure}:7909: testing checking additions to CFLAGS ..." 1>&5
7911 cf_check_cflags="$CFLAGS"
7912 cf_check_cppflags="$CPPFLAGS"
7917 cf_new_extra_cppflags=
7919 for cf_add_cflags in $X_CFLAGS
7921 case $cf_fix_cppflags in
7923 case $cf_add_cflags in #(vi
7924 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7925 case $cf_add_cflags in
7927 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7929 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7930 && test -z "${cf_tst_cflags}" \
7931 && cf_fix_cppflags=yes
7933 if test $cf_fix_cppflags = yes ; then
7934 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7936 elif test "${cf_tst_cflags}" = "\"'" ; then
7937 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7943 *$cf_add_cflags) #(vi
7946 case $cf_add_cflags in #(vi
7948 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7950 CPPFLAGS=`echo "$CPPFLAGS" | \
7951 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7952 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7956 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7961 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7966 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7968 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7970 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7971 && test -z "${cf_tst_cflags}" \
7972 && cf_fix_cppflags=no
7977 if test -n "$cf_new_cflags" ; then
7978 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
7980 echo "${as_me-configure}:7981: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
7983 CFLAGS="$CFLAGS $cf_new_cflags"
7986 if test -n "$cf_new_cppflags" ; then
7987 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
7989 echo "${as_me-configure}:7990: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
7992 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7995 if test -n "$cf_new_extra_cppflags" ; then
7996 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
7998 echo "${as_me-configure}:7999: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8001 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8007 if test "$cf_check_cflags" != "$CFLAGS" ; then
8008 cat > conftest.$ac_ext <<EOF
8009 #line 8010 "configure"
8010 #include "confdefs.h"
8013 printf("Hello world");
8016 if { (eval echo configure:8017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8019 echo "configure: failed program was:" >&5
8020 cat conftest.$ac_ext >&5
8022 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
8024 echo "${as_me-configure}:8025: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
8027 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
8028 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
8030 echo "${as_me-configure}:8031: testing but keeping change to \$CPPFLAGS ..." 1>&5
8034 CFLAGS="$cf_check_flags"
8039 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
8040 echo "configure:8041: checking for XOpenDisplay in -lX11" >&5
8041 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
8042 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8043 echo $ac_n "(cached) $ac_c" 1>&6
8045 ac_save_LIBS="$LIBS"
8046 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
8047 cat > conftest.$ac_ext <<EOF
8048 #line 8049 "configure"
8049 #include "confdefs.h"
8050 /* Override any gcc2 internal prototype to avoid an error. */
8051 /* We use char because int might match the return type of a gcc2
8052 builtin and then its argument prototype would still apply. */
8053 char XOpenDisplay();
8059 if { (eval echo configure:8060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8061 eval "ac_cv_lib_$ac_lib_var=yes"
8063 echo "configure: failed program was:" >&5
8064 cat conftest.$ac_ext >&5
8066 eval "ac_cv_lib_$ac_lib_var=no"
8069 LIBS="$ac_save_LIBS"
8072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8073 echo "$ac_t""yes" 1>&6
8076 echo "$ac_t""no" 1>&6
8079 echo $ac_n "checking for XCurses library""... $ac_c" 1>&6
8080 echo "configure:8081: checking for XCurses library" >&5
8081 if eval "test \"`echo '$''{'cf_cv_lib_XCurses'+set}'`\" = set"; then
8082 echo $ac_n "(cached) $ac_c" 1>&6
8085 LIBS="-lXCurses $LIBS"
8086 cat > conftest.$ac_ext <<EOF
8087 #line 8088 "configure"
8088 #include "confdefs.h"
8090 #include <xcurses.h>
8091 char *XCursesProgramName = "test";
8097 if { (eval echo configure:8098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8099 cf_cv_lib_XCurses=yes
8101 echo "configure: failed program was:" >&5
8102 cat conftest.$ac_ext >&5
8104 cf_cv_lib_XCurses=no
8110 echo "$ac_t""$cf_cv_lib_XCurses" 1>&6
8114 if test $cf_cv_lib_XCurses = yes ; then
8115 cat >> confdefs.h <<\EOF
8119 cat >> confdefs.h <<\EOF
8123 cat >> confdefs.h <<\EOF
8124 #define HAVE_XCURSES 1
8128 { echo "configure: error: Cannot link with XCurses" 1>&2; exit 1; }
8136 case $cf_cv_screen in #(vi
8140 # look for curses-related libraries
8141 echo $ac_n "checking for new_panel in -lpanel$cf_cv_libtype""... $ac_c" 1>&6
8142 echo "configure:8143: checking for new_panel in -lpanel$cf_cv_libtype" >&5
8143 ac_lib_var=`echo panel$cf_cv_libtype'_'new_panel | sed 'y%./+-%__p_%'`
8144 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8145 echo $ac_n "(cached) $ac_c" 1>&6
8147 ac_save_LIBS="$LIBS"
8148 LIBS="-lpanel$cf_cv_libtype $LIBS"
8149 cat > conftest.$ac_ext <<EOF
8150 #line 8151 "configure"
8151 #include "confdefs.h"
8152 /* Override any gcc2 internal prototype to avoid an error. */
8153 /* We use char because int might match the return type of a gcc2
8154 builtin and then its argument prototype would still apply. */
8161 if { (eval echo configure:8162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8163 eval "ac_cv_lib_$ac_lib_var=yes"
8165 echo "configure: failed program was:" >&5
8166 cat conftest.$ac_ext >&5
8168 eval "ac_cv_lib_$ac_lib_var=no"
8171 LIBS="$ac_save_LIBS"
8174 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8175 echo "$ac_t""yes" 1>&6
8176 ac_tr_lib=HAVE_LIB`echo panel$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8177 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8178 cat >> confdefs.h <<EOF
8179 #define $ac_tr_lib 1
8182 LIBS="-lpanel$cf_cv_libtype $LIBS"
8185 echo "$ac_t""no" 1>&6
8188 echo $ac_n "checking for menu_driver in -lmenu$cf_cv_libtype""... $ac_c" 1>&6
8189 echo "configure:8190: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
8190 ac_lib_var=`echo menu$cf_cv_libtype'_'menu_driver | sed 'y%./+-%__p_%'`
8191 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8192 echo $ac_n "(cached) $ac_c" 1>&6
8194 ac_save_LIBS="$LIBS"
8195 LIBS="-lmenu$cf_cv_libtype $LIBS"
8196 cat > conftest.$ac_ext <<EOF
8197 #line 8198 "configure"
8198 #include "confdefs.h"
8199 /* Override any gcc2 internal prototype to avoid an error. */
8200 /* We use char because int might match the return type of a gcc2
8201 builtin and then its argument prototype would still apply. */
8208 if { (eval echo configure:8209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8210 eval "ac_cv_lib_$ac_lib_var=yes"
8212 echo "configure: failed program was:" >&5
8213 cat conftest.$ac_ext >&5
8215 eval "ac_cv_lib_$ac_lib_var=no"
8218 LIBS="$ac_save_LIBS"
8221 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8222 echo "$ac_t""yes" 1>&6
8223 ac_tr_lib=HAVE_LIB`echo menu$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8224 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8225 cat >> confdefs.h <<EOF
8226 #define $ac_tr_lib 1
8229 LIBS="-lmenu$cf_cv_libtype $LIBS"
8232 echo "$ac_t""no" 1>&6
8235 echo $ac_n "checking for form_driver in -lform$cf_cv_libtype""... $ac_c" 1>&6
8236 echo "configure:8237: checking for form_driver in -lform$cf_cv_libtype" >&5
8237 ac_lib_var=`echo form$cf_cv_libtype'_'form_driver | sed 'y%./+-%__p_%'`
8238 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8239 echo $ac_n "(cached) $ac_c" 1>&6
8241 ac_save_LIBS="$LIBS"
8242 LIBS="-lform$cf_cv_libtype $LIBS"
8243 cat > conftest.$ac_ext <<EOF
8244 #line 8245 "configure"
8245 #include "confdefs.h"
8246 /* Override any gcc2 internal prototype to avoid an error. */
8247 /* We use char because int might match the return type of a gcc2
8248 builtin and then its argument prototype would still apply. */
8255 if { (eval echo configure:8256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8257 eval "ac_cv_lib_$ac_lib_var=yes"
8259 echo "configure: failed program was:" >&5
8260 cat conftest.$ac_ext >&5
8262 eval "ac_cv_lib_$ac_lib_var=no"
8265 LIBS="$ac_save_LIBS"
8268 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8269 echo "$ac_t""yes" 1>&6
8270 ac_tr_lib=HAVE_LIB`echo form$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8271 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8272 cat >> confdefs.h <<EOF
8273 #define $ac_tr_lib 1
8276 LIBS="-lform$cf_cv_libtype $LIBS"
8279 echo "$ac_t""no" 1>&6
8283 # look for curses-related headers
8292 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8293 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8294 echo "configure:8295: checking for $ac_hdr" >&5
8295 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8296 echo $ac_n "(cached) $ac_c" 1>&6
8298 cat > conftest.$ac_ext <<EOF
8299 #line 8300 "configure"
8300 #include "confdefs.h"
8303 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8304 { (eval echo configure:8305: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8305 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8306 if test -z "$ac_err"; then
8308 eval "ac_cv_header_$ac_safe=yes"
8311 echo "configure: failed program was:" >&5
8312 cat conftest.$ac_ext >&5
8314 eval "ac_cv_header_$ac_safe=no"
8318 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8319 echo "$ac_t""yes" 1>&6
8320 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8321 cat >> confdefs.h <<EOF
8322 #define $ac_tr_hdr 1
8326 echo "$ac_t""no" 1>&6
8333 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
8334 echo "configure:8335: checking return type of signal handlers" >&5
8335 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
8336 echo $ac_n "(cached) $ac_c" 1>&6
8338 cat > conftest.$ac_ext <<EOF
8339 #line 8340 "configure"
8340 #include "confdefs.h"
8341 #include <sys/types.h>
8347 extern "C" void (*signal (int, void (*)(int)))(int);
8349 void (*signal ()) ();
8356 if { (eval echo configure:8357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8358 ac_cv_type_signal=void
8360 echo "configure: failed program was:" >&5
8361 cat conftest.$ac_ext >&5
8363 ac_cv_type_signal=int
8368 echo "$ac_t""$ac_cv_type_signal" 1>&6
8369 cat >> confdefs.h <<EOF
8370 #define RETSIGTYPE $ac_cv_type_signal
8375 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8376 echo "configure:8377: checking for ANSI C header files" >&5
8377 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
8378 echo $ac_n "(cached) $ac_c" 1>&6
8380 cat > conftest.$ac_ext <<EOF
8381 #line 8382 "configure"
8382 #include "confdefs.h"
8388 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8389 { (eval echo configure:8390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8390 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8391 if test -z "$ac_err"; then
8393 ac_cv_header_stdc=yes
8396 echo "configure: failed program was:" >&5
8397 cat conftest.$ac_ext >&5
8399 ac_cv_header_stdc=no
8403 if test $ac_cv_header_stdc = yes; then
8404 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8405 cat > conftest.$ac_ext <<EOF
8406 #line 8407 "configure"
8407 #include "confdefs.h"
8410 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8411 egrep "memchr" >/dev/null 2>&1; then
8415 ac_cv_header_stdc=no
8421 if test $ac_cv_header_stdc = yes; then
8422 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8423 cat > conftest.$ac_ext <<EOF
8424 #line 8425 "configure"
8425 #include "confdefs.h"
8428 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8429 egrep "free" >/dev/null 2>&1; then
8433 ac_cv_header_stdc=no
8439 if test $ac_cv_header_stdc = yes; then
8440 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8441 if test "$cross_compiling" = yes; then
8444 cat > conftest.$ac_ext <<EOF
8445 #line 8446 "configure"
8446 #include "confdefs.h"
8448 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8449 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8450 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8451 int main () { int i; for (i = 0; i < 256; i++)
8452 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8456 if { (eval echo configure:8457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8460 echo "configure: failed program was:" >&5
8461 cat conftest.$ac_ext >&5
8463 ac_cv_header_stdc=no
8471 echo "$ac_t""$ac_cv_header_stdc" 1>&6
8472 if test $ac_cv_header_stdc = yes; then
8473 cat >> confdefs.h <<\EOF
8474 #define STDC_HEADERS 1
8479 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
8480 echo "configure:8481: checking whether time.h and sys/time.h may both be included" >&5
8481 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
8482 echo $ac_n "(cached) $ac_c" 1>&6
8484 cat > conftest.$ac_ext <<EOF
8485 #line 8486 "configure"
8486 #include "confdefs.h"
8487 #include <sys/types.h>
8488 #include <sys/time.h>
8494 if { (eval echo configure:8495: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8496 ac_cv_header_time=yes
8498 echo "configure: failed program was:" >&5
8499 cat conftest.$ac_ext >&5
8501 ac_cv_header_time=no
8506 echo "$ac_t""$ac_cv_header_time" 1>&6
8507 if test $ac_cv_header_time = yes; then
8508 cat >> confdefs.h <<\EOF
8509 #define TIME_WITH_SYS_TIME 1
8525 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8526 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8527 echo "configure:8528: checking for $ac_hdr" >&5
8528 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8529 echo $ac_n "(cached) $ac_c" 1>&6
8531 cat > conftest.$ac_ext <<EOF
8532 #line 8533 "configure"
8533 #include "confdefs.h"
8536 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8537 { (eval echo configure:8538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8538 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8539 if test -z "$ac_err"; then
8541 eval "ac_cv_header_$ac_safe=yes"
8544 echo "configure: failed program was:" >&5
8545 cat conftest.$ac_ext >&5
8547 eval "ac_cv_header_$ac_safe=no"
8551 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8552 echo "$ac_t""yes" 1>&6
8553 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8554 cat >> confdefs.h <<EOF
8555 #define $ac_tr_hdr 1
8559 echo "$ac_t""no" 1>&6
8577 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8578 echo "configure:8579: checking for $ac_func" >&5
8579 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8580 echo $ac_n "(cached) $ac_c" 1>&6
8582 cat > conftest.$ac_ext <<EOF
8583 #line 8584 "configure"
8584 #include "confdefs.h"
8585 /* System header to define __stub macros and hopefully few prototypes,
8586 which can conflict with char $ac_func(); below. */
8588 /* Override any gcc2 internal prototype to avoid an error. */
8589 /* We use char because int might match the return type of a gcc2
8590 builtin and then its argument prototype would still apply. */
8595 /* The GNU C library defines this for functions which it implements
8596 to always fail with ENOSYS. Some functions are actually named
8597 something starting with __ and the normal name is an alias. */
8598 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8606 if { (eval echo configure:8607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8608 eval "ac_cv_func_$ac_func=yes"
8610 echo "configure: failed program was:" >&5
8611 cat conftest.$ac_ext >&5
8613 eval "ac_cv_func_$ac_func=no"
8618 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
8619 echo "$ac_t""yes" 1>&6
8620 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
8621 cat >> confdefs.h <<EOF
8622 #define $ac_tr_func 1
8626 echo "$ac_t""no" 1>&6
8632 echo $ac_n "checking if we must define _XOPEN_SOURCE_EXTENDED""... $ac_c" 1>&6
8633 echo "configure:8634: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
8634 if eval "test \"`echo '$''{'cf_cv_need_xopen_extension'+set}'`\" = set"; then
8635 echo $ac_n "(cached) $ac_c" 1>&6
8638 cat > conftest.$ac_ext <<EOF
8639 #line 8640 "configure"
8640 #include "confdefs.h"
8643 #include <${cf_cv_ncurses_header-curses.h}>
8646 #if defined(NCURSES_VERSION_PATCH)
8647 if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
8651 long x = winnstr(stdscr, "", 0);
8653 getbegyx(stdscr, y1, x1)
8656 if { (eval echo configure:8657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8658 cf_cv_need_xopen_extension=no
8660 echo "configure: failed program was:" >&5
8661 cat conftest.$ac_ext >&5
8663 cat > conftest.$ac_ext <<EOF
8664 #line 8665 "configure"
8665 #include "confdefs.h"
8667 #define _XOPEN_SOURCE_EXTENDED
8669 #include <${cf_cv_ncurses_header-curses.h}>
8672 #ifdef NCURSES_VERSION
8674 int check2 = curs_set((int)sizeof(check));
8676 long x = winnstr(stdscr, "", 0);
8678 getbegyx(stdscr, y1, x1)
8681 if { (eval echo configure:8682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8683 cf_cv_need_xopen_extension=yes
8685 echo "configure: failed program was:" >&5
8686 cat conftest.$ac_ext >&5
8688 cf_cv_need_xopen_extension=unknown
8695 echo "$ac_t""$cf_cv_need_xopen_extension" 1>&6
8696 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8700 echo $ac_n "checking for term.h""... $ac_c" 1>&6
8701 echo "configure:8702: checking for term.h" >&5
8702 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
8703 echo $ac_n "(cached) $ac_c" 1>&6
8707 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
8708 # for <term.h> if we do not find the variant.
8710 `echo ${cf_cv_ncurses_header-curses.h} | sed -e 's%/.*%/%'`term.h \
8713 cat > conftest.$ac_ext <<EOF
8714 #line 8715 "configure"
8715 #include "confdefs.h"
8717 #include <${cf_cv_ncurses_header-curses.h}>
8718 #include <${cf_header}>
8723 if { (eval echo configure:8724: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8725 cf_cv_term_header=$cf_header
8728 echo "configure: failed program was:" >&5
8729 cat conftest.$ac_ext >&5
8731 cf_cv_term_header=no
8736 case $cf_cv_term_header in #(vi
8738 # If curses is ncurses, some packagers still mess it up by trying to make
8739 # us use GNU termcap. This handles the most common case.
8740 for cf_header in ncurses/term.h ncursesw/term.h
8742 cat > conftest.$ac_ext <<EOF
8743 #line 8744 "configure"
8744 #include "confdefs.h"
8746 #include <${cf_cv_ncurses_header-curses.h}>
8747 #ifdef NCURSES_VERSION
8748 #include <${cf_header}>
8756 if { (eval echo configure:8757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8758 cf_cv_term_header=$cf_header
8761 echo "configure: failed program was:" >&5
8762 cat conftest.$ac_ext >&5
8764 cf_cv_term_header=no
8773 echo "$ac_t""$cf_cv_term_header" 1>&6
8775 case $cf_cv_term_header in #(vi
8777 cat >> confdefs.h <<\EOF
8778 #define HAVE_TERM_H 1
8782 ncurses/term.h) #(vi
8783 cat >> confdefs.h <<\EOF
8784 #define HAVE_NCURSES_TERM_H 1
8789 cat >> confdefs.h <<\EOF
8790 #define HAVE_NCURSESW_TERM_H 1
8824 use_default_colors \
8833 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8835 echo $ac_n "checking for ${cf_func}""... $ac_c" 1>&6
8836 echo "configure:8837: checking for ${cf_func}" >&5
8838 echo "${as_me-configure}:8839: testing ${cf_func} ..." 1>&5
8840 if eval "test \"`echo '$''{'cf_cv_func_$cf_func'+set}'`\" = set"; then
8841 echo $ac_n "(cached) $ac_c" 1>&6
8844 eval cf_result='$ac_cv_func_'$cf_func
8845 if test ".$cf_result" != ".no"; then
8846 cat > conftest.$ac_ext <<EOF
8847 #line 8848 "configure"
8848 #include "confdefs.h"
8851 #include <xcurses.h>
8852 char * XCursesProgramName = "test";
8854 #include <${cf_cv_ncurses_header-curses.h}>
8855 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
8856 #include <ncursesw/term.h>
8857 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
8858 #include <ncurses/term.h>
8859 #elif defined(HAVE_TERM_H)
8867 long foo = (long)(&${cf_func});
8868 ${cf_cv_main_return-return}(foo == 0);
8873 if { (eval echo configure:8874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8877 echo "configure: failed program was:" >&5
8878 cat conftest.$ac_ext >&5
8884 eval 'cf_cv_func_'$cf_func'=$cf_result'
8888 # use the computed/retrieved cache-value:
8889 eval 'cf_result=$cf_cv_func_'$cf_func
8890 echo "$ac_t""$cf_result" 1>&6
8891 if test $cf_result != no; then
8892 cat >> confdefs.h <<EOF
8893 #define HAVE_${cf_tr_func} 1
8901 echo $ac_n "checking for ncurses extended functions""... $ac_c" 1>&6
8902 echo "configure:8903: checking for ncurses extended functions" >&5
8903 if eval "test \"`echo '$''{'cf_cv_ncurses_ext_funcs'+set}'`\" = set"; then
8904 echo $ac_n "(cached) $ac_c" 1>&6
8907 cat > conftest.$ac_ext <<EOF
8908 #line 8909 "configure"
8909 #include "confdefs.h"
8911 #include <${cf_cv_ncurses_header-curses.h}>
8914 int x = NCURSES_EXT_FUNCS
8918 if { (eval echo configure:8919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8920 cf_cv_ncurses_ext_funcs=defined
8922 echo "configure: failed program was:" >&5
8923 cat conftest.$ac_ext >&5
8926 cat > conftest.$ac_ext <<EOF
8927 #line 8928 "configure"
8928 #include "confdefs.h"
8930 #include <${cf_cv_ncurses_header-curses.h}>
8933 (void) assume_default_colors (0, 0);
8934 (void) curses_version ();
8935 (void) define_key (0, 0);
8936 (void) is_term_resized (0, 0);
8937 (void) key_defined (0);
8938 (void) keybound (0, 0);
8939 (void) keyok (0, 0);
8940 (void) resize_term (0, 0);
8941 (void) resizeterm (0, 0);
8942 (void) use_default_colors ();
8943 (void) use_extended_names (0);
8944 (void) wresize (0, 0, 0);
8947 if { (eval echo configure:8948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8949 cf_cv_ncurses_ext_funcs=yes
8951 echo "configure: failed program was:" >&5
8952 cat conftest.$ac_ext >&5
8954 cf_cv_ncurses_ext_funcs=no
8963 echo "$ac_t""$cf_cv_ncurses_ext_funcs" 1>&6
8964 test "$cf_cv_ncurses_ext_funcs" == yes && cat >> confdefs.h <<\EOF
8965 #define NCURSES_EXT_FUNCS 1
8970 echo $ac_n "checking for wide-character functions""... $ac_c" 1>&6
8971 echo "configure:8972: checking for wide-character functions" >&5
8972 if eval "test \"`echo '$''{'cf_cv_widechar_funcs'+set}'`\" = set"; then
8973 echo $ac_n "(cached) $ac_c" 1>&6
8976 cat > conftest.$ac_ext <<EOF
8977 #line 8978 "configure"
8978 #include "confdefs.h"
8980 #include <${cf_cv_ncurses_header-curses.h}>
8983 static wchar_t src_wchar[2];
8984 static cchar_t dst_cchar;
8985 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
8989 if { (eval echo configure:8990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8991 cf_cv_widechar_funcs=yes
8993 echo "configure: failed program was:" >&5
8994 cat conftest.$ac_ext >&5
8996 cf_cv_widechar_funcs=no
9002 echo "$ac_t""$cf_cv_widechar_funcs" 1>&6
9003 if test "$cf_cv_widechar_funcs" != no ; then
9004 cat >> confdefs.h <<\EOF
9005 #define USE_WIDEC_SUPPORT 1
9009 cat >> confdefs.h <<\EOF
9010 #define USE_WIDEC_SUPPORT 0
9015 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
9016 echo "configure:9017: checking for pid_t" >&5
9017 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
9018 echo $ac_n "(cached) $ac_c" 1>&6
9020 cat > conftest.$ac_ext <<EOF
9021 #line 9022 "configure"
9022 #include "confdefs.h"
9023 #include <sys/types.h>
9029 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9030 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9032 ac_cv_type_pid_t=yes
9040 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
9041 if test $ac_cv_type_pid_t = no; then
9042 cat >> confdefs.h <<\EOF
9048 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
9049 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
9050 echo "configure:9051: checking for vfork.h" >&5
9051 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9052 echo $ac_n "(cached) $ac_c" 1>&6
9054 cat > conftest.$ac_ext <<EOF
9055 #line 9056 "configure"
9056 #include "confdefs.h"
9059 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9060 { (eval echo configure:9061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9061 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9062 if test -z "$ac_err"; then
9064 eval "ac_cv_header_$ac_safe=yes"
9067 echo "configure: failed program was:" >&5
9068 cat conftest.$ac_ext >&5
9070 eval "ac_cv_header_$ac_safe=no"
9074 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9075 echo "$ac_t""yes" 1>&6
9076 cat >> confdefs.h <<\EOF
9077 #define HAVE_VFORK_H 1
9081 echo "$ac_t""no" 1>&6
9084 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
9085 echo "configure:9086: checking for working vfork" >&5
9086 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
9087 echo $ac_n "(cached) $ac_c" 1>&6
9089 if test "$cross_compiling" = yes; then
9090 echo $ac_n "checking for vfork""... $ac_c" 1>&6
9091 echo "configure:9092: checking for vfork" >&5
9092 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
9093 echo $ac_n "(cached) $ac_c" 1>&6
9095 cat > conftest.$ac_ext <<EOF
9096 #line 9097 "configure"
9097 #include "confdefs.h"
9098 /* System header to define __stub macros and hopefully few prototypes,
9099 which can conflict with char vfork(); below. */
9101 /* Override any gcc2 internal prototype to avoid an error. */
9102 /* We use char because int might match the return type of a gcc2
9103 builtin and then its argument prototype would still apply. */
9108 /* The GNU C library defines this for functions which it implements
9109 to always fail with ENOSYS. Some functions are actually named
9110 something starting with __ and the normal name is an alias. */
9111 #if defined (__stub_vfork) || defined (__stub___vfork)
9119 if { (eval echo configure:9120: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9121 eval "ac_cv_func_vfork=yes"
9123 echo "configure: failed program was:" >&5
9124 cat conftest.$ac_ext >&5
9126 eval "ac_cv_func_vfork=no"
9131 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
9132 echo "$ac_t""yes" 1>&6
9135 echo "$ac_t""no" 1>&6
9138 ac_cv_func_vfork_works=$ac_cv_func_vfork
9140 cat > conftest.$ac_ext <<EOF
9141 #line 9142 "configure"
9142 #include "confdefs.h"
9143 /* Thanks to Paul Eggert for this test. */
9145 #include <sys/types.h>
9146 #include <sys/stat.h>
9147 #ifdef HAVE_UNISTD_H
9153 /* On some sparc systems, changes by the child to local and incoming
9154 argument registers are propagated back to the parent.
9155 The compiler is told about this with #include <vfork.h>,
9156 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
9157 Test for this by using a static variable whose address
9158 is put into a register that is clobbered by the vfork. */
9161 sparc_address_test (int arg)
9163 sparc_address_test (arg) int arg;
9181 pid_t parent = getpid ();
9184 sparc_address_test ();
9189 /* Here is another test for sparc vfork register problems.
9190 This test uses lots of local variables, at least
9191 as many local variables as main has allocated so far
9192 including compiler temporaries. 4 locals are enough for
9193 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
9194 A buggy compiler should reuse the register of parent
9195 for one of the local variables, since it will think that
9196 parent can't possibly be used any more in this routine.
9197 Assigning to the local variable will thus munge parent
9198 in the parent process. */
9200 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9201 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9202 /* Convince the compiler that p..p7 are live; otherwise, it might
9203 use the same hardware register for all 8 local variables. */
9204 if (p != p1 || p != p2 || p != p3 || p != p4
9205 || p != p5 || p != p6 || p != p7)
9208 /* On some systems (e.g. IRIX 3.3),
9209 vfork doesn't separate parent from child file descriptors.
9210 If the child closes a descriptor before it execs or exits,
9211 this munges the parent's descriptor as well.
9212 Test for this by closing stdout in the child. */
9213 _exit(close(fileno(stdout)) != 0);
9218 while (wait(&status) != child)
9221 /* Was there some problem with vforking? */
9224 /* Did the child fail? (This shouldn't happen.) */
9227 /* Did the vfork/compiler bug occur? */
9228 || parent != getpid()
9230 /* Did the file descriptor bug occur? */
9231 || fstat(fileno(stdout), &st) != 0
9236 if { (eval echo configure:9237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9238 ac_cv_func_vfork_works=yes
9240 echo "configure: failed program was:" >&5
9241 cat conftest.$ac_ext >&5
9243 ac_cv_func_vfork_works=no
9250 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
9251 if test $ac_cv_func_vfork_works = no; then
9252 cat >> confdefs.h <<\EOF
9259 echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
9260 echo "configure:9261: checking if sys/time.h works with sys/select.h" >&5
9261 if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
9262 echo $ac_n "(cached) $ac_c" 1>&6
9265 cat > conftest.$ac_ext <<EOF
9266 #line 9267 "configure"
9267 #include "confdefs.h"
9269 #include <sys/types.h>
9270 #ifdef HAVE_SYS_TIME_H
9271 #include <sys/time.h>
9273 #ifdef HAVE_SYS_SELECT_H
9274 #include <sys/select.h>
9281 if { (eval echo configure:9282: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9283 cf_cv_sys_time_select=yes
9285 echo "configure: failed program was:" >&5
9286 cat conftest.$ac_ext >&5
9288 cf_cv_sys_time_select=no
9294 echo "$ac_t""$cf_cv_sys_time_select" 1>&6
9295 test "$cf_cv_sys_time_select" = yes && cat >> confdefs.h <<\EOF
9296 #define HAVE_SYS_TIME_SELECT 1
9301 echo $ac_n "checking for function curses_version""... $ac_c" 1>&6
9302 echo "configure:9303: checking for function curses_version" >&5
9303 if eval "test \"`echo '$''{'cf_cv_func_curses_version'+set}'`\" = set"; then
9304 echo $ac_n "(cached) $ac_c" 1>&6
9307 if test "$cross_compiling" = yes; then
9308 cf_cv_func_curses_version=unknown
9310 cat > conftest.$ac_ext <<EOF
9311 #line 9312 "configure"
9312 #include "confdefs.h"
9314 #include <${cf_cv_ncurses_header-curses.h}>
9318 sprintf(temp, "%s\n", curses_version());
9319 ${cf_cv_main_return-return}(0);
9323 if { (eval echo configure:9324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9325 cf_cv_func_curses_version=yes
9328 echo "configure: failed program was:" >&5
9329 cat conftest.$ac_ext >&5
9331 cf_cv_func_curses_version=no
9340 echo "$ac_t""$cf_cv_func_curses_version" 1>&6
9341 test "$cf_cv_func_curses_version" = yes && cat >> confdefs.h <<\EOF
9342 #define HAVE_CURSES_VERSION 1
9347 echo $ac_n "checking for ncurses wrap-prefix""... $ac_c" 1>&6
9348 echo "configure:9349: checking for ncurses wrap-prefix" >&5
9350 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
9351 if test "${with_ncurses_wrap_prefix+set}" = set; then
9352 withval="$with_ncurses_wrap_prefix"
9353 NCURSES_WRAP_PREFIX=$withval
9355 NCURSES_WRAP_PREFIX=_nc_
9358 echo "$ac_t""$NCURSES_WRAP_PREFIX" 1>&6
9363 echo $ac_n "checking for alternate character set array""... $ac_c" 1>&6
9364 echo "configure:9365: checking for alternate character set array" >&5
9365 if eval "test \"`echo '$''{'cf_cv_curses_acs_map'+set}'`\" = set"; then
9366 echo $ac_n "(cached) $ac_c" 1>&6
9369 cf_cv_curses_acs_map=unknown
9370 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
9372 cat > conftest.$ac_ext <<EOF
9373 #line 9374 "configure"
9374 #include "confdefs.h"
9376 #include <${cf_cv_ncurses_header-curses.h}>
9380 $name['k'] = ACS_PLUS
9384 if { (eval echo configure:9385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9386 cf_cv_curses_acs_map=$name; break
9388 echo "configure: failed program was:" >&5
9389 cat conftest.$ac_ext >&5
9396 echo "$ac_t""$cf_cv_curses_acs_map" 1>&6
9398 test "$cf_cv_curses_acs_map" != unknown && cat >> confdefs.h <<EOF
9399 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
9404 echo $ac_n "checking for wide alternate character set array""... $ac_c" 1>&6
9405 echo "configure:9406: checking for wide alternate character set array" >&5
9406 if eval "test \"`echo '$''{'cf_cv_curses_wacs_map'+set}'`\" = set"; then
9407 echo $ac_n "(cached) $ac_c" 1>&6
9410 cf_cv_curses_wacs_map=unknown
9411 for name in wacs_map _wacs_map __wacs_map _nc_wacs
9413 cat > conftest.$ac_ext <<EOF
9414 #line 9415 "configure"
9415 #include "confdefs.h"
9417 #ifndef _XOPEN_SOURCE_EXTENDED
9418 #define _XOPEN_SOURCE_EXTENDED
9420 #include <${cf_cv_ncurses_header-curses.h}>
9422 $name['k'] = *WACS_PLUS
9425 if { (eval echo configure:9426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9427 cf_cv_curses_wacs_map=$name
9430 echo "configure: failed program was:" >&5
9431 cat conftest.$ac_ext >&5
9437 echo "$ac_t""$cf_cv_curses_wacs_map" 1>&6
9441 echo $ac_n "checking for type attr_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
9442 echo "configure:9443: checking for type attr_t in ${cf_cv_ncurses_header-curses.h}" >&5
9443 cat > conftest.$ac_ext <<EOF
9444 #line 9445 "configure"
9445 #include "confdefs.h"
9447 #ifndef _XOPEN_SOURCE_EXTENDED
9448 #define _XOPEN_SOURCE_EXTENDED
9450 #include <${cf_cv_ncurses_header-curses.h}>
9457 if { (eval echo configure:9458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9461 echo "configure: failed program was:" >&5
9462 cat conftest.$ac_ext >&5
9467 echo "$ac_t""$cf_result" 1>&6
9468 if test $cf_result = yes ; then
9470 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9472 cat >> confdefs.h <<EOF
9473 #define $cf_result 1
9477 cat >> confdefs.h <<EOF
9485 # This is needed on Tru64 5.0 to declare mbstate_t
9486 echo $ac_n "checking if we must include wchar.h to declare mbstate_t""... $ac_c" 1>&6
9487 echo "configure:9488: checking if we must include wchar.h to declare mbstate_t" >&5
9488 if eval "test \"`echo '$''{'cf_cv_mbstate_t'+set}'`\" = set"; then
9489 echo $ac_n "(cached) $ac_c" 1>&6
9492 cat > conftest.$ac_ext <<EOF
9493 #line 9494 "configure"
9494 #include "confdefs.h"
9499 #ifdef HAVE_LIBUTF8_H
9500 #include <libutf8.h>
9506 if { (eval echo configure:9507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9510 echo "configure: failed program was:" >&5
9511 cat conftest.$ac_ext >&5
9513 cat > conftest.$ac_ext <<EOF
9514 #line 9515 "configure"
9515 #include "confdefs.h"
9521 #ifdef HAVE_LIBUTF8_H
9522 #include <libutf8.h>
9528 if { (eval echo configure:9529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9532 echo "configure: failed program was:" >&5
9533 cat conftest.$ac_ext >&5
9535 cf_cv_mbstate_t=unknown
9542 echo "$ac_t""$cf_cv_mbstate_t" 1>&6
9544 if test "$cf_cv_mbstate_t" = yes ; then
9545 cat >> confdefs.h <<\EOF
9546 #define NEED_WCHAR_H 1
9553 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9554 if test "$cf_cv_mbstate_t" = unknown ; then
9559 # if we find mbstate_t in either place, use substitution to provide a fallback.
9560 if test "$cf_cv_mbstate_t" != unknown ; then
9561 NCURSES_OK_MBSTATE_T=1
9566 # This is needed on Tru64 5.0 to declare wchar_t
9567 echo $ac_n "checking if we must include wchar.h to declare wchar_t""... $ac_c" 1>&6
9568 echo "configure:9569: checking if we must include wchar.h to declare wchar_t" >&5
9569 if eval "test \"`echo '$''{'cf_cv_wchar_t'+set}'`\" = set"; then
9570 echo $ac_n "(cached) $ac_c" 1>&6
9573 cat > conftest.$ac_ext <<EOF
9574 #line 9575 "configure"
9575 #include "confdefs.h"
9580 #ifdef HAVE_LIBUTF8_H
9581 #include <libutf8.h>
9587 if { (eval echo configure:9588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9591 echo "configure: failed program was:" >&5
9592 cat conftest.$ac_ext >&5
9594 cat > conftest.$ac_ext <<EOF
9595 #line 9596 "configure"
9596 #include "confdefs.h"
9602 #ifdef HAVE_LIBUTF8_H
9603 #include <libutf8.h>
9609 if { (eval echo configure:9610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9613 echo "configure: failed program was:" >&5
9614 cat conftest.$ac_ext >&5
9616 cf_cv_wchar_t=unknown
9623 echo "$ac_t""$cf_cv_wchar_t" 1>&6
9625 if test "$cf_cv_wchar_t" = yes ; then
9626 cat >> confdefs.h <<\EOF
9627 #define NEED_WCHAR_H 1
9634 # if we do not find wchar_t in either place, use substitution to provide a fallback.
9635 if test "$cf_cv_wchar_t" = unknown ; then
9640 # if we find wchar_t in either place, use substitution to provide a fallback.
9641 if test "$cf_cv_wchar_t" != unknown ; then
9642 NCURSES_OK_WCHAR_T=1
9647 # This is needed on Tru64 5.0 to declare wint_t
9648 echo $ac_n "checking if we must include wchar.h to declare wint_t""... $ac_c" 1>&6
9649 echo "configure:9650: checking if we must include wchar.h to declare wint_t" >&5
9650 if eval "test \"`echo '$''{'cf_cv_wint_t'+set}'`\" = set"; then
9651 echo $ac_n "(cached) $ac_c" 1>&6
9654 cat > conftest.$ac_ext <<EOF
9655 #line 9656 "configure"
9656 #include "confdefs.h"
9661 #ifdef HAVE_LIBUTF8_H
9662 #include <libutf8.h>
9668 if { (eval echo configure:9669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9672 echo "configure: failed program was:" >&5
9673 cat conftest.$ac_ext >&5
9675 cat > conftest.$ac_ext <<EOF
9676 #line 9677 "configure"
9677 #include "confdefs.h"
9683 #ifdef HAVE_LIBUTF8_H
9684 #include <libutf8.h>
9690 if { (eval echo configure:9691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9694 echo "configure: failed program was:" >&5
9695 cat conftest.$ac_ext >&5
9697 cf_cv_wint_t=unknown
9704 echo "$ac_t""$cf_cv_wint_t" 1>&6
9706 if test "$cf_cv_wint_t" = yes ; then
9707 cat >> confdefs.h <<\EOF
9708 #define NEED_WCHAR_H 1
9715 # if we do not find wint_t in either place, use substitution to provide a fallback.
9716 if test "$cf_cv_wint_t" = unknown ; then
9721 # if we find wint_t in either place, use substitution to provide a fallback.
9722 if test "$cf_cv_wint_t" != unknown ; then
9728 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
9730 echo $ac_n "checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
9731 echo "configure:9732: checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}" >&5
9732 cat > conftest.$ac_ext <<EOF
9733 #line 9734 "configure"
9734 #include "confdefs.h"
9736 #ifndef _XOPEN_SOURCE_EXTENDED
9737 #define _XOPEN_SOURCE_EXTENDED
9739 #include <${cf_cv_ncurses_header-curses.h}>
9746 if { (eval echo configure:9747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9750 echo "configure: failed program was:" >&5
9751 cat conftest.$ac_ext >&5
9756 echo "$ac_t""$cf_result" 1>&6
9757 if test $cf_result = yes ; then
9759 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9761 cat >> confdefs.h <<EOF
9762 #define $cf_result 1
9766 cat >> confdefs.h <<EOF
9767 #define mbstate_t long
9774 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
9776 echo $ac_n "checking for type wchar_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
9777 echo "configure:9778: checking for type wchar_t in ${cf_cv_ncurses_header-curses.h}" >&5
9778 cat > conftest.$ac_ext <<EOF
9779 #line 9780 "configure"
9780 #include "confdefs.h"
9782 #ifndef _XOPEN_SOURCE_EXTENDED
9783 #define _XOPEN_SOURCE_EXTENDED
9785 #include <${cf_cv_ncurses_header-curses.h}>
9792 if { (eval echo configure:9793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9796 echo "configure: failed program was:" >&5
9797 cat conftest.$ac_ext >&5
9802 echo "$ac_t""$cf_result" 1>&6
9803 if test $cf_result = yes ; then
9805 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9807 cat >> confdefs.h <<EOF
9808 #define $cf_result 1
9812 cat >> confdefs.h <<EOF
9813 #define wchar_t long
9820 if test "$NCURSES_OK_WINT_T" = 0 ; then
9822 echo $ac_n "checking for type wint_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
9823 echo "configure:9824: checking for type wint_t in ${cf_cv_ncurses_header-curses.h}" >&5
9824 cat > conftest.$ac_ext <<EOF
9825 #line 9826 "configure"
9826 #include "confdefs.h"
9828 #ifndef _XOPEN_SOURCE_EXTENDED
9829 #define _XOPEN_SOURCE_EXTENDED
9831 #include <${cf_cv_ncurses_header-curses.h}>
9838 if { (eval echo configure:9839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9842 echo "configure: failed program was:" >&5
9843 cat conftest.$ac_ext >&5
9848 echo "$ac_t""$cf_result" 1>&6
9849 if test $cf_result = yes ; then
9851 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9853 cat >> confdefs.h <<EOF
9854 #define $cf_result 1
9858 cat >> confdefs.h <<EOF
9867 echo $ac_n "checking for data boolnames declaration in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
9868 echo "configure:9869: checking for data boolnames declaration in ${cf_cv_ncurses_header-curses.h}" >&5
9869 cat > conftest.$ac_ext <<EOF
9870 #line 9871 "configure"
9871 #include "confdefs.h"
9874 #include <xcurses.h>
9875 char * XCursesProgramName = "test";
9877 #include <${cf_cv_ncurses_header-curses.h}>
9878 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
9879 #include <ncursesw/term.h>
9880 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
9881 #include <ncurses/term.h>
9882 #elif defined(HAVE_TERM_H)
9889 void *foo = &(boolnames)
9893 if { (eval echo configure:9894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9897 echo "configure: failed program was:" >&5
9898 cat conftest.$ac_ext >&5
9903 echo "$ac_t""$cf_result" 1>&6
9904 if test $cf_result = yes ; then
9906 cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9908 cat >> confdefs.h <<EOF
9909 #define $cf_result 1
9913 echo $ac_n "checking for data boolnames in library""... $ac_c" 1>&6
9914 echo "configure:9915: checking for data boolnames in library" >&5
9915 cat > conftest.$ac_ext <<EOF
9916 #line 9917 "configure"
9917 #include "confdefs.h"
9920 #include <xcurses.h>
9921 char * XCursesProgramName = "test";
9923 #include <${cf_cv_ncurses_header-curses.h}>
9924 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
9925 #include <ncursesw/term.h>
9926 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
9927 #include <ncurses/term.h>
9928 #elif defined(HAVE_TERM_H)
9933 extern char boolnames;
9937 void *foo = &(boolnames);
9938 ${cf_cv_main_return-return}(foo == 0);
9943 if { (eval echo configure:9944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9947 echo "configure: failed program was:" >&5
9948 cat conftest.$ac_ext >&5
9953 echo "$ac_t""$cf_result" 1>&6
9954 if test $cf_result = yes ; then
9956 cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9958 cat >> confdefs.h <<EOF
9959 #define $cf_result 1
9966 echo $ac_n "checking for data boolfnames declaration in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
9967 echo "configure:9968: checking for data boolfnames declaration in ${cf_cv_ncurses_header-curses.h}" >&5
9968 cat > conftest.$ac_ext <<EOF
9969 #line 9970 "configure"
9970 #include "confdefs.h"
9973 #include <xcurses.h>
9974 char * XCursesProgramName = "test";
9976 #include <${cf_cv_ncurses_header-curses.h}>
9977 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
9978 #include <ncursesw/term.h>
9979 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
9980 #include <ncurses/term.h>
9981 #elif defined(HAVE_TERM_H)
9988 void *foo = &(boolfnames)
9992 if { (eval echo configure:9993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9996 echo "configure: failed program was:" >&5
9997 cat conftest.$ac_ext >&5
10002 echo "$ac_t""$cf_result" 1>&6
10003 if test $cf_result = yes ; then
10005 cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10007 cat >> confdefs.h <<EOF
10008 #define $cf_result 1
10012 echo $ac_n "checking for data boolfnames in library""... $ac_c" 1>&6
10013 echo "configure:10014: checking for data boolfnames in library" >&5
10014 cat > conftest.$ac_ext <<EOF
10015 #line 10016 "configure"
10016 #include "confdefs.h"
10018 #ifdef HAVE_XCURSES
10019 #include <xcurses.h>
10020 char * XCursesProgramName = "test";
10022 #include <${cf_cv_ncurses_header-curses.h}>
10023 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
10024 #include <ncursesw/term.h>
10025 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
10026 #include <ncurses/term.h>
10027 #elif defined(HAVE_TERM_H)
10032 extern char boolfnames;
10036 void *foo = &(boolfnames);
10037 ${cf_cv_main_return-return}(foo == 0);
10042 if { (eval echo configure:10043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10046 echo "configure: failed program was:" >&5
10047 cat conftest.$ac_ext >&5
10052 echo "$ac_t""$cf_result" 1>&6
10053 if test $cf_result = yes ; then
10055 cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10057 cat >> confdefs.h <<EOF
10058 #define $cf_result 1
10070 cat > confcache <<\EOF
10071 # This file is a shell script that caches the results of configure
10072 # tests run on this system so they can be shared between configure
10073 # scripts and configure runs. It is not useful on other systems.
10074 # If it contains results you don't want to keep, you may remove or edit it.
10076 # By default, configure uses ./config.cache as the cache file,
10077 # creating it if it does not exist already. You can give configure
10078 # the --cache-file=FILE option to use a different cache file; that is
10079 # what configure does when it calls configure scripts in
10080 # subdirectories, so they share the cache.
10081 # Giving --cache-file=/dev/null disables caching, for debugging configure.
10082 # config.status only pays attention to the cache file if you give it the
10083 # --recheck option to rerun configure.
10086 # The following way of writing the cache mishandles newlines in values,
10087 # but we know of no workaround that is simple, portable, and efficient.
10088 # So, don't put newlines in cache variables' values.
10089 # Ultrix sh set writes to stderr and can't be redirected directly,
10090 # and sets the high bit in the cache file unless we assign to the vars.
10092 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10094 # `set' does not quote correctly, so add quotes (double-quote substitution
10095 # turns \\\\ into \\, and sed turns \\ into \).
10097 -e "s/'/'\\\\''/g" \
10098 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10101 # `set' quotes correctly as required by POSIX, so do not add quotes.
10102 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10105 if cmp -s $cache_file confcache; then
10108 if test -w $cache_file; then
10109 echo "updating cache $cache_file"
10110 cat confcache > $cache_file
10112 echo "not updating unwritable cache $cache_file"
10117 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10119 test "x$prefix" = xNONE && prefix=$ac_default_prefix
10120 # Let make expand exec_prefix.
10121 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10123 # Any assignment to VPATH causes Sun make to only execute
10124 # the first set of double-colon rules, so remove it if not needed.
10125 # If there is a colon in the path, we need to keep it.
10126 if test "x$srcdir" = x.; then
10127 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
10130 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10132 DEFS=-DHAVE_CONFIG_H
10134 # Without the "./", some shells look in PATH for config.status.
10135 : ${CONFIG_STATUS=./config.status}
10137 echo creating $CONFIG_STATUS
10138 rm -f $CONFIG_STATUS
10139 cat > $CONFIG_STATUS <<EOF
10141 # Generated automatically by configure.
10142 # Run this file to recreate the current configuration.
10143 # This directory was configured as follows,
10144 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10146 # $0 $ac_configure_args
10148 # Compiler output produced by configure, useful for debugging
10149 # configure, is in ./config.log if it exists.
10151 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10154 case "\$ac_option" in
10155 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10156 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10157 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10158 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10159 echo "$CONFIG_STATUS generated by autoconf version 2.13.20030927"
10161 -help | --help | --hel | --he | --h)
10162 echo "\$ac_cs_usage"; exit 0 ;;
10163 *) echo "\$ac_cs_usage"; exit 1 ;;
10167 ac_given_srcdir=$srcdir
10169 trap 'rm -fr `echo "Makefile ncurses_cfg.h:ncurses_tst.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
10171 cat >> $CONFIG_STATUS <<EOF
10173 # Protect against being on the right side of a sed subst in config.status.
10174 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10175 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10179 s%@CFLAGS@%$CFLAGS%g
10180 s%@CPPFLAGS@%$CPPFLAGS%g
10181 s%@CXXFLAGS@%$CXXFLAGS%g
10182 s%@FFLAGS@%$FFLAGS%g
10184 s%@LDFLAGS@%$LDFLAGS%g
10186 s%@exec_prefix@%$exec_prefix%g
10187 s%@prefix@%$prefix%g
10188 s%@program_transform_name@%$program_transform_name%g
10189 s%@bindir@%$bindir%g
10190 s%@sbindir@%$sbindir%g
10191 s%@libexecdir@%$libexecdir%g
10192 s%@datadir@%$datadir%g
10193 s%@sysconfdir@%$sysconfdir%g
10194 s%@sharedstatedir@%$sharedstatedir%g
10195 s%@localstatedir@%$localstatedir%g
10196 s%@libdir@%$libdir%g
10197 s%@includedir@%$includedir%g
10198 s%@oldincludedir@%$oldincludedir%g
10199 s%@infodir@%$infodir%g
10200 s%@mandir@%$mandir%g
10202 s%@host_alias@%$host_alias%g
10203 s%@host_cpu@%$host_cpu%g
10204 s%@host_vendor@%$host_vendor%g
10205 s%@host_os@%$host_os%g
10206 s%@SET_MAKE@%$SET_MAKE%g
10212 s%@MAKE_LOWER_TAGS@%$MAKE_LOWER_TAGS%g
10213 s%@MAKE_UPPER_TAGS@%$MAKE_UPPER_TAGS%g
10214 s%@CC_G_OPT@%$CC_G_OPT%g
10215 s%@CC_SHARED_OPTS@%$CC_SHARED_OPTS%g
10216 s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g
10217 s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g
10218 s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
10220 s%@LDFLAGS_SHARED@%$LDFLAGS_SHARED%g
10221 s%@LDFLAGS_STATIC@%$LDFLAGS_STATIC%g
10222 s%@LD_MODEL@%$LD_MODEL%g
10223 s%@LD_SHARED_OPTS@%$LD_SHARED_OPTS%g
10224 s%@LIBTOOL@%$LIBTOOL%g
10225 s%@LIB_CLEAN@%$LIB_CLEAN%g
10226 s%@LIB_COMPILE@%$LIB_COMPILE%g
10227 s%@LIB_LINK@%$LIB_LINK%g
10228 s%@LINK_TESTS@%$LINK_TESTS%g
10230 s%@LINT_OPTS@%$LINT_OPTS%g
10231 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
10232 s%@MATH_LIB@%$MATH_LIB%g
10233 s%@PTHREAD@%$PTHREAD%g
10234 s%@TEST_ARGS@%$TEST_ARGS%g
10235 s%@TEST_DEPS@%$TEST_DEPS%g
10236 s%@TEST_LIBS@%$TEST_LIBS%g
10237 s%@TINFO_ARGS@%$TINFO_ARGS%g
10238 s%@cf_cv_abi_version@%$cf_cv_abi_version%g
10239 s%@cf_cv_rel_version@%$cf_cv_rel_version%g
10240 s%@EXEEXT@%$EXEEXT%g
10241 s%@OBJEXT@%$OBJEXT%g
10242 s%@EXTRA_CPPFLAGS@%$EXTRA_CPPFLAGS%g
10243 s%@ECHO_LT@%$ECHO_LT%g
10244 s%@ECHO_LD@%$ECHO_LD%g
10245 s%@RULE_CC@%$RULE_CC%g
10246 s%@SHOW_CC@%$SHOW_CC%g
10247 s%@ECHO_CC@%$ECHO_CC%g
10248 s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
10249 s%@NCURSES_CONFIG@%$NCURSES_CONFIG%g
10250 s%@X_CFLAGS@%$X_CFLAGS%g
10251 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
10252 s%@X_LIBS@%$X_LIBS%g
10253 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
10254 s%@XCURSES_CONFIG@%$XCURSES_CONFIG%g
10255 s%@NCURSES_WRAP_PREFIX@%$NCURSES_WRAP_PREFIX%g
10260 cat >> $CONFIG_STATUS <<\EOF
10262 # Split the substitutions into bite-sized pieces for seds with
10263 # small command number limits, like on Digital OSF/1 and HP-UX.
10264 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
10265 ac_file=1 # Number of current file.
10266 ac_beg=1 # First line for current file.
10267 ac_end=$ac_max_sed_cmds # Line after last line for current file.
10270 while $ac_more_lines; do
10271 if test $ac_beg -gt 1; then
10272 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10274 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10276 if test ! -s conftest.s$ac_file; then
10277 ac_more_lines=false
10278 rm -f conftest.s$ac_file
10280 if test -z "$ac_sed_cmds"; then
10281 ac_sed_cmds="sed -f conftest.s$ac_file"
10283 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10285 ac_file=`expr $ac_file + 1`
10287 ac_end=`expr $ac_end + $ac_max_sed_cmds`
10290 if test -z "$ac_sed_cmds"; then
10295 cat >> $CONFIG_STATUS <<EOF
10297 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
10299 cat >> $CONFIG_STATUS <<\EOF
10300 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
10301 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10303 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10304 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10305 *) ac_file_in="${ac_file}.in" ;;
10308 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
10310 # Remove last slash and all that follows it. Not all systems have dirname.
10311 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10312 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10313 # The file is in a subdirectory.
10314 test ! -d "$ac_dir" && mkdir "$ac_dir"
10315 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
10316 # A "../" for each directory in $ac_dir_suffix.
10317 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
10319 ac_dir_suffix= ac_dots=
10322 case "$ac_given_srcdir" in
10324 if test -z "$ac_dots"; then top_srcdir=.
10325 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
10326 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
10327 *) # Relative path.
10328 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
10329 top_srcdir="$ac_dots$ac_given_srcdir" ;;
10333 echo creating "$ac_file"
10335 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
10337 *Makefile*) ac_comsub="1i\\
10338 # $configure_input" ;;
10342 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10344 s%@configure_input@%$configure_input%g
10345 s%@srcdir@%$srcdir%g
10346 s%@top_srcdir@%$top_srcdir%g
10347 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
10351 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10352 # NAME is the cpp macro being defined and VALUE is the value it is being given.
10354 # ac_d sets the value in "#define NAME VALUE" lines.
10355 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
10356 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
10359 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
10360 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10361 ac_uB='\([ ]\)%\1#\2define\3'
10364 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
10365 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10366 ac_eB='$%\1#\2define\3'
10370 if test "${CONFIG_HEADERS+set}" != set; then
10372 cat >> $CONFIG_STATUS <<EOF
10373 CONFIG_HEADERS="ncurses_cfg.h:ncurses_tst.hin"
10375 cat >> $CONFIG_STATUS <<\EOF
10377 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
10378 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10380 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10381 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10382 *) ac_file_in="${ac_file}.in" ;;
10385 echo creating $ac_file
10387 rm -f conftest.frag conftest.in conftest.out
10388 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10389 cat $ac_file_inputs > conftest.in
10394 # Transform confdefs.h into a list of #define's. We won't use it as a sed
10395 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
10396 # be either 'cat' or 'sort'.
10397 cat confdefs.h >conftest.vals
10399 # Break up conftest.vals because some shells have a limit on
10400 # the size of here documents, and old seds have small limits too.
10402 rm -f conftest.tail
10403 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
10406 ac_lines=`grep -c . conftest.vals`
10407 # grep -c gives empty output for an empty file on some AIX systems.
10408 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
10409 # Write chunks of a limited-size here document to conftest.frag.
10410 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
10411 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
10412 echo 'CEOF' >> $CONFIG_STATUS
10413 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
10414 rm -f conftest.vals
10415 mv conftest.tail conftest.vals
10417 rm -f conftest.vals
10419 # Run sed to substitute the contents of conftest.frag into conftest.in at the
10421 echo ' cat >> conftest.edit <<CEOF
10422 /@DEFS@/r conftest.frag
10425 sed -f conftest.edit conftest.in > conftest.out
10427 mv conftest.out conftest.in
10428 rm -f conftest.edit conftest.frag
10429 ' >> $CONFIG_STATUS
10432 cat >> $CONFIG_STATUS <<\EOF
10433 rm -f conftest.frag conftest.h
10434 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
10435 cat conftest.in >> conftest.h
10437 if cmp -s $ac_file conftest.h 2>/dev/null; then
10438 echo "$ac_file is unchanged"
10441 # Remove last slash and all that follows it. Not all systems have dirname.
10442 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10443 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10444 # The file is in a subdirectory.
10445 test ! -d "$ac_dir" && mkdir "$ac_dir"
10448 mv conftest.h $ac_file
10453 cat >> $CONFIG_STATUS <<EOF
10454 # Extra initialization commands, if any
10460 cat >> $CONFIG_STATUS <<\EOF
10461 # Extra commands, if any
10466 if test ! -d $srcdir/$cf_dir; then
10468 elif test -f $srcdir/$cf_dir/programs; then
10469 $AWK -f $srcdir/mk-test.awk ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
10474 cat >>Makefile <<TEST_EOF
10476 # These rules are generated so we do not rely on suffix rules, which do not
10477 # work consistently for different make-programs (the '\$(MODEL)/' confuses
10478 # some, and the '\$x' confuses others).
10480 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
10483 cat >>Makefile <<TEST_EOF
10485 \$(MODEL)/$N.o : $N.c \\
10488 @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) $N.c
10494 chmod +x $CONFIG_STATUS
10495 rm -fr confdefs* $ac_clean_files
10496 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1