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"