3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13.20030927
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
15 # Initialize some variables set by options.
16 # The variables have the same names as the options, with
17 # dashes changed to underlines.
19 cache_file=./config.cache
28 program_transform_name=s,x,x,
36 bindir='${exec_prefix}/bin'
37 sbindir='${exec_prefix}/sbin'
38 libexecdir='${exec_prefix}/libexec'
39 datadir='${prefix}/share'
40 sysconfdir='${prefix}/etc'
41 sharedstatedir='${prefix}/com'
42 localstatedir='${prefix}/var'
43 libdir='${exec_prefix}/lib'
44 includedir='${prefix}/include'
45 oldincludedir='/usr/include'
46 infodir='${prefix}/info'
47 mandir='${prefix}/man'
49 # Initialize some other variables.
52 SHELL=${CONFIG_SHELL-/bin/sh}
53 # Maximum number of lines to put in a shell here document.
60 # If the previous option needs an argument, assign it.
61 if test -n "$ac_prev"; then
62 eval "$ac_prev=\$ac_option"
68 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
72 # Accept the important Cygnus configure options, so we can diagnose typos.
76 -bindir | --bindir | --bindi | --bind | --bin | --bi)
78 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
79 bindir="$ac_optarg" ;;
81 -build | --build | --buil | --bui | --bu)
83 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
86 -cache-file | --cache-file | --cache-fil | --cache-fi \
87 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
89 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
90 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
91 cache_file="$ac_optarg" ;;
93 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
95 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
97 datadir="$ac_optarg" ;;
99 -disable-* | --disable-*)
100 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
101 # Reject names that are not valid shell variable names.
102 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
103 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
105 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
106 eval "enable_${ac_feature}=no" ;;
108 -enable-* | --enable-*)
109 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
110 # Reject names that are not valid shell variable names.
111 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
112 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
114 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
119 eval "enable_${ac_feature}='$ac_optarg'" ;;
121 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
122 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
123 | --exec | --exe | --ex)
124 ac_prev=exec_prefix ;;
125 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
126 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
127 | --exec=* | --exe=* | --ex=*)
128 exec_prefix="$ac_optarg" ;;
130 -gas | --gas | --ga | --g)
131 # Obsolete; use --with-gas.
134 -help | --help | --hel | --he)
135 # Omit some internal or obsolete options to make the list less imposing.
136 # This message is too long to be a string in the A/UX 3.1 sh.
138 Usage: configure [options] [host]
139 Options: [defaults in brackets after descriptions]
141 --cache-file=FILE cache test results in FILE
142 --help print this message
143 --no-create do not create output files
144 --quiet, --silent do not print \`checking...' messages
145 --version print the version of autoconf that created configure
146 Directory and file names:
147 --prefix=PREFIX install architecture-independent files in PREFIX
149 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
151 --bindir=DIR user executables in DIR [EPREFIX/bin]
152 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
153 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
154 --datadir=DIR read-only architecture-independent data in DIR
156 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
157 --sharedstatedir=DIR modifiable architecture-independent data in DIR
159 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
160 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
161 --includedir=DIR C header files in DIR [PREFIX/include]
162 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
163 --infodir=DIR info documentation in DIR [PREFIX/info]
164 --mandir=DIR man documentation in DIR [PREFIX/man]
165 --srcdir=DIR find the sources in DIR [configure dir or ..]
166 --program-prefix=PREFIX prepend PREFIX to installed program names
167 --program-suffix=SUFFIX append SUFFIX to installed program names
168 --program-transform-name=PROGRAM
169 run sed PROGRAM on installed program names
173 --build=BUILD configure for building on BUILD [BUILD=HOST]
174 --host=HOST configure for HOST [guessed]
175 --target=TARGET configure for TARGET [TARGET=HOST]
176 Features and packages:
177 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
178 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
179 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
180 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
181 --x-includes=DIR X include files are in DIR
182 --x-libraries=DIR X library files are in DIR
185 --enable and --with options recognized:
186 --disable-echo display "compiling" commands
187 --enable-warnings test: turn on gcc compiler warnings
188 --with-curses-dir=DIR directory in which (n)curses is installed
189 --with-5lib use SunOS sysv-libraries
190 --with-ncursesw use wide ncurses-libraries (installed)
191 --with-ncurses use ncurses-libraries (installed)
192 --with-pdcurses compile/link with pdcurses X11 library
193 --with-x use the X Window System
194 --with-Xaw3d link with Xaw 3d library
195 --with-neXtaw link with neXT Athena library
196 --with-XawPlus link with Athena-Plus library
197 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
201 -host | --host | --hos | --ho)
203 -host=* | --host=* | --hos=* | --ho=*)
206 -includedir | --includedir | --includedi | --included | --include \
207 | --includ | --inclu | --incl | --inc)
208 ac_prev=includedir ;;
209 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
210 | --includ=* | --inclu=* | --incl=* | --inc=*)
211 includedir="$ac_optarg" ;;
213 -infodir | --infodir | --infodi | --infod | --info | --inf)
215 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
216 infodir="$ac_optarg" ;;
218 -libdir | --libdir | --libdi | --libd)
220 -libdir=* | --libdir=* | --libdi=* | --libd=*)
221 libdir="$ac_optarg" ;;
223 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
224 | --libexe | --libex | --libe)
225 ac_prev=libexecdir ;;
226 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
227 | --libexe=* | --libex=* | --libe=*)
228 libexecdir="$ac_optarg" ;;
230 -localstatedir | --localstatedir | --localstatedi | --localstated \
231 | --localstate | --localstat | --localsta | --localst \
232 | --locals | --local | --loca | --loc | --lo)
233 ac_prev=localstatedir ;;
234 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
235 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
236 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
237 localstatedir="$ac_optarg" ;;
239 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
241 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
242 mandir="$ac_optarg" ;;
245 # Obsolete; use --without-fp.
248 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
252 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
253 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
256 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
257 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
258 | --oldin | --oldi | --old | --ol | --o)
259 ac_prev=oldincludedir ;;
260 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
261 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
262 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
263 oldincludedir="$ac_optarg" ;;
265 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
267 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
268 prefix="$ac_optarg" ;;
270 -program-prefix | --program-prefix | --program-prefi | --program-pref \
271 | --program-pre | --program-pr | --program-p)
272 ac_prev=program_prefix ;;
273 -program-prefix=* | --program-prefix=* | --program-prefi=* \
274 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
275 program_prefix="$ac_optarg" ;;
277 -program-suffix | --program-suffix | --program-suffi | --program-suff \
278 | --program-suf | --program-su | --program-s)
279 ac_prev=program_suffix ;;
280 -program-suffix=* | --program-suffix=* | --program-suffi=* \
281 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
282 program_suffix="$ac_optarg" ;;
284 -program-transform-name | --program-transform-name \
285 | --program-transform-nam | --program-transform-na \
286 | --program-transform-n | --program-transform- \
287 | --program-transform | --program-transfor \
288 | --program-transfo | --program-transf \
289 | --program-trans | --program-tran \
290 | --progr-tra | --program-tr | --program-t)
291 ac_prev=program_transform_name ;;
292 -program-transform-name=* | --program-transform-name=* \
293 | --program-transform-nam=* | --program-transform-na=* \
294 | --program-transform-n=* | --program-transform-=* \
295 | --program-transform=* | --program-transfor=* \
296 | --program-transfo=* | --program-transf=* \
297 | --program-trans=* | --program-tran=* \
298 | --progr-tra=* | --program-tr=* | --program-t=*)
299 program_transform_name="$ac_optarg" ;;
301 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
302 | -silent | --silent | --silen | --sile | --sil)
305 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
307 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
309 sbindir="$ac_optarg" ;;
311 -sharedstatedir | --sharedstatedir | --sharedstatedi \
312 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
313 | --sharedst | --shareds | --shared | --share | --shar \
315 ac_prev=sharedstatedir ;;
316 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
317 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
318 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
320 sharedstatedir="$ac_optarg" ;;
322 -site | --site | --sit)
324 -site=* | --site=* | --sit=*)
327 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
329 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
330 srcdir="$ac_optarg" ;;
332 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
333 | --syscon | --sysco | --sysc | --sys | --sy)
334 ac_prev=sysconfdir ;;
335 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
336 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
337 sysconfdir="$ac_optarg" ;;
339 -target | --target | --targe | --targ | --tar | --ta | --t)
341 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
342 target="$ac_optarg" ;;
344 -v | -verbose | --verbose | --verbos | --verbo | --verb)
347 -version | --version | --versio | --versi | --vers)
348 echo "configure generated by autoconf version 2.13.20030927"
352 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
353 # Reject names that are not valid shell variable names.
354 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
355 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
357 ac_package=`echo $ac_package| sed 's/-/_/g'`
362 eval "with_${ac_package}='$ac_optarg'" ;;
364 -without-* | --without-*)
365 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
366 # Reject names that are not valid shell variable names.
367 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
368 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
370 ac_package=`echo $ac_package| sed 's/-/_/g'`
371 eval "with_${ac_package}=no" ;;
374 # Obsolete; use --with-x.
377 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
378 | --x-incl | --x-inc | --x-in | --x-i)
379 ac_prev=x_includes ;;
380 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
381 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
382 x_includes="$ac_optarg" ;;
384 -x-libraries | --x-libraries | --x-librarie | --x-librari \
385 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
386 ac_prev=x_libraries ;;
387 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
388 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
389 x_libraries="$ac_optarg" ;;
391 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
395 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
396 echo "configure: warning: $ac_option: invalid host type" 1>&2
398 if test "x$nonopt" != xNONE; then
399 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
407 if test -n "$ac_prev"; then
408 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
411 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
413 # File descriptor usage:
416 # 2 errors and warnings
417 # 3 some systems may open it to /dev/tty
418 # 4 used on the Kubota Titan
419 # 6 checking for... messages and results
420 # 5 compiler messages saved in config.log
421 if test "$silent" = yes; then
429 This file contains any messages produced by compilers while
430 running configure, to aid debugging if configure makes a mistake.
433 # Strip out --no-create and --no-recursion so they do not pile up.
434 # Also quote any args containing shell metacharacters.
439 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
440 | --no-cr | --no-c) ;;
441 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
442 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
443 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
444 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
445 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
450 # Only set these to C if already set. These must not be set unconditionally
451 # because not all systems understand e.g. LANG=C (notably SCO).
452 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
453 # Non-C LC_CTYPE values break the ctype check.
454 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
455 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
456 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
457 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
459 # confdefs.h avoids OS command line length limits that DEFS can exceed.
460 rm -rf conftest* confdefs.h
461 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
464 # A filename unique to this package, relative to the directory that
465 # configure is in, which we can look for to find out if srcdir is correct.
466 ac_unique_file=ncurses.c
468 # Find the source files, if location was not specified.
469 if test -z "$srcdir"; then
470 ac_srcdir_defaulted=yes
471 # Try the directory containing this script, then its parent.
473 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
474 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
476 if test ! -r $srcdir/$ac_unique_file; then
480 ac_srcdir_defaulted=no
482 if test ! -r $srcdir/$ac_unique_file; then
483 if test "$ac_srcdir_defaulted" = yes; then
484 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
486 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
489 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
491 # Prefer explicitly selected file to automatically selected ones.
492 if test -z "$CONFIG_SITE"; then
493 if test "x$prefix" != xNONE; then
494 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
496 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
499 for ac_site_file in $CONFIG_SITE; do
500 if test -r "$ac_site_file"; then
501 echo "loading site script $ac_site_file"
506 if test -r "$cache_file"; then
507 echo "loading cache $cache_file"
510 echo "creating cache $cache_file"
515 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
516 ac_cpp='$CPP $CPPFLAGS'
517 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
518 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
519 cross_compiling=$ac_cv_prog_cc_cross
523 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
524 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
525 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
532 ac_n= ac_c='\c' ac_t=
535 # If we find X, set shell vars x_includes and x_libraries to the
536 # paths, otherwise set no_x=yes.
537 # Uses ac_ vars as temps to allow command line to override cache and checks.
538 # --without-x overrides everything else, but does not touch the cache.
539 echo $ac_n "checking for X""... $ac_c" 1>&6
540 echo "configure:541: checking for X" >&5
543 # Check whether --with-x or --without-x was given.
544 if test "${with_x+set}" = set; then
549 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
550 if test "x$with_x" = xno; then
551 # The user explicitly disabled X.
554 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
555 # Both variables are already set.
558 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
559 echo $ac_n "(cached) $ac_c" 1>&6
561 # One or both of the vars are not set, and there is no cached value.
562 ac_x_includes=NO ac_x_libraries=NO
564 if mkdir conftestdir; then
566 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
567 cat > Imakefile <<'EOF'
569 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
571 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
572 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
573 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
574 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
575 for ac_extension in a so sl; do
576 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
577 test -f $ac_im_libdir/libX11.$ac_extension; then
578 ac_im_usrlibdir=$ac_im_libdir; break
581 # Screen out bogus values from the imake configuration. They are
582 # bogus both because they are the default anyway, and because
583 # using them would break gcc on systems where it needs fixed includes.
584 case "$ac_im_incroot" in
586 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
588 case "$ac_im_usrlibdir" in
590 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
597 if test "$ac_x_includes" = NO; then
598 # Guess where to find include files, by looking for this one X11 .h file.
599 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
601 # First, try using that file with no special directory specified.
602 cat > conftest.$ac_ext <<EOF
603 #line 604 "configure"
604 #include "confdefs.h"
605 #include <$x_direct_test_include>
607 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
608 { (eval echo configure:609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
609 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
610 if test -z "$ac_err"; then
612 # We can compile using X headers with no special include directory.
616 echo "configure: failed program was:" >&5
617 cat conftest.$ac_ext >&5
619 # Look for the header file in a standard set of common directories.
620 # Check X11 before X11Rn because it is often a symlink to the current release.
632 /usr/local/X11/include \
633 /usr/local/X11R6/include \
634 /usr/local/X11R5/include \
635 /usr/local/X11R4/include \
637 /usr/local/include/X11 \
638 /usr/local/include/X11R6 \
639 /usr/local/include/X11R5 \
640 /usr/local/include/X11R4 \
644 /usr/XFree86/include/X11 \
648 /usr/unsupported/include \
649 /usr/athena/include \
650 /usr/local/x11r5/include \
651 /usr/lpp/Xamples/include \
653 /usr/openwin/include \
654 /usr/openwin/share/include \
657 if test -r "$ac_dir/$x_direct_test_include"; then
658 ac_x_includes=$ac_dir
664 fi # $ac_x_includes = NO
666 if test "$ac_x_libraries" = NO; then
667 # Check for the libraries.
669 test -z "$x_direct_test_library" && x_direct_test_library=Xt
670 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
672 # See if we find them without any special options.
673 # Don't add to $LIBS permanently.
675 LIBS="-l$x_direct_test_library $LIBS"
676 cat > conftest.$ac_ext <<EOF
677 #line 678 "configure"
678 #include "confdefs.h"
681 ${x_direct_test_function}()
684 if { (eval echo configure:685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
687 # We can link X programs with no special library path.
690 echo "configure: failed program was:" >&5
691 cat conftest.$ac_ext >&5
694 # First see if replacing the include by lib works.
695 # Check X11 before X11Rn because it is often a symlink to the current release.
696 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
708 /usr/local/X11R6/lib \
709 /usr/local/X11R5/lib \
710 /usr/local/X11R4/lib \
713 /usr/local/lib/X11R6 \
714 /usr/local/lib/X11R5 \
715 /usr/local/lib/X11R4 \
719 /usr/XFree86/lib/X11 \
723 /usr/unsupported/lib \
725 /usr/local/x11r5/lib \
726 /usr/lpp/Xamples/lib \
730 /usr/openwin/share/lib \
733 for ac_extension in a so sl; do
734 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
735 ac_x_libraries=$ac_dir
742 fi # $ac_x_libraries = NO
744 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
745 # Didn't find X anywhere. Cache the known absence of X.
746 ac_cv_have_x="have_x=no"
748 # Record where we found X for the cache.
749 ac_cv_have_x="have_x=yes \
750 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
757 if test "$have_x" != yes; then
758 echo "$ac_t""$have_x" 1>&6
761 # If each of the values was on the command line, it overrides each guess.
762 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
763 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
764 # Update the cache value to reflect the command line values.
765 ac_cv_have_x="have_x=yes \
766 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
767 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
774 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
777 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
780 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
781 if test -f $ac_dir/install-sh; then
783 ac_install_sh="$ac_aux_dir/install-sh -c"
785 elif test -f $ac_dir/install.sh; then
787 ac_install_sh="$ac_aux_dir/install.sh -c"
791 if test -z "$ac_aux_dir"; then
792 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
794 ac_config_guess=$ac_aux_dir/config.guess
795 ac_config_sub=$ac_aux_dir/config.sub
796 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
799 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
801 # Make sure we can run config.sub.
802 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
803 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
806 echo $ac_n "checking host system type""... $ac_c" 1>&6
807 echo "configure:808: checking host system type" >&5
810 case "$host_alias" in
814 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
815 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
817 *) host_alias=$nonopt ;;
821 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
822 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
823 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
824 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
825 echo "$ac_t""$host" 1>&6
827 system_name="$host_os"
829 system_name="`(uname -s -r) 2>/dev/null`"
830 if test -z "$system_name" ; then
831 system_name="`(hostname) 2>/dev/null`"
834 test -n "$system_name" && cat >> confdefs.h <<EOF
835 #define SYSTEM_NAME "$system_name"
838 if eval "test \"`echo '$''{'cf_cv_system_name'+set}'`\" = set"; then
839 echo $ac_n "(cached) $ac_c" 1>&6
841 cf_cv_system_name="$system_name"
845 test -z "$system_name" && system_name="$cf_cv_system_name"
846 test -n "$cf_cv_system_name" && echo "$ac_t""Configuring for $cf_cv_system_name" 1>&6
848 if test ".$system_name" != ".$cf_cv_system_name" ; then
849 echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6
850 { echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; }
854 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
855 echo "configure:856: checking whether ${MAKE-make} sets \${MAKE}" >&5
856 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
857 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
858 echo $ac_n "(cached) $ac_c" 1>&6
860 cat > conftestmake <<\EOF
862 @echo 'ac_maketemp="${MAKE}"'
864 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
865 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
866 if test -n "$ac_maketemp"; then
867 eval ac_cv_prog_make_${ac_make}_set=yes
869 eval ac_cv_prog_make_${ac_make}_set=no
873 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
874 echo "$ac_t""yes" 1>&6
877 echo "$ac_t""no" 1>&6
878 SET_MAKE="MAKE=${MAKE-make}"
881 # Extract the first word of "gcc", so it can be a program name with args.
882 set dummy gcc; ac_word=$2
883 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
884 echo "configure:885: checking for $ac_word" >&5
885 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
886 echo $ac_n "(cached) $ac_c" 1>&6
888 if test -n "$CC"; then
889 ac_cv_prog_CC="$CC" # Let the user override the test.
891 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
893 for ac_dir in $ac_dummy; do
894 test -z "$ac_dir" && ac_dir=.
895 if test -f $ac_dir/$ac_word; then
904 if test -n "$CC"; then
905 echo "$ac_t""$CC" 1>&6
907 echo "$ac_t""no" 1>&6
910 if test -z "$CC"; then
911 # Extract the first word of "cc", so it can be a program name with args.
912 set dummy cc; ac_word=$2
913 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
914 echo "configure:915: checking for $ac_word" >&5
915 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
916 echo $ac_n "(cached) $ac_c" 1>&6
918 if test -n "$CC"; then
919 ac_cv_prog_CC="$CC" # Let the user override the test.
921 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
924 for ac_dir in $ac_dummy; do
925 test -z "$ac_dir" && ac_dir=.
926 if test -f $ac_dir/$ac_word; then
927 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
936 if test $ac_prog_rejected = yes; then
937 # We found a bogon in the path, so make sure we never use it.
938 set dummy $ac_cv_prog_CC
940 if test $# -gt 0; then
941 # We chose a different compiler from the bogus one.
942 # However, it has the same basename, so the bogon will be chosen
943 # first if we set CC to just the basename; use the full file name.
945 set dummy "$ac_dir/$ac_word" "$@"
953 if test -n "$CC"; then
954 echo "$ac_t""$CC" 1>&6
956 echo "$ac_t""no" 1>&6
959 if test -z "$CC"; then
962 # Extract the first word of "cl", so it can be a program name with args.
963 set dummy cl; ac_word=$2
964 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
965 echo "configure:966: checking for $ac_word" >&5
966 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
967 echo $ac_n "(cached) $ac_c" 1>&6
969 if test -n "$CC"; then
970 ac_cv_prog_CC="$CC" # Let the user override the test.
972 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
974 for ac_dir in $ac_dummy; do
975 test -z "$ac_dir" && ac_dir=.
976 if test -f $ac_dir/$ac_word; then
985 if test -n "$CC"; then
986 echo "$ac_t""$CC" 1>&6
988 echo "$ac_t""no" 1>&6
993 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
996 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
997 echo "configure:998: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1000 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1001 ac_cpp='$CPP $CPPFLAGS'
1002 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1003 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1004 cross_compiling=$ac_cv_prog_cc_cross
1006 cat > conftest.$ac_ext << EOF
1008 #line 1009 "configure"
1009 #include "confdefs.h"
1013 if { (eval echo configure:1014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1014 ac_cv_prog_cc_works=yes
1015 # If we can't run a trivial program, we are probably using a cross compiler.
1016 if (./conftest; exit) 2>/dev/null; then
1017 ac_cv_prog_cc_cross=no
1019 ac_cv_prog_cc_cross=yes
1022 echo "configure: failed program was:" >&5
1023 cat conftest.$ac_ext >&5
1024 ac_cv_prog_cc_works=no
1028 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1029 ac_cpp='$CPP $CPPFLAGS'
1030 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1031 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1032 cross_compiling=$ac_cv_prog_cc_cross
1034 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1035 if test $ac_cv_prog_cc_works = no; then
1036 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1038 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1039 echo "configure:1040: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1040 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1041 cross_compiling=$ac_cv_prog_cc_cross
1043 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1044 echo "configure:1045: checking whether we are using GNU C" >&5
1045 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1046 echo $ac_n "(cached) $ac_c" 1>&6
1048 cat > conftest.c <<EOF
1053 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1060 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1062 if test $ac_cv_prog_gcc = yes; then
1068 ac_test_CFLAGS="${CFLAGS+set}"
1069 ac_save_CFLAGS="$CFLAGS"
1071 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1072 echo "configure:1073: checking whether ${CC-cc} accepts -g" >&5
1073 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1074 echo $ac_n "(cached) $ac_c" 1>&6
1076 echo 'void f(){}' > conftest.c
1077 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1086 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1087 if test "$ac_test_CFLAGS" = set; then
1088 CFLAGS="$ac_save_CFLAGS"
1089 elif test $ac_cv_prog_cc_g = yes; then
1090 if test "$GCC" = yes; then
1096 if test "$GCC" = yes; then
1103 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1104 echo "configure:1105: checking how to run the C preprocessor" >&5
1105 # On Suns, sometimes $CPP names a directory.
1106 if test -n "$CPP" && test -d "$CPP"; then
1109 if test -z "$CPP"; then
1110 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1111 echo $ac_n "(cached) $ac_c" 1>&6
1113 # This must be in double quotes, not single quotes, because CPP may get
1114 # substituted into the Makefile and "${CC-cc}" will confuse make.
1116 # On the NeXT, cc -E runs the code through the compiler's parser,
1117 # not just through cpp.
1118 cat > conftest.$ac_ext <<EOF
1119 #line 1120 "configure"
1120 #include "confdefs.h"
1124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1125 { (eval echo configure:1126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1127 if test -z "$ac_err"; then
1131 echo "configure: failed program was:" >&5
1132 cat conftest.$ac_ext >&5
1134 CPP="${CC-cc} -E -traditional-cpp"
1135 cat > conftest.$ac_ext <<EOF
1136 #line 1137 "configure"
1137 #include "confdefs.h"
1141 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1142 { (eval echo configure:1143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1143 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1144 if test -z "$ac_err"; then
1148 echo "configure: failed program was:" >&5
1149 cat conftest.$ac_ext >&5
1151 CPP="${CC-cc} -nologo -E"
1152 cat > conftest.$ac_ext <<EOF
1153 #line 1154 "configure"
1154 #include "confdefs.h"
1158 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1159 { (eval echo configure:1160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1160 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1161 if test -z "$ac_err"; then
1165 echo "configure: failed program was:" >&5
1166 cat conftest.$ac_ext >&5
1175 ac_cv_prog_CPP="$CPP"
1177 CPP="$ac_cv_prog_CPP"
1179 ac_cv_prog_CPP="$CPP"
1181 echo "$ac_t""$CPP" 1>&6
1183 for ac_prog in mawk gawk nawk awk
1185 # Extract the first word of "$ac_prog", so it can be a program name with args.
1186 set dummy $ac_prog; ac_word=$2
1187 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1188 echo "configure:1189: checking for $ac_word" >&5
1189 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1190 echo $ac_n "(cached) $ac_c" 1>&6
1192 if test -n "$AWK"; then
1193 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1195 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1197 for ac_dir in $ac_dummy; do
1198 test -z "$ac_dir" && ac_dir=.
1199 if test -f $ac_dir/$ac_word; then
1200 ac_cv_prog_AWK="$ac_prog"
1207 AWK="$ac_cv_prog_AWK"
1208 if test -n "$AWK"; then
1209 echo "$ac_t""$AWK" 1>&6
1211 echo "$ac_t""no" 1>&6
1214 test -n "$AWK" && break
1218 echo $ac_n "checking if filesystem supports mixed-case filenames""... $ac_c" 1>&6
1219 echo "configure:1220: checking if filesystem supports mixed-case filenames" >&5
1220 if eval "test \"`echo '$''{'cf_cv_mixedcase'+set}'`\" = set"; then
1221 echo $ac_n "(cached) $ac_c" 1>&6
1224 if test "$cross_compiling" = yes ; then
1225 case $target_alias in #(vi
1226 *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
1234 rm -f conftest CONFTEST
1236 if test -f CONFTEST ; then
1241 rm -f conftest CONFTEST
1246 echo "$ac_t""$cf_cv_mixedcase" 1>&6
1247 test "$cf_cv_mixedcase" = yes && cat >> confdefs.h <<\EOF
1248 #define MIXEDCASE_FILENAMES 1
1255 for ac_prog in exctags ctags
1257 # Extract the first word of "$ac_prog", so it can be a program name with args.
1258 set dummy $ac_prog; ac_word=$2
1259 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1260 echo "configure:1261: checking for $ac_word" >&5
1261 if eval "test \"`echo '$''{'ac_cv_prog_CTAGS'+set}'`\" = set"; then
1262 echo $ac_n "(cached) $ac_c" 1>&6
1264 if test -n "$CTAGS"; then
1265 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
1267 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1269 for ac_dir in $ac_dummy; do
1270 test -z "$ac_dir" && ac_dir=.
1271 if test -f $ac_dir/$ac_word; then
1272 ac_cv_prog_CTAGS="$ac_prog"
1279 CTAGS="$ac_cv_prog_CTAGS"
1280 if test -n "$CTAGS"; then
1281 echo "$ac_t""$CTAGS" 1>&6
1283 echo "$ac_t""no" 1>&6
1286 test -n "$CTAGS" && break
1289 for ac_prog in exetags etags
1291 # Extract the first word of "$ac_prog", so it can be a program name with args.
1292 set dummy $ac_prog; ac_word=$2
1293 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1294 echo "configure:1295: checking for $ac_word" >&5
1295 if eval "test \"`echo '$''{'ac_cv_prog_ETAGS'+set}'`\" = set"; then
1296 echo $ac_n "(cached) $ac_c" 1>&6
1298 if test -n "$ETAGS"; then
1299 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
1301 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1303 for ac_dir in $ac_dummy; do
1304 test -z "$ac_dir" && ac_dir=.
1305 if test -f $ac_dir/$ac_word; then
1306 ac_cv_prog_ETAGS="$ac_prog"
1313 ETAGS="$ac_cv_prog_ETAGS"
1314 if test -n "$ETAGS"; then
1315 echo "$ac_t""$ETAGS" 1>&6
1317 echo "$ac_t""no" 1>&6
1320 test -n "$ETAGS" && break
1324 # Extract the first word of "${CTAGS-ctags}", so it can be a program name with args.
1325 set dummy ${CTAGS-ctags}; ac_word=$2
1326 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1327 echo "configure:1328: checking for $ac_word" >&5
1328 if eval "test \"`echo '$''{'ac_cv_prog_MAKE_LOWER_TAGS'+set}'`\" = set"; then
1329 echo $ac_n "(cached) $ac_c" 1>&6
1331 if test -n "$MAKE_LOWER_TAGS"; then
1332 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
1334 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1336 for ac_dir in $ac_dummy; do
1337 test -z "$ac_dir" && ac_dir=.
1338 if test -f $ac_dir/$ac_word; then
1339 ac_cv_prog_MAKE_LOWER_TAGS="yes"
1344 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
1347 MAKE_LOWER_TAGS="$ac_cv_prog_MAKE_LOWER_TAGS"
1348 if test -n "$MAKE_LOWER_TAGS"; then
1349 echo "$ac_t""$MAKE_LOWER_TAGS" 1>&6
1351 echo "$ac_t""no" 1>&6
1355 if test "$cf_cv_mixedcase" = yes ; then
1356 # Extract the first word of "${ETAGS-etags}", so it can be a program name with args.
1357 set dummy ${ETAGS-etags}; ac_word=$2
1358 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1359 echo "configure:1360: checking for $ac_word" >&5
1360 if eval "test \"`echo '$''{'ac_cv_prog_MAKE_UPPER_TAGS'+set}'`\" = set"; then
1361 echo $ac_n "(cached) $ac_c" 1>&6
1363 if test -n "$MAKE_UPPER_TAGS"; then
1364 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
1366 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1368 for ac_dir in $ac_dummy; do
1369 test -z "$ac_dir" && ac_dir=.
1370 if test -f $ac_dir/$ac_word; then
1371 ac_cv_prog_MAKE_UPPER_TAGS="yes"
1376 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
1379 MAKE_UPPER_TAGS="$ac_cv_prog_MAKE_UPPER_TAGS"
1380 if test -n "$MAKE_UPPER_TAGS"; then
1381 echo "$ac_t""$MAKE_UPPER_TAGS" 1>&6
1383 echo "$ac_t""no" 1>&6
1390 if test "$MAKE_UPPER_TAGS" = yes ; then
1396 if test "$MAKE_LOWER_TAGS" = yes ; then
1410 CC_SHARED_OPTS=unknown
1411 CPPFLAGS="$CPPFLAGS"
1413 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
1414 DFT_UPR_MODEL="NORMAL"
1433 TINFO_ARGS='$(LIBS_CURSES)'
1434 cf_cv_abi_version=""
1435 cf_cv_rel_version=""
1440 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1441 echo "configure:1442: checking for Cygwin environment" >&5
1442 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1443 echo $ac_n "(cached) $ac_c" 1>&6
1445 cat > conftest.$ac_ext <<EOF
1446 #line 1447 "configure"
1447 #include "confdefs.h"
1452 #define __CYGWIN__ __CYGWIN32__
1457 if { (eval echo configure:1458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1461 echo "configure: failed program was:" >&5
1462 cat conftest.$ac_ext >&5
1470 echo "$ac_t""$ac_cv_cygwin" 1>&6
1472 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1473 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1474 echo "configure:1475: checking for mingw32 environment" >&5
1475 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1476 echo $ac_n "(cached) $ac_c" 1>&6
1478 cat > conftest.$ac_ext <<EOF
1479 #line 1480 "configure"
1480 #include "confdefs.h"
1486 if { (eval echo configure:1487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1490 echo "configure: failed program was:" >&5
1491 cat conftest.$ac_ext >&5
1499 echo "$ac_t""$ac_cv_mingw32" 1>&6
1501 test "$ac_cv_mingw32" = yes && MINGW32=yes
1504 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1505 echo "configure:1506: checking for executable suffix" >&5
1506 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1507 echo $ac_n "(cached) $ac_c" 1>&6
1509 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1513 echo 'int main () { return 0; }' > conftest.$ac_ext
1515 if { (eval echo configure:1516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1516 for file in conftest.*; do
1518 *.c | *.o | *.obj) ;;
1519 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1523 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1526 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1531 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1532 echo "$ac_t""${ac_cv_exeext}" 1>&6
1535 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1536 echo "configure:1537: checking for object suffix" >&5
1537 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1538 echo $ac_n "(cached) $ac_c" 1>&6
1541 echo 'int i = 1;' > conftest.$ac_ext
1542 if { (eval echo configure:1543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1543 for ac_file in conftest.*; do
1546 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1550 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1555 echo "$ac_t""$ac_cv_objext" 1>&6
1556 OBJEXT=$ac_cv_objext
1557 ac_objext=$ac_cv_objext
1561 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1562 echo "configure:1563: checking for ${CC-cc} option to accept ANSI C" >&5
1563 if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
1564 echo $ac_n "(cached) $ac_c" 1>&6
1568 cf_save_CFLAGS="$CFLAGS"
1569 cf_save_CPPFLAGS="$CPPFLAGS"
1570 # Don't try gcc -ansi; that turns off useful extensions and
1571 # breaks some systems' header files.
1572 # AIX -qlanglvl=ansi
1573 # Ultrix and OSF/1 -std1
1574 # HP-UX -Aa -D_HPUX_SOURCE
1576 # UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
1577 for cf_arg in "-DCC_HAS_PROTOS" \
1582 "-Aa -D_HPUX_SOURCE" \
1589 cf_new_extra_cppflags=
1591 for cf_add_cflags in $cf_arg
1593 case $cf_fix_cppflags in
1595 case $cf_add_cflags in #(vi
1596 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1597 case $cf_add_cflags in
1599 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1601 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1602 && test -z "${cf_tst_cflags}" \
1603 && cf_fix_cppflags=yes
1605 if test $cf_fix_cppflags = yes ; then
1606 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1608 elif test "${cf_tst_cflags}" = "\"'" ; then
1609 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1615 *$cf_add_cflags) #(vi
1618 case $cf_add_cflags in #(vi
1620 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1622 CPPFLAGS=`echo "$CPPFLAGS" | \
1623 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1624 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1628 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1633 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1638 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1640 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1642 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1643 && test -z "${cf_tst_cflags}" \
1644 && cf_fix_cppflags=no
1649 if test -n "$cf_new_cflags" ; then
1651 CFLAGS="$CFLAGS $cf_new_cflags"
1654 if test -n "$cf_new_cppflags" ; then
1656 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1659 if test -n "$cf_new_extra_cppflags" ; then
1661 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1667 cat > conftest.$ac_ext <<EOF
1668 #line 1669 "configure"
1669 #include "confdefs.h"
1671 #ifndef CC_HAS_PROTOS
1672 #if !defined(__STDC__) || (__STDC__ != 1)
1679 int test (int i, double x);
1680 struct s1 {int (*f) (int a);};
1681 struct s2 {int (*f) (double a);};
1684 if { (eval echo configure:1685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1686 cf_cv_ansi_cc="$cf_arg"; break
1688 echo "configure: failed program was:" >&5
1689 cat conftest.$ac_ext >&5
1693 CFLAGS="$cf_save_CFLAGS"
1694 CPPFLAGS="$cf_save_CPPFLAGS"
1698 echo "$ac_t""$cf_cv_ansi_cc" 1>&6
1700 if test "$cf_cv_ansi_cc" != "no"; then
1701 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
1706 cf_new_extra_cppflags=
1708 for cf_add_cflags in $cf_cv_ansi_cc
1710 case $cf_fix_cppflags in
1712 case $cf_add_cflags in #(vi
1713 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1714 case $cf_add_cflags in
1716 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1718 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1719 && test -z "${cf_tst_cflags}" \
1720 && cf_fix_cppflags=yes
1722 if test $cf_fix_cppflags = yes ; then
1723 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1725 elif test "${cf_tst_cflags}" = "\"'" ; then
1726 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1732 *$cf_add_cflags) #(vi
1735 case $cf_add_cflags in #(vi
1737 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1739 CPPFLAGS=`echo "$CPPFLAGS" | \
1740 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1741 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1745 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1750 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1755 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1757 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1759 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1760 && test -z "${cf_tst_cflags}" \
1761 && cf_fix_cppflags=no
1766 if test -n "$cf_new_cflags" ; then
1768 CFLAGS="$CFLAGS $cf_new_cflags"
1771 if test -n "$cf_new_cppflags" ; then
1773 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1776 if test -n "$cf_new_extra_cppflags" ; then
1778 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1785 cat >> confdefs.h <<\EOF
1786 #define CC_HAS_PROTOS 1
1793 if test "$cf_cv_ansi_cc" = "no"; then
1794 { echo "configure: error: Your compiler does not appear to recognize prototypes.
1795 You have the following choices:
1796 a. adjust your compiler options
1797 b. get an up-to-date compiler
1798 c. use a wrapper such as unproto" 1>&2; exit 1; }
1802 if test "$GCC" = yes
1804 cat > conftest.i <<EOF
1806 #define GCC_PRINTF 0
1811 #ifndef GCC_NORETURN
1812 #define GCC_NORETURN /* nothing */
1815 #define GCC_UNUSED /* nothing */
1818 if test "$GCC" = yes
1820 echo "checking for $CC __attribute__ directives" 1>&6
1821 echo "configure:1822: checking for $CC __attribute__ directives" >&5
1822 cat > conftest.$ac_ext <<EOF
1823 #line 1824 "${as_me-configure}"
1824 #include "confdefs.h"
1825 #include "conftest.h"
1826 #include "conftest.i"
1828 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
1830 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
1833 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
1835 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
1837 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
1838 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
1839 extern void foo(void) GCC_NORETURN;
1840 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
1842 cf_printf_attribute=no
1843 cf_scanf_attribute=no
1844 for cf_attribute in scanf printf unused noreturn
1847 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1849 cf_directive="__attribute__(($cf_attribute))"
1850 echo "checking for $CC $cf_directive" 1>&5
1852 case $cf_attribute in #(vi
1854 cf_printf_attribute=yes
1855 cat >conftest.h <<EOF
1856 #define GCC_$cf_ATTRIBUTE 1
1860 cf_scanf_attribute=yes
1861 cat >conftest.h <<EOF
1862 #define GCC_$cf_ATTRIBUTE 1
1866 cat >conftest.h <<EOF
1867 #define GCC_$cf_ATTRIBUTE $cf_directive
1872 if { (eval echo configure:1873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1873 test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
1874 cat conftest.h >>confdefs.h
1875 case $cf_attribute in #(vi
1877 if test "$cf_printf_attribute" = no ; then
1878 cat >>confdefs.h <<EOF
1879 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
1882 cat >>confdefs.h <<EOF
1883 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
1888 if test "$cf_scanf_attribute" = no ; then
1889 cat >>confdefs.h <<EOF
1890 #define GCC_SCANFLIKE(fmt,var) /* nothing */
1893 cat >>confdefs.h <<EOF
1894 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
1902 fgrep define conftest.i >>confdefs.h
1910 cf_POSIX_C_SOURCE=199506L
1913 case $host_os in #(vi
1915 cf_xopen_source="-D_ALL_SOURCE"
1918 cf_xopen_source="-D_APPLE_C_SOURCE"
1921 cf_xopen_source="-D_DARWIN_C_SOURCE"
1923 freebsd*|dragonfly*) #(vi
1924 # 5.x headers associate
1925 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
1926 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
1927 cf_POSIX_C_SOURCE=200112L
1929 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1932 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
1935 cf_xopen_source="-D_HPUX_SOURCE"
1938 cf_xopen_source="-D_SGI_SOURCE"
1940 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
1942 echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
1943 echo "configure:1944: checking if we must define _GNU_SOURCE" >&5
1944 if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
1945 echo $ac_n "(cached) $ac_c" 1>&6
1948 cat > conftest.$ac_ext <<EOF
1949 #line 1950 "configure"
1950 #include "confdefs.h"
1951 #include <sys/types.h>
1954 #ifndef _XOPEN_SOURCE
1959 if { (eval echo configure:1960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1963 echo "configure: failed program was:" >&5
1964 cat conftest.$ac_ext >&5
1967 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1968 cat > conftest.$ac_ext <<EOF
1969 #line 1970 "configure"
1970 #include "confdefs.h"
1971 #include <sys/types.h>
1974 #ifdef _XOPEN_SOURCE
1979 if { (eval echo configure:1980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1983 echo "configure: failed program was:" >&5
1984 cat conftest.$ac_ext >&5
1986 cf_cv_gnu_source=yes
1996 echo "$ac_t""$cf_cv_gnu_source" 1>&6
1997 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2001 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
2004 # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
2007 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
2010 cf_xopen_source="-D_OSF_SOURCE"
2013 cf_xopen_source="-D_QNX_SOURCE"
2016 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
2018 solaris2.1[0-9]) #(vi
2019 cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2021 solaris2.[1-9]) #(vi
2022 cf_xopen_source="-D__EXTENSIONS__"
2025 echo $ac_n "checking if we should define _XOPEN_SOURCE""... $ac_c" 1>&6
2026 echo "configure:2027: checking if we should define _XOPEN_SOURCE" >&5
2027 if eval "test \"`echo '$''{'cf_cv_xopen_source'+set}'`\" = set"; then
2028 echo $ac_n "(cached) $ac_c" 1>&6
2031 cat > conftest.$ac_ext <<EOF
2032 #line 2033 "configure"
2033 #include "confdefs.h"
2034 #include <sys/types.h>
2037 #ifndef _XOPEN_SOURCE
2042 if { (eval echo configure:2043: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2044 cf_cv_xopen_source=no
2046 echo "configure: failed program was:" >&5
2047 cat conftest.$ac_ext >&5
2050 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2051 cat > conftest.$ac_ext <<EOF
2052 #line 2053 "configure"
2053 #include "confdefs.h"
2054 #include <sys/types.h>
2057 #ifdef _XOPEN_SOURCE
2062 if { (eval echo configure:2063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2064 cf_cv_xopen_source=no
2066 echo "configure: failed program was:" >&5
2067 cat conftest.$ac_ext >&5
2069 cf_cv_xopen_source=$cf_XOPEN_SOURCE
2079 echo "$ac_t""$cf_cv_xopen_source" 1>&6
2080 if test "$cf_cv_xopen_source" != no ; then
2082 CFLAGS=`echo "$CFLAGS" | \
2083 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
2084 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
2087 CPPFLAGS=`echo "$CPPFLAGS" | \
2088 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
2089 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
2091 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
2096 cf_new_extra_cppflags=
2098 for cf_add_cflags in $cf_temp_xopen_source
2100 case $cf_fix_cppflags in
2102 case $cf_add_cflags in #(vi
2103 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2104 case $cf_add_cflags in
2106 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2108 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2109 && test -z "${cf_tst_cflags}" \
2110 && cf_fix_cppflags=yes
2112 if test $cf_fix_cppflags = yes ; then
2113 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2115 elif test "${cf_tst_cflags}" = "\"'" ; then
2116 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2122 *$cf_add_cflags) #(vi
2125 case $cf_add_cflags in #(vi
2127 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2129 CPPFLAGS=`echo "$CPPFLAGS" | \
2130 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2131 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2135 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2140 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2145 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2147 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2149 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2150 && test -z "${cf_tst_cflags}" \
2151 && cf_fix_cppflags=no
2156 if test -n "$cf_new_cflags" ; then
2158 CFLAGS="$CFLAGS $cf_new_cflags"
2161 if test -n "$cf_new_cppflags" ; then
2163 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2166 if test -n "$cf_new_extra_cppflags" ; then
2168 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2176 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
2178 cf_save_CFLAGS="$CFLAGS"
2179 cf_save_CPPFLAGS="$CPPFLAGS"
2182 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
2183 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
2184 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
2187 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
2188 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
2189 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
2192 echo $ac_n "checking if we should define _POSIX_C_SOURCE""... $ac_c" 1>&6
2193 echo "configure:2194: checking if we should define _POSIX_C_SOURCE" >&5
2194 if eval "test \"`echo '$''{'cf_cv_posix_c_source'+set}'`\" = set"; then
2195 echo $ac_n "(cached) $ac_c" 1>&6
2199 echo "${as_me-configure}:2200: testing if the symbol is already defined go no further ..." 1>&5
2201 cat > conftest.$ac_ext <<EOF
2202 #line 2203 "configure"
2203 #include "confdefs.h"
2204 #include <sys/types.h>
2207 #ifndef _POSIX_C_SOURCE
2212 if { (eval echo configure:2213: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2214 cf_cv_posix_c_source=no
2216 echo "configure: failed program was:" >&5
2217 cat conftest.$ac_ext >&5
2219 cf_want_posix_source=no
2220 case .$cf_POSIX_C_SOURCE in #(vi
2222 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2225 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2226 cf_want_posix_source=yes
2229 cf_want_posix_source=yes
2232 if test "$cf_want_posix_source" = yes ; then
2233 cat > conftest.$ac_ext <<EOF
2234 #line 2235 "configure"
2235 #include "confdefs.h"
2236 #include <sys/types.h>
2239 #ifdef _POSIX_SOURCE
2244 if { (eval echo configure:2245: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2247 echo "configure: failed program was:" >&5
2248 cat conftest.$ac_ext >&5
2250 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
2255 echo "${as_me-configure}:2256: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
2257 CFLAGS="$cf_trim_CFLAGS"
2258 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
2260 echo "${as_me-configure}:2261: testing if the second compile does not leave our definition intact error ..." 1>&5
2262 cat > conftest.$ac_ext <<EOF
2263 #line 2264 "configure"
2264 #include "confdefs.h"
2265 #include <sys/types.h>
2268 #ifndef _POSIX_C_SOURCE
2273 if { (eval echo configure:2274: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2276 echo "configure: failed program was:" >&5
2277 cat conftest.$ac_ext >&5
2279 cf_cv_posix_c_source=no
2282 CFLAGS="$cf_save_CFLAGS"
2283 CPPFLAGS="$cf_save_CPPFLAGS"
2290 echo "$ac_t""$cf_cv_posix_c_source" 1>&6
2292 if test "$cf_cv_posix_c_source" != no ; then
2293 CFLAGS="$cf_trim_CFLAGS"
2294 CPPFLAGS="$cf_trim_CPPFLAGS"
2299 cf_new_extra_cppflags=
2301 for cf_add_cflags in $cf_cv_posix_c_source
2303 case $cf_fix_cppflags in
2305 case $cf_add_cflags in #(vi
2306 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2307 case $cf_add_cflags in
2309 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2311 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2312 && test -z "${cf_tst_cflags}" \
2313 && cf_fix_cppflags=yes
2315 if test $cf_fix_cppflags = yes ; then
2316 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2318 elif test "${cf_tst_cflags}" = "\"'" ; then
2319 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2325 *$cf_add_cflags) #(vi
2328 case $cf_add_cflags in #(vi
2330 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2332 CPPFLAGS=`echo "$CPPFLAGS" | \
2333 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2334 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2338 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2343 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2348 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2350 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2352 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2353 && test -z "${cf_tst_cflags}" \
2354 && cf_fix_cppflags=no
2359 if test -n "$cf_new_cflags" ; then
2361 CFLAGS="$CFLAGS $cf_new_cflags"
2364 if test -n "$cf_new_cppflags" ; then
2366 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2369 if test -n "$cf_new_extra_cppflags" ; then
2371 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2383 if test -n "$cf_xopen_source" ; then
2388 cf_new_extra_cppflags=
2390 for cf_add_cflags in $cf_xopen_source
2392 case $cf_fix_cppflags in
2394 case $cf_add_cflags in #(vi
2395 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2396 case $cf_add_cflags in
2398 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2400 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2401 && test -z "${cf_tst_cflags}" \
2402 && cf_fix_cppflags=yes
2404 if test $cf_fix_cppflags = yes ; then
2405 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2407 elif test "${cf_tst_cflags}" = "\"'" ; then
2408 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2414 *$cf_add_cflags) #(vi
2417 case $cf_add_cflags in #(vi
2419 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2421 CPPFLAGS=`echo "$CPPFLAGS" | \
2422 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2423 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2427 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2432 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2437 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2439 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2441 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2442 && test -z "${cf_tst_cflags}" \
2443 && cf_fix_cppflags=no
2448 if test -n "$cf_new_cflags" ; then
2450 CFLAGS="$CFLAGS $cf_new_cflags"
2453 if test -n "$cf_new_cppflags" ; then
2455 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2458 if test -n "$cf_new_extra_cppflags" ; then
2460 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2468 echo $ac_n "checking for working const""... $ac_c" 1>&6
2469 echo "configure:2470: checking for working const" >&5
2470 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2471 echo $ac_n "(cached) $ac_c" 1>&6
2473 cat > conftest.$ac_ext <<EOF
2474 #line 2475 "configure"
2475 #include "confdefs.h"
2479 /* Ultrix mips cc rejects this. */
2480 typedef int charset[2]; const charset x;
2481 /* SunOS 4.1.1 cc rejects this. */
2482 char const *const *ccp;
2484 /* NEC SVR4.0.2 mips cc rejects this. */
2485 struct point {int x, y;};
2486 static struct point const zero = {0,0};
2487 /* AIX XL C 1.02.0.0 rejects this.
2488 It does not let you subtract one const X* pointer from another in an arm
2489 of an if-expression whose if-part is not a constant expression */
2490 const char *g = "string";
2491 ccp = &g + (g ? g-g : 0);
2492 /* HPUX 7.0 cc rejects these. */
2495 ccp = (char const *const *) p;
2496 { /* SCO 3.2v4 cc rejects this. */
2498 char const *s = 0 ? (char *) 0 : (char const *) 0;
2502 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2504 const int *foo = &x[0];
2507 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2508 typedef const int *iptr;
2512 { /* AIX XL C 1.02.0.0 rejects this saying
2513 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2514 struct s { int j; const int *ap[3]; };
2515 struct s *b; b->j = 5;
2517 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2523 if { (eval echo configure:2524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2527 echo "configure: failed program was:" >&5
2528 cat conftest.$ac_ext >&5
2535 echo "$ac_t""$ac_cv_c_const" 1>&6
2536 if test $ac_cv_c_const = no; then
2537 cat >> confdefs.h <<\EOF
2544 echo $ac_n "checking for signal global datatype""... $ac_c" 1>&6
2545 echo "configure:2546: checking for signal global datatype" >&5
2546 if eval "test \"`echo '$''{'cf_cv_sig_atomic_t'+set}'`\" = set"; then
2547 echo $ac_n "(cached) $ac_c" 1>&6
2551 "volatile sig_atomic_t" \
2555 cat > conftest.$ac_ext <<EOF
2556 #line 2557 "configure"
2557 #include "confdefs.h"
2559 #include <sys/types.h>
2565 static void handler(int sig)
2570 signal(SIGINT, handler);
2574 if { (eval echo configure:2575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2576 cf_cv_sig_atomic_t=$cf_type
2578 echo "configure: failed program was:" >&5
2579 cat conftest.$ac_ext >&5
2581 cf_cv_sig_atomic_t=no
2584 test "$cf_cv_sig_atomic_t" != no && break
2589 echo "$ac_t""$cf_cv_sig_atomic_t" 1>&6
2590 test "$cf_cv_sig_atomic_t" != no && cat >> confdefs.h <<EOF
2591 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
2597 echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6
2598 echo "configure:2599: checking if you want to see long compiling messages" >&5
2600 # Check whether --enable-echo or --disable-echo was given.
2601 if test "${enable_echo+set}" = set; then
2602 enableval="$enable_echo"
2603 test "$enableval" != no && enableval=yes
2604 if test "$enableval" != "yes" ; then
2607 ECHO_LD='@echo linking $@;'
2608 RULE_CC='@echo compiling $<'
2609 SHOW_CC='@echo compiling $@'
2633 echo "$ac_t""$enableval" 1>&6
2643 if test "$GCC" = yes ; then
2644 echo $ac_n "checking version of $CC""... $ac_c" 1>&6
2645 echo "configure:2646: checking version of $CC" >&5
2646 GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2647 test -z "$GCC_VERSION" && GCC_VERSION=unknown
2648 echo "$ac_t""$GCC_VERSION" 1>&6
2652 if ( test "$GCC" = yes || test "$GXX" = yes )
2654 echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
2655 echo "configure:2656: checking if you want to turn on gcc warnings" >&5
2657 # Check whether --enable-warnings or --disable-warnings was given.
2658 if test "${enable_warnings+set}" = set; then
2659 enableval="$enable_warnings"
2660 test "$enableval" != yes && enableval=no
2661 if test "$enableval" != "no" ; then
2672 echo "$ac_t""$with_warnings" 1>&6
2673 if test "$with_warnings" = "yes"
2676 if test "$GCC" = yes
2678 cat > conftest.i <<EOF
2680 #define GCC_PRINTF 0
2685 #ifndef GCC_NORETURN
2686 #define GCC_NORETURN /* nothing */
2689 #define GCC_UNUSED /* nothing */
2692 if test "$GCC" = yes
2694 echo "checking for $CC __attribute__ directives" 1>&6
2695 echo "configure:2696: checking for $CC __attribute__ directives" >&5
2696 cat > conftest.$ac_ext <<EOF
2697 #line 2698 "${as_me-configure}"
2698 #include "confdefs.h"
2699 #include "conftest.h"
2700 #include "conftest.i"
2702 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2704 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2707 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2709 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
2711 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2712 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2713 extern void foo(void) GCC_NORETURN;
2714 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2716 cf_printf_attribute=no
2717 cf_scanf_attribute=no
2718 for cf_attribute in scanf printf unused noreturn
2721 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2723 cf_directive="__attribute__(($cf_attribute))"
2724 echo "checking for $CC $cf_directive" 1>&5
2726 case $cf_attribute in #(vi
2728 cf_printf_attribute=yes
2729 cat >conftest.h <<EOF
2730 #define GCC_$cf_ATTRIBUTE 1
2734 cf_scanf_attribute=yes
2735 cat >conftest.h <<EOF
2736 #define GCC_$cf_ATTRIBUTE 1
2740 cat >conftest.h <<EOF
2741 #define GCC_$cf_ATTRIBUTE $cf_directive
2746 if { (eval echo configure:2747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2747 test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
2748 cat conftest.h >>confdefs.h
2749 case $cf_attribute in #(vi
2751 if test "$cf_printf_attribute" = no ; then
2752 cat >>confdefs.h <<EOF
2753 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
2756 cat >>confdefs.h <<EOF
2757 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2762 if test "$cf_scanf_attribute" = no ; then
2763 cat >>confdefs.h <<EOF
2764 #define GCC_SCANFLIKE(fmt,var) /* nothing */
2767 cat >>confdefs.h <<EOF
2768 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2776 fgrep define conftest.i >>confdefs.h
2786 if test "$GCC" = yes ; then
2789 echo $ac_n "checking if this is really Intel C compiler""... $ac_c" 1>&6
2790 echo "configure:2791: checking if this is really Intel C compiler" >&5
2791 cf_save_CFLAGS="$CFLAGS"
2792 CFLAGS="$CFLAGS -no-gcc"
2793 cat > conftest.$ac_ext <<EOF
2794 #line 2795 "configure"
2795 #include "confdefs.h"
2799 #ifdef __INTEL_COMPILER
2806 if { (eval echo configure:2807: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2809 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
2812 echo "configure: failed program was:" >&5
2813 cat conftest.$ac_ext >&5
2816 CFLAGS="$cf_save_CFLAGS"
2817 echo "$ac_t""$INTEL_COMPILER" 1>&6
2823 cat > conftest.$ac_ext <<EOF
2824 #line 2825 "${as_me-configure}"
2825 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
2828 if test "$INTEL_COMPILER" = yes
2830 # The "-wdXXX" options suppress warnings:
2831 # remark #1419: external declaration in primary source file
2832 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
2833 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
2834 # remark #193: zero used for undefined preprocessing identifier
2835 # remark #593: variable "curs_sb_left_arrow" was set but never used
2836 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
2837 # remark #869: parameter "tw" was never referenced
2838 # remark #981: operands are evaluated in unspecified order
2839 # warning #279: controlling expression is constant
2841 echo "checking for $CC warning options" 1>&6
2842 echo "configure:2843: checking for $CC warning options" >&5
2843 cf_save_CFLAGS="$CFLAGS"
2844 EXTRA_CFLAGS="-Wall"
2856 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
2857 if { (eval echo configure:2858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2858 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
2859 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
2862 CFLAGS="$cf_save_CFLAGS"
2864 elif test "$GCC" = yes
2866 echo "checking for $CC warning options" 1>&6
2867 echo "configure:2868: checking for $CC warning options" >&5
2868 cf_save_CFLAGS="$CFLAGS"
2869 EXTRA_CFLAGS="-W -Wall"
2871 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
2873 Wbad-function-cast \
2877 Wmissing-declarations \
2878 Wmissing-prototypes \
2882 Wstrict-prototypes \
2883 Wundef $cf_warn_CONST
2885 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
2886 if { (eval echo configure:2887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2887 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
2888 case $cf_opt in #(vi
2890 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
2893 case $GCC_VERSION in
2895 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
2897 echo "${as_me-configure}:2898: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
2904 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
2907 CFLAGS="$cf_save_CFLAGS"
2919 # Check whether --with-curses-dir or --without-curses-dir was given.
2920 if test "${with_curses_dir+set}" = set; then
2921 withval="$with_curses_dir"
2923 if test "x$prefix" != xNONE; then
2924 cf_path_syntax="$prefix"
2926 cf_path_syntax="$ac_default_prefix"
2929 case ".$withval" in #(vi
2930 .\$\(*\)*|.\'*\'*) #(vi
2934 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2937 eval withval="$withval"
2938 case ".$withval" in #(vi
2940 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2945 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2948 { echo "configure: error: expected a pathname, not \"$withval\"" 1>&2; exit 1; }
2952 cf_cv_curses_dir=$withval
2960 # Check whether --with-5lib or --without-5lib was given.
2961 if test "${with_5lib+set}" = set; then
2962 withval="$with_5lib"
2963 LIBS="-L/usr/5lib $LIBS"
2964 CPPFLAGS="$CPPFLAGS -I/usr/5include"
2969 # Check whether --with-ncursesw or --without-ncursesw was given.
2970 if test "${with_ncursesw+set}" = set; then
2971 withval="$with_ncursesw"
2972 cf_cv_screen=ncursesw
2977 # Check whether --with-ncurses or --without-ncurses was given.
2978 if test "${with_ncurses+set}" = set; then
2979 withval="$with_ncurses"
2980 cf_cv_screen=ncurses
2985 # Check whether --with-pdcurses or --without-pdcurses was given.
2986 if test "${with_pdcurses+set}" = set; then
2987 withval="$with_pdcurses"
2988 cf_cv_screen=pdcurses
2996 case $cf_cv_screen in
3001 echo $ac_n "checking for extra include directories""... $ac_c" 1>&6
3002 echo "configure:3003: checking for extra include directories" >&5
3003 if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then
3004 echo $ac_n "(cached) $ac_c" 1>&6
3007 cf_cv_curses_incdir=no
3008 case $host_os in #(vi
3010 test -d /usr/include/curses_colr && \
3011 cf_cv_curses_incdir="-I/usr/include/curses_colr"
3014 test -d /usr/5lib && \
3015 test -d /usr/5include && \
3016 cf_cv_curses_incdir="-I/usr/5include"
3022 echo "$ac_t""$cf_cv_curses_incdir" 1>&6
3023 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
3026 echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
3027 echo "configure:3028: checking if we have identified curses headers" >&5
3028 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
3029 echo $ac_n "(cached) $ac_c" 1>&6
3032 cf_cv_ncurses_header=none
3039 cat > conftest.$ac_ext <<EOF
3040 #line 3041 "configure"
3041 #include "confdefs.h"
3042 #include <${cf_header}>
3044 initscr(); tgoto("?", 0,0)
3047 if { (eval echo configure:3048: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3049 cf_cv_ncurses_header=$cf_header; break
3051 echo "configure: failed program was:" >&5
3052 cat conftest.$ac_ext >&5
3059 echo "$ac_t""$cf_cv_ncurses_header" 1>&6
3061 if test "$cf_cv_ncurses_header" = none ; then
3062 { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
3065 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
3066 for ac_hdr in $cf_cv_ncurses_header
3068 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3069 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3070 echo "configure:3071: checking for $ac_hdr" >&5
3071 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3072 echo $ac_n "(cached) $ac_c" 1>&6
3074 cat > conftest.$ac_ext <<EOF
3075 #line 3076 "configure"
3076 #include "confdefs.h"
3079 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3080 { (eval echo configure:3081: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3081 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3082 if test -z "$ac_err"; then
3084 eval "ac_cv_header_$ac_safe=yes"
3087 echo "configure: failed program was:" >&5
3088 cat conftest.$ac_ext >&5
3090 eval "ac_cv_header_$ac_safe=no"
3094 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3095 echo "$ac_t""yes" 1>&6
3096 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3097 cat >> confdefs.h <<EOF
3098 #define $ac_tr_hdr 1
3102 echo "$ac_t""no" 1>&6
3108 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
3109 echo "configure:3110: checking for terminfo header" >&5
3110 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
3111 echo $ac_n "(cached) $ac_c" 1>&6
3114 case ${cf_cv_ncurses_header} in #(vi
3115 */ncurses.h|*/ncursesw.h) #(vi
3116 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
3119 cf_term_header=term.h
3123 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
3125 cat > conftest.$ac_ext <<EOF
3126 #line 3127 "configure"
3127 #include "confdefs.h"
3129 #include <${cf_cv_ncurses_header-curses.h}>
3133 int x = auto_left_margin
3136 if { (eval echo configure:3137: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3139 cf_cv_term_header="$cf_test"
3141 echo "configure: failed program was:" >&5
3142 cat conftest.$ac_ext >&5
3145 cf_cv_term_header=unknown
3149 test "$cf_cv_term_header" != unknown && break
3154 echo "$ac_t""$cf_cv_term_header" 1>&6
3156 # Set definitions to allow ifdef'ing to accommodate subdirectories
3158 case $cf_cv_term_header in # (vi
3160 cat >> confdefs.h <<\EOF
3161 #define HAVE_TERM_H 1
3167 case $cf_cv_term_header in # (vi
3168 ncurses/term.h) #(vi
3169 cat >> confdefs.h <<\EOF
3170 #define HAVE_NCURSES_TERM_H 1
3175 cat >> confdefs.h <<\EOF
3176 #define HAVE_NCURSESW_TERM_H 1
3184 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
3185 echo "configure:3186: checking for ncurses version" >&5
3186 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
3187 echo $ac_n "(cached) $ac_c" 1>&6
3190 cf_cv_ncurses_version=no
3193 if test "$cross_compiling" = yes; then
3196 # This will not work if the preprocessor splits the line after the
3197 # Autoconf token. The 'unproto' program does that.
3198 cat > conftest.$ac_ext <<EOF
3199 #include <${cf_cv_ncurses_header-curses.h}>
3201 #ifdef NCURSES_VERSION
3202 Autoconf NCURSES_VERSION
3210 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
3211 { (eval echo configure:3212: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
3212 if test -f conftest.out ; then
3213 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
3214 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
3219 cat > conftest.$ac_ext <<EOF
3220 #line 3221 "configure"
3221 #include "confdefs.h"
3223 #include <${cf_cv_ncurses_header-curses.h}>
3227 FILE *fp = fopen("$cf_tempfile", "w");
3228 #ifdef NCURSES_VERSION
3229 # ifdef NCURSES_VERSION_PATCH
3230 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
3232 fprintf(fp, "%s\n", NCURSES_VERSION);
3236 fprintf(fp, "old\n");
3241 ${cf_cv_main_return-return}(0);
3244 if { (eval echo configure:3245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3247 cf_cv_ncurses_version=`cat $cf_tempfile`
3249 echo "configure: failed program was:" >&5
3250 cat conftest.$ac_ext >&5
3259 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
3260 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
3267 echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
3268 echo "configure:3269: checking if we have identified curses libraries" >&5
3269 cat > conftest.$ac_ext <<EOF
3270 #line 3271 "configure"
3271 #include "confdefs.h"
3272 #include <${cf_cv_ncurses_header-curses.h}>
3274 initscr(); tgoto("?", 0,0)
3277 if { (eval echo configure:3278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3281 echo "configure: failed program was:" >&5
3282 cat conftest.$ac_ext >&5
3287 echo "$ac_t""$cf_result" 1>&6
3289 if test "$cf_result" = no ; then
3290 case $host_os in #(vi
3292 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
3293 echo "configure:3294: checking for tgoto in -lmytinfo" >&5
3294 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
3295 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3296 echo $ac_n "(cached) $ac_c" 1>&6
3298 ac_save_LIBS="$LIBS"
3299 LIBS="-lmytinfo $LIBS"
3300 cat > conftest.$ac_ext <<EOF
3301 #line 3302 "configure"
3302 #include "confdefs.h"
3303 /* Override any gcc2 internal prototype to avoid an error. */
3304 /* We use char because int might match the return type of a gcc2
3305 builtin and then its argument prototype would still apply. */
3312 if { (eval echo configure:3313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3314 eval "ac_cv_lib_$ac_lib_var=yes"
3316 echo "configure: failed program was:" >&5
3317 cat conftest.$ac_ext >&5
3319 eval "ac_cv_lib_$ac_lib_var=no"
3322 LIBS="$ac_save_LIBS"
3325 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3326 echo "$ac_t""yes" 1>&6
3327 LIBS="-lmytinfo $LIBS"
3329 echo "$ac_t""no" 1>&6
3334 echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
3335 echo "configure:3336: checking for initscr in -lcur_colr" >&5
3336 ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
3337 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3338 echo $ac_n "(cached) $ac_c" 1>&6
3340 ac_save_LIBS="$LIBS"
3341 LIBS="-lcur_colr $LIBS"
3342 cat > conftest.$ac_ext <<EOF
3343 #line 3344 "configure"
3344 #include "confdefs.h"
3345 /* Override any gcc2 internal prototype to avoid an error. */
3346 /* We use char because int might match the return type of a gcc2
3347 builtin and then its argument prototype would still apply. */
3354 if { (eval echo configure:3355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3356 eval "ac_cv_lib_$ac_lib_var=yes"
3358 echo "configure: failed program was:" >&5
3359 cat conftest.$ac_ext >&5
3361 eval "ac_cv_lib_$ac_lib_var=no"
3364 LIBS="$ac_save_LIBS"
3367 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3368 echo "$ac_t""yes" 1>&6
3370 LIBS="-lcur_colr $LIBS"
3371 ac_cv_func_initscr=yes
3374 echo "$ac_t""no" 1>&6
3376 echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
3377 echo "configure:3378: checking for initscr in -lHcurses" >&5
3378 ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
3379 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3380 echo $ac_n "(cached) $ac_c" 1>&6
3382 ac_save_LIBS="$LIBS"
3383 LIBS="-lHcurses $LIBS"
3384 cat > conftest.$ac_ext <<EOF
3385 #line 3386 "configure"
3386 #include "confdefs.h"
3387 /* Override any gcc2 internal prototype to avoid an error. */
3388 /* We use char because int might match the return type of a gcc2
3389 builtin and then its argument prototype would still apply. */
3396 if { (eval echo configure:3397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3398 eval "ac_cv_lib_$ac_lib_var=yes"
3400 echo "configure: failed program was:" >&5
3401 cat conftest.$ac_ext >&5
3403 eval "ac_cv_lib_$ac_lib_var=no"
3406 LIBS="$ac_save_LIBS"
3409 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3410 echo "$ac_t""yes" 1>&6
3412 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
3413 LIBS="-lHcurses $LIBS"
3414 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
3415 ac_cv_func_initscr=yes
3418 echo "$ac_t""no" 1>&6
3424 linux*) # Suse Linux does not follow /usr/lib convention
3426 if test -n "/lib" ; then
3427 for cf_add_libdir in /lib
3429 if test $cf_add_libdir = /usr/lib ; then
3431 elif test -d $cf_add_libdir
3434 if test -n "$LDFLAGS$LIBS" ; then
3435 # a loop is needed to ensure we can add subdirs of existing dirs
3436 for cf_test_libdir in $LDFLAGS $LIBS ; do
3437 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3438 cf_have_libdir=yes; break
3442 if test "$cf_have_libdir" = no ; then
3443 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
3445 echo "${as_me-configure}:3446: testing adding $cf_add_libdir to library-path ..." 1>&5
3448 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3456 if test -d /usr/5lib ; then
3458 if test -n "/usr/5lib" ; then
3459 for cf_add_libdir in /usr/5lib
3461 if test $cf_add_libdir = /usr/lib ; then
3463 elif test -d $cf_add_libdir
3466 if test -n "$LDFLAGS$LIBS" ; then
3467 # a loop is needed to ensure we can add subdirs of existing dirs
3468 for cf_test_libdir in $LDFLAGS $LIBS ; do
3469 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3470 cf_have_libdir=yes; break
3474 if test "$cf_have_libdir" = no ; then
3475 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
3477 echo "${as_me-configure}:3478: testing adding $cf_add_libdir to library-path ..." 1>&5
3480 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3486 LIBS="$LIBS -lcurses -ltermcap"
3488 ac_cv_func_initscr=yes
3492 if test ".$ac_cv_func_initscr" != .yes ; then
3493 cf_save_LIBS="$LIBS"
3497 if test ".${cf_cv_ncurses_version-no}" != .no
3499 cf_check_list="ncurses curses cursesX"
3501 cf_check_list="cursesX curses ncurses"
3504 # Check for library containing tgoto. Do this before curses library
3505 # because it may be needed to link the test-case for initscr.
3506 echo $ac_n "checking for tgoto""... $ac_c" 1>&6
3507 echo "configure:3508: checking for tgoto" >&5
3508 if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
3509 echo $ac_n "(cached) $ac_c" 1>&6
3511 cat > conftest.$ac_ext <<EOF
3512 #line 3513 "configure"
3513 #include "confdefs.h"
3514 /* System header to define __stub macros and hopefully few prototypes,
3515 which can conflict with char tgoto(); below. */
3517 /* Override any gcc2 internal prototype to avoid an error. */
3518 /* We use char because int might match the return type of a gcc2
3519 builtin and then its argument prototype would still apply. */
3524 /* The GNU C library defines this for functions which it implements
3525 to always fail with ENOSYS. Some functions are actually named
3526 something starting with __ and the normal name is an alias. */
3527 #if defined (__stub_tgoto) || defined (__stub___tgoto)
3535 if { (eval echo configure:3536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3537 eval "ac_cv_func_tgoto=yes"
3539 echo "configure: failed program was:" >&5
3540 cat conftest.$ac_ext >&5
3542 eval "ac_cv_func_tgoto=no"
3547 if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then
3548 echo "$ac_t""yes" 1>&6
3549 cf_term_lib=predefined
3551 echo "$ac_t""no" 1>&6
3553 for cf_term_lib in $cf_check_list termcap termlib unknown
3555 echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
3556 echo "configure:3557: checking for tgoto in -l$cf_term_lib" >&5
3557 ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
3558 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3559 echo $ac_n "(cached) $ac_c" 1>&6
3561 ac_save_LIBS="$LIBS"
3562 LIBS="-l$cf_term_lib $LIBS"
3563 cat > conftest.$ac_ext <<EOF
3564 #line 3565 "configure"
3565 #include "confdefs.h"
3566 /* Override any gcc2 internal prototype to avoid an error. */
3567 /* We use char because int might match the return type of a gcc2
3568 builtin and then its argument prototype would still apply. */
3575 if { (eval echo configure:3576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3577 eval "ac_cv_lib_$ac_lib_var=yes"
3579 echo "configure: failed program was:" >&5
3580 cat conftest.$ac_ext >&5
3582 eval "ac_cv_lib_$ac_lib_var=no"
3585 LIBS="$ac_save_LIBS"
3588 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3589 echo "$ac_t""yes" 1>&6
3592 echo "$ac_t""no" 1>&6
3600 # Check for library containing initscr
3601 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
3602 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
3604 echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
3605 echo "configure:3606: checking for initscr in -l$cf_curs_lib" >&5
3606 ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
3607 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3608 echo $ac_n "(cached) $ac_c" 1>&6
3610 ac_save_LIBS="$LIBS"
3611 LIBS="-l$cf_curs_lib $LIBS"
3612 cat > conftest.$ac_ext <<EOF
3613 #line 3614 "configure"
3614 #include "confdefs.h"
3615 /* Override any gcc2 internal prototype to avoid an error. */
3616 /* We use char because int might match the return type of a gcc2
3617 builtin and then its argument prototype would still apply. */
3624 if { (eval echo configure:3625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3626 eval "ac_cv_lib_$ac_lib_var=yes"
3628 echo "configure: failed program was:" >&5
3629 cat conftest.$ac_ext >&5
3631 eval "ac_cv_lib_$ac_lib_var=no"
3634 LIBS="$ac_save_LIBS"
3637 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3638 echo "$ac_t""yes" 1>&6
3641 echo "$ac_t""no" 1>&6
3645 test $cf_curs_lib = unknown && { echo "configure: error: no curses library found" 1>&2; exit 1; }
3647 LIBS="-l$cf_curs_lib $cf_save_LIBS"
3648 if test "$cf_term_lib" = unknown ; then
3649 echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
3650 echo "configure:3651: checking if we can link with $cf_curs_lib library" >&5
3651 cat > conftest.$ac_ext <<EOF
3652 #line 3653 "configure"
3653 #include "confdefs.h"
3654 #include <${cf_cv_ncurses_header-curses.h}>
3659 if { (eval echo configure:3660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3663 echo "configure: failed program was:" >&5
3664 cat conftest.$ac_ext >&5
3669 echo "$ac_t""$cf_result" 1>&6
3670 test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; }
3671 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
3673 elif test "$cf_term_lib" != predefined ; then
3674 echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
3675 echo "configure:3676: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
3676 cat > conftest.$ac_ext <<EOF
3677 #line 3678 "configure"
3678 #include "confdefs.h"
3679 #include <${cf_cv_ncurses_header-curses.h}>
3681 initscr(); tgoto((char *)0, 0, 0);
3684 if { (eval echo configure:3685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3688 echo "configure: failed program was:" >&5
3689 cat conftest.$ac_ext >&5
3692 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
3693 cat > conftest.$ac_ext <<EOF
3694 #line 3695 "configure"
3695 #include "confdefs.h"
3696 #include <${cf_cv_ncurses_header-curses.h}>
3701 if { (eval echo configure:3702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3705 echo "configure: failed program was:" >&5
3706 cat conftest.$ac_ext >&5
3714 echo "$ac_t""$cf_result" 1>&6
3724 cf_ncuconfig_root=ncurses
3726 echo "Looking for ${cf_ncuconfig_root}-config"
3727 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
3729 # Extract the first word of "$ac_prog", so it can be a program name with args.
3730 set dummy $ac_prog; ac_word=$2
3731 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3732 echo "configure:3733: checking for $ac_word" >&5
3733 if eval "test \"`echo '$''{'ac_cv_path_NCURSES_CONFIG'+set}'`\" = set"; then
3734 echo $ac_n "(cached) $ac_c" 1>&6
3736 case "$NCURSES_CONFIG" in
3738 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
3741 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a dos path.
3744 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3746 for ac_dir in $ac_dummy; do
3747 test -z "$ac_dir" && ac_dir=.
3748 if test -f $ac_dir/$ac_word; then
3749 ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
3757 NCURSES_CONFIG="$ac_cv_path_NCURSES_CONFIG"
3758 if test -n "$NCURSES_CONFIG"; then
3759 echo "$ac_t""$NCURSES_CONFIG" 1>&6
3761 echo "$ac_t""no" 1>&6
3764 test -n "$NCURSES_CONFIG" && break
3766 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
3769 if test "$NCURSES_CONFIG" != none ; then
3771 cf_cv_ncurses_header=curses.h
3773 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
3774 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
3776 cat >> confdefs.h <<\EOF
3782 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3784 cat >> confdefs.h <<EOF
3785 #define $cf_nculib_ROOT 1
3789 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
3795 cf_ncuhdr_root=ncurses
3797 test -n "$cf_cv_curses_dir" && \
3798 test "$cf_cv_curses_dir" != "no" && { \
3800 if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
3801 for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
3803 while test $cf_add_incdir != /usr/include
3805 if test -d $cf_add_incdir
3808 if test -n "$CFLAGS$CPPFLAGS" ; then
3809 # a loop is needed to ensure we can add subdirs of existing dirs
3810 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3811 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3812 cf_have_incdir=yes; break
3817 if test "$cf_have_incdir" = no ; then
3818 if test "$cf_add_incdir" = /usr/local/include ; then
3819 if test "$GCC" = yes
3821 cf_save_CPPFLAGS=$CPPFLAGS
3822 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3823 cat > conftest.$ac_ext <<EOF
3824 #line 3825 "configure"
3825 #include "confdefs.h"
3831 if { (eval echo configure:3832: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3834 echo "configure: failed program was:" >&5
3835 cat conftest.$ac_ext >&5
3840 CPPFLAGS=$cf_save_CPPFLAGS
3845 if test "$cf_have_incdir" = no ; then
3846 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3848 echo "${as_me-configure}:3849: testing adding $cf_add_incdir to include-path ..." 1>&5
3851 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3853 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3854 test "$cf_top_incdir" = "$cf_add_incdir" && break
3855 cf_add_incdir="$cf_top_incdir"
3866 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
3867 echo "configure:3868: checking for $cf_ncuhdr_root header in include-path" >&5
3868 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
3869 echo $ac_n "(cached) $ac_c" 1>&6
3872 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
3873 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
3874 for cf_header in $cf_header_list
3877 cat > conftest.$ac_ext <<EOF
3878 #line 3879 "configure"
3879 #include "confdefs.h"
3882 #include <$cf_header>
3885 #ifdef NCURSES_VERSION
3887 printf("%s\n", NCURSES_VERSION);
3899 if { (eval echo configure:3900: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3901 cf_cv_ncurses_h=$cf_header
3904 echo "configure: failed program was:" >&5
3905 cat conftest.$ac_ext >&5
3911 test "$cf_cv_ncurses_h" != no && break
3916 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
3920 if test "$cf_cv_ncurses_h" != no ; then
3921 cf_cv_ncurses_header=$cf_cv_ncurses_h
3924 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
3925 echo "configure:3926: checking for $cf_ncuhdr_root include-path" >&5
3926 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
3927 echo $ac_n "(cached) $ac_c" 1>&6
3930 test -n "$verbose" && echo
3933 cf_header_path_list=""
3934 if test -n "${CFLAGS}${CPPFLAGS}" ; then
3935 for cf_header_path in $CPPFLAGS $CFLAGS
3937 case $cf_header_path in #(vi
3939 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
3941 test "$cf_header_path" != "NONE" && \
3942 test -d "$cf_header_path" && \
3944 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
3945 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
3946 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
3947 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
3948 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
3949 test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3952 cf_header_path_list="$cf_header_path_list $cf_search"
3961 test "/usr" != "$prefix" && \
3963 (test $prefix = NONE || test -d $prefix) && {
3964 test -n "$verbose" && echo " ... testing for include-directories under /usr"
3965 test -d /usr/include && cf_search="$cf_search /usr/include"
3966 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
3967 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
3968 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
3969 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3973 test "$prefix" != "NONE" && \
3974 test -d "$prefix" && \
3976 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
3977 test -d $prefix/include && cf_search="$cf_search $prefix/include"
3978 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
3979 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
3980 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
3981 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3985 test "/usr/local" != "$prefix" && \
3986 test -d "/usr/local" && \
3987 (test $prefix = NONE || test -d $prefix) && {
3988 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
3989 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
3990 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
3991 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
3992 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
3993 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3997 test "/opt" != "$prefix" && \
3999 (test $prefix = NONE || test -d $prefix) && {
4000 test -n "$verbose" && echo " ... testing for include-directories under /opt"
4001 test -d /opt/include && cf_search="$cf_search /opt/include"
4002 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
4003 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
4004 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
4005 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4009 test "$HOME" != "$prefix" && \
4010 test -d "$HOME" && \
4011 (test $prefix = NONE || test -d $prefix) && {
4012 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
4013 test -d $HOME/include && cf_search="$cf_search $HOME/include"
4014 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
4015 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
4016 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
4017 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4022 test "$includedir" != NONE && \
4023 test "$includedir" != "/usr/include" && \
4024 test -d "$includedir" && {
4025 test -d $includedir && cf_search="$cf_search $includedir"
4026 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4029 test "$oldincludedir" != NONE && \
4030 test "$oldincludedir" != "/usr/include" && \
4031 test -d "$oldincludedir" && {
4032 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
4033 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4036 cf_search="$cf_header_path_list $cf_search"
4038 test -n "$verbose" && echo search path $cf_search
4039 cf_save2_CPPFLAGS="$CPPFLAGS"
4040 for cf_incdir in $cf_search
4043 if test -n "$cf_incdir" ; then
4044 for cf_add_incdir in $cf_incdir
4046 while test $cf_add_incdir != /usr/include
4048 if test -d $cf_add_incdir
4051 if test -n "$CFLAGS$CPPFLAGS" ; then
4052 # a loop is needed to ensure we can add subdirs of existing dirs
4053 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4054 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4055 cf_have_incdir=yes; break
4060 if test "$cf_have_incdir" = no ; then
4061 if test "$cf_add_incdir" = /usr/local/include ; then
4062 if test "$GCC" = yes
4064 cf_save_CPPFLAGS=$CPPFLAGS
4065 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4066 cat > conftest.$ac_ext <<EOF
4067 #line 4068 "configure"
4068 #include "confdefs.h"
4074 if { (eval echo configure:4075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4077 echo "configure: failed program was:" >&5
4078 cat conftest.$ac_ext >&5
4083 CPPFLAGS=$cf_save_CPPFLAGS
4088 if test "$cf_have_incdir" = no ; then
4089 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4091 echo "${as_me-configure}:4092: testing adding $cf_add_incdir to include-path ..." 1>&5
4094 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4096 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4097 test "$cf_top_incdir" = "$cf_add_incdir" && break
4098 cf_add_incdir="$cf_top_incdir"
4112 cat > conftest.$ac_ext <<EOF
4113 #line 4114 "configure"
4114 #include "confdefs.h"
4117 #include <$cf_header>
4120 #ifdef NCURSES_VERSION
4122 printf("%s\n", NCURSES_VERSION);
4134 if { (eval echo configure:4135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4136 cf_cv_ncurses_h2=$cf_header
4139 echo "configure: failed program was:" >&5
4140 cat conftest.$ac_ext >&5
4146 if test "$cf_cv_ncurses_h2" != no ; then
4147 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4148 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
4151 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
4153 CPPFLAGS="$cf_save2_CPPFLAGS"
4154 test "$cf_cv_ncurses_h2" != no && break
4156 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
4160 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
4162 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4163 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4164 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4165 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4168 if test -n "$cf_1st_incdir" ; then
4169 for cf_add_incdir in $cf_1st_incdir
4171 while test $cf_add_incdir != /usr/include
4173 if test -d $cf_add_incdir
4176 if test -n "$CFLAGS$CPPFLAGS" ; then
4177 # a loop is needed to ensure we can add subdirs of existing dirs
4178 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4179 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4180 cf_have_incdir=yes; break
4185 if test "$cf_have_incdir" = no ; then
4186 if test "$cf_add_incdir" = /usr/local/include ; then
4187 if test "$GCC" = yes
4189 cf_save_CPPFLAGS=$CPPFLAGS
4190 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4191 cat > conftest.$ac_ext <<EOF
4192 #line 4193 "configure"
4193 #include "confdefs.h"
4199 if { (eval echo configure:4200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4202 echo "configure: failed program was:" >&5
4203 cat conftest.$ac_ext >&5
4208 CPPFLAGS=$cf_save_CPPFLAGS
4213 if test "$cf_have_incdir" = no ; then
4214 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4216 echo "${as_me-configure}:4217: testing adding $cf_add_incdir to include-path ..." 1>&5
4219 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4221 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4222 test "$cf_top_incdir" = "$cf_add_incdir" && break
4223 cf_add_incdir="$cf_top_incdir"
4235 # Set definitions to allow ifdef'ing for ncurses.h
4237 case $cf_cv_ncurses_header in # (vi
4239 cat >> confdefs.h <<\EOF
4240 #define HAVE_NCURSES_H 1
4246 case $cf_cv_ncurses_header in # (vi
4247 ncurses/curses.h|ncurses/ncurses.h)
4248 cat >> confdefs.h <<\EOF
4249 #define HAVE_NCURSES_NCURSES_H 1
4253 ncursesw/curses.h|ncursesw/ncurses.h)
4254 cat >> confdefs.h <<\EOF
4255 #define HAVE_NCURSESW_NCURSES_H 1
4263 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
4264 echo "configure:4265: checking for terminfo header" >&5
4265 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
4266 echo $ac_n "(cached) $ac_c" 1>&6
4269 case ${cf_cv_ncurses_header} in #(vi
4270 */ncurses.h|*/ncursesw.h) #(vi
4271 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4274 cf_term_header=term.h
4278 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4280 cat > conftest.$ac_ext <<EOF
4281 #line 4282 "configure"
4282 #include "confdefs.h"
4284 #include <${cf_cv_ncurses_header-curses.h}>
4288 int x = auto_left_margin
4291 if { (eval echo configure:4292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4294 cf_cv_term_header="$cf_test"
4296 echo "configure: failed program was:" >&5
4297 cat conftest.$ac_ext >&5
4300 cf_cv_term_header=unknown
4304 test "$cf_cv_term_header" != unknown && break
4309 echo "$ac_t""$cf_cv_term_header" 1>&6
4311 # Set definitions to allow ifdef'ing to accommodate subdirectories
4313 case $cf_cv_term_header in # (vi
4315 cat >> confdefs.h <<\EOF
4316 #define HAVE_TERM_H 1
4322 case $cf_cv_term_header in # (vi
4323 ncurses/term.h) #(vi
4324 cat >> confdefs.h <<\EOF
4325 #define HAVE_NCURSES_TERM_H 1
4330 cat >> confdefs.h <<\EOF
4331 #define HAVE_NCURSESW_TERM_H 1
4338 # some applications need this, but should check for NCURSES_VERSION
4339 cat >> confdefs.h <<\EOF
4345 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
4346 echo "configure:4347: checking for ncurses version" >&5
4347 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
4348 echo $ac_n "(cached) $ac_c" 1>&6
4351 cf_cv_ncurses_version=no
4354 if test "$cross_compiling" = yes; then
4357 # This will not work if the preprocessor splits the line after the
4358 # Autoconf token. The 'unproto' program does that.
4359 cat > conftest.$ac_ext <<EOF
4360 #include <${cf_cv_ncurses_header-curses.h}>
4362 #ifdef NCURSES_VERSION
4363 Autoconf NCURSES_VERSION
4371 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4372 { (eval echo configure:4373: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
4373 if test -f conftest.out ; then
4374 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4375 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4380 cat > conftest.$ac_ext <<EOF
4381 #line 4382 "configure"
4382 #include "confdefs.h"
4384 #include <${cf_cv_ncurses_header-curses.h}>
4388 FILE *fp = fopen("$cf_tempfile", "w");
4389 #ifdef NCURSES_VERSION
4390 # ifdef NCURSES_VERSION_PATCH
4391 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4393 fprintf(fp, "%s\n", NCURSES_VERSION);
4397 fprintf(fp, "old\n");
4402 ${cf_cv_main_return-return}(0);
4405 if { (eval echo configure:4406: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4408 cf_cv_ncurses_version=`cat $cf_tempfile`
4410 echo "configure: failed program was:" >&5
4411 cat conftest.$ac_ext >&5
4420 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
4421 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
4429 cf_nculib_root=ncurses
4430 # This works, except for the special case where we find gpm, but
4431 # ncurses is in a nonstandard location via $LIBS, and we really want
4434 cf_ncurses_SAVE="$LIBS"
4435 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
4436 echo "configure:4437: checking for Gpm_Open in -lgpm" >&5
4437 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
4438 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4439 echo $ac_n "(cached) $ac_c" 1>&6
4441 ac_save_LIBS="$LIBS"
4443 cat > conftest.$ac_ext <<EOF
4444 #line 4445 "configure"
4445 #include "confdefs.h"
4446 /* Override any gcc2 internal prototype to avoid an error. */
4447 /* We use char because int might match the return type of a gcc2
4448 builtin and then its argument prototype would still apply. */
4455 if { (eval echo configure:4456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4457 eval "ac_cv_lib_$ac_lib_var=yes"
4459 echo "configure: failed program was:" >&5
4460 cat conftest.$ac_ext >&5
4462 eval "ac_cv_lib_$ac_lib_var=no"
4465 LIBS="$ac_save_LIBS"
4468 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4469 echo "$ac_t""yes" 1>&6
4470 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
4471 echo "configure:4472: checking for initscr in -lgpm" >&5
4472 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
4473 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4474 echo $ac_n "(cached) $ac_c" 1>&6
4476 ac_save_LIBS="$LIBS"
4478 cat > conftest.$ac_ext <<EOF
4479 #line 4480 "configure"
4480 #include "confdefs.h"
4481 /* Override any gcc2 internal prototype to avoid an error. */
4482 /* We use char because int might match the return type of a gcc2
4483 builtin and then its argument prototype would still apply. */
4490 if { (eval echo configure:4491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4492 eval "ac_cv_lib_$ac_lib_var=yes"
4494 echo "configure: failed program was:" >&5
4495 cat conftest.$ac_ext >&5
4497 eval "ac_cv_lib_$ac_lib_var=no"
4500 LIBS="$ac_save_LIBS"
4503 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4504 echo "$ac_t""yes" 1>&6
4505 LIBS="$cf_ncurses_SAVE"
4507 echo "$ac_t""no" 1>&6
4508 cf_ncurses_LIBS="-lgpm"
4512 echo "$ac_t""no" 1>&6
4516 case $host_os in #(vi
4518 # This is only necessary if you are linking against an obsolete
4519 # version of ncurses (but it should do no harm, since it's static).
4520 if test "$cf_nculib_root" = ncurses ; then
4521 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
4522 echo "configure:4523: checking for tgoto in -lmytinfo" >&5
4523 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
4524 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4525 echo $ac_n "(cached) $ac_c" 1>&6
4527 ac_save_LIBS="$LIBS"
4528 LIBS="-lmytinfo $LIBS"
4529 cat > conftest.$ac_ext <<EOF
4530 #line 4531 "configure"
4531 #include "confdefs.h"
4532 /* Override any gcc2 internal prototype to avoid an error. */
4533 /* We use char because int might match the return type of a gcc2
4534 builtin and then its argument prototype would still apply. */
4541 if { (eval echo configure:4542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4543 eval "ac_cv_lib_$ac_lib_var=yes"
4545 echo "configure: failed program was:" >&5
4546 cat conftest.$ac_ext >&5
4548 eval "ac_cv_lib_$ac_lib_var=no"
4551 LIBS="$ac_save_LIBS"
4554 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4555 echo "$ac_t""yes" 1>&6
4556 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
4558 echo "$ac_t""no" 1>&6
4565 LIBS="$cf_ncurses_LIBS $LIBS"
4567 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4570 if test -n "$cf_cv_curses_dir/lib" ; then
4571 for cf_add_libdir in $cf_cv_curses_dir/lib
4573 if test $cf_add_libdir = /usr/lib ; then
4575 elif test -d $cf_add_libdir
4578 if test -n "$LDFLAGS$LIBS" ; then
4579 # a loop is needed to ensure we can add subdirs of existing dirs
4580 for cf_test_libdir in $LDFLAGS $LIBS ; do
4581 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4582 cf_have_libdir=yes; break
4586 if test "$cf_have_libdir" = no ; then
4587 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4589 echo "${as_me-configure}:4590: testing adding $cf_add_libdir to library-path ..." 1>&5
4592 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4598 LIBS="-l$cf_nculib_root $LIBS"
4601 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
4603 echo $ac_n "checking for initscr""... $ac_c" 1>&6
4604 echo "configure:4605: checking for initscr" >&5
4605 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
4606 echo $ac_n "(cached) $ac_c" 1>&6
4608 cat > conftest.$ac_ext <<EOF
4609 #line 4610 "configure"
4610 #include "confdefs.h"
4611 /* System header to define __stub macros and hopefully few prototypes,
4612 which can conflict with char initscr(); below. */
4614 /* Override any gcc2 internal prototype to avoid an error. */
4615 /* We use char because int might match the return type of a gcc2
4616 builtin and then its argument prototype would still apply. */
4621 /* The GNU C library defines this for functions which it implements
4622 to always fail with ENOSYS. Some functions are actually named
4623 something starting with __ and the normal name is an alias. */
4624 #if defined (__stub_initscr) || defined (__stub___initscr)
4632 if { (eval echo configure:4633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4634 eval "ac_cv_func_initscr=yes"
4636 echo "configure: failed program was:" >&5
4637 cat conftest.$ac_ext >&5
4639 eval "ac_cv_func_initscr=no"
4644 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
4645 echo "$ac_t""yes" 1>&6
4646 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4648 echo "$ac_t""no" 1>&6