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" )