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"
1726 CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
1728 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
1730 echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
1731 echo "configure:1732: checking if we must define _GNU_SOURCE" >&5
1732 if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
1733 echo $ac_n "(cached) $ac_c" 1>&6
1736 cat > conftest.$ac_ext <<EOF
1737 #line 1738 "configure"
1738 #include "confdefs.h"
1739 #include <sys/types.h>
1742 #ifndef _XOPEN_SOURCE
1747 if { (eval echo configure:1748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1751 echo "configure: failed program was:" >&5
1752 cat conftest.$ac_ext >&5
1755 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1756 cat > conftest.$ac_ext <<EOF
1757 #line 1758 "configure"
1758 #include "confdefs.h"
1759 #include <sys/types.h>
1762 #ifdef _XOPEN_SOURCE
1767 if { (eval echo configure:1768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1771 echo "configure: failed program was:" >&5
1772 cat conftest.$ac_ext >&5
1774 cf_cv_gnu_source=yes
1784 echo "$ac_t""$cf_cv_gnu_source" 1>&6
1785 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1789 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
1792 # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
1795 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
1798 CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
1801 CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
1804 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
1807 CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
1810 echo $ac_n "checking if we should define _XOPEN_SOURCE""... $ac_c" 1>&6
1811 echo "configure:1812: checking if we should define _XOPEN_SOURCE" >&5
1812 if eval "test \"`echo '$''{'cf_cv_xopen_source'+set}'`\" = set"; then
1813 echo $ac_n "(cached) $ac_c" 1>&6
1816 cat > conftest.$ac_ext <<EOF
1817 #line 1818 "configure"
1818 #include "confdefs.h"
1819 #include <sys/types.h>
1822 #ifndef _XOPEN_SOURCE
1827 if { (eval echo configure:1828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1829 cf_cv_xopen_source=no
1831 echo "configure: failed program was:" >&5
1832 cat conftest.$ac_ext >&5
1835 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1836 cat > conftest.$ac_ext <<EOF
1837 #line 1838 "configure"
1838 #include "confdefs.h"
1839 #include <sys/types.h>
1842 #ifdef _XOPEN_SOURCE
1847 if { (eval echo configure:1848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1849 cf_cv_xopen_source=no
1851 echo "configure: failed program was:" >&5
1852 cat conftest.$ac_ext >&5
1854 cf_cv_xopen_source=$cf_XOPEN_SOURCE
1864 echo "$ac_t""$cf_cv_xopen_source" 1>&6
1865 if test "$cf_cv_xopen_source" != no ; then
1867 # remove _XOPEN_SOURCE symbol from $CFLAGS
1868 CFLAGS=`echo "$CFLAGS" | \
1869 sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
1870 -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
1873 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
1874 CPPFLAGS=`echo "$CPPFLAGS" | \
1875 sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
1876 -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
1878 test "$cf_cv_cc_u_d_options" = yes && \
1879 CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
1880 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
1883 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
1885 cf_save_CFLAGS="$CFLAGS"
1886 cf_save_CPPFLAGS="$CPPFLAGS"
1889 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
1890 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
1891 sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
1892 -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
1895 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
1896 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
1897 sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
1898 -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
1901 echo $ac_n "checking if we should define _POSIX_C_SOURCE""... $ac_c" 1>&6
1902 echo "configure:1903: checking if we should define _POSIX_C_SOURCE" >&5
1903 if eval "test \"`echo '$''{'cf_cv_posix_c_source'+set}'`\" = set"; then
1904 echo $ac_n "(cached) $ac_c" 1>&6
1908 echo "${as_me-configure}:1909: testing if the symbol is already defined go no further ..." 1>&5
1910 cat > conftest.$ac_ext <<EOF
1911 #line 1912 "configure"
1912 #include "confdefs.h"
1913 #include <sys/types.h>
1916 #ifndef _POSIX_C_SOURCE
1921 if { (eval echo configure:1922: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1923 cf_cv_posix_c_source=no
1925 echo "configure: failed program was:" >&5
1926 cat conftest.$ac_ext >&5
1928 cf_want_posix_source=no
1929 case .$cf_POSIX_C_SOURCE in #(vi
1931 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
1934 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
1935 cf_want_posix_source=yes
1938 cf_want_posix_source=yes
1941 if test "$cf_want_posix_source" = yes ; then
1942 cat > conftest.$ac_ext <<EOF
1943 #line 1944 "configure"
1944 #include "confdefs.h"
1945 #include <sys/types.h>
1948 #ifdef _POSIX_SOURCE
1953 if { (eval echo configure:1954: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1956 echo "configure: failed program was:" >&5
1957 cat conftest.$ac_ext >&5
1959 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
1964 echo "${as_me-configure}:1965: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
1966 CFLAGS="$cf_trim_CFLAGS"
1967 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
1969 echo "${as_me-configure}:1970: testing if the second compile does not leave our definition intact error ..." 1>&5
1971 cat > conftest.$ac_ext <<EOF
1972 #line 1973 "configure"
1973 #include "confdefs.h"
1974 #include <sys/types.h>
1977 #ifndef _POSIX_C_SOURCE
1982 if { (eval echo configure:1983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1985 echo "configure: failed program was:" >&5
1986 cat conftest.$ac_ext >&5
1988 cf_cv_posix_c_source=no
1991 CFLAGS="$cf_save_CFLAGS"
1992 CPPFLAGS="$cf_save_CPPFLAGS"
1999 echo "$ac_t""$cf_cv_posix_c_source" 1>&6
2001 if test "$cf_cv_posix_c_source" != no ; then
2002 CFLAGS="$cf_trim_CFLAGS"
2003 CPPFLAGS="$cf_trim_CPPFLAGS"
2004 if test "$cf_cv_cc_u_d_options" = yes ; then
2005 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
2006 sed -e 's/-D/-U/g' -e 's/=[^ ]*//g'`
2007 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
2009 CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
2016 echo $ac_n "checking for working const""... $ac_c" 1>&6
2017 echo "configure:2018: checking for working const" >&5
2018 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2019 echo $ac_n "(cached) $ac_c" 1>&6
2021 cat > conftest.$ac_ext <<EOF
2022 #line 2023 "configure"
2023 #include "confdefs.h"
2027 /* Ultrix mips cc rejects this. */
2028 typedef int charset[2]; const charset x;
2029 /* SunOS 4.1.1 cc rejects this. */
2030 char const *const *ccp;
2032 /* NEC SVR4.0.2 mips cc rejects this. */
2033 struct point {int x, y;};
2034 static struct point const zero = {0,0};
2035 /* AIX XL C 1.02.0.0 rejects this.
2036 It does not let you subtract one const X* pointer from another in an arm
2037 of an if-expression whose if-part is not a constant expression */
2038 const char *g = "string";
2039 ccp = &g + (g ? g-g : 0);
2040 /* HPUX 7.0 cc rejects these. */
2043 ccp = (char const *const *) p;
2044 { /* SCO 3.2v4 cc rejects this. */
2046 char const *s = 0 ? (char *) 0 : (char const *) 0;
2050 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2052 const int *foo = &x[0];
2055 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2056 typedef const int *iptr;
2060 { /* AIX XL C 1.02.0.0 rejects this saying
2061 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2062 struct s { int j; const int *ap[3]; };
2063 struct s *b; b->j = 5;
2065 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2071 if { (eval echo configure:2072: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2075 echo "configure: failed program was:" >&5
2076 cat conftest.$ac_ext >&5
2083 echo "$ac_t""$ac_cv_c_const" 1>&6
2084 if test $ac_cv_c_const = no; then
2085 cat >> confdefs.h <<\EOF
2092 echo $ac_n "checking for signal global datatype""... $ac_c" 1>&6
2093 echo "configure:2094: checking for signal global datatype" >&5
2094 if eval "test \"`echo '$''{'cf_cv_sig_atomic_t'+set}'`\" = set"; then
2095 echo $ac_n "(cached) $ac_c" 1>&6
2099 "volatile sig_atomic_t" \
2103 cat > conftest.$ac_ext <<EOF
2104 #line 2105 "configure"
2105 #include "confdefs.h"
2107 #include <sys/types.h>
2113 static void handler(int sig)
2118 signal(SIGINT, handler);
2122 if { (eval echo configure:2123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2124 cf_cv_sig_atomic_t=$cf_type
2126 echo "configure: failed program was:" >&5
2127 cat conftest.$ac_ext >&5
2129 cf_cv_sig_atomic_t=no
2132 test "$cf_cv_sig_atomic_t" != no && break
2137 echo "$ac_t""$cf_cv_sig_atomic_t" 1>&6
2138 test "$cf_cv_sig_atomic_t" != no && cat >> confdefs.h <<EOF
2139 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
2145 echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6
2146 echo "configure:2147: checking if you want to see long compiling messages" >&5
2148 # Check whether --enable-echo or --disable-echo was given.
2149 if test "${enable_echo+set}" = set; then
2150 enableval="$enable_echo"
2151 test "$enableval" != no && enableval=yes
2152 if test "$enableval" != "yes" ; then
2155 ECHO_LD='@echo linking $@;'
2156 RULE_CC=' @echo compiling $<'
2157 SHOW_CC=' @echo compiling $@'
2164 RULE_CC='# compiling'
2165 SHOW_CC='# compiling'
2174 RULE_CC='# compiling'
2175 SHOW_CC='# compiling'
2181 echo "$ac_t""$enableval" 1>&6
2191 if test "$GCC" = yes ; then
2192 echo $ac_n "checking version of $CC""... $ac_c" 1>&6
2193 echo "configure:2194: checking version of $CC" >&5
2194 GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2195 test -z "$GCC_VERSION" && GCC_VERSION=unknown
2196 echo "$ac_t""$GCC_VERSION" 1>&6
2200 if ( test "$GCC" = yes || test "$GXX" = yes )
2202 echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
2203 echo "configure:2204: checking if you want to turn on gcc warnings" >&5
2205 # Check whether --enable-warnings or --disable-warnings was given.
2206 if test "${enable_warnings+set}" = set; then
2207 enableval="$enable_warnings"
2208 test "$enableval" != yes && enableval=no
2209 if test "$enableval" != "no" ; then
2220 echo "$ac_t""$with_warnings" 1>&6
2221 if test "$with_warnings" = "yes"
2228 if test "$GCC" = yes ; then
2231 echo $ac_n "checking if this is really Intel C compiler""... $ac_c" 1>&6
2232 echo "configure:2233: checking if this is really Intel C compiler" >&5
2233 cf_save_CFLAGS="$CFLAGS"
2234 CFLAGS="$CFLAGS -no-gcc"
2235 cat > conftest.$ac_ext <<EOF
2236 #line 2237 "configure"
2237 #include "confdefs.h"
2241 #ifdef __INTEL_COMPILER
2248 if { (eval echo configure:2249: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2251 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
2254 echo "configure: failed program was:" >&5
2255 cat conftest.$ac_ext >&5
2258 CFLAGS="$cf_save_CFLAGS"
2259 echo "$ac_t""$INTEL_COMPILER" 1>&6
2265 cat > conftest.$ac_ext <<EOF
2266 #line 2267 "${as_me-configure}"
2267 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
2270 if test "$INTEL_COMPILER" = yes
2272 # The "-wdXXX" options suppress warnings:
2273 # remark #1419: external declaration in primary source file
2274 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
2275 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
2276 # remark #193: zero used for undefined preprocessing identifier
2277 # remark #593: variable "curs_sb_left_arrow" was set but never used
2278 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
2279 # remark #869: parameter "tw" was never referenced
2280 # remark #981: operands are evaluated in unspecified order
2281 # warning #279: controlling expression is constant
2283 echo "checking for $CC warning options" 1>&6
2284 echo "configure:2285: checking for $CC warning options" >&5
2285 cf_save_CFLAGS="$CFLAGS"
2286 EXTRA_CFLAGS="-Wall"
2298 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
2299 if { (eval echo configure:2300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2300 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
2301 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
2304 CFLAGS="$cf_save_CFLAGS"
2306 elif test "$GCC" = yes
2308 echo "checking for $CC warning options" 1>&6
2309 echo "configure:2310: checking for $CC warning options" >&5
2310 cf_save_CFLAGS="$CFLAGS"
2311 EXTRA_CFLAGS="-W -Wall"
2313 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
2315 Wbad-function-cast \
2319 Wmissing-declarations \
2320 Wmissing-prototypes \
2324 Wstrict-prototypes \
2325 Wundef $cf_warn_CONST
2327 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
2328 if { (eval echo configure:2329: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2329 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
2330 case $cf_opt in #(vi
2332 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
2335 case $GCC_VERSION in
2337 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
2339 echo "${as_me-configure}:2340: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
2346 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
2349 CFLAGS="$cf_save_CFLAGS"
2361 # Check whether --with-curses-dir or --without-curses-dir was given.
2362 if test "${with_curses_dir+set}" = set; then
2363 withval="$with_curses_dir"
2365 if test "x$prefix" != xNONE; then
2366 cf_path_syntax="$prefix"
2368 cf_path_syntax="$ac_default_prefix"
2371 case ".$withval" in #(vi
2372 .\$\(*\)*|.\'*\'*) #(vi
2376 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2379 eval withval="$withval"
2380 case ".$withval" in #(vi
2382 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2387 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2390 { echo "configure: error: expected a pathname, not \"$withval\"" 1>&2; exit 1; }
2394 cf_cv_curses_dir=$withval
2402 # Check whether --with-5lib or --without-5lib was given.
2403 if test "${with_5lib+set}" = set; then
2404 withval="$with_5lib"
2405 LIBS="-L/usr/5lib $LIBS"
2406 CPPFLAGS="$CPPFLAGS -I/usr/5include"
2411 # Check whether --with-ncursesw or --without-ncursesw was given.
2412 if test "${with_ncursesw+set}" = set; then
2413 withval="$with_ncursesw"
2414 cf_cv_screen=ncursesw
2419 # Check whether --with-ncurses or --without-ncurses was given.
2420 if test "${with_ncurses+set}" = set; then
2421 withval="$with_ncurses"
2422 cf_cv_screen=ncurses
2427 # Check whether --with-pdcurses or --without-pdcurses was given.
2428 if test "${with_pdcurses+set}" = set; then
2429 withval="$with_pdcurses"
2430 cf_cv_screen=pdcurses
2438 case $cf_cv_screen in
2442 echo $ac_n "checking for extra include directories""... $ac_c" 1>&6
2443 echo "configure:2444: checking for extra include directories" >&5
2444 if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then
2445 echo $ac_n "(cached) $ac_c" 1>&6
2448 cf_cv_curses_incdir=no
2449 case $host_os in #(vi
2451 test -d /usr/include/curses_colr && \
2452 cf_cv_curses_incdir="-I/usr/include/curses_colr"
2455 test -d /usr/5lib && \
2456 test -d /usr/5include && \
2457 cf_cv_curses_incdir="-I/usr/5include"
2463 echo "$ac_t""$cf_cv_curses_incdir" 1>&6
2464 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
2467 echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
2468 echo "configure:2469: checking if we have identified curses headers" >&5
2469 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
2470 echo $ac_n "(cached) $ac_c" 1>&6
2473 cf_cv_ncurses_header=none
2480 cat > conftest.$ac_ext <<EOF
2481 #line 2482 "configure"
2482 #include "confdefs.h"
2483 #include <${cf_header}>
2485 initscr(); tgoto("?", 0,0)
2488 if { (eval echo configure:2489: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2490 cf_cv_ncurses_header=$cf_header; break
2492 echo "configure: failed program was:" >&5
2493 cat conftest.$ac_ext >&5
2500 echo "$ac_t""$cf_cv_ncurses_header" 1>&6
2502 if test "$cf_cv_ncurses_header" = none ; then
2503 { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
2506 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
2507 for ac_hdr in $cf_cv_ncurses_header
2509 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2510 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2511 echo "configure:2512: checking for $ac_hdr" >&5
2512 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2513 echo $ac_n "(cached) $ac_c" 1>&6
2515 cat > conftest.$ac_ext <<EOF
2516 #line 2517 "configure"
2517 #include "confdefs.h"
2520 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2521 { (eval echo configure:2522: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2522 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2523 if test -z "$ac_err"; then
2525 eval "ac_cv_header_$ac_safe=yes"
2528 echo "configure: failed program was:" >&5
2529 cat conftest.$ac_ext >&5
2531 eval "ac_cv_header_$ac_safe=no"
2535 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2536 echo "$ac_t""yes" 1>&6
2537 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2538 cat >> confdefs.h <<EOF
2539 #define $ac_tr_hdr 1
2543 echo "$ac_t""no" 1>&6
2549 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
2550 echo "configure:2551: checking for terminfo header" >&5
2551 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
2552 echo $ac_n "(cached) $ac_c" 1>&6
2555 case ${cf_cv_ncurses_header} in #(vi
2556 */ncurses.h|*/ncursesw.h) #(vi
2557 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
2560 cf_term_header=term.h
2564 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
2566 cat > conftest.$ac_ext <<EOF
2567 #line 2568 "configure"
2568 #include "confdefs.h"
2570 #include <${cf_cv_ncurses_header-curses.h}>
2574 int x = auto_left_margin
2577 if { (eval echo configure:2578: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2580 cf_cv_term_header="$cf_test"
2582 echo "configure: failed program was:" >&5
2583 cat conftest.$ac_ext >&5
2586 cf_cv_term_header=unknown
2590 test "$cf_cv_term_header" != unknown && break
2595 echo "$ac_t""$cf_cv_term_header" 1>&6
2597 # Set definitions to allow ifdef'ing to accommodate subdirectories
2599 case $cf_cv_term_header in # (vi
2601 cat >> confdefs.h <<\EOF
2602 #define HAVE_TERM_H 1
2608 case $cf_cv_term_header in # (vi
2609 ncurses/term.h) #(vi
2610 cat >> confdefs.h <<\EOF
2611 #define HAVE_NCURSES_TERM_H 1
2616 cat >> confdefs.h <<\EOF
2617 #define HAVE_NCURSESW_TERM_H 1
2625 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
2626 echo "configure:2627: checking for ncurses version" >&5
2627 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
2628 echo $ac_n "(cached) $ac_c" 1>&6
2631 cf_cv_ncurses_version=no
2634 if test "$cross_compiling" = yes; then
2637 # This will not work if the preprocessor splits the line after the
2638 # Autoconf token. The 'unproto' program does that.
2639 cat > conftest.$ac_ext <<EOF
2640 #include <${cf_cv_ncurses_header-curses.h}>
2642 #ifdef NCURSES_VERSION
2643 Autoconf NCURSES_VERSION
2651 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
2652 { (eval echo configure:2653: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
2653 if test -f conftest.out ; then
2654 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
2655 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
2660 cat > conftest.$ac_ext <<EOF
2661 #line 2662 "configure"
2662 #include "confdefs.h"
2664 #include <${cf_cv_ncurses_header-curses.h}>
2668 FILE *fp = fopen("$cf_tempfile", "w");
2669 #ifdef NCURSES_VERSION
2670 # ifdef NCURSES_VERSION_PATCH
2671 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
2673 fprintf(fp, "%s\n", NCURSES_VERSION);
2677 fprintf(fp, "old\n");
2682 ${cf_cv_main_return-return}(0);
2685 if { (eval echo configure:2686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2688 cf_cv_ncurses_version=`cat $cf_tempfile`
2690 echo "configure: failed program was:" >&5
2691 cat conftest.$ac_ext >&5
2700 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
2701 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
2708 echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
2709 echo "configure:2710: checking if we have identified curses libraries" >&5
2710 cat > conftest.$ac_ext <<EOF
2711 #line 2712 "configure"
2712 #include "confdefs.h"
2713 #include <${cf_cv_ncurses_header-curses.h}>
2715 initscr(); tgoto("?", 0,0)
2718 if { (eval echo configure:2719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2722 echo "configure: failed program was:" >&5
2723 cat conftest.$ac_ext >&5
2728 echo "$ac_t""$cf_result" 1>&6
2730 if test "$cf_result" = no ; then
2731 case $host_os in #(vi
2733 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
2734 echo "configure:2735: checking for tgoto in -lmytinfo" >&5
2735 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
2736 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2737 echo $ac_n "(cached) $ac_c" 1>&6
2739 ac_save_LIBS="$LIBS"
2740 LIBS="-lmytinfo $LIBS"
2741 cat > conftest.$ac_ext <<EOF
2742 #line 2743 "configure"
2743 #include "confdefs.h"
2744 /* Override any gcc2 internal prototype to avoid an error. */
2745 /* We use char because int might match the return type of a gcc2
2746 builtin and then its argument prototype would still apply. */
2753 if { (eval echo configure:2754: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2755 eval "ac_cv_lib_$ac_lib_var=yes"
2757 echo "configure: failed program was:" >&5
2758 cat conftest.$ac_ext >&5
2760 eval "ac_cv_lib_$ac_lib_var=no"
2763 LIBS="$ac_save_LIBS"
2766 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2767 echo "$ac_t""yes" 1>&6
2768 LIBS="-lmytinfo $LIBS"
2770 echo "$ac_t""no" 1>&6
2775 echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
2776 echo "configure:2777: checking for initscr in -lcur_colr" >&5
2777 ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
2778 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2779 echo $ac_n "(cached) $ac_c" 1>&6
2781 ac_save_LIBS="$LIBS"
2782 LIBS="-lcur_colr $LIBS"
2783 cat > conftest.$ac_ext <<EOF
2784 #line 2785 "configure"
2785 #include "confdefs.h"
2786 /* Override any gcc2 internal prototype to avoid an error. */
2787 /* We use char because int might match the return type of a gcc2
2788 builtin and then its argument prototype would still apply. */
2795 if { (eval echo configure:2796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2797 eval "ac_cv_lib_$ac_lib_var=yes"
2799 echo "configure: failed program was:" >&5
2800 cat conftest.$ac_ext >&5
2802 eval "ac_cv_lib_$ac_lib_var=no"
2805 LIBS="$ac_save_LIBS"
2808 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2809 echo "$ac_t""yes" 1>&6
2811 LIBS="-lcur_colr $LIBS"
2812 ac_cv_func_initscr=yes
2815 echo "$ac_t""no" 1>&6
2817 echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
2818 echo "configure:2819: checking for initscr in -lHcurses" >&5
2819 ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
2820 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2821 echo $ac_n "(cached) $ac_c" 1>&6
2823 ac_save_LIBS="$LIBS"
2824 LIBS="-lHcurses $LIBS"
2825 cat > conftest.$ac_ext <<EOF
2826 #line 2827 "configure"
2827 #include "confdefs.h"
2828 /* Override any gcc2 internal prototype to avoid an error. */
2829 /* We use char because int might match the return type of a gcc2
2830 builtin and then its argument prototype would still apply. */
2837 if { (eval echo configure:2838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2839 eval "ac_cv_lib_$ac_lib_var=yes"
2841 echo "configure: failed program was:" >&5
2842 cat conftest.$ac_ext >&5
2844 eval "ac_cv_lib_$ac_lib_var=no"
2847 LIBS="$ac_save_LIBS"
2850 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2851 echo "$ac_t""yes" 1>&6
2853 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
2854 LIBS="-lHcurses $LIBS"
2855 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
2856 ac_cv_func_initscr=yes
2859 echo "$ac_t""no" 1>&6
2865 linux*) # Suse Linux does not follow /usr/lib convention
2867 if test -n "/lib" ; then
2868 for cf_add_libdir in /lib
2870 if test $cf_add_libdir = /usr/lib ; then
2872 elif test -d $cf_add_libdir
2875 if test -n "$LDFLAGS$LIBS" ; then
2876 # a loop is needed to ensure we can add subdirs of existing dirs
2877 for cf_test_libdir in $LDFLAGS $LIBS ; do
2878 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
2879 cf_have_libdir=yes; break
2883 if test "$cf_have_libdir" = no ; then
2884 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
2886 echo "${as_me-configure}:2887: testing adding $cf_add_libdir to library-path ..." 1>&5
2889 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
2897 if test -d /usr/5lib ; then
2899 if test -n "/usr/5lib" ; then
2900 for cf_add_libdir in /usr/5lib
2902 if test $cf_add_libdir = /usr/lib ; then
2904 elif test -d $cf_add_libdir
2907 if test -n "$LDFLAGS$LIBS" ; then
2908 # a loop is needed to ensure we can add subdirs of existing dirs
2909 for cf_test_libdir in $LDFLAGS $LIBS ; do
2910 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
2911 cf_have_libdir=yes; break
2915 if test "$cf_have_libdir" = no ; then
2916 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
2918 echo "${as_me-configure}:2919: testing adding $cf_add_libdir to library-path ..." 1>&5
2921 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
2927 LIBS="$LIBS -lcurses -ltermcap"
2929 ac_cv_func_initscr=yes
2933 if test ".$ac_cv_func_initscr" != .yes ; then
2934 cf_save_LIBS="$LIBS"
2938 if test ".${cf_cv_ncurses_version-no}" != .no
2940 cf_check_list="ncurses curses cursesX"
2942 cf_check_list="cursesX curses ncurses"
2945 # Check for library containing tgoto. Do this before curses library
2946 # because it may be needed to link the test-case for initscr.
2947 echo $ac_n "checking for tgoto""... $ac_c" 1>&6
2948 echo "configure:2949: checking for tgoto" >&5
2949 if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
2950 echo $ac_n "(cached) $ac_c" 1>&6
2952 cat > conftest.$ac_ext <<EOF
2953 #line 2954 "configure"
2954 #include "confdefs.h"
2955 /* System header to define __stub macros and hopefully few prototypes,
2956 which can conflict with char tgoto(); below. */
2958 /* Override any gcc2 internal prototype to avoid an error. */
2959 /* We use char because int might match the return type of a gcc2
2960 builtin and then its argument prototype would still apply. */
2965 /* The GNU C library defines this for functions which it implements
2966 to always fail with ENOSYS. Some functions are actually named
2967 something starting with __ and the normal name is an alias. */
2968 #if defined (__stub_tgoto) || defined (__stub___tgoto)
2976 if { (eval echo configure:2977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2978 eval "ac_cv_func_tgoto=yes"
2980 echo "configure: failed program was:" >&5
2981 cat conftest.$ac_ext >&5
2983 eval "ac_cv_func_tgoto=no"
2988 if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then
2989 echo "$ac_t""yes" 1>&6
2990 cf_term_lib=predefined
2992 echo "$ac_t""no" 1>&6
2994 for cf_term_lib in $cf_check_list termcap termlib unknown
2996 echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
2997 echo "configure:2998: checking for tgoto in -l$cf_term_lib" >&5
2998 ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
2999 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3000 echo $ac_n "(cached) $ac_c" 1>&6
3002 ac_save_LIBS="$LIBS"
3003 LIBS="-l$cf_term_lib $LIBS"
3004 cat > conftest.$ac_ext <<EOF
3005 #line 3006 "configure"
3006 #include "confdefs.h"
3007 /* Override any gcc2 internal prototype to avoid an error. */
3008 /* We use char because int might match the return type of a gcc2
3009 builtin and then its argument prototype would still apply. */
3016 if { (eval echo configure:3017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3018 eval "ac_cv_lib_$ac_lib_var=yes"
3020 echo "configure: failed program was:" >&5
3021 cat conftest.$ac_ext >&5
3023 eval "ac_cv_lib_$ac_lib_var=no"
3026 LIBS="$ac_save_LIBS"
3029 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3030 echo "$ac_t""yes" 1>&6
3033 echo "$ac_t""no" 1>&6
3041 # Check for library containing initscr
3042 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
3043 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
3045 echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
3046 echo "configure:3047: checking for initscr in -l$cf_curs_lib" >&5
3047 ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
3048 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3049 echo $ac_n "(cached) $ac_c" 1>&6
3051 ac_save_LIBS="$LIBS"
3052 LIBS="-l$cf_curs_lib $LIBS"
3053 cat > conftest.$ac_ext <<EOF
3054 #line 3055 "configure"
3055 #include "confdefs.h"
3056 /* Override any gcc2 internal prototype to avoid an error. */
3057 /* We use char because int might match the return type of a gcc2
3058 builtin and then its argument prototype would still apply. */
3065 if { (eval echo configure:3066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3067 eval "ac_cv_lib_$ac_lib_var=yes"
3069 echo "configure: failed program was:" >&5
3070 cat conftest.$ac_ext >&5
3072 eval "ac_cv_lib_$ac_lib_var=no"
3075 LIBS="$ac_save_LIBS"
3078 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3079 echo "$ac_t""yes" 1>&6
3082 echo "$ac_t""no" 1>&6
3086 test $cf_curs_lib = unknown && { echo "configure: error: no curses library found" 1>&2; exit 1; }
3088 LIBS="-l$cf_curs_lib $cf_save_LIBS"
3089 if test "$cf_term_lib" = unknown ; then
3090 echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
3091 echo "configure:3092: checking if we can link with $cf_curs_lib library" >&5
3092 cat > conftest.$ac_ext <<EOF
3093 #line 3094 "configure"
3094 #include "confdefs.h"
3095 #include <${cf_cv_ncurses_header-curses.h}>
3100 if { (eval echo configure:3101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3104 echo "configure: failed program was:" >&5
3105 cat conftest.$ac_ext >&5
3110 echo "$ac_t""$cf_result" 1>&6
3111 test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; }
3112 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
3114 elif test "$cf_term_lib" != predefined ; then
3115 echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
3116 echo "configure:3117: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
3117 cat > conftest.$ac_ext <<EOF
3118 #line 3119 "configure"
3119 #include "confdefs.h"
3120 #include <${cf_cv_ncurses_header-curses.h}>
3122 initscr(); tgoto((char *)0, 0, 0);
3125 if { (eval echo configure:3126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3129 echo "configure: failed program was:" >&5
3130 cat conftest.$ac_ext >&5
3133 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
3134 cat > conftest.$ac_ext <<EOF
3135 #line 3136 "configure"
3136 #include "confdefs.h"
3137 #include <${cf_cv_ncurses_header-curses.h}>
3142 if { (eval echo configure:3143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3146 echo "configure: failed program was:" >&5
3147 cat conftest.$ac_ext >&5
3155 echo "$ac_t""$cf_result" 1>&6
3164 cf_ncuconfig_root=ncurses
3166 echo "Looking for ${cf_ncuconfig_root}-config"
3167 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
3169 # Extract the first word of "$ac_prog", so it can be a program name with args.
3170 set dummy $ac_prog; ac_word=$2
3171 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3172 echo "configure:3173: checking for $ac_word" >&5
3173 if eval "test \"`echo '$''{'ac_cv_path_NCURSES_CONFIG'+set}'`\" = set"; then
3174 echo $ac_n "(cached) $ac_c" 1>&6
3176 case "$NCURSES_CONFIG" in
3178 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
3181 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a dos path.
3184 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3186 for ac_dir in $ac_dummy; do
3187 test -z "$ac_dir" && ac_dir=.
3188 if test -f $ac_dir/$ac_word; then
3189 ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
3197 NCURSES_CONFIG="$ac_cv_path_NCURSES_CONFIG"
3198 if test -n "$NCURSES_CONFIG"; then
3199 echo "$ac_t""$NCURSES_CONFIG" 1>&6
3201 echo "$ac_t""no" 1>&6
3204 test -n "$NCURSES_CONFIG" && break
3206 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
3209 if test "$NCURSES_CONFIG" != none ; then
3211 cf_cv_ncurses_header=curses.h
3213 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
3214 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
3216 cat >> confdefs.h <<\EOF
3222 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3224 cat >> confdefs.h <<EOF
3225 #define $cf_nculib_ROOT 1
3229 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
3235 cf_ncuhdr_root=ncurses
3237 test -n "$cf_cv_curses_dir" && \
3238 test "$cf_cv_curses_dir" != "no" && { \
3240 if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
3241 for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
3243 while test $cf_add_incdir != /usr/include
3245 if test -d $cf_add_incdir
3248 if test -n "$CFLAGS$CPPFLAGS" ; then
3249 # a loop is needed to ensure we can add subdirs of existing dirs
3250 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3251 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3252 cf_have_incdir=yes; break
3257 if test "$cf_have_incdir" = no ; then
3258 if test "$cf_add_incdir" = /usr/local/include ; then
3259 if test "$GCC" = yes
3261 cf_save_CPPFLAGS=$CPPFLAGS
3262 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3263 cat > conftest.$ac_ext <<EOF
3264 #line 3265 "configure"
3265 #include "confdefs.h"
3271 if { (eval echo configure:3272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3274 echo "configure: failed program was:" >&5
3275 cat conftest.$ac_ext >&5
3280 CPPFLAGS=$cf_save_CPPFLAGS
3285 if test "$cf_have_incdir" = no ; then
3286 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3288 echo "${as_me-configure}:3289: testing adding $cf_add_incdir to include-path ..." 1>&5
3291 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3293 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3294 test "$cf_top_incdir" = "$cf_add_incdir" && break
3295 cf_add_incdir="$cf_top_incdir"
3306 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
3307 echo "configure:3308: checking for $cf_ncuhdr_root header in include-path" >&5
3308 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
3309 echo $ac_n "(cached) $ac_c" 1>&6
3312 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
3313 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
3314 for cf_header in $cf_header_list
3317 cat > conftest.$ac_ext <<EOF
3318 #line 3319 "configure"
3319 #include "confdefs.h"
3322 #include <$cf_header>
3325 #ifdef NCURSES_VERSION
3327 printf("%s\n", NCURSES_VERSION);
3339 if { (eval echo configure:3340: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3341 cf_cv_ncurses_h=$cf_header
3344 echo "configure: failed program was:" >&5
3345 cat conftest.$ac_ext >&5
3351 test "$cf_cv_ncurses_h" != no && break
3356 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
3360 if test "$cf_cv_ncurses_h" != no ; then
3361 cf_cv_ncurses_header=$cf_cv_ncurses_h
3364 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
3365 echo "configure:3366: checking for $cf_ncuhdr_root include-path" >&5
3366 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
3367 echo $ac_n "(cached) $ac_c" 1>&6
3370 test -n "$verbose" && echo
3372 cf_header_path_list=""
3373 if test -n "${CFLAGS}${CPPFLAGS}" ; then
3374 for cf_header_path in $CPPFLAGS $CFLAGS
3376 case $cf_header_path in #(vi
3378 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
3380 test "$cf_header_path" != "NONE" && \
3381 test -d "$cf_header_path" && \
3383 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
3384 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
3385 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
3386 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
3387 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
3388 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"
3391 cf_header_path_list="$cf_header_path_list $cf_search"
3400 test "/usr" != "$prefix" && \
3402 (test $prefix = NONE || test -d $prefix) && {
3403 test -n "$verbose" && echo " ... testing for include-directories under /usr"
3404 test -d /usr/include && cf_search="$cf_search /usr/include"
3405 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
3406 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
3407 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
3408 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3412 test "$prefix" != "NONE" && \
3413 test -d "$prefix" && \
3415 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
3416 test -d $prefix/include && cf_search="$cf_search $prefix/include"
3417 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
3418 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
3419 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
3420 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3424 test "/usr/local" != "$prefix" && \
3425 test -d "/usr/local" && \
3426 (test $prefix = NONE || test -d $prefix) && {
3427 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
3428 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
3429 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
3430 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
3431 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
3432 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3436 test "/opt" != "$prefix" && \
3438 (test $prefix = NONE || test -d $prefix) && {
3439 test -n "$verbose" && echo " ... testing for include-directories under /opt"
3440 test -d /opt/include && cf_search="$cf_search /opt/include"
3441 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
3442 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
3443 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
3444 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3448 test "$HOME" != "$prefix" && \
3449 test -d "$HOME" && \
3450 (test $prefix = NONE || test -d $prefix) && {
3451 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
3452 test -d $HOME/include && cf_search="$cf_search $HOME/include"
3453 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
3454 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
3455 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
3456 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3461 test "$includedir" != NONE && \
3462 test "$includedir" != "/usr/include" && \
3463 test -d "$includedir" && {
3464 test -d $includedir && cf_search="$cf_search $includedir"
3465 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
3468 test "$oldincludedir" != NONE && \
3469 test "$oldincludedir" != "/usr/include" && \
3470 test -d "$oldincludedir" && {
3471 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
3472 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
3475 cf_search="$cf_header_path_list $cf_search"
3477 test -n "$verbose" && echo search path $cf_search
3478 cf_save2_CPPFLAGS="$CPPFLAGS"
3479 for cf_incdir in $cf_search
3482 if test -n "$cf_incdir" ; then
3483 for cf_add_incdir in $cf_incdir
3485 while test $cf_add_incdir != /usr/include
3487 if test -d $cf_add_incdir
3490 if test -n "$CFLAGS$CPPFLAGS" ; then
3491 # a loop is needed to ensure we can add subdirs of existing dirs
3492 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3493 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3494 cf_have_incdir=yes; break
3499 if test "$cf_have_incdir" = no ; then
3500 if test "$cf_add_incdir" = /usr/local/include ; then
3501 if test "$GCC" = yes
3503 cf_save_CPPFLAGS=$CPPFLAGS
3504 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3505 cat > conftest.$ac_ext <<EOF
3506 #line 3507 "configure"
3507 #include "confdefs.h"
3513 if { (eval echo configure:3514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3516 echo "configure: failed program was:" >&5
3517 cat conftest.$ac_ext >&5
3522 CPPFLAGS=$cf_save_CPPFLAGS
3527 if test "$cf_have_incdir" = no ; then
3528 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3530 echo "${as_me-configure}:3531: testing adding $cf_add_incdir to include-path ..." 1>&5
3533 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3535 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3536 test "$cf_top_incdir" = "$cf_add_incdir" && break
3537 cf_add_incdir="$cf_top_incdir"
3551 cat > conftest.$ac_ext <<EOF
3552 #line 3553 "configure"
3553 #include "confdefs.h"
3556 #include <$cf_header>
3559 #ifdef NCURSES_VERSION
3561 printf("%s\n", NCURSES_VERSION);
3573 if { (eval echo configure:3574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3575 cf_cv_ncurses_h2=$cf_header
3578 echo "configure: failed program was:" >&5
3579 cat conftest.$ac_ext >&5
3585 if test "$cf_cv_ncurses_h2" != no ; then
3586 cf_cv_ncurses_h2=$cf_incdir/$cf_header
3587 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
3590 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
3592 CPPFLAGS="$cf_save2_CPPFLAGS"
3593 test "$cf_cv_ncurses_h2" != no && break
3595 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
3599 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
3601 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
3602 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
3603 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
3604 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
3607 if test -n "$cf_1st_incdir" ; then
3608 for cf_add_incdir in $cf_1st_incdir
3610 while test $cf_add_incdir != /usr/include
3612 if test -d $cf_add_incdir
3615 if test -n "$CFLAGS$CPPFLAGS" ; then
3616 # a loop is needed to ensure we can add subdirs of existing dirs
3617 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3618 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3619 cf_have_incdir=yes; break
3624 if test "$cf_have_incdir" = no ; then
3625 if test "$cf_add_incdir" = /usr/local/include ; then
3626 if test "$GCC" = yes
3628 cf_save_CPPFLAGS=$CPPFLAGS
3629 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3630 cat > conftest.$ac_ext <<EOF
3631 #line 3632 "configure"
3632 #include "confdefs.h"
3638 if { (eval echo configure:3639: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3641 echo "configure: failed program was:" >&5
3642 cat conftest.$ac_ext >&5
3647 CPPFLAGS=$cf_save_CPPFLAGS
3652 if test "$cf_have_incdir" = no ; then
3653 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3655 echo "${as_me-configure}:3656: testing adding $cf_add_incdir to include-path ..." 1>&5
3658 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3660 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3661 test "$cf_top_incdir" = "$cf_add_incdir" && break
3662 cf_add_incdir="$cf_top_incdir"
3674 # Set definitions to allow ifdef'ing for ncurses.h
3676 case $cf_cv_ncurses_header in # (vi
3678 cat >> confdefs.h <<\EOF
3679 #define HAVE_NCURSES_H 1
3685 case $cf_cv_ncurses_header in # (vi
3686 ncurses/curses.h|ncurses/ncurses.h)
3687 cat >> confdefs.h <<\EOF
3688 #define HAVE_NCURSES_NCURSES_H 1
3692 ncursesw/curses.h|ncursesw/ncurses.h)
3693 cat >> confdefs.h <<\EOF
3694 #define HAVE_NCURSESW_NCURSES_H 1
3702 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
3703 echo "configure:3704: checking for terminfo header" >&5
3704 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
3705 echo $ac_n "(cached) $ac_c" 1>&6
3708 case ${cf_cv_ncurses_header} in #(vi
3709 */ncurses.h|*/ncursesw.h) #(vi
3710 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
3713 cf_term_header=term.h
3717 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
3719 cat > conftest.$ac_ext <<EOF
3720 #line 3721 "configure"
3721 #include "confdefs.h"
3723 #include <${cf_cv_ncurses_header-curses.h}>
3727 int x = auto_left_margin
3730 if { (eval echo configure:3731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3733 cf_cv_term_header="$cf_test"
3735 echo "configure: failed program was:" >&5
3736 cat conftest.$ac_ext >&5
3739 cf_cv_term_header=unknown
3743 test "$cf_cv_term_header" != unknown && break
3748 echo "$ac_t""$cf_cv_term_header" 1>&6
3750 # Set definitions to allow ifdef'ing to accommodate subdirectories
3752 case $cf_cv_term_header in # (vi
3754 cat >> confdefs.h <<\EOF
3755 #define HAVE_TERM_H 1
3761 case $cf_cv_term_header in # (vi
3762 ncurses/term.h) #(vi
3763 cat >> confdefs.h <<\EOF
3764 #define HAVE_NCURSES_TERM_H 1
3769 cat >> confdefs.h <<\EOF
3770 #define HAVE_NCURSESW_TERM_H 1
3777 # some applications need this, but should check for NCURSES_VERSION
3778 cat >> confdefs.h <<\EOF
3784 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
3785 echo "configure:3786: checking for ncurses version" >&5
3786 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
3787 echo $ac_n "(cached) $ac_c" 1>&6
3790 cf_cv_ncurses_version=no
3793 if test "$cross_compiling" = yes; then
3796 # This will not work if the preprocessor splits the line after the
3797 # Autoconf token. The 'unproto' program does that.
3798 cat > conftest.$ac_ext <<EOF
3799 #include <${cf_cv_ncurses_header-curses.h}>
3801 #ifdef NCURSES_VERSION
3802 Autoconf NCURSES_VERSION
3810 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
3811 { (eval echo configure:3812: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
3812 if test -f conftest.out ; then
3813 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
3814 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
3819 cat > conftest.$ac_ext <<EOF
3820 #line 3821 "configure"
3821 #include "confdefs.h"
3823 #include <${cf_cv_ncurses_header-curses.h}>
3827 FILE *fp = fopen("$cf_tempfile", "w");
3828 #ifdef NCURSES_VERSION
3829 # ifdef NCURSES_VERSION_PATCH
3830 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
3832 fprintf(fp, "%s\n", NCURSES_VERSION);
3836 fprintf(fp, "old\n");
3841 ${cf_cv_main_return-return}(0);
3844 if { (eval echo configure:3845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3847 cf_cv_ncurses_version=`cat $cf_tempfile`
3849 echo "configure: failed program was:" >&5
3850 cat conftest.$ac_ext >&5
3859 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
3860 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
3868 cf_nculib_root=ncurses
3869 # This works, except for the special case where we find gpm, but
3870 # ncurses is in a nonstandard location via $LIBS, and we really want
3873 cf_ncurses_SAVE="$LIBS"
3874 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
3875 echo "configure:3876: checking for Gpm_Open in -lgpm" >&5
3876 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
3877 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3878 echo $ac_n "(cached) $ac_c" 1>&6
3880 ac_save_LIBS="$LIBS"
3882 cat > conftest.$ac_ext <<EOF
3883 #line 3884 "configure"
3884 #include "confdefs.h"
3885 /* Override any gcc2 internal prototype to avoid an error. */
3886 /* We use char because int might match the return type of a gcc2
3887 builtin and then its argument prototype would still apply. */
3894 if { (eval echo configure:3895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3896 eval "ac_cv_lib_$ac_lib_var=yes"
3898 echo "configure: failed program was:" >&5
3899 cat conftest.$ac_ext >&5
3901 eval "ac_cv_lib_$ac_lib_var=no"
3904 LIBS="$ac_save_LIBS"
3907 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3908 echo "$ac_t""yes" 1>&6
3909 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
3910 echo "configure:3911: checking for initscr in -lgpm" >&5
3911 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
3912 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3913 echo $ac_n "(cached) $ac_c" 1>&6
3915 ac_save_LIBS="$LIBS"
3917 cat > conftest.$ac_ext <<EOF
3918 #line 3919 "configure"
3919 #include "confdefs.h"
3920 /* Override any gcc2 internal prototype to avoid an error. */
3921 /* We use char because int might match the return type of a gcc2
3922 builtin and then its argument prototype would still apply. */
3929 if { (eval echo configure:3930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3931 eval "ac_cv_lib_$ac_lib_var=yes"
3933 echo "configure: failed program was:" >&5
3934 cat conftest.$ac_ext >&5
3936 eval "ac_cv_lib_$ac_lib_var=no"
3939 LIBS="$ac_save_LIBS"
3942 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3943 echo "$ac_t""yes" 1>&6
3944 LIBS="$cf_ncurses_SAVE"
3946 echo "$ac_t""no" 1>&6
3947 cf_ncurses_LIBS="-lgpm"
3951 echo "$ac_t""no" 1>&6
3955 case $host_os in #(vi
3957 # This is only necessary if you are linking against an obsolete
3958 # version of ncurses (but it should do no harm, since it's static).
3959 if test "$cf_nculib_root" = ncurses ; then
3960 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
3961 echo "configure:3962: checking for tgoto in -lmytinfo" >&5
3962 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
3963 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3964 echo $ac_n "(cached) $ac_c" 1>&6
3966 ac_save_LIBS="$LIBS"
3967 LIBS="-lmytinfo $LIBS"
3968 cat > conftest.$ac_ext <<EOF
3969 #line 3970 "configure"
3970 #include "confdefs.h"
3971 /* Override any gcc2 internal prototype to avoid an error. */
3972 /* We use char because int might match the return type of a gcc2
3973 builtin and then its argument prototype would still apply. */
3980 if { (eval echo configure:3981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3982 eval "ac_cv_lib_$ac_lib_var=yes"
3984 echo "configure: failed program was:" >&5
3985 cat conftest.$ac_ext >&5
3987 eval "ac_cv_lib_$ac_lib_var=no"
3990 LIBS="$ac_save_LIBS"
3993 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3994 echo "$ac_t""yes" 1>&6
3995 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
3997 echo "$ac_t""no" 1>&6
4004 LIBS="$cf_ncurses_LIBS $LIBS"
4006 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4009 if test -n "$cf_cv_curses_dir/lib" ; then
4010 for cf_add_libdir in $cf_cv_curses_dir/lib
4012 if test $cf_add_libdir = /usr/lib ; then
4014 elif test -d $cf_add_libdir
4017 if test -n "$LDFLAGS$LIBS" ; then
4018 # a loop is needed to ensure we can add subdirs of existing dirs
4019 for cf_test_libdir in $LDFLAGS $LIBS ; do
4020 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4021 cf_have_libdir=yes; break
4025 if test "$cf_have_libdir" = no ; then
4026 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4028 echo "${as_me-configure}:4029: testing adding $cf_add_libdir to library-path ..." 1>&5
4031 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4037 LIBS="-l$cf_nculib_root $LIBS"
4040 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
4042 echo $ac_n "checking for initscr""... $ac_c" 1>&6
4043 echo "configure:4044: checking for initscr" >&5
4044 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
4045 echo $ac_n "(cached) $ac_c" 1>&6
4047 cat > conftest.$ac_ext <<EOF
4048 #line 4049 "configure"
4049 #include "confdefs.h"
4050 /* System header to define __stub macros and hopefully few prototypes,
4051 which can conflict with char initscr(); below. */
4053 /* Override any gcc2 internal prototype to avoid an error. */
4054 /* We use char because int might match the return type of a gcc2
4055 builtin and then its argument prototype would still apply. */
4060 /* The GNU C library defines this for functions which it implements
4061 to always fail with ENOSYS. Some functions are actually named
4062 something starting with __ and the normal name is an alias. */
4063 #if defined (__stub_initscr) || defined (__stub___initscr)
4071 if { (eval echo configure:4072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4073 eval "ac_cv_func_initscr=yes"
4075 echo "configure: failed program was:" >&5
4076 cat conftest.$ac_ext >&5
4078 eval "ac_cv_func_initscr=no"
4083 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
4084 echo "$ac_t""yes" 1>&6
4085 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4087 echo "$ac_t""no" 1>&6
4089 cf_save_LIBS="$LIBS"
4090 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
4091 echo "configure:4092: checking for initscr in -l$cf_nculib_root" >&5
4092 LIBS="-l$cf_nculib_root $LIBS"
4093 cat > conftest.$ac_ext <<EOF
4094 #line 4095 "configure"
4095 #include "confdefs.h"
4096 #include <${cf_cv_ncurses_header-curses.h}>
4101 if { (eval echo configure:4102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4103 echo "$ac_t""yes" 1>&6
4104 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4107 echo "configure: failed program was:" >&5
4108 cat conftest.$ac_ext >&5
4110 echo "$ac_t""no" 1>&6
4112 cf_library_path_list=""
4113 if test -n "${LDFLAGS}${LIBS}" ; then
4114 for cf_library_path in $LDFLAGS $LIBS
4116 case $cf_library_path in #(vi
4118 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
4120 test "$cf_library_path" != "NONE" && \
4121 test -d "$cf_library_path" && \
4123 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
4124 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
4125 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
4126 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
4127 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
4128 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"
4131 cf_library_path_list="$cf_library_path_list $cf_search"
4140 test "/usr" != "$prefix" && \
4142 (test $prefix = NONE || test -d $prefix) && {
4143 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
4144 test -d /usr/lib && cf_search="$cf_search /usr/lib"
4145 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
4146 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
4147 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
4148 test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
4152 test "$prefix" != "NONE" && \
4153 test -d "$prefix" && \
4155 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
4156 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
4157 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
4158 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
4159 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
4160 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
4164 test "/usr/local" != "$prefix" && \
4165 test -d "/usr/local" && \
4166 (test $prefix = NONE || test -d $prefix) && {
4167 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
4168 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
4169 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
4170 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
4171 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
4172 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
4176 test "/opt" != "$prefix" && \
4178 (test $prefix = NONE || test -d $prefix) && {
4179 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
4180 test -d /opt/lib && cf_search="$cf_search /opt/lib"
4181 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
4182 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
4183 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
4184 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
4188 test "$HOME" != "$prefix" && \
4189 test -d "$HOME" && \
4190 (test $prefix = NONE || test -d $prefix) && {
4191 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
4192 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
4193 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
4194 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
4195 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
4196 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
4201 cf_search="$cf_library_path_list $cf_search"
4203 for cf_libdir in $cf_search
4205 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
4206 echo "configure:4207: checking for -l$cf_nculib_root in $cf_libdir" >&5
4207 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
4208 cat > conftest.$ac_ext <<EOF
4209 #line 4210 "configure"
4210 #include "confdefs.h"
4211 #include <${cf_cv_ncurses_header-curses.h}>
4216 if { (eval echo configure:4217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4218 echo "$ac_t""yes" 1>&6
4219 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4222 echo "configure: failed program was:" >&5
4223 cat conftest.$ac_ext >&5
4225 echo "$ac_t""no" 1>&6
4226 LIBS="$cf_save_LIBS"
4236 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
4238 if test $cf_found_library = no ; then
4239 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
4245 if test -n "$cf_ncurses_LIBS" ; then
4246 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
4247 echo "configure:4248: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
4248 cf_ncurses_SAVE="$LIBS"
4249 for p in $cf_ncurses_LIBS ; do
4250 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
4251 if test "$q" != "$LIBS" ; then
4255 cat > conftest.$ac_ext <<EOF
4256 #line 4257 "configure"
4257 #include "confdefs.h"
4258 #include <${cf_cv_ncurses_header-curses.h}>
4260 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
4263 if { (eval echo configure:4264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4265 echo "$ac_t""yes" 1>&6
4267 echo "configure: failed program was:" >&5
4268 cat conftest.$ac_ext >&5
4270 echo "$ac_t""no" 1>&6
4271 LIBS="$cf_ncurses_SAVE"
4277 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4279 cat >> confdefs.h <<EOF
4280 #define $cf_nculib_ROOT 1
4291 echo $ac_n "checking for multibyte character support""... $ac_c" 1>&6
4292 echo "configure:4293: checking for multibyte character support" >&5
4293 if eval "test \"`echo '$''{'cf_cv_utf8_lib'+set}'`\" = set"; then
4294 echo $ac_n "(cached) $ac_c" 1>&6
4297 cf_save_LIBS="$LIBS"
4298 cat > conftest.$ac_ext <<EOF
4299 #line 4300 "configure"
4300 #include "confdefs.h"
4307 if { (eval echo configure:4308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4311 echo "configure: failed program was:" >&5
4312 cat conftest.$ac_ext >&5
4316 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
4317 # will be set on completion of the AC_TRY_LINK below.
4318 cf_cv_header_path_utf8=
4319 cf_cv_library_path_utf8=
4322 echo "${as_me-configure}:4323: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
4325 cat > conftest.$ac_ext <<EOF
4326 #line 4327 "configure"
4327 #include "confdefs.h"
4329 #include <libutf8.h>
4334 if { (eval echo configure:4335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4336 cf_cv_find_linkage_utf8=yes
4338 echo "configure: failed program was:" >&5
4339 cat conftest.$ac_ext >&5
4342 cf_cv_find_linkage_utf8=no
4344 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
4346 echo "${as_me-configure}:4347: testing find linkage for utf8 library ..." 1>&5
4350 echo "${as_me-configure}:4351: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
4353 cf_save_CPPFLAGS="$CPPFLAGS"
4354 cf_test_CPPFLAGS="$CPPFLAGS"
4357 cf_header_path_list=""
4358 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4359 for cf_header_path in $CPPFLAGS $CFLAGS
4361 case $cf_header_path in #(vi
4363 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4365 test "$cf_header_path" != "NONE" && \
4366 test -d "$cf_header_path" && \
4368 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
4369 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
4370 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
4371 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
4372 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
4373 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
4376 cf_header_path_list="$cf_header_path_list $cf_search"
4385 test "/usr" != "$prefix" && \
4387 (test $prefix = NONE || test -d $prefix) && {
4388 test -n "$verbose" && echo " ... testing for include-directories under /usr"
4389 test -d /usr/include && cf_search="$cf_search /usr/include"
4390 test -d /usr/include/utf8 && cf_search="$cf_search /usr/include/utf8"
4391 test -d /usr/include/utf8/include && cf_search="$cf_search /usr/include/utf8/include"
4392 test -d /usr/utf8/include && cf_search="$cf_search /usr/utf8/include"
4393 test -d /usr/utf8/include/utf8 && cf_search="$cf_search /usr/utf8/include/utf8"
4397 test "$prefix" != "NONE" && \
4398 test -d "$prefix" && \
4400 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
4401 test -d $prefix/include && cf_search="$cf_search $prefix/include"
4402 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
4403 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
4404 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
4405 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
4409 test "/usr/local" != "$prefix" && \
4410 test -d "/usr/local" && \
4411 (test $prefix = NONE || test -d $prefix) && {
4412 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
4413 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
4414 test -d /usr/local/include/utf8 && cf_search="$cf_search /usr/local/include/utf8"
4415 test -d /usr/local/include/utf8/include && cf_search="$cf_search /usr/local/include/utf8/include"
4416 test -d /usr/local/utf8/include && cf_search="$cf_search /usr/local/utf8/include"
4417 test -d /usr/local/utf8/include/utf8 && cf_search="$cf_search /usr/local/utf8/include/utf8"
4421 test "/opt" != "$prefix" && \
4423 (test $prefix = NONE || test -d $prefix) && {
4424 test -n "$verbose" && echo " ... testing for include-directories under /opt"
4425 test -d /opt/include && cf_search="$cf_search /opt/include"
4426 test -d /opt/include/utf8 && cf_search="$cf_search /opt/include/utf8"
4427 test -d /opt/include/utf8/include && cf_search="$cf_search /opt/include/utf8/include"
4428 test -d /opt/utf8/include && cf_search="$cf_search /opt/utf8/include"
4429 test -d /opt/utf8/include/utf8 && cf_search="$cf_search /opt/utf8/include/utf8"
4433 test "$HOME" != "$prefix" && \
4434 test -d "$HOME" && \
4435 (test $prefix = NONE || test -d $prefix) && {
4436 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
4437 test -d $HOME/include && cf_search="$cf_search $HOME/include"
4438 test -d $HOME/include/utf8 && cf_search="$cf_search $HOME/include/utf8"
4439 test -d $HOME/include/utf8/include && cf_search="$cf_search $HOME/include/utf8/include"
4440 test -d $HOME/utf8/include && cf_search="$cf_search $HOME/utf8/include"
4441 test -d $HOME/utf8/include/utf8 && cf_search="$cf_search $HOME/utf8/include/utf8"
4446 test "$includedir" != NONE && \
4447 test "$includedir" != "/usr/include" && \
4448 test -d "$includedir" && {
4449 test -d $includedir && cf_search="$cf_search $includedir"
4450 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
4453 test "$oldincludedir" != NONE && \
4454 test "$oldincludedir" != "/usr/include" && \
4455 test -d "$oldincludedir" && {
4456 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
4457 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
4460 cf_search="$cf_header_path_list $cf_search"
4462 for cf_cv_header_path_utf8 in $cf_search
4464 if test -d $cf_cv_header_path_utf8 ; then
4465 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
4467 echo "${as_me-configure}:4468: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
4470 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
4471 cat > conftest.$ac_ext <<EOF
4472 #line 4473 "configure"
4473 #include "confdefs.h"
4475 #include <libutf8.h>
4480 if { (eval echo configure:4481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4483 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
4485 echo "${as_me-configure}:4486: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
4488 cf_cv_find_linkage_utf8=maybe
4489 cf_test_CPPFLAGS="$CPPFLAGS"
4492 echo "configure: failed program was:" >&5
4493 cat conftest.$ac_ext >&5
4496 CPPFLAGS="$cf_save_CPPFLAGS"
4503 if test "$cf_cv_find_linkage_utf8" = maybe ; then
4506 echo "${as_me-configure}:4507: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
4509 cf_save_LIBS="$LIBS"
4510 cf_save_LDFLAGS="$LDFLAGS"
4514 if test "$cf_cv_find_linkage_utf8" != yes ; then
4516 cf_library_path_list=""
4517 if test -n "${LDFLAGS}${LIBS}" ; then
4518 for cf_library_path in $LDFLAGS $LIBS
4520 case $cf_library_path in #(vi
4522 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
4524 test "$cf_library_path" != "NONE" && \
4525 test -d "$cf_library_path" && \
4527 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
4528 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
4529 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
4530 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
4531 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
4532 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
4535 cf_library_path_list="$cf_library_path_list $cf_search"
4544 test "/usr" != "$prefix" && \
4546 (test $prefix = NONE || test -d $prefix) && {
4547 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
4548 test -d /usr/lib && cf_search="$cf_search /usr/lib"
4549 test -d /usr/lib/utf8 && cf_search="$cf_search /usr/lib/utf8"
4550 test -d /usr/lib/utf8/lib && cf_search="$cf_search /usr/lib/utf8/lib"
4551 test -d /usr/utf8/lib && cf_search="$cf_search /usr/utf8/lib"
4552 test -d /usr/utf8/lib/utf8 && cf_search="$cf_search /usr/utf8/lib/utf8"
4556 test "$prefix" != "NONE" && \
4557 test -d "$prefix" && \
4559 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
4560 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
4561 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
4562 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
4563 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
4564 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
4568 test "/usr/local" != "$prefix" && \
4569 test -d "/usr/local" && \
4570 (test $prefix = NONE || test -d $prefix) && {
4571 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
4572 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
4573 test -d /usr/local/lib/utf8 && cf_search="$cf_search /usr/local/lib/utf8"
4574 test -d /usr/local/lib/utf8/lib && cf_search="$cf_search /usr/local/lib/utf8/lib"
4575 test -d /usr/local/utf8/lib && cf_search="$cf_search /usr/local/utf8/lib"
4576 test -d /usr/local/utf8/lib/utf8 && cf_search="$cf_search /usr/local/utf8/lib/utf8"
4580 test "/opt" != "$prefix" && \
4582 (test $prefix = NONE || test -d $prefix) && {
4583 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
4584 test -d /opt/lib && cf_search="$cf_search /opt/lib"
4585 test -d /opt/lib/utf8 && cf_search="$cf_search /opt/lib/utf8"
4586 test -d /opt/lib/utf8/lib && cf_search="$cf_search /opt/lib/utf8/lib"
4587 test -d /opt/utf8/lib && cf_search="$cf_search /opt/utf8/lib"
4588 test -d /opt/utf8/lib/utf8 && cf_search="$cf_search /opt/utf8/lib/utf8"
4592 test "$HOME" != "$prefix" && \
4593 test -d "$HOME" && \
4594 (test $prefix = NONE || test -d $prefix) && {
4595 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
4596 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
4597 test -d $HOME/lib/utf8 && cf_search="$cf_search $HOME/lib/utf8"
4598 test -d $HOME/lib/utf8/lib && cf_search="$cf_search $HOME/lib/utf8/lib"
4599 test -d $HOME/utf8/lib && cf_search="$cf_search $HOME/utf8/lib"
4600 test -d $HOME/utf8/lib/utf8 && cf_search="$cf_search $HOME/utf8/lib/utf8"
4605 cf_search="$cf_library_path_list $cf_search"
4607 for cf_cv_library_path_utf8 in $cf_search
4609 if test -d $cf_cv_library_path_utf8 ; then
4610 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
4612 echo "${as_me-configure}:4613: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
4615 CPPFLAGS="$cf_test_CPPFLAGS"
4616 LIBS="-lutf8 $cf_save_LIBS"
4617 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
4618 cat > conftest.$ac_ext <<EOF
4619 #line 4620 "configure"
4620 #include "confdefs.h"
4622 #include <libutf8.h>
4627 if { (eval echo configure:4628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4630 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
4632 echo "${as_me-configure}:4633: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
4635 cf_cv_find_linkage_utf8=yes
4636 cf_cv_library_file_utf8="-lutf8"
4639 echo "configure: failed program was:" >&5
4640 cat conftest.$ac_ext >&5
4643 CPPFLAGS="$cf_save_CPPFLAGS"
4644 LIBS="$cf_save_LIBS"
4645 LDFLAGS="$cf_save_LDFLAGS"
4651 LIBS="$cf_save_LIBS"
4652 CPPFLAGS="$cf_save_CPPFLAGS"
4653 LDFLAGS="$cf_save_LDFLAGS"
4657 cf_cv_find_linkage_utf8=no
4663 if test "$cf_cv_find_linkage_utf8" = yes ; then
4664 cf_cv_utf8_lib=add-on
4674 echo "$ac_t""$cf_cv_utf8_lib" 1>&6
4676 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
4678 if test "$cf_cv_utf8_lib" = "add-on" ; then
4679 cat >> confdefs.h <<\EOF
4680 #define HAVE_LIBUTF8_H 1
4684 if test -n "$cf_cv_header_path_utf8" ; then
4685 for cf_add_incdir in $cf_cv_header_path_utf8
4687 while test $cf_add_incdir != /usr/include
4689 if test -d $cf_add_incdir
4692 if test -n "$CFLAGS$CPPFLAGS" ; then
4693 # a loop is needed to ensure we can add subdirs of existing dirs
4694 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4695 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4696 cf_have_incdir=yes; break
4701 if test "$cf_have_incdir" = no ; then
4702 if test "$cf_add_incdir" = /usr/local/include ; then
4703 if test "$GCC" = yes
4705 cf_save_CPPFLAGS=$CPPFLAGS
4706 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4707 cat > conftest.$ac_ext <<EOF
4708 #line 4709 "configure"
4709 #include "confdefs.h"
4715 if { (eval echo configure:4716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4718 echo "configure: failed program was:" >&5
4719 cat conftest.$ac_ext >&5
4724 CPPFLAGS=$cf_save_CPPFLAGS
4729 if test "$cf_have_incdir" = no ; then
4730 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4732 echo "${as_me-configure}:4733: testing adding $cf_add_incdir to include-path ..." 1>&5
4735 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4737 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4738 test "$cf_top_incdir" = "$cf_add_incdir" && break
4739 cf_add_incdir="$cf_top_incdir"
4749 if test -n "$cf_cv_library_path_utf8" ; then
4750 for cf_add_libdir in $cf_cv_library_path_utf8
4752 if test $cf_add_libdir = /usr/lib ; then
4754 elif test -d $cf_add_libdir
4757 if test -n "$LDFLAGS$LIBS" ; then
4758 # a loop is needed to ensure we can add subdirs of existing dirs
4759 for cf_test_libdir in $LDFLAGS $LIBS ; do
4760 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4761 cf_have_libdir=yes; break
4765 if test "$cf_have_libdir" = no ; then
4766 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4768 echo "${as_me-configure}:4769: testing adding $cf_add_libdir to library-path ..." 1>&5
4771 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4781 cf_ncuconfig_root=ncursesw
4783 echo "Looking for ${cf_ncuconfig_root}-config"
4784 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
4786 # Extract the first word of "$ac_prog", so it can be a program name with args.
4787 set dummy $ac_prog; ac_word=$2
4788 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4789 echo "configure:4790: checking for $ac_word" >&5
4790 if eval "test \"`echo '$''{'ac_cv_path_NCURSES_CONFIG'+set}'`\" = set"; then
4791 echo $ac_n "(cached) $ac_c" 1>&6
4793 case "$NCURSES_CONFIG" in
4795 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
4798 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a dos path.
4801 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
4803 for ac_dir in $ac_dummy; do
4804 test -z "$ac_dir" && ac_dir=.
4805 if test -f $ac_dir/$ac_word; then
4806 ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
4814 NCURSES_CONFIG="$ac_cv_path_NCURSES_CONFIG"
4815 if test -n "$NCURSES_CONFIG"; then
4816 echo "$ac_t""$NCURSES_CONFIG" 1>&6
4818 echo "$ac_t""no" 1>&6
4821 test -n "$NCURSES_CONFIG" && break
4823 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
4826 if test "$NCURSES_CONFIG" != none ; then
4828 cf_cv_ncurses_header=curses.h
4830 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
4831 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
4833 cat >> confdefs.h <<\EOF
4839 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4841 cat >> confdefs.h <<EOF
4842 #define $cf_nculib_ROOT 1
4846 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
4852 cf_ncuhdr_root=ncursesw
4854 test -n "$cf_cv_curses_dir" && \
4855 test "$cf_cv_curses_dir" != "no" && { \
4857 if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4858 for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
4860 while test $cf_add_incdir != /usr/include
4862 if test -d $cf_add_incdir
4865 if test -n "$CFLAGS$CPPFLAGS" ; then
4866 # a loop is needed to ensure we can add subdirs of existing dirs
4867 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4868 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4869 cf_have_incdir=yes; break
4874 if test "$cf_have_incdir" = no ; then
4875 if test "$cf_add_incdir" = /usr/local/include ; then
4876 if test "$GCC" = yes
4878 cf_save_CPPFLAGS=$CPPFLAGS
4879 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4880 cat > conftest.$ac_ext <<EOF
4881 #line 4882 "configure"
4882 #include "confdefs.h"
4888 if { (eval echo configure:4889: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4891 echo "configure: failed program was:" >&5
4892 cat conftest.$ac_ext >&5
4897 CPPFLAGS=$cf_save_CPPFLAGS
4902 if test "$cf_have_incdir" = no ; then
4903 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4905 echo "${as_me-configure}:4906: testing adding $cf_add_incdir to include-path ..." 1>&5
4908 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4910 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4911 test "$cf_top_incdir" = "$cf_add_incdir" && break
4912 cf_add_incdir="$cf_top_incdir"
4923 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
4924 echo "configure:4925: checking for $cf_ncuhdr_root header in include-path" >&5
4925 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
4926 echo $ac_n "(cached) $ac_c" 1>&6
4929 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4930 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4931 for cf_header in $cf_header_list
4934 cat > conftest.$ac_ext <<EOF
4935 #line 4936 "configure"
4936 #include "confdefs.h"
4939 #define _XOPEN_SOURCE_EXTENDED
4940 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
4941 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
4943 #include <$cf_header>
4946 #ifdef NCURSES_VERSION
4952 printf("%s\n", NCURSES_VERSION);
4964 if { (eval echo configure:4965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4966 cf_cv_ncurses_h=$cf_header
4969 echo "configure: failed program was:" >&5
4970 cat conftest.$ac_ext >&5
4976 test "$cf_cv_ncurses_h" != no && break
4981 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
4985 if test "$cf_cv_ncurses_h" != no ; then
4986 cf_cv_ncurses_header=$cf_cv_ncurses_h
4989 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
4990 echo "configure:4991: checking for $cf_ncuhdr_root include-path" >&5
4991 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
4992 echo $ac_n "(cached) $ac_c" 1>&6
4995 test -n "$verbose" && echo
4997 cf_header_path_list=""
4998 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4999 for cf_header_path in $CPPFLAGS $CFLAGS
5001 case $cf_header_path in #(vi
5003 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5005 test "$cf_header_path" != "NONE" && \
5006 test -d "$cf_header_path" && \
5008 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5009 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5010 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5011 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5012 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5013 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"
5016 cf_header_path_list="$cf_header_path_list $cf_search"
5025 test "/usr" != "$prefix" && \
5027 (test $prefix = NONE || test -d $prefix) && {
5028 test -n "$verbose" && echo " ... testing for include-directories under /usr"
5029 test -d /usr/include && cf_search="$cf_search /usr/include"
5030 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
5031 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
5032 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
5033 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5037 test "$prefix" != "NONE" && \
5038 test -d "$prefix" && \
5040 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5041 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5042 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5043 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5044 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5045 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5049 test "/usr/local" != "$prefix" && \
5050 test -d "/usr/local" && \
5051 (test $prefix = NONE || test -d $prefix) && {
5052 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
5053 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
5054 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
5055 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
5056 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
5057 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5061 test "/opt" != "$prefix" && \
5063 (test $prefix = NONE || test -d $prefix) && {
5064 test -n "$verbose" && echo " ... testing for include-directories under /opt"
5065 test -d /opt/include && cf_search="$cf_search /opt/include"
5066 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
5067 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
5068 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
5069 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5073 test "$HOME" != "$prefix" && \
5074 test -d "$HOME" && \
5075 (test $prefix = NONE || test -d $prefix) && {
5076 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
5077 test -d $HOME/include && cf_search="$cf_search $HOME/include"
5078 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
5079 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
5080 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
5081 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5086 test "$includedir" != NONE && \
5087 test "$includedir" != "/usr/include" && \
5088 test -d "$includedir" && {
5089 test -d $includedir && cf_search="$cf_search $includedir"
5090 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5093 test "$oldincludedir" != NONE && \
5094 test "$oldincludedir" != "/usr/include" && \
5095 test -d "$oldincludedir" && {
5096 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5097 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5100 cf_search="$cf_header_path_list $cf_search"
5102 test -n "$verbose" && echo search path $cf_search
5103 cf_save2_CPPFLAGS="$CPPFLAGS"
5104 for cf_incdir in $cf_search
5107 if test -n "$cf_incdir" ; then
5108 for cf_add_incdir in $cf_incdir
5110 while test $cf_add_incdir != /usr/include
5112 if test -d $cf_add_incdir
5115 if test -n "$CFLAGS$CPPFLAGS" ; then
5116 # a loop is needed to ensure we can add subdirs of existing dirs
5117 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5118 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5119 cf_have_incdir=yes; break
5124 if test "$cf_have_incdir" = no ; then
5125 if test "$cf_add_incdir" = /usr/local/include ; then
5126 if test "$GCC" = yes
5128 cf_save_CPPFLAGS=$CPPFLAGS
5129 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5130 cat > conftest.$ac_ext <<EOF
5131 #line 5132 "configure"
5132 #include "confdefs.h"
5138 if { (eval echo configure:5139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5141 echo "configure: failed program was:" >&5
5142 cat conftest.$ac_ext >&5
5147 CPPFLAGS=$cf_save_CPPFLAGS
5152 if test "$cf_have_incdir" = no ; then
5153 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5155 echo "${as_me-configure}:5156: testing adding $cf_add_incdir to include-path ..." 1>&5
5158 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5160 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5161 test "$cf_top_incdir" = "$cf_add_incdir" && break
5162 cf_add_incdir="$cf_top_incdir"
5176 cat > conftest.$ac_ext <<EOF
5177 #line 5178 "configure"
5178 #include "confdefs.h"
5181 #include <$cf_header>
5184 #ifdef NCURSES_VERSION
5186 printf("%s\n", NCURSES_VERSION);
5198 if { (eval echo configure:5199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5200 cf_cv_ncurses_h2=$cf_header
5203 echo "configure: failed program was:" >&5
5204 cat conftest.$ac_ext >&5
5210 if test "$cf_cv_ncurses_h2" != no ; then
5211 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5212 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
5215 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5217 CPPFLAGS="$cf_save2_CPPFLAGS"
5218 test "$cf_cv_ncurses_h2" != no && break
5220 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
5224 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
5226 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
5227 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
5228 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
5229 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
5232 if test -n "$cf_1st_incdir" ; then
5233 for cf_add_incdir in $cf_1st_incdir
5235 while test $cf_add_incdir != /usr/include
5237 if test -d $cf_add_incdir
5240 if test -n "$CFLAGS$CPPFLAGS" ; then
5241 # a loop is needed to ensure we can add subdirs of existing dirs
5242 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5243 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5244 cf_have_incdir=yes; break
5249 if test "$cf_have_incdir" = no ; then
5250 if test "$cf_add_incdir" = /usr/local/include ; then
5251 if test "$GCC" = yes
5253 cf_save_CPPFLAGS=$CPPFLAGS
5254 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5255 cat > conftest.$ac_ext <<EOF
5256 #line 5257 "configure"
5257 #include "confdefs.h"
5263 if { (eval echo configure:5264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5266 echo "configure: failed program was:" >&5
5267 cat conftest.$ac_ext >&5
5272 CPPFLAGS=$cf_save_CPPFLAGS
5277 if test "$cf_have_incdir" = no ; then
5278 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5280 echo "${as_me-configure}:5281: testing adding $cf_add_incdir to include-path ..." 1>&5
5283 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5285 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5286 test "$cf_top_incdir" = "$cf_add_incdir" && break
5287 cf_add_incdir="$cf_top_incdir"
5299 # Set definitions to allow ifdef'ing for ncurses.h
5301 case $cf_cv_ncurses_header in # (vi
5303 cat >> confdefs.h <<\EOF
5304 #define HAVE_NCURSES_H 1
5310 case $cf_cv_ncurses_header in # (vi
5311 ncurses/curses.h|ncurses/ncurses.h)
5312 cat >> confdefs.h <<\EOF
5313 #define HAVE_NCURSES_NCURSES_H 1
5317 ncursesw/curses.h|ncursesw/ncurses.h)
5318 cat >> confdefs.h <<\EOF
5319 #define HAVE_NCURSESW_NCURSES_H 1
5327 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
5328 echo "configure:5329: checking for terminfo header" >&5
5329 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
5330 echo $ac_n "(cached) $ac_c" 1>&6
5333 case ${cf_cv_ncurses_header} in #(vi
5334 */ncurses.h|*/ncursesw.h) #(vi
5335 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5338 cf_term_header=term.h
5342 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5344 cat > conftest.$ac_ext <<EOF
5345 #line 5346 "configure"
5346 #include "confdefs.h"
5348 #include <${cf_cv_ncurses_header-curses.h}>
5352 int x = auto_left_margin
5355 if { (eval echo configure:5356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5358 cf_cv_term_header="$cf_test"
5360 echo "configure: failed program was:" >&5
5361 cat conftest.$ac_ext >&5
5364 cf_cv_term_header=unknown
5368 test "$cf_cv_term_header" != unknown && break
5373 echo "$ac_t""$cf_cv_term_header" 1>&6
5375 # Set definitions to allow ifdef'ing to accommodate subdirectories
5377 case $cf_cv_term_header in # (vi
5379 cat >> confdefs.h <<\EOF
5380 #define HAVE_TERM_H 1
5386 case $cf_cv_term_header in # (vi
5387 ncurses/term.h) #(vi
5388 cat >> confdefs.h <<\EOF
5389 #define HAVE_NCURSES_TERM_H 1
5394 cat >> confdefs.h <<\EOF
5395 #define HAVE_NCURSESW_TERM_H 1
5402 # some applications need this, but should check for NCURSES_VERSION
5403 cat >> confdefs.h <<\EOF
5409 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
5410 echo "configure:5411: checking for ncurses version" >&5
5411 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
5412 echo $ac_n "(cached) $ac_c" 1>&6
5415 cf_cv_ncurses_version=no
5418 if test "$cross_compiling" = yes; then
5421 # This will not work if the preprocessor splits the line after the
5422 # Autoconf token. The 'unproto' program does that.
5423 cat > conftest.$ac_ext <<EOF
5424 #include <${cf_cv_ncurses_header-curses.h}>
5426 #ifdef NCURSES_VERSION
5427 Autoconf NCURSES_VERSION
5435 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5436 { (eval echo configure:5437: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
5437 if test -f conftest.out ; then
5438 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5439 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5444 cat > conftest.$ac_ext <<EOF
5445 #line 5446 "configure"
5446 #include "confdefs.h"
5448 #include <${cf_cv_ncurses_header-curses.h}>
5452 FILE *fp = fopen("$cf_tempfile", "w");
5453 #ifdef NCURSES_VERSION
5454 # ifdef NCURSES_VERSION_PATCH
5455 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5457 fprintf(fp, "%s\n", NCURSES_VERSION);
5461 fprintf(fp, "old\n");
5466 ${cf_cv_main_return-return}(0);
5469 if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
5472 cf_cv_ncurses_version=`cat $cf_tempfile`
5474 echo "configure: failed program was:" >&5
5475 cat conftest.$ac_ext >&5
5484 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
5485 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
5493 cf_nculib_root=ncursesw
5494 # This works, except for the special case where we find gpm, but
5495 # ncurses is in a nonstandard location via $LIBS, and we really want
5498 cf_ncurses_SAVE="$LIBS"
5499 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
5500 echo "configure:5501: checking for Gpm_Open in -lgpm" >&5
5501 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
5502 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5503 echo $ac_n "(cached) $ac_c" 1>&6
5505 ac_save_LIBS="$LIBS"
5507 cat > conftest.$ac_ext <<EOF
5508 #line 5509 "configure"
5509 #include "confdefs.h"
5510 /* Override any gcc2 internal prototype to avoid an error. */
5511 /* We use char because int might match the return type of a gcc2
5512 builtin and then its argument prototype would still apply. */
5519 if { (eval echo configure:5520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5521 eval "ac_cv_lib_$ac_lib_var=yes"
5523 echo "configure: failed program was:" >&5
5524 cat conftest.$ac_ext >&5
5526 eval "ac_cv_lib_$ac_lib_var=no"
5529 LIBS="$ac_save_LIBS"
5532 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5533 echo "$ac_t""yes" 1>&6
5534 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
5535 echo "configure:5536: checking for initscr in -lgpm" >&5
5536 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
5537 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5538 echo $ac_n "(cached) $ac_c" 1>&6
5540 ac_save_LIBS="$LIBS"
5542 cat > conftest.$ac_ext <<EOF
5543 #line 5544 "configure"
5544 #include "confdefs.h"
5545 /* Override any gcc2 internal prototype to avoid an error. */
5546 /* We use char because int might match the return type of a gcc2
5547 builtin and then its argument prototype would still apply. */
5554 if { (eval echo configure:5555: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5556 eval "ac_cv_lib_$ac_lib_var=yes"
5558 echo "configure: failed program was:" >&5
5559 cat conftest.$ac_ext >&5
5561 eval "ac_cv_lib_$ac_lib_var=no"
5564 LIBS="$ac_save_LIBS"
5567 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5568 echo "$ac_t""yes" 1>&6
5569 LIBS="$cf_ncurses_SAVE"
5571 echo "$ac_t""no" 1>&6
5572 cf_ncurses_LIBS="-lgpm"
5576 echo "$ac_t""no" 1>&6
5580 case $host_os in #(vi
5582 # This is only necessary if you are linking against an obsolete
5583 # version of ncurses (but it should do no harm, since it's static).
5584 if test "$cf_nculib_root" = ncurses ; then
5585 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
5586 echo "configure:5587: checking for tgoto in -lmytinfo" >&5
5587 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
5588 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5589 echo $ac_n "(cached) $ac_c" 1>&6
5591 ac_save_LIBS="$LIBS"
5592 LIBS="-lmytinfo $LIBS"
5593 cat > conftest.$ac_ext <<EOF
5594 #line 5595 "configure"
5595 #include "confdefs.h"
5596 /* Override any gcc2 internal prototype to avoid an error. */
5597 /* We use char because int might match the return type of a gcc2
5598 builtin and then its argument prototype would still apply. */
5605 if { (eval echo configure:5606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5607 eval "ac_cv_lib_$ac_lib_var=yes"
5609 echo "configure: failed program was:" >&5
5610 cat conftest.$ac_ext >&5
5612 eval "ac_cv_lib_$ac_lib_var=no"
5615 LIBS="$ac_save_LIBS"
5618 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5619 echo "$ac_t""yes" 1>&6
5620 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
5622 echo "$ac_t""no" 1>&6
5629 LIBS="$cf_ncurses_LIBS $LIBS"
5631 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5634 if test -n "$cf_cv_curses_dir/lib" ; then
5635 for cf_add_libdir in $cf_cv_curses_dir/lib
5637 if test $cf_add_libdir = /usr/lib ; then
5639 elif test -d $cf_add_libdir
5642 if test -n "$LDFLAGS$LIBS" ; then
5643 # a loop is needed to ensure we can add subdirs of existing dirs
5644 for cf_test_libdir in $LDFLAGS $LIBS ; do
5645 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5646 cf_have_libdir=yes; break
5650 if test "$cf_have_libdir" = no ; then
5651 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5653 echo "${as_me-configure}:5654: testing adding $cf_add_libdir to library-path ..." 1>&5
5656 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5662 LIBS="-l$cf_nculib_root $LIBS"
5665 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5667 echo $ac_n "checking for initscr""... $ac_c" 1>&6
5668 echo "configure:5669: checking for initscr" >&5
5669 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
5670 echo $ac_n "(cached) $ac_c" 1>&6
5672 cat > conftest.$ac_ext <<EOF
5673 #line 5674 "configure"
5674 #include "confdefs.h"
5675 /* System header to define __stub macros and hopefully few prototypes,
5676 which can conflict with char initscr(); below. */
5678 /* Override any gcc2 internal prototype to avoid an error. */
5679 /* We use char because int might match the return type of a gcc2
5680 builtin and then its argument prototype would still apply. */
5685 /* The GNU C library defines this for functions which it implements
5686 to always fail with ENOSYS. Some functions are actually named
5687 something starting with __ and the normal name is an alias. */
5688 #if defined (__stub_initscr) || defined (__stub___initscr)
5696 if { (eval echo configure:5697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5698 eval "ac_cv_func_initscr=yes"
5700 echo "configure: failed program was:" >&5
5701 cat conftest.$ac_ext >&5
5703 eval "ac_cv_func_initscr=no"
5708 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
5709 echo "$ac_t""yes" 1>&6
5710 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5712 echo "$ac_t""no" 1>&6
5714 cf_save_LIBS="$LIBS"
5715 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
5716 echo "configure:5717: checking for initscr in -l$cf_nculib_root" >&5
5717 LIBS="-l$cf_nculib_root $LIBS"
5718 cat > conftest.$ac_ext <<EOF
5719 #line 5720 "configure"
5720 #include "confdefs.h"
5721 #include <${cf_cv_ncurses_header-curses.h}>
5726 if { (eval echo configure:5727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5728 echo "$ac_t""yes" 1>&6
5729 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5732 echo "configure: failed program was:" >&5
5733 cat conftest.$ac_ext >&5
5735 echo "$ac_t""no" 1>&6
5737 cf_library_path_list=""
5738 if test -n "${LDFLAGS}${LIBS}" ; then
5739 for cf_library_path in $LDFLAGS $LIBS
5741 case $cf_library_path in #(vi
5743 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
5745 test "$cf_library_path" != "NONE" && \
5746 test -d "$cf_library_path" && \
5748 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
5749 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
5750 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
5751 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
5752 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
5753 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"
5756 cf_library_path_list="$cf_library_path_list $cf_search"
5765 test "/usr" != "$prefix" && \
5767 (test $prefix = NONE || test -d $prefix) && {
5768 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
5769 test -d /usr/lib && cf_search="$cf_search /usr/lib"
5770 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
5771 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
5772 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
5773 test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
5777 test "$prefix" != "NONE" && \
5778 test -d "$prefix" && \
5780 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5781 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5782 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5783 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5784 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5785 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5789 test "/usr/local" != "$prefix" && \
5790 test -d "/usr/local" && \
5791 (test $prefix = NONE || test -d $prefix) && {
5792 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
5793 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
5794 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
5795 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
5796 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
5797 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
5801 test "/opt" != "$prefix" && \
5803 (test $prefix = NONE || test -d $prefix) && {
5804 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
5805 test -d /opt/lib && cf_search="$cf_search /opt/lib"
5806 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
5807 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
5808 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
5809 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
5813 test "$HOME" != "$prefix" && \
5814 test -d "$HOME" && \
5815 (test $prefix = NONE || test -d $prefix) && {
5816 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
5817 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
5818 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
5819 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
5820 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
5821 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
5826 cf_search="$cf_library_path_list $cf_search"
5828 for cf_libdir in $cf_search
5830 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
5831 echo "configure:5832: checking for -l$cf_nculib_root in $cf_libdir" >&5
5832 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5833 cat > conftest.$ac_ext <<EOF
5834 #line 5835 "configure"
5835 #include "confdefs.h"
5836 #include <${cf_cv_ncurses_header-curses.h}>
5841 if { (eval echo configure:5842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5843 echo "$ac_t""yes" 1>&6
5844 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5847 echo "configure: failed program was:" >&5
5848 cat conftest.$ac_ext >&5
5850 echo "$ac_t""no" 1>&6
5851 LIBS="$cf_save_LIBS"
5861 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5863 if test $cf_found_library = no ; then
5864 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
5870 if test -n "$cf_ncurses_LIBS" ; then
5871 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
5872 echo "configure:5873: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5873 cf_ncurses_SAVE="$LIBS"
5874 for p in $cf_ncurses_LIBS ; do
5875 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5876 if test "$q" != "$LIBS" ; then
5880 cat > conftest.$ac_ext <<EOF
5881 #line 5882 "configure"
5882 #include "confdefs.h"
5883 #include <${cf_cv_ncurses_header-curses.h}>
5885 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5888 if { (eval echo configure:5889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5890 echo "$ac_t""yes" 1>&6
5892 echo "configure: failed program was:" >&5
5893 cat conftest.$ac_ext >&5
5895 echo "$ac_t""no" 1>&6
5896 LIBS="$cf_ncurses_SAVE"
5902 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5904 cat >> confdefs.h <<EOF
5905 #define $cf_nculib_ROOT 1
5914 if test "$no_x" = yes; then
5915 # Not all programs may use this symbol, but it does not hurt to define it.
5916 cat >> confdefs.h <<\EOF
5917 #define X_DISPLAY_MISSING 1
5920 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5922 if test -n "$x_includes"; then
5923 X_CFLAGS="$X_CFLAGS -I$x_includes"
5926 # It would also be nice to do this for all -L options, not just this one.
5927 if test -n "$x_libraries"; then
5928 X_LIBS="$X_LIBS -L$x_libraries"
5929 # For Solaris; some versions of Sun CC require a space after -R and
5930 # others require no space. Words are not sufficient . . . .
5931 case "`(uname -sr) 2>/dev/null`" in
5933 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5934 echo "configure:5935: checking whether -R must be followed by a space" >&5
5935 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5936 cat > conftest.$ac_ext <<EOF
5937 #line 5938 "configure"
5938 #include "confdefs.h"
5944 if { (eval echo configure:5945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5948 echo "configure: failed program was:" >&5
5949 cat conftest.$ac_ext >&5
5954 if test $ac_R_nospace = yes; then
5955 echo "$ac_t""no" 1>&6
5956 X_LIBS="$X_LIBS -R$x_libraries"
5958 LIBS="$ac_xsave_LIBS -R $x_libraries"
5959 cat > conftest.$ac_ext <<EOF
5960 #line 5961 "configure"
5961 #include "confdefs.h"
5967 if { (eval echo configure:5968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5971 echo "configure: failed program was:" >&5
5972 cat conftest.$ac_ext >&5
5977 if test $ac_R_space = yes; then
5978 echo "$ac_t""yes" 1>&6
5979 X_LIBS="$X_LIBS -R $x_libraries"
5981 echo "$ac_t""neither works" 1>&6
5984 LIBS="$ac_xsave_LIBS"
5988 # Check for system-dependent libraries X programs must link with.
5989 # Do this before checking for the system-independent R6 libraries
5990 # (-lICE), since we may need -lsocket or whatever for X linking.
5992 if test "$ISC" = yes; then
5993 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5995 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5996 # libraries were built with DECnet support. And karl@cs.umb.edu says
5997 # the Alpha needs dnet_stub (dnet does not exist).
5998 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5999 echo "configure:6000: checking for dnet_ntoa in -ldnet" >&5
6000 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6001 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6002 echo $ac_n "(cached) $ac_c" 1>&6
6004 ac_save_LIBS="$LIBS"
6006 cat > conftest.$ac_ext <<EOF
6007 #line 6008 "configure"
6008 #include "confdefs.h"
6009 /* Override any gcc2 internal prototype to avoid an error. */
6010 /* We use char because int might match the return type of a gcc2
6011 builtin and then its argument prototype would still apply. */
6018 if { (eval echo configure:6019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6020 eval "ac_cv_lib_$ac_lib_var=yes"
6022 echo "configure: failed program was:" >&5
6023 cat conftest.$ac_ext >&5
6025 eval "ac_cv_lib_$ac_lib_var=no"
6028 LIBS="$ac_save_LIBS"
6031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6032 echo "$ac_t""yes" 1>&6
6033 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6035 echo "$ac_t""no" 1>&6
6038 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6039 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
6040 echo "configure:6041: checking for dnet_ntoa in -ldnet_stub" >&5
6041 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6042 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6043 echo $ac_n "(cached) $ac_c" 1>&6
6045 ac_save_LIBS="$LIBS"
6046 LIBS="-ldnet_stub $LIBS"
6047 cat > conftest.$ac_ext <<EOF
6048 #line 6049 "configure"
6049 #include "confdefs.h"
6050 /* Override any gcc2 internal prototype to avoid an error. */
6051 /* We use char because int might match the return type of a gcc2
6052 builtin and then its argument prototype would still apply. */
6059 if { (eval echo configure:6060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6061 eval "ac_cv_lib_$ac_lib_var=yes"
6063 echo "configure: failed program was:" >&5
6064 cat conftest.$ac_ext >&5
6066 eval "ac_cv_lib_$ac_lib_var=no"
6069 LIBS="$ac_save_LIBS"
6072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6073 echo "$ac_t""yes" 1>&6
6074 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6076 echo "$ac_t""no" 1>&6
6081 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6082 # to get the SysV transport functions.
6083 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
6085 # The nsl library prevents programs from opening the X display
6086 # on Irix 5.2, according to dickey@clark.net.
6087 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
6088 echo "configure:6089: checking for gethostbyname" >&5
6089 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
6090 echo $ac_n "(cached) $ac_c" 1>&6
6092 cat > conftest.$ac_ext <<EOF
6093 #line 6094 "configure"
6094 #include "confdefs.h"
6095 /* System header to define __stub macros and hopefully few prototypes,
6096 which can conflict with char gethostbyname(); below. */
6098 /* Override any gcc2 internal prototype to avoid an error. */
6099 /* We use char because int might match the return type of a gcc2
6100 builtin and then its argument prototype would still apply. */
6101 char gethostbyname();
6105 /* The GNU C library defines this for functions which it implements
6106 to always fail with ENOSYS. Some functions are actually named
6107 something starting with __ and the normal name is an alias. */
6108 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6116 if { (eval echo configure:6117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6118 eval "ac_cv_func_gethostbyname=yes"
6120 echo "configure: failed program was:" >&5
6121 cat conftest.$ac_ext >&5
6123 eval "ac_cv_func_gethostbyname=no"
6128 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
6129 echo "$ac_t""yes" 1>&6
6132 echo "$ac_t""no" 1>&6
6135 if test $ac_cv_func_gethostbyname = no; then
6136 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
6137 echo "configure:6138: checking for gethostbyname in -lnsl" >&5
6138 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
6139 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6140 echo $ac_n "(cached) $ac_c" 1>&6
6142 ac_save_LIBS="$LIBS"
6144 cat > conftest.$ac_ext <<EOF
6145 #line 6146 "configure"
6146 #include "confdefs.h"
6147 /* Override any gcc2 internal prototype to avoid an error. */
6148 /* We use char because int might match the return type of a gcc2
6149 builtin and then its argument prototype would still apply. */
6150 char gethostbyname();
6156 if { (eval echo configure:6157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6158 eval "ac_cv_lib_$ac_lib_var=yes"
6160 echo "configure: failed program was:" >&5
6161 cat conftest.$ac_ext >&5
6163 eval "ac_cv_lib_$ac_lib_var=no"
6166 LIBS="$ac_save_LIBS"
6169 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6170 echo "$ac_t""yes" 1>&6
6171 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
6173 echo "$ac_t""no" 1>&6
6178 # lieder@skyler.mavd.honeywell.com says without -lsocket,
6179 # socket/setsockopt and other routines are undefined under SCO ODT
6180 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
6181 # on later versions), says simon@lia.di.epfl.ch: it contains
6182 # gethostby* variants that don't use the nameserver (or something).
6183 # -lsocket must be given before -lnsl if both are needed.
6184 # We assume that if connect needs -lnsl, so does gethostbyname.
6185 echo $ac_n "checking for connect""... $ac_c" 1>&6
6186 echo "configure:6187: checking for connect" >&5
6187 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
6188 echo $ac_n "(cached) $ac_c" 1>&6
6190 cat > conftest.$ac_ext <<EOF
6191 #line 6192 "configure"
6192 #include "confdefs.h"
6193 /* System header to define __stub macros and hopefully few prototypes,
6194 which can conflict with char connect(); below. */
6196 /* Override any gcc2 internal prototype to avoid an error. */
6197 /* We use char because int might match the return type of a gcc2
6198 builtin and then its argument prototype would still apply. */
6203 /* The GNU C library defines this for functions which it implements
6204 to always fail with ENOSYS. Some functions are actually named
6205 something starting with __ and the normal name is an alias. */
6206 #if defined (__stub_connect) || defined (__stub___connect)
6214 if { (eval echo configure:6215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6216 eval "ac_cv_func_connect=yes"
6218 echo "configure: failed program was:" >&5
6219 cat conftest.$ac_ext >&5
6221 eval "ac_cv_func_connect=no"
6226 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
6227 echo "$ac_t""yes" 1>&6
6230 echo "$ac_t""no" 1>&6
6233 if test $ac_cv_func_connect = no; then
6234 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
6235 echo "configure:6236: checking for connect in -lsocket" >&5
6236 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
6237 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6238 echo $ac_n "(cached) $ac_c" 1>&6
6240 ac_save_LIBS="$LIBS"
6241 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
6242 cat > conftest.$ac_ext <<EOF
6243 #line 6244 "configure"
6244 #include "confdefs.h"
6245 /* Override any gcc2 internal prototype to avoid an error. */
6246 /* We use char because int might match the return type of a gcc2
6247 builtin and then its argument prototype would still apply. */
6254 if { (eval echo configure:6255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6256 eval "ac_cv_lib_$ac_lib_var=yes"
6258 echo "configure: failed program was:" >&5
6259 cat conftest.$ac_ext >&5
6261 eval "ac_cv_lib_$ac_lib_var=no"
6264 LIBS="$ac_save_LIBS"
6267 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6268 echo "$ac_t""yes" 1>&6
6269 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
6271 echo "$ac_t""no" 1>&6
6276 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
6277 echo $ac_n "checking for remove""... $ac_c" 1>&6
6278 echo "configure:6279: checking for remove" >&5
6279 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
6280 echo $ac_n "(cached) $ac_c" 1>&6
6282 cat > conftest.$ac_ext <<EOF
6283 #line 6284 "configure"
6284 #include "confdefs.h"
6285 /* System header to define __stub macros and hopefully few prototypes,
6286 which can conflict with char remove(); below. */
6288 /* Override any gcc2 internal prototype to avoid an error. */
6289 /* We use char because int might match the return type of a gcc2
6290 builtin and then its argument prototype would still apply. */
6295 /* The GNU C library defines this for functions which it implements
6296 to always fail with ENOSYS. Some functions are actually named
6297 something starting with __ and the normal name is an alias. */
6298 #if defined (__stub_remove) || defined (__stub___remove)
6306 if { (eval echo configure:6307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6308 eval "ac_cv_func_remove=yes"
6310 echo "configure: failed program was:" >&5
6311 cat conftest.$ac_ext >&5
6313 eval "ac_cv_func_remove=no"
6318 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
6319 echo "$ac_t""yes" 1>&6
6322 echo "$ac_t""no" 1>&6
6325 if test $ac_cv_func_remove = no; then
6326 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
6327 echo "configure:6328: checking for remove in -lposix" >&5
6328 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
6329 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6330 echo $ac_n "(cached) $ac_c" 1>&6
6332 ac_save_LIBS="$LIBS"
6333 LIBS="-lposix $LIBS"
6334 cat > conftest.$ac_ext <<EOF
6335 #line 6336 "configure"
6336 #include "confdefs.h"
6337 /* Override any gcc2 internal prototype to avoid an error. */
6338 /* We use char because int might match the return type of a gcc2
6339 builtin and then its argument prototype would still apply. */
6346 if { (eval echo configure:6347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6348 eval "ac_cv_lib_$ac_lib_var=yes"
6350 echo "configure: failed program was:" >&5
6351 cat conftest.$ac_ext >&5
6353 eval "ac_cv_lib_$ac_lib_var=no"
6356 LIBS="$ac_save_LIBS"
6359 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6360 echo "$ac_t""yes" 1>&6
6361 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
6363 echo "$ac_t""no" 1>&6
6368 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
6369 echo $ac_n "checking for shmat""... $ac_c" 1>&6
6370 echo "configure:6371: checking for shmat" >&5
6371 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
6372 echo $ac_n "(cached) $ac_c" 1>&6
6374 cat > conftest.$ac_ext <<EOF
6375 #line 6376 "configure"
6376 #include "confdefs.h"
6377 /* System header to define __stub macros and hopefully few prototypes,
6378 which can conflict with char shmat(); below. */
6380 /* Override any gcc2 internal prototype to avoid an error. */
6381 /* We use char because int might match the return type of a gcc2
6382 builtin and then its argument prototype would still apply. */
6387 /* The GNU C library defines this for functions which it implements
6388 to always fail with ENOSYS. Some functions are actually named
6389 something starting with __ and the normal name is an alias. */
6390 #if defined (__stub_shmat) || defined (__stub___shmat)
6398 if { (eval echo configure:6399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6400 eval "ac_cv_func_shmat=yes"
6402 echo "configure: failed program was:" >&5
6403 cat conftest.$ac_ext >&5
6405 eval "ac_cv_func_shmat=no"
6410 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
6411 echo "$ac_t""yes" 1>&6
6414 echo "$ac_t""no" 1>&6
6417 if test $ac_cv_func_shmat = no; then
6418 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
6419 echo "configure:6420: checking for shmat in -lipc" >&5
6420 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
6421 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6422 echo $ac_n "(cached) $ac_c" 1>&6
6424 ac_save_LIBS="$LIBS"
6426 cat > conftest.$ac_ext <<EOF
6427 #line 6428 "configure"
6428 #include "confdefs.h"
6429 /* Override any gcc2 internal prototype to avoid an error. */
6430 /* We use char because int might match the return type of a gcc2
6431 builtin and then its argument prototype would still apply. */
6438 if { (eval echo configure:6439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6440 eval "ac_cv_lib_$ac_lib_var=yes"
6442 echo "configure: failed program was:" >&5
6443 cat conftest.$ac_ext >&5
6445 eval "ac_cv_lib_$ac_lib_var=no"
6448 LIBS="$ac_save_LIBS"
6451 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6452 echo "$ac_t""yes" 1>&6
6453 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
6455 echo "$ac_t""no" 1>&6
6461 # Check for libraries that X11R6 Xt/Xaw programs need.
6462 ac_save_LDFLAGS="$LDFLAGS"
6463 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
6464 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
6465 # check for ICE first), but we must link in the order -lSM -lICE or
6466 # we get undefined symbols. So assume we have SM if we have ICE.
6467 # These have to be linked with before -lX11, unlike the other
6468 # libraries we check for below, so use a different variable.
6469 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
6470 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
6471 echo "configure:6472: checking for IceConnectionNumber in -lICE" >&5
6472 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
6473 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6474 echo $ac_n "(cached) $ac_c" 1>&6
6476 ac_save_LIBS="$LIBS"
6477 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
6478 cat > conftest.$ac_ext <<EOF
6479 #line 6480 "configure"
6480 #include "confdefs.h"
6481 /* Override any gcc2 internal prototype to avoid an error. */
6482 /* We use char because int might match the return type of a gcc2
6483 builtin and then its argument prototype would still apply. */
6484 char IceConnectionNumber();
6487 IceConnectionNumber()
6490 if { (eval echo configure:6491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6492 eval "ac_cv_lib_$ac_lib_var=yes"
6494 echo "configure: failed program was:" >&5
6495 cat conftest.$ac_ext >&5
6497 eval "ac_cv_lib_$ac_lib_var=no"
6500 LIBS="$ac_save_LIBS"
6503 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6504 echo "$ac_t""yes" 1>&6
6505 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
6507 echo "$ac_t""no" 1>&6
6510 LDFLAGS="$ac_save_LDFLAGS"
6518 # SYSTEM_NAME=`echo "$cf_cv_system_name"|tr ' ' -`
6522 LDFLAGS="$X_LIBS $LDFLAGS"
6524 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
6526 echo "${as_me-configure}:6527: testing checking additions to CFLAGS ..." 1>&5
6529 cf_check_cflags="$CFLAGS"
6530 cf_check_cppflags="$CPPFLAGS"
6535 cf_new_extra_cppflags=
6537 for cf_add_cflags in $X_CFLAGS
6539 case $cf_fix_cppflags in
6541 case $cf_add_cflags in #(vi
6542 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
6543 case $cf_add_cflags in
6545 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6547 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6548 && test -z "${cf_tst_cflags}" \
6549 && cf_fix_cppflags=yes
6551 if test $cf_fix_cppflags = yes ; then
6552 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6554 elif test "${cf_tst_cflags}" = "\"'" ; then
6555 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6561 *$cf_add_cflags) #(vi
6564 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
6569 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
6574 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6576 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
6578 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6579 && test -z "${cf_tst_cflags}" \
6580 && cf_fix_cppflags=no
6585 if test -n "$cf_new_cflags" ; then
6586 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
6588 echo "${as_me-configure}:6589: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
6591 CFLAGS="$CFLAGS $cf_new_cflags"
6594 if test -n "$cf_new_cppflags" ; then
6595 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
6597 echo "${as_me-configure}:6598: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
6600 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
6603 if test -n "$cf_new_extra_cppflags" ; then
6604 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
6606 echo "${as_me-configure}:6607: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
6609 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
6615 if test "$cf_check_cflags" != "$CFLAGS" ; then
6616 cat > conftest.$ac_ext <<EOF
6617 #line 6618 "configure"
6618 #include "confdefs.h"
6621 printf("Hello world");
6624 if { (eval echo configure:6625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6627 echo "configure: failed program was:" >&5
6628 cat conftest.$ac_ext >&5
6630 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
6632 echo "${as_me-configure}:6633: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
6635 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
6636 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
6638 echo "${as_me-configure}:6639: testing but keeping change to \$CPPFLAGS ..." 1>&5
6642 CFLAGS="$cf_check_flags"
6648 echo $ac_n "checking for XOpenDisplay""... $ac_c" 1>&6
6649 echo "configure:6650: checking for XOpenDisplay" >&5
6650 if eval "test \"`echo '$''{'ac_cv_func_XOpenDisplay'+set}'`\" = set"; then
6651 echo $ac_n "(cached) $ac_c" 1>&6
6653 cat > conftest.$ac_ext <<EOF
6654 #line 6655 "configure"
6655 #include "confdefs.h"
6656 /* System header to define __stub macros and hopefully few prototypes,
6657 which can conflict with char XOpenDisplay(); below. */
6659 /* Override any gcc2 internal prototype to avoid an error. */
6660 /* We use char because int might match the return type of a gcc2
6661 builtin and then its argument prototype would still apply. */
6662 char XOpenDisplay();
6666 /* The GNU C library defines this for functions which it implements
6667 to always fail with ENOSYS. Some functions are actually named
6668 something starting with __ and the normal name is an alias. */
6669 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
6677 if { (eval echo configure:6678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6679 eval "ac_cv_func_XOpenDisplay=yes"
6681 echo "configure: failed program was:" >&5
6682 cat conftest.$ac_ext >&5
6684 eval "ac_cv_func_XOpenDisplay=no"
6689 if eval "test \"`echo '$ac_cv_func_'XOpenDisplay`\" = yes"; then
6690 echo "$ac_t""yes" 1>&6
6693 echo "$ac_t""no" 1>&6
6695 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6696 echo "configure:6697: checking for XOpenDisplay in -lX11" >&5
6697 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6698 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6699 echo $ac_n "(cached) $ac_c" 1>&6
6701 ac_save_LIBS="$LIBS"
6702 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
6703 cat > conftest.$ac_ext <<EOF
6704 #line 6705 "configure"
6705 #include "confdefs.h"
6706 /* Override any gcc2 internal prototype to avoid an error. */
6707 /* We use char because int might match the return type of a gcc2
6708 builtin and then its argument prototype would still apply. */
6709 char XOpenDisplay();
6715 if { (eval echo configure:6716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6717 eval "ac_cv_lib_$ac_lib_var=yes"
6719 echo "configure: failed program was:" >&5
6720 cat conftest.$ac_ext >&5
6722 eval "ac_cv_lib_$ac_lib_var=no"
6725 LIBS="$ac_save_LIBS"
6728 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6729 echo "$ac_t""yes" 1>&6
6732 echo "$ac_t""no" 1>&6
6738 echo $ac_n "checking for XtAppInitialize""... $ac_c" 1>&6
6739 echo "configure:6740: checking for XtAppInitialize" >&5
6740 if eval "test \"`echo '$''{'ac_cv_func_XtAppInitialize'+set}'`\" = set"; then
6741 echo $ac_n "(cached) $ac_c" 1>&6
6743 cat > conftest.$ac_ext <<EOF
6744 #line 6745 "configure"
6745 #include "confdefs.h"
6746 /* System header to define __stub macros and hopefully few prototypes,
6747 which can conflict with char XtAppInitialize(); below. */
6749 /* Override any gcc2 internal prototype to avoid an error. */
6750 /* We use char because int might match the return type of a gcc2
6751 builtin and then its argument prototype would still apply. */
6752 char XtAppInitialize();
6756 /* The GNU C library defines this for functions which it implements
6757 to always fail with ENOSYS. Some functions are actually named
6758 something starting with __ and the normal name is an alias. */
6759 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
6767 if { (eval echo configure:6768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6769 eval "ac_cv_func_XtAppInitialize=yes"
6771 echo "configure: failed program was:" >&5
6772 cat conftest.$ac_ext >&5
6774 eval "ac_cv_func_XtAppInitialize=no"
6779 if eval "test \"`echo '$ac_cv_func_'XtAppInitialize`\" = yes"; then
6780 echo "$ac_t""yes" 1>&6
6783 echo "$ac_t""no" 1>&6
6785 echo $ac_n "checking for XtAppInitialize in -lXt""... $ac_c" 1>&6
6786 echo "configure:6787: checking for XtAppInitialize in -lXt" >&5
6787 ac_lib_var=`echo Xt'_'XtAppInitialize | sed 'y%./+-%__p_%'`
6788 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6789 echo $ac_n "(cached) $ac_c" 1>&6
6791 ac_save_LIBS="$LIBS"
6792 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
6793 cat > conftest.$ac_ext <<EOF
6794 #line 6795 "configure"
6795 #include "confdefs.h"
6796 /* Override any gcc2 internal prototype to avoid an error. */
6797 /* We use char because int might match the return type of a gcc2
6798 builtin and then its argument prototype would still apply. */
6799 char XtAppInitialize();
6805 if { (eval echo configure:6806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6807 eval "ac_cv_lib_$ac_lib_var=yes"
6809 echo "configure: failed program was:" >&5
6810 cat conftest.$ac_ext >&5
6812 eval "ac_cv_lib_$ac_lib_var=no"
6815 LIBS="$ac_save_LIBS"
6818 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6819 echo "$ac_t""yes" 1>&6
6820 cat >> confdefs.h <<\EOF
6821 #define HAVE_LIBXT 1
6825 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
6827 echo "$ac_t""no" 1>&6
6833 if test $cf_have_X_LIBS = no ; then
6834 echo "configure: warning: Unable to successfully link X Toolkit library (-lXt) with
6835 test program. You will have to check and add the proper libraries by hand
6840 cf_x_athena=${cf_x_athena-Xaw}
6842 echo $ac_n "checking if you want to link with Xaw 3d library""... $ac_c" 1>&6
6843 echo "configure:6844: checking if you want to link with Xaw 3d library" >&5
6846 # Check whether --with-Xaw3d or --without-Xaw3d was given.
6847 if test "${with_Xaw3d+set}" = set; then
6848 withval="$with_Xaw3d"
6852 if test "$withval" = yes ; then
6854 echo "$ac_t""yes" 1>&6
6856 echo "$ac_t""no" 1>&6
6859 echo $ac_n "checking if you want to link with neXT Athena library""... $ac_c" 1>&6
6860 echo "configure:6861: checking if you want to link with neXT Athena library" >&5
6863 # Check whether --with-neXtaw or --without-neXtaw was given.
6864 if test "${with_neXtaw+set}" = set; then
6865 withval="$with_neXtaw"
6869 if test "$withval" = yes ; then
6871 echo "$ac_t""yes" 1>&6
6873 echo "$ac_t""no" 1>&6
6876 echo $ac_n "checking if you want to link with Athena-Plus library""... $ac_c" 1>&6
6877 echo "configure:6878: checking if you want to link with Athena-Plus library" >&5
6880 # Check whether --with-XawPlus or --without-XawPlus was given.
6881 if test "${with_XawPlus+set}" = set; then
6882 withval="$with_XawPlus"
6886 if test "$withval" = yes ; then
6888 echo "$ac_t""yes" 1>&6
6890 echo "$ac_t""no" 1>&6
6893 echo $ac_n "checking for XextCreateExtension in -lXext""... $ac_c" 1>&6
6894 echo "configure:6895: checking for XextCreateExtension in -lXext" >&5
6895 ac_lib_var=`echo Xext'_'XextCreateExtension | sed 'y%./+-%__p_%'`
6896 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6897 echo $ac_n "(cached) $ac_c" 1>&6
6899 ac_save_LIBS="$LIBS"
6901 cat > conftest.$ac_ext <<EOF
6902 #line 6903 "configure"
6903 #include "confdefs.h"
6904 /* Override any gcc2 internal prototype to avoid an error. */
6905 /* We use char because int might match the return type of a gcc2
6906 builtin and then its argument prototype would still apply. */
6907 char XextCreateExtension();
6910 XextCreateExtension()
6913 if { (eval echo configure:6914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6915 eval "ac_cv_lib_$ac_lib_var=yes"
6917 echo "configure: failed program was:" >&5
6918 cat conftest.$ac_ext >&5
6920 eval "ac_cv_lib_$ac_lib_var=no"
6923 LIBS="$ac_save_LIBS"
6926 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6927 echo "$ac_t""yes" 1>&6
6930 echo "$ac_t""no" 1>&6
6937 cf_x_athena_root=$cf_x_athena
6938 cf_x_athena_include=""
6940 for cf_path in default \
6941 /usr/contrib/X11R6 \
6942 /usr/contrib/X11R5 \
6946 if test -z "$cf_x_athena_include" ; then
6948 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
6949 if test $cf_path != default ; then
6950 CPPFLAGS="$cf_save -I$cf_path/include"
6951 echo $ac_n "checking for $cf_test in $cf_path""... $ac_c" 1>&6
6952 echo "configure:6953: checking for $cf_test in $cf_path" >&5
6954 echo $ac_n "checking for $cf_test""... $ac_c" 1>&6
6955 echo "configure:6956: checking for $cf_test" >&5
6957 cat > conftest.$ac_ext <<EOF
6958 #line 6959 "configure"
6959 #include "confdefs.h"
6961 #include <X11/Intrinsic.h>
6967 if { (eval echo configure:6968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6971 echo "configure: failed program was:" >&5
6972 cat conftest.$ac_ext >&5
6977 echo "$ac_t""$cf_result" 1>&6
6978 if test "$cf_result" = yes ; then
6979 cf_x_athena_include=$cf_path
6987 if test -z "$cf_x_athena_include" ; then
6988 echo "configure: warning: Unable to successfully find Athena header files with test program" 1>&2
6989 elif test "$cf_x_athena_include" != default ; then
6990 CPPFLAGS="$CPPFLAGS -I$cf_x_athena_include"
6994 cf_x_athena_root=$cf_x_athena
6997 for cf_path in default \
6998 /usr/contrib/X11R6 \
6999 /usr/contrib/X11R5 \
7004 "-l$cf_x_athena_root -lXmu" \
7005 "-l$cf_x_athena_root -lXpm -lXmu" \
7006 "-l${cf_x_athena_root}_s -lXmu_s"
7008 if test -z "$cf_x_athena_lib" ; then
7010 cf_test=XawSimpleMenuAddGlobalActions
7011 if test $cf_path != default ; then
7012 LIBS="-L$cf_path/lib $cf_lib $LIBS"
7013 echo $ac_n "checking for $cf_lib in $cf_path""... $ac_c" 1>&6
7014 echo "configure:7015: checking for $cf_lib in $cf_path" >&5
7016 LIBS="$cf_lib $LIBS"
7017 echo $ac_n "checking for $cf_test in $cf_lib""... $ac_c" 1>&6
7018 echo "configure:7019: checking for $cf_test in $cf_lib" >&5
7020 cat > conftest.$ac_ext <<EOF
7021 #line 7022 "configure"
7022 #include "confdefs.h"
7028 if { (eval echo configure:7029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7032 echo "configure: failed program was:" >&5
7033 cat conftest.$ac_ext >&5
7038 echo "$ac_t""$cf_result" 1>&6
7039 if test "$cf_result" = yes ; then
7040 cf_x_athena_lib="$cf_lib"
7048 if test -z "$cf_x_athena_lib" ; then
7049 { echo "configure: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" 1>&2; exit 1; }
7053 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7055 cat >> confdefs.h <<EOF
7056 #define $cf_x_athena_LIBS 1
7064 for ac_prog in xcurses-config
7066 # Extract the first word of "$ac_prog", so it can be a program name with args.
7067 set dummy $ac_prog; ac_word=$2
7068 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7069 echo "configure:7070: checking for $ac_word" >&5
7070 if eval "test \"`echo '$''{'ac_cv_path_XCURSES_CONFIG'+set}'`\" = set"; then
7071 echo $ac_n "(cached) $ac_c" 1>&6
7073 case "$XCURSES_CONFIG" in
7075 ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a path.
7078 ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a dos path.
7081 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
7083 for ac_dir in $ac_dummy; do
7084 test -z "$ac_dir" && ac_dir=.
7085 if test -f $ac_dir/$ac_word; then
7086 ac_cv_path_XCURSES_CONFIG="$ac_dir/$ac_word"
7094 XCURSES_CONFIG="$ac_cv_path_XCURSES_CONFIG"
7095 if test -n "$XCURSES_CONFIG"; then
7096 echo "$ac_t""$XCURSES_CONFIG" 1>&6
7098 echo "$ac_t""no" 1>&6
7101 test -n "$XCURSES_CONFIG" && break
7103 test -n "$XCURSES_CONFIG" || XCURSES_CONFIG="none"
7106 if test "$XCURSES_CONFIG" != none ; then
7108 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
7109 LIBS="`$XCURSES_CONFIG --libs` $LIBS"
7111 cf_cv_lib_XCurses=yes
7115 LDFLAGS="$LDFLAGS $X_LIBS"
7117 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
7119 echo "${as_me-configure}:7120: testing checking additions to CFLAGS ..." 1>&5
7122 cf_check_cflags="$CFLAGS"
7123 cf_check_cppflags="$CPPFLAGS"
7128 cf_new_extra_cppflags=
7130 for cf_add_cflags in $X_CFLAGS
7132 case $cf_fix_cppflags in
7134 case $cf_add_cflags in #(vi
7135 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7136 case $cf_add_cflags in
7138 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7140 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7141 && test -z "${cf_tst_cflags}" \
7142 && cf_fix_cppflags=yes
7144 if test $cf_fix_cppflags = yes ; then
7145 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7147 elif test "${cf_tst_cflags}" = "\"'" ; then
7148 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7154 *$cf_add_cflags) #(vi
7157 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7162 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7167 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7169 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7171 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7172 && test -z "${cf_tst_cflags}" \
7173 && cf_fix_cppflags=no
7178 if test -n "$cf_new_cflags" ; then
7179 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
7181 echo "${as_me-configure}:7182: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
7184 CFLAGS="$CFLAGS $cf_new_cflags"
7187 if test -n "$cf_new_cppflags" ; then
7188 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
7190 echo "${as_me-configure}:7191: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
7193 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7196 if test -n "$cf_new_extra_cppflags" ; then
7197 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
7199 echo "${as_me-configure}:7200: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
7202 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7208 if test "$cf_check_cflags" != "$CFLAGS" ; then
7209 cat > conftest.$ac_ext <<EOF
7210 #line 7211 "configure"
7211 #include "confdefs.h"
7214 printf("Hello world");
7217 if { (eval echo configure:7218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7220 echo "configure: failed program was:" >&5
7221 cat conftest.$ac_ext >&5
7223 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
7225 echo "${as_me-configure}:7226: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
7228 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
7229 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
7231 echo "${as_me-configure}:7232: testing but keeping change to \$CPPFLAGS ..." 1>&5
7235 CFLAGS="$cf_check_flags"
7240 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
7241 echo "configure:7242: checking for XOpenDisplay in -lX11" >&5
7242 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
7243 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7244 echo $ac_n "(cached) $ac_c" 1>&6
7246 ac_save_LIBS="$LIBS"
7247 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
7248 cat > conftest.$ac_ext <<EOF
7249 #line 7250 "configure"
7250 #include "confdefs.h"
7251 /* Override any gcc2 internal prototype to avoid an error. */
7252 /* We use char because int might match the return type of a gcc2
7253 builtin and then its argument prototype would still apply. */
7254 char XOpenDisplay();
7260 if { (eval echo configure:7261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7262 eval "ac_cv_lib_$ac_lib_var=yes"
7264 echo "configure: failed program was:" >&5
7265 cat conftest.$ac_ext >&5
7267 eval "ac_cv_lib_$ac_lib_var=no"
7270 LIBS="$ac_save_LIBS"
7273 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7274 echo "$ac_t""yes" 1>&6
7277 echo "$ac_t""no" 1>&6
7280 echo $ac_n "checking for XCurses library""... $ac_c" 1>&6
7281 echo "configure:7282: checking for XCurses library" >&5
7282 if eval "test \"`echo '$''{'cf_cv_lib_XCurses'+set}'`\" = set"; then
7283 echo $ac_n "(cached) $ac_c" 1>&6
7286 LIBS="-lXCurses $LIBS"
7287 cat > conftest.$ac_ext <<EOF
7288 #line 7289 "configure"
7289 #include "confdefs.h"
7291 #include <xcurses.h>
7292 char *XCursesProgramName = "test";
7298 if { (eval echo configure:7299: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7300 cf_cv_lib_XCurses=yes
7302 echo "configure: failed program was:" >&5
7303 cat conftest.$ac_ext >&5
7305 cf_cv_lib_XCurses=no
7311 echo "$ac_t""$cf_cv_lib_XCurses" 1>&6
7315 if test $cf_cv_lib_XCurses = yes ; then
7316 cat >> confdefs.h <<\EOF
7320 cat >> confdefs.h <<\EOF
7324 cat >> confdefs.h <<\EOF
7325 #define HAVE_XCURSES 1
7329 { echo "configure: error: Cannot link with XCurses" 1>&2; exit 1; }
7337 case $cf_cv_screen in #(vi
7341 # look for curses-related libraries
7342 echo $ac_n "checking for new_panel in -lpanel$cf_cv_libtype""... $ac_c" 1>&6
7343 echo "configure:7344: checking for new_panel in -lpanel$cf_cv_libtype" >&5
7344 ac_lib_var=`echo panel$cf_cv_libtype'_'new_panel | sed 'y%./+-%__p_%'`
7345 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7346 echo $ac_n "(cached) $ac_c" 1>&6
7348 ac_save_LIBS="$LIBS"
7349 LIBS="-lpanel$cf_cv_libtype $LIBS"
7350 cat > conftest.$ac_ext <<EOF
7351 #line 7352 "configure"
7352 #include "confdefs.h"
7353 /* Override any gcc2 internal prototype to avoid an error. */
7354 /* We use char because int might match the return type of a gcc2
7355 builtin and then its argument prototype would still apply. */
7362 if { (eval echo configure:7363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7364 eval "ac_cv_lib_$ac_lib_var=yes"
7366 echo "configure: failed program was:" >&5
7367 cat conftest.$ac_ext >&5
7369 eval "ac_cv_lib_$ac_lib_var=no"
7372 LIBS="$ac_save_LIBS"
7375 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7376 echo "$ac_t""yes" 1>&6
7377 ac_tr_lib=HAVE_LIB`echo panel$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7378 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7379 cat >> confdefs.h <<EOF
7380 #define $ac_tr_lib 1
7383 LIBS="-lpanel$cf_cv_libtype $LIBS"
7386 echo "$ac_t""no" 1>&6
7389 echo $ac_n "checking for menu_driver in -lmenu$cf_cv_libtype""... $ac_c" 1>&6
7390 echo "configure:7391: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
7391 ac_lib_var=`echo menu$cf_cv_libtype'_'menu_driver | sed 'y%./+-%__p_%'`
7392 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7393 echo $ac_n "(cached) $ac_c" 1>&6
7395 ac_save_LIBS="$LIBS"
7396 LIBS="-lmenu$cf_cv_libtype $LIBS"
7397 cat > conftest.$ac_ext <<EOF
7398 #line 7399 "configure"
7399 #include "confdefs.h"
7400 /* Override any gcc2 internal prototype to avoid an error. */
7401 /* We use char because int might match the return type of a gcc2
7402 builtin and then its argument prototype would still apply. */
7409 if { (eval echo configure:7410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7411 eval "ac_cv_lib_$ac_lib_var=yes"
7413 echo "configure: failed program was:" >&5
7414 cat conftest.$ac_ext >&5
7416 eval "ac_cv_lib_$ac_lib_var=no"
7419 LIBS="$ac_save_LIBS"
7422 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7423 echo "$ac_t""yes" 1>&6
7424 ac_tr_lib=HAVE_LIB`echo menu$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7425 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7426 cat >> confdefs.h <<EOF
7427 #define $ac_tr_lib 1
7430 LIBS="-lmenu$cf_cv_libtype $LIBS"
7433 echo "$ac_t""no" 1>&6
7436 echo $ac_n "checking for form_driver in -lform$cf_cv_libtype""... $ac_c" 1>&6
7437 echo "configure:7438: checking for form_driver in -lform$cf_cv_libtype" >&5
7438 ac_lib_var=`echo form$cf_cv_libtype'_'form_driver | sed 'y%./+-%__p_%'`
7439 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7440 echo $ac_n "(cached) $ac_c" 1>&6
7442 ac_save_LIBS="$LIBS"
7443 LIBS="-lform$cf_cv_libtype $LIBS"
7444 cat > conftest.$ac_ext <<EOF
7445 #line 7446 "configure"
7446 #include "confdefs.h"
7447 /* Override any gcc2 internal prototype to avoid an error. */
7448 /* We use char because int might match the return type of a gcc2
7449 builtin and then its argument prototype would still apply. */
7456 if { (eval echo configure:7457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7458 eval "ac_cv_lib_$ac_lib_var=yes"
7460 echo "configure: failed program was:" >&5
7461 cat conftest.$ac_ext >&5
7463 eval "ac_cv_lib_$ac_lib_var=no"
7466 LIBS="$ac_save_LIBS"
7469 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7470 echo "$ac_t""yes" 1>&6
7471 ac_tr_lib=HAVE_LIB`echo form$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
7472 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
7473 cat >> confdefs.h <<EOF
7474 #define $ac_tr_lib 1
7477 LIBS="-lform$cf_cv_libtype $LIBS"
7480 echo "$ac_t""no" 1>&6
7484 # look for curses-related headers
7493 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7494 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7495 echo "configure:7496: checking for $ac_hdr" >&5
7496 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7497 echo $ac_n "(cached) $ac_c" 1>&6
7499 cat > conftest.$ac_ext <<EOF
7500 #line 7501 "configure"
7501 #include "confdefs.h"
7504 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7505 { (eval echo configure:7506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7506 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7507 if test -z "$ac_err"; then
7509 eval "ac_cv_header_$ac_safe=yes"
7512 echo "configure: failed program was:" >&5
7513 cat conftest.$ac_ext >&5
7515 eval "ac_cv_header_$ac_safe=no"
7519 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7520 echo "$ac_t""yes" 1>&6
7521 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7522 cat >> confdefs.h <<EOF
7523 #define $ac_tr_hdr 1
7527 echo "$ac_t""no" 1>&6
7534 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
7535 echo "configure:7536: checking return type of signal handlers" >&5
7536 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
7537 echo $ac_n "(cached) $ac_c" 1>&6
7539 cat > conftest.$ac_ext <<EOF
7540 #line 7541 "configure"
7541 #include "confdefs.h"
7542 #include <sys/types.h>
7548 extern "C" void (*signal (int, void (*)(int)))(int);
7550 void (*signal ()) ();
7557 if { (eval echo configure:7558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7559 ac_cv_type_signal=void
7561 echo "configure: failed program was:" >&5
7562 cat conftest.$ac_ext >&5
7564 ac_cv_type_signal=int
7569 echo "$ac_t""$ac_cv_type_signal" 1>&6
7570 cat >> confdefs.h <<EOF
7571 #define RETSIGTYPE $ac_cv_type_signal
7576 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
7577 echo "configure:7578: checking for ANSI C header files" >&5
7578 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
7579 echo $ac_n "(cached) $ac_c" 1>&6
7581 cat > conftest.$ac_ext <<EOF
7582 #line 7583 "configure"
7583 #include "confdefs.h"
7589 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7590 { (eval echo configure:7591: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7591 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7592 if test -z "$ac_err"; then
7594 ac_cv_header_stdc=yes
7597 echo "configure: failed program was:" >&5
7598 cat conftest.$ac_ext >&5
7600 ac_cv_header_stdc=no
7604 if test $ac_cv_header_stdc = yes; then
7605 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7606 cat > conftest.$ac_ext <<EOF
7607 #line 7608 "configure"
7608 #include "confdefs.h"
7611 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7612 egrep "memchr" >/dev/null 2>&1; then
7616 ac_cv_header_stdc=no
7622 if test $ac_cv_header_stdc = yes; then
7623 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7624 cat > conftest.$ac_ext <<EOF
7625 #line 7626 "configure"
7626 #include "confdefs.h"
7629 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7630 egrep "free" >/dev/null 2>&1; then
7634 ac_cv_header_stdc=no
7640 if test $ac_cv_header_stdc = yes; then
7641 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7642 if test "$cross_compiling" = yes; then
7645 cat > conftest.$ac_ext <<EOF
7646 #line 7647 "configure"
7647 #include "confdefs.h"
7649 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7650 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7651 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7652 int main () { int i; for (i = 0; i < 256; i++)
7653 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
7657 if { (eval echo configure:7658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7661 echo "configure: failed program was:" >&5
7662 cat conftest.$ac_ext >&5
7664 ac_cv_header_stdc=no
7672 echo "$ac_t""$ac_cv_header_stdc" 1>&6
7673 if test $ac_cv_header_stdc = yes; then
7674 cat >> confdefs.h <<\EOF
7675 #define STDC_HEADERS 1
7680 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
7681 echo "configure:7682: checking whether time.h and sys/time.h may both be included" >&5
7682 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
7683 echo $ac_n "(cached) $ac_c" 1>&6
7685 cat > conftest.$ac_ext <<EOF
7686 #line 7687 "configure"
7687 #include "confdefs.h"
7688 #include <sys/types.h>
7689 #include <sys/time.h>
7695 if { (eval echo configure:7696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7697 ac_cv_header_time=yes
7699 echo "configure: failed program was:" >&5
7700 cat conftest.$ac_ext >&5
7702 ac_cv_header_time=no
7707 echo "$ac_t""$ac_cv_header_time" 1>&6
7708 if test $ac_cv_header_time = yes; then
7709 cat >> confdefs.h <<\EOF
7710 #define TIME_WITH_SYS_TIME 1
7726 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7727 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7728 echo "configure:7729: checking for $ac_hdr" >&5
7729 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7730 echo $ac_n "(cached) $ac_c" 1>&6
7732 cat > conftest.$ac_ext <<EOF
7733 #line 7734 "configure"
7734 #include "confdefs.h"
7737 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7738 { (eval echo configure:7739: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7739 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7740 if test -z "$ac_err"; then
7742 eval "ac_cv_header_$ac_safe=yes"
7745 echo "configure: failed program was:" >&5
7746 cat conftest.$ac_ext >&5
7748 eval "ac_cv_header_$ac_safe=no"
7752 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7753 echo "$ac_t""yes" 1>&6
7754 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7755 cat >> confdefs.h <<EOF
7756 #define $ac_tr_hdr 1
7760 echo "$ac_t""no" 1>&6
7778 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7779 echo "configure:7780: checking for $ac_func" >&5
7780 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7781 echo $ac_n "(cached) $ac_c" 1>&6
7783 cat > conftest.$ac_ext <<EOF
7784 #line 7785 "configure"
7785 #include "confdefs.h"
7786 /* System header to define __stub macros and hopefully few prototypes,
7787 which can conflict with char $ac_func(); below. */
7789 /* Override any gcc2 internal prototype to avoid an error. */
7790 /* We use char because int might match the return type of a gcc2
7791 builtin and then its argument prototype would still apply. */
7796 /* The GNU C library defines this for functions which it implements
7797 to always fail with ENOSYS. Some functions are actually named
7798 something starting with __ and the normal name is an alias. */
7799 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7807 if { (eval echo configure:7808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7809 eval "ac_cv_func_$ac_func=yes"
7811 echo "configure: failed program was:" >&5
7812 cat conftest.$ac_ext >&5
7814 eval "ac_cv_func_$ac_func=no"
7819 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7820 echo "$ac_t""yes" 1>&6
7821 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7822 cat >> confdefs.h <<EOF
7823 #define $ac_tr_func 1
7827 echo "$ac_t""no" 1>&6
7833 echo $ac_n "checking if we must define _XOPEN_SOURCE_EXTENDED""... $ac_c" 1>&6
7834 echo "configure:7835: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7835 if eval "test \"`echo '$''{'cf_cv_need_xopen_extension'+set}'`\" = set"; then
7836 echo $ac_n "(cached) $ac_c" 1>&6
7839 cat > conftest.$ac_ext <<EOF
7840 #line 7841 "configure"
7841 #include "confdefs.h"
7844 #include <${cf_cv_ncurses_header-curses.h}>
7847 long x = winnstr(stdscr, "", 0);
7849 getbegyx(stdscr, y1, x1)
7852 if { (eval echo configure:7853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7854 cf_cv_need_xopen_extension=no
7856 echo "configure: failed program was:" >&5
7857 cat conftest.$ac_ext >&5
7859 cat > conftest.$ac_ext <<EOF
7860 #line 7861 "configure"
7861 #include "confdefs.h"
7863 #define _XOPEN_SOURCE_EXTENDED
7865 #include <${cf_cv_ncurses_header-curses.h}>
7868 long x = winnstr(stdscr, "", 0);
7870 getbegyx(stdscr, y1, x1)
7873 if { (eval echo configure:7874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7875 cf_cv_need_xopen_extension=yes
7877 echo "configure: failed program was:" >&5
7878 cat conftest.$ac_ext >&5
7880 cf_cv_need_xopen_extension=unknown
7887 echo "$ac_t""$cf_cv_need_xopen_extension" 1>&6
7888 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7891 echo $ac_n "checking for term.h""... $ac_c" 1>&6
7892 echo "configure:7893: checking for term.h" >&5
7893 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
7894 echo $ac_n "(cached) $ac_c" 1>&6
7898 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
7899 # for <term.h> if we do not find the variant.
7901 `echo ${cf_cv_ncurses_header-curses.h} | sed -e 's%/.*%/%'`term.h \
7904 cat > conftest.$ac_ext <<EOF
7905 #line 7906 "configure"
7906 #include "confdefs.h"
7908 #include <${cf_cv_ncurses_header-curses.h}>
7909 #include <${cf_header}>
7914 if { (eval echo configure:7915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7916 cf_cv_term_header=$cf_header
7919 echo "configure: failed program was:" >&5
7920 cat conftest.$ac_ext >&5
7922 cf_cv_term_header=no
7929 echo "$ac_t""$cf_cv_term_header" 1>&6
7931 case $cf_cv_term_header in #(vi
7933 cat >> confdefs.h <<\EOF
7934 #define HAVE_TERM_H 1
7939 cat >> confdefs.h <<\EOF
7940 #define HAVE_NCURSES_TERM_H 1
7945 cat >> confdefs.h <<\EOF
7946 #define HAVE_NCURSESW_TERM_H 1
7980 use_default_colors \
7988 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7990 echo $ac_n "checking for ${cf_func}""... $ac_c" 1>&6
7991 echo "configure:7992: checking for ${cf_func}" >&5
7993 echo "${as_me-configure}:7994: testing ${cf_func} ..." 1>&5
7995 if eval "test \"`echo '$''{'cf_cv_func_$cf_func'+set}'`\" = set"; then
7996 echo $ac_n "(cached) $ac_c" 1>&6
7999 eval cf_result='$ac_cv_func_'$cf_func
8000 if test ".$cf_result" != ".no"; then
8001 cat > conftest.$ac_ext <<EOF
8002 #line 8003 "configure"
8003 #include "confdefs.h"
8006 #include <xcurses.h>
8007 char * XCursesProgramName = "test";
8009 #include <${cf_cv_ncurses_header-curses.h}>
8010 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
8011 #include <ncursesw/term.h>
8013 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
8014 #include <ncurses/term.h>
8025 long foo = (long)(&${cf_func});
8026 ${cf_cv_main_return-return}(foo == 0);
8031 if { (eval echo configure:8032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8035 echo "configure: failed program was:" >&5
8036 cat conftest.$ac_ext >&5
8042 eval 'cf_cv_func_'$cf_func'=$cf_result'
8046 # use the computed/retrieved cache-value:
8047 eval 'cf_result=$cf_cv_func_'$cf_func
8048 echo "$ac_t""$cf_result" 1>&6
8049 if test $cf_result != no; then
8050 cat >> confdefs.h <<EOF
8051 #define HAVE_${cf_tr_func} 1
8058 echo $ac_n "checking for ncurses extended functions""... $ac_c" 1>&6
8059 echo "configure:8060: checking for ncurses extended functions" >&5
8060 if eval "test \"`echo '$''{'cf_cv_ncurses_ext_funcs'+set}'`\" = set"; then
8061 echo $ac_n "(cached) $ac_c" 1>&6
8064 cat > conftest.$ac_ext <<EOF
8065 #line 8066 "configure"
8066 #include "confdefs.h"
8068 #include <${cf_cv_ncurses_header-curses.h}>
8071 (void) assume_default_colors (0, 0);
8072 (void) curses_version ();
8073 (void) define_key (0, 0);
8074 (void) is_term_resized (0, 0);
8075 (void) key_defined (0);
8076 (void) keybound (0, 0);
8077 (void) keyok (0, 0);
8078 (void) resize_term (0, 0);
8079 (void) resizeterm (0, 0);
8080 (void) use_default_colors ();
8081 (void) use_extended_names (0);
8082 (void) wresize (0, 0, 0);
8085 if { (eval echo configure:8086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8087 cf_cv_ncurses_ext_funcs=yes
8089 echo "configure: failed program was:" >&5
8090 cat conftest.$ac_ext >&5
8092 cf_cv_ncurses_ext_funcs=no
8098 echo "$ac_t""$cf_cv_ncurses_ext_funcs" 1>&6
8099 test "$cf_cv_ncurses_ext_funcs" != no && cat >> confdefs.h <<\EOF
8100 #define NCURSES_EXT_FUNCS 1
8104 echo $ac_n "checking for wide-character functions""... $ac_c" 1>&6
8105 echo "configure:8106: checking for wide-character functions" >&5
8106 if eval "test \"`echo '$''{'cf_cv_widechar_funcs'+set}'`\" = set"; then
8107 echo $ac_n "(cached) $ac_c" 1>&6
8110 cat > conftest.$ac_ext <<EOF
8111 #line 8112 "configure"
8112 #include "confdefs.h"
8114 #include <${cf_cv_ncurses_header-curses.h}>
8117 static wchar_t src_wchar[2];
8118 static cchar_t dst_cchar;
8119 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
8123 if { (eval echo configure:8124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8125 cf_cv_widechar_funcs=yes
8127 echo "configure: failed program was:" >&5
8128 cat conftest.$ac_ext >&5
8130 cf_cv_widechar_funcs=no
8136 echo "$ac_t""$cf_cv_widechar_funcs" 1>&6
8137 if test "$cf_cv_widechar_funcs" != no ; then
8138 cat >> confdefs.h <<\EOF
8139 #define USE_WIDEC_SUPPORT 1
8143 cat >> confdefs.h <<\EOF
8144 #define USE_WIDEC_SUPPORT 0
8150 echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
8151 echo "configure:8152: checking if sys/time.h works with sys/select.h" >&5
8152 if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
8153 echo $ac_n "(cached) $ac_c" 1>&6
8156 cat > conftest.$ac_ext <<EOF
8157 #line 8158 "configure"
8158 #include "confdefs.h"
8160 #include <sys/types.h>
8161 #ifdef HAVE_SYS_TIME_H
8162 #include <sys/time.h>
8164 #ifdef HAVE_SYS_SELECT_H
8165 #include <sys/select.h>
8172 if { (eval echo configure:8173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8174 cf_cv_sys_time_select=yes
8176 echo "configure: failed program was:" >&5
8177 cat conftest.$ac_ext >&5
8179 cf_cv_sys_time_select=no
8185 echo "$ac_t""$cf_cv_sys_time_select" 1>&6
8186 test "$cf_cv_sys_time_select" = yes && cat >> confdefs.h <<\EOF
8187 #define HAVE_SYS_TIME_SELECT 1
8192 echo $ac_n "checking for function curses_version""... $ac_c" 1>&6
8193 echo "configure:8194: checking for function curses_version" >&5
8194 if eval "test \"`echo '$''{'cf_cv_func_curses_version'+set}'`\" = set"; then
8195 echo $ac_n "(cached) $ac_c" 1>&6
8198 if test "$cross_compiling" = yes; then
8199 cf_cv_func_curses_version=unknown
8201 cat > conftest.$ac_ext <<EOF
8202 #line 8203 "configure"
8203 #include "confdefs.h"
8205 #include <${cf_cv_ncurses_header-curses.h}>
8209 sprintf(temp, "%s\n", curses_version());
8210 ${cf_cv_main_return-return}(0);
8214 if { (eval echo configure:8215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8216 cf_cv_func_curses_version=yes
8219 echo "configure: failed program was:" >&5
8220 cat conftest.$ac_ext >&5
8222 cf_cv_func_curses_version=no
8231 echo "$ac_t""$cf_cv_func_curses_version" 1>&6
8232 test "$cf_cv_func_curses_version" = yes && cat >> confdefs.h <<\EOF
8233 #define HAVE_CURSES_VERSION 1
8238 echo $ac_n "checking for ncurses wrap-prefix""... $ac_c" 1>&6
8239 echo "configure:8240: checking for ncurses wrap-prefix" >&5
8241 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
8242 if test "${with_ncurses_wrap_prefix+set}" = set; then
8243 withval="$with_ncurses_wrap_prefix"
8244 NCURSES_WRAP_PREFIX=$withval
8246 NCURSES_WRAP_PREFIX=_nc_
8249 echo "$ac_t""$NCURSES_WRAP_PREFIX" 1>&6
8254 echo $ac_n "checking for alternate character set array""... $ac_c" 1>&6
8255 echo "configure:8256: checking for alternate character set array" >&5
8256 if eval "test \"`echo '$''{'cf_cv_curses_acs_map'+set}'`\" = set"; then
8257 echo $ac_n "(cached) $ac_c" 1>&6
8260 cf_cv_curses_acs_map=unknown
8261 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
8263 cat > conftest.$ac_ext <<EOF
8264 #line 8265 "configure"
8265 #include "confdefs.h"
8267 #include <${cf_cv_ncurses_header-curses.h}>
8271 $name['k'] = ACS_PLUS
8275 if { (eval echo configure:8276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8277 cf_cv_curses_acs_map=$name; break
8279 echo "configure: failed program was:" >&5
8280 cat conftest.$ac_ext >&5
8287 echo "$ac_t""$cf_cv_curses_acs_map" 1>&6
8289 test "$cf_cv_curses_acs_map" != unknown && cat >> confdefs.h <<EOF
8290 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
8295 echo $ac_n "checking for wide alternate character set array""... $ac_c" 1>&6
8296 echo "configure:8297: checking for wide alternate character set array" >&5
8297 if eval "test \"`echo '$''{'cf_cv_curses_wacs_map'+set}'`\" = set"; then
8298 echo $ac_n "(cached) $ac_c" 1>&6
8301 cf_cv_curses_wacs_map=unknown
8302 for name in wacs_map _wacs_map __wacs_map _nc_wacs
8304 cat > conftest.$ac_ext <<EOF
8305 #line 8306 "configure"
8306 #include "confdefs.h"
8308 #ifndef _XOPEN_SOURCE_EXTENDED
8309 #define _XOPEN_SOURCE_EXTENDED
8311 #include <${cf_cv_ncurses_header-curses.h}>
8313 $name['k'] = *WACS_PLUS
8316 if { (eval echo configure:8317: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8318 cf_cv_curses_wacs_map=$name
8321 echo "configure: failed program was:" >&5
8322 cat conftest.$ac_ext >&5
8328 echo "$ac_t""$cf_cv_curses_wacs_map" 1>&6
8331 echo $ac_n "checking for type attr_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
8332 echo "configure:8333: checking for type attr_t in ${cf_cv_ncurses_header-curses.h}" >&5
8333 cat > conftest.$ac_ext <<EOF
8334 #line 8335 "configure"
8335 #include "confdefs.h"
8337 #ifndef _XOPEN_SOURCE_EXTENDED
8338 #define _XOPEN_SOURCE_EXTENDED
8340 #include <${cf_cv_ncurses_header-curses.h}>
8347 if { (eval echo configure:8348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8351 echo "configure: failed program was:" >&5
8352 cat conftest.$ac_ext >&5
8357 echo "$ac_t""$cf_result" 1>&6
8358 if test $cf_result = yes ; then
8360 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8362 cat >> confdefs.h <<EOF
8363 #define $cf_result 1
8367 cat >> confdefs.h <<EOF
8374 echo $ac_n "checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
8375 echo "configure:8376: checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}" >&5
8376 cat > conftest.$ac_ext <<EOF
8377 #line 8378 "configure"
8378 #include "confdefs.h"
8380 #ifndef _XOPEN_SOURCE_EXTENDED
8381 #define _XOPEN_SOURCE_EXTENDED
8383 #include <${cf_cv_ncurses_header-curses.h}>
8390 if { (eval echo configure:8391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8394 echo "configure: failed program was:" >&5
8395 cat conftest.$ac_ext >&5
8400 echo "$ac_t""$cf_result" 1>&6
8401 if test $cf_result = yes ; then
8403 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8405 cat >> confdefs.h <<EOF
8406 #define $cf_result 1
8410 cat >> confdefs.h <<EOF
8411 #define mbstate_t long
8422 cat > confcache <<\EOF
8423 # This file is a shell script that caches the results of configure
8424 # tests run on this system so they can be shared between configure
8425 # scripts and configure runs. It is not useful on other systems.
8426 # If it contains results you don't want to keep, you may remove or edit it.
8428 # By default, configure uses ./config.cache as the cache file,
8429 # creating it if it does not exist already. You can give configure
8430 # the --cache-file=FILE option to use a different cache file; that is
8431 # what configure does when it calls configure scripts in
8432 # subdirectories, so they share the cache.
8433 # Giving --cache-file=/dev/null disables caching, for debugging configure.
8434 # config.status only pays attention to the cache file if you give it the
8435 # --recheck option to rerun configure.
8438 # The following way of writing the cache mishandles newlines in values,
8439 # but we know of no workaround that is simple, portable, and efficient.
8440 # So, don't put newlines in cache variables' values.
8441 # Ultrix sh set writes to stderr and can't be redirected directly,
8442 # and sets the high bit in the cache file unless we assign to the vars.
8444 case `(ac_space=' '; set | grep ac_space) 2>&1` in
8446 # `set' does not quote correctly, so add quotes (double-quote substitution
8447 # turns \\\\ into \\, and sed turns \\ into \).
8449 -e "s/'/'\\\\''/g" \
8450 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
8453 # `set' quotes correctly as required by POSIX, so do not add quotes.
8454 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
8457 if cmp -s $cache_file confcache; then
8460 if test -w $cache_file; then
8461 echo "updating cache $cache_file"
8462 cat confcache > $cache_file
8464 echo "not updating unwritable cache $cache_file"
8469 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
8471 test "x$prefix" = xNONE && prefix=$ac_default_prefix
8472 # Let make expand exec_prefix.
8473 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8475 # Any assignment to VPATH causes Sun make to only execute
8476 # the first set of double-colon rules, so remove it if not needed.
8477 # If there is a colon in the path, we need to keep it.
8478 if test "x$srcdir" = x.; then
8479 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
8482 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
8484 DEFS=-DHAVE_CONFIG_H
8486 # Without the "./", some shells look in PATH for config.status.
8487 : ${CONFIG_STATUS=./config.status}
8489 echo creating $CONFIG_STATUS
8490 rm -f $CONFIG_STATUS
8491 cat > $CONFIG_STATUS <<EOF
8493 # Generated automatically by configure.
8494 # Run this file to recreate the current configuration.
8495 # This directory was configured as follows,
8496 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
8498 # $0 $ac_configure_args
8500 # Compiler output produced by configure, useful for debugging
8501 # configure, is in ./config.log if it exists.
8503 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
8506 case "\$ac_option" in
8507 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8508 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
8509 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
8510 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
8511 echo "$CONFIG_STATUS generated by autoconf version 2.13.20030927"
8513 -help | --help | --hel | --he | --h)
8514 echo "\$ac_cs_usage"; exit 0 ;;
8515 *) echo "\$ac_cs_usage"; exit 1 ;;
8519 ac_given_srcdir=$srcdir
8521 trap 'rm -fr `echo "Makefile ncurses_cfg.h:ncurses_tst.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
8523 cat >> $CONFIG_STATUS <<EOF
8525 # Protect against being on the right side of a sed subst in config.status.
8526 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
8527 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
8531 s%@CFLAGS@%$CFLAGS%g
8532 s%@CPPFLAGS@%$CPPFLAGS%g
8533 s%@CXXFLAGS@%$CXXFLAGS%g
8534 s%@FFLAGS@%$FFLAGS%g
8536 s%@LDFLAGS@%$LDFLAGS%g
8538 s%@exec_prefix@%$exec_prefix%g
8539 s%@prefix@%$prefix%g
8540 s%@program_transform_name@%$program_transform_name%g
8541 s%@bindir@%$bindir%g
8542 s%@sbindir@%$sbindir%g
8543 s%@libexecdir@%$libexecdir%g
8544 s%@datadir@%$datadir%g
8545 s%@sysconfdir@%$sysconfdir%g
8546 s%@sharedstatedir@%$sharedstatedir%g
8547 s%@localstatedir@%$localstatedir%g
8548 s%@libdir@%$libdir%g
8549 s%@includedir@%$includedir%g
8550 s%@oldincludedir@%$oldincludedir%g
8551 s%@infodir@%$infodir%g
8552 s%@mandir@%$mandir%g
8554 s%@host_alias@%$host_alias%g
8555 s%@host_cpu@%$host_cpu%g
8556 s%@host_vendor@%$host_vendor%g
8557 s%@host_os@%$host_os%g
8558 s%@SET_MAKE@%$SET_MAKE%g
8562 s%@CC_G_OPT@%$CC_G_OPT%g
8563 s%@CC_SHARED_OPTS@%$CC_SHARED_OPTS%g
8564 s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g
8565 s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g
8566 s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
8568 s%@LDFLAGS_SHARED@%$LDFLAGS_SHARED%g
8569 s%@LDFLAGS_STATIC@%$LDFLAGS_STATIC%g
8570 s%@LD_MODEL@%$LD_MODEL%g
8571 s%@LD_SHARED_OPTS@%$LD_SHARED_OPTS%g
8572 s%@LIBTOOL@%$LIBTOOL%g
8573 s%@LIB_CLEAN@%$LIB_CLEAN%g
8574 s%@LIB_COMPILE@%$LIB_COMPILE%g
8575 s%@LIB_LINK@%$LIB_LINK%g
8576 s%@LINK_TESTS@%$LINK_TESTS%g
8578 s%@LINT_OPTS@%$LINT_OPTS%g
8579 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
8580 s%@MATH_LIB@%$MATH_LIB%g
8581 s%@PTHREAD@%$PTHREAD%g
8582 s%@TEST_ARGS@%$TEST_ARGS%g
8583 s%@TEST_DEPS@%$TEST_DEPS%g
8584 s%@TEST_LIBS@%$TEST_LIBS%g
8585 s%@TINFO_ARGS@%$TINFO_ARGS%g
8586 s%@cf_cv_abi_version@%$cf_cv_abi_version%g
8587 s%@cf_cv_rel_version@%$cf_cv_rel_version%g
8588 s%@EXEEXT@%$EXEEXT%g
8589 s%@OBJEXT@%$OBJEXT%g
8590 s%@EXTRA_CPPFLAGS@%$EXTRA_CPPFLAGS%g
8591 s%@ECHO_LT@%$ECHO_LT%g
8592 s%@ECHO_LD@%$ECHO_LD%g
8593 s%@RULE_CC@%$RULE_CC%g
8594 s%@SHOW_CC@%$SHOW_CC%g
8595 s%@ECHO_CC@%$ECHO_CC%g
8596 s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
8597 s%@NCURSES_CONFIG@%$NCURSES_CONFIG%g
8598 s%@X_CFLAGS@%$X_CFLAGS%g
8599 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
8600 s%@X_LIBS@%$X_LIBS%g
8601 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
8602 s%@XCURSES_CONFIG@%$XCURSES_CONFIG%g
8603 s%@NCURSES_WRAP_PREFIX@%$NCURSES_WRAP_PREFIX%g
8608 cat >> $CONFIG_STATUS <<\EOF
8610 # Split the substitutions into bite-sized pieces for seds with
8611 # small command number limits, like on Digital OSF/1 and HP-UX.
8612 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
8613 ac_file=1 # Number of current file.
8614 ac_beg=1 # First line for current file.
8615 ac_end=$ac_max_sed_cmds # Line after last line for current file.
8618 while $ac_more_lines; do
8619 if test $ac_beg -gt 1; then
8620 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
8622 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
8624 if test ! -s conftest.s$ac_file; then
8626 rm -f conftest.s$ac_file
8628 if test -z "$ac_sed_cmds"; then
8629 ac_sed_cmds="sed -f conftest.s$ac_file"
8631 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
8633 ac_file=`expr $ac_file + 1`
8635 ac_end=`expr $ac_end + $ac_max_sed_cmds`
8638 if test -z "$ac_sed_cmds"; then
8643 cat >> $CONFIG_STATUS <<EOF
8645 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
8647 cat >> $CONFIG_STATUS <<\EOF
8648 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
8649 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8651 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8652 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8653 *) ac_file_in="${ac_file}.in" ;;
8656 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
8658 # Remove last slash and all that follows it. Not all systems have dirname.
8659 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8660 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8661 # The file is in a subdirectory.
8662 test ! -d "$ac_dir" && mkdir "$ac_dir"
8663 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
8664 # A "../" for each directory in $ac_dir_suffix.
8665 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
8667 ac_dir_suffix= ac_dots=
8670 case "$ac_given_srcdir" in
8672 if test -z "$ac_dots"; then top_srcdir=.
8673 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
8674 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
8676 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
8677 top_srcdir="$ac_dots$ac_given_srcdir" ;;
8681 echo creating "$ac_file"
8683 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
8685 *Makefile*) ac_comsub="1i\\
8686 # $configure_input" ;;
8690 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8692 s%@configure_input@%$configure_input%g
8693 s%@srcdir@%$srcdir%g
8694 s%@top_srcdir@%$top_srcdir%g
8695 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
8699 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
8700 # NAME is the cpp macro being defined and VALUE is the value it is being given.
8702 # ac_d sets the value in "#define NAME VALUE" lines.
8703 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
8704 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
8707 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8708 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8709 ac_uB='\([ ]\)%\1#\2define\3'
8712 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8713 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8714 ac_eB='$%\1#\2define\3'
8718 if test "${CONFIG_HEADERS+set}" != set; then
8720 cat >> $CONFIG_STATUS <<EOF
8721 CONFIG_HEADERS="ncurses_cfg.h:ncurses_tst.hin"
8723 cat >> $CONFIG_STATUS <<\EOF
8725 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8726 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8728 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8729 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8730 *) ac_file_in="${ac_file}.in" ;;
8733 echo creating $ac_file
8735 rm -f conftest.frag conftest.in conftest.out
8736 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8737 cat $ac_file_inputs > conftest.in
8742 # Transform confdefs.h into a list of #define's. We won't use it as a sed
8743 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
8744 # be either 'cat' or 'sort'.
8745 cat confdefs.h >conftest.vals
8747 # Break up conftest.vals because some shells have a limit on
8748 # the size of here documents, and old seds have small limits too.
8751 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
8754 ac_lines=`grep -c . conftest.vals`
8755 # grep -c gives empty output for an empty file on some AIX systems.
8756 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8757 # Write chunks of a limited-size here document to conftest.frag.
8758 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
8759 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8760 echo 'CEOF' >> $CONFIG_STATUS
8761 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8763 mv conftest.tail conftest.vals
8767 # Run sed to substitute the contents of conftest.frag into conftest.in at the
8769 echo ' cat >> conftest.edit <<CEOF
8770 /@DEFS@/r conftest.frag
8773 sed -f conftest.edit conftest.in > conftest.out
8775 mv conftest.out conftest.in
8776 rm -f conftest.edit conftest.frag
8780 cat >> $CONFIG_STATUS <<\EOF
8781 rm -f conftest.frag conftest.h
8782 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
8783 cat conftest.in >> conftest.h
8785 if cmp -s $ac_file conftest.h 2>/dev/null; then
8786 echo "$ac_file is unchanged"
8789 # Remove last slash and all that follows it. Not all systems have dirname.
8790 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8791 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8792 # The file is in a subdirectory.
8793 test ! -d "$ac_dir" && mkdir "$ac_dir"
8796 mv conftest.h $ac_file
8801 cat >> $CONFIG_STATUS <<EOF
8802 # Extra initialization commands, if any
8808 cat >> $CONFIG_STATUS <<\EOF
8809 # Extra commands, if any
8814 if test ! -d $srcdir/$cf_dir; then
8816 elif test -f $srcdir/$cf_dir/programs; then
8817 $AWK -f $srcdir/mk-test.awk ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
8822 cat >>Makefile <<TEST_EOF
8824 # These rules are generated so we do not rely on suffix rules, which do not
8825 # work consistently for different make-programs (the '\$(MODEL)/' confuses
8826 # some, and the '\$x' confuses others).
8828 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
8831 cat >>Makefile <<TEST_EOF
8833 \$(MODEL)/$N.o : $N.c \\
8836 @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) $N.c
8842 chmod +x $CONFIG_STATUS
8843 rm -fr confdefs* $ac_clean_files
8844 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1