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 $@ ... ;'
1238 TINFO_ARGS='$(LIBS_CURSES)'
1239 cf_cv_abi_version=""
1240 cf_cv_rel_version=""
1245 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1246 echo "configure:1247: checking for Cygwin environment" >&5
1247 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1248 echo $ac_n "(cached) $ac_c" 1>&6
1250 cat > conftest.$ac_ext <<EOF
1251 #line 1252 "configure"
1252 #include "confdefs.h"
1257 #define __CYGWIN__ __CYGWIN32__
1262 if { (eval echo configure:1263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1266 echo "configure: failed program was:" >&5
1267 cat conftest.$ac_ext >&5
1275 echo "$ac_t""$ac_cv_cygwin" 1>&6
1277 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1278 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1279 echo "configure:1280: checking for mingw32 environment" >&5
1280 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1281 echo $ac_n "(cached) $ac_c" 1>&6
1283 cat > conftest.$ac_ext <<EOF
1284 #line 1285 "configure"
1285 #include "confdefs.h"
1291 if { (eval echo configure:1292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1295 echo "configure: failed program was:" >&5
1296 cat conftest.$ac_ext >&5
1304 echo "$ac_t""$ac_cv_mingw32" 1>&6
1306 test "$ac_cv_mingw32" = yes && MINGW32=yes
1309 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1310 echo "configure:1311: checking for executable suffix" >&5
1311 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1312 echo $ac_n "(cached) $ac_c" 1>&6
1314 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1318 echo 'int main () { return 0; }' > conftest.$ac_ext
1320 if { (eval echo configure:1321: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1321 for file in conftest.*; do
1323 *.c | *.o | *.obj) ;;
1324 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1328 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1331 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1336 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1337 echo "$ac_t""${ac_cv_exeext}" 1>&6
1340 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1341 echo "configure:1342: checking for object suffix" >&5
1342 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1343 echo $ac_n "(cached) $ac_c" 1>&6
1346 echo 'int i = 1;' > conftest.$ac_ext
1347 if { (eval echo configure:1348: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1348 for ac_file in conftest.*; do
1351 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1355 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1360 echo "$ac_t""$ac_cv_objext" 1>&6
1361 OBJEXT=$ac_cv_objext
1362 ac_objext=$ac_cv_objext
1366 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1367 echo "configure:1368: checking for ${CC-cc} option to accept ANSI C" >&5
1368 if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
1369 echo $ac_n "(cached) $ac_c" 1>&6
1373 cf_save_CFLAGS="$CFLAGS"
1374 cf_save_CPPFLAGS="$CPPFLAGS"
1375 # Don't try gcc -ansi; that turns off useful extensions and
1376 # breaks some systems' header files.
1377 # AIX -qlanglvl=ansi
1378 # Ultrix and OSF/1 -std1
1379 # HP-UX -Aa -D_HPUX_SOURCE
1381 # UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
1382 for cf_arg in "-DCC_HAS_PROTOS" \
1387 "-Aa -D_HPUX_SOURCE" \
1394 cf_new_extra_cppflags=
1396 for cf_add_cflags in $cf_arg
1398 case $cf_fix_cppflags in
1400 case $cf_add_cflags in #(vi
1401 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1402 case $cf_add_cflags in
1404 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1406 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1407 && test -z "${cf_tst_cflags}" \
1408 && cf_fix_cppflags=yes
1410 if test $cf_fix_cppflags = yes ; then
1411 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1413 elif test "${cf_tst_cflags}" = "\"'" ; then
1414 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1420 *$cf_add_cflags) #(vi
1423 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1428 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1433 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1435 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1437 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1438 && test -z "${cf_tst_cflags}" \
1439 && cf_fix_cppflags=no
1444 if test -n "$cf_new_cflags" ; then
1446 CFLAGS="$CFLAGS $cf_new_cflags"
1449 if test -n "$cf_new_cppflags" ; then
1451 CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
1454 if test -n "$cf_new_extra_cppflags" ; then
1456 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1462 cat > conftest.$ac_ext <<EOF
1463 #line 1464 "configure"
1464 #include "confdefs.h"
1466 #ifndef CC_HAS_PROTOS
1467 #if !defined(__STDC__) || (__STDC__ != 1)
1474 int test (int i, double x);
1475 struct s1 {int (*f) (int a);};
1476 struct s2 {int (*f) (double a);};
1479 if { (eval echo configure:1480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1481 cf_cv_ansi_cc="$cf_arg"; break
1483 echo "configure: failed program was:" >&5
1484 cat conftest.$ac_ext >&5
1488 CFLAGS="$cf_save_CFLAGS"
1489 CPPFLAGS="$cf_save_CPPFLAGS"
1493 echo "$ac_t""$cf_cv_ansi_cc" 1>&6
1495 if test "$cf_cv_ansi_cc" != "no"; then
1496 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
1501 cf_new_extra_cppflags=
1503 for cf_add_cflags in $cf_cv_ansi_cc
1505 case $cf_fix_cppflags in
1507 case $cf_add_cflags in #(vi
1508 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1509 case $cf_add_cflags in
1511 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1513 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1514 && test -z "${cf_tst_cflags}" \
1515 && cf_fix_cppflags=yes
1517 if test $cf_fix_cppflags = yes ; then
1518 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1520 elif test "${cf_tst_cflags}" = "\"'" ; then
1521 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1527 *$cf_add_cflags) #(vi
1530 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1535 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1540 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1542 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1544 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1545 && test -z "${cf_tst_cflags}" \
1546 && cf_fix_cppflags=no
1551 if test -n "$cf_new_cflags" ; then
1553 CFLAGS="$CFLAGS $cf_new_cflags"
1556 if test -n "$cf_new_cppflags" ; then
1558 CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
1561 if test -n "$cf_new_extra_cppflags" ; then
1563 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1570 cat >> confdefs.h <<\EOF
1571 #define CC_HAS_PROTOS 1
1578 if test "$cf_cv_ansi_cc" = "no"; then
1579 { echo "configure: error: Your compiler does not appear to recognize prototypes.
1580 You have the following choices:
1581 a. adjust your compiler options
1582 b. get an up-to-date compiler
1583 c. use a wrapper such as unproto" 1>&2; exit 1; }
1589 if test "$GCC" = yes ; then
1590 echo $ac_n "checking version of $CC""... $ac_c" 1>&6
1591 echo "configure:1592: checking version of $CC" >&5
1592 GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1593 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1594 echo "$ac_t""$GCC_VERSION" 1>&6
1598 if ( test "$GCC" = yes || test "$GXX" = yes )
1600 echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
1601 echo "configure:1602: checking if you want to turn on gcc warnings" >&5
1603 # Check whether --enable-warnings or --disable-warnings was given.
1604 if test "${enable_warnings+set}" = set; then
1605 enableval="$enable_warnings"
1606 test "$enableval" != yes && enableval=no
1607 if test "$enableval" != "no" ; then
1618 echo "$ac_t""$with_warnings" 1>&6
1619 if test "$with_warnings" = "yes"
1626 if test "$GCC" = yes ; then
1629 echo $ac_n "checking if this is really Intel C compiler""... $ac_c" 1>&6
1630 echo "configure:1631: checking if this is really Intel C compiler" >&5
1631 cf_save_CFLAGS="$CFLAGS"
1632 CFLAGS="$CFLAGS -no-gcc"
1633 cat > conftest.$ac_ext <<EOF
1634 #line 1635 "configure"
1635 #include "confdefs.h"
1639 #ifdef __INTEL_COMPILER
1646 if { (eval echo configure:1647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1649 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
1652 echo "configure: failed program was:" >&5
1653 cat conftest.$ac_ext >&5
1656 CFLAGS="$cf_save_CFLAGS"
1657 echo "$ac_t""$INTEL_COMPILER" 1>&6
1663 cat > conftest.$ac_ext <<EOF
1664 #line 1665 "configure"
1665 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
1668 if test "$INTEL_COMPILER" = yes
1670 # The "-wdXXX" options suppress warnings:
1671 # remark #1419: external declaration in primary source file
1672 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
1673 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
1674 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
1675 # remark #193: zero used for undefined preprocessing identifier
1676 # remark #593: variable "curs_sb_left_arrow" was set but never used
1677 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
1678 # remark #869: parameter "tw" was never referenced
1679 # remark #981: operands are evaluated in unspecified order
1680 # warning #269: invalid format string conversion
1682 echo "checking for $CC warning options" 1>&6
1683 echo "configure:1684: checking for $CC warning options" >&5
1684 cf_save_CFLAGS="$CFLAGS"
1685 EXTRA_CFLAGS="-Wall"
1698 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
1699 if { (eval echo configure:1700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1700 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
1701 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
1704 CFLAGS="$cf_save_CFLAGS"
1706 elif test "$GCC" = yes
1708 echo "checking for $CC warning options" 1>&6
1709 echo "configure:1710: checking for $CC warning options" >&5
1710 cf_save_CFLAGS="$CFLAGS"
1711 EXTRA_CFLAGS="-W -Wall"
1713 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
1715 Wbad-function-cast \
1719 Wmissing-declarations \
1720 Wmissing-prototypes \
1724 Wstrict-prototypes \
1725 Wundef $cf_warn_CONST
1727 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
1728 if { (eval echo configure:1729: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1729 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
1730 case $cf_opt in #(vi
1732 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
1735 case $GCC_VERSION in
1737 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
1743 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
1746 CFLAGS="$cf_save_CFLAGS"
1756 if test "$GCC" = yes
1758 cat > conftest.i <<EOF
1760 #define GCC_PRINTF 0
1765 #ifndef GCC_NORETURN
1766 #define GCC_NORETURN /* nothing */
1769 #define GCC_UNUSED /* nothing */
1772 if test "$GCC" = yes
1774 echo "checking for $CC __attribute__ directives" 1>&6
1775 echo "configure:1776: checking for $CC __attribute__ directives" >&5
1776 cat > conftest.$ac_ext <<EOF
1777 #line 1778 "configure"
1778 #include "confdefs.h"
1779 #include "conftest.h"
1780 #include "conftest.i"
1782 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
1784 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
1787 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
1789 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
1791 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
1792 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
1793 extern void foo(void) GCC_NORETURN;
1794 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
1796 for cf_attribute in scanf printf unused noreturn
1799 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1801 cf_directive="__attribute__(($cf_attribute))"
1802 echo "checking for $CC $cf_directive" 1>&5
1803 case $cf_attribute in
1805 cat >conftest.h <<EOF
1806 #define GCC_$cf_ATTRIBUTE 1
1810 cat >conftest.h <<EOF
1811 #define GCC_$cf_ATTRIBUTE $cf_directive
1815 if { (eval echo configure:1816: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1816 test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
1817 cat conftest.h >>confdefs.h
1821 fgrep define conftest.i >>confdefs.h
1827 echo $ac_n "checking if $CC -U and -D options work together""... $ac_c" 1>&6
1828 echo "configure:1829: checking if $CC -U and -D options work together" >&5
1829 if eval "test \"`echo '$''{'cf_cv_cc_u_d_options'+set}'`\" = set"; then
1830 echo $ac_n "(cached) $ac_c" 1>&6
1833 cf_save_CPPFLAGS="$CPPFLAGS"
1834 CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
1835 cat > conftest.$ac_ext <<EOF
1836 #line 1837 "configure"
1837 #include "confdefs.h"
1842 make an undefined-error
1845 make a defined-error
1850 if { (eval echo configure:1851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1853 cf_cv_cc_u_d_options=yes
1855 echo "configure: failed program was:" >&5
1856 cat conftest.$ac_ext >&5
1859 cf_cv_cc_u_d_options=no
1862 CPPFLAGS="$cf_save_CPPFLAGS"
1866 echo "$ac_t""$cf_cv_cc_u_d_options" 1>&6
1873 cf_POSIX_C_SOURCE=199506L
1875 case $host_os in #(vi
1877 CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
1880 # 5.x headers associate
1881 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
1882 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
1883 cf_POSIX_C_SOURCE=200112L
1885 CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1888 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
1891 CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
1895 echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
1896 echo "configure:1897: checking if we must define _GNU_SOURCE" >&5
1897 if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
1898 echo $ac_n "(cached) $ac_c" 1>&6
1901 cat > conftest.$ac_ext <<EOF
1902 #line 1903 "configure"
1903 #include "confdefs.h"
1904 #include <sys/types.h>
1907 #ifndef _XOPEN_SOURCE
1912 if { (eval echo configure:1913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1916 echo "configure: failed program was:" >&5
1917 cat conftest.$ac_ext >&5
1920 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1921 cat > conftest.$ac_ext <<EOF
1922 #line 1923 "configure"
1923 #include "confdefs.h"
1924 #include <sys/types.h>
1927 #ifdef _XOPEN_SOURCE
1932 if { (eval echo configure:1933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1936 echo "configure: failed program was:" >&5
1937 cat conftest.$ac_ext >&5
1939 cf_cv_gnu_source=yes
1949 echo "$ac_t""$cf_cv_gnu_source" 1>&6
1950 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1954 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
1957 # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
1960 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
1963 CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
1966 CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
1969 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
1972 CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
1975 echo $ac_n "checking if we should define _XOPEN_SOURCE""... $ac_c" 1>&6
1976 echo "configure:1977: checking if we should define _XOPEN_SOURCE" >&5
1977 if eval "test \"`echo '$''{'cf_cv_xopen_source'+set}'`\" = set"; then
1978 echo $ac_n "(cached) $ac_c" 1>&6
1981 cat > conftest.$ac_ext <<EOF
1982 #line 1983 "configure"
1983 #include "confdefs.h"
1984 #include <sys/types.h>
1987 #ifndef _XOPEN_SOURCE
1992 if { (eval echo configure:1993: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1994 cf_cv_xopen_source=no
1996 echo "configure: failed program was:" >&5
1997 cat conftest.$ac_ext >&5
2000 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2001 cat > conftest.$ac_ext <<EOF
2002 #line 2003 "configure"
2003 #include "confdefs.h"
2004 #include <sys/types.h>
2007 #ifdef _XOPEN_SOURCE
2012 if { (eval echo configure:2013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2014 cf_cv_xopen_source=no
2016 echo "configure: failed program was:" >&5
2017 cat conftest.$ac_ext >&5
2019 cf_cv_xopen_source=$cf_XOPEN_SOURCE
2029 echo "$ac_t""$cf_cv_xopen_source" 1>&6
2030 if test "$cf_cv_xopen_source" != no ; then
2032 # remove _XOPEN_SOURCE symbol from $CFLAGS
2033 CFLAGS=`echo "$CFLAGS" | \
2034 sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
2035 -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
2038 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
2039 CPPFLAGS=`echo "$CPPFLAGS" | \
2040 sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
2041 -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
2043 test "$cf_cv_cc_u_d_options" = yes && \
2044 CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
2045 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
2048 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
2050 cf_save_CFLAGS="$CFLAGS"
2051 cf_save_CPPFLAGS="$CPPFLAGS"
2054 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
2055 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
2056 sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
2057 -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
2060 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
2061 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
2062 sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
2063 -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
2066 echo $ac_n "checking if we should define _POSIX_C_SOURCE""... $ac_c" 1>&6
2067 echo "configure:2068: checking if we should define _POSIX_C_SOURCE" >&5
2068 if eval "test \"`echo '$''{'cf_cv_posix_c_source'+set}'`\" = set"; then
2069 echo $ac_n "(cached) $ac_c" 1>&6
2073 echo "(line 2074) testing if the symbol is already defined go no further ..." 1>&5
2075 cat > conftest.$ac_ext <<EOF
2076 #line 2077 "configure"
2077 #include "confdefs.h"
2078 #include <sys/types.h>
2081 #ifndef _POSIX_C_SOURCE
2086 if { (eval echo configure:2087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2088 cf_cv_posix_c_source=no
2090 echo "configure: failed program was:" >&5
2091 cat conftest.$ac_ext >&5
2093 cf_want_posix_source=no
2094 case .$cf_POSIX_C_SOURCE in #(vi
2096 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2099 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2100 cf_want_posix_source=yes
2103 cf_want_posix_source=yes
2106 if test "$cf_want_posix_source" = yes ; then
2107 cat > conftest.$ac_ext <<EOF
2108 #line 2109 "configure"
2109 #include "confdefs.h"
2110 #include <sys/types.h>
2113 #ifdef _POSIX_SOURCE
2118 if { (eval echo configure:2119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2121 echo "configure: failed program was:" >&5
2122 cat conftest.$ac_ext >&5
2124 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
2129 echo "(line 2130) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
2131 CFLAGS="$cf_trim_CFLAGS"
2132 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
2134 echo "(line 2135) testing if the second compile does not leave our definition intact error ..." 1>&5
2136 cat > conftest.$ac_ext <<EOF
2137 #line 2138 "configure"
2138 #include "confdefs.h"
2139 #include <sys/types.h>
2142 #ifndef _POSIX_C_SOURCE
2147 if { (eval echo configure:2148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2150 echo "configure: failed program was:" >&5
2151 cat conftest.$ac_ext >&5
2153 cf_cv_posix_c_source=no
2156 CFLAGS="$cf_save_CFLAGS"
2157 CPPFLAGS="$cf_save_CPPFLAGS"
2164 echo "$ac_t""$cf_cv_posix_c_source" 1>&6
2166 if test "$cf_cv_posix_c_source" != no ; then
2167 CFLAGS="$cf_trim_CFLAGS"
2168 CPPFLAGS="$cf_trim_CPPFLAGS"
2169 if test "$cf_cv_cc_u_d_options" = yes ; then
2170 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
2171 sed -e 's/-D/-U/g' -e 's/=[^ ]*//g'`
2172 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
2174 CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
2184 # Check whether --with-curses-dir or --without-curses-dir was given.
2185 if test "${with_curses_dir+set}" = set; then
2186 withval="$with_curses_dir"
2188 if test "x$prefix" != xNONE; then
2189 cf_path_syntax="$prefix"
2191 cf_path_syntax="$ac_default_prefix"
2194 case ".$withval" in #(vi
2195 .\$\(*\)*|.\'*\'*) #(vi
2199 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2202 eval withval="$withval"
2203 case ".$withval" in #(vi
2205 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2210 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2213 { echo "configure: error: expected a pathname, not \"$withval\"" 1>&2; exit 1; }
2217 cf_cv_curses_dir=$withval
2225 # Check whether --with-5lib or --without-5lib was given.
2226 if test "${with_5lib+set}" = set; then
2227 withval="$with_5lib"
2228 LIBS="-L/usr/5lib $LIBS"
2229 CPPFLAGS="$CPPFLAGS -I/usr/5include"
2234 # Check whether --with-ncursesw or --without-ncursesw was given.
2235 if test "${with_ncursesw+set}" = set; then
2236 withval="$with_ncursesw"
2237 cf_cv_screen=ncursesw
2242 # Check whether --with-ncurses or --without-ncurses was given.
2243 if test "${with_ncurses+set}" = set; then
2244 withval="$with_ncurses"
2245 cf_cv_screen=ncurses
2250 # Check whether --with-pdcurses or --without-pdcurses was given.
2251 if test "${with_pdcurses+set}" = set; then
2252 withval="$with_pdcurses"
2253 cf_cv_screen=pdcurses
2261 case $cf_cv_screen in
2265 echo $ac_n "checking for extra include directories""... $ac_c" 1>&6
2266 echo "configure:2267: checking for extra include directories" >&5
2267 if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then
2268 echo $ac_n "(cached) $ac_c" 1>&6
2271 cf_cv_curses_incdir=no
2272 case $host_os in #(vi
2274 test -d /usr/include/curses_colr && \
2275 cf_cv_curses_incdir="-I/usr/include/curses_colr"
2278 test -d /usr/5lib && \
2279 test -d /usr/5include && \
2280 cf_cv_curses_incdir="-I/usr/5include"
2286 echo "$ac_t""$cf_cv_curses_incdir" 1>&6
2287 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$cf_cv_curses_incdir $CPPFLAGS"
2290 echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
2291 echo "configure:2292: checking if we have identified curses headers" >&5
2292 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
2293 echo $ac_n "(cached) $ac_c" 1>&6
2296 cf_cv_ncurses_header=none
2303 cat > conftest.$ac_ext <<EOF
2304 #line 2305 "configure"
2305 #include "confdefs.h"
2306 #include <${cf_header}>
2308 initscr(); tgoto("?", 0,0)
2311 if { (eval echo configure:2312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2313 cf_cv_ncurses_header=$cf_header; break
2315 echo "configure: failed program was:" >&5
2316 cat conftest.$ac_ext >&5
2323 echo "$ac_t""$cf_cv_ncurses_header" 1>&6
2325 if test "$cf_cv_ncurses_header" = none ; then
2326 { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
2329 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
2330 for ac_hdr in $cf_cv_ncurses_header
2332 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2333 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2334 echo "configure:2335: checking for $ac_hdr" >&5
2335 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2336 echo $ac_n "(cached) $ac_c" 1>&6
2338 cat > conftest.$ac_ext <<EOF
2339 #line 2340 "configure"
2340 #include "confdefs.h"
2343 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2344 { (eval echo configure:2345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2345 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2346 if test -z "$ac_err"; then
2348 eval "ac_cv_header_$ac_safe=yes"
2351 echo "configure: failed program was:" >&5
2352 cat conftest.$ac_ext >&5
2354 eval "ac_cv_header_$ac_safe=no"
2358 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2359 echo "$ac_t""yes" 1>&6
2360 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2361 cat >> confdefs.h <<EOF
2362 #define $ac_tr_hdr 1
2366 echo "$ac_t""no" 1>&6
2372 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
2373 echo "configure:2374: checking for terminfo header" >&5
2374 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
2375 echo $ac_n "(cached) $ac_c" 1>&6
2378 case ${cf_cv_ncurses_header} in #(vi
2379 */ncurses.h|*/ncursesw.h) #(vi
2380 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
2383 cf_term_header=term.h
2387 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
2389 cat > conftest.$ac_ext <<EOF
2390 #line 2391 "configure"
2391 #include "confdefs.h"
2393 #include <${cf_cv_ncurses_header-curses.h}>
2397 int x = auto_left_margin
2400 if { (eval echo configure:2401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2403 cf_cv_term_header="$cf_test"
2405 echo "configure: failed program was:" >&5
2406 cat conftest.$ac_ext >&5
2409 cf_cv_term_header=unknown
2413 test "$cf_cv_term_header" != unknown && break
2418 echo "$ac_t""$cf_cv_term_header" 1>&6
2420 # Set definitions to allow ifdef'ing to accommodate subdirectories
2422 case $cf_cv_term_header in # (vi
2424 cat >> confdefs.h <<\EOF
2425 #define HAVE_TERM_H 1
2431 case $cf_cv_term_header in # (vi
2432 ncurses/term.h) #(vi
2433 cat >> confdefs.h <<\EOF
2434 #define HAVE_NCURSES_TERM_H 1
2439 cat >> confdefs.h <<\EOF
2440 #define HAVE_NCURSESW_TERM_H 1
2448 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
2449 echo "configure:2450: checking for ncurses version" >&5
2450 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
2451 echo $ac_n "(cached) $ac_c" 1>&6
2454 cf_cv_ncurses_version=no
2457 if test "$cross_compiling" = yes; then
2460 # This will not work if the preprocessor splits the line after the
2461 # Autoconf token. The 'unproto' program does that.
2462 cat > conftest.$ac_ext <<EOF
2463 #include <${cf_cv_ncurses_header-curses.h}>
2465 #ifdef NCURSES_VERSION
2466 Autoconf NCURSES_VERSION
2474 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
2475 { (eval echo configure:2476: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
2476 if test -f conftest.out ; then
2477 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
2478 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
2483 cat > conftest.$ac_ext <<EOF
2484 #line 2485 "configure"
2485 #include "confdefs.h"
2487 #include <${cf_cv_ncurses_header-curses.h}>
2491 FILE *fp = fopen("$cf_tempfile", "w");
2492 #ifdef NCURSES_VERSION
2493 # ifdef NCURSES_VERSION_PATCH
2494 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
2496 fprintf(fp, "%s\n", NCURSES_VERSION);
2500 fprintf(fp, "old\n");
2508 if { (eval echo configure:2509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2511 cf_cv_ncurses_version=`cat $cf_tempfile`
2513 echo "configure: failed program was:" >&5
2514 cat conftest.$ac_ext >&5
2523 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
2524 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
2531 echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
2532 echo "configure:2533: checking if we have identified curses libraries" >&5
2533 cat > conftest.$ac_ext <<EOF
2534 #line 2535 "configure"
2535 #include "confdefs.h"
2536 #include <${cf_cv_ncurses_header-curses.h}>
2538 initscr(); tgoto("?", 0,0)
2541 if { (eval echo configure:2542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2545 echo "configure: failed program was:" >&5
2546 cat conftest.$ac_ext >&5
2551 echo "$ac_t""$cf_result" 1>&6
2553 if test "$cf_result" = no ; then
2554 case $host_os in #(vi
2556 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
2557 echo "configure:2558: checking for tgoto in -lmytinfo" >&5
2558 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
2559 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2560 echo $ac_n "(cached) $ac_c" 1>&6
2562 ac_save_LIBS="$LIBS"
2563 LIBS="-lmytinfo $LIBS"
2564 cat > conftest.$ac_ext <<EOF
2565 #line 2566 "configure"
2566 #include "confdefs.h"
2567 /* Override any gcc2 internal prototype to avoid an error. */
2568 /* We use char because int might match the return type of a gcc2
2569 builtin and then its argument prototype would still apply. */
2576 if { (eval echo configure:2577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2578 eval "ac_cv_lib_$ac_lib_var=yes"
2580 echo "configure: failed program was:" >&5
2581 cat conftest.$ac_ext >&5
2583 eval "ac_cv_lib_$ac_lib_var=no"
2586 LIBS="$ac_save_LIBS"
2589 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2590 echo "$ac_t""yes" 1>&6
2591 LIBS="-lmytinfo $LIBS"
2593 echo "$ac_t""no" 1>&6
2598 echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
2599 echo "configure:2600: checking for initscr in -lcur_colr" >&5
2600 ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
2601 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2602 echo $ac_n "(cached) $ac_c" 1>&6
2604 ac_save_LIBS="$LIBS"
2605 LIBS="-lcur_colr $LIBS"
2606 cat > conftest.$ac_ext <<EOF
2607 #line 2608 "configure"
2608 #include "confdefs.h"
2609 /* Override any gcc2 internal prototype to avoid an error. */
2610 /* We use char because int might match the return type of a gcc2
2611 builtin and then its argument prototype would still apply. */
2618 if { (eval echo configure:2619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2620 eval "ac_cv_lib_$ac_lib_var=yes"
2622 echo "configure: failed program was:" >&5
2623 cat conftest.$ac_ext >&5
2625 eval "ac_cv_lib_$ac_lib_var=no"
2628 LIBS="$ac_save_LIBS"
2631 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2632 echo "$ac_t""yes" 1>&6
2634 LIBS="-lcur_colr $LIBS"
2635 ac_cv_func_initscr=yes
2638 echo "$ac_t""no" 1>&6
2640 echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
2641 echo "configure:2642: checking for initscr in -lHcurses" >&5
2642 ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
2643 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2644 echo $ac_n "(cached) $ac_c" 1>&6
2646 ac_save_LIBS="$LIBS"
2647 LIBS="-lHcurses $LIBS"
2648 cat > conftest.$ac_ext <<EOF
2649 #line 2650 "configure"
2650 #include "confdefs.h"
2651 /* Override any gcc2 internal prototype to avoid an error. */
2652 /* We use char because int might match the return type of a gcc2
2653 builtin and then its argument prototype would still apply. */
2660 if { (eval echo configure:2661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2662 eval "ac_cv_lib_$ac_lib_var=yes"
2664 echo "configure: failed program was:" >&5
2665 cat conftest.$ac_ext >&5
2667 eval "ac_cv_lib_$ac_lib_var=no"
2670 LIBS="$ac_save_LIBS"
2673 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2674 echo "$ac_t""yes" 1>&6
2676 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
2677 LIBS="-lHcurses $LIBS"
2678 CPPFLAGS="-D__HP_CURSES -D_HP_CURSES $CPPFLAGS"
2679 ac_cv_func_initscr=yes
2682 echo "$ac_t""no" 1>&6
2688 linux*) # Suse Linux does not follow /usr/lib convention
2692 test -d /usr/5lib && \
2693 LIBS="$LIBS -L/usr/5lib -lcurses -ltermcap"
2694 ac_cv_func_initscr=yes
2698 if test ".$ac_cv_func_initscr" != .yes ; then
2699 cf_save_LIBS="$LIBS"
2703 if test ".${cf_cv_ncurses_version-no}" != .no
2705 cf_check_list="ncurses curses cursesX"
2707 cf_check_list="cursesX curses ncurses"
2710 # Check for library containing tgoto. Do this before curses library
2711 # because it may be needed to link the test-case for initscr.
2712 echo $ac_n "checking for tgoto""... $ac_c" 1>&6
2713 echo "configure:2714: checking for tgoto" >&5
2714 if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
2715 echo $ac_n "(cached) $ac_c" 1>&6
2717 cat > conftest.$ac_ext <<EOF
2718 #line 2719 "configure"
2719 #include "confdefs.h"
2720 /* System header to define __stub macros and hopefully few prototypes,
2721 which can conflict with char tgoto(); below. */
2723 /* Override any gcc2 internal prototype to avoid an error. */
2724 /* We use char because int might match the return type of a gcc2
2725 builtin and then its argument prototype would still apply. */
2730 /* The GNU C library defines this for functions which it implements
2731 to always fail with ENOSYS. Some functions are actually named
2732 something starting with __ and the normal name is an alias. */
2733 #if defined (__stub_tgoto) || defined (__stub___tgoto)
2741 if { (eval echo configure:2742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2743 eval "ac_cv_func_tgoto=yes"
2745 echo "configure: failed program was:" >&5
2746 cat conftest.$ac_ext >&5
2748 eval "ac_cv_func_tgoto=no"
2753 if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then
2754 echo "$ac_t""yes" 1>&6
2755 cf_term_lib=predefined
2757 echo "$ac_t""no" 1>&6
2759 for cf_term_lib in $cf_check_list termcap termlib unknown
2761 echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
2762 echo "configure:2763: checking for tgoto in -l$cf_term_lib" >&5
2763 ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
2764 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2765 echo $ac_n "(cached) $ac_c" 1>&6
2767 ac_save_LIBS="$LIBS"
2768 LIBS="-l$cf_term_lib $LIBS"
2769 cat > conftest.$ac_ext <<EOF
2770 #line 2771 "configure"
2771 #include "confdefs.h"
2772 /* Override any gcc2 internal prototype to avoid an error. */
2773 /* We use char because int might match the return type of a gcc2
2774 builtin and then its argument prototype would still apply. */
2781 if { (eval echo configure:2782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2783 eval "ac_cv_lib_$ac_lib_var=yes"
2785 echo "configure: failed program was:" >&5
2786 cat conftest.$ac_ext >&5
2788 eval "ac_cv_lib_$ac_lib_var=no"
2791 LIBS="$ac_save_LIBS"
2794 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2795 echo "$ac_t""yes" 1>&6
2798 echo "$ac_t""no" 1>&6
2806 # Check for library containing initscr
2807 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
2808 for cf_curs_lib in $cf_check_list xcurses jcurses unknown
2810 echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
2811 echo "configure:2812: checking for initscr in -l$cf_curs_lib" >&5
2812 ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
2813 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2814 echo $ac_n "(cached) $ac_c" 1>&6
2816 ac_save_LIBS="$LIBS"
2817 LIBS="-l$cf_curs_lib $LIBS"
2818 cat > conftest.$ac_ext <<EOF
2819 #line 2820 "configure"
2820 #include "confdefs.h"
2821 /* Override any gcc2 internal prototype to avoid an error. */
2822 /* We use char because int might match the return type of a gcc2
2823 builtin and then its argument prototype would still apply. */
2830 if { (eval echo configure:2831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2832 eval "ac_cv_lib_$ac_lib_var=yes"
2834 echo "configure: failed program was:" >&5
2835 cat conftest.$ac_ext >&5
2837 eval "ac_cv_lib_$ac_lib_var=no"
2840 LIBS="$ac_save_LIBS"
2843 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2844 echo "$ac_t""yes" 1>&6
2847 echo "$ac_t""no" 1>&6
2851 test $cf_curs_lib = unknown && { echo "configure: error: no curses library found" 1>&2; exit 1; }
2853 LIBS="-l$cf_curs_lib $cf_save_LIBS"
2854 if test "$cf_term_lib" = unknown ; then
2855 echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
2856 echo "configure:2857: checking if we can link with $cf_curs_lib library" >&5
2857 cat > conftest.$ac_ext <<EOF
2858 #line 2859 "configure"
2859 #include "confdefs.h"
2860 #include <${cf_cv_ncurses_header-curses.h}>
2865 if { (eval echo configure:2866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2869 echo "configure: failed program was:" >&5
2870 cat conftest.$ac_ext >&5
2875 echo "$ac_t""$cf_result" 1>&6
2876 test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; }
2877 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
2879 elif test "$cf_term_lib" != predefined ; then
2880 echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
2881 echo "configure:2882: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
2882 cat > conftest.$ac_ext <<EOF
2883 #line 2884 "configure"
2884 #include "confdefs.h"
2885 #include <${cf_cv_ncurses_header-curses.h}>
2887 initscr(); tgoto((char *)0, 0, 0);
2890 if { (eval echo configure:2891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2894 echo "configure: failed program was:" >&5
2895 cat conftest.$ac_ext >&5
2898 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
2899 cat > conftest.$ac_ext <<EOF
2900 #line 2901 "configure"
2901 #include "confdefs.h"
2902 #include <${cf_cv_ncurses_header-curses.h}>
2907 if { (eval echo configure:2908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2911 echo "configure: failed program was:" >&5
2912 cat conftest.$ac_ext >&5
2920 echo "$ac_t""$cf_result" 1>&6
2930 cf_ncuhdr_root=ncurses
2932 test -n "$cf_cv_curses_dir" && \
2933 test "$cf_cv_curses_dir" != "no" && \
2934 CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
2936 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
2937 echo "configure:2938: checking for $cf_ncuhdr_root header in include-path" >&5
2938 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
2939 echo $ac_n "(cached) $ac_c" 1>&6
2942 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
2943 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
2944 for cf_header in $cf_header_list
2947 cat > conftest.$ac_ext <<EOF
2948 #line 2949 "configure"
2949 #include "confdefs.h"
2952 #include <$cf_header>
2955 #ifdef NCURSES_VERSION
2957 printf("%s\n", NCURSES_VERSION);
2969 if { (eval echo configure:2970: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2971 cf_cv_ncurses_h=$cf_header
2974 echo "configure: failed program was:" >&5
2975 cat conftest.$ac_ext >&5
2981 test "$cf_cv_ncurses_h" != no && break
2986 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
2990 if test "$cf_cv_ncurses_h" != no ; then
2991 cf_cv_ncurses_header=$cf_cv_ncurses_h
2994 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
2995 echo "configure:2996: checking for $cf_ncuhdr_root include-path" >&5
2996 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
2997 echo $ac_n "(cached) $ac_c" 1>&6
3000 test -n "$verbose" && echo
3003 test -d "$HOME" && {
3004 test -n "$verbose" && echo " ... testing include-directories under $HOME"
3005 test -d "$HOME/include" && cf_search="$cf_search $HOME/include"
3006 test -d "$HOME/include/$cf_ncuhdr_root" && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
3007 test -d "$HOME/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
3010 # For other stuff under the home directory, it should be sufficient to put
3011 # a symbolic link for $HOME/$cf_ncuhdr_root to the actual package location:
3012 test -d "$HOME/$cf_ncuhdr_root" && {
3013 test -n "$verbose" && echo " ... testing include-directories under $HOME/$cf_ncuhdr_root"
3014 test -d "$HOME/$cf_ncuhdr_root/include" && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
3015 test -d "$HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3018 test "$prefix" != /usr/local && \
3019 test -d /usr/local && {
3020 test -n "$verbose" && echo " ... testing include-directories under /usr/local"
3021 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
3022 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
3023 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
3024 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
3025 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3028 test "$prefix" != NONE && \
3029 test -d $prefix && {
3030 test -n "$verbose" && echo " ... testing include-directories under $prefix"
3031 test -d $prefix/include && cf_search="$cf_search $prefix/include"
3032 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
3033 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
3034 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
3035 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3038 test "$prefix" != /opt && \
3040 test -n "$verbose" && echo " ... testing include-directories under /opt"
3041 test -d /opt/include && cf_search="$cf_search /opt/include"
3042 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
3043 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
3044 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
3045 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3048 test "$prefix" != /usr && \
3050 test -n "$verbose" && echo " ... testing include-directories under /usr"
3051 test -d /usr/include && cf_search="$cf_search /usr/include"
3052 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
3053 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
3054 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
3057 test "$includedir" != NONE && \
3058 test "$includedir" != "/usr/include" && \
3059 test -d "$includedir" && {
3060 test -d $includedir && cf_search="$cf_search $includedir"
3061 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
3064 test "$oldincludedir" != NONE && \
3065 test "$oldincludedir" != "/usr/include" && \
3066 test -d "$oldincludedir" && {
3067 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
3068 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
3072 test -n "$verbose" && echo search path $cf_search
3073 cf_save2_CPPFLAGS="$CPPFLAGS"
3074 for cf_incdir in $cf_search
3077 for cf_add_incdir in $cf_incdir
3081 case $cf_add_incdir in
3084 /usr/local/include) # (vi
3085 if test "$GCC" = yes
3087 cf_save_CPPFLAGS="$CPPFLAGS"
3088 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3089 cat > conftest.$ac_ext <<EOF
3090 #line 3091 "configure"
3091 #include "confdefs.h"
3097 if { (eval echo configure:3098: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3100 echo "configure: failed program was:" >&5
3101 cat conftest.$ac_ext >&5
3103 CPPFLAGS="$cf_save_CPPFLAGS"
3109 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3112 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3113 test "$cf_top_incdir" = "$cf_add_incdir" && break
3114 cf_add_incdir="$cf_top_incdir"
3123 cat > conftest.$ac_ext <<EOF
3124 #line 3125 "configure"
3125 #include "confdefs.h"
3128 #include <$cf_header>
3131 #ifdef NCURSES_VERSION
3133 printf("%s\n", NCURSES_VERSION);
3145 if { (eval echo configure:3146: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3147 cf_cv_ncurses_h2=$cf_header
3150 echo "configure: failed program was:" >&5
3151 cat conftest.$ac_ext >&5
3157 if test "$cf_cv_ncurses_h2" != no ; then
3158 cf_cv_ncurses_h2=$cf_incdir/$cf_header
3159 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
3162 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
3164 CPPFLAGS="$cf_save2_CPPFLAGS"
3165 test "$cf_cv_ncurses_h2" != no && break
3167 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
3171 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
3173 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
3174 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
3175 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
3176 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
3179 for cf_add_incdir in $cf_1st_incdir
3183 case $cf_add_incdir in
3186 /usr/local/include) # (vi
3187 if test "$GCC" = yes
3189 cf_save_CPPFLAGS="$CPPFLAGS"
3190 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3191 cat > conftest.$ac_ext <<EOF
3192 #line 3193 "configure"
3193 #include "confdefs.h"
3199 if { (eval echo configure:3200: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3202 echo "configure: failed program was:" >&5
3203 cat conftest.$ac_ext >&5
3205 CPPFLAGS="$cf_save_CPPFLAGS"
3211 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3214 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3215 test "$cf_top_incdir" = "$cf_add_incdir" && break
3216 cf_add_incdir="$cf_top_incdir"
3223 # Set definitions to allow ifdef'ing for ncurses.h
3225 case $cf_cv_ncurses_header in # (vi
3227 cat >> confdefs.h <<\EOF
3228 #define HAVE_NCURSES_H 1
3234 case $cf_cv_ncurses_header in # (vi
3235 ncurses/curses.h|ncurses/ncurses.h)
3236 cat >> confdefs.h <<\EOF
3237 #define HAVE_NCURSES_NCURSES_H 1
3241 ncursesw/curses.h|ncursesw/ncurses.h)
3242 cat >> confdefs.h <<\EOF
3243 #define HAVE_NCURSESW_NCURSES_H 1
3251 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
3252 echo "configure:3253: checking for terminfo header" >&5
3253 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
3254 echo $ac_n "(cached) $ac_c" 1>&6
3257 case ${cf_cv_ncurses_header} in #(vi
3258 */ncurses.h|*/ncursesw.h) #(vi
3259 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
3262 cf_term_header=term.h
3266 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
3268 cat > conftest.$ac_ext <<EOF
3269 #line 3270 "configure"
3270 #include "confdefs.h"
3272 #include <${cf_cv_ncurses_header-curses.h}>
3276 int x = auto_left_margin
3279 if { (eval echo configure:3280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3282 cf_cv_term_header="$cf_test"
3284 echo "configure: failed program was:" >&5
3285 cat conftest.$ac_ext >&5
3288 cf_cv_term_header=unknown
3292 test "$cf_cv_term_header" != unknown && break
3297 echo "$ac_t""$cf_cv_term_header" 1>&6
3299 # Set definitions to allow ifdef'ing to accommodate subdirectories
3301 case $cf_cv_term_header in # (vi
3303 cat >> confdefs.h <<\EOF
3304 #define HAVE_TERM_H 1
3310 case $cf_cv_term_header in # (vi
3311 ncurses/term.h) #(vi
3312 cat >> confdefs.h <<\EOF
3313 #define HAVE_NCURSES_TERM_H 1
3318 cat >> confdefs.h <<\EOF
3319 #define HAVE_NCURSESW_TERM_H 1
3326 # some applications need this, but should check for NCURSES_VERSION
3327 cat >> confdefs.h <<\EOF
3333 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
3334 echo "configure:3335: checking for ncurses version" >&5
3335 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
3336 echo $ac_n "(cached) $ac_c" 1>&6
3339 cf_cv_ncurses_version=no
3342 if test "$cross_compiling" = yes; then
3345 # This will not work if the preprocessor splits the line after the
3346 # Autoconf token. The 'unproto' program does that.
3347 cat > conftest.$ac_ext <<EOF
3348 #include <${cf_cv_ncurses_header-curses.h}>
3350 #ifdef NCURSES_VERSION
3351 Autoconf NCURSES_VERSION
3359 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
3360 { (eval echo configure:3361: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
3361 if test -f conftest.out ; then
3362 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
3363 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
3368 cat > conftest.$ac_ext <<EOF
3369 #line 3370 "configure"
3370 #include "confdefs.h"
3372 #include <${cf_cv_ncurses_header-curses.h}>
3376 FILE *fp = fopen("$cf_tempfile", "w");
3377 #ifdef NCURSES_VERSION
3378 # ifdef NCURSES_VERSION_PATCH
3379 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
3381 fprintf(fp, "%s\n", NCURSES_VERSION);
3385 fprintf(fp, "old\n");
3393 if { (eval echo configure:3394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3396 cf_cv_ncurses_version=`cat $cf_tempfile`
3398 echo "configure: failed program was:" >&5
3399 cat conftest.$ac_ext >&5
3408 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
3409 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
3417 cf_nculib_root=ncurses
3418 # This works, except for the special case where we find gpm, but
3419 # ncurses is in a nonstandard location via $LIBS, and we really want
3422 cf_ncurses_SAVE="$LIBS"
3423 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
3424 echo "configure:3425: checking for Gpm_Open in -lgpm" >&5
3425 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
3426 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3427 echo $ac_n "(cached) $ac_c" 1>&6
3429 ac_save_LIBS="$LIBS"
3431 cat > conftest.$ac_ext <<EOF
3432 #line 3433 "configure"
3433 #include "confdefs.h"
3434 /* Override any gcc2 internal prototype to avoid an error. */
3435 /* We use char because int might match the return type of a gcc2
3436 builtin and then its argument prototype would still apply. */
3443 if { (eval echo configure:3444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3445 eval "ac_cv_lib_$ac_lib_var=yes"
3447 echo "configure: failed program was:" >&5
3448 cat conftest.$ac_ext >&5
3450 eval "ac_cv_lib_$ac_lib_var=no"
3453 LIBS="$ac_save_LIBS"
3456 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3457 echo "$ac_t""yes" 1>&6
3458 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
3459 echo "configure:3460: checking for initscr in -lgpm" >&5
3460 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
3461 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3462 echo $ac_n "(cached) $ac_c" 1>&6
3464 ac_save_LIBS="$LIBS"
3466 cat > conftest.$ac_ext <<EOF
3467 #line 3468 "configure"
3468 #include "confdefs.h"
3469 /* Override any gcc2 internal prototype to avoid an error. */
3470 /* We use char because int might match the return type of a gcc2
3471 builtin and then its argument prototype would still apply. */
3478 if { (eval echo configure:3479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3480 eval "ac_cv_lib_$ac_lib_var=yes"
3482 echo "configure: failed program was:" >&5
3483 cat conftest.$ac_ext >&5
3485 eval "ac_cv_lib_$ac_lib_var=no"
3488 LIBS="$ac_save_LIBS"
3491 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3492 echo "$ac_t""yes" 1>&6
3493 LIBS="$cf_ncurses_SAVE"
3495 echo "$ac_t""no" 1>&6
3496 cf_ncurses_LIBS="-lgpm"
3500 echo "$ac_t""no" 1>&6
3504 case $host_os in #(vi
3506 # This is only necessary if you are linking against an obsolete
3507 # version of ncurses (but it should do no harm, since it's static).
3508 if test "$cf_nculib_root" = ncurses ; then
3509 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
3510 echo "configure:3511: checking for tgoto in -lmytinfo" >&5
3511 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
3512 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3513 echo $ac_n "(cached) $ac_c" 1>&6
3515 ac_save_LIBS="$LIBS"
3516 LIBS="-lmytinfo $LIBS"
3517 cat > conftest.$ac_ext <<EOF
3518 #line 3519 "configure"
3519 #include "confdefs.h"
3520 /* Override any gcc2 internal prototype to avoid an error. */
3521 /* We use char because int might match the return type of a gcc2
3522 builtin and then its argument prototype would still apply. */
3529 if { (eval echo configure:3530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3531 eval "ac_cv_lib_$ac_lib_var=yes"
3533 echo "configure: failed program was:" >&5
3534 cat conftest.$ac_ext >&5
3536 eval "ac_cv_lib_$ac_lib_var=no"
3539 LIBS="$ac_save_LIBS"
3542 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3543 echo "$ac_t""yes" 1>&6
3544 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
3546 echo "$ac_t""no" 1>&6
3553 LIBS="$cf_ncurses_LIBS $LIBS"
3555 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3557 LIBS="-L$cf_cv_curses_dir/lib -l$cf_nculib_root $LIBS"
3560 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
3562 echo $ac_n "checking for initscr""... $ac_c" 1>&6
3563 echo "configure:3564: checking for initscr" >&5
3564 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
3565 echo $ac_n "(cached) $ac_c" 1>&6
3567 cat > conftest.$ac_ext <<EOF
3568 #line 3569 "configure"
3569 #include "confdefs.h"
3570 /* System header to define __stub macros and hopefully few prototypes,
3571 which can conflict with char initscr(); below. */
3573 /* Override any gcc2 internal prototype to avoid an error. */
3574 /* We use char because int might match the return type of a gcc2
3575 builtin and then its argument prototype would still apply. */
3580 /* The GNU C library defines this for functions which it implements
3581 to always fail with ENOSYS. Some functions are actually named
3582 something starting with __ and the normal name is an alias. */
3583 #if defined (__stub_initscr) || defined (__stub___initscr)
3591 if { (eval echo configure:3592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3593 eval "ac_cv_func_initscr=yes"
3595 echo "configure: failed program was:" >&5
3596 cat conftest.$ac_ext >&5
3598 eval "ac_cv_func_initscr=no"
3603 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
3604 echo "$ac_t""yes" 1>&6
3605 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
3607 echo "$ac_t""no" 1>&6
3609 cf_save_LIBS="$LIBS"
3610 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
3611 echo "configure:3612: checking for initscr in -l$cf_nculib_root" >&5
3612 LIBS="-l$cf_nculib_root $LIBS"
3613 cat > conftest.$ac_ext <<EOF
3614 #line 3615 "configure"
3615 #include "confdefs.h"
3616 #include <${cf_cv_ncurses_header-curses.h}>
3621 if { (eval echo configure:3622: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3623 echo "$ac_t""yes" 1>&6
3624 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
3627 echo "configure: failed program was:" >&5
3628 cat conftest.$ac_ext >&5
3630 echo "$ac_t""no" 1>&6
3633 test -d "$HOME" && {
3634 test -n "$verbose" && echo " ... testing lib-directories under $HOME"
3635 test -d "$HOME/lib" && cf_search="$cf_search $HOME/lib"
3636 test -d "$HOME/lib/$cf_nculib_root" && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
3637 test -d "$HOME/lib/$cf_nculib_root/lib" && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
3640 # For other stuff under the home directory, it should be sufficient to put
3641 # a symbolic link for $HOME/$cf_nculib_root to the actual package location:
3642 test -d "$HOME/$cf_nculib_root" && {
3643 test -n "$verbose" && echo " ... testing lib-directories under $HOME/$cf_nculib_root"
3644 test -d "$HOME/$cf_nculib_root/lib" && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
3645 test -d "$HOME/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
3648 test "$prefix" != /usr/local && \
3649 test -d /usr/local && {
3650 test -n "$verbose" && echo " ... testing lib-directories under /usr/local"
3651 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
3652 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
3653 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
3654 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
3655 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
3658 test "$prefix" != NONE && \
3659 test -d $prefix && {
3660 test -n "$verbose" && echo " ... testing lib-directories under $prefix"
3661 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
3662 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
3663 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
3664 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
3665 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
3668 test "$prefix" != /opt && \
3670 test -n "$verbose" && echo " ... testing lib-directories under /opt"
3671 test -d /opt/lib && cf_search="$cf_search /opt/lib"
3672 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
3673 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
3674 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
3675 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
3678 test "$prefix" != /usr && \
3680 test -n "$verbose" && echo " ... testing lib-directories under /usr"
3681 test -d /usr/lib && cf_search="$cf_search /usr/lib"
3682 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
3683 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
3684 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
3687 for cf_libdir in $cf_search
3689 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
3690 echo "configure:3691: checking for -l$cf_nculib_root in $cf_libdir" >&5
3691 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
3692 cat > conftest.$ac_ext <<EOF
3693 #line 3694 "configure"
3694 #include "confdefs.h"
3695 #include <${cf_cv_ncurses_header-curses.h}>
3700 if { (eval echo configure:3701: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3702 echo "$ac_t""yes" 1>&6
3703 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
3706 echo "configure: failed program was:" >&5
3707 cat conftest.$ac_ext >&5
3709 echo "$ac_t""no" 1>&6
3710 LIBS="$cf_save_LIBS"
3720 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
3722 if test $cf_found_library = no ; then
3723 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
3729 if test -n "$cf_ncurses_LIBS" ; then
3730 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
3731 echo "configure:3732: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
3732 cf_ncurses_SAVE="$LIBS"
3733 for p in $cf_ncurses_LIBS ; do
3734 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
3735 if test "$q" != "$LIBS" ; then
3739 cat > conftest.$ac_ext <<EOF
3740 #line 3741 "configure"
3741 #include "confdefs.h"
3742 #include <${cf_cv_ncurses_header-curses.h}>
3744 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
3747 if { (eval echo configure:3748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3749 echo "$ac_t""yes" 1>&6
3751 echo "configure: failed program was:" >&5
3752 cat conftest.$ac_ext >&5
3754 echo "$ac_t""no" 1>&6
3755 LIBS="$cf_ncurses_SAVE"
3761 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3763 cat >> confdefs.h <<EOF
3764 #define $cf_nculib_ROOT 1
3772 echo $ac_n "checking for multibyte character support""... $ac_c" 1>&6
3773 echo "configure:3774: checking for multibyte character support" >&5
3774 if eval "test \"`echo '$''{'cf_cv_utf8_lib'+set}'`\" = set"; then
3775 echo $ac_n "(cached) $ac_c" 1>&6
3778 cf_save_LIBS="$LIBS"
3779 cat > conftest.$ac_ext <<EOF
3780 #line 3781 "configure"
3781 #include "confdefs.h"
3788 if { (eval echo configure:3789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3792 echo "configure: failed program was:" >&5
3793 cat conftest.$ac_ext >&5
3796 cat > conftest.$ac_ext <<EOF
3797 #line 3798 "configure"
3798 #include "confdefs.h"
3800 #include <libutf8.h>
3805 if { (eval echo configure:3806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3807 cf_cv_utf8_lib=add-on
3809 echo "configure: failed program was:" >&5
3810 cat conftest.$ac_ext >&5
3815 LIBS="$cf_save_LIBS"
3821 echo "$ac_t""$cf_cv_utf8_lib" 1>&6
3823 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
3825 if test "$cf_cv_utf8_lib" = "add-on" ; then
3826 cat >> confdefs.h <<\EOF
3827 #define HAVE_LIBUTF8_H 1
3835 cf_ncuhdr_root=ncursesw
3837 test -n "$cf_cv_curses_dir" && \
3838 test "$cf_cv_curses_dir" != "no" && \
3839 CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
3841 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
3842 echo "configure:3843: checking for $cf_ncuhdr_root header in include-path" >&5
3843 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
3844 echo $ac_n "(cached) $ac_c" 1>&6
3847 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
3848 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
3849 for cf_header in $cf_header_list
3852 cat > conftest.$ac_ext <<EOF
3853 #line 3854 "configure"
3854 #include "confdefs.h"
3857 #define _XOPEN_SOURCE_EXTENDED
3858 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
3859 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
3861 #include <$cf_header>
3864 #ifdef NCURSES_VERSION
3870 printf("%s\n", NCURSES_VERSION);
3882 if { (eval echo configure:3883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3884 cf_cv_ncurses_h=$cf_header
3887 echo "configure: failed program was:" >&5
3888 cat conftest.$ac_ext >&5
3894 test "$cf_cv_ncurses_h" != no && break
3899 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
3903 if test "$cf_cv_ncurses_h" != no ; then
3904 cf_cv_ncurses_header=$cf_cv_ncurses_h
3907 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
3908 echo "configure:3909: checking for $cf_ncuhdr_root include-path" >&5
3909 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
3910 echo $ac_n "(cached) $ac_c" 1>&6
3913 test -n "$verbose" && echo
3916 test -d "$HOME" && {
3917 test -n "$verbose" && echo " ... testing include-directories under $HOME"
3918 test -d "$HOME/include" && cf_search="$cf_search $HOME/include"
3919 test -d "$HOME/include/$cf_ncuhdr_root" && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
3920 test -d "$HOME/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
3923 # For other stuff under the home directory, it should be sufficient to put
3924 # a symbolic link for $HOME/$cf_ncuhdr_root to the actual package location:
3925 test -d "$HOME/$cf_ncuhdr_root" && {
3926 test -n "$verbose" && echo " ... testing include-directories under $HOME/$cf_ncuhdr_root"
3927 test -d "$HOME/$cf_ncuhdr_root/include" && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
3928 test -d "$HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3931 test "$prefix" != /usr/local && \
3932 test -d /usr/local && {
3933 test -n "$verbose" && echo " ... testing include-directories under /usr/local"
3934 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
3935 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
3936 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
3937 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
3938 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3941 test "$prefix" != NONE && \
3942 test -d $prefix && {
3943 test -n "$verbose" && echo " ... testing include-directories under $prefix"
3944 test -d $prefix/include && cf_search="$cf_search $prefix/include"
3945 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
3946 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
3947 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
3948 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3951 test "$prefix" != /opt && \
3953 test -n "$verbose" && echo " ... testing include-directories under /opt"
3954 test -d /opt/include && cf_search="$cf_search /opt/include"
3955 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
3956 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
3957 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
3958 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3961 test "$prefix" != /usr && \
3963 test -n "$verbose" && echo " ... testing include-directories under /usr"
3964 test -d /usr/include && cf_search="$cf_search /usr/include"
3965 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
3966 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
3967 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
3970 test "$includedir" != NONE && \
3971 test "$includedir" != "/usr/include" && \
3972 test -d "$includedir" && {
3973 test -d $includedir && cf_search="$cf_search $includedir"
3974 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
3977 test "$oldincludedir" != NONE && \
3978 test "$oldincludedir" != "/usr/include" && \
3979 test -d "$oldincludedir" && {
3980 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
3981 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
3985 test -n "$verbose" && echo search path $cf_search
3986 cf_save2_CPPFLAGS="$CPPFLAGS"
3987 for cf_incdir in $cf_search
3990 for cf_add_incdir in $cf_incdir
3994 case $cf_add_incdir in
3997 /usr/local/include) # (vi
3998 if test "$GCC" = yes
4000 cf_save_CPPFLAGS="$CPPFLAGS"
4001 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4002 cat > conftest.$ac_ext <<EOF
4003 #line 4004 "configure"
4004 #include "confdefs.h"
4010 if { (eval echo configure:4011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4013 echo "configure: failed program was:" >&5
4014 cat conftest.$ac_ext >&5
4016 CPPFLAGS="$cf_save_CPPFLAGS"
4022 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4025 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4026 test "$cf_top_incdir" = "$cf_add_incdir" && break
4027 cf_add_incdir="$cf_top_incdir"
4036 cat > conftest.$ac_ext <<EOF
4037 #line 4038 "configure"
4038 #include "confdefs.h"
4041 #include <$cf_header>
4044 #ifdef NCURSES_VERSION
4046 printf("%s\n", NCURSES_VERSION);
4058 if { (eval echo configure:4059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4060 cf_cv_ncurses_h2=$cf_header
4063 echo "configure: failed program was:" >&5
4064 cat conftest.$ac_ext >&5
4070 if test "$cf_cv_ncurses_h2" != no ; then
4071 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4072 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
4075 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
4077 CPPFLAGS="$cf_save2_CPPFLAGS"
4078 test "$cf_cv_ncurses_h2" != no && break
4080 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
4084 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
4086 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4087 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4088 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4089 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4092 for cf_add_incdir in $cf_1st_incdir
4096 case $cf_add_incdir in
4099 /usr/local/include) # (vi
4100 if test "$GCC" = yes
4102 cf_save_CPPFLAGS="$CPPFLAGS"
4103 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4104 cat > conftest.$ac_ext <<EOF
4105 #line 4106 "configure"
4106 #include "confdefs.h"
4112 if { (eval echo configure:4113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4115 echo "configure: failed program was:" >&5
4116 cat conftest.$ac_ext >&5
4118 CPPFLAGS="$cf_save_CPPFLAGS"
4124 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4127 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4128 test "$cf_top_incdir" = "$cf_add_incdir" && break
4129 cf_add_incdir="$cf_top_incdir"
4136 # Set definitions to allow ifdef'ing for ncurses.h
4138 case $cf_cv_ncurses_header in # (vi
4140 cat >> confdefs.h <<\EOF
4141 #define HAVE_NCURSES_H 1
4147 case $cf_cv_ncurses_header in # (vi
4148 ncurses/curses.h|ncurses/ncurses.h)
4149 cat >> confdefs.h <<\EOF
4150 #define HAVE_NCURSES_NCURSES_H 1
4154 ncursesw/curses.h|ncursesw/ncurses.h)
4155 cat >> confdefs.h <<\EOF
4156 #define HAVE_NCURSESW_NCURSES_H 1
4164 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
4165 echo "configure:4166: checking for terminfo header" >&5
4166 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
4167 echo $ac_n "(cached) $ac_c" 1>&6
4170 case ${cf_cv_ncurses_header} in #(vi
4171 */ncurses.h|*/ncursesw.h) #(vi
4172 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4175 cf_term_header=term.h
4179 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4181 cat > conftest.$ac_ext <<EOF
4182 #line 4183 "configure"
4183 #include "confdefs.h"
4185 #include <${cf_cv_ncurses_header-curses.h}>
4189 int x = auto_left_margin
4192 if { (eval echo configure:4193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4195 cf_cv_term_header="$cf_test"
4197 echo "configure: failed program was:" >&5
4198 cat conftest.$ac_ext >&5
4201 cf_cv_term_header=unknown
4205 test "$cf_cv_term_header" != unknown && break
4210 echo "$ac_t""$cf_cv_term_header" 1>&6
4212 # Set definitions to allow ifdef'ing to accommodate subdirectories
4214 case $cf_cv_term_header in # (vi
4216 cat >> confdefs.h <<\EOF
4217 #define HAVE_TERM_H 1
4223 case $cf_cv_term_header in # (vi
4224 ncurses/term.h) #(vi
4225 cat >> confdefs.h <<\EOF
4226 #define HAVE_NCURSES_TERM_H 1
4231 cat >> confdefs.h <<\EOF
4232 #define HAVE_NCURSESW_TERM_H 1
4239 # some applications need this, but should check for NCURSES_VERSION
4240 cat >> confdefs.h <<\EOF
4246 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
4247 echo "configure:4248: checking for ncurses version" >&5
4248 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
4249 echo $ac_n "(cached) $ac_c" 1>&6
4252 cf_cv_ncurses_version=no
4255 if test "$cross_compiling" = yes; then
4258 # This will not work if the preprocessor splits the line after the
4259 # Autoconf token. The 'unproto' program does that.
4260 cat > conftest.$ac_ext <<EOF
4261 #include <${cf_cv_ncurses_header-curses.h}>
4263 #ifdef NCURSES_VERSION
4264 Autoconf NCURSES_VERSION
4272 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4273 { (eval echo configure:4274: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
4274 if test -f conftest.out ; then
4275 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4276 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4281 cat > conftest.$ac_ext <<EOF
4282 #line 4283 "configure"
4283 #include "confdefs.h"
4285 #include <${cf_cv_ncurses_header-curses.h}>
4289 FILE *fp = fopen("$cf_tempfile", "w");
4290 #ifdef NCURSES_VERSION
4291 # ifdef NCURSES_VERSION_PATCH
4292 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4294 fprintf(fp, "%s\n", NCURSES_VERSION);
4298 fprintf(fp, "old\n");
4306 if { (eval echo configure:4307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4309 cf_cv_ncurses_version=`cat $cf_tempfile`
4311 echo "configure: failed program was:" >&5
4312 cat conftest.$ac_ext >&5
4321 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
4322 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
4330 cf_nculib_root=ncursesw
4331 # This works, except for the special case where we find gpm, but
4332 # ncurses is in a nonstandard location via $LIBS, and we really want
4335 cf_ncurses_SAVE="$LIBS"
4336 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
4337 echo "configure:4338: checking for Gpm_Open in -lgpm" >&5
4338 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
4339 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4340 echo $ac_n "(cached) $ac_c" 1>&6
4342 ac_save_LIBS="$LIBS"
4344 cat > conftest.$ac_ext <<EOF
4345 #line 4346 "configure"
4346 #include "confdefs.h"
4347 /* Override any gcc2 internal prototype to avoid an error. */
4348 /* We use char because int might match the return type of a gcc2
4349 builtin and then its argument prototype would still apply. */
4356 if { (eval echo configure:4357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4358 eval "ac_cv_lib_$ac_lib_var=yes"
4360 echo "configure: failed program was:" >&5
4361 cat conftest.$ac_ext >&5
4363 eval "ac_cv_lib_$ac_lib_var=no"
4366 LIBS="$ac_save_LIBS"
4369 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4370 echo "$ac_t""yes" 1>&6
4371 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
4372 echo "configure:4373: checking for initscr in -lgpm" >&5
4373 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
4374 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4375 echo $ac_n "(cached) $ac_c" 1>&6
4377 ac_save_LIBS="$LIBS"
4379 cat > conftest.$ac_ext <<EOF
4380 #line 4381 "configure"
4381 #include "confdefs.h"
4382 /* Override any gcc2 internal prototype to avoid an error. */
4383 /* We use char because int might match the return type of a gcc2
4384 builtin and then its argument prototype would still apply. */
4391 if { (eval echo configure:4392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4393 eval "ac_cv_lib_$ac_lib_var=yes"
4395 echo "configure: failed program was:" >&5
4396 cat conftest.$ac_ext >&5
4398 eval "ac_cv_lib_$ac_lib_var=no"
4401 LIBS="$ac_save_LIBS"
4404 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4405 echo "$ac_t""yes" 1>&6
4406 LIBS="$cf_ncurses_SAVE"
4408 echo "$ac_t""no" 1>&6
4409 cf_ncurses_LIBS="-lgpm"
4413 echo "$ac_t""no" 1>&6
4417 case $host_os in #(vi
4419 # This is only necessary if you are linking against an obsolete
4420 # version of ncurses (but it should do no harm, since it's static).
4421 if test "$cf_nculib_root" = ncurses ; then
4422 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
4423 echo "configure:4424: checking for tgoto in -lmytinfo" >&5
4424 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
4425 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4426 echo $ac_n "(cached) $ac_c" 1>&6
4428 ac_save_LIBS="$LIBS"
4429 LIBS="-lmytinfo $LIBS"
4430 cat > conftest.$ac_ext <<EOF
4431 #line 4432 "configure"
4432 #include "confdefs.h"
4433 /* Override any gcc2 internal prototype to avoid an error. */
4434 /* We use char because int might match the return type of a gcc2
4435 builtin and then its argument prototype would still apply. */
4442 if { (eval echo configure:4443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4444 eval "ac_cv_lib_$ac_lib_var=yes"
4446 echo "configure: failed program was:" >&5
4447 cat conftest.$ac_ext >&5
4449 eval "ac_cv_lib_$ac_lib_var=no"
4452 LIBS="$ac_save_LIBS"
4455 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4456 echo "$ac_t""yes" 1>&6
4457 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
4459 echo "$ac_t""no" 1>&6
4466 LIBS="$cf_ncurses_LIBS $LIBS"
4468 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4470 LIBS="-L$cf_cv_curses_dir/lib -l$cf_nculib_root $LIBS"
4473 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
4475 echo $ac_n "checking for initscr""... $ac_c" 1>&6
4476 echo "configure:4477: checking for initscr" >&5
4477 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
4478 echo $ac_n "(cached) $ac_c" 1>&6
4480 cat > conftest.$ac_ext <<EOF
4481 #line 4482 "configure"
4482 #include "confdefs.h"
4483 /* System header to define __stub macros and hopefully few prototypes,
4484 which can conflict with char initscr(); below. */
4486 /* Override any gcc2 internal prototype to avoid an error. */
4487 /* We use char because int might match the return type of a gcc2
4488 builtin and then its argument prototype would still apply. */
4493 /* The GNU C library defines this for functions which it implements
4494 to always fail with ENOSYS. Some functions are actually named
4495 something starting with __ and the normal name is an alias. */
4496 #if defined (__stub_initscr) || defined (__stub___initscr)
4504 if { (eval echo configure:4505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4506 eval "ac_cv_func_initscr=yes"
4508 echo "configure: failed program was:" >&5
4509 cat conftest.$ac_ext >&5
4511 eval "ac_cv_func_initscr=no"
4516 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
4517 echo "$ac_t""yes" 1>&6
4518 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4520 echo "$ac_t""no" 1>&6
4522 cf_save_LIBS="$LIBS"
4523 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
4524 echo "configure:4525: checking for initscr in -l$cf_nculib_root" >&5
4525 LIBS="-l$cf_nculib_root $LIBS"
4526 cat > conftest.$ac_ext <<EOF
4527 #line 4528 "configure"
4528 #include "confdefs.h"
4529 #include <${cf_cv_ncurses_header-curses.h}>
4534 if { (eval echo configure:4535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4536 echo "$ac_t""yes" 1>&6
4537 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4540 echo "configure: failed program was:" >&5
4541 cat conftest.$ac_ext >&5
4543 echo "$ac_t""no" 1>&6
4546 test -d "$HOME" && {
4547 test -n "$verbose" && echo " ... testing lib-directories under $HOME"
4548 test -d "$HOME/lib" && cf_search="$cf_search $HOME/lib"
4549 test -d "$HOME/lib/$cf_nculib_root" && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
4550 test -d "$HOME/lib/$cf_nculib_root/lib" && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
4553 # For other stuff under the home directory, it should be sufficient to put
4554 # a symbolic link for $HOME/$cf_nculib_root to the actual package location:
4555 test -d "$HOME/$cf_nculib_root" && {
4556 test -n "$verbose" && echo " ... testing lib-directories under $HOME/$cf_nculib_root"
4557 test -d "$HOME/$cf_nculib_root/lib" && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
4558 test -d "$HOME/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
4561 test "$prefix" != /usr/local && \
4562 test -d /usr/local && {
4563 test -n "$verbose" && echo " ... testing lib-directories under /usr/local"
4564 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
4565 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
4566 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
4567 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
4568 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
4571 test "$prefix" != NONE && \
4572 test -d $prefix && {
4573 test -n "$verbose" && echo " ... testing lib-directories under $prefix"
4574 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
4575 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
4576 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
4577 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
4578 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
4581 test "$prefix" != /opt && \
4583 test -n "$verbose" && echo " ... testing lib-directories under /opt"
4584 test -d /opt/lib && cf_search="$cf_search /opt/lib"
4585 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
4586 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
4587 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
4588 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
4591 test "$prefix" != /usr && \
4593 test -n "$verbose" && echo " ... testing lib-directories under /usr"
4594 test -d /usr/lib && cf_search="$cf_search /usr/lib"
4595 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
4596 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
4597 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
4600 for cf_libdir in $cf_search
4602 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
4603 echo "configure:4604: checking for -l$cf_nculib_root in $cf_libdir" >&5
4604 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
4605 cat > conftest.$ac_ext <<EOF
4606 #line 4607 "configure"
4607 #include "confdefs.h"
4608 #include <${cf_cv_ncurses_header-curses.h}>
4613 if { (eval echo configure:4614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4615 echo "$ac_t""yes" 1>&6
4616 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4619 echo "configure: failed program was:" >&5
4620 cat conftest.$ac_ext >&5
4622 echo "$ac_t""no" 1>&6
4623 LIBS="$cf_save_LIBS"
4633 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
4635 if test $cf_found_library = no ; then
4636 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
4642 if test -n "$cf_ncurses_LIBS" ; then
4643 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
4644 echo "configure:4645: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
4645 cf_ncurses_SAVE="$LIBS"
4646 for p in $cf_ncurses_LIBS ; do
4647 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
4648 if test "$q" != "$LIBS" ; then
4652 cat > conftest.$ac_ext <<EOF
4653 #line 4654 "configure"
4654 #include "confdefs.h"
4655 #include <${cf_cv_ncurses_header-curses.h}>
4657 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
4660 if { (eval echo configure:4661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4662 echo "$ac_t""yes" 1>&6
4664 echo "configure: failed program was:" >&5
4665 cat conftest.$ac_ext >&5
4667 echo "$ac_t""no" 1>&6
4668 LIBS="$cf_ncurses_SAVE"
4674 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4676 cat >> confdefs.h <<EOF
4677 #define $cf_nculib_ROOT 1
4683 if test "$no_x" = yes; then
4684 # Not all programs may use this symbol, but it does not hurt to define it.
4685 cat >> confdefs.h <<\EOF
4686 #define X_DISPLAY_MISSING 1
4689 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
4691 if test -n "$x_includes"; then
4692 X_CFLAGS="$X_CFLAGS -I$x_includes"
4695 # It would also be nice to do this for all -L options, not just this one.
4696 if test -n "$x_libraries"; then
4697 X_LIBS="$X_LIBS -L$x_libraries"
4698 # For Solaris; some versions of Sun CC require a space after -R and
4699 # others require no space. Words are not sufficient . . . .
4700 case "`(uname -sr) 2>/dev/null`" in
4702 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
4703 echo "configure:4704: checking whether -R must be followed by a space" >&5
4704 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
4705 cat > conftest.$ac_ext <<EOF
4706 #line 4707 "configure"
4707 #include "confdefs.h"
4713 if { (eval echo configure:4714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4717 echo "configure: failed program was:" >&5
4718 cat conftest.$ac_ext >&5
4723 if test $ac_R_nospace = yes; then
4724 echo "$ac_t""no" 1>&6
4725 X_LIBS="$X_LIBS -R$x_libraries"
4727 LIBS="$ac_xsave_LIBS -R $x_libraries"
4728 cat > conftest.$ac_ext <<EOF
4729 #line 4730 "configure"
4730 #include "confdefs.h"
4736 if { (eval echo configure:4737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4740 echo "configure: failed program was:" >&5
4741 cat conftest.$ac_ext >&5
4746 if test $ac_R_space = yes; then
4747 echo "$ac_t""yes" 1>&6
4748 X_LIBS="$X_LIBS -R $x_libraries"
4750 echo "$ac_t""neither works" 1>&6
4753 LIBS="$ac_xsave_LIBS"
4757 # Check for system-dependent libraries X programs must link with.
4758 # Do this before checking for the system-independent R6 libraries
4759 # (-lICE), since we may need -lsocket or whatever for X linking.
4761 if test "$ISC" = yes; then
4762 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4764 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
4765 # libraries were built with DECnet support. And karl@cs.umb.edu says
4766 # the Alpha needs dnet_stub (dnet does not exist).
4767 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
4768 echo "configure:4769: checking for dnet_ntoa in -ldnet" >&5
4769 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4770 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4771 echo $ac_n "(cached) $ac_c" 1>&6
4773 ac_save_LIBS="$LIBS"
4775 cat > conftest.$ac_ext <<EOF
4776 #line 4777 "configure"
4777 #include "confdefs.h"
4778 /* Override any gcc2 internal prototype to avoid an error. */
4779 /* We use char because int might match the return type of a gcc2
4780 builtin and then its argument prototype would still apply. */
4787 if { (eval echo configure:4788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4789 eval "ac_cv_lib_$ac_lib_var=yes"
4791 echo "configure: failed program was:" >&5
4792 cat conftest.$ac_ext >&5
4794 eval "ac_cv_lib_$ac_lib_var=no"
4797 LIBS="$ac_save_LIBS"
4800 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4801 echo "$ac_t""yes" 1>&6
4802 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
4804 echo "$ac_t""no" 1>&6
4807 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
4808 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
4809 echo "configure:4810: checking for dnet_ntoa in -ldnet_stub" >&5
4810 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
4811 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4812 echo $ac_n "(cached) $ac_c" 1>&6
4814 ac_save_LIBS="$LIBS"
4815 LIBS="-ldnet_stub $LIBS"
4816 cat > conftest.$ac_ext <<EOF
4817 #line 4818 "configure"
4818 #include "confdefs.h"
4819 /* Override any gcc2 internal prototype to avoid an error. */
4820 /* We use char because int might match the return type of a gcc2
4821 builtin and then its argument prototype would still apply. */
4828 if { (eval echo configure:4829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4830 eval "ac_cv_lib_$ac_lib_var=yes"
4832 echo "configure: failed program was:" >&5
4833 cat conftest.$ac_ext >&5
4835 eval "ac_cv_lib_$ac_lib_var=no"
4838 LIBS="$ac_save_LIBS"
4841 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4842 echo "$ac_t""yes" 1>&6
4843 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
4845 echo "$ac_t""no" 1>&6
4850 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
4851 # to get the SysV transport functions.
4852 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
4854 # The nsl library prevents programs from opening the X display
4855 # on Irix 5.2, according to dickey@clark.net.
4856 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
4857 echo "configure:4858: checking for gethostbyname" >&5
4858 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
4859 echo $ac_n "(cached) $ac_c" 1>&6
4861 cat > conftest.$ac_ext <<EOF
4862 #line 4863 "configure"
4863 #include "confdefs.h"
4864 /* System header to define __stub macros and hopefully few prototypes,
4865 which can conflict with char gethostbyname(); below. */
4867 /* Override any gcc2 internal prototype to avoid an error. */
4868 /* We use char because int might match the return type of a gcc2
4869 builtin and then its argument prototype would still apply. */
4870 char gethostbyname();
4874 /* The GNU C library defines this for functions which it implements
4875 to always fail with ENOSYS. Some functions are actually named
4876 something starting with __ and the normal name is an alias. */
4877 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4885 if { (eval echo configure:4886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4887 eval "ac_cv_func_gethostbyname=yes"
4889 echo "configure: failed program was:" >&5
4890 cat conftest.$ac_ext >&5
4892 eval "ac_cv_func_gethostbyname=no"
4897 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
4898 echo "$ac_t""yes" 1>&6
4901 echo "$ac_t""no" 1>&6
4904 if test $ac_cv_func_gethostbyname = no; then
4905 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
4906 echo "configure:4907: checking for gethostbyname in -lnsl" >&5
4907 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
4908 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4909 echo $ac_n "(cached) $ac_c" 1>&6
4911 ac_save_LIBS="$LIBS"
4913 cat > conftest.$ac_ext <<EOF
4914 #line 4915 "configure"
4915 #include "confdefs.h"
4916 /* Override any gcc2 internal prototype to avoid an error. */
4917 /* We use char because int might match the return type of a gcc2
4918 builtin and then its argument prototype would still apply. */
4919 char gethostbyname();
4925 if { (eval echo configure:4926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4927 eval "ac_cv_lib_$ac_lib_var=yes"
4929 echo "configure: failed program was:" >&5
4930 cat conftest.$ac_ext >&5
4932 eval "ac_cv_lib_$ac_lib_var=no"
4935 LIBS="$ac_save_LIBS"
4938 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4939 echo "$ac_t""yes" 1>&6
4940 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
4942 echo "$ac_t""no" 1>&6
4947 # lieder@skyler.mavd.honeywell.com says without -lsocket,
4948 # socket/setsockopt and other routines are undefined under SCO ODT
4949 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
4950 # on later versions), says simon@lia.di.epfl.ch: it contains
4951 # gethostby* variants that don't use the nameserver (or something).
4952 # -lsocket must be given before -lnsl if both are needed.
4953 # We assume that if connect needs -lnsl, so does gethostbyname.
4954 echo $ac_n "checking for connect""... $ac_c" 1>&6
4955 echo "configure:4956: checking for connect" >&5
4956 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
4957 echo $ac_n "(cached) $ac_c" 1>&6
4959 cat > conftest.$ac_ext <<EOF
4960 #line 4961 "configure"
4961 #include "confdefs.h"
4962 /* System header to define __stub macros and hopefully few prototypes,
4963 which can conflict with char connect(); below. */
4965 /* Override any gcc2 internal prototype to avoid an error. */
4966 /* We use char because int might match the return type of a gcc2
4967 builtin and then its argument prototype would still apply. */
4972 /* The GNU C library defines this for functions which it implements
4973 to always fail with ENOSYS. Some functions are actually named
4974 something starting with __ and the normal name is an alias. */
4975 #if defined (__stub_connect) || defined (__stub___connect)
4983 if { (eval echo configure:4984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4985 eval "ac_cv_func_connect=yes"
4987 echo "configure: failed program was:" >&5
4988 cat conftest.$ac_ext >&5
4990 eval "ac_cv_func_connect=no"
4995 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
4996 echo "$ac_t""yes" 1>&6
4999 echo "$ac_t""no" 1>&6
5002 if test $ac_cv_func_connect = no; then
5003 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
5004 echo "configure:5005: checking for connect in -lsocket" >&5
5005 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
5006 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5007 echo $ac_n "(cached) $ac_c" 1>&6
5009 ac_save_LIBS="$LIBS"
5010 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
5011 cat > conftest.$ac_ext <<EOF
5012 #line 5013 "configure"
5013 #include "confdefs.h"
5014 /* Override any gcc2 internal prototype to avoid an error. */
5015 /* We use char because int might match the return type of a gcc2
5016 builtin and then its argument prototype would still apply. */
5023 if { (eval echo configure:5024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5025 eval "ac_cv_lib_$ac_lib_var=yes"
5027 echo "configure: failed program was:" >&5
5028 cat conftest.$ac_ext >&5
5030 eval "ac_cv_lib_$ac_lib_var=no"
5033 LIBS="$ac_save_LIBS"
5036 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5037 echo "$ac_t""yes" 1>&6
5038 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
5040 echo "$ac_t""no" 1>&6
5045 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
5046 echo $ac_n "checking for remove""... $ac_c" 1>&6
5047 echo "configure:5048: checking for remove" >&5
5048 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
5049 echo $ac_n "(cached) $ac_c" 1>&6
5051 cat > conftest.$ac_ext <<EOF
5052 #line 5053 "configure"
5053 #include "confdefs.h"
5054 /* System header to define __stub macros and hopefully few prototypes,
5055 which can conflict with char remove(); below. */
5057 /* Override any gcc2 internal prototype to avoid an error. */
5058 /* We use char because int might match the return type of a gcc2
5059 builtin and then its argument prototype would still apply. */
5064 /* The GNU C library defines this for functions which it implements
5065 to always fail with ENOSYS. Some functions are actually named
5066 something starting with __ and the normal name is an alias. */
5067 #if defined (__stub_remove) || defined (__stub___remove)
5075 if { (eval echo configure:5076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5077 eval "ac_cv_func_remove=yes"
5079 echo "configure: failed program was:" >&5
5080 cat conftest.$ac_ext >&5
5082 eval "ac_cv_func_remove=no"
5087 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
5088 echo "$ac_t""yes" 1>&6
5091 echo "$ac_t""no" 1>&6
5094 if test $ac_cv_func_remove = no; then
5095 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
5096 echo "configure:5097: checking for remove in -lposix" >&5
5097 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
5098 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5099 echo $ac_n "(cached) $ac_c" 1>&6
5101 ac_save_LIBS="$LIBS"
5102 LIBS="-lposix $LIBS"
5103 cat > conftest.$ac_ext <<EOF
5104 #line 5105 "configure"
5105 #include "confdefs.h"
5106 /* Override any gcc2 internal prototype to avoid an error. */
5107 /* We use char because int might match the return type of a gcc2
5108 builtin and then its argument prototype would still apply. */
5115 if { (eval echo configure:5116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5117 eval "ac_cv_lib_$ac_lib_var=yes"
5119 echo "configure: failed program was:" >&5
5120 cat conftest.$ac_ext >&5
5122 eval "ac_cv_lib_$ac_lib_var=no"
5125 LIBS="$ac_save_LIBS"
5128 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5129 echo "$ac_t""yes" 1>&6
5130 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5132 echo "$ac_t""no" 1>&6
5137 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5138 echo $ac_n "checking for shmat""... $ac_c" 1>&6
5139 echo "configure:5140: checking for shmat" >&5
5140 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
5141 echo $ac_n "(cached) $ac_c" 1>&6
5143 cat > conftest.$ac_ext <<EOF
5144 #line 5145 "configure"
5145 #include "confdefs.h"
5146 /* System header to define __stub macros and hopefully few prototypes,
5147 which can conflict with char shmat(); below. */
5149 /* Override any gcc2 internal prototype to avoid an error. */
5150 /* We use char because int might match the return type of a gcc2
5151 builtin and then its argument prototype would still apply. */
5156 /* The GNU C library defines this for functions which it implements
5157 to always fail with ENOSYS. Some functions are actually named
5158 something starting with __ and the normal name is an alias. */
5159 #if defined (__stub_shmat) || defined (__stub___shmat)
5167 if { (eval echo configure:5168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5169 eval "ac_cv_func_shmat=yes"
5171 echo "configure: failed program was:" >&5
5172 cat conftest.$ac_ext >&5
5174 eval "ac_cv_func_shmat=no"
5179 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
5180 echo "$ac_t""yes" 1>&6
5183 echo "$ac_t""no" 1>&6
5186 if test $ac_cv_func_shmat = no; then
5187 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
5188 echo "configure:5189: checking for shmat in -lipc" >&5
5189 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
5190 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5191 echo $ac_n "(cached) $ac_c" 1>&6
5193 ac_save_LIBS="$LIBS"
5195 cat > conftest.$ac_ext <<EOF
5196 #line 5197 "configure"
5197 #include "confdefs.h"
5198 /* Override any gcc2 internal prototype to avoid an error. */
5199 /* We use char because int might match the return type of a gcc2
5200 builtin and then its argument prototype would still apply. */
5207 if { (eval echo configure:5208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5209 eval "ac_cv_lib_$ac_lib_var=yes"
5211 echo "configure: failed program was:" >&5
5212 cat conftest.$ac_ext >&5
5214 eval "ac_cv_lib_$ac_lib_var=no"
5217 LIBS="$ac_save_LIBS"
5220 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5221 echo "$ac_t""yes" 1>&6
5222 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5224 echo "$ac_t""no" 1>&6
5230 # Check for libraries that X11R6 Xt/Xaw programs need.
5231 ac_save_LDFLAGS="$LDFLAGS"
5232 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5233 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5234 # check for ICE first), but we must link in the order -lSM -lICE or
5235 # we get undefined symbols. So assume we have SM if we have ICE.
5236 # These have to be linked with before -lX11, unlike the other
5237 # libraries we check for below, so use a different variable.
5238 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
5239 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
5240 echo "configure:5241: checking for IceConnectionNumber in -lICE" >&5
5241 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
5242 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5243 echo $ac_n "(cached) $ac_c" 1>&6
5245 ac_save_LIBS="$LIBS"
5246 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
5247 cat > conftest.$ac_ext <<EOF
5248 #line 5249 "configure"
5249 #include "confdefs.h"
5250 /* Override any gcc2 internal prototype to avoid an error. */
5251 /* We use char because int might match the return type of a gcc2
5252 builtin and then its argument prototype would still apply. */
5253 char IceConnectionNumber();
5256 IceConnectionNumber()
5259 if { (eval echo configure:5260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5261 eval "ac_cv_lib_$ac_lib_var=yes"
5263 echo "configure: failed program was:" >&5
5264 cat conftest.$ac_ext >&5
5266 eval "ac_cv_lib_$ac_lib_var=no"
5269 LIBS="$ac_save_LIBS"
5272 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5273 echo "$ac_t""yes" 1>&6
5274 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5276 echo "$ac_t""no" 1>&6
5279 LDFLAGS="$ac_save_LDFLAGS"
5287 # SYSTEM_NAME=`echo "$cf_cv_system_name"|tr ' ' -`
5291 LDFLAGS="$X_LIBS $LDFLAGS"
5293 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
5295 cf_check_cflags="$CFLAGS"
5296 cf_check_cppflags="$CPPFLAGS"
5301 cf_new_extra_cppflags=
5303 for cf_add_cflags in $X_CFLAGS
5305 case $cf_fix_cppflags in
5307 case $cf_add_cflags in #(vi
5308 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
5309 case $cf_add_cflags in
5311 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5313 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
5314 && test -z "${cf_tst_cflags}" \
5315 && cf_fix_cppflags=yes
5317 if test $cf_fix_cppflags = yes ; then
5318 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5320 elif test "${cf_tst_cflags}" = "\"'" ; then
5321 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5327 *$cf_add_cflags) #(vi
5330 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
5335 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
5340 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5342 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
5344 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
5345 && test -z "${cf_tst_cflags}" \
5346 && cf_fix_cppflags=no
5351 if test -n "$cf_new_cflags" ; then
5352 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
5354 CFLAGS="$CFLAGS $cf_new_cflags"
5357 if test -n "$cf_new_cppflags" ; then
5358 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
5360 CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
5363 if test -n "$cf_new_extra_cppflags" ; then
5364 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
5366 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
5372 if test "$cf_check_cflags" != "$CFLAGS" ; then
5373 cat > conftest.$ac_ext <<EOF
5374 #line 5375 "configure"
5375 #include "confdefs.h"
5378 printf("Hello world");
5381 if { (eval echo configure:5382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5384 echo "configure: failed program was:" >&5
5385 cat conftest.$ac_ext >&5
5387 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
5389 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
5390 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
5393 CFLAGS="$cf_check_flags"
5399 echo $ac_n "checking for XOpenDisplay""... $ac_c" 1>&6
5400 echo "configure:5401: checking for XOpenDisplay" >&5
5401 if eval "test \"`echo '$''{'ac_cv_func_XOpenDisplay'+set}'`\" = set"; then
5402 echo $ac_n "(cached) $ac_c" 1>&6
5404 cat > conftest.$ac_ext <<EOF
5405 #line 5406 "configure"
5406 #include "confdefs.h"
5407 /* System header to define __stub macros and hopefully few prototypes,
5408 which can conflict with char XOpenDisplay(); below. */
5410 /* Override any gcc2 internal prototype to avoid an error. */
5411 /* We use char because int might match the return type of a gcc2
5412 builtin and then its argument prototype would still apply. */
5413 char XOpenDisplay();
5417 /* The GNU C library defines this for functions which it implements
5418 to always fail with ENOSYS. Some functions are actually named
5419 something starting with __ and the normal name is an alias. */
5420 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
5428 if { (eval echo configure:5429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5430 eval "ac_cv_func_XOpenDisplay=yes"
5432 echo "configure: failed program was:" >&5
5433 cat conftest.$ac_ext >&5
5435 eval "ac_cv_func_XOpenDisplay=no"
5440 if eval "test \"`echo '$ac_cv_func_'XOpenDisplay`\" = yes"; then
5441 echo "$ac_t""yes" 1>&6
5444 echo "$ac_t""no" 1>&6
5446 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5447 echo "configure:5448: checking for XOpenDisplay in -lX11" >&5
5448 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5449 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5450 echo $ac_n "(cached) $ac_c" 1>&6
5452 ac_save_LIBS="$LIBS"
5453 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
5454 cat > conftest.$ac_ext <<EOF
5455 #line 5456 "configure"
5456 #include "confdefs.h"
5457 /* Override any gcc2 internal prototype to avoid an error. */
5458 /* We use char because int might match the return type of a gcc2
5459 builtin and then its argument prototype would still apply. */
5460 char XOpenDisplay();
5466 if { (eval echo configure:5467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5468 eval "ac_cv_lib_$ac_lib_var=yes"
5470 echo "configure: failed program was:" >&5
5471 cat conftest.$ac_ext >&5
5473 eval "ac_cv_lib_$ac_lib_var=no"
5476 LIBS="$ac_save_LIBS"
5479 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5480 echo "$ac_t""yes" 1>&6
5483 echo "$ac_t""no" 1>&6
5489 echo $ac_n "checking for XtAppInitialize""... $ac_c" 1>&6
5490 echo "configure:5491: checking for XtAppInitialize" >&5
5491 if eval "test \"`echo '$''{'ac_cv_func_XtAppInitialize'+set}'`\" = set"; then
5492 echo $ac_n "(cached) $ac_c" 1>&6
5494 cat > conftest.$ac_ext <<EOF
5495 #line 5496 "configure"
5496 #include "confdefs.h"
5497 /* System header to define __stub macros and hopefully few prototypes,
5498 which can conflict with char XtAppInitialize(); below. */
5500 /* Override any gcc2 internal prototype to avoid an error. */
5501 /* We use char because int might match the return type of a gcc2
5502 builtin and then its argument prototype would still apply. */
5503 char XtAppInitialize();
5507 /* The GNU C library defines this for functions which it implements
5508 to always fail with ENOSYS. Some functions are actually named
5509 something starting with __ and the normal name is an alias. */
5510 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
5518 if { (eval echo configure:5519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5520 eval "ac_cv_func_XtAppInitialize=yes"
5522 echo "configure: failed program was:" >&5
5523 cat conftest.$ac_ext >&5
5525 eval "ac_cv_func_XtAppInitialize=no"
5530 if eval "test \"`echo '$ac_cv_func_'XtAppInitialize`\" = yes"; then
5531 echo "$ac_t""yes" 1>&6
5534 echo "$ac_t""no" 1>&6
5536 echo $ac_n "checking for XtAppInitialize in -lXt""... $ac_c" 1>&6
5537 echo "configure:5538: checking for XtAppInitialize in -lXt" >&5
5538 ac_lib_var=`echo Xt'_'XtAppInitialize | sed 'y%./+-%__p_%'`
5539 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5540 echo $ac_n "(cached) $ac_c" 1>&6
5542 ac_save_LIBS="$LIBS"
5543 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
5544 cat > conftest.$ac_ext <<EOF
5545 #line 5546 "configure"
5546 #include "confdefs.h"
5547 /* Override any gcc2 internal prototype to avoid an error. */
5548 /* We use char because int might match the return type of a gcc2
5549 builtin and then its argument prototype would still apply. */
5550 char XtAppInitialize();
5556 if { (eval echo configure:5557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5558 eval "ac_cv_lib_$ac_lib_var=yes"
5560 echo "configure: failed program was:" >&5
5561 cat conftest.$ac_ext >&5
5563 eval "ac_cv_lib_$ac_lib_var=no"
5566 LIBS="$ac_save_LIBS"
5569 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5570 echo "$ac_t""yes" 1>&6
5571 cat >> confdefs.h <<\EOF
5572 #define HAVE_LIBXT 1
5576 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
5578 echo "$ac_t""no" 1>&6
5584 if test $cf_have_X_LIBS = no ; then
5585 echo "configure: warning: Unable to successfully link X Toolkit library (-lXt) with
5586 test program. You will have to check and add the proper libraries by hand
5591 cf_x_athena=${cf_x_athena-Xaw}
5593 echo $ac_n "checking if you want to link with Xaw 3d library""... $ac_c" 1>&6
5594 echo "configure:5595: checking if you want to link with Xaw 3d library" >&5
5597 # Check whether --with-Xaw3d or --without-Xaw3d was given.
5598 if test "${with_Xaw3d+set}" = set; then
5599 withval="$with_Xaw3d"
5603 if test "$withval" = yes ; then
5605 echo "$ac_t""yes" 1>&6
5607 echo "$ac_t""no" 1>&6
5610 echo $ac_n "checking if you want to link with neXT Athena library""... $ac_c" 1>&6
5611 echo "configure:5612: checking if you want to link with neXT Athena library" >&5
5614 # Check whether --with-neXtaw or --without-neXtaw was given.
5615 if test "${with_neXtaw+set}" = set; then
5616 withval="$with_neXtaw"
5620 if test "$withval" = yes ; then
5622 echo "$ac_t""yes" 1>&6
5624 echo "$ac_t""no" 1>&6
5627 echo $ac_n "checking if you want to link with Athena-Plus library""... $ac_c" 1>&6
5628 echo "configure:5629: checking if you want to link with Athena-Plus library" >&5
5631 # Check whether --with-XawPlus or --without-XawPlus was given.
5632 if test "${with_XawPlus+set}" = set; then
5633 withval="$with_XawPlus"
5637 if test "$withval" = yes ; then
5639 echo "$ac_t""yes" 1>&6
5641 echo "$ac_t""no" 1>&6
5644 echo $ac_n "checking for XextCreateExtension in -lXext""... $ac_c" 1>&6
5645 echo "configure:5646: checking for XextCreateExtension in -lXext" >&5
5646 ac_lib_var=`echo Xext'_'XextCreateExtension | sed 'y%./+-%__p_%'`
5647 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5648 echo $ac_n "(cached) $ac_c" 1>&6
5650 ac_save_LIBS="$LIBS"
5652 cat > conftest.$ac_ext <<EOF
5653 #line 5654 "configure"
5654 #include "confdefs.h"
5655 /* Override any gcc2 internal prototype to avoid an error. */
5656 /* We use char because int might match the return type of a gcc2
5657 builtin and then its argument prototype would still apply. */
5658 char XextCreateExtension();
5661 XextCreateExtension()
5664 if { (eval echo configure:5665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5666 eval "ac_cv_lib_$ac_lib_var=yes"
5668 echo "configure: failed program was:" >&5
5669 cat conftest.$ac_ext >&5
5671 eval "ac_cv_lib_$ac_lib_var=no"
5674 LIBS="$ac_save_LIBS"
5677 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
5678 echo "$ac_t""yes" 1>&6
5681 echo "$ac_t""no" 1>&6
5688 cf_x_athena_root=$cf_x_athena
5689 cf_x_athena_include=""
5691 for cf_path in default \
5692 /usr/contrib/X11R6 \
5693 /usr/contrib/X11R5 \
5697 if test -z "$cf_x_athena_include" ; then
5699 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
5700 if test $cf_path != default ; then
5701 CPPFLAGS="-I$cf_path/include $cf_save"
5702 echo $ac_n "checking for $cf_test in $cf_path""... $ac_c" 1>&6
5703 echo "configure:5704: checking for $cf_test in $cf_path" >&5
5705 echo $ac_n "checking for $cf_test""... $ac_c" 1>&6
5706 echo "configure:5707: checking for $cf_test" >&5
5708 cat > conftest.$ac_ext <<EOF
5709 #line 5710 "configure"
5710 #include "confdefs.h"
5712 #include <X11/Intrinsic.h>
5718 if { (eval echo configure:5719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5722 echo "configure: failed program was:" >&5
5723 cat conftest.$ac_ext >&5
5728 echo "$ac_t""$cf_result" 1>&6
5729 if test "$cf_result" = yes ; then
5730 cf_x_athena_include=$cf_path
5738 if test -z "$cf_x_athena_include" ; then
5739 echo "configure: warning: Unable to successfully find Athena header files with test program" 1>&2
5740 elif test "$cf_x_athena_include" != default ; then
5741 CPPFLAGS="$CPPFLAGS -I$cf_x_athena_include"
5745 cf_x_athena_root=$cf_x_athena
5748 for cf_path in default \
5749 /usr/contrib/X11R6 \
5750 /usr/contrib/X11R5 \
5755 "-l$cf_x_athena_root -lXmu" \
5756 "-l$cf_x_athena_root -lXpm -lXmu" \
5757 "-l${cf_x_athena_root}_s -lXmu_s"
5759 if test -z "$cf_x_athena_lib" ; then
5761 cf_test=XawSimpleMenuAddGlobalActions
5762 if test $cf_path != default ; then
5763 LIBS="-L$cf_path/lib $cf_lib $LIBS"
5764 echo $ac_n "checking for $cf_lib in $cf_path""... $ac_c" 1>&6
5765 echo "configure:5766: checking for $cf_lib in $cf_path" >&5
5767 LIBS="$cf_lib $LIBS"
5768 echo $ac_n "checking for $cf_test in $cf_lib""... $ac_c" 1>&6
5769 echo "configure:5770: checking for $cf_test in $cf_lib" >&5
5771 cat > conftest.$ac_ext <<EOF
5772 #line 5773 "configure"
5773 #include "confdefs.h"
5779 if { (eval echo configure:5780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5783 echo "configure: failed program was:" >&5
5784 cat conftest.$ac_ext >&5
5789 echo "$ac_t""$cf_result" 1>&6
5790 if test "$cf_result" = yes ; then
5791 cf_x_athena_lib="$cf_lib"
5799 if test -z "$cf_x_athena_lib" ; then
5800 { echo "configure: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" 1>&2; exit 1; }
5804 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5806 cat >> confdefs.h <<EOF
5807 #define $cf_x_athena_LIBS 1
5815 for ac_prog in xcurses-config
5817 # Extract the first word of "$ac_prog", so it can be a program name with args.
5818 set dummy $ac_prog; ac_word=$2
5819 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5820 echo "configure:5821: checking for $ac_word" >&5
5821 if eval "test \"`echo '$''{'ac_cv_path_XCURSES_CONFIG'+set}'`\" = set"; then
5822 echo $ac_n "(cached) $ac_c" 1>&6
5824 case "$XCURSES_CONFIG" in
5826 ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a path.
5829 ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a dos path.
5832 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5834 for ac_dir in $ac_dummy; do
5835 test -z "$ac_dir" && ac_dir=.
5836 if test -f $ac_dir/$ac_word; then
5837 ac_cv_path_XCURSES_CONFIG="$ac_dir/$ac_word"
5845 XCURSES_CONFIG="$ac_cv_path_XCURSES_CONFIG"
5846 if test -n "$XCURSES_CONFIG"; then
5847 echo "$ac_t""$XCURSES_CONFIG" 1>&6
5849 echo "$ac_t""no" 1>&6
5852 test -n "$XCURSES_CONFIG" && break
5854 test -n "$XCURSES_CONFIG" || XCURSES_CONFIG="none"
5857 if test "$XCURSES_CONFIG" != none ; then
5859 CPPFLAGS="`$XCURSES_CONFIG --cflags` $CPPFLAGS"
5860 LIBS="`$XCURSES_CONFIG --libs` $LIBS"
5862 cf_cv_lib_XCurses=yes
5866 LDFLAGS="$LDFLAGS $X_LIBS"
5868 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
5870 cf_check_cflags="$CFLAGS"
5871 cf_check_cppflags="$CPPFLAGS"
5876 cf_new_extra_cppflags=
5878 for cf_add_cflags in $X_CFLAGS
5880 case $cf_fix_cppflags in
5882 case $cf_add_cflags in #(vi
5883 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
5884 case $cf_add_cflags in
5886 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5888 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
5889 && test -z "${cf_tst_cflags}" \
5890 && cf_fix_cppflags=yes
5892 if test $cf_fix_cppflags = yes ; then
5893 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5895 elif test "${cf_tst_cflags}" = "\"'" ; then
5896 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5902 *$cf_add_cflags) #(vi
5905 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
5910 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
5915 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5917 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
5919 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
5920 && test -z "${cf_tst_cflags}" \
5921 && cf_fix_cppflags=no
5926 if test -n "$cf_new_cflags" ; then
5927 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
5929 CFLAGS="$CFLAGS $cf_new_cflags"
5932 if test -n "$cf_new_cppflags" ; then
5933 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
5935 CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
5938 if test -n "$cf_new_extra_cppflags" ; then
5939 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
5941 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
5947 if test "$cf_check_cflags" != "$CFLAGS" ; then
5948 cat > conftest.$ac_ext <<EOF
5949 #line 5950 "configure"
5950 #include "confdefs.h"
5953 printf("Hello world");
5956 if { (eval echo configure:5957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5959 echo "configure: failed program was:" >&5
5960 cat conftest.$ac_ext >&5
5962 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
5964 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
5965 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
5968 CFLAGS="$cf_check_flags"
5973 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
5974 echo "configure:5975: checking for XOpenDisplay in -lX11" >&5
5975 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
5976 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
5977 echo $ac_n "(cached) $ac_c" 1>&6
5979 ac_save_LIBS="$LIBS"
5980 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
5981 cat > conftest.$ac_ext <<EOF
5982 #line 5983 "configure"
5983 #include "confdefs.h"
5984 /* Override any gcc2 internal prototype to avoid an error. */
5985 /* We use char because int might match the return type of a gcc2
5986 builtin and then its argument prototype would still apply. */
5987 char XOpenDisplay();
5993 if { (eval echo configure:5994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5995 eval "ac_cv_lib_$ac_lib_var=yes"
5997 echo "configure: failed program was:" >&5
5998 cat conftest.$ac_ext >&5
6000 eval "ac_cv_lib_$ac_lib_var=no"
6003 LIBS="$ac_save_LIBS"
6006 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6007 echo "$ac_t""yes" 1>&6
6010 echo "$ac_t""no" 1>&6
6013 echo $ac_n "checking for XCurses library""... $ac_c" 1>&6
6014 echo "configure:6015: checking for XCurses library" >&5
6015 if eval "test \"`echo '$''{'cf_cv_lib_XCurses'+set}'`\" = set"; then
6016 echo $ac_n "(cached) $ac_c" 1>&6
6019 LIBS="-lXCurses $LIBS"
6020 cat > conftest.$ac_ext <<EOF
6021 #line 6022 "configure"
6022 #include "confdefs.h"
6024 #include <xcurses.h>
6025 char *XCursesProgramName = "test";
6031 if { (eval echo configure:6032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6033 cf_cv_lib_XCurses=yes
6035 echo "configure: failed program was:" >&5
6036 cat conftest.$ac_ext >&5
6038 cf_cv_lib_XCurses=no
6044 echo "$ac_t""$cf_cv_lib_XCurses" 1>&6
6048 if test $cf_cv_lib_XCurses = yes ; then
6049 cat >> confdefs.h <<\EOF
6053 cat >> confdefs.h <<\EOF
6057 cat >> confdefs.h <<\EOF
6058 #define HAVE_XCURSES 1
6062 { echo "configure: error: Cannot link with XCurses" 1>&2; exit 1; }
6070 case $cf_cv_screen in #(vi
6074 # look for curses-related libraries
6075 echo $ac_n "checking for new_panel in -lpanel$cf_cv_libtype""... $ac_c" 1>&6
6076 echo "configure:6077: checking for new_panel in -lpanel$cf_cv_libtype" >&5
6077 ac_lib_var=`echo panel$cf_cv_libtype'_'new_panel | sed 'y%./+-%__p_%'`
6078 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6079 echo $ac_n "(cached) $ac_c" 1>&6
6081 ac_save_LIBS="$LIBS"
6082 LIBS="-lpanel$cf_cv_libtype $LIBS"
6083 cat > conftest.$ac_ext <<EOF
6084 #line 6085 "configure"
6085 #include "confdefs.h"
6086 /* Override any gcc2 internal prototype to avoid an error. */
6087 /* We use char because int might match the return type of a gcc2
6088 builtin and then its argument prototype would still apply. */
6095 if { (eval echo configure:6096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6097 eval "ac_cv_lib_$ac_lib_var=yes"
6099 echo "configure: failed program was:" >&5
6100 cat conftest.$ac_ext >&5
6102 eval "ac_cv_lib_$ac_lib_var=no"
6105 LIBS="$ac_save_LIBS"
6108 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6109 echo "$ac_t""yes" 1>&6
6110 ac_tr_lib=HAVE_LIB`echo panel$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6111 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6112 cat >> confdefs.h <<EOF
6113 #define $ac_tr_lib 1
6116 LIBS="-lpanel$cf_cv_libtype $LIBS"
6119 echo "$ac_t""no" 1>&6
6122 echo $ac_n "checking for menu_driver in -lmenu$cf_cv_libtype""... $ac_c" 1>&6
6123 echo "configure:6124: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
6124 ac_lib_var=`echo menu$cf_cv_libtype'_'menu_driver | sed 'y%./+-%__p_%'`
6125 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6126 echo $ac_n "(cached) $ac_c" 1>&6
6128 ac_save_LIBS="$LIBS"
6129 LIBS="-lmenu$cf_cv_libtype $LIBS"
6130 cat > conftest.$ac_ext <<EOF
6131 #line 6132 "configure"
6132 #include "confdefs.h"
6133 /* Override any gcc2 internal prototype to avoid an error. */
6134 /* We use char because int might match the return type of a gcc2
6135 builtin and then its argument prototype would still apply. */
6142 if { (eval echo configure:6143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6144 eval "ac_cv_lib_$ac_lib_var=yes"
6146 echo "configure: failed program was:" >&5
6147 cat conftest.$ac_ext >&5
6149 eval "ac_cv_lib_$ac_lib_var=no"
6152 LIBS="$ac_save_LIBS"
6155 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6156 echo "$ac_t""yes" 1>&6
6157 ac_tr_lib=HAVE_LIB`echo menu$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6158 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6159 cat >> confdefs.h <<EOF
6160 #define $ac_tr_lib 1
6163 LIBS="-lmenu$cf_cv_libtype $LIBS"
6166 echo "$ac_t""no" 1>&6
6169 echo $ac_n "checking for form_driver in -lform$cf_cv_libtype""... $ac_c" 1>&6
6170 echo "configure:6171: checking for form_driver in -lform$cf_cv_libtype" >&5
6171 ac_lib_var=`echo form$cf_cv_libtype'_'form_driver | sed 'y%./+-%__p_%'`
6172 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6173 echo $ac_n "(cached) $ac_c" 1>&6
6175 ac_save_LIBS="$LIBS"
6176 LIBS="-lform$cf_cv_libtype $LIBS"
6177 cat > conftest.$ac_ext <<EOF
6178 #line 6179 "configure"
6179 #include "confdefs.h"
6180 /* Override any gcc2 internal prototype to avoid an error. */
6181 /* We use char because int might match the return type of a gcc2
6182 builtin and then its argument prototype would still apply. */
6189 if { (eval echo configure:6190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6191 eval "ac_cv_lib_$ac_lib_var=yes"
6193 echo "configure: failed program was:" >&5
6194 cat conftest.$ac_ext >&5
6196 eval "ac_cv_lib_$ac_lib_var=no"
6199 LIBS="$ac_save_LIBS"
6202 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6203 echo "$ac_t""yes" 1>&6
6204 ac_tr_lib=HAVE_LIB`echo form$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
6205 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
6206 cat >> confdefs.h <<EOF
6207 #define $ac_tr_lib 1
6210 LIBS="-lform$cf_cv_libtype $LIBS"
6213 echo "$ac_t""no" 1>&6
6217 # look for curses-related headers
6226 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6227 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6228 echo "configure:6229: checking for $ac_hdr" >&5
6229 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6230 echo $ac_n "(cached) $ac_c" 1>&6
6232 cat > conftest.$ac_ext <<EOF
6233 #line 6234 "configure"
6234 #include "confdefs.h"
6237 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6238 { (eval echo configure:6239: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6239 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6240 if test -z "$ac_err"; then
6242 eval "ac_cv_header_$ac_safe=yes"
6245 echo "configure: failed program was:" >&5
6246 cat conftest.$ac_ext >&5
6248 eval "ac_cv_header_$ac_safe=no"
6252 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6253 echo "$ac_t""yes" 1>&6
6254 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6255 cat >> confdefs.h <<EOF
6256 #define $ac_tr_hdr 1
6260 echo "$ac_t""no" 1>&6
6267 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
6268 echo "configure:6269: checking return type of signal handlers" >&5
6269 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
6270 echo $ac_n "(cached) $ac_c" 1>&6
6272 cat > conftest.$ac_ext <<EOF
6273 #line 6274 "configure"
6274 #include "confdefs.h"
6275 #include <sys/types.h>
6281 extern "C" void (*signal (int, void (*)(int)))(int);
6283 void (*signal ()) ();
6290 if { (eval echo configure:6291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6292 ac_cv_type_signal=void
6294 echo "configure: failed program was:" >&5
6295 cat conftest.$ac_ext >&5
6297 ac_cv_type_signal=int
6302 echo "$ac_t""$ac_cv_type_signal" 1>&6
6303 cat >> confdefs.h <<EOF
6304 #define RETSIGTYPE $ac_cv_type_signal
6309 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
6310 echo "configure:6311: checking for ANSI C header files" >&5
6311 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
6312 echo $ac_n "(cached) $ac_c" 1>&6
6314 cat > conftest.$ac_ext <<EOF
6315 #line 6316 "configure"
6316 #include "confdefs.h"
6322 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6323 { (eval echo configure:6324: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6324 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6325 if test -z "$ac_err"; then
6327 ac_cv_header_stdc=yes
6330 echo "configure: failed program was:" >&5
6331 cat conftest.$ac_ext >&5
6333 ac_cv_header_stdc=no
6337 if test $ac_cv_header_stdc = yes; then
6338 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6339 cat > conftest.$ac_ext <<EOF
6340 #line 6341 "configure"
6341 #include "confdefs.h"
6344 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6345 egrep "memchr" >/dev/null 2>&1; then
6349 ac_cv_header_stdc=no
6355 if test $ac_cv_header_stdc = yes; then
6356 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6357 cat > conftest.$ac_ext <<EOF
6358 #line 6359 "configure"
6359 #include "confdefs.h"
6362 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6363 egrep "free" >/dev/null 2>&1; then
6367 ac_cv_header_stdc=no
6373 if test $ac_cv_header_stdc = yes; then
6374 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6375 if test "$cross_compiling" = yes; then
6378 cat > conftest.$ac_ext <<EOF
6379 #line 6380 "configure"
6380 #include "confdefs.h"
6382 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6383 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6384 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6385 int main () { int i; for (i = 0; i < 256; i++)
6386 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
6390 if { (eval echo configure:6391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6394 echo "configure: failed program was:" >&5
6395 cat conftest.$ac_ext >&5
6397 ac_cv_header_stdc=no
6405 echo "$ac_t""$ac_cv_header_stdc" 1>&6
6406 if test $ac_cv_header_stdc = yes; then
6407 cat >> confdefs.h <<\EOF
6408 #define STDC_HEADERS 1
6413 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
6414 echo "configure:6415: checking whether time.h and sys/time.h may both be included" >&5
6415 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
6416 echo $ac_n "(cached) $ac_c" 1>&6
6418 cat > conftest.$ac_ext <<EOF
6419 #line 6420 "configure"
6420 #include "confdefs.h"
6421 #include <sys/types.h>
6422 #include <sys/time.h>
6428 if { (eval echo configure:6429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6430 ac_cv_header_time=yes
6432 echo "configure: failed program was:" >&5
6433 cat conftest.$ac_ext >&5
6435 ac_cv_header_time=no
6440 echo "$ac_t""$ac_cv_header_time" 1>&6
6441 if test $ac_cv_header_time = yes; then
6442 cat >> confdefs.h <<\EOF
6443 #define TIME_WITH_SYS_TIME 1
6459 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
6460 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
6461 echo "configure:6462: checking for $ac_hdr" >&5
6462 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
6463 echo $ac_n "(cached) $ac_c" 1>&6
6465 cat > conftest.$ac_ext <<EOF
6466 #line 6467 "configure"
6467 #include "confdefs.h"
6470 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6471 { (eval echo configure:6472: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6472 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6473 if test -z "$ac_err"; then
6475 eval "ac_cv_header_$ac_safe=yes"
6478 echo "configure: failed program was:" >&5
6479 cat conftest.$ac_ext >&5
6481 eval "ac_cv_header_$ac_safe=no"
6485 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
6486 echo "$ac_t""yes" 1>&6
6487 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
6488 cat >> confdefs.h <<EOF
6489 #define $ac_tr_hdr 1
6493 echo "$ac_t""no" 1>&6
6524 use_default_colors \
6531 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
6532 echo "configure:6533: checking for $ac_func" >&5
6533 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
6534 echo $ac_n "(cached) $ac_c" 1>&6
6536 cat > conftest.$ac_ext <<EOF
6537 #line 6538 "configure"
6538 #include "confdefs.h"
6539 /* System header to define __stub macros and hopefully few prototypes,
6540 which can conflict with char $ac_func(); below. */
6542 /* Override any gcc2 internal prototype to avoid an error. */
6543 /* We use char because int might match the return type of a gcc2
6544 builtin and then its argument prototype would still apply. */
6549 /* The GNU C library defines this for functions which it implements
6550 to always fail with ENOSYS. Some functions are actually named
6551 something starting with __ and the normal name is an alias. */
6552 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6560 if { (eval echo configure:6561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6562 eval "ac_cv_func_$ac_func=yes"
6564 echo "configure: failed program was:" >&5
6565 cat conftest.$ac_ext >&5
6567 eval "ac_cv_func_$ac_func=no"
6572 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
6573 echo "$ac_t""yes" 1>&6
6574 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
6575 cat >> confdefs.h <<EOF
6576 #define $ac_tr_func 1
6580 echo "$ac_t""no" 1>&6
6585 echo $ac_n "checking for ncurses extended functions""... $ac_c" 1>&6
6586 echo "configure:6587: checking for ncurses extended functions" >&5
6587 if eval "test \"`echo '$''{'cf_cv_ncurses_ext_funcs'+set}'`\" = set"; then
6588 echo $ac_n "(cached) $ac_c" 1>&6
6591 cat > conftest.$ac_ext <<EOF
6592 #line 6593 "configure"
6593 #include "confdefs.h"
6595 #include <${cf_cv_ncurses_header-curses.h}>
6598 (void) assume_default_colors (0, 0);
6599 (void) curses_version ();
6600 (void) define_key (0, 0);
6601 (void) is_term_resized (0, 0);
6602 (void) key_defined (0);
6603 (void) keybound (0, 0);
6604 (void) keyok (0, 0);
6605 (void) resize_term (0, 0);
6606 (void) resizeterm (0, 0);
6607 (void) use_default_colors ();
6608 (void) use_extended_names (0);
6609 (void) wresize (0, 0, 0);
6612 if { (eval echo configure:6613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6614 cf_cv_ncurses_ext_funcs=yes
6616 echo "configure: failed program was:" >&5
6617 cat conftest.$ac_ext >&5
6619 cf_cv_ncurses_ext_funcs=no
6625 echo "$ac_t""$cf_cv_ncurses_ext_funcs" 1>&6
6626 test "$cf_cv_ncurses_ext_funcs" != no && cat >> confdefs.h <<\EOF
6627 #define NCURSES_EXT_FUNCS 1
6631 echo $ac_n "checking for wide-character functions""... $ac_c" 1>&6
6632 echo "configure:6633: checking for wide-character functions" >&5
6633 if eval "test \"`echo '$''{'cf_cv_widechar_funcs'+set}'`\" = set"; then
6634 echo $ac_n "(cached) $ac_c" 1>&6
6637 cat > conftest.$ac_ext <<EOF
6638 #line 6639 "configure"
6639 #include "confdefs.h"
6641 #include <${cf_cv_ncurses_header-curses.h}>
6644 static wchar_t src_wchar[2];
6645 static cchar_t dst_cchar;
6646 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
6650 if { (eval echo configure:6651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6652 cf_cv_widechar_funcs=yes
6654 echo "configure: failed program was:" >&5
6655 cat conftest.$ac_ext >&5
6657 cf_cv_widechar_funcs=no
6663 echo "$ac_t""$cf_cv_widechar_funcs" 1>&6
6664 if test "$cf_cv_widechar_funcs" != no ; then
6665 cat >> confdefs.h <<\EOF
6666 #define USE_WIDEC_SUPPORT 1
6670 cat >> confdefs.h <<\EOF
6671 #define USE_WIDEC_SUPPORT 0
6677 echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
6678 echo "configure:6679: checking if sys/time.h works with sys/select.h" >&5
6679 if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
6680 echo $ac_n "(cached) $ac_c" 1>&6
6683 cat > conftest.$ac_ext <<EOF
6684 #line 6685 "configure"
6685 #include "confdefs.h"
6687 #include <sys/types.h>
6688 #ifdef HAVE_SYS_TIME_H
6689 #include <sys/time.h>
6691 #ifdef HAVE_SYS_SELECT_H
6692 #include <sys/select.h>
6699 if { (eval echo configure:6700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6701 cf_cv_sys_time_select=yes
6703 echo "configure: failed program was:" >&5
6704 cat conftest.$ac_ext >&5
6706 cf_cv_sys_time_select=no
6712 echo "$ac_t""$cf_cv_sys_time_select" 1>&6
6713 test "$cf_cv_sys_time_select" = yes && cat >> confdefs.h <<\EOF
6714 #define HAVE_SYS_TIME_SELECT 1
6719 echo $ac_n "checking for function curses_version""... $ac_c" 1>&6
6720 echo "configure:6721: checking for function curses_version" >&5
6721 if eval "test \"`echo '$''{'cf_cv_func_curses_version'+set}'`\" = set"; then
6722 echo $ac_n "(cached) $ac_c" 1>&6
6725 if test "$cross_compiling" = yes; then
6726 cf_cv_func_curses_version=unknown
6728 cat > conftest.$ac_ext <<EOF
6729 #line 6730 "configure"
6730 #include "confdefs.h"
6732 #include <${cf_cv_ncurses_header-curses.h}>
6736 sprintf(temp, "%s\n", curses_version());
6741 if { (eval echo configure:6742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6743 cf_cv_func_curses_version=yes
6746 echo "configure: failed program was:" >&5
6747 cat conftest.$ac_ext >&5
6749 cf_cv_func_curses_version=no
6758 echo "$ac_t""$cf_cv_func_curses_version" 1>&6
6759 test "$cf_cv_func_curses_version" = yes && cat >> confdefs.h <<\EOF
6760 #define HAVE_CURSES_VERSION 1
6765 echo $ac_n "checking for alternate character set array""... $ac_c" 1>&6
6766 echo "configure:6767: checking for alternate character set array" >&5
6767 if eval "test \"`echo '$''{'cf_cv_curses_acs_map'+set}'`\" = set"; then
6768 echo $ac_n "(cached) $ac_c" 1>&6
6771 cf_cv_curses_acs_map=unknown
6772 for name in acs_map _acs_map __acs_map _nc_acs_map
6774 cat > conftest.$ac_ext <<EOF
6775 #line 6776 "configure"
6776 #include "confdefs.h"
6778 #include <${cf_cv_ncurses_header-curses.h}>
6782 $name['k'] = ACS_PLUS
6786 if { (eval echo configure:6787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6788 cf_cv_curses_acs_map=$name; break
6790 echo "configure: failed program was:" >&5
6791 cat conftest.$ac_ext >&5
6798 echo "$ac_t""$cf_cv_curses_acs_map" 1>&6
6800 test "$cf_cv_curses_acs_map" != unknown && cat >> confdefs.h <<EOF
6801 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
6806 echo $ac_n "checking for wide alternate character set array""... $ac_c" 1>&6
6807 echo "configure:6808: checking for wide alternate character set array" >&5
6808 if eval "test \"`echo '$''{'cf_cv_curses_wacs_map'+set}'`\" = set"; then
6809 echo $ac_n "(cached) $ac_c" 1>&6
6812 cf_cv_curses_wacs_map=unknown
6813 for name in wacs_map _wacs_map __wacs_map _nc_wacs
6815 cat > conftest.$ac_ext <<EOF
6816 #line 6817 "configure"
6817 #include "confdefs.h"
6819 #ifndef _XOPEN_SOURCE_EXTENDED
6820 #define _XOPEN_SOURCE_EXTENDED
6822 #include <${cf_cv_ncurses_header-curses.h}>
6824 $name['k'] = *WACS_PLUS
6827 if { (eval echo configure:6828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6829 cf_cv_curses_wacs_map=$name
6832 echo "configure: failed program was:" >&5
6833 cat conftest.$ac_ext >&5
6839 echo "$ac_t""$cf_cv_curses_wacs_map" 1>&6
6842 echo $ac_n "checking for type attr_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
6843 echo "configure:6844: checking for type attr_t in ${cf_cv_ncurses_header-curses.h}" >&5
6844 cat > conftest.$ac_ext <<EOF
6845 #line 6846 "configure"
6846 #include "confdefs.h"
6848 #ifndef _XOPEN_SOURCE_EXTENDED
6849 #define _XOPEN_SOURCE_EXTENDED
6851 #include <${cf_cv_ncurses_header-curses.h}>
6858 if { (eval echo configure:6859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6862 echo "configure: failed program was:" >&5
6863 cat conftest.$ac_ext >&5
6868 echo "$ac_t""$cf_result" 1>&6
6869 if test $cf_result = yes ; then
6871 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6873 cat >> confdefs.h <<EOF
6874 #define $cf_result 1
6878 cat >> confdefs.h <<EOF
6885 echo $ac_n "checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
6886 echo "configure:6887: checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}" >&5
6887 cat > conftest.$ac_ext <<EOF
6888 #line 6889 "configure"
6889 #include "confdefs.h"
6891 #ifndef _XOPEN_SOURCE_EXTENDED
6892 #define _XOPEN_SOURCE_EXTENDED
6894 #include <${cf_cv_ncurses_header-curses.h}>
6901 if { (eval echo configure:6902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6905 echo "configure: failed program was:" >&5
6906 cat conftest.$ac_ext >&5
6911 echo "$ac_t""$cf_result" 1>&6
6912 if test $cf_result = yes ; then
6914 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6916 cat >> confdefs.h <<EOF
6917 #define $cf_result 1
6921 cat >> confdefs.h <<EOF
6922 #define mbstate_t long
6933 cat > confcache <<\EOF
6934 # This file is a shell script that caches the results of configure
6935 # tests run on this system so they can be shared between configure
6936 # scripts and configure runs. It is not useful on other systems.
6937 # If it contains results you don't want to keep, you may remove or edit it.
6939 # By default, configure uses ./config.cache as the cache file,
6940 # creating it if it does not exist already. You can give configure
6941 # the --cache-file=FILE option to use a different cache file; that is
6942 # what configure does when it calls configure scripts in
6943 # subdirectories, so they share the cache.
6944 # Giving --cache-file=/dev/null disables caching, for debugging configure.
6945 # config.status only pays attention to the cache file if you give it the
6946 # --recheck option to rerun configure.
6949 # The following way of writing the cache mishandles newlines in values,
6950 # but we know of no workaround that is simple, portable, and efficient.
6951 # So, don't put newlines in cache variables' values.
6952 # Ultrix sh set writes to stderr and can't be redirected directly,
6953 # and sets the high bit in the cache file unless we assign to the vars.
6955 case `(ac_space=' '; set | grep ac_space) 2>&1` in
6957 # `set' does not quote correctly, so add quotes (double-quote substitution
6958 # turns \\\\ into \\, and sed turns \\ into \).
6960 -e "s/'/'\\\\''/g" \
6961 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
6964 # `set' quotes correctly as required by POSIX, so do not add quotes.
6965 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
6968 if cmp -s $cache_file confcache; then
6971 if test -w $cache_file; then
6972 echo "updating cache $cache_file"
6973 cat confcache > $cache_file
6975 echo "not updating unwritable cache $cache_file"
6980 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
6982 test "x$prefix" = xNONE && prefix=$ac_default_prefix
6983 # Let make expand exec_prefix.
6984 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6986 # Any assignment to VPATH causes Sun make to only execute
6987 # the first set of double-colon rules, so remove it if not needed.
6988 # If there is a colon in the path, we need to keep it.
6989 if test "x$srcdir" = x.; then
6990 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
6993 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
6995 DEFS=-DHAVE_CONFIG_H
6997 # Without the "./", some shells look in PATH for config.status.
6998 : ${CONFIG_STATUS=./config.status}
7000 echo creating $CONFIG_STATUS
7001 rm -f $CONFIG_STATUS
7002 cat > $CONFIG_STATUS <<EOF
7004 # Generated automatically by configure.
7005 # Run this file to recreate the current configuration.
7006 # This directory was configured as follows,
7007 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7009 # $0 $ac_configure_args
7011 # Compiler output produced by configure, useful for debugging
7012 # configure, is in ./config.log if it exists.
7014 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
7017 case "\$ac_option" in
7018 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
7019 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
7020 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
7021 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
7022 echo "$CONFIG_STATUS generated by autoconf version 2.13.20030927"
7024 -help | --help | --hel | --he | --h)
7025 echo "\$ac_cs_usage"; exit 0 ;;
7026 *) echo "\$ac_cs_usage"; exit 1 ;;
7030 ac_given_srcdir=$srcdir
7032 trap 'rm -fr `echo "Makefile ncurses_cfg.h:ncurses_tst.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
7034 cat >> $CONFIG_STATUS <<EOF
7036 # Protect against being on the right side of a sed subst in config.status.
7037 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
7038 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
7042 s%@CFLAGS@%$CFLAGS%g
7043 s%@CPPFLAGS@%$CPPFLAGS%g
7044 s%@CXXFLAGS@%$CXXFLAGS%g
7045 s%@FFLAGS@%$FFLAGS%g
7047 s%@LDFLAGS@%$LDFLAGS%g
7049 s%@exec_prefix@%$exec_prefix%g
7050 s%@prefix@%$prefix%g
7051 s%@program_transform_name@%$program_transform_name%g
7052 s%@bindir@%$bindir%g
7053 s%@sbindir@%$sbindir%g
7054 s%@libexecdir@%$libexecdir%g
7055 s%@datadir@%$datadir%g
7056 s%@sysconfdir@%$sysconfdir%g
7057 s%@sharedstatedir@%$sharedstatedir%g
7058 s%@localstatedir@%$localstatedir%g
7059 s%@libdir@%$libdir%g
7060 s%@includedir@%$includedir%g
7061 s%@oldincludedir@%$oldincludedir%g
7062 s%@infodir@%$infodir%g
7063 s%@mandir@%$mandir%g
7065 s%@host_alias@%$host_alias%g
7066 s%@host_cpu@%$host_cpu%g
7067 s%@host_vendor@%$host_vendor%g
7068 s%@host_os@%$host_os%g
7069 s%@SET_MAKE@%$SET_MAKE%g
7073 s%@CC_G_OPT@%$CC_G_OPT%g
7074 s%@CC_SHARED_OPTS@%$CC_SHARED_OPTS%g
7075 s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g
7076 s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g
7077 s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
7078 s%@ECHO_LINK@%$ECHO_LINK%g
7080 s%@LDFLAGS_SHARED@%$LDFLAGS_SHARED%g
7081 s%@LD_MODEL@%$LD_MODEL%g
7082 s%@LD_SHARED_OPTS@%$LD_SHARED_OPTS%g
7083 s%@LIBTOOL@%$LIBTOOL%g
7084 s%@LIB_CLEAN@%$LIB_CLEAN%g
7085 s%@LIB_COMPILE@%$LIB_COMPILE%g
7086 s%@LIB_LINK@%$LIB_LINK%g
7087 s%@LINK_TESTS@%$LINK_TESTS%g
7089 s%@LINT_OPTS@%$LINT_OPTS%g
7090 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
7091 s%@MATH_LIB@%$MATH_LIB%g
7092 s%@TEST_ARGS@%$TEST_ARGS%g
7093 s%@TEST_DEPS@%$TEST_DEPS%g
7094 s%@TINFO_ARGS@%$TINFO_ARGS%g
7095 s%@cf_cv_abi_version@%$cf_cv_abi_version%g
7096 s%@cf_cv_rel_version@%$cf_cv_rel_version%g
7097 s%@EXEEXT@%$EXEEXT%g
7098 s%@OBJEXT@%$OBJEXT%g
7099 s%@EXTRA_CPPFLAGS@%$EXTRA_CPPFLAGS%g
7100 s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
7101 s%@X_CFLAGS@%$X_CFLAGS%g
7102 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
7103 s%@X_LIBS@%$X_LIBS%g
7104 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
7105 s%@XCURSES_CONFIG@%$XCURSES_CONFIG%g
7110 cat >> $CONFIG_STATUS <<\EOF
7112 # Split the substitutions into bite-sized pieces for seds with
7113 # small command number limits, like on Digital OSF/1 and HP-UX.
7114 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
7115 ac_file=1 # Number of current file.
7116 ac_beg=1 # First line for current file.
7117 ac_end=$ac_max_sed_cmds # Line after last line for current file.
7120 while $ac_more_lines; do
7121 if test $ac_beg -gt 1; then
7122 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
7124 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
7126 if test ! -s conftest.s$ac_file; then
7128 rm -f conftest.s$ac_file
7130 if test -z "$ac_sed_cmds"; then
7131 ac_sed_cmds="sed -f conftest.s$ac_file"
7133 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
7135 ac_file=`expr $ac_file + 1`
7137 ac_end=`expr $ac_end + $ac_max_sed_cmds`
7140 if test -z "$ac_sed_cmds"; then
7145 cat >> $CONFIG_STATUS <<EOF
7147 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
7149 cat >> $CONFIG_STATUS <<\EOF
7150 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
7151 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7153 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7154 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7155 *) ac_file_in="${ac_file}.in" ;;
7158 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
7160 # Remove last slash and all that follows it. Not all systems have dirname.
7161 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7162 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7163 # The file is in a subdirectory.
7164 test ! -d "$ac_dir" && mkdir "$ac_dir"
7165 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
7166 # A "../" for each directory in $ac_dir_suffix.
7167 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
7169 ac_dir_suffix= ac_dots=
7172 case "$ac_given_srcdir" in
7174 if test -z "$ac_dots"; then top_srcdir=.
7175 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
7176 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
7178 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
7179 top_srcdir="$ac_dots$ac_given_srcdir" ;;
7183 echo creating "$ac_file"
7185 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
7187 *Makefile*) ac_comsub="1i\\
7188 # $configure_input" ;;
7192 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7194 s%@configure_input@%$configure_input%g
7195 s%@srcdir@%$srcdir%g
7196 s%@top_srcdir@%$top_srcdir%g
7197 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
7201 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
7202 # NAME is the cpp macro being defined and VALUE is the value it is being given.
7204 # ac_d sets the value in "#define NAME VALUE" lines.
7205 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
7206 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
7209 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
7210 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7211 ac_uB='\([ ]\)%\1#\2define\3'
7214 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
7215 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
7216 ac_eB='$%\1#\2define\3'
7220 if test "${CONFIG_HEADERS+set}" != set; then
7222 cat >> $CONFIG_STATUS <<EOF
7223 CONFIG_HEADERS="ncurses_cfg.h:ncurses_tst.hin"
7225 cat >> $CONFIG_STATUS <<\EOF
7227 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
7228 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
7230 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
7231 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
7232 *) ac_file_in="${ac_file}.in" ;;
7235 echo creating $ac_file
7237 rm -f conftest.frag conftest.in conftest.out
7238 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
7239 cat $ac_file_inputs > conftest.in
7244 # Transform confdefs.h into a list of #define's. We won't use it as a sed
7245 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
7246 # be either 'cat' or 'sort'.
7247 cat confdefs.h >conftest.vals
7249 # Break up conftest.vals because some shells have a limit on
7250 # the size of here documents, and old seds have small limits too.
7253 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
7256 ac_lines=`grep -c . conftest.vals`
7257 # grep -c gives empty output for an empty file on some AIX systems.
7258 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
7259 # Write chunks of a limited-size here document to conftest.frag.
7260 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
7261 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
7262 echo 'CEOF' >> $CONFIG_STATUS
7263 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
7265 mv conftest.tail conftest.vals
7269 # Run sed to substitute the contents of conftest.frag into conftest.in at the
7271 echo ' cat >> conftest.edit <<CEOF
7272 /@DEFS@/r conftest.frag
7275 sed -f conftest.edit conftest.in > conftest.out
7277 mv conftest.out conftest.in
7278 rm -f conftest.edit conftest.frag
7282 cat >> $CONFIG_STATUS <<\EOF
7283 rm -f conftest.frag conftest.h
7284 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
7285 cat conftest.in >> conftest.h
7287 if cmp -s $ac_file conftest.h 2>/dev/null; then
7288 echo "$ac_file is unchanged"
7291 # Remove last slash and all that follows it. Not all systems have dirname.
7292 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
7293 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
7294 # The file is in a subdirectory.
7295 test ! -d "$ac_dir" && mkdir "$ac_dir"
7298 mv conftest.h $ac_file
7303 cat >> $CONFIG_STATUS <<EOF
7304 # Extra initialization commands, if any
7309 cat >> $CONFIG_STATUS <<\EOF
7310 # Extra commands, if any
7315 if test ! -d $srcdir/$cf_dir; then
7317 elif test -f $srcdir/$cf_dir/programs; then
7318 $AWK -f $srcdir/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
7323 cat >>Makefile <<TEST_EOF
7325 # These rules are generated so we do not rely on suffix rules, which do not
7326 # work consistently for different make-programs (the '\$(MODEL)/' confuses
7327 # some, and the '\$x' confuses others).
7329 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
7332 cat >>Makefile <<TEST_EOF
7334 \$(MODEL)/$N.o : $N.c \\
7337 @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) $N.c
7343 chmod +x $CONFIG_STATUS
7344 rm -fr confdefs* $ac_clean_files
7345 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1