3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated automatically using autoconf version 2.13.20030927
5 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
12 ac_default_prefix=/usr/local
13 # Any additions from configure.in:
15 # Initialize some variables set by options.
16 # The variables have the same names as the options, with
17 # dashes changed to underlines.
19 cache_file=./config.cache
28 program_transform_name=s,x,x,
36 bindir='${exec_prefix}/bin'
37 sbindir='${exec_prefix}/sbin'
38 libexecdir='${exec_prefix}/libexec'
39 datadir='${prefix}/share'
40 sysconfdir='${prefix}/etc'
41 sharedstatedir='${prefix}/com'
42 localstatedir='${prefix}/var'
43 libdir='${exec_prefix}/lib'
44 includedir='${prefix}/include'
45 oldincludedir='/usr/include'
46 infodir='${prefix}/info'
47 mandir='${prefix}/man'
49 # Initialize some other variables.
52 SHELL=${CONFIG_SHELL-/bin/sh}
53 # Maximum number of lines to put in a shell here document.
60 # If the previous option needs an argument, assign it.
61 if test -n "$ac_prev"; then
62 eval "$ac_prev=\$ac_option"
68 -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
72 # Accept the important Cygnus configure options, so we can diagnose typos.
76 -bindir | --bindir | --bindi | --bind | --bin | --bi)
78 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
79 bindir="$ac_optarg" ;;
81 -build | --build | --buil | --bui | --bu)
83 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
86 -cache-file | --cache-file | --cache-fil | --cache-fi \
87 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
89 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
90 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
91 cache_file="$ac_optarg" ;;
93 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
95 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
97 datadir="$ac_optarg" ;;
99 -disable-* | --disable-*)
100 ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
101 # Reject names that are not valid shell variable names.
102 if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
103 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
105 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
106 eval "enable_${ac_feature}=no" ;;
108 -enable-* | --enable-*)
109 ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
110 # Reject names that are not valid shell variable names.
111 if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
112 { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
114 ac_feature=`echo $ac_feature| sed 's/-/_/g'`
119 eval "enable_${ac_feature}='$ac_optarg'" ;;
121 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
122 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
123 | --exec | --exe | --ex)
124 ac_prev=exec_prefix ;;
125 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
126 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
127 | --exec=* | --exe=* | --ex=*)
128 exec_prefix="$ac_optarg" ;;
130 -gas | --gas | --ga | --g)
131 # Obsolete; use --with-gas.
134 -help | --help | --hel | --he)
135 # Omit some internal or obsolete options to make the list less imposing.
136 # This message is too long to be a string in the A/UX 3.1 sh.
138 Usage: configure [options] [host]
139 Options: [defaults in brackets after descriptions]
141 --cache-file=FILE cache test results in FILE
142 --help print this message
143 --no-create do not create output files
144 --quiet, --silent do not print \`checking...' messages
145 --version print the version of autoconf that created configure
146 Directory and file names:
147 --prefix=PREFIX install architecture-independent files in PREFIX
149 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
151 --bindir=DIR user executables in DIR [EPREFIX/bin]
152 --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
153 --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
154 --datadir=DIR read-only architecture-independent data in DIR
156 --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
157 --sharedstatedir=DIR modifiable architecture-independent data in DIR
159 --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
160 --libdir=DIR object code libraries in DIR [EPREFIX/lib]
161 --includedir=DIR C header files in DIR [PREFIX/include]
162 --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
163 --infodir=DIR info documentation in DIR [PREFIX/info]
164 --mandir=DIR man documentation in DIR [PREFIX/man]
165 --srcdir=DIR find the sources in DIR [configure dir or ..]
166 --program-prefix=PREFIX prepend PREFIX to installed program names
167 --program-suffix=SUFFIX append SUFFIX to installed program names
168 --program-transform-name=PROGRAM
169 run sed PROGRAM on installed program names
173 --build=BUILD configure for building on BUILD [BUILD=HOST]
174 --host=HOST configure for HOST [guessed]
175 --target=TARGET configure for TARGET [TARGET=HOST]
176 Features and packages:
177 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
178 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
179 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
180 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
181 --x-includes=DIR X include files are in DIR
182 --x-libraries=DIR X library files are in DIR
185 --enable and --with options recognized:
186 --disable-echo display "compiling" commands
187 --enable-warnings test: turn on gcc compiler warnings
188 --with-curses-dir=DIR directory in which (n)curses is installed
189 --with-5lib use SunOS sysv-libraries
190 --with-ncursesw use wide ncurses-libraries (installed)
191 --with-ncurses use ncurses-libraries (installed)
192 --with-pdcurses compile/link with pdcurses X11 library
193 --with-x use the X Window System
194 --with-Xaw3d link with Xaw 3d library
195 --with-neXtaw link with neXT Athena library
196 --with-XawPlus link with Athena-Plus library
197 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
201 -host | --host | --hos | --ho)
203 -host=* | --host=* | --hos=* | --ho=*)
206 -includedir | --includedir | --includedi | --included | --include \
207 | --includ | --inclu | --incl | --inc)
208 ac_prev=includedir ;;
209 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
210 | --includ=* | --inclu=* | --incl=* | --inc=*)
211 includedir="$ac_optarg" ;;
213 -infodir | --infodir | --infodi | --infod | --info | --inf)
215 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
216 infodir="$ac_optarg" ;;
218 -libdir | --libdir | --libdi | --libd)
220 -libdir=* | --libdir=* | --libdi=* | --libd=*)
221 libdir="$ac_optarg" ;;
223 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
224 | --libexe | --libex | --libe)
225 ac_prev=libexecdir ;;
226 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
227 | --libexe=* | --libex=* | --libe=*)
228 libexecdir="$ac_optarg" ;;
230 -localstatedir | --localstatedir | --localstatedi | --localstated \
231 | --localstate | --localstat | --localsta | --localst \
232 | --locals | --local | --loca | --loc | --lo)
233 ac_prev=localstatedir ;;
234 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
235 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
236 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
237 localstatedir="$ac_optarg" ;;
239 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
241 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
242 mandir="$ac_optarg" ;;
245 # Obsolete; use --without-fp.
248 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
252 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
253 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
256 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
257 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
258 | --oldin | --oldi | --old | --ol | --o)
259 ac_prev=oldincludedir ;;
260 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
261 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
262 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
263 oldincludedir="$ac_optarg" ;;
265 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
267 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
268 prefix="$ac_optarg" ;;
270 -program-prefix | --program-prefix | --program-prefi | --program-pref \
271 | --program-pre | --program-pr | --program-p)
272 ac_prev=program_prefix ;;
273 -program-prefix=* | --program-prefix=* | --program-prefi=* \
274 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
275 program_prefix="$ac_optarg" ;;
277 -program-suffix | --program-suffix | --program-suffi | --program-suff \
278 | --program-suf | --program-su | --program-s)
279 ac_prev=program_suffix ;;
280 -program-suffix=* | --program-suffix=* | --program-suffi=* \
281 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
282 program_suffix="$ac_optarg" ;;
284 -program-transform-name | --program-transform-name \
285 | --program-transform-nam | --program-transform-na \
286 | --program-transform-n | --program-transform- \
287 | --program-transform | --program-transfor \
288 | --program-transfo | --program-transf \
289 | --program-trans | --program-tran \
290 | --progr-tra | --program-tr | --program-t)
291 ac_prev=program_transform_name ;;
292 -program-transform-name=* | --program-transform-name=* \
293 | --program-transform-nam=* | --program-transform-na=* \
294 | --program-transform-n=* | --program-transform-=* \
295 | --program-transform=* | --program-transfor=* \
296 | --program-transfo=* | --program-transf=* \
297 | --program-trans=* | --program-tran=* \
298 | --progr-tra=* | --program-tr=* | --program-t=*)
299 program_transform_name="$ac_optarg" ;;
301 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
302 | -silent | --silent | --silen | --sile | --sil)
305 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
307 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
309 sbindir="$ac_optarg" ;;
311 -sharedstatedir | --sharedstatedir | --sharedstatedi \
312 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
313 | --sharedst | --shareds | --shared | --share | --shar \
315 ac_prev=sharedstatedir ;;
316 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
317 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
318 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
320 sharedstatedir="$ac_optarg" ;;
322 -site | --site | --sit)
324 -site=* | --site=* | --sit=*)
327 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
329 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
330 srcdir="$ac_optarg" ;;
332 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
333 | --syscon | --sysco | --sysc | --sys | --sy)
334 ac_prev=sysconfdir ;;
335 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
336 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
337 sysconfdir="$ac_optarg" ;;
339 -target | --target | --targe | --targ | --tar | --ta | --t)
341 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
342 target="$ac_optarg" ;;
344 -v | -verbose | --verbose | --verbos | --verbo | --verb)
347 -version | --version | --versio | --versi | --vers)
348 echo "configure generated by autoconf version 2.13.20030927"
352 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
353 # Reject names that are not valid shell variable names.
354 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
355 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
357 ac_package=`echo $ac_package| sed 's/-/_/g'`
362 eval "with_${ac_package}='$ac_optarg'" ;;
364 -without-* | --without-*)
365 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
366 # Reject names that are not valid shell variable names.
367 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
368 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
370 ac_package=`echo $ac_package| sed 's/-/_/g'`
371 eval "with_${ac_package}=no" ;;
374 # Obsolete; use --with-x.
377 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
378 | --x-incl | --x-inc | --x-in | --x-i)
379 ac_prev=x_includes ;;
380 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
381 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
382 x_includes="$ac_optarg" ;;
384 -x-libraries | --x-libraries | --x-librarie | --x-librari \
385 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
386 ac_prev=x_libraries ;;
387 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
388 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
389 x_libraries="$ac_optarg" ;;
391 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
395 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
396 echo "configure: warning: $ac_option: invalid host type" 1>&2
398 if test "x$nonopt" != xNONE; then
399 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
407 if test -n "$ac_prev"; then
408 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
411 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
413 # File descriptor usage:
416 # 2 errors and warnings
417 # 3 some systems may open it to /dev/tty
418 # 4 used on the Kubota Titan
419 # 6 checking for... messages and results
420 # 5 compiler messages saved in config.log
421 if test "$silent" = yes; then
429 This file contains any messages produced by compilers while
430 running configure, to aid debugging if configure makes a mistake.
433 # Strip out --no-create and --no-recursion so they do not pile up.
434 # Also quote any args containing shell metacharacters.
439 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
440 | --no-cr | --no-c) ;;
441 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
442 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
443 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
444 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
445 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
450 # Only set these to C if already set. These must not be set unconditionally
451 # because not all systems understand e.g. LANG=C (notably SCO).
452 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
453 # Non-C LC_CTYPE values break the ctype check.
454 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
455 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
456 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
457 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
459 # confdefs.h avoids OS command line length limits that DEFS can exceed.
460 rm -rf conftest* confdefs.h
461 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
464 # A filename unique to this package, relative to the directory that
465 # configure is in, which we can look for to find out if srcdir is correct.
466 ac_unique_file=ncurses.c
468 # Find the source files, if location was not specified.
469 if test -z "$srcdir"; then
470 ac_srcdir_defaulted=yes
471 # Try the directory containing this script, then its parent.
473 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
474 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
476 if test ! -r $srcdir/$ac_unique_file; then
480 ac_srcdir_defaulted=no
482 if test ! -r $srcdir/$ac_unique_file; then
483 if test "$ac_srcdir_defaulted" = yes; then
484 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
486 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
489 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
491 # Prefer explicitly selected file to automatically selected ones.
492 if test -z "$CONFIG_SITE"; then
493 if test "x$prefix" != xNONE; then
494 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
496 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
499 for ac_site_file in $CONFIG_SITE; do
500 if test -r "$ac_site_file"; then
501 echo "loading site script $ac_site_file"
506 if test -r "$cache_file"; then
507 echo "loading cache $cache_file"
510 echo "creating cache $cache_file"
515 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
516 ac_cpp='$CPP $CPPFLAGS'
517 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
518 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
519 cross_compiling=$ac_cv_prog_cc_cross
523 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
524 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
525 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
532 ac_n= ac_c='\c' ac_t=
535 # If we find X, set shell vars x_includes and x_libraries to the
536 # paths, otherwise set no_x=yes.
537 # Uses ac_ vars as temps to allow command line to override cache and checks.
538 # --without-x overrides everything else, but does not touch the cache.
539 echo $ac_n "checking for X""... $ac_c" 1>&6
540 echo "configure:541: checking for X" >&5
543 # Check whether --with-x or --without-x was given.
544 if test "${with_x+set}" = set; then
549 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
550 if test "x$with_x" = xno; then
551 # The user explicitly disabled X.
554 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
555 # Both variables are already set.
558 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
559 echo $ac_n "(cached) $ac_c" 1>&6
561 # One or both of the vars are not set, and there is no cached value.
562 ac_x_includes=NO ac_x_libraries=NO
564 if mkdir conftestdir; then
566 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
567 cat > Imakefile <<'EOF'
569 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
571 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
572 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
573 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
574 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
575 for ac_extension in a so sl; do
576 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
577 test -f $ac_im_libdir/libX11.$ac_extension; then
578 ac_im_usrlibdir=$ac_im_libdir; break
581 # Screen out bogus values from the imake configuration. They are
582 # bogus both because they are the default anyway, and because
583 # using them would break gcc on systems where it needs fixed includes.
584 case "$ac_im_incroot" in
586 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
588 case "$ac_im_usrlibdir" in
590 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
597 if test "$ac_x_includes" = NO; then
598 # Guess where to find include files, by looking for this one X11 .h file.
599 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
601 # First, try using that file with no special directory specified.
602 cat > conftest.$ac_ext <<EOF
603 #line 604 "configure"
604 #include "confdefs.h"
605 #include <$x_direct_test_include>
607 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
608 { (eval echo configure:609: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
609 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
610 if test -z "$ac_err"; then
612 # We can compile using X headers with no special include directory.
616 echo "configure: failed program was:" >&5
617 cat conftest.$ac_ext >&5
619 # Look for the header file in a standard set of common directories.
620 # Check X11 before X11Rn because it is often a symlink to the current release.
632 /usr/local/X11/include \
633 /usr/local/X11R6/include \
634 /usr/local/X11R5/include \
635 /usr/local/X11R4/include \
637 /usr/local/include/X11 \
638 /usr/local/include/X11R6 \
639 /usr/local/include/X11R5 \
640 /usr/local/include/X11R4 \
644 /usr/XFree86/include/X11 \
648 /usr/unsupported/include \
649 /usr/athena/include \
650 /usr/local/x11r5/include \
651 /usr/lpp/Xamples/include \
653 /usr/openwin/include \
654 /usr/openwin/share/include \
657 if test -r "$ac_dir/$x_direct_test_include"; then
658 ac_x_includes=$ac_dir
664 fi # $ac_x_includes = NO
666 if test "$ac_x_libraries" = NO; then
667 # Check for the libraries.
669 test -z "$x_direct_test_library" && x_direct_test_library=Xt
670 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
672 # See if we find them without any special options.
673 # Don't add to $LIBS permanently.
675 LIBS="-l$x_direct_test_library $LIBS"
676 cat > conftest.$ac_ext <<EOF
677 #line 678 "configure"
678 #include "confdefs.h"
681 ${x_direct_test_function}()
684 if { (eval echo configure:685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
687 # We can link X programs with no special library path.
690 echo "configure: failed program was:" >&5
691 cat conftest.$ac_ext >&5
694 # First see if replacing the include by lib works.
695 # Check X11 before X11Rn because it is often a symlink to the current release.
696 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
708 /usr/local/X11R6/lib \
709 /usr/local/X11R5/lib \
710 /usr/local/X11R4/lib \
713 /usr/local/lib/X11R6 \
714 /usr/local/lib/X11R5 \
715 /usr/local/lib/X11R4 \
719 /usr/XFree86/lib/X11 \
723 /usr/unsupported/lib \
725 /usr/local/x11r5/lib \
726 /usr/lpp/Xamples/lib \
730 /usr/openwin/share/lib \
733 for ac_extension in a so sl; do
734 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
735 ac_x_libraries=$ac_dir
742 fi # $ac_x_libraries = NO
744 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
745 # Didn't find X anywhere. Cache the known absence of X.
746 ac_cv_have_x="have_x=no"
748 # Record where we found X for the cache.
749 ac_cv_have_x="have_x=yes \
750 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
757 if test "$have_x" != yes; then
758 echo "$ac_t""$have_x" 1>&6
761 # If each of the values was on the command line, it overrides each guess.
762 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
763 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
764 # Update the cache value to reflect the command line values.
765 ac_cv_have_x="have_x=yes \
766 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
767 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
774 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
777 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
780 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
781 if test -f $ac_dir/install-sh; then
783 ac_install_sh="$ac_aux_dir/install-sh -c"
785 elif test -f $ac_dir/install.sh; then
787 ac_install_sh="$ac_aux_dir/install.sh -c"
791 if test -z "$ac_aux_dir"; then
792 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
794 ac_config_guess=$ac_aux_dir/config.guess
795 ac_config_sub=$ac_aux_dir/config.sub
796 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
799 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
801 # Make sure we can run config.sub.
802 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
803 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
806 echo $ac_n "checking host system type""... $ac_c" 1>&6
807 echo "configure:808: checking host system type" >&5
810 case "$host_alias" in
814 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
815 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
817 *) host_alias=$nonopt ;;
821 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
822 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
823 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
824 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
825 echo "$ac_t""$host" 1>&6
827 system_name="$host_os"
829 system_name="`(uname -s -r) 2>/dev/null`"
830 if test -z "$system_name" ; then
831 system_name="`(hostname) 2>/dev/null`"
834 test -n "$system_name" && cat >> confdefs.h <<EOF
835 #define SYSTEM_NAME "$system_name"
838 if eval "test \"`echo '$''{'cf_cv_system_name'+set}'`\" = set"; then
839 echo $ac_n "(cached) $ac_c" 1>&6
841 cf_cv_system_name="$system_name"
845 test -z "$system_name" && system_name="$cf_cv_system_name"
846 test -n "$cf_cv_system_name" && echo "$ac_t""Configuring for $cf_cv_system_name" 1>&6
848 if test ".$system_name" != ".$cf_cv_system_name" ; then
849 echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6
850 { echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; }
854 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
855 echo "configure:856: checking whether ${MAKE-make} sets \${MAKE}" >&5
856 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
857 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
858 echo $ac_n "(cached) $ac_c" 1>&6
860 cat > conftestmake <<\EOF
862 @echo 'ac_maketemp="${MAKE}"'
864 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
865 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
866 if test -n "$ac_maketemp"; then
867 eval ac_cv_prog_make_${ac_make}_set=yes
869 eval ac_cv_prog_make_${ac_make}_set=no
873 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
874 echo "$ac_t""yes" 1>&6
877 echo "$ac_t""no" 1>&6
878 SET_MAKE="MAKE=${MAKE-make}"
881 # Extract the first word of "gcc", so it can be a program name with args.
882 set dummy gcc; ac_word=$2
883 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
884 echo "configure:885: checking for $ac_word" >&5
885 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
886 echo $ac_n "(cached) $ac_c" 1>&6
888 if test -n "$CC"; then
889 ac_cv_prog_CC="$CC" # Let the user override the test.
891 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
893 for ac_dir in $ac_dummy; do
894 test -z "$ac_dir" && ac_dir=.
895 if test -f $ac_dir/$ac_word; then
904 if test -n "$CC"; then
905 echo "$ac_t""$CC" 1>&6
907 echo "$ac_t""no" 1>&6
910 if test -z "$CC"; then
911 # Extract the first word of "cc", so it can be a program name with args.
912 set dummy cc; ac_word=$2
913 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
914 echo "configure:915: checking for $ac_word" >&5
915 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
916 echo $ac_n "(cached) $ac_c" 1>&6
918 if test -n "$CC"; then
919 ac_cv_prog_CC="$CC" # Let the user override the test.
921 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
924 for ac_dir in $ac_dummy; do
925 test -z "$ac_dir" && ac_dir=.
926 if test -f $ac_dir/$ac_word; then
927 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
936 if test $ac_prog_rejected = yes; then
937 # We found a bogon in the path, so make sure we never use it.
938 set dummy $ac_cv_prog_CC
940 if test $# -gt 0; then
941 # We chose a different compiler from the bogus one.
942 # However, it has the same basename, so the bogon will be chosen
943 # first if we set CC to just the basename; use the full file name.
945 set dummy "$ac_dir/$ac_word" "$@"
953 if test -n "$CC"; then
954 echo "$ac_t""$CC" 1>&6
956 echo "$ac_t""no" 1>&6
959 if test -z "$CC"; then
962 # Extract the first word of "cl", so it can be a program name with args.
963 set dummy cl; ac_word=$2
964 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
965 echo "configure:966: checking for $ac_word" >&5
966 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
967 echo $ac_n "(cached) $ac_c" 1>&6
969 if test -n "$CC"; then
970 ac_cv_prog_CC="$CC" # Let the user override the test.
972 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
974 for ac_dir in $ac_dummy; do
975 test -z "$ac_dir" && ac_dir=.
976 if test -f $ac_dir/$ac_word; then
985 if test -n "$CC"; then
986 echo "$ac_t""$CC" 1>&6
988 echo "$ac_t""no" 1>&6
993 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
996 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
997 echo "configure:998: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
1000 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1001 ac_cpp='$CPP $CPPFLAGS'
1002 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1003 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1004 cross_compiling=$ac_cv_prog_cc_cross
1006 cat > conftest.$ac_ext << EOF
1008 #line 1009 "configure"
1009 #include "confdefs.h"
1013 if { (eval echo configure:1014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
1014 ac_cv_prog_cc_works=yes
1015 # If we can't run a trivial program, we are probably using a cross compiler.
1016 if (./conftest; exit) 2>/dev/null; then
1017 ac_cv_prog_cc_cross=no
1019 ac_cv_prog_cc_cross=yes
1022 echo "configure: failed program was:" >&5
1023 cat conftest.$ac_ext >&5
1024 ac_cv_prog_cc_works=no
1028 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
1029 ac_cpp='$CPP $CPPFLAGS'
1030 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
1031 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
1032 cross_compiling=$ac_cv_prog_cc_cross
1034 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
1035 if test $ac_cv_prog_cc_works = no; then
1036 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
1038 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
1039 echo "configure:1040: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
1040 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
1041 cross_compiling=$ac_cv_prog_cc_cross
1043 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
1044 echo "configure:1045: checking whether we are using GNU C" >&5
1045 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
1046 echo $ac_n "(cached) $ac_c" 1>&6
1048 cat > conftest.c <<EOF
1053 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1054: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
1060 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
1062 if test $ac_cv_prog_gcc = yes; then
1068 ac_test_CFLAGS="${CFLAGS+set}"
1069 ac_save_CFLAGS="$CFLAGS"
1071 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
1072 echo "configure:1073: checking whether ${CC-cc} accepts -g" >&5
1073 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
1074 echo $ac_n "(cached) $ac_c" 1>&6
1076 echo 'void f(){}' > conftest.c
1077 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
1086 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
1087 if test "$ac_test_CFLAGS" = set; then
1088 CFLAGS="$ac_save_CFLAGS"
1089 elif test $ac_cv_prog_cc_g = yes; then
1090 if test "$GCC" = yes; then
1096 if test "$GCC" = yes; then
1103 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
1104 echo "configure:1105: checking how to run the C preprocessor" >&5
1105 # On Suns, sometimes $CPP names a directory.
1106 if test -n "$CPP" && test -d "$CPP"; then
1109 if test -z "$CPP"; then
1110 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
1111 echo $ac_n "(cached) $ac_c" 1>&6
1113 # This must be in double quotes, not single quotes, because CPP may get
1114 # substituted into the Makefile and "${CC-cc}" will confuse make.
1116 # On the NeXT, cc -E runs the code through the compiler's parser,
1117 # not just through cpp.
1118 cat > conftest.$ac_ext <<EOF
1119 #line 1120 "configure"
1120 #include "confdefs.h"
1124 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1125 { (eval echo configure:1126: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1126 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1127 if test -z "$ac_err"; then
1131 echo "configure: failed program was:" >&5
1132 cat conftest.$ac_ext >&5
1134 CPP="${CC-cc} -E -traditional-cpp"
1135 cat > conftest.$ac_ext <<EOF
1136 #line 1137 "configure"
1137 #include "confdefs.h"
1141 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1142 { (eval echo configure:1143: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1143 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1144 if test -z "$ac_err"; then
1148 echo "configure: failed program was:" >&5
1149 cat conftest.$ac_ext >&5
1151 CPP="${CC-cc} -nologo -E"
1152 cat > conftest.$ac_ext <<EOF
1153 #line 1154 "configure"
1154 #include "confdefs.h"
1158 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
1159 { (eval echo configure:1160: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
1160 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
1161 if test -z "$ac_err"; then
1165 echo "configure: failed program was:" >&5
1166 cat conftest.$ac_ext >&5
1175 ac_cv_prog_CPP="$CPP"
1177 CPP="$ac_cv_prog_CPP"
1179 ac_cv_prog_CPP="$CPP"
1181 echo "$ac_t""$CPP" 1>&6
1183 for ac_prog in mawk gawk nawk awk
1185 # Extract the first word of "$ac_prog", so it can be a program name with args.
1186 set dummy $ac_prog; ac_word=$2
1187 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1188 echo "configure:1189: checking for $ac_word" >&5
1189 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
1190 echo $ac_n "(cached) $ac_c" 1>&6
1192 if test -n "$AWK"; then
1193 ac_cv_prog_AWK="$AWK" # Let the user override the test.
1195 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1197 for ac_dir in $ac_dummy; do
1198 test -z "$ac_dir" && ac_dir=.
1199 if test -f $ac_dir/$ac_word; then
1200 ac_cv_prog_AWK="$ac_prog"
1207 AWK="$ac_cv_prog_AWK"
1208 if test -n "$AWK"; then
1209 echo "$ac_t""$AWK" 1>&6
1211 echo "$ac_t""no" 1>&6
1214 test -n "$AWK" && break
1219 CC_SHARED_OPTS=unknown
1220 CPPFLAGS="$CPPFLAGS"
1222 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
1223 DFT_UPR_MODEL="NORMAL"
1242 TINFO_ARGS='$(LIBS_CURSES)'
1243 cf_cv_abi_version=""
1244 cf_cv_rel_version=""
1249 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1250 echo "configure:1251: checking for Cygwin environment" >&5
1251 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1252 echo $ac_n "(cached) $ac_c" 1>&6
1254 cat > conftest.$ac_ext <<EOF
1255 #line 1256 "configure"
1256 #include "confdefs.h"
1261 #define __CYGWIN__ __CYGWIN32__
1266 if { (eval echo configure:1267: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1270 echo "configure: failed program was:" >&5
1271 cat conftest.$ac_ext >&5
1279 echo "$ac_t""$ac_cv_cygwin" 1>&6
1281 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1282 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1283 echo "configure:1284: checking for mingw32 environment" >&5
1284 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1285 echo $ac_n "(cached) $ac_c" 1>&6
1287 cat > conftest.$ac_ext <<EOF
1288 #line 1289 "configure"
1289 #include "confdefs.h"
1295 if { (eval echo configure:1296: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1299 echo "configure: failed program was:" >&5
1300 cat conftest.$ac_ext >&5
1308 echo "$ac_t""$ac_cv_mingw32" 1>&6
1310 test "$ac_cv_mingw32" = yes && MINGW32=yes
1313 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1314 echo "configure:1315: checking for executable suffix" >&5
1315 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1316 echo $ac_n "(cached) $ac_c" 1>&6
1318 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1322 echo 'int main () { return 0; }' > conftest.$ac_ext
1324 if { (eval echo configure:1325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1325 for file in conftest.*; do
1327 *.c | *.o | *.obj) ;;
1328 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1332 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1335 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1340 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1341 echo "$ac_t""${ac_cv_exeext}" 1>&6
1344 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1345 echo "configure:1346: checking for object suffix" >&5
1346 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1347 echo $ac_n "(cached) $ac_c" 1>&6
1350 echo 'int i = 1;' > conftest.$ac_ext
1351 if { (eval echo configure:1352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1352 for ac_file in conftest.*; do
1355 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1359 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1364 echo "$ac_t""$ac_cv_objext" 1>&6
1365 OBJEXT=$ac_cv_objext
1366 ac_objext=$ac_cv_objext
1370 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1371 echo "configure:1372: checking for ${CC-cc} option to accept ANSI C" >&5
1372 if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
1373 echo $ac_n "(cached) $ac_c" 1>&6
1377 cf_save_CFLAGS="$CFLAGS"
1378 cf_save_CPPFLAGS="$CPPFLAGS"
1379 # Don't try gcc -ansi; that turns off useful extensions and
1380 # breaks some systems' header files.
1381 # AIX -qlanglvl=ansi
1382 # Ultrix and OSF/1 -std1
1383 # HP-UX -Aa -D_HPUX_SOURCE
1385 # UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
1386 for cf_arg in "-DCC_HAS_PROTOS" \
1391 "-Aa -D_HPUX_SOURCE" \
1398 cf_new_extra_cppflags=
1400 for cf_add_cflags in $cf_arg
1402 case $cf_fix_cppflags in
1404 case $cf_add_cflags in #(vi
1405 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1406 case $cf_add_cflags in
1408 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1410 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1411 && test -z "${cf_tst_cflags}" \
1412 && cf_fix_cppflags=yes
1414 if test $cf_fix_cppflags = yes ; then
1415 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1417 elif test "${cf_tst_cflags}" = "\"'" ; then
1418 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1424 *$cf_add_cflags) #(vi
1427 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1432 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1437 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1439 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1441 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1442 && test -z "${cf_tst_cflags}" \
1443 && cf_fix_cppflags=no
1448 if test -n "$cf_new_cflags" ; then
1450 CFLAGS="$CFLAGS $cf_new_cflags"
1453 if test -n "$cf_new_cppflags" ; then
1455 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1458 if test -n "$cf_new_extra_cppflags" ; then
1460 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1466 cat > conftest.$ac_ext <<EOF
1467 #line 1468 "configure"
1468 #include "confdefs.h"
1470 #ifndef CC_HAS_PROTOS
1471 #if !defined(__STDC__) || (__STDC__ != 1)
1478 int test (int i, double x);
1479 struct s1 {int (*f) (int a);};
1480 struct s2 {int (*f) (double a);};
1483 if { (eval echo configure:1484: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1485 cf_cv_ansi_cc="$cf_arg"; break
1487 echo "configure: failed program was:" >&5
1488 cat conftest.$ac_ext >&5
1492 CFLAGS="$cf_save_CFLAGS"
1493 CPPFLAGS="$cf_save_CPPFLAGS"
1497 echo "$ac_t""$cf_cv_ansi_cc" 1>&6
1499 if test "$cf_cv_ansi_cc" != "no"; then
1500 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
1505 cf_new_extra_cppflags=
1507 for cf_add_cflags in $cf_cv_ansi_cc
1509 case $cf_fix_cppflags in
1511 case $cf_add_cflags in #(vi
1512 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1513 case $cf_add_cflags in
1515 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1517 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1518 && test -z "${cf_tst_cflags}" \
1519 && cf_fix_cppflags=yes
1521 if test $cf_fix_cppflags = yes ; then
1522 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1524 elif test "${cf_tst_cflags}" = "\"'" ; then
1525 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1531 *$cf_add_cflags) #(vi
1534 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1539 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1544 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1546 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1548 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1549 && test -z "${cf_tst_cflags}" \
1550 && cf_fix_cppflags=no
1555 if test -n "$cf_new_cflags" ; then
1557 CFLAGS="$CFLAGS $cf_new_cflags"
1560 if test -n "$cf_new_cppflags" ; then
1562 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1565 if test -n "$cf_new_extra_cppflags" ; then
1567 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1574 cat >> confdefs.h <<\EOF
1575 #define CC_HAS_PROTOS 1
1582 if test "$cf_cv_ansi_cc" = "no"; then
1583 { echo "configure: error: Your compiler does not appear to recognize prototypes.
1584 You have the following choices:
1585 a. adjust your compiler options
1586 b. get an up-to-date compiler
1587 c. use a wrapper such as unproto" 1>&2; exit 1; }
1591 if test "$GCC" = yes
1593 cat > conftest.i <<EOF
1595 #define GCC_PRINTF 0
1600 #ifndef GCC_NORETURN
1601 #define GCC_NORETURN /* nothing */
1604 #define GCC_UNUSED /* nothing */
1607 if test "$GCC" = yes
1609 echo "checking for $CC __attribute__ directives" 1>&6
1610 echo "configure:1611: checking for $CC __attribute__ directives" >&5
1611 cat > conftest.$ac_ext <<EOF
1612 #line 1613 "${as_me-configure}"
1613 #include "confdefs.h"
1614 #include "conftest.h"
1615 #include "conftest.i"
1617 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
1619 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
1622 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
1624 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
1626 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
1627 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
1628 extern void foo(void) GCC_NORETURN;
1629 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
1631 for cf_attribute in scanf printf unused noreturn
1634 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1636 cf_directive="__attribute__(($cf_attribute))"
1637 echo "checking for $CC $cf_directive" 1>&5
1638 case $cf_attribute in
1640 cat >conftest.h <<EOF
1641 #define GCC_$cf_ATTRIBUTE 1
1645 cat >conftest.h <<EOF
1646 #define GCC_$cf_ATTRIBUTE $cf_directive
1650 if { (eval echo configure:1651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1651 test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
1652 cat conftest.h >>confdefs.h
1656 fgrep define conftest.i >>confdefs.h
1662 echo $ac_n "checking if $CC -U and -D options work together""... $ac_c" 1>&6
1663 echo "configure:1664: checking if $CC -U and -D options work together" >&5
1664 if eval "test \"`echo '$''{'cf_cv_cc_u_d_options'+set}'`\" = set"; then
1665 echo $ac_n "(cached) $ac_c" 1>&6
1668 cf_save_CPPFLAGS="$CPPFLAGS"
1669 CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
1670 cat > conftest.$ac_ext <<EOF
1671 #line 1672 "configure"
1672 #include "confdefs.h"
1677 make an undefined-error
1680 make a defined-error
1685 if { (eval echo configure:1686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1688 cf_cv_cc_u_d_options=yes
1690 echo "configure: failed program was:" >&5
1691 cat conftest.$ac_ext >&5
1694 cf_cv_cc_u_d_options=no
1697 CPPFLAGS="$cf_save_CPPFLAGS"
1701 echo "$ac_t""$cf_cv_cc_u_d_options" 1>&6
1708 cf_POSIX_C_SOURCE=199506L
1710 case $host_os in #(vi
1712 CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
1714 freebsd*|dragonfly*) #(vi
1715 # 5.x headers associate
1716 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
1717 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
1718 cf_POSIX_C_SOURCE=200112L
1720 CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1723 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
1726 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
1729 CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
1731 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
1733 echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
1734 echo "configure:1735: checking if we must define _GNU_SOURCE" >&5
1735 if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
1736 echo $ac_n "(cached) $ac_c" 1>&6
1739 cat > conftest.$ac_ext <<EOF
1740 #line 1741 "configure"
1741 #include "confdefs.h"
1742 #include <sys/types.h>
1745 #ifndef _XOPEN_SOURCE
1750 if { (eval echo configure:1751: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1754 echo "configure: failed program was:" >&5
1755 cat conftest.$ac_ext >&5
1758 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1759 cat > conftest.$ac_ext <<EOF
1760 #line 1761 "configure"
1761 #include "confdefs.h"
1762 #include <sys/types.h>
1765 #ifdef _XOPEN_SOURCE
1770 if { (eval echo configure:1771: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1774 echo "configure: failed program was:" >&5
1775 cat conftest.$ac_ext >&5
1777 cf_cv_gnu_source=yes
1787 echo "$ac_t""$cf_cv_gnu_source" 1>&6
1788 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1792 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
1795 # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
1798 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
1801 CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
1804 CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
1807 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
1810 CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
1813 echo $ac_n "checking if we should define _XOPEN_SOURCE""... $ac_c" 1>&6
1814 echo "configure:1815: checking if we should define _XOPEN_SOURCE" >&5
1815 if eval "test \"`echo '$''{'cf_cv_xopen_source'+set}'`\" = set"; then
1816 echo $ac_n "(cached) $ac_c" 1>&6
1819 cat > conftest.$ac_ext <<EOF
1820 #line 1821 "configure"
1821 #include "confdefs.h"
1822 #include <sys/types.h>
1825 #ifndef _XOPEN_SOURCE
1830 if { (eval echo configure:1831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1832 cf_cv_xopen_source=no
1834 echo "configure: failed program was:" >&5
1835 cat conftest.$ac_ext >&5
1838 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1839 cat > conftest.$ac_ext <<EOF
1840 #line 1841 "configure"
1841 #include "confdefs.h"
1842 #include <sys/types.h>
1845 #ifdef _XOPEN_SOURCE
1850 if { (eval echo configure:1851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1852 cf_cv_xopen_source=no
1854 echo "configure: failed program was:" >&5
1855 cat conftest.$ac_ext >&5
1857 cf_cv_xopen_source=$cf_XOPEN_SOURCE
1867 echo "$ac_t""$cf_cv_xopen_source" 1>&6
1868 if test "$cf_cv_xopen_source" != no ; then
1870 # remove _XOPEN_SOURCE symbol from $CFLAGS
1871 CFLAGS=`echo "$CFLAGS" | \
1872 sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
1873 -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
1876 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
1877 CPPFLAGS=`echo "$CPPFLAGS" | \
1878 sed -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
1879 -e 's/-[UD]_XOPEN_SOURCE\(=[^ ]*\)\?$//g'`
1881 test "$cf_cv_cc_u_d_options" = yes && \
1882 CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
1883 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
1886 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
1888 cf_save_CFLAGS="$CFLAGS"
1889 cf_save_CPPFLAGS="$CPPFLAGS"
1892 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
1893 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
1894 sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
1895 -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
1898 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
1899 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
1900 sed -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?[ ]/ /g' \
1901 -e 's/-[UD]_POSIX_C_SOURCE\(=[^ ]*\)\?$//g'`
1904 echo $ac_n "checking if we should define _POSIX_C_SOURCE""... $ac_c" 1>&6
1905 echo "configure:1906: checking if we should define _POSIX_C_SOURCE" >&5
1906 if eval "test \"`echo '$''{'cf_cv_posix_c_source'+set}'`\" = set"; then
1907 echo $ac_n "(cached) $ac_c" 1>&6
1911 echo "${as_me-configure}:1912: testing if the symbol is already defined go no further ..." 1>&5
1913 cat > conftest.$ac_ext <<EOF
1914 #line 1915 "configure"
1915 #include "confdefs.h"
1916 #include <sys/types.h>
1919 #ifndef _POSIX_C_SOURCE
1924 if { (eval echo configure:1925: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1926 cf_cv_posix_c_source=no
1928 echo "configure: failed program was:" >&5
1929 cat conftest.$ac_ext >&5
1931 cf_want_posix_source=no
1932 case .$cf_POSIX_C_SOURCE in #(vi
1934 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
1937 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
1938 cf_want_posix_source=yes
1941 cf_want_posix_source=yes
1944 if test "$cf_want_posix_source" = yes ; then
1945 cat > conftest.$ac_ext <<EOF
1946 #line 1947 "configure"
1947 #include "confdefs.h"
1948 #include <sys/types.h>
1951 #ifdef _POSIX_SOURCE
1956 if { (eval echo configure:1957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1959 echo "configure: failed program was:" >&5
1960 cat conftest.$ac_ext >&5
1962 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
1967 echo "${as_me-configure}:1968: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
1969 CFLAGS="$cf_trim_CFLAGS"
1970 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
1972 echo "${as_me-configure}:1973: testing if the second compile does not leave our definition intact error ..." 1>&5
1974 cat > conftest.$ac_ext <<EOF
1975 #line 1976 "configure"
1976 #include "confdefs.h"
1977 #include <sys/types.h>
1980 #ifndef _POSIX_C_SOURCE
1985 if { (eval echo configure:1986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1988 echo "configure: failed program was:" >&5
1989 cat conftest.$ac_ext >&5
1991 cf_cv_posix_c_source=no
1994 CFLAGS="$cf_save_CFLAGS"
1995 CPPFLAGS="$cf_save_CPPFLAGS"
2002 echo "$ac_t""$cf_cv_posix_c_source" 1>&6
2004 if test "$cf_cv_posix_c_source" != no ; then
2005 CFLAGS="$cf_trim_CFLAGS"
2006 CPPFLAGS="$cf_trim_CPPFLAGS"
2007 if test "$cf_cv_cc_u_d_options" = yes ; then
2008 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
2009 sed -e 's/-D/-U/g' -e 's/=[^ ]*//g'`
2010 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
2012 CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
2019 echo $ac_n "checking for working const""... $ac_c" 1>&6
2020 echo "configure:2021: checking for working const" >&5
2021 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2022 echo $ac_n "(cached) $ac_c" 1>&6
2024 cat > conftest.$ac_ext <<EOF
2025 #line 2026 "configure"
2026 #include "confdefs.h"
2030 /* Ultrix mips cc rejects this. */
2031 typedef int charset[2]; const charset x;
2032 /* SunOS 4.1.1 cc rejects this. */
2033 char const *const *ccp;
2035 /* NEC SVR4.0.2 mips cc rejects this. */
2036 struct point {int x, y;};
2037 static struct point const zero = {0,0};
2038 /* AIX XL C 1.02.0.0 rejects this.
2039 It does not let you subtract one const X* pointer from another in an arm
2040 of an if-expression whose if-part is not a constant expression */
2041 const char *g = "string";
2042 ccp = &g + (g ? g-g : 0);
2043 /* HPUX 7.0 cc rejects these. */
2046 ccp = (char const *const *) p;
2047 { /* SCO 3.2v4 cc rejects this. */
2049 char const *s = 0 ? (char *) 0 : (char const *) 0;
2053 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2055 const int *foo = &x[0];
2058 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2059 typedef const int *iptr;
2063 { /* AIX XL C 1.02.0.0 rejects this saying
2064 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2065 struct s { int j; const int *ap[3]; };
2066 struct s *b; b->j = 5;
2068 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2074 if { (eval echo configure:2075: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2078 echo "configure: failed program was:" >&5
2079 cat conftest.$ac_ext >&5
2086 echo "$ac_t""$ac_cv_c_const" 1>&6
2087 if test $ac_cv_c_const = no; then
2088 cat >> confdefs.h <<\EOF
2095 echo $ac_n "checking for signal global datatype""... $ac_c" 1>&6
2096 echo "configure:2097: checking for signal global datatype" >&5
2097 if eval "test \"`echo '$''{'cf_cv_sig_atomic_t'+set}'`\" = set"; then
2098 echo $ac_n "(cached) $ac_c" 1>&6
2102 "volatile sig_atomic_t" \
2106 cat > conftest.$ac_ext <<EOF
2107 #line 2108 "configure"
2108 #include "confdefs.h"
2110 #include <sys/types.h>
2116 static void handler(int sig)
2121 signal(SIGINT, handler);
2125 if { (eval echo configure:2126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2127 cf_cv_sig_atomic_t=$cf_type
2129 echo "configure: failed program was:" >&5
2130 cat conftest.$ac_ext >&5
2132 cf_cv_sig_atomic_t=no
2135 test "$cf_cv_sig_atomic_t" != no && break
2140 echo "$ac_t""$cf_cv_sig_atomic_t" 1>&6
2141 test "$cf_cv_sig_atomic_t" != no && cat >> confdefs.h <<EOF
2142 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
2148 echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6
2149 echo "configure:2150: checking if you want to see long compiling messages" >&5
2151 # Check whether --enable-echo or --disable-echo was given.
2152 if test "${enable_echo+set}" = set; then
2153 enableval="$enable_echo"
2154 test "$enableval" != no && enableval=yes
2155 if test "$enableval" != "yes" ; then
2158 ECHO_LD='@echo linking $@;'
2159 RULE_CC=' @echo compiling $<'
2160 SHOW_CC=' @echo compiling $@'
2167 RULE_CC='# compiling'
2168 SHOW_CC='# compiling'
2177 RULE_CC='# compiling'
2178 SHOW_CC='# compiling'
2184 echo "$ac_t""$enableval" 1>&6
2194 if test "$GCC" = yes ; then
2195 echo $ac_n "checking version of $CC""... $ac_c" 1>&6
2196 echo "configure:2197: checking version of $CC" >&5
2197 GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2198 test -z "$GCC_VERSION" && GCC_VERSION=unknown
2199 echo "$ac_t""$GCC_VERSION" 1>&6
2203 if ( test "$GCC" = yes || test "$GXX" = yes )
2205 echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
2206 echo "configure:2207: checking if you want to turn on gcc warnings" >&5
2208 # Check whether --enable-warnings or --disable-warnings was given.
2209 if test "${enable_warnings+set}" = set; then
2210 enableval="$enable_warnings"
2211 test "$enableval" != yes && enableval=no
2212 if test "$enableval" != "no" ; then
2223 echo "$ac_t""$with_warnings" 1>&6
2224 if test "$with_warnings" = "yes"
2231 if test "$GCC" = yes ; then
2234 echo $ac_n "checking if this is really Intel C compiler""... $ac_c" 1>&6
2235 echo "configure:2236: checking if this is really Intel C compiler" >&5
2236 cf_save_CFLAGS="$CFLAGS"
2237 CFLAGS="$CFLAGS -no-gcc"
2238 cat > conftest.$ac_ext <<EOF
2239 #line 2240 "configure"
2240 #include "confdefs.h"
2244 #ifdef __INTEL_COMPILER
2251 if { (eval echo configure:2252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2254 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
2257 echo "configure: failed program was:" >&5
2258 cat conftest.$ac_ext >&5
2261 CFLAGS="$cf_save_CFLAGS"
2262 echo "$ac_t""$INTEL_COMPILER" 1>&6
2268 cat > conftest.$ac_ext <<EOF
2269 #line 2270 "${as_me-configure}"
2270 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
2273 if test "$INTEL_COMPILER" = yes
2275 # The "-wdXXX" options suppress warnings:
2276 # remark #1419: external declaration in primary source file
2277 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
2278 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
2279 # remark #193: zero used for undefined preprocessing identifier
2280 # remark #593: variable "curs_sb_left_arrow" was set but never used
2281 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
2282 # remark #869: parameter "tw" was never referenced
2283 # remark #981: operands are evaluated in unspecified order
2284 # warning #279: controlling expression is constant
2286 echo "checking for $CC warning options" 1>&6
2287 echo "configure:2288: checking for $CC warning options" >&5
2288 cf_save_CFLAGS="$CFLAGS"
2289 EXTRA_CFLAGS="-Wall"
2301 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
2302 if { (eval echo configure:2303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2303 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
2304 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
2307 CFLAGS="$cf_save_CFLAGS"
2309 elif test "$GCC" = yes
2311 echo "checking for $CC warning options" 1>&6
2312 echo "configure:2313: checking for $CC warning options" >&5
2313 cf_save_CFLAGS="$CFLAGS"
2314 EXTRA_CFLAGS="-W -Wall"
2316 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
2318 Wbad-function-cast \
2322 Wmissing-declarations \
2323 Wmissing-prototypes \
2327 Wstrict-prototypes \
2328 Wundef $cf_warn_CONST
2330 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
2331 if { (eval echo configure:2332: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2332 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
2333 case $cf_opt in #(vi
2335 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
2338 case $GCC_VERSION in
2340 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
2342 echo "${as_me-configure}:2343: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
2349 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
2352 CFLAGS="$cf_save_CFLAGS"
2364 # Check whether --with-curses-dir or --without-curses-dir was given.
2365 if test "${with_curses_dir+set}" = set; then
2366 withval="$with_curses_dir"
2368 if test "x$prefix" != xNONE; then
2369 cf_path_syntax="$prefix"
2371 cf_path_syntax="$ac_default_prefix"
2374 case ".$withval" in #(vi
2375 .\$\(*\)*|.\'*\'*) #(vi
2379 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2382 eval withval="$withval"
2383 case ".$withval" in #(vi
2385 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2390 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2393 { echo "configure: error: expected a pathname, not \"$withval\"" 1>&2; exit 1; }
2397 cf_cv_curses_dir=$withval
2405 # Check whether --with-5lib or --without-5lib was given.
2406 if test "${with_5lib+set}" = set; then
2407 withval="$with_5lib"
2408 LIBS="-L/usr/5lib $LIBS"
2409 CPPFLAGS="$CPPFLAGS -I/usr/5include"
2414 # Check whether --with-ncursesw or --without-ncursesw was given.
2415 if test "${with_ncursesw+set}" = set; then
2416 withval="$with_ncursesw"
2417 cf_cv_screen=ncursesw
2422 # Check whether --with-ncurses or --without-ncurses was given.
2423 if test "${with_ncurses+set}" = set; then
2424 withval="$with_ncurses"
2425 cf_cv_screen=ncurses
2430 # Check whether --with-pdcurses or --without-pdcurses was given.
2431 if test "${with_pdcurses+set}" = set; then
2432 withval="$with_pdcurses"
2433 cf_cv_screen=pdcurses
2441 case $cf_cv_screen in
2446 echo $ac_n "checking for extra include directories""... $ac_c" 1>&6
2447 echo "configure:2448: checking for extra include directories" >&5
2448 if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then
2449 echo $ac_n "(cached) $ac_c" 1>&6
2452 cf_cv_curses_incdir=no
2453 case $host_os in #(vi
2455 test -d /usr/include/curses_colr && \
2456 cf_cv_curses_incdir="-I/usr/include/curses_colr"
2459 test -d /usr/5lib && \
2460 test -d /usr/5include && \
2461 cf_cv_curses_incdir="-I/usr/5include"
2467 echo "$ac_t""$cf_cv_curses_incdir" 1>&6
2468 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
2471 echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
2472 echo "configure:2473: checking if we have identified curses headers" >&5
2473 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
2474 echo $ac_n "(cached) $ac_c" 1>&6
2477 cf_cv_ncurses_header=none
2484 cat > conftest.$ac_ext <<EOF
2485 #line 2486 "configure"
2486 #include "confdefs.h"
2487 #include <${cf_header}>
2489 initscr(); tgoto("?", 0,0)
2492 if { (eval echo configure:2493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2494 cf_cv_ncurses_header=$cf_header; break
2496 echo "configure: failed program was:" >&5
2497 cat conftest.$ac_ext >&5
2504 echo "$ac_t""$cf_cv_ncurses_header" 1>&6
2506 if test "$cf_cv_ncurses_header" = none ; then
2507 { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
2510 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
2511 for ac_hdr in $cf_cv_ncurses_header
2513 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2514 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2515 echo "configure:2516: checking for $ac_hdr" >&5
2516 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2517 echo $ac_n "(cached) $ac_c" 1>&6
2519 cat > conftest.$ac_ext <<EOF
2520 #line 2521 "configure"
2521 #include "confdefs.h"
2524 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2525 { (eval echo configure:2526: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2526 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2527 if test -z "$ac_err"; then
2529 eval "ac_cv_header_$ac_safe=yes"
2532 echo "configure: failed program was:" >&5
2533 cat conftest.$ac_ext >&5
2535 eval "ac_cv_header_$ac_safe=no"
2539 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2540 echo "$ac_t""yes" 1>&6
2541 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2542 cat >> confdefs.h <<EOF
2543 #define $ac_tr_hdr 1
2547 echo "$ac_t""no" 1>&6
2553 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
2554 echo "configure:2555: checking for terminfo header" >&5
2555 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
2556 echo $ac_n "(cached) $ac_c" 1>&6
2559 case ${cf_cv_ncurses_header} in #(vi
2560 */ncurses.h|*/ncursesw.h) #(vi
2561 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
2564 cf_term_header=term.h
2568 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
2570 cat > conftest.$ac_ext <<EOF
2571 #line 2572 "configure"
2572 #include "confdefs.h"
2574 #include <${cf_cv_ncurses_header-curses.h}>
2578 int x = auto_left_margin
2581 if { (eval echo configure:2582: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2584 cf_cv_term_header="$cf_test"
2586 echo "configure: failed program was:" >&5
2587 cat conftest.$ac_ext >&5
2590 cf_cv_term_header=unknown
2594 test "$cf_cv_term_header" != unknown && break
2599 echo "$ac_t""$cf_cv_term_header" 1>&6
2601 # Set definitions to allow ifdef'ing to accommodate subdirectories
2603 case $cf_cv_term_header in # (vi
2605 cat >> confdefs.h <<\EOF
2606 #define HAVE_TERM_H 1
2612 case $cf_cv_term_header in # (vi
2613 ncurses/term.h) #(vi
2614 cat >> confdefs.h <<\EOF
2615 #define HAVE_NCURSES_TERM_H 1
2620 cat >> confdefs.h <<\EOF
2621 #define HAVE_NCURSESW_TERM_H 1
2629 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
2630 echo "configure:2631: checking for ncurses version" >&5
2631 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
2632 echo $ac_n "(cached) $ac_c" 1>&6
2635 cf_cv_ncurses_version=no
2638 if test "$cross_compiling" = yes; then
2641 # This will not work if the preprocessor splits the line after the
2642 # Autoconf token. The 'unproto' program does that.
2643 cat > conftest.$ac_ext <<EOF
2644 #include <${cf_cv_ncurses_header-curses.h}>
2646 #ifdef NCURSES_VERSION
2647 Autoconf NCURSES_VERSION
2655 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
2656 { (eval echo configure:2657: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
2657 if test -f conftest.out ; then
2658 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
2659 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
2664 cat > conftest.$ac_ext <<EOF
2665 #line 2666 "configure"
2666 #include "confdefs.h"
2668 #include <${cf_cv_ncurses_header-curses.h}>
2672 FILE *fp = fopen("$cf_tempfile", "w");
2673 #ifdef NCURSES_VERSION
2674 # ifdef NCURSES_VERSION_PATCH
2675 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
2677 fprintf(fp, "%s\n", NCURSES_VERSION);
2681 fprintf(fp, "old\n");
2686 ${cf_cv_main_return-return}(0);
2689 if { (eval echo configure:2690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
2692 cf_cv_ncurses_version=`cat $cf_tempfile`
2694 echo "configure: failed program was:" >&5
2695 cat conftest.$ac_ext >&5
2704 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
2705 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
2712 echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
2713 echo "configure:2714: checking if we have identified curses libraries" >&5
2714 cat > conftest.$ac_ext <<EOF
2715 #line 2716 "configure"
2716 #include "confdefs.h"
2717 #include <${cf_cv_ncurses_header-curses.h}>
2719 initscr(); tgoto("?", 0,0)
2722 if { (eval echo configure:2723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2726 echo "configure: failed program was:" >&5
2727 cat conftest.$ac_ext >&5
2732 echo "$ac_t""$cf_result" 1>&6
2734 if test "$cf_result" = no ; then
2735 case $host_os in #(vi
2737 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
2738 echo "configure:2739: checking for tgoto in -lmytinfo" >&5
2739 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
2740 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2741 echo $ac_n "(cached) $ac_c" 1>&6
2743 ac_save_LIBS="$LIBS"
2744 LIBS="-lmytinfo $LIBS"
2745 cat > conftest.$ac_ext <<EOF
2746 #line 2747 "configure"
2747 #include "confdefs.h"
2748 /* Override any gcc2 internal prototype to avoid an error. */
2749 /* We use char because int might match the return type of a gcc2
2750 builtin and then its argument prototype would still apply. */
2757 if { (eval echo configure:2758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2759 eval "ac_cv_lib_$ac_lib_var=yes"
2761 echo "configure: failed program was:" >&5
2762 cat conftest.$ac_ext >&5
2764 eval "ac_cv_lib_$ac_lib_var=no"
2767 LIBS="$ac_save_LIBS"
2770 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2771 echo "$ac_t""yes" 1>&6
2772 LIBS="-lmytinfo $LIBS"
2774 echo "$ac_t""no" 1>&6
2779 echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
2780 echo "configure:2781: checking for initscr in -lcur_colr" >&5
2781 ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
2782 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2783 echo $ac_n "(cached) $ac_c" 1>&6
2785 ac_save_LIBS="$LIBS"
2786 LIBS="-lcur_colr $LIBS"
2787 cat > conftest.$ac_ext <<EOF
2788 #line 2789 "configure"
2789 #include "confdefs.h"
2790 /* Override any gcc2 internal prototype to avoid an error. */
2791 /* We use char because int might match the return type of a gcc2
2792 builtin and then its argument prototype would still apply. */
2799 if { (eval echo configure:2800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2801 eval "ac_cv_lib_$ac_lib_var=yes"
2803 echo "configure: failed program was:" >&5
2804 cat conftest.$ac_ext >&5
2806 eval "ac_cv_lib_$ac_lib_var=no"
2809 LIBS="$ac_save_LIBS"
2812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2813 echo "$ac_t""yes" 1>&6
2815 LIBS="-lcur_colr $LIBS"
2816 ac_cv_func_initscr=yes
2819 echo "$ac_t""no" 1>&6
2821 echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
2822 echo "configure:2823: checking for initscr in -lHcurses" >&5
2823 ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
2824 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
2825 echo $ac_n "(cached) $ac_c" 1>&6
2827 ac_save_LIBS="$LIBS"
2828 LIBS="-lHcurses $LIBS"
2829 cat > conftest.$ac_ext <<EOF
2830 #line 2831 "configure"
2831 #include "confdefs.h"
2832 /* Override any gcc2 internal prototype to avoid an error. */
2833 /* We use char because int might match the return type of a gcc2
2834 builtin and then its argument prototype would still apply. */
2841 if { (eval echo configure:2842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2843 eval "ac_cv_lib_$ac_lib_var=yes"
2845 echo "configure: failed program was:" >&5
2846 cat conftest.$ac_ext >&5
2848 eval "ac_cv_lib_$ac_lib_var=no"
2851 LIBS="$ac_save_LIBS"
2854 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
2855 echo "$ac_t""yes" 1>&6
2857 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
2858 LIBS="-lHcurses $LIBS"
2859 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
2860 ac_cv_func_initscr=yes
2863 echo "$ac_t""no" 1>&6
2869 linux*) # Suse Linux does not follow /usr/lib convention
2871 if test -n "/lib" ; then
2872 for cf_add_libdir in /lib
2874 if test $cf_add_libdir = /usr/lib ; then
2876 elif test -d $cf_add_libdir
2879 if test -n "$LDFLAGS$LIBS" ; then
2880 # a loop is needed to ensure we can add subdirs of existing dirs
2881 for cf_test_libdir in $LDFLAGS $LIBS ; do
2882 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
2883 cf_have_libdir=yes; break
2887 if test "$cf_have_libdir" = no ; then
2888 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
2890 echo "${as_me-configure}:2891: testing adding $cf_add_libdir to library-path ..." 1>&5
2893 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
2901 if test -d /usr/5lib ; then
2903 if test -n "/usr/5lib" ; then
2904 for cf_add_libdir in /usr/5lib
2906 if test $cf_add_libdir = /usr/lib ; then
2908 elif test -d $cf_add_libdir
2911 if test -n "$LDFLAGS$LIBS" ; then
2912 # a loop is needed to ensure we can add subdirs of existing dirs
2913 for cf_test_libdir in $LDFLAGS $LIBS ; do
2914 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
2915 cf_have_libdir=yes; break
2919 if test "$cf_have_libdir" = no ; then
2920 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
2922 echo "${as_me-configure}:2923: testing adding $cf_add_libdir to library-path ..." 1>&5
2925 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
2931 LIBS="$LIBS -lcurses -ltermcap"
2933 ac_cv_func_initscr=yes
2937 if test ".$ac_cv_func_initscr" != .yes ; then
2938 cf_save_LIBS="$LIBS"
2942 if test ".${cf_cv_ncurses_version-no}" != .no
2944 cf_check_list="ncurses curses cursesX"
2946 cf_check_list="cursesX curses ncurses"
2949 # Check for library containing tgoto. Do this before curses library
2950 # because it may be needed to link the test-case for initscr.
2951 echo $ac_n "checking for tgoto""... $ac_c" 1>&6
2952 echo "configure:2953: checking for tgoto" >&5
2953 if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
2954 echo $ac_n "(cached) $ac_c" 1>&6
2956 cat > conftest.$ac_ext <<EOF
2957 #line 2958 "configure"
2958 #include "confdefs.h"
2959 /* System header to define __stub macros and hopefully few prototypes,
2960 which can conflict with char tgoto(); below. */
2962 /* Override any gcc2 internal prototype to avoid an error. */
2963 /* We use char because int might match the return type of a gcc2
2964 builtin and then its argument prototype would still apply. */
2969 /* The GNU C library defines this for functions which it implements
2970 to always fail with ENOSYS. Some functions are actually named
2971 something starting with __ and the normal name is an alias. */
2972 #if defined (__stub_tgoto) || defined (__stub___tgoto)
2980 if { (eval echo configure:2981: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
2982 eval "ac_cv_func_tgoto=yes"
2984 echo "configure: failed program was:" >&5
2985 cat conftest.$ac_ext >&5
2987 eval "ac_cv_func_tgoto=no"
2992 if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then
2993 echo "$ac_t""yes" 1>&6
2994 cf_term_lib=predefined
2996 echo "$ac_t""no" 1>&6
2998 for cf_term_lib in $cf_check_list termcap termlib unknown
3000 echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
3001 echo "configure:3002: checking for tgoto in -l$cf_term_lib" >&5
3002 ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
3003 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3004 echo $ac_n "(cached) $ac_c" 1>&6
3006 ac_save_LIBS="$LIBS"
3007 LIBS="-l$cf_term_lib $LIBS"
3008 cat > conftest.$ac_ext <<EOF
3009 #line 3010 "configure"
3010 #include "confdefs.h"
3011 /* Override any gcc2 internal prototype to avoid an error. */
3012 /* We use char because int might match the return type of a gcc2
3013 builtin and then its argument prototype would still apply. */
3020 if { (eval echo configure:3021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3022 eval "ac_cv_lib_$ac_lib_var=yes"
3024 echo "configure: failed program was:" >&5
3025 cat conftest.$ac_ext >&5
3027 eval "ac_cv_lib_$ac_lib_var=no"
3030 LIBS="$ac_save_LIBS"
3033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3034 echo "$ac_t""yes" 1>&6
3037 echo "$ac_t""no" 1>&6
3045 # Check for library containing initscr
3046 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
3047 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
3049 echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
3050 echo "configure:3051: checking for initscr in -l$cf_curs_lib" >&5
3051 ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
3052 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3053 echo $ac_n "(cached) $ac_c" 1>&6
3055 ac_save_LIBS="$LIBS"
3056 LIBS="-l$cf_curs_lib $LIBS"
3057 cat > conftest.$ac_ext <<EOF
3058 #line 3059 "configure"
3059 #include "confdefs.h"
3060 /* Override any gcc2 internal prototype to avoid an error. */
3061 /* We use char because int might match the return type of a gcc2
3062 builtin and then its argument prototype would still apply. */
3069 if { (eval echo configure:3070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3071 eval "ac_cv_lib_$ac_lib_var=yes"
3073 echo "configure: failed program was:" >&5
3074 cat conftest.$ac_ext >&5
3076 eval "ac_cv_lib_$ac_lib_var=no"
3079 LIBS="$ac_save_LIBS"
3082 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3083 echo "$ac_t""yes" 1>&6
3086 echo "$ac_t""no" 1>&6
3090 test $cf_curs_lib = unknown && { echo "configure: error: no curses library found" 1>&2; exit 1; }
3092 LIBS="-l$cf_curs_lib $cf_save_LIBS"
3093 if test "$cf_term_lib" = unknown ; then
3094 echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
3095 echo "configure:3096: checking if we can link with $cf_curs_lib library" >&5
3096 cat > conftest.$ac_ext <<EOF
3097 #line 3098 "configure"
3098 #include "confdefs.h"
3099 #include <${cf_cv_ncurses_header-curses.h}>
3104 if { (eval echo configure:3105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3108 echo "configure: failed program was:" >&5
3109 cat conftest.$ac_ext >&5
3114 echo "$ac_t""$cf_result" 1>&6
3115 test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; }
3116 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
3118 elif test "$cf_term_lib" != predefined ; then
3119 echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
3120 echo "configure:3121: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
3121 cat > conftest.$ac_ext <<EOF
3122 #line 3123 "configure"
3123 #include "confdefs.h"
3124 #include <${cf_cv_ncurses_header-curses.h}>
3126 initscr(); tgoto((char *)0, 0, 0);
3129 if { (eval echo configure:3130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3133 echo "configure: failed program was:" >&5
3134 cat conftest.$ac_ext >&5
3137 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
3138 cat > conftest.$ac_ext <<EOF
3139 #line 3140 "configure"
3140 #include "confdefs.h"
3141 #include <${cf_cv_ncurses_header-curses.h}>
3146 if { (eval echo configure:3147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3150 echo "configure: failed program was:" >&5
3151 cat conftest.$ac_ext >&5
3159 echo "$ac_t""$cf_result" 1>&6
3169 cf_ncuconfig_root=ncurses
3171 echo "Looking for ${cf_ncuconfig_root}-config"
3172 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
3174 # Extract the first word of "$ac_prog", so it can be a program name with args.
3175 set dummy $ac_prog; ac_word=$2
3176 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3177 echo "configure:3178: checking for $ac_word" >&5
3178 if eval "test \"`echo '$''{'ac_cv_path_NCURSES_CONFIG'+set}'`\" = set"; then
3179 echo $ac_n "(cached) $ac_c" 1>&6
3181 case "$NCURSES_CONFIG" in
3183 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
3186 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a dos path.
3189 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3191 for ac_dir in $ac_dummy; do
3192 test -z "$ac_dir" && ac_dir=.
3193 if test -f $ac_dir/$ac_word; then
3194 ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
3202 NCURSES_CONFIG="$ac_cv_path_NCURSES_CONFIG"
3203 if test -n "$NCURSES_CONFIG"; then
3204 echo "$ac_t""$NCURSES_CONFIG" 1>&6
3206 echo "$ac_t""no" 1>&6
3209 test -n "$NCURSES_CONFIG" && break
3211 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
3214 if test "$NCURSES_CONFIG" != none ; then
3216 cf_cv_ncurses_header=curses.h
3218 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
3219 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
3221 cat >> confdefs.h <<\EOF
3227 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3229 cat >> confdefs.h <<EOF
3230 #define $cf_nculib_ROOT 1
3234 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
3240 cf_ncuhdr_root=ncurses
3242 test -n "$cf_cv_curses_dir" && \
3243 test "$cf_cv_curses_dir" != "no" && { \
3245 if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
3246 for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
3248 while test $cf_add_incdir != /usr/include
3250 if test -d $cf_add_incdir
3253 if test -n "$CFLAGS$CPPFLAGS" ; then
3254 # a loop is needed to ensure we can add subdirs of existing dirs
3255 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3256 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3257 cf_have_incdir=yes; break
3262 if test "$cf_have_incdir" = no ; then
3263 if test "$cf_add_incdir" = /usr/local/include ; then
3264 if test "$GCC" = yes
3266 cf_save_CPPFLAGS=$CPPFLAGS
3267 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3268 cat > conftest.$ac_ext <<EOF
3269 #line 3270 "configure"
3270 #include "confdefs.h"
3276 if { (eval echo configure:3277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3279 echo "configure: failed program was:" >&5
3280 cat conftest.$ac_ext >&5
3285 CPPFLAGS=$cf_save_CPPFLAGS
3290 if test "$cf_have_incdir" = no ; then
3291 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3293 echo "${as_me-configure}:3294: testing adding $cf_add_incdir to include-path ..." 1>&5
3296 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3298 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3299 test "$cf_top_incdir" = "$cf_add_incdir" && break
3300 cf_add_incdir="$cf_top_incdir"
3311 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
3312 echo "configure:3313: checking for $cf_ncuhdr_root header in include-path" >&5
3313 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
3314 echo $ac_n "(cached) $ac_c" 1>&6
3317 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
3318 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
3319 for cf_header in $cf_header_list
3322 cat > conftest.$ac_ext <<EOF
3323 #line 3324 "configure"
3324 #include "confdefs.h"
3327 #include <$cf_header>
3330 #ifdef NCURSES_VERSION
3332 printf("%s\n", NCURSES_VERSION);
3344 if { (eval echo configure:3345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3346 cf_cv_ncurses_h=$cf_header
3349 echo "configure: failed program was:" >&5
3350 cat conftest.$ac_ext >&5
3356 test "$cf_cv_ncurses_h" != no && break
3361 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
3365 if test "$cf_cv_ncurses_h" != no ; then
3366 cf_cv_ncurses_header=$cf_cv_ncurses_h
3369 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
3370 echo "configure:3371: checking for $cf_ncuhdr_root include-path" >&5
3371 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
3372 echo $ac_n "(cached) $ac_c" 1>&6
3375 test -n "$verbose" && echo
3377 cf_header_path_list=""
3378 if test -n "${CFLAGS}${CPPFLAGS}" ; then
3379 for cf_header_path in $CPPFLAGS $CFLAGS
3381 case $cf_header_path in #(vi
3383 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
3385 test "$cf_header_path" != "NONE" && \
3386 test -d "$cf_header_path" && \
3388 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
3389 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
3390 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
3391 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
3392 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
3393 test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3396 cf_header_path_list="$cf_header_path_list $cf_search"
3405 test "/usr" != "$prefix" && \
3407 (test $prefix = NONE || test -d $prefix) && {
3408 test -n "$verbose" && echo " ... testing for include-directories under /usr"
3409 test -d /usr/include && cf_search="$cf_search /usr/include"
3410 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
3411 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
3412 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
3413 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3417 test "$prefix" != "NONE" && \
3418 test -d "$prefix" && \
3420 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
3421 test -d $prefix/include && cf_search="$cf_search $prefix/include"
3422 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
3423 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
3424 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
3425 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3429 test "/usr/local" != "$prefix" && \
3430 test -d "/usr/local" && \
3431 (test $prefix = NONE || test -d $prefix) && {
3432 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
3433 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
3434 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
3435 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
3436 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
3437 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3441 test "/opt" != "$prefix" && \
3443 (test $prefix = NONE || test -d $prefix) && {
3444 test -n "$verbose" && echo " ... testing for include-directories under /opt"
3445 test -d /opt/include && cf_search="$cf_search /opt/include"
3446 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
3447 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
3448 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
3449 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3453 test "$HOME" != "$prefix" && \
3454 test -d "$HOME" && \
3455 (test $prefix = NONE || test -d $prefix) && {
3456 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
3457 test -d $HOME/include && cf_search="$cf_search $HOME/include"
3458 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
3459 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
3460 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
3461 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3466 test "$includedir" != NONE && \
3467 test "$includedir" != "/usr/include" && \
3468 test -d "$includedir" && {
3469 test -d $includedir && cf_search="$cf_search $includedir"
3470 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
3473 test "$oldincludedir" != NONE && \
3474 test "$oldincludedir" != "/usr/include" && \
3475 test -d "$oldincludedir" && {
3476 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
3477 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
3480 cf_search="$cf_header_path_list $cf_search"
3482 test -n "$verbose" && echo search path $cf_search
3483 cf_save2_CPPFLAGS="$CPPFLAGS"
3484 for cf_incdir in $cf_search
3487 if test -n "$cf_incdir" ; then
3488 for cf_add_incdir in $cf_incdir
3490 while test $cf_add_incdir != /usr/include
3492 if test -d $cf_add_incdir
3495 if test -n "$CFLAGS$CPPFLAGS" ; then
3496 # a loop is needed to ensure we can add subdirs of existing dirs
3497 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3498 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3499 cf_have_incdir=yes; break
3504 if test "$cf_have_incdir" = no ; then
3505 if test "$cf_add_incdir" = /usr/local/include ; then
3506 if test "$GCC" = yes
3508 cf_save_CPPFLAGS=$CPPFLAGS
3509 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3510 cat > conftest.$ac_ext <<EOF
3511 #line 3512 "configure"
3512 #include "confdefs.h"
3518 if { (eval echo configure:3519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3521 echo "configure: failed program was:" >&5
3522 cat conftest.$ac_ext >&5
3527 CPPFLAGS=$cf_save_CPPFLAGS
3532 if test "$cf_have_incdir" = no ; then
3533 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3535 echo "${as_me-configure}:3536: testing adding $cf_add_incdir to include-path ..." 1>&5
3538 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3540 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3541 test "$cf_top_incdir" = "$cf_add_incdir" && break
3542 cf_add_incdir="$cf_top_incdir"
3556 cat > conftest.$ac_ext <<EOF
3557 #line 3558 "configure"
3558 #include "confdefs.h"
3561 #include <$cf_header>
3564 #ifdef NCURSES_VERSION
3566 printf("%s\n", NCURSES_VERSION);
3578 if { (eval echo configure:3579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3580 cf_cv_ncurses_h2=$cf_header
3583 echo "configure: failed program was:" >&5
3584 cat conftest.$ac_ext >&5
3590 if test "$cf_cv_ncurses_h2" != no ; then
3591 cf_cv_ncurses_h2=$cf_incdir/$cf_header
3592 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
3595 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
3597 CPPFLAGS="$cf_save2_CPPFLAGS"
3598 test "$cf_cv_ncurses_h2" != no && break
3600 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
3604 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
3606 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
3607 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
3608 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
3609 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
3612 if test -n "$cf_1st_incdir" ; then
3613 for cf_add_incdir in $cf_1st_incdir
3615 while test $cf_add_incdir != /usr/include
3617 if test -d $cf_add_incdir
3620 if test -n "$CFLAGS$CPPFLAGS" ; then
3621 # a loop is needed to ensure we can add subdirs of existing dirs
3622 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3623 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3624 cf_have_incdir=yes; break
3629 if test "$cf_have_incdir" = no ; then
3630 if test "$cf_add_incdir" = /usr/local/include ; then
3631 if test "$GCC" = yes
3633 cf_save_CPPFLAGS=$CPPFLAGS
3634 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3635 cat > conftest.$ac_ext <<EOF
3636 #line 3637 "configure"
3637 #include "confdefs.h"
3643 if { (eval echo configure:3644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3646 echo "configure: failed program was:" >&5
3647 cat conftest.$ac_ext >&5
3652 CPPFLAGS=$cf_save_CPPFLAGS
3657 if test "$cf_have_incdir" = no ; then
3658 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3660 echo "${as_me-configure}:3661: testing adding $cf_add_incdir to include-path ..." 1>&5
3663 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3665 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3666 test "$cf_top_incdir" = "$cf_add_incdir" && break
3667 cf_add_incdir="$cf_top_incdir"
3679 # Set definitions to allow ifdef'ing for ncurses.h
3681 case $cf_cv_ncurses_header in # (vi
3683 cat >> confdefs.h <<\EOF
3684 #define HAVE_NCURSES_H 1
3690 case $cf_cv_ncurses_header in # (vi
3691 ncurses/curses.h|ncurses/ncurses.h)
3692 cat >> confdefs.h <<\EOF
3693 #define HAVE_NCURSES_NCURSES_H 1
3697 ncursesw/curses.h|ncursesw/ncurses.h)
3698 cat >> confdefs.h <<\EOF
3699 #define HAVE_NCURSESW_NCURSES_H 1
3707 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
3708 echo "configure:3709: checking for terminfo header" >&5
3709 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
3710 echo $ac_n "(cached) $ac_c" 1>&6
3713 case ${cf_cv_ncurses_header} in #(vi
3714 */ncurses.h|*/ncursesw.h) #(vi
3715 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
3718 cf_term_header=term.h
3722 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
3724 cat > conftest.$ac_ext <<EOF
3725 #line 3726 "configure"
3726 #include "confdefs.h"
3728 #include <${cf_cv_ncurses_header-curses.h}>
3732 int x = auto_left_margin
3735 if { (eval echo configure:3736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3738 cf_cv_term_header="$cf_test"
3740 echo "configure: failed program was:" >&5
3741 cat conftest.$ac_ext >&5
3744 cf_cv_term_header=unknown
3748 test "$cf_cv_term_header" != unknown && break
3753 echo "$ac_t""$cf_cv_term_header" 1>&6
3755 # Set definitions to allow ifdef'ing to accommodate subdirectories
3757 case $cf_cv_term_header in # (vi
3759 cat >> confdefs.h <<\EOF
3760 #define HAVE_TERM_H 1
3766 case $cf_cv_term_header in # (vi
3767 ncurses/term.h) #(vi
3768 cat >> confdefs.h <<\EOF
3769 #define HAVE_NCURSES_TERM_H 1
3774 cat >> confdefs.h <<\EOF
3775 #define HAVE_NCURSESW_TERM_H 1
3782 # some applications need this, but should check for NCURSES_VERSION
3783 cat >> confdefs.h <<\EOF
3789 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
3790 echo "configure:3791: checking for ncurses version" >&5
3791 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
3792 echo $ac_n "(cached) $ac_c" 1>&6
3795 cf_cv_ncurses_version=no
3798 if test "$cross_compiling" = yes; then
3801 # This will not work if the preprocessor splits the line after the
3802 # Autoconf token. The 'unproto' program does that.
3803 cat > conftest.$ac_ext <<EOF
3804 #include <${cf_cv_ncurses_header-curses.h}>
3806 #ifdef NCURSES_VERSION
3807 Autoconf NCURSES_VERSION
3815 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
3816 { (eval echo configure:3817: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
3817 if test -f conftest.out ; then
3818 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
3819 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
3824 cat > conftest.$ac_ext <<EOF
3825 #line 3826 "configure"
3826 #include "confdefs.h"
3828 #include <${cf_cv_ncurses_header-curses.h}>
3832 FILE *fp = fopen("$cf_tempfile", "w");
3833 #ifdef NCURSES_VERSION
3834 # ifdef NCURSES_VERSION_PATCH
3835 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
3837 fprintf(fp, "%s\n", NCURSES_VERSION);
3841 fprintf(fp, "old\n");
3846 ${cf_cv_main_return-return}(0);
3849 if { (eval echo configure:3850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3852 cf_cv_ncurses_version=`cat $cf_tempfile`
3854 echo "configure: failed program was:" >&5
3855 cat conftest.$ac_ext >&5
3864 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
3865 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
3873 cf_nculib_root=ncurses
3874 # This works, except for the special case where we find gpm, but
3875 # ncurses is in a nonstandard location via $LIBS, and we really want
3878 cf_ncurses_SAVE="$LIBS"
3879 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
3880 echo "configure:3881: checking for Gpm_Open in -lgpm" >&5
3881 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
3882 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3883 echo $ac_n "(cached) $ac_c" 1>&6
3885 ac_save_LIBS="$LIBS"
3887 cat > conftest.$ac_ext <<EOF
3888 #line 3889 "configure"
3889 #include "confdefs.h"
3890 /* Override any gcc2 internal prototype to avoid an error. */
3891 /* We use char because int might match the return type of a gcc2
3892 builtin and then its argument prototype would still apply. */
3899 if { (eval echo configure:3900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3901 eval "ac_cv_lib_$ac_lib_var=yes"
3903 echo "configure: failed program was:" >&5
3904 cat conftest.$ac_ext >&5
3906 eval "ac_cv_lib_$ac_lib_var=no"
3909 LIBS="$ac_save_LIBS"
3912 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3913 echo "$ac_t""yes" 1>&6
3914 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
3915 echo "configure:3916: checking for initscr in -lgpm" >&5
3916 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
3917 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3918 echo $ac_n "(cached) $ac_c" 1>&6
3920 ac_save_LIBS="$LIBS"
3922 cat > conftest.$ac_ext <<EOF
3923 #line 3924 "configure"
3924 #include "confdefs.h"
3925 /* Override any gcc2 internal prototype to avoid an error. */
3926 /* We use char because int might match the return type of a gcc2
3927 builtin and then its argument prototype would still apply. */
3934 if { (eval echo configure:3935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3936 eval "ac_cv_lib_$ac_lib_var=yes"
3938 echo "configure: failed program was:" >&5
3939 cat conftest.$ac_ext >&5
3941 eval "ac_cv_lib_$ac_lib_var=no"