3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13.20030927
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
15 # Initialize some variables set by options.
16 # The variables have the same names as the options, with
17 # dashes changed to underlines.
19 cache_file=./config.cache
28 program_transform_name=s,x,x,
36 bindir='${exec_prefix}/bin'
37 sbindir='${exec_prefix}/sbin'
38 libexecdir='${exec_prefix}/libexec'
39 datadir='${prefix}/share'
40 sysconfdir='${prefix}/etc'
41 sharedstatedir='${prefix}/com'
42 localstatedir='${prefix}/var'
43 libdir='${exec_prefix}/lib'
44 includedir='${prefix}/include'
45 oldincludedir='/usr/include'
46 infodir='${prefix}/info'
47 mandir='${prefix}/man'
49 # Initialize some other variables.
52 SHELL=${CONFIG_SHELL-/bin/sh}
53 # Maximum number of lines to put in a shell here document.
60 # If the previous option needs an argument, assign it.
61 if test -n "$ac_prev"; then
62 eval "$ac_prev=\$ac_option"
68 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
72 # Accept the important Cygnus configure options, so we can diagnose typos.
76 -bindir | --bindir | --bindi | --bind | --bin | --bi)
78 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
79 bindir="$ac_optarg" ;;
81 -build | --build | --buil | --bui | --bu)
83 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
86 -cache-file | --cache-file | --cache-fil | --cache-fi \
87 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
89 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
90 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
91 cache_file="$ac_optarg" ;;
93 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
95 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
97 datadir="$ac_optarg" ;;
99 -disable-* | --disable-*)
100 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
101 # Reject names that are not valid shell variable names.
102 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
103 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
105 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
106 eval "enable_${ac_feature}=no" ;;
108 -enable-* | --enable-*)
109 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
110 # Reject names that are not valid shell variable names.
111 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
112 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
114 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
119 eval "enable_${ac_feature}='$ac_optarg'" ;;
121 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
122 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
123 | --exec | --exe | --ex)
124 ac_prev=exec_prefix ;;
125 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
126 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
127 | --exec=* | --exe=* | --ex=*)
128 exec_prefix="$ac_optarg" ;;
130 -gas | --gas | --ga | --g)
131 # Obsolete; use --with-gas.
134 -help | --help | --hel | --he)
135 # Omit some internal or obsolete options to make the list less imposing.
136 # This message is too long to be a string in the A/UX 3.1 sh.
138 Usage: configure [options] [host]
139 Options: [defaults in brackets after descriptions]
141 --cache-file=FILE cache test results in FILE
142 --help print this message
143 --no-create do not create output files
144 --quiet, --silent do not print \`checking...' messages
145 --version print the version of autoconf that created configure
146 Directory and file names:
147 --prefix=PREFIX install architecture-independent files in PREFIX
149 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
151 --bindir=DIR user executables in DIR [EPREFIX/bin]
152 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
153 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
154 --datadir=DIR read-only architecture-independent data in DIR
156 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
157 --sharedstatedir=DIR modifiable architecture-independent data in DIR
159 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
160 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
161 --includedir=DIR C header files in DIR [PREFIX/include]
162 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
163 --infodir=DIR info documentation in DIR [PREFIX/info]
164 --mandir=DIR man documentation in DIR [PREFIX/man]
165 --srcdir=DIR find the sources in DIR [configure dir or ..]
166 --program-prefix=PREFIX prepend PREFIX to installed program names
167 --program-suffix=SUFFIX append SUFFIX to installed program names
168 --program-transform-name=PROGRAM
169 run sed PROGRAM on installed program names
173 --build=BUILD configure for building on BUILD [BUILD=HOST]
174 --host=HOST configure for HOST [guessed]
175 --target=TARGET configure for TARGET [TARGET=HOST]
176 Features and packages:
177 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
178 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
179 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
180 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
181 --x-includes=DIR X include files are in DIR
182 --x-libraries=DIR X library files are in DIR
185 --enable and --with options recognized:
186 --enable-warnings test: turn on gcc compiler warnings
187 --with-curses-dir=DIR directory in which (n)curses is installed
188 --with-5lib use SunOS sysv-libraries
189 --with-ncursesw use wide ncurses-libraries (installed)
190 --with-ncurses use ncurses-libraries (installed)
191 --with-pdcurses compile/link with pdcurses X11 library
192 --with-x use the X Window System
193 --with-Xaw3d link with Xaw 3d library
194 --with-neXtaw link with neXT Athena library
195 --with-XawPlus link with Athena-Plus library
199 -host | --host | --hos | --ho)
201 -host=* | --host=* | --hos=* | --ho=*)
204 -includedir | --includedir | --includedi | --included | --include \
205 | --includ | --inclu | --incl | --inc)
206 ac_prev=includedir ;;
207 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
208 | --includ=* | --inclu=* | --incl=* | --inc=*)
209 includedir="$ac_optarg" ;;
211 -infodir | --infodir | --infodi | --infod | --info | --inf)
213 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
214 infodir="$ac_optarg" ;;
216 -libdir | --libdir | --libdi | --libd)
218 -libdir=* | --libdir=* | --libdi=* | --libd=*)
219 libdir="$ac_optarg" ;;
221 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
222 | --libexe | --libex | --libe)
223 ac_prev=libexecdir ;;
224 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
225 | --libexe=* | --libex=* | --libe=*)
226 libexecdir="$ac_optarg" ;;
228 -localstatedir | --localstatedir | --localstatedi | --localstated \
229 | --localstate | --localstat | --localsta | --localst \
230 | --locals | --local | --loca | --loc | --lo)
231 ac_prev=localstatedir ;;
232 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
233 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
234 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
235 localstatedir="$ac_optarg" ;;
237 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
239 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
240 mandir="$ac_optarg" ;;
243 # Obsolete; use --without-fp.
246 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
250 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
251 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
254 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
255 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
256 | --oldin | --oldi | --old | --ol | --o)
257 ac_prev=oldincludedir ;;
258 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
259 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
260 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
261 oldincludedir="$ac_optarg" ;;
263 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
265 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
266 prefix="$ac_optarg" ;;
268 -program-prefix | --program-prefix | --program-prefi | --program-pref \
269 | --program-pre | --program-pr | --program-p)
270 ac_prev=program_prefix ;;
271 -program-prefix=* | --program-prefix=* | --program-prefi=* \
272 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
273 program_prefix="$ac_optarg" ;;
275 -program-suffix | --program-suffix | --program-suffi | --program-suff \
276 | --program-suf | --program-su | --program-s)
277 ac_prev=program_suffix ;;
278 -program-suffix=* | --program-suffix=* | --program-suffi=* \
279 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
280 program_suffix="$ac_optarg" ;;
282 -program-transform-name | --program-transform-name \
283 | --program-transform-nam | --program-transform-na \
284 | --program-transform-n | --program-transform- \
285 | --program-transform | --program-transfor \
286 | --program-transfo | --program-transf \
287 | --program-trans | --program-tran \
288 | --progr-tra | --program-tr | --program-t)
289 ac_prev=program_transform_name ;;
290 -program-transform-name=* | --program-transform-name=* \
291 | --program-transform-nam=* | --program-transform-na=* \
292 | --program-transform-n=* | --program-transform-=* \
293 | --program-transform=* | --program-transfor=* \
294 | --program-transfo=* | --program-transf=* \
295 | --program-trans=* | --program-tran=* \
296 | --progr-tra=* | --program-tr=* | --program-t=*)
297 program_transform_name="$ac_optarg" ;;
299 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
300 | -silent | --silent | --silen | --sile | --sil)
303 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
305 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
307 sbindir="$ac_optarg" ;;
309 -sharedstatedir | --sharedstatedir | --sharedstatedi \
310 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
311 | --sharedst | --shareds | --shared | --share | --shar \
313 ac_prev=sharedstatedir ;;
314 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
315 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
316 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
318 sharedstatedir="$ac_optarg" ;;
320 -site | --site | --sit)
322 -site=* | --site=* | --sit=*)
325 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
327 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
328 srcdir="$ac_optarg" ;;
330 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
331 | --syscon | --sysco | --sysc | --sys | --sy)
332 ac_prev=sysconfdir ;;
333 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
334 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
335 sysconfdir="$ac_optarg" ;;
337 -target | --target | --targe | --targ | --tar | --ta | --t)
339 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
340 target="$ac_optarg" ;;
342 -v | -verbose | --verbose | --verbos | --verbo | --verb)
345 -version | --version | --versio | --versi | --vers)
346 echo "configure generated by autoconf version 2.13.20030927"
350 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
351 # Reject names that are not valid shell variable names.
352 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
353 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
355 ac_package=`echo $ac_package| sed 's/-/_/g'`
360 eval "with_${ac_package}='$ac_optarg'" ;;
362 -without-* | --without-*)
363 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
364 # Reject names that are not valid shell variable names.
365 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
366 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
368 ac_package=`echo $ac_package| sed 's/-/_/g'`
369 eval "with_${ac_package}=no" ;;
372 # Obsolete; use --with-x.
375 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
376 | --x-incl | --x-inc | --x-in | --x-i)
377 ac_prev=x_includes ;;
378 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
379 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
380 x_includes="$ac_optarg" ;;
382 -x-libraries | --x-libraries | --x-librarie | --x-librari \
383 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
384 ac_prev=x_libraries ;;
385 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
386 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
387 x_libraries="$ac_optarg" ;;
389 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
393 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
394 echo "configure: warning: $ac_option: invalid host type" 1>&2
396 if test "x$nonopt" != xNONE; then
397 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
405 if test -n "$ac_prev"; then
406 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
409 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
411 # File descriptor usage:
414 # 2 errors and warnings
415 # 3 some systems may open it to /dev/tty
416 # 4 used on the Kubota Titan
417 # 6 checking for... messages and results
418 # 5 compiler messages saved in config.log
419 if test "$silent" = yes; then
427 This file contains any messages produced by compilers while
428 running configure, to aid debugging if configure makes a mistake.
431 # Strip out --no-create and --no-recursion so they do not pile up.
432 # Also quote any args containing shell metacharacters.
437 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
438 | --no-cr | --no-c) ;;
439 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
440 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
441 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
442 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
443 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
448 # Only set these to C if already set. These must not be set unconditionally
449 # because not all systems understand e.g. LANG=C (notably SCO).
450 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
451 # Non-C LC_CTYPE values break the ctype check.
452 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
453 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
454 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
455 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
457 # confdefs.h avoids OS command line length limits that DEFS can exceed.
458 rm -rf conftest* confdefs.h
459 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
462 # A filename unique to this package, relative to the directory that
463 # configure is in, which we can look for to find out if srcdir is correct.
464 ac_unique_file=ncurses.c
466 # Find the source files, if location was not specified.
467 if test -z "$srcdir"; then
468 ac_srcdir_defaulted=yes
469 # Try the directory containing this script, then its parent.
471 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
472 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
474 if test ! -r $srcdir/$ac_unique_file; then
478 ac_srcdir_defaulted=no
480 if test ! -r $srcdir/$ac_unique_file; then
481 if test "$ac_srcdir_defaulted" = yes; then
482 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
484 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
487 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
489 # Prefer explicitly selected file to automatically selected ones.
490 if test -z "$CONFIG_SITE"; then
491 if test "x$prefix" != xNONE; then
492 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
494 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
497 for ac_site_file in $CONFIG_SITE; do
498 if test -r "$ac_site_file"; then
499 echo "loading site script $ac_site_file"
504 if test -r "$cache_file"; then
505 echo "loading cache $cache_file"
508 echo "creating cache $cache_file"
513 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
514 ac_cpp='$CPP $CPPFLAGS'
515 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
516 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
517 cross_compiling=$ac_cv_prog_cc_cross
521 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
522 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
523 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
530 ac_n= ac_c='\c' ac_t=
533 # If we find X, set shell vars x_includes and x_libraries to the
534 # paths, otherwise set no_x=yes.
535 # Uses ac_ vars as temps to allow command line to override cache and checks.
536 # --without-x overrides everything else, but does not touch the cache.
537 echo $ac_n "checking for X""... $ac_c" 1>&6
538 echo "configure:539: checking for X" >&5
541 # Check whether --with-x or --without-x was given.
542 if test "${with_x+set}" = set; then
547 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
548 if test "x$with_x" = xno; then
549 # The user explicitly disabled X.
552 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
553 # Both variables are already set.
556 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
557 echo $ac_n "(cached) $ac_c" 1>&6
559 # One or both of the vars are not set, and there is no cached value.
560 ac_x_includes=NO ac_x_libraries=NO
562 if mkdir conftestdir; then
564 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
565 cat > Imakefile <<'EOF'
567 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
569 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
570 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
571 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
572 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
573 for ac_extension in a so sl; do
574 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
575 test -f $ac_im_libdir/libX11.$ac_extension; then
576 ac_im_usrlibdir=$ac_im_libdir; break
579 # Screen out bogus values from the imake configuration. They are
580 # bogus both because they are the default anyway, and because
581 # using them would break gcc on systems where it needs fixed includes.
582 case "$ac_im_incroot" in
584 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
586 case "$ac_im_usrlibdir" in
588 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
595 if test "$ac_x_includes" = NO; then
596 # Guess where to find include files, by looking for this one X11 .h file.
597 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
599 # First, try using that file with no special directory specified.
600 cat > conftest.$ac_ext <<EOF
601 #line 602 "configure"
602 #include "confdefs.h"
603 #include <$x_direct_test_include>
605 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
606 { (eval echo configure:607: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
607 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
608 if test -z "$ac_err"; then
610 # We can compile using X headers with no special include directory.
614 echo "configure: failed program was:" >&5
615 cat conftest.$ac_ext >&5
617 # Look for the header file in a standard set of common directories.
618 # Check X11 before X11Rn because it is often a symlink to the current release.
630 /usr/local/X11/include \
631 /usr/local/X11R6/include \
632 /usr/local/X11R5/include \
633 /usr/local/X11R4/include \
635 /usr/local/include/X11 \
636 /usr/local/include/X11R6 \
637 /usr/local/include/X11R5 \
638 /usr/local/include/X11R4 \
642 /usr/XFree86/include/X11 \
646 /usr/unsupported/include \
647 /usr/athena/include \
648 /usr/local/x11r5/include \
649 /usr/lpp/Xamples/include \
651 /usr/openwin/include \
652 /usr/openwin/share/include \
655 if test -r "$ac_dir/$x_direct_test_include"; then
656 ac_x_includes=$ac_dir
662 fi # $ac_x_includes = NO
664 if test "$ac_x_libraries" = NO; then
665 # Check for the libraries.
667 test -z "$x_direct_test_library" && x_direct_test_library=Xt
668 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
670 # See if we find them without any special options.
671 # Don't add to $LIBS permanently.
673 LIBS="-l$x_direct_test_library $LIBS"
674 cat > conftest.$ac_ext <<EOF
675 #line 676 "configure"
676 #include "confdefs.h"
679 ${x_direct_test_function}()
682 if { (eval echo configure:683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
685 # We can link X programs with no special library path.
688 echo "configure: failed program was:" >&5
689 cat conftest.$ac_ext >&5
692 # First see if replacing the include by lib works.
693 # Check X11 before X11Rn because it is often a symlink to the current release.
694 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
706 /usr/local/X11R6/lib \
707 /usr/local/X11R5/lib \
708 /usr/local/X11R4/lib \
711 /usr/local/lib/X11R6 \
712 /usr/local/lib/X11R5 \
713 /usr/local/lib/X11R4 \
717 /usr/XFree86/lib/X11 \
721 /usr/unsupported/lib \
723 /usr/local/x11r5/lib \
724 /usr/lpp/Xamples/lib \
728 /usr/openwin/share/lib \
731 for ac_extension in a so sl; do
732 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
733 ac_x_libraries=$ac_dir
740 fi # $ac_x_libraries = NO
742 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
743 # Didn't find X anywhere. Cache the known absence of X.
744 ac_cv_have_x="have_x=no"
746 # Record where we found X for the cache.
747 ac_cv_have_x="have_x=yes \
748 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
755 if test "$have_x" != yes; then
756 echo "$ac_t""$have_x" 1>&6
759 # If each of the values was on the command line, it overrides each guess.
760 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
761 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
762 # Update the cache value to reflect the command line values.
763 ac_cv_have_x="have_x=yes \
764 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
765 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
772 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
775 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
778 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
779 if test -f $ac_dir/install-sh; then
781 ac_install_sh="$ac_aux_dir/install-sh -c"
783 elif test -f $ac_dir/install.sh; then
785 ac_install_sh="$ac_aux_dir/install.sh -c"
789 if test -z "$ac_aux_dir"; then
790 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
792 ac_config_guess=$ac_aux_dir/config.guess
793 ac_config_sub=$ac_aux_dir/config.sub
794 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
797 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
799 # Make sure we can run config.sub.
800 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
801 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
804 echo $ac_n "checking host system type""... $ac_c" 1>&6
805 echo "configure:806: checking host system type" >&5
808 case "$host_alias" in
812 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
813 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
815 *) host_alias=$nonopt ;;
819 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
820 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
821 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
822 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
823 echo "$ac_t""$host" 1>&6
825 system_name="$host_os"
827 system_name="`(uname -s -r) 2>/dev/null`"
828 if test -z "$system_name" ; then
829 system_name="`(hostname) 2>/dev/null`"
832 test -n "$system_name" && cat >> confdefs.h <<EOF
833 #define SYSTEM_NAME "$system_name"
836 if eval "test \"`echo '$''{'cf_cv_system_name'+set}'`\" = set"; then
837 echo $ac_n "(cached) $ac_c" 1>&6
839 cf_cv_system_name="$system_name"
843 test -z "$system_name" && system_name="$cf_cv_system_name"
844 test -n "$cf_cv_system_name" && echo "$ac_t""Configuring for $cf_cv_system_name" 1>&6
846 if test ".$system_name" != ".$cf_cv_system_name" ; then
847 echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6
848 { echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; }
852 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
853 echo "configure:854: checking whether ${MAKE-make} sets \${MAKE}" >&5
854 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
855 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
856 echo $ac_n "(cached) $ac_c" 1>&6
858 cat > conftestmake <<\EOF
860 @echo 'ac_maketemp="${MAKE}"'
862 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
863 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
864 if test -n "$ac_maketemp"; then
865 eval ac_cv_prog_make_${ac_make}_set=yes
867 eval ac_cv_prog_make_${ac_make}_set=no
871 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
872 echo "$ac_t""yes" 1>&6
875 echo "$ac_t""no" 1>&6
876 SET_MAKE="MAKE=${MAKE-make}"
879 # Extract the first word of "gcc", so it can be a program name with args.
880 set dummy gcc; ac_word=$2
881 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
882 echo "configure:883: checking for $ac_word" >&5
883 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
884 echo $ac_n "(cached) $ac_c" 1>&6
886 if test -n "$CC"; then
887 ac_cv_prog_CC="$CC" # Let the user override the test.
889 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
891 for ac_dir in $ac_dummy; do
892 test -z "$ac_dir" && ac_dir=.
893 if test -f $ac_dir/$ac_word; then
902 if test -n "$CC"; then
903 echo "$ac_t""$CC" 1>&6
905 echo "$ac_t""no" 1>&6
908 if test -z "$CC"; then
909 # Extract the first word of "cc", so it can be a program name with args.
910 set dummy cc; ac_word=$2
911 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
912 echo "configure:913: checking for $ac_word" >&5
913 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
914 echo $ac_n "(cached) $ac_c" 1>&6
916 if test -n "$CC"; then
917 ac_cv_prog_CC="$CC" # Let the user override the test.
919 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
922 for ac_dir in $ac_dummy; do
923 test -z "$ac_dir" && ac_dir=.
924 if test -f $ac_dir/$ac_word; then
925 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
934 if test $ac_prog_rejected = yes; then
935 # We found a bogon in the path, so make sure we never use it.
936 set dummy $ac_cv_prog_CC
938 if test $# -gt 0; then
939 # We chose a different compiler from the bogus one.
940 # However, it has the same basename, so the bogon will be chosen
941 # first if we set CC to just the basename; use the full file name.
943 set dummy "$ac_dir/$ac_word" "$@"
951 if test -n "$CC"; then
952 echo "$ac_t""$CC" 1>&6
954 echo "$ac_t""no" 1>&6
957 if test -z "$CC"; then
960 # Extract the first word of "cl", so it can be a program name with args.
961 set dummy cl; ac_word=$2
962 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
963 echo "configure:964: checking for $ac_word" >&5
964 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
965 echo $ac_n "(cached) $ac_c" 1>&6
967 if test -n "$CC"; then
968 ac_cv_prog_CC="$CC" # Let the user override the test.
970 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
972 for ac_dir in $ac_dummy; do
973 test -z "$ac_dir" && ac_dir=.
974 if test -f $ac_dir/$ac_word; then
983 if test -n "$CC"; then
984 echo "$ac_t""$CC" 1>&6
986 echo "$ac_t""no" 1>&6
991 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
994 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
995 echo "configure:996: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
998 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
999 ac_cpp='$CPP $CPPFLAGS'
1000 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1001 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1002 cross_compiling=$ac_cv_prog_cc_cross
1004 cat > conftest.$ac_ext << EOF
1006 #line 1007 "configure"
1007 #include "confdefs.h"
1011 if { (eval echo configure:1012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1012 ac_cv_prog_cc_works=yes
1013 # If we can't run a trivial program, we are probably using a cross compiler.
1014 if (./conftest; exit) 2>/dev/null; then
1015 ac_cv_prog_cc_cross=no
1017 ac_cv_prog_cc_cross=yes
1020 echo "configure: failed program was:" >&5
1021 cat conftest.$ac_ext >&5
1022 ac_cv_prog_cc_works=no
1026 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1027 ac_cpp='$CPP $CPPFLAGS'
1028 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1029 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1030 cross_compiling=$ac_cv_prog_cc_cross
1032 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1033 if test $ac_cv_prog_cc_works = no; then
1034 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1036 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1037 echo "configure:1038: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1038 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1039 cross_compiling=$ac_cv_prog_cc_cross
1041 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1042 echo "configure:1043: checking whether we are using GNU C" >&5
1043 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1044 echo $ac_n "(cached) $ac_c" 1>&6
1046 cat > conftest.c <<EOF
1051 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1058 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1060 if test $ac_cv_prog_gcc = yes; then
1066 ac_test_CFLAGS="${CFLAGS+set}"
1067 ac_save_CFLAGS="$CFLAGS"
1069 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1070 echo "configure:1071: checking whether ${CC-cc} accepts -g" >&5
1071 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1072 echo $ac_n "(cached) $ac_c" 1>&6
1074 echo 'void f(){}' > conftest.c
1075 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1084 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1085 if test "$ac_test_CFLAGS" = set; then
1086 CFLAGS="$ac_save_CFLAGS"
1087 elif test $ac_cv_prog_cc_g = yes; then
1088 if test "$GCC" = yes; then
1094 if test "$GCC" = yes; then
1101 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1102 echo "configure:1103: checking how to run the C preprocessor" >&5
1103 # On Suns, sometimes $CPP names a directory.
1104 if test -n "$CPP" && test -d "$CPP"; then
1107 if test -z "$CPP"; then
1108 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1109 echo $ac_n "(cached) $ac_c" 1>&6
1111 # This must be in double quotes, not single quotes, because CPP may get
1112 # substituted into the Makefile and "${CC-cc}" will confuse make.
1114 # On the NeXT, cc -E runs the code through the compiler's parser,
1115 # not just through cpp.
1116 cat > conftest.$ac_ext <<EOF
1117 #line 1118 "configure"
1118 #include "confdefs.h"
1122 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1123 { (eval echo configure:1124: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1124 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1125 if test -z "$ac_err"; then
1129 echo "configure: failed program was:" >&5
1130 cat conftest.$ac_ext >&5
1132 CPP="${CC-cc} -E -traditional-cpp"
1133 cat > conftest.$ac_ext <<EOF
1134 #line 1135 "configure"
1135 #include "confdefs.h"
1139 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1140 { (eval echo configure:1141: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1141 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1142 if test -z "$ac_err"; then
1146 echo "configure: failed program was:" >&5
1147 cat conftest.$ac_ext >&5
1149 CPP="${CC-cc} -nologo -E"
1150 cat > conftest.$ac_ext <<EOF
1151 #line 1152 "configure"
1152 #include "confdefs.h"
1156 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1157 { (eval echo configure:1158: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1158 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1159 if test -z "$ac_err"; then
1163 echo "configure: failed program was:" >&5
1164 cat conftest.$ac_ext >&5
1173 ac_cv_prog_CPP="$CPP"
1175 CPP="$ac_cv_prog_CPP"
1177 ac_cv_prog_CPP="$CPP"
1179 echo "$ac_t""$CPP" 1>&6
1181 for ac_prog in mawk gawk nawk awk
1183 # Extract the first word of "$ac_prog", so it can be a program name with args.
1184 set dummy $ac_prog; ac_word=$2
1185 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1186 echo "configure:1187: checking for $ac_word" >&5
1187 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1188 echo $ac_n "(cached) $ac_c" 1>&6
1190 if test -n "$AWK"; then
1191 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1193 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1195 for ac_dir in $ac_dummy; do
1196 test -z "$ac_dir" && ac_dir=.
1197 if test -f $ac_dir/$ac_word; then
1198 ac_cv_prog_AWK="$ac_prog"
1205 AWK="$ac_cv_prog_AWK"
1206 if test -n "$AWK"; then
1207 echo "$ac_t""$AWK" 1>&6
1209 echo "$ac_t""no" 1>&6
1212 test -n "$AWK" && break
1217 CC_SHARED_OPTS=unknown
1218 CPPFLAGS="$CPPFLAGS"
1220 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
1221 DFT_UPR_MODEL="NORMAL"
1222 ECHO_LINK='@ echo linking $@ ... ;'
1239 TINFO_ARGS='$(LIBS_CURSES)'
1240 cf_cv_abi_version=""
1241 cf_cv_rel_version=""
1246 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1247 echo "configure:1248: checking for Cygwin environment" >&5
1248 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1249 echo $ac_n "(cached) $ac_c" 1>&6
1251 cat > conftest.$ac_ext <<EOF
1252 #line 1253 "configure"
1253 #include "confdefs.h"
1258 #define __CYGWIN__ __CYGWIN32__
1263 if { (eval echo configure:1264: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1267 echo "configure: failed program was:" >&5
1268 cat conftest.$ac_ext >&5
1276 echo "$ac_t""$ac_cv_cygwin" 1>&6
1278 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1279 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1280 echo "configure:1281: checking for mingw32 environment" >&5
1281 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1282 echo $ac_n "(cached) $ac_c" 1>&6
1284 cat > conftest.$ac_ext <<EOF
1285 #line 1286 "configure"
1286 #include "confdefs.h"
1292 if { (eval echo configure:1293: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1296 echo "configure: failed program was:" >&5
1297 cat conftest.$ac_ext >&5
1305 echo "$ac_t""$ac_cv_mingw32" 1>&6
1307 test "$ac_cv_mingw32" = yes && MINGW32=yes
1310 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1311 echo "configure:1312: checking for executable suffix" >&5
1312 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1313 echo $ac_n "(cached) $ac_c" 1>&6
1315 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1319 echo 'int main () { return 0; }' > conftest.$ac_ext
1321 if { (eval echo configure:1322: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1322 for file in conftest.*; do
1324 *.c | *.o | *.obj) ;;
1325 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1329 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1332 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1337 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1338 echo "$ac_t""${ac_cv_exeext}" 1>&6
1341 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1342 echo "configure:1343: checking for object suffix" >&5
1343 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1344 echo $ac_n "(cached) $ac_c" 1>&6
1347 echo 'int i = 1;' > conftest.$ac_ext
1348 if { (eval echo configure:1349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1349 for ac_file in conftest.*; do
1352 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1356 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1361 echo "$ac_t""$ac_cv_objext" 1>&6
1362 OBJEXT=$ac_cv_objext
1363 ac_objext=$ac_cv_objext
1367 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1368 echo "configure:1369: checking for ${CC-cc} option to accept ANSI C" >&5
1369 if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
1370 echo $ac_n "(cached) $ac_c" 1>&6
1374 cf_save_CFLAGS="$CFLAGS"
1375 cf_save_CPPFLAGS="$CPPFLAGS"
1376 # Don't try gcc -ansi; that turns off useful extensions and
1377 # breaks some systems' header files.
1378 # AIX -qlanglvl=ansi
1379 # Ultrix and OSF/1 -std1
1380 # HP-UX -Aa -D_HPUX_SOURCE
1382 # UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
1383 for cf_arg in "-DCC_HAS_PROTOS" \
1388 "-Aa -D_HPUX_SOURCE" \
1395 cf_new_extra_cppflags=
1397 for cf_add_cflags in $cf_arg
1399 case $cf_fix_cppflags in
1401 case $cf_add_cflags in #(vi
1402 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1403 case $cf_add_cflags in
1405 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1407 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1408 && test -z "${cf_tst_cflags}" \
1409 && cf_fix_cppflags=yes
1411 if test $cf_fix_cppflags = yes ; then
1412 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1414 elif test "${cf_tst_cflags}" = "\"'" ; then
1415 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1421 *$cf_add_cflags) #(vi
1424 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1429 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1434 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1436 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1438 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1439 && test -z "${cf_tst_cflags}" \
1440 && cf_fix_cppflags=no
1445 if test -n "$cf_new_cflags" ; then
1447 CFLAGS="$CFLAGS $cf_new_cflags"
1450 if test -n "$cf_new_cppflags" ; then
1452 CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
1455 if test -n "$cf_new_extra_cppflags" ; then
1457 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1463 cat > conftest.$ac_ext <<EOF
1464 #line 1465 "configure"
1465 #include "confdefs.h"
1467 #ifndef CC_HAS_PROTOS
1468 #if !defined(__STDC__) || (__STDC__ != 1)
1475 int test (int i, double x);
1476 struct s1 {int (*f) (int a);};
1477 struct s2 {int (*f) (double a);};
1480 if { (eval echo configure:1481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1482 cf_cv_ansi_cc="$cf_arg"; break
1484 echo "configure: failed program was:" >&5
1485 cat conftest.$ac_ext >&5
1489 CFLAGS="$cf_save_CFLAGS"
1490 CPPFLAGS="$cf_save_CPPFLAGS"
1494 echo "$ac_t""$cf_cv_ansi_cc" 1>&6
1496 if test "$cf_cv_ansi_cc" != "no"; then
1497 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
1502 cf_new_extra_cppflags=
1504 for cf_add_cflags in $cf_cv_ansi_cc
1506 case $cf_fix_cppflags in
1508 case $cf_add_cflags in #(vi
1509 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1510 case $cf_add_cflags in
1512 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1514 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1515 && test -z "${cf_tst_cflags}" \
1516 && cf_fix_cppflags=yes
1518 if test $cf_fix_cppflags = yes ; then
1519 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1521 elif test "${cf_tst_cflags}" = "\"'" ; then
1522 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1528 *$cf_add_cflags) #(vi
1531 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1536 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1541 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1543 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1545 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1546 && test -z "${cf_tst_cflags}" \
1547 && cf_fix_cppflags=no
1552 if test -n "$cf_new_cflags" ; then
1554 CFLAGS="$CFLAGS $cf_new_cflags"
1557 if test -n "$cf_new_cppflags" ; then
1559 CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
1562 if test -n "$cf_new_extra_cppflags" ; then
1564 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1571 cat >> confdefs.h <<\EOF
1572 #define CC_HAS_PROTOS 1
1579 if test "$cf_cv_ansi_cc" = "no"; then
1580 { echo "configure: error: Your compiler does not appear to recognize prototypes.
1581 You have the following choices:
1582 a. adjust your compiler options
1583 b. get an up-to-date compiler
1584 c. use a wrapper such as unproto" 1>&2; exit 1; }
1590 if test "$GCC" = yes ; then
1591 echo $ac_n "checking version of $CC""... $ac_c" 1>&6
1592 echo "configure:1593: checking version of $CC" >&5
1593 GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1594 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1595 echo "$ac_t""$GCC_VERSION" 1>&6
1599 if ( test "$GCC" = yes || test "$GXX" = yes )
1601 echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
1602 echo "configure:1603: checking if you want to turn on gcc warnings" >&5
1604 # Check whether --enable-warnings or --disable-warnings was given.
1605 if test "${enable_warnings+set}" = set; then
1606 enableval="$enable_warnings"
1607 test "$enableval" != yes && enableval=no
1608 if test "$enableval" != "no" ; then
1619 echo "$ac_t""$with_warnings" 1>&6
1620 if test "$with_warnings" = "yes"
1627 if test "$GCC" = yes ; then
1630 echo $ac_n "checking if this is really Intel C compiler""... $ac_c" 1>&6
1631 echo "configure:1632: checking if this is really Intel C compiler" >&5
1632 cf_save_CFLAGS="$CFLAGS"
1633 CFLAGS="$CFLAGS -no-gcc"
1634 cat > conftest.$ac_ext <<EOF
1635 #line 1636 "configure"
1636 #include "confdefs.h"
1640 #ifdef __INTEL_COMPILER
1647 if { (eval echo configure:1648: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1650 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
1653 echo "configure: failed program was:" >&5
1654 cat conftest.$ac_ext >&5
1657 CFLAGS="$cf_save_CFLAGS"
1658 echo "$ac_t""$INTEL_COMPILER" 1>&6
1664 cat > conftest.$ac_ext <<EOF
1665 #line 1666 "configure"
1666 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
1669 if test "$INTEL_COMPILER" = yes
1671 # The "-wdXXX" options suppress warnings:
1672 # remark #1419: external declaration in primary source file
1673 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
1674 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
1675 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
1676 # remark #193: zero used for undefined preprocessing identifier
1677 # remark #593: variable "curs_sb_left_arrow" was set but never used
1678 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
1679 # remark #869: parameter "tw" was never referenced
1680 # remark #981: operands are evaluated in unspecified order
1681 # warning #269: invalid format string conversion
1683 echo "checking for $CC warning options" 1>&6
1684 echo "configure:1685: checking for $CC warning options" >&5
1685 cf_save_CFLAGS="$CFLAGS"
1686 EXTRA_CFLAGS="-Wall"
1699 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
1700 if { (eval echo configure:1701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1701 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
1702 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
1705 CFLAGS="$cf_save_CFLAGS"
1707 elif test "$GCC" = yes
1709 echo "checking for $CC warning options" 1>&6
1710 echo "configure:1711: checking for $CC warning options" >&5
1711 cf_save_CFLAGS="$CFLAGS"
1712 EXTRA_CFLAGS="-W -Wall"
1714 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
1716 Wbad-function-cast \
1720 Wmissing-declarations \
1721 Wmissing-prototypes \
1725 Wstrict-prototypes \
1726 Wundef $cf_warn_CONST
1728 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
1729 if { (eval echo configure:1730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1730 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
1731 case $cf_opt in #(vi
1733 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
1736 case $GCC_VERSION in
1738 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
1744 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
1747 CFLAGS="$cf_save_CFLAGS"
1757 if test "$GCC" = yes
1759 cat > conftest.i <<EOF
1761 #define GCC_PRINTF 0
1766 #ifndef GCC_NORETURN
1767 #define GCC_NORETURN /* nothing */
1770 #define GCC_UNUSED /* nothing */
1773 if test "$GCC" = yes
1775 echo "checking for $CC __attribute__ directives" 1>&6
1776 echo "configure:1777: checking for $CC __attribute__ directives" >&5
1777 cat > conftest.$ac_ext <<EOF
1778 #line 1779 "configure"
1779 #include "confdefs.h"
1780 #include "conftest.h"
1781 #include "conftest.i"
1783 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
1785 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
1788 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
1790 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
1792 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
1793 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
1794 extern void foo(void) GCC_NORETURN;
1795 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
1797 for cf_attribute in scanf printf unused noreturn
1800 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1802 cf_directive="__attribute__(($cf_attribute))"
1803 echo "checking for $CC $cf_directive" 1>&5
1804 case $cf_attribute in
1806 cat >conftest.h <<EOF
1807 #define GCC_$cf_ATTRIBUTE 1
1811 cat >conftest.h <<EOF
1812 #define GCC_$cf_ATTRIBUTE $cf_directive
1816 if { (eval echo configure:1817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1817 test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
1818 cat conftest.h >>confdefs.h
1822 fgrep define conftest.i >>confdefs.h
1828 echo $ac_n "checking if $CC -U and -D options work together""... $ac_c" 1>&6
1829 echo "configure:1830: checking if $CC -U and -D options work together" >&5
1830 if eval "test \"`echo '$''{'cf_cv_cc_u_d_options'+set}'`\" = set"; then
1831 echo $ac_n "(cached) $ac_c" 1>&6
1834 cf_save_CPPFLAGS="$CPPFLAGS"
1835 CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
1836 cat > conftest.$ac_ext <<EOF
1837 #line 1838 "configure"
1838 #include "confdefs.h"
1843 make an undefined-error
1846 make a defined-error
1851 if { (eval echo configure:1852: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1854 cf_cv_cc_u_d_options=yes
1856 echo "configure: failed program was:" >&5
1857 cat conftest.$ac_ext >&5
1860 cf_cv_cc_u_d_options=no
1863 CPPFLAGS="$cf_save_CPPFLAGS"
1867 echo "$ac_t""$cf_cv_cc_u_d_options" 1>&6
1874 cf_POSIX_C_SOURCE=199506L
1876 case $host_os in #(vi
1878 CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
1881 # 5.x headers associate
1882 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
1883 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
1884 cf_POSIX_C_SOURCE=200112L
1886 CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1889 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
1892 CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
1896 echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
1897 echo "configure:1898: checking if we must define _GNU_SOURCE" >&5
1898 if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
1899 echo $ac_n "(cached) $ac_c" 1>&6
1902 cat > conftest.$ac_ext <<EOF
1903 #line 1904 "configure"
1904 #include "confdefs.h"
1905 #include <sys/types.h>
1908 #ifndef _XOPEN_SOURCE
1913 if { (eval echo configure:1914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1917 echo "configure: failed program was:" >&5
1918 cat conftest.$ac_ext >&5
1921 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1922 cat > conftest.$ac_ext <<EOF
1923 #line 1924 "configure"
1924 #include "confdefs.h"
1925 #include <sys/types.h>
1928 #ifdef _XOPEN_SOURCE
1933 if { (eval echo configure:1934: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1937 echo "configure: failed program was:" >&5
1938 cat conftest.$ac_ext >&5
1940 cf_cv_gnu_source=yes
1950 echo "$ac_t""$cf_cv_gnu_source" 1>&6
1951 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1955 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
1958 # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
1961 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
1964 CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
1967 CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
1970 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
1973 CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
1976 echo $ac_n "checking if we should define _XOPEN_SOURCE""... $ac_c" 1>&6
1977 echo "configure:1978: checking if we should define _XOPEN_SOURCE" >&5
1978 if eval "test \"`echo '$''{'cf_cv_xopen_source'+set}'`\" = set"; then
1979 echo $ac_n "(cached) $ac_c" 1>&6
1982 cat > conftest.$ac_ext <<EOF
1983 #line 1984 "configure"
1984 #include "confdefs.h"
1985 #include <sys/types.h>
1988 #ifndef _XOPEN_SOURCE
1993 if { (eval echo configure:1994: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1995 cf_cv_xopen_source=no
1997 echo "configure: failed program was:" >&5
1998 cat conftest.$ac_ext >&5
2001 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2002 cat > conftest.$ac_ext <<EOF
2003 #line 2004 "configure"
2004 #include "confdefs.h"
2005 #include <sys/types.h>
2008 #ifdef _XOPEN_SOURCE
2013 if { (eval echo configure:2014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2015 cf_cv_xopen_source=no
2017 echo "configure: failed program was:" >&5
2018 cat conftest.$ac_ext >&5
2020 cf_cv_xopen_source=$cf_XOPEN_SOURCE
2030 echo "$ac_t""$cf_cv_xopen_source" 1>&6
2031 if test "$cf_cv_xopen_source" != no ; then
2033 # remove _XOPEN_SOURCE symbol from $CFLAGS
2034 CFLAGS=`echo "$CFLAGS" | \
2035 sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
2036 -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
2039 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
2040 CPPFLAGS=`echo "$CPPFLAGS" | \
2041 sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
2042 -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
2044 test "$cf_cv_cc_u_d_options" = yes && \
2045 CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
2046 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
2049 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
2051 cf_save_CFLAGS="$CFLAGS"
2052 cf_save_CPPFLAGS="$CPPFLAGS"
2055 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
2056 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
2057 sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
2058 -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
2061 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
2062 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
2063 sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
2064 -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
2067 echo $ac_n "checking if we should define _POSIX_C_SOURCE""... $ac_c" 1>&6
2068 echo "configure:2069: checking if we should define _POSIX_C_SOURCE" >&5
2069 if eval "test \"`echo '$''{'cf_cv_posix_c_source'+set}'`\" = set"; then
2070 echo $ac_n "(cached) $ac_c" 1>&6
2074 echo "(line 2075) testing if the symbol is already defined go no further ..." 1>&5
2076 cat > conftest.$ac_ext <<EOF
2077 #line 2078 "configure"
2078 #include "confdefs.h"
2079 #include <sys/types.h>
2082 #ifndef _POSIX_C_SOURCE
2087 if { (eval echo configure:2088: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2089 cf_cv_posix_c_source=no
2091 echo "configure: failed program was:" >&5
2092 cat conftest.$ac_ext >&5
2094 cf_want_posix_source=no
2095 case .$cf_POSIX_C_SOURCE in #(vi
2097 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2100 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2101 cf_want_posix_source=yes
2104 cf_want_posix_source=yes
2107 if test "$cf_want_posix_source" = yes ; then
2108 cat > conftest.$ac_ext <<EOF
2109 #line 2110 "configure"
2110 #include "confdefs.h"
2111 #include <sys/types.h>
2114 #ifdef _POSIX_SOURCE
2119 if { (eval echo configure:2120: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2122 echo "configure: failed program was:" >&5
2123 cat conftest.$ac_ext >&5
2125 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
2130 echo "(line 2131) testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
2132 CFLAGS="$cf_trim_CFLAGS"
2133 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
2135 echo "(line 2136) testing if the second compile does not leave our definition intact error ..." 1>&5
2137 cat > conftest.$ac_ext <<EOF
2138 #line 2139 "configure"
2139 #include "confdefs.h"
2140 #include <sys/types.h>
2143 #ifndef _POSIX_C_SOURCE
2148 if { (eval echo configure:2149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2151 echo "configure: failed program was:" >&5
2152 cat conftest.$ac_ext >&5
2154 cf_cv_posix_c_source=no
2157 CFLAGS="$cf_save_CFLAGS"
2158 CPPFLAGS="$cf_save_CPPFLAGS"
2165 echo "$ac_t""$cf_cv_posix_c_source" 1>&6
2167 if test "$cf_cv_posix_c_source" != no ; then
2168 CFLAGS="$cf_trim_CFLAGS"
2169 CPPFLAGS="$cf_trim_CPPFLAGS"
2170 if test "$cf_cv_cc_u_d_options" = yes ; then
2171 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
2172 sed -e 's/-D/-U/g' -e 's/=[^ ]*//g'`
2173 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
2175 CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
2185 # Check whether --with-curses-dir or --without-curses-dir was given.
2186 if test "${with_curses_dir+set}" = set; then
2187 withval="$with_curses_dir"
2189 if test "x$prefix" != xNONE; then
2190 cf_path_syntax="$prefix"
2192 cf_path_syntax="$ac_default_prefix"
2195 case ".$withval" in #(vi
2196 .\$\(*\)*|.\'*\'*) #(vi
2200 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2203 eval withval="$withval"
2204 case ".$withval" in #(vi
2206 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2211 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2214 { echo "configure: error: expected a pathname, not \"$withval\"" 1>&2; exit 1; }
2218 cf_cv_curses_dir=$withval
2226 # Check whether --with-5lib or --without-5lib was given.
2227 if test "${with_5lib+set}" = set; then
2228 withval="$with_5lib"
2229 LIBS="-L/usr/5lib $LIBS"
2230 CPPFLAGS="$CPPFLAGS -I/usr/5include"
2235 # Check whether --with-ncursesw or --without-ncursesw was given.
2236 if test "${with_ncursesw+set}" = set; then
2237 withval="$with_ncursesw"
2238 cf_cv_screen=ncursesw
2243 # Check whether --with-ncurses or --without-ncurses was given.
2244 if test "${with_ncurses+set}" = set; then
2245 withval="$with_ncurses"
2246 cf_cv_screen=ncurses
2251 # Check whether --with-pdcurses or --without-pdcurses was given.
2252 if test "${with_pdcurses+set}" = set; then
2253 withval="$with_pdcurses"
2254 cf_cv_screen=pdcurses
2262 case $cf_cv_screen in
2266 echo $ac_n "checking for extra include directories""... $ac_c" 1>&6
2267 echo "configure:2268: checking for extra include directories" >&5
2268 if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then
2269 echo $ac_n "(cached) $ac_c" 1>&6
2272 cf_cv_curses_incdir=no
2273 case $host_os in #(vi
2275 test -d /usr/include/curses_colr && \
2276 cf_cv_curses_incdir="-I/usr/include/curses_colr"
2279 test -d /usr/5lib && \
2280 test -d /usr/5include && \
2281 cf_cv_curses_incdir="-I/usr/5include"
2287 echo "$ac_t""$cf_cv_curses_incdir" 1>&6
2288 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$cf_cv_curses_incdir $CPPFLAGS"
2291 echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
2292 echo "configure:2293: checking if we have identified curses headers" >&5
2293 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
2294 echo $ac_n "(cached) $ac_c" 1>&6
2297 cf_cv_ncurses_header=none
2304 cat > conftest.$ac_ext <<EOF
2305 #line 2306 "configure"
2306 #include "confdefs.h"
2307 #include <${cf_header}>
2309 initscr(); tgoto("?", 0,0)
2312 if { (eval echo configure:2313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2314 cf_cv_ncurses_header=$cf_header; break
2316 echo "configure: failed program was:" >&5
2317 cat conftest.$ac_ext >&5
2324 echo "$ac_t""$cf_cv_ncurses_header" 1>&6
2326 if test "$cf_cv_ncurses_header" = none ; then
2327 { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
2330 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
2331 for ac_hdr in $cf_cv_ncurses_header
2333 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2334 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2335 echo "configure:2336: checking for $ac_hdr" >&5
2336 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2337 echo $ac_n "(cached) $ac_c" 1>&6
2339 cat > conftest.$ac_ext <<EOF
2340 #line 2341 "configure"
2341 #include "confdefs.h"
2344 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2345 { (eval echo configure:2346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2346 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2347 if test -z "$ac_err"; then
2349 eval "ac_cv_header_$ac_safe=yes"
2352 echo "configure: failed program was:" >&5
2353 cat conftest.$ac_ext >&5
2355 eval "ac_cv_header_$ac_safe=no"
2359 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2360 echo "$ac_t""yes" 1>&6
2361 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2362 cat >> confdefs.h <<EOF
2363 #define $ac_tr_hdr 1
2367 echo "$ac_t""no" 1>&6
2373 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
2374 echo "configure:2375: checking for terminfo header" >&5
2375 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
2376 echo $ac_n "(cached) $ac_c" 1>&6
2379 case ${cf_cv_ncurses_header} in #(vi
2380 */ncurses.h|*/ncursesw.h) #(vi
2381 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
2384 cf_term_header=term.h
2388 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
2390 cat > conftest.$ac_ext <<EOF
2391 #line 2392 "configure"
2392 #include "confdefs.h"
2394 #include <${cf_cv_ncurses_header-curses.h}>
2398 int x = auto_left_margin
2401 if { (eval echo configure:2402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2404 cf_cv_term_header="$cf_test"
2406 echo "configure: failed program was:" >&5
2407 cat conftest.$ac_ext >&5
2410 cf_cv_term_header=unknown
2414 test "$cf_cv_term_header" != unknown && break
2419 echo "$ac_t""$cf_cv_term_header" 1>&6
2421 # Set definitions to allow ifdef'ing to accommodate subdirectories
2423 case $cf_cv_term_header in # (vi
2425 cat >> confdefs.h <<\EOF
2426 #define HAVE_TERM_H 1
2432 case $cf_cv_term_header in # (vi
2433 ncurses/term.h) #(vi
2434 cat >> confdefs.h <<\EOF
2435 #define HAVE_NCURSES_TERM_H 1
2440 cat >> confdefs.h <<\EOF
2441 #define HAVE_NCURSESW_TERM_H 1
2449 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
2450 echo "configure:2451: checking for ncurses version" >&5
2451 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
2452 echo $ac_n "(cached) $ac_c" 1>&6
2455 cf_cv_ncurses_version=no
2458 if test "$cross_compiling" = yes; then
2461 # This will not work if the preprocessor splits the line after the
2462 # Autoconf token. The 'unproto' program does that.
2463 cat > conftest.$ac_ext <<EOF
2464 #include <${cf_cv_ncurses_header-curses.h}>
2466 #ifdef NCURSES_VERSION
2467 Autoconf NCURSES_VERSION
2475 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
2476 { (eval echo configure:2477: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
2477 if test -f conftest.out ; then
2478 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
2479 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
2484 cat > conftest.$ac_ext <<EOF
2485 #line 2486 "configure"
2486 #include "confdefs.h"
2488 #include <${cf_cv_ncurses_header-curses.h}>
2492 FILE *fp = fopen("$cf_tempfile", "w");
2493 #ifdef NCURSES_VERSION
2494 # ifdef NCURSES_VERSION_PATCH
2495 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
2497 fprintf(fp, "%s\n", NCURSES_VERSION);
2501 fprintf(fp, "old\n");
2509 if { (eval echo configure:2510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2512 cf_cv_ncurses_version=`cat $cf_tempfile`
2514 echo "configure: failed program was:" >&5
2515 cat conftest.$ac_ext >&5
2524 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
2525 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
2532 echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
2533 echo "configure:2534: checking if we have identified curses libraries" >&5
2534 cat > conftest.$ac_ext <<EOF
2535 #line 2536 "configure"
2536 #include "confdefs.h"
2537 #include <${cf_cv_ncurses_header-curses.h}>
2539 initscr(); tgoto("?", 0,0)
2542 if { (eval echo configure:2543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2546 echo "configure: failed program was:" >&5
2547 cat conftest.$ac_ext >&5
2552 echo "$ac_t""$cf_result" 1>&6
2554 if test "$cf_result" = no ; then
2555 case $host_os in #(vi
2557 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
2558 echo "configure:2559: checking for tgoto in -lmytinfo" >&5
2559 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
2560 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2561 echo $ac_n "(cached) $ac_c" 1>&6
2563 ac_save_LIBS="$LIBS"
2564 LIBS="-lmytinfo $LIBS"
2565 cat > conftest.$ac_ext <<EOF
2566 #line 2567 "configure"
2567 #include "confdefs.h"
2568 /* Override any gcc2 internal prototype to avoid an error. */
2569 /* We use char because int might match the return type of a gcc2
2570 builtin and then its argument prototype would still apply. */
2577 if { (eval echo configure:2578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2579 eval "ac_cv_lib_$ac_lib_var=yes"
2581 echo "configure: failed program was:" >&5
2582 cat conftest.$ac_ext >&5
2584 eval "ac_cv_lib_$ac_lib_var=no"
2587 LIBS="$ac_save_LIBS"
2590 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2591 echo "$ac_t""yes" 1>&6
2592 LIBS="-lmytinfo $LIBS"
2594 echo "$ac_t""no" 1>&6
2599 echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
2600 echo "configure:2601: checking for initscr in -lcur_colr" >&5
2601 ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
2602 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2603 echo $ac_n "(cached) $ac_c" 1>&6
2605 ac_save_LIBS="$LIBS"
2606 LIBS="-lcur_colr $LIBS"
2607 cat > conftest.$ac_ext <<EOF
2608 #line 2609 "configure"
2609 #include "confdefs.h"
2610 /* Override any gcc2 internal prototype to avoid an error. */
2611 /* We use char because int might match the return type of a gcc2
2612 builtin and then its argument prototype would still apply. */
2619 if { (eval echo configure:2620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2621 eval "ac_cv_lib_$ac_lib_var=yes"
2623 echo "configure: failed program was:" >&5
2624 cat conftest.$ac_ext >&5
2626 eval "ac_cv_lib_$ac_lib_var=no"
2629 LIBS="$ac_save_LIBS"
2632 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2633 echo "$ac_t""yes" 1>&6
2635 LIBS="-lcur_colr $LIBS"
2636 ac_cv_func_initscr=yes
2639 echo "$ac_t""no" 1>&6
2641 echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
2642 echo "configure:2643: checking for initscr in -lHcurses" >&5
2643 ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
2644 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2645 echo $ac_n "(cached) $ac_c" 1>&6
2647 ac_save_LIBS="$LIBS"
2648 LIBS="-lHcurses $LIBS"
2649 cat > conftest.$ac_ext <<EOF
2650 #line 2651 "configure"
2651 #include "confdefs.h"
2652 /* Override any gcc2 internal prototype to avoid an error. */
2653 /* We use char because int might match the return type of a gcc2
2654 builtin and then its argument prototype would still apply. */
2661 if { (eval echo configure:2662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2663 eval "ac_cv_lib_$ac_lib_var=yes"
2665 echo "configure: failed program was:" >&5
2666 cat conftest.$ac_ext >&5
2668 eval "ac_cv_lib_$ac_lib_var=no"
2671 LIBS="$ac_save_LIBS"
2674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2675 echo "$ac_t""yes" 1>&6
2677 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
2678 LIBS="-lHcurses $LIBS"
2679 CPPFLAGS="-D__HP_CURSES -D_HP_CURSES $CPPFLAGS"
2680 ac_cv_func_initscr=yes
2683 echo "$ac_t""no" 1>&6
2689 linux*) # Suse Linux does not follow /usr/lib convention
2693 test -d /usr/5lib && \
2694 LIBS="$LIBS -L/usr/5lib -lcurses -ltermcap"
2695 ac_cv_func_initscr=yes
2699 if test ".$ac_cv_func_initscr" != .yes ; then
2700 cf_save_LIBS="$LIBS"
2704 if test ".${cf_cv_ncurses_version-no}" != .no
2706 cf_check_list="ncurses curses cursesX"
2708 cf_check_list="cursesX curses ncurses"
2711 # Check for library containing tgoto. Do this before curses library
2712 # because it may be needed to link the test-case for initscr.
2713 echo $ac_n "checking for tgoto""... $ac_c" 1>&6
2714 echo "configure:2715: checking for tgoto" >&5
2715 if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
2716 echo $ac_n "(cached) $ac_c" 1>&6
2718 cat > conftest.$ac_ext <<EOF
2719 #line 2720 "configure"
2720 #include "confdefs.h"
2721 /* System header to define __stub macros and hopefully few prototypes,
2722 which can conflict with char tgoto(); below. */
2724 /* Override any gcc2 internal prototype to avoid an error. */
2725 /* We use char because int might match the return type of a gcc2
2726 builtin and then its argument prototype would still apply. */
2731 /* The GNU C library defines this for functions which it implements
2732 to always fail with ENOSYS. Some functions are actually named
2733 something starting with __ and the normal name is an alias. */
2734 #if defined (__stub_tgoto) || defined (__stub___tgoto)
2742 if { (eval echo configure:2743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2744 eval "ac_cv_func_tgoto=yes"
2746 echo "configure: failed program was:" >&5
2747 cat conftest.$ac_ext >&5
2749 eval "ac_cv_func_tgoto=no"
2754 if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then
2755 echo "$ac_t""yes" 1>&6
2756 cf_term_lib=predefined
2758 echo "$ac_t""no" 1>&6
2760 for cf_term_lib in $cf_check_list termcap termlib unknown
2762 echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
2763 echo "configure:2764: checking for tgoto in -l$cf_term_lib" >&5
2764 ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
2765 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2766 echo $ac_n "(cached) $ac_c" 1>&6
2768 ac_save_LIBS="$LIBS"
2769 LIBS="-l$cf_term_lib $LIBS"
2770 cat > conftest.$ac_ext <<EOF
2771 #line 2772 "configure"
2772 #include "confdefs.h"
2773 /* Override any gcc2 internal prototype to avoid an error. */
2774 /* We use char because int might match the return type of a gcc2
2775 builtin and then its argument prototype would still apply. */
2782 if { (eval echo configure:2783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2784 eval "ac_cv_lib_$ac_lib_var=yes"
2786 echo "configure: failed program was:" >&5
2787 cat conftest.$ac_ext >&5
2789 eval "ac_cv_lib_$ac_lib_var=no"
2792 LIBS="$ac_save_LIBS"
2795 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2796 echo "$ac_t""yes" 1>&6
2799 echo "$ac_t""no" 1>&6
2807 # Check for library containing initscr
2808 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
2809 for cf_curs_lib in $cf_check_list xcurses jcurses unknown
2811 echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
2812 echo "configure:2813: checking for initscr in -l$cf_curs_lib" >&5
2813 ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
2814 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2815 echo $ac_n "(cached) $ac_c" 1>&6
2817 ac_save_LIBS="$LIBS"
2818 LIBS="-l$cf_curs_lib $LIBS"
2819 cat > conftest.$ac_ext <<EOF
2820 #line 2821 "configure"
2821 #include "confdefs.h"
2822 /* Override any gcc2 internal prototype to avoid an error. */
2823 /* We use char because int might match the return type of a gcc2
2824 builtin and then its argument prototype would still apply. */
2831 if { (eval echo configure:2832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2833 eval "ac_cv_lib_$ac_lib_var=yes"
2835 echo "configure: failed program was:" >&5
2836 cat conftest.$ac_ext >&5
2838 eval "ac_cv_lib_$ac_lib_var=no"
2841 LIBS="$ac_save_LIBS"
2844 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2845 echo "$ac_t""yes" 1>&6
2848 echo "$ac_t""no" 1>&6
2852 test $cf_curs_lib = unknown && { echo "configure: error: no curses library found" 1>&2; exit 1; }
2854 LIBS="-l$cf_curs_lib $cf_save_LIBS"
2855 if test "$cf_term_lib" = unknown ; then
2856 echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
2857 echo "configure:2858: checking if we can link with $cf_curs_lib library" >&5
2858 cat > conftest.$ac_ext <<EOF
2859 #line 2860 "configure"
2860 #include "confdefs.h"
2861 #include <${cf_cv_ncurses_header-curses.h}>
2866 if { (eval echo configure:2867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2870 echo "configure: failed program was:" >&5
2871 cat conftest.$ac_ext >&5
2876 echo "$ac_t""$cf_result" 1>&6
2877 test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; }
2878 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
2880 elif test "$cf_term_lib" != predefined ; then
2881 echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
2882 echo "configure:2883: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
2883 cat > conftest.$ac_ext <<EOF
2884 #line 2885 "configure"
2885 #include "confdefs.h"
2886 #include <${cf_cv_ncurses_header-curses.h}>
2888 initscr(); tgoto((char *)0, 0, 0);
2891 if { (eval echo configure:2892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2895 echo "configure: failed program was:" >&5
2896 cat conftest.$ac_ext >&5
2899 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
2900 cat > conftest.$ac_ext <<EOF
2901 #line 2902 "configure"
2902 #include "confdefs.h"
2903 #include <${cf_cv_ncurses_header-curses.h}>
2908 if { (eval echo configure:2909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2912 echo "configure: failed program was:" >&5
2913 cat conftest.$ac_ext >&5
2921 echo "$ac_t""$cf_result" 1>&6
2931 cf_ncuhdr_root=ncurses
2933 test -n "$cf_cv_curses_dir" && \
2934 test "$cf_cv_curses_dir" != "no" && \
2935 CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
2937 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
2938 echo "configure:2939: checking for $cf_ncuhdr_root header in include-path" >&5
2939 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
2940 echo $ac_n "(cached) $ac_c" 1>&6
2943 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
2944 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
2945 for cf_header in $cf_header_list
2948 cat > conftest.$ac_ext <<EOF
2949 #line 2950 "configure"
2950 #include "confdefs.h"
2953 #include <$cf_header>
2956 #ifdef NCURSES_VERSION
2958 printf("%s\n", NCURSES_VERSION);
2970 if { (eval echo configure:2971: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2972 cf_cv_ncurses_h=$cf_header
2975 echo "configure: failed program was:" >&5
2976 cat conftest.$ac_ext >&5
2982 test "$cf_cv_ncurses_h" != no && break
2987 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
2991 if test "$cf_cv_ncurses_h" != no ; then
2992 cf_cv_ncurses_header=$cf_cv_ncurses_h
2995 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
2996 echo "configure:2997: checking for $cf_ncuhdr_root include-path" >&5
2997 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
2998 echo $ac_n "(cached) $ac_c" 1>&6
3001 test -n "$verbose" && echo
3004 test -d "$HOME" && {
3005 test -n "$verbose" && echo " ... testing include-directories under $HOME"
3006 test -d "$HOME/include" && cf_search="$cf_search $HOME/include"
3007 test -d "$HOME/include/$cf_ncuhdr_root" && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
3008 test -d "$HOME/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
3011 # For other stuff under the home directory, it should be sufficient to put
3012 # a symbolic link for $HOME/$cf_ncuhdr_root to the actual package location:
3013 test -d "$HOME/$cf_ncuhdr_root" && {
3014 test -n "$verbose" && echo " ... testing include-directories under $HOME/$cf_ncuhdr_root"
3015 test -d "$HOME/$cf_ncuhdr_root/include" && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
3016 test -d "$HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3019 test "$prefix" != /usr/local && \
3020 test -d /usr/local && {
3021 test -n "$verbose" && echo " ... testing include-directories under /usr/local"
3022 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
3023 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
3024 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
3025 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
3026 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3029 test "$prefix" != NONE && \
3030 test -d $prefix && {
3031 test -n "$verbose" && echo " ... testing include-directories under $prefix"
3032 test -d $prefix/include && cf_search="$cf_search $prefix/include"
3033 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
3034 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
3035 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
3036 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3039 test "$prefix" != /opt && \
3041 test -n "$verbose" && echo " ... testing include-directories under /opt"
3042 test -d /opt/include && cf_search="$cf_search /opt/include"
3043 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
3044 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
3045 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
3046 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3049 test "$prefix" != /usr && \
3051 test -n "$verbose" && echo " ... testing include-directories under /usr"
3052 test -d /usr/include && cf_search="$cf_search /usr/include"
3053 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
3054 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
3055 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
3058 test "$includedir" != NONE && \
3059 test "$includedir" != "/usr/include" && \
3060 test -d "$includedir" && {
3061 test -d $includedir && cf_search="$cf_search $includedir"
3062 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
3065 test "$oldincludedir" != NONE && \
3066 test "$oldincludedir" != "/usr/include" && \
3067 test -d "$oldincludedir" && {
3068 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
3069 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
3073 test -n "$verbose" && echo search path $cf_search
3074 cf_save2_CPPFLAGS="$CPPFLAGS"
3075 for cf_incdir in $cf_search
3078 for cf_add_incdir in $cf_incdir
3082 case $cf_add_incdir in
3085 /usr/local/include) # (vi
3086 if test "$GCC" = yes
3088 cf_save_CPPFLAGS="$CPPFLAGS"
3089 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3090 cat > conftest.$ac_ext <<EOF
3091 #line 3092 "configure"
3092 #include "confdefs.h"
3098 if { (eval echo configure:3099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3101 echo "configure: failed program was:" >&5
3102 cat conftest.$ac_ext >&5
3104 CPPFLAGS="$cf_save_CPPFLAGS"
3110 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3113 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3114 test "$cf_top_incdir" = "$cf_add_incdir" && break
3115 cf_add_incdir="$cf_top_incdir"
3124 cat > conftest.$ac_ext <<EOF
3125 #line 3126 "configure"
3126 #include "confdefs.h"
3129 #include <$cf_header>
3132 #ifdef NCURSES_VERSION
3134 printf("%s\n", NCURSES_VERSION);
3146 if { (eval echo configure:3147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3148 cf_cv_ncurses_h2=$cf_header
3151 echo "configure: failed program was:" >&5
3152 cat conftest.$ac_ext >&5
3158 if test "$cf_cv_ncurses_h2" != no ; then
3159 cf_cv_ncurses_h2=$cf_incdir/$cf_header
3160 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
3163 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
3165 CPPFLAGS="$cf_save2_CPPFLAGS"
3166 test "$cf_cv_ncurses_h2" != no && break
3168 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
3172 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
3174 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
3175 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
3176 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
3177 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
3180 for cf_add_incdir in $cf_1st_incdir
3184 case $cf_add_incdir in
3187 /usr/local/include) # (vi
3188 if test "$GCC" = yes
3190 cf_save_CPPFLAGS="$CPPFLAGS"
3191 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3192 cat > conftest.$ac_ext <<EOF
3193 #line 3194 "configure"
3194 #include "confdefs.h"
3200 if { (eval echo configure:3201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3203 echo "configure: failed program was:" >&5
3204 cat conftest.$ac_ext >&5
3206 CPPFLAGS="$cf_save_CPPFLAGS"
3212 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3215 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3216 test "$cf_top_incdir" = "$cf_add_incdir" && break
3217 cf_add_incdir="$cf_top_incdir"
3224 # Set definitions to allow ifdef'ing for ncurses.h
3226 case $cf_cv_ncurses_header in # (vi
3228 cat >> confdefs.h <<\EOF
3229 #define HAVE_NCURSES_H 1
3235 case $cf_cv_ncurses_header in # (vi
3236 ncurses/curses.h|ncurses/ncurses.h)
3237 cat >> confdefs.h <<\EOF
3238 #define HAVE_NCURSES_NCURSES_H 1
3242 ncursesw/curses.h|ncursesw/ncurses.h)
3243 cat >> confdefs.h <<\EOF
3244 #define HAVE_NCURSESW_NCURSES_H 1
3252 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
3253 echo "configure:3254: checking for terminfo header" >&5
3254 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
3255 echo $ac_n "(cached) $ac_c" 1>&6
3258 case ${cf_cv_ncurses_header} in #(vi
3259 */ncurses.h|*/ncursesw.h) #(vi
3260 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
3263 cf_term_header=term.h
3267 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
3269 cat > conftest.$ac_ext <<EOF
3270 #line 3271 "configure"
3271 #include "confdefs.h"
3273 #include <${cf_cv_ncurses_header-curses.h}>
3277 int x = auto_left_margin
3280 if { (eval echo configure:3281: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3283 cf_cv_term_header="$cf_test"
3285 echo "configure: failed program was:" >&5
3286 cat conftest.$ac_ext >&5
3289 cf_cv_term_header=unknown
3293 test "$cf_cv_term_header" != unknown && break
3298 echo "$ac_t""$cf_cv_term_header" 1>&6
3300 # Set definitions to allow ifdef'ing to accommodate subdirectories
3302 case $cf_cv_term_header in # (vi
3304 cat >> confdefs.h <<\EOF
3305 #define HAVE_TERM_H 1
3311 case $cf_cv_term_header in # (vi
3312 ncurses/term.h) #(vi
3313 cat >> confdefs.h <<\EOF
3314 #define HAVE_NCURSES_TERM_H 1
3319 cat >> confdefs.h <<\EOF
3320 #define HAVE_NCURSESW_TERM_H 1
3327 # some applications need this, but should check for NCURSES_VERSION
3328 cat >> confdefs.h <<\EOF
3334 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
3335 echo "configure:3336: checking for ncurses version" >&5
3336 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
3337 echo $ac_n "(cached) $ac_c" 1>&6
3340 cf_cv_ncurses_version=no
3343 if test "$cross_compiling" = yes; then
3346 # This will not work if the preprocessor splits the line after the
3347 # Autoconf token. The 'unproto' program does that.
3348 cat > conftest.$ac_ext <<EOF
3349 #include <${cf_cv_ncurses_header-curses.h}>
3351 #ifdef NCURSES_VERSION
3352 Autoconf NCURSES_VERSION
3360 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
3361 { (eval echo configure:3362: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
3362 if test -f conftest.out ; then
3363 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
3364 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
3369 cat > conftest.$ac_ext <<EOF
3370 #line 3371 "configure"
3371 #include "confdefs.h"
3373 #include <${cf_cv_ncurses_header-curses.h}>
3377 FILE *fp = fopen("$cf_tempfile", "w");
3378 #ifdef NCURSES_VERSION
3379 # ifdef NCURSES_VERSION_PATCH
3380 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
3382 fprintf(fp, "%s\n", NCURSES_VERSION);
3386 fprintf(fp, "old\n");
3394 if { (eval echo configure:3395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3397 cf_cv_ncurses_version=`cat $cf_tempfile`
3399 echo "configure: failed program was:" >&5
3400 cat conftest.$ac_ext >&5
3409 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
3410 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
3418 cf_nculib_root=ncurses
3419 # This works, except for the special case where we find gpm, but
3420 # ncurses is in a nonstandard location via $LIBS, and we really want
3423 cf_ncurses_SAVE="$LIBS"
3424 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
3425 echo "configure:3426: checking for Gpm_Open in -lgpm" >&5
3426 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
3427 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3428 echo $ac_n "(cached) $ac_c" 1>&6
3430 ac_save_LIBS="$LIBS"
3432 cat > conftest.$ac_ext <<EOF
3433 #line 3434 "configure"
3434 #include "confdefs.h"
3435 /* Override any gcc2 internal prototype to avoid an error. */
3436 /* We use char because int might match the return type of a gcc2
3437 builtin and then its argument prototype would still apply. */
3444 if { (eval echo configure:3445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3446 eval "ac_cv_lib_$ac_lib_var=yes"
3448 echo "configure: failed program was:" >&5
3449 cat conftest.$ac_ext >&5
3451 eval "ac_cv_lib_$ac_lib_var=no"
3454 LIBS="$ac_save_LIBS"
3457 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3458 echo "$ac_t""yes" 1>&6
3459 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
3460 echo "configure:3461: checking for initscr in -lgpm" >&5
3461 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
3462 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3463 echo $ac_n "(cached) $ac_c" 1>&6
3465 ac_save_LIBS="$LIBS"
3467 cat > conftest.$ac_ext <<EOF
3468 #line 3469 "configure"
3469 #include "confdefs.h"
3470 /* Override any gcc2 internal prototype to avoid an error. */
3471 /* We use char because int might match the return type of a gcc2
3472 builtin and then its argument prototype would still apply. */
3479 if { (eval echo configure:3480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3481 eval "ac_cv_lib_$ac_lib_var=yes"
3483 echo "configure: failed program was:" >&5
3484 cat conftest.$ac_ext >&5
3486 eval "ac_cv_lib_$ac_lib_var=no"
3489 LIBS="$ac_save_LIBS"
3492 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3493 echo "$ac_t""yes" 1>&6
3494 LIBS="$cf_ncurses_SAVE"
3496 echo "$ac_t""no" 1>&6
3497 cf_ncurses_LIBS="-lgpm"
3501 echo "$ac_t""no" 1>&6
3505 case $host_os in #(vi
3507 # This is only necessary if you are linking against an obsolete
3508 # version of ncurses (but it should do no harm, since it's static).
3509 if test "$cf_nculib_root" = ncurses ; then
3510 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
3511 echo "configure:3512: checking for tgoto in -lmytinfo" >&5
3512 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
3513 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3514 echo $ac_n "(cached) $ac_c" 1>&6
3516 ac_save_LIBS="$LIBS"
3517 LIBS="-lmytinfo $LIBS"
3518 cat > conftest.$ac_ext <<EOF
3519 #line 3520 "configure"
3520 #include "confdefs.h"
3521 /* Override any gcc2 internal prototype to avoid an error. */
3522 /* We use char because int might match the return type of a gcc2
3523 builtin and then its argument prototype would still apply. */
3530 if { (eval echo configure:3531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3532 eval "ac_cv_lib_$ac_lib_var=yes"
3534 echo "configure: failed program was:" >&5
3535 cat conftest.$ac_ext >&5
3537 eval "ac_cv_lib_$ac_lib_var=no"
3540 LIBS="$ac_save_LIBS"
3543 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3544 echo "$ac_t""yes" 1>&6
3545 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
3547 echo "$ac_t""no" 1>&6
3554 LIBS="$cf_ncurses_LIBS $LIBS"
3556 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
3558 LIBS="-L$cf_cv_curses_dir/lib -l$cf_nculib_root $LIBS"
3561 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
3563 echo $ac_n "checking for initscr""... $ac_c" 1>&6
3564 echo "configure:3565: checking for initscr" >&5
3565 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
3566 echo $ac_n "(cached) $ac_c" 1>&6
3568 cat > conftest.$ac_ext <<EOF
3569 #line 3570 "configure"
3570 #include "confdefs.h"
3571 /* System header to define __stub macros and hopefully few prototypes,
3572 which can conflict with char initscr(); below. */
3574 /* Override any gcc2 internal prototype to avoid an error. */
3575 /* We use char because int might match the return type of a gcc2
3576 builtin and then its argument prototype would still apply. */
3581 /* The GNU C library defines this for functions which it implements
3582 to always fail with ENOSYS. Some functions are actually named
3583 something starting with __ and the normal name is an alias. */
3584 #if defined (__stub_initscr) || defined (__stub___initscr)
3592 if { (eval echo configure:3593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3594 eval "ac_cv_func_initscr=yes"
3596 echo "configure: failed program was:" >&5
3597 cat conftest.$ac_ext >&5
3599 eval "ac_cv_func_initscr=no"
3604 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
3605 echo "$ac_t""yes" 1>&6
3606 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
3608 echo "$ac_t""no" 1>&6
3610 cf_save_LIBS="$LIBS"
3611 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
3612 echo "configure:3613: checking for initscr in -l$cf_nculib_root" >&5
3613 LIBS="-l$cf_nculib_root $LIBS"
3614 cat > conftest.$ac_ext <<EOF
3615 #line 3616 "configure"
3616 #include "confdefs.h"
3617 #include <${cf_cv_ncurses_header-curses.h}>
3622 if { (eval echo configure:3623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3624 echo "$ac_t""yes" 1>&6
3625 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
3628 echo "configure: failed program was:" >&5
3629 cat conftest.$ac_ext >&5
3631 echo "$ac_t""no" 1>&6
3634 test -d "$HOME" && {
3635 test -n "$verbose" && echo " ... testing lib-directories under $HOME"
3636 test -d "$HOME/lib" && cf_search="$cf_search $HOME/lib"
3637 test -d "$HOME/lib/$cf_nculib_root" && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
3638 test -d "$HOME/lib/$cf_nculib_root/lib" && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
3641 # For other stuff under the home directory, it should be sufficient to put
3642 # a symbolic link for $HOME/$cf_nculib_root to the actual package location:
3643 test -d "$HOME/$cf_nculib_root" && {
3644 test -n "$verbose" && echo " ... testing lib-directories under $HOME/$cf_nculib_root"
3645 test -d "$HOME/$cf_nculib_root/lib" && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
3646 test -d "$HOME/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
3649 test "$prefix" != /usr/local && \
3650 test -d /usr/local && {
3651 test -n "$verbose" && echo " ... testing lib-directories under /usr/local"
3652 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
3653 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
3654 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
3655 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
3656 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
3659 test "$prefix" != NONE && \
3660 test -d $prefix && {
3661 test -n "$verbose" && echo " ... testing lib-directories under $prefix"
3662 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
3663 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
3664 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
3665 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
3666 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
3669 test "$prefix" != /opt && \
3671 test -n "$verbose" && echo " ... testing lib-directories under /opt"
3672 test -d /opt/lib && cf_search="$cf_search /opt/lib"
3673 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
3674 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
3675 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
3676 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
3679 test "$prefix" != /usr && \
3681 test -n "$verbose" && echo " ... testing lib-directories under /usr"
3682 test -d /usr/lib && cf_search="$cf_search /usr/lib"
3683 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
3684 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
3685 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
3688 for cf_libdir in $cf_search
3690 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
3691 echo "configure:3692: checking for -l$cf_nculib_root in $cf_libdir" >&5
3692 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
3693 cat > conftest.$ac_ext <<EOF
3694 #line 3695 "configure"
3695 #include "confdefs.h"
3696 #include <${cf_cv_ncurses_header-curses.h}>
3701 if { (eval echo configure:3702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3703 echo "$ac_t""yes" 1>&6
3704 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
3707 echo "configure: failed program was:" >&5
3708 cat conftest.$ac_ext >&5
3710 echo "$ac_t""no" 1>&6
3711 LIBS="$cf_save_LIBS"
3721 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
3723 if test $cf_found_library = no ; then
3724 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
3730 if test -n "$cf_ncurses_LIBS" ; then
3731 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
3732 echo "configure:3733: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
3733 cf_ncurses_SAVE="$LIBS"
3734 for p in $cf_ncurses_LIBS ; do
3735 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
3736 if test "$q" != "$LIBS" ; then
3740 cat > conftest.$ac_ext <<EOF
3741 #line 3742 "configure"
3742 #include "confdefs.h"
3743 #include <${cf_cv_ncurses_header-curses.h}>
3745 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
3748 if { (eval echo configure:3749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3750 echo "$ac_t""yes" 1>&6
3752 echo "configure: failed program was:" >&5
3753 cat conftest.$ac_ext >&5
3755 echo "$ac_t""no" 1>&6
3756 LIBS="$cf_ncurses_SAVE"
3762 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3764 cat >> confdefs.h <<EOF
3765 #define $cf_nculib_ROOT 1
3773 echo $ac_n "checking for multibyte character support""... $ac_c" 1>&6
3774 echo "configure:3775: checking for multibyte character support" >&5
3775 if eval "test \"`echo '$''{'cf_cv_utf8_lib'+set}'`\" = set"; then
3776 echo $ac_n "(cached) $ac_c" 1>&6
3779 cf_save_LIBS="$LIBS"
3780 cat > conftest.$ac_ext <<EOF
3781 #line 3782 "configure"
3782 #include "confdefs.h"
3789 if { (eval echo configure:3790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3793 echo "configure: failed program was:" >&5
3794 cat conftest.$ac_ext >&5
3797 cat > conftest.$ac_ext <<EOF
3798 #line 3799 "configure"
3799 #include "confdefs.h"
3801 #include <libutf8.h>
3806 if { (eval echo configure:3807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3808 cf_cv_utf8_lib=add-on
3810 echo "configure: failed program was:" >&5
3811 cat conftest.$ac_ext >&5
3816 LIBS="$cf_save_LIBS"
3822 echo "$ac_t""$cf_cv_utf8_lib" 1>&6
3824 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
3826 if test "$cf_cv_utf8_lib" = "add-on" ; then
3827 cat >> confdefs.h <<\EOF
3828 #define HAVE_LIBUTF8_H 1
3836 cf_ncuhdr_root=ncursesw
3838 test -n "$cf_cv_curses_dir" && \
3839 test "$cf_cv_curses_dir" != "no" && \
3840 CPPFLAGS="-I$cf_cv_curses_dir/include -I$cf_cv_curses_dir/include/$cf_ncuhdr_root $CPPFLAGS"
3842 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
3843 echo "configure:3844: checking for $cf_ncuhdr_root header in include-path" >&5
3844 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
3845 echo $ac_n "(cached) $ac_c" 1>&6
3848 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
3849 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
3850 for cf_header in $cf_header_list
3853 cat > conftest.$ac_ext <<EOF
3854 #line 3855 "configure"
3855 #include "confdefs.h"
3858 #define _XOPEN_SOURCE_EXTENDED
3859 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
3860 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
3862 #include <$cf_header>
3865 #ifdef NCURSES_VERSION
3871 printf("%s\n", NCURSES_VERSION);
3883 if { (eval echo configure:3884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3885 cf_cv_ncurses_h=$cf_header
3888 echo "configure: failed program was:" >&5
3889 cat conftest.$ac_ext >&5
3895 test "$cf_cv_ncurses_h" != no && break
3900 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
3904 if test "$cf_cv_ncurses_h" != no ; then
3905 cf_cv_ncurses_header=$cf_cv_ncurses_h
3908 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
3909 echo "configure:3910: checking for $cf_ncuhdr_root include-path" >&5
3910 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
3911 echo $ac_n "(cached) $ac_c" 1>&6
3914 test -n "$verbose" && echo
3917 test -d "$HOME" && {
3918 test -n "$verbose" && echo " ... testing include-directories under $HOME"
3919 test -d "$HOME/include" && cf_search="$cf_search $HOME/include"
3920 test -d "$HOME/include/$cf_ncuhdr_root" && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
3921 test -d "$HOME/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
3924 # For other stuff under the home directory, it should be sufficient to put
3925 # a symbolic link for $HOME/$cf_ncuhdr_root to the actual package location:
3926 test -d "$HOME/$cf_ncuhdr_root" && {
3927 test -n "$verbose" && echo " ... testing include-directories under $HOME/$cf_ncuhdr_root"
3928 test -d "$HOME/$cf_ncuhdr_root/include" && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
3929 test -d "$HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3932 test "$prefix" != /usr/local && \
3933 test -d /usr/local && {
3934 test -n "$verbose" && echo " ... testing include-directories under /usr/local"
3935 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
3936 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
3937 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
3938 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
3939 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3942 test "$prefix" != NONE && \
3943 test -d $prefix && {
3944 test -n "$verbose" && echo " ... testing include-directories under $prefix"
3945 test -d $prefix/include && cf_search="$cf_search $prefix/include"
3946 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
3947 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
3948 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
3949 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3952 test "$prefix" != /opt && \
3954 test -n "$verbose" && echo " ... testing include-directories under /opt"
3955 test -d /opt/include && cf_search="$cf_search /opt/include"
3956 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
3957 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
3958 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
3959 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3962 test "$prefix" != /usr && \
3964 test -n "$verbose" && echo " ... testing include-directories under /usr"
3965 test -d /usr/include && cf_search="$cf_search /usr/include"
3966 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
3967 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
3968 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
3971 test "$includedir" != NONE && \
3972 test "$includedir" != "/usr/include" && \
3973 test -d "$includedir" && {
3974 test -d $includedir && cf_search="$cf_search $includedir"
3975 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
3978 test "$oldincludedir" != NONE && \
3979 test "$oldincludedir" != "/usr/include" && \
3980 test -d "$oldincludedir" && {
3981 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
3982 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
3986 test -n "$verbose" && echo search path $cf_search
3987 cf_save2_CPPFLAGS="$CPPFLAGS"
3988 for cf_incdir in $cf_search
3991 for cf_add_incdir in $cf_incdir
3995 case $cf_add_incdir in
3998 /usr/local/include) # (vi
3999 if test "$GCC" = yes
4001 cf_save_CPPFLAGS="$CPPFLAGS"
4002 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4003 cat > conftest.$ac_ext <<EOF
4004 #line 4005 "configure"
4005 #include "confdefs.h"
4011 if { (eval echo configure:4012: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4014 echo "configure: failed program was:" >&5
4015 cat conftest.$ac_ext >&5
4017 CPPFLAGS="$cf_save_CPPFLAGS"
4023 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4026 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4027 test "$cf_top_incdir" = "$cf_add_incdir" && break
4028 cf_add_incdir="$cf_top_incdir"
4037 cat > conftest.$ac_ext <<EOF
4038 #line 4039 "configure"
4039 #include "confdefs.h"
4042 #include <$cf_header>
4045 #ifdef NCURSES_VERSION
4047 printf("%s\n", NCURSES_VERSION);
4059 if { (eval echo configure:4060: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4061 cf_cv_ncurses_h2=$cf_header
4064 echo "configure: failed program was:" >&5
4065 cat conftest.$ac_ext >&5
4071 if test "$cf_cv_ncurses_h2" != no ; then
4072 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4073 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
4076 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
4078 CPPFLAGS="$cf_save2_CPPFLAGS"
4079 test "$cf_cv_ncurses_h2" != no && break
4081 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
4085 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
4087 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4088 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4089 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4090 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4093 for cf_add_incdir in $cf_1st_incdir
4097 case $cf_add_incdir in
4100 /usr/local/include) # (vi
4101 if test "$GCC" = yes
4103 cf_save_CPPFLAGS="$CPPFLAGS"
4104 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4105 cat > conftest.$ac_ext <<EOF
4106 #line 4107 "configure"
4107 #include "confdefs.h"
4113 if { (eval echo configure:4114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4116 echo "configure: failed program was:" >&5
4117 cat conftest.$ac_ext >&5
4119 CPPFLAGS="$cf_save_CPPFLAGS"
4125 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4128 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4129 test "$cf_top_incdir" = "$cf_add_incdir" && break
4130 cf_add_incdir="$cf_top_incdir"
4137 # Set definitions to allow ifdef'ing for ncurses.h
4139 case $cf_cv_ncurses_header in # (vi
4141 cat >> confdefs.h <<\EOF
4142 #define HAVE_NCURSES_H 1
4148 case $cf_cv_ncurses_header in # (vi
4149 ncurses/curses.h|ncurses/ncurses.h)
4150 cat >> confdefs.h <<\EOF
4151 #define HAVE_NCURSES_NCURSES_H 1
4155 ncursesw/curses.h|ncursesw/ncurses.h)
4156 cat >> confdefs.h <<\EOF
4157 #define HAVE_NCURSESW_NCURSES_H 1
4165 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
4166 echo "configure:4167: checking for terminfo header" >&5
4167 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
4168 echo $ac_n "(cached) $ac_c" 1>&6
4171 case ${cf_cv_ncurses_header} in #(vi
4172 */ncurses.h|*/ncursesw.h) #(vi
4173 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4176 cf_term_header=term.h
4180 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4182 cat > conftest.$ac_ext <<EOF
4183 #line 4184 "configure"
4184 #include "confdefs.h"
4186 #include <${cf_cv_ncurses_header-curses.h}>
4190 int x = auto_left_margin
4193 if { (eval echo configure:4194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4196 cf_cv_term_header="$cf_test"
4198 echo "configure: failed program was:" >&5
4199 cat conftest.$ac_ext >&5
4202 cf_cv_term_header=unknown
4206 test "$cf_cv_term_header" != unknown && break
4211 echo "$ac_t""$cf_cv_term_header" 1>&6
4213 # Set definitions to allow ifdef'ing to accommodate subdirectories
4215 case $cf_cv_term_header in # (vi
4217 cat >> confdefs.h <<\EOF
4218 #define HAVE_TERM_H 1
4224 case $cf_cv_term_header in # (vi
4225 ncurses/term.h) #(vi
4226 cat >> confdefs.h <<\EOF
4227 #define HAVE_NCURSES_TERM_H 1
4232 cat >> confdefs.h <<\EOF
4233 #define HAVE_NCURSESW_TERM_H 1
4240 # some applications need this, but should check for NCURSES_VERSION
4241 cat >> confdefs.h <<\EOF
4247 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
4248 echo "configure:4249: checking for ncurses version" >&5
4249 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
4250 echo $ac_n "(cached) $ac_c" 1>&6
4253 cf_cv_ncurses_version=no
4256 if test "$cross_compiling" = yes; then
4259 # This will not work if the preprocessor splits the line after the
4260 # Autoconf token. The 'unproto' program does that.
4261 cat > conftest.$ac_ext <<EOF
4262 #include <${cf_cv_ncurses_header-curses.h}>
4264 #ifdef NCURSES_VERSION
4265 Autoconf NCURSES_VERSION
4273 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4274 { (eval echo configure:4275: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
4275 if test -f conftest.out ; then
4276 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4277 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4282 cat > conftest.$ac_ext <<EOF
4283 #line 4284 "configure"
4284 #include "confdefs.h"
4286 #include <${cf_cv_ncurses_header-curses.h}>
4290 FILE *fp = fopen("$cf_tempfile", "w");
4291 #ifdef NCURSES_VERSION
4292 # ifdef NCURSES_VERSION_PATCH
4293 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4295 fprintf(fp, "%s\n", NCURSES_VERSION);
4299 fprintf(fp, "old\n");
4307 if { (eval echo configure:4308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4310 cf_cv_ncurses_version=`cat $cf_tempfile`
4312 echo "configure: failed program was:" >&5
4313 cat conftest.$ac_ext >&5
4322 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
4323 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
4331 cf_nculib_root=ncursesw
4332 # This works, except for the special case where we find gpm, but
4333 # ncurses is in a nonstandard location via $LIBS, and we really want
4336 cf_ncurses_SAVE="$LIBS"
4337 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
4338 echo "configure:4339: checking for Gpm_Open in -lgpm" >&5
4339 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
4340 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4341 echo $ac_n "(cached) $ac_c" 1>&6
4343 ac_save_LIBS="$LIBS"
4345 cat > conftest.$ac_ext <<EOF
4346 #line 4347 "configure"
4347 #include "confdefs.h"
4348 /* Override any gcc2 internal prototype to avoid an error. */
4349 /* We use char because int might match the return type of a gcc2
4350 builtin and then its argument prototype would still apply. */
4357 if { (eval echo configure:4358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4359 eval "ac_cv_lib_$ac_lib_var=yes"
4361 echo "configure: failed program was:" >&5
4362 cat conftest.$ac_ext >&5
4364 eval "ac_cv_lib_$ac_lib_var=no"
4367 LIBS="$ac_save_LIBS"
4370 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4371 echo "$ac_t""yes" 1>&6
4372 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
4373 echo "configure:4374: checking for initscr in -lgpm" >&5
4374 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
4375 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4376 echo $ac_n "(cached) $ac_c" 1>&6
4378 ac_save_LIBS="$LIBS"
4380 cat > conftest.$ac_ext <<EOF
4381 #line 4382 "configure"
4382 #include "confdefs.h"
4383 /* Override any gcc2 internal prototype to avoid an error. */
4384 /* We use char because int might match the return type of a gcc2
4385 builtin and then its argument prototype would still apply. */
4392 if { (eval echo configure:4393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4394 eval "ac_cv_lib_$ac_lib_var=yes"
4396 echo "configure: failed program was:" >&5
4397 cat conftest.$ac_ext >&5
4399 eval "ac_cv_lib_$ac_lib_var=no"
4402 LIBS="$ac_save_LIBS"
4405 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4406 echo "$ac_t""yes" 1>&6
4407 LIBS="$cf_ncurses_SAVE"
4409 echo "$ac_t""no" 1>&6
4410 cf_ncurses_LIBS="-lgpm"
4414 echo "$ac_t""no" 1>&6
4418 case $host_os in #(vi
4420 # This is only necessary if you are linking against an obsolete
4421 # version of ncurses (but it should do no harm, since it's static).
4422 if test "$cf_nculib_root" = ncurses ; then
4423 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
4424 echo "configure:4425: checking for tgoto in -lmytinfo" >&5
4425 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
4426 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4427 echo $ac_n "(cached) $ac_c" 1>&6
4429 ac_save_LIBS="$LIBS"
4430 LIBS="-lmytinfo $LIBS"
4431 cat > conftest.$ac_ext <<EOF
4432 #line 4433 "configure"
4433 #include "confdefs.h"
4434 /* Override any gcc2 internal prototype to avoid an error. */
4435 /* We use char because int might match the return type of a gcc2
4436 builtin and then its argument prototype would still apply. */
4443 if { (eval echo configure:4444: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4445 eval "ac_cv_lib_$ac_lib_var=yes"
4447 echo "configure: failed program was:" >&5
4448 cat conftest.$ac_ext >&5
4450 eval "ac_cv_lib_$ac_lib_var=no"
4453 LIBS="$ac_save_LIBS"
4456 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4457 echo "$ac_t""yes" 1>&6
4458 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
4460 echo "$ac_t""no" 1>&6
4467 LIBS="$cf_ncurses_LIBS $LIBS"
4469 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4471 LIBS="-L$cf_cv_curses_dir/lib -l$cf_nculib_root $LIBS"
4474 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
4476 echo $ac_n "checking for initscr""... $ac_c" 1>&6
4477 echo "configure:4478: checking for initscr" >&5
4478 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
4479 echo $ac_n "(cached) $ac_c" 1>&6
4481 cat > conftest.$ac_ext <<EOF
4482 #line 4483 "configure"
4483 #include "confdefs.h"
4484 /* System header to define __stub macros and hopefully few prototypes,
4485 which can conflict with char initscr(); below. */
4487 /* Override any gcc2 internal prototype to avoid an error. */
4488 /* We use char because int might match the return type of a gcc2
4489 builtin and then its argument prototype would still apply. */
4494 /* The GNU C library defines this for functions which it implements
4495 to always fail with ENOSYS. Some functions are actually named
4496 something starting with __ and the normal name is an alias. */
4497 #if defined (__stub_initscr) || defined (__stub___initscr)
4505 if { (eval echo configure:4506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4507 eval "ac_cv_func_initscr=yes"
4509 echo "configure: failed program was:" >&5
4510 cat conftest.$ac_ext >&5
4512 eval "ac_cv_func_initscr=no"
4517 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
4518 echo "$ac_t""yes" 1>&6
4519 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4521 echo "$ac_t""no" 1>&6
4523 cf_save_LIBS="$LIBS"
4524 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
4525 echo "configure:4526: checking for initscr in -l$cf_nculib_root" >&5
4526 LIBS="-l$cf_nculib_root $LIBS"
4527 cat > conftest.$ac_ext <<EOF
4528 #line 4529 "configure"
4529 #include "confdefs.h"
4530 #include <${cf_cv_ncurses_header-curses.h}>
4535 if { (eval echo configure:4536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4537 echo "$ac_t""yes" 1>&6
4538 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4541 echo "configure: failed program was:" >&5
4542 cat conftest.$ac_ext >&5
4544 echo "$ac_t""no" 1>&6
4547 test -d "$HOME" && {
4548 test -n "$verbose" && echo " ... testing lib-directories under $HOME"
4549 test -d "$HOME/lib" && cf_search="$cf_search $HOME/lib"
4550 test -d "$HOME/lib/$cf_nculib_root" && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
4551 test -d "$HOME/lib/$cf_nculib_root/lib" && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
4554 # For other stuff under the home directory, it should be sufficient to put
4555 # a symbolic link for $HOME/$cf_nculib_root to the actual package location:
4556 test -d "$HOME/$cf_nculib_root" && {
4557 test -n "$verbose" && echo " ... testing lib-directories under $HOME/$cf_nculib_root"
4558 test -d "$HOME/$cf_nculib_root/lib" && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
4559 test -d "$HOME/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
4562 test "$prefix" != /usr/local && \
4563 test -d /usr/local && {
4564 test -n "$verbose" && echo " ... testing lib-directories under /usr/local"
4565 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
4566 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
4567 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
4568 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
4569 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
4572 test "$prefix" != NONE && \
4573 test -d $prefix && {
4574 test -n "$verbose" && echo " ... testing lib-directories under $prefix"
4575 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
4576 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
4577 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
4578 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
4579 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
4582 test "$prefix" != /opt && \
4584 test -n "$verbose" && echo " ... testing lib-directories under /opt"
4585 test -d /opt/lib && cf_search="$cf_search /opt/lib"
4586 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
4587 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
4588 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
4589 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
4592 test "$prefix" != /usr && \
4594 test -n "$verbose" && echo " ... testing lib-directories under /usr"
4595 test -d /usr/lib && cf_search="$cf_search /usr/lib"
4596 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
4597 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
4598 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
4601 for cf_libdir in $cf_search
4603 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
4604 echo "configure:4605: checking for -l$cf_nculib_root in $cf_libdir" >&5
4605 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
4606 cat > conftest.$ac_ext <<EOF
4607 #line 4608 "configure"
4608 #include "confdefs.h"
4609 #include <${cf_cv_ncurses_header-curses.h}>
4614 if { (eval echo configure:4615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4616 echo "$ac_t""yes" 1>&6
4617 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4620 echo "configure: failed program was:" >&5
4621 cat conftest.$ac_ext >&5
4623 echo "$ac_t""no" 1>&6
4624 LIBS="$cf_save_LIBS"
4634 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
4636 if test $cf_found_library = no ; then
4637 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
4643 if test -n "$cf_ncurses_LIBS" ; then
4644 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
4645 echo "configure:4646: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
4646 cf_ncurses_SAVE="$LIBS"
4647 for p in $cf_ncurses_LIBS ; do
4648 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
4649 if test "$q" != "$LIBS" ; then
4653 cat > conftest.$ac_ext <<EOF