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
1219 CC_SHARED_OPTS=unknown
1220 CPPFLAGS="$CPPFLAGS"
1222 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
1223 DFT_UPR_MODEL="NORMAL"
1242 TINFO_ARGS='$(LIBS_CURSES)'
1243 cf_cv_abi_version=""
1244 cf_cv_rel_version=""
1249 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1250 echo "configure:1251: checking for Cygwin environment" >&5
1251 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1252 echo $ac_n "(cached) $ac_c" 1>&6
1254 cat > conftest.$ac_ext <<EOF
1255 #line 1256 "configure"
1256 #include "confdefs.h"
1261 #define __CYGWIN__ __CYGWIN32__
1266 if { (eval echo configure:1267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1270 echo "configure: failed program was:" >&5
1271 cat conftest.$ac_ext >&5
1279 echo "$ac_t""$ac_cv_cygwin" 1>&6
1281 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1282 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1283 echo "configure:1284: checking for mingw32 environment" >&5
1284 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1285 echo $ac_n "(cached) $ac_c" 1>&6
1287 cat > conftest.$ac_ext <<EOF
1288 #line 1289 "configure"
1289 #include "confdefs.h"
1295 if { (eval echo configure:1296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1299 echo "configure: failed program was:" >&5
1300 cat conftest.$ac_ext >&5
1308 echo "$ac_t""$ac_cv_mingw32" 1>&6
1310 test "$ac_cv_mingw32" = yes && MINGW32=yes
1313 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1314 echo "configure:1315: checking for executable suffix" >&5
1315 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1316 echo $ac_n "(cached) $ac_c" 1>&6
1318 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1322 echo 'int main () { return 0; }' > conftest.$ac_ext
1324 if { (eval echo configure:1325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1325 for file in conftest.*; do
1327 *.c | *.o | *.obj) ;;
1328 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1332 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1335 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1340 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1341 echo "$ac_t""${ac_cv_exeext}" 1>&6
1344 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1345 echo "configure:1346: checking for object suffix" >&5
1346 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1347 echo $ac_n "(cached) $ac_c" 1>&6
1350 echo 'int i = 1;' > conftest.$ac_ext
1351 if { (eval echo configure:1352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1352 for ac_file in conftest.*; do
1355 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1359 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1364 echo "$ac_t""$ac_cv_objext" 1>&6
1365 OBJEXT=$ac_cv_objext
1366 ac_objext=$ac_cv_objext
1370 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1371 echo "configure:1372: checking for ${CC-cc} option to accept ANSI C" >&5
1372 if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
1373 echo $ac_n "(cached) $ac_c" 1>&6
1377 cf_save_CFLAGS="$CFLAGS"
1378 cf_save_CPPFLAGS="$CPPFLAGS"
1379 # Don't try gcc -ansi; that turns off useful extensions and
1380 # breaks some systems' header files.
1381 # AIX -qlanglvl=ansi
1382 # Ultrix and OSF/1 -std1
1383 # HP-UX -Aa -D_HPUX_SOURCE
1385 # UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
1386 for cf_arg in "-DCC_HAS_PROTOS" \
1391 "-Aa -D_HPUX_SOURCE" \
1398 cf_new_extra_cppflags=
1400 for cf_add_cflags in $cf_arg
1402 case $cf_fix_cppflags in
1404 case $cf_add_cflags in #(vi
1405 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1406 case $cf_add_cflags in
1408 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1410 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1411 && test -z "${cf_tst_cflags}" \
1412 && cf_fix_cppflags=yes
1414 if test $cf_fix_cppflags = yes ; then
1415 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1417 elif test "${cf_tst_cflags}" = "\"'" ; then
1418 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1424 *$cf_add_cflags) #(vi
1427 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1432 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1437 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1439 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1441 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1442 && test -z "${cf_tst_cflags}" \
1443 && cf_fix_cppflags=no
1448 if test -n "$cf_new_cflags" ; then
1450 CFLAGS="$CFLAGS $cf_new_cflags"
1453 if test -n "$cf_new_cppflags" ; then
1455 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1458 if test -n "$cf_new_extra_cppflags" ; then
1460 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1466 cat > conftest.$ac_ext <<EOF
1467 #line 1468 "configure"
1468 #include "confdefs.h"
1470 #ifndef CC_HAS_PROTOS
1471 #if !defined(__STDC__) || (__STDC__ != 1)
1478 int test (int i, double x);
1479 struct s1 {int (*f) (int a);};
1480 struct s2 {int (*f) (double a);};
1483 if { (eval echo configure:1484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1485 cf_cv_ansi_cc="$cf_arg"; break
1487 echo "configure: failed program was:" >&5
1488 cat conftest.$ac_ext >&5
1492 CFLAGS="$cf_save_CFLAGS"
1493 CPPFLAGS="$cf_save_CPPFLAGS"
1497 echo "$ac_t""$cf_cv_ansi_cc" 1>&6
1499 if test "$cf_cv_ansi_cc" != "no"; then
1500 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
1505 cf_new_extra_cppflags=
1507 for cf_add_cflags in $cf_cv_ansi_cc
1509 case $cf_fix_cppflags in
1511 case $cf_add_cflags in #(vi
1512 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1513 case $cf_add_cflags in
1515 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1517 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1518 && test -z "${cf_tst_cflags}" \
1519 && cf_fix_cppflags=yes
1521 if test $cf_fix_cppflags = yes ; then
1522 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1524 elif test "${cf_tst_cflags}" = "\"'" ; then
1525 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1531 *$cf_add_cflags) #(vi
1534 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1539 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1544 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1546 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1548 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1549 && test -z "${cf_tst_cflags}" \
1550 && cf_fix_cppflags=no
1555 if test -n "$cf_new_cflags" ; then
1557 CFLAGS="$CFLAGS $cf_new_cflags"
1560 if test -n "$cf_new_cppflags" ; then
1562 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1565 if test -n "$cf_new_extra_cppflags" ; then
1567 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1574 cat >> confdefs.h <<\EOF
1575 #define CC_HAS_PROTOS 1
1582 if test "$cf_cv_ansi_cc" = "no"; then
1583 { echo "configure: error: Your compiler does not appear to recognize prototypes.
1584 You have the following choices:
1585 a. adjust your compiler options
1586 b. get an up-to-date compiler
1587 c. use a wrapper such as unproto" 1>&2; exit 1; }
1591 if test "$GCC" = yes
1593 cat > conftest.i <<EOF
1595 #define GCC_PRINTF 0
1600 #ifndef GCC_NORETURN
1601 #define GCC_NORETURN /* nothing */
1604 #define GCC_UNUSED /* nothing */
1607 if test "$GCC" = yes
1609 echo "checking for $CC __attribute__ directives" 1>&6
1610 echo "configure:1611: checking for $CC __attribute__ directives" >&5
1611 cat > conftest.$ac_ext <<EOF
1612 #line 1613 "${as_me-configure}"
1613 #include "confdefs.h"
1614 #include "conftest.h"
1615 #include "conftest.i"
1617 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
1619 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
1622 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
1624 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
1626 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
1627 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
1628 extern void foo(void) GCC_NORETURN;
1629 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
1631 for cf_attribute in scanf printf unused noreturn
1634 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1636 cf_directive="__attribute__(($cf_attribute))"
1637 echo "checking for $CC $cf_directive" 1>&5
1638 case $cf_attribute in
1640 cat >conftest.h <<EOF
1641 #define GCC_$cf_ATTRIBUTE 1
1645 cat >conftest.h <<EOF
1646 #define GCC_$cf_ATTRIBUTE $cf_directive
1650 if { (eval echo configure:1651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1651 test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
1652 cat conftest.h >>confdefs.h
1656 fgrep define conftest.i >>confdefs.h
1662 echo $ac_n "checking if $CC -U and -D options work together""... $ac_c" 1>&6
1663 echo "configure:1664: checking if $CC -U and -D options work together" >&5
1664 if eval "test \"`echo '$''{'cf_cv_cc_u_d_options'+set}'`\" = set"; then
1665 echo $ac_n "(cached) $ac_c" 1>&6
1668 cf_save_CPPFLAGS="$CPPFLAGS"
1669 CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
1670 cat > conftest.$ac_ext <<EOF
1671 #line 1672 "configure"
1672 #include "confdefs.h"
1677 make an undefined-error
1680 make a defined-error
1685 if { (eval echo configure:1686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1688 cf_cv_cc_u_d_options=yes
1690 echo "configure: failed program was:" >&5
1691 cat conftest.$ac_ext >&5
1694 cf_cv_cc_u_d_options=no
1697 CPPFLAGS="$cf_save_CPPFLAGS"
1701 echo "$ac_t""$cf_cv_cc_u_d_options" 1>&6
1708 cf_POSIX_C_SOURCE=199506L
1710 case $host_os in #(vi
1712 CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
1714 freebsd*|dragonfly*) #(vi
1715 # 5.x headers associate
1716 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
1717 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
1718 cf_POSIX_C_SOURCE=200112L
1720 CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1723 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
1726 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
1729 CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
1731 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
1733 echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
1734 echo "configure:1735: checking if we must define _GNU_SOURCE" >&5
1735 if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
1736 echo $ac_n "(cached) $ac_c" 1>&6
1739 cat > conftest.$ac_ext <<EOF
1740 #line 1741 "configure"
1741 #include "confdefs.h"
1742 #include <sys/types.h>
1745 #ifndef _XOPEN_SOURCE
1750 if { (eval echo configure:1751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1754 echo "configure: failed program was:" >&5
1755 cat conftest.$ac_ext >&5
1758 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1759 cat > conftest.$ac_ext <<EOF
1760 #line 1761 "configure"
1761 #include "confdefs.h"
1762 #include <sys/types.h>
1765 #ifdef _XOPEN_SOURCE
1770 if { (eval echo configure:1771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1774 echo "configure: failed program was:" >&5
1775 cat conftest.$ac_ext >&5
1777 cf_cv_gnu_source=yes
1787 echo "$ac_t""$cf_cv_gnu_source" 1>&6
1788 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1792 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
1795 # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
1798 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
1801 CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
1804 CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
1807 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
1810 CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
1813 echo $ac_n "checking if we should define _XOPEN_SOURCE""... $ac_c" 1>&6
1814 echo "configure:1815: checking if we should define _XOPEN_SOURCE" >&5
1815 if eval "test \"`echo '$''{'cf_cv_xopen_source'+set}'`\" = set"; then
1816 echo $ac_n "(cached) $ac_c" 1>&6
1819 cat > conftest.$ac_ext <<EOF
1820 #line 1821 "configure"
1821 #include "confdefs.h"
1822 #include <sys/types.h>
1825 #ifndef _XOPEN_SOURCE
1830 if { (eval echo configure:1831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1832 cf_cv_xopen_source=no
1834 echo "configure: failed program was:" >&5
1835 cat conftest.$ac_ext >&5
1838 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1839 cat > conftest.$ac_ext <<EOF
1840 #line 1841 "configure"
1841 #include "confdefs.h"
1842 #include <sys/types.h>
1845 #ifdef _XOPEN_SOURCE
1850 if { (eval echo configure:1851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1852 cf_cv_xopen_source=no
1854 echo "configure: failed program was:" >&5
1855 cat conftest.$ac_ext >&5
1857 cf_cv_xopen_source=$cf_XOPEN_SOURCE
1867 echo "$ac_t""$cf_cv_xopen_source" 1>&6
1868 if test "$cf_cv_xopen_source" != no ; then
1870 # remove _XOPEN_SOURCE symbol from $CFLAGS
1871 CFLAGS=`echo "$CFLAGS" | \
1872 sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
1873 -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
1876 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
1877 CPPFLAGS=`echo "$CPPFLAGS" | \
1878 sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
1879 -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
1881 test "$cf_cv_cc_u_d_options" = yes && \
1882 CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
1883 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
1886 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
1888 cf_save_CFLAGS="$CFLAGS"
1889 cf_save_CPPFLAGS="$CPPFLAGS"
1892 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
1893 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
1894 sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
1895 -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
1898 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
1899 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
1900 sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
1901 -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
1904 echo $ac_n "checking if we should define _POSIX_C_SOURCE""... $ac_c" 1>&6
1905 echo "configure:1906: checking if we should define _POSIX_C_SOURCE" >&5
1906 if eval "test \"`echo '$''{'cf_cv_posix_c_source'+set}'`\" = set"; then
1907 echo $ac_n "(cached) $ac_c" 1>&6
1911 echo "${as_me-configure}:1912: testing if the symbol is already defined go no further ..." 1>&5
1913 cat > conftest.$ac_ext <<EOF
1914 #line 1915 "configure"
1915 #include "confdefs.h"
1916 #include <sys/types.h>
1919 #ifndef _POSIX_C_SOURCE
1924 if { (eval echo configure:1925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1926 cf_cv_posix_c_source=no
1928 echo "configure: failed program was:" >&5
1929 cat conftest.$ac_ext >&5
1931 cf_want_posix_source=no
1932 case .$cf_POSIX_C_SOURCE in #(vi
1934 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
1937 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
1938 cf_want_posix_source=yes
1941 cf_want_posix_source=yes
1944 if test "$cf_want_posix_source" = yes ; then
1945 cat > conftest.$ac_ext <<EOF
1946 #line 1947 "configure"
1947 #include "confdefs.h"
1948 #include <sys/types.h>
1951 #ifdef _POSIX_SOURCE
1956 if { (eval echo configure:1957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1959 echo "configure: failed program was:" >&5
1960 cat conftest.$ac_ext >&5
1962 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
1967 echo "${as_me-configure}:1968: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
1969 CFLAGS="$cf_trim_CFLAGS"
1970 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
1972 echo "${as_me-configure}:1973: testing if the second compile does not leave our definition intact error ..." 1>&5
1974 cat > conftest.$ac_ext <<EOF
1975 #line 1976 "configure"
1976 #include "confdefs.h"
1977 #include <sys/types.h>
1980 #ifndef _POSIX_C_SOURCE
1985 if { (eval echo configure:1986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1988 echo "configure: failed program was:" >&5
1989 cat conftest.$ac_ext >&5
1991 cf_cv_posix_c_source=no
1994 CFLAGS="$cf_save_CFLAGS"
1995 CPPFLAGS="$cf_save_CPPFLAGS"
2002 echo "$ac_t""$cf_cv_posix_c_source" 1>&6
2004 if test "$cf_cv_posix_c_source" != no ; then
2005 CFLAGS="$cf_trim_CFLAGS"
2006 CPPFLAGS="$cf_trim_CPPFLAGS"
2007 if test "$cf_cv_cc_u_d_options" = yes ; then
2008 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
2009 sed -e 's/-D/-U/g' -e 's/=[^ ]*//g'`
2010 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
2012 CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
2019 echo $ac_n "checking for working const""... $ac_c" 1>&6
2020 echo "configure:2021: checking for working const" >&5
2021 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2022 echo $ac_n "(cached) $ac_c" 1>&6
2024 cat > conftest.$ac_ext <<EOF
2025 #line 2026 "configure"
2026 #include "confdefs.h"
2030 /* Ultrix mips cc rejects this. */
2031 typedef int charset[2]; const charset x;
2032 /* SunOS 4.1.1 cc rejects this. */
2033 char const *const *ccp;
2035 /* NEC SVR4.0.2 mips cc rejects this. */
2036 struct point {int x, y;};
2037 static struct point const zero = {0,0};
2038 /* AIX XL C 1.02.0.0 rejects this.
2039 It does not let you subtract one const X* pointer from another in an arm
2040 of an if-expression whose if-part is not a constant expression */
2041 const char *g = "string";
2042 ccp = &g + (g ? g-g : 0);
2043 /* HPUX 7.0 cc rejects these. */
2046 ccp = (char const *const *) p;
2047 { /* SCO 3.2v4 cc rejects this. */
2049 char const *s = 0 ? (char *) 0 : (char const *) 0;
2053 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2055 const int *foo = &x[0];
2058 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2059 typedef const int *iptr;
2063 { /* AIX XL C 1.02.0.0 rejects this saying
2064 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2065 struct s { int j; const int *ap[3]; };
2066 struct s *b; b->j = 5;
2068 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2074 if { (eval echo configure:2075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2078 echo "configure: failed program was:" >&5
2079 cat conftest.$ac_ext >&5
2086 echo "$ac_t""$ac_cv_c_const" 1>&6
2087 if test $ac_cv_c_const = no; then
2088 cat >> confdefs.h <<\EOF
2095 echo $ac_n "checking for signal global datatype""... $ac_c" 1>&6
2096 echo "configure:2097: checking for signal global datatype" >&5
2097 if eval "test \"`echo '$''{'cf_cv_sig_atomic_t'+set}'`\" = set"; then
2098 echo $ac_n "(cached) $ac_c" 1>&6
2102 "volatile sig_atomic_t" \
2106 cat > conftest.$ac_ext <<EOF
2107 #line 2108 "configure"
2108 #include "confdefs.h"
2110 #include <sys/types.h>
2116 static void handler(int sig)
2121 signal(SIGINT, handler);
2125 if { (eval echo configure:2126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2127 cf_cv_sig_atomic_t=$cf_type
2129 echo "configure: failed program was:" >&5
2130 cat conftest.$ac_ext >&5
2132 cf_cv_sig_atomic_t=no
2135 test "$cf_cv_sig_atomic_t" != no && break
2140 echo "$ac_t""$cf_cv_sig_atomic_t" 1>&6
2141 test "$cf_cv_sig_atomic_t" != no && cat >> confdefs.h <<EOF
2142 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
2148 echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6
2149 echo "configure:2150: checking if you want to see long compiling messages" >&5
2151 # Check whether --enable-echo or --disable-echo was given.
2152 if test "${enable_echo+set}" = set; then
2153 enableval="$enable_echo"
2154 test "$enableval" != no && enableval=yes
2155 if test "$enableval" != "yes" ; then
2158 ECHO_LD='@echo linking $@;'
2159 RULE_CC=' @echo compiling $<'
2160 SHOW_CC=' @echo compiling $@'
2167 RULE_CC='# compiling'
2168 SHOW_CC='# compiling'
2177 RULE_CC='# compiling'
2178 SHOW_CC='# compiling'
2184 echo "$ac_t""$enableval" 1>&6
2194 if test "$GCC" = yes ; then
2195 echo $ac_n "checking version of $CC""... $ac_c" 1>&6
2196 echo "configure:2197: checking version of $CC" >&5
2197 GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2198 test -z "$GCC_VERSION" && GCC_VERSION=unknown
2199 echo "$ac_t""$GCC_VERSION" 1>&6
2203 if ( test "$GCC" = yes || test "$GXX" = yes )
2205 echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
2206 echo "configure:2207: checking if you want to turn on gcc warnings" >&5
2208 # Check whether --enable-warnings or --disable-warnings was given.
2209 if test "${enable_warnings+set}" = set; then
2210 enableval="$enable_warnings"
2211 test "$enableval" != yes && enableval=no
2212 if test "$enableval" != "no" ; then
2223 echo "$ac_t""$with_warnings" 1>&6
2224 if test "$with_warnings" = "yes"
2231 if test "$GCC" = yes ; then
2234 echo $ac_n "checking if this is really Intel C compiler""... $ac_c" 1>&6
2235 echo "configure:2236: checking if this is really Intel C compiler" >&5
2236 cf_save_CFLAGS="$CFLAGS"
2237 CFLAGS="$CFLAGS -no-gcc"
2238 cat > conftest.$ac_ext <<EOF
2239 #line 2240 "configure"
2240 #include "confdefs.h"
2244 #ifdef __INTEL_COMPILER
2251 if { (eval echo configure:2252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2254 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
2257 echo "configure: failed program was:" >&5
2258 cat conftest.$ac_ext >&5
2261 CFLAGS="$cf_save_CFLAGS"
2262 echo "$ac_t""$INTEL_COMPILER" 1>&6
2268 cat > conftest.$ac_ext <<EOF
2269 #line 2270 "${as_me-configure}"
2270 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
2273 if test "$INTEL_COMPILER" = yes
2275 # The "-wdXXX" options suppress warnings:
2276 # remark #1419: external declaration in primary source file
2277 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
2278 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
2279 # remark #193: zero used for undefined preprocessing identifier
2280 # remark #593: variable "curs_sb_left_arrow" was set but never used
2281 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
2282 # remark #869: parameter "tw" was never referenced
2283 # remark #981: operands are evaluated in unspecified order
2284 # warning #279: controlling expression is constant
2286 echo "checking for $CC warning options" 1>&6
2287 echo "configure:2288: checking for $CC warning options" >&5
2288 cf_save_CFLAGS="$CFLAGS"
2289 EXTRA_CFLAGS="-Wall"
2301 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
2302 if { (eval echo configure:2303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2303 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
2304 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
2307 CFLAGS="$cf_save_CFLAGS"
2309 elif test "$GCC" = yes
2311 echo "checking for $CC warning options" 1>&6
2312 echo "configure:2313: checking for $CC warning options" >&5
2313 cf_save_CFLAGS="$CFLAGS"
2314 EXTRA_CFLAGS="-W -Wall"
2316 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
2318 Wbad-function-cast \
2322 Wmissing-declarations \
2323 Wmissing-prototypes \
2327 Wstrict-prototypes \
2328 Wundef $cf_warn_CONST
2330 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
2331 if { (eval echo configure:2332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2332 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
2333 case $cf_opt in #(vi
2335 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
2338 case $GCC_VERSION in
2340 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
2342 echo "${as_me-configure}:2343: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
2349 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
2352 CFLAGS="$cf_save_CFLAGS"
2364 # Check whether --with-curses-dir or --without-curses-dir was given.
2365 if test "${with_curses_dir+set}" = set; then
2366 withval="$with_curses_dir"
2368 if test "x$prefix" != xNONE; then
2369 cf_path_syntax="$prefix"
2371 cf_path_syntax="$ac_default_prefix"
2374 case ".$withval" in #(vi
2375 .\$\(*\)*|.\'*\'*) #(vi
2379 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2382 eval withval="$withval"
2383 case ".$withval" in #(vi
2385 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2390 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2393 { echo "configure: error: expected a pathname, not \"$withval\"" 1>&2; exit 1; }
2397 cf_cv_curses_dir=$withval
2405 # Check whether --with-5lib or --without-5lib was given.
2406 if test "${with_5lib+set}" = set; then
2407 withval="$with_5lib"
2408 LIBS="-L/usr/5lib $LIBS"
2409 CPPFLAGS="$CPPFLAGS -I/usr/5include"
2414 # Check whether --with-ncursesw or --without-ncursesw was given.
2415 if test "${with_ncursesw+set}" = set; then
2416 withval="$with_ncursesw"
2417 cf_cv_screen=ncursesw
2422 # Check whether --with-ncurses or --without-ncurses was given.
2423 if test "${with_ncurses+set}" = set; then
2424 withval="$with_ncurses"
2425 cf_cv_screen=ncurses
2430 # Check whether --with-pdcurses or --without-pdcurses was given.
2431 if test "${with_pdcurses+set}" = set; then
2432 withval="$with_pdcurses"
2433 cf_cv_screen=pdcurses
2441 case $cf_cv_screen in
2446 echo $ac_n "checking for extra include directories""... $ac_c" 1>&6
2447 echo "configure:2448: checking for extra include directories" >&5
2448 if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then
2449 echo $ac_n "(cached) $ac_c" 1>&6
2452 cf_cv_curses_incdir=no
2453 case $host_os in #(vi
2455 test -d /usr/include/curses_colr && \
2456 cf_cv_curses_incdir="-I/usr/include/curses_colr"
2459 test -d /usr/5lib && \
2460 test -d /usr/5include && \
2461 cf_cv_curses_incdir="-I/usr/5include"
2467 echo "$ac_t""$cf_cv_curses_incdir" 1>&6
2468 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
2471 echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
2472 echo "configure:2473: checking if we have identified curses headers" >&5
2473 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
2474 echo $ac_n "(cached) $ac_c" 1>&6
2477 cf_cv_ncurses_header=none
2484 cat > conftest.$ac_ext <<EOF
2485 #line 2486 "configure"
2486 #include "confdefs.h"
2487 #include <${cf_header}>
2489 initscr(); tgoto("?", 0,0)
2492 if { (eval echo configure:2493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2494 cf_cv_ncurses_header=$cf_header; break
2496 echo "configure: failed program was:" >&5
2497 cat conftest.$ac_ext >&5
2504 echo "$ac_t""$cf_cv_ncurses_header" 1>&6
2506 if test "$cf_cv_ncurses_header" = none ; then
2507 { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
2510 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
2511 for ac_hdr in $cf_cv_ncurses_header
2513 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2514 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2515 echo "configure:2516: checking for $ac_hdr" >&5
2516 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2517 echo $ac_n "(cached) $ac_c" 1>&6
2519 cat > conftest.$ac_ext <<EOF
2520 #line 2521 "configure"
2521 #include "confdefs.h"
2524 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2525 { (eval echo configure:2526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2526 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2527 if test -z "$ac_err"; then
2529 eval "ac_cv_header_$ac_safe=yes"
2532 echo "configure: failed program was:" >&5
2533 cat conftest.$ac_ext >&5
2535 eval "ac_cv_header_$ac_safe=no"
2539 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2540 echo "$ac_t""yes" 1>&6
2541 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2542 cat >> confdefs.h <<EOF
2543 #define $ac_tr_hdr 1
2547 echo "$ac_t""no" 1>&6
2553 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
2554 echo "configure:2555: checking for terminfo header" >&5
2555 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
2556 echo $ac_n "(cached) $ac_c" 1>&6
2559 case ${cf_cv_ncurses_header} in #(vi
2560 */ncurses.h|*/ncursesw.h) #(vi
2561 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
2564 cf_term_header=term.h
2568 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
2570 cat > conftest.$ac_ext <<EOF
2571 #line 2572 "configure"
2572 #include "confdefs.h"
2574 #include <${cf_cv_ncurses_header-curses.h}>
2578 int x = auto_left_margin
2581 if { (eval echo configure:2582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2584 cf_cv_term_header="$cf_test"
2586 echo "configure: failed program was:" >&5
2587 cat conftest.$ac_ext >&5
2590 cf_cv_term_header=unknown
2594 test "$cf_cv_term_header" != unknown && break
2599 echo "$ac_t""$cf_cv_term_header" 1>&6
2601 # Set definitions to allow ifdef'ing to accommodate subdirectories
2603 case $cf_cv_term_header in # (vi
2605 cat >> confdefs.h <<\EOF
2606 #define HAVE_TERM_H 1
2612 case $cf_cv_term_header in # (vi
2613 ncurses/term.h) #(vi
2614 cat >> confdefs.h <<\EOF
2615 #define HAVE_NCURSES_TERM_H 1
2620 cat >> confdefs.h <<\EOF
2621 #define HAVE_NCURSESW_TERM_H 1
2629 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
2630 echo "configure:2631: checking for ncurses version" >&5
2631 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
2632 echo $ac_n "(cached) $ac_c" 1>&6
2635 cf_cv_ncurses_version=no
2638 if test "$cross_compiling" = yes; then
2641 # This will not work if the preprocessor splits the line after the
2642 # Autoconf token. The 'unproto' program does that.
2643 cat > conftest.$ac_ext <<EOF
2644 #include <${cf_cv_ncurses_header-curses.h}>
2646 #ifdef NCURSES_VERSION
2647 Autoconf NCURSES_VERSION
2655 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
2656 { (eval echo configure:2657: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
2657 if test -f conftest.out ; then
2658 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
2659 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
2664 cat > conftest.$ac_ext <<EOF
2665 #line 2666 "configure"
2666 #include "confdefs.h"
2668 #include <${cf_cv_ncurses_header-curses.h}>
2672 FILE *fp = fopen("$cf_tempfile", "w");
2673 #ifdef NCURSES_VERSION
2674 # ifdef NCURSES_VERSION_PATCH
2675 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
2677 fprintf(fp, "%s\n", NCURSES_VERSION);
2681 fprintf(fp, "old\n");
2686 ${cf_cv_main_return-return}(0);
2689 if { (eval echo configure:2690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2692 cf_cv_ncurses_version=`cat $cf_tempfile`
2694 echo "configure: failed program was:" >&5
2695 cat conftest.$ac_ext >&5
2704 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
2705 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
2712 echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
2713 echo "configure:2714: checking if we have identified curses libraries" >&5
2714 cat > conftest.$ac_ext <<EOF
2715 #line 2716 "configure"
2716 #include "confdefs.h"
2717 #include <${cf_cv_ncurses_header-curses.h}>
2719 initscr(); tgoto("?", 0,0)
2722 if { (eval echo configure:2723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2726 echo "configure: failed program was:" >&5
2727 cat conftest.$ac_ext >&5
2732 echo "$ac_t""$cf_result" 1>&6
2734 if test "$cf_result" = no ; then
2735 case $host_os in #(vi
2737 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
2738 echo "configure:2739: checking for tgoto in -lmytinfo" >&5
2739 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
2740 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2741 echo $ac_n "(cached) $ac_c" 1>&6
2743 ac_save_LIBS="$LIBS"
2744 LIBS="-lmytinfo $LIBS"
2745 cat > conftest.$ac_ext <<EOF
2746 #line 2747 "configure"
2747 #include "confdefs.h"
2748 /* Override any gcc2 internal prototype to avoid an error. */
2749 /* We use char because int might match the return type of a gcc2
2750 builtin and then its argument prototype would still apply. */
2757 if { (eval echo configure:2758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2759 eval "ac_cv_lib_$ac_lib_var=yes"
2761 echo "configure: failed program was:" >&5
2762 cat conftest.$ac_ext >&5
2764 eval "ac_cv_lib_$ac_lib_var=no"
2767 LIBS="$ac_save_LIBS"
2770 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2771 echo "$ac_t""yes" 1>&6
2772 LIBS="-lmytinfo $LIBS"
2774 echo "$ac_t""no" 1>&6
2779 echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
2780 echo "configure:2781: checking for initscr in -lcur_colr" >&5
2781 ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
2782 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2783 echo $ac_n "(cached) $ac_c" 1>&6
2785 ac_save_LIBS="$LIBS"
2786 LIBS="-lcur_colr $LIBS"
2787 cat > conftest.$ac_ext <<EOF
2788 #line 2789 "configure"
2789 #include "confdefs.h"
2790 /* Override any gcc2 internal prototype to avoid an error. */
2791 /* We use char because int might match the return type of a gcc2
2792 builtin and then its argument prototype would still apply. */
2799 if { (eval echo configure:2800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2801 eval "ac_cv_lib_$ac_lib_var=yes"
2803 echo "configure: failed program was:" >&5
2804 cat conftest.$ac_ext >&5
2806 eval "ac_cv_lib_$ac_lib_var=no"
2809 LIBS="$ac_save_LIBS"
2812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2813 echo "$ac_t""yes" 1>&6
2815 LIBS="-lcur_colr $LIBS"
2816 ac_cv_func_initscr=yes
2819 echo "$ac_t""no" 1>&6
2821 echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
2822 echo "configure:2823: checking for initscr in -lHcurses" >&5
2823 ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
2824 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2825 echo $ac_n "(cached) $ac_c" 1>&6
2827 ac_save_LIBS="$LIBS"
2828 LIBS="-lHcurses $LIBS"
2829 cat > conftest.$ac_ext <<EOF
2830 #line 2831 "configure"
2831 #include "confdefs.h"
2832 /* Override any gcc2 internal prototype to avoid an error. */
2833 /* We use char because int might match the return type of a gcc2
2834 builtin and then its argument prototype would still apply. */
2841 if { (eval echo configure:2842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2843 eval "ac_cv_lib_$ac_lib_var=yes"
2845 echo "configure: failed program was:" >&5
2846 cat conftest.$ac_ext >&5
2848 eval "ac_cv_lib_$ac_lib_var=no"
2851 LIBS="$ac_save_LIBS"
2854 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2855 echo "$ac_t""yes" 1>&6
2857 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
2858 LIBS="-lHcurses $LIBS"
2859 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
2860 ac_cv_func_initscr=yes
2863 echo "$ac_t""no" 1>&6
2869 linux*) # Suse Linux does not follow /usr/lib convention
2871 if test -n "/lib" ; then
2872 for cf_add_libdir in /lib
2874 if test $cf_add_libdir = /usr/lib ; then
2876 elif test -d $cf_add_libdir
2879 if test -n "$LDFLAGS$LIBS" ; then
2880 # a loop is needed to ensure we can add subdirs of existing dirs
2881 for cf_test_libdir in $LDFLAGS $LIBS ; do
2882 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
2883 cf_have_libdir=yes; break
2887 if test "$cf_have_libdir" = no ; then
2888 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
2890 echo "${as_me-configure}:2891: testing adding $cf_add_libdir to library-path ..." 1>&5
2893 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
2901 if test -d /usr/5lib ; then
2903 if test -n "/usr/5lib" ; then
2904 for cf_add_libdir in /usr/5lib
2906 if test $cf_add_libdir = /usr/lib ; then
2908 elif test -d $cf_add_libdir
2911 if test -n "$LDFLAGS$LIBS" ; then
2912 # a loop is needed to ensure we can add subdirs of existing dirs
2913 for cf_test_libdir in $LDFLAGS $LIBS ; do
2914 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
2915 cf_have_libdir=yes; break
2919 if test "$cf_have_libdir" = no ; then
2920 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
2922 echo "${as_me-configure}:2923: testing adding $cf_add_libdir to library-path ..." 1>&5
2925 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
2931 LIBS="$LIBS -lcurses -ltermcap"
2933 ac_cv_func_initscr=yes
2937 if test ".$ac_cv_func_initscr" != .yes ; then
2938 cf_save_LIBS="$LIBS"
2942 if test ".${cf_cv_ncurses_version-no}" != .no
2944 cf_check_list="ncurses curses cursesX"
2946 cf_check_list="cursesX curses ncurses"
2949 # Check for library containing tgoto. Do this before curses library
2950 # because it may be needed to link the test-case for initscr.
2951 echo $ac_n "checking for tgoto""... $ac_c" 1>&6
2952 echo "configure:2953: checking for tgoto" >&5
2953 if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
2954 echo $ac_n "(cached) $ac_c" 1>&6
2956 cat > conftest.$ac_ext <<EOF
2957 #line 2958 "configure"
2958 #include "confdefs.h"
2959 /* System header to define __stub macros and hopefully few prototypes,
2960 which can conflict with char tgoto(); below. */
2962 /* Override any gcc2 internal prototype to avoid an error. */
2963 /* We use char because int might match the return type of a gcc2
2964 builtin and then its argument prototype would still apply. */
2969 /* The GNU C library defines this for functions which it implements
2970 to always fail with ENOSYS. Some functions are actually named
2971 something starting with __ and the normal name is an alias. */
2972 #if defined (__stub_tgoto) || defined (__stub___tgoto)
2980 if { (eval echo configure:2981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2982 eval "ac_cv_func_tgoto=yes"
2984 echo "configure: failed program was:" >&5
2985 cat conftest.$ac_ext >&5
2987 eval "ac_cv_func_tgoto=no"
2992 if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then
2993 echo "$ac_t""yes" 1>&6
2994 cf_term_lib=predefined
2996 echo "$ac_t""no" 1>&6
2998 for cf_term_lib in $cf_check_list termcap termlib unknown
3000 echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
3001 echo "configure:3002: checking for tgoto in -l$cf_term_lib" >&5
3002 ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
3003 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3004 echo $ac_n "(cached) $ac_c" 1>&6
3006 ac_save_LIBS="$LIBS"
3007 LIBS="-l$cf_term_lib $LIBS"
3008 cat > conftest.$ac_ext <<EOF
3009 #line 3010 "configure"
3010 #include "confdefs.h"
3011 /* Override any gcc2 internal prototype to avoid an error. */
3012 /* We use char because int might match the return type of a gcc2
3013 builtin and then its argument prototype would still apply. */
3020 if { (eval echo configure:3021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3022 eval "ac_cv_lib_$ac_lib_var=yes"
3024 echo "configure: failed program was:" >&5
3025 cat conftest.$ac_ext >&5
3027 eval "ac_cv_lib_$ac_lib_var=no"
3030 LIBS="$ac_save_LIBS"
3033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3034 echo "$ac_t""yes" 1>&6
3037 echo "$ac_t""no" 1>&6
3045 # Check for library containing initscr
3046 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
3047 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
3049 echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
3050 echo "configure:3051: checking for initscr in -l$cf_curs_lib" >&5
3051 ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
3052 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3053 echo $ac_n "(cached) $ac_c" 1>&6
3055 ac_save_LIBS="$LIBS"
3056 LIBS="-l$cf_curs_lib $LIBS"
3057 cat > conftest.$ac_ext <<EOF
3058 #line 3059 "configure"
3059 #include "confdefs.h"
3060 /* Override any gcc2 internal prototype to avoid an error. */
3061 /* We use char because int might match the return type of a gcc2
3062 builtin and then its argument prototype would still apply. */
3069 if { (eval echo configure:3070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3071 eval "ac_cv_lib_$ac_lib_var=yes"
3073 echo "configure: failed program was:" >&5
3074 cat conftest.$ac_ext >&5
3076 eval "ac_cv_lib_$ac_lib_var=no"
3079 LIBS="$ac_save_LIBS"
3082 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3083 echo "$ac_t""yes" 1>&6
3086 echo "$ac_t""no" 1>&6
3090 test $cf_curs_lib = unknown && { echo "configure: error: no curses library found" 1>&2; exit 1; }
3092 LIBS="-l$cf_curs_lib $cf_save_LIBS"
3093 if test "$cf_term_lib" = unknown ; then
3094 echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
3095 echo "configure:3096: checking if we can link with $cf_curs_lib library" >&5
3096 cat > conftest.$ac_ext <<EOF
3097 #line 3098 "configure"
3098 #include "confdefs.h"
3099 #include <${cf_cv_ncurses_header-curses.h}>
3104 if { (eval echo configure:3105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3108 echo "configure: failed program was:" >&5
3109 cat conftest.$ac_ext >&5
3114 echo "$ac_t""$cf_result" 1>&6
3115 test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; }
3116 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
3118 elif test "$cf_term_lib" != predefined ; then
3119 echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
3120 echo "configure:3121: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
3121 cat > conftest.$ac_ext <<EOF
3122 #line 3123 "configure"
3123 #include "confdefs.h"
3124 #include <${cf_cv_ncurses_header-curses.h}>
3126 initscr(); tgoto((char *)0, 0, 0);
3129 if { (eval echo configure:3130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3133 echo "configure: failed program was:" >&5
3134 cat conftest.$ac_ext >&5
3137 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
3138 cat > conftest.$ac_ext <<EOF
3139 #line 3140 "configure"
3140 #include "confdefs.h"
3141 #include <${cf_cv_ncurses_header-curses.h}>
3146 if { (eval echo configure:3147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3150 echo "configure: failed program was:" >&5
3151 cat conftest.$ac_ext >&5
3159 echo "$ac_t""$cf_result" 1>&6
3169 cf_ncuconfig_root=ncurses
3171 echo "Looking for ${cf_ncuconfig_root}-config"
3172 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
3174 # Extract the first word of "$ac_prog", so it can be a program name with args.
3175 set dummy $ac_prog; ac_word=$2
3176 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3177 echo "configure:3178: checking for $ac_word" >&5
3178 if eval "test \"`echo '$''{'ac_cv_path_NCURSES_CONFIG'+set}'`\" = set"; then
3179 echo $ac_n "(cached) $ac_c" 1>&6
3181 case "$NCURSES_CONFIG" in
3183 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
3186 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a dos path.
3189 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3191 for ac_dir in $ac_dummy; do
3192 test -z "$ac_dir" && ac_dir=.
3193 if test -f $ac_dir/$ac_word; then
3194 ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
3202 NCURSES_CONFIG="$ac_cv_path_NCURSES_CONFIG"
3203 if test -n "$NCURSES_CONFIG"; then
3204 echo "$ac_t""$NCURSES_CONFIG" 1>&6
3206 echo "$ac_t""no" 1>&6
3209 test -n "$NCURSES_CONFIG" && break
3211 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
3214 if test "$NCURSES_CONFIG" != none ; then
3216 cf_cv_ncurses_header=curses.h
3218 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
3219 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
3221 cat >> confdefs.h <<\EOF
3227 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3229 cat >> confdefs.h <<EOF
3230 #define $cf_nculib_ROOT 1
3234 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
3240 cf_ncuhdr_root=ncurses
3242 test -n "$cf_cv_curses_dir" && \
3243 test "$cf_cv_curses_dir" != "no" && { \
3245 if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
3246 for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
3248 while test $cf_add_incdir != /usr/include
3250 if test -d $cf_add_incdir
3253 if test -n "$CFLAGS$CPPFLAGS" ; then
3254 # a loop is needed to ensure we can add subdirs of existing dirs
3255 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3256 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3257 cf_have_incdir=yes; break
3262 if test "$cf_have_incdir" = no ; then
3263 if test "$cf_add_incdir" = /usr/local/include ; then
3264 if test "$GCC" = yes
3266 cf_save_CPPFLAGS=$CPPFLAGS
3267 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3268 cat > conftest.$ac_ext <<EOF
3269 #line 3270 "configure"
3270 #include "confdefs.h"
3276 if { (eval echo configure:3277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3279 echo "configure: failed program was:" >&5
3280 cat conftest.$ac_ext >&5
3285 CPPFLAGS=$cf_save_CPPFLAGS
3290 if test "$cf_have_incdir" = no ; then
3291 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3293 echo "${as_me-configure}:3294: testing adding $cf_add_incdir to include-path ..." 1>&5
3296 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3298 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3299 test "$cf_top_incdir" = "$cf_add_incdir" && break
3300 cf_add_incdir="$cf_top_incdir"
3311 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
3312 echo "configure:3313: checking for $cf_ncuhdr_root header in include-path" >&5
3313 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
3314 echo $ac_n "(cached) $ac_c" 1>&6
3317 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
3318 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
3319 for cf_header in $cf_header_list
3322 cat > conftest.$ac_ext <<EOF
3323 #line 3324 "configure"
3324 #include "confdefs.h"
3327 #include <$cf_header>
3330 #ifdef NCURSES_VERSION
3332 printf("%s\n", NCURSES_VERSION);
3344 if { (eval echo configure:3345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3346 cf_cv_ncurses_h=$cf_header
3349 echo "configure: failed program was:" >&5
3350 cat conftest.$ac_ext >&5
3356 test "$cf_cv_ncurses_h" != no && break
3361 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
3365 if test "$cf_cv_ncurses_h" != no ; then
3366 cf_cv_ncurses_header=$cf_cv_ncurses_h
3369 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
3370 echo "configure:3371: checking for $cf_ncuhdr_root include-path" >&5
3371 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
3372 echo $ac_n "(cached) $ac_c" 1>&6
3375 test -n "$verbose" && echo
3377 cf_header_path_list=""
3378 if test -n "${CFLAGS}${CPPFLAGS}" ; then
3379 for cf_header_path in $CPPFLAGS $CFLAGS
3381 case $cf_header_path in #(vi
3383 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
3385 test "$cf_header_path" != "NONE" && \
3386 test -d "$cf_header_path" && \
3388 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
3389 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
3390 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
3391 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
3392 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
3393 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"
3396 cf_header_path_list="$cf_header_path_list $cf_search"
3405 test "/usr" != "$prefix" && \
3407 (test $prefix = NONE || test -d $prefix) && {
3408 test -n "$verbose" && echo " ... testing for include-directories under /usr"
3409 test -d /usr/include && cf_search="$cf_search /usr/include"
3410 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
3411 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
3412 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
3413 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3417 test "$prefix" != "NONE" && \
3418 test -d "$prefix" && \
3420 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
3421 test -d $prefix/include && cf_search="$cf_search $prefix/include"
3422 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
3423 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
3424 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
3425 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3429 test "/usr/local" != "$prefix" && \
3430 test -d "/usr/local" && \
3431 (test $prefix = NONE || test -d $prefix) && {
3432 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
3433 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
3434 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
3435 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
3436 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
3437 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3441 test "/opt" != "$prefix" && \
3443 (test $prefix = NONE || test -d $prefix) && {
3444 test -n "$verbose" && echo " ... testing for include-directories under /opt"
3445 test -d /opt/include && cf_search="$cf_search /opt/include"
3446 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
3447 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
3448 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
3449 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3453 test "$HOME" != "$prefix" && \
3454 test -d "$HOME" && \
3455 (test $prefix = NONE || test -d $prefix) && {
3456 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
3457 test -d $HOME/include && cf_search="$cf_search $HOME/include"
3458 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
3459 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
3460 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
3461 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3466 test "$includedir" != NONE && \
3467 test "$includedir" != "/usr/include" && \
3468 test -d "$includedir" && {
3469 test -d $includedir && cf_search="$cf_search $includedir"
3470 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
3473 test "$oldincludedir" != NONE && \
3474 test "$oldincludedir" != "/usr/include" && \
3475 test -d "$oldincludedir" && {
3476 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
3477 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
3480 cf_search="$cf_header_path_list $cf_search"
3482 test -n "$verbose" && echo search path $cf_search
3483 cf_save2_CPPFLAGS="$CPPFLAGS"
3484 for cf_incdir in $cf_search
3487 if test -n "$cf_incdir" ; then
3488 for cf_add_incdir in $cf_incdir
3490 while test $cf_add_incdir != /usr/include
3492 if test -d $cf_add_incdir
3495 if test -n "$CFLAGS$CPPFLAGS" ; then
3496 # a loop is needed to ensure we can add subdirs of existing dirs
3497 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3498 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3499 cf_have_incdir=yes; break
3504 if test "$cf_have_incdir" = no ; then
3505 if test "$cf_add_incdir" = /usr/local/include ; then
3506 if test "$GCC" = yes
3508 cf_save_CPPFLAGS=$CPPFLAGS
3509 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3510 cat > conftest.$ac_ext <<EOF
3511 #line 3512 "configure"
3512 #include "confdefs.h"
3518 if { (eval echo configure:3519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3521 echo "configure: failed program was:" >&5
3522 cat conftest.$ac_ext >&5
3527 CPPFLAGS=$cf_save_CPPFLAGS
3532 if test "$cf_have_incdir" = no ; then
3533 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3535 echo "${as_me-configure}:3536: testing adding $cf_add_incdir to include-path ..." 1>&5
3538 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3540 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3541 test "$cf_top_incdir" = "$cf_add_incdir" && break
3542 cf_add_incdir="$cf_top_incdir"
3556 cat > conftest.$ac_ext <<EOF
3557 #line 3558 "configure"
3558 #include "confdefs.h"
3561 #include <$cf_header>
3564 #ifdef NCURSES_VERSION
3566 printf("%s\n", NCURSES_VERSION);
3578 if { (eval echo configure:3579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3580 cf_cv_ncurses_h2=$cf_header
3583 echo "configure: failed program was:" >&5
3584 cat conftest.$ac_ext >&5
3590 if test "$cf_cv_ncurses_h2" != no ; then
3591 cf_cv_ncurses_h2=$cf_incdir/$cf_header
3592 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
3595 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
3597 CPPFLAGS="$cf_save2_CPPFLAGS"
3598 test "$cf_cv_ncurses_h2" != no && break
3600 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
3604 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
3606 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
3607 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
3608 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
3609 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
3612 if test -n "$cf_1st_incdir" ; then
3613 for cf_add_incdir in $cf_1st_incdir
3615 while test $cf_add_incdir != /usr/include
3617 if test -d $cf_add_incdir
3620 if test -n "$CFLAGS$CPPFLAGS" ; then
3621 # a loop is needed to ensure we can add subdirs of existing dirs
3622 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3623 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3624 cf_have_incdir=yes; break
3629 if test "$cf_have_incdir" = no ; then
3630 if test "$cf_add_incdir" = /usr/local/include ; then
3631 if test "$GCC" = yes
3633 cf_save_CPPFLAGS=$CPPFLAGS
3634 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3635 cat > conftest.$ac_ext <<EOF
3636 #line 3637 "configure"
3637 #include "confdefs.h"
3643 if { (eval echo configure:3644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3646 echo "configure: failed program was:" >&5
3647 cat conftest.$ac_ext >&5
3652 CPPFLAGS=$cf_save_CPPFLAGS
3657 if test "$cf_have_incdir" = no ; then
3658 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3660 echo "${as_me-configure}:3661: testing adding $cf_add_incdir to include-path ..." 1>&5
3663 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3665 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3666 test "$cf_top_incdir" = "$cf_add_incdir" && break
3667 cf_add_incdir="$cf_top_incdir"
3679 # Set definitions to allow ifdef'ing for ncurses.h
3681 case $cf_cv_ncurses_header in # (vi
3683 cat >> confdefs.h <<\EOF
3684 #define HAVE_NCURSES_H 1
3690 case $cf_cv_ncurses_header in # (vi
3691 ncurses/curses.h|ncurses/ncurses.h)
3692 cat >> confdefs.h <<\EOF
3693 #define HAVE_NCURSES_NCURSES_H 1
3697 ncursesw/curses.h|ncursesw/ncurses.h)
3698 cat >> confdefs.h <<\EOF
3699 #define HAVE_NCURSESW_NCURSES_H 1
3707 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
3708 echo "configure:3709: checking for terminfo header" >&5
3709 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
3710 echo $ac_n "(cached) $ac_c" 1>&6
3713 case ${cf_cv_ncurses_header} in #(vi
3714 */ncurses.h|*/ncursesw.h) #(vi
3715 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
3718 cf_term_header=term.h
3722 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
3724 cat > conftest.$ac_ext <<EOF
3725 #line 3726 "configure"
3726 #include "confdefs.h"
3728 #include <${cf_cv_ncurses_header-curses.h}>
3732 int x = auto_left_margin
3735 if { (eval echo configure:3736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3738 cf_cv_term_header="$cf_test"
3740 echo "configure: failed program was:" >&5
3741 cat conftest.$ac_ext >&5
3744 cf_cv_term_header=unknown
3748 test "$cf_cv_term_header" != unknown && break
3753 echo "$ac_t""$cf_cv_term_header" 1>&6
3755 # Set definitions to allow ifdef'ing to accommodate subdirectories
3757 case $cf_cv_term_header in # (vi
3759 cat >> confdefs.h <<\EOF
3760 #define HAVE_TERM_H 1
3766 case $cf_cv_term_header in # (vi
3767 ncurses/term.h) #(vi
3768 cat >> confdefs.h <<\EOF
3769 #define HAVE_NCURSES_TERM_H 1
3774 cat >> confdefs.h <<\EOF
3775 #define HAVE_NCURSESW_TERM_H 1
3782 # some applications need this, but should check for NCURSES_VERSION
3783 cat >> confdefs.h <<\EOF
3789 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
3790 echo "configure:3791: checking for ncurses version" >&5
3791 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
3792 echo $ac_n "(cached) $ac_c" 1>&6
3795 cf_cv_ncurses_version=no
3798 if test "$cross_compiling" = yes; then
3801 # This will not work if the preprocessor splits the line after the
3802 # Autoconf token. The 'unproto' program does that.
3803 cat > conftest.$ac_ext <<EOF
3804 #include <${cf_cv_ncurses_header-curses.h}>
3806 #ifdef NCURSES_VERSION
3807 Autoconf NCURSES_VERSION
3815 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
3816 { (eval echo configure:3817: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
3817 if test -f conftest.out ; then
3818 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
3819 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
3824 cat > conftest.$ac_ext <<EOF
3825 #line 3826 "configure"
3826 #include "confdefs.h"
3828 #include <${cf_cv_ncurses_header-curses.h}>
3832 FILE *fp = fopen("$cf_tempfile", "w");
3833 #ifdef NCURSES_VERSION
3834 # ifdef NCURSES_VERSION_PATCH
3835 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
3837 fprintf(fp, "%s\n", NCURSES_VERSION);
3841 fprintf(fp, "old\n");
3846 ${cf_cv_main_return-return}(0);
3849 if { (eval echo configure:3850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3852 cf_cv_ncurses_version=`cat $cf_tempfile`
3854 echo "configure: failed program was:" >&5
3855 cat conftest.$ac_ext >&5
3864 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
3865 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
3873 cf_nculib_root=ncurses
3874 # This works, except for the special case where we find gpm, but
3875 # ncurses is in a nonstandard location via $LIBS, and we really want
3878 cf_ncurses_SAVE="$LIBS"
3879 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
3880 echo "configure:3881: checking for Gpm_Open in -lgpm" >&5
3881 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
3882 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3883 echo $ac_n "(cached) $ac_c" 1>&6
3885 ac_save_LIBS="$LIBS"
3887 cat > conftest.$ac_ext <<EOF
3888 #line 3889 "configure"
3889 #include "confdefs.h"
3890 /* Override any gcc2 internal prototype to avoid an error. */
3891 /* We use char because int might match the return type of a gcc2
3892 builtin and then its argument prototype would still apply. */
3899 if { (eval echo configure:3900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3901 eval "ac_cv_lib_$ac_lib_var=yes"
3903 echo "configure: failed program was:" >&5
3904 cat conftest.$ac_ext >&5
3906 eval "ac_cv_lib_$ac_lib_var=no"
3909 LIBS="$ac_save_LIBS"
3912 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3913 echo "$ac_t""yes" 1>&6
3914 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
3915 echo "configure:3916: checking for initscr in -lgpm" >&5
3916 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
3917 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3918 echo $ac_n "(cached) $ac_c" 1>&6
3920 ac_save_LIBS="$LIBS"
3922 cat > conftest.$ac_ext <<EOF
3923 #line 3924 "configure"
3924 #include "confdefs.h"
3925 /* Override any gcc2 internal prototype to avoid an error. */
3926 /* We use char because int might match the return type of a gcc2
3927 builtin and then its argument prototype would still apply. */
3934 if { (eval echo configure:3935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3936 eval "ac_cv_lib_$ac_lib_var=yes"
3938 echo "configure: failed program was:" >&5
3939 cat conftest.$ac_ext >&5
3941 eval "ac_cv_lib_$ac_lib_var=no"
3944 LIBS="$ac_save_LIBS"
3947 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3948 echo "$ac_t""yes" 1>&6
3949 LIBS="$cf_ncurses_SAVE"
3951 echo "$ac_t""no" 1>&6
3952 cf_ncurses_LIBS="-lgpm"
3956 echo "$ac_t""no" 1>&6
3960 case $host_os in #(vi
3962 # This is only necessary if you are linking against an obsolete
3963 # version of ncurses (but it should do no harm, since it's static).
3964 if test "$cf_nculib_root" = ncurses ; then
3965 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
3966 echo "configure:3967: checking for tgoto in -lmytinfo" >&5
3967 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
3968 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3969 echo $ac_n "(cached) $ac_c" 1>&6
3971 ac_save_LIBS="$LIBS"
3972 LIBS="-lmytinfo $LIBS"
3973 cat > conftest.$ac_ext <<EOF
3974 #line 3975 "configure"
3975 #include "confdefs.h"
3976 /* Override any gcc2 internal prototype to avoid an error. */
3977 /* We use char because int might match the return type of a gcc2
3978 builtin and then its argument prototype would still apply. */
3985 if { (eval echo configure:3986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3987 eval "ac_cv_lib_$ac_lib_var=yes"
3989 echo "configure: failed program was:" >&5
3990 cat conftest.$ac_ext >&5
3992 eval "ac_cv_lib_$ac_lib_var=no"
3995 LIBS="$ac_save_LIBS"
3998 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3999 echo "$ac_t""yes" 1>&6
4000 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
4002 echo "$ac_t""no" 1>&6
4009 LIBS="$cf_ncurses_LIBS $LIBS"
4011 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4014 if test -n "$cf_cv_curses_dir/lib" ; then
4015 for cf_add_libdir in $cf_cv_curses_dir/lib
4017 if test $cf_add_libdir = /usr/lib ; then
4019 elif test -d $cf_add_libdir
4022 if test -n "$LDFLAGS$LIBS" ; then
4023 # a loop is needed to ensure we can add subdirs of existing dirs
4024 for cf_test_libdir in $LDFLAGS $LIBS ; do
4025 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4026 cf_have_libdir=yes; break
4030 if test "$cf_have_libdir" = no ; then
4031 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4033 echo "${as_me-configure}:4034: testing adding $cf_add_libdir to library-path ..." 1>&5
4036 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4042 LIBS="-l$cf_nculib_root $LIBS"
4045 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
4047 echo $ac_n "checking for initscr""... $ac_c" 1>&6
4048 echo "configure:4049: checking for initscr" >&5
4049 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
4050 echo $ac_n "(cached) $ac_c" 1>&6
4052 cat > conftest.$ac_ext <<EOF
4053 #line 4054 "configure"
4054 #include "confdefs.h"
4055 /* System header to define __stub macros and hopefully few prototypes,
4056 which can conflict with char initscr(); below. */
4058 /* Override any gcc2 internal prototype to avoid an error. */
4059 /* We use char because int might match the return type of a gcc2
4060 builtin and then its argument prototype would still apply. */
4065 /* The GNU C library defines this for functions which it implements
4066 to always fail with ENOSYS. Some functions are actually named
4067 something starting with __ and the normal name is an alias. */
4068 #if defined (__stub_initscr) || defined (__stub___initscr)
4076 if { (eval echo configure:4077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4078 eval "ac_cv_func_initscr=yes"
4080 echo "configure: failed program was:" >&5
4081 cat conftest.$ac_ext >&5
4083 eval "ac_cv_func_initscr=no"
4088 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
4089 echo "$ac_t""yes" 1>&6
4090 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4092 echo "$ac_t""no" 1>&6
4094 cf_save_LIBS="$LIBS"
4095 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
4096 echo "configure:4097: checking for initscr in -l$cf_nculib_root" >&5
4097 LIBS="-l$cf_nculib_root $LIBS"
4098 cat > conftest.$ac_ext <<EOF
4099 #line 4100 "configure"
4100 #include "confdefs.h"
4101 #include <${cf_cv_ncurses_header-curses.h}>
4106 if { (eval echo configure:4107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4108 echo "$ac_t""yes" 1>&6
4109 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4112 echo "configure: failed program was:" >&5
4113 cat conftest.$ac_ext >&5
4115 echo "$ac_t""no" 1>&6
4117 cf_library_path_list=""
4118 if test -n "${LDFLAGS}${LIBS}" ; then
4119 for cf_library_path in $LDFLAGS $LIBS
4121 case $cf_library_path in #(vi
4123 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
4125 test "$cf_library_path" != "NONE" && \
4126 test -d "$cf_library_path" && \
4128 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
4129 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
4130 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
4131 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
4132 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
4133 test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
4136 cf_library_path_list="$cf_library_path_list $cf_search"
4145 test "/usr" != "$prefix" && \
4147 (test $prefix = NONE || test -d $prefix) && {
4148 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
4149 test -d /usr/lib && cf_search="$cf_search /usr/lib"
4150 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
4151 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
4152 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
4153 test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
4157 test "$prefix" != "NONE" && \
4158 test -d "$prefix" && \
4160 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
4161 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
4162 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
4163 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
4164 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
4165 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
4169 test "/usr/local" != "$prefix" && \
4170 test -d "/usr/local" && \
4171 (test $prefix = NONE || test -d $prefix) && {
4172 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
4173 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
4174 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
4175 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
4176 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
4177 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
4181 test "/opt" != "$prefix" && \
4183 (test $prefix = NONE || test -d $prefix) && {
4184 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
4185 test -d /opt/lib && cf_search="$cf_search /opt/lib"
4186 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
4187 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
4188 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
4189 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
4193 test "$HOME" != "$prefix" && \
4194 test -d "$HOME" && \
4195 (test $prefix = NONE || test -d $prefix) && {
4196 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
4197 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
4198 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
4199 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
4200 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
4201 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
4206 cf_search="$cf_library_path_list $cf_search"
4208 for cf_libdir in $cf_search
4210 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
4211 echo "configure:4212: checking for -l$cf_nculib_root in $cf_libdir" >&5
4212 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
4213 cat > conftest.$ac_ext <<EOF
4214 #line 4215 "configure"
4215 #include "confdefs.h"
4216 #include <${cf_cv_ncurses_header-curses.h}>
4221 if { (eval echo configure:4222: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4223 echo "$ac_t""yes" 1>&6
4224 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4227 echo "configure: failed program was:" >&5
4228 cat conftest.$ac_ext >&5
4230 echo "$ac_t""no" 1>&6
4231 LIBS="$cf_save_LIBS"
4241 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
4243 if test $cf_found_library = no ; then
4244 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
4250 if test -n "$cf_ncurses_LIBS" ; then
4251 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
4252 echo "configure:4253: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
4253 cf_ncurses_SAVE="$LIBS"
4254 for p in $cf_ncurses_LIBS ; do
4255 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
4256 if test "$q" != "$LIBS" ; then
4260 cat > conftest.$ac_ext <<EOF
4261 #line 4262 "configure"
4262 #include "confdefs.h"
4263 #include <${cf_cv_ncurses_header-curses.h}>
4265 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
4268 if { (eval echo configure:4269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4270 echo "$ac_t""yes" 1>&6
4272 echo "configure: failed program was:" >&5
4273 cat conftest.$ac_ext >&5
4275 echo "$ac_t""no" 1>&6
4276 LIBS="$cf_ncurses_SAVE"
4282 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4284 cat >> confdefs.h <<EOF
4285 #define $cf_nculib_ROOT 1
4296 echo $ac_n "checking for multibyte character support""... $ac_c" 1>&6
4297 echo "configure:4298: checking for multibyte character support" >&5
4298 if eval "test \"`echo '$''{'cf_cv_utf8_lib'+set}'`\" = set"; then
4299 echo $ac_n "(cached) $ac_c" 1>&6
4302 cf_save_LIBS="$LIBS"
4303 cat > conftest.$ac_ext <<EOF
4304 #line 4305 "configure"
4305 #include "confdefs.h"
4312 if { (eval echo configure:4313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4316 echo "configure: failed program was:" >&5
4317 cat conftest.$ac_ext >&5
4321 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
4322 # will be set on completion of the AC_TRY_LINK below.
4323 cf_cv_header_path_utf8=
4324 cf_cv_library_path_utf8=
4327 echo "${as_me-configure}:4328: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
4330 cat > conftest.$ac_ext <<EOF
4331 #line 4332 "configure"
4332 #include "confdefs.h"
4334 #include <libutf8.h>
4339 if { (eval echo configure:4340: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4341 cf_cv_find_linkage_utf8=yes
4343 echo "configure: failed program was:" >&5
4344 cat conftest.$ac_ext >&5
4347 cf_cv_find_linkage_utf8=no
4349 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
4351 echo "${as_me-configure}:4352: testing find linkage for utf8 library ..." 1>&5
4355 echo "${as_me-configure}:4356: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
4358 cf_save_CPPFLAGS="$CPPFLAGS"
4359 cf_test_CPPFLAGS="$CPPFLAGS"
4362 cf_header_path_list=""
4363 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4364 for cf_header_path in $CPPFLAGS $CFLAGS
4366 case $cf_header_path in #(vi
4368 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4370 test "$cf_header_path" != "NONE" && \
4371 test -d "$cf_header_path" && \
4373 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
4374 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
4375 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
4376 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
4377 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
4378 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
4381 cf_header_path_list="$cf_header_path_list $cf_search"
4390 test "/usr" != "$prefix" && \
4392 (test $prefix = NONE || test -d $prefix) && {
4393 test -n "$verbose" && echo " ... testing for include-directories under /usr"
4394 test -d /usr/include && cf_search="$cf_search /usr/include"
4395 test -d /usr/include/utf8 && cf_search="$cf_search /usr/include/utf8"
4396 test -d /usr/include/utf8/include && cf_search="$cf_search /usr/include/utf8/include"
4397 test -d /usr/utf8/include && cf_search="$cf_search /usr/utf8/include"
4398 test -d /usr/utf8/include/utf8 && cf_search="$cf_search /usr/utf8/include/utf8"
4402 test "$prefix" != "NONE" && \
4403 test -d "$prefix" && \
4405 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
4406 test -d $prefix/include && cf_search="$cf_search $prefix/include"
4407 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
4408 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
4409 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
4410 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
4414 test "/usr/local" != "$prefix" && \
4415 test -d "/usr/local" && \
4416 (test $prefix = NONE || test -d $prefix) && {
4417 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
4418 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
4419 test -d /usr/local/include/utf8 && cf_search="$cf_search /usr/local/include/utf8"
4420 test -d /usr/local/include/utf8/include && cf_search="$cf_search /usr/local/include/utf8/include"
4421 test -d /usr/local/utf8/include && cf_search="$cf_search /usr/local/utf8/include"
4422 test -d /usr/local/utf8/include/utf8 && cf_search="$cf_search /usr/local/utf8/include/utf8"
4426 test "/opt" != "$prefix" && \
4428 (test $prefix = NONE || test -d $prefix) && {
4429 test -n "$verbose" && echo " ... testing for include-directories under /opt"
4430 test -d /opt/include && cf_search="$cf_search /opt/include"
4431 test -d /opt/include/utf8 && cf_search="$cf_search /opt/include/utf8"
4432 test -d /opt/include/utf8/include && cf_search="$cf_search /opt/include/utf8/include"
4433 test -d /opt/utf8/include && cf_search="$cf_search /opt/utf8/include"
4434 test -d /opt/utf8/include/utf8 && cf_search="$cf_search /opt/utf8/include/utf8"
4438 test "$HOME" != "$prefix" && \
4439 test -d "$HOME" && \
4440 (test $prefix = NONE || test -d $prefix) && {
4441 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
4442 test -d $HOME/include && cf_search="$cf_search $HOME/include"
4443 test -d $HOME/include/utf8 && cf_search="$cf_search $HOME/include/utf8"
4444 test -d $HOME/include/utf8/include && cf_search="$cf_search $HOME/include/utf8/include"
4445 test -d $HOME/utf8/include && cf_search="$cf_search $HOME/utf8/include"
4446 test -d $HOME/utf8/include/utf8 && cf_search="$cf_search $HOME/utf8/include/utf8"
4451 test "$includedir" != NONE && \
4452 test "$includedir" != "/usr/include" && \
4453 test -d "$includedir" && {
4454 test -d $includedir && cf_search="$cf_search $includedir"
4455 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
4458 test "$oldincludedir" != NONE && \
4459 test "$oldincludedir" != "/usr/include" && \
4460 test -d "$oldincludedir" && {
4461 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
4462 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
4465 cf_search="$cf_header_path_list $cf_search"
4467 for cf_cv_header_path_utf8 in $cf_search
4469 if test -d $cf_cv_header_path_utf8 ; then
4470 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
4472 echo "${as_me-configure}:4473: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
4475 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
4476 cat > conftest.$ac_ext <<EOF
4477 #line 4478 "configure"
4478 #include "confdefs.h"
4480 #include <libutf8.h>
4485 if { (eval echo configure:4486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4488 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
4490 echo "${as_me-configure}:4491: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
4493 cf_cv_find_linkage_utf8=maybe
4494 cf_test_CPPFLAGS="$CPPFLAGS"
4497 echo "configure: failed program was:" >&5
4498 cat conftest.$ac_ext >&5
4501 CPPFLAGS="$cf_save_CPPFLAGS"
4508 if test "$cf_cv_find_linkage_utf8" = maybe ; then
4511 echo "${as_me-configure}:4512: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
4514 cf_save_LIBS="$LIBS"
4515 cf_save_LDFLAGS="$LDFLAGS"
4519 if test "$cf_cv_find_linkage_utf8" != yes ; then
4521 cf_library_path_list=""
4522 if test -n "${LDFLAGS}${LIBS}" ; then
4523 for cf_library_path in $LDFLAGS $LIBS
4525 case $cf_library_path in #(vi
4527 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
4529 test "$cf_library_path" != "NONE" && \
4530 test -d "$cf_library_path" && \
4532 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
4533 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
4534 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
4535 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
4536 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
4537 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
4540 cf_library_path_list="$cf_library_path_list $cf_search"
4549 test "/usr" != "$prefix" && \
4551 (test $prefix = NONE || test -d $prefix) && {
4552 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
4553 test -d /usr/lib && cf_search="$cf_search /usr/lib"
4554 test -d /usr/lib/utf8 && cf_search="$cf_search /usr/lib/utf8"
4555 test -d /usr/lib/utf8/lib && cf_search="$cf_search /usr/lib/utf8/lib"
4556 test -d /usr/utf8/lib && cf_search="$cf_search /usr/utf8/lib"
4557 test -d /usr/utf8/lib/utf8 && cf_search="$cf_search /usr/utf8/lib/utf8"
4561 test "$prefix" != "NONE" && \
4562 test -d "$prefix" && \
4564 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
4565 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
4566 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
4567 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
4568 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
4569 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
4573 test "/usr/local" != "$prefix" && \
4574 test -d "/usr/local" && \
4575 (test $prefix = NONE || test -d $prefix) && {
4576 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
4577 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
4578 test -d /usr/local/lib/utf8 && cf_search="$cf_search /usr/local/lib/utf8"
4579 test -d /usr/local/lib/utf8/lib && cf_search="$cf_search /usr/local/lib/utf8/lib"
4580 test -d /usr/local/utf8/lib && cf_search="$cf_search /usr/local/utf8/lib"
4581 test -d /usr/local/utf8/lib/utf8 && cf_search="$cf_search /usr/local/utf8/lib/utf8"
4585 test "/opt" != "$prefix" && \
4587 (test $prefix = NONE || test -d $prefix) && {
4588 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
4589 test -d /opt/lib && cf_search="$cf_search /opt/lib"
4590 test -d /opt/lib/utf8 && cf_search="$cf_search /opt/lib/utf8"
4591 test -d /opt/lib/utf8/lib && cf_search="$cf_search /opt/lib/utf8/lib"
4592 test -d /opt/utf8/lib && cf_search="$cf_search /opt/utf8/lib"
4593 test -d /opt/utf8/lib/utf8 && cf_search="$cf_search /opt/utf8/lib/utf8"
4597 test "$HOME" != "$prefix" && \
4598 test -d "$HOME" && \
4599 (test $prefix = NONE || test -d $prefix) && {
4600 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
4601 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
4602 test -d $HOME/lib/utf8 && cf_search="$cf_search $HOME/lib/utf8"
4603 test -d $HOME/lib/utf8/lib && cf_search="$cf_search $HOME/lib/utf8/lib"
4604 test -d $HOME/utf8/lib && cf_search="$cf_search $HOME/utf8/lib"
4605 test -d $HOME/utf8/lib/utf8 && cf_search="$cf_search $HOME/utf8/lib/utf8"
4610 cf_search="$cf_library_path_list $cf_search"
4612 for cf_cv_library_path_utf8 in $cf_search
4614 if test -d $cf_cv_library_path_utf8 ; then
4615 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
4617 echo "${as_me-configure}:4618: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
4620 CPPFLAGS="$cf_test_CPPFLAGS"
4621 LIBS="-lutf8 $cf_save_LIBS"
4622 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
4623 cat > conftest.$ac_ext <<EOF
4624 #line 4625 "configure"
4625 #include "confdefs.h"
4627 #include <libutf8.h>
4632 if { (eval echo configure:4633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4635 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
4637 echo "${as_me-configure}:4638: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
4640 cf_cv_find_linkage_utf8=yes
4641 cf_cv_library_file_utf8="-lutf8"
4644 echo "configure: failed program was:" >&5
4645 cat conftest.$ac_ext >&5
4648 CPPFLAGS="$cf_save_CPPFLAGS"
4649 LIBS="$cf_save_LIBS"
4650 LDFLAGS="$cf_save_LDFLAGS"
4656 LIBS="$cf_save_LIBS"
4657 CPPFLAGS="$cf_save_CPPFLAGS"
4658 LDFLAGS="$cf_save_LDFLAGS"
4662 cf_cv_find_linkage_utf8=no
4668 if test "$cf_cv_find_linkage_utf8" = yes ; then
4669 cf_cv_utf8_lib=add-on
4679 echo "$ac_t""$cf_cv_utf8_lib" 1>&6
4681 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
4683 if test "$cf_cv_utf8_lib" = "add-on" ; then
4684 cat >> confdefs.h <<\EOF
4685 #define HAVE_LIBUTF8_H 1
4689 if test -n "$cf_cv_header_path_utf8" ; then
4690 for cf_add_incdir in $cf_cv_header_path_utf8
4692 while test $cf_add_incdir != /usr/include
4694 if test -d $cf_add_incdir
4697 if test -n "$CFLAGS$CPPFLAGS" ; then
4698 # a loop is needed to ensure we can add subdirs of existing dirs
4699 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4700 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4701 cf_have_incdir=yes; break
4706 if test "$cf_have_incdir" = no ; then
4707 if test "$cf_add_incdir" = /usr/local/include ; then
4708 if test "$GCC" = yes
4710 cf_save_CPPFLAGS=$CPPFLAGS
4711 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4712 cat > conftest.$ac_ext <<EOF
4713 #line 4714 "configure"
4714 #include "confdefs.h"
4720 if { (eval echo configure:4721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4723 echo "configure: failed program was:" >&5
4724 cat conftest.$ac_ext >&5
4729 CPPFLAGS=$cf_save_CPPFLAGS
4734 if test "$cf_have_incdir" = no ; then
4735 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4737 echo "${as_me-configure}:4738: testing adding $cf_add_incdir to include-path ..." 1>&5
4740 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4742 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4743 test "$cf_top_incdir" = "$cf_add_incdir" && break
4744 cf_add_incdir="$cf_top_incdir"
4754 if test -n "$cf_cv_library_path_utf8" ; then
4755 for cf_add_libdir in $cf_cv_library_path_utf8
4757 if test $cf_add_libdir = /usr/lib ; then
4759 elif test -d $cf_add_libdir
4762 if test -n "$LDFLAGS$LIBS" ; then
4763 # a loop is needed to ensure we can add subdirs of existing dirs
4764 for cf_test_libdir in $LDFLAGS $LIBS ; do
4765 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4766 cf_have_libdir=yes; break
4770 if test "$cf_have_libdir" = no ; then
4771 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4773 echo "${as_me-configure}:4774: testing adding $cf_add_libdir to library-path ..." 1>&5
4776 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4786 cf_ncuconfig_root=ncursesw
4788 echo "Looking for ${cf_ncuconfig_root}-config"
4789 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4791 # Extract the first word of "$ac_prog", so it can be a program name with args.
4792 set dummy $ac_prog; ac_word=$2
4793 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4794 echo "configure:4795: checking for $ac_word" >&5
4795 if eval "test \"`echo '$''{'ac_cv_path_NCURSES_CONFIG'+set}'`\" = set"; then
4796 echo $ac_n "(cached) $ac_c" 1>&6
4798 case "$NCURSES_CONFIG" in
4800 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
4803 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a dos path.
4806 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4808 for ac_dir in $ac_dummy; do
4809 test -z "$ac_dir" && ac_dir=.
4810 if test -f $ac_dir/$ac_word; then
4811 ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
4819 NCURSES_CONFIG="$ac_cv_path_NCURSES_CONFIG"
4820 if test -n "$NCURSES_CONFIG"; then
4821 echo "$ac_t""$NCURSES_CONFIG" 1>&6
4823 echo "$ac_t""no" 1>&6
4826 test -n "$NCURSES_CONFIG" && break
4828 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
4831 if test "$NCURSES_CONFIG" != none ; then
4833 cf_cv_ncurses_header=curses.h
4835 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
4836 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
4838 cat >> confdefs.h <<\EOF
4844 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4846 cat >> confdefs.h <<EOF
4847 #define $cf_nculib_ROOT 1
4851 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4857 cf_ncuhdr_root=ncursesw
4859 test -n "$cf_cv_curses_dir" && \
4860 test "$cf_cv_curses_dir" != "no" && { \
4862 if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4863 for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
4865 while test $cf_add_incdir != /usr/include
4867 if test -d $cf_add_incdir
4870 if test -n "$CFLAGS$CPPFLAGS" ; then
4871 # a loop is needed to ensure we can add subdirs of existing dirs
4872 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4873 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4874 cf_have_incdir=yes; break
4879 if test "$cf_have_incdir" = no ; then
4880 if test "$cf_add_incdir" = /usr/local/include ; then
4881 if test "$GCC" = yes
4883 cf_save_CPPFLAGS=$CPPFLAGS
4884 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4885 cat > conftest.$ac_ext <<EOF
4886 #line 4887 "configure"
4887 #include "confdefs.h"
4893 if { (eval echo configure:4894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4896 echo "configure: failed program was:" >&5
4897 cat conftest.$ac_ext >&5
4902 CPPFLAGS=$cf_save_CPPFLAGS
4907 if test "$cf_have_incdir" = no ; then
4908 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4910 echo "${as_me-configure}:4911: testing adding $cf_add_incdir to include-path ..." 1>&5
4913 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4915 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4916 test "$cf_top_incdir" = "$cf_add_incdir" && break
4917 cf_add_incdir="$cf_top_incdir"
4928 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
4929 echo "configure:4930: checking for $cf_ncuhdr_root header in include-path" >&5
4930 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
4931 echo $ac_n "(cached) $ac_c" 1>&6
4934 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4935 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4936 for cf_header in $cf_header_list
4939 cat > conftest.$ac_ext <<EOF
4940 #line 4941 "configure"
4941 #include "confdefs.h"
4944 #define _XOPEN_SOURCE_EXTENDED
4945 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
4946 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
4948 #include <$cf_header>
4951 #ifdef NCURSES_VERSION
4957 printf("%s\n", NCURSES_VERSION);
4969 if { (eval echo configure:4970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4971 cf_cv_ncurses_h=$cf_header
4974 echo "configure: failed program was:" >&5
4975 cat conftest.$ac_ext >&5
4981 test "$cf_cv_ncurses_h" != no && break
4986 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
4990 if test "$cf_cv_ncurses_h" != no ; then
4991 cf_cv_ncurses_header=$cf_cv_ncurses_h
4994 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
4995 echo "configure:4996: checking for $cf_ncuhdr_root include-path" >&5
4996 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
4997 echo $ac_n "(cached) $ac_c" 1>&6
5000 test -n "$verbose" && echo
5002 cf_header_path_list=""
5003 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5004 for cf_header_path in $CPPFLAGS $CFLAGS
5006 case $cf_header_path in #(vi
5008 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5010 test "$cf_header_path" != "NONE" && \
5011 test -d "$cf_header_path" && \
5013 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5014 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5015 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5016 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5017 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5018 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"
5021 cf_header_path_list="$cf_header_path_list $cf_search"
5030 test "/usr" != "$prefix" && \
5032 (test $prefix = NONE || test -d $prefix) && {
5033 test -n "$verbose" && echo " ... testing for include-directories under /usr"
5034 test -d /usr/include && cf_search="$cf_search /usr/include"
5035 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
5036 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
5037 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
5038 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5042 test "$prefix" != "NONE" && \
5043 test -d "$prefix" && \
5045 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5046 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5047 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5048 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5049 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5050 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5054 test "/usr/local" != "$prefix" && \
5055 test -d "/usr/local" && \
5056 (test $prefix = NONE || test -d $prefix) && {
5057 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
5058 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
5059 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
5060 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
5061 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
5062 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5066 test "/opt" != "$prefix" && \
5068 (test $prefix = NONE || test -d $prefix) && {
5069 test -n "$verbose" && echo " ... testing for include-directories under /opt"
5070 test -d /opt/include && cf_search="$cf_search /opt/include"
5071 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
5072 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
5073 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
5074 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5078 test "$HOME" != "$prefix" && \
5079 test -d "$HOME" && \
5080 (test $prefix = NONE || test -d $prefix) && {
5081 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
5082 test -d $HOME/include && cf_search="$cf_search $HOME/include"
5083 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
5084 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
5085 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
5086 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5091 test "$includedir" != NONE && \
5092 test "$includedir" != "/usr/include" && \
5093 test -d "$includedir" && {
5094 test -d $includedir && cf_search="$cf_search $includedir"
5095 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5098 test "$oldincludedir" != NONE && \
5099 test "$oldincludedir" != "/usr/include" && \
5100 test -d "$oldincludedir" && {
5101 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5102 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5105 cf_search="$cf_header_path_list $cf_search"
5107 test -n "$verbose" && echo search path $cf_search
5108 cf_save2_CPPFLAGS="$CPPFLAGS"
5109 for cf_incdir in $cf_search
5112 if test -n "$cf_incdir" ; then
5113 for cf_add_incdir in $cf_incdir
5115 while test $cf_add_incdir != /usr/include
5117 if test -d $cf_add_incdir
5120 if test -n "$CFLAGS$CPPFLAGS" ; then
5121 # a loop is needed to ensure we can add subdirs of existing dirs
5122 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5123 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5124 cf_have_incdir=yes; break
5129 if test "$cf_have_incdir" = no ; then
5130 if test "$cf_add_incdir" = /usr/local/include ; then
5131 if test "$GCC" = yes
5133 cf_save_CPPFLAGS=$CPPFLAGS
5134 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5135 cat > conftest.$ac_ext <<EOF
5136 #line 5137 "configure"
5137 #include "confdefs.h"
5143 if { (eval echo configure:5144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5146 echo "configure: failed program was:" >&5
5147 cat conftest.$ac_ext >&5
5152 CPPFLAGS=$cf_save_CPPFLAGS
5157 if test "$cf_have_incdir" = no ; then
5158 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5160 echo "${as_me-configure}:5161: testing adding $cf_add_incdir to include-path ..." 1>&5
5163 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5165 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5166 test "$cf_top_incdir" = "$cf_add_incdir" && break
5167 cf_add_incdir="$cf_top_incdir"
5181 cat > conftest.$ac_ext <<EOF
5182 #line 5183 "configure"
5183 #include "confdefs.h"
5186 #include <$cf_header>
5189 #ifdef NCURSES_VERSION
5191 printf("%s\n", NCURSES_VERSION);
5203 if { (eval echo configure:5204: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5205 cf_cv_ncurses_h2=$cf_header
5208 echo "configure: failed program was:" >&5
5209 cat conftest.$ac_ext >&5
5215 if test "$cf_cv_ncurses_h2" != no ; then
5216 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5217 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
5220 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5222 CPPFLAGS="$cf_save2_CPPFLAGS"
5223 test "$cf_cv_ncurses_h2" != no && break
5225 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
5229 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
5231 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
5232 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
5233 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
5234 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
5237 if test -n "$cf_1st_incdir" ; then
5238 for cf_add_incdir in $cf_1st_incdir
5240 while test $cf_add_incdir != /usr/include
5242 if test -d $cf_add_incdir
5245 if test -n "$CFLAGS$CPPFLAGS" ; then
5246 # a loop is needed to ensure we can add subdirs of existing dirs
5247 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5248 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5249 cf_have_incdir=yes; break
5254 if test "$cf_have_incdir" = no ; then
5255 if test "$cf_add_incdir" = /usr/local/include ; then
5256 if test "$GCC" = yes
5258 cf_save_CPPFLAGS=$CPPFLAGS
5259 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5260 cat > conftest.$ac_ext <<EOF
5261 #line 5262 "configure"
5262 #include "confdefs.h"
5268 if { (eval echo configure:5269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5271 echo "configure: failed program was:" >&5
5272 cat conftest.$ac_ext >&5
5277 CPPFLAGS=$cf_save_CPPFLAGS
5282 if test "$cf_have_incdir" = no ; then
5283 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5285 echo "${as_me-configure}:5286: testing adding $cf_add_incdir to include-path ..." 1>&5
5288 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5290 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5291 test "$cf_top_incdir" = "$cf_add_incdir" && break
5292 cf_add_incdir="$cf_top_incdir"
5304 # Set definitions to allow ifdef'ing for ncurses.h
5306 case $cf_cv_ncurses_header in # (vi
5308 cat >> confdefs.h <<\EOF
5309 #define HAVE_NCURSES_H 1
5315 case $cf_cv_ncurses_header in # (vi
5316 ncurses/curses.h|ncurses/ncurses.h)
5317 cat >> confdefs.h <<\EOF
5318 #define HAVE_NCURSES_NCURSES_H 1
5322 ncursesw/curses.h|ncursesw/ncurses.h)
5323 cat >> confdefs.h <<\EOF
5324 #define HAVE_NCURSESW_NCURSES_H 1
5332 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
5333 echo "configure:5334: checking for terminfo header" >&5
5334 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
5335 echo $ac_n "(cached) $ac_c" 1>&6
5338 case ${cf_cv_ncurses_header} in #(vi
5339 */ncurses.h|*/ncursesw.h) #(vi
5340 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5343 cf_term_header=term.h
5347 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5349 cat > conftest.$ac_ext <<EOF
5350 #line 5351 "configure"
5351 #include "confdefs.h"
5353 #include <${cf_cv_ncurses_header-curses.h}>
5357 int x = auto_left_margin
5360 if { (eval echo configure:5361: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5363 cf_cv_term_header="$cf_test"
5365 echo "configure: failed program was:" >&5
5366 cat conftest.$ac_ext >&5
5369 cf_cv_term_header=unknown
5373 test "$cf_cv_term_header" != unknown && break
5378 echo "$ac_t""$cf_cv_term_header" 1>&6
5380 # Set definitions to allow ifdef'ing to accommodate subdirectories
5382 case $cf_cv_term_header in # (vi
5384 cat >> confdefs.h <<\EOF
5385 #define HAVE_TERM_H 1
5391 case $cf_cv_term_header in # (vi
5392 ncurses/term.h) #(vi
5393 cat >> confdefs.h <<\EOF
5394 #define HAVE_NCURSES_TERM_H 1
5399 cat >> confdefs.h <<\EOF
5400 #define HAVE_NCURSESW_TERM_H 1
5407 # some applications need this, but should check for NCURSES_VERSION
5408 cat >> confdefs.h <<\EOF
5414 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
5415 echo "configure:5416: checking for ncurses version" >&5
5416 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
5417 echo $ac_n "(cached) $ac_c" 1>&6
5420 cf_cv_ncurses_version=no
5423 if test "$cross_compiling" = yes; then
5426 # This will not work if the preprocessor splits the line after the
5427 # Autoconf token. The 'unproto' program does that.
5428 cat > conftest.$ac_ext <<EOF
5429 #include <${cf_cv_ncurses_header-curses.h}>
5431 #ifdef NCURSES_VERSION
5432 Autoconf NCURSES_VERSION
5440 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5441 { (eval echo configure:5442: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
5442 if test -f conftest.out ; then
5443 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5444 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5449 cat > conftest.$ac_ext <<EOF
5450 #line 5451 "configure"
5451 #include "confdefs.h"
5453 #include <${cf_cv_ncurses_header-curses.h}>
5457 FILE *fp = fopen("$cf_tempfile", "w");
5458 #ifdef NCURSES_VERSION
5459 # ifdef NCURSES_VERSION_PATCH
5460 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5462 fprintf(fp, "%s\n", NCURSES_VERSION);
5466 fprintf(fp, "old\n");
5471 ${cf_cv_main_return-return}(0);
5474 if { (eval echo configure:5475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5477 cf_cv_ncurses_version=`cat $cf_tempfile`
5479 echo "configure: failed program was:" >&5
5480 cat conftest.$ac_ext >&5
5489 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
5490 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
5498 cf_nculib_root=ncursesw
5499 # This works, except for the special case where we find gpm, but
5500 # ncurses is in a nonstandard location via $LIBS, and we really want
5503 cf_ncurses_SAVE="$LIBS"
5504 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
5505 echo "configure:5506: checking for Gpm_Open in -lgpm" >&5
5506 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
5507 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5508 echo $ac_n "(cached) $ac_c" 1>&6
5510 ac_save_LIBS="$LIBS"
5512 cat > conftest.$ac_ext <<EOF
5513 #line 5514 "configure"
5514 #include "confdefs.h"
5515 /* Override any gcc2 internal prototype to avoid an error. */
5516 /* We use char because int might match the return type of a gcc2
5517 builtin and then its argument prototype would still apply. */
5524 if { (eval echo configure:5525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5526 eval "ac_cv_lib_$ac_lib_var=yes"
5528 echo "configure: failed program was:" >&5
5529 cat conftest.$ac_ext >&5
5531 eval "ac_cv_lib_$ac_lib_var=no"
5534 LIBS="$ac_save_LIBS"
5537 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5538 echo "$ac_t""yes" 1>&6
5539 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
5540 echo "configure:5541: checking for initscr in -lgpm" >&5
5541 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
5542 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5543 echo $ac_n "(cached) $ac_c" 1>&6
5545 ac_save_LIBS="$LIBS"
5547 cat > conftest.$ac_ext <<EOF
5548 #line 5549 "configure"
5549 #include "confdefs.h"
5550 /* Override any gcc2 internal prototype to avoid an error. */
5551 /* We use char because int might match the return type of a gcc2
5552 builtin and then its argument prototype would still apply. */
5559 if { (eval echo configure:5560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5561 eval "ac_cv_lib_$ac_lib_var=yes"
5563 echo "configure: failed program was:" >&5
5564 cat conftest.$ac_ext >&5
5566 eval "ac_cv_lib_$ac_lib_var=no"
5569 LIBS="$ac_save_LIBS"
5572 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5573 echo "$ac_t""yes" 1>&6
5574 LIBS="$cf_ncurses_SAVE"
5576 echo "$ac_t""no" 1>&6
5577 cf_ncurses_LIBS="-lgpm"
5581 echo "$ac_t""no" 1>&6
5585 case $host_os in #(vi
5587 # This is only necessary if you are linking against an obsolete
5588 # version of ncurses (but it should do no harm, since it's static).
5589 if test "$cf_nculib_root" = ncurses ; then
5590 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
5591 echo "configure:5592: checking for tgoto in -lmytinfo" >&5
5592 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
5593 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5594 echo $ac_n "(cached) $ac_c" 1>&6
5596 ac_save_LIBS="$LIBS"
5597 LIBS="-lmytinfo $LIBS"
5598 cat > conftest.$ac_ext <<EOF
5599 #line 5600 "configure"
5600 #include "confdefs.h"
5601 /* Override any gcc2 internal prototype to avoid an error. */
5602 /* We use char because int might match the return type of a gcc2
5603 builtin and then its argument prototype would still apply. */
5610 if { (eval echo configure:5611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5612 eval "ac_cv_lib_$ac_lib_var=yes"
5614 echo "configure: failed program was:" >&5
5615 cat conftest.$ac_ext >&5
5617 eval "ac_cv_lib_$ac_lib_var=no"
5620 LIBS="$ac_save_LIBS"
5623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5624 echo "$ac_t""yes" 1>&6
5625 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5627 echo "$ac_t""no" 1>&6
5634 LIBS="$cf_ncurses_LIBS $LIBS"
5636 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5639 if test -n "$cf_cv_curses_dir/lib" ; then
5640 for cf_add_libdir in $cf_cv_curses_dir/lib
5642 if test $cf_add_libdir = /usr/lib ; then
5644 elif test -d $cf_add_libdir
5647 if test -n "$LDFLAGS$LIBS" ; then
5648 # a loop is needed to ensure we can add subdirs of existing dirs
5649 for cf_test_libdir in $LDFLAGS $LIBS ; do
5650 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5651 cf_have_libdir=yes; break
5655 if test "$cf_have_libdir" = no ; then
5656 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5658 echo "${as_me-configure}:5659: testing adding $cf_add_libdir to library-path ..." 1>&5
5661 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5667 LIBS="-l$cf_nculib_root $LIBS"
5670 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5672 echo $ac_n "checking for initscr""... $ac_c" 1>&6
5673 echo "configure:5674: checking for initscr" >&5
5674 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
5675 echo $ac_n "(cached) $ac_c" 1>&6
5677 cat > conftest.$ac_ext <<EOF
5678 #line 5679 "configure"
5679 #include "confdefs.h"
5680 /* System header to define __stub macros and hopefully few prototypes,
5681 which can conflict with char initscr(); below. */
5683 /* Override any gcc2 internal prototype to avoid an error. */
5684 /* We use char because int might match the return type of a gcc2
5685 builtin and then its argument prototype would still apply. */
5690 /* The GNU C library defines this for functions which it implements
5691 to always fail with ENOSYS. Some functions are actually named
5692 something starting with __ and the normal name is an alias. */
5693 #if defined (__stub_initscr) || defined (__stub___initscr)
5701 if { (eval echo configure:5702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5703 eval "ac_cv_func_initscr=yes"
5705 echo "configure: failed program was:" >&5
5706 cat conftest.$ac_ext >&5
5708 eval "ac_cv_func_initscr=no"
5713 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
5714 echo "$ac_t""yes" 1>&6
5715 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5717 echo "$ac_t""no" 1>&6
5719 cf_save_LIBS="$LIBS"
5720 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
5721 echo "configure:5722: checking for initscr in -l$cf_nculib_root" >&5
5722 LIBS="-l$cf_nculib_root $LIBS"
5723 cat > conftest.$ac_ext <<EOF
5724 #line 5725 "configure"
5725 #include "confdefs.h"
5726 #include <${cf_cv_ncurses_header-curses.h}>
5731 if { (eval echo configure:5732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5733 echo "$ac_t""yes" 1>&6
5734 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5737 echo "configure: failed program was:" >&5
5738 cat conftest.$ac_ext >&5
5740 echo "$ac_t""no" 1>&6
5742 cf_library_path_list=""
5743 if test -n "${LDFLAGS}${LIBS}" ; then
5744 for cf_library_path in $LDFLAGS $LIBS
5746 case $cf_library_path in #(vi
5748 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5750 test "$cf_library_path" != "NONE" && \
5751 test -d "$cf_library_path" && \
5753 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5754 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5755 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5756 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5757 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5758 test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
5761 cf_library_path_list="$cf_library_path_list $cf_search"
5770 test "/usr" != "$prefix" && \
5772 (test $prefix = NONE || test -d $prefix) && {
5773 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
5774 test -d /usr/lib && cf_search="$cf_search /usr/lib"
5775 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
5776 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
5777 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
5778 test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
5782 test "$prefix" != "NONE" && \
5783 test -d "$prefix" && \
5785 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5786 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5787 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5788 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5789 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5790 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5794 test "/usr/local" != "$prefix" && \
5795 test -d "/usr/local" && \
5796 (test $prefix = NONE || test -d $prefix) && {
5797 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
5798 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
5799 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
5800 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
5801 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
5802 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
5806 test "/opt" != "$prefix" && \
5808 (test $prefix = NONE || test -d $prefix) && {
5809 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
5810 test -d /opt/lib && cf_search="$cf_search /opt/lib"
5811 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
5812 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
5813 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
5814 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
5818 test "$HOME" != "$prefix" && \
5819 test -d "$HOME" && \
5820 (test $prefix = NONE || test -d $prefix) && {
5821 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
5822 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
5823 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
5824 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
5825 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
5826 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
5831 cf_search="$cf_library_path_list $cf_search"
5833 for cf_libdir in $cf_search
5835 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
5836 echo "configure:5837: checking for -l$cf_nculib_root in $cf_libdir" >&5
5837 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5838 cat > conftest.$ac_ext <<EOF
5839 #line 5840 "configure"
5840 #include "confdefs.h"
5841 #include <${cf_cv_ncurses_header-curses.h}>
5846 if { (eval echo configure:5847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5848 echo "$ac_t""yes" 1>&6
5849 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5852 echo "configure: failed program was:" >&5
5853 cat conftest.$ac_ext >&5
5855 echo "$ac_t""no" 1>&6
5856 LIBS="$cf_save_LIBS"
5866 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5868 if test $cf_found_library = no ; then
5869 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
5875 if test -n "$cf_ncurses_LIBS" ; then
5876 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
5877 echo "configure:5878: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5878 cf_ncurses_SAVE="$LIBS"
5879 for p in $cf_ncurses_LIBS ; do
5880 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5881 if test "$q" != "$LIBS" ; then
5885 cat > conftest.$ac_ext <<EOF
5886 #line 5887 "configure"
5887 #include "confdefs.h"
5888 #include <${cf_cv_ncurses_header-curses.h}>
5890 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5893 if { (eval echo configure:5894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5895 echo "$ac_t""yes" 1>&6
5897 echo "configure: failed program was:" >&5
5898 cat conftest.$ac_ext >&5
5900 echo "$ac_t""no" 1>&6
5901 LIBS="$cf_ncurses_SAVE"
5907 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5909 cat >> confdefs.h <<EOF
5910 #define $cf_nculib_ROOT 1
5919 if test "$no_x" = yes; then
5920 # Not all programs may use this symbol, but it does not hurt to define it.
5921 cat >> confdefs.h <<\EOF
5922 #define X_DISPLAY_MISSING 1
5925 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5927 if test -n "$x_includes"; then
5928 X_CFLAGS="$X_CFLAGS -I$x_includes"
5931 # It would also be nice to do this for all -L options, not just this one.
5932 if test -n "$x_libraries"; then
5933 X_LIBS="$X_LIBS -L$x_libraries"
5934 # For Solaris; some versions of Sun CC require a space after -R and
5935 # others require no space. Words are not sufficient . . . .
5936 case "`(uname -sr) 2>/dev/null`" in
5938 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5939 echo "configure:5940: checking whether -R must be followed by a space" >&5
5940 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5941 cat > conftest.$ac_ext <<EOF
5942 #line 5943 "configure"
5943 #include "confdefs.h"
5949 if { (eval echo configure:5950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5953 echo "configure: failed program was:" >&5
5954 cat conftest.$ac_ext >&5
5959 if test $ac_R_nospace = yes; then
5960 echo "$ac_t""no" 1>&6
5961 X_LIBS="$X_LIBS -R$x_libraries"
5963 LIBS="$ac_xsave_LIBS -R $x_libraries"
5964 cat > conftest.$ac_ext <<EOF
5965 #line 5966 "configure"
5966 #include "confdefs.h"
5972 if { (eval echo configure:5973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5976 echo "configure: failed program was:" >&5
5977 cat conftest.$ac_ext >&5
5982 if test $ac_R_space = yes; then
5983 echo "$ac_t""yes" 1>&6
5984 X_LIBS="$X_LIBS -R $x_libraries"
5986 echo "$ac_t""neither works" 1>&6
5989 LIBS="$ac_xsave_LIBS"
5993 # Check for system-dependent libraries X programs must link with.
5994 # Do this before checking for the system-independent R6 libraries
5995 # (-lICE), since we may need -lsocket or whatever for X linking.
5997 if test "$ISC" = yes; then
5998 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6000 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
6001 # libraries were built with DECnet support. And karl@cs.umb.edu says
6002 # the Alpha needs dnet_stub (dnet does not exist).
6003 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
6004 echo "configure:6005: checking for dnet_ntoa in -ldnet" >&5
6005 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6006 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6007 echo $ac_n "(cached) $ac_c" 1>&6
6009 ac_save_LIBS="$LIBS"
6011 cat > conftest.$ac_ext <<EOF
6012 #line 6013 "configure"
6013 #include "confdefs.h"
6014 /* Override any gcc2 internal prototype to avoid an error. */
6015 /* We use char because int might match the return type of a gcc2
6016 builtin and then its argument prototype would still apply. */
6023 if { (eval echo configure:6024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6025 eval "ac_cv_lib_$ac_lib_var=yes"
6027 echo "configure: failed program was:" >&5
6028 cat conftest.$ac_ext >&5
6030 eval "ac_cv_lib_$ac_lib_var=no"
6033 LIBS="$ac_save_LIBS"
6036 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6037 echo "$ac_t""yes" 1>&6
6038 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6040 echo "$ac_t""no" 1>&6
6043 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6044 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
6045 echo "configure:6046: checking for dnet_ntoa in -ldnet_stub" >&5
6046 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6047 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6048 echo $ac_n "(cached) $ac_c" 1>&6
6050 ac_save_LIBS="$LIBS"
6051 LIBS="-ldnet_stub $LIBS"
6052 cat > conftest.$ac_ext <<EOF
6053 #line 6054 "configure"
6054 #include "confdefs.h"
6055 /* Override any gcc2 internal prototype to avoid an error. */
6056 /* We use char because int might match the return type of a gcc2
6057 builtin and then its argument prototype would still apply. */
6064 if { (eval echo configure:6065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6066 eval "ac_cv_lib_$ac_lib_var=yes"
6068 echo "configure: failed program was:" >&5
6069 cat conftest.$ac_ext >&5
6071 eval "ac_cv_lib_$ac_lib_var=no"
6074 LIBS="$ac_save_LIBS"
6077 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6078 echo "$ac_t""yes" 1>&6
6079 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6081 echo "$ac_t""no" 1>&6
6086 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6087 # to get the SysV transport functions.
6088 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
6090 # The nsl library prevents programs from opening the X display
6091 # on Irix 5.2, according to dickey@clark.net.
6092 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
6093 echo "configure:6094: checking for gethostbyname" >&5
6094 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
6095 echo $ac_n "(cached) $ac_c" 1>&6
6097 cat > conftest.$ac_ext <<EOF
6098 #line 6099 "configure"
6099 #include "confdefs.h"
6100 /* System header to define __stub macros and hopefully few prototypes,
6101 which can conflict with char gethostbyname(); below. */
6103 /* Override any gcc2 internal prototype to avoid an error. */
6104 /* We use char because int might match the return type of a gcc2
6105 builtin and then its argument prototype would still apply. */
6106 char gethostbyname();
6110 /* The GNU C library defines this for functions which it implements
6111 to always fail with ENOSYS. Some functions are actually named
6112 something starting with __ and the normal name is an alias. */
6113 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6121 if { (eval echo configure:6122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6123 eval "ac_cv_func_gethostbyname=yes"
6125 echo "configure: failed program was:" >&5
6126 cat conftest.$ac_ext >&5
6128 eval "ac_cv_func_gethostbyname=no"
6133 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
6134 echo "$ac_t""yes" 1>&6
6137 echo "$ac_t""no" 1>&6
6140 if test $ac_cv_func_gethostbyname = no; then
6141 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
6142 echo "configure:6143: checking for gethostbyname in -lnsl" >&5
6143 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
6144 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6145 echo $ac_n "(cached) $ac_c" 1>&6
6147 ac_save_LIBS="$LIBS"
6149 cat > conftest.$ac_ext <<EOF
6150 #line 6151 "configure"
6151 #include "confdefs.h"
6152 /* Override any gcc2 internal prototype to avoid an error. */
6153 /* We use char because int might match the return type of a gcc2
6154 builtin and then its argument prototype would still apply. */
6155 char gethostbyname();
6161 if { (eval echo configure:6162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6163 eval "ac_cv_lib_$ac_lib_var=yes"
6165 echo "configure: failed program was:" >&5
6166 cat conftest.$ac_ext >&5
6168 eval "ac_cv_lib_$ac_lib_var=no"
6171 LIBS="$ac_save_LIBS"
6174 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6175 echo "$ac_t""yes" 1>&6
6176 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6178 echo "$ac_t""no" 1>&6
6183 # lieder@skyler.mavd.honeywell.com says without -lsocket,
6184 # socket/setsockopt and other routines are undefined under SCO ODT
6185 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
6186 # on later versions), says simon@lia.di.epfl.ch: it contains
6187 # gethostby* variants that don't use the nameserver (or something).
6188 # -lsocket must be given before -lnsl if both are needed.
6189 # We assume that if connect needs -lnsl, so does gethostbyname.
6190 echo $ac_n "checking for connect""... $ac_c" 1>&6
6191 echo "configure:6192: checking for connect" >&5
6192 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
6193 echo $ac_n "(cached) $ac_c" 1>&6
6195 cat > conftest.$ac_ext <<EOF
6196 #line 6197 "configure"
6197 #include "confdefs.h"
6198 /* System header to define __stub macros and hopefully few prototypes,
6199 which can conflict with char connect(); below. */
6201 /* Override any gcc2 internal prototype to avoid an error. */
6202 /* We use char because int might match the return type of a gcc2
6203 builtin and then its argument prototype would still apply. */
6208 /* The GNU C library defines this for functions which it implements
6209 to always fail with ENOSYS. Some functions are actually named
6210 something starting with __ and the normal name is an alias. */
6211 #if defined (__stub_connect) || defined (__stub___connect)
6219 if { (eval echo configure:6220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6221 eval "ac_cv_func_connect=yes"
6223 echo "configure: failed program was:" >&5
6224 cat conftest.$ac_ext >&5
6226 eval "ac_cv_func_connect=no"
6231 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6232 echo "$ac_t""yes" 1>&6
6235 echo "$ac_t""no" 1>&6
6238 if test $ac_cv_func_connect = no; then
6239 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
6240 echo "configure:6241: checking for connect in -lsocket" >&5
6241 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6242 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6243 echo $ac_n "(cached) $ac_c" 1>&6
6245 ac_save_LIBS="$LIBS"
6246 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6247 cat > conftest.$ac_ext <<EOF
6248 #line 6249 "configure"
6249 #include "confdefs.h"
6250 /* Override any gcc2 internal prototype to avoid an error. */
6251 /* We use char because int might match the return type of a gcc2
6252 builtin and then its argument prototype would still apply. */
6259 if { (eval echo configure:6260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6261 eval "ac_cv_lib_$ac_lib_var=yes"
6263 echo "configure: failed program was:" >&5
6264 cat conftest.$ac_ext >&5
6266 eval "ac_cv_lib_$ac_lib_var=no"
6269 LIBS="$ac_save_LIBS"
6272 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6273 echo "$ac_t""yes" 1>&6
6274 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6276 echo "$ac_t""no" 1>&6
6281 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6282 echo $ac_n "checking for remove""... $ac_c" 1>&6
6283 echo "configure:6284: checking for remove" >&5
6284 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
6285 echo $ac_n "(cached) $ac_c" 1>&6
6287 cat > conftest.$ac_ext <<EOF
6288 #line 6289 "configure"
6289 #include "confdefs.h"
6290 /* System header to define __stub macros and hopefully few prototypes,
6291 which can conflict with char remove(); below. */
6293 /* Override any gcc2 internal prototype to avoid an error. */
6294 /* We use char because int might match the return type of a gcc2
6295 builtin and then its argument prototype would still apply. */
6300 /* The GNU C library defines this for functions which it implements
6301 to always fail with ENOSYS. Some functions are actually named
6302 something starting with __ and the normal name is an alias. */
6303 #if defined (__stub_remove) || defined (__stub___remove)
6311 if { (eval echo configure:6312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6313 eval "ac_cv_func_remove=yes"
6315 echo "configure: failed program was:" >&5
6316 cat conftest.$ac_ext >&5
6318 eval "ac_cv_func_remove=no"
6323 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6324 echo "$ac_t""yes" 1>&6
6327 echo "$ac_t""no" 1>&6
6330 if test $ac_cv_func_remove = no; then
6331 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6332 echo "configure:6333: checking for remove in -lposix" >&5
6333 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6334 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6335 echo $ac_n "(cached) $ac_c" 1>&6
6337 ac_save_LIBS="$LIBS"
6338 LIBS="-lposix $LIBS"
6339 cat > conftest.$ac_ext <<EOF
6340 #line 6341 "configure"
6341 #include "confdefs.h"
6342 /* Override any gcc2 internal prototype to avoid an error. */
6343 /* We use char because int might match the return type of a gcc2
6344 builtin and then its argument prototype would still apply. */
6351 if { (eval echo configure:6352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6353 eval "ac_cv_lib_$ac_lib_var=yes"
6355 echo "configure: failed program was:" >&5
6356 cat conftest.$ac_ext >&5
6358 eval "ac_cv_lib_$ac_lib_var=no"
6361 LIBS="$ac_save_LIBS"
6364 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6365 echo "$ac_t""yes" 1>&6
6366 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6368 echo "$ac_t""no" 1>&6
6373 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6374 echo $ac_n "checking for shmat""... $ac_c" 1>&6
6375 echo "configure:6376: checking for shmat" >&5
6376 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
6377 echo $ac_n "(cached) $ac_c" 1>&6
6379 cat > conftest.$ac_ext <<EOF
6380 #line 6381 "configure"
6381 #include "confdefs.h"
6382 /* System header to define __stub macros and hopefully few prototypes,
6383 which can conflict with char shmat(); below. */
6385 /* Override any gcc2 internal prototype to avoid an error. */
6386 /* We use char because int might match the return type of a gcc2
6387 builtin and then its argument prototype would still apply. */
6392 /* The GNU C library defines this for functions which it implements
6393 to always fail with ENOSYS. Some functions are actually named
6394 something starting with __ and the normal name is an alias. */
6395 #if defined (__stub_shmat) || defined (__stub___shmat)
6403 if { (eval echo configure:6404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6405 eval "ac_cv_func_shmat=yes"
6407 echo "configure: failed program was:" >&5
6408 cat conftest.$ac_ext >&5
6410 eval "ac_cv_func_shmat=no"
6415 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6416 echo "$ac_t""yes" 1>&6
6419 echo "$ac_t""no" 1>&6
6422 if test $ac_cv_func_shmat = no; then
6423 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6424 echo "configure:6425: checking for shmat in -lipc" >&5
6425 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6426 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6427 echo $ac_n "(cached) $ac_c" 1>&6
6429 ac_save_LIBS="$LIBS"
6431 cat > conftest.$ac_ext <<EOF
6432 #line 6433 "configure"
6433 #include "confdefs.h"
6434 /* Override any gcc2 internal prototype to avoid an error. */
6435 /* We use char because int might match the return type of a gcc2
6436 builtin and then its argument prototype would still apply. */
6443 if { (eval echo configure:6444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6445 eval "ac_cv_lib_$ac_lib_var=yes"
6447 echo "configure: failed program was:" >&5
6448 cat conftest.$ac_ext >&5
6450 eval "ac_cv_lib_$ac_lib_var=no"
6453 LIBS="$ac_save_LIBS"
6456 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6457 echo "$ac_t""yes" 1>&6
6458 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6460 echo "$ac_t""no" 1>&6
6466 # Check for libraries that X11R6 Xt/Xaw programs need.
6467 ac_save_LDFLAGS="$LDFLAGS"
6468 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6469 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6470 # check for ICE first), but we must link in the order -lSM -lICE or
6471 # we get undefined symbols. So assume we have SM if we have ICE.
6472 # These have to be linked with before -lX11, unlike the other
6473 # libraries we check for below, so use a different variable.
6474 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6475 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
6476 echo "configure:6477: checking for IceConnectionNumber in -lICE" >&5
6477 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6478 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6479 echo $ac_n "(cached) $ac_c" 1>&6
6481 ac_save_LIBS="$LIBS"
6482 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6483 cat > conftest.$ac_ext <<EOF
6484 #line 6485 "configure"
6485 #include "confdefs.h"
6486 /* Override any gcc2 internal prototype to avoid an error. */
6487 /* We use char because int might match the return type of a gcc2
6488 builtin and then its argument prototype would still apply. */
6489 char IceConnectionNumber();
6492 IceConnectionNumber()
6495 if { (eval echo configure:6496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6497 eval "ac_cv_lib_$ac_lib_var=yes"
6499 echo "configure: failed program was:" >&5
6500 cat conftest.$ac_ext >&5
6502 eval "ac_cv_lib_$ac_lib_var=no"
6505 LIBS="$ac_save_LIBS"
6508 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6509 echo "$ac_t""yes" 1>&6
6510 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6512 echo "$ac_t""no" 1>&6
6515 LDFLAGS="$ac_save_LDFLAGS"
6523 # SYSTEM_NAME=`echo "$cf_cv_system_name"|tr ' ' -`
6527 LDFLAGS="$X_LIBS $LDFLAGS"
6529 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
6531 echo "${as_me-configure}:6532: testing checking additions to CFLAGS ..." 1>&5
6534 cf_check_cflags="$CFLAGS"
6535 cf_check_cppflags="$CPPFLAGS"
6540 cf_new_extra_cppflags=
6542 for cf_add_cflags in $X_CFLAGS
6544 case $cf_fix_cppflags in
6546 case $cf_add_cflags in #(vi
6547 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
6548 case $cf_add_cflags in
6550 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6552 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6553 && test -z "${cf_tst_cflags}" \
6554 && cf_fix_cppflags=yes
6556 if test $cf_fix_cppflags = yes ; then
6557 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6559 elif test "${cf_tst_cflags}" = "\"'" ; then
6560 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6566 *$cf_add_cflags) #(vi
6569 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
6574 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
6579 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6581 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
6583 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6584 && test -z "${cf_tst_cflags}" \
6585 && cf_fix_cppflags=no
6590 if test -n "$cf_new_cflags" ; then
6591 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
6593 echo "${as_me-configure}:6594: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
6596 CFLAGS="$CFLAGS $cf_new_cflags"
6599 if test -n "$cf_new_cppflags" ; then
6600 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
6602 echo "${as_me-configure}:6603: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
6605 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
6608 if test -n "$cf_new_extra_cppflags" ; then
6609 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
6611 echo "${as_me-configure}:6612: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
6614 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
6620 if test "$cf_check_cflags" != "$CFLAGS" ; then
6621 cat > conftest.$ac_ext <<EOF
6622 #line 6623 "configure"
6623 #include "confdefs.h"
6626 printf("Hello world");
6629 if { (eval echo configure:6630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6632 echo "configure: failed program was:" >&5
6633 cat conftest.$ac_ext >&5
6635 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
6637 echo "${as_me-configure}:6638: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
6640 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
6641 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
6643 echo "${as_me-configure}:6644: testing but keeping change to \$CPPFLAGS ..." 1>&5
6647 CFLAGS="$cf_check_flags"
6653 echo $ac_n "checking for XOpenDisplay""... $ac_c" 1>&6
6654 echo "configure:6655: checking for XOpenDisplay" >&5
6655 if eval "test \"`echo '$''{'ac_cv_func_XOpenDisplay'+set}'`\" = set"; then
6656 echo $ac_n "(cached) $ac_c" 1>&6
6658 cat > conftest.$ac_ext <<EOF
6659 #line 6660 "configure"
6660 #include "confdefs.h"
6661 /* System header to define __stub macros and hopefully few prototypes,
6662 which can conflict with char XOpenDisplay(); below. */
6664 /* Override any gcc2 internal prototype to avoid an error. */
6665 /* We use char because int might match the return type of a gcc2
6666 builtin and then its argument prototype would still apply. */
6667 char XOpenDisplay();
6671 /* The GNU C library defines this for functions which it implements
6672 to always fail with ENOSYS. Some functions are actually named
6673 something starting with __ and the normal name is an alias. */
6674 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
6682 if { (eval echo configure:6683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6684 eval "ac_cv_func_XOpenDisplay=yes"
6686 echo "configure: failed program was:" >&5
6687 cat conftest.$ac_ext >&5
6689 eval "ac_cv_func_XOpenDisplay=no"
6694 if eval "test \"`echo '$ac_cv_func_'XOpenDisplay`\" = yes"; then
6695 echo "$ac_t""yes" 1>&6
6698 echo "$ac_t""no" 1>&6
6700 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6701 echo "configure:6702: checking for XOpenDisplay in -lX11" >&5
6702 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6703 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6704 echo $ac_n "(cached) $ac_c" 1>&6
6706 ac_save_LIBS="$LIBS"
6707 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
6708 cat > conftest.$ac_ext <<EOF
6709 #line 6710 "configure"
6710 #include "confdefs.h"
6711 /* Override any gcc2 internal prototype to avoid an error. */
6712 /* We use char because int might match the return type of a gcc2
6713 builtin and then its argument prototype would still apply. */
6714 char XOpenDisplay();
6720 if { (eval echo configure:6721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6722 eval "ac_cv_lib_$ac_lib_var=yes"
6724 echo "configure: failed program was:" >&5
6725 cat conftest.$ac_ext >&5
6727 eval "ac_cv_lib_$ac_lib_var=no"
6730 LIBS="$ac_save_LIBS"
6733 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6734 echo "$ac_t""yes" 1>&6
6737 echo "$ac_t""no" 1>&6
6743 echo $ac_n "checking for XtAppInitialize""... $ac_c" 1>&6
6744 echo "configure:6745: checking for XtAppInitialize" >&5
6745 if eval "test \"`echo '$''{'ac_cv_func_XtAppInitialize'+set}'`\" = set"; then
6746 echo $ac_n "(cached) $ac_c" 1>&6
6748 cat > conftest.$ac_ext <<EOF
6749 #line 6750 "configure"
6750 #include "confdefs.h"
6751 /* System header to define __stub macros and hopefully few prototypes,
6752 which can conflict with char XtAppInitialize(); below. */
6754 /* Override any gcc2 internal prototype to avoid an error. */
6755 /* We use char because int might match the return type of a gcc2
6756 builtin and then its argument prototype would still apply. */
6757 char XtAppInitialize();
6761 /* The GNU C library defines this for functions which it implements
6762 to always fail with ENOSYS. Some functions are actually named
6763 something starting with __ and the normal name is an alias. */
6764 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
6772 if { (eval echo configure:6773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6774 eval "ac_cv_func_XtAppInitialize=yes"
6776 echo "configure: failed program was:" >&5
6777 cat conftest.$ac_ext >&5
6779 eval "ac_cv_func_XtAppInitialize=no"
6784 if eval "test \"`echo '$ac_cv_func_'XtAppInitialize`\" = yes"; then
6785 echo "$ac_t""yes" 1>&6
6788 echo "$ac_t""no" 1>&6
6790 echo $ac_n "checking for XtAppInitialize in -lXt""... $ac_c" 1>&6
6791 echo "configure:6792: checking for XtAppInitialize in -lXt" >&5
6792 ac_lib_var=`echo Xt'_'XtAppInitialize | sed 'y%./+-%__p_%'`
6793 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6794 echo $ac_n "(cached) $ac_c" 1>&6
6796 ac_save_LIBS="$LIBS"
6797 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
6798 cat > conftest.$ac_ext <<EOF
6799 #line 6800 "configure"
6800 #include "confdefs.h"
6801 /* Override any gcc2 internal prototype to avoid an error. */
6802 /* We use char because int might match the return type of a gcc2
6803 builtin and then its argument prototype would still apply. */
6804 char XtAppInitialize();
6810 if { (eval echo configure:6811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6812 eval "ac_cv_lib_$ac_lib_var=yes"
6814 echo "configure: failed program was:" >&5
6815 cat conftest.$ac_ext >&5
6817 eval "ac_cv_lib_$ac_lib_var=no"
6820 LIBS="$ac_save_LIBS"
6823 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6824 echo "$ac_t""yes" 1>&6
6825 cat >> confdefs.h <<\EOF
6826 #define HAVE_LIBXT 1
6830 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
6832 echo "$ac_t""no" 1>&6
6838 if test $cf_have_X_LIBS = no ; then
6839 echo "configure: warning: Unable to successfully link X Toolkit library (-lXt) with
6840 test program. You will have to check and add the proper libraries by hand
6845 cf_x_athena=${cf_x_athena-Xaw}
6847 echo $ac_n "checking if you want to link with Xaw 3d library""... $ac_c" 1>&6
6848 echo "configure:6849: checking if you want to link with Xaw 3d library" >&5
6851 # Check whether --with-Xaw3d or --without-Xaw3d was given.
6852 if test "${with_Xaw3d+set}" = set; then
6853 withval="$with_Xaw3d"
6857 if test "$withval" = yes ; then
6859 echo "$ac_t""yes" 1>&6
6861 echo "$ac_t""no" 1>&6
6864 echo $ac_n "checking if you want to link with neXT Athena library""... $ac_c" 1>&6
6865 echo "configure:6866: checking if you want to link with neXT Athena library" >&5
6868 # Check whether --with-neXtaw or --without-neXtaw was given.
6869 if test "${with_neXtaw+set}" = set; then
6870 withval="$with_neXtaw"
6874 if test "$withval" = yes ; then
6876 echo "$ac_t""yes" 1>&6
6878 echo "$ac_t""no" 1>&6
6881 echo $ac_n "checking if you want to link with Athena-Plus library""... $ac_c" 1>&6
6882 echo "configure:6883: checking if you want to link with Athena-Plus library" >&5
6885 # Check whether --with-XawPlus or --without-XawPlus was given.
6886 if test "${with_XawPlus+set}" = set; then
6887 withval="$with_XawPlus"
6891 if test "$withval" = yes ; then
6893 echo "$ac_t""yes" 1>&6
6895 echo "$ac_t""no" 1>&6
6898 echo $ac_n "checking for XextCreateExtension in -lXext""... $ac_c" 1>&6
6899 echo "configure:6900: checking for XextCreateExtension in -lXext" >&5
6900 ac_lib_var=`echo Xext'_'XextCreateExtension | sed 'y%./+-%__p_%'`
6901 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6902 echo $ac_n "(cached) $ac_c" 1>&6
6904 ac_save_LIBS="$LIBS"
6906 cat > conftest.$ac_ext <<EOF
6907 #line 6908 "configure"
6908 #include "confdefs.h"
6909 /* Override any gcc2 internal prototype to avoid an error. */
6910 /* We use char because int might match the return type of a gcc2
6911 builtin and then its argument prototype would still apply. */
6912 char XextCreateExtension();
6915 XextCreateExtension()
6918 if { (eval echo configure:6919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6920 eval "ac_cv_lib_$ac_lib_var=yes"
6922 echo "configure: failed program was:" >&5
6923 cat conftest.$ac_ext >&5
6925 eval "ac_cv_lib_$ac_lib_var=no"
6928 LIBS="$ac_save_LIBS"
6931 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6932 echo "$ac_t""yes" 1>&6
6935 echo "$ac_t""no" 1>&6
6942 cf_x_athena_root=$cf_x_athena
6943 cf_x_athena_include=""
6945 for cf_path in default \
6946 /usr/contrib/X11R6 \
6947 /usr/contrib/X11R5 \
6951 if test -z "$cf_x_athena_include" ; then
6953 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
6954 if test $cf_path != default ; then
6955 CPPFLAGS="$cf_save -I$cf_path/include"
6956 echo $ac_n "checking for $cf_test in $cf_path""... $ac_c" 1>&6
6957 echo "configure:6958: checking for $cf_test in $cf_path" >&5
6959 echo $ac_n "checking for $cf_test""... $ac_c" 1>&6
6960 echo "configure:6961: checking for $cf_test" >&5
6962 cat > conftest.$ac_ext <<EOF
6963 #line 6964 "configure"
6964 #include "confdefs.h"
6966 #include <X11/Intrinsic.h>
6972 if { (eval echo configure:6973: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6976 echo "configure: failed program was:" >&5
6977 cat conftest.$ac_ext >&5
6982 echo "$ac_t""$cf_result" 1>&6
6983 if test "$cf_result" = yes ; then
6984 cf_x_athena_include=$cf_path
6992 if test -z "$cf_x_athena_include" ; then
6993 echo "configure: warning: Unable to successfully find Athena header files with test program" 1>&2
6994 elif test "$cf_x_athena_include" != default ; then
6995 CPPFLAGS="$CPPFLAGS -I$cf_x_athena_include"
6999 cf_x_athena_root=$cf_x_athena
7002 for cf_path in default \
7003 /usr/contrib/X11R6 \
7004 /usr/contrib/X11R5 \
7009 "-l$cf_x_athena_root -lXmu" \
7010 "-l$cf_x_athena_root -lXpm -lXmu" \
7011 "-l${cf_x_athena_root}_s -lXmu_s"
7013 if test -z "$cf_x_athena_lib" ; then
7015 cf_test=XawSimpleMenuAddGlobalActions
7016 if test $cf_path != default ; then
7017 LIBS="-L$cf_path/lib $cf_lib $LIBS"
7018 echo $ac_n "checking for $cf_lib in $cf_path""... $ac_c" 1>&6
7019 echo "configure:7020: checking for $cf_lib in $cf_path" >&5
7021 LIBS="$cf_lib $LIBS"
7022 echo $ac_n "checking for $cf_test in $cf_lib""... $ac_c" 1>&6
7023 echo "configure:7024: checking for $cf_test in $cf_lib" >&5
7025 cat > conftest.$ac_ext <<EOF
7026 #line 7027 "configure"
7027 #include "confdefs.h"
7033 if { (eval echo configure:7034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7037 echo "configure: failed program was:" >&5
7038 cat conftest.$ac_ext >&5
7043 echo "$ac_t""$cf_result" 1>&6
7044 if test "$cf_result" = yes ; then
7045 cf_x_athena_lib="$cf_lib"
7053 if test -z "$cf_x_athena_lib" ; then
7054 { echo "configure: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" 1>&2; exit 1; }
7058 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7060 cat >> confdefs.h <<EOF
7061 #define $cf_x_athena_LIBS 1
7069 for ac_prog in xcurses-config
7071 # Extract the first word of "$ac_prog", so it can be a program name with args.
7072 set dummy $ac_prog; ac_word=$2
7073 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7074 echo "configure:7075: checking for $ac_word" >&5
7075 if eval "test \"`echo '$''{'ac_cv_path_XCURSES_CONFIG'+set}'`\" = set"; then
7076 echo $ac_n "(cached) $ac_c" 1>&6
7078 case "$XCURSES_CONFIG" in
7080 ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a path.
7083 ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a dos path.
7086 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7088 for ac_dir in $ac_dummy; do
7089 test -z "$ac_dir" && ac_dir=.
7090 if test -f $ac_dir/$ac_word; then
7091 ac_cv_path_XCURSES_CONFIG="$ac_dir/$ac_word"
7099 XCURSES_CONFIG="$ac_cv_path_XCURSES_CONFIG"
7100 if test -n "$XCURSES_CONFIG"; then
7101 echo "$ac_t""$XCURSES_CONFIG" 1>&6
7103 echo "$ac_t""no" 1>&6
7106 test -n "$XCURSES_CONFIG" && break
7108 test -n "$XCURSES_CONFIG" || XCURSES_CONFIG="none"
7111 if test "$XCURSES_CONFIG" != none ; then
7113 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
7114 LIBS="`$XCURSES_CONFIG --libs` $LIBS"
7116 cf_cv_lib_XCurses=yes
7120 LDFLAGS="$LDFLAGS $X_LIBS"
7122 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
7124 echo "${as_me-configure}:7125: testing checking additions to CFLAGS ..." 1>&5
7127 cf_check_cflags="$CFLAGS"
7128 cf_check_cppflags="$CPPFLAGS"
7133 cf_new_extra_cppflags=
7135 for cf_add_cflags in $X_CFLAGS
7137 case $cf_fix_cppflags in
7139 case $cf_add_cflags in #(vi
7140 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7141 case $cf_add_cflags in
7143 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7145 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7146 && test -z "${cf_tst_cflags}" \
7147 && cf_fix_cppflags=yes
7149 if test $cf_fix_cppflags = yes ; then
7150 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7152 elif test "${cf_tst_cflags}" = "\"'" ; then
7153 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7159 *$cf_add_cflags) #(vi
7162 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7167 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7172 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7174 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7176 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7177 && test -z "${cf_tst_cflags}" \
7178 && cf_fix_cppflags=no
7183 if test -n "$cf_new_cflags" ; then
7184 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
7186 echo "${as_me-configure}:7187: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
7189 CFLAGS="$CFLAGS $cf_new_cflags"
7192 if test -n "$cf_new_cppflags" ; then
7193 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
7195 echo "${as_me-configure}:7196: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
7198 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7201 if test -n "$cf_new_extra_cppflags" ; then
7202 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
7204 echo "${as_me-configure}:7205: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
7207 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7213 if test "$cf_check_cflags" != "$CFLAGS" ; then
7214 cat > conftest.$ac_ext <<EOF
7215 #line 7216 "configure"
7216 #include "confdefs.h"
7219 printf("Hello world");
7222 if { (eval echo configure:7223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7225 echo "configure: failed program was:" >&5
7226 cat conftest.$ac_ext >&5
7228 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
7230 echo "${as_me-configure}:7231: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
7233 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
7234 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
7236 echo "${as_me-configure}:7237: testing but keeping change to \$CPPFLAGS ..." 1>&5
7240 CFLAGS="$cf_check_flags"
7245 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
7246 echo "configure:7247: checking for XOpenDisplay in -lX11" >&5
7247 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
7248 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7249 echo $ac_n "(cached) $ac_c" 1>&6
7251 ac_save_LIBS="$LIBS"
7252 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
7253 cat > conftest.$ac_ext <<EOF
7254 #line 7255 "configure"
7255 #include "confdefs.h"
7256 /* Override any gcc2 internal prototype to avoid an error. */
7257 /* We use char because int might match the return type of a gcc2
7258 builtin and then its argument prototype would still apply. */
7259 char XOpenDisplay();
7265 if { (eval echo configure:7266: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7267 eval "ac_cv_lib_$ac_lib_var=yes"
7269 echo "configure: failed program was:" >&5
7270 cat conftest.$ac_ext >&5
7272 eval "ac_cv_lib_$ac_lib_var=no"
7275 LIBS="$ac_save_LIBS"
7278 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7279 echo "$ac_t""yes" 1>&6
7282 echo "$ac_t""no" 1>&6
7285 echo $ac_n "checking for XCurses library""... $ac_c" 1>&6
7286 echo "configure:7287: checking for XCurses library" >&5
7287 if eval "test \"`echo '$''{'cf_cv_lib_XCurses'+set}'`\" = set"; then
7288 echo $ac_n "(cached) $ac_c" 1>&6
7291 LIBS="-lXCurses $LIBS"
7292 cat > conftest.$ac_ext <<EOF
7293 #line 7294 "configure"
7294 #include "confdefs.h"
7296 #include <xcurses.h>
7297 char *XCursesProgramName = "test";
7303 if { (eval echo configure:7304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7305 cf_cv_lib_XCurses=yes
7307 echo "configure: failed program was:" >&5
7308 cat conftest.$ac_ext >&5
7310 cf_cv_lib_XCurses=no
7316 echo "$ac_t""$cf_cv_lib_XCurses" 1>&6
7320 if test $cf_cv_lib_XCurses = yes ; then
7321 cat >> confdefs.h <<\EOF
7325 cat >> confdefs.h <<\EOF
7329 cat >> confdefs.h <<\EOF
7330 #define HAVE_XCURSES 1
7334 { echo "configure: error: Cannot link with XCurses" 1>&2; exit 1; }
7342 case $cf_cv_screen in #(vi
7346 # look for curses-related libraries
7347 echo $ac_n "checking for new_panel in -lpanel$cf_cv_libtype""... $ac_c" 1>&6
7348 echo "configure:7349: checking for new_panel in -lpanel$cf_cv_libtype" >&5
7349 ac_lib_var=`echo panel$cf_cv_libtype'_'new_panel | sed 'y%./+-%__p_%'`
7350 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7351 echo $ac_n "(cached) $ac_c" 1>&6
7353 ac_save_LIBS="$LIBS"
7354 LIBS="-lpanel$cf_cv_libtype $LIBS"
7355 cat > conftest.$ac_ext <<EOF
7356 #line 7357 "configure"
7357 #include "confdefs.h"
7358 /* Override any gcc2 internal prototype to avoid an error. */
7359 /* We use char because int might match the return type of a gcc2
7360 builtin and then its argument prototype would still apply. */
7367 if { (eval echo configure:7368: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7369 eval "ac_cv_lib_$ac_lib_var=yes"
7371 echo "configure: failed program was:" >&5
7372 cat conftest.$ac_ext >&5
7374 eval "ac_cv_lib_$ac_lib_var=no"
7377 LIBS="$ac_save_LIBS"
7380 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7381 echo "$ac_t""yes" 1>&6
7382 ac_tr_lib=HAVE_LIB`echo panel$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7383 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7384 cat >> confdefs.h <<EOF
7385 #define $ac_tr_lib 1
7388 LIBS="-lpanel$cf_cv_libtype $LIBS"
7391 echo "$ac_t""no" 1>&6
7394 echo $ac_n "checking for menu_driver in -lmenu$cf_cv_libtype""... $ac_c" 1>&6
7395 echo "configure:7396: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
7396 ac_lib_var=`echo menu$cf_cv_libtype'_'menu_driver | sed 'y%./+-%__p_%'`
7397 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7398 echo $ac_n "(cached) $ac_c" 1>&6
7400 ac_save_LIBS="$LIBS"
7401 LIBS="-lmenu$cf_cv_libtype $LIBS"
7402 cat > conftest.$ac_ext <<EOF
7403 #line 7404 "configure"
7404 #include "confdefs.h"
7405 /* Override any gcc2 internal prototype to avoid an error. */
7406 /* We use char because int might match the return type of a gcc2
7407 builtin and then its argument prototype would still apply. */
7414 if { (eval echo configure:7415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7416 eval "ac_cv_lib_$ac_lib_var=yes"
7418 echo "configure: failed program was:" >&5
7419 cat conftest.$ac_ext >&5
7421 eval "ac_cv_lib_$ac_lib_var=no"
7424 LIBS="$ac_save_LIBS"
7427 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7428 echo "$ac_t""yes" 1>&6
7429 ac_tr_lib=HAVE_LIB`echo menu$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7430 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7431 cat >> confdefs.h <<EOF
7432 #define $ac_tr_lib 1
7435 LIBS="-lmenu$cf_cv_libtype $LIBS"
7438 echo "$ac_t""no" 1>&6
7441 echo $ac_n "checking for form_driver in -lform$cf_cv_libtype""... $ac_c" 1>&6
7442 echo "configure:7443: checking for form_driver in -lform$cf_cv_libtype" >&5
7443 ac_lib_var=`echo form$cf_cv_libtype'_'form_driver | sed 'y%./+-%__p_%'`
7444 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7445 echo $ac_n "(cached) $ac_c" 1>&6
7447 ac_save_LIBS="$LIBS"
7448 LIBS="-lform$cf_cv_libtype $LIBS"
7449 cat > conftest.$ac_ext <<EOF
7450 #line 7451 "configure"
7451 #include "confdefs.h"
7452 /* Override any gcc2 internal prototype to avoid an error. */
7453 /* We use char because int might match the return type of a gcc2
7454 builtin and then its argument prototype would still apply. */
7461 if { (eval echo configure:7462: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7463 eval "ac_cv_lib_$ac_lib_var=yes"
7465 echo "configure: failed program was:" >&5
7466 cat conftest.$ac_ext >&5
7468 eval "ac_cv_lib_$ac_lib_var=no"
7471 LIBS="$ac_save_LIBS"
7474 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7475 echo "$ac_t""yes" 1>&6
7476 ac_tr_lib=HAVE_LIB`echo form$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7477 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7478 cat >> confdefs.h <<EOF
7479 #define $ac_tr_lib 1
7482 LIBS="-lform$cf_cv_libtype $LIBS"
7485 echo "$ac_t""no" 1>&6
7489 # look for curses-related headers
7498 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7499 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7500 echo "configure:7501: checking for $ac_hdr" >&5
7501 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7502 echo $ac_n "(cached) $ac_c" 1>&6
7504 cat > conftest.$ac_ext <<EOF
7505 #line 7506 "configure"
7506 #include "confdefs.h"
7509 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7510 { (eval echo configure:7511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7511 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7512 if test -z "$ac_err"; then
7514 eval "ac_cv_header_$ac_safe=yes"
7517 echo "configure: failed program was:" >&5
7518 cat conftest.$ac_ext >&5
7520 eval "ac_cv_header_$ac_safe=no"
7524 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7525 echo "$ac_t""yes" 1>&6
7526 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7527 cat >> confdefs.h <<EOF
7528 #define $ac_tr_hdr 1
7532 echo "$ac_t""no" 1>&6
7539 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
7540 echo "configure:7541: checking return type of signal handlers" >&5
7541 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
7542 echo $ac_n "(cached) $ac_c" 1>&6
7544 cat > conftest.$ac_ext <<EOF
7545 #line 7546 "configure"
7546 #include "confdefs.h"
7547 #include <sys/types.h>
7553 extern "C" void (*signal (int, void (*)(int)))(int);
7555 void (*signal ()) ();
7562 if { (eval echo configure:7563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7564 ac_cv_type_signal=void
7566 echo "configure: failed program was:" >&5
7567 cat conftest.$ac_ext >&5
7569 ac_cv_type_signal=int
7574 echo "$ac_t""$ac_cv_type_signal" 1>&6
7575 cat >> confdefs.h <<EOF
7576 #define RETSIGTYPE $ac_cv_type_signal
7581 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
7582 echo "configure:7583: checking for ANSI C header files" >&5
7583 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
7584 echo $ac_n "(cached) $ac_c" 1>&6
7586 cat > conftest.$ac_ext <<EOF
7587 #line 7588 "configure"
7588 #include "confdefs.h"
7594 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7595 { (eval echo configure:7596: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7596 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7597 if test -z "$ac_err"; then
7599 ac_cv_header_stdc=yes
7602 echo "configure: failed program was:" >&5
7603 cat conftest.$ac_ext >&5
7605 ac_cv_header_stdc=no
7609 if test $ac_cv_header_stdc = yes; then
7610 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7611 cat > conftest.$ac_ext <<EOF
7612 #line 7613 "configure"
7613 #include "confdefs.h"
7616 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7617 egrep "memchr" >/dev/null 2>&1; then
7621 ac_cv_header_stdc=no
7627 if test $ac_cv_header_stdc = yes; then
7628 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7629 cat > conftest.$ac_ext <<EOF
7630 #line 7631 "configure"
7631 #include "confdefs.h"
7634 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7635 egrep "free" >/dev/null 2>&1; then
7639 ac_cv_header_stdc=no
7645 if test $ac_cv_header_stdc = yes; then
7646 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7647 if test "$cross_compiling" = yes; then
7650 cat > conftest.$ac_ext <<EOF
7651 #line 7652 "configure"
7652 #include "confdefs.h"
7654 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7655 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7656 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7657 int main () { int i; for (i = 0; i < 256; i++)
7658 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
7662 if { (eval echo configure:7663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7666 echo "configure: failed program was:" >&5
7667 cat conftest.$ac_ext >&5
7669 ac_cv_header_stdc=no
7677 echo "$ac_t""$ac_cv_header_stdc" 1>&6
7678 if test $ac_cv_header_stdc = yes; then
7679 cat >> confdefs.h <<\EOF
7680 #define STDC_HEADERS 1
7685 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
7686 echo "configure:7687: checking whether time.h and sys/time.h may both be included" >&5
7687 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
7688 echo $ac_n "(cached) $ac_c" 1>&6
7690 cat > conftest.$ac_ext <<EOF
7691 #line 7692 "configure"
7692 #include "confdefs.h"
7693 #include <sys/types.h>
7694 #include <sys/time.h>
7700 if { (eval echo configure:7701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7702 ac_cv_header_time=yes
7704 echo "configure: failed program was:" >&5
7705 cat conftest.$ac_ext >&5
7707 ac_cv_header_time=no
7712 echo "$ac_t""$ac_cv_header_time" 1>&6
7713 if test $ac_cv_header_time = yes; then
7714 cat >> confdefs.h <<\EOF
7715 #define TIME_WITH_SYS_TIME 1
7731 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7732 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7733 echo "configure:7734: checking for $ac_hdr" >&5
7734 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7735 echo $ac_n "(cached) $ac_c" 1>&6
7737 cat > conftest.$ac_ext <<EOF
7738 #line 7739 "configure"
7739 #include "confdefs.h"
7742 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7743 { (eval echo configure:7744: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7744 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7745 if test -z "$ac_err"; then
7747 eval "ac_cv_header_$ac_safe=yes"
7750 echo "configure: failed program was:" >&5
7751 cat conftest.$ac_ext >&5
7753 eval "ac_cv_header_$ac_safe=no"
7757 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7758 echo "$ac_t""yes" 1>&6
7759 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7760 cat >> confdefs.h <<EOF
7761 #define $ac_tr_hdr 1
7765 echo "$ac_t""no" 1>&6
7783 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7784 echo "configure:7785: checking for $ac_func" >&5
7785 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7786 echo $ac_n "(cached) $ac_c" 1>&6
7788 cat > conftest.$ac_ext <<EOF
7789 #line 7790 "configure"
7790 #include "confdefs.h"
7791 /* System header to define __stub macros and hopefully few prototypes,
7792 which can conflict with char $ac_func(); below. */
7794 /* Override any gcc2 internal prototype to avoid an error. */
7795 /* We use char because int might match the return type of a gcc2
7796 builtin and then its argument prototype would still apply. */
7801 /* The GNU C library defines this for functions which it implements
7802 to always fail with ENOSYS. Some functions are actually named
7803 something starting with __ and the normal name is an alias. */
7804 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7812 if { (eval echo configure:7813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7814 eval "ac_cv_func_$ac_func=yes"
7816 echo "configure: failed program was:" >&5
7817 cat conftest.$ac_ext >&5
7819 eval "ac_cv_func_$ac_func=no"
7824 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7825 echo "$ac_t""yes" 1>&6
7826 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7827 cat >> confdefs.h <<EOF
7828 #define $ac_tr_func 1
7832 echo "$ac_t""no" 1>&6
7838 echo $ac_n "checking if we must define _XOPEN_SOURCE_EXTENDED""... $ac_c" 1>&6
7839 echo "configure:7840: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7840 if eval "test \"`echo '$''{'cf_cv_need_xopen_extension'+set}'`\" = set"; then
7841 echo $ac_n "(cached) $ac_c" 1>&6
7844 cat > conftest.$ac_ext <<EOF
7845 #line 7846 "configure"
7846 #include "confdefs.h"
7849 #include <${cf_cv_ncurses_header-curses.h}>
7852 long x = winnstr(stdscr, "", 0);
7854 getbegyx(stdscr, y1, x1)
7857 if { (eval echo configure:7858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7859 cf_cv_need_xopen_extension=no
7861 echo "configure: failed program was:" >&5
7862 cat conftest.$ac_ext >&5
7864 cat > conftest.$ac_ext <<EOF
7865 #line 7866 "configure"
7866 #include "confdefs.h"
7868 #define _XOPEN_SOURCE_EXTENDED
7870 #include <${cf_cv_ncurses_header-curses.h}>
7873 long x = winnstr(stdscr, "", 0);
7875 getbegyx(stdscr, y1, x1)
7878 if { (eval echo configure:7879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7880 cf_cv_need_xopen_extension=yes
7882 echo "configure: failed program was:" >&5
7883 cat conftest.$ac_ext >&5
7885 cf_cv_need_xopen_extension=unknown
7892 echo "$ac_t""$cf_cv_need_xopen_extension" 1>&6
7893 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7896 echo $ac_n "checking for term.h""... $ac_c" 1>&6
7897 echo "configure:7898: checking for term.h" >&5
7898 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
7899 echo $ac_n "(cached) $ac_c" 1>&6
7903 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
7904 # for <term.h> if we do not find the variant.
7906 `echo ${cf_cv_ncurses_header-curses.h} | sed -e 's%/.*%/%'`term.h \
7909 cat > conftest.$ac_ext <<EOF
7910 #line 7911 "configure"
7911 #include "confdefs.h"
7913 #include <${cf_cv_ncurses_header-curses.h}>
7914 #include <${cf_header}>
7919 if { (eval echo configure:7920: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7921 cf_cv_term_header=$cf_header
7924 echo "configure: failed program was:" >&5
7925 cat conftest.$ac_ext >&5
7927 cf_cv_term_header=no
7934 echo "$ac_t""$cf_cv_term_header" 1>&6
7936 case $cf_cv_term_header in #(vi
7938 cat >> confdefs.h <<\EOF
7939 #define HAVE_TERM_H 1
7944 cat >> confdefs.h <<\EOF
7945 #define HAVE_NCURSES_TERM_H 1
7950 cat >> confdefs.h <<\EOF
7951 #define HAVE_NCURSESW_TERM_H 1
7985 use_default_colors \
7994 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7996 echo $ac_n "checking for ${cf_func}""... $ac_c" 1>&6
7997 echo "configure:7998: checking for ${cf_func}" >&5
7999 echo "${as_me-configure}:8000: testing ${cf_func} ..." 1>&5
8001 if eval "test \"`echo '$''{'cf_cv_func_$cf_func'+set}'`\" = set"; then
8002 echo $ac_n "(cached) $ac_c" 1>&6
8005 eval cf_result='$ac_cv_func_'$cf_func
8006 if test ".$cf_result" != ".no"; then
8007 cat > conftest.$ac_ext <<EOF
8008 #line 8009 "configure"
8009 #include "confdefs.h"
8012 #include <xcurses.h>
8013 char * XCursesProgramName = "test";
8015 #include <${cf_cv_ncurses_header-curses.h}>
8016 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
8017 #include <ncursesw/term.h>
8018 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
8019 #include <ncurses/term.h>
8020 #elif defined(HAVE_TERM_H)
8028 long foo = (long)(&${cf_func});
8029 ${cf_cv_main_return-return}(foo == 0);
8034 if { (eval echo configure:8035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8038 echo "configure: failed program was:" >&5
8039 cat conftest.$ac_ext >&5
8045 eval 'cf_cv_func_'$cf_func'=$cf_result'
8049 # use the computed/retrieved cache-value:
8050 eval 'cf_result=$cf_cv_func_'$cf_func
8051 echo "$ac_t""$cf_result" 1>&6
8052 if test $cf_result != no; then
8053 cat >> confdefs.h <<EOF
8054 #define HAVE_${cf_tr_func} 1
8061 echo $ac_n "checking for ncurses extended functions""... $ac_c" 1>&6
8062 echo "configure:8063: checking for ncurses extended functions" >&5
8063 if eval "test \"`echo '$''{'cf_cv_ncurses_ext_funcs'+set}'`\" = set"; then
8064 echo $ac_n "(cached) $ac_c" 1>&6
8067 cat > conftest.$ac_ext <<EOF
8068 #line 8069 "configure"
8069 #include "confdefs.h"
8071 #include <${cf_cv_ncurses_header-curses.h}>
8074 (void) assume_default_colors (0, 0);
8075 (void) curses_version ();
8076 (void) define_key (0, 0);
8077 (void) is_term_resized (0, 0);
8078 (void) key_defined (0);
8079 (void) keybound (0, 0);
8080 (void) keyok (0, 0);
8081 (void) resize_term (0, 0);
8082 (void) resizeterm (0, 0);
8083 (void) use_default_colors ();
8084 (void) use_extended_names (0);
8085 (void) wresize (0, 0, 0);
8088 if { (eval echo configure:8089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8090 cf_cv_ncurses_ext_funcs=yes
8092 echo "configure: failed program was:" >&5
8093 cat conftest.$ac_ext >&5
8095 cf_cv_ncurses_ext_funcs=no
8101 echo "$ac_t""$cf_cv_ncurses_ext_funcs" 1>&6
8102 test "$cf_cv_ncurses_ext_funcs" != no && cat >> confdefs.h <<\EOF
8103 #define NCURSES_EXT_FUNCS 1
8107 echo $ac_n "checking for wide-character functions""... $ac_c" 1>&6
8108 echo "configure:8109: checking for wide-character functions" >&5
8109 if eval "test \"`echo '$''{'cf_cv_widechar_funcs'+set}'`\" = set"; then
8110 echo $ac_n "(cached) $ac_c" 1>&6
8113 cat > conftest.$ac_ext <<EOF
8114 #line 8115 "configure"
8115 #include "confdefs.h"
8117 #include <${cf_cv_ncurses_header-curses.h}>
8120 static wchar_t src_wchar[2];
8121 static cchar_t dst_cchar;
8122 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
8126 if { (eval echo configure:8127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8128 cf_cv_widechar_funcs=yes
8130 echo "configure: failed program was:" >&5
8131 cat conftest.$ac_ext >&5
8133 cf_cv_widechar_funcs=no
8139 echo "$ac_t""$cf_cv_widechar_funcs" 1>&6
8140 if test "$cf_cv_widechar_funcs" != no ; then
8141 cat >> confdefs.h <<\EOF
8142 #define USE_WIDEC_SUPPORT 1
8146 cat >> confdefs.h <<\EOF
8147 #define USE_WIDEC_SUPPORT 0
8152 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
8153 echo "configure:8154: checking for pid_t" >&5
8154 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
8155 echo $ac_n "(cached) $ac_c" 1>&6
8157 cat > conftest.$ac_ext <<EOF
8158 #line 8159 "configure"
8159 #include "confdefs.h"
8160 #include <sys/types.h>
8166 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8167 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
8169 ac_cv_type_pid_t=yes
8177 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
8178 if test $ac_cv_type_pid_t = no; then
8179 cat >> confdefs.h <<\EOF
8185 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
8186 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
8187 echo "configure:8188: checking for vfork.h" >&5
8188 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8189 echo $ac_n "(cached) $ac_c" 1>&6
8191 cat > conftest.$ac_ext <<EOF
8192 #line 8193 "configure"
8193 #include "confdefs.h"
8196 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8197 { (eval echo configure:8198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8198 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8199 if test -z "$ac_err"; then
8201 eval "ac_cv_header_$ac_safe=yes"
8204 echo "configure: failed program was:" >&5
8205 cat conftest.$ac_ext >&5
8207 eval "ac_cv_header_$ac_safe=no"
8211 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8212 echo "$ac_t""yes" 1>&6
8213 cat >> confdefs.h <<\EOF
8214 #define HAVE_VFORK_H 1
8218 echo "$ac_t""no" 1>&6
8221 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
8222 echo "configure:8223: checking for working vfork" >&5
8223 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
8224 echo $ac_n "(cached) $ac_c" 1>&6
8226 if test "$cross_compiling" = yes; then
8227 echo $ac_n "checking for vfork""... $ac_c" 1>&6
8228 echo "configure:8229: checking for vfork" >&5
8229 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
8230 echo $ac_n "(cached) $ac_c" 1>&6
8232 cat > conftest.$ac_ext <<EOF
8233 #line 8234 "configure"
8234 #include "confdefs.h"
8235 /* System header to define __stub macros and hopefully few prototypes,
8236 which can conflict with char vfork(); below. */
8238 /* Override any gcc2 internal prototype to avoid an error. */
8239 /* We use char because int might match the return type of a gcc2
8240 builtin and then its argument prototype would still apply. */
8245 /* The GNU C library defines this for functions which it implements
8246 to always fail with ENOSYS. Some functions are actually named
8247 something starting with __ and the normal name is an alias. */
8248 #if defined (__stub_vfork) || defined (__stub___vfork)
8256 if { (eval echo configure:8257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8258 eval "ac_cv_func_vfork=yes"
8260 echo "configure: failed program was:" >&5
8261 cat conftest.$ac_ext >&5
8263 eval "ac_cv_func_vfork=no"
8268 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
8269 echo "$ac_t""yes" 1>&6
8272 echo "$ac_t""no" 1>&6
8275 ac_cv_func_vfork_works=$ac_cv_func_vfork
8277 cat > conftest.$ac_ext <<EOF
8278 #line 8279 "configure"
8279 #include "confdefs.h"
8280 /* Thanks to Paul Eggert for this test. */
8282 #include <sys/types.h>
8283 #include <sys/stat.h>
8284 #ifdef HAVE_UNISTD_H
8290 /* On some sparc systems, changes by the child to local and incoming
8291 argument registers are propagated back to the parent.
8292 The compiler is told about this with #include <vfork.h>,
8293 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
8294 Test for this by using a static variable whose address
8295 is put into a register that is clobbered by the vfork. */
8298 sparc_address_test (int arg)
8300 sparc_address_test (arg) int arg;
8318 pid_t parent = getpid ();
8321 sparc_address_test ();
8326 /* Here is another test for sparc vfork register problems.
8327 This test uses lots of local variables, at least
8328 as many local variables as main has allocated so far
8329 including compiler temporaries. 4 locals are enough for
8330 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
8331 A buggy compiler should reuse the register of parent
8332 for one of the local variables, since it will think that
8333 parent can't possibly be used any more in this routine.
8334 Assigning to the local variable will thus munge parent
8335 in the parent process. */
8337 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
8338 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
8339 /* Convince the compiler that p..p7 are live; otherwise, it might
8340 use the same hardware register for all 8 local variables. */
8341 if (p != p1 || p != p2 || p != p3 || p != p4
8342 || p != p5 || p != p6 || p != p7)
8345 /* On some systems (e.g. IRIX 3.3),
8346 vfork doesn't separate parent from child file descriptors.
8347 If the child closes a descriptor before it execs or exits,
8348 this munges the parent's descriptor as well.
8349 Test for this by closing stdout in the child. */
8350 _exit(close(fileno(stdout)) != 0);
8355 while (wait(&status) != child)
8358 /* Was there some problem with vforking? */
8361 /* Did the child fail? (This shouldn't happen.) */
8364 /* Did the vfork/compiler bug occur? */
8365 || parent != getpid()
8367 /* Did the file descriptor bug occur? */
8368 || fstat(fileno(stdout), &st) != 0
8373 if { (eval echo configure:8374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8375 ac_cv_func_vfork_works=yes
8377 echo "configure: failed program was:" >&5
8378 cat conftest.$ac_ext >&5
8380 ac_cv_func_vfork_works=no
8387 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
8388 if test $ac_cv_func_vfork_works = no; then
8389 cat >> confdefs.h <<\EOF
8396 echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
8397 echo "configure:8398: checking if sys/time.h works with sys/select.h" >&5
8398 if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
8399 echo $ac_n "(cached) $ac_c" 1>&6
8402 cat > conftest.$ac_ext <<EOF
8403 #line 8404 "configure"
8404 #include "confdefs.h"
8406 #include <sys/types.h>
8407 #ifdef HAVE_SYS_TIME_H
8408 #include <sys/time.h>
8410 #ifdef HAVE_SYS_SELECT_H
8411 #include <sys/select.h>
8418 if { (eval echo configure:8419: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8420 cf_cv_sys_time_select=yes
8422 echo "configure: failed program was:" >&5
8423 cat conftest.$ac_ext >&5
8425 cf_cv_sys_time_select=no
8431 echo "$ac_t""$cf_cv_sys_time_select" 1>&6
8432 test "$cf_cv_sys_time_select" = yes && cat >> confdefs.h <<\EOF
8433 #define HAVE_SYS_TIME_SELECT 1
8438 echo $ac_n "checking for function curses_version""... $ac_c" 1>&6
8439 echo "configure:8440: checking for function curses_version" >&5
8440 if eval "test \"`echo '$''{'cf_cv_func_curses_version'+set}'`\" = set"; then
8441 echo $ac_n "(cached) $ac_c" 1>&6
8444 if test "$cross_compiling" = yes; then
8445 cf_cv_func_curses_version=unknown
8447 cat > conftest.$ac_ext <<EOF
8448 #line 8449 "configure"
8449 #include "confdefs.h"
8451 #include <${cf_cv_ncurses_header-curses.h}>
8455 sprintf(temp, "%s\n", curses_version());
8456 ${cf_cv_main_return-return}(0);
8460 if { (eval echo configure:8461: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8462 cf_cv_func_curses_version=yes
8465 echo "configure: failed program was:" >&5
8466 cat conftest.$ac_ext >&5
8468 cf_cv_func_curses_version=no
8477 echo "$ac_t""$cf_cv_func_curses_version" 1>&6
8478 test "$cf_cv_func_curses_version" = yes && cat >> confdefs.h <<\EOF
8479 #define HAVE_CURSES_VERSION 1
8484 echo $ac_n "checking for ncurses wrap-prefix""... $ac_c" 1>&6
8485 echo "configure:8486: checking for ncurses wrap-prefix" >&5
8487 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
8488 if test "${with_ncurses_wrap_prefix+set}" = set; then
8489 withval="$with_ncurses_wrap_prefix"
8490 NCURSES_WRAP_PREFIX=$withval
8492 NCURSES_WRAP_PREFIX=_nc_
8495 echo "$ac_t""$NCURSES_WRAP_PREFIX" 1>&6
8500 echo $ac_n "checking for alternate character set array""... $ac_c" 1>&6
8501 echo "configure:8502: checking for alternate character set array" >&5
8502 if eval "test \"`echo '$''{'cf_cv_curses_acs_map'+set}'`\" = set"; then
8503 echo $ac_n "(cached) $ac_c" 1>&6
8506 cf_cv_curses_acs_map=unknown
8507 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
8509 cat > conftest.$ac_ext <<EOF
8510 #line 8511 "configure"
8511 #include "confdefs.h"
8513 #include <${cf_cv_ncurses_header-curses.h}>
8517 $name['k'] = ACS_PLUS
8521 if { (eval echo configure:8522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8523 cf_cv_curses_acs_map=$name; break
8525 echo "configure: failed program was:" >&5
8526 cat conftest.$ac_ext >&5
8533 echo "$ac_t""$cf_cv_curses_acs_map" 1>&6
8535 test "$cf_cv_curses_acs_map" != unknown && cat >> confdefs.h <<EOF
8536 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
8541 echo $ac_n "checking for wide alternate character set array""... $ac_c" 1>&6
8542 echo "configure:8543: checking for wide alternate character set array" >&5
8543 if eval "test \"`echo '$''{'cf_cv_curses_wacs_map'+set}'`\" = set"; then
8544 echo $ac_n "(cached) $ac_c" 1>&6
8547 cf_cv_curses_wacs_map=unknown
8548 for name in wacs_map _wacs_map __wacs_map _nc_wacs
8550 cat > conftest.$ac_ext <<EOF
8551 #line 8552 "configure"
8552 #include "confdefs.h"
8554 #ifndef _XOPEN_SOURCE_EXTENDED
8555 #define _XOPEN_SOURCE_EXTENDED
8557 #include <${cf_cv_ncurses_header-curses.h}>
8559 $name['k'] = *WACS_PLUS
8562 if { (eval echo configure:8563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8564 cf_cv_curses_wacs_map=$name
8567 echo "configure: failed program was:" >&5
8568 cat conftest.$ac_ext >&5
8574 echo "$ac_t""$cf_cv_curses_wacs_map" 1>&6
8578 echo $ac_n "checking for type attr_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
8579 echo "configure:8580: checking for type attr_t in ${cf_cv_ncurses_header-curses.h}" >&5
8580 cat > conftest.$ac_ext <<EOF
8581 #line 8582 "configure"
8582 #include "confdefs.h"
8584 #ifndef _XOPEN_SOURCE_EXTENDED
8585 #define _XOPEN_SOURCE_EXTENDED
8587 #include <${cf_cv_ncurses_header-curses.h}>
8594 if { (eval echo configure:8595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8598 echo "configure: failed program was:" >&5
8599 cat conftest.$ac_ext >&5
8604 echo "$ac_t""$cf_result" 1>&6
8605 if test $cf_result = yes ; then
8607 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8609 cat >> confdefs.h <<EOF
8610 #define $cf_result 1
8614 cat >> confdefs.h <<EOF
8622 # This is needed on Tru64 5.0 to declare mbstate_t
8623 echo $ac_n "checking if we must include wchar.h to declare mbstate_t""... $ac_c" 1>&6
8624 echo "configure:8625: checking if we must include wchar.h to declare mbstate_t" >&5
8625 if eval "test \"`echo '$''{'cf_cv_mbstate_t'+set}'`\" = set"; then
8626 echo $ac_n "(cached) $ac_c" 1>&6
8629 cat > conftest.$ac_ext <<EOF
8630 #line 8631 "configure"
8631 #include "confdefs.h"
8636 #ifdef HAVE_LIBUTF8_H
8637 #include <libutf8.h>
8643 if { (eval echo configure:8644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8647 echo "configure: failed program was:" >&5
8648 cat conftest.$ac_ext >&5
8650 cat > conftest.$ac_ext <<EOF
8651 #line 8652 "configure"
8652 #include "confdefs.h"
8658 #ifdef HAVE_LIBUTF8_H
8659 #include <libutf8.h>
8665 if { (eval echo configure:8666: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8669 echo "configure: failed program was:" >&5
8670 cat conftest.$ac_ext >&5
8672 cf_cv_mbstate_t=unknown
8679 echo "$ac_t""$cf_cv_mbstate_t" 1>&6
8681 if test "$cf_cv_mbstate_t" = yes ; then
8682 cat >> confdefs.h <<\EOF
8683 #define NEED_WCHAR_H 1
8690 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
8691 if test "$cf_cv_mbstate_t" = unknown ; then
8696 # if we find mbstate_t in either place, use substitution to provide a fallback.
8697 if test "$cf_cv_mbstate_t" != unknown ; then
8698 NCURSES_OK_MBSTATE_T=1
8703 # This is needed on Tru64 5.0 to declare wchar_t
8704 echo $ac_n "checking if we must include wchar.h to declare wchar_t""... $ac_c" 1>&6
8705 echo "configure:8706: checking if we must include wchar.h to declare wchar_t" >&5
8706 if eval "test \"`echo '$''{'cf_cv_wchar_t'+set}'`\" = set"; then
8707 echo $ac_n "(cached) $ac_c" 1>&6
8710 cat > conftest.$ac_ext <<EOF
8711 #line 8712 "configure"
8712 #include "confdefs.h"
8717 #ifdef HAVE_LIBUTF8_H
8718 #include <libutf8.h>
8724 if { (eval echo configure:8725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8728 echo "configure: failed program was:" >&5
8729 cat conftest.$ac_ext >&5
8731 cat > conftest.$ac_ext <<EOF
8732 #line 8733 "configure"
8733 #include "confdefs.h"
8739 #ifdef HAVE_LIBUTF8_H
8740 #include <libutf8.h>
8746 if { (eval echo configure:8747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8750 echo "configure: failed program was:" >&5
8751 cat conftest.$ac_ext >&5
8753 cf_cv_wchar_t=unknown
8760 echo "$ac_t""$cf_cv_wchar_t" 1>&6
8762 if test "$cf_cv_wchar_t" = yes ; then
8763 cat >> confdefs.h <<\EOF
8764 #define NEED_WCHAR_H 1
8771 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8772 if test "$cf_cv_wchar_t" = unknown ; then
8777 # if we find wchar_t in either place, use substitution to provide a fallback.
8778 if test "$cf_cv_wchar_t" != unknown ; then
8779 NCURSES_OK_WCHAR_T=1
8784 # This is needed on Tru64 5.0 to declare wint_t
8785 echo $ac_n "checking if we must include wchar.h to declare wint_t""... $ac_c" 1>&6
8786 echo "configure:8787: checking if we must include wchar.h to declare wint_t" >&5
8787 if eval "test \"`echo '$''{'cf_cv_wint_t'+set}'`\" = set"; then
8788 echo $ac_n "(cached) $ac_c" 1>&6
8791 cat > conftest.$ac_ext <<EOF
8792 #line 8793 "configure"
8793 #include "confdefs.h"
8798 #ifdef HAVE_LIBUTF8_H
8799 #include <libutf8.h>
8805 if { (eval echo configure:8806: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8809 echo "configure: failed program was:" >&5
8810 cat conftest.$ac_ext >&5
8812 cat > conftest.$ac_ext <<EOF
8813 #line 8814 "configure"
8814 #include "confdefs.h"
8820 #ifdef HAVE_LIBUTF8_H
8821 #include <libutf8.h>
8827 if { (eval echo configure:8828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8831 echo "configure: failed program was:" >&5
8832 cat conftest.$ac_ext >&5
8834 cf_cv_wint_t=unknown
8841 echo "$ac_t""$cf_cv_wint_t" 1>&6
8843 if test "$cf_cv_wint_t" = yes ; then
8844 cat >> confdefs.h <<\EOF
8845 #define NEED_WCHAR_H 1
8852 # if we do not find wint_t in either place, use substitution to provide a fallback.
8853 if test "$cf_cv_wint_t" = unknown ; then
8858 # if we find wint_t in either place, use substitution to provide a fallback.
8859 if test "$cf_cv_wint_t" != unknown ; then
8865 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
8867 echo $ac_n "checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
8868 echo "configure:8869: checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}" >&5
8869 cat > conftest.$ac_ext <<EOF
8870 #line 8871 "configure"
8871 #include "confdefs.h"
8873 #ifndef _XOPEN_SOURCE_EXTENDED
8874 #define _XOPEN_SOURCE_EXTENDED
8876 #include <${cf_cv_ncurses_header-curses.h}>
8883 if { (eval echo configure:8884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8887 echo "configure: failed program was:" >&5
8888 cat conftest.$ac_ext >&5
8893 echo "$ac_t""$cf_result" 1>&6
8894 if test $cf_result = yes ; then
8896 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8898 cat >> confdefs.h <<EOF
8899 #define $cf_result 1
8903 cat >> confdefs.h <<EOF
8904 #define mbstate_t long
8911 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
8913 echo $ac_n "checking for type wchar_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
8914 echo "configure:8915: checking for type wchar_t in ${cf_cv_ncurses_header-curses.h}" >&5
8915 cat > conftest.$ac_ext <<EOF
8916 #line 8917 "configure"
8917 #include "confdefs.h"
8919 #ifndef _XOPEN_SOURCE_EXTENDED
8920 #define _XOPEN_SOURCE_EXTENDED
8922 #include <${cf_cv_ncurses_header-curses.h}>
8929 if { (eval echo configure:8930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8933 echo "configure: failed program was:" >&5
8934 cat conftest.$ac_ext >&5
8939 echo "$ac_t""$cf_result" 1>&6
8940 if test $cf_result = yes ; then
8942 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8944 cat >> confdefs.h <<EOF
8945 #define $cf_result 1
8949 cat >> confdefs.h <<EOF
8950 #define wchar_t long
8957 if test "$NCURSES_OK_WINT_T" = 0 ; then
8959 echo $ac_n "checking for type wint_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
8960 echo "configure:8961: checking for type wint_t in ${cf_cv_ncurses_header-curses.h}" >&5
8961 cat > conftest.$ac_ext <<EOF
8962 #line 8963 "configure"
8963 #include "confdefs.h"
8965 #ifndef _XOPEN_SOURCE_EXTENDED
8966 #define _XOPEN_SOURCE_EXTENDED
8968 #include <${cf_cv_ncurses_header-curses.h}>
8975 if { (eval echo configure:8976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8979 echo "configure: failed program was:" >&5
8980 cat conftest.$ac_ext >&5
8985 echo "$ac_t""$cf_result" 1>&6
8986 if test $cf_result = yes ; then
8988 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8990 cat >> confdefs.h <<EOF
8991 #define $cf_result 1
8995 cat >> confdefs.h <<EOF
9004 echo $ac_n "checking for data boolnames declaration in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
9005 echo "configure:9006: checking for data boolnames declaration in ${cf_cv_ncurses_header-curses.h}" >&5
9006 cat > conftest.$ac_ext <<EOF
9007 #line 9008 "configure"
9008 #include "confdefs.h"
9011 #include <xcurses.h>
9012 char * XCursesProgramName = "test";
9014 #include <${cf_cv_ncurses_header-curses.h}>
9015 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
9016 #include <ncursesw/term.h>
9017 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
9018 #include <ncurses/term.h>
9019 #elif defined(HAVE_TERM_H)
9026 void *foo = &(boolnames)
9030 if { (eval echo configure:9031: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9034 echo "configure: failed program was:" >&5
9035 cat conftest.$ac_ext >&5
9040 echo "$ac_t""$cf_result" 1>&6
9041 if test $cf_result = yes ; then
9043 cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9045 cat >> confdefs.h <<EOF
9046 #define $cf_result 1
9050 echo $ac_n "checking for data boolnames in library""... $ac_c" 1>&6
9051 echo "configure:9052: checking for data boolnames in library" >&5
9052 cat > conftest.$ac_ext <<EOF
9053 #line 9054 "configure"
9054 #include "confdefs.h"
9057 #include <xcurses.h>
9058 char * XCursesProgramName = "test";
9060 #include <${cf_cv_ncurses_header-curses.h}>
9061 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
9062 #include <ncursesw/term.h>
9063 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
9064 #include <ncurses/term.h>
9065 #elif defined(HAVE_TERM_H)
9070 extern char boolnames;
9074 void *foo = &(boolnames);
9075 ${cf_cv_main_return-return}(foo == 0);
9080 if { (eval echo configure:9081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9084 echo "configure: failed program was:" >&5
9085 cat conftest.$ac_ext >&5
9090 echo "$ac_t""$cf_result" 1>&6
9091 if test $cf_result = yes ; then
9093 cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9095 cat >> confdefs.h <<EOF
9096 #define $cf_result 1
9103 echo $ac_n "checking for data boolfnames declaration in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
9104 echo "configure:9105: checking for data boolfnames declaration in ${cf_cv_ncurses_header-curses.h}" >&5
9105 cat > conftest.$ac_ext <<EOF
9106 #line 9107 "configure"
9107 #include "confdefs.h"
9110 #include <xcurses.h>
9111 char * XCursesProgramName = "test";
9113 #include <${cf_cv_ncurses_header-curses.h}>
9114 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
9115 #include <ncursesw/term.h>
9116 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
9117 #include <ncurses/term.h>
9118 #elif defined(HAVE_TERM_H)
9125 void *foo = &(boolfnames)
9129 if { (eval echo configure:9130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9133 echo "configure: failed program was:" >&5
9134 cat conftest.$ac_ext >&5
9139 echo "$ac_t""$cf_result" 1>&6
9140 if test $cf_result = yes ; then
9142 cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9144 cat >> confdefs.h <<EOF
9145 #define $cf_result 1
9149 echo $ac_n "checking for data boolfnames in library""... $ac_c" 1>&6
9150 echo "configure:9151: checking for data boolfnames in library" >&5
9151 cat > conftest.$ac_ext <<EOF
9152 #line 9153 "configure"
9153 #include "confdefs.h"
9156 #include <xcurses.h>
9157 char * XCursesProgramName = "test";
9159 #include <${cf_cv_ncurses_header-curses.h}>
9160 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
9161 #include <ncursesw/term.h>
9162 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
9163 #include <ncurses/term.h>
9164 #elif defined(HAVE_TERM_H)
9169 extern char boolfnames;
9173 void *foo = &(boolfnames);
9174 ${cf_cv_main_return-return}(foo == 0);
9179 if { (eval echo configure:9180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9183 echo "configure: failed program was:" >&5
9184 cat conftest.$ac_ext >&5
9189 echo "$ac_t""$cf_result" 1>&6
9190 if test $cf_result = yes ; then
9192 cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9194 cat >> confdefs.h <<EOF
9195 #define $cf_result 1
9207 cat > confcache <<\EOF
9208 # This file is a shell script that caches the results of configure
9209 # tests run on this system so they can be shared between configure
9210 # scripts and configure runs. It is not useful on other systems.
9211 # If it contains results you don't want to keep, you may remove or edit it.
9213 # By default, configure uses ./config.cache as the cache file,
9214 # creating it if it does not exist already. You can give configure
9215 # the --cache-file=FILE option to use a different cache file; that is
9216 # what configure does when it calls configure scripts in
9217 # subdirectories, so they share the cache.
9218 # Giving --cache-file=/dev/null disables caching, for debugging configure.
9219 # config.status only pays attention to the cache file if you give it the
9220 # --recheck option to rerun configure.
9223 # The following way of writing the cache mishandles newlines in values,
9224 # but we know of no workaround that is simple, portable, and efficient.
9225 # So, don't put newlines in cache variables' values.
9226 # Ultrix sh set writes to stderr and can't be redirected directly,
9227 # and sets the high bit in the cache file unless we assign to the vars.
9229 case `(ac_space=' '; set | grep ac_space) 2>&1` in
9231 # `set' does not quote correctly, so add quotes (double-quote substitution
9232 # turns \\\\ into \\, and sed turns \\ into \).
9234 -e "s/'/'\\\\''/g" \
9235 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
9238 # `set' quotes correctly as required by POSIX, so do not add quotes.
9239 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
9242 if cmp -s $cache_file confcache; then
9245 if test -w $cache_file; then
9246 echo "updating cache $cache_file"
9247 cat confcache > $cache_file
9249 echo "not updating unwritable cache $cache_file"
9254 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
9256 test "x$prefix" = xNONE && prefix=$ac_default_prefix
9257 # Let make expand exec_prefix.
9258 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9260 # Any assignment to VPATH causes Sun make to only execute
9261 # the first set of double-colon rules, so remove it if not needed.
9262 # If there is a colon in the path, we need to keep it.
9263 if test "x$srcdir" = x.; then
9264 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
9267 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
9269 DEFS=-DHAVE_CONFIG_H
9271 # Without the "./", some shells look in PATH for config.status.
9272 : ${CONFIG_STATUS=./config.status}
9274 echo creating $CONFIG_STATUS
9275 rm -f $CONFIG_STATUS
9276 cat > $CONFIG_STATUS <<EOF
9278 # Generated automatically by configure.
9279 # Run this file to recreate the current configuration.
9280 # This directory was configured as follows,
9281 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
9283 # $0 $ac_configure_args
9285 # Compiler output produced by configure, useful for debugging
9286 # configure, is in ./config.log if it exists.
9288 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
9291 case "\$ac_option" in
9292 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9293 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
9294 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
9295 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
9296 echo "$CONFIG_STATUS generated by autoconf version 2.13.20030927"
9298 -help | --help | --hel | --he | --h)
9299 echo "\$ac_cs_usage"; exit 0 ;;
9300 *) echo "\$ac_cs_usage"; exit 1 ;;
9304 ac_given_srcdir=$srcdir
9306 trap 'rm -fr `echo "Makefile ncurses_cfg.h:ncurses_tst.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
9308 cat >> $CONFIG_STATUS <<EOF
9310 # Protect against being on the right side of a sed subst in config.status.
9311 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
9312 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
9316 s%@CFLAGS@%$CFLAGS%g
9317 s%@CPPFLAGS@%$CPPFLAGS%g
9318 s%@CXXFLAGS@%$CXXFLAGS%g
9319 s%@FFLAGS@%$FFLAGS%g
9321 s%@LDFLAGS@%$LDFLAGS%g
9323 s%@exec_prefix@%$exec_prefix%g
9324 s%@prefix@%$prefix%g
9325 s%@program_transform_name@%$program_transform_name%g
9326 s%@bindir@%$bindir%g
9327 s%@sbindir@%$sbindir%g
9328 s%@libexecdir@%$libexecdir%g
9329 s%@datadir@%$datadir%g
9330 s%@sysconfdir@%$sysconfdir%g
9331 s%@sharedstatedir@%$sharedstatedir%g
9332 s%@localstatedir@%$localstatedir%g
9333 s%@libdir@%$libdir%g
9334 s%@includedir@%$includedir%g
9335 s%@oldincludedir@%$oldincludedir%g
9336 s%@infodir@%$infodir%g
9337 s%@mandir@%$mandir%g
9339 s%@host_alias@%$host_alias%g
9340 s%@host_cpu@%$host_cpu%g
9341 s%@host_vendor@%$host_vendor%g
9342 s%@host_os@%$host_os%g
9343 s%@SET_MAKE@%$SET_MAKE%g
9347 s%@CC_G_OPT@%$CC_G_OPT%g
9348 s%@CC_SHARED_OPTS@%$CC_SHARED_OPTS%g
9349 s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g
9350 s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g
9351 s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
9353 s%@LDFLAGS_SHARED@%$LDFLAGS_SHARED%g
9354 s%@LDFLAGS_STATIC@%$LDFLAGS_STATIC%g
9355 s%@LD_MODEL@%$LD_MODEL%g
9356 s%@LD_SHARED_OPTS@%$LD_SHARED_OPTS%g
9357 s%@LIBTOOL@%$LIBTOOL%g
9358 s%@LIB_CLEAN@%$LIB_CLEAN%g
9359 s%@LIB_COMPILE@%$LIB_COMPILE%g
9360 s%@LIB_LINK@%$LIB_LINK%g
9361 s%@LINK_TESTS@%$LINK_TESTS%g
9363 s%@LINT_OPTS@%$LINT_OPTS%g
9364 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
9365 s%@MATH_LIB@%$MATH_LIB%g
9366 s%@PTHREAD@%$PTHREAD%g
9367 s%@TEST_ARGS@%$TEST_ARGS%g
9368 s%@TEST_DEPS@%$TEST_DEPS%g
9369 s%@TEST_LIBS@%$TEST_LIBS%g
9370 s%@TINFO_ARGS@%$TINFO_ARGS%g
9371 s%@cf_cv_abi_version@%$cf_cv_abi_version%g
9372 s%@cf_cv_rel_version@%$cf_cv_rel_version%g
9373 s%@EXEEXT@%$EXEEXT%g
9374 s%@OBJEXT@%$OBJEXT%g
9375 s%@EXTRA_CPPFLAGS@%$EXTRA_CPPFLAGS%g
9376 s%@ECHO_LT@%$ECHO_LT%g
9377 s%@ECHO_LD@%$ECHO_LD%g
9378 s%@RULE_CC@%$RULE_CC%g
9379 s%@SHOW_CC@%$SHOW_CC%g
9380 s%@ECHO_CC@%$ECHO_CC%g
9381 s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
9382 s%@NCURSES_CONFIG@%$NCURSES_CONFIG%g
9383 s%@X_CFLAGS@%$X_CFLAGS%g
9384 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
9385 s%@X_LIBS@%$X_LIBS%g
9386 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
9387 s%@XCURSES_CONFIG@%$XCURSES_CONFIG%g
9388 s%@NCURSES_WRAP_PREFIX@%$NCURSES_WRAP_PREFIX%g
9393 cat >> $CONFIG_STATUS <<\EOF
9395 # Split the substitutions into bite-sized pieces for seds with
9396 # small command number limits, like on Digital OSF/1 and HP-UX.
9397 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
9398 ac_file=1 # Number of current file.
9399 ac_beg=1 # First line for current file.
9400 ac_end=$ac_max_sed_cmds # Line after last line for current file.
9403 while $ac_more_lines; do
9404 if test $ac_beg -gt 1; then
9405 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
9407 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
9409 if test ! -s conftest.s$ac_file; then
9411 rm -f conftest.s$ac_file
9413 if test -z "$ac_sed_cmds"; then
9414 ac_sed_cmds="sed -f conftest.s$ac_file"
9416 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
9418 ac_file=`expr $ac_file + 1`
9420 ac_end=`expr $ac_end + $ac_max_sed_cmds`
9423 if test -z "$ac_sed_cmds"; then
9428 cat >> $CONFIG_STATUS <<EOF
9430 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
9432 cat >> $CONFIG_STATUS <<\EOF
9433 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
9434 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9436 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9437 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9438 *) ac_file_in="${ac_file}.in" ;;
9441 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
9443 # Remove last slash and all that follows it. Not all systems have dirname.
9444 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9445 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9446 # The file is in a subdirectory.
9447 test ! -d "$ac_dir" && mkdir "$ac_dir"
9448 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
9449 # A "../" for each directory in $ac_dir_suffix.
9450 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
9452 ac_dir_suffix= ac_dots=
9455 case "$ac_given_srcdir" in
9457 if test -z "$ac_dots"; then top_srcdir=.
9458 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
9459 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
9461 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
9462 top_srcdir="$ac_dots$ac_given_srcdir" ;;
9466 echo creating "$ac_file"
9468 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
9470 *Makefile*) ac_comsub="1i\\
9471 # $configure_input" ;;
9475 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9477 s%@configure_input@%$configure_input%g
9478 s%@srcdir@%$srcdir%g
9479 s%@top_srcdir@%$top_srcdir%g
9480 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
9484 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
9485 # NAME is the cpp macro being defined and VALUE is the value it is being given.
9487 # ac_d sets the value in "#define NAME VALUE" lines.
9488 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
9489 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
9492 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
9493 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9494 ac_uB='\([ ]\)%\1#\2define\3'
9497 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
9498 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
9499 ac_eB='$%\1#\2define\3'
9503 if test "${CONFIG_HEADERS+set}" != set; then
9505 cat >> $CONFIG_STATUS <<EOF
9506 CONFIG_HEADERS="ncurses_cfg.h:ncurses_tst.hin"
9508 cat >> $CONFIG_STATUS <<\EOF
9510 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
9511 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
9513 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
9514 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
9515 *) ac_file_in="${ac_file}.in" ;;
9518 echo creating $ac_file
9520 rm -f conftest.frag conftest.in conftest.out
9521 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
9522 cat $ac_file_inputs > conftest.in
9527 # Transform confdefs.h into a list of #define's. We won't use it as a sed
9528 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
9529 # be either 'cat' or 'sort'.
9530 cat confdefs.h >conftest.vals
9532 # Break up conftest.vals because some shells have a limit on
9533 # the size of here documents, and old seds have small limits too.
9536 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
9539 ac_lines=`grep -c . conftest.vals`
9540 # grep -c gives empty output for an empty file on some AIX systems.
9541 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
9542 # Write chunks of a limited-size here document to conftest.frag.
9543 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
9544 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
9545 echo 'CEOF' >> $CONFIG_STATUS
9546 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
9548 mv conftest.tail conftest.vals
9552 # Run sed to substitute the contents of conftest.frag into conftest.in at the
9554 echo ' cat >> conftest.edit <<CEOF
9555 /@DEFS@/r conftest.frag
9558 sed -f conftest.edit conftest.in > conftest.out
9560 mv conftest.out conftest.in
9561 rm -f conftest.edit conftest.frag
9565 cat >> $CONFIG_STATUS <<\EOF
9566 rm -f conftest.frag conftest.h
9567 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
9568 cat conftest.in >> conftest.h
9570 if cmp -s $ac_file conftest.h 2>/dev/null; then
9571 echo "$ac_file is unchanged"
9574 # Remove last slash and all that follows it. Not all systems have dirname.
9575 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
9576 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
9577 # The file is in a subdirectory.
9578 test ! -d "$ac_dir" && mkdir "$ac_dir"
9581 mv conftest.h $ac_file
9586 cat >> $CONFIG_STATUS <<EOF
9587 # Extra initialization commands, if any
9593 cat >> $CONFIG_STATUS <<\EOF
9594 # Extra commands, if any
9599 if test ! -d $srcdir/$cf_dir; then
9601 elif test -f $srcdir/$cf_dir/programs; then
9602 $AWK -f $srcdir/mk-test.awk ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
9607 cat >>Makefile <<TEST_EOF
9609 # These rules are generated so we do not rely on suffix rules, which do not
9610 # work consistently for different make-programs (the '\$(MODEL)/' confuses
9611 # some, and the '\$x' confuses others).
9613 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
9616 cat >>Makefile <<TEST_EOF
9618 \$(MODEL)/$N.o : $N.c \\
9621 @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) $N.c
9627 chmod +x $CONFIG_STATUS
9628 rm -fr confdefs* $ac_clean_files
9629 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1