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
200 -host | --host | --hos | --ho)
202 -host=* | --host=* | --hos=* | --ho=*)
205 -includedir | --includedir | --includedi | --included | --include \
206 | --includ | --inclu | --incl | --inc)
207 ac_prev=includedir ;;
208 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
209 | --includ=* | --inclu=* | --incl=* | --inc=*)
210 includedir="$ac_optarg" ;;
212 -infodir | --infodir | --infodi | --infod | --info | --inf)
214 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
215 infodir="$ac_optarg" ;;
217 -libdir | --libdir | --libdi | --libd)
219 -libdir=* | --libdir=* | --libdi=* | --libd=*)
220 libdir="$ac_optarg" ;;
222 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
223 | --libexe | --libex | --libe)
224 ac_prev=libexecdir ;;
225 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
226 | --libexe=* | --libex=* | --libe=*)
227 libexecdir="$ac_optarg" ;;
229 -localstatedir | --localstatedir | --localstatedi | --localstated \
230 | --localstate | --localstat | --localsta | --localst \
231 | --locals | --local | --loca | --loc | --lo)
232 ac_prev=localstatedir ;;
233 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
234 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
235 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
236 localstatedir="$ac_optarg" ;;
238 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
240 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
241 mandir="$ac_optarg" ;;
244 # Obsolete; use --without-fp.
247 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
251 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
252 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
255 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
256 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
257 | --oldin | --oldi | --old | --ol | --o)
258 ac_prev=oldincludedir ;;
259 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
260 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
261 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
262 oldincludedir="$ac_optarg" ;;
264 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
266 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
267 prefix="$ac_optarg" ;;
269 -program-prefix | --program-prefix | --program-prefi | --program-pref \
270 | --program-pre | --program-pr | --program-p)
271 ac_prev=program_prefix ;;
272 -program-prefix=* | --program-prefix=* | --program-prefi=* \
273 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
274 program_prefix="$ac_optarg" ;;
276 -program-suffix | --program-suffix | --program-suffi | --program-suff \
277 | --program-suf | --program-su | --program-s)
278 ac_prev=program_suffix ;;
279 -program-suffix=* | --program-suffix=* | --program-suffi=* \
280 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
281 program_suffix="$ac_optarg" ;;
283 -program-transform-name | --program-transform-name \
284 | --program-transform-nam | --program-transform-na \
285 | --program-transform-n | --program-transform- \
286 | --program-transform | --program-transfor \
287 | --program-transfo | --program-transf \
288 | --program-trans | --program-tran \
289 | --progr-tra | --program-tr | --program-t)
290 ac_prev=program_transform_name ;;
291 -program-transform-name=* | --program-transform-name=* \
292 | --program-transform-nam=* | --program-transform-na=* \
293 | --program-transform-n=* | --program-transform-=* \
294 | --program-transform=* | --program-transfor=* \
295 | --program-transfo=* | --program-transf=* \
296 | --program-trans=* | --program-tran=* \
297 | --progr-tra=* | --program-tr=* | --program-t=*)
298 program_transform_name="$ac_optarg" ;;
300 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
301 | -silent | --silent | --silen | --sile | --sil)
304 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
306 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
308 sbindir="$ac_optarg" ;;
310 -sharedstatedir | --sharedstatedir | --sharedstatedi \
311 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
312 | --sharedst | --shareds | --shared | --share | --shar \
314 ac_prev=sharedstatedir ;;
315 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
316 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
317 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
319 sharedstatedir="$ac_optarg" ;;
321 -site | --site | --sit)
323 -site=* | --site=* | --sit=*)
326 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
328 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
329 srcdir="$ac_optarg" ;;
331 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
332 | --syscon | --sysco | --sysc | --sys | --sy)
333 ac_prev=sysconfdir ;;
334 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
335 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
336 sysconfdir="$ac_optarg" ;;
338 -target | --target | --targe | --targ | --tar | --ta | --t)
340 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
341 target="$ac_optarg" ;;
343 -v | -verbose | --verbose | --verbos | --verbo | --verb)
346 -version | --version | --versio | --versi | --vers)
347 echo "configure generated by autoconf version 2.13.20030927"
351 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
352 # Reject names that are not valid shell variable names.
353 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
354 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
356 ac_package=`echo $ac_package| sed 's/-/_/g'`
361 eval "with_${ac_package}='$ac_optarg'" ;;
363 -without-* | --without-*)
364 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
365 # Reject names that are not valid shell variable names.
366 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
367 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
369 ac_package=`echo $ac_package| sed 's/-/_/g'`
370 eval "with_${ac_package}=no" ;;
373 # Obsolete; use --with-x.
376 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
377 | --x-incl | --x-inc | --x-in | --x-i)
378 ac_prev=x_includes ;;
379 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
380 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
381 x_includes="$ac_optarg" ;;
383 -x-libraries | --x-libraries | --x-librarie | --x-librari \
384 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
385 ac_prev=x_libraries ;;
386 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
387 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
388 x_libraries="$ac_optarg" ;;
390 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
394 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
395 echo "configure: warning: $ac_option: invalid host type" 1>&2
397 if test "x$nonopt" != xNONE; then
398 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
406 if test -n "$ac_prev"; then
407 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
410 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
412 # File descriptor usage:
415 # 2 errors and warnings
416 # 3 some systems may open it to /dev/tty
417 # 4 used on the Kubota Titan
418 # 6 checking for... messages and results
419 # 5 compiler messages saved in config.log
420 if test "$silent" = yes; then
428 This file contains any messages produced by compilers while
429 running configure, to aid debugging if configure makes a mistake.
432 # Strip out --no-create and --no-recursion so they do not pile up.
433 # Also quote any args containing shell metacharacters.
438 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
439 | --no-cr | --no-c) ;;
440 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
441 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
442 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
443 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
444 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
449 # Only set these to C if already set. These must not be set unconditionally
450 # because not all systems understand e.g. LANG=C (notably SCO).
451 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
452 # Non-C LC_CTYPE values break the ctype check.
453 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
454 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
455 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
456 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
458 # confdefs.h avoids OS command line length limits that DEFS can exceed.
459 rm -rf conftest* confdefs.h
460 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
463 # A filename unique to this package, relative to the directory that
464 # configure is in, which we can look for to find out if srcdir is correct.
465 ac_unique_file=ncurses.c
467 # Find the source files, if location was not specified.
468 if test -z "$srcdir"; then
469 ac_srcdir_defaulted=yes
470 # Try the directory containing this script, then its parent.
472 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
473 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
475 if test ! -r $srcdir/$ac_unique_file; then
479 ac_srcdir_defaulted=no
481 if test ! -r $srcdir/$ac_unique_file; then
482 if test "$ac_srcdir_defaulted" = yes; then
483 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
485 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
488 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
490 # Prefer explicitly selected file to automatically selected ones.
491 if test -z "$CONFIG_SITE"; then
492 if test "x$prefix" != xNONE; then
493 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
495 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
498 for ac_site_file in $CONFIG_SITE; do
499 if test -r "$ac_site_file"; then
500 echo "loading site script $ac_site_file"
505 if test -r "$cache_file"; then
506 echo "loading cache $cache_file"
509 echo "creating cache $cache_file"
514 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
515 ac_cpp='$CPP $CPPFLAGS'
516 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
517 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
518 cross_compiling=$ac_cv_prog_cc_cross
522 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
523 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
524 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
531 ac_n= ac_c='\c' ac_t=
534 # If we find X, set shell vars x_includes and x_libraries to the
535 # paths, otherwise set no_x=yes.
536 # Uses ac_ vars as temps to allow command line to override cache and checks.
537 # --without-x overrides everything else, but does not touch the cache.
538 echo $ac_n "checking for X""... $ac_c" 1>&6
539 echo "configure:540: checking for X" >&5
542 # Check whether --with-x or --without-x was given.
543 if test "${with_x+set}" = set; then
548 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
549 if test "x$with_x" = xno; then
550 # The user explicitly disabled X.
553 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
554 # Both variables are already set.
557 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
558 echo $ac_n "(cached) $ac_c" 1>&6
560 # One or both of the vars are not set, and there is no cached value.
561 ac_x_includes=NO ac_x_libraries=NO
563 if mkdir conftestdir; then
565 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
566 cat > Imakefile <<'EOF'
568 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
570 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
571 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
572 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
573 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
574 for ac_extension in a so sl; do
575 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
576 test -f $ac_im_libdir/libX11.$ac_extension; then
577 ac_im_usrlibdir=$ac_im_libdir; break
580 # Screen out bogus values from the imake configuration. They are
581 # bogus both because they are the default anyway, and because
582 # using them would break gcc on systems where it needs fixed includes.
583 case "$ac_im_incroot" in
585 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
587 case "$ac_im_usrlibdir" in
589 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
596 if test "$ac_x_includes" = NO; then
597 # Guess where to find include files, by looking for this one X11 .h file.
598 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
600 # First, try using that file with no special directory specified.
601 cat > conftest.$ac_ext <<EOF
602 #line 603 "configure"
603 #include "confdefs.h"
604 #include <$x_direct_test_include>
606 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
607 { (eval echo configure:608: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
608 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
609 if test -z "$ac_err"; then
611 # We can compile using X headers with no special include directory.
615 echo "configure: failed program was:" >&5
616 cat conftest.$ac_ext >&5
618 # Look for the header file in a standard set of common directories.
619 # Check X11 before X11Rn because it is often a symlink to the current release.
631 /usr/local/X11/include \
632 /usr/local/X11R6/include \
633 /usr/local/X11R5/include \
634 /usr/local/X11R4/include \
636 /usr/local/include/X11 \
637 /usr/local/include/X11R6 \
638 /usr/local/include/X11R5 \
639 /usr/local/include/X11R4 \
643 /usr/XFree86/include/X11 \
647 /usr/unsupported/include \
648 /usr/athena/include \
649 /usr/local/x11r5/include \
650 /usr/lpp/Xamples/include \
652 /usr/openwin/include \
653 /usr/openwin/share/include \
656 if test -r "$ac_dir/$x_direct_test_include"; then
657 ac_x_includes=$ac_dir
663 fi # $ac_x_includes = NO
665 if test "$ac_x_libraries" = NO; then
666 # Check for the libraries.
668 test -z "$x_direct_test_library" && x_direct_test_library=Xt
669 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
671 # See if we find them without any special options.
672 # Don't add to $LIBS permanently.
674 LIBS="-l$x_direct_test_library $LIBS"
675 cat > conftest.$ac_ext <<EOF
676 #line 677 "configure"
677 #include "confdefs.h"
680 ${x_direct_test_function}()
683 if { (eval echo configure:684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
686 # We can link X programs with no special library path.
689 echo "configure: failed program was:" >&5
690 cat conftest.$ac_ext >&5
693 # First see if replacing the include by lib works.
694 # Check X11 before X11Rn because it is often a symlink to the current release.
695 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
707 /usr/local/X11R6/lib \
708 /usr/local/X11R5/lib \
709 /usr/local/X11R4/lib \
712 /usr/local/lib/X11R6 \
713 /usr/local/lib/X11R5 \
714 /usr/local/lib/X11R4 \
718 /usr/XFree86/lib/X11 \
722 /usr/unsupported/lib \
724 /usr/local/x11r5/lib \
725 /usr/lpp/Xamples/lib \
729 /usr/openwin/share/lib \
732 for ac_extension in a so sl; do
733 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
734 ac_x_libraries=$ac_dir
741 fi # $ac_x_libraries = NO
743 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
744 # Didn't find X anywhere. Cache the known absence of X.
745 ac_cv_have_x="have_x=no"
747 # Record where we found X for the cache.
748 ac_cv_have_x="have_x=yes \
749 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
756 if test "$have_x" != yes; then
757 echo "$ac_t""$have_x" 1>&6
760 # If each of the values was on the command line, it overrides each guess.
761 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
762 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
763 # Update the cache value to reflect the command line values.
764 ac_cv_have_x="have_x=yes \
765 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
766 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
773 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
776 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
779 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
780 if test -f $ac_dir/install-sh; then
782 ac_install_sh="$ac_aux_dir/install-sh -c"
784 elif test -f $ac_dir/install.sh; then
786 ac_install_sh="$ac_aux_dir/install.sh -c"
790 if test -z "$ac_aux_dir"; then
791 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
793 ac_config_guess=$ac_aux_dir/config.guess
794 ac_config_sub=$ac_aux_dir/config.sub
795 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
798 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
800 # Make sure we can run config.sub.
801 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
802 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
805 echo $ac_n "checking host system type""... $ac_c" 1>&6
806 echo "configure:807: checking host system type" >&5
809 case "$host_alias" in
813 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
814 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
816 *) host_alias=$nonopt ;;
820 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
821 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
822 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
823 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
824 echo "$ac_t""$host" 1>&6
826 system_name="$host_os"
828 system_name="`(uname -s -r) 2>/dev/null`"
829 if test -z "$system_name" ; then
830 system_name="`(hostname) 2>/dev/null`"
833 test -n "$system_name" && cat >> confdefs.h <<EOF
834 #define SYSTEM_NAME "$system_name"
837 if eval "test \"`echo '$''{'cf_cv_system_name'+set}'`\" = set"; then
838 echo $ac_n "(cached) $ac_c" 1>&6
840 cf_cv_system_name="$system_name"
844 test -z "$system_name" && system_name="$cf_cv_system_name"
845 test -n "$cf_cv_system_name" && echo "$ac_t""Configuring for $cf_cv_system_name" 1>&6
847 if test ".$system_name" != ".$cf_cv_system_name" ; then
848 echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6
849 { echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; }
853 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
854 echo "configure:855: checking whether ${MAKE-make} sets \${MAKE}" >&5
855 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
856 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
857 echo $ac_n "(cached) $ac_c" 1>&6
859 cat > conftestmake <<\EOF
861 @echo 'ac_maketemp="${MAKE}"'
863 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
864 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
865 if test -n "$ac_maketemp"; then
866 eval ac_cv_prog_make_${ac_make}_set=yes
868 eval ac_cv_prog_make_${ac_make}_set=no
872 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
873 echo "$ac_t""yes" 1>&6
876 echo "$ac_t""no" 1>&6
877 SET_MAKE="MAKE=${MAKE-make}"
880 # Extract the first word of "gcc", so it can be a program name with args.
881 set dummy gcc; ac_word=$2
882 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
883 echo "configure:884: checking for $ac_word" >&5
884 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
885 echo $ac_n "(cached) $ac_c" 1>&6
887 if test -n "$CC"; then
888 ac_cv_prog_CC="$CC" # Let the user override the test.
890 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
892 for ac_dir in $ac_dummy; do
893 test -z "$ac_dir" && ac_dir=.
894 if test -f $ac_dir/$ac_word; then
903 if test -n "$CC"; then
904 echo "$ac_t""$CC" 1>&6
906 echo "$ac_t""no" 1>&6
909 if test -z "$CC"; then
910 # Extract the first word of "cc", so it can be a program name with args.
911 set dummy cc; ac_word=$2
912 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
913 echo "configure:914: checking for $ac_word" >&5
914 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
915 echo $ac_n "(cached) $ac_c" 1>&6
917 if test -n "$CC"; then
918 ac_cv_prog_CC="$CC" # Let the user override the test.
920 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
923 for ac_dir in $ac_dummy; do
924 test -z "$ac_dir" && ac_dir=.
925 if test -f $ac_dir/$ac_word; then
926 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
935 if test $ac_prog_rejected = yes; then
936 # We found a bogon in the path, so make sure we never use it.
937 set dummy $ac_cv_prog_CC
939 if test $# -gt 0; then
940 # We chose a different compiler from the bogus one.
941 # However, it has the same basename, so the bogon will be chosen
942 # first if we set CC to just the basename; use the full file name.
944 set dummy "$ac_dir/$ac_word" "$@"
952 if test -n "$CC"; then
953 echo "$ac_t""$CC" 1>&6
955 echo "$ac_t""no" 1>&6
958 if test -z "$CC"; then
961 # Extract the first word of "cl", so it can be a program name with args.
962 set dummy cl; ac_word=$2
963 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
964 echo "configure:965: checking for $ac_word" >&5
965 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
966 echo $ac_n "(cached) $ac_c" 1>&6
968 if test -n "$CC"; then
969 ac_cv_prog_CC="$CC" # Let the user override the test.
971 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
973 for ac_dir in $ac_dummy; do
974 test -z "$ac_dir" && ac_dir=.
975 if test -f $ac_dir/$ac_word; then
984 if test -n "$CC"; then
985 echo "$ac_t""$CC" 1>&6
987 echo "$ac_t""no" 1>&6
992 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
995 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
996 echo "configure:997: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
999 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1000 ac_cpp='$CPP $CPPFLAGS'
1001 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1002 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1003 cross_compiling=$ac_cv_prog_cc_cross
1005 cat > conftest.$ac_ext << EOF
1007 #line 1008 "configure"
1008 #include "confdefs.h"
1012 if { (eval echo configure:1013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1013 ac_cv_prog_cc_works=yes
1014 # If we can't run a trivial program, we are probably using a cross compiler.
1015 if (./conftest; exit) 2>/dev/null; then
1016 ac_cv_prog_cc_cross=no
1018 ac_cv_prog_cc_cross=yes
1021 echo "configure: failed program was:" >&5
1022 cat conftest.$ac_ext >&5
1023 ac_cv_prog_cc_works=no
1027 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1028 ac_cpp='$CPP $CPPFLAGS'
1029 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1030 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1031 cross_compiling=$ac_cv_prog_cc_cross
1033 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1034 if test $ac_cv_prog_cc_works = no; then
1035 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1037 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1038 echo "configure:1039: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1039 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1040 cross_compiling=$ac_cv_prog_cc_cross
1042 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1043 echo "configure:1044: checking whether we are using GNU C" >&5
1044 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1045 echo $ac_n "(cached) $ac_c" 1>&6
1047 cat > conftest.c <<EOF
1052 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1059 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1061 if test $ac_cv_prog_gcc = yes; then
1067 ac_test_CFLAGS="${CFLAGS+set}"
1068 ac_save_CFLAGS="$CFLAGS"
1070 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1071 echo "configure:1072: checking whether ${CC-cc} accepts -g" >&5
1072 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1073 echo $ac_n "(cached) $ac_c" 1>&6
1075 echo 'void f(){}' > conftest.c
1076 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1085 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1086 if test "$ac_test_CFLAGS" = set; then
1087 CFLAGS="$ac_save_CFLAGS"
1088 elif test $ac_cv_prog_cc_g = yes; then
1089 if test "$GCC" = yes; then
1095 if test "$GCC" = yes; then
1102 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1103 echo "configure:1104: checking how to run the C preprocessor" >&5
1104 # On Suns, sometimes $CPP names a directory.
1105 if test -n "$CPP" && test -d "$CPP"; then
1108 if test -z "$CPP"; then
1109 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1110 echo $ac_n "(cached) $ac_c" 1>&6
1112 # This must be in double quotes, not single quotes, because CPP may get
1113 # substituted into the Makefile and "${CC-cc}" will confuse make.
1115 # On the NeXT, cc -E runs the code through the compiler's parser,
1116 # not just through cpp.
1117 cat > conftest.$ac_ext <<EOF
1118 #line 1119 "configure"
1119 #include "confdefs.h"
1123 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1124 { (eval echo configure:1125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1125 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1126 if test -z "$ac_err"; then
1130 echo "configure: failed program was:" >&5
1131 cat conftest.$ac_ext >&5
1133 CPP="${CC-cc} -E -traditional-cpp"
1134 cat > conftest.$ac_ext <<EOF
1135 #line 1136 "configure"
1136 #include "confdefs.h"
1140 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1141 { (eval echo configure:1142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1142 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1143 if test -z "$ac_err"; then
1147 echo "configure: failed program was:" >&5
1148 cat conftest.$ac_ext >&5
1150 CPP="${CC-cc} -nologo -E"
1151 cat > conftest.$ac_ext <<EOF
1152 #line 1153 "configure"
1153 #include "confdefs.h"
1157 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1158 { (eval echo configure:1159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1159 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1160 if test -z "$ac_err"; then
1164 echo "configure: failed program was:" >&5
1165 cat conftest.$ac_ext >&5
1174 ac_cv_prog_CPP="$CPP"
1176 CPP="$ac_cv_prog_CPP"
1178 ac_cv_prog_CPP="$CPP"
1180 echo "$ac_t""$CPP" 1>&6
1182 for ac_prog in mawk gawk nawk awk
1184 # Extract the first word of "$ac_prog", so it can be a program name with args.
1185 set dummy $ac_prog; ac_word=$2
1186 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1187 echo "configure:1188: checking for $ac_word" >&5
1188 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1189 echo $ac_n "(cached) $ac_c" 1>&6
1191 if test -n "$AWK"; then
1192 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1194 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1196 for ac_dir in $ac_dummy; do
1197 test -z "$ac_dir" && ac_dir=.
1198 if test -f $ac_dir/$ac_word; then
1199 ac_cv_prog_AWK="$ac_prog"
1206 AWK="$ac_cv_prog_AWK"
1207 if test -n "$AWK"; then
1208 echo "$ac_t""$AWK" 1>&6
1210 echo "$ac_t""no" 1>&6
1213 test -n "$AWK" && break
1218 CC_SHARED_OPTS=unknown
1219 CPPFLAGS="$CPPFLAGS"
1221 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
1222 DFT_UPR_MODEL="NORMAL"
1241 TINFO_ARGS='$(LIBS_CURSES)'
1242 cf_cv_abi_version=""
1243 cf_cv_rel_version=""
1248 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1249 echo "configure:1250: checking for Cygwin environment" >&5
1250 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1251 echo $ac_n "(cached) $ac_c" 1>&6
1253 cat > conftest.$ac_ext <<EOF
1254 #line 1255 "configure"
1255 #include "confdefs.h"
1260 #define __CYGWIN__ __CYGWIN32__
1265 if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1269 echo "configure: failed program was:" >&5
1270 cat conftest.$ac_ext >&5
1278 echo "$ac_t""$ac_cv_cygwin" 1>&6
1280 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1281 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1282 echo "configure:1283: checking for mingw32 environment" >&5
1283 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1284 echo $ac_n "(cached) $ac_c" 1>&6
1286 cat > conftest.$ac_ext <<EOF
1287 #line 1288 "configure"
1288 #include "confdefs.h"
1294 if { (eval echo configure:1295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1298 echo "configure: failed program was:" >&5
1299 cat conftest.$ac_ext >&5
1307 echo "$ac_t""$ac_cv_mingw32" 1>&6
1309 test "$ac_cv_mingw32" = yes && MINGW32=yes
1312 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1313 echo "configure:1314: checking for executable suffix" >&5
1314 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1315 echo $ac_n "(cached) $ac_c" 1>&6
1317 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1321 echo 'int main () { return 0; }' > conftest.$ac_ext
1323 if { (eval echo configure:1324: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1324 for file in conftest.*; do
1326 *.c | *.o | *.obj) ;;
1327 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1331 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1334 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1339 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1340 echo "$ac_t""${ac_cv_exeext}" 1>&6
1343 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1344 echo "configure:1345: checking for object suffix" >&5
1345 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1346 echo $ac_n "(cached) $ac_c" 1>&6
1349 echo 'int i = 1;' > conftest.$ac_ext
1350 if { (eval echo configure:1351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1351 for ac_file in conftest.*; do
1354 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1358 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1363 echo "$ac_t""$ac_cv_objext" 1>&6
1364 OBJEXT=$ac_cv_objext
1365 ac_objext=$ac_cv_objext
1369 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1370 echo "configure:1371: checking for ${CC-cc} option to accept ANSI C" >&5
1371 if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
1372 echo $ac_n "(cached) $ac_c" 1>&6
1376 cf_save_CFLAGS="$CFLAGS"
1377 cf_save_CPPFLAGS="$CPPFLAGS"
1378 # Don't try gcc -ansi; that turns off useful extensions and
1379 # breaks some systems' header files.
1380 # AIX -qlanglvl=ansi
1381 # Ultrix and OSF/1 -std1
1382 # HP-UX -Aa -D_HPUX_SOURCE
1384 # UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
1385 for cf_arg in "-DCC_HAS_PROTOS" \
1390 "-Aa -D_HPUX_SOURCE" \
1397 cf_new_extra_cppflags=
1399 for cf_add_cflags in $cf_arg
1401 case $cf_fix_cppflags in
1403 case $cf_add_cflags in #(vi
1404 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1405 case $cf_add_cflags in
1407 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1409 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1410 && test -z "${cf_tst_cflags}" \
1411 && cf_fix_cppflags=yes
1413 if test $cf_fix_cppflags = yes ; then
1414 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1416 elif test "${cf_tst_cflags}" = "\"'" ; then
1417 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1423 *$cf_add_cflags) #(vi
1426 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1431 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1436 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1438 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1440 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1441 && test -z "${cf_tst_cflags}" \
1442 && cf_fix_cppflags=no
1447 if test -n "$cf_new_cflags" ; then
1449 CFLAGS="$CFLAGS $cf_new_cflags"
1452 if test -n "$cf_new_cppflags" ; then
1454 CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
1457 if test -n "$cf_new_extra_cppflags" ; then
1459 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1465 cat > conftest.$ac_ext <<EOF
1466 #line 1467 "configure"
1467 #include "confdefs.h"
1469 #ifndef CC_HAS_PROTOS
1470 #if !defined(__STDC__) || (__STDC__ != 1)
1477 int test (int i, double x);
1478 struct s1 {int (*f) (int a);};
1479 struct s2 {int (*f) (double a);};
1482 if { (eval echo configure:1483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1484 cf_cv_ansi_cc="$cf_arg"; break
1486 echo "configure: failed program was:" >&5
1487 cat conftest.$ac_ext >&5
1491 CFLAGS="$cf_save_CFLAGS"
1492 CPPFLAGS="$cf_save_CPPFLAGS"
1496 echo "$ac_t""$cf_cv_ansi_cc" 1>&6
1498 if test "$cf_cv_ansi_cc" != "no"; then
1499 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
1504 cf_new_extra_cppflags=
1506 for cf_add_cflags in $cf_cv_ansi_cc
1508 case $cf_fix_cppflags in
1510 case $cf_add_cflags in #(vi
1511 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1512 case $cf_add_cflags in
1514 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1516 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1517 && test -z "${cf_tst_cflags}" \
1518 && cf_fix_cppflags=yes
1520 if test $cf_fix_cppflags = yes ; then
1521 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1523 elif test "${cf_tst_cflags}" = "\"'" ; then
1524 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1530 *$cf_add_cflags) #(vi
1533 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1538 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1543 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1545 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1547 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1548 && test -z "${cf_tst_cflags}" \
1549 && cf_fix_cppflags=no
1554 if test -n "$cf_new_cflags" ; then
1556 CFLAGS="$CFLAGS $cf_new_cflags"
1559 if test -n "$cf_new_cppflags" ; then
1561 CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
1564 if test -n "$cf_new_extra_cppflags" ; then
1566 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1573 cat >> confdefs.h <<\EOF
1574 #define CC_HAS_PROTOS 1
1581 if test "$cf_cv_ansi_cc" = "no"; then
1582 { echo "configure: error: Your compiler does not appear to recognize prototypes.
1583 You have the following choices:
1584 a. adjust your compiler options
1585 b. get an up-to-date compiler
1586 c. use a wrapper such as unproto" 1>&2; exit 1; }
1590 if test "$GCC" = yes
1592 cat > conftest.i <<EOF
1594 #define GCC_PRINTF 0
1599 #ifndef GCC_NORETURN
1600 #define GCC_NORETURN /* nothing */
1603 #define GCC_UNUSED /* nothing */
1606 if test "$GCC" = yes
1608 echo "checking for $CC __attribute__ directives" 1>&6
1609 echo "configure:1610: checking for $CC __attribute__ directives" >&5
1610 cat > conftest.$ac_ext <<EOF
1611 #line 1612 "${as_me-configure}"
1612 #include "confdefs.h"
1613 #include "conftest.h"
1614 #include "conftest.i"
1616 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
1618 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
1621 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
1623 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
1625 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
1626 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
1627 extern void foo(void) GCC_NORETURN;
1628 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
1630 for cf_attribute in scanf printf unused noreturn
1633 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1635 cf_directive="__attribute__(($cf_attribute))"
1636 echo "checking for $CC $cf_directive" 1>&5
1637 case $cf_attribute in
1639 cat >conftest.h <<EOF
1640 #define GCC_$cf_ATTRIBUTE 1
1644 cat >conftest.h <<EOF
1645 #define GCC_$cf_ATTRIBUTE $cf_directive
1649 if { (eval echo configure:1650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1650 test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
1651 cat conftest.h >>confdefs.h
1655 fgrep define conftest.i >>confdefs.h
1661 echo $ac_n "checking if $CC -U and -D options work together""... $ac_c" 1>&6
1662 echo "configure:1663: checking if $CC -U and -D options work together" >&5
1663 if eval "test \"`echo '$''{'cf_cv_cc_u_d_options'+set}'`\" = set"; then
1664 echo $ac_n "(cached) $ac_c" 1>&6
1667 cf_save_CPPFLAGS="$CPPFLAGS"
1668 CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
1669 cat > conftest.$ac_ext <<EOF
1670 #line 1671 "configure"
1671 #include "confdefs.h"
1676 make an undefined-error
1679 make a defined-error
1684 if { (eval echo configure:1685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1687 cf_cv_cc_u_d_options=yes
1689 echo "configure: failed program was:" >&5
1690 cat conftest.$ac_ext >&5
1693 cf_cv_cc_u_d_options=no
1696 CPPFLAGS="$cf_save_CPPFLAGS"
1700 echo "$ac_t""$cf_cv_cc_u_d_options" 1>&6
1707 cf_POSIX_C_SOURCE=199506L
1709 case $host_os in #(vi
1711 CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
1714 # 5.x headers associate
1715 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
1716 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
1717 cf_POSIX_C_SOURCE=200112L
1719 CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1722 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
1725 CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
1727 linux*|gnu*|k*bsd*-gnu) #(vi
1729 echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
1730 echo "configure:1731: checking if we must define _GNU_SOURCE" >&5
1731 if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
1732 echo $ac_n "(cached) $ac_c" 1>&6
1735 cat > conftest.$ac_ext <<EOF
1736 #line 1737 "configure"
1737 #include "confdefs.h"
1738 #include <sys/types.h>
1741 #ifndef _XOPEN_SOURCE
1746 if { (eval echo configure:1747: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1750 echo "configure: failed program was:" >&5
1751 cat conftest.$ac_ext >&5
1754 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1755 cat > conftest.$ac_ext <<EOF
1756 #line 1757 "configure"
1757 #include "confdefs.h"
1758 #include <sys/types.h>
1761 #ifdef _XOPEN_SOURCE
1766 if { (eval echo configure:1767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1770 echo "configure: failed program was:" >&5
1771 cat conftest.$ac_ext >&5
1773 cf_cv_gnu_source=yes
1783 echo "$ac_t""$cf_cv_gnu_source" 1>&6
1784 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1788 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
1791 # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
1794 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
1797 CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
1800 CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
1803 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
1806 CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
1809 echo $ac_n "checking if we should define _XOPEN_SOURCE""... $ac_c" 1>&6
1810 echo "configure:1811: checking if we should define _XOPEN_SOURCE" >&5
1811 if eval "test \"`echo '$''{'cf_cv_xopen_source'+set}'`\" = set"; then
1812 echo $ac_n "(cached) $ac_c" 1>&6
1815 cat > conftest.$ac_ext <<EOF
1816 #line 1817 "configure"
1817 #include "confdefs.h"
1818 #include <sys/types.h>
1821 #ifndef _XOPEN_SOURCE
1826 if { (eval echo configure:1827: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1828 cf_cv_xopen_source=no
1830 echo "configure: failed program was:" >&5
1831 cat conftest.$ac_ext >&5
1834 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1835 cat > conftest.$ac_ext <<EOF
1836 #line 1837 "configure"
1837 #include "confdefs.h"
1838 #include <sys/types.h>
1841 #ifdef _XOPEN_SOURCE
1846 if { (eval echo configure:1847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1848 cf_cv_xopen_source=no
1850 echo "configure: failed program was:" >&5
1851 cat conftest.$ac_ext >&5
1853 cf_cv_xopen_source=$cf_XOPEN_SOURCE
1863 echo "$ac_t""$cf_cv_xopen_source" 1>&6
1864 if test "$cf_cv_xopen_source" != no ; then
1866 # remove _XOPEN_SOURCE symbol from $CFLAGS
1867 CFLAGS=`echo "$CFLAGS" | \
1868 sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
1869 -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
1872 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
1873 CPPFLAGS=`echo "$CPPFLAGS" | \
1874 sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
1875 -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
1877 test "$cf_cv_cc_u_d_options" = yes && \
1878 CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
1879 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
1882 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
1884 cf_save_CFLAGS="$CFLAGS"
1885 cf_save_CPPFLAGS="$CPPFLAGS"
1888 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
1889 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
1890 sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
1891 -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
1894 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
1895 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
1896 sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
1897 -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
1900 echo $ac_n "checking if we should define _POSIX_C_SOURCE""... $ac_c" 1>&6
1901 echo "configure:1902: checking if we should define _POSIX_C_SOURCE" >&5
1902 if eval "test \"`echo '$''{'cf_cv_posix_c_source'+set}'`\" = set"; then
1903 echo $ac_n "(cached) $ac_c" 1>&6
1907 echo "${as_me-configure}:1908: testing if the symbol is already defined go no further ..." 1>&5
1909 cat > conftest.$ac_ext <<EOF
1910 #line 1911 "configure"
1911 #include "confdefs.h"
1912 #include <sys/types.h>
1915 #ifndef _POSIX_C_SOURCE
1920 if { (eval echo configure:1921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1922 cf_cv_posix_c_source=no
1924 echo "configure: failed program was:" >&5
1925 cat conftest.$ac_ext >&5
1927 cf_want_posix_source=no
1928 case .$cf_POSIX_C_SOURCE in #(vi
1930 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
1933 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
1934 cf_want_posix_source=yes
1937 cf_want_posix_source=yes
1940 if test "$cf_want_posix_source" = yes ; then
1941 cat > conftest.$ac_ext <<EOF
1942 #line 1943 "configure"
1943 #include "confdefs.h"
1944 #include <sys/types.h>
1947 #ifdef _POSIX_SOURCE
1952 if { (eval echo configure:1953: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1955 echo "configure: failed program was:" >&5
1956 cat conftest.$ac_ext >&5
1958 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
1963 echo "${as_me-configure}:1964: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
1965 CFLAGS="$cf_trim_CFLAGS"
1966 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
1968 echo "${as_me-configure}:1969: testing if the second compile does not leave our definition intact error ..." 1>&5
1970 cat > conftest.$ac_ext <<EOF
1971 #line 1972 "configure"
1972 #include "confdefs.h"
1973 #include <sys/types.h>
1976 #ifndef _POSIX_C_SOURCE
1981 if { (eval echo configure:1982: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1984 echo "configure: failed program was:" >&5
1985 cat conftest.$ac_ext >&5
1987 cf_cv_posix_c_source=no
1990 CFLAGS="$cf_save_CFLAGS"
1991 CPPFLAGS="$cf_save_CPPFLAGS"
1998 echo "$ac_t""$cf_cv_posix_c_source" 1>&6
2000 if test "$cf_cv_posix_c_source" != no ; then
2001 CFLAGS="$cf_trim_CFLAGS"
2002 CPPFLAGS="$cf_trim_CPPFLAGS"
2003 if test "$cf_cv_cc_u_d_options" = yes ; then
2004 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
2005 sed -e 's/-D/-U/g' -e 's/=[^ ]*//g'`
2006 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
2008 CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
2015 echo $ac_n "checking for working const""... $ac_c" 1>&6
2016 echo "configure:2017: checking for working const" >&5
2017 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2018 echo $ac_n "(cached) $ac_c" 1>&6
2020 cat > conftest.$ac_ext <<EOF
2021 #line 2022 "configure"
2022 #include "confdefs.h"
2026 /* Ultrix mips cc rejects this. */
2027 typedef int charset[2]; const charset x;
2028 /* SunOS 4.1.1 cc rejects this. */
2029 char const *const *ccp;
2031 /* NEC SVR4.0.2 mips cc rejects this. */
2032 struct point {int x, y;};
2033 static struct point const zero = {0,0};
2034 /* AIX XL C 1.02.0.0 rejects this.
2035 It does not let you subtract one const X* pointer from another in an arm
2036 of an if-expression whose if-part is not a constant expression */
2037 const char *g = "string";
2038 ccp = &g + (g ? g-g : 0);
2039 /* HPUX 7.0 cc rejects these. */
2042 ccp = (char const *const *) p;
2043 { /* SCO 3.2v4 cc rejects this. */
2045 char const *s = 0 ? (char *) 0 : (char const *) 0;
2049 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2051 const int *foo = &x[0];
2054 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2055 typedef const int *iptr;
2059 { /* AIX XL C 1.02.0.0 rejects this saying
2060 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2061 struct s { int j; const int *ap[3]; };
2062 struct s *b; b->j = 5;
2064 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2070 if { (eval echo configure:2071: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2074 echo "configure: failed program was:" >&5
2075 cat conftest.$ac_ext >&5
2082 echo "$ac_t""$ac_cv_c_const" 1>&6
2083 if test $ac_cv_c_const = no; then
2084 cat >> confdefs.h <<\EOF
2091 echo $ac_n "checking for signal global datatype""... $ac_c" 1>&6
2092 echo "configure:2093: checking for signal global datatype" >&5
2093 if eval "test \"`echo '$''{'cf_cv_sig_atomic_t'+set}'`\" = set"; then
2094 echo $ac_n "(cached) $ac_c" 1>&6
2098 "volatile sig_atomic_t" \
2102 cat > conftest.$ac_ext <<EOF
2103 #line 2104 "configure"
2104 #include "confdefs.h"
2106 #include <sys/types.h>
2112 static void handler(int sig)
2117 signal(SIGINT, handler);
2121 if { (eval echo configure:2122: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2123 cf_cv_sig_atomic_t=$cf_type
2125 echo "configure: failed program was:" >&5
2126 cat conftest.$ac_ext >&5
2128 cf_cv_sig_atomic_t=no
2131 test "$cf_cv_sig_atomic_t" != no && break
2136 echo "$ac_t""$cf_cv_sig_atomic_t" 1>&6
2137 test "$cf_cv_sig_atomic_t" != no && cat >> confdefs.h <<EOF
2138 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
2144 echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6
2145 echo "configure:2146: checking if you want to see long compiling messages" >&5
2147 # Check whether --enable-echo or --disable-echo was given.
2148 if test "${enable_echo+set}" = set; then
2149 enableval="$enable_echo"
2150 test "$enableval" != no && enableval=yes
2151 if test "$enableval" != "yes" ; then
2154 ECHO_LD='@echo linking $@;'
2155 RULE_CC=' @echo compiling $<'
2156 SHOW_CC=' @echo compiling $@'
2163 RULE_CC='# compiling'
2164 SHOW_CC='# compiling'
2173 RULE_CC='# compiling'
2174 SHOW_CC='# compiling'
2180 echo "$ac_t""$enableval" 1>&6
2190 if test "$GCC" = yes ; then
2191 echo $ac_n "checking version of $CC""... $ac_c" 1>&6
2192 echo "configure:2193: checking version of $CC" >&5
2193 GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2194 test -z "$GCC_VERSION" && GCC_VERSION=unknown
2195 echo "$ac_t""$GCC_VERSION" 1>&6
2199 if ( test "$GCC" = yes || test "$GXX" = yes )
2201 echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
2202 echo "configure:2203: checking if you want to turn on gcc warnings" >&5
2204 # Check whether --enable-warnings or --disable-warnings was given.
2205 if test "${enable_warnings+set}" = set; then
2206 enableval="$enable_warnings"
2207 test "$enableval" != yes && enableval=no
2208 if test "$enableval" != "no" ; then
2219 echo "$ac_t""$with_warnings" 1>&6
2220 if test "$with_warnings" = "yes"
2227 if test "$GCC" = yes ; then
2230 echo $ac_n "checking if this is really Intel C compiler""... $ac_c" 1>&6
2231 echo "configure:2232: checking if this is really Intel C compiler" >&5
2232 cf_save_CFLAGS="$CFLAGS"
2233 CFLAGS="$CFLAGS -no-gcc"
2234 cat > conftest.$ac_ext <<EOF
2235 #line 2236 "configure"
2236 #include "confdefs.h"
2240 #ifdef __INTEL_COMPILER
2247 if { (eval echo configure:2248: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2250 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
2253 echo "configure: failed program was:" >&5
2254 cat conftest.$ac_ext >&5
2257 CFLAGS="$cf_save_CFLAGS"
2258 echo "$ac_t""$INTEL_COMPILER" 1>&6
2264 cat > conftest.$ac_ext <<EOF
2265 #line 2266 "${as_me-configure}"
2266 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
2269 if test "$INTEL_COMPILER" = yes
2271 # The "-wdXXX" options suppress warnings:
2272 # remark #1419: external declaration in primary source file
2273 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
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 #269: invalid format string conversion
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"
2299 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
2300 if { (eval echo configure:2301: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2301 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
2302 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
2305 CFLAGS="$cf_save_CFLAGS"
2307 elif test "$GCC" = yes
2309 echo "checking for $CC warning options" 1>&6
2310 echo "configure:2311: checking for $CC warning options" >&5
2311 cf_save_CFLAGS="$CFLAGS"
2312 EXTRA_CFLAGS="-W -Wall"
2314 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
2316 Wbad-function-cast \
2320 Wmissing-declarations \
2321 Wmissing-prototypes \
2325 Wstrict-prototypes \
2326 Wundef $cf_warn_CONST
2328 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
2329 if { (eval echo configure:2330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2330 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
2331 case $cf_opt in #(vi
2333 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
2336 case $GCC_VERSION in
2338 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
2340 echo "${as_me-configure}:2341: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
2347 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
2350 CFLAGS="$cf_save_CFLAGS"
2362 # Check whether --with-curses-dir or --without-curses-dir was given.
2363 if test "${with_curses_dir+set}" = set; then
2364 withval="$with_curses_dir"
2366 if test "x$prefix" != xNONE; then
2367 cf_path_syntax="$prefix"
2369 cf_path_syntax="$ac_default_prefix"
2372 case ".$withval" in #(vi
2373 .\$\(*\)*|.\'*\'*) #(vi
2377 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2380 eval withval="$withval"
2381 case ".$withval" in #(vi
2383 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2388 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2391 { echo "configure: error: expected a pathname, not \"$withval\"" 1>&2; exit 1; }
2395 cf_cv_curses_dir=$withval
2403 # Check whether --with-5lib or --without-5lib was given.
2404 if test "${with_5lib+set}" = set; then
2405 withval="$with_5lib"
2406 LIBS="-L/usr/5lib $LIBS"
2407 CPPFLAGS="$CPPFLAGS -I/usr/5include"
2412 # Check whether --with-ncursesw or --without-ncursesw was given.
2413 if test "${with_ncursesw+set}" = set; then
2414 withval="$with_ncursesw"
2415 cf_cv_screen=ncursesw
2420 # Check whether --with-ncurses or --without-ncurses was given.
2421 if test "${with_ncurses+set}" = set; then
2422 withval="$with_ncurses"
2423 cf_cv_screen=ncurses
2428 # Check whether --with-pdcurses or --without-pdcurses was given.
2429 if test "${with_pdcurses+set}" = set; then
2430 withval="$with_pdcurses"
2431 cf_cv_screen=pdcurses
2439 case $cf_cv_screen in
2443 echo $ac_n "checking for extra include directories""... $ac_c" 1>&6
2444 echo "configure:2445: checking for extra include directories" >&5
2445 if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then
2446 echo $ac_n "(cached) $ac_c" 1>&6
2449 cf_cv_curses_incdir=no
2450 case $host_os in #(vi
2452 test -d /usr/include/curses_colr && \
2453 cf_cv_curses_incdir="-I/usr/include/curses_colr"
2456 test -d /usr/5lib && \
2457 test -d /usr/5include && \
2458 cf_cv_curses_incdir="-I/usr/5include"
2464 echo "$ac_t""$cf_cv_curses_incdir" 1>&6
2465 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$cf_cv_curses_incdir $CPPFLAGS"
2468 echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
2469 echo "configure:2470: checking if we have identified curses headers" >&5
2470 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
2471 echo $ac_n "(cached) $ac_c" 1>&6
2474 cf_cv_ncurses_header=none
2481 cat > conftest.$ac_ext <<EOF
2482 #line 2483 "configure"
2483 #include "confdefs.h"
2484 #include <${cf_header}>
2486 initscr(); tgoto("?", 0,0)
2489 if { (eval echo configure:2490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2491 cf_cv_ncurses_header=$cf_header; break
2493 echo "configure: failed program was:" >&5
2494 cat conftest.$ac_ext >&5
2501 echo "$ac_t""$cf_cv_ncurses_header" 1>&6
2503 if test "$cf_cv_ncurses_header" = none ; then
2504 { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
2507 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
2508 for ac_hdr in $cf_cv_ncurses_header
2510 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2511 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2512 echo "configure:2513: checking for $ac_hdr" >&5
2513 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2514 echo $ac_n "(cached) $ac_c" 1>&6
2516 cat > conftest.$ac_ext <<EOF
2517 #line 2518 "configure"
2518 #include "confdefs.h"
2521 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2522 { (eval echo configure:2523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2523 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2524 if test -z "$ac_err"; then
2526 eval "ac_cv_header_$ac_safe=yes"
2529 echo "configure: failed program was:" >&5
2530 cat conftest.$ac_ext >&5
2532 eval "ac_cv_header_$ac_safe=no"
2536 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2537 echo "$ac_t""yes" 1>&6
2538 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2539 cat >> confdefs.h <<EOF
2540 #define $ac_tr_hdr 1
2544 echo "$ac_t""no" 1>&6
2550 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
2551 echo "configure:2552: checking for terminfo header" >&5
2552 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
2553 echo $ac_n "(cached) $ac_c" 1>&6
2556 case ${cf_cv_ncurses_header} in #(vi
2557 */ncurses.h|*/ncursesw.h) #(vi
2558 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
2561 cf_term_header=term.h
2565 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
2567 cat > conftest.$ac_ext <<EOF
2568 #line 2569 "configure"
2569 #include "confdefs.h"
2571 #include <${cf_cv_ncurses_header-curses.h}>
2575 int x = auto_left_margin
2578 if { (eval echo configure:2579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2581 cf_cv_term_header="$cf_test"
2583 echo "configure: failed program was:" >&5
2584 cat conftest.$ac_ext >&5
2587 cf_cv_term_header=unknown
2591 test "$cf_cv_term_header" != unknown && break
2596 echo "$ac_t""$cf_cv_term_header" 1>&6
2598 # Set definitions to allow ifdef'ing to accommodate subdirectories
2600 case $cf_cv_term_header in # (vi
2602 cat >> confdefs.h <<\EOF
2603 #define HAVE_TERM_H 1
2609 case $cf_cv_term_header in # (vi
2610 ncurses/term.h) #(vi
2611 cat >> confdefs.h <<\EOF
2612 #define HAVE_NCURSES_TERM_H 1
2617 cat >> confdefs.h <<\EOF
2618 #define HAVE_NCURSESW_TERM_H 1
2626 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
2627 echo "configure:2628: checking for ncurses version" >&5
2628 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
2629 echo $ac_n "(cached) $ac_c" 1>&6
2632 cf_cv_ncurses_version=no
2635 if test "$cross_compiling" = yes; then
2638 # This will not work if the preprocessor splits the line after the
2639 # Autoconf token. The 'unproto' program does that.
2640 cat > conftest.$ac_ext <<EOF
2641 #include <${cf_cv_ncurses_header-curses.h}>
2643 #ifdef NCURSES_VERSION
2644 Autoconf NCURSES_VERSION
2652 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
2653 { (eval echo configure:2654: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
2654 if test -f conftest.out ; then
2655 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
2656 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
2661 cat > conftest.$ac_ext <<EOF
2662 #line 2663 "configure"
2663 #include "confdefs.h"
2665 #include <${cf_cv_ncurses_header-curses.h}>
2669 FILE *fp = fopen("$cf_tempfile", "w");
2670 #ifdef NCURSES_VERSION
2671 # ifdef NCURSES_VERSION_PATCH
2672 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
2674 fprintf(fp, "%s\n", NCURSES_VERSION);
2678 fprintf(fp, "old\n");
2683 ${cf_cv_main_return-return}(0);
2686 if { (eval echo configure:2687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2689 cf_cv_ncurses_version=`cat $cf_tempfile`
2691 echo "configure: failed program was:" >&5
2692 cat conftest.$ac_ext >&5
2701 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
2702 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
2709 echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
2710 echo "configure:2711: checking if we have identified curses libraries" >&5
2711 cat > conftest.$ac_ext <<EOF
2712 #line 2713 "configure"
2713 #include "confdefs.h"
2714 #include <${cf_cv_ncurses_header-curses.h}>
2716 initscr(); tgoto("?", 0,0)
2719 if { (eval echo configure:2720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2723 echo "configure: failed program was:" >&5
2724 cat conftest.$ac_ext >&5
2729 echo "$ac_t""$cf_result" 1>&6
2731 if test "$cf_result" = no ; then
2732 case $host_os in #(vi
2734 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
2735 echo "configure:2736: checking for tgoto in -lmytinfo" >&5
2736 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
2737 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2738 echo $ac_n "(cached) $ac_c" 1>&6
2740 ac_save_LIBS="$LIBS"
2741 LIBS="-lmytinfo $LIBS"
2742 cat > conftest.$ac_ext <<EOF
2743 #line 2744 "configure"
2744 #include "confdefs.h"
2745 /* Override any gcc2 internal prototype to avoid an error. */
2746 /* We use char because int might match the return type of a gcc2
2747 builtin and then its argument prototype would still apply. */
2754 if { (eval echo configure:2755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2756 eval "ac_cv_lib_$ac_lib_var=yes"
2758 echo "configure: failed program was:" >&5
2759 cat conftest.$ac_ext >&5
2761 eval "ac_cv_lib_$ac_lib_var=no"
2764 LIBS="$ac_save_LIBS"
2767 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2768 echo "$ac_t""yes" 1>&6
2769 LIBS="-lmytinfo $LIBS"
2771 echo "$ac_t""no" 1>&6
2776 echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
2777 echo "configure:2778: checking for initscr in -lcur_colr" >&5
2778 ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
2779 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2780 echo $ac_n "(cached) $ac_c" 1>&6
2782 ac_save_LIBS="$LIBS"
2783 LIBS="-lcur_colr $LIBS"
2784 cat > conftest.$ac_ext <<EOF
2785 #line 2786 "configure"
2786 #include "confdefs.h"
2787 /* Override any gcc2 internal prototype to avoid an error. */
2788 /* We use char because int might match the return type of a gcc2
2789 builtin and then its argument prototype would still apply. */
2796 if { (eval echo configure:2797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2798 eval "ac_cv_lib_$ac_lib_var=yes"
2800 echo "configure: failed program was:" >&5
2801 cat conftest.$ac_ext >&5
2803 eval "ac_cv_lib_$ac_lib_var=no"
2806 LIBS="$ac_save_LIBS"
2809 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2810 echo "$ac_t""yes" 1>&6
2812 LIBS="-lcur_colr $LIBS"
2813 ac_cv_func_initscr=yes
2816 echo "$ac_t""no" 1>&6
2818 echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
2819 echo "configure:2820: checking for initscr in -lHcurses" >&5
2820 ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
2821 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2822 echo $ac_n "(cached) $ac_c" 1>&6
2824 ac_save_LIBS="$LIBS"
2825 LIBS="-lHcurses $LIBS"
2826 cat > conftest.$ac_ext <<EOF
2827 #line 2828 "configure"
2828 #include "confdefs.h"
2829 /* Override any gcc2 internal prototype to avoid an error. */
2830 /* We use char because int might match the return type of a gcc2
2831 builtin and then its argument prototype would still apply. */
2838 if { (eval echo configure:2839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2840 eval "ac_cv_lib_$ac_lib_var=yes"
2842 echo "configure: failed program was:" >&5
2843 cat conftest.$ac_ext >&5
2845 eval "ac_cv_lib_$ac_lib_var=no"
2848 LIBS="$ac_save_LIBS"
2851 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2852 echo "$ac_t""yes" 1>&6
2854 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
2855 LIBS="-lHcurses $LIBS"
2856 CPPFLAGS="-D__HP_CURSES -D_HP_CURSES $CPPFLAGS"
2857 ac_cv_func_initscr=yes
2860 echo "$ac_t""no" 1>&6
2866 linux*) # Suse Linux does not follow /usr/lib convention
2868 if test -n "/lib" ; then
2869 for cf_add_libdir in /lib
2871 if test $cf_add_libdir = /usr/lib ; then
2873 elif test -d $cf_add_libdir
2876 if test -n "$LDFLAGS$LIBS" ; then
2877 # a loop is needed to ensure we can add subdirs of existing dirs
2878 for cf_test_libdir in $LDFLAGS $LIBS ; do
2879 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
2880 cf_have_libdir=yes; break
2884 if test "$cf_have_libdir" = no ; then
2885 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
2887 echo "${as_me-configure}:2888: testing adding $cf_add_libdir to library-path ..." 1>&5
2890 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
2898 if test -d /usr/5lib ; then
2900 if test -n "/usr/5lib" ; then
2901 for cf_add_libdir in /usr/5lib
2903 if test $cf_add_libdir = /usr/lib ; then
2905 elif test -d $cf_add_libdir
2908 if test -n "$LDFLAGS$LIBS" ; then
2909 # a loop is needed to ensure we can add subdirs of existing dirs
2910 for cf_test_libdir in $LDFLAGS $LIBS ; do
2911 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
2912 cf_have_libdir=yes; break
2916 if test "$cf_have_libdir" = no ; then
2917 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
2919 echo "${as_me-configure}:2920: testing adding $cf_add_libdir to library-path ..." 1>&5
2922 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
2928 LIBS="$LIBS -lcurses -ltermcap"
2930 ac_cv_func_initscr=yes
2934 if test ".$ac_cv_func_initscr" != .yes ; then
2935 cf_save_LIBS="$LIBS"
2939 if test ".${cf_cv_ncurses_version-no}" != .no
2941 cf_check_list="ncurses curses cursesX"
2943 cf_check_list="cursesX curses ncurses"
2946 # Check for library containing tgoto. Do this before curses library
2947 # because it may be needed to link the test-case for initscr.
2948 echo $ac_n "checking for tgoto""... $ac_c" 1>&6
2949 echo "configure:2950: checking for tgoto" >&5
2950 if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
2951 echo $ac_n "(cached) $ac_c" 1>&6
2953 cat > conftest.$ac_ext <<EOF
2954 #line 2955 "configure"
2955 #include "confdefs.h"
2956 /* System header to define __stub macros and hopefully few prototypes,
2957 which can conflict with char tgoto(); below. */
2959 /* Override any gcc2 internal prototype to avoid an error. */
2960 /* We use char because int might match the return type of a gcc2
2961 builtin and then its argument prototype would still apply. */
2966 /* The GNU C library defines this for functions which it implements
2967 to always fail with ENOSYS. Some functions are actually named
2968 something starting with __ and the normal name is an alias. */
2969 #if defined (__stub_tgoto) || defined (__stub___tgoto)
2977 if { (eval echo configure:2978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2979 eval "ac_cv_func_tgoto=yes"
2981 echo "configure: failed program was:" >&5
2982 cat conftest.$ac_ext >&5
2984 eval "ac_cv_func_tgoto=no"
2989 if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then
2990 echo "$ac_t""yes" 1>&6
2991 cf_term_lib=predefined
2993 echo "$ac_t""no" 1>&6
2995 for cf_term_lib in $cf_check_list termcap termlib unknown
2997 echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
2998 echo "configure:2999: checking for tgoto in -l$cf_term_lib" >&5
2999 ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
3000 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3001 echo $ac_n "(cached) $ac_c" 1>&6
3003 ac_save_LIBS="$LIBS"
3004 LIBS="-l$cf_term_lib $LIBS"
3005 cat > conftest.$ac_ext <<EOF
3006 #line 3007 "configure"
3007 #include "confdefs.h"
3008 /* Override any gcc2 internal prototype to avoid an error. */
3009 /* We use char because int might match the return type of a gcc2
3010 builtin and then its argument prototype would still apply. */
3017 if { (eval echo configure:3018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3019 eval "ac_cv_lib_$ac_lib_var=yes"
3021 echo "configure: failed program was:" >&5
3022 cat conftest.$ac_ext >&5
3024 eval "ac_cv_lib_$ac_lib_var=no"
3027 LIBS="$ac_save_LIBS"
3030 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3031 echo "$ac_t""yes" 1>&6
3034 echo "$ac_t""no" 1>&6
3042 # Check for library containing initscr
3043 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
3044 for cf_curs_lib in $cf_check_list xcurses jcurses unknown
3046 echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
3047 echo "configure:3048: checking for initscr in -l$cf_curs_lib" >&5
3048 ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
3049 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3050 echo $ac_n "(cached) $ac_c" 1>&6
3052 ac_save_LIBS="$LIBS"
3053 LIBS="-l$cf_curs_lib $LIBS"
3054 cat > conftest.$ac_ext <<EOF
3055 #line 3056 "configure"
3056 #include "confdefs.h"
3057 /* Override any gcc2 internal prototype to avoid an error. */
3058 /* We use char because int might match the return type of a gcc2
3059 builtin and then its argument prototype would still apply. */
3066 if { (eval echo configure:3067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3068 eval "ac_cv_lib_$ac_lib_var=yes"
3070 echo "configure: failed program was:" >&5
3071 cat conftest.$ac_ext >&5
3073 eval "ac_cv_lib_$ac_lib_var=no"
3076 LIBS="$ac_save_LIBS"
3079 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3080 echo "$ac_t""yes" 1>&6
3083 echo "$ac_t""no" 1>&6
3087 test $cf_curs_lib = unknown && { echo "configure: error: no curses library found" 1>&2; exit 1; }
3089 LIBS="-l$cf_curs_lib $cf_save_LIBS"
3090 if test "$cf_term_lib" = unknown ; then
3091 echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
3092 echo "configure:3093: checking if we can link with $cf_curs_lib library" >&5
3093 cat > conftest.$ac_ext <<EOF
3094 #line 3095 "configure"
3095 #include "confdefs.h"
3096 #include <${cf_cv_ncurses_header-curses.h}>
3101 if { (eval echo configure:3102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3105 echo "configure: failed program was:" >&5
3106 cat conftest.$ac_ext >&5
3111 echo "$ac_t""$cf_result" 1>&6
3112 test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; }
3113 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
3115 elif test "$cf_term_lib" != predefined ; then
3116 echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
3117 echo "configure:3118: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
3118 cat > conftest.$ac_ext <<EOF
3119 #line 3120 "configure"
3120 #include "confdefs.h"
3121 #include <${cf_cv_ncurses_header-curses.h}>
3123 initscr(); tgoto((char *)0, 0, 0);
3126 if { (eval echo configure:3127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3130 echo "configure: failed program was:" >&5
3131 cat conftest.$ac_ext >&5
3134 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
3135 cat > conftest.$ac_ext <<EOF
3136 #line 3137 "configure"
3137 #include "confdefs.h"
3138 #include <${cf_cv_ncurses_header-curses.h}>
3143 if { (eval echo configure:3144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3147 echo "configure: failed program was:" >&5
3148 cat conftest.$ac_ext >&5
3156 echo "$ac_t""$cf_result" 1>&6
3166 cf_ncuhdr_root=ncurses
3168 test -n "$cf_cv_curses_dir" && \
3169 test "$cf_cv_curses_dir" != "no" && { \
3171 if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
3172 for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
3174 while test $cf_add_incdir != /usr/include
3176 if test -d $cf_add_incdir
3179 if test -n "$CFLAGS$CPPFLAGS" ; then
3180 # a loop is needed to ensure we can add subdirs of existing dirs
3181 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3182 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3183 cf_have_incdir=yes; break
3188 if test "$cf_have_incdir" = no ; then
3189 if test "$cf_add_incdir" = /usr/local/include ; then
3190 if test "$GCC" = yes
3192 cf_save_CPPFLAGS=$CPPFLAGS
3193 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3194 cat > conftest.$ac_ext <<EOF
3195 #line 3196 "configure"
3196 #include "confdefs.h"
3202 if { (eval echo configure:3203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3205 echo "configure: failed program was:" >&5
3206 cat conftest.$ac_ext >&5
3211 CPPFLAGS=$cf_save_CPPFLAGS
3216 if test "$cf_have_incdir" = no ; then
3217 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3219 echo "${as_me-configure}:3220: testing adding $cf_add_incdir to include-path ..." 1>&5
3222 CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
3224 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3225 test "$cf_top_incdir" = "$cf_add_incdir" && break
3226 cf_add_incdir="$cf_top_incdir"
3237 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
3238 echo "configure:3239: checking for $cf_ncuhdr_root header in include-path" >&5
3239 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
3240 echo $ac_n "(cached) $ac_c" 1>&6
3243 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
3244 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
3245 for cf_header in $cf_header_list
3248 cat > conftest.$ac_ext <<EOF
3249 #line 3250 "configure"
3250 #include "confdefs.h"
3253 #include <$cf_header>
3256 #ifdef NCURSES_VERSION
3258 printf("%s\n", NCURSES_VERSION);
3270 if { (eval echo configure:3271: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3272 cf_cv_ncurses_h=$cf_header
3275 echo "configure: failed program was:" >&5
3276 cat conftest.$ac_ext >&5
3282 test "$cf_cv_ncurses_h" != no && break
3287 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
3291 if test "$cf_cv_ncurses_h" != no ; then
3292 cf_cv_ncurses_header=$cf_cv_ncurses_h
3295 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
3296 echo "configure:3297: checking for $cf_ncuhdr_root include-path" >&5
3297 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
3298 echo $ac_n "(cached) $ac_c" 1>&6
3301 test -n "$verbose" && echo
3305 test "/usr" != "$prefix" && \
3307 (test $prefix = NONE || test -d $prefix) && {
3308 test -n "$verbose" && echo " ... testing for include-directories under /usr"
3309 test -d /usr/include && cf_search="$cf_search /usr/include"
3310 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
3311 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
3312 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
3313 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3317 test "$prefix" != "NONE" && \
3318 test -d "$prefix" && \
3320 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
3321 test -d $prefix/include && cf_search="$cf_search $prefix/include"
3322 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
3323 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
3324 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
3325 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3329 test "/usr/local" != "$prefix" && \
3330 test -d "/usr/local" && \
3331 (test $prefix = NONE || test -d $prefix) && {
3332 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
3333 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
3334 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
3335 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
3336 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
3337 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3341 test "/opt" != "$prefix" && \
3343 (test $prefix = NONE || test -d $prefix) && {
3344 test -n "$verbose" && echo " ... testing for include-directories under /opt"
3345 test -d /opt/include && cf_search="$cf_search /opt/include"
3346 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
3347 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
3348 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
3349 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3353 test "$HOME" != "$prefix" && \
3354 test -d "$HOME" && \
3355 (test $prefix = NONE || test -d $prefix) && {
3356 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
3357 test -d $HOME/include && cf_search="$cf_search $HOME/include"
3358 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
3359 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
3360 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
3361 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3365 test "$includedir" != NONE && \
3366 test "$includedir" != "/usr/include" && \
3367 test -d "$includedir" && {
3368 test -d $includedir && cf_search="$cf_search $includedir"
3369 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
3372 test "$oldincludedir" != NONE && \
3373 test "$oldincludedir" != "/usr/include" && \
3374 test -d "$oldincludedir" && {
3375 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
3376 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
3380 test -n "$verbose" && echo search path $cf_search
3381 cf_save2_CPPFLAGS="$CPPFLAGS"
3382 for cf_incdir in $cf_search
3385 if test -n "$cf_incdir" ; then
3386 for cf_add_incdir in $cf_incdir
3388 while test $cf_add_incdir != /usr/include
3390 if test -d $cf_add_incdir
3393 if test -n "$CFLAGS$CPPFLAGS" ; then
3394 # a loop is needed to ensure we can add subdirs of existing dirs
3395 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3396 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3397 cf_have_incdir=yes; break
3402 if test "$cf_have_incdir" = no ; then
3403 if test "$cf_add_incdir" = /usr/local/include ; then
3404 if test "$GCC" = yes
3406 cf_save_CPPFLAGS=$CPPFLAGS
3407 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3408 cat > conftest.$ac_ext <<EOF
3409 #line 3410 "configure"
3410 #include "confdefs.h"
3416 if { (eval echo configure:3417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3419 echo "configure: failed program was:" >&5
3420 cat conftest.$ac_ext >&5
3425 CPPFLAGS=$cf_save_CPPFLAGS
3430 if test "$cf_have_incdir" = no ; then
3431 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3433 echo "${as_me-configure}:3434: testing adding $cf_add_incdir to include-path ..." 1>&5
3436 CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
3438 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3439 test "$cf_top_incdir" = "$cf_add_incdir" && break
3440 cf_add_incdir="$cf_top_incdir"
3454 cat > conftest.$ac_ext <<EOF
3455 #line 3456 "configure"
3456 #include "confdefs.h"
3459 #include <$cf_header>
3462 #ifdef NCURSES_VERSION
3464 printf("%s\n", NCURSES_VERSION);
3476 if { (eval echo configure:3477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3478 cf_cv_ncurses_h2=$cf_header
3481 echo "configure: failed program was:" >&5
3482 cat conftest.$ac_ext >&5
3488 if test "$cf_cv_ncurses_h2" != no ; then
3489 cf_cv_ncurses_h2=$cf_incdir/$cf_header
3490 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
3493 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
3495 CPPFLAGS="$cf_save2_CPPFLAGS"
3496 test "$cf_cv_ncurses_h2" != no && break
3498 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
3502 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
3504 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
3505 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
3506 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
3507 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
3510 if test -n "$cf_1st_incdir" ; then
3511 for cf_add_incdir in $cf_1st_incdir
3513 while test $cf_add_incdir != /usr/include
3515 if test -d $cf_add_incdir
3518 if test -n "$CFLAGS$CPPFLAGS" ; then
3519 # a loop is needed to ensure we can add subdirs of existing dirs
3520 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3521 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3522 cf_have_incdir=yes; break
3527 if test "$cf_have_incdir" = no ; then
3528 if test "$cf_add_incdir" = /usr/local/include ; then
3529 if test "$GCC" = yes
3531 cf_save_CPPFLAGS=$CPPFLAGS
3532 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3533 cat > conftest.$ac_ext <<EOF
3534 #line 3535 "configure"
3535 #include "confdefs.h"
3541 if { (eval echo configure:3542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3544 echo "configure: failed program was:" >&5
3545 cat conftest.$ac_ext >&5
3550 CPPFLAGS=$cf_save_CPPFLAGS
3555 if test "$cf_have_incdir" = no ; then
3556 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3558 echo "${as_me-configure}:3559: testing adding $cf_add_incdir to include-path ..." 1>&5
3561 CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
3563 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3564 test "$cf_top_incdir" = "$cf_add_incdir" && break
3565 cf_add_incdir="$cf_top_incdir"
3577 # Set definitions to allow ifdef'ing for ncurses.h
3579 case $cf_cv_ncurses_header in # (vi
3581 cat >> confdefs.h <<\EOF
3582 #define HAVE_NCURSES_H 1
3588 case $cf_cv_ncurses_header in # (vi
3589 ncurses/curses.h|ncurses/ncurses.h)
3590 cat >> confdefs.h <<\EOF
3591 #define HAVE_NCURSES_NCURSES_H 1
3595 ncursesw/curses.h|ncursesw/ncurses.h)
3596 cat >> confdefs.h <<\EOF
3597 #define HAVE_NCURSESW_NCURSES_H 1
3605 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
3606 echo "configure:3607: checking for terminfo header" >&5
3607 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
3608 echo $ac_n "(cached) $ac_c" 1>&6
3611 case ${cf_cv_ncurses_header} in #(vi
3612 */ncurses.h|*/ncursesw.h) #(vi
3613 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
3616 cf_term_header=term.h
3620 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
3622 cat > conftest.$ac_ext <<EOF
3623 #line 3624 "configure"
3624 #include "confdefs.h"
3626 #include <${cf_cv_ncurses_header-curses.h}>
3630 int x = auto_left_margin
3633 if { (eval echo configure:3634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3636 cf_cv_term_header="$cf_test"
3638 echo "configure: failed program was:" >&5
3639 cat conftest.$ac_ext >&5
3642 cf_cv_term_header=unknown
3646 test "$cf_cv_term_header" != unknown && break
3651 echo "$ac_t""$cf_cv_term_header" 1>&6
3653 # Set definitions to allow ifdef'ing to accommodate subdirectories
3655 case $cf_cv_term_header in # (vi
3657 cat >> confdefs.h <<\EOF
3658 #define HAVE_TERM_H 1
3664 case $cf_cv_term_header in # (vi
3665 ncurses/term.h) #(vi
3666 cat >> confdefs.h <<\EOF
3667 #define HAVE_NCURSES_TERM_H 1
3672 cat >> confdefs.h <<\EOF
3673 #define HAVE_NCURSESW_TERM_H 1
3680 # some applications need this, but should check for NCURSES_VERSION
3681 cat >> confdefs.h <<\EOF
3687 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
3688 echo "configure:3689: checking for ncurses version" >&5
3689 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
3690 echo $ac_n "(cached) $ac_c" 1>&6
3693 cf_cv_ncurses_version=no
3696 if test "$cross_compiling" = yes; then
3699 # This will not work if the preprocessor splits the line after the
3700 # Autoconf token. The 'unproto' program does that.
3701 cat > conftest.$ac_ext <<EOF
3702 #include <${cf_cv_ncurses_header-curses.h}>
3704 #ifdef NCURSES_VERSION
3705 Autoconf NCURSES_VERSION
3713 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
3714 { (eval echo configure:3715: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
3715 if test -f conftest.out ; then
3716 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
3717 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
3722 cat > conftest.$ac_ext <<EOF
3723 #line 3724 "configure"
3724 #include "confdefs.h"
3726 #include <${cf_cv_ncurses_header-curses.h}>
3730 FILE *fp = fopen("$cf_tempfile", "w");
3731 #ifdef NCURSES_VERSION
3732 # ifdef NCURSES_VERSION_PATCH
3733 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
3735 fprintf(fp, "%s\n", NCURSES_VERSION);
3739 fprintf(fp, "old\n");
3744 ${cf_cv_main_return-return}(0);
3747 if { (eval echo configure:3748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3750 cf_cv_ncurses_version=`cat $cf_tempfile`
3752 echo "configure: failed program was:" >&5
3753 cat conftest.$ac_ext >&5
3762 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
3763 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
3771 cf_nculib_root=ncurses
3772 # This works, except for the special case where we find gpm, but
3773 # ncurses is in a nonstandard location via $LIBS, and we really want
3776 cf_ncurses_SAVE="$LIBS"
3777 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
3778 echo "configure:3779: checking for Gpm_Open in -lgpm" >&5
3779 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
3780 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3781 echo $ac_n "(cached) $ac_c" 1>&6
3783 ac_save_LIBS="$LIBS"
3785 cat > conftest.$ac_ext <<EOF
3786 #line 3787 "configure"
3787 #include "confdefs.h"
3788 /* Override any gcc2 internal prototype to avoid an error. */
3789 /* We use char because int might match the return type of a gcc2
3790 builtin and then its argument prototype would still apply. */
3797 if { (eval echo configure:3798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3799 eval "ac_cv_lib_$ac_lib_var=yes"
3801 echo "configure: failed program was:" >&5
3802 cat conftest.$ac_ext >&5
3804 eval "ac_cv_lib_$ac_lib_var=no"
3807 LIBS="$ac_save_LIBS"
3810 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3811 echo "$ac_t""yes" 1>&6
3812 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
3813 echo "configure:3814: checking for initscr in -lgpm" >&5
3814 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
3815 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3816 echo $ac_n "(cached) $ac_c" 1>&6
3818 ac_save_LIBS="$LIBS"
3820 cat > conftest.$ac_ext <<EOF
3821 #line 3822 "configure"
3822 #include "confdefs.h"
3823 /* Override any gcc2 internal prototype to avoid an error. */
3824 /* We use char because int might match the return type of a gcc2
3825 builtin and then its argument prototype would still apply. */
3832 if { (eval echo configure:3833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3834 eval "ac_cv_lib_$ac_lib_var=yes"
3836 echo "configure: failed program was:" >&5
3837 cat conftest.$ac_ext >&5
3839 eval "ac_cv_lib_$ac_lib_var=no"
3842 LIBS="$ac_save_LIBS"
3845 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3846 echo "$ac_t""yes" 1>&6
3847 LIBS="$cf_ncurses_SAVE"
3849 echo "$ac_t""no" 1>&6
3850 cf_ncurses_LIBS="-lgpm"
3854 echo "$ac_t""no" 1>&6
3858 case $host_os in #(vi
3860 # This is only necessary if you are linking against an obsolete
3861 # version of ncurses (but it should do no harm, since it's static).
3862 if test "$cf_nculib_root" = ncurses ; then
3863 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
3864 echo "configure:3865: checking for tgoto in -lmytinfo" >&5
3865 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
3866 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3867 echo $ac_n "(cached) $ac_c" 1>&6
3869 ac_save_LIBS="$LIBS"
3870 LIBS="-lmytinfo $LIBS"
3871 cat > conftest.$ac_ext <<EOF
3872 #line 3873 "configure"
3873 #include "confdefs.h"
3874 /* Override any gcc2 internal prototype to avoid an error. */
3875 /* We use char because int might match the return type of a gcc2
3876 builtin and then its argument prototype would still apply. */
3883 if { (eval echo configure:3884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3885 eval "ac_cv_lib_$ac_lib_var=yes"
3887 echo "configure: failed program was:" >&5
3888 cat conftest.$ac_ext >&5
3890 eval "ac_cv_lib_$ac_lib_var=no"
3893 LIBS="$ac_save_LIBS"
3896 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3897 echo "$ac_t""yes" 1>&6
3898 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
3900 echo "$ac_t""no" 1>&6
3907 LIBS="$cf_ncurses_LIBS $LIBS"
3909 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3912 if test -n "$cf_cv_curses_dir/lib" ; then
3913 for cf_add_libdir in $cf_cv_curses_dir/lib
3915 if test $cf_add_libdir = /usr/lib ; then
3917 elif test -d $cf_add_libdir
3920 if test -n "$LDFLAGS$LIBS" ; then
3921 # a loop is needed to ensure we can add subdirs of existing dirs
3922 for cf_test_libdir in $LDFLAGS $LIBS ; do
3923 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3924 cf_have_libdir=yes; break
3928 if test "$cf_have_libdir" = no ; then
3929 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
3931 echo "${as_me-configure}:3932: testing adding $cf_add_libdir to library-path ..." 1>&5
3934 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3940 LIBS="-l$cf_nculib_root $LIBS"
3943 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
3945 echo $ac_n "checking for initscr""... $ac_c" 1>&6
3946 echo "configure:3947: checking for initscr" >&5
3947 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
3948 echo $ac_n "(cached) $ac_c" 1>&6
3950 cat > conftest.$ac_ext <<EOF
3951 #line 3952 "configure"
3952 #include "confdefs.h"
3953 /* System header to define __stub macros and hopefully few prototypes,
3954 which can conflict with char initscr(); below. */
3956 /* Override any gcc2 internal prototype to avoid an error. */
3957 /* We use char because int might match the return type of a gcc2
3958 builtin and then its argument prototype would still apply. */
3963 /* The GNU C library defines this for functions which it implements
3964 to always fail with ENOSYS. Some functions are actually named
3965 something starting with __ and the normal name is an alias. */
3966 #if defined (__stub_initscr) || defined (__stub___initscr)
3974 if { (eval echo configure:3975: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3976 eval "ac_cv_func_initscr=yes"
3978 echo "configure: failed program was:" >&5
3979 cat conftest.$ac_ext >&5
3981 eval "ac_cv_func_initscr=no"
3986 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
3987 echo "$ac_t""yes" 1>&6
3988 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
3990 echo "$ac_t""no" 1>&6
3992 cf_save_LIBS="$LIBS"
3993 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
3994 echo "configure:3995: checking for initscr in -l$cf_nculib_root" >&5
3995 LIBS="-l$cf_nculib_root $LIBS"
3996 cat > conftest.$ac_ext <<EOF
3997 #line 3998 "configure"
3998 #include "confdefs.h"
3999 #include <${cf_cv_ncurses_header-curses.h}>
4004 if { (eval echo configure:4005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4006 echo "$ac_t""yes" 1>&6
4007 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4010 echo "configure: failed program was:" >&5
4011 cat conftest.$ac_ext >&5
4013 echo "$ac_t""no" 1>&6
4017 test "/usr" != "$prefix" && \
4019 (test $prefix = NONE || test -d $prefix) && {
4020 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
4021 test -d /usr/lib && cf_search="$cf_search /usr/lib"
4022 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
4023 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
4024 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
4025 test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
4029 test "$prefix" != "NONE" && \
4030 test -d "$prefix" && \
4032 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
4033 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
4034 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
4035 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
4036 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
4037 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
4041 test "/usr/local" != "$prefix" && \
4042 test -d "/usr/local" && \
4043 (test $prefix = NONE || test -d $prefix) && {
4044 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
4045 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
4046 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
4047 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
4048 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
4049 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
4053 test "/opt" != "$prefix" && \
4055 (test $prefix = NONE || test -d $prefix) && {
4056 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
4057 test -d /opt/lib && cf_search="$cf_search /opt/lib"
4058 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
4059 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
4060 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
4061 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
4065 test "$HOME" != "$prefix" && \
4066 test -d "$HOME" && \
4067 (test $prefix = NONE || test -d $prefix) && {
4068 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
4069 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
4070 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
4071 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
4072 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
4073 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
4077 for cf_libdir in $cf_search
4079 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
4080 echo "configure:4081: checking for -l$cf_nculib_root in $cf_libdir" >&5
4081 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
4082 cat > conftest.$ac_ext <<EOF
4083 #line 4084 "configure"
4084 #include "confdefs.h"
4085 #include <${cf_cv_ncurses_header-curses.h}>
4090 if { (eval echo configure:4091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4092 echo "$ac_t""yes" 1>&6
4093 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4096 echo "configure: failed program was:" >&5
4097 cat conftest.$ac_ext >&5
4099 echo "$ac_t""no" 1>&6
4100 LIBS="$cf_save_LIBS"
4110 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
4112 if test $cf_found_library = no ; then
4113 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
4119 if test -n "$cf_ncurses_LIBS" ; then
4120 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
4121 echo "configure:4122: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
4122 cf_ncurses_SAVE="$LIBS"
4123 for p in $cf_ncurses_LIBS ; do
4124 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
4125 if test "$q" != "$LIBS" ; then
4129 cat > conftest.$ac_ext <<EOF
4130 #line 4131 "configure"
4131 #include "confdefs.h"
4132 #include <${cf_cv_ncurses_header-curses.h}>
4134 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
4137 if { (eval echo configure:4138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4139 echo "$ac_t""yes" 1>&6
4141 echo "configure: failed program was:" >&5
4142 cat conftest.$ac_ext >&5
4144 echo "$ac_t""no" 1>&6
4145 LIBS="$cf_ncurses_SAVE"
4151 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4153 cat >> confdefs.h <<EOF
4154 #define $cf_nculib_ROOT 1
4162 echo $ac_n "checking for multibyte character support""... $ac_c" 1>&6
4163 echo "configure:4164: checking for multibyte character support" >&5
4164 if eval "test \"`echo '$''{'cf_cv_utf8_lib'+set}'`\" = set"; then
4165 echo $ac_n "(cached) $ac_c" 1>&6
4168 cf_save_LIBS="$LIBS"
4169 cat > conftest.$ac_ext <<EOF
4170 #line 4171 "configure"
4171 #include "confdefs.h"
4178 if { (eval echo configure:4179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4182 echo "configure: failed program was:" >&5
4183 cat conftest.$ac_ext >&5
4186 cat > conftest.$ac_ext <<EOF
4187 #line 4188 "configure"
4188 #include "confdefs.h"
4190 #include <libutf8.h>
4195 if { (eval echo configure:4196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4197 cf_cv_utf8_lib=add-on
4199 echo "configure: failed program was:" >&5
4200 cat conftest.$ac_ext >&5
4205 LIBS="$cf_save_LIBS"
4211 echo "$ac_t""$cf_cv_utf8_lib" 1>&6
4213 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
4215 if test "$cf_cv_utf8_lib" = "add-on" ; then
4216 cat >> confdefs.h <<\EOF
4217 #define HAVE_LIBUTF8_H 1
4225 cf_ncuhdr_root=ncursesw
4227 test -n "$cf_cv_curses_dir" && \
4228 test "$cf_cv_curses_dir" != "no" && { \
4230 if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
4231 for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
4233 while test $cf_add_incdir != /usr/include
4235 if test -d $cf_add_incdir
4238 if test -n "$CFLAGS$CPPFLAGS" ; then
4239 # a loop is needed to ensure we can add subdirs of existing dirs
4240 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4241 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4242 cf_have_incdir=yes; break
4247 if test "$cf_have_incdir" = no ; then
4248 if test "$cf_add_incdir" = /usr/local/include ; then
4249 if test "$GCC" = yes
4251 cf_save_CPPFLAGS=$CPPFLAGS
4252 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4253 cat > conftest.$ac_ext <<EOF
4254 #line 4255 "configure"
4255 #include "confdefs.h"
4261 if { (eval echo configure:4262: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4264 echo "configure: failed program was:" >&5
4265 cat conftest.$ac_ext >&5
4270 CPPFLAGS=$cf_save_CPPFLAGS
4275 if test "$cf_have_incdir" = no ; then
4276 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4278 echo "${as_me-configure}:4279: testing adding $cf_add_incdir to include-path ..." 1>&5
4281 CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
4283 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4284 test "$cf_top_incdir" = "$cf_add_incdir" && break
4285 cf_add_incdir="$cf_top_incdir"
4296 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
4297 echo "configure:4298: checking for $cf_ncuhdr_root header in include-path" >&5
4298 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
4299 echo $ac_n "(cached) $ac_c" 1>&6
4302 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
4303 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
4304 for cf_header in $cf_header_list
4307 cat > conftest.$ac_ext <<EOF
4308 #line 4309 "configure"
4309 #include "confdefs.h"
4312 #define _XOPEN_SOURCE_EXTENDED
4313 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
4314 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
4316 #include <$cf_header>
4319 #ifdef NCURSES_VERSION
4325 printf("%s\n", NCURSES_VERSION);
4337 if { (eval echo configure:4338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4339 cf_cv_ncurses_h=$cf_header
4342 echo "configure: failed program was:" >&5
4343 cat conftest.$ac_ext >&5
4349 test "$cf_cv_ncurses_h" != no && break
4354 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
4358 if test "$cf_cv_ncurses_h" != no ; then
4359 cf_cv_ncurses_header=$cf_cv_ncurses_h
4362 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
4363 echo "configure:4364: checking for $cf_ncuhdr_root include-path" >&5
4364 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
4365 echo $ac_n "(cached) $ac_c" 1>&6
4368 test -n "$verbose" && echo
4372 test "/usr" != "$prefix" && \
4374 (test $prefix = NONE || test -d $prefix) && {
4375 test -n "$verbose" && echo " ... testing for include-directories under /usr"
4376 test -d /usr/include && cf_search="$cf_search /usr/include"
4377 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
4378 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
4379 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
4380 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4384 test "$prefix" != "NONE" && \
4385 test -d "$prefix" && \
4387 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
4388 test -d $prefix/include && cf_search="$cf_search $prefix/include"
4389 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
4390 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
4391 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
4392 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4396 test "/usr/local" != "$prefix" && \
4397 test -d "/usr/local" && \
4398 (test $prefix = NONE || test -d $prefix) && {
4399 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
4400 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
4401 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
4402 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
4403 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
4404 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4408 test "/opt" != "$prefix" && \
4410 (test $prefix = NONE || test -d $prefix) && {
4411 test -n "$verbose" && echo " ... testing for include-directories under /opt"
4412 test -d /opt/include && cf_search="$cf_search /opt/include"
4413 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
4414 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
4415 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
4416 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4420 test "$HOME" != "$prefix" && \
4421 test -d "$HOME" && \
4422 (test $prefix = NONE || test -d $prefix) && {
4423 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
4424 test -d $HOME/include && cf_search="$cf_search $HOME/include"
4425 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
4426 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
4427 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
4428 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
4432 test "$includedir" != NONE && \
4433 test "$includedir" != "/usr/include" && \
4434 test -d "$includedir" && {
4435 test -d $includedir && cf_search="$cf_search $includedir"
4436 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
4439 test "$oldincludedir" != NONE && \
4440 test "$oldincludedir" != "/usr/include" && \
4441 test -d "$oldincludedir" && {
4442 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
4443 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
4447 test -n "$verbose" && echo search path $cf_search
4448 cf_save2_CPPFLAGS="$CPPFLAGS"
4449 for cf_incdir in $cf_search
4452 if test -n "$cf_incdir" ; then
4453 for cf_add_incdir in $cf_incdir
4455 while test $cf_add_incdir != /usr/include
4457 if test -d $cf_add_incdir
4460 if test -n "$CFLAGS$CPPFLAGS" ; then
4461 # a loop is needed to ensure we can add subdirs of existing dirs
4462 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4463 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4464 cf_have_incdir=yes; break
4469 if test "$cf_have_incdir" = no ; then
4470 if test "$cf_add_incdir" = /usr/local/include ; then
4471 if test "$GCC" = yes
4473 cf_save_CPPFLAGS=$CPPFLAGS
4474 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4475 cat > conftest.$ac_ext <<EOF
4476 #line 4477 "configure"
4477 #include "confdefs.h"
4483 if { (eval echo configure:4484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4486 echo "configure: failed program was:" >&5
4487 cat conftest.$ac_ext >&5
4492 CPPFLAGS=$cf_save_CPPFLAGS
4497 if test "$cf_have_incdir" = no ; then
4498 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4500 echo "${as_me-configure}:4501: testing adding $cf_add_incdir to include-path ..." 1>&5
4503 CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
4505 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4506 test "$cf_top_incdir" = "$cf_add_incdir" && break
4507 cf_add_incdir="$cf_top_incdir"
4521 cat > conftest.$ac_ext <<EOF
4522 #line 4523 "configure"
4523 #include "confdefs.h"
4526 #include <$cf_header>
4529 #ifdef NCURSES_VERSION
4531 printf("%s\n", NCURSES_VERSION);
4543 if { (eval echo configure:4544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4545 cf_cv_ncurses_h2=$cf_header
4548 echo "configure: failed program was:" >&5
4549 cat conftest.$ac_ext >&5
4555 if test "$cf_cv_ncurses_h2" != no ; then
4556 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4557 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
4560 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
4562 CPPFLAGS="$cf_save2_CPPFLAGS"
4563 test "$cf_cv_ncurses_h2" != no && break
4565 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
4569 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
4571 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4572 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4573 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4574 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4577 if test -n "$cf_1st_incdir" ; then
4578 for cf_add_incdir in $cf_1st_incdir
4580 while test $cf_add_incdir != /usr/include
4582 if test -d $cf_add_incdir
4585 if test -n "$CFLAGS$CPPFLAGS" ; then
4586 # a loop is needed to ensure we can add subdirs of existing dirs
4587 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4588 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4589 cf_have_incdir=yes; break
4594 if test "$cf_have_incdir" = no ; then
4595 if test "$cf_add_incdir" = /usr/local/include ; then
4596 if test "$GCC" = yes
4598 cf_save_CPPFLAGS=$CPPFLAGS
4599 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4600 cat > conftest.$ac_ext <<EOF
4601 #line 4602 "configure"
4602 #include "confdefs.h"
4608 if { (eval echo configure:4609: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4611 echo "configure: failed program was:" >&5
4612 cat conftest.$ac_ext >&5
4617 CPPFLAGS=$cf_save_CPPFLAGS
4622 if test "$cf_have_incdir" = no ; then
4623 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4625 echo "${as_me-configure}:4626: testing adding $cf_add_incdir to include-path ..." 1>&5
4628 CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
4630 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4631 test "$cf_top_incdir" = "$cf_add_incdir" && break
4632 cf_add_incdir="$cf_top_incdir"
4644 # Set definitions to allow ifdef'ing for ncurses.h
4646 case $cf_cv_ncurses_header in # (vi
4648 cat >> confdefs.h <<\EOF
4649 #define HAVE_NCURSES_H 1
4655 case $cf_cv_ncurses_header in # (vi
4656 ncurses/curses.h|ncurses/ncurses.h)
4657 cat >> confdefs.h <<\EOF
4658 #define HAVE_NCURSES_NCURSES_H 1
4662 ncursesw/curses.h|ncursesw/ncurses.h)
4663 cat >> confdefs.h <<\EOF
4664 #define HAVE_NCURSESW_NCURSES_H 1
4672 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
4673 echo "configure:4674: checking for terminfo header" >&5
4674 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
4675 echo $ac_n "(cached) $ac_c" 1>&6
4678 case ${cf_cv_ncurses_header} in #(vi
4679 */ncurses.h|*/ncursesw.h) #(vi
4680 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4683 cf_term_header=term.h
4687 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4689 cat > conftest.$ac_ext <<EOF
4690 #line 4691 "configure"
4691 #include "confdefs.h"
4693 #include <${cf_cv_ncurses_header-curses.h}>
4697 int x = auto_left_margin
4700 if { (eval echo configure:4701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4703 cf_cv_term_header="$cf_test"
4705 echo "configure: failed program was:" >&5
4706 cat conftest.$ac_ext >&5
4709 cf_cv_term_header=unknown
4713 test "$cf_cv_term_header" != unknown && break
4718 echo "$ac_t""$cf_cv_term_header" 1>&6
4720 # Set definitions to allow ifdef'ing to accommodate subdirectories
4722 case $cf_cv_term_header in # (vi
4724 cat >> confdefs.h <<\EOF
4725 #define HAVE_TERM_H 1
4731 case $cf_cv_term_header in # (vi
4732 ncurses/term.h) #(vi
4733 cat >> confdefs.h <<\EOF
4734 #define HAVE_NCURSES_TERM_H 1
4739 cat >> confdefs.h <<\EOF
4740 #define HAVE_NCURSESW_TERM_H 1
4747 # some applications need this, but should check for NCURSES_VERSION
4748 cat >> confdefs.h <<\EOF
4754 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
4755 echo "configure:4756: checking for ncurses version" >&5
4756 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
4757 echo $ac_n "(cached) $ac_c" 1>&6
4760 cf_cv_ncurses_version=no
4763 if test "$cross_compiling" = yes; then
4766 # This will not work if the preprocessor splits the line after the
4767 # Autoconf token. The 'unproto' program does that.
4768 cat > conftest.$ac_ext <<EOF
4769 #include <${cf_cv_ncurses_header-curses.h}>
4771 #ifdef NCURSES_VERSION
4772 Autoconf NCURSES_VERSION
4780 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4781 { (eval echo configure:4782: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
4782 if test -f conftest.out ; then
4783 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4784 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4789 cat > conftest.$ac_ext <<EOF
4790 #line 4791 "configure"
4791 #include "confdefs.h"
4793 #include <${cf_cv_ncurses_header-curses.h}>
4797 FILE *fp = fopen("$cf_tempfile", "w");
4798 #ifdef NCURSES_VERSION
4799 # ifdef NCURSES_VERSION_PATCH
4800 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4802 fprintf(fp, "%s\n", NCURSES_VERSION);
4806 fprintf(fp, "old\n");
4811 ${cf_cv_main_return-return}(0);
4814 if { (eval echo configure:4815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4817 cf_cv_ncurses_version=`cat $cf_tempfile`
4819 echo "configure: failed program was:" >&5
4820 cat conftest.$ac_ext >&5
4829 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
4830 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
4838 cf_nculib_root=ncursesw
4839 # This works, except for the special case where we find gpm, but
4840 # ncurses is in a nonstandard location via $LIBS, and we really want
4843 cf_ncurses_SAVE="$LIBS"
4844 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
4845 echo "configure:4846: checking for Gpm_Open in -lgpm" >&5
4846 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
4847 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4848 echo $ac_n "(cached) $ac_c" 1>&6
4850 ac_save_LIBS="$LIBS"
4852 cat > conftest.$ac_ext <<EOF
4853 #line 4854 "configure"
4854 #include "confdefs.h"
4855 /* Override any gcc2 internal prototype to avoid an error. */
4856 /* We use char because int might match the return type of a gcc2
4857 builtin and then its argument prototype would still apply. */
4864 if { (eval echo configure:4865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4866 eval "ac_cv_lib_$ac_lib_var=yes"
4868 echo "configure: failed program was:" >&5
4869 cat conftest.$ac_ext >&5
4871 eval "ac_cv_lib_$ac_lib_var=no"
4874 LIBS="$ac_save_LIBS"
4877 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4878 echo "$ac_t""yes" 1>&6
4879 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
4880 echo "configure:4881: checking for initscr in -lgpm" >&5
4881 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
4882 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4883 echo $ac_n "(cached) $ac_c" 1>&6
4885 ac_save_LIBS="$LIBS"
4887 cat > conftest.$ac_ext <<EOF
4888 #line 4889 "configure"
4889 #include "confdefs.h"
4890 /* Override any gcc2 internal prototype to avoid an error. */
4891 /* We use char because int might match the return type of a gcc2
4892 builtin and then its argument prototype would still apply. */
4899 if { (eval echo configure:4900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4901 eval "ac_cv_lib_$ac_lib_var=yes"
4903 echo "configure: failed program was:" >&5
4904 cat conftest.$ac_ext >&5
4906 eval "ac_cv_lib_$ac_lib_var=no"
4909 LIBS="$ac_save_LIBS"
4912 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4913 echo "$ac_t""yes" 1>&6
4914 LIBS="$cf_ncurses_SAVE"
4916 echo "$ac_t""no" 1>&6
4917 cf_ncurses_LIBS="-lgpm"
4921 echo "$ac_t""no" 1>&6
4925 case $host_os in #(vi
4927 # This is only necessary if you are linking against an obsolete
4928 # version of ncurses (but it should do no harm, since it's static).
4929 if test "$cf_nculib_root" = ncurses ; then
4930 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
4931 echo "configure:4932: checking for tgoto in -lmytinfo" >&5
4932 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
4933 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4934 echo $ac_n "(cached) $ac_c" 1>&6
4936 ac_save_LIBS="$LIBS"
4937 LIBS="-lmytinfo $LIBS"
4938 cat > conftest.$ac_ext <<EOF
4939 #line 4940 "configure"
4940 #include "confdefs.h"
4941 /* Override any gcc2 internal prototype to avoid an error. */
4942 /* We use char because int might match the return type of a gcc2
4943 builtin and then its argument prototype would still apply. */
4950 if { (eval echo configure:4951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4952 eval "ac_cv_lib_$ac_lib_var=yes"
4954 echo "configure: failed program was:" >&5
4955 cat conftest.$ac_ext >&5
4957 eval "ac_cv_lib_$ac_lib_var=no"
4960 LIBS="$ac_save_LIBS"
4963 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4964 echo "$ac_t""yes" 1>&6
4965 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
4967 echo "$ac_t""no" 1>&6
4974 LIBS="$cf_ncurses_LIBS $LIBS"
4976 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4979 if test -n "$cf_cv_curses_dir/lib" ; then
4980 for cf_add_libdir in $cf_cv_curses_dir/lib
4982 if test $cf_add_libdir = /usr/lib ; then
4984 elif test -d $cf_add_libdir
4987 if test -n "$LDFLAGS$LIBS" ; then
4988 # a loop is needed to ensure we can add subdirs of existing dirs
4989 for cf_test_libdir in $LDFLAGS $LIBS ; do
4990 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4991 cf_have_libdir=yes; break
4995 if test "$cf_have_libdir" = no ; then
4996 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4998 echo "${as_me-configure}:4999: testing adding $cf_add_libdir to library-path ..." 1>&5
5001 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5007 LIBS="-l$cf_nculib_root $LIBS"
5010 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
5012 echo $ac_n "checking for initscr""... $ac_c" 1>&6
5013 echo "configure:5014: checking for initscr" >&5
5014 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
5015 echo $ac_n "(cached) $ac_c" 1>&6
5017 cat > conftest.$ac_ext <<EOF
5018 #line 5019 "configure"
5019 #include "confdefs.h"
5020 /* System header to define __stub macros and hopefully few prototypes,
5021 which can conflict with char initscr(); below. */
5023 /* Override any gcc2 internal prototype to avoid an error. */
5024 /* We use char because int might match the return type of a gcc2
5025 builtin and then its argument prototype would still apply. */
5030 /* The GNU C library defines this for functions which it implements
5031 to always fail with ENOSYS. Some functions are actually named
5032 something starting with __ and the normal name is an alias. */
5033 #if defined (__stub_initscr) || defined (__stub___initscr)
5041 if { (eval echo configure:5042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5043 eval "ac_cv_func_initscr=yes"
5045 echo "configure: failed program was:" >&5
5046 cat conftest.$ac_ext >&5
5048 eval "ac_cv_func_initscr=no"
5053 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
5054 echo "$ac_t""yes" 1>&6
5055 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5057 echo "$ac_t""no" 1>&6
5059 cf_save_LIBS="$LIBS"
5060 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
5061 echo "configure:5062: checking for initscr in -l$cf_nculib_root" >&5
5062 LIBS="-l$cf_nculib_root $LIBS"
5063 cat > conftest.$ac_ext <<EOF
5064 #line 5065 "configure"
5065 #include "confdefs.h"
5066 #include <${cf_cv_ncurses_header-curses.h}>
5071 if { (eval echo configure:5072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5073 echo "$ac_t""yes" 1>&6
5074 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5077 echo "configure: failed program was:" >&5
5078 cat conftest.$ac_ext >&5
5080 echo "$ac_t""no" 1>&6
5084 test "/usr" != "$prefix" && \
5086 (test $prefix = NONE || test -d $prefix) && {
5087 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
5088 test -d /usr/lib && cf_search="$cf_search /usr/lib"
5089 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
5090 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
5091 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
5092 test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
5096 test "$prefix" != "NONE" && \
5097 test -d "$prefix" && \
5099 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5100 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5101 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
5102 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
5103 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
5104 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
5108 test "/usr/local" != "$prefix" && \
5109 test -d "/usr/local" && \
5110 (test $prefix = NONE || test -d $prefix) && {
5111 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
5112 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
5113 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
5114 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
5115 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
5116 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
5120 test "/opt" != "$prefix" && \
5122 (test $prefix = NONE || test -d $prefix) && {
5123 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
5124 test -d /opt/lib && cf_search="$cf_search /opt/lib"
5125 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
5126 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
5127 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
5128 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
5132 test "$HOME" != "$prefix" && \
5133 test -d "$HOME" && \
5134 (test $prefix = NONE || test -d $prefix) && {
5135 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
5136 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
5137 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
5138 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
5139 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
5140 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
5144 for cf_libdir in $cf_search
5146 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
5147 echo "configure:5148: checking for -l$cf_nculib_root in $cf_libdir" >&5
5148 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
5149 cat > conftest.$ac_ext <<EOF
5150 #line 5151 "configure"
5151 #include "confdefs.h"
5152 #include <${cf_cv_ncurses_header-curses.h}>
5157 if { (eval echo configure:5158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5159 echo "$ac_t""yes" 1>&6
5160 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
5163 echo "configure: failed program was:" >&5
5164 cat conftest.$ac_ext >&5
5166 echo "$ac_t""no" 1>&6
5167 LIBS="$cf_save_LIBS"
5177 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
5179 if test $cf_found_library = no ; then
5180 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
5186 if test -n "$cf_ncurses_LIBS" ; then
5187 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
5188 echo "configure:5189: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
5189 cf_ncurses_SAVE="$LIBS"
5190 for p in $cf_ncurses_LIBS ; do
5191 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
5192 if test "$q" != "$LIBS" ; then
5196 cat > conftest.$ac_ext <<EOF
5197 #line 5198 "configure"
5198 #include "confdefs.h"
5199 #include <${cf_cv_ncurses_header-curses.h}>
5201 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
5204 if { (eval echo configure:5205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5206 echo "$ac_t""yes" 1>&6
5208 echo "configure: failed program was:" >&5
5209 cat conftest.$ac_ext >&5
5211 echo "$ac_t""no" 1>&6
5212 LIBS="$cf_ncurses_SAVE"
5218 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5220 cat >> confdefs.h <<EOF
5221 #define $cf_nculib_ROOT 1
5227 if test "$no_x" = yes; then
5228 # Not all programs may use this symbol, but it does not hurt to define it.
5229 cat >> confdefs.h <<\EOF
5230 #define X_DISPLAY_MISSING 1
5233 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
5235 if test -n "$x_includes"; then
5236 X_CFLAGS="$X_CFLAGS -I$x_includes"
5239 # It would also be nice to do this for all -L options, not just this one.
5240 if test -n "$x_libraries"; then
5241 X_LIBS="$X_LIBS -L$x_libraries"
5242 # For Solaris; some versions of Sun CC require a space after -R and
5243 # others require no space. Words are not sufficient . . . .
5244 case "`(uname -sr) 2>/dev/null`" in
5246 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
5247 echo "configure:5248: checking whether -R must be followed by a space" >&5
5248 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
5249 cat > conftest.$ac_ext <<EOF
5250 #line 5251 "configure"
5251 #include "confdefs.h"
5257 if { (eval echo configure:5258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5261 echo "configure: failed program was:" >&5
5262 cat conftest.$ac_ext >&5
5267 if test $ac_R_nospace = yes; then
5268 echo "$ac_t""no" 1>&6
5269 X_LIBS="$X_LIBS -R$x_libraries"
5271 LIBS="$ac_xsave_LIBS -R $x_libraries"
5272 cat > conftest.$ac_ext <<EOF
5273 #line 5274 "configure"
5274 #include "confdefs.h"
5280 if { (eval echo configure:5281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5284 echo "configure: failed program was:" >&5
5285 cat conftest.$ac_ext >&5
5290 if test $ac_R_space = yes; then
5291 echo "$ac_t""yes" 1>&6
5292 X_LIBS="$X_LIBS -R $x_libraries"
5294 echo "$ac_t""neither works" 1>&6
5297 LIBS="$ac_xsave_LIBS"
5301 # Check for system-dependent libraries X programs must link with.
5302 # Do this before checking for the system-independent R6 libraries
5303 # (-lICE), since we may need -lsocket or whatever for X linking.
5305 if test "$ISC" = yes; then
5306 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
5308 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
5309 # libraries were built with DECnet support. And karl@cs.umb.edu says
5310 # the Alpha needs dnet_stub (dnet does not exist).
5311 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
5312 echo "configure:5313: checking for dnet_ntoa in -ldnet" >&5
5313 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5314 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5315 echo $ac_n "(cached) $ac_c" 1>&6
5317 ac_save_LIBS="$LIBS"
5319 cat > conftest.$ac_ext <<EOF
5320 #line 5321 "configure"
5321 #include "confdefs.h"
5322 /* Override any gcc2 internal prototype to avoid an error. */
5323 /* We use char because int might match the return type of a gcc2
5324 builtin and then its argument prototype would still apply. */
5331 if { (eval echo configure:5332: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5333 eval "ac_cv_lib_$ac_lib_var=yes"
5335 echo "configure: failed program was:" >&5
5336 cat conftest.$ac_ext >&5
5338 eval "ac_cv_lib_$ac_lib_var=no"
5341 LIBS="$ac_save_LIBS"
5344 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5345 echo "$ac_t""yes" 1>&6
5346 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
5348 echo "$ac_t""no" 1>&6
5351 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
5352 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
5353 echo "configure:5354: checking for dnet_ntoa in -ldnet_stub" >&5
5354 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
5355 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5356 echo $ac_n "(cached) $ac_c" 1>&6
5358 ac_save_LIBS="$LIBS"
5359 LIBS="-ldnet_stub $LIBS"
5360 cat > conftest.$ac_ext <<EOF
5361 #line 5362 "configure"
5362 #include "confdefs.h"
5363 /* Override any gcc2 internal prototype to avoid an error. */
5364 /* We use char because int might match the return type of a gcc2
5365 builtin and then its argument prototype would still apply. */
5372 if { (eval echo configure:5373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5374 eval "ac_cv_lib_$ac_lib_var=yes"
5376 echo "configure: failed program was:" >&5
5377 cat conftest.$ac_ext >&5
5379 eval "ac_cv_lib_$ac_lib_var=no"
5382 LIBS="$ac_save_LIBS"
5385 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5386 echo "$ac_t""yes" 1>&6
5387 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
5389 echo "$ac_t""no" 1>&6
5394 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
5395 # to get the SysV transport functions.
5396 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
5398 # The nsl library prevents programs from opening the X display
5399 # on Irix 5.2, according to dickey@clark.net.
5400 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
5401 echo "configure:5402: checking for gethostbyname" >&5
5402 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
5403 echo $ac_n "(cached) $ac_c" 1>&6
5405 cat > conftest.$ac_ext <<EOF
5406 #line 5407 "configure"
5407 #include "confdefs.h"
5408 /* System header to define __stub macros and hopefully few prototypes,
5409 which can conflict with char gethostbyname(); below. */
5411 /* Override any gcc2 internal prototype to avoid an error. */
5412 /* We use char because int might match the return type of a gcc2
5413 builtin and then its argument prototype would still apply. */
5414 char gethostbyname();
5418 /* The GNU C library defines this for functions which it implements
5419 to always fail with ENOSYS. Some functions are actually named
5420 something starting with __ and the normal name is an alias. */
5421 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
5429 if { (eval echo configure:5430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5431 eval "ac_cv_func_gethostbyname=yes"
5433 echo "configure: failed program was:" >&5
5434 cat conftest.$ac_ext >&5
5436 eval "ac_cv_func_gethostbyname=no"
5441 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
5442 echo "$ac_t""yes" 1>&6
5445 echo "$ac_t""no" 1>&6
5448 if test $ac_cv_func_gethostbyname = no; then
5449 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
5450 echo "configure:5451: checking for gethostbyname in -lnsl" >&5
5451 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
5452 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5453 echo $ac_n "(cached) $ac_c" 1>&6
5455 ac_save_LIBS="$LIBS"
5457 cat > conftest.$ac_ext <<EOF
5458 #line 5459 "configure"
5459 #include "confdefs.h"
5460 /* Override any gcc2 internal prototype to avoid an error. */
5461 /* We use char because int might match the return type of a gcc2
5462 builtin and then its argument prototype would still apply. */
5463 char gethostbyname();
5469 if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5471 eval "ac_cv_lib_$ac_lib_var=yes"
5473 echo "configure: failed program was:" >&5
5474 cat conftest.$ac_ext >&5
5476 eval "ac_cv_lib_$ac_lib_var=no"
5479 LIBS="$ac_save_LIBS"
5482 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5483 echo "$ac_t""yes" 1>&6
5484 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
5486 echo "$ac_t""no" 1>&6
5491 # lieder@skyler.mavd.honeywell.com says without -lsocket,
5492 # socket/setsockopt and other routines are undefined under SCO ODT
5493 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
5494 # on later versions), says simon@lia.di.epfl.ch: it contains
5495 # gethostby* variants that don't use the nameserver (or something).
5496 # -lsocket must be given before -lnsl if both are needed.
5497 # We assume that if connect needs -lnsl, so does gethostbyname.
5498 echo $ac_n "checking for connect""... $ac_c" 1>&6
5499 echo "configure:5500: checking for connect" >&5
5500 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
5501 echo $ac_n "(cached) $ac_c" 1>&6
5503 cat > conftest.$ac_ext <<EOF
5504 #line 5505 "configure"
5505 #include "confdefs.h"
5506 /* System header to define __stub macros and hopefully few prototypes,
5507 which can conflict with char connect(); below. */
5509 /* Override any gcc2 internal prototype to avoid an error. */
5510 /* We use char because int might match the return type of a gcc2
5511 builtin and then its argument prototype would still apply. */
5516 /* The GNU C library defines this for functions which it implements
5517 to always fail with ENOSYS. Some functions are actually named
5518 something starting with __ and the normal name is an alias. */
5519 #if defined (__stub_connect) || defined (__stub___connect)
5527 if { (eval echo configure:5528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5529 eval "ac_cv_func_connect=yes"
5531 echo "configure: failed program was:" >&5
5532 cat conftest.$ac_ext >&5
5534 eval "ac_cv_func_connect=no"
5539 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
5540 echo "$ac_t""yes" 1>&6
5543 echo "$ac_t""no" 1>&6
5546 if test $ac_cv_func_connect = no; then
5547 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5548 echo "configure:5549: checking for connect in -lsocket" >&5
5549 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5550 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5551 echo $ac_n "(cached) $ac_c" 1>&6
5553 ac_save_LIBS="$LIBS"
5554 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5555 cat > conftest.$ac_ext <<EOF
5556 #line 5557 "configure"
5557 #include "confdefs.h"
5558 /* Override any gcc2 internal prototype to avoid an error. */
5559 /* We use char because int might match the return type of a gcc2
5560 builtin and then its argument prototype would still apply. */
5567 if { (eval echo configure:5568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5569 eval "ac_cv_lib_$ac_lib_var=yes"
5571 echo "configure: failed program was:" >&5
5572 cat conftest.$ac_ext >&5
5574 eval "ac_cv_lib_$ac_lib_var=no"
5577 LIBS="$ac_save_LIBS"
5580 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5581 echo "$ac_t""yes" 1>&6
5582 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5584 echo "$ac_t""no" 1>&6
5589 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5590 echo $ac_n "checking for remove""... $ac_c" 1>&6
5591 echo "configure:5592: checking for remove" >&5
5592 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
5593 echo $ac_n "(cached) $ac_c" 1>&6
5595 cat > conftest.$ac_ext <<EOF
5596 #line 5597 "configure"
5597 #include "confdefs.h"
5598 /* System header to define __stub macros and hopefully few prototypes,
5599 which can conflict with char remove(); below. */
5601 /* Override any gcc2 internal prototype to avoid an error. */
5602 /* We use char because int might match the return type of a gcc2
5603 builtin and then its argument prototype would still apply. */
5608 /* The GNU C library defines this for functions which it implements
5609 to always fail with ENOSYS. Some functions are actually named
5610 something starting with __ and the normal name is an alias. */
5611 #if defined (__stub_remove) || defined (__stub___remove)
5619 if { (eval echo configure:5620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5621 eval "ac_cv_func_remove=yes"
5623 echo "configure: failed program was:" >&5
5624 cat conftest.$ac_ext >&5
5626 eval "ac_cv_func_remove=no"
5631 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5632 echo "$ac_t""yes" 1>&6
5635 echo "$ac_t""no" 1>&6
5638 if test $ac_cv_func_remove = no; then
5639 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5640 echo "configure:5641: checking for remove in -lposix" >&5
5641 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5642 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5643 echo $ac_n "(cached) $ac_c" 1>&6
5645 ac_save_LIBS="$LIBS"
5646 LIBS="-lposix $LIBS"
5647 cat > conftest.$ac_ext <<EOF
5648 #line 5649 "configure"
5649 #include "confdefs.h"
5650 /* Override any gcc2 internal prototype to avoid an error. */
5651 /* We use char because int might match the return type of a gcc2
5652 builtin and then its argument prototype would still apply. */
5659 if { (eval echo configure:5660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5661 eval "ac_cv_lib_$ac_lib_var=yes"
5663 echo "configure: failed program was:" >&5
5664 cat conftest.$ac_ext >&5
5666 eval "ac_cv_lib_$ac_lib_var=no"
5669 LIBS="$ac_save_LIBS"
5672 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5673 echo "$ac_t""yes" 1>&6
5674 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5676 echo "$ac_t""no" 1>&6
5681 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5682 echo $ac_n "checking for shmat""... $ac_c" 1>&6
5683 echo "configure:5684: checking for shmat" >&5
5684 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
5685 echo $ac_n "(cached) $ac_c" 1>&6
5687 cat > conftest.$ac_ext <<EOF
5688 #line 5689 "configure"
5689 #include "confdefs.h"
5690 /* System header to define __stub macros and hopefully few prototypes,
5691 which can conflict with char shmat(); below. */
5693 /* Override any gcc2 internal prototype to avoid an error. */
5694 /* We use char because int might match the return type of a gcc2
5695 builtin and then its argument prototype would still apply. */
5700 /* The GNU C library defines this for functions which it implements
5701 to always fail with ENOSYS. Some functions are actually named
5702 something starting with __ and the normal name is an alias. */
5703 #if defined (__stub_shmat) || defined (__stub___shmat)
5711 if { (eval echo configure:5712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5713 eval "ac_cv_func_shmat=yes"
5715 echo "configure: failed program was:" >&5
5716 cat conftest.$ac_ext >&5
5718 eval "ac_cv_func_shmat=no"
5723 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5724 echo "$ac_t""yes" 1>&6
5727 echo "$ac_t""no" 1>&6
5730 if test $ac_cv_func_shmat = no; then
5731 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5732 echo "configure:5733: checking for shmat in -lipc" >&5
5733 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5734 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5735 echo $ac_n "(cached) $ac_c" 1>&6
5737 ac_save_LIBS="$LIBS"
5739 cat > conftest.$ac_ext <<EOF
5740 #line 5741 "configure"
5741 #include "confdefs.h"
5742 /* Override any gcc2 internal prototype to avoid an error. */
5743 /* We use char because int might match the return type of a gcc2
5744 builtin and then its argument prototype would still apply. */
5751 if { (eval echo configure:5752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5753 eval "ac_cv_lib_$ac_lib_var=yes"
5755 echo "configure: failed program was:" >&5
5756 cat conftest.$ac_ext >&5
5758 eval "ac_cv_lib_$ac_lib_var=no"
5761 LIBS="$ac_save_LIBS"
5764 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5765 echo "$ac_t""yes" 1>&6
5766 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5768 echo "$ac_t""no" 1>&6
5774 # Check for libraries that X11R6 Xt/Xaw programs need.
5775 ac_save_LDFLAGS="$LDFLAGS"
5776 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5777 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5778 # check for ICE first), but we must link in the order -lSM -lICE or
5779 # we get undefined symbols. So assume we have SM if we have ICE.
5780 # These have to be linked with before -lX11, unlike the other
5781 # libraries we check for below, so use a different variable.
5782 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5783 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
5784 echo "configure:5785: checking for IceConnectionNumber in -lICE" >&5
5785 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5786 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5787 echo $ac_n "(cached) $ac_c" 1>&6
5789 ac_save_LIBS="$LIBS"
5790 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
5791 cat > conftest.$ac_ext <<EOF
5792 #line 5793 "configure"
5793 #include "confdefs.h"
5794 /* Override any gcc2 internal prototype to avoid an error. */
5795 /* We use char because int might match the return type of a gcc2
5796 builtin and then its argument prototype would still apply. */
5797 char IceConnectionNumber();
5800 IceConnectionNumber()
5803 if { (eval echo configure:5804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5805 eval "ac_cv_lib_$ac_lib_var=yes"
5807 echo "configure: failed program was:" >&5
5808 cat conftest.$ac_ext >&5
5810 eval "ac_cv_lib_$ac_lib_var=no"
5813 LIBS="$ac_save_LIBS"
5816 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5817 echo "$ac_t""yes" 1>&6
5818 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5820 echo "$ac_t""no" 1>&6
5823 LDFLAGS="$ac_save_LDFLAGS"
5831 # SYSTEM_NAME=`echo "$cf_cv_system_name"|tr ' ' -`
5835 LDFLAGS="$X_LIBS $LDFLAGS"
5837 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
5839 echo "${as_me-configure}:5840: testing checking additions to CFLAGS ..." 1>&5
5842 cf_check_cflags="$CFLAGS"
5843 cf_check_cppflags="$CPPFLAGS"
5848 cf_new_extra_cppflags=
5850 for cf_add_cflags in $X_CFLAGS
5852 case $cf_fix_cppflags in
5854 case $cf_add_cflags in #(vi
5855 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
5856 case $cf_add_cflags in
5858 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5860 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
5861 && test -z "${cf_tst_cflags}" \
5862 && cf_fix_cppflags=yes
5864 if test $cf_fix_cppflags = yes ; then
5865 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5867 elif test "${cf_tst_cflags}" = "\"'" ; then
5868 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5874 *$cf_add_cflags) #(vi
5877 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
5882 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
5887 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5889 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
5891 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
5892 && test -z "${cf_tst_cflags}" \
5893 && cf_fix_cppflags=no
5898 if test -n "$cf_new_cflags" ; then
5899 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
5901 echo "${as_me-configure}:5902: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
5904 CFLAGS="$CFLAGS $cf_new_cflags"
5907 if test -n "$cf_new_cppflags" ; then
5908 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
5910 echo "${as_me-configure}:5911: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
5913 CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
5916 if test -n "$cf_new_extra_cppflags" ; then
5917 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
5919 echo "${as_me-configure}:5920: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
5922 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
5928 if test "$cf_check_cflags" != "$CFLAGS" ; then
5929 cat > conftest.$ac_ext <<EOF
5930 #line 5931 "configure"
5931 #include "confdefs.h"
5934 printf("Hello world");
5937 if { (eval echo configure:5938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5940 echo "configure: failed program was:" >&5
5941 cat conftest.$ac_ext >&5
5943 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
5945 echo "${as_me-configure}:5946: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
5948 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
5949 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
5951 echo "${as_me-configure}:5952: testing but keeping change to \$CPPFLAGS ..." 1>&5
5955 CFLAGS="$cf_check_flags"
5961 echo $ac_n "checking for XOpenDisplay""... $ac_c" 1>&6
5962 echo "configure:5963: checking for XOpenDisplay" >&5
5963 if eval "test \"`echo '$''{'ac_cv_func_XOpenDisplay'+set}'`\" = set"; then
5964 echo $ac_n "(cached) $ac_c" 1>&6
5966 cat > conftest.$ac_ext <<EOF
5967 #line 5968 "configure"
5968 #include "confdefs.h"
5969 /* System header to define __stub macros and hopefully few prototypes,
5970 which can conflict with char XOpenDisplay(); below. */
5972 /* Override any gcc2 internal prototype to avoid an error. */
5973 /* We use char because int might match the return type of a gcc2
5974 builtin and then its argument prototype would still apply. */
5975 char XOpenDisplay();
5979 /* The GNU C library defines this for functions which it implements
5980 to always fail with ENOSYS. Some functions are actually named
5981 something starting with __ and the normal name is an alias. */
5982 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
5990 if { (eval echo configure:5991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5992 eval "ac_cv_func_XOpenDisplay=yes"
5994 echo "configure: failed program was:" >&5
5995 cat conftest.$ac_ext >&5
5997 eval "ac_cv_func_XOpenDisplay=no"
6002 if eval "test \"`echo '$ac_cv_func_'XOpenDisplay`\" = yes"; then
6003 echo "$ac_t""yes" 1>&6
6006 echo "$ac_t""no" 1>&6
6008 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6009 echo "configure:6010: checking for XOpenDisplay in -lX11" >&5
6010 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6011 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6012 echo $ac_n "(cached) $ac_c" 1>&6
6014 ac_save_LIBS="$LIBS"
6015 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
6016 cat > conftest.$ac_ext <<EOF
6017 #line 6018 "configure"
6018 #include "confdefs.h"
6019 /* Override any gcc2 internal prototype to avoid an error. */
6020 /* We use char because int might match the return type of a gcc2
6021 builtin and then its argument prototype would still apply. */
6022 char XOpenDisplay();
6028 if { (eval echo configure:6029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6030 eval "ac_cv_lib_$ac_lib_var=yes"
6032 echo "configure: failed program was:" >&5
6033 cat conftest.$ac_ext >&5
6035 eval "ac_cv_lib_$ac_lib_var=no"
6038 LIBS="$ac_save_LIBS"
6041 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6042 echo "$ac_t""yes" 1>&6
6045 echo "$ac_t""no" 1>&6
6051 echo $ac_n "checking for XtAppInitialize""... $ac_c" 1>&6
6052 echo "configure:6053: checking for XtAppInitialize" >&5
6053 if eval "test \"`echo '$''{'ac_cv_func_XtAppInitialize'+set}'`\" = set"; then
6054 echo $ac_n "(cached) $ac_c" 1>&6
6056 cat > conftest.$ac_ext <<EOF
6057 #line 6058 "configure"
6058 #include "confdefs.h"
6059 /* System header to define __stub macros and hopefully few prototypes,
6060 which can conflict with char XtAppInitialize(); below. */
6062 /* Override any gcc2 internal prototype to avoid an error. */
6063 /* We use char because int might match the return type of a gcc2
6064 builtin and then its argument prototype would still apply. */
6065 char XtAppInitialize();
6069 /* The GNU C library defines this for functions which it implements
6070 to always fail with ENOSYS. Some functions are actually named
6071 something starting with __ and the normal name is an alias. */
6072 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
6080 if { (eval echo configure:6081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6082 eval "ac_cv_func_XtAppInitialize=yes"
6084 echo "configure: failed program was:" >&5
6085 cat conftest.$ac_ext >&5
6087 eval "ac_cv_func_XtAppInitialize=no"
6092 if eval "test \"`echo '$ac_cv_func_'XtAppInitialize`\" = yes"; then
6093 echo "$ac_t""yes" 1>&6
6096 echo "$ac_t""no" 1>&6
6098 echo $ac_n "checking for XtAppInitialize in -lXt""... $ac_c" 1>&6
6099 echo "configure:6100: checking for XtAppInitialize in -lXt" >&5
6100 ac_lib_var=`echo Xt'_'XtAppInitialize | sed 'y%./+-%__p_%'`
6101 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6102 echo $ac_n "(cached) $ac_c" 1>&6
6104 ac_save_LIBS="$LIBS"
6105 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
6106 cat > conftest.$ac_ext <<EOF
6107 #line 6108 "configure"
6108 #include "confdefs.h"
6109 /* Override any gcc2 internal prototype to avoid an error. */
6110 /* We use char because int might match the return type of a gcc2
6111 builtin and then its argument prototype would still apply. */
6112 char XtAppInitialize();
6118 if { (eval echo configure:6119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6120 eval "ac_cv_lib_$ac_lib_var=yes"
6122 echo "configure: failed program was:" >&5
6123 cat conftest.$ac_ext >&5
6125 eval "ac_cv_lib_$ac_lib_var=no"
6128 LIBS="$ac_save_LIBS"
6131 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6132 echo "$ac_t""yes" 1>&6
6133 cat >> confdefs.h <<\EOF
6134 #define HAVE_LIBXT 1
6138 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
6140 echo "$ac_t""no" 1>&6
6146 if test $cf_have_X_LIBS = no ; then
6147 echo "configure: warning: Unable to successfully link X Toolkit library (-lXt) with
6148 test program. You will have to check and add the proper libraries by hand
6153 cf_x_athena=${cf_x_athena-Xaw}
6155 echo $ac_n "checking if you want to link with Xaw 3d library""... $ac_c" 1>&6
6156 echo "configure:6157: checking if you want to link with Xaw 3d library" >&5
6159 # Check whether --with-Xaw3d or --without-Xaw3d was given.
6160 if test "${with_Xaw3d+set}" = set; then
6161 withval="$with_Xaw3d"
6165 if test "$withval" = yes ; then
6167 echo "$ac_t""yes" 1>&6
6169 echo "$ac_t""no" 1>&6
6172 echo $ac_n "checking if you want to link with neXT Athena library""... $ac_c" 1>&6
6173 echo "configure:6174: checking if you want to link with neXT Athena library" >&5
6176 # Check whether --with-neXtaw or --without-neXtaw was given.
6177 if test "${with_neXtaw+set}" = set; then
6178 withval="$with_neXtaw"
6182 if test "$withval" = yes ; then
6184 echo "$ac_t""yes" 1>&6
6186 echo "$ac_t""no" 1>&6
6189 echo $ac_n "checking if you want to link with Athena-Plus library""... $ac_c" 1>&6
6190 echo "configure:6191: checking if you want to link with Athena-Plus library" >&5
6193 # Check whether --with-XawPlus or --without-XawPlus was given.
6194 if test "${with_XawPlus+set}" = set; then
6195 withval="$with_XawPlus"
6199 if test "$withval" = yes ; then
6201 echo "$ac_t""yes" 1>&6
6203 echo "$ac_t""no" 1>&6
6206 echo $ac_n "checking for XextCreateExtension in -lXext""... $ac_c" 1>&6
6207 echo "configure:6208: checking for XextCreateExtension in -lXext" >&5
6208 ac_lib_var=`echo Xext'_'XextCreateExtension | sed 'y%./+-%__p_%'`
6209 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6210 echo $ac_n "(cached) $ac_c" 1>&6
6212 ac_save_LIBS="$LIBS"
6214 cat > conftest.$ac_ext <<EOF
6215 #line 6216 "configure"
6216 #include "confdefs.h"
6217 /* Override any gcc2 internal prototype to avoid an error. */
6218 /* We use char because int might match the return type of a gcc2
6219 builtin and then its argument prototype would still apply. */
6220 char XextCreateExtension();
6223 XextCreateExtension()
6226 if { (eval echo configure:6227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6228 eval "ac_cv_lib_$ac_lib_var=yes"
6230 echo "configure: failed program was:" >&5
6231 cat conftest.$ac_ext >&5
6233 eval "ac_cv_lib_$ac_lib_var=no"
6236 LIBS="$ac_save_LIBS"
6239 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6240 echo "$ac_t""yes" 1>&6
6243 echo "$ac_t""no" 1>&6
6250 cf_x_athena_root=$cf_x_athena
6251 cf_x_athena_include=""
6253 for cf_path in default \
6254 /usr/contrib/X11R6 \
6255 /usr/contrib/X11R5 \
6259 if test -z "$cf_x_athena_include" ; then
6261 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
6262 if test $cf_path != default ; then
6263 CPPFLAGS="-I$cf_path/include $cf_save"
6264 echo $ac_n "checking for $cf_test in $cf_path""... $ac_c" 1>&6
6265 echo "configure:6266: checking for $cf_test in $cf_path" >&5
6267 echo $ac_n "checking for $cf_test""... $ac_c" 1>&6
6268 echo "configure:6269: checking for $cf_test" >&5
6270 cat > conftest.$ac_ext <<EOF
6271 #line 6272 "configure"
6272 #include "confdefs.h"
6274 #include <X11/Intrinsic.h>
6280 if { (eval echo configure:6281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6284 echo "configure: failed program was:" >&5
6285 cat conftest.$ac_ext >&5
6290 echo "$ac_t""$cf_result" 1>&6
6291 if test "$cf_result" = yes ; then
6292 cf_x_athena_include=$cf_path
6300 if test -z "$cf_x_athena_include" ; then
6301 echo "configure: warning: Unable to successfully find Athena header files with test program" 1>&2
6302 elif test "$cf_x_athena_include" != default ; then
6303 CPPFLAGS="$CPPFLAGS -I$cf_x_athena_include"
6307 cf_x_athena_root=$cf_x_athena
6310 for cf_path in default \
6311 /usr/contrib/X11R6 \
6312 /usr/contrib/X11R5 \
6317 "-l$cf_x_athena_root -lXmu" \
6318 "-l$cf_x_athena_root -lXpm -lXmu" \
6319 "-l${cf_x_athena_root}_s -lXmu_s"
6321 if test -z "$cf_x_athena_lib" ; then
6323 cf_test=XawSimpleMenuAddGlobalActions
6324 if test $cf_path != default ; then
6325 LIBS="-L$cf_path/lib $cf_lib $LIBS"
6326 echo $ac_n "checking for $cf_lib in $cf_path""... $ac_c" 1>&6
6327 echo "configure:6328: checking for $cf_lib in $cf_path" >&5
6329 LIBS="$cf_lib $LIBS"
6330 echo $ac_n "checking for $cf_test in $cf_lib""... $ac_c" 1>&6
6331 echo "configure:6332: checking for $cf_test in $cf_lib" >&5
6333 cat > conftest.$ac_ext <<EOF
6334 #line 6335 "configure"
6335 #include "confdefs.h"
6341 if { (eval echo configure:6342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6345 echo "configure: failed program was:" >&5
6346 cat conftest.$ac_ext >&5
6351 echo "$ac_t""$cf_result" 1>&6
6352 if test "$cf_result" = yes ; then
6353 cf_x_athena_lib="$cf_lib"
6361 if test -z "$cf_x_athena_lib" ; then
6362 { echo "configure: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" 1>&2; exit 1; }
6366 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6368 cat >> confdefs.h <<EOF
6369 #define $cf_x_athena_LIBS 1
6377 for ac_prog in xcurses-config
6379 # Extract the first word of "$ac_prog", so it can be a program name with args.
6380 set dummy $ac_prog; ac_word=$2
6381 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6382 echo "configure:6383: checking for $ac_word" >&5
6383 if eval "test \"`echo '$''{'ac_cv_path_XCURSES_CONFIG'+set}'`\" = set"; then
6384 echo $ac_n "(cached) $ac_c" 1>&6
6386 case "$XCURSES_CONFIG" in
6388 ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a path.
6391 ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a dos path.
6394 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6396 for ac_dir in $ac_dummy; do
6397 test -z "$ac_dir" && ac_dir=.
6398 if test -f $ac_dir/$ac_word; then
6399 ac_cv_path_XCURSES_CONFIG="$ac_dir/$ac_word"
6407 XCURSES_CONFIG="$ac_cv_path_XCURSES_CONFIG"
6408 if test -n "$XCURSES_CONFIG"; then
6409 echo "$ac_t""$XCURSES_CONFIG" 1>&6
6411 echo "$ac_t""no" 1>&6
6414 test -n "$XCURSES_CONFIG" && break
6416 test -n "$XCURSES_CONFIG" || XCURSES_CONFIG="none"
6419 if test "$XCURSES_CONFIG" != none ; then
6421 CPPFLAGS="`$XCURSES_CONFIG --cflags` $CPPFLAGS"
6422 LIBS="`$XCURSES_CONFIG --libs` $LIBS"
6424 cf_cv_lib_XCurses=yes
6428 LDFLAGS="$LDFLAGS $X_LIBS"
6430 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
6432 echo "${as_me-configure}:6433: testing checking additions to CFLAGS ..." 1>&5
6435 cf_check_cflags="$CFLAGS"
6436 cf_check_cppflags="$CPPFLAGS"
6441 cf_new_extra_cppflags=
6443 for cf_add_cflags in $X_CFLAGS
6445 case $cf_fix_cppflags in
6447 case $cf_add_cflags in #(vi
6448 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
6449 case $cf_add_cflags in
6451 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6453 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6454 && test -z "${cf_tst_cflags}" \
6455 && cf_fix_cppflags=yes
6457 if test $cf_fix_cppflags = yes ; then
6458 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6460 elif test "${cf_tst_cflags}" = "\"'" ; then
6461 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6467 *$cf_add_cflags) #(vi
6470 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
6475 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
6480 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6482 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
6484 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6485 && test -z "${cf_tst_cflags}" \
6486 && cf_fix_cppflags=no
6491 if test -n "$cf_new_cflags" ; then
6492 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
6494 echo "${as_me-configure}:6495: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
6497 CFLAGS="$CFLAGS $cf_new_cflags"
6500 if test -n "$cf_new_cppflags" ; then
6501 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
6503 echo "${as_me-configure}:6504: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
6506 CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
6509 if test -n "$cf_new_extra_cppflags" ; then
6510 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
6512 echo "${as_me-configure}:6513: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
6515 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
6521 if test "$cf_check_cflags" != "$CFLAGS" ; then
6522 cat > conftest.$ac_ext <<EOF
6523 #line 6524 "configure"
6524 #include "confdefs.h"
6527 printf("Hello world");
6530 if { (eval echo configure:6531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6533 echo "configure: failed program was:" >&5
6534 cat conftest.$ac_ext >&5
6536 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
6538 echo "${as_me-configure}:6539: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
6541 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
6542 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
6544 echo "${as_me-configure}:6545: testing but keeping change to \$CPPFLAGS ..." 1>&5
6548 CFLAGS="$cf_check_flags"
6553 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
6554 echo "configure:6555: checking for XOpenDisplay in -lX11" >&5
6555 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
6556 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6557 echo $ac_n "(cached) $ac_c" 1>&6
6559 ac_save_LIBS="$LIBS"
6560 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
6561 cat > conftest.$ac_ext <<EOF
6562 #line 6563 "configure"
6563 #include "confdefs.h"
6564 /* Override any gcc2 internal prototype to avoid an error. */
6565 /* We use char because int might match the return type of a gcc2
6566 builtin and then its argument prototype would still apply. */
6567 char XOpenDisplay();
6573 if { (eval echo configure:6574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6575 eval "ac_cv_lib_$ac_lib_var=yes"
6577 echo "configure: failed program was:" >&5
6578 cat conftest.$ac_ext >&5
6580 eval "ac_cv_lib_$ac_lib_var=no"
6583 LIBS="$ac_save_LIBS"
6586 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6587 echo "$ac_t""yes" 1>&6
6590 echo "$ac_t""no" 1>&6
6593 echo $ac_n "checking for XCurses library""... $ac_c" 1>&6
6594 echo "configure:6595: checking for XCurses library" >&5
6595 if eval "test \"`echo '$''{'cf_cv_lib_XCurses'+set}'`\" = set"; then
6596 echo $ac_n "(cached) $ac_c" 1>&6
6599 LIBS="-lXCurses $LIBS"
6600 cat > conftest.$ac_ext <<EOF
6601 #line 6602 "configure"
6602 #include "confdefs.h"
6604 #include <xcurses.h>
6605 char *XCursesProgramName = "test";
6611 if { (eval echo configure:6612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6613 cf_cv_lib_XCurses=yes
6615 echo "configure: failed program was:" >&5
6616 cat conftest.$ac_ext >&5
6618 cf_cv_lib_XCurses=no
6624 echo "$ac_t""$cf_cv_lib_XCurses" 1>&6
6628 if test $cf_cv_lib_XCurses = yes ; then
6629 cat >> confdefs.h <<\EOF
6633 cat >> confdefs.h <<\EOF
6637 cat >> confdefs.h <<\EOF
6638 #define HAVE_XCURSES 1
6642 { echo "configure: error: Cannot link with XCurses" 1>&2; exit 1; }
6650 case $cf_cv_screen in #(vi
6654 # look for curses-related libraries
6655 echo $ac_n "checking for new_panel in -lpanel$cf_cv_libtype""... $ac_c" 1>&6
6656 echo "configure:6657: checking for new_panel in -lpanel$cf_cv_libtype" >&5
6657 ac_lib_var=`echo panel$cf_cv_libtype'_'new_panel | sed 'y%./+-%__p_%'`
6658 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6659 echo $ac_n "(cached) $ac_c" 1>&6
6661 ac_save_LIBS="$LIBS"
6662 LIBS="-lpanel$cf_cv_libtype $LIBS"
6663 cat > conftest.$ac_ext <<EOF
6664 #line 6665 "configure"
6665 #include "confdefs.h"
6666 /* Override any gcc2 internal prototype to avoid an error. */
6667 /* We use char because int might match the return type of a gcc2
6668 builtin and then its argument prototype would still apply. */
6675 if { (eval echo configure:6676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6677 eval "ac_cv_lib_$ac_lib_var=yes"
6679 echo "configure: failed program was:" >&5
6680 cat conftest.$ac_ext >&5
6682 eval "ac_cv_lib_$ac_lib_var=no"
6685 LIBS="$ac_save_LIBS"
6688 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6689 echo "$ac_t""yes" 1>&6
6690 ac_tr_lib=HAVE_LIB`echo panel$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6691 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6692 cat >> confdefs.h <<EOF
6693 #define $ac_tr_lib 1
6696 LIBS="-lpanel$cf_cv_libtype $LIBS"
6699 echo "$ac_t""no" 1>&6
6702 echo $ac_n "checking for menu_driver in -lmenu$cf_cv_libtype""... $ac_c" 1>&6
6703 echo "configure:6704: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
6704 ac_lib_var=`echo menu$cf_cv_libtype'_'menu_driver | sed 'y%./+-%__p_%'`
6705 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6706 echo $ac_n "(cached) $ac_c" 1>&6
6708 ac_save_LIBS="$LIBS"
6709 LIBS="-lmenu$cf_cv_libtype $LIBS"
6710 cat > conftest.$ac_ext <<EOF
6711 #line 6712 "configure"
6712 #include "confdefs.h"
6713 /* Override any gcc2 internal prototype to avoid an error. */
6714 /* We use char because int might match the return type of a gcc2
6715 builtin and then its argument prototype would still apply. */
6722 if { (eval echo configure:6723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6724 eval "ac_cv_lib_$ac_lib_var=yes"
6726 echo "configure: failed program was:" >&5
6727 cat conftest.$ac_ext >&5
6729 eval "ac_cv_lib_$ac_lib_var=no"
6732 LIBS="$ac_save_LIBS"
6735 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6736 echo "$ac_t""yes" 1>&6
6737 ac_tr_lib=HAVE_LIB`echo menu$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6738 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6739 cat >> confdefs.h <<EOF
6740 #define $ac_tr_lib 1
6743 LIBS="-lmenu$cf_cv_libtype $LIBS"
6746 echo "$ac_t""no" 1>&6
6749 echo $ac_n "checking for form_driver in -lform$cf_cv_libtype""... $ac_c" 1>&6
6750 echo "configure:6751: checking for form_driver in -lform$cf_cv_libtype" >&5
6751 ac_lib_var=`echo form$cf_cv_libtype'_'form_driver | sed 'y%./+-%__p_%'`
6752 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6753 echo $ac_n "(cached) $ac_c" 1>&6
6755 ac_save_LIBS="$LIBS"
6756 LIBS="-lform$cf_cv_libtype $LIBS"
6757 cat > conftest.$ac_ext <<EOF
6758 #line 6759 "configure"
6759 #include "confdefs.h"
6760 /* Override any gcc2 internal prototype to avoid an error. */
6761 /* We use char because int might match the return type of a gcc2
6762 builtin and then its argument prototype would still apply. */
6769 if { (eval echo configure:6770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6771 eval "ac_cv_lib_$ac_lib_var=yes"
6773 echo "configure: failed program was:" >&5
6774 cat conftest.$ac_ext >&5
6776 eval "ac_cv_lib_$ac_lib_var=no"
6779 LIBS="$ac_save_LIBS"
6782 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6783 echo "$ac_t""yes" 1>&6
6784 ac_tr_lib=HAVE_LIB`echo form$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6785 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6786 cat >> confdefs.h <<EOF
6787 #define $ac_tr_lib 1
6790 LIBS="-lform$cf_cv_libtype $LIBS"
6793 echo "$ac_t""no" 1>&6
6797 # look for curses-related headers
6806 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6807 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6808 echo "configure:6809: checking for $ac_hdr" >&5
6809 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6810 echo $ac_n "(cached) $ac_c" 1>&6
6812 cat > conftest.$ac_ext <<EOF
6813 #line 6814 "configure"
6814 #include "confdefs.h"
6817 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6818 { (eval echo configure:6819: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6819 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6820 if test -z "$ac_err"; then
6822 eval "ac_cv_header_$ac_safe=yes"
6825 echo "configure: failed program was:" >&5
6826 cat conftest.$ac_ext >&5
6828 eval "ac_cv_header_$ac_safe=no"
6832 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6833 echo "$ac_t""yes" 1>&6
6834 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6835 cat >> confdefs.h <<EOF
6836 #define $ac_tr_hdr 1
6840 echo "$ac_t""no" 1>&6
6847 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
6848 echo "configure:6849: checking return type of signal handlers" >&5
6849 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
6850 echo $ac_n "(cached) $ac_c" 1>&6
6852 cat > conftest.$ac_ext <<EOF
6853 #line 6854 "configure"
6854 #include "confdefs.h"
6855 #include <sys/types.h>
6861 extern "C" void (*signal (int, void (*)(int)))(int);
6863 void (*signal ()) ();
6870 if { (eval echo configure:6871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6872 ac_cv_type_signal=void
6874 echo "configure: failed program was:" >&5
6875 cat conftest.$ac_ext >&5
6877 ac_cv_type_signal=int
6882 echo "$ac_t""$ac_cv_type_signal" 1>&6
6883 cat >> confdefs.h <<EOF
6884 #define RETSIGTYPE $ac_cv_type_signal
6889 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
6890 echo "configure:6891: checking for ANSI C header files" >&5
6891 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
6892 echo $ac_n "(cached) $ac_c" 1>&6
6894 cat > conftest.$ac_ext <<EOF
6895 #line 6896 "configure"
6896 #include "confdefs.h"
6902 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6903 { (eval echo configure:6904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6904 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6905 if test -z "$ac_err"; then
6907 ac_cv_header_stdc=yes
6910 echo "configure: failed program was:" >&5
6911 cat conftest.$ac_ext >&5
6913 ac_cv_header_stdc=no
6917 if test $ac_cv_header_stdc = yes; then
6918 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6919 cat > conftest.$ac_ext <<EOF
6920 #line 6921 "configure"
6921 #include "confdefs.h"
6924 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6925 egrep "memchr" >/dev/null 2>&1; then
6929 ac_cv_header_stdc=no
6935 if test $ac_cv_header_stdc = yes; then
6936 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6937 cat > conftest.$ac_ext <<EOF
6938 #line 6939 "configure"
6939 #include "confdefs.h"
6942 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6943 egrep "free" >/dev/null 2>&1; then
6947 ac_cv_header_stdc=no
6953 if test $ac_cv_header_stdc = yes; then
6954 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6955 if test "$cross_compiling" = yes; then
6958 cat > conftest.$ac_ext <<EOF
6959 #line 6960 "configure"
6960 #include "confdefs.h"
6962 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6963 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6964 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6965 int main () { int i; for (i = 0; i < 256; i++)
6966 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
6970 if { (eval echo configure:6971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6974 echo "configure: failed program was:" >&5
6975 cat conftest.$ac_ext >&5
6977 ac_cv_header_stdc=no
6985 echo "$ac_t""$ac_cv_header_stdc" 1>&6
6986 if test $ac_cv_header_stdc = yes; then
6987 cat >> confdefs.h <<\EOF
6988 #define STDC_HEADERS 1
6993 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
6994 echo "configure:6995: checking whether time.h and sys/time.h may both be included" >&5
6995 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
6996 echo $ac_n "(cached) $ac_c" 1>&6
6998 cat > conftest.$ac_ext <<EOF
6999 #line 7000 "configure"
7000 #include "confdefs.h"
7001 #include <sys/types.h>
7002 #include <sys/time.h>
7008 if { (eval echo configure:7009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7010 ac_cv_header_time=yes
7012 echo "configure: failed program was:" >&5
7013 cat conftest.$ac_ext >&5
7015 ac_cv_header_time=no
7020 echo "$ac_t""$ac_cv_header_time" 1>&6
7021 if test $ac_cv_header_time = yes; then
7022 cat >> confdefs.h <<\EOF
7023 #define TIME_WITH_SYS_TIME 1
7039 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
7040 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
7041 echo "configure:7042: checking for $ac_hdr" >&5
7042 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
7043 echo $ac_n "(cached) $ac_c" 1>&6
7045 cat > conftest.$ac_ext <<EOF
7046 #line 7047 "configure"
7047 #include "confdefs.h"
7050 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7051 { (eval echo configure:7052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7052 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7053 if test -z "$ac_err"; then
7055 eval "ac_cv_header_$ac_safe=yes"
7058 echo "configure: failed program was:" >&5
7059 cat conftest.$ac_ext >&5
7061 eval "ac_cv_header_$ac_safe=no"
7065 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
7066 echo "$ac_t""yes" 1>&6
7067 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
7068 cat >> confdefs.h <<EOF
7069 #define $ac_tr_hdr 1
7073 echo "$ac_t""no" 1>&6
7091 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
7092 echo "configure:7093: checking for $ac_func" >&5
7093 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
7094 echo $ac_n "(cached) $ac_c" 1>&6
7096 cat > conftest.$ac_ext <<EOF
7097 #line 7098 "configure"
7098 #include "confdefs.h"
7099 /* System header to define __stub macros and hopefully few prototypes,
7100 which can conflict with char $ac_func(); below. */
7102 /* Override any gcc2 internal prototype to avoid an error. */
7103 /* We use char because int might match the return type of a gcc2
7104 builtin and then its argument prototype would still apply. */
7109 /* The GNU C library defines this for functions which it implements
7110 to always fail with ENOSYS. Some functions are actually named
7111 something starting with __ and the normal name is an alias. */
7112 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7120 if { (eval echo configure:7121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7122 eval "ac_cv_func_$ac_func=yes"
7124 echo "configure: failed program was:" >&5
7125 cat conftest.$ac_ext >&5
7127 eval "ac_cv_func_$ac_func=no"
7132 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
7133 echo "$ac_t""yes" 1>&6
7134 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
7135 cat >> confdefs.h <<EOF
7136 #define $ac_tr_func 1
7140 echo "$ac_t""no" 1>&6
7146 echo $ac_n "checking if we must define _XOPEN_SOURCE_EXTENDED""... $ac_c" 1>&6
7147 echo "configure:7148: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7148 if eval "test \"`echo '$''{'cf_cv_need_xopen_extension'+set}'`\" = set"; then
7149 echo $ac_n "(cached) $ac_c" 1>&6
7152 cat > conftest.$ac_ext <<EOF
7153 #line 7154 "configure"
7154 #include "confdefs.h"
7157 #include <${cf_cv_ncurses_header-curses.h}>
7160 long x = winnstr(stdscr, "", 0);
7162 getbegyx(stdscr, y1, x1)
7165 if { (eval echo configure:7166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7167 cf_cv_need_xopen_extension=no
7169 echo "configure: failed program was:" >&5
7170 cat conftest.$ac_ext >&5
7172 cat > conftest.$ac_ext <<EOF
7173 #line 7174 "configure"
7174 #include "confdefs.h"
7176 #define _XOPEN_SOURCE_EXTENDED
7178 #include <${cf_cv_ncurses_header-curses.h}>
7181 long x = winnstr(stdscr, "", 0);
7183 getbegyx(stdscr, y1, x1)
7186 if { (eval echo configure:7187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7188 cf_cv_need_xopen_extension=yes
7190 echo "configure: failed program was:" >&5
7191 cat conftest.$ac_ext >&5
7193 cf_cv_need_xopen_extension=unknown
7200 echo "$ac_t""$cf_cv_need_xopen_extension" 1>&6
7201 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7204 echo $ac_n "checking for term.h""... $ac_c" 1>&6
7205 echo "configure:7206: checking for term.h" >&5
7206 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
7207 echo $ac_n "(cached) $ac_c" 1>&6
7211 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
7212 # for <term.h> if we do not find the variant.
7214 `echo ${cf_cv_ncurses_header-curses.h} | sed -e 's%/.*%/%'`term.h \
7217 cat > conftest.$ac_ext <<EOF
7218 #line 7219 "configure"
7219 #include "confdefs.h"
7221 #include <${cf_cv_ncurses_header-curses.h}>
7222 #include <${cf_header}>
7227 if { (eval echo configure:7228: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7229 cf_cv_term_header=$cf_header
7232 echo "configure: failed program was:" >&5
7233 cat conftest.$ac_ext >&5
7235 cf_cv_term_header=no
7242 echo "$ac_t""$cf_cv_term_header" 1>&6
7244 case $cf_cv_term_header in #(vi
7246 cat >> confdefs.h <<\EOF
7247 #define HAVE_TERM_H 1
7252 cat >> confdefs.h <<\EOF
7253 #define HAVE_NCURSES_TERM_H 1
7258 cat >> confdefs.h <<\EOF
7259 #define HAVE_NCURSESW_TERM_H 1
7293 use_default_colors \
7301 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7303 echo $ac_n "checking for ${cf_func}""... $ac_c" 1>&6
7304 echo "configure:7305: checking for ${cf_func}" >&5
7306 echo "${as_me-configure}:7307: testing ${cf_func} ..." 1>&5
7308 if eval "test \"`echo '$''{'cf_cv_func_$cf_func'+set}'`\" = set"; then
7309 echo $ac_n "(cached) $ac_c" 1>&6
7312 eval cf_result='$ac_cv_func_'$cf_func
7313 if test ".$cf_result" != ".no"; then
7314 cat > conftest.$ac_ext <<EOF
7315 #line 7316 "configure"
7316 #include "confdefs.h"
7319 #include <xcurses.h>
7320 char * XCursesProgramName = "test";
7322 #include <${cf_cv_ncurses_header-curses.h}>
7323 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
7324 #include <ncursesw/term.h>
7326 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
7327 #include <ncurses/term.h>
7338 long foo = (long)(&${cf_func});
7339 ${cf_cv_main_return-return}(foo == 0);
7344 if { (eval echo configure:7345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7348 echo "configure: failed program was:" >&5
7349 cat conftest.$ac_ext >&5
7355 eval 'cf_cv_func_'$cf_func'=$cf_result'
7359 # use the computed/retrieved cache-value:
7360 eval 'cf_result=$cf_cv_func_'$cf_func
7361 echo "$ac_t""$cf_result" 1>&6
7362 if test $cf_result != no; then
7363 cat >> confdefs.h <<EOF
7364 #define HAVE_${cf_tr_func} 1
7371 echo $ac_n "checking for ncurses extended functions""... $ac_c" 1>&6
7372 echo "configure:7373: checking for ncurses extended functions" >&5
7373 if eval "test \"`echo '$''{'cf_cv_ncurses_ext_funcs'+set}'`\" = set"; then
7374 echo $ac_n "(cached) $ac_c" 1>&6
7377 cat > conftest.$ac_ext <<EOF
7378 #line 7379 "configure"
7379 #include "confdefs.h"
7381 #include <${cf_cv_ncurses_header-curses.h}>
7384 (void) assume_default_colors (0, 0);
7385 (void) curses_version ();
7386 (void) define_key (0, 0);
7387 (void) is_term_resized (0, 0);
7388 (void) key_defined (0);
7389 (void) keybound (0, 0);
7390 (void) keyok (0, 0);
7391 (void) resize_term (0, 0);
7392 (void) resizeterm (0, 0);
7393 (void) use_default_colors ();
7394 (void) use_extended_names (0);
7395 (void) wresize (0, 0, 0);
7398 if { (eval echo configure:7399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7400 cf_cv_ncurses_ext_funcs=yes
7402 echo "configure: failed program was:" >&5
7403 cat conftest.$ac_ext >&5
7405 cf_cv_ncurses_ext_funcs=no
7411 echo "$ac_t""$cf_cv_ncurses_ext_funcs" 1>&6
7412 test "$cf_cv_ncurses_ext_funcs" != no && cat >> confdefs.h <<\EOF
7413 #define NCURSES_EXT_FUNCS 1
7417 echo $ac_n "checking for wide-character functions""... $ac_c" 1>&6
7418 echo "configure:7419: checking for wide-character functions" >&5
7419 if eval "test \"`echo '$''{'cf_cv_widechar_funcs'+set}'`\" = set"; then
7420 echo $ac_n "(cached) $ac_c" 1>&6
7423 cat > conftest.$ac_ext <<EOF
7424 #line 7425 "configure"
7425 #include "confdefs.h"
7427 #include <${cf_cv_ncurses_header-curses.h}>
7430 static wchar_t src_wchar[2];
7431 static cchar_t dst_cchar;
7432 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
7436 if { (eval echo configure:7437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7438 cf_cv_widechar_funcs=yes
7440 echo "configure: failed program was:" >&5
7441 cat conftest.$ac_ext >&5
7443 cf_cv_widechar_funcs=no
7449 echo "$ac_t""$cf_cv_widechar_funcs" 1>&6
7450 if test "$cf_cv_widechar_funcs" != no ; then
7451 cat >> confdefs.h <<\EOF
7452 #define USE_WIDEC_SUPPORT 1
7456 cat >> confdefs.h <<\EOF
7457 #define USE_WIDEC_SUPPORT 0
7463 echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
7464 echo "configure:7465: checking if sys/time.h works with sys/select.h" >&5
7465 if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
7466 echo $ac_n "(cached) $ac_c" 1>&6
7469 cat > conftest.$ac_ext <<EOF
7470 #line 7471 "configure"
7471 #include "confdefs.h"
7473 #include <sys/types.h>
7474 #ifdef HAVE_SYS_TIME_H
7475 #include <sys/time.h>
7477 #ifdef HAVE_SYS_SELECT_H
7478 #include <sys/select.h>
7485 if { (eval echo configure:7486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7487 cf_cv_sys_time_select=yes
7489 echo "configure: failed program was:" >&5
7490 cat conftest.$ac_ext >&5
7492 cf_cv_sys_time_select=no
7498 echo "$ac_t""$cf_cv_sys_time_select" 1>&6
7499 test "$cf_cv_sys_time_select" = yes && cat >> confdefs.h <<\EOF
7500 #define HAVE_SYS_TIME_SELECT 1
7505 echo $ac_n "checking for function curses_version""... $ac_c" 1>&6
7506 echo "configure:7507: checking for function curses_version" >&5
7507 if eval "test \"`echo '$''{'cf_cv_func_curses_version'+set}'`\" = set"; then
7508 echo $ac_n "(cached) $ac_c" 1>&6
7511 if test "$cross_compiling" = yes; then
7512 cf_cv_func_curses_version=unknown
7514 cat > conftest.$ac_ext <<EOF
7515 #line 7516 "configure"
7516 #include "confdefs.h"
7518 #include <${cf_cv_ncurses_header-curses.h}>
7522 sprintf(temp, "%s\n", curses_version());
7523 ${cf_cv_main_return-return}(0);
7527 if { (eval echo configure:7528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
7529 cf_cv_func_curses_version=yes
7532 echo "configure: failed program was:" >&5
7533 cat conftest.$ac_ext >&5
7535 cf_cv_func_curses_version=no
7544 echo "$ac_t""$cf_cv_func_curses_version" 1>&6
7545 test "$cf_cv_func_curses_version" = yes && cat >> confdefs.h <<\EOF
7546 #define HAVE_CURSES_VERSION 1
7551 echo $ac_n "checking for alternate character set array""... $ac_c" 1>&6
7552 echo "configure:7553: checking for alternate character set array" >&5
7553 if eval "test \"`echo '$''{'cf_cv_curses_acs_map'+set}'`\" = set"; then
7554 echo $ac_n "(cached) $ac_c" 1>&6
7557 cf_cv_curses_acs_map=unknown
7558 for name in acs_map _acs_map __acs_map _nc_acs_map
7560 cat > conftest.$ac_ext <<EOF
7561 #line 7562 "configure"
7562 #include "confdefs.h"
7564 #include <${cf_cv_ncurses_header-curses.h}>
7568 $name['k'] = ACS_PLUS
7572 if { (eval echo configure:7573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7574 cf_cv_curses_acs_map=$name; break
7576 echo "configure: failed program was:" >&5
7577 cat conftest.$ac_ext >&5
7584 echo "$ac_t""$cf_cv_curses_acs_map" 1>&6
7586 test "$cf_cv_curses_acs_map" != unknown && cat >> confdefs.h <<EOF
7587 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
7592 echo $ac_n "checking for wide alternate character set array""... $ac_c" 1>&6
7593 echo "configure:7594: checking for wide alternate character set array" >&5
7594 if eval "test \"`echo '$''{'cf_cv_curses_wacs_map'+set}'`\" = set"; then
7595 echo $ac_n "(cached) $ac_c" 1>&6
7598 cf_cv_curses_wacs_map=unknown
7599 for name in wacs_map _wacs_map __wacs_map _nc_wacs
7601 cat > conftest.$ac_ext <<EOF
7602 #line 7603 "configure"
7603 #include "confdefs.h"
7605 #ifndef _XOPEN_SOURCE_EXTENDED
7606 #define _XOPEN_SOURCE_EXTENDED
7608 #include <${cf_cv_ncurses_header-curses.h}>
7610 $name['k'] = *WACS_PLUS
7613 if { (eval echo configure:7614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7615 cf_cv_curses_wacs_map=$name
7618 echo "configure: failed program was:" >&5
7619 cat conftest.$ac_ext >&5
7625 echo "$ac_t""$cf_cv_curses_wacs_map" 1>&6
7628 echo $ac_n "checking for type attr_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
7629 echo "configure:7630: checking for type attr_t in ${cf_cv_ncurses_header-curses.h}" >&5
7630 cat > conftest.$ac_ext <<EOF
7631 #line 7632 "configure"
7632 #include "confdefs.h"
7634 #ifndef _XOPEN_SOURCE_EXTENDED
7635 #define _XOPEN_SOURCE_EXTENDED
7637 #include <${cf_cv_ncurses_header-curses.h}>
7644 if { (eval echo configure:7645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7648 echo "configure: failed program was:" >&5
7649 cat conftest.$ac_ext >&5
7654 echo "$ac_t""$cf_result" 1>&6
7655 if test $cf_result = yes ; then
7657 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7659 cat >> confdefs.h <<EOF
7660 #define $cf_result 1
7664 cat >> confdefs.h <<EOF
7671 echo $ac_n "checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
7672 echo "configure:7673: checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}" >&5
7673 cat > conftest.$ac_ext <<EOF
7674 #line 7675 "configure"
7675 #include "confdefs.h"
7677 #ifndef _XOPEN_SOURCE_EXTENDED
7678 #define _XOPEN_SOURCE_EXTENDED
7680 #include <${cf_cv_ncurses_header-curses.h}>
7687 if { (eval echo configure:7688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7691 echo "configure: failed program was:" >&5
7692 cat conftest.$ac_ext >&5
7697 echo "$ac_t""$cf_result" 1>&6
7698 if test $cf_result = yes ; then
7700 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7702 cat >> confdefs.h <<EOF
7703 #define $cf_result 1
7707 cat >> confdefs.h <<EOF
7708 #define mbstate_t long
7719 cat > confcache <<\EOF
7720 # This file is a shell script that caches the results of configure
7721 # tests run on this system so they can be shared between configure
7722 # scripts and configure runs. It is not useful on other systems.
7723 # If it contains results you don't want to keep, you may remove or edit it.
7725 # By default, configure uses ./config.cache as the cache file,
7726 # creating it if it does not exist already. You can give configure
7727 # the --cache-file=FILE option to use a different cache file; that is
7728 # what configure does when it calls configure scripts in
7729 # subdirectories, so they share the cache.
7730 # Giving --cache-file=/dev/null disables caching, for debugging configure.
7731 # config.status only pays attention to the cache file if you give it the
7732 # --recheck option to rerun configure.
7735 # The following way of writing the cache mishandles newlines in values,
7736 # but we know of no workaround that is simple, portable, and efficient.
7737 # So, don't put newlines in cache variables' values.
7738 # Ultrix sh set writes to stderr and can't be redirected directly,
7739 # and sets the high bit in the cache file unless we assign to the vars.
7741 case `(ac_space=' '; set | grep ac_space) 2>&1` in
7743 # `set' does not quote correctly, so add quotes (double-quote substitution
7744 # turns \\\\ into \\, and sed turns \\ into \).
7746 -e "s/'/'\\\\''/g" \
7747 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
7750 # `set' quotes correctly as required by POSIX, so do not add quotes.
7751 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
7754 if cmp -s $cache_file confcache; then
7757 if test -w $cache_file; then
7758 echo "updating cache $cache_file"
7759 cat confcache > $cache_file
7761 echo "not updating unwritable cache $cache_file"
7766 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
7768 test "x$prefix" = xNONE && prefix=$ac_default_prefix
7769 # Let make expand exec_prefix.
7770 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
7772 # Any assignment to VPATH causes Sun make to only execute
7773 # the first set of double-colon rules, so remove it if not needed.
7774 # If there is a colon in the path, we need to keep it.
7775 if test "x$srcdir" = x.; then
7776 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
7779 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
7781 DEFS=-DHAVE_CONFIG_H
7783 # Without the "./", some shells look in PATH for config.status.
7784 : ${CONFIG_STATUS=./config.status}
7786 echo creating $CONFIG_STATUS
7787 rm -f $CONFIG_STATUS
7788 cat > $CONFIG_STATUS <<EOF
7790 # Generated automatically by configure.
7791 # Run this file to recreate the current configuration.
7792 # This directory was configured as follows,
7793 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7795 # $0 $ac_configure_args
7797 # Compiler output produced by configure, useful for debugging
7798 # configure, is in ./config.log if it exists.
7800 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7803 case "\$ac_option" in
7804 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7805 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7806 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7807 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7808 echo "$CONFIG_STATUS generated by autoconf version 2.13.20030927"
7810 -help | --help | --hel | --he | --h)
7811 echo "\$ac_cs_usage"; exit 0 ;;
7812 *) echo "\$ac_cs_usage"; exit 1 ;;
7816 ac_given_srcdir=$srcdir
7818 trap 'rm -fr `echo "Makefile ncurses_cfg.h:ncurses_tst.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7820 cat >> $CONFIG_STATUS <<EOF
7822 # Protect against being on the right side of a sed subst in config.status.
7823 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7824 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7828 s%@CFLAGS@%$CFLAGS%g
7829 s%@CPPFLAGS@%$CPPFLAGS%g
7830 s%@CXXFLAGS@%$CXXFLAGS%g
7831 s%@FFLAGS@%$FFLAGS%g
7833 s%@LDFLAGS@%$LDFLAGS%g
7835 s%@exec_prefix@%$exec_prefix%g
7836 s%@prefix@%$prefix%g
7837 s%@program_transform_name@%$program_transform_name%g
7838 s%@bindir@%$bindir%g
7839 s%@sbindir@%$sbindir%g
7840 s%@libexecdir@%$libexecdir%g
7841 s%@datadir@%$datadir%g
7842 s%@sysconfdir@%$sysconfdir%g
7843 s%@sharedstatedir@%$sharedstatedir%g
7844 s%@localstatedir@%$localstatedir%g
7845 s%@libdir@%$libdir%g
7846 s%@includedir@%$includedir%g
7847 s%@oldincludedir@%$oldincludedir%g
7848 s%@infodir@%$infodir%g
7849 s%@mandir@%$mandir%g
7851 s%@host_alias@%$host_alias%g
7852 s%@host_cpu@%$host_cpu%g
7853 s%@host_vendor@%$host_vendor%g
7854 s%@host_os@%$host_os%g
7855 s%@SET_MAKE@%$SET_MAKE%g
7859 s%@CC_G_OPT@%$CC_G_OPT%g
7860 s%@CC_SHARED_OPTS@%$CC_SHARED_OPTS%g
7861 s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g
7862 s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g
7863 s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
7865 s%@LDFLAGS_SHARED@%$LDFLAGS_SHARED%g
7866 s%@LDFLAGS_STATIC@%$LDFLAGS_STATIC%g
7867 s%@LD_MODEL@%$LD_MODEL%g
7868 s%@LD_SHARED_OPTS@%$LD_SHARED_OPTS%g
7869 s%@LIBTOOL@%$LIBTOOL%g
7870 s%@LIB_CLEAN@%$LIB_CLEAN%g
7871 s%@LIB_COMPILE@%$LIB_COMPILE%g
7872 s%@LIB_LINK@%$LIB_LINK%g
7873 s%@LINK_TESTS@%$LINK_TESTS%g
7875 s%@LINT_OPTS@%$LINT_OPTS%g
7876 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
7877 s%@MATH_LIB@%$MATH_LIB%g
7878 s%@PTHREAD@%$PTHREAD%g
7879 s%@TEST_ARGS@%$TEST_ARGS%g
7880 s%@TEST_DEPS@%$TEST_DEPS%g
7881 s%@TEST_LIBS@%$TEST_LIBS%g
7882 s%@TINFO_ARGS@%$TINFO_ARGS%g
7883 s%@cf_cv_abi_version@%$cf_cv_abi_version%g
7884 s%@cf_cv_rel_version@%$cf_cv_rel_version%g
7885 s%@EXEEXT@%$EXEEXT%g
7886 s%@OBJEXT@%$OBJEXT%g
7887 s%@EXTRA_CPPFLAGS@%$EXTRA_CPPFLAGS%g
7888 s%@ECHO_LT@%$ECHO_LT%g
7889 s%@ECHO_LD@%$ECHO_LD%g
7890 s%@RULE_CC@%$RULE_CC%g
7891 s%@SHOW_CC@%$SHOW_CC%g
7892 s%@ECHO_CC@%$ECHO_CC%g
7893 s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
7894 s%@X_CFLAGS@%$X_CFLAGS%g
7895 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
7896 s%@X_LIBS@%$X_LIBS%g
7897 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
7898 s%@XCURSES_CONFIG@%$XCURSES_CONFIG%g
7903 cat >> $CONFIG_STATUS <<\EOF
7905 # Split the substitutions into bite-sized pieces for seds with
7906 # small command number limits, like on Digital OSF/1 and HP-UX.
7907 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7908 ac_file=1 # Number of current file.
7909 ac_beg=1 # First line for current file.
7910 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7913 while $ac_more_lines; do
7914 if test $ac_beg -gt 1; then
7915 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7917 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7919 if test ! -s conftest.s$ac_file; then
7921 rm -f conftest.s$ac_file
7923 if test -z "$ac_sed_cmds"; then
7924 ac_sed_cmds="sed -f conftest.s$ac_file"
7926 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7928 ac_file=`expr $ac_file + 1`
7930 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7933 if test -z "$ac_sed_cmds"; then
7938 cat >> $CONFIG_STATUS <<EOF
7940 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
7942 cat >> $CONFIG_STATUS <<\EOF
7943 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7944 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7946 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7947 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7948 *) ac_file_in="${ac_file}.in" ;;
7951 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7953 # Remove last slash and all that follows it. Not all systems have dirname.
7954 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7955 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7956 # The file is in a subdirectory.
7957 test ! -d "$ac_dir" && mkdir "$ac_dir"
7958 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7959 # A "../" for each directory in $ac_dir_suffix.
7960 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7962 ac_dir_suffix= ac_dots=
7965 case "$ac_given_srcdir" in
7967 if test -z "$ac_dots"; then top_srcdir=.
7968 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7969 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7971 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7972 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7976 echo creating "$ac_file"
7978 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7980 *Makefile*) ac_comsub="1i\\
7981 # $configure_input" ;;
7985 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7987 s%@configure_input@%$configure_input%g
7988 s%@srcdir@%$srcdir%g
7989 s%@top_srcdir@%$top_srcdir%g
7990 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7994 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7995 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7997 # ac_d sets the value in "#define NAME VALUE" lines.
7998 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7999 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
8002 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
8003 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8004 ac_uB='\([ ]\)%\1#\2define\3'
8007 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
8008 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
8009 ac_eB='$%\1#\2define\3'
8013 if test "${CONFIG_HEADERS+set}" != set; then
8015 cat >> $CONFIG_STATUS <<EOF
8016 CONFIG_HEADERS="ncurses_cfg.h:ncurses_tst.hin"
8018 cat >> $CONFIG_STATUS <<\EOF
8020 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
8021 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
8023 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
8024 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
8025 *) ac_file_in="${ac_file}.in" ;;
8028 echo creating $ac_file
8030 rm -f conftest.frag conftest.in conftest.out
8031 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
8032 cat $ac_file_inputs > conftest.in
8037 # Transform confdefs.h into a list of #define's. We won't use it as a sed
8038 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
8039 # be either 'cat' or 'sort'.
8040 cat confdefs.h >conftest.vals
8042 # Break up conftest.vals because some shells have a limit on
8043 # the size of here documents, and old seds have small limits too.
8046 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
8049 ac_lines=`grep -c . conftest.vals`
8050 # grep -c gives empty output for an empty file on some AIX systems.
8051 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
8052 # Write chunks of a limited-size here document to conftest.frag.
8053 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
8054 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
8055 echo 'CEOF' >> $CONFIG_STATUS
8056 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
8058 mv conftest.tail conftest.vals
8062 # Run sed to substitute the contents of conftest.frag into conftest.in at the
8064 echo ' cat >> conftest.edit <<CEOF
8065 /@DEFS@/r conftest.frag
8068 sed -f conftest.edit conftest.in > conftest.out
8070 mv conftest.out conftest.in
8071 rm -f conftest.edit conftest.frag
8075 cat >> $CONFIG_STATUS <<\EOF
8076 rm -f conftest.frag conftest.h
8077 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
8078 cat conftest.in >> conftest.h
8080 if cmp -s $ac_file conftest.h 2>/dev/null; then
8081 echo "$ac_file is unchanged"
8084 # Remove last slash and all that follows it. Not all systems have dirname.
8085 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
8086 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
8087 # The file is in a subdirectory.
8088 test ! -d "$ac_dir" && mkdir "$ac_dir"
8091 mv conftest.h $ac_file
8096 cat >> $CONFIG_STATUS <<EOF
8097 # Extra initialization commands, if any
8103 cat >> $CONFIG_STATUS <<\EOF
8104 # Extra commands, if any
8109 if test ! -d $srcdir/$cf_dir; then
8111 elif test -f $srcdir/$cf_dir/programs; then
8112 $AWK -f $srcdir/mk-test.awk ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
8117 cat >>Makefile <<TEST_EOF
8119 # These rules are generated so we do not rely on suffix rules, which do not
8120 # work consistently for different make-programs (the '\$(MODEL)/' confuses
8121 # some, and the '\$x' confuses others).
8123 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
8126 cat >>Makefile <<TEST_EOF
8128 \$(MODEL)/$N.o : $N.c \\
8131 @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) $N.c
8137 chmod +x $CONFIG_STATUS
8138 rm -fr confdefs* $ac_clean_files
8139 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1