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-Xaw3d link with Xaw 3d library
194 --with-neXtaw link with neXT Athena library
195 --with-XawPlus link with Athena-Plus library
196 --with-pkg-config{=path} enable/disable use of pkg-config
197 --with-x use the X Window System
198 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
204 -host | --host | --hos | --ho)
206 -host=* | --host=* | --hos=* | --ho=*)
209 -includedir | --includedir | --includedi | --included | --include \
210 | --includ | --inclu | --incl | --inc)
211 ac_prev=includedir ;;
212 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
213 | --includ=* | --inclu=* | --incl=* | --inc=*)
214 includedir="$ac_optarg" ;;
216 -infodir | --infodir | --infodi | --infod | --info | --inf)
218 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
219 infodir="$ac_optarg" ;;
221 -libdir | --libdir | --libdi | --libd)
223 -libdir=* | --libdir=* | --libdi=* | --libd=*)
224 libdir="$ac_optarg" ;;
226 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
227 | --libexe | --libex | --libe)
228 ac_prev=libexecdir ;;
229 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
230 | --libexe=* | --libex=* | --libe=*)
231 libexecdir="$ac_optarg" ;;
233 -localstatedir | --localstatedir | --localstatedi | --localstated \
234 | --localstate | --localstat | --localsta | --localst \
235 | --locals | --local | --loca | --loc | --lo)
236 ac_prev=localstatedir ;;
237 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
238 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
239 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
240 localstatedir="$ac_optarg" ;;
242 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
244 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
245 mandir="$ac_optarg" ;;
248 # Obsolete; use --without-fp.
251 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
255 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
256 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
259 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
260 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
261 | --oldin | --oldi | --old | --ol | --o)
262 ac_prev=oldincludedir ;;
263 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
264 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
265 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
266 oldincludedir="$ac_optarg" ;;
268 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
270 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
271 prefix="$ac_optarg" ;;
273 -program-prefix | --program-prefix | --program-prefi | --program-pref \
274 | --program-pre | --program-pr | --program-p)
275 ac_prev=program_prefix ;;
276 -program-prefix=* | --program-prefix=* | --program-prefi=* \
277 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
278 program_prefix="$ac_optarg" ;;
280 -program-suffix | --program-suffix | --program-suffi | --program-suff \
281 | --program-suf | --program-su | --program-s)
282 ac_prev=program_suffix ;;
283 -program-suffix=* | --program-suffix=* | --program-suffi=* \
284 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
285 program_suffix="$ac_optarg" ;;
287 -program-transform-name | --program-transform-name \
288 | --program-transform-nam | --program-transform-na \
289 | --program-transform-n | --program-transform- \
290 | --program-transform | --program-transfor \
291 | --program-transfo | --program-transf \
292 | --program-trans | --program-tran \
293 | --progr-tra | --program-tr | --program-t)
294 ac_prev=program_transform_name ;;
295 -program-transform-name=* | --program-transform-name=* \
296 | --program-transform-nam=* | --program-transform-na=* \
297 | --program-transform-n=* | --program-transform-=* \
298 | --program-transform=* | --program-transfor=* \
299 | --program-transfo=* | --program-transf=* \
300 | --program-trans=* | --program-tran=* \
301 | --progr-tra=* | --program-tr=* | --program-t=*)
302 program_transform_name="$ac_optarg" ;;
304 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
305 | -silent | --silent | --silen | --sile | --sil)
308 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
310 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
312 sbindir="$ac_optarg" ;;
314 -sharedstatedir | --sharedstatedir | --sharedstatedi \
315 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
316 | --sharedst | --shareds | --shared | --share | --shar \
318 ac_prev=sharedstatedir ;;
319 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
320 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
321 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
323 sharedstatedir="$ac_optarg" ;;
325 -site | --site | --sit)
327 -site=* | --site=* | --sit=*)
330 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
332 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
333 srcdir="$ac_optarg" ;;
335 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
336 | --syscon | --sysco | --sysc | --sys | --sy)
337 ac_prev=sysconfdir ;;
338 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
339 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
340 sysconfdir="$ac_optarg" ;;
342 -target | --target | --targe | --targ | --tar | --ta | --t)
344 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
345 target="$ac_optarg" ;;
347 -v | -verbose | --verbose | --verbos | --verbo | --verb)
350 -version | --version | --versio | --versi | --vers)
351 echo "configure generated by autoconf version 2.13.20030927"
355 ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
356 # Reject names that are not valid shell variable names.
357 if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
358 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
360 ac_package=`echo $ac_package| sed 's/-/_/g'`
365 eval "with_${ac_package}='$ac_optarg'" ;;
367 -without-* | --without-*)
368 ac_package=`echo $ac_option|sed -e 's/-*without-//'`
369 # Reject names that are not valid shell variable names.
370 if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
371 { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
373 ac_package=`echo $ac_package| sed 's/-/_/g'`
374 eval "with_${ac_package}=no" ;;
377 # Obsolete; use --with-x.
380 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
381 | --x-incl | --x-inc | --x-in | --x-i)
382 ac_prev=x_includes ;;
383 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
384 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
385 x_includes="$ac_optarg" ;;
387 -x-libraries | --x-libraries | --x-librarie | --x-librari \
388 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
389 ac_prev=x_libraries ;;
390 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
391 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
392 x_libraries="$ac_optarg" ;;
394 -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
398 if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
399 echo "configure: warning: $ac_option: invalid host type" 1>&2
401 if test "x$nonopt" != xNONE; then
402 { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
410 if test -n "$ac_prev"; then
411 { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
414 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
416 # File descriptor usage:
419 # 2 errors and warnings
420 # 3 some systems may open it to /dev/tty
421 # 4 used on the Kubota Titan
422 # 6 checking for... messages and results
423 # 5 compiler messages saved in config.log
424 if test "$silent" = yes; then
432 This file contains any messages produced by compilers while
433 running configure, to aid debugging if configure makes a mistake.
436 # Strip out --no-create and --no-recursion so they do not pile up.
437 # Also quote any args containing shell metacharacters.
442 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
443 | --no-cr | --no-c) ;;
444 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
445 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
446 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
447 ac_configure_args="$ac_configure_args '$ac_arg'" ;;
448 *) ac_configure_args="$ac_configure_args $ac_arg" ;;
453 # Only set these to C if already set. These must not be set unconditionally
454 # because not all systems understand e.g. LANG=C (notably SCO).
455 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
456 # Non-C LC_CTYPE values break the ctype check.
457 if test "${LANG+set}" = set; then LANG=C; export LANG; fi
458 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
459 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
460 if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
462 # confdefs.h avoids OS command line length limits that DEFS can exceed.
463 rm -rf conftest* confdefs.h
464 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
467 # A filename unique to this package, relative to the directory that
468 # configure is in, which we can look for to find out if srcdir is correct.
469 ac_unique_file=ncurses.c
471 # Find the source files, if location was not specified.
472 if test -z "$srcdir"; then
473 ac_srcdir_defaulted=yes
474 # Try the directory containing this script, then its parent.
476 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
477 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
479 if test ! -r $srcdir/$ac_unique_file; then
483 ac_srcdir_defaulted=no
485 if test ! -r $srcdir/$ac_unique_file; then
486 if test "$ac_srcdir_defaulted" = yes; then
487 { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
489 { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
492 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
494 # Prefer explicitly selected file to automatically selected ones.
495 if test -z "$CONFIG_SITE"; then
496 if test "x$prefix" != xNONE; then
497 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
499 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
502 for ac_site_file in $CONFIG_SITE; do
503 if test -r "$ac_site_file"; then
504 echo "loading site script $ac_site_file"
509 if test -r "$cache_file"; then
510 echo "loading cache $cache_file"
513 echo "creating cache $cache_file"
518 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
519 ac_cpp='$CPP $CPPFLAGS'
520 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
521 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
522 cross_compiling=$ac_cv_prog_cc_cross
526 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
527 # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
528 if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
535 ac_n= ac_c='\c' ac_t=
542 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
545 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
548 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
549 if test -f $ac_dir/install-sh; then
551 ac_install_sh="$ac_aux_dir/install-sh -c"
553 elif test -f $ac_dir/install.sh; then
555 ac_install_sh="$ac_aux_dir/install.sh -c"
559 if test -z "$ac_aux_dir"; then
560 { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
562 ac_config_guess=$ac_aux_dir/config.guess
563 ac_config_sub=$ac_aux_dir/config.sub
564 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
567 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
569 # Make sure we can run config.sub.
570 if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
571 else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
574 echo $ac_n "checking host system type""... $ac_c" 1>&6
575 echo "configure:576: checking host system type" >&5
578 case "$host_alias" in
582 if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
583 else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
585 *) host_alias=$nonopt ;;
589 host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
590 host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
591 host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
592 host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
593 echo "$ac_t""$host" 1>&6
595 system_name="$host_os"
597 system_name="`(uname -s -r) 2>/dev/null`"
598 if test -z "$system_name" ; then
599 system_name="`(hostname) 2>/dev/null`"
602 test -n "$system_name" && cat >> confdefs.h <<EOF
603 #define SYSTEM_NAME "$system_name"
606 if eval "test \"`echo '$''{'cf_cv_system_name'+set}'`\" = set"; then
607 echo $ac_n "(cached) $ac_c" 1>&6
609 cf_cv_system_name="$system_name"
613 test -z "$system_name" && system_name="$cf_cv_system_name"
614 test -n "$cf_cv_system_name" && echo "$ac_t""Configuring for $cf_cv_system_name" 1>&6
616 if test ".$system_name" != ".$cf_cv_system_name" ; then
617 echo "$ac_t""Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" 1>&6
618 { echo "configure: error: "Please remove config.cache and try again."" 1>&2; exit 1; }
622 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
623 echo "configure:624: checking whether ${MAKE-make} sets \${MAKE}" >&5
624 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
625 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
626 echo $ac_n "(cached) $ac_c" 1>&6
628 cat > conftestmake <<\EOF
630 @echo 'ac_maketemp="${MAKE}"'
632 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
633 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
634 if test -n "$ac_maketemp"; then
635 eval ac_cv_prog_make_${ac_make}_set=yes
637 eval ac_cv_prog_make_${ac_make}_set=no
641 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
642 echo "$ac_t""yes" 1>&6
645 echo "$ac_t""no" 1>&6
646 SET_MAKE="MAKE=${MAKE-make}"
649 # Extract the first word of "gcc", so it can be a program name with args.
650 set dummy gcc; ac_word=$2
651 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
652 echo "configure:653: checking for $ac_word" >&5
653 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
654 echo $ac_n "(cached) $ac_c" 1>&6
656 if test -n "$CC"; then
657 ac_cv_prog_CC="$CC" # Let the user override the test.
659 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
661 for ac_dir in $ac_dummy; do
662 test -z "$ac_dir" && ac_dir=.
663 if test -f $ac_dir/$ac_word; then
672 if test -n "$CC"; then
673 echo "$ac_t""$CC" 1>&6
675 echo "$ac_t""no" 1>&6
678 if test -z "$CC"; then
679 # Extract the first word of "cc", so it can be a program name with args.
680 set dummy cc; ac_word=$2
681 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
682 echo "configure:683: checking for $ac_word" >&5
683 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
684 echo $ac_n "(cached) $ac_c" 1>&6
686 if test -n "$CC"; then
687 ac_cv_prog_CC="$CC" # Let the user override the test.
689 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
692 for ac_dir in $ac_dummy; do
693 test -z "$ac_dir" && ac_dir=.
694 if test -f $ac_dir/$ac_word; then
695 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
704 if test $ac_prog_rejected = yes; then
705 # We found a bogon in the path, so make sure we never use it.
706 set dummy $ac_cv_prog_CC
708 if test $# -gt 0; then
709 # We chose a different compiler from the bogus one.
710 # However, it has the same basename, so the bogon will be chosen
711 # first if we set CC to just the basename; use the full file name.
713 set dummy "$ac_dir/$ac_word" "$@"
721 if test -n "$CC"; then
722 echo "$ac_t""$CC" 1>&6
724 echo "$ac_t""no" 1>&6
727 if test -z "$CC"; then
730 # Extract the first word of "cl", so it can be a program name with args.
731 set dummy cl; ac_word=$2
732 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
733 echo "configure:734: checking for $ac_word" >&5
734 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
735 echo $ac_n "(cached) $ac_c" 1>&6
737 if test -n "$CC"; then
738 ac_cv_prog_CC="$CC" # Let the user override the test.
740 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
742 for ac_dir in $ac_dummy; do
743 test -z "$ac_dir" && ac_dir=.
744 if test -f $ac_dir/$ac_word; then
753 if test -n "$CC"; then
754 echo "$ac_t""$CC" 1>&6
756 echo "$ac_t""no" 1>&6
761 test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
764 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
765 echo "configure:766: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
768 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
769 ac_cpp='$CPP $CPPFLAGS'
770 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
771 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
772 cross_compiling=$ac_cv_prog_cc_cross
774 cat > conftest.$ac_ext << EOF
776 #line 777 "configure"
777 #include "confdefs.h"
781 if { (eval echo configure:782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
782 ac_cv_prog_cc_works=yes
783 # If we can't run a trivial program, we are probably using a cross compiler.
784 if (./conftest; exit) 2>/dev/null; then
785 ac_cv_prog_cc_cross=no
787 ac_cv_prog_cc_cross=yes
790 echo "configure: failed program was:" >&5
791 cat conftest.$ac_ext >&5
792 ac_cv_prog_cc_works=no
796 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
797 ac_cpp='$CPP $CPPFLAGS'
798 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
799 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
800 cross_compiling=$ac_cv_prog_cc_cross
802 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
803 if test $ac_cv_prog_cc_works = no; then
804 { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
806 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
807 echo "configure:808: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
808 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
809 cross_compiling=$ac_cv_prog_cc_cross
811 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
812 echo "configure:813: checking whether we are using GNU C" >&5
813 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
814 echo $ac_n "(cached) $ac_c" 1>&6
816 cat > conftest.c <<EOF
821 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
828 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
830 if test $ac_cv_prog_gcc = yes; then
836 ac_test_CFLAGS="${CFLAGS+set}"
837 ac_save_CFLAGS="$CFLAGS"
839 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
840 echo "configure:841: checking whether ${CC-cc} accepts -g" >&5
841 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
842 echo $ac_n "(cached) $ac_c" 1>&6
844 echo 'void f(){}' > conftest.c
845 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
854 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
855 if test "$ac_test_CFLAGS" = set; then
856 CFLAGS="$ac_save_CFLAGS"
857 elif test $ac_cv_prog_cc_g = yes; then
858 if test "$GCC" = yes; then
864 if test "$GCC" = yes; then
871 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
872 echo "configure:873: checking how to run the C preprocessor" >&5
873 # On Suns, sometimes $CPP names a directory.
874 if test -n "$CPP" && test -d "$CPP"; then
877 if test -z "$CPP"; then
878 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
879 echo $ac_n "(cached) $ac_c" 1>&6
881 # This must be in double quotes, not single quotes, because CPP may get
882 # substituted into the Makefile and "${CC-cc}" will confuse make.
884 # On the NeXT, cc -E runs the code through the compiler's parser,
885 # not just through cpp.
886 cat > conftest.$ac_ext <<EOF
887 #line 888 "configure"
888 #include "confdefs.h"
892 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
893 { (eval echo configure:894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
894 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
895 if test -z "$ac_err"; then
899 echo "configure: failed program was:" >&5
900 cat conftest.$ac_ext >&5
902 CPP="${CC-cc} -E -traditional-cpp"
903 cat > conftest.$ac_ext <<EOF
904 #line 905 "configure"
905 #include "confdefs.h"
909 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
910 { (eval echo configure:911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
911 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
912 if test -z "$ac_err"; then
916 echo "configure: failed program was:" >&5
917 cat conftest.$ac_ext >&5
919 CPP="${CC-cc} -nologo -E"
920 cat > conftest.$ac_ext <<EOF
921 #line 922 "configure"
922 #include "confdefs.h"
926 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
927 { (eval echo configure:928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
928 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
929 if test -z "$ac_err"; then
933 echo "configure: failed program was:" >&5
934 cat conftest.$ac_ext >&5
943 ac_cv_prog_CPP="$CPP"
945 CPP="$ac_cv_prog_CPP"
947 ac_cv_prog_CPP="$CPP"
949 echo "$ac_t""$CPP" 1>&6
951 for ac_prog in mawk gawk nawk awk
953 # Extract the first word of "$ac_prog", so it can be a program name with args.
954 set dummy $ac_prog; ac_word=$2
955 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
956 echo "configure:957: checking for $ac_word" >&5
957 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
958 echo $ac_n "(cached) $ac_c" 1>&6
960 if test -n "$AWK"; then
961 ac_cv_prog_AWK="$AWK" # Let the user override the test.
963 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
965 for ac_dir in $ac_dummy; do
966 test -z "$ac_dir" && ac_dir=.
967 if test -f $ac_dir/$ac_word; then
968 ac_cv_prog_AWK="$ac_prog"
975 AWK="$ac_cv_prog_AWK"
976 if test -n "$AWK"; then
977 echo "$ac_t""$AWK" 1>&6
979 echo "$ac_t""no" 1>&6
982 test -n "$AWK" && break
986 echo $ac_n "checking if filesystem supports mixed-case filenames""... $ac_c" 1>&6
987 echo "configure:988: checking if filesystem supports mixed-case filenames" >&5
988 if eval "test \"`echo '$''{'cf_cv_mixedcase'+set}'`\" = set"; then
989 echo $ac_n "(cached) $ac_c" 1>&6
992 if test "$cross_compiling" = yes ; then
993 case $target_alias in #(vi
994 *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
1002 rm -f conftest CONFTEST
1004 if test -f CONFTEST ; then
1009 rm -f conftest CONFTEST
1014 echo "$ac_t""$cf_cv_mixedcase" 1>&6
1015 test "$cf_cv_mixedcase" = yes && cat >> confdefs.h <<\EOF
1016 #define MIXEDCASE_FILENAMES 1
1023 for ac_prog in exctags ctags
1025 # Extract the first word of "$ac_prog", so it can be a program name with args.
1026 set dummy $ac_prog; ac_word=$2
1027 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1028 echo "configure:1029: checking for $ac_word" >&5
1029 if eval "test \"`echo '$''{'ac_cv_prog_CTAGS'+set}'`\" = set"; then
1030 echo $ac_n "(cached) $ac_c" 1>&6
1032 if test -n "$CTAGS"; then
1033 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
1035 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1037 for ac_dir in $ac_dummy; do
1038 test -z "$ac_dir" && ac_dir=.
1039 if test -f $ac_dir/$ac_word; then
1040 ac_cv_prog_CTAGS="$ac_prog"
1047 CTAGS="$ac_cv_prog_CTAGS"
1048 if test -n "$CTAGS"; then
1049 echo "$ac_t""$CTAGS" 1>&6
1051 echo "$ac_t""no" 1>&6
1054 test -n "$CTAGS" && break
1057 for ac_prog in exetags etags
1059 # Extract the first word of "$ac_prog", so it can be a program name with args.
1060 set dummy $ac_prog; ac_word=$2
1061 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1062 echo "configure:1063: checking for $ac_word" >&5
1063 if eval "test \"`echo '$''{'ac_cv_prog_ETAGS'+set}'`\" = set"; then
1064 echo $ac_n "(cached) $ac_c" 1>&6
1066 if test -n "$ETAGS"; then
1067 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
1069 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1071 for ac_dir in $ac_dummy; do
1072 test -z "$ac_dir" && ac_dir=.
1073 if test -f $ac_dir/$ac_word; then
1074 ac_cv_prog_ETAGS="$ac_prog"
1081 ETAGS="$ac_cv_prog_ETAGS"
1082 if test -n "$ETAGS"; then
1083 echo "$ac_t""$ETAGS" 1>&6
1085 echo "$ac_t""no" 1>&6
1088 test -n "$ETAGS" && break
1092 # Extract the first word of "${CTAGS-ctags}", so it can be a program name with args.
1093 set dummy ${CTAGS-ctags}; ac_word=$2
1094 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1095 echo "configure:1096: checking for $ac_word" >&5
1096 if eval "test \"`echo '$''{'ac_cv_prog_MAKE_LOWER_TAGS'+set}'`\" = set"; then
1097 echo $ac_n "(cached) $ac_c" 1>&6
1099 if test -n "$MAKE_LOWER_TAGS"; then
1100 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
1102 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1104 for ac_dir in $ac_dummy; do
1105 test -z "$ac_dir" && ac_dir=.
1106 if test -f $ac_dir/$ac_word; then
1107 ac_cv_prog_MAKE_LOWER_TAGS="yes"
1112 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
1115 MAKE_LOWER_TAGS="$ac_cv_prog_MAKE_LOWER_TAGS"
1116 if test -n "$MAKE_LOWER_TAGS"; then
1117 echo "$ac_t""$MAKE_LOWER_TAGS" 1>&6
1119 echo "$ac_t""no" 1>&6
1123 if test "$cf_cv_mixedcase" = yes ; then
1124 # Extract the first word of "${ETAGS-etags}", so it can be a program name with args.
1125 set dummy ${ETAGS-etags}; ac_word=$2
1126 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1127 echo "configure:1128: checking for $ac_word" >&5
1128 if eval "test \"`echo '$''{'ac_cv_prog_MAKE_UPPER_TAGS'+set}'`\" = set"; then
1129 echo $ac_n "(cached) $ac_c" 1>&6
1131 if test -n "$MAKE_UPPER_TAGS"; then
1132 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
1134 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
1136 for ac_dir in $ac_dummy; do
1137 test -z "$ac_dir" && ac_dir=.
1138 if test -f $ac_dir/$ac_word; then
1139 ac_cv_prog_MAKE_UPPER_TAGS="yes"
1144 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
1147 MAKE_UPPER_TAGS="$ac_cv_prog_MAKE_UPPER_TAGS"
1148 if test -n "$MAKE_UPPER_TAGS"; then
1149 echo "$ac_t""$MAKE_UPPER_TAGS" 1>&6
1151 echo "$ac_t""no" 1>&6
1158 if test "$MAKE_UPPER_TAGS" = yes ; then
1164 if test "$MAKE_LOWER_TAGS" = yes ; then
1178 CC_SHARED_OPTS=unknown
1179 CPPFLAGS="$CPPFLAGS"
1181 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
1182 DFT_UPR_MODEL="NORMAL"
1201 TINFO_ARGS='$(LIBS_CURSES)'
1202 cf_cv_abi_version=""
1203 cf_cv_rel_version=""
1208 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
1209 echo "configure:1210: checking for Cygwin environment" >&5
1210 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
1211 echo $ac_n "(cached) $ac_c" 1>&6
1213 cat > conftest.$ac_ext <<EOF
1214 #line 1215 "configure"
1215 #include "confdefs.h"
1220 #define __CYGWIN__ __CYGWIN32__
1225 if { (eval echo configure:1226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1229 echo "configure: failed program was:" >&5
1230 cat conftest.$ac_ext >&5
1238 echo "$ac_t""$ac_cv_cygwin" 1>&6
1240 test "$ac_cv_cygwin" = yes && CYGWIN=yes
1241 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
1242 echo "configure:1243: checking for mingw32 environment" >&5
1243 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
1244 echo $ac_n "(cached) $ac_c" 1>&6
1246 cat > conftest.$ac_ext <<EOF
1247 #line 1248 "configure"
1248 #include "confdefs.h"
1254 if { (eval echo configure:1255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1258 echo "configure: failed program was:" >&5
1259 cat conftest.$ac_ext >&5
1267 echo "$ac_t""$ac_cv_mingw32" 1>&6
1269 test "$ac_cv_mingw32" = yes && MINGW32=yes
1272 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
1273 echo "configure:1274: checking for executable suffix" >&5
1274 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
1275 echo $ac_n "(cached) $ac_c" 1>&6
1277 if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
1281 echo 'int main () { return 0; }' > conftest.$ac_ext
1283 if { (eval echo configure:1284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
1284 for file in conftest.*; do
1286 *.c | *.o | *.obj) ;;
1287 *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
1291 { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
1294 test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
1299 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
1300 echo "$ac_t""${ac_cv_exeext}" 1>&6
1303 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
1304 echo "configure:1305: checking for object suffix" >&5
1305 if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
1306 echo $ac_n "(cached) $ac_c" 1>&6
1309 echo 'int i = 1;' > conftest.$ac_ext
1310 if { (eval echo configure:1311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1311 for ac_file in conftest.*; do
1314 *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
1318 { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
1323 echo "$ac_t""$ac_cv_objext" 1>&6
1324 OBJEXT=$ac_cv_objext
1325 ac_objext=$ac_cv_objext
1329 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
1330 echo "configure:1331: checking for ${CC-cc} option to accept ANSI C" >&5
1331 if eval "test \"`echo '$''{'cf_cv_ansi_cc'+set}'`\" = set"; then
1332 echo $ac_n "(cached) $ac_c" 1>&6
1336 cf_save_CFLAGS="$CFLAGS"
1337 cf_save_CPPFLAGS="$CPPFLAGS"
1338 # Don't try gcc -ansi; that turns off useful extensions and
1339 # breaks some systems' header files.
1340 # AIX -qlanglvl=ansi
1341 # Ultrix and OSF/1 -std1
1342 # HP-UX -Aa -D_HPUX_SOURCE
1344 # UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
1345 for cf_arg in "-DCC_HAS_PROTOS" \
1350 "-Aa -D_HPUX_SOURCE" \
1357 cf_new_extra_cppflags=
1359 for cf_add_cflags in $cf_arg
1361 case $cf_fix_cppflags in
1363 case $cf_add_cflags in #(vi
1364 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1365 case $cf_add_cflags in
1367 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1369 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1370 && test -z "${cf_tst_cflags}" \
1371 && cf_fix_cppflags=yes
1373 if test $cf_fix_cppflags = yes ; then
1374 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1376 elif test "${cf_tst_cflags}" = "\"'" ; then
1377 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1383 *$cf_add_cflags) #(vi
1386 case $cf_add_cflags in #(vi
1388 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1390 CPPFLAGS=`echo "$CPPFLAGS" | \
1391 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1392 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1396 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1401 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1406 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1408 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1410 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1411 && test -z "${cf_tst_cflags}" \
1412 && cf_fix_cppflags=no
1417 if test -n "$cf_new_cflags" ; then
1419 CFLAGS="$CFLAGS $cf_new_cflags"
1422 if test -n "$cf_new_cppflags" ; then
1424 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1427 if test -n "$cf_new_extra_cppflags" ; then
1429 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1435 cat > conftest.$ac_ext <<EOF
1436 #line 1437 "configure"
1437 #include "confdefs.h"
1439 #ifndef CC_HAS_PROTOS
1440 #if !defined(__STDC__) || (__STDC__ != 1)
1447 int test (int i, double x);
1448 struct s1 {int (*f) (int a);};
1449 struct s2 {int (*f) (double a);};
1452 if { (eval echo configure:1453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1454 cf_cv_ansi_cc="$cf_arg"; break
1456 echo "configure: failed program was:" >&5
1457 cat conftest.$ac_ext >&5
1461 CFLAGS="$cf_save_CFLAGS"
1462 CPPFLAGS="$cf_save_CPPFLAGS"
1466 echo "$ac_t""$cf_cv_ansi_cc" 1>&6
1468 if test "$cf_cv_ansi_cc" != "no"; then
1469 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
1474 cf_new_extra_cppflags=
1476 for cf_add_cflags in $cf_cv_ansi_cc
1478 case $cf_fix_cppflags in
1480 case $cf_add_cflags in #(vi
1481 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1482 case $cf_add_cflags in
1484 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1486 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1487 && test -z "${cf_tst_cflags}" \
1488 && cf_fix_cppflags=yes
1490 if test $cf_fix_cppflags = yes ; then
1491 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1493 elif test "${cf_tst_cflags}" = "\"'" ; then
1494 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1500 *$cf_add_cflags) #(vi
1503 case $cf_add_cflags in #(vi
1505 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1507 CPPFLAGS=`echo "$CPPFLAGS" | \
1508 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1509 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1513 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1518 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1523 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1525 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1527 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1528 && test -z "${cf_tst_cflags}" \
1529 && cf_fix_cppflags=no
1534 if test -n "$cf_new_cflags" ; then
1536 CFLAGS="$CFLAGS $cf_new_cflags"
1539 if test -n "$cf_new_cppflags" ; then
1541 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1544 if test -n "$cf_new_extra_cppflags" ; then
1546 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1553 cat >> confdefs.h <<\EOF
1554 #define CC_HAS_PROTOS 1
1561 if test "$cf_cv_ansi_cc" = "no"; then
1562 { echo "configure: error: Your compiler does not appear to recognize prototypes.
1563 You have the following choices:
1564 a. adjust your compiler options
1565 b. get an up-to-date compiler
1566 c. use a wrapper such as unproto" 1>&2; exit 1; }
1570 if test "$GCC" = yes
1572 cat > conftest.i <<EOF
1574 #define GCC_PRINTF 0
1579 #ifndef GCC_NORETURN
1580 #define GCC_NORETURN /* nothing */
1583 #define GCC_UNUSED /* nothing */
1586 if test "$GCC" = yes
1588 echo "checking for $CC __attribute__ directives" 1>&6
1589 echo "configure:1590: checking for $CC __attribute__ directives" >&5
1590 cat > conftest.$ac_ext <<EOF
1591 #line 1592 "${as_me-configure}"
1592 #include "confdefs.h"
1593 #include "conftest.h"
1594 #include "conftest.i"
1596 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
1598 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
1601 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
1603 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
1605 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
1606 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
1607 extern void foo(void) GCC_NORETURN;
1608 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
1610 cf_printf_attribute=no
1611 cf_scanf_attribute=no
1612 for cf_attribute in scanf printf unused noreturn
1615 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1617 cf_directive="__attribute__(($cf_attribute))"
1618 echo "checking for $CC $cf_directive" 1>&5
1620 case $cf_attribute in #(vi
1622 cf_printf_attribute=yes
1623 cat >conftest.h <<EOF
1624 #define GCC_$cf_ATTRIBUTE 1
1628 cf_scanf_attribute=yes
1629 cat >conftest.h <<EOF
1630 #define GCC_$cf_ATTRIBUTE 1
1634 cat >conftest.h <<EOF
1635 #define GCC_$cf_ATTRIBUTE $cf_directive
1640 if { (eval echo configure:1641: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1641 test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
1642 cat conftest.h >>confdefs.h
1643 case $cf_attribute in #(vi
1645 if test "$cf_printf_attribute" = no ; then
1646 cat >>confdefs.h <<EOF
1647 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
1650 cat >>confdefs.h <<EOF
1651 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
1656 if test "$cf_scanf_attribute" = no ; then
1657 cat >>confdefs.h <<EOF
1658 #define GCC_SCANFLIKE(fmt,var) /* nothing */
1661 cat >>confdefs.h <<EOF
1662 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
1670 fgrep define conftest.i >>confdefs.h
1678 cf_POSIX_C_SOURCE=199506L
1681 case $host_os in #(vi
1683 cf_xopen_source="-D_ALL_SOURCE"
1686 cf_xopen_source="-D_APPLE_C_SOURCE"
1689 cf_xopen_source="-D_DARWIN_C_SOURCE"
1691 freebsd*|dragonfly*) #(vi
1692 # 5.x headers associate
1693 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
1694 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
1695 cf_POSIX_C_SOURCE=200112L
1697 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1700 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
1703 cf_xopen_source="-D_HPUX_SOURCE"
1706 cf_xopen_source="-D_SGI_SOURCE"
1708 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
1710 echo $ac_n "checking if we must define _GNU_SOURCE""... $ac_c" 1>&6
1711 echo "configure:1712: checking if we must define _GNU_SOURCE" >&5
1712 if eval "test \"`echo '$''{'cf_cv_gnu_source'+set}'`\" = set"; then
1713 echo $ac_n "(cached) $ac_c" 1>&6
1716 cat > conftest.$ac_ext <<EOF
1717 #line 1718 "configure"
1718 #include "confdefs.h"
1719 #include <sys/types.h>
1722 #ifndef _XOPEN_SOURCE
1727 if { (eval echo configure:1728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1731 echo "configure: failed program was:" >&5
1732 cat conftest.$ac_ext >&5
1735 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1736 cat > conftest.$ac_ext <<EOF
1737 #line 1738 "configure"
1738 #include "confdefs.h"
1739 #include <sys/types.h>
1742 #ifdef _XOPEN_SOURCE
1747 if { (eval echo configure:1748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1751 echo "configure: failed program was:" >&5
1752 cat conftest.$ac_ext >&5
1754 cf_cv_gnu_source=yes
1764 echo "$ac_t""$cf_cv_gnu_source" 1>&6
1765 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
1769 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
1772 # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
1775 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
1778 cf_xopen_source="-D_OSF_SOURCE"
1781 cf_xopen_source="-D_QNX_SOURCE"
1784 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
1786 solaris2.1[0-9]) #(vi
1787 cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1789 solaris2.[1-9]) #(vi
1790 cf_xopen_source="-D__EXTENSIONS__"
1793 echo $ac_n "checking if we should define _XOPEN_SOURCE""... $ac_c" 1>&6
1794 echo "configure:1795: checking if we should define _XOPEN_SOURCE" >&5
1795 if eval "test \"`echo '$''{'cf_cv_xopen_source'+set}'`\" = set"; then
1796 echo $ac_n "(cached) $ac_c" 1>&6
1799 cat > conftest.$ac_ext <<EOF
1800 #line 1801 "configure"
1801 #include "confdefs.h"
1802 #include <sys/types.h>
1805 #ifndef _XOPEN_SOURCE
1810 if { (eval echo configure:1811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1812 cf_cv_xopen_source=no
1814 echo "configure: failed program was:" >&5
1815 cat conftest.$ac_ext >&5
1818 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
1819 cat > conftest.$ac_ext <<EOF
1820 #line 1821 "configure"
1821 #include "confdefs.h"
1822 #include <sys/types.h>
1825 #ifdef _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
1837 cf_cv_xopen_source=$cf_XOPEN_SOURCE
1847 echo "$ac_t""$cf_cv_xopen_source" 1>&6
1848 if test "$cf_cv_xopen_source" != no ; then
1850 CFLAGS=`echo "$CFLAGS" | \
1851 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
1852 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
1855 CPPFLAGS=`echo "$CPPFLAGS" | \
1856 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
1857 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
1859 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
1864 cf_new_extra_cppflags=
1866 for cf_add_cflags in $cf_temp_xopen_source
1868 case $cf_fix_cppflags in
1870 case $cf_add_cflags in #(vi
1871 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
1872 case $cf_add_cflags in
1874 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
1876 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1877 && test -z "${cf_tst_cflags}" \
1878 && cf_fix_cppflags=yes
1880 if test $cf_fix_cppflags = yes ; then
1881 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1883 elif test "${cf_tst_cflags}" = "\"'" ; then
1884 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1890 *$cf_add_cflags) #(vi
1893 case $cf_add_cflags in #(vi
1895 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
1897 CPPFLAGS=`echo "$CPPFLAGS" | \
1898 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
1899 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
1903 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
1908 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
1913 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
1915 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
1917 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
1918 && test -z "${cf_tst_cflags}" \
1919 && cf_fix_cppflags=no
1924 if test -n "$cf_new_cflags" ; then
1926 CFLAGS="$CFLAGS $cf_new_cflags"
1929 if test -n "$cf_new_cppflags" ; then
1931 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
1934 if test -n "$cf_new_extra_cppflags" ; then
1936 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
1944 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
1946 cf_save_CFLAGS="$CFLAGS"
1947 cf_save_CPPFLAGS="$CPPFLAGS"
1950 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
1951 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
1952 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
1955 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
1956 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
1957 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
1960 echo $ac_n "checking if we should define _POSIX_C_SOURCE""... $ac_c" 1>&6
1961 echo "configure:1962: checking if we should define _POSIX_C_SOURCE" >&5
1962 if eval "test \"`echo '$''{'cf_cv_posix_c_source'+set}'`\" = set"; then
1963 echo $ac_n "(cached) $ac_c" 1>&6
1967 echo "${as_me-configure}:1968: testing if the symbol is already defined go no further ..." 1>&5
1969 cat > conftest.$ac_ext <<EOF
1970 #line 1971 "configure"
1971 #include "confdefs.h"
1972 #include <sys/types.h>
1975 #ifndef _POSIX_C_SOURCE
1980 if { (eval echo configure:1981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
1982 cf_cv_posix_c_source=no
1984 echo "configure: failed program was:" >&5
1985 cat conftest.$ac_ext >&5
1987 cf_want_posix_source=no
1988 case .$cf_POSIX_C_SOURCE in #(vi
1990 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
1993 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
1994 cf_want_posix_source=yes
1997 cf_want_posix_source=yes
2000 if test "$cf_want_posix_source" = yes ; then
2001 cat > conftest.$ac_ext <<EOF
2002 #line 2003 "configure"
2003 #include "confdefs.h"
2004 #include <sys/types.h>
2007 #ifdef _POSIX_SOURCE
2012 if { (eval echo configure:2013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2015 echo "configure: failed program was:" >&5
2016 cat conftest.$ac_ext >&5
2018 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
2023 echo "${as_me-configure}:2024: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
2025 CFLAGS="$cf_trim_CFLAGS"
2026 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
2028 echo "${as_me-configure}:2029: testing if the second compile does not leave our definition intact error ..." 1>&5
2030 cat > conftest.$ac_ext <<EOF
2031 #line 2032 "configure"
2032 #include "confdefs.h"
2033 #include <sys/types.h>
2036 #ifndef _POSIX_C_SOURCE
2041 if { (eval echo configure:2042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2044 echo "configure: failed program was:" >&5
2045 cat conftest.$ac_ext >&5
2047 cf_cv_posix_c_source=no
2050 CFLAGS="$cf_save_CFLAGS"
2051 CPPFLAGS="$cf_save_CPPFLAGS"
2058 echo "$ac_t""$cf_cv_posix_c_source" 1>&6
2060 if test "$cf_cv_posix_c_source" != no ; then
2061 CFLAGS="$cf_trim_CFLAGS"
2062 CPPFLAGS="$cf_trim_CPPFLAGS"
2067 cf_new_extra_cppflags=
2069 for cf_add_cflags in $cf_cv_posix_c_source
2071 case $cf_fix_cppflags in
2073 case $cf_add_cflags in #(vi
2074 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2075 case $cf_add_cflags in
2077 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2079 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2080 && test -z "${cf_tst_cflags}" \
2081 && cf_fix_cppflags=yes
2083 if test $cf_fix_cppflags = yes ; then
2084 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2086 elif test "${cf_tst_cflags}" = "\"'" ; then
2087 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2093 *$cf_add_cflags) #(vi
2096 case $cf_add_cflags in #(vi
2098 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2100 CPPFLAGS=`echo "$CPPFLAGS" | \
2101 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2102 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2106 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2111 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2116 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2118 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2120 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2121 && test -z "${cf_tst_cflags}" \
2122 && cf_fix_cppflags=no
2127 if test -n "$cf_new_cflags" ; then
2129 CFLAGS="$CFLAGS $cf_new_cflags"
2132 if test -n "$cf_new_cppflags" ; then
2134 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2137 if test -n "$cf_new_extra_cppflags" ; then
2139 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2151 if test -n "$cf_xopen_source" ; then
2156 cf_new_extra_cppflags=
2158 for cf_add_cflags in $cf_xopen_source
2160 case $cf_fix_cppflags in
2162 case $cf_add_cflags in #(vi
2163 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2164 case $cf_add_cflags in
2166 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2168 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2169 && test -z "${cf_tst_cflags}" \
2170 && cf_fix_cppflags=yes
2172 if test $cf_fix_cppflags = yes ; then
2173 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2175 elif test "${cf_tst_cflags}" = "\"'" ; then
2176 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2182 *$cf_add_cflags) #(vi
2185 case $cf_add_cflags in #(vi
2187 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2189 CPPFLAGS=`echo "$CPPFLAGS" | \
2190 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2191 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2195 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2200 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2205 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2207 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2209 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2210 && test -z "${cf_tst_cflags}" \
2211 && cf_fix_cppflags=no
2216 if test -n "$cf_new_cflags" ; then
2218 CFLAGS="$CFLAGS $cf_new_cflags"
2221 if test -n "$cf_new_cppflags" ; then
2223 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2226 if test -n "$cf_new_extra_cppflags" ; then
2228 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2236 echo $ac_n "checking for working const""... $ac_c" 1>&6
2237 echo "configure:2238: checking for working const" >&5
2238 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
2239 echo $ac_n "(cached) $ac_c" 1>&6
2241 cat > conftest.$ac_ext <<EOF
2242 #line 2243 "configure"
2243 #include "confdefs.h"
2247 /* Ultrix mips cc rejects this. */
2248 typedef int charset[2]; const charset x;
2249 /* SunOS 4.1.1 cc rejects this. */
2250 char const *const *ccp;
2252 /* NEC SVR4.0.2 mips cc rejects this. */
2253 struct point {int x, y;};
2254 static struct point const zero = {0,0};
2255 /* AIX XL C 1.02.0.0 rejects this.
2256 It does not let you subtract one const X* pointer from another in an arm
2257 of an if-expression whose if-part is not a constant expression */
2258 const char *g = "string";
2259 ccp = &g + (g ? g-g : 0);
2260 /* HPUX 7.0 cc rejects these. */
2263 ccp = (char const *const *) p;
2264 { /* SCO 3.2v4 cc rejects this. */
2266 char const *s = 0 ? (char *) 0 : (char const *) 0;
2270 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
2272 const int *foo = &x[0];
2275 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
2276 typedef const int *iptr;
2280 { /* AIX XL C 1.02.0.0 rejects this saying
2281 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
2282 struct s { int j; const int *ap[3]; };
2283 struct s *b; b->j = 5;
2285 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
2291 if { (eval echo configure:2292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2295 echo "configure: failed program was:" >&5
2296 cat conftest.$ac_ext >&5
2303 echo "$ac_t""$ac_cv_c_const" 1>&6
2304 if test $ac_cv_c_const = no; then
2305 cat >> confdefs.h <<\EOF
2312 echo $ac_n "checking for signal global datatype""... $ac_c" 1>&6
2313 echo "configure:2314: checking for signal global datatype" >&5
2314 if eval "test \"`echo '$''{'cf_cv_sig_atomic_t'+set}'`\" = set"; then
2315 echo $ac_n "(cached) $ac_c" 1>&6
2319 "volatile sig_atomic_t" \
2323 cat > conftest.$ac_ext <<EOF
2324 #line 2325 "configure"
2325 #include "confdefs.h"
2327 #include <sys/types.h>
2333 static void handler(int sig)
2338 signal(SIGINT, handler);
2342 if { (eval echo configure:2343: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2344 cf_cv_sig_atomic_t=$cf_type
2346 echo "configure: failed program was:" >&5
2347 cat conftest.$ac_ext >&5
2349 cf_cv_sig_atomic_t=no
2352 test "$cf_cv_sig_atomic_t" != no && break
2357 echo "$ac_t""$cf_cv_sig_atomic_t" 1>&6
2358 test "$cf_cv_sig_atomic_t" != no && cat >> confdefs.h <<EOF
2359 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
2365 echo $ac_n "checking if you want to see long compiling messages""... $ac_c" 1>&6
2366 echo "configure:2367: checking if you want to see long compiling messages" >&5
2368 # Check whether --enable-echo or --disable-echo was given.
2369 if test "${enable_echo+set}" = set; then
2370 enableval="$enable_echo"
2371 test "$enableval" != no && enableval=yes
2372 if test "$enableval" != "yes" ; then
2375 ECHO_LD='@echo linking $@;'
2376 RULE_CC='@echo compiling $<'
2377 SHOW_CC='@echo compiling $@'
2401 echo "$ac_t""$enableval" 1>&6
2411 if test "$GCC" = yes ; then
2412 echo $ac_n "checking version of $CC""... $ac_c" 1>&6
2413 echo "configure:2414: checking version of $CC" >&5
2414 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2415 test -z "$GCC_VERSION" && GCC_VERSION=unknown
2416 echo "$ac_t""$GCC_VERSION" 1>&6
2420 if ( test "$GCC" = yes || test "$GXX" = yes )
2422 echo $ac_n "checking if you want to turn on gcc warnings""... $ac_c" 1>&6
2423 echo "configure:2424: checking if you want to turn on gcc warnings" >&5
2425 # Check whether --enable-warnings or --disable-warnings was given.
2426 if test "${enable_warnings+set}" = set; then
2427 enableval="$enable_warnings"
2428 test "$enableval" != yes && enableval=no
2429 if test "$enableval" != "no" ; then
2440 echo "$ac_t""$with_warnings" 1>&6
2441 if test "$with_warnings" = "yes"
2444 if test "$GCC" = yes
2446 cat > conftest.i <<EOF
2448 #define GCC_PRINTF 0
2453 #ifndef GCC_NORETURN
2454 #define GCC_NORETURN /* nothing */
2457 #define GCC_UNUSED /* nothing */
2460 if test "$GCC" = yes
2462 echo "checking for $CC __attribute__ directives" 1>&6
2463 echo "configure:2464: checking for $CC __attribute__ directives" >&5
2464 cat > conftest.$ac_ext <<EOF
2465 #line 2466 "${as_me-configure}"
2466 #include "confdefs.h"
2467 #include "conftest.h"
2468 #include "conftest.i"
2470 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2472 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2475 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2477 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
2479 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2480 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2481 extern void foo(void) GCC_NORETURN;
2482 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2484 cf_printf_attribute=no
2485 cf_scanf_attribute=no
2486 for cf_attribute in scanf printf unused noreturn
2489 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2491 cf_directive="__attribute__(($cf_attribute))"
2492 echo "checking for $CC $cf_directive" 1>&5
2494 case $cf_attribute in #(vi
2496 cf_printf_attribute=yes
2497 cat >conftest.h <<EOF
2498 #define GCC_$cf_ATTRIBUTE 1
2502 cf_scanf_attribute=yes
2503 cat >conftest.h <<EOF
2504 #define GCC_$cf_ATTRIBUTE 1
2508 cat >conftest.h <<EOF
2509 #define GCC_$cf_ATTRIBUTE $cf_directive
2514 if { (eval echo configure:2515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2515 test -n "$verbose" && echo "$ac_t""... $cf_attribute" 1>&6
2516 cat conftest.h >>confdefs.h
2517 case $cf_attribute in #(vi
2519 if test "$cf_printf_attribute" = no ; then
2520 cat >>confdefs.h <<EOF
2521 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
2524 cat >>confdefs.h <<EOF
2525 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2530 if test "$cf_scanf_attribute" = no ; then
2531 cat >>confdefs.h <<EOF
2532 #define GCC_SCANFLIKE(fmt,var) /* nothing */
2535 cat >>confdefs.h <<EOF
2536 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2544 fgrep define conftest.i >>confdefs.h
2554 if test "$GCC" = yes ; then
2557 echo $ac_n "checking if this is really Intel C compiler""... $ac_c" 1>&6
2558 echo "configure:2559: checking if this is really Intel C compiler" >&5
2559 cf_save_CFLAGS="$CFLAGS"
2560 CFLAGS="$CFLAGS -no-gcc"
2561 cat > conftest.$ac_ext <<EOF
2562 #line 2563 "configure"
2563 #include "confdefs.h"
2567 #ifdef __INTEL_COMPILER
2574 if { (eval echo configure:2575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2577 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
2580 echo "configure: failed program was:" >&5
2581 cat conftest.$ac_ext >&5
2584 CFLAGS="$cf_save_CFLAGS"
2585 echo "$ac_t""$INTEL_COMPILER" 1>&6
2591 cat > conftest.$ac_ext <<EOF
2592 #line 2593 "${as_me-configure}"
2593 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
2596 if test "$INTEL_COMPILER" = yes
2598 # The "-wdXXX" options suppress warnings:
2599 # remark #1419: external declaration in primary source file
2600 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
2601 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
2602 # remark #193: zero used for undefined preprocessing identifier
2603 # remark #593: variable "curs_sb_left_arrow" was set but never used
2604 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
2605 # remark #869: parameter "tw" was never referenced
2606 # remark #981: operands are evaluated in unspecified order
2607 # warning #279: controlling expression is constant
2609 echo "checking for $CC warning options" 1>&6
2610 echo "configure:2611: checking for $CC warning options" >&5
2611 cf_save_CFLAGS="$CFLAGS"
2612 EXTRA_CFLAGS="-Wall"
2624 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
2625 if { (eval echo configure:2626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2626 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
2627 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
2630 CFLAGS="$cf_save_CFLAGS"
2632 elif test "$GCC" = yes
2634 echo "checking for $CC warning options" 1>&6
2635 echo "configure:2636: checking for $CC warning options" >&5
2636 cf_save_CFLAGS="$CFLAGS"
2639 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
2640 for cf_opt in W Wall \
2641 Wbad-function-cast \
2645 Wmissing-declarations \
2646 Wmissing-prototypes \
2650 Wstrict-prototypes \
2651 Wundef $cf_warn_CONST
2653 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
2654 if { (eval echo configure:2655: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2655 test -n "$verbose" && echo "$ac_t""... -$cf_opt" 1>&6
2656 case $cf_opt in #(vi
2658 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
2661 case $GCC_VERSION in
2663 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
2665 echo "${as_me-configure}:2666: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
2672 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
2675 CFLAGS="$cf_save_CFLAGS"
2687 # Check whether --with-curses-dir or --without-curses-dir was given.
2688 if test "${with_curses_dir+set}" = set; then
2689 withval="$with_curses_dir"
2691 if test "x$prefix" != xNONE; then
2692 cf_path_syntax="$prefix"
2694 cf_path_syntax="$ac_default_prefix"
2697 case ".$withval" in #(vi
2698 .\$\(*\)*|.\'*\'*) #(vi
2702 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
2705 eval withval="$withval"
2706 case ".$withval" in #(vi
2708 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2713 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
2716 { echo "configure: error: expected a pathname, not \"$withval\"" 1>&2; exit 1; }
2720 cf_cv_curses_dir=$withval
2728 # Check whether --with-5lib or --without-5lib was given.
2729 if test "${with_5lib+set}" = set; then
2730 withval="$with_5lib"
2731 LIBS="-L/usr/5lib $LIBS"
2732 CPPFLAGS="$CPPFLAGS -I/usr/5include"
2737 # Check whether --with-ncursesw or --without-ncursesw was given.
2738 if test "${with_ncursesw+set}" = set; then
2739 withval="$with_ncursesw"
2740 cf_cv_screen=ncursesw
2745 # Check whether --with-ncurses or --without-ncurses was given.
2746 if test "${with_ncurses+set}" = set; then
2747 withval="$with_ncurses"
2748 cf_cv_screen=ncurses
2753 # Check whether --with-pdcurses or --without-pdcurses was given.
2754 if test "${with_pdcurses+set}" = set; then
2755 withval="$with_pdcurses"
2756 cf_cv_screen=pdcurses
2764 case $cf_cv_screen in
2769 echo $ac_n "checking for extra include directories""... $ac_c" 1>&6
2770 echo "configure:2771: checking for extra include directories" >&5
2771 if eval "test \"`echo '$''{'cf_cv_curses_incdir'+set}'`\" = set"; then
2772 echo $ac_n "(cached) $ac_c" 1>&6
2775 cf_cv_curses_incdir=no
2776 case $host_os in #(vi
2778 test -d /usr/include/curses_colr && \
2779 cf_cv_curses_incdir="-I/usr/include/curses_colr"
2782 test -d /usr/5lib && \
2783 test -d /usr/5include && \
2784 cf_cv_curses_incdir="-I/usr/5include"
2790 echo "$ac_t""$cf_cv_curses_incdir" 1>&6
2791 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
2794 echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
2795 echo "configure:2796: checking if we have identified curses headers" >&5
2796 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
2797 echo $ac_n "(cached) $ac_c" 1>&6
2800 cf_cv_ncurses_header=none
2803 ncurses.h ncurses/curses.h ncurses/ncurses.h
2805 cat > conftest.$ac_ext <<EOF
2806 #line 2807 "configure"
2807 #include "confdefs.h"
2808 #include <${cf_header}>
2810 initscr(); tgoto("?", 0,0)
2813 if { (eval echo configure:2814: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2815 cf_cv_ncurses_header=$cf_header; break
2817 echo "configure: failed program was:" >&5
2818 cat conftest.$ac_ext >&5
2825 echo "$ac_t""$cf_cv_ncurses_header" 1>&6
2827 if test "$cf_cv_ncurses_header" = none ; then
2828 { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
2831 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
2832 for ac_hdr in $cf_cv_ncurses_header
2834 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
2835 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
2836 echo "configure:2837: checking for $ac_hdr" >&5
2837 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
2838 echo $ac_n "(cached) $ac_c" 1>&6
2840 cat > conftest.$ac_ext <<EOF
2841 #line 2842 "configure"
2842 #include "confdefs.h"
2845 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2846 { (eval echo configure:2847: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2847 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2848 if test -z "$ac_err"; then
2850 eval "ac_cv_header_$ac_safe=yes"
2853 echo "configure: failed program was:" >&5
2854 cat conftest.$ac_ext >&5
2856 eval "ac_cv_header_$ac_safe=no"
2860 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
2861 echo "$ac_t""yes" 1>&6
2862 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
2863 cat >> confdefs.h <<EOF
2864 #define $ac_tr_hdr 1
2868 echo "$ac_t""no" 1>&6
2874 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
2875 echo "configure:2876: checking for terminfo header" >&5
2876 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
2877 echo $ac_n "(cached) $ac_c" 1>&6
2880 case ${cf_cv_ncurses_header} in #(vi
2881 */ncurses.h|*/ncursesw.h) #(vi
2882 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
2885 cf_term_header=term.h
2889 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
2891 cat > conftest.$ac_ext <<EOF
2892 #line 2893 "configure"
2893 #include "confdefs.h"
2895 #include <${cf_cv_ncurses_header-curses.h}>
2899 int x = auto_left_margin
2902 if { (eval echo configure:2903: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2905 cf_cv_term_header="$cf_test"
2907 echo "configure: failed program was:" >&5
2908 cat conftest.$ac_ext >&5
2911 cf_cv_term_header=unknown
2915 test "$cf_cv_term_header" != unknown && break
2920 echo "$ac_t""$cf_cv_term_header" 1>&6
2922 # Set definitions to allow ifdef'ing to accommodate subdirectories
2924 case $cf_cv_term_header in # (vi
2926 cat >> confdefs.h <<\EOF
2927 #define HAVE_TERM_H 1
2933 case $cf_cv_term_header in # (vi
2934 ncurses/term.h) #(vi
2935 cat >> confdefs.h <<\EOF
2936 #define HAVE_NCURSES_TERM_H 1
2941 cat >> confdefs.h <<\EOF
2942 #define HAVE_NCURSESW_TERM_H 1
2950 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
2951 echo "configure:2952: checking for ncurses version" >&5
2952 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
2953 echo $ac_n "(cached) $ac_c" 1>&6
2956 cf_cv_ncurses_version=no
2959 if test "$cross_compiling" = yes; then
2962 # This will not work if the preprocessor splits the line after the
2963 # Autoconf token. The 'unproto' program does that.
2964 cat > conftest.$ac_ext <<EOF
2965 #include <${cf_cv_ncurses_header-curses.h}>
2967 #ifdef NCURSES_VERSION
2968 Autoconf NCURSES_VERSION
2976 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
2977 { (eval echo configure:2978: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
2978 if test -f conftest.out ; then
2979 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
2980 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
2985 cat > conftest.$ac_ext <<EOF
2986 #line 2987 "configure"
2987 #include "confdefs.h"
2989 #include <${cf_cv_ncurses_header-curses.h}>
2993 FILE *fp = fopen("$cf_tempfile", "w");
2994 #ifdef NCURSES_VERSION
2995 # ifdef NCURSES_VERSION_PATCH
2996 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
2998 fprintf(fp, "%s\n", NCURSES_VERSION);
3002 fprintf(fp, "old\n");
3007 ${cf_cv_main_return-return}(0);
3010 if { (eval echo configure:3011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
3013 cf_cv_ncurses_version=`cat $cf_tempfile`
3015 echo "configure: failed program was:" >&5
3016 cat conftest.$ac_ext >&5
3025 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
3026 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
3033 echo $ac_n "checking if we have identified curses libraries""... $ac_c" 1>&6
3034 echo "configure:3035: checking if we have identified curses libraries" >&5
3035 cat > conftest.$ac_ext <<EOF
3036 #line 3037 "configure"
3037 #include "confdefs.h"
3038 #include <${cf_cv_ncurses_header-curses.h}>
3040 initscr(); tgoto("?", 0,0)
3043 if { (eval echo configure:3044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3047 echo "configure: failed program was:" >&5
3048 cat conftest.$ac_ext >&5
3053 echo "$ac_t""$cf_result" 1>&6
3055 if test "$cf_result" = no ; then
3056 case $host_os in #(vi
3058 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
3059 echo "configure:3060: checking for tgoto in -lmytinfo" >&5
3060 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
3061 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3062 echo $ac_n "(cached) $ac_c" 1>&6
3064 ac_save_LIBS="$LIBS"
3065 LIBS="-lmytinfo $LIBS"
3066 cat > conftest.$ac_ext <<EOF
3067 #line 3068 "configure"
3068 #include "confdefs.h"
3069 /* Override any gcc2 internal prototype to avoid an error. */
3070 /* We use char because int might match the return type of a gcc2
3071 builtin and then its argument prototype would still apply. */
3078 if { (eval echo configure:3079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3080 eval "ac_cv_lib_$ac_lib_var=yes"
3082 echo "configure: failed program was:" >&5
3083 cat conftest.$ac_ext >&5
3085 eval "ac_cv_lib_$ac_lib_var=no"
3088 LIBS="$ac_save_LIBS"
3091 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3092 echo "$ac_t""yes" 1>&6
3093 LIBS="-lmytinfo $LIBS"
3095 echo "$ac_t""no" 1>&6
3100 echo $ac_n "checking for initscr in -lcur_colr""... $ac_c" 1>&6
3101 echo "configure:3102: checking for initscr in -lcur_colr" >&5
3102 ac_lib_var=`echo cur_colr'_'initscr | sed 'y%./+-%__p_%'`
3103 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3104 echo $ac_n "(cached) $ac_c" 1>&6
3106 ac_save_LIBS="$LIBS"
3107 LIBS="-lcur_colr $LIBS"
3108 cat > conftest.$ac_ext <<EOF
3109 #line 3110 "configure"
3110 #include "confdefs.h"
3111 /* Override any gcc2 internal prototype to avoid an error. */
3112 /* We use char because int might match the return type of a gcc2
3113 builtin and then its argument prototype would still apply. */
3120 if { (eval echo configure:3121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3122 eval "ac_cv_lib_$ac_lib_var=yes"
3124 echo "configure: failed program was:" >&5
3125 cat conftest.$ac_ext >&5
3127 eval "ac_cv_lib_$ac_lib_var=no"
3130 LIBS="$ac_save_LIBS"
3133 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3134 echo "$ac_t""yes" 1>&6
3136 LIBS="-lcur_colr $LIBS"
3137 ac_cv_func_initscr=yes
3140 echo "$ac_t""no" 1>&6
3142 echo $ac_n "checking for initscr in -lHcurses""... $ac_c" 1>&6
3143 echo "configure:3144: checking for initscr in -lHcurses" >&5
3144 ac_lib_var=`echo Hcurses'_'initscr | sed 'y%./+-%__p_%'`
3145 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3146 echo $ac_n "(cached) $ac_c" 1>&6
3148 ac_save_LIBS="$LIBS"
3149 LIBS="-lHcurses $LIBS"
3150 cat > conftest.$ac_ext <<EOF
3151 #line 3152 "configure"
3152 #include "confdefs.h"
3153 /* Override any gcc2 internal prototype to avoid an error. */
3154 /* We use char because int might match the return type of a gcc2
3155 builtin and then its argument prototype would still apply. */
3162 if { (eval echo configure:3163: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3164 eval "ac_cv_lib_$ac_lib_var=yes"
3166 echo "configure: failed program was:" >&5
3167 cat conftest.$ac_ext >&5
3169 eval "ac_cv_lib_$ac_lib_var=no"
3172 LIBS="$ac_save_LIBS"
3175 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3176 echo "$ac_t""yes" 1>&6
3178 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
3179 LIBS="-lHcurses $LIBS"
3180 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
3181 ac_cv_func_initscr=yes
3184 echo "$ac_t""no" 1>&6
3190 linux*) # Suse Linux does not follow /usr/lib convention
3192 if test -n "/lib" ; then
3193 for cf_add_libdir in /lib
3195 if test $cf_add_libdir = /usr/lib ; then
3197 elif test -d $cf_add_libdir
3200 if test -n "$LDFLAGS$LIBS" ; then
3201 # a loop is needed to ensure we can add subdirs of existing dirs
3202 for cf_test_libdir in $LDFLAGS $LIBS ; do
3203 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3204 cf_have_libdir=yes; break
3208 if test "$cf_have_libdir" = no ; then
3209 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
3211 echo "${as_me-configure}:3212: testing adding $cf_add_libdir to library-path ..." 1>&5
3214 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3222 if test -d /usr/5lib ; then
3224 if test -n "/usr/5lib" ; then
3225 for cf_add_libdir in /usr/5lib
3227 if test $cf_add_libdir = /usr/lib ; then
3229 elif test -d $cf_add_libdir
3232 if test -n "$LDFLAGS$LIBS" ; then
3233 # a loop is needed to ensure we can add subdirs of existing dirs
3234 for cf_test_libdir in $LDFLAGS $LIBS ; do
3235 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
3236 cf_have_libdir=yes; break
3240 if test "$cf_have_libdir" = no ; then
3241 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
3243 echo "${as_me-configure}:3244: testing adding $cf_add_libdir to library-path ..." 1>&5
3246 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
3252 LIBS="$LIBS -lcurses -ltermcap"
3254 ac_cv_func_initscr=yes
3258 if test ".$ac_cv_func_initscr" != .yes ; then
3259 cf_save_LIBS="$LIBS"
3263 if test ".${cf_cv_ncurses_version-no}" != .no
3265 cf_check_list="ncurses curses cursesX"
3267 cf_check_list="cursesX curses ncurses"
3270 # Check for library containing tgoto. Do this before curses library
3271 # because it may be needed to link the test-case for initscr.
3272 echo $ac_n "checking for tgoto""... $ac_c" 1>&6
3273 echo "configure:3274: checking for tgoto" >&5
3274 if eval "test \"`echo '$''{'ac_cv_func_tgoto'+set}'`\" = set"; then
3275 echo $ac_n "(cached) $ac_c" 1>&6
3277 cat > conftest.$ac_ext <<EOF
3278 #line 3279 "configure"
3279 #include "confdefs.h"
3280 /* System header to define __stub macros and hopefully few prototypes,
3281 which can conflict with char tgoto(); below. */
3283 /* Override any gcc2 internal prototype to avoid an error. */
3284 /* We use char because int might match the return type of a gcc2
3285 builtin and then its argument prototype would still apply. */
3290 /* The GNU C library defines this for functions which it implements
3291 to always fail with ENOSYS. Some functions are actually named
3292 something starting with __ and the normal name is an alias. */
3293 #if defined (__stub_tgoto) || defined (__stub___tgoto)
3301 if { (eval echo configure:3302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3303 eval "ac_cv_func_tgoto=yes"
3305 echo "configure: failed program was:" >&5
3306 cat conftest.$ac_ext >&5
3308 eval "ac_cv_func_tgoto=no"
3313 if eval "test \"`echo '$ac_cv_func_'tgoto`\" = yes"; then
3314 echo "$ac_t""yes" 1>&6
3315 cf_term_lib=predefined
3317 echo "$ac_t""no" 1>&6
3319 for cf_term_lib in $cf_check_list termcap termlib unknown
3321 echo $ac_n "checking for tgoto in -l$cf_term_lib""... $ac_c" 1>&6
3322 echo "configure:3323: checking for tgoto in -l$cf_term_lib" >&5
3323 ac_lib_var=`echo $cf_term_lib'_'tgoto | sed 'y%./+-%__p_%'`
3324 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3325 echo $ac_n "(cached) $ac_c" 1>&6
3327 ac_save_LIBS="$LIBS"
3328 LIBS="-l$cf_term_lib $LIBS"
3329 cat > conftest.$ac_ext <<EOF
3330 #line 3331 "configure"
3331 #include "confdefs.h"
3332 /* Override any gcc2 internal prototype to avoid an error. */
3333 /* We use char because int might match the return type of a gcc2
3334 builtin and then its argument prototype would still apply. */
3341 if { (eval echo configure:3342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3343 eval "ac_cv_lib_$ac_lib_var=yes"
3345 echo "configure: failed program was:" >&5
3346 cat conftest.$ac_ext >&5
3348 eval "ac_cv_lib_$ac_lib_var=no"
3351 LIBS="$ac_save_LIBS"
3354 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3355 echo "$ac_t""yes" 1>&6
3358 echo "$ac_t""no" 1>&6
3366 # Check for library containing initscr
3367 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
3368 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
3370 echo $ac_n "checking for initscr in -l$cf_curs_lib""... $ac_c" 1>&6
3371 echo "configure:3372: checking for initscr in -l$cf_curs_lib" >&5
3372 ac_lib_var=`echo $cf_curs_lib'_'initscr | sed 'y%./+-%__p_%'`
3373 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
3374 echo $ac_n "(cached) $ac_c" 1>&6
3376 ac_save_LIBS="$LIBS"
3377 LIBS="-l$cf_curs_lib $LIBS"
3378 cat > conftest.$ac_ext <<EOF
3379 #line 3380 "configure"
3380 #include "confdefs.h"
3381 /* Override any gcc2 internal prototype to avoid an error. */
3382 /* We use char because int might match the return type of a gcc2
3383 builtin and then its argument prototype would still apply. */
3390 if { (eval echo configure:3391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3392 eval "ac_cv_lib_$ac_lib_var=yes"
3394 echo "configure: failed program was:" >&5
3395 cat conftest.$ac_ext >&5
3397 eval "ac_cv_lib_$ac_lib_var=no"
3400 LIBS="$ac_save_LIBS"
3403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
3404 echo "$ac_t""yes" 1>&6
3407 echo "$ac_t""no" 1>&6
3411 test $cf_curs_lib = unknown && { echo "configure: error: no curses library found" 1>&2; exit 1; }
3413 LIBS="-l$cf_curs_lib $cf_save_LIBS"
3414 if test "$cf_term_lib" = unknown ; then
3415 echo $ac_n "checking if we can link with $cf_curs_lib library""... $ac_c" 1>&6
3416 echo "configure:3417: checking if we can link with $cf_curs_lib library" >&5
3417 cat > conftest.$ac_ext <<EOF
3418 #line 3419 "configure"
3419 #include "confdefs.h"
3420 #include <${cf_cv_ncurses_header-curses.h}>
3425 if { (eval echo configure:3426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3429 echo "configure: failed program was:" >&5
3430 cat conftest.$ac_ext >&5
3435 echo "$ac_t""$cf_result" 1>&6
3436 test $cf_result = no && { echo "configure: error: Cannot link curses library" 1>&2; exit 1; }
3437 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
3439 elif test "$cf_term_lib" != predefined ; then
3440 echo $ac_n "checking if we need both $cf_curs_lib and $cf_term_lib libraries""... $ac_c" 1>&6
3441 echo "configure:3442: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
3442 cat > conftest.$ac_ext <<EOF
3443 #line 3444 "configure"
3444 #include "confdefs.h"
3445 #include <${cf_cv_ncurses_header-curses.h}>
3447 initscr(); tgoto((char *)0, 0, 0);
3450 if { (eval echo configure:3451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3454 echo "configure: failed program was:" >&5
3455 cat conftest.$ac_ext >&5
3458 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
3459 cat > conftest.$ac_ext <<EOF
3460 #line 3461 "configure"
3461 #include "confdefs.h"
3462 #include <${cf_cv_ncurses_header-curses.h}>
3467 if { (eval echo configure:3468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3471 echo "configure: failed program was:" >&5
3472 cat conftest.$ac_ext >&5
3480 echo "$ac_t""$cf_result" 1>&6
3490 cf_ncuconfig_root=ncurses
3492 echo "Looking for ${cf_ncuconfig_root}-config"
3493 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
3495 # Extract the first word of "$ac_prog", so it can be a program name with args.
3496 set dummy $ac_prog; ac_word=$2
3497 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3498 echo "configure:3499: checking for $ac_word" >&5
3499 if eval "test \"`echo '$''{'ac_cv_path_NCURSES_CONFIG'+set}'`\" = set"; then
3500 echo $ac_n "(cached) $ac_c" 1>&6
3502 case "$NCURSES_CONFIG" in
3504 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
3507 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a dos path.
3510 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3512 for ac_dir in $ac_dummy; do
3513 test -z "$ac_dir" && ac_dir=.
3514 if test -f $ac_dir/$ac_word; then
3515 ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
3523 NCURSES_CONFIG="$ac_cv_path_NCURSES_CONFIG"
3524 if test -n "$NCURSES_CONFIG"; then
3525 echo "$ac_t""$NCURSES_CONFIG" 1>&6
3527 echo "$ac_t""no" 1>&6
3530 test -n "$NCURSES_CONFIG" && break
3532 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
3535 if test "$NCURSES_CONFIG" != none ; then
3537 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
3538 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
3540 # even with config script, some packages use no-override for curses.h
3542 echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
3543 echo "configure:3544: checking if we have identified curses headers" >&5
3544 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
3545 echo $ac_n "(cached) $ac_c" 1>&6
3548 cf_cv_ncurses_header=none
3555 cat > conftest.$ac_ext <<EOF
3556 #line 3557 "configure"
3557 #include "confdefs.h"
3558 #include <${cf_header}>
3560 initscr(); tgoto("?", 0,0)
3563 if { (eval echo configure:3564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3565 cf_cv_ncurses_header=$cf_header; break
3567 echo "configure: failed program was:" >&5
3568 cat conftest.$ac_ext >&5
3575 echo "$ac_t""$cf_cv_ncurses_header" 1>&6
3577 if test "$cf_cv_ncurses_header" = none ; then
3578 { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
3581 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
3582 for ac_hdr in $cf_cv_ncurses_header
3584 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3585 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3586 echo "configure:3587: checking for $ac_hdr" >&5
3587 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
3588 echo $ac_n "(cached) $ac_c" 1>&6
3590 cat > conftest.$ac_ext <<EOF
3591 #line 3592 "configure"
3592 #include "confdefs.h"
3595 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3596 { (eval echo configure:3597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3597 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3598 if test -z "$ac_err"; then
3600 eval "ac_cv_header_$ac_safe=yes"
3603 echo "configure: failed program was:" >&5
3604 cat conftest.$ac_ext >&5
3606 eval "ac_cv_header_$ac_safe=no"
3610 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3611 echo "$ac_t""yes" 1>&6
3612 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3613 cat >> confdefs.h <<EOF
3614 #define $ac_tr_hdr 1
3618 echo "$ac_t""no" 1>&6
3624 cat >> confdefs.h <<\EOF
3630 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3632 cat >> confdefs.h <<EOF
3633 #define $cf_nculib_ROOT 1
3637 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
3643 cf_ncuhdr_root=ncurses
3645 test -n "$cf_cv_curses_dir" && \
3646 test "$cf_cv_curses_dir" != "no" && { \
3648 if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
3649 for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
3651 while test $cf_add_incdir != /usr/include
3653 if test -d $cf_add_incdir
3656 if test -n "$CFLAGS$CPPFLAGS" ; then
3657 # a loop is needed to ensure we can add subdirs of existing dirs
3658 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3659 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3660 cf_have_incdir=yes; break
3665 if test "$cf_have_incdir" = no ; then
3666 if test "$cf_add_incdir" = /usr/local/include ; then
3667 if test "$GCC" = yes
3669 cf_save_CPPFLAGS=$CPPFLAGS
3670 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3671 cat > conftest.$ac_ext <<EOF
3672 #line 3673 "configure"
3673 #include "confdefs.h"
3679 if { (eval echo configure:3680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3682 echo "configure: failed program was:" >&5
3683 cat conftest.$ac_ext >&5
3688 CPPFLAGS=$cf_save_CPPFLAGS
3693 if test "$cf_have_incdir" = no ; then
3694 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3696 echo "${as_me-configure}:3697: testing adding $cf_add_incdir to include-path ..." 1>&5
3699 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3701 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3702 test "$cf_top_incdir" = "$cf_add_incdir" && break
3703 cf_add_incdir="$cf_top_incdir"
3714 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
3715 echo "configure:3716: checking for $cf_ncuhdr_root header in include-path" >&5
3716 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
3717 echo $ac_n "(cached) $ac_c" 1>&6
3720 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
3721 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
3722 for cf_header in $cf_header_list
3725 cat > conftest.$ac_ext <<EOF
3726 #line 3727 "configure"
3727 #include "confdefs.h"
3730 #include <$cf_header>
3733 #ifdef NCURSES_VERSION
3735 printf("%s\n", NCURSES_VERSION);
3747 if { (eval echo configure:3748: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3749 cf_cv_ncurses_h=$cf_header
3752 echo "configure: failed program was:" >&5
3753 cat conftest.$ac_ext >&5
3759 test "$cf_cv_ncurses_h" != no && break
3764 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
3768 if test "$cf_cv_ncurses_h" != no ; then
3769 cf_cv_ncurses_header=$cf_cv_ncurses_h
3772 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
3773 echo "configure:3774: checking for $cf_ncuhdr_root include-path" >&5
3774 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
3775 echo $ac_n "(cached) $ac_c" 1>&6
3778 test -n "$verbose" && echo
3782 # collect the current set of include-directories from compiler flags
3783 cf_header_path_list=""
3784 if test -n "${CFLAGS}${CPPFLAGS}" ; then
3785 for cf_header_path in $CPPFLAGS $CFLAGS
3787 case $cf_header_path in #(vi
3789 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
3791 test "$cf_header_path" != "NONE" && \
3792 test -d "$cf_header_path" && \
3794 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
3795 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
3796 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
3797 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
3798 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
3799 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"
3802 cf_header_path_list="$cf_header_path_list $cf_search"
3808 # add the variations for the package we are looking for
3813 test "/usr" != "$prefix" && \
3815 (test $prefix = NONE || test -d $prefix) && {
3816 test -n "$verbose" && echo " ... testing for include-directories under /usr"
3817 test -d /usr/include && cf_search="$cf_search /usr/include"
3818 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
3819 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
3820 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
3821 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3825 test "$prefix" != "NONE" && \
3826 test -d "$prefix" && \
3828 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
3829 test -d $prefix/include && cf_search="$cf_search $prefix/include"
3830 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
3831 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
3832 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
3833 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3837 test "/usr/local" != "$prefix" && \
3838 test -d "/usr/local" && \
3839 (test $prefix = NONE || test -d $prefix) && {
3840 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
3841 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
3842 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
3843 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
3844 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
3845 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3849 test "/opt" != "$prefix" && \
3851 (test $prefix = NONE || test -d $prefix) && {
3852 test -n "$verbose" && echo " ... testing for include-directories under /opt"
3853 test -d /opt/include && cf_search="$cf_search /opt/include"
3854 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
3855 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
3856 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
3857 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3861 test "$HOME" != "$prefix" && \
3862 test -d "$HOME" && \
3863 (test $prefix = NONE || test -d $prefix) && {
3864 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
3865 test -d $HOME/include && cf_search="$cf_search $HOME/include"
3866 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
3867 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
3868 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
3869 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
3874 test "$includedir" != NONE && \
3875 test "$includedir" != "/usr/include" && \
3876 test -d "$includedir" && {
3877 test -d $includedir && cf_search="$cf_search $includedir"
3878 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
3881 test "$oldincludedir" != NONE && \
3882 test "$oldincludedir" != "/usr/include" && \
3883 test -d "$oldincludedir" && {
3884 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
3885 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
3888 cf_search="$cf_search $cf_header_path_list"
3890 test -n "$verbose" && echo search path $cf_search
3891 cf_save2_CPPFLAGS="$CPPFLAGS"
3892 for cf_incdir in $cf_search
3895 if test -n "$cf_incdir" ; then
3896 for cf_add_incdir in $cf_incdir
3898 while test $cf_add_incdir != /usr/include
3900 if test -d $cf_add_incdir
3903 if test -n "$CFLAGS$CPPFLAGS" ; then
3904 # a loop is needed to ensure we can add subdirs of existing dirs
3905 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
3906 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
3907 cf_have_incdir=yes; break
3912 if test "$cf_have_incdir" = no ; then
3913 if test "$cf_add_incdir" = /usr/local/include ; then
3914 if test "$GCC" = yes
3916 cf_save_CPPFLAGS=$CPPFLAGS
3917 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3918 cat > conftest.$ac_ext <<EOF
3919 #line 3920 "configure"
3920 #include "confdefs.h"
3926 if { (eval echo configure:3927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3929 echo "configure: failed program was:" >&5
3930 cat conftest.$ac_ext >&5
3935 CPPFLAGS=$cf_save_CPPFLAGS
3940 if test "$cf_have_incdir" = no ; then
3941 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
3943 echo "${as_me-configure}:3944: testing adding $cf_add_incdir to include-path ..." 1>&5
3946 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
3948 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
3949 test "$cf_top_incdir" = "$cf_add_incdir" && break
3950 cf_add_incdir="$cf_top_incdir"
3964 cat > conftest.$ac_ext <<EOF
3965 #line 3966 "configure"
3966 #include "confdefs.h"
3969 #include <$cf_header>
3972 #ifdef NCURSES_VERSION
3974 printf("%s\n", NCURSES_VERSION);
3986 if { (eval echo configure:3987: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3988 cf_cv_ncurses_h2=$cf_header
3991 echo "configure: failed program was:" >&5
3992 cat conftest.$ac_ext >&5
3998 if test "$cf_cv_ncurses_h2" != no ; then
3999 cf_cv_ncurses_h2=$cf_incdir/$cf_header
4000 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
4003 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
4005 CPPFLAGS="$cf_save2_CPPFLAGS"
4006 test "$cf_cv_ncurses_h2" != no && break
4008 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
4012 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
4014 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
4015 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
4016 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
4017 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
4020 if test -n "$cf_1st_incdir" ; then
4021 for cf_add_incdir in $cf_1st_incdir
4023 while test $cf_add_incdir != /usr/include
4025 if test -d $cf_add_incdir
4028 if test -n "$CFLAGS$CPPFLAGS" ; then
4029 # a loop is needed to ensure we can add subdirs of existing dirs
4030 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
4031 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
4032 cf_have_incdir=yes; break
4037 if test "$cf_have_incdir" = no ; then
4038 if test "$cf_add_incdir" = /usr/local/include ; then
4039 if test "$GCC" = yes
4041 cf_save_CPPFLAGS=$CPPFLAGS
4042 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4043 cat > conftest.$ac_ext <<EOF
4044 #line 4045 "configure"
4045 #include "confdefs.h"
4051 if { (eval echo configure:4052: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4054 echo "configure: failed program was:" >&5
4055 cat conftest.$ac_ext >&5
4060 CPPFLAGS=$cf_save_CPPFLAGS
4065 if test "$cf_have_incdir" = no ; then
4066 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
4068 echo "${as_me-configure}:4069: testing adding $cf_add_incdir to include-path ..." 1>&5
4071 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
4073 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
4074 test "$cf_top_incdir" = "$cf_add_incdir" && break
4075 cf_add_incdir="$cf_top_incdir"
4087 # Set definitions to allow ifdef'ing for ncurses.h
4089 case $cf_cv_ncurses_header in # (vi
4091 cat >> confdefs.h <<\EOF
4092 #define HAVE_NCURSES_H 1
4098 case $cf_cv_ncurses_header in # (vi
4099 ncurses/curses.h|ncurses/ncurses.h)
4100 cat >> confdefs.h <<\EOF
4101 #define HAVE_NCURSES_NCURSES_H 1
4105 ncursesw/curses.h|ncursesw/ncurses.h)
4106 cat >> confdefs.h <<\EOF
4107 #define HAVE_NCURSESW_NCURSES_H 1
4115 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
4116 echo "configure:4117: checking for terminfo header" >&5
4117 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
4118 echo $ac_n "(cached) $ac_c" 1>&6
4121 case ${cf_cv_ncurses_header} in #(vi
4122 */ncurses.h|*/ncursesw.h) #(vi
4123 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
4126 cf_term_header=term.h
4130 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
4132 cat > conftest.$ac_ext <<EOF
4133 #line 4134 "configure"
4134 #include "confdefs.h"
4136 #include <${cf_cv_ncurses_header-curses.h}>
4140 int x = auto_left_margin
4143 if { (eval echo configure:4144: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4146 cf_cv_term_header="$cf_test"
4148 echo "configure: failed program was:" >&5
4149 cat conftest.$ac_ext >&5
4152 cf_cv_term_header=unknown
4156 test "$cf_cv_term_header" != unknown && break
4161 echo "$ac_t""$cf_cv_term_header" 1>&6
4163 # Set definitions to allow ifdef'ing to accommodate subdirectories
4165 case $cf_cv_term_header in # (vi
4167 cat >> confdefs.h <<\EOF
4168 #define HAVE_TERM_H 1
4174 case $cf_cv_term_header in # (vi
4175 ncurses/term.h) #(vi
4176 cat >> confdefs.h <<\EOF
4177 #define HAVE_NCURSES_TERM_H 1
4182 cat >> confdefs.h <<\EOF
4183 #define HAVE_NCURSESW_TERM_H 1
4190 # some applications need this, but should check for NCURSES_VERSION
4191 cat >> confdefs.h <<\EOF
4197 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
4198 echo "configure:4199: checking for ncurses version" >&5
4199 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
4200 echo $ac_n "(cached) $ac_c" 1>&6
4203 cf_cv_ncurses_version=no
4206 if test "$cross_compiling" = yes; then
4209 # This will not work if the preprocessor splits the line after the
4210 # Autoconf token. The 'unproto' program does that.
4211 cat > conftest.$ac_ext <<EOF
4212 #include <${cf_cv_ncurses_header-curses.h}>
4214 #ifdef NCURSES_VERSION
4215 Autoconf NCURSES_VERSION
4223 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
4224 { (eval echo configure:4225: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
4225 if test -f conftest.out ; then
4226 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
4227 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
4232 cat > conftest.$ac_ext <<EOF
4233 #line 4234 "configure"
4234 #include "confdefs.h"
4236 #include <${cf_cv_ncurses_header-curses.h}>
4240 FILE *fp = fopen("$cf_tempfile", "w");
4241 #ifdef NCURSES_VERSION
4242 # ifdef NCURSES_VERSION_PATCH
4243 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
4245 fprintf(fp, "%s\n", NCURSES_VERSION);
4249 fprintf(fp, "old\n");
4254 ${cf_cv_main_return-return}(0);
4257 if { (eval echo configure:4258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
4260 cf_cv_ncurses_version=`cat $cf_tempfile`
4262 echo "configure: failed program was:" >&5
4263 cat conftest.$ac_ext >&5
4272 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
4273 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
4281 cf_nculib_root=ncurses
4282 # This works, except for the special case where we find gpm, but
4283 # ncurses is in a nonstandard location via $LIBS, and we really want
4286 cf_ncurses_SAVE="$LIBS"
4287 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
4288 echo "configure:4289: checking for Gpm_Open in -lgpm" >&5
4289 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
4290 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4291 echo $ac_n "(cached) $ac_c" 1>&6
4293 ac_save_LIBS="$LIBS"
4295 cat > conftest.$ac_ext <<EOF
4296 #line 4297 "configure"
4297 #include "confdefs.h"
4298 /* Override any gcc2 internal prototype to avoid an error. */
4299 /* We use char because int might match the return type of a gcc2
4300 builtin and then its argument prototype would still apply. */
4307 if { (eval echo configure:4308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4309 eval "ac_cv_lib_$ac_lib_var=yes"
4311 echo "configure: failed program was:" >&5
4312 cat conftest.$ac_ext >&5
4314 eval "ac_cv_lib_$ac_lib_var=no"
4317 LIBS="$ac_save_LIBS"
4320 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4321 echo "$ac_t""yes" 1>&6
4322 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
4323 echo "configure:4324: checking for initscr in -lgpm" >&5
4324 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
4325 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4326 echo $ac_n "(cached) $ac_c" 1>&6
4328 ac_save_LIBS="$LIBS"
4330 cat > conftest.$ac_ext <<EOF
4331 #line 4332 "configure"
4332 #include "confdefs.h"
4333 /* Override any gcc2 internal prototype to avoid an error. */
4334 /* We use char because int might match the return type of a gcc2
4335 builtin and then its argument prototype would still apply. */
4342 if { (eval echo configure:4343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4344 eval "ac_cv_lib_$ac_lib_var=yes"
4346 echo "configure: failed program was:" >&5
4347 cat conftest.$ac_ext >&5
4349 eval "ac_cv_lib_$ac_lib_var=no"
4352 LIBS="$ac_save_LIBS"
4355 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4356 echo "$ac_t""yes" 1>&6
4357 LIBS="$cf_ncurses_SAVE"
4359 echo "$ac_t""no" 1>&6
4360 cf_ncurses_LIBS="-lgpm"
4364 echo "$ac_t""no" 1>&6
4368 case $host_os in #(vi
4370 # This is only necessary if you are linking against an obsolete
4371 # version of ncurses (but it should do no harm, since it's static).
4372 if test "$cf_nculib_root" = ncurses ; then
4373 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
4374 echo "configure:4375: checking for tgoto in -lmytinfo" >&5
4375 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
4376 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
4377 echo $ac_n "(cached) $ac_c" 1>&6
4379 ac_save_LIBS="$LIBS"
4380 LIBS="-lmytinfo $LIBS"
4381 cat > conftest.$ac_ext <<EOF
4382 #line 4383 "configure"
4383 #include "confdefs.h"
4384 /* Override any gcc2 internal prototype to avoid an error. */
4385 /* We use char because int might match the return type of a gcc2
4386 builtin and then its argument prototype would still apply. */
4393 if { (eval echo configure:4394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4395 eval "ac_cv_lib_$ac_lib_var=yes"
4397 echo "configure: failed program was:" >&5
4398 cat conftest.$ac_ext >&5
4400 eval "ac_cv_lib_$ac_lib_var=no"
4403 LIBS="$ac_save_LIBS"
4406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
4407 echo "$ac_t""yes" 1>&6
4408 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
4410 echo "$ac_t""no" 1>&6
4417 LIBS="$cf_ncurses_LIBS $LIBS"
4419 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4422 if test -n "$cf_cv_curses_dir/lib" ; then
4423 for cf_add_libdir in $cf_cv_curses_dir/lib
4425 if test $cf_add_libdir = /usr/lib ; then
4427 elif test -d $cf_add_libdir
4430 if test -n "$LDFLAGS$LIBS" ; then
4431 # a loop is needed to ensure we can add subdirs of existing dirs
4432 for cf_test_libdir in $LDFLAGS $LIBS ; do
4433 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
4434 cf_have_libdir=yes; break
4438 if test "$cf_have_libdir" = no ; then
4439 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
4441 echo "${as_me-configure}:4442: testing adding $cf_add_libdir to library-path ..." 1>&5
4444 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
4450 LIBS="-l$cf_nculib_root $LIBS"
4453 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
4455 echo $ac_n "checking for initscr""... $ac_c" 1>&6
4456 echo "configure:4457: checking for initscr" >&5
4457 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
4458 echo $ac_n "(cached) $ac_c" 1>&6
4460 cat > conftest.$ac_ext <<EOF
4461 #line 4462 "configure"
4462 #include "confdefs.h"
4463 /* System header to define __stub macros and hopefully few prototypes,
4464 which can conflict with char initscr(); below. */
4466 /* Override any gcc2 internal prototype to avoid an error. */
4467 /* We use char because int might match the return type of a gcc2
4468 builtin and then its argument prototype would still apply. */
4473 /* The GNU C library defines this for functions which it implements
4474 to always fail with ENOSYS. Some functions are actually named
4475 something starting with __ and the normal name is an alias. */
4476 #if defined (__stub_initscr) || defined (__stub___initscr)
4484 if { (eval echo configure:4485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4486 eval "ac_cv_func_initscr=yes"
4488 echo "configure: failed program was:" >&5
4489 cat conftest.$ac_ext >&5
4491 eval "ac_cv_func_initscr=no"
4496 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
4497 echo "$ac_t""yes" 1>&6
4498 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4500 echo "$ac_t""no" 1>&6
4502 cf_save_LIBS="$LIBS"
4503 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
4504 echo "configure:4505: checking for initscr in -l$cf_nculib_root" >&5
4505 LIBS="-l$cf_nculib_root $LIBS"
4506 cat > conftest.$ac_ext <<EOF
4507 #line 4508 "configure"
4508 #include "confdefs.h"
4509 #include <${cf_cv_ncurses_header-curses.h}>
4514 if { (eval echo configure:4515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4516 echo "$ac_t""yes" 1>&6
4517 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4520 echo "configure: failed program was:" >&5
4521 cat conftest.$ac_ext >&5
4523 echo "$ac_t""no" 1>&6
4526 cf_library_path_list=""
4527 if test -n "${LDFLAGS}${LIBS}" ; then
4528 for cf_library_path in $LDFLAGS $LIBS
4530 case $cf_library_path in #(vi
4532 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
4534 test "$cf_library_path" != "NONE" && \
4535 test -d "$cf_library_path" && \
4537 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
4538 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
4539 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
4540 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
4541 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
4542 test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
4545 cf_library_path_list="$cf_library_path_list $cf_search"
4555 test "/usr" != "$prefix" && \
4557 (test $prefix = NONE || test -d $prefix) && {
4558 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
4559 test -d /usr/lib && cf_search="$cf_search /usr/lib"
4560 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
4561 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
4562 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
4563 test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
4567 test "$prefix" != "NONE" && \
4568 test -d "$prefix" && \
4570 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
4571 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
4572 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
4573 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
4574 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
4575 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
4579 test "/usr/local" != "$prefix" && \
4580 test -d "/usr/local" && \
4581 (test $prefix = NONE || test -d $prefix) && {
4582 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
4583 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
4584 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
4585 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
4586 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
4587 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
4591 test "/opt" != "$prefix" && \
4593 (test $prefix = NONE || test -d $prefix) && {
4594 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
4595 test -d /opt/lib && cf_search="$cf_search /opt/lib"
4596 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
4597 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
4598 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
4599 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
4603 test "$HOME" != "$prefix" && \
4604 test -d "$HOME" && \
4605 (test $prefix = NONE || test -d $prefix) && {
4606 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
4607 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
4608 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
4609 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
4610 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
4611 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
4616 cf_search="$cf_library_path_list $cf_search"
4618 for cf_libdir in $cf_search
4620 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
4621 echo "configure:4622: checking for -l$cf_nculib_root in $cf_libdir" >&5
4622 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
4623 cat > conftest.$ac_ext <<EOF
4624 #line 4625 "configure"
4625 #include "confdefs.h"
4626 #include <${cf_cv_ncurses_header-curses.h}>
4631 if { (eval echo configure:4632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4633 echo "$ac_t""yes" 1>&6
4634 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
4637 echo "configure: failed program was:" >&5
4638 cat conftest.$ac_ext >&5
4640 echo "$ac_t""no" 1>&6
4641 LIBS="$cf_save_LIBS"
4651 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
4653 if test $cf_found_library = no ; then
4654 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
4660 if test -n "$cf_ncurses_LIBS" ; then
4661 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
4662 echo "configure:4663: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
4663 cf_ncurses_SAVE="$LIBS"
4664 for p in $cf_ncurses_LIBS ; do
4665 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
4666 if test "$q" != "$LIBS" ; then
4670 cat > conftest.$ac_ext <<EOF
4671 #line 4672 "configure"
4672 #include "confdefs.h"
4673 #include <${cf_cv_ncurses_header-curses.h}>
4675 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
4678 if { (eval echo configure:4679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4680 echo "$ac_t""yes" 1>&6
4682 echo "configure: failed program was:" >&5
4683 cat conftest.$ac_ext >&5
4685 echo "$ac_t""no" 1>&6
4686 LIBS="$cf_ncurses_SAVE"
4692 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4694 cat >> confdefs.h <<EOF
4695 #define $cf_nculib_ROOT 1
4706 echo $ac_n "checking for multibyte character support""... $ac_c" 1>&6
4707 echo "configure:4708: checking for multibyte character support" >&5
4708 if eval "test \"`echo '$''{'cf_cv_utf8_lib'+set}'`\" = set"; then
4709 echo $ac_n "(cached) $ac_c" 1>&6
4712 cf_save_LIBS="$LIBS"
4713 cat > conftest.$ac_ext <<EOF
4714 #line 4715 "configure"
4715 #include "confdefs.h"
4722 if { (eval echo configure:4723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4726 echo "configure: failed program was:" >&5
4727 cat conftest.$ac_ext >&5
4731 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
4732 # will be set on completion of the AC_TRY_LINK below.
4733 cf_cv_header_path_utf8=
4734 cf_cv_library_path_utf8=
4737 echo "${as_me-configure}:4738: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
4740 cf_save_LIBS="$LIBS"
4742 cat > conftest.$ac_ext <<EOF
4743 #line 4744 "configure"
4744 #include "confdefs.h"
4746 #include <libutf8.h>
4751 if { (eval echo configure:4752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4754 cf_cv_find_linkage_utf8=yes
4755 cf_cv_header_path_utf8=/usr/include
4756 cf_cv_library_path_utf8=/usr/lib
4759 echo "configure: failed program was:" >&5
4760 cat conftest.$ac_ext >&5
4764 LIBS="-lutf8 $cf_save_LIBS"
4766 cat > conftest.$ac_ext <<EOF
4767 #line 4768 "configure"
4768 #include "confdefs.h"
4770 #include <libutf8.h>
4775 if { (eval echo configure:4776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4778 cf_cv_find_linkage_utf8=yes
4779 cf_cv_header_path_utf8=/usr/include
4780 cf_cv_library_path_utf8=/usr/lib
4781 cf_cv_library_file_utf8="-lutf8"
4784 echo "configure: failed program was:" >&5
4785 cat conftest.$ac_ext >&5
4788 cf_cv_find_linkage_utf8=no
4789 LIBS="$cf_save_LIBS"
4791 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
4793 echo "${as_me-configure}:4794: testing find linkage for utf8 library ..." 1>&5
4797 echo "${as_me-configure}:4798: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
4800 cf_save_CPPFLAGS="$CPPFLAGS"
4801 cf_test_CPPFLAGS="$CPPFLAGS"
4806 # collect the current set of include-directories from compiler flags
4807 cf_header_path_list=""
4808 if test -n "${CFLAGS}${CPPFLAGS}" ; then
4809 for cf_header_path in $CPPFLAGS $CFLAGS
4811 case $cf_header_path in #(vi
4813 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
4815 test "$cf_header_path" != "NONE" && \
4816 test -d "$cf_header_path" && \
4818 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
4819 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
4820 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
4821 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
4822 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
4823 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
4826 cf_header_path_list="$cf_header_path_list $cf_search"
4832 # add the variations for the package we are looking for
4837 test "/usr" != "$prefix" && \
4839 (test $prefix = NONE || test -d $prefix) && {
4840 test -n "$verbose" && echo " ... testing for include-directories under /usr"
4841 test -d /usr/include && cf_search="$cf_search /usr/include"
4842 test -d /usr/include/utf8 && cf_search="$cf_search /usr/include/utf8"
4843 test -d /usr/include/utf8/include && cf_search="$cf_search /usr/include/utf8/include"
4844 test -d /usr/utf8/include && cf_search="$cf_search /usr/utf8/include"
4845 test -d /usr/utf8/include/utf8 && cf_search="$cf_search /usr/utf8/include/utf8"
4849 test "$prefix" != "NONE" && \
4850 test -d "$prefix" && \
4852 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
4853 test -d $prefix/include && cf_search="$cf_search $prefix/include"
4854 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
4855 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
4856 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
4857 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
4861 test "/usr/local" != "$prefix" && \
4862 test -d "/usr/local" && \
4863 (test $prefix = NONE || test -d $prefix) && {
4864 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
4865 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
4866 test -d /usr/local/include/utf8 && cf_search="$cf_search /usr/local/include/utf8"
4867 test -d /usr/local/include/utf8/include && cf_search="$cf_search /usr/local/include/utf8/include"
4868 test -d /usr/local/utf8/include && cf_search="$cf_search /usr/local/utf8/include"
4869 test -d /usr/local/utf8/include/utf8 && cf_search="$cf_search /usr/local/utf8/include/utf8"
4873 test "/opt" != "$prefix" && \
4875 (test $prefix = NONE || test -d $prefix) && {
4876 test -n "$verbose" && echo " ... testing for include-directories under /opt"
4877 test -d /opt/include && cf_search="$cf_search /opt/include"
4878 test -d /opt/include/utf8 && cf_search="$cf_search /opt/include/utf8"
4879 test -d /opt/include/utf8/include && cf_search="$cf_search /opt/include/utf8/include"
4880 test -d /opt/utf8/include && cf_search="$cf_search /opt/utf8/include"
4881 test -d /opt/utf8/include/utf8 && cf_search="$cf_search /opt/utf8/include/utf8"
4885 test "$HOME" != "$prefix" && \
4886 test -d "$HOME" && \
4887 (test $prefix = NONE || test -d $prefix) && {
4888 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
4889 test -d $HOME/include && cf_search="$cf_search $HOME/include"
4890 test -d $HOME/include/utf8 && cf_search="$cf_search $HOME/include/utf8"
4891 test -d $HOME/include/utf8/include && cf_search="$cf_search $HOME/include/utf8/include"
4892 test -d $HOME/utf8/include && cf_search="$cf_search $HOME/utf8/include"
4893 test -d $HOME/utf8/include/utf8 && cf_search="$cf_search $HOME/utf8/include/utf8"
4898 test "$includedir" != NONE && \
4899 test "$includedir" != "/usr/include" && \
4900 test -d "$includedir" && {
4901 test -d $includedir && cf_search="$cf_search $includedir"
4902 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
4905 test "$oldincludedir" != NONE && \
4906 test "$oldincludedir" != "/usr/include" && \
4907 test -d "$oldincludedir" && {
4908 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
4909 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
4912 cf_search="$cf_search $cf_header_path_list"
4914 for cf_cv_header_path_utf8 in $cf_search
4916 if test -d $cf_cv_header_path_utf8 ; then
4917 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
4919 echo "${as_me-configure}:4920: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
4922 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
4923 cat > conftest.$ac_ext <<EOF
4924 #line 4925 "configure"
4925 #include "confdefs.h"
4927 #include <libutf8.h>
4932 if { (eval echo configure:4933: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4935 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
4937 echo "${as_me-configure}:4938: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
4940 cf_cv_find_linkage_utf8=maybe
4941 cf_test_CPPFLAGS="$CPPFLAGS"
4944 echo "configure: failed program was:" >&5
4945 cat conftest.$ac_ext >&5
4948 CPPFLAGS="$cf_save_CPPFLAGS"
4955 if test "$cf_cv_find_linkage_utf8" = maybe ; then
4958 echo "${as_me-configure}:4959: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
4961 cf_save_LIBS="$LIBS"
4962 cf_save_LDFLAGS="$LDFLAGS"
4966 if test "$cf_cv_find_linkage_utf8" != yes ; then
4969 cf_library_path_list=""
4970 if test -n "${LDFLAGS}${LIBS}" ; then
4971 for cf_library_path in $LDFLAGS $LIBS
4973 case $cf_library_path in #(vi
4975 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
4977 test "$cf_library_path" != "NONE" && \
4978 test -d "$cf_library_path" && \
4980 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
4981 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
4982 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
4983 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
4984 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
4985 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
4988 cf_library_path_list="$cf_library_path_list $cf_search"
4998 test "/usr" != "$prefix" && \
5000 (test $prefix = NONE || test -d $prefix) && {
5001 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
5002 test -d /usr/lib && cf_search="$cf_search /usr/lib"
5003 test -d /usr/lib/utf8 && cf_search="$cf_search /usr/lib/utf8"
5004 test -d /usr/lib/utf8/lib && cf_search="$cf_search /usr/lib/utf8/lib"
5005 test -d /usr/utf8/lib && cf_search="$cf_search /usr/utf8/lib"
5006 test -d /usr/utf8/lib/utf8 && cf_search="$cf_search /usr/utf8/lib/utf8"
5010 test "$prefix" != "NONE" && \
5011 test -d "$prefix" && \
5013 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
5014 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
5015 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
5016 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
5017 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
5018 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
5022 test "/usr/local" != "$prefix" && \
5023 test -d "/usr/local" && \
5024 (test $prefix = NONE || test -d $prefix) && {
5025 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
5026 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
5027 test -d /usr/local/lib/utf8 && cf_search="$cf_search /usr/local/lib/utf8"
5028 test -d /usr/local/lib/utf8/lib && cf_search="$cf_search /usr/local/lib/utf8/lib"
5029 test -d /usr/local/utf8/lib && cf_search="$cf_search /usr/local/utf8/lib"
5030 test -d /usr/local/utf8/lib/utf8 && cf_search="$cf_search /usr/local/utf8/lib/utf8"
5034 test "/opt" != "$prefix" && \
5036 (test $prefix = NONE || test -d $prefix) && {
5037 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
5038 test -d /opt/lib && cf_search="$cf_search /opt/lib"
5039 test -d /opt/lib/utf8 && cf_search="$cf_search /opt/lib/utf8"
5040 test -d /opt/lib/utf8/lib && cf_search="$cf_search /opt/lib/utf8/lib"
5041 test -d /opt/utf8/lib && cf_search="$cf_search /opt/utf8/lib"
5042 test -d /opt/utf8/lib/utf8 && cf_search="$cf_search /opt/utf8/lib/utf8"
5046 test "$HOME" != "$prefix" && \
5047 test -d "$HOME" && \
5048 (test $prefix = NONE || test -d $prefix) && {
5049 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
5050 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
5051 test -d $HOME/lib/utf8 && cf_search="$cf_search $HOME/lib/utf8"
5052 test -d $HOME/lib/utf8/lib && cf_search="$cf_search $HOME/lib/utf8/lib"
5053 test -d $HOME/utf8/lib && cf_search="$cf_search $HOME/utf8/lib"
5054 test -d $HOME/utf8/lib/utf8 && cf_search="$cf_search $HOME/utf8/lib/utf8"
5059 cf_search="$cf_library_path_list $cf_search"
5061 for cf_cv_library_path_utf8 in $cf_search
5063 if test -d $cf_cv_library_path_utf8 ; then
5064 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
5066 echo "${as_me-configure}:5067: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
5069 CPPFLAGS="$cf_test_CPPFLAGS"
5070 LIBS="-lutf8 $cf_save_LIBS"
5071 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
5072 cat > conftest.$ac_ext <<EOF
5073 #line 5074 "configure"
5074 #include "confdefs.h"
5076 #include <libutf8.h>
5081 if { (eval echo configure:5082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5084 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
5086 echo "${as_me-configure}:5087: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
5089 cf_cv_find_linkage_utf8=yes
5090 cf_cv_library_file_utf8="-lutf8"
5093 echo "configure: failed program was:" >&5
5094 cat conftest.$ac_ext >&5
5097 CPPFLAGS="$cf_save_CPPFLAGS"
5098 LIBS="$cf_save_LIBS"
5099 LDFLAGS="$cf_save_LDFLAGS"
5105 CPPFLAGS="$cf_save_CPPFLAGS"
5106 LDFLAGS="$cf_save_LDFLAGS"
5110 cf_cv_find_linkage_utf8=no
5119 LIBS="$cf_save_LIBS"
5121 if test "$cf_cv_find_linkage_utf8" = yes ; then
5122 cf_cv_utf8_lib=add-on
5132 echo "$ac_t""$cf_cv_utf8_lib" 1>&6
5134 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
5136 if test "$cf_cv_utf8_lib" = "add-on" ; then
5137 cat >> confdefs.h <<\EOF
5138 #define HAVE_LIBUTF8_H 1
5142 if test -n "$cf_cv_header_path_utf8" ; then
5143 for cf_add_incdir in $cf_cv_header_path_utf8
5145 while test $cf_add_incdir != /usr/include
5147 if test -d $cf_add_incdir
5150 if test -n "$CFLAGS$CPPFLAGS" ; then
5151 # a loop is needed to ensure we can add subdirs of existing dirs
5152 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5153 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5154 cf_have_incdir=yes; break
5159 if test "$cf_have_incdir" = no ; then
5160 if test "$cf_add_incdir" = /usr/local/include ; then
5161 if test "$GCC" = yes
5163 cf_save_CPPFLAGS=$CPPFLAGS
5164 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5165 cat > conftest.$ac_ext <<EOF
5166 #line 5167 "configure"
5167 #include "confdefs.h"
5173 if { (eval echo configure:5174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5176 echo "configure: failed program was:" >&5
5177 cat conftest.$ac_ext >&5
5182 CPPFLAGS=$cf_save_CPPFLAGS
5187 if test "$cf_have_incdir" = no ; then
5188 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5190 echo "${as_me-configure}:5191: testing adding $cf_add_incdir to include-path ..." 1>&5
5193 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5195 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5196 test "$cf_top_incdir" = "$cf_add_incdir" && break
5197 cf_add_incdir="$cf_top_incdir"
5207 if test -n "$cf_cv_library_path_utf8" ; then
5208 for cf_add_libdir in $cf_cv_library_path_utf8
5210 if test $cf_add_libdir = /usr/lib ; then
5212 elif test -d $cf_add_libdir
5215 if test -n "$LDFLAGS$LIBS" ; then
5216 # a loop is needed to ensure we can add subdirs of existing dirs
5217 for cf_test_libdir in $LDFLAGS $LIBS ; do
5218 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5219 cf_have_libdir=yes; break
5223 if test "$cf_have_libdir" = no ; then
5224 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5226 echo "${as_me-configure}:5227: testing adding $cf_add_libdir to library-path ..." 1>&5
5229 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5235 LIBS="$cf_cv_library_file_utf8 $LIBS"
5239 cf_ncuconfig_root=ncursesw
5241 echo "Looking for ${cf_ncuconfig_root}-config"
5242 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
5244 # Extract the first word of "$ac_prog", so it can be a program name with args.
5245 set dummy $ac_prog; ac_word=$2
5246 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
5247 echo "configure:5248: checking for $ac_word" >&5
5248 if eval "test \"`echo '$''{'ac_cv_path_NCURSES_CONFIG'+set}'`\" = set"; then
5249 echo $ac_n "(cached) $ac_c" 1>&6
5251 case "$NCURSES_CONFIG" in
5253 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
5256 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a dos path.
5259 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
5261 for ac_dir in $ac_dummy; do
5262 test -z "$ac_dir" && ac_dir=.
5263 if test -f $ac_dir/$ac_word; then
5264 ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
5272 NCURSES_CONFIG="$ac_cv_path_NCURSES_CONFIG"
5273 if test -n "$NCURSES_CONFIG"; then
5274 echo "$ac_t""$NCURSES_CONFIG" 1>&6
5276 echo "$ac_t""no" 1>&6
5279 test -n "$NCURSES_CONFIG" && break
5281 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
5284 if test "$NCURSES_CONFIG" != none ; then
5286 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
5287 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
5289 # even with config script, some packages use no-override for curses.h
5291 echo $ac_n "checking if we have identified curses headers""... $ac_c" 1>&6
5292 echo "configure:5293: checking if we have identified curses headers" >&5
5293 if eval "test \"`echo '$''{'cf_cv_ncurses_header'+set}'`\" = set"; then
5294 echo $ac_n "(cached) $ac_c" 1>&6
5297 cf_cv_ncurses_header=none
5300 ncursesw/ncurses.h \
5304 cat > conftest.$ac_ext <<EOF
5305 #line 5306 "configure"
5306 #include "confdefs.h"
5307 #include <${cf_header}>
5309 initscr(); tgoto("?", 0,0)
5312 if { (eval echo configure:5313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5314 cf_cv_ncurses_header=$cf_header; break
5316 echo "configure: failed program was:" >&5
5317 cat conftest.$ac_ext >&5
5324 echo "$ac_t""$cf_cv_ncurses_header" 1>&6
5326 if test "$cf_cv_ncurses_header" = none ; then
5327 { echo "configure: error: No curses header-files found" 1>&2; exit 1; }
5330 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5331 for ac_hdr in $cf_cv_ncurses_header
5333 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
5334 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
5335 echo "configure:5336: checking for $ac_hdr" >&5
5336 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
5337 echo $ac_n "(cached) $ac_c" 1>&6
5339 cat > conftest.$ac_ext <<EOF
5340 #line 5341 "configure"
5341 #include "confdefs.h"
5344 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
5345 { (eval echo configure:5346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
5346 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
5347 if test -z "$ac_err"; then
5349 eval "ac_cv_header_$ac_safe=yes"
5352 echo "configure: failed program was:" >&5
5353 cat conftest.$ac_ext >&5
5355 eval "ac_cv_header_$ac_safe=no"
5359 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
5360 echo "$ac_t""yes" 1>&6
5361 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
5362 cat >> confdefs.h <<EOF
5363 #define $ac_tr_hdr 1
5367 echo "$ac_t""no" 1>&6
5373 cat >> confdefs.h <<\EOF
5379 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5381 cat >> confdefs.h <<EOF
5382 #define $cf_nculib_ROOT 1
5386 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
5392 cf_ncuhdr_root=ncursesw
5394 test -n "$cf_cv_curses_dir" && \
5395 test "$cf_cv_curses_dir" != "no" && { \
5397 if test -n "$cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
5398 for cf_add_incdir in $cf_cv_curses_dir/include $cf_cv_curses_dir/include/$cf_ncuhdr_root
5400 while test $cf_add_incdir != /usr/include
5402 if test -d $cf_add_incdir
5405 if test -n "$CFLAGS$CPPFLAGS" ; then
5406 # a loop is needed to ensure we can add subdirs of existing dirs
5407 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5408 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5409 cf_have_incdir=yes; break
5414 if test "$cf_have_incdir" = no ; then
5415 if test "$cf_add_incdir" = /usr/local/include ; then
5416 if test "$GCC" = yes
5418 cf_save_CPPFLAGS=$CPPFLAGS
5419 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5420 cat > conftest.$ac_ext <<EOF
5421 #line 5422 "configure"
5422 #include "confdefs.h"
5428 if { (eval echo configure:5429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5431 echo "configure: failed program was:" >&5
5432 cat conftest.$ac_ext >&5
5437 CPPFLAGS=$cf_save_CPPFLAGS
5442 if test "$cf_have_incdir" = no ; then
5443 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5445 echo "${as_me-configure}:5446: testing adding $cf_add_incdir to include-path ..." 1>&5
5448 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5450 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5451 test "$cf_top_incdir" = "$cf_add_incdir" && break
5452 cf_add_incdir="$cf_top_incdir"
5463 echo $ac_n "checking for $cf_ncuhdr_root header in include-path""... $ac_c" 1>&6
5464 echo "configure:5465: checking for $cf_ncuhdr_root header in include-path" >&5
5465 if eval "test \"`echo '$''{'cf_cv_ncurses_h'+set}'`\" = set"; then
5466 echo $ac_n "(cached) $ac_c" 1>&6
5469 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
5470 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
5471 for cf_header in $cf_header_list
5474 cat > conftest.$ac_ext <<EOF
5475 #line 5476 "configure"
5476 #include "confdefs.h"
5479 #define _XOPEN_SOURCE_EXTENDED
5480 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
5481 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
5483 #include <$cf_header>
5486 #ifdef NCURSES_VERSION
5492 printf("%s\n", NCURSES_VERSION);
5504 if { (eval echo configure:5505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5506 cf_cv_ncurses_h=$cf_header
5509 echo "configure: failed program was:" >&5
5510 cat conftest.$ac_ext >&5
5516 test "$cf_cv_ncurses_h" != no && break
5521 echo "$ac_t""$cf_cv_ncurses_h" 1>&6
5525 if test "$cf_cv_ncurses_h" != no ; then
5526 cf_cv_ncurses_header=$cf_cv_ncurses_h
5529 echo $ac_n "checking for $cf_ncuhdr_root include-path""... $ac_c" 1>&6
5530 echo "configure:5531: checking for $cf_ncuhdr_root include-path" >&5
5531 if eval "test \"`echo '$''{'cf_cv_ncurses_h2'+set}'`\" = set"; then
5532 echo $ac_n "(cached) $ac_c" 1>&6
5535 test -n "$verbose" && echo
5539 # collect the current set of include-directories from compiler flags
5540 cf_header_path_list=""
5541 if test -n "${CFLAGS}${CPPFLAGS}" ; then
5542 for cf_header_path in $CPPFLAGS $CFLAGS
5544 case $cf_header_path in #(vi
5546 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
5548 test "$cf_header_path" != "NONE" && \
5549 test -d "$cf_header_path" && \
5551 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
5552 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
5553 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
5554 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
5555 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
5556 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"
5559 cf_header_path_list="$cf_header_path_list $cf_search"
5565 # add the variations for the package we are looking for
5570 test "/usr" != "$prefix" && \
5572 (test $prefix = NONE || test -d $prefix) && {
5573 test -n "$verbose" && echo " ... testing for include-directories under /usr"
5574 test -d /usr/include && cf_search="$cf_search /usr/include"
5575 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
5576 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
5577 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
5578 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5582 test "$prefix" != "NONE" && \
5583 test -d "$prefix" && \
5585 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
5586 test -d $prefix/include && cf_search="$cf_search $prefix/include"
5587 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
5588 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
5589 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
5590 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5594 test "/usr/local" != "$prefix" && \
5595 test -d "/usr/local" && \
5596 (test $prefix = NONE || test -d $prefix) && {
5597 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
5598 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
5599 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
5600 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
5601 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
5602 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5606 test "/opt" != "$prefix" && \
5608 (test $prefix = NONE || test -d $prefix) && {
5609 test -n "$verbose" && echo " ... testing for include-directories under /opt"
5610 test -d /opt/include && cf_search="$cf_search /opt/include"
5611 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
5612 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
5613 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
5614 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5618 test "$HOME" != "$prefix" && \
5619 test -d "$HOME" && \
5620 (test $prefix = NONE || test -d $prefix) && {
5621 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
5622 test -d $HOME/include && cf_search="$cf_search $HOME/include"
5623 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
5624 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
5625 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
5626 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
5631 test "$includedir" != NONE && \
5632 test "$includedir" != "/usr/include" && \
5633 test -d "$includedir" && {
5634 test -d $includedir && cf_search="$cf_search $includedir"
5635 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
5638 test "$oldincludedir" != NONE && \
5639 test "$oldincludedir" != "/usr/include" && \
5640 test -d "$oldincludedir" && {
5641 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
5642 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
5645 cf_search="$cf_search $cf_header_path_list"
5647 test -n "$verbose" && echo search path $cf_search
5648 cf_save2_CPPFLAGS="$CPPFLAGS"
5649 for cf_incdir in $cf_search
5652 if test -n "$cf_incdir" ; then
5653 for cf_add_incdir in $cf_incdir
5655 while test $cf_add_incdir != /usr/include
5657 if test -d $cf_add_incdir
5660 if test -n "$CFLAGS$CPPFLAGS" ; then
5661 # a loop is needed to ensure we can add subdirs of existing dirs
5662 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5663 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5664 cf_have_incdir=yes; break
5669 if test "$cf_have_incdir" = no ; then
5670 if test "$cf_add_incdir" = /usr/local/include ; then
5671 if test "$GCC" = yes
5673 cf_save_CPPFLAGS=$CPPFLAGS
5674 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5675 cat > conftest.$ac_ext <<EOF
5676 #line 5677 "configure"
5677 #include "confdefs.h"
5683 if { (eval echo configure:5684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5686 echo "configure: failed program was:" >&5
5687 cat conftest.$ac_ext >&5
5692 CPPFLAGS=$cf_save_CPPFLAGS
5697 if test "$cf_have_incdir" = no ; then
5698 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5700 echo "${as_me-configure}:5701: testing adding $cf_add_incdir to include-path ..." 1>&5
5703 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5705 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5706 test "$cf_top_incdir" = "$cf_add_incdir" && break
5707 cf_add_incdir="$cf_top_incdir"
5721 cat > conftest.$ac_ext <<EOF
5722 #line 5723 "configure"
5723 #include "confdefs.h"
5726 #include <$cf_header>
5729 #ifdef NCURSES_VERSION
5731 printf("%s\n", NCURSES_VERSION);
5743 if { (eval echo configure:5744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5745 cf_cv_ncurses_h2=$cf_header
5748 echo "configure: failed program was:" >&5
5749 cat conftest.$ac_ext >&5
5755 if test "$cf_cv_ncurses_h2" != no ; then
5756 cf_cv_ncurses_h2=$cf_incdir/$cf_header
5757 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
5760 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
5762 CPPFLAGS="$cf_save2_CPPFLAGS"
5763 test "$cf_cv_ncurses_h2" != no && break
5765 test "$cf_cv_ncurses_h2" = no && { echo "configure: error: not found" 1>&2; exit 1; }
5769 echo "$ac_t""$cf_cv_ncurses_h2" 1>&6
5771 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
5772 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
5773 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
5774 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
5777 if test -n "$cf_1st_incdir" ; then
5778 for cf_add_incdir in $cf_1st_incdir
5780 while test $cf_add_incdir != /usr/include
5782 if test -d $cf_add_incdir
5785 if test -n "$CFLAGS$CPPFLAGS" ; then
5786 # a loop is needed to ensure we can add subdirs of existing dirs
5787 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5788 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5789 cf_have_incdir=yes; break
5794 if test "$cf_have_incdir" = no ; then
5795 if test "$cf_add_incdir" = /usr/local/include ; then
5796 if test "$GCC" = yes
5798 cf_save_CPPFLAGS=$CPPFLAGS
5799 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5800 cat > conftest.$ac_ext <<EOF
5801 #line 5802 "configure"
5802 #include "confdefs.h"
5808 if { (eval echo configure:5809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5811 echo "configure: failed program was:" >&5
5812 cat conftest.$ac_ext >&5
5817 CPPFLAGS=$cf_save_CPPFLAGS
5822 if test "$cf_have_incdir" = no ; then
5823 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5825 echo "${as_me-configure}:5826: testing adding $cf_add_incdir to include-path ..." 1>&5
5828 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5830 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5831 test "$cf_top_incdir" = "$cf_add_incdir" && break
5832 cf_add_incdir="$cf_top_incdir"
5844 # Set definitions to allow ifdef'ing for ncurses.h
5846 case $cf_cv_ncurses_header in # (vi
5848 cat >> confdefs.h <<\EOF
5849 #define HAVE_NCURSES_H 1
5855 case $cf_cv_ncurses_header in # (vi
5856 ncurses/curses.h|ncurses/ncurses.h)
5857 cat >> confdefs.h <<\EOF
5858 #define HAVE_NCURSES_NCURSES_H 1
5862 ncursesw/curses.h|ncursesw/ncurses.h)
5863 cat >> confdefs.h <<\EOF
5864 #define HAVE_NCURSESW_NCURSES_H 1
5872 echo $ac_n "checking for terminfo header""... $ac_c" 1>&6
5873 echo "configure:5874: checking for terminfo header" >&5
5874 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
5875 echo $ac_n "(cached) $ac_c" 1>&6
5878 case ${cf_cv_ncurses_header} in #(vi
5879 */ncurses.h|*/ncursesw.h) #(vi
5880 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5883 cf_term_header=term.h
5887 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5889 cat > conftest.$ac_ext <<EOF
5890 #line 5891 "configure"
5891 #include "confdefs.h"
5893 #include <${cf_cv_ncurses_header-curses.h}>
5897 int x = auto_left_margin
5900 if { (eval echo configure:5901: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5903 cf_cv_term_header="$cf_test"
5905 echo "configure: failed program was:" >&5
5906 cat conftest.$ac_ext >&5
5909 cf_cv_term_header=unknown
5913 test "$cf_cv_term_header" != unknown && break
5918 echo "$ac_t""$cf_cv_term_header" 1>&6
5920 # Set definitions to allow ifdef'ing to accommodate subdirectories
5922 case $cf_cv_term_header in # (vi
5924 cat >> confdefs.h <<\EOF
5925 #define HAVE_TERM_H 1
5931 case $cf_cv_term_header in # (vi
5932 ncurses/term.h) #(vi
5933 cat >> confdefs.h <<\EOF
5934 #define HAVE_NCURSES_TERM_H 1
5939 cat >> confdefs.h <<\EOF
5940 #define HAVE_NCURSESW_TERM_H 1
5947 # some applications need this, but should check for NCURSES_VERSION
5948 cat >> confdefs.h <<\EOF
5954 echo $ac_n "checking for ncurses version""... $ac_c" 1>&6
5955 echo "configure:5956: checking for ncurses version" >&5
5956 if eval "test \"`echo '$''{'cf_cv_ncurses_version'+set}'`\" = set"; then
5957 echo $ac_n "(cached) $ac_c" 1>&6
5960 cf_cv_ncurses_version=no
5963 if test "$cross_compiling" = yes; then
5966 # This will not work if the preprocessor splits the line after the
5967 # Autoconf token. The 'unproto' program does that.
5968 cat > conftest.$ac_ext <<EOF
5969 #include <${cf_cv_ncurses_header-curses.h}>
5971 #ifdef NCURSES_VERSION
5972 Autoconf NCURSES_VERSION
5980 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5981 { (eval echo configure:5982: \"$cf_try\") 1>&5; (eval $cf_try) 2>&5; }
5982 if test -f conftest.out ; then
5983 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5984 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5989 cat > conftest.$ac_ext <<EOF
5990 #line 5991 "configure"
5991 #include "confdefs.h"
5993 #include <${cf_cv_ncurses_header-curses.h}>
5997 FILE *fp = fopen("$cf_tempfile", "w");
5998 #ifdef NCURSES_VERSION
5999 # ifdef NCURSES_VERSION_PATCH
6000 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
6002 fprintf(fp, "%s\n", NCURSES_VERSION);
6006 fprintf(fp, "old\n");
6011 ${cf_cv_main_return-return}(0);
6014 if { (eval echo configure:6015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
6017 cf_cv_ncurses_version=`cat $cf_tempfile`
6019 echo "configure: failed program was:" >&5
6020 cat conftest.$ac_ext >&5
6029 echo "$ac_t""$cf_cv_ncurses_version" 1>&6
6030 test "$cf_cv_ncurses_version" = no || cat >> confdefs.h <<\EOF
6038 cf_nculib_root=ncursesw
6039 # This works, except for the special case where we find gpm, but
6040 # ncurses is in a nonstandard location via $LIBS, and we really want
6043 cf_ncurses_SAVE="$LIBS"
6044 echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
6045 echo "configure:6046: checking for Gpm_Open in -lgpm" >&5
6046 ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
6047 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6048 echo $ac_n "(cached) $ac_c" 1>&6
6050 ac_save_LIBS="$LIBS"
6052 cat > conftest.$ac_ext <<EOF
6053 #line 6054 "configure"
6054 #include "confdefs.h"
6055 /* Override any gcc2 internal prototype to avoid an error. */
6056 /* We use char because int might match the return type of a gcc2
6057 builtin and then its argument prototype would still apply. */
6064 if { (eval echo configure:6065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6066 eval "ac_cv_lib_$ac_lib_var=yes"
6068 echo "configure: failed program was:" >&5
6069 cat conftest.$ac_ext >&5
6071 eval "ac_cv_lib_$ac_lib_var=no"
6074 LIBS="$ac_save_LIBS"
6077 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6078 echo "$ac_t""yes" 1>&6
6079 echo $ac_n "checking for initscr in -lgpm""... $ac_c" 1>&6
6080 echo "configure:6081: checking for initscr in -lgpm" >&5
6081 ac_lib_var=`echo gpm'_'initscr | sed 'y%./+-%__p_%'`
6082 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6083 echo $ac_n "(cached) $ac_c" 1>&6
6085 ac_save_LIBS="$LIBS"
6087 cat > conftest.$ac_ext <<EOF
6088 #line 6089 "configure"
6089 #include "confdefs.h"
6090 /* Override any gcc2 internal prototype to avoid an error. */
6091 /* We use char because int might match the return type of a gcc2
6092 builtin and then its argument prototype would still apply. */
6099 if { (eval echo configure:6100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6101 eval "ac_cv_lib_$ac_lib_var=yes"
6103 echo "configure: failed program was:" >&5
6104 cat conftest.$ac_ext >&5
6106 eval "ac_cv_lib_$ac_lib_var=no"
6109 LIBS="$ac_save_LIBS"
6112 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6113 echo "$ac_t""yes" 1>&6
6114 LIBS="$cf_ncurses_SAVE"
6116 echo "$ac_t""no" 1>&6
6117 cf_ncurses_LIBS="-lgpm"
6121 echo "$ac_t""no" 1>&6
6125 case $host_os in #(vi
6127 # This is only necessary if you are linking against an obsolete
6128 # version of ncurses (but it should do no harm, since it's static).
6129 if test "$cf_nculib_root" = ncurses ; then
6130 echo $ac_n "checking for tgoto in -lmytinfo""... $ac_c" 1>&6
6131 echo "configure:6132: checking for tgoto in -lmytinfo" >&5
6132 ac_lib_var=`echo mytinfo'_'tgoto | sed 'y%./+-%__p_%'`
6133 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6134 echo $ac_n "(cached) $ac_c" 1>&6
6136 ac_save_LIBS="$LIBS"
6137 LIBS="-lmytinfo $LIBS"
6138 cat > conftest.$ac_ext <<EOF
6139 #line 6140 "configure"
6140 #include "confdefs.h"
6141 /* Override any gcc2 internal prototype to avoid an error. */
6142 /* We use char because int might match the return type of a gcc2
6143 builtin and then its argument prototype would still apply. */
6150 if { (eval echo configure:6151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6152 eval "ac_cv_lib_$ac_lib_var=yes"
6154 echo "configure: failed program was:" >&5
6155 cat conftest.$ac_ext >&5
6157 eval "ac_cv_lib_$ac_lib_var=no"
6160 LIBS="$ac_save_LIBS"
6163 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6164 echo "$ac_t""yes" 1>&6
6165 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
6167 echo "$ac_t""no" 1>&6
6174 LIBS="$cf_ncurses_LIBS $LIBS"
6176 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
6179 if test -n "$cf_cv_curses_dir/lib" ; then
6180 for cf_add_libdir in $cf_cv_curses_dir/lib
6182 if test $cf_add_libdir = /usr/lib ; then
6184 elif test -d $cf_add_libdir
6187 if test -n "$LDFLAGS$LIBS" ; then
6188 # a loop is needed to ensure we can add subdirs of existing dirs
6189 for cf_test_libdir in $LDFLAGS $LIBS ; do
6190 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6191 cf_have_libdir=yes; break
6195 if test "$cf_have_libdir" = no ; then
6196 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6198 echo "${as_me-configure}:6199: testing adding $cf_add_libdir to library-path ..." 1>&5
6201 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6207 LIBS="-l$cf_nculib_root $LIBS"
6210 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
6212 echo $ac_n "checking for initscr""... $ac_c" 1>&6
6213 echo "configure:6214: checking for initscr" >&5
6214 if eval "test \"`echo '$''{'ac_cv_func_initscr'+set}'`\" = set"; then
6215 echo $ac_n "(cached) $ac_c" 1>&6
6217 cat > conftest.$ac_ext <<EOF
6218 #line 6219 "configure"
6219 #include "confdefs.h"
6220 /* System header to define __stub macros and hopefully few prototypes,
6221 which can conflict with char initscr(); below. */
6223 /* Override any gcc2 internal prototype to avoid an error. */
6224 /* We use char because int might match the return type of a gcc2
6225 builtin and then its argument prototype would still apply. */
6230 /* The GNU C library defines this for functions which it implements
6231 to always fail with ENOSYS. Some functions are actually named
6232 something starting with __ and the normal name is an alias. */
6233 #if defined (__stub_initscr) || defined (__stub___initscr)
6241 if { (eval echo configure:6242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6243 eval "ac_cv_func_initscr=yes"
6245 echo "configure: failed program was:" >&5
6246 cat conftest.$ac_ext >&5
6248 eval "ac_cv_func_initscr=no"
6253 if eval "test \"`echo '$ac_cv_func_'initscr`\" = yes"; then
6254 echo "$ac_t""yes" 1>&6
6255 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6257 echo "$ac_t""no" 1>&6
6259 cf_save_LIBS="$LIBS"
6260 echo $ac_n "checking for initscr in -l$cf_nculib_root""... $ac_c" 1>&6
6261 echo "configure:6262: checking for initscr in -l$cf_nculib_root" >&5
6262 LIBS="-l$cf_nculib_root $LIBS"
6263 cat > conftest.$ac_ext <<EOF
6264 #line 6265 "configure"
6265 #include "confdefs.h"
6266 #include <${cf_cv_ncurses_header-curses.h}>
6271 if { (eval echo configure:6272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6273 echo "$ac_t""yes" 1>&6
6274 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6277 echo "configure: failed program was:" >&5
6278 cat conftest.$ac_ext >&5
6280 echo "$ac_t""no" 1>&6
6283 cf_library_path_list=""
6284 if test -n "${LDFLAGS}${LIBS}" ; then
6285 for cf_library_path in $LDFLAGS $LIBS
6287 case $cf_library_path in #(vi
6289 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
6291 test "$cf_library_path" != "NONE" && \
6292 test -d "$cf_library_path" && \
6294 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
6295 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
6296 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
6297 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
6298 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
6299 test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
6302 cf_library_path_list="$cf_library_path_list $cf_search"
6312 test "/usr" != "$prefix" && \
6314 (test $prefix = NONE || test -d $prefix) && {
6315 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
6316 test -d /usr/lib && cf_search="$cf_search /usr/lib"
6317 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
6318 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
6319 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
6320 test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
6324 test "$prefix" != "NONE" && \
6325 test -d "$prefix" && \
6327 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
6328 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
6329 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
6330 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
6331 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
6332 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
6336 test "/usr/local" != "$prefix" && \
6337 test -d "/usr/local" && \
6338 (test $prefix = NONE || test -d $prefix) && {
6339 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
6340 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
6341 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
6342 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
6343 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
6344 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
6348 test "/opt" != "$prefix" && \
6350 (test $prefix = NONE || test -d $prefix) && {
6351 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
6352 test -d /opt/lib && cf_search="$cf_search /opt/lib"
6353 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
6354 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
6355 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
6356 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
6360 test "$HOME" != "$prefix" && \
6361 test -d "$HOME" && \
6362 (test $prefix = NONE || test -d $prefix) && {
6363 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
6364 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
6365 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
6366 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
6367 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
6368 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
6373 cf_search="$cf_library_path_list $cf_search"
6375 for cf_libdir in $cf_search
6377 echo $ac_n "checking for -l$cf_nculib_root in $cf_libdir""... $ac_c" 1>&6
6378 echo "configure:6379: checking for -l$cf_nculib_root in $cf_libdir" >&5
6379 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
6380 cat > conftest.$ac_ext <<EOF
6381 #line 6382 "configure"
6382 #include "confdefs.h"
6383 #include <${cf_cv_ncurses_header-curses.h}>
6388 if { (eval echo configure:6389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6390 echo "$ac_t""yes" 1>&6
6391 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
6394 echo "configure: failed program was:" >&5
6395 cat conftest.$ac_ext >&5
6397 echo "$ac_t""no" 1>&6
6398 LIBS="$cf_save_LIBS"
6408 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
6410 if test $cf_found_library = no ; then
6411 { echo "configure: error: Cannot link $cf_nculib_root library" 1>&2; exit 1; }
6417 if test -n "$cf_ncurses_LIBS" ; then
6418 echo $ac_n "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS""... $ac_c" 1>&6
6419 echo "configure:6420: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
6420 cf_ncurses_SAVE="$LIBS"
6421 for p in $cf_ncurses_LIBS ; do
6422 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
6423 if test "$q" != "$LIBS" ; then
6427 cat > conftest.$ac_ext <<EOF
6428 #line 6429 "configure"
6429 #include "confdefs.h"
6430 #include <${cf_cv_ncurses_header-curses.h}>
6432 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
6435 if { (eval echo configure:6436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6437 echo "$ac_t""yes" 1>&6
6439 echo "configure: failed program was:" >&5
6440 cat conftest.$ac_ext >&5
6442 echo "$ac_t""no" 1>&6
6443 LIBS="$cf_ncurses_SAVE"
6449 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6451 cat >> confdefs.h <<EOF
6452 #define $cf_nculib_ROOT 1
6461 # If we find X, set shell vars x_includes and x_libraries to the
6462 # paths, otherwise set no_x=yes.
6463 # Uses ac_ vars as temps to allow command line to override cache and checks.
6464 # --without-x overrides everything else, but does not touch the cache.
6465 echo $ac_n "checking for X""... $ac_c" 1>&6
6466 echo "configure:6467: checking for X" >&5
6469 # Check whether --with-x or --without-x was given.
6470 if test "${with_x+set}" = set; then
6475 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
6476 if test "x$with_x" = xno; then
6477 # The user explicitly disabled X.
6480 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
6481 # Both variables are already set.
6484 if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
6485 echo $ac_n "(cached) $ac_c" 1>&6
6487 # One or both of the vars are not set, and there is no cached value.
6488 ac_x_includes=NO ac_x_libraries=NO
6490 if mkdir conftestdir; then
6492 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
6493 cat > Imakefile <<'EOF'
6495 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
6497 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
6498 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
6499 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
6500 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
6501 for ac_extension in a so sl; do
6502 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
6503 test -f $ac_im_libdir/libX11.$ac_extension; then
6504 ac_im_usrlibdir=$ac_im_libdir; break
6507 # Screen out bogus values from the imake configuration. They are
6508 # bogus both because they are the default anyway, and because
6509 # using them would break gcc on systems where it needs fixed includes.
6510 case "$ac_im_incroot" in
6512 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
6514 case "$ac_im_usrlibdir" in
6516 *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
6523 if test "$ac_x_includes" = NO; then
6524 # Guess where to find include files, by looking for this one X11 .h file.
6525 test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
6527 # First, try using that file with no special directory specified.
6528 cat > conftest.$ac_ext <<EOF
6529 #line 6530 "configure"
6530 #include "confdefs.h"
6531 #include <$x_direct_test_include>
6533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
6534 { (eval echo configure:6535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
6535 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
6536 if test -z "$ac_err"; then
6538 # We can compile using X headers with no special include directory.
6542 echo "configure: failed program was:" >&5
6543 cat conftest.$ac_ext >&5
6545 # Look for the header file in a standard set of common directories.
6546 # Check X11 before X11Rn because it is often a symlink to the current release.
6549 /usr/X11R6/include \
6550 /usr/X11R5/include \
6551 /usr/X11R4/include \
6554 /usr/include/X11R6 \
6555 /usr/include/X11R5 \
6556 /usr/include/X11R4 \
6558 /usr/local/X11/include \
6559 /usr/local/X11R6/include \
6560 /usr/local/X11R5/include \
6561 /usr/local/X11R4/include \
6563 /usr/local/include/X11 \
6564 /usr/local/include/X11R6 \
6565 /usr/local/include/X11R5 \
6566 /usr/local/include/X11R4 \
6570 /usr/XFree86/include/X11 \
6573 /usr/local/include \
6574 /usr/unsupported/include \
6575 /usr/athena/include \
6576 /usr/local/x11r5/include \
6577 /usr/lpp/Xamples/include \
6579 /usr/openwin/include \
6580 /usr/openwin/share/include \
6583 if test -r "$ac_dir/$x_direct_test_include"; then
6584 ac_x_includes=$ac_dir
6590 fi # $ac_x_includes = NO
6592 if test "$ac_x_libraries" = NO; then
6593 # Check for the libraries.
6595 test -z "$x_direct_test_library" && x_direct_test_library=Xt
6596 test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
6598 # See if we find them without any special options.
6599 # Don't add to $LIBS permanently.
6600 ac_save_LIBS="$LIBS"
6601 LIBS="-l$x_direct_test_library $LIBS"
6602 cat > conftest.$ac_ext <<EOF
6603 #line 6604 "configure"
6604 #include "confdefs.h"
6607 ${x_direct_test_function}()
6610 if { (eval echo configure:6611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6612 LIBS="$ac_save_LIBS"
6613 # We can link X programs with no special library path.
6616 echo "configure: failed program was:" >&5
6617 cat conftest.$ac_ext >&5
6619 LIBS="$ac_save_LIBS"
6620 # First see if replacing the include by lib works.
6621 # Check X11 before X11Rn because it is often a symlink to the current release.
6622 for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
6633 /usr/local/X11/lib \
6634 /usr/local/X11R6/lib \
6635 /usr/local/X11R5/lib \
6636 /usr/local/X11R4/lib \
6638 /usr/local/lib/X11 \
6639 /usr/local/lib/X11R6 \
6640 /usr/local/lib/X11R5 \
6641 /usr/local/lib/X11R4 \
6645 /usr/XFree86/lib/X11 \
6649 /usr/unsupported/lib \
6651 /usr/local/x11r5/lib \
6652 /usr/lpp/Xamples/lib \
6656 /usr/openwin/share/lib \
6659 for ac_extension in a so sl; do
6660 if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
6661 ac_x_libraries=$ac_dir
6668 fi # $ac_x_libraries = NO
6670 if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
6671 # Didn't find X anywhere. Cache the known absence of X.
6672 ac_cv_have_x="have_x=no"
6674 # Record where we found X for the cache.
6675 ac_cv_have_x="have_x=yes \
6676 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
6680 eval "$ac_cv_have_x"
6683 if test "$have_x" != yes; then
6684 echo "$ac_t""$have_x" 1>&6
6687 # If each of the values was on the command line, it overrides each guess.
6688 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
6689 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
6690 # Update the cache value to reflect the command line values.
6691 ac_cv_have_x="have_x=yes \
6692 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
6693 echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
6697 echo $ac_n "checking if you want to use pkg-config""... $ac_c" 1>&6
6698 echo "configure:6699: checking if you want to use pkg-config" >&5
6700 # Check whether --with-pkg-config or --without-pkg-config was given.
6701 if test "${with_pkg_config+set}" = set; then
6702 withval="$with_pkg_config"
6703 cf_pkg_config=$withval
6708 echo "$ac_t""$cf_pkg_config" 1>&6
6710 case $cf_pkg_config in #(vi
6715 # Extract the first word of "pkg-config", so it can be a program name with args.
6716 set dummy pkg-config; ac_word=$2
6717 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
6718 echo "configure:6719: checking for $ac_word" >&5
6719 if eval "test \"`echo '$''{'ac_cv_path_PKG_CONFIG'+set}'`\" = set"; then
6720 echo $ac_n "(cached) $ac_c" 1>&6
6722 case "$PKG_CONFIG" in
6724 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6727 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a dos path.
6730 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
6732 for ac_dir in $ac_dummy; do
6733 test -z "$ac_dir" && ac_dir=.
6734 if test -f $ac_dir/$ac_word; then
6735 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
6740 test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
6744 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6745 if test -n "$PKG_CONFIG"; then
6746 echo "$ac_t""$PKG_CONFIG" 1>&6
6748 echo "$ac_t""no" 1>&6
6757 test -z "$PKG_CONFIG" && PKG_CONFIG=none
6758 if test "$PKG_CONFIG" != none ; then
6760 if test "x$prefix" != xNONE; then
6761 cf_path_syntax="$prefix"
6763 cf_path_syntax="$ac_default_prefix"
6766 case ".$PKG_CONFIG" in #(vi
6767 .\$\(*\)*|.\'*\'*) #(vi
6771 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6774 eval PKG_CONFIG="$PKG_CONFIG"
6775 case ".$PKG_CONFIG" in #(vi
6777 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
6782 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
6785 { echo "configure: error: expected a pathname, not \"$PKG_CONFIG\"" 1>&2; exit 1; }
6793 if test "$no_x" = yes; then
6794 # Not all programs may use this symbol, but it does not hurt to define it.
6795 cat >> confdefs.h <<\EOF
6796 #define X_DISPLAY_MISSING 1
6799 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
6801 if test -n "$x_includes"; then
6802 X_CFLAGS="$X_CFLAGS -I$x_includes"
6805 # It would also be nice to do this for all -L options, not just this one.
6806 if test -n "$x_libraries"; then
6807 X_LIBS="$X_LIBS -L$x_libraries"
6808 # For Solaris; some versions of Sun CC require a space after -R and
6809 # others require no space. Words are not sufficient . . . .
6810 case "`(uname -sr) 2>/dev/null`" in
6812 echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
6813 echo "configure:6814: checking whether -R must be followed by a space" >&5
6814 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
6815 cat > conftest.$ac_ext <<EOF
6816 #line 6817 "configure"
6817 #include "confdefs.h"
6823 if { (eval echo configure:6824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6827 echo "configure: failed program was:" >&5
6828 cat conftest.$ac_ext >&5
6833 if test $ac_R_nospace = yes; then
6834 echo "$ac_t""no" 1>&6
6835 X_LIBS="$X_LIBS -R$x_libraries"
6837 LIBS="$ac_xsave_LIBS -R $x_libraries"
6838 cat > conftest.$ac_ext <<EOF
6839 #line 6840 "configure"
6840 #include "confdefs.h"
6846 if { (eval echo configure:6847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6850 echo "configure: failed program was:" >&5
6851 cat conftest.$ac_ext >&5
6856 if test $ac_R_space = yes; then
6857 echo "$ac_t""yes" 1>&6
6858 X_LIBS="$X_LIBS -R $x_libraries"
6860 echo "$ac_t""neither works" 1>&6
6863 LIBS="$ac_xsave_LIBS"
6867 # Check for system-dependent libraries X programs must link with.
6868 # Do this before checking for the system-independent R6 libraries
6869 # (-lICE), since we may need -lsocket or whatever for X linking.
6871 if test "$ISC" = yes; then
6872 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
6874 # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
6875 # libraries were built with DECnet support. And karl@cs.umb.edu says
6876 # the Alpha needs dnet_stub (dnet does not exist).
6877 echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
6878 echo "configure:6879: checking for dnet_ntoa in -ldnet" >&5
6879 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6880 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6881 echo $ac_n "(cached) $ac_c" 1>&6
6883 ac_save_LIBS="$LIBS"
6885 cat > conftest.$ac_ext <<EOF
6886 #line 6887 "configure"
6887 #include "confdefs.h"
6888 /* Override any gcc2 internal prototype to avoid an error. */
6889 /* We use char because int might match the return type of a gcc2
6890 builtin and then its argument prototype would still apply. */
6897 if { (eval echo configure:6898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6899 eval "ac_cv_lib_$ac_lib_var=yes"
6901 echo "configure: failed program was:" >&5
6902 cat conftest.$ac_ext >&5
6904 eval "ac_cv_lib_$ac_lib_var=no"
6907 LIBS="$ac_save_LIBS"
6910 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6911 echo "$ac_t""yes" 1>&6
6912 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
6914 echo "$ac_t""no" 1>&6
6917 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
6918 echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
6919 echo "configure:6920: checking for dnet_ntoa in -ldnet_stub" >&5
6920 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
6921 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
6922 echo $ac_n "(cached) $ac_c" 1>&6
6924 ac_save_LIBS="$LIBS"
6925 LIBS="-ldnet_stub $LIBS"
6926 cat > conftest.$ac_ext <<EOF
6927 #line 6928 "configure"
6928 #include "confdefs.h"
6929 /* Override any gcc2 internal prototype to avoid an error. */
6930 /* We use char because int might match the return type of a gcc2
6931 builtin and then its argument prototype would still apply. */
6938 if { (eval echo configure:6939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6940 eval "ac_cv_lib_$ac_lib_var=yes"
6942 echo "configure: failed program was:" >&5
6943 cat conftest.$ac_ext >&5
6945 eval "ac_cv_lib_$ac_lib_var=no"
6948 LIBS="$ac_save_LIBS"
6951 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6952 echo "$ac_t""yes" 1>&6
6953 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
6955 echo "$ac_t""no" 1>&6
6960 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
6961 # to get the SysV transport functions.
6962 # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
6964 # The nsl library prevents programs from opening the X display
6965 # on Irix 5.2, according to dickey@clark.net.
6966 echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
6967 echo "configure:6968: checking for gethostbyname" >&5
6968 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
6969 echo $ac_n "(cached) $ac_c" 1>&6
6971 cat > conftest.$ac_ext <<EOF
6972 #line 6973 "configure"
6973 #include "confdefs.h"
6974 /* System header to define __stub macros and hopefully few prototypes,
6975 which can conflict with char gethostbyname(); below. */
6977 /* Override any gcc2 internal prototype to avoid an error. */
6978 /* We use char because int might match the return type of a gcc2
6979 builtin and then its argument prototype would still apply. */
6980 char gethostbyname();
6984 /* The GNU C library defines this for functions which it implements
6985 to always fail with ENOSYS. Some functions are actually named
6986 something starting with __ and the normal name is an alias. */
6987 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
6995 if { (eval echo configure:6996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6997 eval "ac_cv_func_gethostbyname=yes"
6999 echo "configure: failed program was:" >&5
7000 cat conftest.$ac_ext >&5
7002 eval "ac_cv_func_gethostbyname=no"
7007 if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
7008 echo "$ac_t""yes" 1>&6
7011 echo "$ac_t""no" 1>&6
7014 if test $ac_cv_func_gethostbyname = no; then
7015 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
7016 echo "configure:7017: checking for gethostbyname in -lnsl" >&5
7017 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
7018 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7019 echo $ac_n "(cached) $ac_c" 1>&6
7021 ac_save_LIBS="$LIBS"
7023 cat > conftest.$ac_ext <<EOF
7024 #line 7025 "configure"
7025 #include "confdefs.h"
7026 /* Override any gcc2 internal prototype to avoid an error. */
7027 /* We use char because int might match the return type of a gcc2
7028 builtin and then its argument prototype would still apply. */
7029 char gethostbyname();
7035 if { (eval echo configure:7036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7037 eval "ac_cv_lib_$ac_lib_var=yes"
7039 echo "configure: failed program was:" >&5
7040 cat conftest.$ac_ext >&5
7042 eval "ac_cv_lib_$ac_lib_var=no"
7045 LIBS="$ac_save_LIBS"
7048 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7049 echo "$ac_t""yes" 1>&6
7050 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
7052 echo "$ac_t""no" 1>&6
7057 # lieder@skyler.mavd.honeywell.com says without -lsocket,
7058 # socket/setsockopt and other routines are undefined under SCO ODT
7059 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
7060 # on later versions), says simon@lia.di.epfl.ch: it contains
7061 # gethostby* variants that don't use the nameserver (or something).
7062 # -lsocket must be given before -lnsl if both are needed.
7063 # We assume that if connect needs -lnsl, so does gethostbyname.
7064 echo $ac_n "checking for connect""... $ac_c" 1>&6
7065 echo "configure:7066: checking for connect" >&5
7066 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
7067 echo $ac_n "(cached) $ac_c" 1>&6
7069 cat > conftest.$ac_ext <<EOF
7070 #line 7071 "configure"
7071 #include "confdefs.h"
7072 /* System header to define __stub macros and hopefully few prototypes,
7073 which can conflict with char connect(); below. */
7075 /* Override any gcc2 internal prototype to avoid an error. */
7076 /* We use char because int might match the return type of a gcc2
7077 builtin and then its argument prototype would still apply. */
7082 /* The GNU C library defines this for functions which it implements
7083 to always fail with ENOSYS. Some functions are actually named
7084 something starting with __ and the normal name is an alias. */
7085 #if defined (__stub_connect) || defined (__stub___connect)
7093 if { (eval echo configure:7094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7095 eval "ac_cv_func_connect=yes"
7097 echo "configure: failed program was:" >&5
7098 cat conftest.$ac_ext >&5
7100 eval "ac_cv_func_connect=no"
7105 if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
7106 echo "$ac_t""yes" 1>&6
7109 echo "$ac_t""no" 1>&6
7112 if test $ac_cv_func_connect = no; then
7113 echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
7114 echo "configure:7115: checking for connect in -lsocket" >&5
7115 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
7116 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7117 echo $ac_n "(cached) $ac_c" 1>&6
7119 ac_save_LIBS="$LIBS"
7120 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
7121 cat > conftest.$ac_ext <<EOF
7122 #line 7123 "configure"
7123 #include "confdefs.h"
7124 /* Override any gcc2 internal prototype to avoid an error. */
7125 /* We use char because int might match the return type of a gcc2
7126 builtin and then its argument prototype would still apply. */
7133 if { (eval echo configure:7134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7135 eval "ac_cv_lib_$ac_lib_var=yes"
7137 echo "configure: failed program was:" >&5
7138 cat conftest.$ac_ext >&5
7140 eval "ac_cv_lib_$ac_lib_var=no"
7143 LIBS="$ac_save_LIBS"
7146 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7147 echo "$ac_t""yes" 1>&6
7148 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
7150 echo "$ac_t""no" 1>&6
7155 # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
7156 echo $ac_n "checking for remove""... $ac_c" 1>&6
7157 echo "configure:7158: checking for remove" >&5
7158 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
7159 echo $ac_n "(cached) $ac_c" 1>&6
7161 cat > conftest.$ac_ext <<EOF
7162 #line 7163 "configure"
7163 #include "confdefs.h"
7164 /* System header to define __stub macros and hopefully few prototypes,
7165 which can conflict with char remove(); below. */
7167 /* Override any gcc2 internal prototype to avoid an error. */
7168 /* We use char because int might match the return type of a gcc2
7169 builtin and then its argument prototype would still apply. */
7174 /* The GNU C library defines this for functions which it implements
7175 to always fail with ENOSYS. Some functions are actually named
7176 something starting with __ and the normal name is an alias. */
7177 #if defined (__stub_remove) || defined (__stub___remove)
7185 if { (eval echo configure:7186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7187 eval "ac_cv_func_remove=yes"
7189 echo "configure: failed program was:" >&5
7190 cat conftest.$ac_ext >&5
7192 eval "ac_cv_func_remove=no"
7197 if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
7198 echo "$ac_t""yes" 1>&6
7201 echo "$ac_t""no" 1>&6
7204 if test $ac_cv_func_remove = no; then
7205 echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
7206 echo "configure:7207: checking for remove in -lposix" >&5
7207 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
7208 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7209 echo $ac_n "(cached) $ac_c" 1>&6
7211 ac_save_LIBS="$LIBS"
7212 LIBS="-lposix $LIBS"
7213 cat > conftest.$ac_ext <<EOF
7214 #line 7215 "configure"
7215 #include "confdefs.h"
7216 /* Override any gcc2 internal prototype to avoid an error. */
7217 /* We use char because int might match the return type of a gcc2
7218 builtin and then its argument prototype would still apply. */
7225 if { (eval echo configure:7226: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7227 eval "ac_cv_lib_$ac_lib_var=yes"
7229 echo "configure: failed program was:" >&5
7230 cat conftest.$ac_ext >&5
7232 eval "ac_cv_lib_$ac_lib_var=no"
7235 LIBS="$ac_save_LIBS"
7238 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7239 echo "$ac_t""yes" 1>&6
7240 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7242 echo "$ac_t""no" 1>&6
7247 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7248 echo $ac_n "checking for shmat""... $ac_c" 1>&6
7249 echo "configure:7250: checking for shmat" >&5
7250 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
7251 echo $ac_n "(cached) $ac_c" 1>&6
7253 cat > conftest.$ac_ext <<EOF
7254 #line 7255 "configure"
7255 #include "confdefs.h"
7256 /* System header to define __stub macros and hopefully few prototypes,
7257 which can conflict with char shmat(); below. */
7259 /* Override any gcc2 internal prototype to avoid an error. */
7260 /* We use char because int might match the return type of a gcc2
7261 builtin and then its argument prototype would still apply. */
7266 /* The GNU C library defines this for functions which it implements
7267 to always fail with ENOSYS. Some functions are actually named
7268 something starting with __ and the normal name is an alias. */
7269 #if defined (__stub_shmat) || defined (__stub___shmat)
7277 if { (eval echo configure:7278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7279 eval "ac_cv_func_shmat=yes"
7281 echo "configure: failed program was:" >&5
7282 cat conftest.$ac_ext >&5
7284 eval "ac_cv_func_shmat=no"
7289 if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
7290 echo "$ac_t""yes" 1>&6
7293 echo "$ac_t""no" 1>&6
7296 if test $ac_cv_func_shmat = no; then
7297 echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
7298 echo "configure:7299: checking for shmat in -lipc" >&5
7299 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
7300 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7301 echo $ac_n "(cached) $ac_c" 1>&6
7303 ac_save_LIBS="$LIBS"
7305 cat > conftest.$ac_ext <<EOF
7306 #line 7307 "configure"
7307 #include "confdefs.h"
7308 /* Override any gcc2 internal prototype to avoid an error. */
7309 /* We use char because int might match the return type of a gcc2
7310 builtin and then its argument prototype would still apply. */
7317 if { (eval echo configure:7318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7319 eval "ac_cv_lib_$ac_lib_var=yes"
7321 echo "configure: failed program was:" >&5
7322 cat conftest.$ac_ext >&5
7324 eval "ac_cv_lib_$ac_lib_var=no"
7327 LIBS="$ac_save_LIBS"
7330 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7331 echo "$ac_t""yes" 1>&6
7332 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
7334 echo "$ac_t""no" 1>&6
7340 # Check for libraries that X11R6 Xt/Xaw programs need.
7341 ac_save_LDFLAGS="$LDFLAGS"
7342 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
7343 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
7344 # check for ICE first), but we must link in the order -lSM -lICE or
7345 # we get undefined symbols. So assume we have SM if we have ICE.
7346 # These have to be linked with before -lX11, unlike the other
7347 # libraries we check for below, so use a different variable.
7348 # --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
7349 echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
7350 echo "configure:7351: checking for IceConnectionNumber in -lICE" >&5
7351 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
7352 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7353 echo $ac_n "(cached) $ac_c" 1>&6
7355 ac_save_LIBS="$LIBS"
7356 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
7357 cat > conftest.$ac_ext <<EOF
7358 #line 7359 "configure"
7359 #include "confdefs.h"
7360 /* Override any gcc2 internal prototype to avoid an error. */
7361 /* We use char because int might match the return type of a gcc2
7362 builtin and then its argument prototype would still apply. */
7363 char IceConnectionNumber();
7366 IceConnectionNumber()
7369 if { (eval echo configure:7370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7371 eval "ac_cv_lib_$ac_lib_var=yes"
7373 echo "configure: failed program was:" >&5
7374 cat conftest.$ac_ext >&5
7376 eval "ac_cv_lib_$ac_lib_var=no"
7379 LIBS="$ac_save_LIBS"
7382 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7383 echo "$ac_t""yes" 1>&6
7384 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
7386 echo "$ac_t""no" 1>&6
7389 LDFLAGS="$ac_save_LDFLAGS"
7394 cf_x_athena=${cf_x_athena-Xaw}
7396 echo $ac_n "checking if you want to link with Xaw 3d library""... $ac_c" 1>&6
7397 echo "configure:7398: checking if you want to link with Xaw 3d library" >&5
7400 # Check whether --with-Xaw3d or --without-Xaw3d was given.
7401 if test "${with_Xaw3d+set}" = set; then
7402 withval="$with_Xaw3d"
7406 if test "$withval" = yes ; then
7408 echo "$ac_t""yes" 1>&6
7410 echo "$ac_t""no" 1>&6
7413 echo $ac_n "checking if you want to link with neXT Athena library""... $ac_c" 1>&6
7414 echo "configure:7415: checking if you want to link with neXT Athena library" >&5
7417 # Check whether --with-neXtaw or --without-neXtaw was given.
7418 if test "${with_neXtaw+set}" = set; then
7419 withval="$with_neXtaw"
7423 if test "$withval" = yes ; then
7425 echo "$ac_t""yes" 1>&6
7427 echo "$ac_t""no" 1>&6
7430 echo $ac_n "checking if you want to link with Athena-Plus library""... $ac_c" 1>&6
7431 echo "configure:7432: checking if you want to link with Athena-Plus library" >&5
7434 # Check whether --with-XawPlus or --without-XawPlus was given.
7435 if test "${with_XawPlus+set}" = set; then
7436 withval="$with_XawPlus"
7440 if test "$withval" = yes ; then
7442 echo "$ac_t""yes" 1>&6
7444 echo "$ac_t""no" 1>&6
7449 if test "$PKG_CONFIG" != none ; then
7451 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
7452 for cf_athena_pkg in \
7455 ${cf_x_athena}-devel \
7457 lib${cf_x_athena}-devel
7459 if "$PKG_CONFIG" --exists $cf_athena_pkg; then
7460 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
7462 echo "${as_me-configure}:7463: testing found package $cf_athena_pkg ..." 1>&5
7465 cf_x_athena_inc="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
7466 cf_x_athena_lib="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
7471 cf_new_extra_cppflags=
7473 for cf_add_cflags in $cf_x_athena_inc
7475 case $cf_fix_cppflags in
7477 case $cf_add_cflags in #(vi
7478 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7479 case $cf_add_cflags in
7481 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7483 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7484 && test -z "${cf_tst_cflags}" \
7485 && cf_fix_cppflags=yes
7487 if test $cf_fix_cppflags = yes ; then
7488 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7490 elif test "${cf_tst_cflags}" = "\"'" ; then
7491 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7497 *$cf_add_cflags) #(vi
7500 case $cf_add_cflags in #(vi
7502 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7504 CPPFLAGS=`echo "$CPPFLAGS" | \
7505 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7506 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7510 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7515 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7520 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7522 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7524 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7525 && test -z "${cf_tst_cflags}" \
7526 && cf_fix_cppflags=no
7531 if test -n "$cf_new_cflags" ; then
7533 CFLAGS="$CFLAGS $cf_new_cflags"
7536 if test -n "$cf_new_cppflags" ; then
7538 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7541 if test -n "$cf_new_extra_cppflags" ; then
7543 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7549 LIBS="$cf_x_athena_lib $LIBS"
7552 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7554 cat >> confdefs.h <<EOF
7555 #define $cf_x_athena_LIBS 1
7563 if test -z "$cf_x_athena_lib" ; then
7568 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
7569 test -n "$verbose" && echo " found package Xext" 1>&6
7571 echo "${as_me-configure}:7572: testing found package Xext ..." 1>&5
7574 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
7575 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
7580 cf_new_extra_cppflags=
7582 for cf_add_cflags in $cf_pkgconfig_incs
7584 case $cf_fix_cppflags in
7586 case $cf_add_cflags in #(vi
7587 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7588 case $cf_add_cflags in
7590 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7592 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7593 && test -z "${cf_tst_cflags}" \
7594 && cf_fix_cppflags=yes
7596 if test $cf_fix_cppflags = yes ; then
7597 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7599 elif test "${cf_tst_cflags}" = "\"'" ; then
7600 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7606 *$cf_add_cflags) #(vi
7609 case $cf_add_cflags in #(vi
7611 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7613 CPPFLAGS=`echo "$CPPFLAGS" | \
7614 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7615 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7619 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7624 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7629 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7631 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7633 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7634 && test -z "${cf_tst_cflags}" \
7635 && cf_fix_cppflags=no
7640 if test -n "$cf_new_cflags" ; then
7642 CFLAGS="$CFLAGS $cf_new_cflags"
7645 if test -n "$cf_new_cppflags" ; then
7647 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7650 if test -n "$cf_new_extra_cppflags" ; then
7652 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7658 LIBS="$cf_pkgconfig_libs $LIBS"
7662 echo $ac_n "checking for XextCreateExtension in -lXext""... $ac_c" 1>&6
7663 echo "configure:7664: checking for XextCreateExtension in -lXext" >&5
7664 ac_lib_var=`echo Xext'_'XextCreateExtension | sed 'y%./+-%__p_%'`
7665 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7666 echo $ac_n "(cached) $ac_c" 1>&6
7668 ac_save_LIBS="$LIBS"
7670 cat > conftest.$ac_ext <<EOF
7671 #line 7672 "configure"
7672 #include "confdefs.h"
7673 /* Override any gcc2 internal prototype to avoid an error. */
7674 /* We use char because int might match the return type of a gcc2
7675 builtin and then its argument prototype would still apply. */
7676 char XextCreateExtension();
7679 XextCreateExtension()
7682 if { (eval echo configure:7683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7684 eval "ac_cv_lib_$ac_lib_var=yes"
7686 echo "configure: failed program was:" >&5
7687 cat conftest.$ac_ext >&5
7689 eval "ac_cv_lib_$ac_lib_var=no"
7692 LIBS="$ac_save_LIBS"
7695 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7696 echo "$ac_t""yes" 1>&6
7699 echo "$ac_t""no" 1>&6
7714 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
7715 test -n "$verbose" && echo " found package xt" 1>&6
7717 echo "${as_me-configure}:7718: testing found package xt ..." 1>&5
7720 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
7721 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
7726 cf_new_extra_cppflags=
7728 for cf_add_cflags in $cf_pkgconfig_incs
7730 case $cf_fix_cppflags in
7732 case $cf_add_cflags in #(vi
7733 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7734 case $cf_add_cflags in
7736 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7738 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7739 && test -z "${cf_tst_cflags}" \
7740 && cf_fix_cppflags=yes
7742 if test $cf_fix_cppflags = yes ; then
7743 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7745 elif test "${cf_tst_cflags}" = "\"'" ; then
7746 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7752 *$cf_add_cflags) #(vi
7755 case $cf_add_cflags in #(vi
7757 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7759 CPPFLAGS=`echo "$CPPFLAGS" | \
7760 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7761 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7765 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7770 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7775 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7777 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7779 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7780 && test -z "${cf_tst_cflags}" \
7781 && cf_fix_cppflags=no
7786 if test -n "$cf_new_cflags" ; then
7788 CFLAGS="$CFLAGS $cf_new_cflags"
7791 if test -n "$cf_new_cppflags" ; then
7793 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7796 if test -n "$cf_new_extra_cppflags" ; then
7798 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7804 LIBS="$cf_pkgconfig_libs $LIBS"
7811 LDFLAGS="$X_LIBS $LDFLAGS"
7813 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
7815 echo "${as_me-configure}:7816: testing checking additions to CFLAGS ..." 1>&5
7818 cf_check_cflags="$CFLAGS"
7819 cf_check_cppflags="$CPPFLAGS"
7824 cf_new_extra_cppflags=
7826 for cf_add_cflags in $X_CFLAGS
7828 case $cf_fix_cppflags in
7830 case $cf_add_cflags in #(vi
7831 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7832 case $cf_add_cflags in
7834 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7836 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7837 && test -z "${cf_tst_cflags}" \
7838 && cf_fix_cppflags=yes
7840 if test $cf_fix_cppflags = yes ; then
7841 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7843 elif test "${cf_tst_cflags}" = "\"'" ; then
7844 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7850 *$cf_add_cflags) #(vi
7853 case $cf_add_cflags in #(vi
7855 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7857 CPPFLAGS=`echo "$CPPFLAGS" | \
7858 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
7859 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
7863 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7868 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7873 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7875 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7877 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7878 && test -z "${cf_tst_cflags}" \
7879 && cf_fix_cppflags=no
7884 if test -n "$cf_new_cflags" ; then
7885 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
7887 echo "${as_me-configure}:7888: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
7890 CFLAGS="$CFLAGS $cf_new_cflags"
7893 if test -n "$cf_new_cppflags" ; then
7894 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
7896 echo "${as_me-configure}:7897: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
7899 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7902 if test -n "$cf_new_extra_cppflags" ; then
7903 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
7905 echo "${as_me-configure}:7906: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
7908 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7914 if test "$cf_check_cflags" != "$CFLAGS" ; then
7915 cat > conftest.$ac_ext <<EOF
7916 #line 7917 "configure"
7917 #include "confdefs.h"
7920 printf("Hello world");
7923 if { (eval echo configure:7924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7926 echo "configure: failed program was:" >&5
7927 cat conftest.$ac_ext >&5
7929 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
7931 echo "${as_me-configure}:7932: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
7934 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
7935 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
7937 echo "${as_me-configure}:7938: testing but keeping change to \$CPPFLAGS ..." 1>&5
7941 CFLAGS="$cf_check_flags"
7947 echo $ac_n "checking for XOpenDisplay""... $ac_c" 1>&6
7948 echo "configure:7949: checking for XOpenDisplay" >&5
7949 if eval "test \"`echo '$''{'ac_cv_func_XOpenDisplay'+set}'`\" = set"; then
7950 echo $ac_n "(cached) $ac_c" 1>&6
7952 cat > conftest.$ac_ext <<EOF
7953 #line 7954 "configure"
7954 #include "confdefs.h"
7955 /* System header to define __stub macros and hopefully few prototypes,
7956 which can conflict with char XOpenDisplay(); below. */
7958 /* Override any gcc2 internal prototype to avoid an error. */
7959 /* We use char because int might match the return type of a gcc2
7960 builtin and then its argument prototype would still apply. */
7961 char XOpenDisplay();
7965 /* The GNU C library defines this for functions which it implements
7966 to always fail with ENOSYS. Some functions are actually named
7967 something starting with __ and the normal name is an alias. */
7968 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
7976 if { (eval echo configure:7977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7978 eval "ac_cv_func_XOpenDisplay=yes"
7980 echo "configure: failed program was:" >&5
7981 cat conftest.$ac_ext >&5
7983 eval "ac_cv_func_XOpenDisplay=no"
7988 if eval "test \"`echo '$ac_cv_func_'XOpenDisplay`\" = yes"; then
7989 echo "$ac_t""yes" 1>&6
7992 echo "$ac_t""no" 1>&6
7994 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
7995 echo "configure:7996: checking for XOpenDisplay in -lX11" >&5
7996 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
7997 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
7998 echo $ac_n "(cached) $ac_c" 1>&6
8000 ac_save_LIBS="$LIBS"
8001 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
8002 cat > conftest.$ac_ext <<EOF
8003 #line 8004 "configure"
8004 #include "confdefs.h"
8005 /* Override any gcc2 internal prototype to avoid an error. */
8006 /* We use char because int might match the return type of a gcc2
8007 builtin and then its argument prototype would still apply. */
8008 char XOpenDisplay();
8014 if { (eval echo configure:8015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8016 eval "ac_cv_lib_$ac_lib_var=yes"
8018 echo "configure: failed program was:" >&5
8019 cat conftest.$ac_ext >&5
8021 eval "ac_cv_lib_$ac_lib_var=no"
8024 LIBS="$ac_save_LIBS"
8027 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8028 echo "$ac_t""yes" 1>&6
8031 echo "$ac_t""no" 1>&6
8037 echo $ac_n "checking for XtAppInitialize""... $ac_c" 1>&6
8038 echo "configure:8039: checking for XtAppInitialize" >&5
8039 if eval "test \"`echo '$''{'ac_cv_func_XtAppInitialize'+set}'`\" = set"; then
8040 echo $ac_n "(cached) $ac_c" 1>&6
8042 cat > conftest.$ac_ext <<EOF
8043 #line 8044 "configure"
8044 #include "confdefs.h"
8045 /* System header to define __stub macros and hopefully few prototypes,
8046 which can conflict with char XtAppInitialize(); below. */
8048 /* Override any gcc2 internal prototype to avoid an error. */
8049 /* We use char because int might match the return type of a gcc2
8050 builtin and then its argument prototype would still apply. */
8051 char XtAppInitialize();
8055 /* The GNU C library defines this for functions which it implements
8056 to always fail with ENOSYS. Some functions are actually named
8057 something starting with __ and the normal name is an alias. */
8058 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
8066 if { (eval echo configure:8067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8068 eval "ac_cv_func_XtAppInitialize=yes"
8070 echo "configure: failed program was:" >&5
8071 cat conftest.$ac_ext >&5
8073 eval "ac_cv_func_XtAppInitialize=no"
8078 if eval "test \"`echo '$ac_cv_func_'XtAppInitialize`\" = yes"; then
8079 echo "$ac_t""yes" 1>&6
8082 echo "$ac_t""no" 1>&6
8084 echo $ac_n "checking for XtAppInitialize in -lXt""... $ac_c" 1>&6
8085 echo "configure:8086: checking for XtAppInitialize in -lXt" >&5
8086 ac_lib_var=`echo Xt'_'XtAppInitialize | sed 'y%./+-%__p_%'`
8087 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8088 echo $ac_n "(cached) $ac_c" 1>&6
8090 ac_save_LIBS="$LIBS"
8091 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
8092 cat > conftest.$ac_ext <<EOF
8093 #line 8094 "configure"
8094 #include "confdefs.h"
8095 /* Override any gcc2 internal prototype to avoid an error. */
8096 /* We use char because int might match the return type of a gcc2
8097 builtin and then its argument prototype would still apply. */
8098 char XtAppInitialize();
8104 if { (eval echo configure:8105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8106 eval "ac_cv_lib_$ac_lib_var=yes"
8108 echo "configure: failed program was:" >&5
8109 cat conftest.$ac_ext >&5
8111 eval "ac_cv_lib_$ac_lib_var=no"
8114 LIBS="$ac_save_LIBS"
8117 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8118 echo "$ac_t""yes" 1>&6
8119 cat >> confdefs.h <<\EOF
8120 #define HAVE_LIBXT 1
8124 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
8126 echo "$ac_t""no" 1>&6
8135 if test $cf_have_X_LIBS = no ; then
8136 echo "configure: warning: Unable to successfully link X Toolkit library (-lXt) with
8137 test program. You will have to check and add the proper libraries by hand
8142 cf_x_athena_root=$cf_x_athena
8145 for cf_path in default \
8146 /usr/contrib/X11R6 \
8147 /usr/contrib/X11R5 \
8151 if test -z "$cf_x_athena_inc" ; then
8153 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
8154 if test $cf_path != default ; then
8155 CPPFLAGS="$cf_save -I$cf_path/include"
8156 echo $ac_n "checking for $cf_test in $cf_path""... $ac_c" 1>&6
8157 echo "configure:8158: checking for $cf_test in $cf_path" >&5
8159 echo $ac_n "checking for $cf_test""... $ac_c" 1>&6
8160 echo "configure:8161: checking for $cf_test" >&5
8162 cat > conftest.$ac_ext <<EOF
8163 #line 8164 "configure"
8164 #include "confdefs.h"
8166 #include <X11/Intrinsic.h>
8172 if { (eval echo configure:8173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8176 echo "configure: failed program was:" >&5
8177 cat conftest.$ac_ext >&5
8182 echo "$ac_t""$cf_result" 1>&6
8183 if test "$cf_result" = yes ; then
8184 cf_x_athena_inc=$cf_path
8192 if test -z "$cf_x_athena_inc" ; then
8193 echo "configure: warning: Unable to successfully find Athena header files with test program" 1>&2
8194 elif test "$cf_x_athena_inc" != default ; then
8195 CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
8199 cf_x_athena_root=$cf_x_athena
8202 for cf_path in default \
8203 /usr/contrib/X11R6 \
8204 /usr/contrib/X11R5 \
8209 "-l$cf_x_athena_root -lXmu" \
8210 "-l$cf_x_athena_root -lXpm -lXmu" \
8211 "-l${cf_x_athena_root}_s -lXmu_s"
8213 if test -z "$cf_x_athena_lib" ; then
8215 cf_test=XawSimpleMenuAddGlobalActions
8216 if test $cf_path != default ; then
8217 LIBS="-L$cf_path/lib $cf_lib $LIBS"
8218 echo $ac_n "checking for $cf_lib in $cf_path""... $ac_c" 1>&6
8219 echo "configure:8220: checking for $cf_lib in $cf_path" >&5
8221 LIBS="$cf_lib $LIBS"
8222 echo $ac_n "checking for $cf_test in $cf_lib""... $ac_c" 1>&6
8223 echo "configure:8224: checking for $cf_test in $cf_lib" >&5
8225 cat > conftest.$ac_ext <<EOF
8226 #line 8227 "configure"
8227 #include "confdefs.h"
8233 if { (eval echo configure:8234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8237 echo "configure: failed program was:" >&5
8238 cat conftest.$ac_ext >&5
8243 echo "$ac_t""$cf_result" 1>&6
8244 if test "$cf_result" = yes ; then
8245 cf_x_athena_lib="$cf_lib"
8253 if test -z "$cf_x_athena_lib" ; then
8254 { echo "configure: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" 1>&2; exit 1; }
8258 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8260 cat >> confdefs.h <<EOF
8261 #define $cf_x_athena_LIBS 1
8270 for ac_prog in xcurses-config
8272 # Extract the first word of "$ac_prog", so it can be a program name with args.
8273 set dummy $ac_prog; ac_word=$2
8274 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
8275 echo "configure:8276: checking for $ac_word" >&5
8276 if eval "test \"`echo '$''{'ac_cv_path_XCURSES_CONFIG'+set}'`\" = set"; then
8277 echo $ac_n "(cached) $ac_c" 1>&6
8279 case "$XCURSES_CONFIG" in
8281 ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a path.
8284 ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a dos path.
8287 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
8289 for ac_dir in $ac_dummy; do
8290 test -z "$ac_dir" && ac_dir=.
8291 if test -f $ac_dir/$ac_word; then
8292 ac_cv_path_XCURSES_CONFIG="$ac_dir/$ac_word"
8300 XCURSES_CONFIG="$ac_cv_path_XCURSES_CONFIG"
8301 if test -n "$XCURSES_CONFIG"; then
8302 echo "$ac_t""$XCURSES_CONFIG" 1>&6
8304 echo "$ac_t""no" 1>&6
8307 test -n "$XCURSES_CONFIG" && break
8309 test -n "$XCURSES_CONFIG" || XCURSES_CONFIG="none"
8312 if test "$XCURSES_CONFIG" != none ; then
8314 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
8315 LIBS="`$XCURSES_CONFIG --libs` $LIBS"
8317 cf_cv_lib_XCurses=yes
8321 LDFLAGS="$LDFLAGS $X_LIBS"
8323 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
8325 echo "${as_me-configure}:8326: testing checking additions to CFLAGS ..." 1>&5
8328 cf_check_cflags="$CFLAGS"
8329 cf_check_cppflags="$CPPFLAGS"
8334 cf_new_extra_cppflags=
8336 for cf_add_cflags in $X_CFLAGS
8338 case $cf_fix_cppflags in
8340 case $cf_add_cflags in #(vi
8341 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
8342 case $cf_add_cflags in
8344 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8346 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8347 && test -z "${cf_tst_cflags}" \
8348 && cf_fix_cppflags=yes
8350 if test $cf_fix_cppflags = yes ; then
8351 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8353 elif test "${cf_tst_cflags}" = "\"'" ; then
8354 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8360 *$cf_add_cflags) #(vi
8363 case $cf_add_cflags in #(vi
8365 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8367 CPPFLAGS=`echo "$CPPFLAGS" | \
8368 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8369 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8373 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
8378 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
8383 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
8385 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
8387 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
8388 && test -z "${cf_tst_cflags}" \
8389 && cf_fix_cppflags=no
8394 if test -n "$cf_new_cflags" ; then
8395 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
8397 echo "${as_me-configure}:8398: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
8400 CFLAGS="$CFLAGS $cf_new_cflags"
8403 if test -n "$cf_new_cppflags" ; then
8404 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
8406 echo "${as_me-configure}:8407: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
8409 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
8412 if test -n "$cf_new_extra_cppflags" ; then
8413 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
8415 echo "${as_me-configure}:8416: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
8418 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
8424 if test "$cf_check_cflags" != "$CFLAGS" ; then
8425 cat > conftest.$ac_ext <<EOF
8426 #line 8427 "configure"
8427 #include "confdefs.h"
8430 printf("Hello world");
8433 if { (eval echo configure:8434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8436 echo "configure: failed program was:" >&5
8437 cat conftest.$ac_ext >&5
8439 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
8441 echo "${as_me-configure}:8442: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
8444 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
8445 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
8447 echo "${as_me-configure}:8448: testing but keeping change to \$CPPFLAGS ..." 1>&5
8451 CFLAGS="$cf_check_flags"
8456 echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
8457 echo "configure:8458: checking for XOpenDisplay in -lX11" >&5
8458 ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
8459 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8460 echo $ac_n "(cached) $ac_c" 1>&6
8462 ac_save_LIBS="$LIBS"
8463 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
8464 cat > conftest.$ac_ext <<EOF
8465 #line 8466 "configure"
8466 #include "confdefs.h"
8467 /* Override any gcc2 internal prototype to avoid an error. */
8468 /* We use char because int might match the return type of a gcc2
8469 builtin and then its argument prototype would still apply. */
8470 char XOpenDisplay();
8476 if { (eval echo configure:8477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8478 eval "ac_cv_lib_$ac_lib_var=yes"
8480 echo "configure: failed program was:" >&5
8481 cat conftest.$ac_ext >&5
8483 eval "ac_cv_lib_$ac_lib_var=no"
8486 LIBS="$ac_save_LIBS"
8489 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8490 echo "$ac_t""yes" 1>&6
8493 echo "$ac_t""no" 1>&6
8496 echo $ac_n "checking for XCurses library""... $ac_c" 1>&6
8497 echo "configure:8498: checking for XCurses library" >&5
8498 if eval "test \"`echo '$''{'cf_cv_lib_XCurses'+set}'`\" = set"; then
8499 echo $ac_n "(cached) $ac_c" 1>&6
8502 LIBS="-lXCurses $LIBS"
8503 cat > conftest.$ac_ext <<EOF
8504 #line 8505 "configure"
8505 #include "confdefs.h"
8507 #include <xcurses.h>
8508 char *XCursesProgramName = "test";
8514 if { (eval echo configure:8515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8516 cf_cv_lib_XCurses=yes
8518 echo "configure: failed program was:" >&5
8519 cat conftest.$ac_ext >&5
8521 cf_cv_lib_XCurses=no
8527 echo "$ac_t""$cf_cv_lib_XCurses" 1>&6
8531 if test $cf_cv_lib_XCurses = yes ; then
8532 cat >> confdefs.h <<\EOF
8536 cat >> confdefs.h <<\EOF
8540 cat >> confdefs.h <<\EOF
8541 #define HAVE_XCURSES 1
8545 { echo "configure: error: Cannot link with XCurses" 1>&2; exit 1; }
8553 case $cf_cv_screen in #(vi
8557 # look for curses-related libraries
8558 echo $ac_n "checking for new_panel in -lpanel$cf_cv_libtype""... $ac_c" 1>&6
8559 echo "configure:8560: checking for new_panel in -lpanel$cf_cv_libtype" >&5
8560 ac_lib_var=`echo panel$cf_cv_libtype'_'new_panel | sed 'y%./+-%__p_%'`
8561 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8562 echo $ac_n "(cached) $ac_c" 1>&6
8564 ac_save_LIBS="$LIBS"
8565 LIBS="-lpanel$cf_cv_libtype $LIBS"
8566 cat > conftest.$ac_ext <<EOF
8567 #line 8568 "configure"
8568 #include "confdefs.h"
8569 /* Override any gcc2 internal prototype to avoid an error. */
8570 /* We use char because int might match the return type of a gcc2
8571 builtin and then its argument prototype would still apply. */
8578 if { (eval echo configure:8579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8580 eval "ac_cv_lib_$ac_lib_var=yes"
8582 echo "configure: failed program was:" >&5
8583 cat conftest.$ac_ext >&5
8585 eval "ac_cv_lib_$ac_lib_var=no"
8588 LIBS="$ac_save_LIBS"
8591 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8592 echo "$ac_t""yes" 1>&6
8593 ac_tr_lib=HAVE_LIB`echo panel$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8594 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8595 cat >> confdefs.h <<EOF
8596 #define $ac_tr_lib 1
8599 LIBS="-lpanel$cf_cv_libtype $LIBS"
8602 echo "$ac_t""no" 1>&6
8605 echo $ac_n "checking for menu_driver in -lmenu$cf_cv_libtype""... $ac_c" 1>&6
8606 echo "configure:8607: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
8607 ac_lib_var=`echo menu$cf_cv_libtype'_'menu_driver | sed 'y%./+-%__p_%'`
8608 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8609 echo $ac_n "(cached) $ac_c" 1>&6
8611 ac_save_LIBS="$LIBS"
8612 LIBS="-lmenu$cf_cv_libtype $LIBS"
8613 cat > conftest.$ac_ext <<EOF
8614 #line 8615 "configure"
8615 #include "confdefs.h"
8616 /* Override any gcc2 internal prototype to avoid an error. */
8617 /* We use char because int might match the return type of a gcc2
8618 builtin and then its argument prototype would still apply. */
8625 if { (eval echo configure:8626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8627 eval "ac_cv_lib_$ac_lib_var=yes"
8629 echo "configure: failed program was:" >&5
8630 cat conftest.$ac_ext >&5
8632 eval "ac_cv_lib_$ac_lib_var=no"
8635 LIBS="$ac_save_LIBS"
8638 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8639 echo "$ac_t""yes" 1>&6
8640 ac_tr_lib=HAVE_LIB`echo menu$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8641 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8642 cat >> confdefs.h <<EOF
8643 #define $ac_tr_lib 1
8646 LIBS="-lmenu$cf_cv_libtype $LIBS"
8649 echo "$ac_t""no" 1>&6
8652 echo $ac_n "checking for form_driver in -lform$cf_cv_libtype""... $ac_c" 1>&6
8653 echo "configure:8654: checking for form_driver in -lform$cf_cv_libtype" >&5
8654 ac_lib_var=`echo form$cf_cv_libtype'_'form_driver | sed 'y%./+-%__p_%'`
8655 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
8656 echo $ac_n "(cached) $ac_c" 1>&6
8658 ac_save_LIBS="$LIBS"
8659 LIBS="-lform$cf_cv_libtype $LIBS"
8660 cat > conftest.$ac_ext <<EOF
8661 #line 8662 "configure"
8662 #include "confdefs.h"
8663 /* Override any gcc2 internal prototype to avoid an error. */
8664 /* We use char because int might match the return type of a gcc2
8665 builtin and then its argument prototype would still apply. */
8672 if { (eval echo configure:8673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8674 eval "ac_cv_lib_$ac_lib_var=yes"
8676 echo "configure: failed program was:" >&5
8677 cat conftest.$ac_ext >&5
8679 eval "ac_cv_lib_$ac_lib_var=no"
8682 LIBS="$ac_save_LIBS"
8685 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8686 echo "$ac_t""yes" 1>&6
8687 ac_tr_lib=HAVE_LIB`echo form$cf_cv_libtype | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8688 -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8689 cat >> confdefs.h <<EOF
8690 #define $ac_tr_lib 1
8693 LIBS="-lform$cf_cv_libtype $LIBS"
8696 echo "$ac_t""no" 1>&6
8700 # look for curses-related headers
8709 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8710 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8711 echo "configure:8712: checking for $ac_hdr" >&5
8712 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8713 echo $ac_n "(cached) $ac_c" 1>&6
8715 cat > conftest.$ac_ext <<EOF
8716 #line 8717 "configure"
8717 #include "confdefs.h"
8720 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8721 { (eval echo configure:8722: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8722 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8723 if test -z "$ac_err"; then
8725 eval "ac_cv_header_$ac_safe=yes"
8728 echo "configure: failed program was:" >&5
8729 cat conftest.$ac_ext >&5
8731 eval "ac_cv_header_$ac_safe=no"
8735 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8736 echo "$ac_t""yes" 1>&6
8737 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8738 cat >> confdefs.h <<EOF
8739 #define $ac_tr_hdr 1
8743 echo "$ac_t""no" 1>&6
8750 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
8751 echo "configure:8752: checking return type of signal handlers" >&5
8752 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
8753 echo $ac_n "(cached) $ac_c" 1>&6
8755 cat > conftest.$ac_ext <<EOF
8756 #line 8757 "configure"
8757 #include "confdefs.h"
8758 #include <sys/types.h>
8764 extern "C" void (*signal (int, void (*)(int)))(int);
8766 void (*signal ()) ();
8773 if { (eval echo configure:8774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8775 ac_cv_type_signal=void
8777 echo "configure: failed program was:" >&5
8778 cat conftest.$ac_ext >&5
8780 ac_cv_type_signal=int
8785 echo "$ac_t""$ac_cv_type_signal" 1>&6
8786 cat >> confdefs.h <<EOF
8787 #define RETSIGTYPE $ac_cv_type_signal
8792 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8793 echo "configure:8794: checking for ANSI C header files" >&5
8794 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
8795 echo $ac_n "(cached) $ac_c" 1>&6
8797 cat > conftest.$ac_ext <<EOF
8798 #line 8799 "configure"
8799 #include "confdefs.h"
8805 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8806 { (eval echo configure:8807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8807 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8808 if test -z "$ac_err"; then
8810 ac_cv_header_stdc=yes
8813 echo "configure: failed program was:" >&5
8814 cat conftest.$ac_ext >&5
8816 ac_cv_header_stdc=no
8820 if test $ac_cv_header_stdc = yes; then
8821 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8822 cat > conftest.$ac_ext <<EOF
8823 #line 8824 "configure"
8824 #include "confdefs.h"
8827 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8828 egrep "memchr" >/dev/null 2>&1; then
8832 ac_cv_header_stdc=no
8838 if test $ac_cv_header_stdc = yes; then
8839 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8840 cat > conftest.$ac_ext <<EOF
8841 #line 8842 "configure"
8842 #include "confdefs.h"
8845 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8846 egrep "free" >/dev/null 2>&1; then
8850 ac_cv_header_stdc=no
8856 if test $ac_cv_header_stdc = yes; then
8857 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8858 if test "$cross_compiling" = yes; then
8861 cat > conftest.$ac_ext <<EOF
8862 #line 8863 "configure"
8863 #include "confdefs.h"
8865 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8866 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8867 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8868 int main () { int i; for (i = 0; i < 256; i++)
8869 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8873 if { (eval echo configure:8874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8877 echo "configure: failed program was:" >&5
8878 cat conftest.$ac_ext >&5
8880 ac_cv_header_stdc=no
8888 echo "$ac_t""$ac_cv_header_stdc" 1>&6
8889 if test $ac_cv_header_stdc = yes; then
8890 cat >> confdefs.h <<\EOF
8891 #define STDC_HEADERS 1
8896 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
8897 echo "configure:8898: checking whether time.h and sys/time.h may both be included" >&5
8898 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
8899 echo $ac_n "(cached) $ac_c" 1>&6
8901 cat > conftest.$ac_ext <<EOF
8902 #line 8903 "configure"
8903 #include "confdefs.h"
8904 #include <sys/types.h>
8905 #include <sys/time.h>
8911 if { (eval echo configure:8912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8913 ac_cv_header_time=yes
8915 echo "configure: failed program was:" >&5
8916 cat conftest.$ac_ext >&5
8918 ac_cv_header_time=no
8923 echo "$ac_t""$ac_cv_header_time" 1>&6
8924 if test $ac_cv_header_time = yes; then
8925 cat >> confdefs.h <<\EOF
8926 #define TIME_WITH_SYS_TIME 1
8942 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8943 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8944 echo "configure:8945: checking for $ac_hdr" >&5
8945 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
8946 echo $ac_n "(cached) $ac_c" 1>&6
8948 cat > conftest.$ac_ext <<EOF
8949 #line 8950 "configure"
8950 #include "confdefs.h"
8953 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8954 { (eval echo configure:8955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8955 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8956 if test -z "$ac_err"; then
8958 eval "ac_cv_header_$ac_safe=yes"
8961 echo "configure: failed program was:" >&5
8962 cat conftest.$ac_ext >&5
8964 eval "ac_cv_header_$ac_safe=no"
8968 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8969 echo "$ac_t""yes" 1>&6
8970 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8971 cat >> confdefs.h <<EOF
8972 #define $ac_tr_hdr 1
8976 echo "$ac_t""no" 1>&6
8994 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8995 echo "configure:8996: checking for $ac_func" >&5
8996 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
8997 echo $ac_n "(cached) $ac_c" 1>&6
8999 cat > conftest.$ac_ext <<EOF
9000 #line 9001 "configure"
9001 #include "confdefs.h"
9002 /* System header to define __stub macros and hopefully few prototypes,
9003 which can conflict with char $ac_func(); below. */
9005 /* Override any gcc2 internal prototype to avoid an error. */
9006 /* We use char because int might match the return type of a gcc2
9007 builtin and then its argument prototype would still apply. */
9012 /* The GNU C library defines this for functions which it implements
9013 to always fail with ENOSYS. Some functions are actually named
9014 something starting with __ and the normal name is an alias. */
9015 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9023 if { (eval echo configure:9024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9025 eval "ac_cv_func_$ac_func=yes"
9027 echo "configure: failed program was:" >&5
9028 cat conftest.$ac_ext >&5
9030 eval "ac_cv_func_$ac_func=no"
9035 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9036 echo "$ac_t""yes" 1>&6
9037 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9038 cat >> confdefs.h <<EOF
9039 #define $ac_tr_func 1
9043 echo "$ac_t""no" 1>&6
9049 echo $ac_n "checking if we must define _XOPEN_SOURCE_EXTENDED""... $ac_c" 1>&6
9050 echo "configure:9051: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
9051 if eval "test \"`echo '$''{'cf_cv_need_xopen_extension'+set}'`\" = set"; then
9052 echo $ac_n "(cached) $ac_c" 1>&6
9055 cat > conftest.$ac_ext <<EOF
9056 #line 9057 "configure"
9057 #include "confdefs.h"
9060 #include <${cf_cv_ncurses_header-curses.h}>
9063 #if defined(NCURSES_VERSION_PATCH)
9064 if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
9068 long x = winnstr(stdscr, "", 0);
9070 getbegyx(stdscr, y1, x1)
9073 if { (eval echo configure:9074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9075 cf_cv_need_xopen_extension=no
9077 echo "configure: failed program was:" >&5
9078 cat conftest.$ac_ext >&5
9080 cat > conftest.$ac_ext <<EOF
9081 #line 9082 "configure"
9082 #include "confdefs.h"
9084 #define _XOPEN_SOURCE_EXTENDED
9086 #include <${cf_cv_ncurses_header-curses.h}>
9089 #ifdef NCURSES_VERSION
9091 int check2 = curs_set((int)sizeof(check));
9093 long x = winnstr(stdscr, "", 0);
9095 getbegyx(stdscr, y1, x1)
9098 if { (eval echo configure:9099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9100 cf_cv_need_xopen_extension=yes
9102 echo "configure: failed program was:" >&5
9103 cat conftest.$ac_ext >&5
9105 cf_cv_need_xopen_extension=unknown
9112 echo "$ac_t""$cf_cv_need_xopen_extension" 1>&6
9113 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
9117 echo $ac_n "checking for term.h""... $ac_c" 1>&6
9118 echo "configure:9119: checking for term.h" >&5
9119 if eval "test \"`echo '$''{'cf_cv_term_header'+set}'`\" = set"; then
9120 echo $ac_n "(cached) $ac_c" 1>&6
9124 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
9125 # for <term.h> if we do not find the variant.
9127 `echo ${cf_cv_ncurses_header-curses.h} | sed -e 's%/.*%/%'`term.h \
9130 cat > conftest.$ac_ext <<EOF
9131 #line 9132 "configure"
9132 #include "confdefs.h"
9134 #include <${cf_cv_ncurses_header-curses.h}>
9135 #include <${cf_header}>
9140 if { (eval echo configure:9141: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9142 cf_cv_term_header=$cf_header
9145 echo "configure: failed program was:" >&5
9146 cat conftest.$ac_ext >&5
9148 cf_cv_term_header=no
9153 case $cf_cv_term_header in #(vi
9155 # If curses is ncurses, some packagers still mess it up by trying to make
9156 # us use GNU termcap. This handles the most common case.
9157 for cf_header in ncurses/term.h ncursesw/term.h
9159 cat > conftest.$ac_ext <<EOF
9160 #line 9161 "configure"
9161 #include "confdefs.h"
9163 #include <${cf_cv_ncurses_header-curses.h}>
9164 #ifdef NCURSES_VERSION
9165 #include <${cf_header}>
9173 if { (eval echo configure:9174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9175 cf_cv_term_header=$cf_header
9178 echo "configure: failed program was:" >&5
9179 cat conftest.$ac_ext >&5
9181 cf_cv_term_header=no
9190 echo "$ac_t""$cf_cv_term_header" 1>&6
9192 case $cf_cv_term_header in #(vi
9194 cat >> confdefs.h <<\EOF
9195 #define HAVE_TERM_H 1
9199 ncurses/term.h) #(vi
9200 cat >> confdefs.h <<\EOF
9201 #define HAVE_NCURSES_TERM_H 1
9206 cat >> confdefs.h <<\EOF
9207 #define HAVE_NCURSESW_TERM_H 1
9241 use_default_colors \
9250 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9252 echo $ac_n "checking for ${cf_func}""... $ac_c" 1>&6
9253 echo "configure:9254: checking for ${cf_func}" >&5
9255 echo "${as_me-configure}:9256: testing ${cf_func} ..." 1>&5
9257 if eval "test \"`echo '$''{'cf_cv_func_$cf_func'+set}'`\" = set"; then
9258 echo $ac_n "(cached) $ac_c" 1>&6
9261 eval cf_result='$ac_cv_func_'$cf_func
9262 if test ".$cf_result" != ".no"; then
9263 cat > conftest.$ac_ext <<EOF
9264 #line 9265 "configure"
9265 #include "confdefs.h"
9268 #include <xcurses.h>
9269 char * XCursesProgramName = "test";
9271 #include <${cf_cv_ncurses_header-curses.h}>
9272 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
9273 #include <ncursesw/term.h>
9274 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
9275 #include <ncurses/term.h>
9276 #elif defined(HAVE_TERM_H)
9284 long foo = (long)(&${cf_func});
9285 ${cf_cv_main_return-return}(foo == 0);
9290 if { (eval echo configure:9291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9294 echo "configure: failed program was:" >&5
9295 cat conftest.$ac_ext >&5
9301 eval 'cf_cv_func_'$cf_func'=$cf_result'
9305 # use the computed/retrieved cache-value:
9306 eval 'cf_result=$cf_cv_func_'$cf_func
9307 echo "$ac_t""$cf_result" 1>&6
9308 if test $cf_result != no; then
9309 cat >> confdefs.h <<EOF
9310 #define HAVE_${cf_tr_func} 1
9318 echo $ac_n "checking for ncurses extended functions""... $ac_c" 1>&6
9319 echo "configure:9320: checking for ncurses extended functions" >&5
9320 if eval "test \"`echo '$''{'cf_cv_ncurses_ext_funcs'+set}'`\" = set"; then
9321 echo $ac_n "(cached) $ac_c" 1>&6
9324 cat > conftest.$ac_ext <<EOF
9325 #line 9326 "configure"
9326 #include "confdefs.h"
9328 #include <${cf_cv_ncurses_header-curses.h}>
9331 int x = NCURSES_EXT_FUNCS
9335 if { (eval echo configure:9336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9337 cf_cv_ncurses_ext_funcs=defined
9339 echo "configure: failed program was:" >&5
9340 cat conftest.$ac_ext >&5
9343 cat > conftest.$ac_ext <<EOF
9344 #line 9345 "configure"
9345 #include "confdefs.h"
9347 #include <${cf_cv_ncurses_header-curses.h}>
9350 (void) assume_default_colors (0, 0);
9351 (void) curses_version ();
9352 (void) define_key (0, 0);
9353 (void) is_term_resized (0, 0);
9354 (void) key_defined (0);
9355 (void) keybound (0, 0);
9356 (void) keyok (0, 0);
9357 (void) resize_term (0, 0);
9358 (void) resizeterm (0, 0);
9359 (void) use_default_colors ();
9360 (void) use_extended_names (0);
9361 (void) wresize (0, 0, 0);
9364 if { (eval echo configure:9365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9366 cf_cv_ncurses_ext_funcs=yes
9368 echo "configure: failed program was:" >&5
9369 cat conftest.$ac_ext >&5
9371 cf_cv_ncurses_ext_funcs=no
9380 echo "$ac_t""$cf_cv_ncurses_ext_funcs" 1>&6
9381 test "$cf_cv_ncurses_ext_funcs" == yes && cat >> confdefs.h <<\EOF
9382 #define NCURSES_EXT_FUNCS 1
9387 echo $ac_n "checking for wide-character functions""... $ac_c" 1>&6
9388 echo "configure:9389: checking for wide-character functions" >&5
9389 if eval "test \"`echo '$''{'cf_cv_widechar_funcs'+set}'`\" = set"; then
9390 echo $ac_n "(cached) $ac_c" 1>&6
9393 cat > conftest.$ac_ext <<EOF
9394 #line 9395 "configure"
9395 #include "confdefs.h"
9397 #include <${cf_cv_ncurses_header-curses.h}>
9400 static wchar_t src_wchar[2];
9401 static cchar_t dst_cchar;
9402 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
9406 if { (eval echo configure:9407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9408 cf_cv_widechar_funcs=yes
9410 echo "configure: failed program was:" >&5
9411 cat conftest.$ac_ext >&5
9413 cf_cv_widechar_funcs=no
9419 echo "$ac_t""$cf_cv_widechar_funcs" 1>&6
9420 if test "$cf_cv_widechar_funcs" != no ; then
9421 cat >> confdefs.h <<\EOF
9422 #define USE_WIDEC_SUPPORT 1
9426 cat >> confdefs.h <<\EOF
9427 #define USE_WIDEC_SUPPORT 0
9432 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
9433 echo "configure:9434: checking for pid_t" >&5
9434 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
9435 echo $ac_n "(cached) $ac_c" 1>&6
9437 cat > conftest.$ac_ext <<EOF
9438 #line 9439 "configure"
9439 #include "confdefs.h"
9440 #include <sys/types.h>
9446 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9447 egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
9449 ac_cv_type_pid_t=yes
9457 echo "$ac_t""$ac_cv_type_pid_t" 1>&6
9458 if test $ac_cv_type_pid_t = no; then
9459 cat >> confdefs.h <<\EOF
9465 ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
9466 echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
9467 echo "configure:9468: checking for vfork.h" >&5
9468 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
9469 echo $ac_n "(cached) $ac_c" 1>&6
9471 cat > conftest.$ac_ext <<EOF
9472 #line 9473 "configure"
9473 #include "confdefs.h"
9476 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9477 { (eval echo configure:9478: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9478 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9479 if test -z "$ac_err"; then
9481 eval "ac_cv_header_$ac_safe=yes"
9484 echo "configure: failed program was:" >&5
9485 cat conftest.$ac_ext >&5
9487 eval "ac_cv_header_$ac_safe=no"
9491 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9492 echo "$ac_t""yes" 1>&6
9493 cat >> confdefs.h <<\EOF
9494 #define HAVE_VFORK_H 1
9498 echo "$ac_t""no" 1>&6
9501 echo $ac_n "checking for working vfork""... $ac_c" 1>&6
9502 echo "configure:9503: checking for working vfork" >&5
9503 if eval "test \"`echo '$''{'ac_cv_func_vfork_works'+set}'`\" = set"; then
9504 echo $ac_n "(cached) $ac_c" 1>&6
9506 if test "$cross_compiling" = yes; then
9507 echo $ac_n "checking for vfork""... $ac_c" 1>&6
9508 echo "configure:9509: checking for vfork" >&5
9509 if eval "test \"`echo '$''{'ac_cv_func_vfork'+set}'`\" = set"; then
9510 echo $ac_n "(cached) $ac_c" 1>&6
9512 cat > conftest.$ac_ext <<EOF
9513 #line 9514 "configure"
9514 #include "confdefs.h"
9515 /* System header to define __stub macros and hopefully few prototypes,
9516 which can conflict with char vfork(); below. */
9518 /* Override any gcc2 internal prototype to avoid an error. */
9519 /* We use char because int might match the return type of a gcc2
9520 builtin and then its argument prototype would still apply. */
9525 /* The GNU C library defines this for functions which it implements
9526 to always fail with ENOSYS. Some functions are actually named
9527 something starting with __ and the normal name is an alias. */
9528 #if defined (__stub_vfork) || defined (__stub___vfork)
9536 if { (eval echo configure:9537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9538 eval "ac_cv_func_vfork=yes"
9540 echo "configure: failed program was:" >&5
9541 cat conftest.$ac_ext >&5
9543 eval "ac_cv_func_vfork=no"
9548 if eval "test \"`echo '$ac_cv_func_'vfork`\" = yes"; then
9549 echo "$ac_t""yes" 1>&6
9552 echo "$ac_t""no" 1>&6
9555 ac_cv_func_vfork_works=$ac_cv_func_vfork
9557 cat > conftest.$ac_ext <<EOF
9558 #line 9559 "configure"
9559 #include "confdefs.h"
9560 /* Thanks to Paul Eggert for this test. */
9562 #include <sys/types.h>
9563 #include <sys/stat.h>
9564 #ifdef HAVE_UNISTD_H
9570 /* On some sparc systems, changes by the child to local and incoming
9571 argument registers are propagated back to the parent.
9572 The compiler is told about this with #include <vfork.h>,
9573 but some compilers (e.g. gcc -O) don't grok <vfork.h>.
9574 Test for this by using a static variable whose address
9575 is put into a register that is clobbered by the vfork. */
9578 sparc_address_test (int arg)
9580 sparc_address_test (arg) int arg;
9598 pid_t parent = getpid ();
9601 sparc_address_test ();
9606 /* Here is another test for sparc vfork register problems.
9607 This test uses lots of local variables, at least
9608 as many local variables as main has allocated so far
9609 including compiler temporaries. 4 locals are enough for
9610 gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
9611 A buggy compiler should reuse the register of parent
9612 for one of the local variables, since it will think that
9613 parent can't possibly be used any more in this routine.
9614 Assigning to the local variable will thus munge parent
9615 in the parent process. */
9617 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
9618 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
9619 /* Convince the compiler that p..p7 are live; otherwise, it might
9620 use the same hardware register for all 8 local variables. */
9621 if (p != p1 || p != p2 || p != p3 || p != p4
9622 || p != p5 || p != p6 || p != p7)
9625 /* On some systems (e.g. IRIX 3.3),
9626 vfork doesn't separate parent from child file descriptors.
9627 If the child closes a descriptor before it execs or exits,
9628 this munges the parent's descriptor as well.
9629 Test for this by closing stdout in the child. */
9630 _exit(close(fileno(stdout)) != 0);
9635 while (wait(&status) != child)
9638 /* Was there some problem with vforking? */
9641 /* Did the child fail? (This shouldn't happen.) */
9644 /* Did the vfork/compiler bug occur? */
9645 || parent != getpid()
9647 /* Did the file descriptor bug occur? */
9648 || fstat(fileno(stdout), &st) != 0
9653 if { (eval echo configure:9654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9655 ac_cv_func_vfork_works=yes
9657 echo "configure: failed program was:" >&5
9658 cat conftest.$ac_ext >&5
9660 ac_cv_func_vfork_works=no
9667 echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
9668 if test $ac_cv_func_vfork_works = no; then
9669 cat >> confdefs.h <<\EOF
9676 echo $ac_n "checking if sys/time.h works with sys/select.h""... $ac_c" 1>&6
9677 echo "configure:9678: checking if sys/time.h works with sys/select.h" >&5
9678 if eval "test \"`echo '$''{'cf_cv_sys_time_select'+set}'`\" = set"; then
9679 echo $ac_n "(cached) $ac_c" 1>&6
9682 cat > conftest.$ac_ext <<EOF
9683 #line 9684 "configure"
9684 #include "confdefs.h"
9686 #include <sys/types.h>
9687 #ifdef HAVE_SYS_TIME_H
9688 #include <sys/time.h>
9690 #ifdef HAVE_SYS_SELECT_H
9691 #include <sys/select.h>
9698 if { (eval echo configure:9699: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9700 cf_cv_sys_time_select=yes
9702 echo "configure: failed program was:" >&5
9703 cat conftest.$ac_ext >&5
9705 cf_cv_sys_time_select=no
9711 echo "$ac_t""$cf_cv_sys_time_select" 1>&6
9712 test "$cf_cv_sys_time_select" = yes && cat >> confdefs.h <<\EOF
9713 #define HAVE_SYS_TIME_SELECT 1
9718 echo $ac_n "checking for function curses_version""... $ac_c" 1>&6
9719 echo "configure:9720: checking for function curses_version" >&5
9720 if eval "test \"`echo '$''{'cf_cv_func_curses_version'+set}'`\" = set"; then
9721 echo $ac_n "(cached) $ac_c" 1>&6
9724 if test "$cross_compiling" = yes; then
9725 cf_cv_func_curses_version=unknown
9727 cat > conftest.$ac_ext <<EOF
9728 #line 9729 "configure"
9729 #include "confdefs.h"
9731 #include <${cf_cv_ncurses_header-curses.h}>
9735 sprintf(temp, "%s\n", curses_version());
9736 ${cf_cv_main_return-return}(0);
9740 if { (eval echo configure:9741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9742 cf_cv_func_curses_version=yes
9745 echo "configure: failed program was:" >&5
9746 cat conftest.$ac_ext >&5
9748 cf_cv_func_curses_version=no
9757 echo "$ac_t""$cf_cv_func_curses_version" 1>&6
9758 test "$cf_cv_func_curses_version" = yes && cat >> confdefs.h <<\EOF
9759 #define HAVE_CURSES_VERSION 1
9764 echo $ac_n "checking for ncurses wrap-prefix""... $ac_c" 1>&6
9765 echo "configure:9766: checking for ncurses wrap-prefix" >&5
9767 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
9768 if test "${with_ncurses_wrap_prefix+set}" = set; then
9769 withval="$with_ncurses_wrap_prefix"
9770 NCURSES_WRAP_PREFIX=$withval
9772 NCURSES_WRAP_PREFIX=_nc_
9775 echo "$ac_t""$NCURSES_WRAP_PREFIX" 1>&6
9780 echo $ac_n "checking for alternate character set array""... $ac_c" 1>&6
9781 echo "configure:9782: checking for alternate character set array" >&5
9782 if eval "test \"`echo '$''{'cf_cv_curses_acs_map'+set}'`\" = set"; then
9783 echo $ac_n "(cached) $ac_c" 1>&6
9786 cf_cv_curses_acs_map=unknown
9787 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
9789 cat > conftest.$ac_ext <<EOF
9790 #line 9791 "configure"
9791 #include "confdefs.h"
9793 #include <${cf_cv_ncurses_header-curses.h}>
9797 $name['k'] = ACS_PLUS
9801 if { (eval echo configure:9802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9803 cf_cv_curses_acs_map=$name; break
9805 echo "configure: failed program was:" >&5
9806 cat conftest.$ac_ext >&5
9813 echo "$ac_t""$cf_cv_curses_acs_map" 1>&6
9815 test "$cf_cv_curses_acs_map" != unknown && cat >> confdefs.h <<EOF
9816 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
9821 echo $ac_n "checking for wide alternate character set array""... $ac_c" 1>&6
9822 echo "configure:9823: checking for wide alternate character set array" >&5
9823 if eval "test \"`echo '$''{'cf_cv_curses_wacs_map'+set}'`\" = set"; then
9824 echo $ac_n "(cached) $ac_c" 1>&6
9827 cf_cv_curses_wacs_map=unknown
9828 for name in wacs_map _wacs_map __wacs_map _nc_wacs
9830 cat > conftest.$ac_ext <<EOF
9831 #line 9832 "configure"
9832 #include "confdefs.h"
9834 #ifndef _XOPEN_SOURCE_EXTENDED
9835 #define _XOPEN_SOURCE_EXTENDED
9837 #include <${cf_cv_ncurses_header-curses.h}>
9839 $name['k'] = *WACS_PLUS
9842 if { (eval echo configure:9843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9844 cf_cv_curses_wacs_map=$name
9847 echo "configure: failed program was:" >&5
9848 cat conftest.$ac_ext >&5
9854 echo "$ac_t""$cf_cv_curses_wacs_map" 1>&6
9858 echo $ac_n "checking for type attr_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
9859 echo "configure:9860: checking for type attr_t in ${cf_cv_ncurses_header-curses.h}" >&5
9860 cat > conftest.$ac_ext <<EOF
9861 #line 9862 "configure"
9862 #include "confdefs.h"
9864 #ifndef _XOPEN_SOURCE_EXTENDED
9865 #define _XOPEN_SOURCE_EXTENDED
9867 #include <${cf_cv_ncurses_header-curses.h}>
9874 if { (eval echo configure:9875: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9878 echo "configure: failed program was:" >&5
9879 cat conftest.$ac_ext >&5
9884 echo "$ac_t""$cf_result" 1>&6
9885 if test $cf_result = yes ; then
9887 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9889 cat >> confdefs.h <<EOF
9890 #define $cf_result 1
9894 cat >> confdefs.h <<EOF
9902 # This is needed on Tru64 5.0 to declare mbstate_t
9903 echo $ac_n "checking if we must include wchar.h to declare mbstate_t""... $ac_c" 1>&6
9904 echo "configure:9905: checking if we must include wchar.h to declare mbstate_t" >&5
9905 if eval "test \"`echo '$''{'cf_cv_mbstate_t'+set}'`\" = set"; then
9906 echo $ac_n "(cached) $ac_c" 1>&6
9909 cat > conftest.$ac_ext <<EOF
9910 #line 9911 "configure"
9911 #include "confdefs.h"
9916 #ifdef HAVE_LIBUTF8_H
9917 #include <libutf8.h>
9923 if { (eval echo configure:9924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9927 echo "configure: failed program was:" >&5
9928 cat conftest.$ac_ext >&5
9930 cat > conftest.$ac_ext <<EOF
9931 #line 9932 "configure"
9932 #include "confdefs.h"
9938 #ifdef HAVE_LIBUTF8_H
9939 #include <libutf8.h>
9945 if { (eval echo configure:9946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9949 echo "configure: failed program was:" >&5
9950 cat conftest.$ac_ext >&5
9952 cf_cv_mbstate_t=unknown
9959 echo "$ac_t""$cf_cv_mbstate_t" 1>&6
9961 if test "$cf_cv_mbstate_t" = yes ; then
9962 cat >> confdefs.h <<\EOF
9963 #define NEED_WCHAR_H 1
9970 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
9971 if test "$cf_cv_mbstate_t" = unknown ; then
9976 # if we find mbstate_t in either place, use substitution to provide a fallback.
9977 if test "$cf_cv_mbstate_t" != unknown ; then
9978 NCURSES_OK_MBSTATE_T=1
9983 # This is needed on Tru64 5.0 to declare wchar_t
9984 echo $ac_n "checking if we must include wchar.h to declare wchar_t""... $ac_c" 1>&6
9985 echo "configure:9986: checking if we must include wchar.h to declare wchar_t" >&5
9986 if eval "test \"`echo '$''{'cf_cv_wchar_t'+set}'`\" = set"; then
9987 echo $ac_n "(cached) $ac_c" 1>&6
9990 cat > conftest.$ac_ext <<EOF
9991 #line 9992 "configure"
9992 #include "confdefs.h"
9997 #ifdef HAVE_LIBUTF8_H
9998 #include <libutf8.h>
10004 if { (eval echo configure:10005: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10008 echo "configure: failed program was:" >&5
10009 cat conftest.$ac_ext >&5
10011 cat > conftest.$ac_ext <<EOF
10012 #line 10013 "configure"
10013 #include "confdefs.h"
10015 #include <stdlib.h>
10016 #include <stdarg.h>
10019 #ifdef HAVE_LIBUTF8_H
10020 #include <libutf8.h>
10026 if { (eval echo configure:10027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10030 echo "configure: failed program was:" >&5
10031 cat conftest.$ac_ext >&5
10033 cf_cv_wchar_t=unknown
10040 echo "$ac_t""$cf_cv_wchar_t" 1>&6
10042 if test "$cf_cv_wchar_t" = yes ; then
10043 cat >> confdefs.h <<\EOF
10044 #define NEED_WCHAR_H 1
10051 # if we do not find wchar_t in either place, use substitution to provide a fallback.
10052 if test "$cf_cv_wchar_t" = unknown ; then
10057 # if we find wchar_t in either place, use substitution to provide a fallback.
10058 if test "$cf_cv_wchar_t" != unknown ; then
10059 NCURSES_OK_WCHAR_T=1
10064 # This is needed on Tru64 5.0 to declare wint_t
10065 echo $ac_n "checking if we must include wchar.h to declare wint_t""... $ac_c" 1>&6
10066 echo "configure:10067: checking if we must include wchar.h to declare wint_t" >&5
10067 if eval "test \"`echo '$''{'cf_cv_wint_t'+set}'`\" = set"; then
10068 echo $ac_n "(cached) $ac_c" 1>&6
10071 cat > conftest.$ac_ext <<EOF
10072 #line 10073 "configure"
10073 #include "confdefs.h"
10075 #include <stdlib.h>
10076 #include <stdarg.h>
10078 #ifdef HAVE_LIBUTF8_H
10079 #include <libutf8.h>
10085 if { (eval echo configure:10086: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10089 echo "configure: failed program was:" >&5
10090 cat conftest.$ac_ext >&5
10092 cat > conftest.$ac_ext <<EOF
10093 #line 10094 "configure"
10094 #include "confdefs.h"
10096 #include <stdlib.h>
10097 #include <stdarg.h>
10100 #ifdef HAVE_LIBUTF8_H
10101 #include <libutf8.h>
10107 if { (eval echo configure:10108: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10111 echo "configure: failed program was:" >&5
10112 cat conftest.$ac_ext >&5
10114 cf_cv_wint_t=unknown
10121 echo "$ac_t""$cf_cv_wint_t" 1>&6
10123 if test "$cf_cv_wint_t" = yes ; then
10124 cat >> confdefs.h <<\EOF
10125 #define NEED_WCHAR_H 1
10132 # if we do not find wint_t in either place, use substitution to provide a fallback.
10133 if test "$cf_cv_wint_t" = unknown ; then
10138 # if we find wint_t in either place, use substitution to provide a fallback.
10139 if test "$cf_cv_wint_t" != unknown ; then
10140 NCURSES_OK_WINT_T=1
10145 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
10147 echo $ac_n "checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
10148 echo "configure:10149: checking for type mbstate_t in ${cf_cv_ncurses_header-curses.h}" >&5
10149 cat > conftest.$ac_ext <<EOF
10150 #line 10151 "configure"
10151 #include "confdefs.h"
10153 #ifndef _XOPEN_SOURCE_EXTENDED
10154 #define _XOPEN_SOURCE_EXTENDED
10156 #include <${cf_cv_ncurses_header-curses.h}>
10163 if { (eval echo configure:10164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10167 echo "configure: failed program was:" >&5
10168 cat conftest.$ac_ext >&5
10173 echo "$ac_t""$cf_result" 1>&6
10174 if test $cf_result = yes ; then
10176 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10178 cat >> confdefs.h <<EOF
10179 #define $cf_result 1
10183 cat >> confdefs.h <<EOF
10184 #define mbstate_t long
10191 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
10193 echo $ac_n "checking for type wchar_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
10194 echo "configure:10195: checking for type wchar_t in ${cf_cv_ncurses_header-curses.h}" >&5
10195 cat > conftest.$ac_ext <<EOF
10196 #line 10197 "configure"
10197 #include "confdefs.h"
10199 #ifndef _XOPEN_SOURCE_EXTENDED
10200 #define _XOPEN_SOURCE_EXTENDED
10202 #include <${cf_cv_ncurses_header-curses.h}>
10209 if { (eval echo configure:10210: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10213 echo "configure: failed program was:" >&5
10214 cat conftest.$ac_ext >&5
10219 echo "$ac_t""$cf_result" 1>&6
10220 if test $cf_result = yes ; then
10222 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10224 cat >> confdefs.h <<EOF
10225 #define $cf_result 1
10229 cat >> confdefs.h <<EOF
10230 #define wchar_t long
10237 if test "$NCURSES_OK_WINT_T" = 0 ; then
10239 echo $ac_n "checking for type wint_t in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
10240 echo "configure:10241: checking for type wint_t in ${cf_cv_ncurses_header-curses.h}" >&5
10241 cat > conftest.$ac_ext <<EOF
10242 #line 10243 "configure"
10243 #include "confdefs.h"
10245 #ifndef _XOPEN_SOURCE_EXTENDED
10246 #define _XOPEN_SOURCE_EXTENDED
10248 #include <${cf_cv_ncurses_header-curses.h}>
10255 if { (eval echo configure:10256: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10259 echo "configure: failed program was:" >&5
10260 cat conftest.$ac_ext >&5
10265 echo "$ac_t""$cf_result" 1>&6
10266 if test $cf_result = yes ; then
10268 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10270 cat >> confdefs.h <<EOF
10271 #define $cf_result 1
10275 cat >> confdefs.h <<EOF
10276 #define wint_t long
10284 echo $ac_n "checking for data boolnames declaration in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
10285 echo "configure:10286: checking for data boolnames declaration in ${cf_cv_ncurses_header-curses.h}" >&5
10286 cat > conftest.$ac_ext <<EOF
10287 #line 10288 "configure"
10288 #include "confdefs.h"
10290 #ifdef HAVE_XCURSES
10291 #include <xcurses.h>
10292 char * XCursesProgramName = "test";
10294 #include <${cf_cv_ncurses_header-curses.h}>
10295 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
10296 #include <ncursesw/term.h>
10297 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
10298 #include <ncurses/term.h>
10299 #elif defined(HAVE_TERM_H)
10306 void *foo = &(boolnames)
10310 if { (eval echo configure:10311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10314 echo "configure: failed program was:" >&5
10315 cat conftest.$ac_ext >&5
10320 echo "$ac_t""$cf_result" 1>&6
10321 if test $cf_result = yes ; then
10323 cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10325 cat >> confdefs.h <<EOF
10326 #define $cf_result 1
10330 echo $ac_n "checking for data boolnames in library""... $ac_c" 1>&6
10331 echo "configure:10332: checking for data boolnames in library" >&5
10332 cat > conftest.$ac_ext <<EOF
10333 #line 10334 "configure"
10334 #include "confdefs.h"
10336 #ifdef HAVE_XCURSES
10337 #include <xcurses.h>
10338 char * XCursesProgramName = "test";
10340 #include <${cf_cv_ncurses_header-curses.h}>
10341 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
10342 #include <ncursesw/term.h>
10343 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
10344 #include <ncurses/term.h>
10345 #elif defined(HAVE_TERM_H)
10350 extern char boolnames;
10354 void *foo = &(boolnames);
10355 ${cf_cv_main_return-return}(foo == 0);
10360 if { (eval echo configure:10361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10364 echo "configure: failed program was:" >&5
10365 cat conftest.$ac_ext >&5
10370 echo "$ac_t""$cf_result" 1>&6
10371 if test $cf_result = yes ; then
10373 cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10375 cat >> confdefs.h <<EOF
10376 #define $cf_result 1
10383 echo $ac_n "checking for data boolfnames declaration in ${cf_cv_ncurses_header-curses.h}""... $ac_c" 1>&6
10384 echo "configure:10385: checking for data boolfnames declaration in ${cf_cv_ncurses_header-curses.h}" >&5
10385 cat > conftest.$ac_ext <<EOF
10386 #line 10387 "configure"
10387 #include "confdefs.h"
10389 #ifdef HAVE_XCURSES
10390 #include <xcurses.h>
10391 char * XCursesProgramName = "test";
10393 #include <${cf_cv_ncurses_header-curses.h}>
10394 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
10395 #include <ncursesw/term.h>
10396 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
10397 #include <ncurses/term.h>
10398 #elif defined(HAVE_TERM_H)
10405 void *foo = &(boolfnames)
10409 if { (eval echo configure:10410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10413 echo "configure: failed program was:" >&5
10414 cat conftest.$ac_ext >&5
10419 echo "$ac_t""$cf_result" 1>&6
10420 if test $cf_result = yes ; then
10422 cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10424 cat >> confdefs.h <<EOF
10425 #define $cf_result 1
10429 echo $ac_n "checking for data boolfnames in library""... $ac_c" 1>&6
10430 echo "configure:10431: checking for data boolfnames in library" >&5
10431 cat > conftest.$ac_ext <<EOF
10432 #line 10433 "configure"
10433 #include "confdefs.h"
10435 #ifdef HAVE_XCURSES
10436 #include <xcurses.h>
10437 char * XCursesProgramName = "test";
10439 #include <${cf_cv_ncurses_header-curses.h}>
10440 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
10441 #include <ncursesw/term.h>
10442 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
10443 #include <ncurses/term.h>
10444 #elif defined(HAVE_TERM_H)
10449 extern char boolfnames;
10453 void *foo = &(boolfnames);
10454 ${cf_cv_main_return-return}(foo == 0);
10459 if { (eval echo configure:10460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10463 echo "configure: failed program was:" >&5
10464 cat conftest.$ac_ext >&5
10469 echo "$ac_t""$cf_result" 1>&6
10470 if test $cf_result = yes ; then
10472 cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10474 cat >> confdefs.h <<EOF
10475 #define $cf_result 1
10487 cat > confcache <<\EOF
10488 # This file is a shell script that caches the results of configure
10489 # tests run on this system so they can be shared between configure
10490 # scripts and configure runs. It is not useful on other systems.
10491 # If it contains results you don't want to keep, you may remove or edit it.
10493 # By default, configure uses ./config.cache as the cache file,
10494 # creating it if it does not exist already. You can give configure
10495 # the --cache-file=FILE option to use a different cache file; that is
10496 # what configure does when it calls configure scripts in
10497 # subdirectories, so they share the cache.
10498 # Giving --cache-file=/dev/null disables caching, for debugging configure.
10499 # config.status only pays attention to the cache file if you give it the
10500 # --recheck option to rerun configure.
10503 # The following way of writing the cache mishandles newlines in values,
10504 # but we know of no workaround that is simple, portable, and efficient.
10505 # So, don't put newlines in cache variables' values.
10506 # Ultrix sh set writes to stderr and can't be redirected directly,
10507 # and sets the high bit in the cache file unless we assign to the vars.
10509 case `(ac_space=' '; set | grep ac_space) 2>&1` in
10511 # `set' does not quote correctly, so add quotes (double-quote substitution
10512 # turns \\\\ into \\, and sed turns \\ into \).
10514 -e "s/'/'\\\\''/g" \
10515 -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
10518 # `set' quotes correctly as required by POSIX, so do not add quotes.
10519 sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
10522 if cmp -s $cache_file confcache; then
10525 if test -w $cache_file; then
10526 echo "updating cache $cache_file"
10527 cat confcache > $cache_file
10529 echo "not updating unwritable cache $cache_file"
10534 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
10536 test "x$prefix" = xNONE && prefix=$ac_default_prefix
10537 # Let make expand exec_prefix.
10538 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10540 # Any assignment to VPATH causes Sun make to only execute
10541 # the first set of double-colon rules, so remove it if not needed.
10542 # If there is a colon in the path, we need to keep it.
10543 if test "x$srcdir" = x.; then
10544 ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
10547 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
10549 DEFS=-DHAVE_CONFIG_H
10551 # Without the "./", some shells look in PATH for config.status.
10552 : ${CONFIG_STATUS=./config.status}
10554 echo creating $CONFIG_STATUS
10555 rm -f $CONFIG_STATUS
10556 cat > $CONFIG_STATUS <<EOF
10558 # Generated automatically by configure.
10559 # Run this file to recreate the current configuration.
10560 # This directory was configured as follows,
10561 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
10563 # $0 $ac_configure_args
10565 # Compiler output produced by configure, useful for debugging
10566 # configure, is in ./config.log if it exists.
10568 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
10571 case "\$ac_option" in
10572 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
10573 echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
10574 exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
10575 -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
10576 echo "$CONFIG_STATUS generated by autoconf version 2.13.20030927"
10578 -help | --help | --hel | --he | --h)
10579 echo "\$ac_cs_usage"; exit 0 ;;
10580 *) echo "\$ac_cs_usage"; exit 1 ;;
10584 ac_given_srcdir=$srcdir
10586 trap 'rm -fr `echo "Makefile ncurses_cfg.h:ncurses_tst.hin" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
10588 cat >> $CONFIG_STATUS <<EOF
10590 # Protect against being on the right side of a sed subst in config.status.
10591 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
10592 s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
10596 s%@CFLAGS@%$CFLAGS%g
10597 s%@CPPFLAGS@%$CPPFLAGS%g
10598 s%@CXXFLAGS@%$CXXFLAGS%g
10599 s%@FFLAGS@%$FFLAGS%g
10601 s%@LDFLAGS@%$LDFLAGS%g
10603 s%@exec_prefix@%$exec_prefix%g
10604 s%@prefix@%$prefix%g
10605 s%@program_transform_name@%$program_transform_name%g
10606 s%@bindir@%$bindir%g
10607 s%@sbindir@%$sbindir%g
10608 s%@libexecdir@%$libexecdir%g
10609 s%@datadir@%$datadir%g
10610 s%@sysconfdir@%$sysconfdir%g
10611 s%@sharedstatedir@%$sharedstatedir%g
10612 s%@localstatedir@%$localstatedir%g
10613 s%@libdir@%$libdir%g
10614 s%@includedir@%$includedir%g
10615 s%@oldincludedir@%$oldincludedir%g
10616 s%@infodir@%$infodir%g
10617 s%@mandir@%$mandir%g
10619 s%@host_alias@%$host_alias%g
10620 s%@host_cpu@%$host_cpu%g
10621 s%@host_vendor@%$host_vendor%g
10622 s%@host_os@%$host_os%g
10623 s%@SET_MAKE@%$SET_MAKE%g
10629 s%@MAKE_LOWER_TAGS@%$MAKE_LOWER_TAGS%g
10630 s%@MAKE_UPPER_TAGS@%$MAKE_UPPER_TAGS%g
10631 s%@CC_G_OPT@%$CC_G_OPT%g
10632 s%@CC_SHARED_OPTS@%$CC_SHARED_OPTS%g
10633 s%@DFT_DEP_SUFFIX@%$DFT_DEP_SUFFIX%g
10634 s%@DFT_OBJ_SUBDIR@%$DFT_OBJ_SUBDIR%g
10635 s%@DFT_UPR_MODEL@%$DFT_UPR_MODEL%g
10637 s%@LDFLAGS_SHARED@%$LDFLAGS_SHARED%g
10638 s%@LDFLAGS_STATIC@%$LDFLAGS_STATIC%g
10639 s%@LD_MODEL@%$LD_MODEL%g
10640 s%@LD_SHARED_OPTS@%$LD_SHARED_OPTS%g
10641 s%@LIBTOOL@%$LIBTOOL%g
10642 s%@LIB_CLEAN@%$LIB_CLEAN%g
10643 s%@LIB_COMPILE@%$LIB_COMPILE%g
10644 s%@LIB_LINK@%$LIB_LINK%g
10645 s%@LINK_TESTS@%$LINK_TESTS%g
10647 s%@LINT_OPTS@%$LINT_OPTS%g
10648 s%@LOCAL_LDFLAGS@%$LOCAL_LDFLAGS%g
10649 s%@MATH_LIB@%$MATH_LIB%g
10650 s%@PTHREAD@%$PTHREAD%g
10651 s%@TEST_ARGS@%$TEST_ARGS%g
10652 s%@TEST_DEPS@%$TEST_DEPS%g
10653 s%@TEST_LIBS@%$TEST_LIBS%g
10654 s%@TINFO_ARGS@%$TINFO_ARGS%g
10655 s%@cf_cv_abi_version@%$cf_cv_abi_version%g
10656 s%@cf_cv_rel_version@%$cf_cv_rel_version%g
10657 s%@EXEEXT@%$EXEEXT%g
10658 s%@OBJEXT@%$OBJEXT%g
10659 s%@EXTRA_CPPFLAGS@%$EXTRA_CPPFLAGS%g
10660 s%@ECHO_LT@%$ECHO_LT%g
10661 s%@ECHO_LD@%$ECHO_LD%g
10662 s%@RULE_CC@%$RULE_CC%g
10663 s%@SHOW_CC@%$SHOW_CC%g
10664 s%@ECHO_CC@%$ECHO_CC%g
10665 s%@EXTRA_CFLAGS@%$EXTRA_CFLAGS%g
10666 s%@NCURSES_CONFIG@%$NCURSES_CONFIG%g
10667 s%@PKG_CONFIG@%$PKG_CONFIG%g
10668 s%@X_CFLAGS@%$X_CFLAGS%g
10669 s%@X_PRE_LIBS@%$X_PRE_LIBS%g
10670 s%@X_LIBS@%$X_LIBS%g
10671 s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
10672 s%@XCURSES_CONFIG@%$XCURSES_CONFIG%g
10673 s%@NCURSES_WRAP_PREFIX@%$NCURSES_WRAP_PREFIX%g
10678 cat >> $CONFIG_STATUS <<\EOF
10680 # Split the substitutions into bite-sized pieces for seds with
10681 # small command number limits, like on Digital OSF/1 and HP-UX.
10682 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
10683 ac_file=1 # Number of current file.
10684 ac_beg=1 # First line for current file.
10685 ac_end=$ac_max_sed_cmds # Line after last line for current file.
10688 while $ac_more_lines; do
10689 if test $ac_beg -gt 1; then
10690 sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
10692 sed "${ac_end}q" conftest.subs > conftest.s$ac_file
10694 if test ! -s conftest.s$ac_file; then
10695 ac_more_lines=false
10696 rm -f conftest.s$ac_file
10698 if test -z "$ac_sed_cmds"; then
10699 ac_sed_cmds="sed -f conftest.s$ac_file"
10701 ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
10703 ac_file=`expr $ac_file + 1`
10705 ac_end=`expr $ac_end + $ac_max_sed_cmds`
10708 if test -z "$ac_sed_cmds"; then
10713 cat >> $CONFIG_STATUS <<EOF
10715 CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
10717 cat >> $CONFIG_STATUS <<\EOF
10718 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
10719 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10721 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10722 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10723 *) ac_file_in="${ac_file}.in" ;;
10726 # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
10728 # Remove last slash and all that follows it. Not all systems have dirname.
10729 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10730 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10731 # The file is in a subdirectory.
10732 test ! -d "$ac_dir" && mkdir "$ac_dir"
10733 ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
10734 # A "../" for each directory in $ac_dir_suffix.
10735 ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
10737 ac_dir_suffix= ac_dots=
10740 case "$ac_given_srcdir" in
10742 if test -z "$ac_dots"; then top_srcdir=.
10743 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
10744 /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
10745 *) # Relative path.
10746 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
10747 top_srcdir="$ac_dots$ac_given_srcdir" ;;
10751 echo creating "$ac_file"
10753 configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
10755 *Makefile*) ac_comsub="1i\\
10756 # $configure_input" ;;
10760 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10762 s%@configure_input@%$configure_input%g
10763 s%@srcdir@%$srcdir%g
10764 s%@top_srcdir@%$top_srcdir%g
10765 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
10769 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
10770 # NAME is the cpp macro being defined and VALUE is the value it is being given.
10772 # ac_d sets the value in "#define NAME VALUE" lines.
10773 ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
10774 ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
10777 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
10778 ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10779 ac_uB='\([ ]\)%\1#\2define\3'
10782 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
10783 ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
10784 ac_eB='$%\1#\2define\3'
10788 if test "${CONFIG_HEADERS+set}" != set; then
10790 cat >> $CONFIG_STATUS <<EOF
10791 CONFIG_HEADERS="ncurses_cfg.h:ncurses_tst.hin"
10793 cat >> $CONFIG_STATUS <<\EOF
10795 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
10796 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
10798 *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
10799 ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
10800 *) ac_file_in="${ac_file}.in" ;;
10803 echo creating $ac_file
10805 rm -f conftest.frag conftest.in conftest.out
10806 ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
10807 cat $ac_file_inputs > conftest.in
10812 # Transform confdefs.h into a list of #define's. We won't use it as a sed
10813 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
10814 # be either 'cat' or 'sort'.
10815 cat confdefs.h >conftest.vals
10817 # Break up conftest.vals because some shells have a limit on
10818 # the size of here documents, and old seds have small limits too.
10820 rm -f conftest.tail
10821 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
10824 ac_lines=`grep -c . conftest.vals`
10825 # grep -c gives empty output for an empty file on some AIX systems.
10826 if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
10827 # Write chunks of a limited-size here document to conftest.frag.
10828 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
10829 sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
10830 echo 'CEOF' >> $CONFIG_STATUS
10831 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
10832 rm -f conftest.vals
10833 mv conftest.tail conftest.vals
10835 rm -f conftest.vals
10837 # Run sed to substitute the contents of conftest.frag into conftest.in at the
10839 echo ' cat >> conftest.edit <<CEOF
10840 /@DEFS@/r conftest.frag
10843 sed -f conftest.edit conftest.in > conftest.out
10845 mv conftest.out conftest.in
10846 rm -f conftest.edit conftest.frag
10847 ' >> $CONFIG_STATUS
10850 cat >> $CONFIG_STATUS <<\EOF
10851 rm -f conftest.frag conftest.h
10852 echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
10853 cat conftest.in >> conftest.h
10855 if cmp -s $ac_file conftest.h 2>/dev/null; then
10856 echo "$ac_file is unchanged"
10859 # Remove last slash and all that follows it. Not all systems have dirname.
10860 ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
10861 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
10862 # The file is in a subdirectory.
10863 test ! -d "$ac_dir" && mkdir "$ac_dir"
10866 mv conftest.h $ac_file
10871 cat >> $CONFIG_STATUS <<EOF
10872 # Extra initialization commands, if any
10878 cat >> $CONFIG_STATUS <<\EOF
10879 # Extra commands, if any
10884 if test ! -d $srcdir/$cf_dir; then
10886 elif test -f $srcdir/$cf_dir/programs; then
10887 $AWK -f $srcdir/mk-test.awk ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
10892 cat >>Makefile <<TEST_EOF
10894 # These rules are generated so we do not rely on suffix rules, which do not
10895 # work consistently for different make-programs (the '\$(MODEL)/' confuses
10896 # some, and the '\$x' confuses others).
10898 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
10901 cat >>Makefile <<TEST_EOF
10903 \$(MODEL)/$N.o : $N.c \\
10906 @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) $N.c
10912 chmod +x $CONFIG_STATUS
10913 rm -fr confdefs* $ac_clean_files
10914 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1