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 --enable-warnings test: turn on gcc compiler warnings
187 --with-curses-dir=DIR directory in which (n)curses is installed
188 --with-5lib use SunOS sysv-libraries
189 --with-ncursesw use wide ncurses-libraries (installed)
190 --with-ncurses use ncurses-libraries (installed)
191 --with-pdcurses compile/link with pdcurses X11 library
192 --with-x use the X Window System
193 --with-Xaw3d link with Xaw 3d library
194 --with-neXtaw link with neXT Athena library
195 --with-XawPlus link with Athena-Plus library
199 -host | --host | --hos | --ho)
201 -host=* | --host=* | --hos=* | --ho=*)
204 -includedir | --includedir | --includedi | --included | --include \
205 | --includ | --inclu | --incl | --inc)
206 ac_prev=includedir ;;
207 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
208 | --includ=* | --inclu=* | --incl=* | --inc=*)
209 includedir="$ac_optarg" ;;
211 -infodir | --infodir | --infodi | --infod | --info | --inf)
213 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
214 infodir="$ac_optarg" ;;
216 -libdir | --libdir | --libdi | --libd)
218 -libdir=* | --libdir=* | --libdi=* | --libd=*)
219 libdir="$ac_optarg" ;;
221 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
222 | --libexe | --libex | --libe)
223 ac_prev=libexecdir ;;
224 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
225 | --libexe=* | --libex=* | --libe=*)
226 libexecdir="$ac_optarg" ;;
228 -localstatedir | --localstatedir | --localstatedi | --localstated \
229 | --localstate | --localstat | --localsta | --localst \
230 | --locals | --local | --loca | --loc | --lo)
231 ac_prev=localstatedir ;;
232 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
233 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
234 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
235 localstatedir="$ac_optarg" ;;
237 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
239 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
240 mandir="$ac_optarg" ;;
243 # Obsolete; use --without-fp.
246 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
250 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
251 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
254 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
255 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
256 | --oldin | --oldi | --old | --ol | --o)
257 ac_prev=oldincludedir ;;
258 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
259 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
260 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
261 oldincludedir="$ac_optarg" ;;
263 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
265 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
266 prefix="$ac_optarg" ;;
268 -program-prefix | --program-prefix | --program-prefi | --program-pref \
269 | --program-pre | --program-pr | --program-p)
270 ac_prev=program_prefix ;;
271 -program-prefix=* | --program-prefix=* | --program-prefi=* \
272 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
273 program_prefix="$ac_optarg" ;;
275 -program-suffix | --program-suffix | --program-suffi | --program-suff \
276 | --program-suf | --program-su | --program-s)
277 ac_prev=program_suffix ;;
278 -program-suffix=* | --program-suffix=* | --program-suffi=* \
279 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
280 program_suffix="$ac_optarg" ;;
282 -program-transform-name | --program-transform-name \
283 | --program-transform-nam | --program-transform-na \
284 | --program-transform-n | --program-transform- \
285 | --program-transform | --program-transfor \
286 | --program-transfo | --program-transf \
287 | --program-trans | --program-tran \
288 | --progr-tra | --program-tr | --program-t)
289 ac_prev=program_transform_name ;;
290 -program-transform-name=* | --program-transform-name=* \
291 | --program-transform-nam=* | --program-transform-na=* \
292 | --program-transform-n=* | --program-transform-=* \
293 | --program-transform=* | --program-transfor=* \
294 | --program-transfo=* | --program-transf=* \
295 | --program-trans=* | --program-tran=* \
296 | --progr-tra=* | --program-tr=* | --program-t=*)
297 program_transform_name="$ac_optarg" ;;
299 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
300 | -silent | --silent | --silen | --sile | --sil)
303 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
305 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
307 sbindir="$ac_optarg" ;;
309 -sharedstatedir | --sharedstatedir | --sharedstatedi \
310 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
311 | --sharedst | --shareds | --shared | --share | --shar \
313 ac_prev=sharedstatedir ;;
314 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
315 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
316 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
318 sharedstatedir="$ac_optarg" ;;
320 -site | --site | --sit)
322 -site=* | --site=* | --sit=*)
325 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
327 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
328 srcdir="$ac_optarg" ;;
330 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
331 | --syscon | --sysco | --sysc | --sys | --sy)
332 ac_prev=sysconfdir ;;
333 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
334 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
335 sysconfdir="$ac_optarg" ;;
337 -target | --target | --targe | --targ | --tar | --ta | --t)
339 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
340 target="$ac_optarg" ;;
342 -v | -verbose | --verbose | --verbos | --verbo | --verb)
345 -version | --version | --versio | --versi | --vers)
346 echo "configure generated by autoconf version 2.13.20030927"
350 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
351 # Reject names that are not valid shell variable names.
352 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
353 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
355 ac_package=`echo $ac_package| sed 's/-/_/g'`
360 eval "with_${ac_package}='$ac_optarg'" ;;
362 -without-* | --without-*)
363 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
364 # Reject names that are not valid shell variable names.
365 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
366 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
368 ac_package=`echo $ac_package| sed 's/-/_/g'`
369 eval "with_${ac_package}=no" ;;
372 # Obsolete; use --with-x.
375 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
376 | --x-incl | --x-inc | --x-in | --x-i)
377 ac_prev=x_includes ;;
378 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
379 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
380 x_includes="$ac_optarg" ;;
382 -x-libraries | --x-libraries | --x-librarie | --x-librari \
383 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
384 ac_prev=x_libraries ;;
385 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
386 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
387 x_libraries="$ac_optarg" ;;
389 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
393 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
394 echo "configure: warning: $ac_option: invalid host type" 1>&2
396 if test "x$nonopt" != xNONE; then
397 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
405 if test -n "$ac_prev"; then
406 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
409 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
411 # File descriptor usage:
414 # 2 errors and warnings
415 # 3 some systems may open it to /dev/tty
416 # 4 used on the Kubota Titan
417 # 6 checking for... messages and results
418 # 5 compiler messages saved in config.log
419 if test "$silent" = yes; then
427 This file contains any messages produced by compilers while
428 running configure, to aid debugging if configure makes a mistake.
431 # Strip out --no-create and --no-recursion so they do not pile up.
432 # Also quote any args containing shell metacharacters.
437 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
438 | --no-cr | --no-c) ;;
439 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
440 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
441 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
442 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
443 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
448 # Only set these to C if already set. These must not be set unconditionally
449 # because not all systems understand e.g. LANG=C (notably SCO).
450 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
451 # Non-C LC_CTYPE values break the ctype check.
452 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
453 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
454 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
455 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
457 # confdefs.h avoids OS command line length limits that DEFS can exceed.
458 rm -rf conftest* confdefs.h
459 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
462 # A filename unique to this package, relative to the directory that
463 # configure is in, which we can look for to find out if srcdir is correct.
464 ac_unique_file=ncurses.c
466 # Find the source files, if location was not specified.
467 if test -z "$srcdir"; then
468 ac_srcdir_defaulted=yes
469 # Try the directory containing this script, then its parent.
471 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
472 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
474 if test ! -r $srcdir/$ac_unique_file; then
478 ac_srcdir_defaulted=no
480 if test ! -r $srcdir/$ac_unique_file; then
481 if test "$ac_srcdir_defaulted" = yes; then
482 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
484 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
487 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
489 # Prefer explicitly selected file to automatically selected ones.
490 if test -z "$CONFIG_SITE"; then
491 if test "x$prefix" != xNONE; then
492 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
494 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
497 for ac_site_file in $CONFIG_SITE; do
498 if test -r "$ac_site_file"; then
499 echo "loading site script $ac_site_file"
504 if test -r "$cache_file"; then
505 echo "loading cache $cache_file"
508 echo "creating cache $cache_file"
513 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
514 ac_cpp='$CPP $CPPFLAGS'
515 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
516 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
517 cross_compiling=$ac_cv_prog_cc_cross
521 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
522 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
523 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
530 ac_n= ac_c='\c' ac_t=
533 # If we find X, set shell vars x_includes and x_libraries to the
534 # paths, otherwise set no_x=yes.
535 # Uses ac_ vars as temps to allow command line to override cache and checks.
536 # --without-x overrides everything else, but does not touch the cache.
537 echo $ac_n "checking for X""... $ac_c" 1>&6
538 echo "configure:539: checking for X" >&5
541 # Check whether --with-x or --without-x was given.
542 if test "${with_x+set}" = set; then
547 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
548 if test "x$with_x" = xno; then
549 # The user explicitly disabled X.
552 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
553 # Both variables are already set.
556 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
557 echo $ac_n "(cached) $ac_c" 1>&6
559 # One or both of the vars are not set, and there is no cached value.
560 ac_x_includes=NO ac_x_libraries=NO
562 if mkdir conftestdir; then
564 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
565 cat > Imakefile <<'EOF'
567 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
569 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
570 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
571 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
572 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
573 for ac_extension in a so sl; do
574 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
575 test -f $ac_im_libdir/libX11.$ac_extension; then
576 ac_im_usrlibdir=$ac_im_libdir; break
579 # Screen out bogus values from the imake configuration. They are
580 # bogus both because they are the default anyway, and because
581 # using them would break gcc on systems where it needs fixed includes.
582 case "$ac_im_incroot" in
584 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
586 case "$ac_im_usrlibdir" in
588 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
595 if test "$ac_x_includes" = NO; then
596 # Guess where to find include files, by looking for this one X11 .h file.
597 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
599 # First, try using that file with no special directory specified.
600 cat > conftest.$ac_ext <<EOF
601 #line 602 "configure"
602 #include "confdefs.h"
603 #include <$x_direct_test_include>
605 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
606 { (eval echo configure:607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
607 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
608 if test -z "$ac_err"; then
610 # We can compile using X headers with no special include directory.
614 echo "configure: failed program was:" >&5
615 cat conftest.$ac_ext >&5
617 # Look for the header file in a standard set of common directories.
618 # Check X11 before X11Rn because it is often a symlink to the current release.
630 /usr/local/X11/include \
631 /usr/local/X11R6/include \
632 /usr/local/X11R5/include \
633 /usr/local/X11R4/include \
635 /usr/local/include/X11 \
636 /usr/local/include/X11R6 \
637 /usr/local/include/X11R5 \
638 /usr/local/include/X11R4 \
642 /usr/XFree86/include/X11 \
646 /usr/unsupported/include \
647 /usr/athena/include \
648 /usr/local/x11r5/include \
649 /usr/lpp/Xamples/include \
651 /usr/openwin/include \
652 /usr/openwin/share/include \
655 if test -r "$ac_dir/$x_direct_test_include"; then
656 ac_x_includes=$ac_dir
662 fi # $ac_x_includes = NO
664 if test "$ac_x_libraries" = NO; then
665 # Check for the libraries.
667 test -z "$x_direct_test_library" && x_direct_test_library=Xt
668 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
670 # See if we find them without any special options.
671 # Don't add to $LIBS permanently.
673 LIBS="-l$x_direct_test_library $LIBS"
674 cat > conftest.$ac_ext <<EOF
675 #line 676 "configure"
676 #include "confdefs.h"
679 ${x_direct_test_function}()
682 if { (eval echo configure:683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
685 # We can link X programs with no special library path.
688 echo "configure: failed program was:" >&5
689 cat conftest.$ac_ext >&5
692 # First see if replacing the include by lib works.
693 # Check X11 before X11Rn because it is often a symlink to the current release.
694 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
706 /usr/local/X11R6/lib \
707 /usr/local/X11R5/lib \
708 /usr/local/X11R4/lib \
711 /usr/local/lib/X11R6 \
712 /usr/local/lib/X11R5 \
713 /usr/local/lib/X11R4 \
717 /usr/XFree86/lib/X11 \
721 /usr/unsupported/lib \
723 /usr/local/x11r5/lib \
724 /usr/lpp/Xamples/lib \
728 /usr/openwin/share/lib \
731 for ac_extension in a so sl; do
732 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
733 ac_x_libraries=$ac_dir
740 fi # $ac_x_libraries = NO
742 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
743 # Didn't find X anywhere. Cache the known absence of X.
744 ac_cv_have_x="have_x=no"
746 # Record where we found X for the cache.
747 ac_cv_have_x="have_x=yes \
748 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
755 if test "$have_x" != yes; then
756 echo "$ac_t""$have_x" 1>&6
759 # If each of the values was on the command line, it overrides each guess.
760 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
761 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
762 # Update the cache value to reflect the command line values.
763 ac_cv_have_x="have_x=yes \
764 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
765 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
772 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
775 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
778 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
779 if test -f $ac_dir/install-sh; then
781 ac_install_sh="$ac_aux_dir/install-sh -c"
783 elif test -f $ac_dir/install.sh; then
785 ac_install_sh="$ac_aux_dir/install.sh -c"
789 if test -z "$ac_aux_dir"; then
790 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
792 ac_config_guess=$ac_aux_dir/config.guess
793 ac_config_sub=$ac_aux_dir/config.sub
794 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
797 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
799 # Make sure we can run config.sub.
800 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
801 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
804 echo $ac_n "checking host system type""... $ac_c" 1>&6
805 echo "configure:806: checking host system type" >&5
808 case "$host_alias" in
812 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
813 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
815 *) host_alias=$nonopt ;;
819 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
820 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
821 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
822 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
823 echo "$ac_t""$host" 1>&6
825 system_name="$host_os"
827 system_name="`(uname -s -r) 2>/dev/null`"
828 if test -z "$system_name" ; then
829 system_name="`(hostname) 2>/dev/null`"
832 test -n "$system_name" && cat >> confdefs.h <<EOF
833 #define SYSTEM_NAME "$system_name"
836 if eval "test \"`echo '$''{'cf_cv_system_name'+set}'`\" = set"; then
837 echo $ac_n "(cached) $ac_c" 1>&6
839 cf_cv_system_name="$system_name"
843 test -z "$system_name" && system_name="$cf_cv_system_name"
844 test -n "$cf_cv_system_name" && echo "$ac_t""Configuring for $cf_cv_system_name" 1>&6
846 if test ".$system_name" != ".$cf_cv_system_name" ; then
847 echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6
848 { echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; }
852 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
853 echo "configure:854: checking whether ${MAKE-make} sets \${MAKE}" >&5
854 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
855 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
856 echo $ac_n "(cached) $ac_c" 1>&6
858 cat > conftestmake <<\EOF
860 @echo 'ac_maketemp="${MAKE}"'
862 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
863 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
864 if test -n "$ac_maketemp"; then
865 eval ac_cv_prog_make_${ac_make}_set=yes
867 eval ac_cv_prog_make_${ac_make}_set=no
871 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
872 echo "$ac_t""yes" 1>&6
875 echo "$ac_t""no" 1>&6
876 SET_MAKE="MAKE=${MAKE-make}"
879 # Extract the first word of "gcc", so it can be a program name with args.
880 set dummy gcc; ac_word=$2
881 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
882 echo "configure:883: checking for $ac_word" >&5
883 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
884 echo $ac_n "(cached) $ac_c" 1>&6
886 if test -n "$CC"; then
887 ac_cv_prog_CC="$CC" # Let the user override the test.
889 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
891 for ac_dir in $ac_dummy; do
892 test -z "$ac_dir" && ac_dir=.
893 if test -f $ac_dir/$ac_word; then
902 if test -n "$CC"; then
903 echo "$ac_t""$CC" 1>&6
905 echo "$ac_t""no" 1>&6
908 if test -z "$CC"; then
909 # Extract the first word of "cc", so it can be a program name with args.
910 set dummy cc; ac_word=$2
911 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
912 echo "configure:913: checking for $ac_word" >&5
913 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
914 echo $ac_n "(cached) $ac_c" 1>&6
916 if test -n "$CC"; then
917 ac_cv_prog_CC="$CC" # Let the user override the test.
919 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
922 for ac_dir in $ac_dummy; do
923 test -z "$ac_dir" && ac_dir=.
924 if test -f $ac_dir/$ac_word; then
925 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
934 if test $ac_prog_rejected = yes; then
935 # We found a bogon in the path, so make sure we never use it.
936 set dummy $ac_cv_prog_CC
938 if test $# -gt 0; then
939 # We chose a different compiler from the bogus one.
940 # However, it has the same basename, so the bogon will be chosen
941 # first if we set CC to just the basename; use the full file name.
943 set dummy "$ac_dir/$ac_word" "$@"
951 if test -n "$CC"; then
952 echo "$ac_t""$CC" 1>&6
954 echo "$ac_t""no" 1>&6
957 if test -z "$CC"; then
960 # Extract the first word of "cl", so it can be a program name with args.
961 set dummy cl; ac_word=$2
962 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
963 echo "configure:964: checking for $ac_word" >&5
964 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
965 echo $ac_n "(cached) $ac_c" 1>&6
967 if test -n "$CC"; then
968 ac_cv_prog_CC="$CC" # Let the user override the test.
970 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
972 for ac_dir in $ac_dummy; do
973 test -z "$ac_dir" && ac_dir=.
974 if test -f $ac_dir/$ac_word; then
983 if test -n "$CC"; then
984 echo "$ac_t""$CC" 1>&6
986 echo "$ac_t""no" 1>&6
991 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
994 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
995 echo "configure:996: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
998 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
999 ac_cpp='$CPP $CPPFLAGS'
1000 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1001 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1002 cross_compiling=$ac_cv_prog_cc_cross
1004 cat > conftest.$ac_ext << EOF
1006 #line 1007 "configure"
1007 #include "confdefs.h"
1011 if { (eval echo configure:1012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1012 ac_cv_prog_cc_works=yes
1013 # If we can't run a trivial program, we are probably using a cross compiler.
1014 if (./conftest; exit) 2>/dev/null; then
1015 ac_cv_prog_cc_cross=no
1017 ac_cv_prog_cc_cross=yes
1020 echo "configure: failed program was:" >&5
1021 cat conftest.$ac_ext >&5
1022 ac_cv_prog_cc_works=no
1026 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1027 ac_cpp='$CPP $CPPFLAGS'
1028 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1029 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1030 cross_compiling=$ac_cv_prog_cc_cross
1032 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1033 if test $ac_cv_prog_cc_works = no; then
1034 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1036 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1037 echo "configure:1038: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1038 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1039 cross_compiling=$ac_cv_prog_cc_cross
1041 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1042 echo "configure:1043: checking whether we are using GNU C" >&5
1043 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1044 echo $ac_n "(cached) $ac_c" 1>&6
1046 cat > conftest.c <<EOF
1051 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1058 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1060 if test $ac_cv_prog_gcc = yes; then
1066 ac_test_CFLAGS="${CFLAGS+set}"
1067 ac_save_CFLAGS="$CFLAGS"
1069 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1070 echo "configure:1071: checking whether ${CC-cc} accepts -g" >&5
1071 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1072 echo $ac_n "(cached) $ac_c" 1>&6
1074 echo 'void f(){}' > conftest.c
1075 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1084 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1085 if test "$ac_test_CFLAGS" = set; then
1086 CFLAGS="$ac_save_CFLAGS"
1087 elif test $ac_cv_prog_cc_g = yes; then
1088 if test "$GCC" = yes; then
1094 if test "$GCC" = yes; then
1101 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1102 echo "configure:1103: checking how to run the C preprocessor" >&5
1103 # On Suns, sometimes $CPP names a directory.
1104 if test -n "$CPP" && test -d "$CPP"; then
1107 if test -z "$CPP"; then
1108 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1109 echo $ac_n "(cached) $ac_c" 1>&6
1111 # This must be in double quotes, not single quotes, because CPP may get
1112 # substituted into the Makefile and "${CC-cc}" will confuse make.
1114 # On the NeXT, cc -E runs the code through the compiler's parser,
1115 # not just through cpp.
1116 cat > conftest.$ac_ext <<EOF
1117 #line 1118 "configure"
1118 #include "confdefs.h"
1122 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1123 { (eval echo configure:1124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1124 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1125 if test -z "$ac_err"; then
1129 echo "configure: failed program was:" >&5
1130 cat conftest.$ac_ext >&5
1132 CPP="${CC-cc} -E -traditional-cpp"
1133 cat > conftest.$ac_ext <<EOF
1134 #line 1135 "configure"
1135 #include "confdefs.h"
1139 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1140 { (eval echo configure:1141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1141 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1142 if test -z "$ac_err"; then
1146 echo "configure: failed program was:" >&5
1147 cat conftest.$ac_ext >&5
1149 CPP="${CC-cc} -nologo -E"
1150 cat > conftest.$ac_ext <<EOF
1151 #line 1152 "configure"
1152 #include "confdefs.h"
1156 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1157 { (eval echo configure:1158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1158 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1159 if test -z "$ac_err"; then
1163 echo "configure: failed program was:" >&5
1164 cat conftest.$ac_ext >&5
1173 ac_cv_prog_CPP="$CPP"
1175 CPP="$ac_cv_prog_CPP"
1177 ac_cv_prog_CPP="$CPP"
1179 echo "$ac_t""$CPP" 1>&6
1181 for ac_prog in mawk gawk nawk awk
1183 # Extract the first word of "$ac_prog", so it can be a program name with args.
1184 set dummy $ac_prog; ac_word=$2
1185 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1186 echo "configure:1187: checking for $ac_word" >&5
1187 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1188 echo $ac_n "(cached) $ac_c" 1>&6
1190 if test -n "$AWK"; then
1191 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1193 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1195 for ac_dir in $ac_dummy; do
1196 test -z "$ac_dir" && ac_dir=.
1197 if test -f $ac_dir/$ac_word; then
1198 ac_cv_prog_AWK="$ac_prog"
1205 AWK="$ac_cv_prog_AWK"
1206 if test -n "$AWK"; then
1207 echo "$ac_t""$AWK" 1>&6
1209 echo "$ac_t""no" 1>&6
1212 test -n "$AWK" && break
1217 CC_SHARED_OPTS=unknown
1218 CPPFLAGS="$CPPFLAGS"
1220 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
1221 DFT_UPR_MODEL="NORMAL"
1222 ECHO_LINK='@ echo linking $@ ... ;'
1239 TINFO_ARGS='$(LIBS_CURSES)'
1240 cf_cv_abi_version=""
1241 cf_cv_rel_version=""
1246 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1247 echo "configure:1248: checking for Cygwin environment" >&5
1248 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1249 echo $ac_n "(cached) $ac_c" 1>&6
1251 cat > conftest.$ac_ext <<EOF
1252 #line 1253 "configure"
1253 #include "confdefs.h"
1258 #define __CYGWIN__ __CYGWIN32__
1263 if { (eval echo configure:1264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1267 echo "configure: failed program was:" >&5
1268 cat conftest.$ac_ext >&5
1276 echo "$ac_t""$ac_cv_cygwin" 1>&6
1278 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1279 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1280 echo "configure:1281: checking for mingw32 environment" >&5
1281 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1282 echo $ac_n "(cached) $ac_c" 1>&6
1284 cat > conftest.$ac_ext <<EOF
1285 #line 1286 "configure"
1286 #include "confdefs.h"
1292 if { (eval echo configure:1293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1296 echo "configure: failed program was:" >&5
1297 cat conftest.$ac_ext >&5
1305 echo "$ac_t""$ac_cv_mingw32" 1>&6
1307 test "$ac_cv_mingw32" = yes && MINGW32=yes
1310 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1311 echo "configure:1312: checking for executable suffix" >&5
1312 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1313 echo $ac_n "(cached) $ac_c" 1>&6
1315 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1319 echo 'int main () { return 0; }' > conftest.$ac_ext
1321 if { (eval echo configure:1322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1322 for file in conftest.*; do
1324 *.c | *.o | *.obj) ;;
1325 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1329 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1332 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1337 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1338 echo "$ac_t""${ac_cv_exeext}" 1>&6
1341 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1342 echo "configure:1343: checking for object suffix" >&5
1343 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1344 echo $ac_n "(cached) $ac_c" 1>&6
1347 echo 'int i = 1;' > conftest.$ac_ext
1348 if { (eval echo configure:1349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1349 for ac_file in conftest.*; do
1352 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1356 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1361 echo "$ac_t""$ac_cv_objext" 1>&6
1362 OBJEXT=$ac_cv_objext
1363 ac_objext=$ac_cv_objext
1367 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1368 echo "configure:1369: checking for ${CC-cc} option to accept ANSI C" >&5
1369 if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
1370 echo $ac_n "(cached) $ac_c" 1>&6
1374 cf_save_CFLAGS="$CFLAGS"
1375 cf_save_CPPFLAGS="$CPPFLAGS"
1376 # Don't try gcc -ansi; that turns off useful extensions and
1377 # breaks some systems' header files.
1378 # AIX -qlanglvl=ansi
1379 # Ultrix and OSF/1 -std1
1380 # HP-UX -Aa -D_HPUX_SOURCE
1382 # UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
1383 for cf_arg in "-DCC_HAS_PROTOS" \
1388 "-Aa -D_HPUX_SOURCE" \
1395 cf_new_extra_cppflags=
1397 for cf_add_cflags in $cf_arg
1399 case $cf_fix_cppflags in
1401 case $cf_add_cflags in #(vi
1402 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1403 case $cf_add_cflags in
1405 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1407 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1408 && test -z "${cf_tst_cflags}" \
1409 && cf_fix_cppflags=yes
1411 if test $cf_fix_cppflags = yes ; then
1412 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1414 elif test "${cf_tst_cflags}" = "\"'" ; then
1415 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1421 *$cf_add_cflags) #(vi
1424 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1429 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1434 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1436 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1438 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1439 && test -z "${cf_tst_cflags}" \
1440 && cf_fix_cppflags=no
1445 if test -n "$cf_new_cflags" ; then
1447 CFLAGS="$CFLAGS $cf_new_cflags"
1450 if test -n "$cf_new_cppflags" ; then
1452 CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
1455 if test -n "$cf_new_extra_cppflags" ; then
1457 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1463 cat > conftest.$ac_ext <<EOF
1464 #line 1465 "configure"
1465 #include "confdefs.h"
1467 #ifndef CC_HAS_PROTOS
1468 #if !defined(__STDC__) || (__STDC__ != 1)
1475 int test (int i, double x);
1476 struct s1 {int (*f) (int a);};
1477 struct s2 {int (*f) (double a);};
1480 if { (eval echo configure:1481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1482 cf_cv_ansi_cc="$cf_arg"; break
1484 echo "configure: failed program was:" >&5
1485 cat conftest.$ac_ext >&5
1489 CFLAGS="$cf_save_CFLAGS"
1490 CPPFLAGS="$cf_save_CPPFLAGS"
1494 echo "$ac_t""$cf_cv_ansi_cc" 1>&6
1496 if test "$cf_cv_ansi_cc" != "no"; then
1497 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
1502 cf_new_extra_cppflags=
1504 for cf_add_cflags in $cf_cv_ansi_cc
1506 case $cf_fix_cppflags in
1508 case $cf_add_cflags in #(vi
1509 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1510 case $cf_add_cflags in
1512 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1514 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1515 && test -z "${cf_tst_cflags}" \
1516 && cf_fix_cppflags=yes
1518 if test $cf_fix_cppflags = yes ; then
1519 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1521 elif test "${cf_tst_cflags}" = "\"'" ; then
1522 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1528 *$cf_add_cflags) #(vi
1531 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1536 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1541 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1543 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1545 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1546 && test -z "${cf_tst_cflags}" \
1547 && cf_fix_cppflags=no
1552 if test -n "$cf_new_cflags" ; then
1554 CFLAGS="$CFLAGS $cf_new_cflags"
1557 if test -n "$cf_new_cppflags" ; then
1559 CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
1562 if test -n "$cf_new_extra_cppflags" ; then
1564 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1571 cat >> confdefs.h <<\EOF
1572 #define CC_HAS_PROTOS 1
1579 if test "$cf_cv_ansi_cc" = "no"; then
1580 { echo "configure: error: Your compiler does not appear to recognize prototypes.
1581 You have the following choices:
1582 a. adjust your compiler options
1583 b. get an up-to-date compiler
1584 c. use a wrapper such as unproto" 1>&2; exit 1; }
1590 if test "$GCC" = yes ; then
1591 echo $ac_n "checking version of $CC""... $ac_c" 1>&6
1592 echo "configure:1593: checking version of $CC" >&5
1593 GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1594 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1595 echo "$ac_t""$GCC_VERSION" 1>&6
1599 if ( test "$GCC" = yes || test "$GXX" = yes )
1601 echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
1602 echo "configure:1603: checking if you want to turn on gcc warnings" >&5
1604 # Check whether --enable-warnings or --disable-warnings was given.
1605 if test "${enable_warnings+set}" = set; then
1606 enableval="$enable_warnings"
1607 test "$enableval" != yes && enableval=no
1608 if test "$enableval" != "no" ; then
1619 echo "$ac_t""$with_warnings" 1>&6
1620 if test "$with_warnings" = "yes"
1627 if test "$GCC" = yes ; then
1630 echo $ac_n "checking if this is really Intel C compiler""... $ac_c" 1>&6
1631 echo "configure:1632: checking if this is really Intel C compiler" >&5
1632 cf_save_CFLAGS="$CFLAGS"
1633 CFLAGS="$CFLAGS -no-gcc"
1634 cat > conftest.$ac_ext <<EOF
1635 #line 1636 "configure"
1636 #include "confdefs.h"
1640 #ifdef __INTEL_COMPILER
1647 if { (eval echo configure:1648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1650 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
1653 echo "configure: failed program was:" >&5
1654 cat conftest.$ac_ext >&5
1657 CFLAGS="$cf_save_CFLAGS"
1658 echo "$ac_t""$INTEL_COMPILER" 1>&6
1664 cat > conftest.$ac_ext <<EOF
1665 #line 1666 "configure"
1666 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
1669 if test "$INTEL_COMPILER" = yes
1671 # The "-wdXXX" options suppress warnings:
1672 # remark #1419: external declaration in primary source file
1673 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
1674 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
1675 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
1676 # remark #193: zero used for undefined preprocessing identifier
1677 # remark #593: variable "curs_sb_left_arrow" was set but never used
1678 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
1679 # remark #869: parameter "tw" was never referenced
1680 # remark #981: operands are evaluated in unspecified order
1681 # warning #269: invalid format string conversion
1683 echo "checking for $CC warning options" 1>&6
1684 echo "configure:1685: checking for $CC warning options" >&5
1685 cf_save_CFLAGS="$CFLAGS"
1686 EXTRA_CFLAGS="-Wall"
1699 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
1700 if { (eval echo configure:1701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1701 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
1702 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
1705 CFLAGS="$cf_save_CFLAGS"
1707 elif test "$GCC" = yes
1709 echo "checking for $CC warning options" 1>&6
1710 echo "configure:1711: checking for $CC warning options" >&5
1711 cf_save_CFLAGS="$CFLAGS"
1712 EXTRA_CFLAGS="-W -Wall"
1714 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
1716 Wbad-function-cast \
1720 Wmissing-declarations \
1721 Wmissing-prototypes \
1725 Wstrict-prototypes \
1726 Wundef $cf_warn_CONST
1728 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
1729 if { (eval echo configure:1730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1730 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
1731 case $cf_opt in #(vi
1733 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
1736 case $GCC_VERSION in
1738 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
1744 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
1747 CFLAGS="$cf_save_CFLAGS"
1757 if test "$GCC" = yes
1759 cat > conftest.i <<EOF
1761 #define GCC_PRINTF 0
1766 #ifndef GCC_NORETURN
1767 #define GCC_NORETURN /* nothing */
1770 #define GCC_UNUSED /* nothing */
1773 if test "$GCC" = yes
1775 echo "checking for $CC __attribute__ directives" 1>&6
1776 echo "configure:1777: checking for $CC __attribute__ directives" >&5
1777 cat > conftest.$ac_ext <<EOF
1778 #line 1779 "configure"
1779 #include "confdefs.h"
1780 #include "conftest.h"
1781 #include "conftest.i"
1783 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
1785 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
1788 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
1790 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
1792 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
1793 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
1794 extern void foo(void) GCC_NORETURN;
1795 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
1797 for cf_attribute in scanf printf unused noreturn
1800 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1802 cf_directive="__attribute__(($cf_attribute))"
1803 echo "checking for $CC $cf_directive" 1>&5
1804 case $cf_attribute in
1806 cat >conftest.h <<EOF
1807 #define GCC_$cf_ATTRIBUTE 1
1811 cat >conftest.h <<EOF
1812 #define GCC_$cf_ATTRIBUTE $cf_directive
1816 if { (eval echo configure:1817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1817 test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
1818 cat conftest.h >>confdefs.h
1822 fgrep define conftest.i >>confdefs.h
1828 echo $ac_n "checking if $CC -U and -D options work together""... $ac_c" 1>&6
1829 echo "configure:1830: checking if $CC -U and -D options work together" >&5
1830 if eval "test \"`echo '$''{'cf_cv_cc_u_d_options'+set}'`\" = set"; then
1831 echo $ac_n "(cached) $ac_c" 1>&6
1834 cf_save_CPPFLAGS="$CPPFLAGS"
1835 CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
1836 cat > conftest.$ac_ext <<EOF
1837 #line 1838 "configure"
1838 #include "confdefs.h"
1843 make an undefined-error
1846 make a defined-error
1851 if { (eval echo configure:1852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1854 cf_cv_cc_u_d_options=yes
1856 echo "configure: failed program was:" >&5
1857 cat conftest.$ac_ext >&5
1860 cf_cv_cc_u_d_options=no
1863 CPPFLAGS="$cf_save_CPPFLAGS"
1867 echo "$ac_t""$cf_cv_cc_u_d_options" 1>&6
1874 cf_POSIX_C_SOURCE=199506L
1876 case $host_os in #(vi
1878 CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
1881 # 5.x headers associate
1882 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
1883 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
1884 cf_POSIX_C_SOURCE=200112L
1886 CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1889 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
1892 CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
1896 echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
1897 echo "configure:1898: checking if we must define _GNU_SOURCE" >&5
1898 if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
1899 echo $ac_n "(cached) $ac_c" 1>&6
1902 cat > conftest.$ac_ext <<EOF
1903 #line 1904 "configure"
1904 #include "confdefs.h"
1905 #include <sys/types.h>
1908 #ifndef _XOPEN_SOURCE
1913 if { (eval echo configure:1914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1917 echo "configure: failed program was:" >&5
1918 cat conftest.$ac_ext >&5
1921 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1922 cat > conftest.$ac_ext <<EOF
1923 #line 1924 "configure"
1924 #include "confdefs.h"
1925 #include <sys/types.h>
1928 #ifdef _XOPEN_SOURCE
1933 if { (eval echo configure:1934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1937 echo "configure: failed program was:" >&5
1938 cat conftest.$ac_ext >&5
1940 cf_cv_gnu_source=yes
1950 echo "$ac_t""$cf_cv_gnu_source" 1>&6
1951 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1955 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
1958 # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
1961 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
1964 CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
1967 CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
1970 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
1973 CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
1976 echo $ac_n "checking if we should define _XOPEN_SOURCE""... $ac_c" 1>&6
1977 echo "configure:1978: checking if we should define _XOPEN_SOURCE" >&5
1978 if eval "test \"`echo '$''{'cf_cv_xopen_source'+set}'`\" = set"; then
1979 echo $ac_n "(cached) $ac_c" 1>&6
1982 cat > conftest.$ac_ext <<EOF
1983 #line 1984 "configure"
1984 #include "confdefs.h"
1985 #include <sys/types.h>
1988 #ifndef _XOPEN_SOURCE
1993 if { (eval echo configure:1994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1995 cf_cv_xopen_source=no
1997 echo "configure: failed program was:" >&5
1998 cat conftest.$ac_ext >&5
2001 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2002 cat > conftest.$ac_ext <<EOF
2003 #line 2004 "configure"
2004 #include "confdefs.h"
2005 #include <sys/types.h>
2008 #ifdef _XOPEN_SOURCE
2013 if { (eval echo configure:2014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2015 cf_cv_xopen_source=no
2017 echo "configure: failed program was:" >&5
2018 cat conftest.$ac_ext >&5
2020 cf_cv_xopen_source=$cf_XOPEN_SOURCE
2030 echo "$ac_t""$cf_cv_xopen_source" 1>&6
2031 if test "$cf_cv_xopen_source" != no ; then
2033 # remove _XOPEN_SOURCE symbol from $CFLAGS
2034 CFLAGS=`echo "$CFLAGS" | \
2035 sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
2036 -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
2039 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
2040 CPPFLAGS=`echo "$CPPFLAGS" | \
2041 sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
2042 -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
2044 test "$cf_cv_cc_u_d_options" = yes && \
2045 CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
2046 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
2049 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
2051 cf_save_CFLAGS="$CFLAGS"
2052 cf_save_CPPFLAGS="$CPPFLAGS"
2055 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
2056 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
2057 sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
2058 -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
2061 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
2062 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
2063 sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
2064 -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
2067 echo $ac_n "checking if we should define _POSIX_C_SOURCE""... $ac_c" 1>&6
2068 echo "configure:2069: checking if we should define _POSIX_C_SOURCE" >&5
2069 if eval "test \"`echo '$''{'cf_cv_posix_c_source'+set}'`\" = set"; then
2070 echo $ac_n "(cached) $ac_c" 1>&6
2074 echo "(line 2075) testing if the symbol is already defined go no further ..." 1>&5
2076 cat > conftest.$ac_ext <<EOF
2077 #line 2078 "configure"
2078 #include "confdefs.h"
2079 #include <sys/types.h>
2082 #ifndef _POSIX_C_SOURCE
2087 if { (eval echo configure:2088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2089 cf_cv_posix_c_source=no
2091 echo "configure: failed program was:" >&5
2092 cat conftest.$ac_ext >&5
2094 cf_want_posix_source=no
2095 case .$cf_POSIX_C_SOURCE in #(vi
2097 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2100 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2101 cf_want_posix_source=yes
2104 cf_want_posix_source=yes
2107 if test "$cf_want_posix_source" = yes ; then
2108 cat > conftest.$ac_ext <<EOF
2109 #line 2110 "configure"
2110 #include "confdefs.h"
2111 #include <sys/types.h>
2114 #ifdef _POSIX_SOURCE
2119 if { (eval echo configure:2120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2122 echo "configure: failed program was:" >&5
2123 cat conftest.$ac_ext >&5
2125 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
2130 echo "(line 2131) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
2132 CFLAGS="$cf_trim_CFLAGS"
2133 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
2135 echo "(line 2136) testing if the second compile does not leave our definition intact error ..." 1>&5
2137 cat > conftest.$ac_ext <<EOF
2138 #line 2139 "configure"
2139 #include "confdefs.h"
2140 #include <sys/types.h>
2143 #ifndef _POSIX_C_SOURCE
2148 if { (eval echo configure:2149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2151 echo "configure: failed program was:" >&5
2152 cat conftest.$ac_ext >&5
2154 cf_cv_posix_c_source=no
2157 CFLAGS="$cf_save_CFLAGS"
2158 CPPFLAGS="$cf_save_CPPFLAGS"
2165 echo "$ac_t""$cf_cv_posix_c_source" 1>&6
2167 if test "$cf_cv_posix_c_source" != no ; then
2168 CFLAGS="$cf_trim_CFLAGS"
2169 CPPFLAGS="$cf_trim_CPPFLAGS"
2170 if test "$cf_cv_cc_u_d_options" = yes ; then
2171 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
2172 sed -e 's/-D/-U/g' -e 's/=[^ ]*//g'`
2173 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
2175 CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
2185 # Check whether --with-curses-dir or --without-curses-dir was given.
2186 if test "${with_curses_dir+set}" = set; then
2187 withval="$with_curses_dir"
2189 if test "x$prefix" != xNONE; then
2190 cf_path_syntax="$prefix"
2192 cf_path_syntax="$ac_default_prefix"
2195 case ".$withval" in #(vi
2196 .\$\(*\)*|.\'*\'*) #(vi
2200 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2203 eval withval="$withval"
2204 case ".$withval" in #(vi
2206 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2211 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2214 { echo "configure: error: expected a pathname, not \"$withval\"" 1>&2; exit 1; }
2218 cf_cv_curses_dir=$withval
2226 # Check whether --with-5lib or --without-5lib was given.
2227 if test "${with_5lib+set}" = set; then
2228 withval="$with_5lib"
2229 LIBS="-L/usr/5lib $LIBS"
2230 CPPFLAGS="$CPPFLAGS -I/usr/5include"
2235 # Check whether --with-ncursesw or --without-ncursesw was given.
2236 if test "${with_ncursesw+set}" = set; then
2237 withval="$with_ncursesw"
2238 cf_cv_screen=ncursesw
2243 # Check whether --with-ncurses or --without-ncurses was given.
2244 if test "${with_ncurses+set}" = set; then
2245 withval="$with_ncurses"
2246 cf_cv_screen=ncurses
2251 # Check whether --with-pdcurses or --without-pdcurses was given.
2252 if test "${with_pdcurses+set}" = set; then
2253 withval="$with_pdcurses"
2254 cf_cv_screen=pdcurses
2262 case $cf_cv_screen in
2266 echo $ac_n "checking for extra include directories""... $ac_c" 1>&6
2267 echo "configure:2268: checking for extra include directories" >&5
2268 if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then
2269 echo $ac_n "(cached) $ac_c" 1>&6
2272 cf_cv_curses_incdir=no
2273 case $host_os in #(vi
2275 test -d /usr/include/curses_colr && \
2276 cf_cv_curses_incdir="-I/usr/include/curses_colr"
2279 test -d /usr/5lib && \
2280 test -d /usr/5include && \
2281 cf_cv_curses_incdir="-I/usr/5include"
2287 echo "$ac_t""$cf_cv_curses_incdir" 1>&6
2288 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$cf_cv_curses_incdir $CPPFLAGS"
2291 echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
2292 echo "configure:2293: checking if we have identified curses headers" >&5
2293 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
2294 echo $ac_n "(cached) $ac_c" 1>&6
2297 cf_cv_ncurses_header=none
2304 cat > conftest.$ac_ext <<EOF
2305 #line 2306 "configure"
2306 #include "confdefs.h"
2307 #include <${cf_header}>
2309 initscr(); tgoto("?", 0,0)
2312 if { (eval echo configure:2313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2314 cf_cv_ncurses_header=$cf_header; break
2316 echo "configure: failed program was:" >&5
2317 cat conftest.$ac_ext >&5
2324 echo "$ac_t""$cf_cv_ncurses_header" 1>&6
2326 if test "$cf_cv_ncurses_header" = none ; then
2327 { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
2330 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
2331 for ac_hdr in $cf_cv_ncurses_header
2333 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2334 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2335 echo "configure:2336: checking for $ac_hdr" >&5
2336 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2337 echo $ac_n "(cached) $ac_c" 1>&6
2339 cat > conftest.$ac_ext <<EOF
2340 #line 2341 "configure"
2341 #include "confdefs.h"
2344 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2345 { (eval echo configure:2346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2346 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2347 if test -z "$ac_err"; then
2349 eval "ac_cv_header_$ac_safe=yes"
2352 echo "configure: failed program was:" >&5
2353 cat conftest.$ac_ext >&5
2355 eval "ac_cv_header_$ac_safe=no"
2359 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2360 echo "$ac_t""yes" 1>&6
2361 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2362 cat >> confdefs.h <<EOF
2363 #define $ac_tr_hdr 1
2367 echo "$ac_t""no" 1>&6
2373 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
2374 echo "configure:2375: checking for terminfo header" >&5
2375 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
2376 echo $ac_n "(cached) $ac_c" 1>&6
2379 case ${cf_cv_ncurses_header} in #(vi
2380 */ncurses.h|*/ncursesw.h) #(vi
2381 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
2384 cf_term_header=term.h
2388 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
2390 cat > conftest.$ac_ext <<EOF
2391 #line 2392 "configure"
2392 #include "confdefs.h"
2394 #include <${cf_cv_ncurses_header-curses.h}>
2398 int x = auto_left_margin
2401 if { (eval echo configure:2402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2404 cf_cv_term_header="$cf_test"
2406 echo "configure: failed program was:" >&5
2407 cat conftest.$ac_ext >&5
2410 cf_cv_term_header=unknown
2414 test "$cf_cv_term_header" != unknown && break
2419 echo "$ac_t""$cf_cv_term_header" 1>&6
2421 # Set definitions to allow ifdef'ing to accommodate subdirectories
2423 case $cf_cv_term_header in # (vi
2425 cat >> confdefs.h <<\EOF
2426 #define HAVE_TERM_H 1
2432 case $cf_cv_term_header in # (vi
2433 ncurses/term.h) #(vi
2434 cat >> confdefs.h <<\EOF
2435 #define HAVE_NCURSES_TERM_H 1
2440 cat >> confdefs.h <<\EOF
2441 #define HAVE_NCURSESW_TERM_H 1
2449 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
2450 echo "configure:2451: checking for ncurses version" >&5
2451 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
2452 echo $ac_n "(cached) $ac_c" 1>&6
2455 cf_cv_ncurses_version=no
2458 if test "$cross_compiling" = yes; then
2461 # This will not work if the preprocessor splits the line after the
2462 # Autoconf token. The 'unproto' program does that.
2463 cat > conftest.$ac_ext <<EOF
2464 #include <${cf_cv_ncurses_header-curses.h}>
2466 #ifdef NCURSES_VERSION
2467 Autoconf NCURSES_VERSION
2475 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
2476 { (eval echo configure:2477: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
2477 if test -f conftest.out ; then
2478 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
2479 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
2484 cat > conftest.$ac_ext <<EOF
2485 #line 2486 "configure"
2486 #include "confdefs.h"
2488 #include <${cf_cv_ncurses_header-curses.h}>
2492 FILE *fp = fopen("$cf_tempfile", "w");
2493 #ifdef NCURSES_VERSION
2494 # ifdef NCURSES_VERSION_PATCH
2495 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
2497 fprintf(fp, "%s\n", NCURSES_VERSION);
2501 fprintf(fp, "old\n");
2509 if { (eval echo configure:2510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2512 cf_cv_ncurses_version=`cat $cf_tempfile`
2514 echo "configure: failed program was:" >&5
2515 cat conftest.$ac_ext >&5
2524 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
2525 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
2532 echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
2533 echo "configure:2534: checking if we have identified curses libraries" >&5
2534 cat > conftest.$ac_ext <<EOF
2535 #line 2536 "configure"
2536 #include "confdefs.h"
2537 #include <${cf_cv_ncurses_header-curses.h}>
2539 initscr(); tgoto("?", 0,0)
2542 if { (eval echo configure:2543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2546 echo "configure: failed program was:" >&5
2547 cat conftest.$ac_ext >&5
2552 echo "$ac_t""$cf_result" 1>&6
2554 if test "$cf_result" = no ; then
2555 case $host_os in #(vi
2557 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
2558 echo "configure:2559: checking for tgoto in -lmytinfo" >&5
2559 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
2560 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2561 echo $ac_n "(cached) $ac_c" 1>&6
2563 ac_save_LIBS="$LIBS"
2564 LIBS="-lmytinfo $LIBS"
2565 cat > conftest.$ac_ext <<EOF
2566 #line 2567 "configure"
2567 #include "confdefs.h"
2568 /* Override any gcc2 internal prototype to avoid an error. */
2569 /* We use char because int might match the return type of a gcc2
2570 builtin and then its argument prototype would still apply. */
2577 if { (eval echo configure:2578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2579 eval "ac_cv_lib_$ac_lib_var=yes"
2581 echo "configure: failed program was:" >&5
2582 cat conftest.$ac_ext >&5
2584 eval "ac_cv_lib_$ac_lib_var=no"
2587 LIBS="$ac_save_LIBS"
2590 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2591 echo "$ac_t""yes" 1>&6
2592 LIBS="-lmytinfo $LIBS"
2594 echo "$ac_t""no" 1>&6
2599 echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
2600 echo "configure:2601: checking for initscr in -lcur_colr" >&5
2601 ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
2602 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2603 echo $ac_n "(cached) $ac_c" 1>&6
2605 ac_save_LIBS="$LIBS"
2606 LIBS="-lcur_colr $LIBS"
2607 cat > conftest.$ac_ext <<EOF
2608 #line 2609 "configure"
2609 #include "confdefs.h"
2610 /* Override any gcc2 internal prototype to avoid an error. */
2611 /* We use char because int might match the return type of a gcc2
2612 builtin and then its argument prototype would still apply. */
2619 if { (eval echo configure:2620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2621 eval "ac_cv_lib_$ac_lib_var=yes"
2623 echo "configure: failed program was:" >&5
2624 cat conftest.$ac_ext >&5
2626 eval "ac_cv_lib_$ac_lib_var=no"
2629 LIBS="$ac_save_LIBS"
2632 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2633 echo "$ac_t""yes" 1>&6
2635 LIBS="-lcur_colr $LIBS"
2636 ac_cv_func_initscr=yes
2639 echo "$ac_t""no" 1>&6
2641 echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
2642 echo "configure:2643: checking for initscr in -lHcurses" >&5
2643 ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
2644 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2645 echo $ac_n "(cached) $ac_c" 1>&6
2647 ac_save_LIBS="$LIBS"
2648 LIBS="-lHcurses $LIBS"
2649 cat > conftest.$ac_ext <<EOF
2650 #line 2651 "configure"
2651 #include "confdefs.h"
2652 /* Override any gcc2 internal prototype to avoid an error. */
2653 /* We use char because int might match the return type of a gcc2
2654 builtin and then its argument prototype would still apply. */
2661 if { (eval echo configure:2662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2663 eval "ac_cv_lib_$ac_lib_var=yes"
2665 echo "configure: failed program was:" >&5
2666 cat conftest.$ac_ext >&5
2668 eval "ac_cv_lib_$ac_lib_var=no"
2671 LIBS="$ac_save_LIBS"
2674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2675 echo "$ac_t""yes" 1>&6
2677 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
2678 LIBS="-lHcurses $LIBS"
2679 CPPFLAGS="-D__HP_CURSES -D_HP_CURSES $CPPFLAGS"
2680 ac_cv_func_initscr=yes
2683 echo "$ac_t""no" 1>&6
2689 linux*) # Suse Linux does not follow /usr/lib convention
2693 test -d /usr/5lib && \
2694 LIBS="$LIBS -L/usr/5lib -lcurses -ltermcap"
2695 ac_cv_func_initscr=yes
2699 if test ".$ac_cv_func_initscr" != .yes ; then
2700 cf_save_LIBS="$LIBS"
2704 if test ".${cf_cv_ncurses_version-no}" != .no
2706 cf_check_list="ncurses curses cursesX"
2708 cf_check_list="cursesX curses ncurses"
2711 # Check for library containing tgoto. Do this before curses library
2712 # because it may be needed to link the test-case for initscr.
2713 echo $ac_n "checking for tgoto""... $ac_c" 1>&6
2714 echo "configure:2715: checking for tgoto" >&5
2715 if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
2716 echo $ac_n "(cached) $ac_c" 1>&6
2718 cat > conftest.$ac_ext <<EOF
2719 #line 2720 "configure"
2720 #include "confdefs.h"
2721 /* System header to define __stub macros and hopefully few prototypes,
2722 which can conflict with char tgoto(); below. */
2724 /* Override any gcc2 internal prototype to avoid an error. */
2725 /* We use char because int might match the return type of a gcc2
2726 builtin and then its argument prototype would still apply. */
2731 /* The GNU C library defines this for functions which it implements
2732 to always fail with ENOSYS. Some functions are actually named
2733 something starting with __ and the normal name is an alias. */
2734 #if defined (__stub_tgoto) || defined (__stub___tgoto)
2742 if { (eval echo configure:2743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2744 eval "ac_cv_func_tgoto=yes"
2746 echo "configure: failed program was:" >&5
2747 cat conftest.$ac_ext >&5
2749 eval "ac_cv_func_tgoto=no"
2754 if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then
2755 echo "$ac_t""yes" 1>&6
2756 cf_term_lib=predefined
2758 echo "$ac_t""no" 1>&6
2760 for cf_term_lib in $cf_check_list termcap termlib unknown
2762 echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
2763 echo "configure:2764: checking for tgoto in -l$cf_term_lib" >&5
2764 ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
2765 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2766 echo $ac_n "(cached) $ac_c" 1>&6
2768 ac_save_LIBS="$LIBS"
2769 LIBS="-l$cf_term_lib $LIBS"
2770 cat > conftest.$ac_ext <<EOF
2771 #line 2772 "configure"
2772 #include "confdefs.h"
2773 /* Override any gcc2 internal prototype to avoid an error. */
2774 /* We use char because int might match the return type of a gcc2
2775 builtin and then its argument prototype would still apply. */
2782 if { (eval echo configure:2783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2784 eval "ac_cv_lib_$ac_lib_var=yes"
2786 echo "configure: failed program was:" >&5
2787 cat conftest.$ac_ext >&5
2789 eval "ac_cv_lib_$ac_lib_var=no"
2792 LIBS="$ac_save_LIBS"
2795 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2796 echo "$ac_t""yes" 1>&6
2799 echo "$ac_t""no" 1>&6
2807 # Check for library containing initscr
2808 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
2809 for cf_curs_lib in $cf_check_list xcurses jcurses unknown
2811 echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
2812 echo "configure:2813: checking for initscr in -l$cf_curs_lib" >&5
2813 ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
2814 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2815 echo $ac_n "(cached) $ac_c" 1>&6
2817 ac_save_LIBS="$LIBS"
2818 LIBS="-l$cf_curs_lib $LIBS"
2819 cat > conftest.$ac_ext <<EOF
2820 #line 2821 "configure"
2821 #include "confdefs.h"
2822 /* Override any gcc2 internal prototype to avoid an error. */
2823 /* We use char because int might match the return type of a gcc2
2824 builtin and then its argument prototype would still apply. */
2831 if { (eval echo configure:2832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2833 eval "ac_cv_lib_$ac_lib_var=yes"
2835 echo "configure: failed program was:" >&5
2836 cat conftest.$ac_ext >&5
2838 eval "ac_cv_lib_$ac_lib_var=no"
2841 LIBS="$ac_save_LIBS"
2844 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2845 echo "$ac_t""yes" 1>&6
2848 echo "$ac_t""no" 1>&6
2852 test $cf_curs_lib = unknown && { echo "configure: error: no curses library found" 1>&2; exit 1; }
2854 LIBS="-l$cf_curs_lib $cf_save_LIBS"
2855 if test "$cf_term_lib" = unknown ; then
2856 echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
2857 echo "configure:2858: checking if we can link with $cf_curs_lib library" >&5
2858 cat > conftest.$ac_ext <<EOF
2859 #line 2860 "configure"
2860 #include "confdefs.h"
2861 #include <${cf_cv_ncurses_header-curses.h}>
2866 if { (eval echo configure:2867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2870 echo "configure: failed program was:" >&5
2871 cat conftest.$ac_ext >&5
2876 echo "$ac_t""$cf_result" 1>&6
2877 test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; }
2878 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
2880 elif test "$cf_term_lib" != predefined ; then
2881 echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
2882 echo "configure:2883: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
2883 cat > conftest.$ac_ext <<EOF
2884 #line 2885 "configure"
2885 #include "confdefs.h"
2886 #include <${cf_cv_ncurses_header-curses.h}>
2888 initscr(); tgoto((char *)0, 0, 0);
2891 if { (eval echo configure:2892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2895 echo "configure: failed program was:" >&5
2896 cat conftest.$ac_ext >&5
2899 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
2900 cat > conftest.$ac_ext <<EOF
2901 #line 2902 "configure"
2902 #include "confdefs.h"
2903 #include <${cf_cv_ncurses_header-curses.h}>
2908 if { (eval echo configure:2909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2912 echo "configure: failed program was:" >&5
2913 cat conftest.$ac_ext >&5
2921 echo "$ac_t""$cf_result" 1>&6
2931 cf_ncuhdr_root=ncurses
2933 test -n "$cf_cv_curses_dir" && \
2934 test "$cf_cv_curses_dir" != "no" && \
2935 CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
2937 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
2938 echo "configure:2939: checking for $cf_ncuhdr_root header in include-path" >&5
2939 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
2940 echo $ac_n "(cached) $ac_c" 1>&6
2943 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
2944 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
2945 for cf_header in $cf_header_list
2948 cat > conftest.$ac_ext <<EOF
2949 #line 2950 "configure"
2950 #include "confdefs.h"
2953 #include <$cf_header>
2956 #ifdef NCURSES_VERSION
2958 printf("%s\n", NCURSES_VERSION);
2970 if { (eval echo configure:2971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2972 cf_cv_ncurses_h=$cf_header
2975 echo "configure: failed program was:" >&5
2976 cat conftest.$ac_ext >&5
2982 test "$cf_cv_ncurses_h" != no && break
2987 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
2991 if test "$cf_cv_ncurses_h" != no ; then
2992 cf_cv_ncurses_header=$cf_cv_ncurses_h
2995 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
2996 echo "configure:2997: checking for $cf_ncuhdr_root include-path" >&5
2997 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
2998 echo $ac_n "(cached) $ac_c" 1>&6
3001 test -n "$verbose" && echo
3004 test -d "$HOME" && {
3005 test -n "$verbose" && echo " ... testing include-directories under $HOME"
3006 test -d "$HOME/include" && cf_search="$cf_search $HOME/include"
3007 test -d "$HOME/include/$cf_ncuhdr_root" && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
3008 test -d "$HOME/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
3011 # For other stuff under the home directory, it should be sufficient to put
3012 # a symbolic link for $HOME/$cf_ncuhdr_root to the actual package location:
3013 test -d "$HOME/$cf_ncuhdr_root" && {
3014 test -n "$verbose" && echo " ... testing include-directories under $HOME/$cf_ncuhdr_root"
3015 test -d "$HOME/$cf_ncuhdr_root/include" && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
3016 test -d "$HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3019 test "$prefix" != /usr/local && \
3020 test -d /usr/local && {
3021 test -n "$verbose" && echo " ... testing include-directories under /usr/local"
3022 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
3023 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
3024 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
3025 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
3026 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3029 test "$prefix" != NONE && \
3030 test -d $prefix && {
3031 test -n "$verbose" && echo " ... testing include-directories under $prefix"
3032 test -d $prefix/include && cf_search="$cf_search $prefix/include"
3033 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
3034 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
3035 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
3036 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3039 test "$prefix" != /opt && \
3041 test -n "$verbose" && echo " ... testing include-directories under /opt"
3042 test -d /opt/include && cf_search="$cf_search /opt/include"
3043 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
3044 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
3045 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
3046 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3049 test "$prefix" != /usr && \
3051 test -n "$verbose" && echo " ... testing include-directories under /usr"
3052 test -d /usr/include && cf_search="$cf_search /usr/include"
3053 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
3054 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
3055 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
3058 test "$includedir" != NONE && \
3059 test "$includedir" != "/usr/include" && \
3060 test -d "$includedir" && {
3061 test -d $includedir && cf_search="$cf_search $includedir"
3062 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
3065 test "$oldincludedir" != NONE && \
3066 test "$oldincludedir" != "/usr/include" && \
3067 test -d "$oldincludedir" && {
3068 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
3069 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
3073 test -n "$verbose" && echo search path $cf_search
3074 cf_save2_CPPFLAGS="$CPPFLAGS"
3075 for cf_incdir in $cf_search
3078 for cf_add_incdir in $cf_incdir
3082 case $cf_add_incdir in
3085 /usr/local/include) # (vi
3086 if test "$GCC" = yes
3088 cf_save_CPPFLAGS="$CPPFLAGS"
3089 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3090 cat > conftest.$ac_ext <<EOF
3091 #line 3092 "configure"
3092 #include "confdefs.h"
3098 if { (eval echo configure:3099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3101 echo "configure: failed program was:" >&5
3102 cat conftest.$ac_ext >&5
3104 CPPFLAGS="$cf_save_CPPFLAGS"
3110 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3113 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3114 test "$cf_top_incdir" = "$cf_add_incdir" && break
3115 cf_add_incdir="$cf_top_incdir"
3124 cat > conftest.$ac_ext <<EOF
3125 #line 3126 "configure"
3126 #include "confdefs.h"
3129 #include <$cf_header>
3132 #ifdef NCURSES_VERSION
3134 printf("%s\n", NCURSES_VERSION);
3146 if { (eval echo configure:3147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3148 cf_cv_ncurses_h2=$cf_header
3151 echo "configure: failed program was:" >&5
3152 cat conftest.$ac_ext >&5
3158 if test "$cf_cv_ncurses_h2" != no ; then
3159 cf_cv_ncurses_h2=$cf_incdir/$cf_header
3160 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
3163 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
3165 CPPFLAGS="$cf_save2_CPPFLAGS"
3166 test "$cf_cv_ncurses_h2" != no && break
3168 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
3172 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
3174 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
3175 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
3176 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
3177 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
3180 for cf_add_incdir in $cf_1st_incdir
3184 case $cf_add_incdir in
3187 /usr/local/include) # (vi
3188 if test "$GCC" = yes
3190 cf_save_CPPFLAGS="$CPPFLAGS"
3191 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3192 cat > conftest.$ac_ext <<EOF
3193 #line 3194 "configure"
3194 #include "confdefs.h"
3200 if { (eval echo configure:3201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3203 echo "configure: failed program was:" >&5
3204 cat conftest.$ac_ext >&5
3206 CPPFLAGS="$cf_save_CPPFLAGS"
3212 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3215 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3216 test "$cf_top_incdir" = "$cf_add_incdir" && break
3217 cf_add_incdir="$cf_top_incdir"
3224 # Set definitions to allow ifdef'ing for ncurses.h
3226 case $cf_cv_ncurses_header in # (vi
3228 cat >> confdefs.h <<\EOF
3229 #define HAVE_NCURSES_H 1
3235 case $cf_cv_ncurses_header in # (vi
3236 ncurses/curses.h|ncurses/ncurses.h)
3237 cat >> confdefs.h <<\EOF
3238 #define HAVE_NCURSES_NCURSES_H 1
3242 ncursesw/curses.h|ncursesw/ncurses.h)
3243 cat >> confdefs.h <<\EOF
3244 #define HAVE_NCURSESW_NCURSES_H 1
3252 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
3253 echo "configure:3254: checking for terminfo header" >&5
3254 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
3255 echo $ac_n "(cached) $ac_c" 1>&6
3258 case ${cf_cv_ncurses_header} in #(vi
3259 */ncurses.h|*/ncursesw.h) #(vi
3260 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
3263 cf_term_header=term.h
3267 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
3269 cat > conftest.$ac_ext <<EOF
3270 #line 3271 "configure"
3271 #include "confdefs.h"
3273 #include <${cf_cv_ncurses_header-curses.h}>
3277 int x = auto_left_margin
3280 if { (eval echo configure:3281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3283 cf_cv_term_header="$cf_test"
3285 echo "configure: failed program was:" >&5
3286 cat conftest.$ac_ext >&5
3289 cf_cv_term_header=unknown
3293 test "$cf_cv_term_header" != unknown && break
3298 echo "$ac_t""$cf_cv_term_header" 1>&6
3300 # Set definitions to allow ifdef'ing to accommodate subdirectories
3302 case $cf_cv_term_header in # (vi
3304 cat >> confdefs.h <<\EOF
3305 #define HAVE_TERM_H 1
3311 case $cf_cv_term_header in # (vi
3312 ncurses/term.h) #(vi
3313 cat >> confdefs.h <<\EOF
3314 #define HAVE_NCURSES_TERM_H 1
3319 cat >> confdefs.h <<\EOF
3320 #define HAVE_NCURSESW_TERM_H 1
3327 # some applications need this, but should check for NCURSES_VERSION
3328 cat >> confdefs.h <<\EOF
3334 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
3335 echo "configure:3336: checking for ncurses version" >&5
3336 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
3337 echo $ac_n "(cached) $ac_c" 1>&6
3340 cf_cv_ncurses_version=no
3343 if test "$cross_compiling" = yes; then
3346 # This will not work if the preprocessor splits the line after the
3347 # Autoconf token. The 'unproto' program does that.
3348 cat > conftest.$ac_ext <<EOF
3349 #include <${cf_cv_ncurses_header-curses.h}>
3351 #ifdef NCURSES_VERSION
3352 Autoconf NCURSES_VERSION
3360 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
3361 { (eval echo configure:3362: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
3362 if test -f conftest.out ; then
3363 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
3364 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
3369 cat > conftest.$ac_ext <<EOF
3370 #line 3371 "configure"
3371 #include "confdefs.h"
3373 #include <${cf_cv_ncurses_header-curses.h}>
3377 FILE *fp = fopen("$cf_tempfile", "w");
3378 #ifdef NCURSES_VERSION
3379 # ifdef NCURSES_VERSION_PATCH
3380 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
3382 fprintf(fp, "%s\n", NCURSES_VERSION);
3386 fprintf(fp, "old\n");
3394 if { (eval echo configure:3395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3397 cf_cv_ncurses_version=`cat $cf_tempfile`
3399 echo "configure: failed program was:" >&5
3400 cat conftest.$ac_ext >&5
3409 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
3410 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
3418 cf_nculib_root=ncurses
3419 # This works, except for the special case where we find gpm, but
3420 # ncurses is in a nonstandard location via $LIBS, and we really want
3423 cf_ncurses_SAVE="$LIBS"
3424 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
3425 echo "configure:3426: checking for Gpm_Open in -lgpm" >&5
3426 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
3427 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3428 echo $ac_n "(cached) $ac_c" 1>&6
3430 ac_save_LIBS="$LIBS"
3432 cat > conftest.$ac_ext <<EOF
3433 #line 3434 "configure"
3434 #include "confdefs.h"
3435 /* Override any gcc2 internal prototype to avoid an error. */
3436 /* We use char because int might match the return type of a gcc2
3437 builtin and then its argument prototype would still apply. */
3444 if { (eval echo configure:3445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3446 eval "ac_cv_lib_$ac_lib_var=yes"
3448 echo "configure: failed program was:" >&5
3449 cat conftest.$ac_ext >&5
3451 eval "ac_cv_lib_$ac_lib_var=no"
3454 LIBS="$ac_save_LIBS"
3457 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3458 echo "$ac_t""yes" 1>&6
3459 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
3460 echo "configure:3461: checking for initscr in -lgpm" >&5
3461 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
3462 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3463 echo $ac_n "(cached) $ac_c" 1>&6
3465 ac_save_LIBS="$LIBS"
3467 cat > conftest.$ac_ext <<EOF
3468 #line 3469 "configure"
3469 #include "confdefs.h"
3470 /* Override any gcc2 internal prototype to avoid an error. */
3471 /* We use char because int might match the return type of a gcc2
3472 builtin and then its argument prototype would still apply. */
3479 if { (eval echo configure:3480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3481 eval "ac_cv_lib_$ac_lib_var=yes"
3483 echo "configure: failed program was:" >&5
3484 cat conftest.$ac_ext >&5
3486 eval "ac_cv_lib_$ac_lib_var=no"
3489 LIBS="$ac_save_LIBS"
3492 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3493 echo "$ac_t""yes" 1>&6
3494 LIBS="$cf_ncurses_SAVE"
3496 echo "$ac_t""no" 1>&6
3497 cf_ncurses_LIBS="-lgpm"
3501 echo "$ac_t""no" 1>&6
3505 case $host_os in #(vi
3507 # This is only necessary if you are linking against an obsolete
3508 # version of ncurses (but it should do no harm, since it's static).
3509 if test "$cf_nculib_root" = ncurses ; then
3510 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
3511 echo "configure:3512: checking for tgoto in -lmytinfo" >&5
3512 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
3513 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3514 echo $ac_n "(cached) $ac_c" 1>&6
3516 ac_save_LIBS="$LIBS"
3517 LIBS="-lmytinfo $LIBS"
3518 cat > conftest.$ac_ext <<EOF
3519 #line 3520 "configure"
3520 #include "confdefs.h"
3521 /* Override any gcc2 internal prototype to avoid an error. */
3522 /* We use char because int might match the return type of a gcc2
3523 builtin and then its argument prototype would still apply. */
3530 if { (eval echo configure:3531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3532 eval "ac_cv_lib_$ac_lib_var=yes"
3534 echo "configure: failed program was:" >&5
3535 cat conftest.$ac_ext >&5
3537 eval "ac_cv_lib_$ac_lib_var=no"
3540 LIBS="$ac_save_LIBS"
3543 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3544 echo "$ac_t""yes" 1>&6
3545 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
3547 echo "$ac_t""no" 1>&6
3554 LIBS="$cf_ncurses_LIBS $LIBS"
3556 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3558 LIBS="-L$cf_cv_curses_dir/lib -l$cf_nculib_root $LIBS"
3561 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
3563 echo $ac_n "checking for initscr""... $ac_c" 1>&6
3564 echo "configure:3565: checking for initscr" >&5
3565 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
3566 echo $ac_n "(cached) $ac_c" 1>&6
3568 cat > conftest.$ac_ext <<EOF
3569 #line 3570 "configure"
3570 #include "confdefs.h"
3571 /* System header to define __stub macros and hopefully few prototypes,
3572 which can conflict with char initscr(); below. */
3574 /* Override any gcc2 internal prototype to avoid an error. */
3575 /* We use char because int might match the return type of a gcc2
3576 builtin and then its argument prototype would still apply. */
3581 /* The GNU C library defines this for functions which it implements
3582 to always fail with ENOSYS. Some functions are actually named
3583 something starting with __ and the normal name is an alias. */
3584 #if defined (__stub_initscr) || defined (__stub___initscr)
3592 if { (eval echo configure:3593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3594 eval "ac_cv_func_initscr=yes"
3596 echo "configure: failed program was:" >&5
3597 cat conftest.$ac_ext >&5
3599 eval "ac_cv_func_initscr=no"
3604 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
3605 echo "$ac_t""yes" 1>&6
3606 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
3608 echo "$ac_t""no" 1>&6
3610 cf_save_LIBS="$LIBS"
3611 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
3612 echo "configure:3613: checking for initscr in -l$cf_nculib_root" >&5
3613 LIBS="-l$cf_nculib_root $LIBS"
3614 cat > conftest.$ac_ext <<EOF
3615 #line 3616 "configure"
3616 #include "confdefs.h"
3617 #include <${cf_cv_ncurses_header-curses.h}>
3622 if { (eval echo configure:3623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3624 echo "$ac_t""yes" 1>&6
3625 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
3628 echo "configure: failed program was:" >&5
3629 cat conftest.$ac_ext >&5
3631 echo "$ac_t""no" 1>&6
3634 test -d "$HOME" && {
3635 test -n "$verbose" && echo " ... testing lib-directories under $HOME"
3636 test -d "$HOME/lib" && cf_search="$cf_search $HOME/lib"
3637 test -d "$HOME/lib/$cf_nculib_root" && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
3638 test -d "$HOME/lib/$cf_nculib_root/lib" && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
3641 # For other stuff under the home directory, it should be sufficient to put
3642 # a symbolic link for $HOME/$cf_nculib_root to the actual package location:
3643 test -d "$HOME/$cf_nculib_root" && {
3644 test -n "$verbose" && echo " ... testing lib-directories under $HOME/$cf_nculib_root"
3645 test -d "$HOME/$cf_nculib_root/lib" && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
3646 test -d "$HOME/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
3649 test "$prefix" != /usr/local && \
3650 test -d /usr/local && {
3651 test -n "$verbose" && echo " ... testing lib-directories under /usr/local"
3652 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
3653 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
3654 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
3655 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
3656 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
3659 test "$prefix" != NONE && \
3660 test -d $prefix && {
3661 test -n "$verbose" && echo " ... testing lib-directories under $prefix"
3662 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
3663 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
3664 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
3665 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
3666 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
3669 test "$prefix" != /opt && \
3671 test -n "$verbose" && echo " ... testing lib-directories under /opt"
3672 test -d /opt/lib && cf_search="$cf_search /opt/lib"
3673 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
3674 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
3675 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
3676 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
3679 test "$prefix" != /usr && \
3681 test -n "$verbose" && echo " ... testing lib-directories under /usr"
3682 test -d /usr/lib && cf_search="$cf_search /usr/lib"
3683 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
3684 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
3685 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
3688 for cf_libdir in $cf_search
3690 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
3691 echo "configure:3692: checking for -l$cf_nculib_root in $cf_libdir" >&5
3692 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
3693 cat > conftest.$ac_ext <<EOF
3694 #line 3695 "configure"
3695 #include "confdefs.h"
3696 #include <${cf_cv_ncurses_header-curses.h}>
3701 if { (eval echo configure:3702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3703 echo "$ac_t""yes" 1>&6
3704 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
3707 echo "configure: failed program was:" >&5
3708 cat conftest.$ac_ext >&5
3710 echo "$ac_t""no" 1>&6
3711 LIBS="$cf_save_LIBS"
3721 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
3723 if test $cf_found_library = no ; then
3724 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
3730 if test -n "$cf_ncurses_LIBS" ; then
3731 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
3732 echo "configure:3733: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
3733 cf_ncurses_SAVE="$LIBS"
3734 for p in $cf_ncurses_LIBS ; do
3735 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
3736 if test "$q" != "$LIBS" ; then
3740 cat > conftest.$ac_ext <<EOF
3741 #line 3742 "configure"
3742 #include "confdefs.h"
3743 #include <${cf_cv_ncurses_header-curses.h}>
3745 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
3748 if { (eval echo configure:3749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3750 echo "$ac_t""yes" 1>&6
3752 echo "configure: failed program was:" >&5
3753 cat conftest.$ac_ext >&5
3755 echo "$ac_t""no" 1>&6
3756 LIBS="$cf_ncurses_SAVE"
3762 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3764 cat >> confdefs.h <<EOF
3765 #define $cf_nculib_ROOT 1
3773 echo $ac_n "checking for multibyte character support""... $ac_c" 1>&6
3774 echo "configure:3775: checking for multibyte character support" >&5
3775 if eval "test \"`echo '$''{'cf_cv_utf8_lib'+set}'`\" = set"; then
3776 echo $ac_n "(cached) $ac_c" 1>&6
3779 cf_save_LIBS="$LIBS"
3780 cat > conftest.$ac_ext <<EOF
3781 #line 3782 "configure"
3782 #include "confdefs.h"
3789 if { (eval echo configure:3790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3793 echo "configure: failed program was:" >&5
3794 cat conftest.$ac_ext >&5
3797 cat > conftest.$ac_ext <<EOF
3798 #line 3799 "configure"
3799 #include "confdefs.h"
3801 #include <libutf8.h>
3806 if { (eval echo configure:3807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3808 cf_cv_utf8_lib=add-on
3810 echo "configure: failed program was:" >&5
3811 cat conftest.$ac_ext >&5
3816 LIBS="$cf_save_LIBS"
3822 echo "$ac_t""$cf_cv_utf8_lib" 1>&6
3824 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
3826 if test "$cf_cv_utf8_lib" = "add-on" ; then
3827 cat >> confdefs.h <<\EOF
3828 #define HAVE_LIBUTF8_H 1
3836 cf_ncuhdr_root=ncursesw
3838 test -n "$cf_cv_curses_dir" && \
3839 test "$cf_cv_curses_dir" != "no" && \
3840 CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
3842 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
3843 echo "configure:3844: checking for $cf_ncuhdr_root header in include-path" >&5
3844 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
3845 echo $ac_n "(cached) $ac_c" 1>&6
3848 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
3849 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
3850 for cf_header in $cf_header_list
3853 cat > conftest.$ac_ext <<EOF
3854 #line 3855 "configure"
3855 #include "confdefs.h"
3858 #define _XOPEN_SOURCE_EXTENDED
3859 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
3860 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
3862 #include <$cf_header>
3865 #ifdef NCURSES_VERSION
3871 printf("%s\n", NCURSES_VERSION);
3883 if { (eval echo configure:3884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3885 cf_cv_ncurses_h=$cf_header
3888 echo "configure: failed program was:" >&5
3889 cat conftest.$ac_ext >&5
3895 test "$cf_cv_ncurses_h" != no && break
3900 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
3904 if test "$cf_cv_ncurses_h" != no ; then
3905 cf_cv_ncurses_header=$cf_cv_ncurses_h
3908 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
3909 echo "configure:3910: checking for $cf_ncuhdr_root include-path" >&5
3910 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
3911 echo $ac_n "(cached) $ac_c" 1>&6
3914 test -n "$verbose" && echo
3917 test -d "$HOME" && {
3918 test -n "$verbose" && echo " ... testing include-directories under $HOME"
3919 test -d "$HOME/include" && cf_search="$cf_search $HOME/include"
3920 test -d "$HOME/include/$cf_ncuhdr_root" && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
3921 test -d "$HOME/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
3924 # For other stuff under the home directory, it should be sufficient to put
3925 # a symbolic link for $HOME/$cf_ncuhdr_root to the actual package location:
3926 test -d "$HOME/$cf_ncuhdr_root" && {
3927 test -n "$verbose" && echo " ... testing include-directories under $HOME/$cf_ncuhdr_root"
3928 test -d "$HOME/$cf_ncuhdr_root/include" && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
3929 test -d "$HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3932 test "$prefix" != /usr/local && \
3933 test -d /usr/local && {
3934 test -n "$verbose" && echo " ... testing include-directories under /usr/local"
3935 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
3936 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
3937 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
3938 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
3939 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3942 test "$prefix" != NONE && \
3943 test -d $prefix && {
3944 test -n "$verbose" && echo " ... testing include-directories under $prefix"
3945 test -d $prefix/include && cf_search="$cf_search $prefix/include"
3946 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
3947 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
3948 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
3949 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3952 test "$prefix" != /opt && \
3954 test -n "$verbose" && echo " ... testing include-directories under /opt"
3955 test -d /opt/include && cf_search="$cf_search /opt/include"
3956 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
3957 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
3958 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
3959 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3962 test "$prefix" != /usr && \
3964 test -n "$verbose" && echo " ... testing include-directories under /usr"
3965 test -d /usr/include && cf_search="$cf_search /usr/include"
3966 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
3967 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
3968 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
3971 test "$includedir" != NONE && \
3972 test "$includedir" != "/usr/include" && \
3973 test -d "$includedir" && {
3974 test -d $includedir && cf_search="$cf_search $includedir"
3975 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
3978 test "$oldincludedir" != NONE && \
3979 test "$oldincludedir" != "/usr/include" && \
3980 test -d "$oldincludedir" && {
3981 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
3982 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
3986 test -n "$verbose" && echo search path $cf_search
3987 cf_save2_CPPFLAGS="$CPPFLAGS"
3988 for cf_incdir in $cf_search
3991 for cf_add_incdir in $cf_incdir
3995 case $cf_add_incdir in
3998 /usr/local/include) # (vi
3999 if test "$GCC" = yes
4001 cf_save_CPPFLAGS="$CPPFLAGS"
4002 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4003 cat > conftest.$ac_ext <<EOF
4004 #line 4005 "configure"
4005 #include "confdefs.h"
4011 if { (eval echo configure:4012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4014 echo "configure: failed program was:" >&5
4015 cat conftest.$ac_ext >&5
4017 CPPFLAGS="$cf_save_CPPFLAGS"
4023 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4026 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4027 test "$cf_top_incdir" = "$cf_add_incdir" && break
4028 cf_add_incdir="$cf_top_incdir"
4037 cat > conftest.$ac_ext <<EOF
4038 #line 4039 "configure"
4039 #include "confdefs.h"
4042 #include <$cf_header>
4045 #ifdef NCURSES_VERSION
4047 printf("%s\n", NCURSES_VERSION);
4059 if { (eval echo configure:4060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4061 cf_cv_ncurses_h2=$cf_header
4064 echo "configure: failed program was:" >&5
4065 cat conftest.$ac_ext >&5
4071 if test "$cf_cv_ncurses_h2" != no ; then
4072 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4073 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
4076 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
4078 CPPFLAGS="$cf_save2_CPPFLAGS"
4079 test "$cf_cv_ncurses_h2" != no && break
4081 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
4085 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
4087 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4088 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4089 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4090 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4093 for cf_add_incdir in $cf_1st_incdir
4097 case $cf_add_incdir in
4100 /usr/local/include) # (vi
4101 if test "$GCC" = yes
4103 cf_save_CPPFLAGS="$CPPFLAGS"
4104 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4105 cat > conftest.$ac_ext <<EOF
4106 #line 4107 "configure"
4107 #include "confdefs.h"
4113 if { (eval echo configure:4114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4116 echo "configure: failed program was:" >&5
4117 cat conftest.$ac_ext >&5
4119 CPPFLAGS="$cf_save_CPPFLAGS"
4125 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4128 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4129 test "$cf_top_incdir" = "$cf_add_incdir" && break
4130 cf_add_incdir="$cf_top_incdir"
4137 # Set definitions to allow ifdef'ing for ncurses.h
4139 case $cf_cv_ncurses_header in # (vi
4141 cat >> confdefs.h <<\EOF
4142 #define HAVE_NCURSES_H 1
4148 case $cf_cv_ncurses_header in # (vi
4149 ncurses/curses.h|ncurses/ncurses.h)
4150 cat >> confdefs.h <<\EOF
4151 #define HAVE_NCURSES_NCURSES_H 1
4155 ncursesw/curses.h|ncursesw/ncurses.h)
4156 cat >> confdefs.h <<\EOF
4157 #define HAVE_NCURSESW_NCURSES_H 1
4165 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
4166 echo "configure:4167: checking for terminfo header" >&5
4167 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
4168 echo $ac_n "(cached) $ac_c" 1>&6
4171 case ${cf_cv_ncurses_header} in #(vi
4172 */ncurses.h|*/ncursesw.h) #(vi
4173 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4176 cf_term_header=term.h
4180 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4182 cat > conftest.$ac_ext <<EOF
4183 #line 4184 "configure"
4184 #include "confdefs.h"
4186 #include <${cf_cv_ncurses_header-curses.h}>
4190 int x = auto_left_margin
4193 if { (eval echo configure:4194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4196 cf_cv_term_header="$cf_test"
4198 echo "configure: failed program was:" >&5
4199 cat conftest.$ac_ext >&5
4202 cf_cv_term_header=unknown
4206 test "$cf_cv_term_header" != unknown && break
4211 echo "$ac_t""$cf_cv_term_header" 1>&6
4213 # Set definitions to allow ifdef'ing to accommodate subdirectories
4215 case $cf_cv_term_header in # (vi
4217 cat >> confdefs.h <<\EOF
4218 #define HAVE_TERM_H 1
4224 case $cf_cv_term_header in # (vi
4225 ncurses/term.h) #(vi
4226 cat >> confdefs.h <<\EOF
4227 #define HAVE_NCURSES_TERM_H 1
4232 cat >> confdefs.h <<\EOF
4233 #define HAVE_NCURSESW_TERM_H 1
4240 # some applications need this, but should check for NCURSES_VERSION
4241 cat >> confdefs.h <<\EOF
4247 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
4248 echo "configure:4249: checking for ncurses version" >&5
4249 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
4250 echo $ac_n "(cached) $ac_c" 1>&6
4253 cf_cv_ncurses_version=no
4256 if test "$cross_compiling" = yes; then
4259 # This will not work if the preprocessor splits the line after the
4260 # Autoconf token. The 'unproto' program does that.
4261 cat > conftest.$ac_ext <<EOF
4262 #include <${cf_cv_ncurses_header-curses.h}>
4264 #ifdef NCURSES_VERSION
4265 Autoconf NCURSES_VERSION
4273 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4274 { (eval echo configure:4275: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
4275 if test -f conftest.out ; then
4276 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4277 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4282 cat > conftest.$ac_ext <<EOF
4283 #line 4284 "configure"
4284 #include "confdefs.h"
4286 #include <${cf_cv_ncurses_header-curses.h}>
4290 FILE *fp = fopen("$cf_tempfile", "w");
4291 #ifdef NCURSES_VERSION
4292 # ifdef NCURSES_VERSION_PATCH
4293 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4295 fprintf(fp, "%s\n", NCURSES_VERSION);
4299 fprintf(fp, "old\n");
4307 if { (eval echo configure:4308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4310 cf_cv_ncurses_version=`cat $cf_tempfile`
4312 echo "configure: failed program was:" >&5
4313 cat conftest.$ac_ext >&5
4322 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
4323 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
4331 cf_nculib_root=ncursesw
4332 # This works, except for the special case where we find gpm, but
4333 # ncurses is in a nonstandard location via $LIBS, and we really want
4336 cf_ncurses_SAVE="$LIBS"
4337 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
4338 echo "configure:4339: checking for Gpm_Open in -lgpm" >&5
4339 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
4340 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4341 echo $ac_n "(cached) $ac_c" 1>&6
4343 ac_save_LIBS="$LIBS"
4345 cat > conftest.$ac_ext <<EOF
4346 #line 4347 "configure"
4347 #include "confdefs.h"
4348 /* Override any gcc2 internal prototype to avoid an error. */
4349 /* We use char because int might match the return type of a gcc2
4350 builtin and then its argument prototype would still apply. */
4357 if { (eval echo configure:4358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4359 eval "ac_cv_lib_$ac_lib_var=yes"
4361 echo "configure: failed program was:" >&5
4362 cat conftest.$ac_ext >&5
4364 eval "ac_cv_lib_$ac_lib_var=no"
4367 LIBS="$ac_save_LIBS"
4370 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4371 echo "$ac_t""yes" 1>&6
4372 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
4373 echo "configure:4374: checking for initscr in -lgpm" >&5
4374 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
4375 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4376 echo $ac_n "(cached) $ac_c" 1>&6
4378 ac_save_LIBS="$LIBS"
4380 cat > conftest.$ac_ext <<EOF
4381 #line 4382 "configure"
4382 #include "confdefs.h"
4383 /* Override any gcc2 internal prototype to avoid an error. */
4384 /* We use char because int might match the return type of a gcc2
4385 builtin and then its argument prototype would still apply. */
4392 if { (eval echo configure:4393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4394 eval "ac_cv_lib_$ac_lib_var=yes"
4396 echo "configure: failed program was:" >&5
4397 cat conftest.$ac_ext >&5
4399 eval "ac_cv_lib_$ac_lib_var=no"
4402 LIBS="$ac_save_LIBS"
4405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4406 echo "$ac_t""yes" 1>&6
4407 LIBS="$cf_ncurses_SAVE"
4409 echo "$ac_t""no" 1>&6
4410 cf_ncurses_LIBS="-lgpm"
4414 echo "$ac_t""no" 1>&6
4418 case $host_os in #(vi
4420 # This is only necessary if you are linking against an obsolete
4421 # version of ncurses (but it should do no harm, since it's static).
4422 if test "$cf_nculib_root" = ncurses ; then
4423 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
4424 echo "configure:4425: checking for tgoto in -lmytinfo" >&5
4425 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
4426 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4427 echo $ac_n "(cached) $ac_c" 1>&6
4429 ac_save_LIBS="$LIBS"
4430 LIBS="-lmytinfo $LIBS"
4431 cat > conftest.$ac_ext <<EOF
4432 #line 4433 "configure"
4433 #include "confdefs.h"
4434 /* Override any gcc2 internal prototype to avoid an error. */
4435 /* We use char because int might match the return type of a gcc2
4436 builtin and then its argument prototype would still apply. */
4443 if { (eval echo configure:4444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4445 eval "ac_cv_lib_$ac_lib_var=yes"
4447 echo "configure: failed program was:" >&5
4448 cat conftest.$ac_ext >&5
4450 eval "ac_cv_lib_$ac_lib_var=no"
4453 LIBS="$ac_save_LIBS"
4456 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4457 echo "$ac_t""yes" 1>&6
4458 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
4460 echo "$ac_t""no" 1>&6
4467 LIBS="$cf_ncurses_LIBS $LIBS"
4469 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4471 LIBS="-L$cf_cv_curses_dir/lib -l$cf_nculib_root $LIBS"
4474 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
4476 echo $ac_n "checking for initscr""... $ac_c" 1>&6
4477 echo "configure:4478: checking for initscr" >&5
4478 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
4479 echo $ac_n "(cached) $ac_c" 1>&6
4481 cat > conftest.$ac_ext <<EOF
4482 #line 4483 "configure"
4483 #include "confdefs.h"
4484 /* System header to define __stub macros and hopefully few prototypes,
4485 which can conflict with char initscr(); below. */
4487 /* Override any gcc2 internal prototype to avoid an error. */
4488 /* We use char because int might match the return type of a gcc2
4489 builtin and then its argument prototype would still apply. */
4494 /* The GNU C library defines this for functions which it implements
4495 to always fail with ENOSYS. Some functions are actually named
4496 something starting with __ and the normal name is an alias. */
4497 #if defined (__stub_initscr) || defined (__stub___initscr)
4505 if { (eval echo configure:4506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4507 eval "ac_cv_func_initscr=yes"
4509 echo "configure: failed program was:" >&5
4510 cat conftest.$ac_ext >&5
4512 eval "ac_cv_func_initscr=no"
4517 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
4518 echo "$ac_t""yes" 1>&6
4519 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4521 echo "$ac_t""no" 1>&6
4523 cf_save_LIBS="$LIBS"
4524 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
4525 echo "configure:4526: checking for initscr in -l$cf_nculib_root" >&5
4526 LIBS="-l$cf_nculib_root $LIBS"
4527 cat > conftest.$ac_ext <<EOF
4528 #line 4529 "configure"
4529 #include "confdefs.h"
4530 #include <${cf_cv_ncurses_header-curses.h}>
4535 if { (eval echo configure:4536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4537 echo "$ac_t""yes" 1>&6
4538 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4541 echo "configure: failed program was:" >&5
4542 cat conftest.$ac_ext >&5
4544 echo "$ac_t""no" 1>&6
4547 test -d "$HOME" && {
4548 test -n "$verbose" && echo " ... testing lib-directories under $HOME"
4549 test -d "$HOME/lib" && cf_search="$cf_search $HOME/lib"
4550 test -d "$HOME/lib/$cf_nculib_root" && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
4551 test -d "$HOME/lib/$cf_nculib_root/lib" && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
4554 # For other stuff under the home directory, it should be sufficient to put
4555 # a symbolic link for $HOME/$cf_nculib_root to the actual package location:
4556 test -d "$HOME/$cf_nculib_root" && {
4557 test -n "$verbose" && echo " ... testing lib-directories under $HOME/$cf_nculib_root"
4558 test -d "$HOME/$cf_nculib_root/lib" && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
4559 test -d "$HOME/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
4562 test "$prefix" != /usr/local && \
4563 test -d /usr/local && {
4564 test -n "$verbose" && echo " ... testing lib-directories under /usr/local"
4565 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
4566 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
4567 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
4568 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
4569 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
4572 test "$prefix" != NONE && \
4573 test -d $prefix && {
4574 test -n "$verbose" && echo " ... testing lib-directories under $prefix"
4575 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
4576 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
4577 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
4578 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
4579 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
4582 test "$prefix" != /opt && \
4584 test -n "$verbose" && echo " ... testing lib-directories under /opt"
4585 test -d /opt/lib && cf_search="$cf_search /opt/lib"
4586 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
4587 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
4588 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
4589 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
4592 test "$prefix" != /usr && \
4594 test -n "$verbose" && echo " ... testing lib-directories under /usr"
4595 test -d /usr/lib && cf_search="$cf_search /usr/lib"
4596 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
4597 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
4598 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
4601 for cf_libdir in $cf_search
4603 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
4604 echo "configure:4605: checking for -l$cf_nculib_root in $cf_libdir" >&5
4605 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
4606 cat > conftest.$ac_ext <<EOF
4607 #line 4608 "configure"
4608 #include "confdefs.h"
4609 #include <${cf_cv_ncurses_header-curses.h}>
4614 if { (eval echo configure:4615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4616 echo "$ac_t""yes" 1>&6
4617 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4620 echo "configure: failed program was:" >&5
4621 cat conftest.$ac_ext >&5
4623 echo "$ac_t""no" 1>&6
4624 LIBS="$cf_save_LIBS"
4634 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
4636 if test $cf_found_library = no ; then
4637 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
4643 if test -n "$cf_ncurses_LIBS" ; then
4644 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
4645 echo "configure:4646: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
4646 cf_ncurses_SAVE="$LIBS"
4647 for p in $cf_ncurses_LIBS ; do
4648 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
4649 if test "$q" != "$LIBS" ; then
4653 cat > conftest.$ac_ext <<EOF
4654 #line 4655 "configure"
4655 #include "confdefs.h"
4656 #include <${cf_cv_ncurses_header-curses.h}>
4658 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
4661 if { (eval echo configure:4662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4663 echo "$ac_t""yes" 1>&6
4665 echo "configure: failed program was:" >&5
4666 cat conftest.$ac_ext >&5
4668 echo "$ac_t""no" 1>&6
4669 LIBS="$cf_ncurses_SAVE"
4675 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4677 cat >> confdefs.h <<EOF
4678 #define $cf_nculib_ROOT 1
4684 if test "$no_x" = yes; then
4685 # Not all programs may use this symbol, but it does not hurt to define it.
4686 cat >> confdefs.h <<\EOF
4687 #define X_DISPLAY_MISSING 1
4690 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4692 if test -n "$x_includes"; then
4693 X_CFLAGS="$X_CFLAGS -I$x_includes"
4696 # It would also be nice to do this for all -L options, not just this one.
4697 if test -n "$x_libraries"; then
4698 X_LIBS="$X_LIBS -L$x_libraries"
4699 # For Solaris; some versions of Sun CC require a space after -R and
4700 # others require no space. Words are not sufficient . . . .
4701 case "`(uname -sr) 2>/dev/null`" in
4703 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4704 echo "configure:4705: checking whether -R must be followed by a space" >&5
4705 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4706 cat > conftest.$ac_ext <<EOF
4707 #line 4708 "configure"
4708 #include "confdefs.h"
4714 if { (eval echo configure:4715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4718 echo "configure: failed program was:" >&5
4719 cat conftest.$ac_ext >&5
4724 if test $ac_R_nospace = yes; then
4725 echo "$ac_t""no" 1>&6
4726 X_LIBS="$X_LIBS -R$x_libraries"
4728 LIBS="$ac_xsave_LIBS -R $x_libraries"
4729 cat > conftest.$ac_ext <<EOF
4730 #line 4731 "configure"
4731 #include "confdefs.h"
4737 if { (eval echo configure:4738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4741 echo "configure: failed program was:" >&5
4742 cat conftest.$ac_ext >&5
4747 if test $ac_R_space = yes; then
4748 echo "$ac_t""yes" 1>&6
4749 X_LIBS="$X_LIBS -R $x_libraries"
4751 echo "$ac_t""neither works" 1>&6
4754 LIBS="$ac_xsave_LIBS"
4758 # Check for system-dependent libraries X programs must link with.
4759 # Do this before checking for the system-independent R6 libraries
4760 # (-lICE), since we may need -lsocket or whatever for X linking.
4762 if test "$ISC" = yes; then
4763 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4765 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
4766 # libraries were built with DECnet support. And karl@cs.umb.edu says
4767 # the Alpha needs dnet_stub (dnet does not exist).
4768 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4769 echo "configure:4770: checking for dnet_ntoa in -ldnet" >&5
4770 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4771 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4772 echo $ac_n "(cached) $ac_c" 1>&6
4774 ac_save_LIBS="$LIBS"
4776 cat > conftest.$ac_ext <<EOF
4777 #line 4778 "configure"
4778 #include "confdefs.h"
4779 /* Override any gcc2 internal prototype to avoid an error. */
4780 /* We use char because int might match the return type of a gcc2
4781 builtin and then its argument prototype would still apply. */
4788 if { (eval echo configure:4789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4790 eval "ac_cv_lib_$ac_lib_var=yes"
4792 echo "configure: failed program was:" >&5
4793 cat conftest.$ac_ext >&5
4795 eval "ac_cv_lib_$ac_lib_var=no"
4798 LIBS="$ac_save_LIBS"
4801 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4802 echo "$ac_t""yes" 1>&6
4803 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
4805 echo "$ac_t""no" 1>&6
4808 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
4809 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
4810 echo "configure:4811: checking for dnet_ntoa in -ldnet_stub" >&5
4811 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4812 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4813 echo $ac_n "(cached) $ac_c" 1>&6
4815 ac_save_LIBS="$LIBS"
4816 LIBS="-ldnet_stub $LIBS"
4817 cat > conftest.$ac_ext <<EOF
4818 #line 4819 "configure"
4819 #include "confdefs.h"
4820 /* Override any gcc2 internal prototype to avoid an error. */
4821 /* We use char because int might match the return type of a gcc2
4822 builtin and then its argument prototype would still apply. */
4829 if { (eval echo configure:4830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4831 eval "ac_cv_lib_$ac_lib_var=yes"
4833 echo "configure: failed program was:" >&5
4834 cat conftest.$ac_ext >&5
4836 eval "ac_cv_lib_$ac_lib_var=no"
4839 LIBS="$ac_save_LIBS"
4842 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4843 echo "$ac_t""yes" 1>&6
4844 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
4846 echo "$ac_t""no" 1>&6
4851 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
4852 # to get the SysV transport functions.
4853 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
4855 # The nsl library prevents programs from opening the X display
4856 # on Irix 5.2, according to dickey@clark.net.
4857 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
4858 echo "configure:4859: checking for gethostbyname" >&5
4859 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
4860 echo $ac_n "(cached) $ac_c" 1>&6
4862 cat > conftest.$ac_ext <<EOF
4863 #line 4864 "configure"
4864 #include "confdefs.h"
4865 /* System header to define __stub macros and hopefully few prototypes,
4866 which can conflict with char gethostbyname(); below. */
4868 /* Override any gcc2 internal prototype to avoid an error. */
4869 /* We use char because int might match the return type of a gcc2
4870 builtin and then its argument prototype would still apply. */
4871 char gethostbyname();
4875 /* The GNU C library defines this for functions which it implements
4876 to always fail with ENOSYS. Some functions are actually named
4877 something starting with __ and the normal name is an alias. */
4878 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4886 if { (eval echo configure:4887: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4888 eval "ac_cv_func_gethostbyname=yes"
4890 echo "configure: failed program was:" >&5
4891 cat conftest.$ac_ext >&5
4893 eval "ac_cv_func_gethostbyname=no"
4898 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4899 echo "$ac_t""yes" 1>&6
4902 echo "$ac_t""no" 1>&6
4905 if test $ac_cv_func_gethostbyname = no; then
4906 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
4907 echo "configure:4908: checking for gethostbyname in -lnsl" >&5
4908 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
4909 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4910 echo $ac_n "(cached) $ac_c" 1>&6
4912 ac_save_LIBS="$LIBS"
4914 cat > conftest.$ac_ext <<EOF
4915 #line 4916 "configure"
4916 #include "confdefs.h"
4917 /* Override any gcc2 internal prototype to avoid an error. */
4918 /* We use char because int might match the return type of a gcc2
4919 builtin and then its argument prototype would still apply. */
4920 char gethostbyname();
4926 if { (eval echo configure:4927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4928 eval "ac_cv_lib_$ac_lib_var=yes"
4930 echo "configure: failed program was:" >&5
4931 cat conftest.$ac_ext >&5
4933 eval "ac_cv_lib_$ac_lib_var=no"
4936 LIBS="$ac_save_LIBS"
4939 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4940 echo "$ac_t""yes" 1>&6
4941 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
4943 echo "$ac_t""no" 1>&6
4948 # lieder@skyler.mavd.honeywell.com says without -lsocket,
4949 # socket/setsockopt and other routines are undefined under SCO ODT
4950 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
4951 # on later versions), says simon@lia.di.epfl.ch: it contains
4952 # gethostby* variants that don't use the nameserver (or something).
4953 # -lsocket must be given before -lnsl if both are needed.
4954 # We assume that if connect needs -lnsl, so does gethostbyname.
4955 echo $ac_n "checking for connect""... $ac_c" 1>&6
4956 echo "configure:4957: checking for connect" >&5
4957 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
4958 echo $ac_n "(cached) $ac_c" 1>&6
4960 cat > conftest.$ac_ext <<EOF
4961 #line 4962 "configure"
4962 #include "confdefs.h"
4963 /* System header to define __stub macros and hopefully few prototypes,
4964 which can conflict with char connect(); below. */
4966 /* Override any gcc2 internal prototype to avoid an error. */
4967 /* We use char because int might match the return type of a gcc2
4968 builtin and then its argument prototype would still apply. */
4973 /* The GNU C library defines this for functions which it implements
4974 to always fail with ENOSYS. Some functions are actually named
4975 something starting with __ and the normal name is an alias. */
4976 #if defined (__stub_connect) || defined (__stub___connect)
4984 if { (eval echo configure:4985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4986 eval "ac_cv_func_connect=yes"
4988 echo "configure: failed program was:" >&5
4989 cat conftest.$ac_ext >&5
4991 eval "ac_cv_func_connect=no"
4996 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
4997 echo "$ac_t""yes" 1>&6
5000 echo "$ac_t""no" 1>&6
5003 if test $ac_cv_func_connect = no; then
5004 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5005 echo "configure:5006: checking for connect in -lsocket" >&5
5006 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5007 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5008 echo $ac_n "(cached) $ac_c" 1>&6
5010 ac_save_LIBS="$LIBS"
5011 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5012 cat > conftest.$ac_ext <<EOF
5013 #line 5014 "configure"
5014 #include "confdefs.h"
5015 /* Override any gcc2 internal prototype to avoid an error. */
5016 /* We use char because int might match the return type of a gcc2
5017 builtin and then its argument prototype would still apply. */
5024 if { (eval echo configure:5025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5026 eval "ac_cv_lib_$ac_lib_var=yes"
5028 echo "configure: failed program was:" >&5
5029 cat conftest.$ac_ext >&5
5031 eval "ac_cv_lib_$ac_lib_var=no"
5034 LIBS="$ac_save_LIBS"
5037 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5038 echo "$ac_t""yes" 1>&6
5039 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5041 echo "$ac_t""no" 1>&6
5046 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5047 echo $ac_n "checking for remove""... $ac_c" 1>&6
5048 echo "configure:5049: checking for remove" >&5
5049 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
5050 echo $ac_n "(cached) $ac_c" 1>&6
5052 cat > conftest.$ac_ext <<EOF
5053 #line 5054 "configure"
5054 #include "confdefs.h"
5055 /* System header to define __stub macros and hopefully few prototypes,
5056 which can conflict with char remove(); below. */
5058 /* Override any gcc2 internal prototype to avoid an error. */
5059 /* We use char because int might match the return type of a gcc2
5060 builtin and then its argument prototype would still apply. */
5065 /* The GNU C library defines this for functions which it implements
5066 to always fail with ENOSYS. Some functions are actually named
5067 something starting with __ and the normal name is an alias. */
5068 #if defined (__stub_remove) || defined (__stub___remove)
5076 if { (eval echo configure:5077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5078 eval "ac_cv_func_remove=yes"
5080 echo "configure: failed program was:" >&5
5081 cat conftest.$ac_ext >&5
5083 eval "ac_cv_func_remove=no"
5088 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5089 echo "$ac_t""yes" 1>&6
5092 echo "$ac_t""no" 1>&6
5095 if test $ac_cv_func_remove = no; then
5096 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5097 echo "configure:5098: checking for remove in -lposix" >&5
5098 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5099 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5100 echo $ac_n "(cached) $ac_c" 1>&6
5102 ac_save_LIBS="$LIBS"
5103 LIBS="-lposix $LIBS"
5104 cat > conftest.$ac_ext <<EOF
5105 #line 5106 "configure"
5106 #include "confdefs.h"
5107 /* Override any gcc2 internal prototype to avoid an error. */
5108 /* We use char because int might match the return type of a gcc2
5109 builtin and then its argument prototype would still apply. */
5116 if { (eval echo configure:5117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5118 eval "ac_cv_lib_$ac_lib_var=yes"
5120 echo "configure: failed program was:" >&5
5121 cat conftest.$ac_ext >&5
5123 eval "ac_cv_lib_$ac_lib_var=no"
5126 LIBS="$ac_save_LIBS"
5129 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5130 echo "$ac_t""yes" 1>&6
5131 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5133 echo "$ac_t""no" 1>&6
5138 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5139 echo $ac_n "checking for shmat""... $ac_c" 1>&6
5140 echo "configure:5141: checking for shmat" >&5
5141 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
5142 echo $ac_n "(cached) $ac_c" 1>&6
5144 cat > conftest.$ac_ext <<EOF
5145 #line 5146 "configure"
5146 #include "confdefs.h"
5147 /* System header to define __stub macros and hopefully few prototypes,
5148 which can conflict with char shmat(); below. */
5150 /* Override any gcc2 internal prototype to avoid an error. */
5151 /* We use char because int might match the return type of a gcc2
5152 builtin and then its argument prototype would still apply. */
5157 /* The GNU C library defines this for functions which it implements
5158 to always fail with ENOSYS. Some functions are actually named
5159 something starting with __ and the normal name is an alias. */
5160 #if defined (__stub_shmat) || defined (__stub___shmat)
5168 if { (eval echo configure:5169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5170 eval "ac_cv_func_shmat=yes"
5172 echo "configure: failed program was:" >&5
5173 cat conftest.$ac_ext >&5
5175 eval "ac_cv_func_shmat=no"
5180 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5181 echo "$ac_t""yes" 1>&6
5184 echo "$ac_t""no" 1>&6
5187 if test $ac_cv_func_shmat = no; then
5188 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5189 echo "configure:5190: checking for shmat in -lipc" >&5
5190 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5191 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5192 echo $ac_n "(cached) $ac_c" 1>&6
5194 ac_save_LIBS="$LIBS"
5196 cat > conftest.$ac_ext <<EOF
5197 #line 5198 "configure"
5198 #include "confdefs.h"
5199 /* Override any gcc2 internal prototype to avoid an error. */
5200 /* We use char because int might match the return type of a gcc2
5201 builtin and then its argument prototype would still apply. */
5208 if { (eval echo configure:5209: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5210 eval "ac_cv_lib_$ac_lib_var=yes"
5212 echo "configure: failed program was:" >&5
5213 cat conftest.$ac_ext >&5
5215 eval "ac_cv_lib_$ac_lib_var=no"
5218 LIBS="$ac_save_LIBS"
5221 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5222 echo "$ac_t""yes" 1>&6
5223 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5225 echo "$ac_t""no" 1>&6
5231 # Check for libraries that X11R6 Xt/Xaw programs need.
5232 ac_save_LDFLAGS="$LDFLAGS"
5233 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5234 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5235 # check for ICE first), but we must link in the order -lSM -lICE or
5236 # we get undefined symbols. So assume we have SM if we have ICE.
5237 # These have to be linked with before -lX11, unlike the other
5238 # libraries we check for below, so use a different variable.
5239 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5240 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
5241 echo "configure:5242: checking for IceConnectionNumber in -lICE" >&5
5242 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5243 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5244 echo $ac_n "(cached) $ac_c" 1>&6
5246 ac_save_LIBS="$LIBS"
5247 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
5248 cat > conftest.$ac_ext <<EOF
5249 #line 5250 "configure"
5250 #include "confdefs.h"
5251 /* Override any gcc2 internal prototype to avoid an error. */
5252 /* We use char because int might match the return type of a gcc2
5253 builtin and then its argument prototype would still apply. */
5254 char IceConnectionNumber();
5257 IceConnectionNumber()
5260 if { (eval echo configure:5261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5262 eval "ac_cv_lib_$ac_lib_var=yes"
5264 echo "configure: failed program was:" >&5
5265 cat conftest.$ac_ext >&5
5267 eval "ac_cv_lib_$ac_lib_var=no"
5270 LIBS="$ac_save_LIBS"
5273 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5274 echo "$ac_t""yes" 1>&6
5275 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5277 echo "$ac_t""no" 1>&6
5280 LDFLAGS="$ac_save_LDFLAGS"
5288 # SYSTEM_NAME=`echo "$cf_cv_system_name"|tr ' ' -`
5292 LDFLAGS="$X_LIBS $LDFLAGS"
5294 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
5296 cf_check_cflags="$CFLAGS"
5297 cf_check_cppflags="$CPPFLAGS"
5302 cf_new_extra_cppflags=
5304 for cf_add_cflags in $X_CFLAGS
5306 case $cf_fix_cppflags in
5308 case $cf_add_cflags in #(vi
5309 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
5310 case $cf_add_cflags in
5312 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5314 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
5315 && test -z "${cf_tst_cflags}" \
5316 && cf_fix_cppflags=yes
5318 if test $cf_fix_cppflags = yes ; then
5319 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5321 elif test "${cf_tst_cflags}" = "\"'" ; then
5322 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5328 *$cf_add_cflags) #(vi
5331 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
5336 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
5341 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5343 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
5345 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
5346 && test -z "${cf_tst_cflags}" \
5347 && cf_fix_cppflags=no
5352 if test -n "$cf_new_cflags" ; then
5353 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
5355 CFLAGS="$CFLAGS $cf_new_cflags"
5358 if test -n "$cf_new_cppflags" ; then
5359 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
5361 CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
5364 if test -n "$cf_new_extra_cppflags" ; then
5365 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
5367 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
5373 if test "$cf_check_cflags" != "$CFLAGS" ; then
5374 cat > conftest.$ac_ext <<EOF
5375 #line 5376 "configure"
5376 #include "confdefs.h"
5379 printf("Hello world");
5382 if { (eval echo configure:5383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5385 echo "configure: failed program was:" >&5
5386 cat conftest.$ac_ext >&5
5388 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
5390 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
5391 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
5394 CFLAGS="$cf_check_flags"
5400 echo $ac_n "checking for XOpenDisplay""... $ac_c" 1>&6
5401 echo "configure:5402: checking for XOpenDisplay" >&5
5402 if eval "test \"`echo '$''{'ac_cv_func_XOpenDisplay'+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 XOpenDisplay(); 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 XOpenDisplay();
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_XOpenDisplay) || defined (__stub___XOpenDisplay)
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_XOpenDisplay=yes"
5433 echo "configure: failed program was:" >&5
5434 cat conftest.$ac_ext >&5
5436 eval "ac_cv_func_XOpenDisplay=no"
5441 if eval "test \"`echo '$ac_cv_func_'XOpenDisplay`\" = yes"; then
5442 echo "$ac_t""yes" 1>&6
5445 echo "$ac_t""no" 1>&6
5447 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5448 echo "configure:5449: checking for XOpenDisplay in -lX11" >&5
5449 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5450 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5451 echo $ac_n "(cached) $ac_c" 1>&6
5453 ac_save_LIBS="$LIBS"
5454 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
5455 cat > conftest.$ac_ext <<EOF
5456 #line 5457 "configure"
5457 #include "confdefs.h"
5458 /* Override any gcc2 internal prototype to avoid an error. */
5459 /* We use char because int might match the return type of a gcc2
5460 builtin and then its argument prototype would still apply. */
5461 char XOpenDisplay();
5467 if { (eval echo configure:5468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5469 eval "ac_cv_lib_$ac_lib_var=yes"
5471 echo "configure: failed program was:" >&5
5472 cat conftest.$ac_ext >&5
5474 eval "ac_cv_lib_$ac_lib_var=no"
5477 LIBS="$ac_save_LIBS"
5480 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5481 echo "$ac_t""yes" 1>&6
5484 echo "$ac_t""no" 1>&6
5490 echo $ac_n "checking for XtAppInitialize""... $ac_c" 1>&6
5491 echo "configure:5492: checking for XtAppInitialize" >&5
5492 if eval "test \"`echo '$''{'ac_cv_func_XtAppInitialize'+set}'`\" = set"; then
5493 echo $ac_n "(cached) $ac_c" 1>&6
5495 cat > conftest.$ac_ext <<EOF
5496 #line 5497 "configure"
5497 #include "confdefs.h"
5498 /* System header to define __stub macros and hopefully few prototypes,
5499 which can conflict with char XtAppInitialize(); below. */
5501 /* Override any gcc2 internal prototype to avoid an error. */
5502 /* We use char because int might match the return type of a gcc2
5503 builtin and then its argument prototype would still apply. */
5504 char XtAppInitialize();
5508 /* The GNU C library defines this for functions which it implements
5509 to always fail with ENOSYS. Some functions are actually named
5510 something starting with __ and the normal name is an alias. */
5511 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
5519 if { (eval echo configure:5520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5521 eval "ac_cv_func_XtAppInitialize=yes"
5523 echo "configure: failed program was:" >&5
5524 cat conftest.$ac_ext >&5
5526 eval "ac_cv_func_XtAppInitialize=no"
5531 if eval "test \"`echo '$ac_cv_func_'XtAppInitialize`\" = yes"; then
5532 echo "$ac_t""yes" 1>&6
5535 echo "$ac_t""no" 1>&6
5537 echo $ac_n "checking for XtAppInitialize in -lXt""... $ac_c" 1>&6
5538 echo "configure:5539: checking for XtAppInitialize in -lXt" >&5
5539 ac_lib_var=`echo Xt'_'XtAppInitialize | sed 'y%./+-%__p_%'`
5540 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5541 echo $ac_n "(cached) $ac_c" 1>&6
5543 ac_save_LIBS="$LIBS"
5544 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
5545 cat > conftest.$ac_ext <<EOF
5546 #line 5547 "configure"
5547 #include "confdefs.h"
5548 /* Override any gcc2 internal prototype to avoid an error. */
5549 /* We use char because int might match the return type of a gcc2
5550 builtin and then its argument prototype would still apply. */
5551 char XtAppInitialize();
5557 if { (eval echo configure:5558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5559 eval "ac_cv_lib_$ac_lib_var=yes"
5561 echo "configure: failed program was:" >&5
5562 cat conftest.$ac_ext >&5
5564 eval "ac_cv_lib_$ac_lib_var=no"
5567 LIBS="$ac_save_LIBS"
5570 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5571 echo "$ac_t""yes" 1>&6
5572 cat >> confdefs.h <<\EOF
5573 #define HAVE_LIBXT 1
5577 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
5579 echo "$ac_t""no" 1>&6
5585 if test $cf_have_X_LIBS = no ; then
5586 echo "configure: warning: Unable to successfully link X Toolkit library (-lXt) with
5587 test program. You will have to check and add the proper libraries by hand
5592 cf_x_athena=${cf_x_athena-Xaw}
5594 echo $ac_n "checking if you want to link with Xaw 3d library""... $ac_c" 1>&6
5595 echo "configure:5596: checking if you want to link with Xaw 3d library" >&5
5598 # Check whether --with-Xaw3d or --without-Xaw3d was given.
5599 if test "${with_Xaw3d+set}" = set; then
5600 withval="$with_Xaw3d"
5604 if test "$withval" = yes ; then
5606 echo "$ac_t""yes" 1>&6
5608 echo "$ac_t""no" 1>&6
5611 echo $ac_n "checking if you want to link with neXT Athena library""... $ac_c" 1>&6
5612 echo "configure:5613: checking if you want to link with neXT Athena library" >&5
5615 # Check whether --with-neXtaw or --without-neXtaw was given.
5616 if test "${with_neXtaw+set}" = set; then
5617 withval="$with_neXtaw"
5621 if test "$withval" = yes ; then
5623 echo "$ac_t""yes" 1>&6
5625 echo "$ac_t""no" 1>&6
5628 echo $ac_n "checking if you want to link with Athena-Plus library""... $ac_c" 1>&6
5629 echo "configure:5630: checking if you want to link with Athena-Plus library" >&5
5632 # Check whether --with-XawPlus or --without-XawPlus was given.
5633 if test "${with_XawPlus+set}" = set; then
5634 withval="$with_XawPlus"
5638 if test "$withval" = yes ; then
5640 echo "$ac_t""yes" 1>&6
5642 echo "$ac_t""no" 1>&6
5645 echo $ac_n "checking for XextCreateExtension in -lXext""... $ac_c" 1>&6
5646 echo "configure:5647: checking for XextCreateExtension in -lXext" >&5
5647 ac_lib_var=`echo Xext'_'XextCreateExtension | sed 'y%./+-%__p_%'`
5648 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5649 echo $ac_n "(cached) $ac_c" 1>&6
5651 ac_save_LIBS="$LIBS"
5653 cat > conftest.$ac_ext <<EOF
5654 #line 5655 "configure"
5655 #include "confdefs.h"
5656 /* Override any gcc2 internal prototype to avoid an error. */
5657 /* We use char because int might match the return type of a gcc2
5658 builtin and then its argument prototype would still apply. */
5659 char XextCreateExtension();
5662 XextCreateExtension()
5665 if { (eval echo configure:5666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5667 eval "ac_cv_lib_$ac_lib_var=yes"
5669 echo "configure: failed program was:" >&5
5670 cat conftest.$ac_ext >&5
5672 eval "ac_cv_lib_$ac_lib_var=no"
5675 LIBS="$ac_save_LIBS"
5678 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5679 echo "$ac_t""yes" 1>&6
5682 echo "$ac_t""no" 1>&6
5689 cf_x_athena_root=$cf_x_athena
5690 cf_x_athena_include=""
5692 for cf_path in default \
5693 /usr/contrib/X11R6 \
5694 /usr/contrib/X11R5 \
5698 if test -z "$cf_x_athena_include" ; then
5700 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
5701 if test $cf_path != default ; then
5702 CPPFLAGS="-I$cf_path/include $cf_save"
5703 echo $ac_n "checking for $cf_test in $cf_path""... $ac_c" 1>&6
5704 echo "configure:5705: checking for $cf_test in $cf_path" >&5
5706 echo $ac_n "checking for $cf_test""... $ac_c" 1>&6
5707 echo "configure:5708: checking for $cf_test" >&5
5709 cat > conftest.$ac_ext <<EOF
5710 #line 5711 "configure"
5711 #include "confdefs.h"
5713 #include <X11/Intrinsic.h>
5719 if { (eval echo configure:5720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5723 echo "configure: failed program was:" >&5
5724 cat conftest.$ac_ext >&5
5729 echo "$ac_t""$cf_result" 1>&6
5730 if test "$cf_result" = yes ; then
5731 cf_x_athena_include=$cf_path
5739 if test -z "$cf_x_athena_include" ; then
5740 echo "configure: warning: Unable to successfully find Athena header files with test program" 1>&2
5741 elif test "$cf_x_athena_include" != default ; then
5742 CPPFLAGS="$CPPFLAGS -I$cf_x_athena_include"
5746 cf_x_athena_root=$cf_x_athena
5749 for cf_path in default \
5750 /usr/contrib/X11R6 \
5751 /usr/contrib/X11R5 \
5756 "-l$cf_x_athena_root -lXmu" \
5757 "-l$cf_x_athena_root -lXpm -lXmu" \
5758 "-l${cf_x_athena_root}_s -lXmu_s"
5760 if test -z "$cf_x_athena_lib" ; then
5762 cf_test=XawSimpleMenuAddGlobalActions
5763 if test $cf_path != default ; then
5764 LIBS="-L$cf_path/lib $cf_lib $LIBS"
5765 echo $ac_n "checking for $cf_lib in $cf_path""... $ac_c" 1>&6
5766 echo "configure:5767: checking for $cf_lib in $cf_path" >&5
5768 LIBS="$cf_lib $LIBS"
5769 echo $ac_n "checking for $cf_test in $cf_lib""... $ac_c" 1>&6
5770 echo "configure:5771: checking for $cf_test in $cf_lib" >&5
5772 cat > conftest.$ac_ext <<EOF
5773 #line 5774 "configure"
5774 #include "confdefs.h"
5780 if { (eval echo configure:5781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5784 echo "configure: failed program was:" >&5
5785 cat conftest.$ac_ext >&5
5790 echo "$ac_t""$cf_result" 1>&6
5791 if test "$cf_result" = yes ; then
5792 cf_x_athena_lib="$cf_lib"
5800 if test -z "$cf_x_athena_lib" ; then
5801 { echo "configure: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" 1>&2; exit 1; }
5805 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5807 cat >> confdefs.h <<EOF
5808 #define $cf_x_athena_LIBS 1
5816 for ac_prog in xcurses-config
5818 # Extract the first word of "$ac_prog", so it can be a program name with args.
5819 set dummy $ac_prog; ac_word=$2
5820 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5821 echo "configure:5822: checking for $ac_word" >&5
5822 if eval "test \"`echo '$''{'ac_cv_path_XCURSES_CONFIG'+set}'`\" = set"; then
5823 echo $ac_n "(cached) $ac_c" 1>&6
5825 case "$XCURSES_CONFIG" in
5827 ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a path.
5830 ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a dos path.
5833 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5835 for ac_dir in $ac_dummy; do
5836 test -z "$ac_dir" && ac_dir=.
5837 if test -f $ac_dir/$ac_word; then
5838 ac_cv_path_XCURSES_CONFIG="$ac_dir/$ac_word"
5846 XCURSES_CONFIG="$ac_cv_path_XCURSES_CONFIG"
5847 if test -n "$XCURSES_CONFIG"; then
5848 echo "$ac_t""$XCURSES_CONFIG" 1>&6
5850 echo "$ac_t""no" 1>&6
5853 test -n "$XCURSES_CONFIG" && break
5855 test -n "$XCURSES_CONFIG" || XCURSES_CONFIG="none"
5858 if test "$XCURSES_CONFIG" != none ; then
5860 CPPFLAGS="`$XCURSES_CONFIG --cflags` $CPPFLAGS"
5861 LIBS="`$XCURSES_CONFIG --libs` $LIBS"
5863 cf_cv_lib_XCurses=yes
5867 LDFLAGS="$LDFLAGS $X_LIBS"
5869 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
5871 cf_check_cflags="$CFLAGS"
5872 cf_check_cppflags="$CPPFLAGS"
5877 cf_new_extra_cppflags=
5879 for cf_add_cflags in $X_CFLAGS
5881 case $cf_fix_cppflags in
5883 case $cf_add_cflags in #(vi
5884 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
5885 case $cf_add_cflags in
5887 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5889 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
5890 && test -z "${cf_tst_cflags}" \
5891 && cf_fix_cppflags=yes
5893 if test $cf_fix_cppflags = yes ; then
5894 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5896 elif test "${cf_tst_cflags}" = "\"'" ; then
5897 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5903 *$cf_add_cflags) #(vi
5906 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
5911 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
5916 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5918 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
5920 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
5921 && test -z "${cf_tst_cflags}" \
5922 && cf_fix_cppflags=no
5927 if test -n "$cf_new_cflags" ; then
5928 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
5930 CFLAGS="$CFLAGS $cf_new_cflags"
5933 if test -n "$cf_new_cppflags" ; then
5934 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
5936 CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
5939 if test -n "$cf_new_extra_cppflags" ; then
5940 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
5942 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
5948 if test "$cf_check_cflags" != "$CFLAGS" ; then
5949 cat > conftest.$ac_ext <<EOF
5950 #line 5951 "configure"
5951 #include "confdefs.h"
5954 printf("Hello world");
5957 if { (eval echo configure:5958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5960 echo "configure: failed program was:" >&5
5961 cat conftest.$ac_ext >&5
5963 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
5965 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
5966 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
5969 CFLAGS="$cf_check_flags"
5974 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5975 echo "configure:5976: checking for XOpenDisplay in -lX11" >&5
5976 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5977 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5978 echo $ac_n "(cached) $ac_c" 1>&6
5980 ac_save_LIBS="$LIBS"
5981 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
5982 cat > conftest.$ac_ext <<EOF
5983 #line 5984 "configure"
5984 #include "confdefs.h"
5985 /* Override any gcc2 internal prototype to avoid an error. */
5986 /* We use char because int might match the return type of a gcc2
5987 builtin and then its argument prototype would still apply. */
5988 char XOpenDisplay();
5994 if { (eval echo configure:5995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5996 eval "ac_cv_lib_$ac_lib_var=yes"
5998 echo "configure: failed program was:" >&5
5999 cat conftest.$ac_ext >&5
6001 eval "ac_cv_lib_$ac_lib_var=no"
6004 LIBS="$ac_save_LIBS"
6007 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6008 echo "$ac_t""yes" 1>&6
6011 echo "$ac_t""no" 1>&6
6014 echo $ac_n "checking for XCurses library""... $ac_c" 1>&6
6015 echo "configure:6016: checking for XCurses library" >&5
6016 if eval "test \"`echo '$''{'cf_cv_lib_XCurses'+set}'`\" = set"; then
6017 echo $ac_n "(cached) $ac_c" 1>&6
6020 LIBS="-lXCurses $LIBS"
6021 cat > conftest.$ac_ext <<EOF
6022 #line 6023 "configure"
6023 #include "confdefs.h"
6025 #include <xcurses.h>
6026 char *XCursesProgramName = "test";
6032 if { (eval echo configure:6033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6034 cf_cv_lib_XCurses=yes
6036 echo "configure: failed program was:" >&5
6037 cat conftest.$ac_ext >&5
6039 cf_cv_lib_XCurses=no
6045 echo "$ac_t""$cf_cv_lib_XCurses" 1>&6
6049 if test $cf_cv_lib_XCurses = yes ; then
6050 cat >> confdefs.h <<\EOF
6054 cat >> confdefs.h <<\EOF
6058 cat >> confdefs.h <<\EOF
6059 #define HAVE_XCURSES 1
6063 { echo "configure: error: Cannot link with XCurses" 1>&2; exit 1; }
6071 case $cf_cv_screen in #(vi
6075 # look for curses-related libraries
6076 echo $ac_n "checking for new_panel in -lpanel$cf_cv_libtype""... $ac_c" 1>&6
6077 echo "configure:6078: checking for new_panel in -lpanel$cf_cv_libtype" >&5
6078 ac_lib_var=`echo panel$cf_cv_libtype'_'new_panel | sed 'y%./+-%__p_%'`
6079 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6080 echo $ac_n "(cached) $ac_c" 1>&6
6082 ac_save_LIBS="$LIBS"
6083 LIBS="-lpanel$cf_cv_libtype $LIBS"
6084 cat > conftest.$ac_ext <<EOF
6085 #line 6086 "configure"
6086 #include "confdefs.h"
6087 /* Override any gcc2 internal prototype to avoid an error. */
6088 /* We use char because int might match the return type of a gcc2
6089 builtin and then its argument prototype would still apply. */
6096 if { (eval echo configure:6097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6098 eval "ac_cv_lib_$ac_lib_var=yes"
6100 echo "configure: failed program was:" >&5
6101 cat conftest.$ac_ext >&5
6103 eval "ac_cv_lib_$ac_lib_var=no"
6106 LIBS="$ac_save_LIBS"
6109 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6110 echo "$ac_t""yes" 1>&6
6111 ac_tr_lib=HAVE_LIB`echo panel$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6112 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6113 cat >> confdefs.h <<EOF
6114 #define $ac_tr_lib 1
6117 LIBS="-lpanel$cf_cv_libtype $LIBS"
6120 echo "$ac_t""no" 1>&6
6123 echo $ac_n "checking for menu_driver in -lmenu$cf_cv_libtype""... $ac_c" 1>&6
6124 echo "configure:6125: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
6125 ac_lib_var=`echo menu$cf_cv_libtype'_'menu_driver | sed 'y%./+-%__p_%'`
6126 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6127 echo $ac_n "(cached) $ac_c" 1>&6
6129 ac_save_LIBS="$LIBS"
6130 LIBS="-lmenu$cf_cv_libtype $LIBS"
6131 cat > conftest.$ac_ext <<EOF
6132 #line 6133 "configure"
6133 #include "confdefs.h"
6134 /* Override any gcc2 internal prototype to avoid an error. */
6135 /* We use char because int might match the return type of a gcc2
6136 builtin and then its argument prototype would still apply. */
6143 if { (eval echo configure:6144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6145 eval "ac_cv_lib_$ac_lib_var=yes"
6147 echo "configure: failed program was:" >&5
6148 cat conftest.$ac_ext >&5
6150 eval "ac_cv_lib_$ac_lib_var=no"
6153 LIBS="$ac_save_LIBS"
6156 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6157 echo "$ac_t""yes" 1>&6
6158 ac_tr_lib=HAVE_LIB`echo menu$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6159 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6160 cat >> confdefs.h <<EOF
6161 #define $ac_tr_lib 1
6164 LIBS="-lmenu$cf_cv_libtype $LIBS"
6167 echo "$ac_t""no" 1>&6
6170 echo $ac_n "checking for form_driver in -lform$cf_cv_libtype""... $ac_c" 1>&6
6171 echo "configure:6172: checking for form_driver in -lform$cf_cv_libtype" >&5
6172 ac_lib_var=`echo form$cf_cv_libtype'_'form_driver | sed 'y%./+-%__p_%'`
6173 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6174 echo $ac_n "(cached) $ac_c" 1>&6
6176 ac_save_LIBS="$LIBS"
6177 LIBS="-lform$cf_cv_libtype $LIBS"
6178 cat > conftest.$ac_ext <<EOF
6179 #line 6180 "configure"
6180 #include "confdefs.h"
6181 /* Override any gcc2 internal prototype to avoid an error. */
6182 /* We use char because int might match the return type of a gcc2
6183 builtin and then its argument prototype would still apply. */
6190 if { (eval echo configure:6191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6192 eval "ac_cv_lib_$ac_lib_var=yes"
6194 echo "configure: failed program was:" >&5
6195 cat conftest.$ac_ext >&5
6197 eval "ac_cv_lib_$ac_lib_var=no"
6200 LIBS="$ac_save_LIBS"
6203 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6204 echo "$ac_t""yes" 1>&6
6205 ac_tr_lib=HAVE_LIB`echo form$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6206 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6207 cat >> confdefs.h <<EOF
6208 #define $ac_tr_lib 1
6211 LIBS="-lform$cf_cv_libtype $LIBS"
6214 echo "$ac_t""no" 1>&6
6218 # look for curses-related headers
6227 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6228 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6229 echo "configure:6230: checking for $ac_hdr" >&5
6230 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6231 echo $ac_n "(cached) $ac_c" 1>&6
6233 cat > conftest.$ac_ext <<EOF
6234 #line 6235 "configure"
6235 #include "confdefs.h"
6238 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6239 { (eval echo configure:6240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6240 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6241 if test -z "$ac_err"; then
6243 eval "ac_cv_header_$ac_safe=yes"
6246 echo "configure: failed program was:" >&5
6247 cat conftest.$ac_ext >&5
6249 eval "ac_cv_header_$ac_safe=no"
6253 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6254 echo "$ac_t""yes" 1>&6
6255 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6256 cat >> confdefs.h <<EOF
6257 #define $ac_tr_hdr 1
6261 echo "$ac_t""no" 1>&6
6268 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
6269 echo "configure:6270: checking return type of signal handlers" >&5
6270 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
6271 echo $ac_n "(cached) $ac_c" 1>&6
6273 cat > conftest.$ac_ext <<EOF
6274 #line 6275 "configure"
6275 #include "confdefs.h"
6276 #include <sys/types.h>
6282 extern "C" void (*signal (int, void (*)(int)))(int);
6284 void (*signal ()) ();
6291 if { (eval echo configure:6292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6293 ac_cv_type_signal=void
6295 echo "configure: failed program was:" >&5
6296 cat conftest.$ac_ext >&5
6298 ac_cv_type_signal=int
6303 echo "$ac_t""$ac_cv_type_signal" 1>&6
6304 cat >> confdefs.h <<EOF
6305 #define RETSIGTYPE $ac_cv_type_signal
6310 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
6311 echo "configure:6312: checking for ANSI C header files" >&5
6312 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
6313 echo $ac_n "(cached) $ac_c" 1>&6
6315 cat > conftest.$ac_ext <<EOF
6316 #line 6317 "configure"
6317 #include "confdefs.h"
6323 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6324 { (eval echo configure:6325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6325 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6326 if test -z "$ac_err"; then
6328 ac_cv_header_stdc=yes
6331 echo "configure: failed program was:" >&5
6332 cat conftest.$ac_ext >&5
6334 ac_cv_header_stdc=no
6338 if test $ac_cv_header_stdc = yes; then
6339 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6340 cat > conftest.$ac_ext <<EOF
6341 #line 6342 "configure"
6342 #include "confdefs.h"
6345 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6346 egrep "memchr" >/dev/null 2>&1; then
6350 ac_cv_header_stdc=no
6356 if test $ac_cv_header_stdc = yes; then
6357 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6358 cat > conftest.$ac_ext <<EOF
6359 #line 6360 "configure"
6360 #include "confdefs.h"
6363 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6364 egrep "free" >/dev/null 2>&1; then
6368 ac_cv_header_stdc=no
6374 if test $ac_cv_header_stdc = yes; then
6375 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6376 if test "$cross_compiling" = yes; then
6379 cat > conftest.$ac_ext <<EOF
6380 #line 6381 "configure"
6381 #include "confdefs.h"
6383 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6384 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6385 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6386 int main () { int i; for (i = 0; i < 256; i++)
6387 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
6391 if { (eval echo configure:6392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6395 echo "configure: failed program was:" >&5
6396 cat conftest.$ac_ext >&5
6398 ac_cv_header_stdc=no
6406 echo "$ac_t""$ac_cv_header_stdc" 1>&6
6407 if test $ac_cv_header_stdc = yes; then
6408 cat >> confdefs.h <<\EOF
6409 #define STDC_HEADERS 1
6414 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
6415 echo "configure:6416: checking whether time.h and sys/time.h may both be included" >&5
6416 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
6417 echo $ac_n "(cached) $ac_c" 1>&6
6419 cat > conftest.$ac_ext <<EOF
6420 #line 6421 "configure"
6421 #include "confdefs.h"
6422 #include <sys/types.h>
6423 #include <sys/time.h>
6429 if { (eval echo configure:6430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6431 ac_cv_header_time=yes
6433 echo "configure: failed program was:" >&5
6434 cat conftest.$ac_ext >&5
6436 ac_cv_header_time=no
6441 echo "$ac_t""$ac_cv_header_time" 1>&6
6442 if test $ac_cv_header_time = yes; then
6443 cat >> confdefs.h <<\EOF
6444 #define TIME_WITH_SYS_TIME 1
6460 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6461 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6462 echo "configure:6463: checking for $ac_hdr" >&5
6463 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6464 echo $ac_n "(cached) $ac_c" 1>&6
6466 cat > conftest.$ac_ext <<EOF
6467 #line 6468 "configure"
6468 #include "confdefs.h"
6471 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6472 { (eval echo configure:6473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6473 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6474 if test -z "$ac_err"; then
6476 eval "ac_cv_header_$ac_safe=yes"
6479 echo "configure: failed program was:" >&5
6480 cat conftest.$ac_ext >&5
6482 eval "ac_cv_header_$ac_safe=no"
6486 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6487 echo "$ac_t""yes" 1>&6
6488 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6489 cat >> confdefs.h <<EOF
6490 #define $ac_tr_hdr 1
6494 echo "$ac_t""no" 1>&6
6525 use_default_colors \
6532 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6533 echo "configure:6534: checking for $ac_func" >&5
6534 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6535 echo $ac_n "(cached) $ac_c" 1>&6
6537 cat > conftest.$ac_ext <<EOF
6538 #line 6539 "configure"
6539 #include "confdefs.h"
6540 /* System header to define __stub macros and hopefully few prototypes,
6541 which can conflict with char $ac_func(); below. */
6543 /* Override any gcc2 internal prototype to avoid an error. */
6544 /* We use char because int might match the return type of a gcc2
6545 builtin and then its argument prototype would still apply. */
6550 /* The GNU C library defines this for functions which it implements
6551 to always fail with ENOSYS. Some functions are actually named
6552 something starting with __ and the normal name is an alias. */
6553 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6561 if { (eval echo configure:6562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6563 eval "ac_cv_func_$ac_func=yes"
6565 echo "configure: failed program was:" >&5
6566 cat conftest.$ac_ext >&5
6568 eval "ac_cv_func_$ac_func=no"
6573 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6574 echo "$ac_t""yes" 1>&6
6575 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6576 cat >> confdefs.h <<EOF
6577 #define $ac_tr_func 1
6581 echo "$ac_t""no" 1>&6
6586 echo $ac_n "checking for ncurses extended functions""... $ac_c" 1>&6
6587 echo "configure:6588: checking for ncurses extended functions" >&5
6588 if eval "test \"`echo '$''{'cf_cv_ncurses_ext_funcs'+set}'`\" = set"; then
6589 echo $ac_n "(cached) $ac_c" 1>&6
6592 cat > conftest.$ac_ext <<EOF
6593 #line 6594 "configure"
6594 #include "confdefs.h"
6596 #include <${cf_cv_ncurses_header-curses.h}>
6599 (void) assume_default_colors (0, 0);
6600 (void) curses_version ();
6601 (void) define_key (0, 0);
6602 (void) is_term_resized (0, 0);
6603 (void) key_defined (0);
6604 (void) keybound (0, 0);
6605 (void) keyok (0, 0);
6606 (void) resize_term (0, 0);
6607 (void) resizeterm (0, 0);
6608 (void) use_default_colors ();
6609 (void) use_extended_names (0);
6610 (void) wresize (0, 0, 0);
6613 if { (eval echo configure:6614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6615 cf_cv_ncurses_ext_funcs=yes
6617 echo "configure: failed program was:" >&5
6618 cat conftest.$ac_ext >&5
6620 cf_cv_ncurses_ext_funcs=no
6626 echo "$ac_t""$cf_cv_ncurses_ext_funcs" 1>&6
6627 test "$cf_cv_ncurses_ext_funcs" != no && cat >> confdefs.h <<\EOF
6628 #define NCURSES_EXT_FUNCS 1
6632 echo $ac_n "checking for wide-character functions""... $ac_c" 1>&6
6633 echo "configure:6634: checking for wide-character functions" >&5
6634 if eval "test \"`echo '$''{'cf_cv_widechar_funcs'+set}'`\" = set"; then
6635 echo $ac_n "(cached) $ac_c" 1>&6
6638 cat > conftest.$ac_ext <<EOF
6639 #line 6640 "configure"
6640 #include "confdefs.h"
6642 #include <${cf_cv_ncurses_header-curses.h}>
6645 static wchar_t src_wchar[2];
6646 static cchar_t dst_cchar;
6647 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
6651 if { (eval echo configure:6652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6653 cf_cv_widechar_funcs=yes
6655 echo "configure: failed program was:" >&5
6656 cat conftest.$ac_ext >&5
6658 cf_cv_widechar_funcs=no
6664 echo "$ac_t""$cf_cv_widechar_funcs" 1>&6
6665 if test "$cf_cv_widechar_funcs" != no ; then
6666 cat >> confdefs.h <<\EOF
6667 #define USE_WIDEC_SUPPORT 1
6671 cat >> confdefs.h <<\EOF
6672 #define USE_WIDEC_SUPPORT 0
6678 echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
6679 echo "configure:6680: checking if sys/time.h works with sys/select.h" >&5
6680 if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
6681 echo $ac_n "(cached) $ac_c" 1>&6
6684 cat > conftest.$ac_ext <<EOF
6685 #line 6686 "configure"
6686 #include "confdefs.h"
6688 #include <sys/types.h>
6689 #ifdef HAVE_SYS_TIME_H
6690 #include <sys/time.h>
6692 #ifdef HAVE_SYS_SELECT_H
6693 #include <sys/select.h>
6700 if { (eval echo configure:6701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6702 cf_cv_sys_time_select=yes
6704 echo "configure: failed program was:" >&5
6705 cat conftest.$ac_ext >&5
6707 cf_cv_sys_time_select=no
6713 echo "$ac_t""$cf_cv_sys_time_select" 1>&6
6714 test "$cf_cv_sys_time_select" = yes && cat >> confdefs.h <<\EOF
6715 #define HAVE_SYS_TIME_SELECT 1
6720 echo $ac_n "checking for function curses_version""... $ac_c" 1>&6
6721 echo "configure:6722: checking for function curses_version" >&5
6722 if eval "test \"`echo '$''{'cf_cv_func_curses_version'+set}'`\" = set"; then
6723 echo $ac_n "(cached) $ac_c" 1>&6
6726 if test "$cross_compiling" = yes; then
6727 cf_cv_func_curses_version=unknown
6729 cat > conftest.$ac_ext <<EOF
6730 #line 6731 "configure"
6731 #include "confdefs.h"
6733 #include <${cf_cv_ncurses_header-curses.h}>
6737 sprintf(temp, "%s\n", curses_version());
6742 if { (eval echo configure:6743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6744 cf_cv_func_curses_version=yes
6747 echo "configure: failed program was:" >&5
6748 cat conftest.$ac_ext >&5
6750 cf_cv_func_curses_version=no
6759 echo "$ac_t""$cf_cv_func_curses_version" 1>&6
6760 test "$cf_cv_func_curses_version" = yes && cat >> confdefs.h <<\EOF
6761 #define HAVE_CURSES_VERSION 1
6766 echo $ac_n "checking for alternate character set array""... $ac_c" 1>&6
6767 echo "configure:6768: checking for alternate character set array" >&5
6768 if eval "test \"`echo '$''{'cf_cv_curses_acs_map'+set}'`\" = set"; then
6769 echo $ac_n "(cached) $ac_c" 1>&6
6772 cf_cv_curses_acs_map=unknown
6773 for name in acs_map _acs_map __acs_map _nc_acs_map
6775 cat > conftest.$ac_ext <<EOF
6776 #line 6777 "configure"
6777 #include "confdefs.h"
6779 #include <${cf_cv_ncurses_header-curses.h}>
6783 $name['k'] = ACS_PLUS
6787 if { (eval echo configure:6788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6789 cf_cv_curses_acs_map=$name; break
6791 echo "configure: failed program was:" >&5
6792 cat conftest.$ac_ext >&5
6799 echo "$ac_t""$cf_cv_curses_acs_map" 1>&6
6801 test "$cf_cv_curses_acs_map" != unknown && cat >> confdefs.h <<EOF
6802 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
6807 echo $ac_n "checking for wide alternate character set array""... $ac_c" 1>&6
6808 echo "configure:6809: checking for wide alternate character set array" >&5
6809 if eval "test \"`echo '$''{'cf_cv_curses_wacs_map'+set}'`\" = set"; then
6810 echo $ac_n "(cached) $ac_c" 1>&6
6813 cf_cv_curses_wacs_map=unknown
6814 for name in wacs_map _wacs_map __wacs_map _nc_wacs
6816 cat > conftest.$ac_ext <<EOF
6817 #line 6818 "configure"
6818 #include "confdefs.h"
6820 #ifndef _XOPEN_SOURCE_EXTENDED
6821 #define _XOPEN_SOURCE_EXTENDED
6823 #include <${cf_cv_ncurses_header-curses.h}>
6825 $name['k'] = *WACS_PLUS
6828 if { (eval echo configure:6829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6830 cf_cv_curses_wacs_map=$name
6833 echo "configure: failed program was:" >&5
6834 cat conftest.$ac_ext >&5
6840 echo "$ac_t""$cf_cv_curses_wacs_map" 1>&6
6843 echo $ac_n "checking for type attr_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
6844 echo "configure:6845: checking for type attr_t in ${cf_cv_ncurses_header-curses.h}" >&5
6845 cat > conftest.$ac_ext <<EOF
6846 #line 6847 "configure"
6847 #include "confdefs.h"
6849 #ifndef _XOPEN_SOURCE_EXTENDED
6850 #define _XOPEN_SOURCE_EXTENDED
6852 #include <${cf_cv_ncurses_header-curses.h}>
6859 if { (eval echo configure:6860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6863 echo "configure: failed program was:" >&5
6864 cat conftest.$ac_ext >&5
6869 echo "$ac_t""$cf_result" 1>&6
6870 if test $cf_result = yes ; then
6872 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6874 cat >> confdefs.h <<EOF
6875 #define $cf_result 1
6879 cat >> confdefs.h <<EOF
6886 echo $ac_n "checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
6887 echo "configure:6888: checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}" >&5
6888 cat > conftest.$ac_ext <<EOF
6889 #line 6890 "configure"
6890 #include "confdefs.h"
6892 #ifndef _XOPEN_SOURCE_EXTENDED
6893 #define _XOPEN_SOURCE_EXTENDED
6895 #include <${cf_cv_ncurses_header-curses.h}>
6902 if { (eval echo configure:6903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6906 echo "configure: failed program was:" >&5
6907 cat conftest.$ac_ext >&5
6912 echo "$ac_t""$cf_result" 1>&6
6913 if test $cf_result = yes ; then
6915 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6917 cat >> confdefs.h <<EOF
6918 #define $cf_result 1
6922 cat >> confdefs.h <<EOF
6923 #define mbstate_t long
6934 cat > confcache <<\EOF
6935 # This file is a shell script that caches the results of configure
6936 # tests run on this system so they can be shared between configure
6937 # scripts and configure runs. It is not useful on other systems.
6938 # If it contains results you don't want to keep, you may remove or edit it.
6940 # By default, configure uses ./config.cache as the cache file,
6941 # creating it if it does not exist already. You can give configure
6942 # the --cache-file=FILE option to use a different cache file; that is
6943 # what configure does when it calls configure scripts in
6944 # subdirectories, so they share the cache.
6945 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6946 # config.status only pays attention to the cache file if you give it the
6947 # --recheck option to rerun configure.
6950 # The following way of writing the cache mishandles newlines in values,
6951 # but we know of no workaround that is simple, portable, and efficient.
6952 # So, don't put newlines in cache variables' values.
6953 # Ultrix sh set writes to stderr and can't be redirected directly,
6954 # and sets the high bit in the cache file unless we assign to the vars.
6956 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6958 # `set' does not quote correctly, so add quotes (double-quote substitution
6959 # turns \\\\ into \\, and sed turns \\ into \).
6961 -e "s/'/'\\\\''/g" \
6962 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6965 # `set' quotes correctly as required by POSIX, so do not add quotes.
6966 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6969 if cmp -s $cache_file confcache; then
6972 if test -w $cache_file; then
6973 echo "updating cache $cache_file"
6974 cat confcache > $cache_file
6976 echo "not updating unwritable cache $cache_file"
6981 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6983 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6984 # Let make expand exec_prefix.
6985 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6987 # Any assignment to VPATH causes Sun make to only execute
6988 # the first set of double-colon rules, so remove it if not needed.
6989 # If there is a colon in the path, we need to keep it.
6990 if test "x$srcdir" = x.; then
6991 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6994 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6996 DEFS=-DHAVE_CONFIG_H
6998 # Without the "./", some shells look in PATH for config.status.
6999 : ${CONFIG_STATUS=./config.status}
7001 echo creating $CONFIG_STATUS
7002 rm -f $CONFIG_STATUS
7003 cat > $CONFIG_STATUS <<EOF
7005 # Generated automatically by configure.
7006 # Run this file to recreate the current configuration.
7007 # This directory was configured as follows,
7008 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7010 # $0 $ac_configure_args
7012 # Compiler output produced by configure, useful for debugging
7013 # configure, is in ./config.log if it exists.
7015 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7018 case "\$ac_option" in
7019 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7020 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7021 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7022 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7023 echo "$CONFIG_STATUS generated by autoconf version 2.13.20030927"
7025 -help | --help | --hel | --he | --h)
7026 echo "\$ac_cs_usage"; exit 0 ;;
7027 *) echo "\$ac_cs_usage"; exit 1 ;;
7031 ac_given_srcdir=$srcdir
7033 trap 'rm -fr `echo "Makefile ncurses_cfg.h:ncurses_tst.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7035 cat >> $CONFIG_STATUS <<EOF
7037 # Protect against being on the right side of a sed subst in config.status.
7038 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7039 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7043 s%@CFLAGS@%$CFLAGS%g
7044 s%@CPPFLAGS@%$CPPFLAGS%g
7045 s%@CXXFLAGS@%$CXXFLAGS%g
7046 s%@FFLAGS@%$FFLAGS%g
7048 s%@LDFLAGS@%$LDFLAGS%g
7050 s%@exec_prefix@%$exec_prefix%g
7051 s%@prefix@%$prefix%g
7052 s%@program_transform_name@%$program_transform_name%g
7053 s%@bindir@%$bindir%g
7054 s%@sbindir@%$sbindir%g
7055 s%@libexecdir@%$libexecdir%g
7056 s%@datadir@%$datadir%g
7057 s%@sysconfdir@%$sysconfdir%g
7058 s%@sharedstatedir@%$sharedstatedir%g
7059 s%@localstatedir@%$localstatedir%g
7060 s%@libdir@%$libdir%g
7061 s%@includedir@%$includedir%g
7062 s%@oldincludedir@%$oldincludedir%g
7063 s%@infodir@%$infodir%g
7064 s%@mandir@%$mandir%g
7066 s%@host_alias@%$host_alias%g
7067 s%@host_cpu@%$host_cpu%g
7068 s%@host_vendor@%$host_vendor%g
7069 s%@host_os@%$host_os%g
7070 s%@SET_MAKE@%$SET_MAKE%g
7074 s%@CC_G_OPT@%$CC_G_OPT%g
7075 s%@CC_SHARED_OPTS@%$CC_SHARED_OPTS%g
7076 s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g
7077 s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g
7078 s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
7079 s%@ECHO_LINK@%$ECHO_LINK%g
7081 s%@LDFLAGS_SHARED@%$LDFLAGS_SHARED%g
7082 s%@LD_MODEL@%$LD_MODEL%g
7083 s%@LD_SHARED_OPTS@%$LD_SHARED_OPTS%g
7084 s%@LIBTOOL@%$LIBTOOL%g
7085 s%@LIB_CLEAN@%$LIB_CLEAN%g
7086 s%@LIB_COMPILE@%$LIB_COMPILE%g
7087 s%@LIB_LINK@%$LIB_LINK%g
7088 s%@LINK_TESTS@%$LINK_TESTS%g
7090 s%@LINT_OPTS@%$LINT_OPTS%g
7091 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
7092 s%@MATH_LIB@%$MATH_LIB%g
7093 s%@TEST_ARGS@%$TEST_ARGS%g
7094 s%@TEST_DEPS@%$TEST_DEPS%g
7095 s%@TICS_LEAKS@%$TICS_LEAKS%g
7096 s%@TINFO_ARGS@%$TINFO_ARGS%g
7097 s%@cf_cv_abi_version@%$cf_cv_abi_version%g
7098 s%@cf_cv_rel_version@%$cf_cv_rel_version%g
7099 s%@EXEEXT@%$EXEEXT%g
7100 s%@OBJEXT@%$OBJEXT%g
7101 s%@EXTRA_CPPFLAGS@%$EXTRA_CPPFLAGS%g
7102 s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
7103 s%@X_CFLAGS@%$X_CFLAGS%g
7104 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
7105 s%@X_LIBS@%$X_LIBS%g
7106 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
7107 s%@XCURSES_CONFIG@%$XCURSES_CONFIG%g
7112 cat >> $CONFIG_STATUS <<\EOF
7114 # Split the substitutions into bite-sized pieces for seds with
7115 # small command number limits, like on Digital OSF/1 and HP-UX.
7116 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7117 ac_file=1 # Number of current file.
7118 ac_beg=1 # First line for current file.
7119 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7122 while $ac_more_lines; do
7123 if test $ac_beg -gt 1; then
7124 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7126 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7128 if test ! -s conftest.s$ac_file; then
7130 rm -f conftest.s$ac_file
7132 if test -z "$ac_sed_cmds"; then
7133 ac_sed_cmds="sed -f conftest.s$ac_file"
7135 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7137 ac_file=`expr $ac_file + 1`
7139 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7142 if test -z "$ac_sed_cmds"; then
7147 cat >> $CONFIG_STATUS <<EOF
7149 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
7151 cat >> $CONFIG_STATUS <<\EOF
7152 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7153 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7155 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7156 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7157 *) ac_file_in="${ac_file}.in" ;;
7160 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7162 # Remove last slash and all that follows it. Not all systems have dirname.
7163 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7164 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7165 # The file is in a subdirectory.
7166 test ! -d "$ac_dir" && mkdir "$ac_dir"
7167 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7168 # A "../" for each directory in $ac_dir_suffix.
7169 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7171 ac_dir_suffix= ac_dots=
7174 case "$ac_given_srcdir" in
7176 if test -z "$ac_dots"; then top_srcdir=.
7177 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7178 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7180 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7181 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7185 echo creating "$ac_file"
7187 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7189 *Makefile*) ac_comsub="1i\\
7190 # $configure_input" ;;
7194 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7196 s%@configure_input@%$configure_input%g
7197 s%@srcdir@%$srcdir%g
7198 s%@top_srcdir@%$top_srcdir%g
7199 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7203 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7204 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7206 # ac_d sets the value in "#define NAME VALUE" lines.
7207 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7208 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7211 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7212 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7213 ac_uB='\([ ]\)%\1#\2define\3'
7216 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7217 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7218 ac_eB='$%\1#\2define\3'
7222 if test "${CONFIG_HEADERS+set}" != set; then
7224 cat >> $CONFIG_STATUS <<EOF
7225 CONFIG_HEADERS="ncurses_cfg.h:ncurses_tst.hin"
7227 cat >> $CONFIG_STATUS <<\EOF
7229 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7230 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7232 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7233 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7234 *) ac_file_in="${ac_file}.in" ;;
7237 echo creating $ac_file
7239 rm -f conftest.frag conftest.in conftest.out
7240 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7241 cat $ac_file_inputs > conftest.in
7246 # Transform confdefs.h into a list of #define's. We won't use it as a sed
7247 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
7248 # be either 'cat' or 'sort'.
7249 cat confdefs.h >conftest.vals
7251 # Break up conftest.vals because some shells have a limit on
7252 # the size of here documents, and old seds have small limits too.
7255 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
7258 ac_lines=`grep -c . conftest.vals`
7259 # grep -c gives empty output for an empty file on some AIX systems.
7260 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7261 # Write chunks of a limited-size here document to conftest.frag.
7262 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
7263 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7264 echo 'CEOF' >> $CONFIG_STATUS
7265 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7267 mv conftest.tail conftest.vals
7271 # Run sed to substitute the contents of conftest.frag into conftest.in at the
7273 echo ' cat >> conftest.edit <<CEOF
7274 /@DEFS@/r conftest.frag
7277 sed -f conftest.edit conftest.in > conftest.out
7279 mv conftest.out conftest.in
7280 rm -f conftest.edit conftest.frag
7284 cat >> $CONFIG_STATUS <<\EOF
7285 rm -f conftest.frag conftest.h
7286 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7287 cat conftest.in >> conftest.h
7289 if cmp -s $ac_file conftest.h 2>/dev/null; then
7290 echo "$ac_file is unchanged"
7293 # Remove last slash and all that follows it. Not all systems have dirname.
7294 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7295 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7296 # The file is in a subdirectory.
7297 test ! -d "$ac_dir" && mkdir "$ac_dir"
7300 mv conftest.h $ac_file
7305 cat >> $CONFIG_STATUS <<EOF
7306 # Extra initialization commands, if any
7311 cat >> $CONFIG_STATUS <<\EOF
7312 # Extra commands, if any
7317 if test ! -d $srcdir/$cf_dir; then
7319 elif test -f $srcdir/$cf_dir/programs; then
7320 $AWK -f $srcdir/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
7325 cat >>Makefile <<TEST_EOF
7327 # These rules are generated so we do not rely on suffix rules, which do not
7328 # work consistently for different make-programs (the '\$(MODEL)/' confuses
7329 # some, and the '\$x' confuses others).
7331 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
7334 cat >>Makefile <<TEST_EOF
7336 \$(MODEL)/$N.o : $N.c \\
7339 @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) $N.c
7345 chmod +x $CONFIG_STATUS
7346 rm -fr confdefs* $ac_clean_files
7347 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1