2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20230114.
5 # Copyright 2003-2022,2023 Thomas E. Dickey
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35 if expr a : '\(a\)' >/dev/null 2>&1; then
41 rm -f conf$$ conf$$.exe conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44 # We could just check for DJGPP; but this test a) works b) is more generic
45 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46 if test -f conf$$.exe; then
47 # Don't use ln at all; we don't have any links
52 elif ln conf$$.file conf$$ 2>/dev/null; then
57 rm -f conf$$ conf$$.exe conf$$.file
59 as_executable_p="test -f"
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
79 # We need space, tab and new line, in precisely that order.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
97 ac_default_prefix=/usr/local
102 SHELL=${CONFIG_SHELL-/bin/sh}
104 # Maximum number of lines to put in a shell here document.
105 # This variable seems obsolete. It should probably be removed, and
106 # only ac_max_sed_lines should be used.
107 : "${ac_max_here_lines=38}"
109 ac_unique_file="ncurses.c"
110 # Factoring default headers for most tests.
111 ac_includes_default="\
114 # include <sys/types.h>
117 # include <sys/stat.h>
128 # if !STDC_HEADERS && HAVE_MEMORY_H
134 # include <strings.h>
137 # include <inttypes.h>
147 # Initialize some variables set by options.
149 ac_init_version=false
150 # The variables have the same names as the options, with
151 # dashes changed to underlines.
159 program_transform_name=s,x,x,
167 # Installation directory options.
168 # These are left unexpanded so users can "make install exec_prefix=/foo"
169 # and all the variables that are supposed to be based on exec_prefix
170 # by default will actually change.
171 # Use braces instead of parens because sh, perl, etc. also accept them.
172 bindir='${exec_prefix}/bin'
173 sbindir='${exec_prefix}/sbin'
174 libexecdir='${exec_prefix}/libexec'
175 datarootdir='${prefix}/share'
176 datadir='${datarootdir}'
177 sysconfdir='${prefix}/etc'
178 sharedstatedir='${prefix}/com'
179 localstatedir='${prefix}/var'
180 runstatedir='${localstatedir}/run'
181 libdir='${exec_prefix}/lib'
182 includedir='${prefix}/include'
183 oldincludedir='/usr/include'
184 infodir='${datarootdir}/info'
185 mandir='${datarootdir}/man'
187 # Identity of this package.
197 # If the previous option needs an argument, assign it.
198 if test -n "$ac_prev"; then
199 eval "$ac_prev=\$ac_option"
204 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
206 # Accept the important Cygnus configure options, so we can diagnose typos.
210 -bindir | --bindir | --bindi | --bind | --bin | --bi)
212 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
215 -build | --build | --buil | --bui | --bu)
216 ac_prev=build_alias ;;
217 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
218 build_alias=$ac_optarg ;;
220 -cache-file | --cache-file | --cache-fil | --cache-fi \
221 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
222 ac_prev=cache_file ;;
223 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
224 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
225 cache_file=$ac_optarg ;;
228 cache_file=config.cache ;;
230 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
232 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
234 datadir=$ac_optarg ;;
236 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
237 | --dataroo | --dataro | --datar)
238 ac_prev=datarootdir ;;
239 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
240 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
241 datarootdir=$ac_optarg ;;
243 -disable-* | --disable-*)
244 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
245 # Reject names that are not valid shell variable names.
246 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
247 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
248 { (exit 1); exit 1; }; }
249 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
250 eval "enable_$ac_feature=no" ;;
252 -enable-* | --enable-*)
253 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
254 # Reject names that are not valid shell variable names.
255 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
256 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
257 { (exit 1); exit 1; }; }
258 ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
260 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
263 eval "enable_$ac_feature='$ac_optarg'" ;;
265 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
266 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
267 | --exec | --exe | --ex)
268 ac_prev=exec_prefix ;;
269 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
270 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
271 | --exec=* | --exe=* | --ex=*)
272 exec_prefix=$ac_optarg ;;
274 -gas | --gas | --ga | --g)
275 # Obsolete; use --with-gas.
278 -help | --help | --hel | --he | -h)
280 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
281 ac_init_help=recursive ;;
282 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
283 ac_init_help=short ;;
285 -host | --host | --hos | --ho)
286 ac_prev=host_alias ;;
287 -host=* | --host=* | --hos=* | --ho=*)
288 host_alias=$ac_optarg ;;
290 -includedir | --includedir | --includedi | --included | --include \
291 | --includ | --inclu | --incl | --inc)
292 ac_prev=includedir ;;
293 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
294 | --includ=* | --inclu=* | --incl=* | --inc=*)
295 includedir=$ac_optarg ;;
297 -infodir | --infodir | --infodi | --infod | --info | --inf)
299 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
300 infodir=$ac_optarg ;;
302 -libdir | --libdir | --libdi | --libd)
304 -libdir=* | --libdir=* | --libdi=* | --libd=*)
307 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
308 | --libexe | --libex | --libe)
309 ac_prev=libexecdir ;;
310 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
311 | --libexe=* | --libex=* | --libe=*)
312 libexecdir=$ac_optarg ;;
314 -localstatedir | --localstatedir | --localstatedi | --localstated \
315 | --localstate | --localstat | --localsta | --localst \
316 | --locals | --local | --loca | --loc | --lo)
317 ac_prev=localstatedir ;;
318 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
319 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
320 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
321 localstatedir=$ac_optarg ;;
323 -runstatedir | --runstatedir | --runstatedi | --runstated \
324 | --runstate | --runstat | --runsta | --runst \
325 | --runs | --run | --ru)
326 ac_prev=runstatedir ;;
327 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
328 | --runstate=* | --runstat=* | --runsta=* | --runst=* \
329 | --runs=* | --run=* | --ru=*)
330 runstatedir=$ac_optarg ;;
332 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
334 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
338 # Obsolete; use --without-fp.
341 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
345 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
346 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
349 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
350 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
351 | --oldin | --oldi | --old | --ol | --o)
352 ac_prev=oldincludedir ;;
353 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
354 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
355 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
356 oldincludedir=$ac_optarg ;;
358 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
360 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
363 -program-prefix | --program-prefix | --program-prefi | --program-pref \
364 | --program-pre | --program-pr | --program-p)
365 ac_prev=program_prefix ;;
366 -program-prefix=* | --program-prefix=* | --program-prefi=* \
367 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
368 program_prefix=$ac_optarg ;;
370 -program-suffix | --program-suffix | --program-suffi | --program-suff \
371 | --program-suf | --program-su | --program-s)
372 ac_prev=program_suffix ;;
373 -program-suffix=* | --program-suffix=* | --program-suffi=* \
374 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
375 program_suffix=$ac_optarg ;;
377 -program-transform-name | --program-transform-name \
378 | --program-transform-nam | --program-transform-na \
379 | --program-transform-n | --program-transform- \
380 | --program-transform | --program-transfor \
381 | --program-transfo | --program-transf \
382 | --program-trans | --program-tran \
383 | --progr-tra | --program-tr | --program-t)
384 ac_prev=program_transform_name ;;
385 -program-transform-name=* | --program-transform-name=* \
386 | --program-transform-nam=* | --program-transform-na=* \
387 | --program-transform-n=* | --program-transform-=* \
388 | --program-transform=* | --program-transfor=* \
389 | --program-transfo=* | --program-transf=* \
390 | --program-trans=* | --program-tran=* \
391 | --progr-tra=* | --program-tr=* | --program-t=*)
392 program_transform_name=$ac_optarg ;;
394 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
395 | -silent | --silent | --silen | --sile | --sil)
398 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
400 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
402 sbindir=$ac_optarg ;;
404 -sharedstatedir | --sharedstatedir | --sharedstatedi \
405 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
406 | --sharedst | --shareds | --shared | --share | --shar \
408 ac_prev=sharedstatedir ;;
409 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
410 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
411 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
413 sharedstatedir=$ac_optarg ;;
415 -site | --site | --sit)
417 -site=* | --site=* | --sit=*)
420 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
422 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
425 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
426 | --syscon | --sysco | --sysc | --sys | --sy)
427 ac_prev=sysconfdir ;;
428 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
429 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
430 sysconfdir=$ac_optarg ;;
432 -target | --target | --targe | --targ | --tar | --ta | --t)
433 ac_prev=target_alias ;;
434 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
435 target_alias=$ac_optarg ;;
437 -v | -verbose | --verbose | --verbos | --verbo | --verb)
440 -version | --version | --versio | --versi | --vers | -V)
444 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
445 # Reject names that are not valid shell variable names.
446 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
447 { echo "$as_me: error: invalid package name: $ac_package" >&2
448 { (exit 1); exit 1; }; }
449 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
451 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
454 eval "with_$ac_package='$ac_optarg'" ;;
456 -without-* | --without-*)
457 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
458 # Reject names that are not valid shell variable names.
459 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
460 { echo "$as_me: error: invalid package name: $ac_package" >&2
461 { (exit 1); exit 1; }; }
462 ac_package=`echo "$ac_package" | sed 's/-/_/g'`
463 eval "with_$ac_package=no" ;;
466 # Obsolete; use --with-x.
469 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
470 | --x-incl | --x-inc | --x-in | --x-i)
471 ac_prev=x_includes ;;
472 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
473 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
474 x_includes=$ac_optarg ;;
476 -x-libraries | --x-libraries | --x-librarie | --x-librari \
477 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
478 ac_prev=x_libraries ;;
479 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
480 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
481 x_libraries=$ac_optarg ;;
483 -*) { echo "$as_me: error: unrecognized option: $ac_option
484 Try \`$0 --help' for more information." >&2
485 { (exit 1); exit 1; }; }
489 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
490 # Reject names that are not valid shell variable names.
491 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
492 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
493 { (exit 1); exit 1; }; }
494 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
495 eval "$ac_envvar='$ac_optarg'"
496 export "$ac_envvar" ;;
499 # FIXME: should be removed in autoconf 3.0.
500 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
501 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
502 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
503 : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
509 if test -n "$ac_prev"; then
510 ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
511 { echo "$as_me: error: missing argument to $ac_option" >&2
512 { (exit 1); exit 1; }; }
515 # Be sure to have absolute paths.
516 for ac_var in exec_prefix prefix
518 eval ac_val=$`echo "$ac_var"`
520 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
521 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
522 { (exit 1); exit 1; }; };;
526 # Be sure to have absolute paths.
527 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
528 localstatedir libdir includedir oldincludedir infodir mandir
530 eval ac_val=$`echo "$ac_var"`
532 [\\/$]* | ?:[\\/]* ) ;;
533 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
534 { (exit 1); exit 1; }; };;
538 # There might be people who depend on the old broken behavior: `$host'
539 # used to hold the argument of --host etc.
544 # FIXME: should be removed in autoconf 3.0.
545 if test "x$host_alias" != x; then
546 if test "x$build_alias" = x; then
547 cross_compiling=maybe
548 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
549 If a cross compiler is detected then cross compile mode will be used." >&2
550 elif test "x$build_alias" != "x$host_alias"; then
556 test -n "$host_alias" && ac_tool_prefix=$host_alias-
558 test "$silent" = yes && exec 6>/dev/null
560 # Find the source files, if location was not specified.
561 if test -z "$srcdir"; then
562 ac_srcdir_defaulted=yes
563 # Try the directory containing this script, then its parent.
565 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
566 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
568 if test ! -r "$srcdir/$ac_unique_file"; then
572 ac_srcdir_defaulted=no
574 if test ! -r "$srcdir/$ac_unique_file"; then
575 if test "$ac_srcdir_defaulted" = yes; then
576 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
577 { (exit 1); exit 1; }; }
579 { echo "$as_me: error: cannot find sources in $srcdir" >&2
580 { (exit 1); exit 1; }; }
583 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
584 ac_env_build_alias_set=${build_alias+set}
585 ac_env_build_alias_value=$build_alias
586 ac_cv_env_build_alias_set=${build_alias+set}
587 ac_cv_env_build_alias_value=$build_alias
588 ac_env_host_alias_set=${host_alias+set}
589 ac_env_host_alias_value=$host_alias
590 ac_cv_env_host_alias_set=${host_alias+set}
591 ac_cv_env_host_alias_value=$host_alias
592 ac_env_target_alias_set=${target_alias+set}
593 ac_env_target_alias_value=$target_alias
594 ac_cv_env_target_alias_set=${target_alias+set}
595 ac_cv_env_target_alias_value=$target_alias
596 ac_env_CC_set=${CC+set}
598 ac_cv_env_CC_set=${CC+set}
599 ac_cv_env_CC_value=$CC
600 ac_env_CFLAGS_set=${CFLAGS+set}
601 ac_env_CFLAGS_value=$CFLAGS
602 ac_cv_env_CFLAGS_set=${CFLAGS+set}
603 ac_cv_env_CFLAGS_value=$CFLAGS
604 ac_env_LDFLAGS_set=${LDFLAGS+set}
605 ac_env_LDFLAGS_value=$LDFLAGS
606 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
607 ac_cv_env_LDFLAGS_value=$LDFLAGS
608 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
609 ac_env_CPPFLAGS_value=$CPPFLAGS
610 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
611 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
612 ac_env_CPP_set=${CPP+set}
613 ac_env_CPP_value=$CPP
614 ac_cv_env_CPP_set=${CPP+set}
615 ac_cv_env_CPP_value=$CPP
618 # Report the --help message.
620 if test "$ac_init_help" = "long"; then
621 # Omit some internal or obsolete options to make the list less imposing.
622 # This message is too long to be a string in the A/UX 3.1 sh.
624 \`configure' configures this package to adapt to many kinds of systems.
626 Usage: $0 [OPTION]... [VAR=VALUE]...
628 To assign environment variables (e.g., CC, CFLAGS...), specify them as
629 VAR=VALUE. See below for descriptions of some of the useful variables.
631 Defaults for the options are specified in brackets.
634 -h, --help display this help and exit
635 --help=short display options specific to this package
636 --help=recursive display the short help of all the included packages
637 -V, --version display version information and exit
638 -q, --quiet, --silent do not print \`checking...' messages
639 --cache-file=FILE cache test results in FILE [disabled]
640 -C, --config-cache alias for \`--cache-file=config.cache'
641 -n, --no-create do not create output files
642 --srcdir=DIR find the sources in DIR [configure dir or \`..']
647 Installation directories:
648 --prefix=PREFIX install architecture-independent files in PREFIX
650 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
653 By default, \`make install' will install all the files in
654 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
655 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
656 for instance \`--prefix=\$HOME'.
658 For better control, use the options below.
660 Fine tuning of the installation directories:
661 --bindir=DIR user executables [EPREFIX/bin]
662 --sbindir=DIR system admin executables [EPREFIX/sbin]
663 --libexecdir=DIR program executables [EPREFIX/libexec]
664 --datarootdir=DIR read-only architecture-independent data [PREFIX/share]
665 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
666 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
667 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
668 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
669 --runstatedir=DIR extra definition of runtime data [LOCALSTATEDIR/run]
670 --libdir=DIR object code libraries [EPREFIX/lib]
671 --includedir=DIR C header files [PREFIX/include]
672 --oldincludedir=DIR C header files for non-gcc [/usr/include]
673 --infodir=DIR info documentation [DATAROOTDIR/info]
674 --mandir=DIR man documentation [DATAROOTDIR/man]
680 --program-prefix=PREFIX prepend PREFIX to installed program names
681 --program-suffix=SUFFIX append SUFFIX to installed program names
682 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
685 --x-includes=DIR X include files are in DIR
686 --x-libraries=DIR X library files are in DIR
689 --build=BUILD configure for building on BUILD [guessed]
690 --host=HOST build programs to run on HOST [BUILD]
694 if test -n "$ac_init_help"; then
699 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
700 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
703 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
704 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
707 --disable-stripping do not strip (debug info) installed executables
708 --enable-stdnoreturn enable C11 _Noreturn feature for diagnostics
709 --enable-string-hacks work around bogus compiler/loader warnings
710 --with-pkg-config{=path} enable/disable use of pkg-config
711 --disable-echo do not display "compiling" commands
712 Curses Version-dependent Options:
713 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
714 --disable-widec disable checks for wide-character functions
715 --with-curses-dir=DIR directory in which (n)curses is installed
716 --with-screen=XXX use specified curses-libraries
717 --with-ncursesw use wide ncurses-libraries
718 --with-ncurses use ncurses-libraries
719 --with-pdcurses compile/link with pdcurses X11 library
720 --with-curses-colr compile/link with HPUX 10.x color-curses
721 --with-curses-5lib compile/link with SunOS 5lib curses
722 --with-Xaw3d link with Xaw 3d library
723 --with-Xaw3dxft link with Xaw 3d xft library
724 --with-neXtaw link with neXT Athena library
725 --with-XawPlus link with Athena-Plus library
726 --with-x use the X Window System
727 --with-x11-rgb=FILE file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
728 --with-form-libname=XXX override form basename of library
729 --with-menu-libname=XXX override menu basename of library
730 --with-panel-libname=XXX override panel basename of library
731 --disable-panel disable checks for panel functions
732 --disable-menu disable checks for menu functions
733 --disable-form disable checks for form functions
734 Testing/development Options:
735 --enable-warnings test: turn on gcc compiler warnings
736 --with-dmalloc test: use Gray Watson's dmalloc library
737 --with-dbmalloc test: use Conor Cahill's dbmalloc library
738 --with-valgrind test: use valgrind
739 --disable-leaks test: free permanent memory, analyze leaks
740 --disable-rpath-hack don't add rpath options for additional libraries
742 Some influential environment variables:
743 CC C compiler command
744 CFLAGS C compiler flags
745 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
746 nonstandard directory <lib dir>
747 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
748 headers in a nonstandard directory <include dir>
751 Use these variables to override the choices made by `configure' or to help
752 it to find libraries and programs with nonstandard names/locations.
757 if test "$ac_init_help" = "recursive"; then
758 # If there are subdirs, report their specific --help.
760 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
762 # A "../" for each directory in /$ac_subdir.
763 ac_dots=`echo "$ac_subdir" |
764 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
767 .) # No --srcdir option. We are building in place.
768 ac_sub_srcdir="$srcdir" ;;
769 [\\/]* | ?:[\\/]* ) # Absolute path.
770 ac_sub_srcdir="$srcdir/$ac_subdir" ;;
772 ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
775 # Check for guested configure; otherwise get Cygnus style configure.
776 if test -f "$ac_sub_srcdir/configure.gnu"; then
778 $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
779 elif test -f "$ac_sub_srcdir/configure"; then
781 $SHELL "$ac_sub_srcdir/configure" --help=recursive
782 elif test -f "$ac_sub_srcdir/configure.ac" ||
783 test -f "$ac_sub_srcdir/configure.in"; then
785 "$ac_configure" --help
787 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
793 test -n "$ac_init_help" && exit 0
794 if "$ac_init_version"; then
797 Copyright 2003-2022,2023 Thomas E. Dickey
798 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
799 Free Software Foundation, Inc.
800 This configure script is free software; the Free Software Foundation
801 gives unlimited permission to copy, distribute and modify it.
807 This file contains any messages produced by compilers while
808 running configure, to aid debugging if configure makes a mistake.
810 It was created by $as_me, which was
811 generated by GNU Autoconf 2.52.20230114. Invocation command line was
822 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
823 uname -m = `(uname -m) 2>/dev/null || echo unknown`
824 uname -r = `(uname -r) 2>/dev/null || echo unknown`
825 uname -s = `(uname -s) 2>/dev/null || echo unknown`
826 uname -v = `(uname -v) 2>/dev/null || echo unknown`
828 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
829 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
831 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
832 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
833 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
834 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
835 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
836 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
837 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
851 # Keep a trace of the command line.
852 # Strip out --no-create and --no-recursion so they do not pile up.
853 # Also quote any args containing shell meta-characters.
859 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
860 | --no-cr | --no-c) ;;
861 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
862 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
863 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
864 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
865 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
867 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
870 # Get rid of the leading space.
873 # When interrupted or exit'd, cleanup temporary files, and complete
874 # config.log. We remove comments because anyway the quotes in there
875 # would cause problems or look ugly.
877 # Save into config.log some information that might help in debugging.
879 echo "## ----------------- ##" >&5
880 echo "## Cache variables. ##" >&5
881 echo "## ----------------- ##" >&5
883 # The following way of writing the cache mishandles newlines in values,
886 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
889 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
890 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
894 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
898 sed "/^$/d" confdefs.h >conftest.log
899 if test -s conftest.log; then
901 echo "## ------------ ##" >&5
902 echo "## confdefs.h. ##" >&5
903 echo "## ------------ ##" >&5
908 test "$ac_signal" != 0 &&
909 echo "$as_me: caught signal $ac_signal" >&5
910 echo "$as_me: exit $exit_status" >&5
911 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
914 for ac_signal in 1 2 13 15; do
915 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
919 # confdefs.h avoids OS command line length limits that DEFS can exceed.
920 rm -rf conftest* confdefs.h
921 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
924 # Let the site file select an alternate cache file if it wants to.
925 # Prefer explicitly selected file to automatically selected ones.
926 if test -z "$CONFIG_SITE"; then
927 if test "x$prefix" != xNONE; then
928 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
930 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
933 for ac_site_file in $CONFIG_SITE; do
934 if test -r "$ac_site_file"; then
935 { echo "$as_me:935: loading site script $ac_site_file" >&5
936 echo "$as_me: loading site script $ac_site_file" >&6;}
937 cat "$ac_site_file" >&5
942 if test -r "$cache_file"; then
943 # Some versions of bash will fail to source /dev/null (special
944 # files actually), so we avoid doing that.
945 if test -f "$cache_file"; then
946 { echo "$as_me:946: loading cache $cache_file" >&5
947 echo "$as_me: loading cache $cache_file" >&6;}
949 [\\/]* | ?:[\\/]* ) . $cache_file;;
954 { echo "$as_me:954: creating cache $cache_file" >&5
955 echo "$as_me: creating cache $cache_file" >&6;}
959 # Check that the precious variables saved in the cache have kept the same
961 ac_cache_corrupted=false
962 for ac_var in `(set) 2>&1 |
963 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
964 eval ac_old_set=\$ac_cv_env_${ac_var}_set
965 eval ac_new_set=\$ac_env_${ac_var}_set
966 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
967 eval ac_new_val="\$ac_env_${ac_var}_value"
968 case "$ac_old_set,$ac_new_set" in
970 { echo "$as_me:970: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
971 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
972 ac_cache_corrupted=: ;;
974 { echo "$as_me:974: error: \`$ac_var' was not set in the previous run" >&5
975 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
976 ac_cache_corrupted=: ;;
979 if test "x$ac_old_val" != "x$ac_new_val"; then
980 { echo "$as_me:980: error: \`$ac_var' has changed since the previous run:" >&5
981 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
982 { echo "$as_me:982: former value: $ac_old_val" >&5
983 echo "$as_me: former value: $ac_old_val" >&2;}
984 { echo "$as_me:984: current value: $ac_new_val" >&5
985 echo "$as_me: current value: $ac_new_val" >&2;}
989 # Pass precious variables to config.status. It doesn't matter if
990 # we pass some twice (in addition to the command line arguments).
991 if test "$ac_new_set" = set; then
992 case "$ac_new_val" in
993 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
994 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
995 ac_configure_args="$ac_configure_args '$ac_arg'"
997 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1002 if "$ac_cache_corrupted"; then
1003 { echo "$as_me:1003: error: changes in the environment can compromise the build" >&5
1004 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1005 { { echo "$as_me:1005: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1006 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1007 { (exit 1); exit 1; }; }
1011 ac_cpp='$CPP $CPPFLAGS'
1012 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1013 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1014 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1015 ac_main_return="return"
1017 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1019 ECHO_C= # newlines do not sed ;-) only broken shells would use this case anyway
1031 echo "#! $SHELL" >conftest.sh
1032 echo "exit 0" >>conftest.sh
1033 chmod +x conftest.sh
1034 if { (echo "$as_me:1034: PATH=\".;.\"; conftest.sh") >&5
1035 (PATH=".;."; conftest.sh) 2>&5
1037 echo "$as_me:1037: \$? = $ac_status" >&5
1038 (exit "$ac_status"); }; then
1039 ac_path_separator=';'
1043 PATH_SEPARATOR="$ac_path_separator"
1046 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
1048 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
1050 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
1053 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1054 if test -f "$ac_dir/install-sh"; then
1056 ac_install_sh="$ac_aux_dir/install-sh -c"
1058 elif test -f "$ac_dir/install.sh"; then
1060 ac_install_sh="$ac_aux_dir/install.sh -c"
1062 elif test -f "$ac_dir/shtool"; then
1064 ac_install_sh="$ac_aux_dir/shtool install -c"
1068 if test -z "$ac_aux_dir"; then
1069 { { echo "$as_me:1069: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1070 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1071 { (exit 1); exit 1; }; }
1073 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1074 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1075 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1077 # Make sure we can run config.sub.
1078 $ac_config_sub sun4 >/dev/null 2>&1 ||
1079 { { echo "$as_me:1079: error: cannot run $ac_config_sub" >&5
1080 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1081 { (exit 1); exit 1; }; }
1083 echo "$as_me:1083: checking build system type" >&5
1084 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1085 if test "${ac_cv_build+set}" = set; then
1086 echo $ECHO_N "(cached) $ECHO_C" >&6
1088 ac_cv_build_alias=$build_alias
1089 test -z "$ac_cv_build_alias" &&
1090 ac_cv_build_alias=`$ac_config_guess`
1091 test -z "$ac_cv_build_alias" &&
1092 { { echo "$as_me:1092: error: cannot guess build type; you must specify one" >&5
1093 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1094 { (exit 1); exit 1; }; }
1095 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1096 { { echo "$as_me:1096: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1097 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1098 { (exit 1); exit 1; }; }
1101 echo "$as_me:1101: result: $ac_cv_build" >&5
1102 echo "${ECHO_T}$ac_cv_build" >&6
1104 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1105 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1106 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1108 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1109 echo "$as_me:1109: checking host system type" >&5
1110 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1111 if test "${ac_cv_host+set}" = set; then
1112 echo $ECHO_N "(cached) $ECHO_C" >&6
1114 ac_cv_host_alias=$host_alias
1115 test -z "$ac_cv_host_alias" &&
1116 ac_cv_host_alias=$ac_cv_build_alias
1117 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1118 { { echo "$as_me:1118: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1119 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1120 { (exit 1); exit 1; }; }
1123 echo "$as_me:1123: result: $ac_cv_host" >&5
1124 echo "${ECHO_T}$ac_cv_host" >&6
1126 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1127 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1128 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1130 system_name="$host_os"
1132 system_name="`(uname -s -r) 2>/dev/null`"
1133 if test -z "$system_name" ; then
1134 system_name="`(hostname) 2>/dev/null`"
1137 test -n "$system_name" &&
1138 cat >>confdefs.h <<EOF
1139 #define SYSTEM_NAME "$system_name"
1142 if test "${cf_cv_system_name+set}" = set; then
1143 echo $ECHO_N "(cached) $ECHO_C" >&6
1145 cf_cv_system_name="$system_name"
1148 test -z "$system_name" && system_name="$cf_cv_system_name"
1149 test -n "$cf_cv_system_name" && echo "$as_me:1149: result: Configuring for $cf_cv_system_name" >&5
1150 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1152 if test ".$system_name" != ".$cf_cv_system_name" ; then
1153 echo "$as_me:1153: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1154 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1155 { { echo "$as_me:1155: error: \"Please remove config.cache and try again.\"" >&5
1156 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1157 { (exit 1); exit 1; }; }
1160 test "$program_prefix" != NONE &&
1161 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1162 # Use a double $ so make ignores it.
1163 test "$program_suffix" != NONE &&
1164 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1165 # Double any \ or $. echo might interpret backslashes.
1166 # By default was `s,x,x', remove it if useless.
1167 cat <<\_ACEOF >conftest.sed
1168 s/[\\$]/&&/g;s/;s,x,x,$//
1170 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1173 echo "$as_me:1173: checking whether ${MAKE-make} sets \${MAKE}" >&5
1174 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1175 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1176 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1177 echo $ECHO_N "(cached) $ECHO_C" >&6
1179 cat >conftest.make <<\EOF
1181 @echo 'ac_maketemp="${MAKE}"'
1183 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1184 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1185 if test -n "$ac_maketemp"; then
1186 eval ac_cv_prog_make_${ac_make}_set=yes
1188 eval ac_cv_prog_make_${ac_make}_set=no
1192 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1193 echo "$as_me:1193: result: yes" >&5
1194 echo "${ECHO_T}yes" >&6
1197 echo "$as_me:1197: result: no" >&5
1198 echo "${ECHO_T}no" >&6
1199 SET_MAKE="MAKE=${MAKE-make}"
1203 ac_cpp='$CPP $CPPFLAGS'
1204 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1205 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1206 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1207 ac_main_return="return"
1208 if test -n "$ac_tool_prefix"; then
1209 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1210 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1211 echo "$as_me:1211: checking for $ac_word" >&5
1212 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1213 if test "${ac_cv_prog_CC+set}" = set; then
1214 echo $ECHO_N "(cached) $ECHO_C" >&6
1216 if test -n "$CC"; then
1217 ac_cv_prog_CC="$CC" # Let the user override the test.
1219 ac_save_IFS=$IFS; IFS=$ac_path_separator
1221 for ac_dir in $ac_dummy; do
1223 test -z "$ac_dir" && ac_dir=.
1224 $as_executable_p "$ac_dir/$ac_word" || continue
1225 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1226 echo "$as_me:1226: found $ac_dir/$ac_word" >&5
1233 if test -n "$CC"; then
1234 echo "$as_me:1234: result: $CC" >&5
1235 echo "${ECHO_T}$CC" >&6
1237 echo "$as_me:1237: result: no" >&5
1238 echo "${ECHO_T}no" >&6
1242 if test -z "$ac_cv_prog_CC"; then
1244 # Extract the first word of "gcc", so it can be a program name with args.
1245 set dummy gcc; ac_word=$2
1246 echo "$as_me:1246: checking for $ac_word" >&5
1247 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1248 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1249 echo $ECHO_N "(cached) $ECHO_C" >&6
1251 if test -n "$ac_ct_CC"; then
1252 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1254 ac_save_IFS=$IFS; IFS=$ac_path_separator
1256 for ac_dir in $ac_dummy; do
1258 test -z "$ac_dir" && ac_dir=.
1259 $as_executable_p "$ac_dir/$ac_word" || continue
1260 ac_cv_prog_ac_ct_CC="gcc"
1261 echo "$as_me:1261: found $ac_dir/$ac_word" >&5
1267 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1268 if test -n "$ac_ct_CC"; then
1269 echo "$as_me:1269: result: $ac_ct_CC" >&5
1270 echo "${ECHO_T}$ac_ct_CC" >&6
1272 echo "$as_me:1272: result: no" >&5
1273 echo "${ECHO_T}no" >&6
1281 if test -z "$CC"; then
1282 if test -n "$ac_tool_prefix"; then
1283 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1284 set dummy ${ac_tool_prefix}cc; ac_word=$2
1285 echo "$as_me:1285: checking for $ac_word" >&5
1286 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1287 if test "${ac_cv_prog_CC+set}" = set; then
1288 echo $ECHO_N "(cached) $ECHO_C" >&6
1290 if test -n "$CC"; then
1291 ac_cv_prog_CC="$CC" # Let the user override the test.
1293 ac_save_IFS=$IFS; IFS=$ac_path_separator
1295 for ac_dir in $ac_dummy; do
1297 test -z "$ac_dir" && ac_dir=.
1298 $as_executable_p "$ac_dir/$ac_word" || continue
1299 ac_cv_prog_CC="${ac_tool_prefix}cc"
1300 echo "$as_me:1300: found $ac_dir/$ac_word" >&5
1307 if test -n "$CC"; then
1308 echo "$as_me:1308: result: $CC" >&5
1309 echo "${ECHO_T}$CC" >&6
1311 echo "$as_me:1311: result: no" >&5
1312 echo "${ECHO_T}no" >&6
1316 if test -z "$ac_cv_prog_CC"; then
1318 # Extract the first word of "cc", so it can be a program name with args.
1319 set dummy cc; ac_word=$2
1320 echo "$as_me:1320: checking for $ac_word" >&5
1321 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1322 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1323 echo $ECHO_N "(cached) $ECHO_C" >&6
1325 if test -n "$ac_ct_CC"; then
1326 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1328 ac_save_IFS=$IFS; IFS=$ac_path_separator
1330 for ac_dir in $ac_dummy; do
1332 test -z "$ac_dir" && ac_dir=.
1333 $as_executable_p "$ac_dir/$ac_word" || continue
1334 ac_cv_prog_ac_ct_CC="cc"
1335 echo "$as_me:1335: found $ac_dir/$ac_word" >&5
1341 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1342 if test -n "$ac_ct_CC"; then
1343 echo "$as_me:1343: result: $ac_ct_CC" >&5
1344 echo "${ECHO_T}$ac_ct_CC" >&6
1346 echo "$as_me:1346: result: no" >&5
1347 echo "${ECHO_T}no" >&6
1356 if test -z "$CC"; then
1357 # Extract the first word of "cc", so it can be a program name with args.
1358 set dummy cc; ac_word=$2
1359 echo "$as_me:1359: checking for $ac_word" >&5
1360 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1361 if test "${ac_cv_prog_CC+set}" = set; then
1362 echo $ECHO_N "(cached) $ECHO_C" >&6
1364 if test -n "$CC"; then
1365 ac_cv_prog_CC="$CC" # Let the user override the test.
1368 ac_save_IFS=$IFS; IFS=$ac_path_separator
1370 for ac_dir in $ac_dummy; do
1372 test -z "$ac_dir" && ac_dir=.
1373 $as_executable_p "$ac_dir/$ac_word" || continue
1374 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1375 ac_prog_rejected=yes
1379 echo "$as_me:1379: found $ac_dir/$ac_word" >&5
1383 if test "$ac_prog_rejected" = yes; then
1384 # We found a bogon in the path, so make sure we never use it.
1385 set dummy $ac_cv_prog_CC
1387 if test $# != 0; then
1388 # We chose a different compiler from the bogus one.
1389 # However, it has the same basename, so the bogon will be chosen
1390 # first if we set CC to just the basename; use the full file name.
1392 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1400 if test -n "$CC"; then
1401 echo "$as_me:1401: result: $CC" >&5
1402 echo "${ECHO_T}$CC" >&6
1404 echo "$as_me:1404: result: no" >&5
1405 echo "${ECHO_T}no" >&6
1409 if test -z "$CC"; then
1410 if test -n "$ac_tool_prefix"; then
1413 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1414 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1415 echo "$as_me:1415: checking for $ac_word" >&5
1416 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1417 if test "${ac_cv_prog_CC+set}" = set; then
1418 echo $ECHO_N "(cached) $ECHO_C" >&6
1420 if test -n "$CC"; then
1421 ac_cv_prog_CC="$CC" # Let the user override the test.
1423 ac_save_IFS=$IFS; IFS=$ac_path_separator
1425 for ac_dir in $ac_dummy; do
1427 test -z "$ac_dir" && ac_dir=.
1428 $as_executable_p "$ac_dir/$ac_word" || continue
1429 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1430 echo "$as_me:1430: found $ac_dir/$ac_word" >&5
1437 if test -n "$CC"; then
1438 echo "$as_me:1438: result: $CC" >&5
1439 echo "${ECHO_T}$CC" >&6
1441 echo "$as_me:1441: result: no" >&5
1442 echo "${ECHO_T}no" >&6
1445 test -n "$CC" && break
1448 if test -z "$CC"; then
1452 # Extract the first word of "$ac_prog", so it can be a program name with args.
1453 set dummy $ac_prog; ac_word=$2
1454 echo "$as_me:1454: checking for $ac_word" >&5
1455 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1456 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1457 echo $ECHO_N "(cached) $ECHO_C" >&6
1459 if test -n "$ac_ct_CC"; then
1460 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1462 ac_save_IFS=$IFS; IFS=$ac_path_separator
1464 for ac_dir in $ac_dummy; do
1466 test -z "$ac_dir" && ac_dir=.
1467 $as_executable_p "$ac_dir/$ac_word" || continue
1468 ac_cv_prog_ac_ct_CC="$ac_prog"
1469 echo "$as_me:1469: found $ac_dir/$ac_word" >&5
1475 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1476 if test -n "$ac_ct_CC"; then
1477 echo "$as_me:1477: result: $ac_ct_CC" >&5
1478 echo "${ECHO_T}$ac_ct_CC" >&6
1480 echo "$as_me:1480: result: no" >&5
1481 echo "${ECHO_T}no" >&6
1484 test -n "$ac_ct_CC" && break
1492 test -z "$CC" && { { echo "$as_me:1492: error: no acceptable cc found in \$PATH" >&5
1493 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1494 { (exit 1); exit 1; }; }
1496 # Provide some information about the compiler.
1497 echo "$as_me:1497:" \
1498 "checking for C compiler version" >&5
1499 ac_compiler=`set X $ac_compile; echo "$2"`
1500 { (eval echo "$as_me:1500: \"$ac_compiler --version </dev/null >&5\"") >&5
1501 (eval $ac_compiler --version </dev/null >&5) 2>&5
1503 echo "$as_me:1503: \$? = $ac_status" >&5
1504 (exit "$ac_status"); }
1505 { (eval echo "$as_me:1505: \"$ac_compiler -v </dev/null >&5\"") >&5
1506 (eval $ac_compiler -v </dev/null >&5) 2>&5
1508 echo "$as_me:1508: \$? = $ac_status" >&5
1509 (exit "$ac_status"); }
1510 { (eval echo "$as_me:1510: \"$ac_compiler -V </dev/null >&5\"") >&5
1511 (eval $ac_compiler -V </dev/null >&5) 2>&5
1513 echo "$as_me:1513: \$? = $ac_status" >&5
1514 (exit "$ac_status"); }
1516 cat >"conftest.$ac_ext" <<_ACEOF
1517 #line 1517 "configure"
1518 #include "confdefs.h"
1528 ac_clean_files_save=$ac_clean_files
1529 ac_clean_files="$ac_clean_files a.out a.exe"
1530 # Try to create an executable without -o first, disregard a.out.
1531 # It will help us diagnose broken compilers, and finding out an intuition
1533 echo "$as_me:1533: checking for C compiler default output" >&5
1534 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1535 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1536 if { (eval echo "$as_me:1536: \"$ac_link_default\"") >&5
1537 (eval $ac_link_default) 2>&5
1539 echo "$as_me:1539: \$? = $ac_status" >&5
1540 (exit "$ac_status"); }; then
1541 # Find the output, starting from the most likely. This scheme is
1542 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1544 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1545 ls a.out conftest 2>/dev/null;
1546 ls a.* conftest.* 2>/dev/null`; do
1548 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1549 a.out ) # We found the default executable, but exeext='' is most
1552 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1553 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1560 echo "$as_me: failed program was:" >&5
1561 cat "conftest.$ac_ext" >&5
1562 { { echo "$as_me:1562: error: C compiler cannot create executables" >&5
1563 echo "$as_me: error: C compiler cannot create executables" >&2;}
1564 { (exit 77); exit 77; }; }
1567 ac_exeext=$ac_cv_exeext
1568 echo "$as_me:1568: result: $ac_file" >&5
1569 echo "${ECHO_T}$ac_file" >&6
1571 # Check the compiler produces executables we can run. If not, either
1572 # the compiler is broken, or we cross compile.
1573 echo "$as_me:1573: checking whether the C compiler works" >&5
1574 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1575 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1576 # If not cross compiling, check that we can run a simple program.
1577 if test "$cross_compiling" != yes; then
1578 if { ac_try='./$ac_file'
1579 { (eval echo "$as_me:1579: \"$ac_try\"") >&5
1582 echo "$as_me:1582: \$? = $ac_status" >&5
1583 (exit "$ac_status"); }; }; then
1586 if test "$cross_compiling" = maybe; then
1589 { { echo "$as_me:1589: error: cannot run C compiled programs.
1590 If you meant to cross compile, use \`--host'." >&5
1591 echo "$as_me: error: cannot run C compiled programs.
1592 If you meant to cross compile, use \`--host'." >&2;}
1593 { (exit 1); exit 1; }; }
1597 echo "$as_me:1597: result: yes" >&5
1598 echo "${ECHO_T}yes" >&6
1600 rm -f a.out a.exe "conftest$ac_cv_exeext"
1601 ac_clean_files=$ac_clean_files_save
1602 # Check the compiler produces executables we can run. If not, either
1603 # the compiler is broken, or we cross compile.
1604 echo "$as_me:1604: checking whether we are cross compiling" >&5
1605 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1606 echo "$as_me:1606: result: $cross_compiling" >&5
1607 echo "${ECHO_T}$cross_compiling" >&6
1609 echo "$as_me:1609: checking for executable suffix" >&5
1610 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1611 if { (eval echo "$as_me:1611: \"$ac_link\"") >&5
1612 (eval $ac_link) 2>&5
1614 echo "$as_me:1614: \$? = $ac_status" >&5
1615 (exit "$ac_status"); }; then
1616 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1617 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1618 # work properly (i.e., refer to `conftest.exe'), while it won't with
1620 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1622 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1623 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1630 { { echo "$as_me:1630: error: cannot compute EXEEXT: cannot compile and link" >&5
1631 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1632 { (exit 1); exit 1; }; }
1635 rm -f "conftest$ac_cv_exeext"
1636 echo "$as_me:1636: result: $ac_cv_exeext" >&5
1637 echo "${ECHO_T}$ac_cv_exeext" >&6
1639 rm -f "conftest.$ac_ext"
1640 EXEEXT=$ac_cv_exeext
1642 echo "$as_me:1642: checking for object suffix" >&5
1643 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1644 if test "${ac_cv_objext+set}" = set; then
1645 echo $ECHO_N "(cached) $ECHO_C" >&6
1647 cat >"conftest.$ac_ext" <<_ACEOF
1648 #line 1648 "configure"
1649 #include "confdefs.h"
1659 rm -f conftest.o conftest.obj
1660 if { (eval echo "$as_me:1660: \"$ac_compile\"") >&5
1661 (eval $ac_compile) 2>&5
1663 echo "$as_me:1663: \$? = $ac_status" >&5
1664 (exit "$ac_status"); }; then
1665 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1667 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1668 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1673 echo "$as_me: failed program was:" >&5
1674 cat "conftest.$ac_ext" >&5
1675 { { echo "$as_me:1675: error: cannot compute OBJEXT: cannot compile" >&5
1676 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1677 { (exit 1); exit 1; }; }
1680 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1682 echo "$as_me:1682: result: $ac_cv_objext" >&5
1683 echo "${ECHO_T}$ac_cv_objext" >&6
1684 OBJEXT=$ac_cv_objext
1686 echo "$as_me:1686: checking whether we are using the GNU C compiler" >&5
1687 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1688 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1689 echo $ECHO_N "(cached) $ECHO_C" >&6
1691 cat >"conftest.$ac_ext" <<_ACEOF
1692 #line 1692 "configure"
1693 #include "confdefs.h"
1706 rm -f "conftest.$ac_objext"
1707 if { (eval echo "$as_me:1707: \"$ac_compile\"") >&5
1708 (eval $ac_compile) 2>&5
1710 echo "$as_me:1710: \$? = $ac_status" >&5
1711 (exit "$ac_status"); } &&
1712 { ac_try='test -s "conftest.$ac_objext"'
1713 { (eval echo "$as_me:1713: \"$ac_try\"") >&5
1716 echo "$as_me:1716: \$? = $ac_status" >&5
1717 (exit "$ac_status"); }; }; then
1720 echo "$as_me: failed program was:" >&5
1721 cat "conftest.$ac_ext" >&5
1724 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1725 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1728 echo "$as_me:1728: result: $ac_cv_c_compiler_gnu" >&5
1729 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1730 GCC=`test $ac_compiler_gnu = yes && echo yes`
1731 ac_test_CFLAGS=${CFLAGS+set}
1732 ac_save_CFLAGS=$CFLAGS
1734 echo "$as_me:1734: checking whether $CC accepts -g" >&5
1735 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1736 if test "${ac_cv_prog_cc_g+set}" = set; then
1737 echo $ECHO_N "(cached) $ECHO_C" >&6
1739 cat >"conftest.$ac_ext" <<_ACEOF
1740 #line 1740 "configure"
1741 #include "confdefs.h"
1751 rm -f "conftest.$ac_objext"
1752 if { (eval echo "$as_me:1752: \"$ac_compile\"") >&5
1753 (eval $ac_compile) 2>&5
1755 echo "$as_me:1755: \$? = $ac_status" >&5
1756 (exit "$ac_status"); } &&
1757 { ac_try='test -s "conftest.$ac_objext"'
1758 { (eval echo "$as_me:1758: \"$ac_try\"") >&5
1761 echo "$as_me:1761: \$? = $ac_status" >&5
1762 (exit "$ac_status"); }; }; then
1765 echo "$as_me: failed program was:" >&5
1766 cat "conftest.$ac_ext" >&5
1769 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1771 echo "$as_me:1771: result: $ac_cv_prog_cc_g" >&5
1772 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1773 if test "$ac_test_CFLAGS" = set; then
1774 CFLAGS=$ac_save_CFLAGS
1775 elif test $ac_cv_prog_cc_g = yes; then
1776 if test "$GCC" = yes; then
1782 if test "$GCC" = yes; then
1788 # Some people use a C++ compiler to compile C. Since we use `exit',
1789 # in C++ we need to declare it. In case someone uses the same compiler
1790 # for both compiling C and C++ we need to have the C++ compiler decide
1791 # the declaration of exit, since it's the most demanding environment.
1792 cat >"conftest.$ac_ext" <<_ACEOF
1797 rm -f "conftest.$ac_objext"
1798 if { (eval echo "$as_me:1798: \"$ac_compile\"") >&5
1799 (eval $ac_compile) 2>&5
1801 echo "$as_me:1801: \$? = $ac_status" >&5
1802 (exit "$ac_status"); } &&
1803 { ac_try='test -s "conftest.$ac_objext"'
1804 { (eval echo "$as_me:1804: \"$ac_try\"") >&5
1807 echo "$as_me:1807: \$? = $ac_status" >&5
1808 (exit "$ac_status"); }; }; then
1809 for ac_declaration in \
1811 '#include <stdlib.h>' \
1812 'extern "C" void std::exit (int) throw (); using std::exit;' \
1813 'extern "C" void std::exit (int); using std::exit;' \
1814 'extern "C" void exit (int) throw ();' \
1815 'extern "C" void exit (int);' \
1818 cat >"conftest.$ac_ext" <<_ACEOF
1819 #line 1819 "configure"
1820 #include "confdefs.h"
1831 rm -f "conftest.$ac_objext"
1832 if { (eval echo "$as_me:1832: \"$ac_compile\"") >&5
1833 (eval $ac_compile) 2>&5
1835 echo "$as_me:1835: \$? = $ac_status" >&5
1836 (exit "$ac_status"); } &&
1837 { ac_try='test -s "conftest.$ac_objext"'
1838 { (eval echo "$as_me:1838: \"$ac_try\"") >&5
1841 echo "$as_me:1841: \$? = $ac_status" >&5
1842 (exit "$ac_status"); }; }; then
1845 echo "$as_me: failed program was:" >&5
1846 cat "conftest.$ac_ext" >&5
1849 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1850 cat >"conftest.$ac_ext" <<_ACEOF
1851 #line 1851 "configure"
1852 #include "confdefs.h"
1862 rm -f "conftest.$ac_objext"
1863 if { (eval echo "$as_me:1863: \"$ac_compile\"") >&5
1864 (eval $ac_compile) 2>&5
1866 echo "$as_me:1866: \$? = $ac_status" >&5
1867 (exit "$ac_status"); } &&
1868 { ac_try='test -s "conftest.$ac_objext"'
1869 { (eval echo "$as_me:1869: \"$ac_try\"") >&5
1872 echo "$as_me:1872: \$? = $ac_status" >&5
1873 (exit "$ac_status"); }; }; then
1876 echo "$as_me: failed program was:" >&5
1877 cat "conftest.$ac_ext" >&5
1879 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1882 if test -n "$ac_declaration"; then
1883 echo '#ifdef __cplusplus' >>confdefs.h
1884 echo "$ac_declaration" >>confdefs.h
1885 echo '#endif' >>confdefs.h
1889 echo "$as_me: failed program was:" >&5
1890 cat "conftest.$ac_ext" >&5
1892 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1894 ac_cpp='$CPP $CPPFLAGS'
1895 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1896 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1897 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1898 ac_main_return="return"
1901 if test "$GCC" = yes ; then
1902 echo "$as_me:1902: checking version of $CC" >&5
1903 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1904 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1905 test -z "$GCC_VERSION" && GCC_VERSION=unknown
1906 echo "$as_me:1906: result: $GCC_VERSION" >&5
1907 echo "${ECHO_T}$GCC_VERSION" >&6
1912 if test "$GCC" = yes ; then
1915 echo "$as_me:1915: checking if this is really Intel C compiler" >&5
1916 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1917 cf_save_CFLAGS="$CFLAGS"
1918 CFLAGS="$CFLAGS -no-gcc"
1919 cat >"conftest.$ac_ext" <<_ACEOF
1920 #line 1920 "configure"
1921 #include "confdefs.h"
1927 #ifdef __INTEL_COMPILER
1929 #error __INTEL_COMPILER is not defined
1936 rm -f "conftest.$ac_objext"
1937 if { (eval echo "$as_me:1937: \"$ac_compile\"") >&5
1938 (eval $ac_compile) 2>&5
1940 echo "$as_me:1940: \$? = $ac_status" >&5
1941 (exit "$ac_status"); } &&
1942 { ac_try='test -s "conftest.$ac_objext"'
1943 { (eval echo "$as_me:1943: \"$ac_try\"") >&5
1946 echo "$as_me:1946: \$? = $ac_status" >&5
1947 (exit "$ac_status"); }; }; then
1949 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1952 echo "$as_me: failed program was:" >&5
1953 cat "conftest.$ac_ext" >&5
1955 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1956 CFLAGS="$cf_save_CFLAGS"
1957 echo "$as_me:1957: result: $INTEL_COMPILER" >&5
1958 echo "${ECHO_T}$INTEL_COMPILER" >&6
1965 if test "$GCC" = yes ; then
1966 echo "$as_me:1966: checking if this is really Clang C compiler" >&5
1967 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
1968 cf_save_CFLAGS="$CFLAGS"
1969 cat >"conftest.$ac_ext" <<_ACEOF
1970 #line 1970 "configure"
1971 #include "confdefs.h"
1979 #error __clang__ is not defined
1986 rm -f "conftest.$ac_objext"
1987 if { (eval echo "$as_me:1987: \"$ac_compile\"") >&5
1988 (eval $ac_compile) 2>&5
1990 echo "$as_me:1990: \$? = $ac_status" >&5
1991 (exit "$ac_status"); } &&
1992 { ac_try='test -s "conftest.$ac_objext"'
1993 { (eval echo "$as_me:1993: \"$ac_try\"") >&5
1996 echo "$as_me:1996: \$? = $ac_status" >&5
1997 (exit "$ac_status"); }; }; then
2001 echo "$as_me: failed program was:" >&5
2002 cat "conftest.$ac_ext" >&5
2004 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2005 CFLAGS="$cf_save_CFLAGS"
2006 echo "$as_me:2006: result: $CLANG_COMPILER" >&5
2007 echo "${ECHO_T}$CLANG_COMPILER" >&6
2012 if test "x$CLANG_COMPILER" = "xyes" ; then
2014 (c[1-9][0-9]|*/c[1-9][0-9])
2015 { echo "$as_me:2015: WARNING: replacing broken compiler alias $CC" >&5
2016 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2017 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2022 echo "$as_me:2022: checking version of $CC" >&5
2023 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2024 CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2025 test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2026 echo "$as_me:2026: result: $CLANG_VERSION" >&5
2027 echo "${ECHO_T}$CLANG_VERSION" >&6
2029 for cf_clang_opt in \
2030 -Qunused-arguments \
2031 -Wno-error=implicit-function-declaration
2033 echo "$as_me:2033: checking if option $cf_clang_opt works" >&5
2034 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2035 cf_save_CFLAGS="$CFLAGS"
2036 CFLAGS="$CFLAGS $cf_clang_opt"
2037 cat >"conftest.$ac_ext" <<_ACEOF
2038 #line 2038 "configure"
2039 #include "confdefs.h"
2046 printf("hello!\\n");
2051 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2052 if { (eval echo "$as_me:2052: \"$ac_link\"") >&5
2053 (eval $ac_link) 2>&5
2055 echo "$as_me:2055: \$? = $ac_status" >&5
2056 (exit "$ac_status"); } &&
2057 { ac_try='test -s "conftest$ac_exeext"'
2058 { (eval echo "$as_me:2058: \"$ac_try\"") >&5
2061 echo "$as_me:2061: \$? = $ac_status" >&5
2062 (exit "$ac_status"); }; }; then
2066 echo "$as_me: failed program was:" >&5
2067 cat "conftest.$ac_ext" >&5
2071 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2072 echo "$as_me:2072: result: $cf_clang_optok" >&5
2073 echo "${ECHO_T}$cf_clang_optok" >&6
2074 CFLAGS="$cf_save_CFLAGS"
2075 if test "$cf_clang_optok" = yes; then
2076 test -n "$verbose" && echo " adding option $cf_clang_opt" 1>&6
2078 echo "${as_me:-configure}:2078: testing adding option $cf_clang_opt ..." 1>&5
2080 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2081 CFLAGS="${CFLAGS}$cf_clang_opt"
2087 echo "$as_me:2087: checking for $CC option to accept ANSI C" >&5
2088 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2089 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2090 echo $ECHO_N "(cached) $ECHO_C" >&6
2092 ac_cv_prog_cc_stdc=no
2094 cat >"conftest.$ac_ext" <<_ACEOF
2095 #line 2095 "configure"
2096 #include "confdefs.h"
2099 #include <sys/types.h>
2100 #include <sys/stat.h>
2101 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2102 struct buf { int x; };
2103 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2104 static char *e (char **p, int i)
2108 static char *f (char * (*g) (char **, int), char **p, ...)
2113 s = g (p, va_arg (v,int));
2117 int test (int i, double x);
2118 struct s1 {int (*f) (int a);};
2119 struct s2 {int (*f) (double a);};
2120 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2126 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2131 # Don't try gcc -ansi; that turns off useful extensions and
2132 # breaks some systems' header files.
2133 # AIX -qlanglvl=ansi
2134 # Ultrix and OSF/1 -std1
2135 # HP-UX 10.20 and later -Ae
2136 # HP-UX older versions -Aa -D_HPUX_SOURCE
2137 # SVR4 -Xc -D__EXTENSIONS__
2138 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2140 CC="$ac_save_CC $ac_arg"
2141 rm -f "conftest.$ac_objext"
2142 if { (eval echo "$as_me:2142: \"$ac_compile\"") >&5
2143 (eval $ac_compile) 2>&5
2145 echo "$as_me:2145: \$? = $ac_status" >&5
2146 (exit "$ac_status"); } &&
2147 { ac_try='test -s "conftest.$ac_objext"'
2148 { (eval echo "$as_me:2148: \"$ac_try\"") >&5
2151 echo "$as_me:2151: \$? = $ac_status" >&5
2152 (exit "$ac_status"); }; }; then
2153 ac_cv_prog_cc_stdc=$ac_arg
2156 echo "$as_me: failed program was:" >&5
2157 cat "conftest.$ac_ext" >&5
2159 rm -f "conftest.$ac_objext"
2161 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2166 case "x$ac_cv_prog_cc_stdc" in
2168 echo "$as_me:2168: result: none needed" >&5
2169 echo "${ECHO_T}none needed" >&6 ;;
2171 echo "$as_me:2171: result: $ac_cv_prog_cc_stdc" >&5
2172 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2173 CC="$CC $ac_cv_prog_cc_stdc" ;;
2176 # This should have been defined by AC_PROG_CC
2179 echo "$as_me:2179: checking \$CFLAGS variable" >&5
2180 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2183 echo "$as_me:2183: result: broken" >&5
2184 echo "${ECHO_T}broken" >&6
2185 { echo "$as_me:2185: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2186 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2189 for cf_arg in $cf_flags
2195 cf_new_extra_cppflags=
2197 for cf_add_cflags in $cf_arg
2199 case "$cf_fix_cppflags" in
2201 case "$cf_add_cflags" in
2202 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2203 case "$cf_add_cflags" in
2205 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2207 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2208 && test -z "${cf_tst_cflags}" \
2209 && cf_fix_cppflags=yes
2211 if test "$cf_fix_cppflags" = yes ; then
2213 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2214 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2217 elif test "${cf_tst_cflags}" = "\"'" ; then
2219 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2220 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2230 case "$cf_add_cflags" in
2232 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2234 CPPFLAGS=`echo "$CPPFLAGS" | \
2235 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2236 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2241 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2242 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2249 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2250 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2257 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2258 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2260 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2262 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2263 && test -z "${cf_tst_cflags}" \
2264 && cf_fix_cppflags=no
2269 if test -n "$cf_new_cflags" ; then
2271 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2272 CFLAGS="${CFLAGS}$cf_new_cflags"
2276 if test -n "$cf_new_cppflags" ; then
2278 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2279 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2283 if test -n "$cf_new_extra_cppflags" ; then
2285 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2286 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2293 echo "$as_me:2293: result: ok" >&5
2294 echo "${ECHO_T}ok" >&6
2298 echo "$as_me:2298: checking \$CC variable" >&5
2299 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2302 echo "$as_me:2302: result: broken" >&5
2303 echo "${ECHO_T}broken" >&6
2304 { echo "$as_me:2304: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2305 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2307 cf_prog=`echo "$CC" | sed -e 's/ / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2308 cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
2310 for cf_arg in $cf_flags
2318 cf_new_extra_cppflags=
2320 for cf_add_cflags in $cf_arg
2322 case "$cf_fix_cppflags" in
2324 case "$cf_add_cflags" in
2325 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2326 case "$cf_add_cflags" in
2328 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2330 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2331 && test -z "${cf_tst_cflags}" \
2332 && cf_fix_cppflags=yes
2334 if test "$cf_fix_cppflags" = yes ; then
2336 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2337 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2340 elif test "${cf_tst_cflags}" = "\"'" ; then
2342 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2343 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2353 case "$cf_add_cflags" in
2355 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2357 CPPFLAGS=`echo "$CPPFLAGS" | \
2358 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2359 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2364 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2365 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2372 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2373 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2380 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2381 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2383 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2385 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2386 && test -z "${cf_tst_cflags}" \
2387 && cf_fix_cppflags=no
2392 if test -n "$cf_new_cflags" ; then
2394 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2395 CFLAGS="${CFLAGS}$cf_new_cflags"
2399 if test -n "$cf_new_cppflags" ; then
2401 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2402 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2406 if test -n "$cf_new_extra_cppflags" ; then
2408 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2409 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2419 test -n "$verbose" && echo " resulting CC: '$CC'" 1>&6
2421 echo "${as_me:-configure}:2421: testing resulting CC: '$CC' ..." 1>&5
2423 test -n "$verbose" && echo " resulting CFLAGS: '$CFLAGS'" 1>&6
2425 echo "${as_me:-configure}:2425: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2427 test -n "$verbose" && echo " resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2429 echo "${as_me:-configure}:2429: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2433 echo "$as_me:2433: result: ok" >&5
2434 echo "${ECHO_T}ok" >&6
2438 echo "$as_me:2438: checking for inline" >&5
2439 echo $ECHO_N "checking for inline... $ECHO_C" >&6
2440 if test "${ac_cv_c_inline+set}" = set; then
2441 echo $ECHO_N "(cached) $ECHO_C" >&6
2444 for ac_kw in inline __inline__ __inline; do
2445 cat >"conftest.$ac_ext" <<_ACEOF
2446 #line 2446 "configure"
2447 #include "confdefs.h"
2449 static $ac_kw int static_foo () {return 0; }
2450 $ac_kw int foo () {return 0; }
2454 rm -f "conftest.$ac_objext"
2455 if { (eval echo "$as_me:2455: \"$ac_compile\"") >&5
2456 (eval $ac_compile) 2>&5
2458 echo "$as_me:2458: \$? = $ac_status" >&5
2459 (exit "$ac_status"); } &&
2460 { ac_try='test -s "conftest.$ac_objext"'
2461 { (eval echo "$as_me:2461: \"$ac_try\"") >&5
2464 echo "$as_me:2464: \$? = $ac_status" >&5
2465 (exit "$ac_status"); }; }; then
2466 ac_cv_c_inline=$ac_kw; break
2468 echo "$as_me: failed program was:" >&5
2469 cat "conftest.$ac_ext" >&5
2471 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2475 echo "$as_me:2475: result: $ac_cv_c_inline" >&5
2476 echo "${ECHO_T}$ac_cv_c_inline" >&6
2477 case $ac_cv_c_inline in
2480 cat >>confdefs.h <<\EOF
2484 *) cat >>confdefs.h <<EOF
2485 #define inline $ac_cv_c_inline
2490 for ac_prog in ggrep grep
2492 # Extract the first word of "$ac_prog", so it can be a program name with args.
2493 set dummy $ac_prog; ac_word=$2
2494 echo "$as_me:2494: checking for $ac_word" >&5
2495 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2496 if test "${ac_cv_prog_GREP+set}" = set; then
2497 echo $ECHO_N "(cached) $ECHO_C" >&6
2499 if test -n "$GREP"; then
2500 ac_cv_prog_GREP="$GREP" # Let the user override the test.
2502 ac_save_IFS=$IFS; IFS=$ac_path_separator
2504 for ac_dir in $ac_dummy; do
2506 test -z "$ac_dir" && ac_dir=.
2507 $as_executable_p "$ac_dir/$ac_word" || continue
2508 ac_cv_prog_GREP="$ac_prog"
2509 echo "$as_me:2509: found $ac_dir/$ac_word" >&5
2515 GREP=$ac_cv_prog_GREP
2516 if test -n "$GREP"; then
2517 echo "$as_me:2517: result: $GREP" >&5
2518 echo "${ECHO_T}$GREP" >&6
2520 echo "$as_me:2520: result: no" >&5
2521 echo "${ECHO_T}no" >&6
2524 test -n "$GREP" && break
2526 test -n "$GREP" || GREP=": "
2528 echo "$as_me:2528: checking for egrep" >&5
2529 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2530 if test "${ac_cv_path_EGREP+set}" = set; then
2531 echo $ECHO_N "(cached) $ECHO_C" >&6
2533 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2534 then ac_cv_path_EGREP="$GREP -E"
2536 for ac_prog in gegrep egrep
2538 # Extract the first word of "$ac_prog", so it can be a program name with args.
2539 set dummy $ac_prog; ac_word=$2
2540 echo "$as_me:2540: checking for $ac_word" >&5
2541 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2542 if test "${ac_cv_path_EGREP+set}" = set; then
2543 echo $ECHO_N "(cached) $ECHO_C" >&6
2547 ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2550 ac_save_IFS=$IFS; IFS=$ac_path_separator
2552 for ac_dir in $ac_dummy; do
2554 test -z "$ac_dir" && ac_dir=.
2555 if $as_executable_p "$ac_dir/$ac_word"; then
2556 ac_cv_path_EGREP="$ac_dir/$ac_word"
2557 echo "$as_me:2557: found $ac_dir/$ac_word" >&5
2565 EGREP=$ac_cv_path_EGREP
2567 if test -n "$EGREP"; then
2568 echo "$as_me:2568: result: $EGREP" >&5
2569 echo "${ECHO_T}$EGREP" >&6
2571 echo "$as_me:2571: result: no" >&5
2572 echo "${ECHO_T}no" >&6
2575 test -n "$EGREP" && break
2577 test -n "$EGREP" || EGREP=": "
2579 test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2579: error: cannot find workable egrep" >&5
2580 echo "$as_me: error: cannot find workable egrep" >&2;}
2581 { (exit 1); exit 1; }; }
2584 echo "$as_me:2584: result: $ac_cv_path_EGREP" >&5
2585 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2586 EGREP="$ac_cv_path_EGREP"
2589 ac_cpp='$CPP $CPPFLAGS'
2590 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2591 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2592 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2593 ac_main_return="return"
2594 echo "$as_me:2594: checking how to run the C preprocessor" >&5
2595 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2596 # On Suns, sometimes $CPP names a directory.
2597 if test -n "$CPP" && test -d "$CPP"; then
2600 if test -z "$CPP"; then
2601 if test "${ac_cv_prog_CPP+set}" = set; then
2602 echo $ECHO_N "(cached) $ECHO_C" >&6
2604 # Double quotes because CPP needs to be expanded
2605 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2608 for ac_c_preproc_warn_flag in '' yes
2610 # Use a header file that comes with gcc, so configuring glibc
2611 # with a fresh cross-compiler works.
2612 # On the NeXT, cc -E runs the code through the compiler's parser,
2613 # not just through cpp. "Syntax error" is here to catch this case.
2614 cat >"conftest.$ac_ext" <<_ACEOF
2615 #line 2615 "configure"
2616 #include "confdefs.h"
2620 if { (eval echo "$as_me:2620: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2621 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2623 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2625 cat conftest.err >&5
2626 echo "$as_me:2626: \$? = $ac_status" >&5
2627 (exit "$ac_status"); } >/dev/null; then
2628 if test -s conftest.err; then
2629 ac_cpp_err=$ac_c_preproc_warn_flag
2636 if test -z "$ac_cpp_err"; then
2639 echo "$as_me: failed program was:" >&5
2640 cat "conftest.$ac_ext" >&5
2641 # Broken: fails on valid input.
2644 rm -f conftest.err "conftest.$ac_ext"
2646 # OK, works on sane cases. Now check whether non-existent headers
2647 # can be detected and how.
2648 cat >"conftest.$ac_ext" <<_ACEOF
2649 #line 2649 "configure"
2650 #include "confdefs.h"
2651 #include <ac_nonexistent.h>
2653 if { (eval echo "$as_me:2653: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2654 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2656 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2658 cat conftest.err >&5
2659 echo "$as_me:2659: \$? = $ac_status" >&5
2660 (exit "$ac_status"); } >/dev/null; then
2661 if test -s conftest.err; then
2662 ac_cpp_err=$ac_c_preproc_warn_flag
2669 if test -z "$ac_cpp_err"; then
2670 # Broken: success on invalid input.
2673 echo "$as_me: failed program was:" >&5
2674 cat "conftest.$ac_ext" >&5
2675 # Passes both tests.
2679 rm -f conftest.err "conftest.$ac_ext"
2682 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2683 rm -f conftest.err "conftest.$ac_ext"
2684 if $ac_preproc_ok; then
2696 echo "$as_me:2696: result: $CPP" >&5
2697 echo "${ECHO_T}$CPP" >&6
2699 for ac_c_preproc_warn_flag in '' yes
2701 # Use a header file that comes with gcc, so configuring glibc
2702 # with a fresh cross-compiler works.
2703 # On the NeXT, cc -E runs the code through the compiler's parser,
2704 # not just through cpp. "Syntax error" is here to catch this case.
2705 cat >"conftest.$ac_ext" <<_ACEOF
2706 #line 2706 "configure"
2707 #include "confdefs.h"
2711 if { (eval echo "$as_me:2711: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2712 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2714 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2716 cat conftest.err >&5
2717 echo "$as_me:2717: \$? = $ac_status" >&5
2718 (exit "$ac_status"); } >/dev/null; then
2719 if test -s conftest.err; then
2720 ac_cpp_err=$ac_c_preproc_warn_flag
2727 if test -z "$ac_cpp_err"; then
2730 echo "$as_me: failed program was:" >&5
2731 cat "conftest.$ac_ext" >&5
2732 # Broken: fails on valid input.
2735 rm -f conftest.err "conftest.$ac_ext"
2737 # OK, works on sane cases. Now check whether non-existent headers
2738 # can be detected and how.
2739 cat >"conftest.$ac_ext" <<_ACEOF
2740 #line 2740 "configure"
2741 #include "confdefs.h"
2742 #include <ac_nonexistent.h>
2744 if { (eval echo "$as_me:2744: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2745 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2747 $EGREP -v '^ *\+' conftest.er1 >conftest.err
2749 cat conftest.err >&5
2750 echo "$as_me:2750: \$? = $ac_status" >&5
2751 (exit "$ac_status"); } >/dev/null; then
2752 if test -s conftest.err; then
2753 ac_cpp_err=$ac_c_preproc_warn_flag
2760 if test -z "$ac_cpp_err"; then
2761 # Broken: success on invalid input.
2764 echo "$as_me: failed program was:" >&5
2765 cat "conftest.$ac_ext" >&5
2766 # Passes both tests.
2770 rm -f conftest.err "conftest.$ac_ext"
2773 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2774 rm -f conftest.err "conftest.$ac_ext"
2775 if $ac_preproc_ok; then
2778 { { echo "$as_me:2778: error: C preprocessor \"$CPP\" fails sanity check" >&5
2779 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2780 { (exit 1); exit 1; }; }
2784 ac_cpp='$CPP $CPPFLAGS'
2785 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2786 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2787 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2788 ac_main_return="return"
2790 for ac_prog in mawk gawk nawk awk
2792 # Extract the first word of "$ac_prog", so it can be a program name with args.
2793 set dummy $ac_prog; ac_word=$2
2794 echo "$as_me:2794: checking for $ac_word" >&5
2795 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2796 if test "${ac_cv_prog_AWK+set}" = set; then
2797 echo $ECHO_N "(cached) $ECHO_C" >&6
2799 if test -n "$AWK"; then
2800 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2802 ac_save_IFS=$IFS; IFS=$ac_path_separator
2804 for ac_dir in $ac_dummy; do
2806 test -z "$ac_dir" && ac_dir=.
2807 $as_executable_p "$ac_dir/$ac_word" || continue
2808 ac_cv_prog_AWK="$ac_prog"
2809 echo "$as_me:2809: found $ac_dir/$ac_word" >&5
2816 if test -n "$AWK"; then
2817 echo "$as_me:2817: result: $AWK" >&5
2818 echo "${ECHO_T}$AWK" >&6
2820 echo "$as_me:2820: result: no" >&5
2821 echo "${ECHO_T}no" >&6
2824 test -n "$AWK" && break
2827 # Find a good install program. We prefer a C program (faster),
2828 # so one script is as good as another. But avoid the broken or
2829 # incompatible versions:
2830 # SysV /etc/install, /usr/sbin/install
2831 # SunOS /usr/etc/install
2832 # IRIX /sbin/install
2834 # AmigaOS /C/install, which installs bootblocks on floppy discs
2835 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2836 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2837 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2838 # ./install, which can be erroneously created by make from ./install.sh.
2839 echo "$as_me:2839: checking for a BSD compatible install" >&5
2840 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2841 if test -z "$INSTALL"; then
2842 if test "${ac_cv_path_install+set}" = set; then
2843 echo $ECHO_N "(cached) $ECHO_C" >&6
2845 ac_save_IFS=$IFS; IFS=$ac_path_separator
2846 for ac_dir in $PATH; do
2848 # Account for people who put trailing slashes in PATH elements.
2850 / | ./ | .// | /cC/* \
2851 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2854 # OSF1 and SCO ODT 3.0 have their own names for install.
2855 # Don't use installbsd from OSF since it installs stuff as root
2857 for ac_prog in ginstall scoinst install; do
2858 if $as_executable_p "$ac_dir/$ac_prog"; then
2859 if test $ac_prog = install &&
2860 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2861 # AIX install. It has an incompatible calling convention.
2863 elif test $ac_prog = install &&
2864 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2865 # program-specific install script used by HP pwplus--don't use.
2868 ac_cv_path_install="$ac_dir/$ac_prog -c"
2878 if test "${ac_cv_path_install+set}" = set; then
2879 INSTALL=$ac_cv_path_install
2881 # As a last resort, use the slow shell script. We don't cache a
2882 # path for INSTALL within a source directory, because that will
2883 # break other packages using the cache if that directory is
2884 # removed, or if the path is relative.
2885 INSTALL=$ac_install_sh
2888 echo "$as_me:2888: result: $INSTALL" >&5
2889 echo "${ECHO_T}$INSTALL" >&6
2891 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2892 # It thinks the first close brace ends the variable substitution.
2893 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2895 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2897 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2903 cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
2904 test -z "$cf_dir" && cf_dir=.
2905 INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
2909 echo "$as_me:2909: checking if you want to install stripped executables" >&5
2910 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
2912 # Check whether --enable-stripping or --disable-stripping was given.
2913 if test "${enable_stripping+set}" = set; then
2914 enableval="$enable_stripping"
2915 test "$enableval" != no && enableval=yes
2916 if test "$enableval" != "yes" ; then
2919 enable_stripping=yes
2923 enable_stripping=yes
2926 echo "$as_me:2926: result: $enable_stripping" >&5
2927 echo "${ECHO_T}$enable_stripping" >&6
2929 if test "$enable_stripping" = yes
2936 : "${INSTALL:=install}"
2937 echo "$as_me:2937: checking if install accepts -p option" >&5
2938 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
2939 if test "${cf_cv_install_p+set}" = set; then
2940 echo $ECHO_N "(cached) $ECHO_C" >&6
2947 if $INSTALL -p conftest.in conftest.out 2>/dev/null
2949 if test -f conftest.out/conftest.in
2951 test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
2952 test conftest.out/conftest.in -nt conftest.in 2>conftest.err
2953 if test -s conftest.err
2968 echo "$as_me:2968: result: $cf_cv_install_p" >&5
2969 echo "${ECHO_T}$cf_cv_install_p" >&6
2971 echo "$as_me:2971: checking if install needs to be told about ownership" >&5
2972 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
2973 case `$ac_config_guess` in
2982 echo "$as_me:2982: result: $with_install_o" >&5
2983 echo "${ECHO_T}$with_install_o" >&6
2984 if test "x$with_install_o" = xyes
2986 INSTALL_OPT_O="`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`"
2991 for ac_prog in lint cppcheck splint
2993 # Extract the first word of "$ac_prog", so it can be a program name with args.
2994 set dummy $ac_prog; ac_word=$2
2995 echo "$as_me:2995: checking for $ac_word" >&5
2996 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2997 if test "${ac_cv_prog_LINT+set}" = set; then
2998 echo $ECHO_N "(cached) $ECHO_C" >&6
3000 if test -n "$LINT"; then
3001 ac_cv_prog_LINT="$LINT" # Let the user override the test.
3003 ac_save_IFS=$IFS; IFS=$ac_path_separator
3005 for ac_dir in $ac_dummy; do
3007 test -z "$ac_dir" && ac_dir=.
3008 $as_executable_p "$ac_dir/$ac_word" || continue
3009 ac_cv_prog_LINT="$ac_prog"
3010 echo "$as_me:3010: found $ac_dir/$ac_word" >&5
3016 LINT=$ac_cv_prog_LINT
3017 if test -n "$LINT"; then
3018 echo "$as_me:3018: result: $LINT" >&5
3019 echo "${ECHO_T}$LINT" >&6
3021 echo "$as_me:3021: result: no" >&5
3022 echo "${ECHO_T}no" >&6
3025 test -n "$LINT" && break
3029 (xcppcheck|x*/cppcheck)
3030 test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3034 echo "$as_me:3034: checking for \".PHONY\" make-support" >&5
3035 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
3036 if test "${cf_cv_make_PHONY+set}" = set; then
3037 echo $ECHO_N "(cached) $ECHO_C" >&6
3042 mkdir conftest || exit 1
3044 cat >makefile <<'CF_EOF'
3048 @echo "** making $@ $(DATA)"
3050 @echo "** making $@ $(DATA)"
3052 @echo "** making $@ $(DATA)"
3055 @echo "** making $@ $(DATA)"
3058 for cf_data in 1 2 3
3060 ${MAKE:-make} always DATA=$cf_data
3061 ${MAKE:-make} once DATA=$cf_data
3062 ${MAKE:-make} -t always once
3063 if test -f always ; then
3064 echo "no (case 1)" > ../conftest.tmp
3065 elif test ! -f always.out ; then
3066 echo "no (case 2)" > ../conftest.tmp
3067 elif test ! -f once.out ; then
3068 echo "no (case 3)" > ../conftest.tmp
3069 elif ! cmp -s always.out once.out ; then
3070 echo "no (case 4)" > ../conftest.tmp
3071 diff always.out once.out
3073 cf_check="`cat always.out`"
3074 if test "x$cf_check" != "x$cf_data" ; then
3075 echo "no (case 5)" > ../conftest.tmp
3077 echo yes > ../conftest.tmp
3085 cf_cv_make_PHONY="`cat conftest.tmp`"
3089 echo "$as_me:3089: result: $cf_cv_make_PHONY" >&5
3090 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3093 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3094 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3096 echo "$as_me:3096: checking if filesystem supports mixed-case filenames" >&5
3097 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3098 if test "${cf_cv_mixedcase+set}" = set; then
3099 echo $ECHO_N "(cached) $ECHO_C" >&6
3102 if test "$cross_compiling" = yes ; then
3103 case "$target_alias" in
3104 (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3112 rm -f conftest CONFTEST
3114 if test -f CONFTEST ; then
3119 rm -f conftest CONFTEST
3123 echo "$as_me:3123: result: $cf_cv_mixedcase" >&5
3124 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3125 test "$cf_cv_mixedcase" = yes &&
3126 cat >>confdefs.h <<\EOF
3127 #define MIXEDCASE_FILENAMES 1
3130 for ac_prog in exctags ctags
3132 # Extract the first word of "$ac_prog", so it can be a program name with args.
3133 set dummy $ac_prog; ac_word=$2
3134 echo "$as_me:3134: checking for $ac_word" >&5
3135 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3136 if test "${ac_cv_prog_CTAGS+set}" = set; then
3137 echo $ECHO_N "(cached) $ECHO_C" >&6
3139 if test -n "$CTAGS"; then
3140 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3142 ac_save_IFS=$IFS; IFS=$ac_path_separator
3144 for ac_dir in $ac_dummy; do
3146 test -z "$ac_dir" && ac_dir=.
3147 $as_executable_p "$ac_dir/$ac_word" || continue
3148 ac_cv_prog_CTAGS="$ac_prog"
3149 echo "$as_me:3149: found $ac_dir/$ac_word" >&5
3155 CTAGS=$ac_cv_prog_CTAGS
3156 if test -n "$CTAGS"; then
3157 echo "$as_me:3157: result: $CTAGS" >&5
3158 echo "${ECHO_T}$CTAGS" >&6
3160 echo "$as_me:3160: result: no" >&5
3161 echo "${ECHO_T}no" >&6
3164 test -n "$CTAGS" && break
3167 for ac_prog in exetags etags
3169 # Extract the first word of "$ac_prog", so it can be a program name with args.
3170 set dummy $ac_prog; ac_word=$2
3171 echo "$as_me:3171: checking for $ac_word" >&5
3172 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3173 if test "${ac_cv_prog_ETAGS+set}" = set; then
3174 echo $ECHO_N "(cached) $ECHO_C" >&6
3176 if test -n "$ETAGS"; then
3177 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3179 ac_save_IFS=$IFS; IFS=$ac_path_separator
3181 for ac_dir in $ac_dummy; do
3183 test -z "$ac_dir" && ac_dir=.
3184 $as_executable_p "$ac_dir/$ac_word" || continue
3185 ac_cv_prog_ETAGS="$ac_prog"
3186 echo "$as_me:3186: found $ac_dir/$ac_word" >&5
3192 ETAGS=$ac_cv_prog_ETAGS
3193 if test -n "$ETAGS"; then
3194 echo "$as_me:3194: result: $ETAGS" >&5
3195 echo "${ECHO_T}$ETAGS" >&6
3197 echo "$as_me:3197: result: no" >&5
3198 echo "${ECHO_T}no" >&6
3201 test -n "$ETAGS" && break
3204 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3205 set dummy ${CTAGS:-ctags}; ac_word=$2
3206 echo "$as_me:3206: checking for $ac_word" >&5
3207 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3208 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3209 echo $ECHO_N "(cached) $ECHO_C" >&6
3211 if test -n "$MAKE_LOWER_TAGS"; then
3212 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3214 ac_save_IFS=$IFS; IFS=$ac_path_separator
3216 for ac_dir in $ac_dummy; do
3218 test -z "$ac_dir" && ac_dir=.
3219 $as_executable_p "$ac_dir/$ac_word" || continue
3220 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3221 echo "$as_me:3221: found $ac_dir/$ac_word" >&5
3225 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3228 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3229 if test -n "$MAKE_LOWER_TAGS"; then
3230 echo "$as_me:3230: result: $MAKE_LOWER_TAGS" >&5
3231 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3233 echo "$as_me:3233: result: no" >&5
3234 echo "${ECHO_T}no" >&6
3237 if test "$cf_cv_mixedcase" = yes ; then
3238 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3239 set dummy ${ETAGS:-etags}; ac_word=$2
3240 echo "$as_me:3240: checking for $ac_word" >&5
3241 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3242 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3243 echo $ECHO_N "(cached) $ECHO_C" >&6
3245 if test -n "$MAKE_UPPER_TAGS"; then
3246 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3248 ac_save_IFS=$IFS; IFS=$ac_path_separator
3250 for ac_dir in $ac_dummy; do
3252 test -z "$ac_dir" && ac_dir=.
3253 $as_executable_p "$ac_dir/$ac_word" || continue
3254 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3255 echo "$as_me:3255: found $ac_dir/$ac_word" >&5
3259 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3262 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3263 if test -n "$MAKE_UPPER_TAGS"; then
3264 echo "$as_me:3264: result: $MAKE_UPPER_TAGS" >&5
3265 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3267 echo "$as_me:3267: result: no" >&5
3268 echo "${ECHO_T}no" >&6
3275 if test "$MAKE_UPPER_TAGS" = yes ; then
3281 if test "$MAKE_LOWER_TAGS" = yes ; then
3287 echo "$as_me:3287: checking if -lm needed for math functions" >&5
3288 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
3289 if test "${cf_cv_need_libm+set}" = set; then
3290 echo $ECHO_N "(cached) $ECHO_C" >&6
3293 cat >"conftest.$ac_ext" <<_ACEOF
3294 #line 3294 "configure"
3295 #include "confdefs.h"
3304 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
3309 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3310 if { (eval echo "$as_me:3310: \"$ac_link\"") >&5
3311 (eval $ac_link) 2>&5
3313 echo "$as_me:3313: \$? = $ac_status" >&5
3314 (exit "$ac_status"); } &&
3315 { ac_try='test -s "conftest$ac_exeext"'
3316 { (eval echo "$as_me:3316: \"$ac_try\"") >&5
3319 echo "$as_me:3319: \$? = $ac_status" >&5
3320 (exit "$ac_status"); }; }; then
3323 echo "$as_me: failed program was:" >&5
3324 cat "conftest.$ac_ext" >&5
3327 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3329 echo "$as_me:3329: result: $cf_cv_need_libm" >&5
3330 echo "${ECHO_T}$cf_cv_need_libm" >&6
3332 if test "$cf_cv_need_libm" = yes
3335 cf_save_LIBS="$LIBS"
3337 echo "$as_me:3337: checking if -lm is available for math functions" >&5
3338 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
3339 if test "${cf_cv_have_libm+set}" = set; then
3340 echo $ECHO_N "(cached) $ECHO_C" >&6
3343 cat >"conftest.$ac_ext" <<_ACEOF
3344 #line 3344 "configure"
3345 #include "confdefs.h"
3354 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
3359 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3360 if { (eval echo "$as_me:3360: \"$ac_link\"") >&5
3361 (eval $ac_link) 2>&5
3363 echo "$as_me:3363: \$? = $ac_status" >&5
3364 (exit "$ac_status"); } &&
3365 { ac_try='test -s "conftest$ac_exeext"'
3366 { (eval echo "$as_me:3366: \"$ac_try\"") >&5
3369 echo "$as_me:3369: \$? = $ac_status" >&5
3370 (exit "$ac_status"); }; }; then
3373 echo "$as_me: failed program was:" >&5
3374 cat "conftest.$ac_ext" >&5
3377 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3379 echo "$as_me:3379: result: $cf_cv_have_libm" >&5
3380 echo "${ECHO_T}$cf_cv_have_libm" >&6
3381 LIBS="$cf_save_LIBS"
3383 if test "$cf_cv_have_libm" = yes
3391 if test "$cf_cv_have_libm" = yes
3394 cat >>confdefs.h <<\EOF
3395 #define HAVE_MATH_FUNCS 1
3403 CC_SHARED_OPTS=unknown
3404 CPPFLAGS="$CPPFLAGS"
3406 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
3407 DFT_UPR_MODEL="NORMAL"
3420 PACKAGE="ncurses-examples"
3426 TINFO_LIBS='$(LIBS_CURSES)'
3427 cf_cv_abi_version=""
3428 cf_cv_rel_version=""
3434 echo "$as_me:3434: checking for fgrep" >&5
3435 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
3436 if test "${ac_cv_path_FGREP+set}" = set; then
3437 echo $ECHO_N "(cached) $ECHO_C" >&6
3439 if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
3440 then ac_cv_path_FGREP="$GREP -F"
3442 for ac_prog in gfgrep fgrep
3444 # Extract the first word of "$ac_prog", so it can be a program name with args.
3445 set dummy $ac_prog; ac_word=$2
3446 echo "$as_me:3446: checking for $ac_word" >&5
3447 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3448 if test "${ac_cv_path_FGREP+set}" = set; then
3449 echo $ECHO_N "(cached) $ECHO_C" >&6
3453 ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
3456 ac_save_IFS=$IFS; IFS=$ac_path_separator
3458 for ac_dir in $ac_dummy; do
3460 test -z "$ac_dir" && ac_dir=.
3461 if $as_executable_p "$ac_dir/$ac_word"; then
3462 ac_cv_path_FGREP="$ac_dir/$ac_word"
3463 echo "$as_me:3463: found $ac_dir/$ac_word" >&5
3471 FGREP=$ac_cv_path_FGREP
3473 if test -n "$FGREP"; then
3474 echo "$as_me:3474: result: $FGREP" >&5
3475 echo "${ECHO_T}$FGREP" >&6
3477 echo "$as_me:3477: result: no" >&5
3478 echo "${ECHO_T}no" >&6
3481 test -n "$FGREP" && break
3483 test -n "$FGREP" || FGREP=": "
3485 test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:3485: error: cannot find workable fgrep" >&5
3486 echo "$as_me: error: cannot find workable fgrep" >&2;}
3487 { (exit 1); exit 1; }; }
3490 echo "$as_me:3490: result: $ac_cv_path_FGREP" >&5
3491 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
3492 FGREP="$ac_cv_path_FGREP"
3494 echo "$as_me:3494: checking if you want to use C11 _Noreturn feature" >&5
3495 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
3497 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
3498 if test "${enable_stdnoreturn+set}" = set; then
3499 enableval="$enable_stdnoreturn"
3500 test "$enableval" != yes && enableval=no
3501 if test "$enableval" != "no" ; then
3502 enable_stdnoreturn=yes
3504 enable_stdnoreturn=no
3508 enable_stdnoreturn=no
3511 echo "$as_me:3511: result: $enable_stdnoreturn" >&5
3512 echo "${ECHO_T}$enable_stdnoreturn" >&6
3514 if test $enable_stdnoreturn = yes; then
3515 echo "$as_me:3515: checking for C11 _Noreturn feature" >&5
3516 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
3517 if test "${cf_cv_c11_noreturn+set}" = set; then
3518 echo $ECHO_N "(cached) $ECHO_C" >&6
3520 cat >"conftest.$ac_ext" <<_ACEOF
3521 #line 3521 "configure"
3522 #include "confdefs.h"
3524 $ac_includes_default
3525 #include <stdnoreturn.h>
3526 static _Noreturn void giveup(void) { exit(0); }
3531 if (feof(stdin)) giveup()
3536 rm -f "conftest.$ac_objext"
3537 if { (eval echo "$as_me:3537: \"$ac_compile\"") >&5
3538 (eval $ac_compile) 2>&5
3540 echo "$as_me:3540: \$? = $ac_status" >&5
3541 (exit "$ac_status"); } &&
3542 { ac_try='test -s "conftest.$ac_objext"'
3543 { (eval echo "$as_me:3543: \"$ac_try\"") >&5
3546 echo "$as_me:3546: \$? = $ac_status" >&5
3547 (exit "$ac_status"); }; }; then
3548 cf_cv_c11_noreturn=yes
3550 echo "$as_me: failed program was:" >&5
3551 cat "conftest.$ac_ext" >&5
3552 cf_cv_c11_noreturn=no
3554 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3557 echo "$as_me:3557: result: $cf_cv_c11_noreturn" >&5
3558 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
3560 cf_cv_c11_noreturn=no,
3563 if test "$cf_cv_c11_noreturn" = yes; then
3565 cat >>confdefs.h <<\EOF
3566 #define HAVE_STDNORETURN_H 1
3569 cat >>confdefs.h <<EOF
3570 #define STDC_NORETURN _Noreturn
3573 HAVE_STDNORETURN_H=1
3575 HAVE_STDNORETURN_H=0
3578 if test "$GCC" = yes || test "$GXX" = yes
3580 cat > conftest.i <<EOF
3582 #define GCC_PRINTF 0
3587 #ifndef GCC_NORETURN
3588 #define GCC_NORETURN /* nothing */
3591 #define GCC_UNUSED /* nothing */
3594 if test "$GCC" = yes
3596 { echo "$as_me:3596: checking for $CC __attribute__ directives..." >&5
3597 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
3598 cat > "conftest.$ac_ext" <<EOF
3599 #line 3599 "${as_me:-configure}"
3601 #include "confdefs.h"
3602 #include "conftest.h"
3603 #include "conftest.i"
3605 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
3607 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
3610 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
3612 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
3614 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
3615 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
3616 extern GCC_NORETURN void foo(void);
3617 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
3619 cf_printf_attribute=no
3620 cf_scanf_attribute=no
3621 for cf_attribute in scanf printf unused noreturn
3624 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
3626 cf_directive="__attribute__(($cf_attribute))"
3627 echo "checking for $CC $cf_directive" 1>&5
3629 case "$cf_attribute" in
3631 cf_printf_attribute=yes
3632 cat >conftest.h <<EOF
3633 #define GCC_$cf_ATTRIBUTE 1
3637 cf_scanf_attribute=yes
3638 cat >conftest.h <<EOF
3639 #define GCC_$cf_ATTRIBUTE 1
3643 cat >conftest.h <<EOF
3644 #define GCC_$cf_ATTRIBUTE $cf_directive
3649 if { (eval echo "$as_me:3649: \"$ac_compile\"") >&5
3650 (eval $ac_compile) 2>&5
3652 echo "$as_me:3652: \$? = $ac_status" >&5
3653 (exit "$ac_status"); }; then
3654 test -n "$verbose" && echo "$as_me:3654: result: ... $cf_attribute" >&5
3655 echo "${ECHO_T}... $cf_attribute" >&6
3656 cat conftest.h >>confdefs.h
3657 case "$cf_attribute" in
3660 cat >>confdefs.h <<EOF
3661 #define GCC_NORETURN $cf_directive
3666 cf_value='/* nothing */'
3667 if test "$cf_printf_attribute" != no ; then
3668 cf_value='__attribute__((format(printf,fmt,var)))'
3670 cat >>confdefs.h <<\EOF
3671 #define GCC_PRINTF 1
3676 cat >>confdefs.h <<EOF
3677 #define GCC_PRINTFLIKE(fmt,var) $cf_value
3682 cf_value='/* nothing */'
3683 if test "$cf_scanf_attribute" != no ; then
3684 cf_value='__attribute__((format(scanf,fmt,var)))'
3686 cat >>confdefs.h <<\EOF
3692 cat >>confdefs.h <<EOF
3693 #define GCC_SCANFLIKE(fmt,var) $cf_value
3699 cat >>confdefs.h <<EOF
3700 #define GCC_UNUSED $cf_directive
3708 ${FGREP-fgrep} define conftest.i >>confdefs.h
3713 echo "$as_me:3713: checking if you want to work around bogus compiler/loader warnings" >&5
3714 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
3716 # Check whether --enable-string-hacks or --disable-string-hacks was given.
3717 if test "${enable_string_hacks+set}" = set; then
3718 enableval="$enable_string_hacks"
3719 enable_string_hacks=$enableval
3721 enable_string_hacks=no
3723 echo "$as_me:3723: result: $enable_string_hacks" >&5
3724 echo "${ECHO_T}$enable_string_hacks" >&6
3726 if test "x$enable_string_hacks" = "xyes"; then
3728 cat >>confdefs.h <<\EOF
3729 #define USE_STRING_HACKS 1
3732 { echo "$as_me:3732: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
3733 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
3734 echo "$as_me:3734: checking for strlcat" >&5
3735 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
3736 if test "${ac_cv_func_strlcat+set}" = set; then
3737 echo $ECHO_N "(cached) $ECHO_C" >&6
3739 cat >"conftest.$ac_ext" <<_ACEOF
3740 #line 3740 "configure"
3741 #include "confdefs.h"
3742 #define strlcat autoconf_temporary
3743 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3750 /* We use char because int might match the return type of a gcc2
3751 builtin and then its argument prototype would still apply. */
3752 char strlcat (void);
3758 /* The GNU C library defines stubs for functions which it implements
3759 to always fail with ENOSYS. Some functions are actually named
3760 something starting with __ and the normal name is an alias. */
3761 #if defined (__stub_strlcat) || defined (__stub___strlcat)
3762 #error found stub for strlcat
3770 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3771 if { (eval echo "$as_me:3771: \"$ac_link\"") >&5
3772 (eval $ac_link) 2>&5
3774 echo "$as_me:3774: \$? = $ac_status" >&5
3775 (exit "$ac_status"); } &&
3776 { ac_try='test -s "conftest$ac_exeext"'
3777 { (eval echo "$as_me:3777: \"$ac_try\"") >&5
3780 echo "$as_me:3780: \$? = $ac_status" >&5
3781 (exit "$ac_status"); }; }; then
3782 ac_cv_func_strlcat=yes
3784 echo "$as_me: failed program was:" >&5
3785 cat "conftest.$ac_ext" >&5
3786 ac_cv_func_strlcat=no
3788 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3790 echo "$as_me:3790: result: $ac_cv_func_strlcat" >&5
3791 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
3792 if test "$ac_cv_func_strlcat" = yes; then
3794 cat >>confdefs.h <<\EOF
3795 #define HAVE_STRLCAT 1
3800 echo "$as_me:3800: checking for strlcat in -lbsd" >&5
3801 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
3802 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
3803 echo $ECHO_N "(cached) $ECHO_C" >&6
3805 ac_check_lib_save_LIBS=$LIBS
3807 cat >"conftest.$ac_ext" <<_ACEOF
3808 #line 3808 "configure"
3809 #include "confdefs.h"
3811 /* Override any gcc2 internal prototype to avoid an error. */
3815 /* We use char because int might match the return type of a gcc2
3816 builtin and then its argument prototype would still apply. */
3826 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3827 if { (eval echo "$as_me:3827: \"$ac_link\"") >&5
3828 (eval $ac_link) 2>&5
3830 echo "$as_me:3830: \$? = $ac_status" >&5
3831 (exit "$ac_status"); } &&
3832 { ac_try='test -s "conftest$ac_exeext"'
3833 { (eval echo "$as_me:3833: \"$ac_try\"") >&5
3836 echo "$as_me:3836: \$? = $ac_status" >&5
3837 (exit "$ac_status"); }; }; then
3838 ac_cv_lib_bsd_strlcat=yes
3840 echo "$as_me: failed program was:" >&5
3841 cat "conftest.$ac_ext" >&5
3842 ac_cv_lib_bsd_strlcat=no
3844 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3845 LIBS=$ac_check_lib_save_LIBS
3847 echo "$as_me:3847: result: $ac_cv_lib_bsd_strlcat" >&5
3848 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
3849 if test "$ac_cv_lib_bsd_strlcat" = yes; then
3854 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
3856 for cf_add_1lib in $cf_add_0lib; do
3857 for cf_add_2lib in $cf_add_libs; do
3858 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
3863 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
3867 for ac_header in bsd/string.h
3869 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3870 echo "$as_me:3870: checking for $ac_header" >&5
3871 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3872 if eval "test \"\${$as_ac_Header+set}\" = set"; then
3873 echo $ECHO_N "(cached) $ECHO_C" >&6
3875 cat >"conftest.$ac_ext" <<_ACEOF
3876 #line 3876 "configure"
3877 #include "confdefs.h"
3878 #include <$ac_header>
3880 if { (eval echo "$as_me:3880: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3881 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3883 $EGREP -v '^ *\+' conftest.er1 >conftest.err
3885 cat conftest.err >&5
3886 echo "$as_me:3886: \$? = $ac_status" >&5
3887 (exit "$ac_status"); } >/dev/null; then
3888 if test -s conftest.err; then
3889 ac_cpp_err=$ac_c_preproc_warn_flag
3896 if test -z "$ac_cpp_err"; then
3897 eval "$as_ac_Header=yes"
3899 echo "$as_me: failed program was:" >&5
3900 cat "conftest.$ac_ext" >&5
3901 eval "$as_ac_Header=no"
3903 rm -f conftest.err "conftest.$ac_ext"
3905 echo "$as_me:3905: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
3906 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
3907 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
3908 cat >>confdefs.h <<EOF
3909 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3915 cat >>confdefs.h <<\EOF
3916 #define HAVE_STRLCAT 1
3923 for ac_func in strlcpy snprintf
3925 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
3926 echo "$as_me:3926: checking for $ac_func" >&5
3927 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
3928 if eval "test \"\${$as_ac_var+set}\" = set"; then
3929 echo $ECHO_N "(cached) $ECHO_C" >&6
3931 cat >"conftest.$ac_ext" <<_ACEOF
3932 #line 3932 "configure"
3933 #include "confdefs.h"
3934 #define $ac_func autoconf_temporary
3935 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
3942 /* We use char because int might match the return type of a gcc2
3943 builtin and then its argument prototype would still apply. */
3944 char $ac_func (void);
3950 /* The GNU C library defines stubs for functions which it implements
3951 to always fail with ENOSYS. Some functions are actually named
3952 something starting with __ and the normal name is an alias. */
3953 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
3954 #error found stub for $ac_func
3962 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
3963 if { (eval echo "$as_me:3963: \"$ac_link\"") >&5
3964 (eval $ac_link) 2>&5
3966 echo "$as_me:3966: \$? = $ac_status" >&5
3967 (exit "$ac_status"); } &&
3968 { ac_try='test -s "conftest$ac_exeext"'
3969 { (eval echo "$as_me:3969: \"$ac_try\"") >&5
3972 echo "$as_me:3972: \$? = $ac_status" >&5
3973 (exit "$ac_status"); }; }; then
3974 eval "$as_ac_var=yes"
3976 echo "$as_me: failed program was:" >&5
3977 cat "conftest.$ac_ext" >&5
3978 eval "$as_ac_var=no"
3980 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
3982 echo "$as_me:3982: result: `eval echo '${'"$as_ac_var"'}'`" >&5
3983 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
3984 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
3985 cat >>confdefs.h <<EOF
3986 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
3994 echo "$as_me:3994: checking if the POSIX test-macros are already defined" >&5
3995 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
3996 if test "${cf_cv_posix_visible+set}" = set; then
3997 echo $ECHO_N "(cached) $ECHO_C" >&6
4000 cat >"conftest.$ac_ext" <<_ACEOF
4001 #line 4001 "configure"
4002 #include "confdefs.h"
4008 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
4009 && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
4010 && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
4011 && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
4012 #error conflicting symbols found
4019 rm -f "conftest.$ac_objext"
4020 if { (eval echo "$as_me:4020: \"$ac_compile\"") >&5
4021 (eval $ac_compile) 2>&5
4023 echo "$as_me:4023: \$? = $ac_status" >&5
4024 (exit "$ac_status"); } &&
4025 { ac_try='test -s "conftest.$ac_objext"'
4026 { (eval echo "$as_me:4026: \"$ac_try\"") >&5
4029 echo "$as_me:4029: \$? = $ac_status" >&5
4030 (exit "$ac_status"); }; }; then
4031 cf_cv_posix_visible=no
4033 echo "$as_me: failed program was:" >&5
4034 cat "conftest.$ac_ext" >&5
4035 cf_cv_posix_visible=yes
4037 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4040 echo "$as_me:4040: result: $cf_cv_posix_visible" >&5
4041 echo "${ECHO_T}$cf_cv_posix_visible" >&6
4043 if test "$cf_cv_posix_visible" = no; then
4046 cf_POSIX_C_SOURCE=199506L
4051 cf_xopen_source="-D_ALL_SOURCE"
4054 cf_xopen_source="-D_APPLE_C_SOURCE"
4057 cf_xopen_source="-D_DARWIN_C_SOURCE"
4060 (freebsd*|dragonfly*|midnightbsd*)
4061 # 5.x headers associate
4062 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
4063 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
4064 cf_POSIX_C_SOURCE=200112L
4066 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4069 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
4072 cf_xopen_source="-D_HPUX_SOURCE"
4075 cf_xopen_source="-D_SGI_SOURCE"
4078 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*)
4080 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
4082 echo "$as_me:4082: checking if this is the GNU C library" >&5
4083 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
4084 if test "${cf_cv_gnu_library+set}" = set; then
4085 echo $ECHO_N "(cached) $ECHO_C" >&6
4088 cat >"conftest.$ac_ext" <<_ACEOF
4089 #line 4089 "configure"
4090 #include "confdefs.h"
4091 #include <sys/types.h>
4096 #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
4098 #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
4101 # error not GNU C library
4107 rm -f "conftest.$ac_objext"
4108 if { (eval echo "$as_me:4108: \"$ac_compile\"") >&5
4109 (eval $ac_compile) 2>&5
4111 echo "$as_me:4111: \$? = $ac_status" >&5
4112 (exit "$ac_status"); } &&
4113 { ac_try='test -s "conftest.$ac_objext"'
4114 { (eval echo "$as_me:4114: \"$ac_try\"") >&5
4117 echo "$as_me:4117: \$? = $ac_status" >&5
4118 (exit "$ac_status"); }; }; then
4119 cf_cv_gnu_library=yes
4121 echo "$as_me: failed program was:" >&5
4122 cat "conftest.$ac_ext" >&5
4123 cf_cv_gnu_library=no
4125 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4128 echo "$as_me:4128: result: $cf_cv_gnu_library" >&5
4129 echo "${ECHO_T}$cf_cv_gnu_library" >&6
4131 if test x$cf_cv_gnu_library = xyes; then
4133 # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
4134 # was changed to help a little. newlib incorporated the change about 4
4136 echo "$as_me:4136: checking if _DEFAULT_SOURCE can be used as a basis" >&5
4137 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
4138 if test "${cf_cv_gnu_library_219+set}" = set; then
4139 echo $ECHO_N "(cached) $ECHO_C" >&6
4144 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4145 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4147 cat >"conftest.$ac_ext" <<_ACEOF
4148 #line 4148 "configure"
4149 #include "confdefs.h"
4150 #include <sys/types.h>
4155 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
4157 #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
4160 # error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
4166 rm -f "conftest.$ac_objext"
4167 if { (eval echo "$as_me:4167: \"$ac_compile\"") >&5
4168 (eval $ac_compile) 2>&5
4170 echo "$as_me:4170: \$? = $ac_status" >&5
4171 (exit "$ac_status"); } &&
4172 { ac_try='test -s "conftest.$ac_objext"'
4173 { (eval echo "$as_me:4173: \"$ac_try\"") >&5
4176 echo "$as_me:4176: \$? = $ac_status" >&5
4177 (exit "$ac_status"); }; }; then
4178 cf_cv_gnu_library_219=yes
4180 echo "$as_me: failed program was:" >&5
4181 cat "conftest.$ac_ext" >&5
4182 cf_cv_gnu_library_219=no
4184 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4188 echo "$as_me:4188: result: $cf_cv_gnu_library_219" >&5
4189 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
4191 if test "x$cf_cv_gnu_library_219" = xyes; then
4193 echo "$as_me:4193: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
4194 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
4195 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
4196 echo $ECHO_N "(cached) $ECHO_C" >&6
4202 cf_new_extra_cppflags=
4204 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
4206 case "$cf_fix_cppflags" in
4208 case "$cf_add_cflags" in
4209 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4210 case "$cf_add_cflags" in
4212 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4214 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4215 && test -z "${cf_tst_cflags}" \
4216 && cf_fix_cppflags=yes
4218 if test "$cf_fix_cppflags" = yes ; then
4220 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4221 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4224 elif test "${cf_tst_cflags}" = "\"'" ; then
4226 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4227 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4237 case "$cf_add_cflags" in
4239 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4241 CPPFLAGS=`echo "$CPPFLAGS" | \
4242 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4243 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4248 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4249 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4256 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4257 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4264 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4265 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4267 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4269 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4270 && test -z "${cf_tst_cflags}" \
4271 && cf_fix_cppflags=no
4276 if test -n "$cf_new_cflags" ; then
4278 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4279 CFLAGS="${CFLAGS}$cf_new_cflags"
4283 if test -n "$cf_new_cppflags" ; then
4285 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4286 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4290 if test -n "$cf_new_extra_cppflags" ; then
4292 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4293 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4297 cat >"conftest.$ac_ext" <<_ACEOF
4298 #line 4298 "configure"
4299 #include "confdefs.h"
4302 #include <sys/types.h>
4308 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
4311 # error GNU C library is too old
4317 rm -f "conftest.$ac_objext"
4318 if { (eval echo "$as_me:4318: \"$ac_compile\"") >&5
4319 (eval $ac_compile) 2>&5
4321 echo "$as_me:4321: \$? = $ac_status" >&5
4322 (exit "$ac_status"); } &&
4323 { ac_try='test -s "conftest.$ac_objext"'
4324 { (eval echo "$as_me:4324: \"$ac_try\"") >&5
4327 echo "$as_me:4327: \$? = $ac_status" >&5
4328 (exit "$ac_status"); }; }; then
4329 cf_cv_gnu_dftsrc_219=yes
4331 echo "$as_me: failed program was:" >&5
4332 cat "conftest.$ac_ext" >&5
4333 cf_cv_gnu_dftsrc_219=no
4335 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4338 echo "$as_me:4338: result: $cf_cv_gnu_dftsrc_219" >&5
4339 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
4340 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
4342 cf_cv_gnu_dftsrc_219=maybe
4345 if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
4347 echo "$as_me:4347: checking if we must define _GNU_SOURCE" >&5
4348 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
4349 if test "${cf_cv_gnu_source+set}" = set; then
4350 echo $ECHO_N "(cached) $ECHO_C" >&6
4353 cat >"conftest.$ac_ext" <<_ACEOF
4354 #line 4354 "configure"
4355 #include "confdefs.h"
4356 #include <sys/types.h>
4361 #ifndef _XOPEN_SOURCE
4362 #error expected _XOPEN_SOURCE to be defined
4368 rm -f "conftest.$ac_objext"
4369 if { (eval echo "$as_me:4369: \"$ac_compile\"") >&5
4370 (eval $ac_compile) 2>&5
4372 echo "$as_me:4372: \$? = $ac_status" >&5
4373 (exit "$ac_status"); } &&
4374 { ac_try='test -s "conftest.$ac_objext"'
4375 { (eval echo "$as_me:4375: \"$ac_try\"") >&5
4378 echo "$as_me:4378: \$? = $ac_status" >&5
4379 (exit "$ac_status"); }; }; then
4382 echo "$as_me: failed program was:" >&5
4383 cat "conftest.$ac_ext" >&5
4389 cf_new_extra_cppflags=
4391 for cf_add_cflags in -D_GNU_SOURCE
4393 case "$cf_fix_cppflags" in
4395 case "$cf_add_cflags" in
4396 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4397 case "$cf_add_cflags" in
4399 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4401 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4402 && test -z "${cf_tst_cflags}" \
4403 && cf_fix_cppflags=yes
4405 if test "$cf_fix_cppflags" = yes ; then
4407 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4408 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4411 elif test "${cf_tst_cflags}" = "\"'" ; then
4413 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4414 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4424 case "$cf_add_cflags" in
4426 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4428 CPPFLAGS=`echo "$CPPFLAGS" | \
4429 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4430 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4435 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4436 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4443 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4444 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4451 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4452 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4454 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4456 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4457 && test -z "${cf_tst_cflags}" \
4458 && cf_fix_cppflags=no
4463 if test -n "$cf_new_cflags" ; then
4465 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4466 CFLAGS="${CFLAGS}$cf_new_cflags"
4470 if test -n "$cf_new_cppflags" ; then
4472 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4473 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4477 if test -n "$cf_new_extra_cppflags" ; then
4479 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4480 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4484 cat >"conftest.$ac_ext" <<_ACEOF
4485 #line 4485 "configure"
4486 #include "confdefs.h"
4487 #include <sys/types.h>
4492 #ifdef _XOPEN_SOURCE
4493 #error expected _XOPEN_SOURCE to be undefined
4499 rm -f "conftest.$ac_objext"
4500 if { (eval echo "$as_me:4500: \"$ac_compile\"") >&5
4501 (eval $ac_compile) 2>&5
4503 echo "$as_me:4503: \$? = $ac_status" >&5
4504 (exit "$ac_status"); } &&
4505 { ac_try='test -s "conftest.$ac_objext"'
4506 { (eval echo "$as_me:4506: \"$ac_try\"") >&5
4509 echo "$as_me:4509: \$? = $ac_status" >&5
4510 (exit "$ac_status"); }; }; then
4513 echo "$as_me: failed program was:" >&5
4514 cat "conftest.$ac_ext" >&5
4515 cf_cv_gnu_source=yes
4517 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4521 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4524 echo "$as_me:4524: result: $cf_cv_gnu_source" >&5
4525 echo "${ECHO_T}$cf_cv_gnu_source" >&6
4527 if test "$cf_cv_gnu_source" = yes
4529 echo "$as_me:4529: checking if we should also define _DEFAULT_SOURCE" >&5
4530 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
4531 if test "${cf_cv_default_source+set}" = set; then
4532 echo $ECHO_N "(cached) $ECHO_C" >&6
4535 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4536 CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
4538 cat >"conftest.$ac_ext" <<_ACEOF
4539 #line 4539 "configure"
4540 #include "confdefs.h"
4541 #include <sys/types.h>
4546 #ifdef _DEFAULT_SOURCE
4547 #error expected _DEFAULT_SOURCE to be undefined
4553 rm -f "conftest.$ac_objext"
4554 if { (eval echo "$as_me:4554: \"$ac_compile\"") >&5
4555 (eval $ac_compile) 2>&5
4557 echo "$as_me:4557: \$? = $ac_status" >&5
4558 (exit "$ac_status"); } &&
4559 { ac_try='test -s "conftest.$ac_objext"'
4560 { (eval echo "$as_me:4560: \"$ac_try\"") >&5
4563 echo "$as_me:4563: \$? = $ac_status" >&5
4564 (exit "$ac_status"); }; }; then
4565 cf_cv_default_source=no
4567 echo "$as_me: failed program was:" >&5
4568 cat "conftest.$ac_ext" >&5
4569 cf_cv_default_source=yes
4571 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4574 echo "$as_me:4574: result: $cf_cv_default_source" >&5
4575 echo "${ECHO_T}$cf_cv_default_source" >&6
4576 if test "$cf_cv_default_source" = yes
4579 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4580 CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
4590 cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
4593 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
4596 if test "$cf_cv_posix_visible" = no; then
4598 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4600 cf_save_CFLAGS="$CFLAGS"
4601 cf_save_CPPFLAGS="$CPPFLAGS"
4603 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4604 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4605 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4607 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4608 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4609 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
4611 echo "$as_me:4611: checking if we should define _POSIX_C_SOURCE" >&5
4612 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4613 if test "${cf_cv_posix_c_source+set}" = set; then
4614 echo $ECHO_N "(cached) $ECHO_C" >&6
4617 echo "${as_me:-configure}:4617: testing if the symbol is already defined go no further ..." 1>&5
4619 cat >"conftest.$ac_ext" <<_ACEOF
4620 #line 4620 "configure"
4621 #include "confdefs.h"
4622 #include <sys/types.h>
4627 #ifndef _POSIX_C_SOURCE
4628 #error _POSIX_C_SOURCE is not defined
4634 rm -f "conftest.$ac_objext"
4635 if { (eval echo "$as_me:4635: \"$ac_compile\"") >&5
4636 (eval $ac_compile) 2>&5
4638 echo "$as_me:4638: \$? = $ac_status" >&5
4639 (exit "$ac_status"); } &&
4640 { ac_try='test -s "conftest.$ac_objext"'
4641 { (eval echo "$as_me:4641: \"$ac_try\"") >&5
4644 echo "$as_me:4644: \$? = $ac_status" >&5
4645 (exit "$ac_status"); }; }; then
4646 cf_cv_posix_c_source=no
4648 echo "$as_me: failed program was:" >&5
4649 cat "conftest.$ac_ext" >&5
4650 cf_want_posix_source=no
4651 case .$cf_POSIX_C_SOURCE in
4653 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4656 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4657 cf_want_posix_source=yes
4660 cf_want_posix_source=yes
4663 if test "$cf_want_posix_source" = yes ; then
4664 cat >"conftest.$ac_ext" <<_ACEOF
4665 #line 4665 "configure"
4666 #include "confdefs.h"
4667 #include <sys/types.h>
4672 #ifdef _POSIX_SOURCE
4673 #error _POSIX_SOURCE is defined
4679 rm -f "conftest.$ac_objext"
4680 if { (eval echo "$as_me:4680: \"$ac_compile\"") >&5
4681 (eval $ac_compile) 2>&5
4683 echo "$as_me:4683: \$? = $ac_status" >&5
4684 (exit "$ac_status"); } &&
4685 { ac_try='test -s "conftest.$ac_objext"'
4686 { (eval echo "$as_me:4686: \"$ac_try\"") >&5
4689 echo "$as_me:4689: \$? = $ac_status" >&5
4690 (exit "$ac_status"); }; }; then
4693 echo "$as_me: failed program was:" >&5
4694 cat "conftest.$ac_ext" >&5
4695 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4697 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4700 echo "${as_me:-configure}:4700: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4702 CFLAGS="$cf_trim_CFLAGS"
4703 CPPFLAGS="$cf_trim_CPPFLAGS"
4705 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4706 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4708 echo "${as_me:-configure}:4708: testing if the second compile does not leave our definition intact error ..." 1>&5
4710 cat >"conftest.$ac_ext" <<_ACEOF
4711 #line 4711 "configure"
4712 #include "confdefs.h"
4713 #include <sys/types.h>
4718 #ifndef _POSIX_C_SOURCE
4719 #error _POSIX_C_SOURCE is not defined
4725 rm -f "conftest.$ac_objext"
4726 if { (eval echo "$as_me:4726: \"$ac_compile\"") >&5
4727 (eval $ac_compile) 2>&5
4729 echo "$as_me:4729: \$? = $ac_status" >&5
4730 (exit "$ac_status"); } &&
4731 { ac_try='test -s "conftest.$ac_objext"'
4732 { (eval echo "$as_me:4732: \"$ac_try\"") >&5
4735 echo "$as_me:4735: \$? = $ac_status" >&5
4736 (exit "$ac_status"); }; }; then
4739 echo "$as_me: failed program was:" >&5
4740 cat "conftest.$ac_ext" >&5
4741 cf_cv_posix_c_source=no
4743 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4744 CFLAGS="$cf_save_CFLAGS"
4745 CPPFLAGS="$cf_save_CPPFLAGS"
4748 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4751 echo "$as_me:4751: result: $cf_cv_posix_c_source" >&5
4752 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4754 if test "$cf_cv_posix_c_source" != no ; then
4755 CFLAGS="$cf_trim_CFLAGS"
4756 CPPFLAGS="$cf_trim_CPPFLAGS"
4761 cf_new_extra_cppflags=
4763 for cf_add_cflags in $cf_cv_posix_c_source
4765 case "$cf_fix_cppflags" in
4767 case "$cf_add_cflags" in
4768 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4769 case "$cf_add_cflags" in
4771 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4773 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4774 && test -z "${cf_tst_cflags}" \
4775 && cf_fix_cppflags=yes
4777 if test "$cf_fix_cppflags" = yes ; then
4779 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4780 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4783 elif test "${cf_tst_cflags}" = "\"'" ; then
4785 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4786 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4796 case "$cf_add_cflags" in
4798 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4800 CPPFLAGS=`echo "$CPPFLAGS" | \
4801 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4802 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4807 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4808 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4815 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4816 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4823 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4824 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4826 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4828 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4829 && test -z "${cf_tst_cflags}" \
4830 && cf_fix_cppflags=no
4835 if test -n "$cf_new_cflags" ; then
4837 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4838 CFLAGS="${CFLAGS}$cf_new_cflags"
4842 if test -n "$cf_new_cppflags" ; then
4844 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4845 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4849 if test -n "$cf_new_extra_cppflags" ; then
4851 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4852 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4858 fi # cf_cv_posix_visible
4862 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
4865 # OpenBSD 6.x has broken locale support, both compile-time and runtime.
4866 # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
4867 # Abusing the conformance level is a workaround.
4868 { echo "$as_me:4868: WARNING: this system does not provide usable locale support" >&5
4869 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
4870 cf_xopen_source="-D_BSD_SOURCE"
4874 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
4875 cf_xopen_source="-D_BSD_SOURCE"
4879 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
4882 cf_xopen_source="-D_OSF_SOURCE"
4885 cf_xopen_source="-D_QNX_SOURCE"
4888 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
4891 cf_xopen_source="-D__EXTENSIONS__"
4892 cf_cv_xopen_source=broken
4894 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
4900 echo "$as_me:4900: checking if we should define _XOPEN_SOURCE" >&5
4901 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4902 if test "${cf_cv_xopen_source+set}" = set; then
4903 echo $ECHO_N "(cached) $ECHO_C" >&6
4906 cat >"conftest.$ac_ext" <<_ACEOF
4907 #line 4907 "configure"
4908 #include "confdefs.h"
4910 $ac_includes_default
4916 #ifndef _XOPEN_SOURCE
4917 #error _XOPEN_SOURCE is not defined
4924 rm -f "conftest.$ac_objext"
4925 if { (eval echo "$as_me:4925: \"$ac_compile\"") >&5
4926 (eval $ac_compile) 2>&5
4928 echo "$as_me:4928: \$? = $ac_status" >&5
4929 (exit "$ac_status"); } &&
4930 { ac_try='test -s "conftest.$ac_objext"'
4931 { (eval echo "$as_me:4931: \"$ac_try\"") >&5
4934 echo "$as_me:4934: \$? = $ac_status" >&5
4935 (exit "$ac_status"); }; }; then
4936 cf_cv_xopen_source=no
4938 echo "$as_me: failed program was:" >&5
4939 cat "conftest.$ac_ext" >&5
4942 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4943 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4945 cat >"conftest.$ac_ext" <<_ACEOF
4946 #line 4946 "configure"
4947 #include "confdefs.h"
4949 $ac_includes_default
4955 #ifndef _XOPEN_SOURCE
4956 #error _XOPEN_SOURCE is not defined
4963 rm -f "conftest.$ac_objext"
4964 if { (eval echo "$as_me:4964: \"$ac_compile\"") >&5
4965 (eval $ac_compile) 2>&5
4967 echo "$as_me:4967: \$? = $ac_status" >&5
4968 (exit "$ac_status"); } &&
4969 { ac_try='test -s "conftest.$ac_objext"'
4970 { (eval echo "$as_me:4970: \"$ac_try\"") >&5
4973 echo "$as_me:4973: \$? = $ac_status" >&5
4974 (exit "$ac_status"); }; }; then
4975 cf_cv_xopen_source=no
4977 echo "$as_me: failed program was:" >&5
4978 cat "conftest.$ac_ext" >&5
4979 cf_cv_xopen_source=$cf_XOPEN_SOURCE
4981 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4985 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4988 echo "$as_me:4988: result: $cf_cv_xopen_source" >&5
4989 echo "${ECHO_T}$cf_cv_xopen_source" >&6
4991 if test "$cf_cv_xopen_source" != no ; then
4993 CFLAGS=`echo "$CFLAGS" | \
4994 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4995 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
4997 CPPFLAGS=`echo "$CPPFLAGS" | \
4998 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
4999 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5001 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5003 for cf_add_cflags in $cf_temp_xopen_source
5005 case "x$cf_add_cflags" in
5008 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5011 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5012 test "$CFLAGS" != "$cf_old_cflag" || break
5014 CFLAGS="$cf_old_cflag"
5017 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5020 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5021 test "$CPPFLAGS" != "$cf_old_cflag" || break
5023 CPPFLAGS="$cf_old_cflag"
5032 cf_new_extra_cppflags=
5034 for cf_add_cflags in $cf_add_cflags
5036 case "$cf_fix_cppflags" in
5038 case "$cf_add_cflags" in
5039 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5040 case "$cf_add_cflags" in
5042 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5044 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5045 && test -z "${cf_tst_cflags}" \
5046 && cf_fix_cppflags=yes
5048 if test "$cf_fix_cppflags" = yes ; then
5050 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5051 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5054 elif test "${cf_tst_cflags}" = "\"'" ; then
5056 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5057 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5067 case "$cf_add_cflags" in
5069 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5071 CPPFLAGS=`echo "$CPPFLAGS" | \
5072 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5073 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5078 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5079 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5086 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5087 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5094 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5095 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5097 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5099 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5100 && test -z "${cf_tst_cflags}" \
5101 && cf_fix_cppflags=no
5106 if test -n "$cf_new_cflags" ; then
5108 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5109 CFLAGS="${CFLAGS}$cf_new_cflags"
5113 if test -n "$cf_new_cppflags" ; then
5115 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5116 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5120 if test -n "$cf_new_extra_cppflags" ; then
5122 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5123 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5131 cf_save_xopen_cppflags="$CPPFLAGS"
5133 if test "$cf_cv_posix_visible" = no; then
5135 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
5137 cf_save_CFLAGS="$CFLAGS"
5138 cf_save_CPPFLAGS="$CPPFLAGS"
5140 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
5141 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5142 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
5144 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
5145 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5146 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
5148 echo "$as_me:5148: checking if we should define _POSIX_C_SOURCE" >&5
5149 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
5150 if test "${cf_cv_posix_c_source+set}" = set; then
5151 echo $ECHO_N "(cached) $ECHO_C" >&6
5154 echo "${as_me:-configure}:5154: testing if the symbol is already defined go no further ..." 1>&5
5156 cat >"conftest.$ac_ext" <<_ACEOF
5157 #line 5157 "configure"
5158 #include "confdefs.h"
5159 #include <sys/types.h>
5164 #ifndef _POSIX_C_SOURCE
5165 #error _POSIX_C_SOURCE is not defined
5171 rm -f "conftest.$ac_objext"
5172 if { (eval echo "$as_me:5172: \"$ac_compile\"") >&5
5173 (eval $ac_compile) 2>&5
5175 echo "$as_me:5175: \$? = $ac_status" >&5
5176 (exit "$ac_status"); } &&
5177 { ac_try='test -s "conftest.$ac_objext"'
5178 { (eval echo "$as_me:5178: \"$ac_try\"") >&5
5181 echo "$as_me:5181: \$? = $ac_status" >&5
5182 (exit "$ac_status"); }; }; then
5183 cf_cv_posix_c_source=no
5185 echo "$as_me: failed program was:" >&5
5186 cat "conftest.$ac_ext" >&5
5187 cf_want_posix_source=no
5188 case .$cf_POSIX_C_SOURCE in
5190 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
5193 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
5194 cf_want_posix_source=yes
5197 cf_want_posix_source=yes
5200 if test "$cf_want_posix_source" = yes ; then
5201 cat >"conftest.$ac_ext" <<_ACEOF
5202 #line 5202 "configure"
5203 #include "confdefs.h"
5204 #include <sys/types.h>
5209 #ifdef _POSIX_SOURCE
5210 #error _POSIX_SOURCE is defined
5216 rm -f "conftest.$ac_objext"
5217 if { (eval echo "$as_me:5217: \"$ac_compile\"") >&5
5218 (eval $ac_compile) 2>&5
5220 echo "$as_me:5220: \$? = $ac_status" >&5
5221 (exit "$ac_status"); } &&
5222 { ac_try='test -s "conftest.$ac_objext"'
5223 { (eval echo "$as_me:5223: \"$ac_try\"") >&5
5226 echo "$as_me:5226: \$? = $ac_status" >&5
5227 (exit "$ac_status"); }; }; then
5230 echo "$as_me: failed program was:" >&5
5231 cat "conftest.$ac_ext" >&5
5232 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
5234 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5237 echo "${as_me:-configure}:5237: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
5239 CFLAGS="$cf_trim_CFLAGS"
5240 CPPFLAGS="$cf_trim_CPPFLAGS"
5242 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5243 CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
5245 echo "${as_me:-configure}:5245: testing if the second compile does not leave our definition intact error ..." 1>&5
5247 cat >"conftest.$ac_ext" <<_ACEOF
5248 #line 5248 "configure"
5249 #include "confdefs.h"
5250 #include <sys/types.h>
5255 #ifndef _POSIX_C_SOURCE
5256 #error _POSIX_C_SOURCE is not defined
5262 rm -f "conftest.$ac_objext"
5263 if { (eval echo "$as_me:5263: \"$ac_compile\"") >&5
5264 (eval $ac_compile) 2>&5
5266 echo "$as_me:5266: \$? = $ac_status" >&5
5267 (exit "$ac_status"); } &&
5268 { ac_try='test -s "conftest.$ac_objext"'
5269 { (eval echo "$as_me:5269: \"$ac_try\"") >&5
5272 echo "$as_me:5272: \$? = $ac_status" >&5
5273 (exit "$ac_status"); }; }; then
5276 echo "$as_me: failed program was:" >&5
5277 cat "conftest.$ac_ext" >&5
5278 cf_cv_posix_c_source=no
5280 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5281 CFLAGS="$cf_save_CFLAGS"
5282 CPPFLAGS="$cf_save_CPPFLAGS"
5285 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5288 echo "$as_me:5288: result: $cf_cv_posix_c_source" >&5
5289 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
5291 if test "$cf_cv_posix_c_source" != no ; then
5292 CFLAGS="$cf_trim_CFLAGS"
5293 CPPFLAGS="$cf_trim_CPPFLAGS"
5298 cf_new_extra_cppflags=
5300 for cf_add_cflags in $cf_cv_posix_c_source
5302 case "$cf_fix_cppflags" in
5304 case "$cf_add_cflags" in
5305 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5306 case "$cf_add_cflags" in
5308 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5310 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5311 && test -z "${cf_tst_cflags}" \
5312 && cf_fix_cppflags=yes
5314 if test "$cf_fix_cppflags" = yes ; then
5316 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5317 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5320 elif test "${cf_tst_cflags}" = "\"'" ; then
5322 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5323 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5333 case "$cf_add_cflags" in
5335 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5337 CPPFLAGS=`echo "$CPPFLAGS" | \
5338 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5339 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5344 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5345 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5352 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5353 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5360 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5361 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5363 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5365 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5366 && test -z "${cf_tst_cflags}" \
5367 && cf_fix_cppflags=no
5372 if test -n "$cf_new_cflags" ; then
5374 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5375 CFLAGS="${CFLAGS}$cf_new_cflags"
5379 if test -n "$cf_new_cppflags" ; then
5381 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5382 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5386 if test -n "$cf_new_extra_cppflags" ; then
5388 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5389 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5395 fi # cf_cv_posix_visible
5397 # Some of these niche implementations use copy/paste, double-check...
5398 if test "$cf_cv_xopen_source" = no ; then
5399 test -n "$verbose" && echo " checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
5401 echo "${as_me:-configure}:5401: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
5403 cat >"conftest.$ac_ext" <<_ACEOF
5404 #line 5404 "configure"
5405 #include "confdefs.h"
5407 $ac_includes_default
5413 #ifndef _XOPEN_SOURCE
5414 #error _XOPEN_SOURCE is not defined
5421 rm -f "conftest.$ac_objext"
5422 if { (eval echo "$as_me:5422: \"$ac_compile\"") >&5
5423 (eval $ac_compile) 2>&5
5425 echo "$as_me:5425: \$? = $ac_status" >&5
5426 (exit "$ac_status"); } &&
5427 { ac_try='test -s "conftest.$ac_objext"'
5428 { (eval echo "$as_me:5428: \"$ac_try\"") >&5
5431 echo "$as_me:5431: \$? = $ac_status" >&5
5432 (exit "$ac_status"); }; }; then
5435 echo "$as_me: failed program was:" >&5
5436 cat "conftest.$ac_ext" >&5
5438 { echo "$as_me:5438: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
5439 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
5440 CPPFLAGS="$cf_save_xopen_cppflags"
5442 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5447 if test -n "$cf_xopen_source" ; then
5449 for cf_add_cflags in $cf_xopen_source
5451 case "x$cf_add_cflags" in
5454 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5457 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5458 test "$CFLAGS" != "$cf_old_cflag" || break
5459 test -n "$verbose" && echo " removing old option $cf_add_cflags from CFLAGS" 1>&6
5461 echo "${as_me:-configure}:5461: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
5463 CFLAGS="$cf_old_cflag"
5466 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5469 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5470 test "$CPPFLAGS" != "$cf_old_cflag" || break
5471 test -n "$verbose" && echo " removing old option $cf_add_cflags from CPPFLAGS" 1>&6
5473 echo "${as_me:-configure}:5473: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
5475 CPPFLAGS="$cf_old_cflag"
5484 cf_new_extra_cppflags=
5486 for cf_add_cflags in $cf_add_cflags
5488 case "$cf_fix_cppflags" in
5490 case "$cf_add_cflags" in
5491 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5492 case "$cf_add_cflags" in
5494 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5496 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5497 && test -z "${cf_tst_cflags}" \
5498 && cf_fix_cppflags=yes
5500 if test "$cf_fix_cppflags" = yes ; then
5502 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5503 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5506 elif test "${cf_tst_cflags}" = "\"'" ; then
5508 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5509 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5519 case "$cf_add_cflags" in
5521 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5523 CPPFLAGS=`echo "$CPPFLAGS" | \
5524 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5525 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5530 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5531 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5538 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5539 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5546 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5547 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5549 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5551 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5552 && test -z "${cf_tst_cflags}" \
5553 && cf_fix_cppflags=no
5558 if test -n "$cf_new_cflags" ; then
5559 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
5561 echo "${as_me:-configure}:5561: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
5563 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5564 CFLAGS="${CFLAGS}$cf_new_cflags"
5568 if test -n "$cf_new_cppflags" ; then
5569 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
5571 echo "${as_me:-configure}:5571: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
5573 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5574 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5578 if test -n "$cf_new_extra_cppflags" ; then
5579 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
5581 echo "${as_me:-configure}:5581: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
5583 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5584 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5592 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
5593 echo "$as_me:5593: checking if _XOPEN_SOURCE really is set" >&5
5594 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
5595 cat >"conftest.$ac_ext" <<_ACEOF
5596 #line 5596 "configure"
5597 #include "confdefs.h"
5603 #ifndef _XOPEN_SOURCE
5604 #error _XOPEN_SOURCE is not defined
5610 rm -f "conftest.$ac_objext"
5611 if { (eval echo "$as_me:5611: \"$ac_compile\"") >&5
5612 (eval $ac_compile) 2>&5
5614 echo "$as_me:5614: \$? = $ac_status" >&5
5615 (exit "$ac_status"); } &&
5616 { ac_try='test -s "conftest.$ac_objext"'
5617 { (eval echo "$as_me:5617: \"$ac_try\"") >&5
5620 echo "$as_me:5620: \$? = $ac_status" >&5
5621 (exit "$ac_status"); }; }; then
5622 cf_XOPEN_SOURCE_set=yes
5624 echo "$as_me: failed program was:" >&5
5625 cat "conftest.$ac_ext" >&5
5626 cf_XOPEN_SOURCE_set=no
5628 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5629 echo "$as_me:5629: result: $cf_XOPEN_SOURCE_set" >&5
5630 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
5631 if test "$cf_XOPEN_SOURCE_set" = yes
5633 cat >"conftest.$ac_ext" <<_ACEOF
5634 #line 5634 "configure"
5635 #include "confdefs.h"
5641 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
5642 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
5648 rm -f "conftest.$ac_objext"
5649 if { (eval echo "$as_me:5649: \"$ac_compile\"") >&5
5650 (eval $ac_compile) 2>&5
5652 echo "$as_me:5652: \$? = $ac_status" >&5
5653 (exit "$ac_status"); } &&
5654 { ac_try='test -s "conftest.$ac_objext"'
5655 { (eval echo "$as_me:5655: \"$ac_try\"") >&5
5658 echo "$as_me:5658: \$? = $ac_status" >&5
5659 (exit "$ac_status"); }; }; then
5660 cf_XOPEN_SOURCE_set_ok=yes
5662 echo "$as_me: failed program was:" >&5
5663 cat "conftest.$ac_ext" >&5
5664 cf_XOPEN_SOURCE_set_ok=no
5666 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5667 if test "$cf_XOPEN_SOURCE_set_ok" = no
5669 { echo "$as_me:5669: WARNING: _XOPEN_SOURCE is lower than requested" >&5
5670 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
5674 echo "$as_me:5674: checking if we should define _XOPEN_SOURCE" >&5
5675 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
5676 if test "${cf_cv_xopen_source+set}" = set; then
5677 echo $ECHO_N "(cached) $ECHO_C" >&6
5680 cat >"conftest.$ac_ext" <<_ACEOF
5681 #line 5681 "configure"
5682 #include "confdefs.h"
5684 $ac_includes_default
5690 #ifndef _XOPEN_SOURCE
5691 #error _XOPEN_SOURCE is not defined
5698 rm -f "conftest.$ac_objext"
5699 if { (eval echo "$as_me:5699: \"$ac_compile\"") >&5
5700 (eval $ac_compile) 2>&5
5702 echo "$as_me:5702: \$? = $ac_status" >&5
5703 (exit "$ac_status"); } &&
5704 { ac_try='test -s "conftest.$ac_objext"'
5705 { (eval echo "$as_me:5705: \"$ac_try\"") >&5
5708 echo "$as_me:5708: \$? = $ac_status" >&5
5709 (exit "$ac_status"); }; }; then
5710 cf_cv_xopen_source=no
5712 echo "$as_me: failed program was:" >&5
5713 cat "conftest.$ac_ext" >&5
5716 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5717 CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
5719 cat >"conftest.$ac_ext" <<_ACEOF
5720 #line 5720 "configure"
5721 #include "confdefs.h"
5723 $ac_includes_default
5729 #ifndef _XOPEN_SOURCE
5730 #error _XOPEN_SOURCE is not defined
5737 rm -f "conftest.$ac_objext"
5738 if { (eval echo "$as_me:5738: \"$ac_compile\"") >&5
5739 (eval $ac_compile) 2>&5
5741 echo "$as_me:5741: \$? = $ac_status" >&5
5742 (exit "$ac_status"); } &&
5743 { ac_try='test -s "conftest.$ac_objext"'
5744 { (eval echo "$as_me:5744: \"$ac_try\"") >&5
5747 echo "$as_me:5747: \$? = $ac_status" >&5
5748 (exit "$ac_status"); }; }; then
5749 cf_cv_xopen_source=no
5751 echo "$as_me: failed program was:" >&5
5752 cat "conftest.$ac_ext" >&5
5753 cf_cv_xopen_source=$cf_XOPEN_SOURCE
5755 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5759 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5762 echo "$as_me:5762: result: $cf_cv_xopen_source" >&5
5763 echo "${ECHO_T}$cf_cv_xopen_source" >&6
5765 if test "$cf_cv_xopen_source" != no ; then
5767 CFLAGS=`echo "$CFLAGS" | \
5768 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5769 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5771 CPPFLAGS=`echo "$CPPFLAGS" | \
5772 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
5773 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
5775 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
5777 for cf_add_cflags in $cf_temp_xopen_source
5779 case "x$cf_add_cflags" in
5782 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5785 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5786 test "$CFLAGS" != "$cf_old_cflag" || break
5788 CFLAGS="$cf_old_cflag"
5791 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
5794 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
5795 test "$CPPFLAGS" != "$cf_old_cflag" || break
5797 CPPFLAGS="$cf_old_cflag"
5806 cf_new_extra_cppflags=
5808 for cf_add_cflags in $cf_add_cflags
5810 case "$cf_fix_cppflags" in
5812 case "$cf_add_cflags" in
5813 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5814 case "$cf_add_cflags" in
5816 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5818 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5819 && test -z "${cf_tst_cflags}" \
5820 && cf_fix_cppflags=yes
5822 if test "$cf_fix_cppflags" = yes ; then
5824 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5825 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5828 elif test "${cf_tst_cflags}" = "\"'" ; then
5830 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5831 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5841 case "$cf_add_cflags" in
5843 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5845 CPPFLAGS=`echo "$CPPFLAGS" | \
5846 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5847 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5852 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5853 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5860 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5861 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5868 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5869 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5871 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5873 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5874 && test -z "${cf_tst_cflags}" \
5875 && cf_fix_cppflags=no
5880 if test -n "$cf_new_cflags" ; then
5882 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5883 CFLAGS="${CFLAGS}$cf_new_cflags"
5887 if test -n "$cf_new_cppflags" ; then
5889 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5890 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5894 if test -n "$cf_new_extra_cppflags" ; then
5896 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5897 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5907 fi # cf_cv_posix_visible
5909 echo "$as_me:5909: checking for ANSI C header files" >&5
5910 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5911 if test "${ac_cv_header_stdc+set}" = set; then
5912 echo $ECHO_N "(cached) $ECHO_C" >&6
5914 cat >"conftest.$ac_ext" <<_ACEOF
5915 #line 5915 "configure"
5916 #include "confdefs.h"
5923 if { (eval echo "$as_me:5923: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5924 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5926 $EGREP -v '^ *\+' conftest.er1 >conftest.err
5928 cat conftest.err >&5
5929 echo "$as_me:5929: \$? = $ac_status" >&5
5930 (exit "$ac_status"); } >/dev/null; then
5931 if test -s conftest.err; then
5932 ac_cpp_err=$ac_c_preproc_warn_flag
5939 if test -z "$ac_cpp_err"; then
5940 ac_cv_header_stdc=yes
5942 echo "$as_me: failed program was:" >&5
5943 cat "conftest.$ac_ext" >&5
5944 ac_cv_header_stdc=no
5946 rm -f conftest.err "conftest.$ac_ext"
5948 if test $ac_cv_header_stdc = yes; then
5949 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5950 cat >"conftest.$ac_ext" <<_ACEOF
5951 #line 5951 "configure"
5952 #include "confdefs.h"
5956 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5957 $EGREP "memchr" >/dev/null 2>&1; then
5960 ac_cv_header_stdc=no
5966 if test $ac_cv_header_stdc = yes; then
5967 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5968 cat >"conftest.$ac_ext" <<_ACEOF
5969 #line 5969 "configure"
5970 #include "confdefs.h"
5974 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5975 $EGREP "free" >/dev/null 2>&1; then
5978 ac_cv_header_stdc=no
5984 if test $ac_cv_header_stdc = yes; then
5985 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5986 if test "$cross_compiling" = yes; then
5989 cat >"conftest.$ac_ext" <<_ACEOF
5990 #line 5990 "configure"
5991 #include "confdefs.h"
5993 #if ((' ' & 0x0FF) == 0x020)
5994 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5995 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5997 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
5998 || ('j' <= (c) && (c) <= 'r') \
5999 || ('s' <= (c) && (c) <= 'z'))
6000 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6003 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6008 for (i = 0; i < 256; i++)
6009 if (XOR (islower (i), ISLOWER (i))
6010 || toupper (i) != TOUPPER (i))
6012 $ac_main_return (0);
6015 rm -f "conftest$ac_exeext"
6016 if { (eval echo "$as_me:6016: \"$ac_link\"") >&5
6017 (eval $ac_link) 2>&5
6019 echo "$as_me:6019: \$? = $ac_status" >&5
6020 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6021 { (eval echo "$as_me:6021: \"$ac_try\"") >&5
6024 echo "$as_me:6024: \$? = $ac_status" >&5
6025 (exit "$ac_status"); }; }; then
6028 echo "$as_me: program exited with status $ac_status" >&5
6029 echo "$as_me: failed program was:" >&5
6030 cat "conftest.$ac_ext" >&5
6031 ac_cv_header_stdc=no
6033 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6037 echo "$as_me:6037: result: $ac_cv_header_stdc" >&5
6038 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6039 if test $ac_cv_header_stdc = yes; then
6041 cat >>confdefs.h <<\EOF
6042 #define STDC_HEADERS 1
6047 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6049 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6050 inttypes.h stdint.h unistd.h
6052 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6053 echo "$as_me:6053: checking for $ac_header" >&5
6054 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6055 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6056 echo $ECHO_N "(cached) $ECHO_C" >&6
6058 cat >"conftest.$ac_ext" <<_ACEOF
6059 #line 6059 "configure"
6060 #include "confdefs.h"
6061 $ac_includes_default
6062 #include <$ac_header>
6064 rm -f "conftest.$ac_objext"
6065 if { (eval echo "$as_me:6065: \"$ac_compile\"") >&5
6066 (eval $ac_compile) 2>&5
6068 echo "$as_me:6068: \$? = $ac_status" >&5
6069 (exit "$ac_status"); } &&
6070 { ac_try='test -s "conftest.$ac_objext"'
6071 { (eval echo "$as_me:6071: \"$ac_try\"") >&5
6074 echo "$as_me:6074: \$? = $ac_status" >&5
6075 (exit "$ac_status"); }; }; then
6076 eval "$as_ac_Header=yes"
6078 echo "$as_me: failed program was:" >&5
6079 cat "conftest.$ac_ext" >&5
6080 eval "$as_ac_Header=no"
6082 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6084 echo "$as_me:6084: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6085 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6086 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6087 cat >>confdefs.h <<EOF
6088 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6094 echo "$as_me:6094: checking whether exit is declared" >&5
6095 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
6096 if test "${ac_cv_have_decl_exit+set}" = set; then
6097 echo $ECHO_N "(cached) $ECHO_C" >&6
6099 cat >"conftest.$ac_ext" <<_ACEOF
6100 #line 6100 "configure"
6101 #include "confdefs.h"
6102 $ac_includes_default
6107 char *p = (char *) exit; (void) p;
6114 rm -f "conftest.$ac_objext"
6115 if { (eval echo "$as_me:6115: \"$ac_compile\"") >&5
6116 (eval $ac_compile) 2>&5
6118 echo "$as_me:6118: \$? = $ac_status" >&5
6119 (exit "$ac_status"); } &&
6120 { ac_try='test -s "conftest.$ac_objext"'
6121 { (eval echo "$as_me:6121: \"$ac_try\"") >&5
6124 echo "$as_me:6124: \$? = $ac_status" >&5
6125 (exit "$ac_status"); }; }; then
6126 ac_cv_have_decl_exit=yes
6128 echo "$as_me: failed program was:" >&5
6129 cat "conftest.$ac_ext" >&5
6130 ac_cv_have_decl_exit=no
6132 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6134 echo "$as_me:6134: result: $ac_cv_have_decl_exit" >&5
6135 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
6137 echo "$as_me:6137: checking for signal global datatype" >&5
6138 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
6139 if test "${cf_cv_sig_atomic_t+set}" = set; then
6140 echo $ECHO_N "(cached) $ECHO_C" >&6
6144 "volatile sig_atomic_t" \
6148 cat >"conftest.$ac_ext" <<_ACEOF
6149 #line 6149 "configure"
6150 #include "confdefs.h"
6152 #include <sys/types.h>
6158 static void handler(int sig)
6166 signal(SIGINT, handler);
6172 rm -f "conftest.$ac_objext"
6173 if { (eval echo "$as_me:6173: \"$ac_compile\"") >&5
6174 (eval $ac_compile) 2>&5
6176 echo "$as_me:6176: \$? = $ac_status" >&5
6177 (exit "$ac_status"); } &&
6178 { ac_try='test -s "conftest.$ac_objext"'
6179 { (eval echo "$as_me:6179: \"$ac_try\"") >&5
6182 echo "$as_me:6182: \$? = $ac_status" >&5
6183 (exit "$ac_status"); }; }; then
6184 cf_cv_sig_atomic_t=$cf_type
6186 echo "$as_me: failed program was:" >&5
6187 cat "conftest.$ac_ext" >&5
6188 cf_cv_sig_atomic_t=no
6190 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6191 test "$cf_cv_sig_atomic_t" != no && break
6196 echo "$as_me:6196: result: $cf_cv_sig_atomic_t" >&5
6197 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
6198 test "$cf_cv_sig_atomic_t" != no &&
6199 cat >>confdefs.h <<EOF
6200 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
6203 # Work around breakage on OS X
6205 echo "$as_me:6205: checking if SIGWINCH is defined" >&5
6206 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6207 if test "${cf_cv_define_sigwinch+set}" = set; then
6208 echo $ECHO_N "(cached) $ECHO_C" >&6
6211 cat >"conftest.$ac_ext" <<_ACEOF
6212 #line 6212 "configure"
6213 #include "confdefs.h"
6215 #include <sys/types.h>
6216 #include <sys/signal.h>
6221 int x = SIGWINCH; (void)x
6226 rm -f "conftest.$ac_objext"
6227 if { (eval echo "$as_me:6227: \"$ac_compile\"") >&5
6228 (eval $ac_compile) 2>&5
6230 echo "$as_me:6230: \$? = $ac_status" >&5
6231 (exit "$ac_status"); } &&
6232 { ac_try='test -s "conftest.$ac_objext"'
6233 { (eval echo "$as_me:6233: \"$ac_try\"") >&5
6236 echo "$as_me:6236: \$? = $ac_status" >&5
6237 (exit "$ac_status"); }; }; then
6238 cf_cv_define_sigwinch=yes
6240 echo "$as_me: failed program was:" >&5
6241 cat "conftest.$ac_ext" >&5
6242 cat >"conftest.$ac_ext" <<_ACEOF
6243 #line 6243 "configure"
6244 #include "confdefs.h"
6246 #undef _XOPEN_SOURCE
6247 #undef _POSIX_SOURCE
6248 #undef _POSIX_C_SOURCE
6249 #include <sys/types.h>
6250 #include <sys/signal.h>
6255 int x = SIGWINCH; (void)x
6260 rm -f "conftest.$ac_objext"
6261 if { (eval echo "$as_me:6261: \"$ac_compile\"") >&5
6262 (eval $ac_compile) 2>&5
6264 echo "$as_me:6264: \$? = $ac_status" >&5
6265 (exit "$ac_status"); } &&
6266 { ac_try='test -s "conftest.$ac_objext"'
6267 { (eval echo "$as_me:6267: \"$ac_try\"") >&5
6270 echo "$as_me:6270: \$? = $ac_status" >&5
6271 (exit "$ac_status"); }; }; then
6272 cf_cv_define_sigwinch=maybe
6274 echo "$as_me: failed program was:" >&5
6275 cat "conftest.$ac_ext" >&5
6276 cf_cv_define_sigwinch=no
6278 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6281 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6284 echo "$as_me:6284: result: $cf_cv_define_sigwinch" >&5
6285 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6287 if test "$cf_cv_define_sigwinch" = maybe ; then
6288 echo "$as_me:6288: checking for actual SIGWINCH definition" >&5
6289 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6290 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6291 echo $ECHO_N "(cached) $ECHO_C" >&6
6294 cf_cv_fixup_sigwinch=unknown
6296 while test "$cf_sigwinch" != 1
6298 cat >"conftest.$ac_ext" <<_ACEOF
6299 #line 6299 "configure"
6300 #include "confdefs.h"
6302 #undef _XOPEN_SOURCE
6303 #undef _POSIX_SOURCE
6304 #undef _POSIX_C_SOURCE
6305 #include <sys/types.h>
6306 #include <sys/signal.h>
6312 #if SIGWINCH != $cf_sigwinch
6313 #error SIGWINCH is not $cf_sigwinch
6315 int x = SIGWINCH; (void)x
6320 rm -f "conftest.$ac_objext"
6321 if { (eval echo "$as_me:6321: \"$ac_compile\"") >&5
6322 (eval $ac_compile) 2>&5
6324 echo "$as_me:6324: \$? = $ac_status" >&5
6325 (exit "$ac_status"); } &&
6326 { ac_try='test -s "conftest.$ac_objext"'
6327 { (eval echo "$as_me:6327: \"$ac_try\"") >&5
6330 echo "$as_me:6330: \$? = $ac_status" >&5
6331 (exit "$ac_status"); }; }; then
6332 cf_cv_fixup_sigwinch=$cf_sigwinch
6335 echo "$as_me: failed program was:" >&5
6336 cat "conftest.$ac_ext" >&5
6338 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6340 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
6344 echo "$as_me:6344: result: $cf_cv_fixup_sigwinch" >&5
6345 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
6347 if test "$cf_cv_fixup_sigwinch" != unknown ; then
6348 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
6352 # Checks for CODESET support.
6354 echo "$as_me:6354: checking for nl_langinfo and CODESET" >&5
6355 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
6356 if test "${am_cv_langinfo_codeset+set}" = set; then
6357 echo $ECHO_N "(cached) $ECHO_C" >&6
6359 cat >"conftest.$ac_ext" <<_ACEOF
6360 #line 6360 "configure"
6361 #include "confdefs.h"
6363 $ac_includes_default
6364 #include <langinfo.h>
6368 char* cs = nl_langinfo(CODESET); (void)cs
6373 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6374 if { (eval echo "$as_me:6374: \"$ac_link\"") >&5
6375 (eval $ac_link) 2>&5
6377 echo "$as_me:6377: \$? = $ac_status" >&5
6378 (exit "$ac_status"); } &&
6379 { ac_try='test -s "conftest$ac_exeext"'
6380 { (eval echo "$as_me:6380: \"$ac_try\"") >&5
6383 echo "$as_me:6383: \$? = $ac_status" >&5
6384 (exit "$ac_status"); }; }; then
6385 am_cv_langinfo_codeset=yes
6387 echo "$as_me: failed program was:" >&5
6388 cat "conftest.$ac_ext" >&5
6389 am_cv_langinfo_codeset=no
6391 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6394 echo "$as_me:6394: result: $am_cv_langinfo_codeset" >&5
6395 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
6396 if test "$am_cv_langinfo_codeset" = yes; then
6398 cat >>confdefs.h <<\EOF
6399 #define HAVE_LANGINFO_CODESET 1
6404 echo "$as_me:6404: checking if you want to use pkg-config" >&5
6405 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
6407 # Check whether --with-pkg-config or --without-pkg-config was given.
6408 if test "${with_pkg_config+set}" = set; then
6409 withval="$with_pkg_config"
6410 cf_pkg_config=$withval
6414 echo "$as_me:6414: result: $cf_pkg_config" >&5
6415 echo "${ECHO_T}$cf_pkg_config" >&6
6417 case "$cf_pkg_config" in
6423 if test -n "$ac_tool_prefix"; then
6424 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6425 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6426 echo "$as_me:6426: checking for $ac_word" >&5
6427 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6428 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6429 echo $ECHO_N "(cached) $ECHO_C" >&6
6433 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6436 ac_save_IFS=$IFS; IFS=$ac_path_separator
6438 for ac_dir in $ac_dummy; do
6440 test -z "$ac_dir" && ac_dir=.
6441 if $as_executable_p "$ac_dir/$ac_word"; then
6442 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
6443 echo "$as_me:6443: found $ac_dir/$ac_word" >&5
6451 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6453 if test -n "$PKG_CONFIG"; then
6454 echo "$as_me:6454: result: $PKG_CONFIG" >&5
6455 echo "${ECHO_T}$PKG_CONFIG" >&6
6457 echo "$as_me:6457: result: no" >&5
6458 echo "${ECHO_T}no" >&6
6462 if test -z "$ac_cv_path_PKG_CONFIG"; then
6463 ac_pt_PKG_CONFIG=$PKG_CONFIG
6464 # Extract the first word of "pkg-config", so it can be a program name with args.
6465 set dummy pkg-config; ac_word=$2
6466 echo "$as_me:6466: checking for $ac_word" >&5
6467 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6468 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
6469 echo $ECHO_N "(cached) $ECHO_C" >&6
6471 case $ac_pt_PKG_CONFIG in
6473 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6476 ac_save_IFS=$IFS; IFS=$ac_path_separator
6478 for ac_dir in $ac_dummy; do
6480 test -z "$ac_dir" && ac_dir=.
6481 if $as_executable_p "$ac_dir/$ac_word"; then
6482 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
6483 echo "$as_me:6483: found $ac_dir/$ac_word" >&5
6488 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
6492 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6494 if test -n "$ac_pt_PKG_CONFIG"; then
6495 echo "$as_me:6495: result: $ac_pt_PKG_CONFIG" >&5
6496 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
6498 echo "$as_me:6498: result: no" >&5
6499 echo "${ECHO_T}no" >&6
6502 PKG_CONFIG=$ac_pt_PKG_CONFIG
6504 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6513 test -z "$PKG_CONFIG" && PKG_CONFIG=none
6514 if test "$PKG_CONFIG" != none ; then
6516 if test "x$prefix" != xNONE; then
6517 cf_path_syntax="$prefix"
6519 cf_path_syntax="$ac_default_prefix"
6522 case ".$PKG_CONFIG" in
6527 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
6529 (.\$\{*prefix\}*|.\$\{*dir\}*)
6530 eval PKG_CONFIG="$PKG_CONFIG"
6531 case ".$PKG_CONFIG" in
6533 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
6538 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
6541 { { echo "$as_me:6541: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
6542 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
6543 { (exit 1); exit 1; }; }
6547 elif test "x$cf_pkg_config" != xno ; then
6548 { echo "$as_me:6548: WARNING: pkg-config is not installed" >&5
6549 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
6552 echo "$as_me:6552: checking if you want to see long compiling messages" >&5
6553 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
6555 # Check whether --enable-echo or --disable-echo was given.
6556 if test "${enable_echo+set}" = set; then
6557 enableval="$enable_echo"
6558 test "$enableval" != no && enableval=yes
6559 if test "$enableval" != "yes" ; then
6562 ECHO_LD='@echo linking $@;'
6563 RULE_CC='@echo compiling $<'
6564 SHOW_CC='@echo compiling $@'
6586 echo "$as_me:6586: result: $enableval" >&5
6587 echo "${ECHO_T}$enableval" >&6
6589 echo "$as_me:6589: checking for ncurses wrap-prefix" >&5
6590 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
6592 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
6593 if test "${with_ncurses_wrap_prefix+set}" = set; then
6594 withval="$with_ncurses_wrap_prefix"
6595 NCURSES_WRAP_PREFIX=$withval
6597 NCURSES_WRAP_PREFIX=_nc_
6599 echo "$as_me:6599: result: $NCURSES_WRAP_PREFIX" >&5
6600 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
6602 echo "$as_me:6602: checking if you want to check for wide-character functions" >&5
6603 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
6605 # Check whether --enable-widec or --disable-widec was given.
6606 if test "${enable_widec+set}" = set; then
6607 enableval="$enable_widec"
6608 test "$enableval" != no && enableval=yes
6609 if test "$enableval" != "yes" ; then
6619 echo "$as_me:6619: result: $cf_enable_widec" >&5
6620 echo "${ECHO_T}$cf_enable_widec" >&6
6622 echo "$as_me:6622: checking for specific curses-directory" >&5
6623 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
6625 # Check whether --with-curses-dir or --without-curses-dir was given.
6626 if test "${with_curses_dir+set}" = set; then
6627 withval="$with_curses_dir"
6628 cf_cv_curses_dir=$withval
6632 echo "$as_me:6632: result: $cf_cv_curses_dir" >&5
6633 echo "${ECHO_T}$cf_cv_curses_dir" >&6
6635 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
6638 if test "x$prefix" != xNONE; then
6639 cf_path_syntax="$prefix"
6641 cf_path_syntax="$ac_default_prefix"
6649 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
6651 (.\$\{*prefix\}*|.\$\{*dir\}*)
6652 eval withval="$withval"
6655 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
6660 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
6663 { { echo "$as_me:6663: error: expected a pathname, not \"$withval\"" >&5
6664 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6665 { (exit 1); exit 1; }; }
6669 if test -d "$cf_cv_curses_dir"
6672 if test -n "$cf_cv_curses_dir/include" ; then
6673 for cf_add_incdir in $cf_cv_curses_dir/include
6675 while test "$cf_add_incdir" != /usr/include
6677 if test -d "$cf_add_incdir"
6680 if test -n "$CFLAGS$CPPFLAGS" ; then
6681 # a loop is needed to ensure we can add subdirs of existing dirs
6682 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6683 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6684 cf_have_incdir=yes; break
6689 if test "$cf_have_incdir" = no ; then
6690 if test "$cf_add_incdir" = /usr/local/include ; then
6691 if test "$GCC" = yes
6693 cf_save_CPPFLAGS=$CPPFLAGS
6695 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6696 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
6698 cat >"conftest.$ac_ext" <<_ACEOF
6699 #line 6699 "configure"
6700 #include "confdefs.h"
6710 rm -f "conftest.$ac_objext"
6711 if { (eval echo "$as_me:6711: \"$ac_compile\"") >&5
6712 (eval $ac_compile) 2>&5
6714 echo "$as_me:6714: \$? = $ac_status" >&5
6715 (exit "$ac_status"); } &&
6716 { ac_try='test -s "conftest.$ac_objext"'
6717 { (eval echo "$as_me:6717: \"$ac_try\"") >&5
6720 echo "$as_me:6720: \$? = $ac_status" >&5
6721 (exit "$ac_status"); }; }; then
6724 echo "$as_me: failed program was:" >&5
6725 cat "conftest.$ac_ext" >&5
6728 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6729 CPPFLAGS=$cf_save_CPPFLAGS
6734 if test "$cf_have_incdir" = no ; then
6735 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6737 echo "${as_me:-configure}:6737: testing adding $cf_add_incdir to include-path ..." 1>&5
6739 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6741 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
6742 test "$cf_top_incdir" = "$cf_add_incdir" && break
6743 cf_add_incdir="$cf_top_incdir"
6754 if test -n "$cf_cv_curses_dir/lib" ; then
6755 for cf_add_libdir in $cf_cv_curses_dir/lib
6757 if test "$cf_add_libdir" = /usr/lib ; then
6759 elif test -d "$cf_add_libdir"
6762 if test -n "$LDFLAGS$LIBS" ; then
6763 # a loop is needed to ensure we can add subdirs of existing dirs
6764 for cf_test_libdir in $LDFLAGS $LIBS ; do
6765 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6766 cf_have_libdir=yes; break
6770 if test "$cf_have_libdir" = no ; then
6771 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6773 echo "${as_me:-configure}:6773: testing adding $cf_add_libdir to library-path ..." 1>&5
6775 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6786 echo "$as_me:6786: checking for specified curses library type" >&5
6787 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
6789 # Check whether --with-screen or --without-screen was given.
6790 if test "${with_screen+set}" = set; then
6791 withval="$with_screen"
6792 cf_cv_screen=$withval
6795 # Check whether --with-ncursesw or --without-ncursesw was given.
6796 if test "${with_ncursesw+set}" = set; then
6797 withval="$with_ncursesw"
6798 cf_cv_screen=ncursesw
6801 # Check whether --with-ncurses or --without-ncurses was given.
6802 if test "${with_ncurses+set}" = set; then
6803 withval="$with_ncurses"
6804 cf_cv_screen=ncurses
6807 # Check whether --with-pdcurses or --without-pdcurses was given.
6808 if test "${with_pdcurses+set}" = set; then
6809 withval="$with_pdcurses"
6810 cf_cv_screen=pdcurses
6813 # Check whether --with-curses-colr or --without-curses-colr was given.
6814 if test "${with_curses_colr+set}" = set; then
6815 withval="$with_curses_colr"
6816 cf_cv_screen=curses_colr
6819 # Check whether --with-curses-5lib or --without-curses-5lib was given.
6820 if test "${with_curses_5lib+set}" = set; then
6821 withval="$with_curses_5lib"
6822 cf_cv_screen=curses_5lib
6830 echo "$as_me:6830: result: $cf_cv_screen" >&5
6831 echo "${ECHO_T}$cf_cv_screen" >&6
6833 case $cf_cv_screen in
6836 echo "$as_me:6836: checking for extra include directories" >&5
6837 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
6838 if test "${cf_cv_curses_incdir+set}" = set; then
6839 echo $ECHO_N "(cached) $ECHO_C" >&6
6842 cf_cv_curses_incdir=no
6845 if test "x$cf_cv_screen" = "xcurses_colr"
6847 test -d /usr/include/curses_colr && \
6848 cf_cv_curses_incdir="-I/usr/include/curses_colr"
6852 if test "x$cf_cv_screen" = "xcurses_5lib"
6854 test -d /usr/5lib && \
6855 test -d /usr/5include && \
6856 cf_cv_curses_incdir="-I/usr/5include"
6862 echo "$as_me:6862: result: $cf_cv_curses_incdir" >&5
6863 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
6864 if test "$cf_cv_curses_incdir" != no
6867 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6868 CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
6872 echo "$as_me:6872: checking if we have identified curses headers" >&5
6873 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6874 if test "${cf_cv_ncurses_header+set}" = set; then
6875 echo $ECHO_N "(cached) $ECHO_C" >&6
6878 cf_cv_ncurses_header=none
6881 curses.h ncurses/ncurses.h ncurses/curses.h
6883 cat >"conftest.$ac_ext" <<_ACEOF
6884 #line 6884 "configure"
6885 #include "confdefs.h"
6886 #include <${cf_header}>
6895 rm -f "conftest.$ac_objext"
6896 if { (eval echo "$as_me:6896: \"$ac_compile\"") >&5
6897 (eval $ac_compile) 2>&5
6899 echo "$as_me:6899: \$? = $ac_status" >&5
6900 (exit "$ac_status"); } &&
6901 { ac_try='test -s "conftest.$ac_objext"'
6902 { (eval echo "$as_me:6902: \"$ac_try\"") >&5
6905 echo "$as_me:6905: \$? = $ac_status" >&5
6906 (exit "$ac_status"); }; }; then
6907 cf_cv_ncurses_header=$cf_header; break
6909 echo "$as_me: failed program was:" >&5
6910 cat "conftest.$ac_ext" >&5
6912 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6916 echo "$as_me:6916: result: $cf_cv_ncurses_header" >&5
6917 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6919 if test "$cf_cv_ncurses_header" = none ; then
6920 { { echo "$as_me:6920: error: No curses header-files found" >&5
6921 echo "$as_me: error: No curses header-files found" >&2;}
6922 { (exit 1); exit 1; }; }
6925 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6927 for ac_header in $cf_cv_ncurses_header
6929 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6930 echo "$as_me:6930: checking for $ac_header" >&5
6931 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6932 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6933 echo $ECHO_N "(cached) $ECHO_C" >&6
6935 cat >"conftest.$ac_ext" <<_ACEOF
6936 #line 6936 "configure"
6937 #include "confdefs.h"
6938 #include <$ac_header>
6940 if { (eval echo "$as_me:6940: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6941 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6943 $EGREP -v '^ *\+' conftest.er1 >conftest.err
6945 cat conftest.err >&5
6946 echo "$as_me:6946: \$? = $ac_status" >&5
6947 (exit "$ac_status"); } >/dev/null; then
6948 if test -s conftest.err; then
6949 ac_cpp_err=$ac_c_preproc_warn_flag
6956 if test -z "$ac_cpp_err"; then
6957 eval "$as_ac_Header=yes"
6959 echo "$as_me: failed program was:" >&5
6960 cat "conftest.$ac_ext" >&5
6961 eval "$as_ac_Header=no"
6963 rm -f conftest.err "conftest.$ac_ext"
6965 echo "$as_me:6965: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6966 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6967 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6968 cat >>confdefs.h <<EOF
6969 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6975 echo "$as_me:6975: checking for terminfo header" >&5
6976 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6977 if test "${cf_cv_term_header+set}" = set; then
6978 echo $ECHO_N "(cached) $ECHO_C" >&6
6981 case "${cf_cv_ncurses_header}" in
6982 (*/ncurses.h|*/ncursesw.h)
6983 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6986 cf_term_header=term.h
6990 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6992 cat >"conftest.$ac_ext" <<_ACEOF
6993 #line 6993 "configure"
6994 #include "confdefs.h"
6996 #include <${cf_cv_ncurses_header:-curses.h}>
7002 int x = auto_left_margin; (void)x
7007 rm -f "conftest.$ac_objext"
7008 if { (eval echo "$as_me:7008: \"$ac_compile\"") >&5
7009 (eval $ac_compile) 2>&5
7011 echo "$as_me:7011: \$? = $ac_status" >&5
7012 (exit "$ac_status"); } &&
7013 { ac_try='test -s "conftest.$ac_objext"'
7014 { (eval echo "$as_me:7014: \"$ac_try\"") >&5
7017 echo "$as_me:7017: \$? = $ac_status" >&5
7018 (exit "$ac_status"); }; }; then
7020 cf_cv_term_header="$cf_test"
7022 echo "$as_me: failed program was:" >&5
7023 cat "conftest.$ac_ext" >&5
7025 cf_cv_term_header=unknown
7028 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7029 test "$cf_cv_term_header" != unknown && break
7033 echo "$as_me:7033: result: $cf_cv_term_header" >&5
7034 echo "${ECHO_T}$cf_cv_term_header" >&6
7036 # Set definitions to allow ifdef'ing to accommodate subdirectories
7038 case "$cf_cv_term_header" in
7041 cat >>confdefs.h <<\EOF
7042 #define HAVE_TERM_H 1
7048 case "$cf_cv_term_header" in
7051 cat >>confdefs.h <<\EOF
7052 #define HAVE_NCURSES_TERM_H 1
7058 cat >>confdefs.h <<\EOF
7059 #define HAVE_NCURSESW_TERM_H 1
7065 echo "$as_me:7065: checking for ncurses version" >&5
7066 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7067 if test "${cf_cv_ncurses_version+set}" = set; then
7068 echo $ECHO_N "(cached) $ECHO_C" >&6
7071 cf_cv_ncurses_version=no
7073 rm -f "$cf_tempfile"
7074 if test "$cross_compiling" = yes; then
7076 # This will not work if the preprocessor splits the line after the
7077 # Autoconf token. The 'unproto' program does that.
7078 cat > "conftest.$ac_ext" <<EOF
7079 #include <${cf_cv_ncurses_header:-curses.h}>
7081 #ifdef NCURSES_VERSION
7082 Autoconf NCURSES_VERSION
7090 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7091 { (eval echo "$as_me:7091: \"$cf_try\"") >&5
7094 echo "$as_me:7094: \$? = $ac_status" >&5
7095 (exit "$ac_status"); }
7096 if test -f conftest.out ; then
7097 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
7098 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7103 cat >"conftest.$ac_ext" <<_ACEOF
7104 #line 7104 "configure"
7105 #include "confdefs.h"
7107 $ac_includes_default
7109 #include <${cf_cv_ncurses_header:-curses.h}>
7113 FILE *fp = fopen("$cf_tempfile", "w");
7114 #ifdef NCURSES_VERSION
7115 # ifdef NCURSES_VERSION_PATCH
7116 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7118 fprintf(fp, "%s\\n", NCURSES_VERSION);
7122 fprintf(fp, "old\\n");
7127 ${cf_cv_main_return:-return}(0);
7130 rm -f "conftest$ac_exeext"
7131 if { (eval echo "$as_me:7131: \"$ac_link\"") >&5
7132 (eval $ac_link) 2>&5
7134 echo "$as_me:7134: \$? = $ac_status" >&5
7135 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
7136 { (eval echo "$as_me:7136: \"$ac_try\"") >&5
7139 echo "$as_me:7139: \$? = $ac_status" >&5
7140 (exit "$ac_status"); }; }; then
7142 cf_cv_ncurses_version=`cat $cf_tempfile`
7144 echo "$as_me: program exited with status $ac_status" >&5
7145 echo "$as_me: failed program was:" >&5
7146 cat "conftest.$ac_ext" >&5
7148 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
7150 rm -f "$cf_tempfile"
7153 echo "$as_me:7153: result: $cf_cv_ncurses_version" >&5
7154 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7155 test "$cf_cv_ncurses_version" = no ||
7156 cat >>confdefs.h <<\EOF
7160 echo "$as_me:7160: checking if we have identified curses libraries" >&5
7161 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
7162 cat >"conftest.$ac_ext" <<_ACEOF
7163 #line 7163 "configure"
7164 #include "confdefs.h"
7165 #include <${cf_cv_ncurses_header:-curses.h}>
7174 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7175 if { (eval echo "$as_me:7175: \"$ac_link\"") >&5
7176 (eval $ac_link) 2>&5
7178 echo "$as_me:7178: \$? = $ac_status" >&5
7179 (exit "$ac_status"); } &&
7180 { ac_try='test -s "conftest$ac_exeext"'
7181 { (eval echo "$as_me:7181: \"$ac_try\"") >&5
7184 echo "$as_me:7184: \$? = $ac_status" >&5
7185 (exit "$ac_status"); }; }; then
7188 echo "$as_me: failed program was:" >&5
7189 cat "conftest.$ac_ext" >&5
7192 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7193 echo "$as_me:7193: result: $cf_result" >&5
7194 echo "${ECHO_T}$cf_result" >&6
7196 if test "$cf_result" = no ; then
7199 echo "$as_me:7199: checking for tgoto in -lmytinfo" >&5
7200 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7201 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7202 echo $ECHO_N "(cached) $ECHO_C" >&6
7204 ac_check_lib_save_LIBS=$LIBS
7205 LIBS="-lmytinfo $LIBS"
7206 cat >"conftest.$ac_ext" <<_ACEOF
7207 #line 7207 "configure"
7208 #include "confdefs.h"
7210 /* Override any gcc2 internal prototype to avoid an error. */
7214 /* We use char because int might match the return type of a gcc2
7215 builtin and then its argument prototype would still apply. */
7225 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7226 if { (eval echo "$as_me:7226: \"$ac_link\"") >&5
7227 (eval $ac_link) 2>&5
7229 echo "$as_me:7229: \$? = $ac_status" >&5
7230 (exit "$ac_status"); } &&
7231 { ac_try='test -s "conftest$ac_exeext"'
7232 { (eval echo "$as_me:7232: \"$ac_try\"") >&5
7235 echo "$as_me:7235: \$? = $ac_status" >&5
7236 (exit "$ac_status"); }; }; then
7237 ac_cv_lib_mytinfo_tgoto=yes
7239 echo "$as_me: failed program was:" >&5
7240 cat "conftest.$ac_ext" >&5
7241 ac_cv_lib_mytinfo_tgoto=no
7243 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7244 LIBS=$ac_check_lib_save_LIBS
7246 echo "$as_me:7246: result: $ac_cv_lib_mytinfo_tgoto" >&5
7247 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7248 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
7253 for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7255 for cf_add_1lib in $cf_add_0lib; do
7256 for cf_add_2lib in $cf_add_libs; do
7257 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7262 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7270 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
7271 # next (1998), and xcurses "newer" (2000). There is no header file for
7272 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
7273 # term.h) for cur_colr
7274 if test "x$cf_cv_screen" = "xcurses_colr"
7276 echo "$as_me:7276: checking for initscr in -lcur_colr" >&5
7277 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
7278 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
7279 echo $ECHO_N "(cached) $ECHO_C" >&6
7281 ac_check_lib_save_LIBS=$LIBS
7282 LIBS="-lcur_colr $LIBS"
7283 cat >"conftest.$ac_ext" <<_ACEOF
7284 #line 7284 "configure"
7285 #include "confdefs.h"
7287 /* Override any gcc2 internal prototype to avoid an error. */
7291 /* We use char because int might match the return type of a gcc2
7292 builtin and then its argument prototype would still apply. */
7302 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7303 if { (eval echo "$as_me:7303: \"$ac_link\"") >&5
7304 (eval $ac_link) 2>&5
7306 echo "$as_me:7306: \$? = $ac_status" >&5
7307 (exit "$ac_status"); } &&
7308 { ac_try='test -s "conftest$ac_exeext"'
7309 { (eval echo "$as_me:7309: \"$ac_try\"") >&5
7312 echo "$as_me:7312: \$? = $ac_status" >&5
7313 (exit "$ac_status"); }; }; then
7314 ac_cv_lib_cur_colr_initscr=yes
7316 echo "$as_me: failed program was:" >&5
7317 cat "conftest.$ac_ext" >&5
7318 ac_cv_lib_cur_colr_initscr=no
7320 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7321 LIBS=$ac_check_lib_save_LIBS
7323 echo "$as_me:7323: result: $ac_cv_lib_cur_colr_initscr" >&5
7324 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
7325 if test "$ac_cv_lib_cur_colr_initscr" = yes; then
7330 for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7332 for cf_add_1lib in $cf_add_0lib; do
7333 for cf_add_2lib in $cf_add_libs; do
7334 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7339 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7343 ac_cv_func_initscr=yes
7347 echo "$as_me:7347: checking for initscr in -lHcurses" >&5
7348 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
7349 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
7350 echo $ECHO_N "(cached) $ECHO_C" >&6
7352 ac_check_lib_save_LIBS=$LIBS
7353 LIBS="-lHcurses $LIBS"
7354 cat >"conftest.$ac_ext" <<_ACEOF
7355 #line 7355 "configure"
7356 #include "confdefs.h"
7358 /* Override any gcc2 internal prototype to avoid an error. */
7362 /* We use char because int might match the return type of a gcc2
7363 builtin and then its argument prototype would still apply. */
7373 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7374 if { (eval echo "$as_me:7374: \"$ac_link\"") >&5
7375 (eval $ac_link) 2>&5
7377 echo "$as_me:7377: \$? = $ac_status" >&5
7378 (exit "$ac_status"); } &&
7379 { ac_try='test -s "conftest$ac_exeext"'
7380 { (eval echo "$as_me:7380: \"$ac_try\"") >&5
7383 echo "$as_me:7383: \$? = $ac_status" >&5
7384 (exit "$ac_status"); }; }; then
7385 ac_cv_lib_Hcurses_initscr=yes
7387 echo "$as_me: failed program was:" >&5
7388 cat "conftest.$ac_ext" >&5
7389 ac_cv_lib_Hcurses_initscr=no
7391 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7392 LIBS=$ac_check_lib_save_LIBS
7394 echo "$as_me:7394: result: $ac_cv_lib_Hcurses_initscr" >&5
7395 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
7396 if test "$ac_cv_lib_Hcurses_initscr" = yes; then
7398 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
7403 for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7405 for cf_add_1lib in $cf_add_0lib; do
7406 for cf_add_2lib in $cf_add_libs; do
7407 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7412 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7416 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7417 CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
7419 ac_cv_func_initscr=yes
7428 case `arch 2>/dev/null` in
7433 if test -n "/lib64" ; then
7434 for cf_add_libdir in /lib64
7436 if test "$cf_add_libdir" = /usr/lib ; then
7438 elif test -d "$cf_add_libdir"
7441 if test -n "$LDFLAGS$LIBS" ; then
7442 # a loop is needed to ensure we can add subdirs of existing dirs
7443 for cf_test_libdir in $LDFLAGS $LIBS ; do
7444 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7445 cf_have_libdir=yes; break
7449 if test "$cf_have_libdir" = no ; then
7450 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7452 echo "${as_me:-configure}:7452: testing adding $cf_add_libdir to library-path ..." 1>&5
7454 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7462 if test -n "/lib" ; then
7463 for cf_add_libdir in /lib
7465 if test "$cf_add_libdir" = /usr/lib ; then
7467 elif test -d "$cf_add_libdir"
7470 if test -n "$LDFLAGS$LIBS" ; then
7471 # a loop is needed to ensure we can add subdirs of existing dirs
7472 for cf_test_libdir in $LDFLAGS $LIBS ; do
7473 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7474 cf_have_libdir=yes; break
7478 if test "$cf_have_libdir" = no ; then
7479 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7481 echo "${as_me:-configure}:7481: testing adding $cf_add_libdir to library-path ..." 1>&5
7483 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7493 if test -n "/lib" ; then
7494 for cf_add_libdir in /lib
7496 if test "$cf_add_libdir" = /usr/lib ; then
7498 elif test -d "$cf_add_libdir"
7501 if test -n "$LDFLAGS$LIBS" ; then
7502 # a loop is needed to ensure we can add subdirs of existing dirs
7503 for cf_test_libdir in $LDFLAGS $LIBS ; do
7504 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7505 cf_have_libdir=yes; break
7509 if test "$cf_have_libdir" = no ; then
7510 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7512 echo "${as_me:-configure}:7512: testing adding $cf_add_libdir to library-path ..." 1>&5
7514 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7524 if test "x$cf_cv_screen" = "xcurses_5lib"
7526 if test -d /usr/5lib ; then
7528 if test -n "/usr/5lib" ; then
7529 for cf_add_libdir in /usr/5lib
7531 if test "$cf_add_libdir" = /usr/lib ; then
7533 elif test -d "$cf_add_libdir"
7536 if test -n "$LDFLAGS$LIBS" ; then
7537 # a loop is needed to ensure we can add subdirs of existing dirs
7538 for cf_test_libdir in $LDFLAGS $LIBS ; do
7539 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7540 cf_have_libdir=yes; break
7544 if test "$cf_have_libdir" = no ; then
7545 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
7547 echo "${as_me:-configure}:7547: testing adding $cf_add_libdir to library-path ..." 1>&5
7549 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7558 for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7560 for cf_add_1lib in $cf_add_0lib; do
7561 for cf_add_2lib in $cf_add_libs; do
7562 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7567 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7573 ac_cv_func_initscr=yes
7577 if test ".$ac_cv_func_initscr" != .yes ; then
7578 cf_save_LIBS="$LIBS"
7580 if test ".${cf_cv_ncurses_version:-no}" != .no
7582 cf_check_list="ncurses curses cursesX"
7584 cf_check_list="cursesX curses ncurses"
7587 # Check for library containing tgoto. Do this before curses library
7588 # because it may be needed to link the test-case for initscr.
7589 if test "x$cf_term_lib" = x
7591 echo "$as_me:7591: checking for tgoto" >&5
7592 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
7593 if test "${ac_cv_func_tgoto+set}" = set; then
7594 echo $ECHO_N "(cached) $ECHO_C" >&6
7596 cat >"conftest.$ac_ext" <<_ACEOF
7597 #line 7597 "configure"
7598 #include "confdefs.h"
7599 #define tgoto autoconf_temporary
7600 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
7607 /* We use char because int might match the return type of a gcc2
7608 builtin and then its argument prototype would still apply. */
7615 /* The GNU C library defines stubs for functions which it implements
7616 to always fail with ENOSYS. Some functions are actually named
7617 something starting with __ and the normal name is an alias. */
7618 #if defined (__stub_tgoto) || defined (__stub___tgoto)
7619 #error found stub for tgoto
7627 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7628 if { (eval echo "$as_me:7628: \"$ac_link\"") >&5
7629 (eval $ac_link) 2>&5
7631 echo "$as_me:7631: \$? = $ac_status" >&5
7632 (exit "$ac_status"); } &&
7633 { ac_try='test -s "conftest$ac_exeext"'
7634 { (eval echo "$as_me:7634: \"$ac_try\"") >&5
7637 echo "$as_me:7637: \$? = $ac_status" >&5
7638 (exit "$ac_status"); }; }; then
7639 ac_cv_func_tgoto=yes
7641 echo "$as_me: failed program was:" >&5
7642 cat "conftest.$ac_ext" >&5
7645 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7647 echo "$as_me:7647: result: $ac_cv_func_tgoto" >&5
7648 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
7649 if test "$ac_cv_func_tgoto" = yes; then
7650 cf_term_lib=predefined
7653 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
7655 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
7656 echo "$as_me:7656: checking for tgoto in -l$cf_term_lib" >&5
7657 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
7658 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
7659 echo $ECHO_N "(cached) $ECHO_C" >&6
7661 ac_check_lib_save_LIBS=$LIBS
7662 LIBS="-l$cf_term_lib $LIBS"
7663 cat >"conftest.$ac_ext" <<_ACEOF
7664 #line 7664 "configure"
7665 #include "confdefs.h"
7667 /* Override any gcc2 internal prototype to avoid an error. */
7671 /* We use char because int might match the return type of a gcc2
7672 builtin and then its argument prototype would still apply. */
7682 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7683 if { (eval echo "$as_me:7683: \"$ac_link\"") >&5
7684 (eval $ac_link) 2>&5
7686 echo "$as_me:7686: \$? = $ac_status" >&5
7687 (exit "$ac_status"); } &&
7688 { ac_try='test -s "conftest$ac_exeext"'
7689 { (eval echo "$as_me:7689: \"$ac_try\"") >&5
7692 echo "$as_me:7692: \$? = $ac_status" >&5
7693 (exit "$ac_status"); }; }; then
7694 eval "$as_ac_Lib=yes"
7696 echo "$as_me: failed program was:" >&5
7697 cat "conftest.$ac_ext" >&5
7698 eval "$as_ac_Lib=no"
7700 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7701 LIBS=$ac_check_lib_save_LIBS
7703 echo "$as_me:7703: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
7704 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
7705 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
7707 : "${cf_nculib_root:=$cf_term_lib}"
7718 # Check for library containing initscr
7719 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
7720 if test "x$cf_curs_lib" = x
7722 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
7724 LIBS="-l$cf_curs_lib $cf_save_LIBS"
7725 if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
7726 echo "$as_me:7726: checking if we can link with $cf_curs_lib library" >&5
7727 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
7728 cat >"conftest.$ac_ext" <<_ACEOF
7729 #line 7729 "configure"
7730 #include "confdefs.h"
7731 #include <${cf_cv_ncurses_header:-curses.h}>
7740 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7741 if { (eval echo "$as_me:7741: \"$ac_link\"") >&5
7742 (eval $ac_link) 2>&5
7744 echo "$as_me:7744: \$? = $ac_status" >&5
7745 (exit "$ac_status"); } &&
7746 { ac_try='test -s "conftest$ac_exeext"'
7747 { (eval echo "$as_me:7747: \"$ac_try\"") >&5
7750 echo "$as_me:7750: \$? = $ac_status" >&5
7751 (exit "$ac_status"); }; }; then
7754 echo "$as_me: failed program was:" >&5
7755 cat "conftest.$ac_ext" >&5
7758 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7759 echo "$as_me:7759: result: $cf_result" >&5
7760 echo "${ECHO_T}$cf_result" >&6
7761 test "$cf_result" = yes && break
7762 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
7764 elif test "$cf_term_lib" != predefined ; then
7765 echo "$as_me:7765: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
7766 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
7767 cat >"conftest.$ac_ext" <<_ACEOF
7768 #line 7768 "configure"
7769 #include "confdefs.h"
7770 #include <${cf_cv_ncurses_header:-curses.h}>
7774 initscr(); endwin();
7779 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7780 if { (eval echo "$as_me:7780: \"$ac_link\"") >&5
7781 (eval $ac_link) 2>&5
7783 echo "$as_me:7783: \$? = $ac_status" >&5
7784 (exit "$ac_status"); } &&
7785 { ac_try='test -s "conftest$ac_exeext"'
7786 { (eval echo "$as_me:7786: \"$ac_try\"") >&5
7789 echo "$as_me:7789: \$? = $ac_status" >&5
7790 (exit "$ac_status"); }; }; then
7793 echo "$as_me: failed program was:" >&5
7794 cat "conftest.$ac_ext" >&5
7796 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
7797 cat >"conftest.$ac_ext" <<_ACEOF
7798 #line 7798 "configure"
7799 #include "confdefs.h"
7800 #include <${cf_cv_ncurses_header:-curses.h}>
7809 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7810 if { (eval echo "$as_me:7810: \"$ac_link\"") >&5
7811 (eval $ac_link) 2>&5
7813 echo "$as_me:7813: \$? = $ac_status" >&5
7814 (exit "$ac_status"); } &&
7815 { ac_try='test -s "conftest$ac_exeext"'
7816 { (eval echo "$as_me:7816: \"$ac_try\"") >&5
7819 echo "$as_me:7819: \$? = $ac_status" >&5
7820 (exit "$ac_status"); }; }; then
7823 echo "$as_me: failed program was:" >&5
7824 cat "conftest.$ac_ext" >&5
7827 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7830 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7831 echo "$as_me:7831: result: $cf_result" >&5
7832 echo "${ECHO_T}$cf_result" >&6
7833 test "$cf_result" != error && break
7837 test "$cf_curs_lib" = unknown && { { echo "$as_me:7837: error: no curses library found" >&5
7838 echo "$as_me: error: no curses library found" >&2;}
7839 { (exit 1); exit 1; }; }
7846 for ac_header in wchar.h
7848 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7849 echo "$as_me:7849: checking for $ac_header" >&5
7850 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7851 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7852 echo $ECHO_N "(cached) $ECHO_C" >&6
7854 cat >"conftest.$ac_ext" <<_ACEOF
7855 #line 7855 "configure"
7856 #include "confdefs.h"
7857 #include <$ac_header>
7859 if { (eval echo "$as_me:7859: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7860 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7862 $EGREP -v '^ *\+' conftest.er1 >conftest.err
7864 cat conftest.err >&5
7865 echo "$as_me:7865: \$? = $ac_status" >&5
7866 (exit "$ac_status"); } >/dev/null; then
7867 if test -s conftest.err; then
7868 ac_cpp_err=$ac_c_preproc_warn_flag
7875 if test -z "$ac_cpp_err"; then
7876 eval "$as_ac_Header=yes"
7878 echo "$as_me: failed program was:" >&5
7879 cat "conftest.$ac_ext" >&5
7880 eval "$as_ac_Header=no"
7882 rm -f conftest.err "conftest.$ac_ext"
7884 echo "$as_me:7884: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7885 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7886 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7887 cat >>confdefs.h <<EOF
7888 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7894 echo "$as_me:7894: checking for multibyte character support" >&5
7895 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7896 if test "${cf_cv_utf8_lib+set}" = set; then
7897 echo $ECHO_N "(cached) $ECHO_C" >&6
7900 cf_save_LIBS="$LIBS"
7901 cat >"conftest.$ac_ext" <<_ACEOF
7902 #line 7902 "configure"
7903 #include "confdefs.h"
7905 $ac_includes_default
7918 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7919 if { (eval echo "$as_me:7919: \"$ac_link\"") >&5
7920 (eval $ac_link) 2>&5
7922 echo "$as_me:7922: \$? = $ac_status" >&5
7923 (exit "$ac_status"); } &&
7924 { ac_try='test -s "conftest$ac_exeext"'
7925 { (eval echo "$as_me:7925: \"$ac_try\"") >&5
7928 echo "$as_me:7928: \$? = $ac_status" >&5
7929 (exit "$ac_status"); }; }; then
7932 echo "$as_me: failed program was:" >&5
7933 cat "conftest.$ac_ext" >&5
7935 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7936 # will be set on completion of the AC_TRY_LINK below.
7937 cf_cv_header_path_utf8=
7938 cf_cv_library_path_utf8=
7940 echo "${as_me:-configure}:7940: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7942 cf_save_LIBS="$LIBS"
7944 cat >"conftest.$ac_ext" <<_ACEOF
7945 #line 7945 "configure"
7946 #include "confdefs.h"
7948 #include <libutf8.h>
7957 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7958 if { (eval echo "$as_me:7958: \"$ac_link\"") >&5
7959 (eval $ac_link) 2>&5
7961 echo "$as_me:7961: \$? = $ac_status" >&5
7962 (exit "$ac_status"); } &&
7963 { ac_try='test -s "conftest$ac_exeext"'
7964 { (eval echo "$as_me:7964: \"$ac_try\"") >&5
7967 echo "$as_me:7967: \$? = $ac_status" >&5
7968 (exit "$ac_status"); }; }; then
7970 cf_cv_find_linkage_utf8=yes
7971 cf_cv_header_path_utf8=/usr/include
7972 cf_cv_library_path_utf8=/usr/lib
7975 echo "$as_me: failed program was:" >&5
7976 cat "conftest.$ac_ext" >&5
7978 LIBS="-lutf8 $cf_save_LIBS"
7980 cat >"conftest.$ac_ext" <<_ACEOF
7981 #line 7981 "configure"
7982 #include "confdefs.h"
7984 #include <libutf8.h>
7993 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7994 if { (eval echo "$as_me:7994: \"$ac_link\"") >&5
7995 (eval $ac_link) 2>&5
7997 echo "$as_me:7997: \$? = $ac_status" >&5
7998 (exit "$ac_status"); } &&
7999 { ac_try='test -s "conftest$ac_exeext"'
8000 { (eval echo "$as_me:8000: \"$ac_try\"") >&5
8003 echo "$as_me:8003: \$? = $ac_status" >&5
8004 (exit "$ac_status"); }; }; then
8006 cf_cv_find_linkage_utf8=yes
8007 cf_cv_header_path_utf8=/usr/include
8008 cf_cv_library_path_utf8=/usr/lib
8009 cf_cv_library_file_utf8="-lutf8"
8012 echo "$as_me: failed program was:" >&5
8013 cat "conftest.$ac_ext" >&5
8015 cf_cv_find_linkage_utf8=no
8016 LIBS="$cf_save_LIBS"
8018 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
8020 echo "${as_me:-configure}:8020: testing find linkage for utf8 library ..." 1>&5
8022 echo "${as_me:-configure}:8022: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8024 cf_save_CPPFLAGS="$CPPFLAGS"
8025 cf_test_CPPFLAGS="$CPPFLAGS"
8029 # collect the current set of include-directories from compiler flags
8030 cf_header_path_list=""
8031 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8032 for cf_header_path in $CPPFLAGS $CFLAGS
8034 case "$cf_header_path" in
8036 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8038 test "x$cf_header_path" != "xNONE" && \
8039 test -d "$cf_header_path" && \
8041 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8042 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
8043 test -d "$cf_header_path/include/utf8" && cf_search="$cf_search $cf_header_path/include/utf8"
8044 test -d "$cf_header_path/include/utf8/include" && cf_search="$cf_search $cf_header_path/include/utf8/include"
8045 test -d "$cf_header_path/utf8/include" && cf_search="$cf_search $cf_header_path/utf8/include"
8046 test -d "$cf_header_path/utf8/include/utf8" && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8049 cf_header_path_list="$cf_header_path_list $cf_search"
8055 # add the variations for the package we are looking for
8059 test "x$prefix" != "xNONE" && \
8060 test -d "$prefix" && \
8062 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8063 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
8064 test -d "$prefix/include/utf8" && cf_search="$cf_search $prefix/include/utf8"
8065 test -d "$prefix/include/utf8/include" && cf_search="$cf_search $prefix/include/utf8/include"
8066 test -d "$prefix/utf8/include" && cf_search="$cf_search $prefix/utf8/include"
8067 test -d "$prefix/utf8/include/utf8" && cf_search="$cf_search $prefix/utf8/include/utf8"
8070 for cf_subdir_prefix in \
8079 test "x$cf_subdir_prefix" != "x$prefix" && \
8080 test -d "$cf_subdir_prefix" && \
8081 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8082 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
8083 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
8084 test -d "$cf_subdir_prefix/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/include/utf8"
8085 test -d "$cf_subdir_prefix/include/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
8086 test -d "$cf_subdir_prefix/utf8/include" && cf_search="$cf_search $cf_subdir_prefix/utf8/include"
8087 test -d "$cf_subdir_prefix/utf8/include/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
8092 test "$includedir" != NONE && \
8093 test "$includedir" != "/usr/include" && \
8094 test -d "$includedir" && {
8095 test -d "$includedir" && cf_search="$cf_search $includedir"
8096 test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
8099 test "$oldincludedir" != NONE && \
8100 test "$oldincludedir" != "/usr/include" && \
8101 test -d "$oldincludedir" && {
8102 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
8103 test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
8106 cf_search="$cf_search $cf_header_path_list"
8108 for cf_cv_header_path_utf8 in $cf_search
8110 if test -d "$cf_cv_header_path_utf8" ; then
8111 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
8113 echo "${as_me:-configure}:8113: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8115 CPPFLAGS="$cf_save_CPPFLAGS"
8117 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8118 CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
8120 cat >"conftest.$ac_ext" <<_ACEOF
8121 #line 8121 "configure"
8122 #include "confdefs.h"
8124 #include <libutf8.h>
8133 rm -f "conftest.$ac_objext"
8134 if { (eval echo "$as_me:8134: \"$ac_compile\"") >&5
8135 (eval $ac_compile) 2>&5
8137 echo "$as_me:8137: \$? = $ac_status" >&5
8138 (exit "$ac_status"); } &&
8139 { ac_try='test -s "conftest.$ac_objext"'
8140 { (eval echo "$as_me:8140: \"$ac_try\"") >&5
8143 echo "$as_me:8143: \$? = $ac_status" >&5
8144 (exit "$ac_status"); }; }; then
8146 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8148 echo "${as_me:-configure}:8148: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8150 cf_cv_find_linkage_utf8=maybe
8151 cf_test_CPPFLAGS="$CPPFLAGS"
8154 echo "$as_me: failed program was:" >&5
8155 cat "conftest.$ac_ext" >&5
8157 CPPFLAGS="$cf_save_CPPFLAGS"
8160 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8164 if test "$cf_cv_find_linkage_utf8" = maybe ; then
8166 echo "${as_me:-configure}:8166: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8168 cf_save_LIBS="$LIBS"
8169 cf_save_LDFLAGS="$LDFLAGS"
8171 if test "$cf_cv_find_linkage_utf8" != yes ; then
8174 cf_library_path_list=""
8175 if test -n "${LDFLAGS}${LIBS}" ; then
8176 for cf_library_path in $LDFLAGS $LIBS
8178 case "$cf_library_path" in
8180 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8182 test "x$cf_library_path" != "xNONE" && \
8183 test -d "$cf_library_path" && \
8185 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8186 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
8187 test -d "$cf_library_path/lib/utf8" && cf_search="$cf_search $cf_library_path/lib/utf8"
8188 test -d "$cf_library_path/lib/utf8/lib" && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8189 test -d "$cf_library_path/utf8/lib" && cf_search="$cf_search $cf_library_path/utf8/lib"
8190 test -d "$cf_library_path/utf8/lib/utf8" && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8193 cf_library_path_list="$cf_library_path_list $cf_search"
8201 test "x$prefix" != "xNONE" && \
8202 test -d "$prefix" && \
8204 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8205 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
8206 test -d "$prefix/lib/utf8" && cf_search="$cf_search $prefix/lib/utf8"
8207 test -d "$prefix/lib/utf8/lib" && cf_search="$cf_search $prefix/lib/utf8/lib"
8208 test -d "$prefix/utf8/lib" && cf_search="$cf_search $prefix/utf8/lib"
8209 test -d "$prefix/utf8/lib/utf8" && cf_search="$cf_search $prefix/utf8/lib/utf8"
8212 for cf_subdir_prefix in \
8221 test "x$cf_subdir_prefix" != "x$prefix" && \
8222 test -d "$cf_subdir_prefix" && \
8223 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
8224 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
8225 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
8226 test -d "$cf_subdir_prefix/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
8227 test -d "$cf_subdir_prefix/lib/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
8228 test -d "$cf_subdir_prefix/utf8/lib" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
8229 test -d "$cf_subdir_prefix/utf8/lib/utf8" && cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
8234 cf_search="$cf_library_path_list $cf_search"
8236 for cf_cv_library_path_utf8 in $cf_search
8238 if test -d "$cf_cv_library_path_utf8" ; then
8239 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
8241 echo "${as_me:-configure}:8241: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8243 CPPFLAGS="$cf_test_CPPFLAGS"
8244 LIBS="-lutf8 $cf_save_LIBS"
8245 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8246 cat >"conftest.$ac_ext" <<_ACEOF
8247 #line 8247 "configure"
8248 #include "confdefs.h"
8250 #include <libutf8.h>
8259 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8260 if { (eval echo "$as_me:8260: \"$ac_link\"") >&5
8261 (eval $ac_link) 2>&5
8263 echo "$as_me:8263: \$? = $ac_status" >&5
8264 (exit "$ac_status"); } &&
8265 { ac_try='test -s "conftest$ac_exeext"'
8266 { (eval echo "$as_me:8266: \"$ac_try\"") >&5
8269 echo "$as_me:8269: \$? = $ac_status" >&5
8270 (exit "$ac_status"); }; }; then
8272 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8274 echo "${as_me:-configure}:8274: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8276 cf_cv_find_linkage_utf8=yes
8277 cf_cv_library_file_utf8="-lutf8"
8280 echo "$as_me: failed program was:" >&5
8281 cat "conftest.$ac_ext" >&5
8283 CPPFLAGS="$cf_save_CPPFLAGS"
8284 LIBS="$cf_save_LIBS"
8285 LDFLAGS="$cf_save_LDFLAGS"
8288 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8291 CPPFLAGS="$cf_save_CPPFLAGS"
8292 LDFLAGS="$cf_save_LDFLAGS"
8296 cf_cv_find_linkage_utf8=no
8300 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8303 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8305 LIBS="$cf_save_LIBS"
8307 if test "$cf_cv_find_linkage_utf8" = yes ; then
8308 cf_cv_utf8_lib=add-on
8314 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8316 echo "$as_me:8316: result: $cf_cv_utf8_lib" >&5
8317 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8319 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8321 if test "$cf_cv_utf8_lib" = "add-on" ; then
8323 cat >>confdefs.h <<\EOF
8324 #define HAVE_LIBUTF8_H 1
8327 if test -n "$cf_cv_header_path_utf8" ; then
8328 for cf_add_incdir in $cf_cv_header_path_utf8
8330 while test "$cf_add_incdir" != /usr/include
8332 if test -d "$cf_add_incdir"
8335 if test -n "$CFLAGS$CPPFLAGS" ; then
8336 # a loop is needed to ensure we can add subdirs of existing dirs
8337 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8338 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8339 cf_have_incdir=yes; break
8344 if test "$cf_have_incdir" = no ; then
8345 if test "$cf_add_incdir" = /usr/local/include ; then
8346 if test "$GCC" = yes
8348 cf_save_CPPFLAGS=$CPPFLAGS
8350 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8351 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8353 cat >"conftest.$ac_ext" <<_ACEOF
8354 #line 8354 "configure"
8355 #include "confdefs.h"
8365 rm -f "conftest.$ac_objext"
8366 if { (eval echo "$as_me:8366: \"$ac_compile\"") >&5
8367 (eval $ac_compile) 2>&5
8369 echo "$as_me:8369: \$? = $ac_status" >&5
8370 (exit "$ac_status"); } &&
8371 { ac_try='test -s "conftest.$ac_objext"'
8372 { (eval echo "$as_me:8372: \"$ac_try\"") >&5
8375 echo "$as_me:8375: \$? = $ac_status" >&5
8376 (exit "$ac_status"); }; }; then
8379 echo "$as_me: failed program was:" >&5
8380 cat "conftest.$ac_ext" >&5
8383 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8384 CPPFLAGS=$cf_save_CPPFLAGS
8389 if test "$cf_have_incdir" = no ; then
8390 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8392 echo "${as_me:-configure}:8392: testing adding $cf_add_incdir to include-path ..." 1>&5
8394 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8396 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
8397 test "$cf_top_incdir" = "$cf_add_incdir" && break
8398 cf_add_incdir="$cf_top_incdir"
8409 if test -n "$cf_cv_library_path_utf8" ; then
8410 for cf_add_libdir in $cf_cv_library_path_utf8
8412 if test "$cf_add_libdir" = /usr/lib ; then
8414 elif test -d "$cf_add_libdir"
8417 if test -n "$LDFLAGS$LIBS" ; then
8418 # a loop is needed to ensure we can add subdirs of existing dirs
8419 for cf_test_libdir in $LDFLAGS $LIBS ; do
8420 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8421 cf_have_libdir=yes; break
8425 if test "$cf_have_libdir" = no ; then
8426 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
8428 echo "${as_me:-configure}:8428: testing adding $cf_add_libdir to library-path ..." 1>&5
8430 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8439 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8441 for cf_add_1lib in $cf_add_0lib; do
8442 for cf_add_2lib in $cf_add_libs; do
8443 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8448 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8454 cf_ncuconfig_root=$cf_cv_screen
8455 cf_have_ncuconfig=no
8457 if test "x${PKG_CONFIG:=none}" != xnone; then
8458 echo "$as_me:8458: checking pkg-config for $cf_ncuconfig_root" >&5
8459 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
8460 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
8461 echo "$as_me:8461: result: yes" >&5
8462 echo "${ECHO_T}yes" >&6
8464 echo "$as_me:8464: checking if the $cf_ncuconfig_root package files work" >&5
8465 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
8466 cf_have_ncuconfig=unknown
8468 cf_save_CFLAGS="$CFLAGS"
8469 cf_save_CPPFLAGS="$CPPFLAGS"
8470 cf_save_LIBS="$LIBS"
8472 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
8473 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
8475 # while -W for passing linker flags is prevalent, it is not "standard".
8476 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
8477 # incompatible _and_ non-standard -W option which gives an error. Work
8478 # around that pitfall.
8479 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
8485 cf_new_extra_cppflags=
8487 for cf_add_cflags in $cf_pkg_cflags
8489 case "$cf_fix_cppflags" in
8491 case "$cf_add_cflags" in
8492 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8493 case "$cf_add_cflags" in
8495 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8497 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8498 && test -z "${cf_tst_cflags}" \
8499 && cf_fix_cppflags=yes
8501 if test "$cf_fix_cppflags" = yes ; then
8503 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8504 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8507 elif test "${cf_tst_cflags}" = "\"'" ; then
8509 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8510 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8520 case "$cf_add_cflags" in
8522 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8524 CPPFLAGS=`echo "$CPPFLAGS" | \
8525 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8526 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8531 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8532 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8539 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8540 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8547 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8548 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8550 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8552 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8553 && test -z "${cf_tst_cflags}" \
8554 && cf_fix_cppflags=no
8559 if test -n "$cf_new_cflags" ; then
8561 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8562 CFLAGS="${CFLAGS}$cf_new_cflags"
8566 if test -n "$cf_new_cppflags" ; then
8568 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8569 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8573 if test -n "$cf_new_extra_cppflags" ; then
8575 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8576 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8583 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8585 for cf_add_1lib in $cf_add_0lib; do
8586 for cf_add_2lib in $cf_add_libs; do
8587 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8592 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8596 cat >"conftest.$ac_ext" <<_ACEOF
8597 #line 8597 "configure"
8598 #include "confdefs.h"
8599 #include <${cf_cv_ncurses_header:-curses.h}>
8603 initscr(); mousemask(0,0); tigetstr((char *)0);
8608 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8609 if { (eval echo "$as_me:8609: \"$ac_link\"") >&5
8610 (eval $ac_link) 2>&5
8612 echo "$as_me:8612: \$? = $ac_status" >&5
8613 (exit "$ac_status"); } &&
8614 { ac_try='test -s "conftest$ac_exeext"'
8615 { (eval echo "$as_me:8615: \"$ac_try\"") >&5
8618 echo "$as_me:8618: \$? = $ac_status" >&5
8619 (exit "$ac_status"); }; }; then
8620 if test "$cross_compiling" = yes; then
8621 cf_test_ncuconfig=maybe
8623 cat >"conftest.$ac_ext" <<_ACEOF
8624 #line 8624 "configure"
8625 #include "confdefs.h"
8626 #include <${cf_cv_ncurses_header:-curses.h}>
8628 { const char *xx = curses_version(); return (xx == 0); }
8630 rm -f "conftest$ac_exeext"
8631 if { (eval echo "$as_me:8631: \"$ac_link\"") >&5
8632 (eval $ac_link) 2>&5
8634 echo "$as_me:8634: \$? = $ac_status" >&5
8635 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8636 { (eval echo "$as_me:8636: \"$ac_try\"") >&5
8639 echo "$as_me:8639: \$? = $ac_status" >&5
8640 (exit "$ac_status"); }; }; then
8641 cf_test_ncuconfig=yes
8643 echo "$as_me: program exited with status $ac_status" >&5
8644 echo "$as_me: failed program was:" >&5
8645 cat "conftest.$ac_ext" >&5
8646 cf_test_ncuconfig=no
8648 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8651 echo "$as_me: failed program was:" >&5
8652 cat "conftest.$ac_ext" >&5
8653 cf_test_ncuconfig=no
8655 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8657 CFLAGS="$cf_save_CFLAGS"
8658 CPPFLAGS="$cf_save_CPPFLAGS"
8659 LIBS="$cf_save_LIBS"
8661 if test "x$cf_test_ncuconfig" != xyes; then
8662 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
8663 cf_pkg_cflags="$cf_temp"
8664 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
8665 cf_pkg_libs="$cf_temp"
8670 for cf_add_cflags in $cf_pkg_cflags
8672 case "x$cf_add_cflags" in
8675 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8678 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
8679 test "$CFLAGS" != "$cf_old_cflag" || break
8681 CFLAGS="$cf_old_cflag"
8684 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
8687 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
8688 test "$CPPFLAGS" != "$cf_old_cflag" || break
8690 CPPFLAGS="$cf_old_cflag"
8699 cf_new_extra_cppflags=
8701 for cf_add_cflags in $cf_add_cflags
8703 case "$cf_fix_cppflags" in
8705 case "$cf_add_cflags" in
8706 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8707 case "$cf_add_cflags" in
8709 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8711 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8712 && test -z "${cf_tst_cflags}" \
8713 && cf_fix_cppflags=yes
8715 if test "$cf_fix_cppflags" = yes ; then
8717 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8718 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8721 elif test "${cf_tst_cflags}" = "\"'" ; then
8723 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8724 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8734 case "$cf_add_cflags" in
8736 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8738 CPPFLAGS=`echo "$CPPFLAGS" | \
8739 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
8740 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
8745 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8746 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8753 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8754 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8761 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8762 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8764 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8766 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8767 && test -z "${cf_tst_cflags}" \
8768 && cf_fix_cppflags=no
8773 if test -n "$cf_new_cflags" ; then
8775 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8776 CFLAGS="${CFLAGS}$cf_new_cflags"
8780 if test -n "$cf_new_cppflags" ; then
8782 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8783 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8787 if test -n "$cf_new_extra_cppflags" ; then
8789 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8790 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8799 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8801 for cf_add_1lib in $cf_add_0lib; do
8802 for cf_add_2lib in $cf_add_libs; do
8803 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8808 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8812 cat >"conftest.$ac_ext" <<_ACEOF
8813 #line 8813 "configure"
8814 #include "confdefs.h"
8815 #include <${cf_cv_ncurses_header:-curses.h}>
8819 initscr(); mousemask(0,0); tigetstr((char *)0);
8824 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8825 if { (eval echo "$as_me:8825: \"$ac_link\"") >&5
8826 (eval $ac_link) 2>&5
8828 echo "$as_me:8828: \$? = $ac_status" >&5
8829 (exit "$ac_status"); } &&
8830 { ac_try='test -s "conftest$ac_exeext"'
8831 { (eval echo "$as_me:8831: \"$ac_try\"") >&5
8834 echo "$as_me:8834: \$? = $ac_status" >&5
8835 (exit "$ac_status"); }; }; then
8836 if test "$cross_compiling" = yes; then
8837 cf_have_ncuconfig=maybe
8839 cat >"conftest.$ac_ext" <<_ACEOF
8840 #line 8840 "configure"
8841 #include "confdefs.h"
8842 #include <${cf_cv_ncurses_header:-curses.h}>
8844 { const char *xx = curses_version(); return (xx == 0); }
8846 rm -f "conftest$ac_exeext"
8847 if { (eval echo "$as_me:8847: \"$ac_link\"") >&5
8848 (eval $ac_link) 2>&5
8850 echo "$as_me:8850: \$? = $ac_status" >&5
8851 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8852 { (eval echo "$as_me:8852: \"$ac_try\"") >&5
8855 echo "$as_me:8855: \$? = $ac_status" >&5
8856 (exit "$ac_status"); }; }; then
8857 cf_have_ncuconfig=yes
8859 echo "$as_me: program exited with status $ac_status" >&5
8860 echo "$as_me: failed program was:" >&5
8861 cat "conftest.$ac_ext" >&5
8862 cf_have_ncuconfig=no
8864 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8867 echo "$as_me: failed program was:" >&5
8868 cat "conftest.$ac_ext" >&5
8869 cf_have_ncuconfig=no
8871 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8872 echo "$as_me:8872: result: $cf_have_ncuconfig" >&5
8873 echo "${ECHO_T}$cf_have_ncuconfig" >&6
8874 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
8875 if test "$cf_have_ncuconfig" != "yes"
8877 CPPFLAGS="$cf_save_CPPFLAGS"
8878 LIBS="$cf_save_LIBS"
8879 NCURSES_CONFIG_PKG=none
8882 cat >>confdefs.h <<\EOF
8886 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
8888 echo "$as_me:8888: checking for terminfo header" >&5
8889 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8890 if test "${cf_cv_term_header+set}" = set; then
8891 echo $ECHO_N "(cached) $ECHO_C" >&6
8894 case "${cf_cv_ncurses_header}" in
8895 (*/ncurses.h|*/ncursesw.h)
8896 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8899 cf_term_header=term.h
8903 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8905 cat >"conftest.$ac_ext" <<_ACEOF
8906 #line 8906 "configure"
8907 #include "confdefs.h"
8909 #include <${cf_cv_ncurses_header:-curses.h}>
8915 int x = auto_left_margin; (void)x
8920 rm -f "conftest.$ac_objext"
8921 if { (eval echo "$as_me:8921: \"$ac_compile\"") >&5
8922 (eval $ac_compile) 2>&5
8924 echo "$as_me:8924: \$? = $ac_status" >&5
8925 (exit "$ac_status"); } &&
8926 { ac_try='test -s "conftest.$ac_objext"'
8927 { (eval echo "$as_me:8927: \"$ac_try\"") >&5
8930 echo "$as_me:8930: \$? = $ac_status" >&5
8931 (exit "$ac_status"); }; }; then
8933 cf_cv_term_header="$cf_test"
8935 echo "$as_me: failed program was:" >&5
8936 cat "conftest.$ac_ext" >&5
8938 cf_cv_term_header=unknown
8941 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8942 test "$cf_cv_term_header" != unknown && break
8946 echo "$as_me:8946: result: $cf_cv_term_header" >&5
8947 echo "${ECHO_T}$cf_cv_term_header" >&6
8949 # Set definitions to allow ifdef'ing to accommodate subdirectories
8951 case "$cf_cv_term_header" in
8954 cat >>confdefs.h <<\EOF
8955 #define HAVE_TERM_H 1
8961 case "$cf_cv_term_header" in
8964 cat >>confdefs.h <<\EOF
8965 #define HAVE_NCURSES_TERM_H 1
8971 cat >>confdefs.h <<\EOF
8972 #define HAVE_NCURSESW_TERM_H 1
8981 echo "$as_me:8981: result: no" >&5
8982 echo "${ECHO_T}no" >&6
8983 NCURSES_CONFIG_PKG=none
8986 NCURSES_CONFIG_PKG=none
8989 if test "x$cf_have_ncuconfig" = "xno"; then
8990 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
8992 if test -n "$ac_tool_prefix"; then
8993 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8995 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8996 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8997 echo "$as_me:8997: checking for $ac_word" >&5
8998 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8999 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
9000 echo $ECHO_N "(cached) $ECHO_C" >&6
9002 if test -n "$NCURSES_CONFIG"; then
9003 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
9005 ac_save_IFS=$IFS; IFS=$ac_path_separator
9007 for ac_dir in $ac_dummy; do
9009 test -z "$ac_dir" && ac_dir=.
9010 $as_executable_p "$ac_dir/$ac_word" || continue
9011 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
9012 echo "$as_me:9012: found $ac_dir/$ac_word" >&5
9018 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
9019 if test -n "$NCURSES_CONFIG"; then
9020 echo "$as_me:9020: result: $NCURSES_CONFIG" >&5
9021 echo "${ECHO_T}$NCURSES_CONFIG" >&6
9023 echo "$as_me:9023: result: no" >&5
9024 echo "${ECHO_T}no" >&6
9027 test -n "$NCURSES_CONFIG" && break
9030 if test -z "$NCURSES_CONFIG"; then
9031 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
9032 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
9034 # Extract the first word of "$ac_prog", so it can be a program name with args.
9035 set dummy $ac_prog; ac_word=$2
9036 echo "$as_me:9036: checking for $ac_word" >&5
9037 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9038 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
9039 echo $ECHO_N "(cached) $ECHO_C" >&6
9041 if test -n "$ac_ct_NCURSES_CONFIG"; then
9042 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
9044 ac_save_IFS=$IFS; IFS=$ac_path_separator
9046 for ac_dir in $ac_dummy; do
9048 test -z "$ac_dir" && ac_dir=.
9049 $as_executable_p "$ac_dir/$ac_word" || continue
9050 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
9051 echo "$as_me:9051: found $ac_dir/$ac_word" >&5
9057 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
9058 if test -n "$ac_ct_NCURSES_CONFIG"; then
9059 echo "$as_me:9059: result: $ac_ct_NCURSES_CONFIG" >&5
9060 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
9062 echo "$as_me:9062: result: no" >&5
9063 echo "${ECHO_T}no" >&6
9066 test -n "$ac_ct_NCURSES_CONFIG" && break
9068 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
9070 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
9073 if test "$NCURSES_CONFIG" != none ; then
9075 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
9077 case "x$cf_add_cflags" in
9080 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9083 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
9084 test "$CFLAGS" != "$cf_old_cflag" || break
9086 CFLAGS="$cf_old_cflag"
9089 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
9092 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
9093 test "$CPPFLAGS" != "$cf_old_cflag" || break
9095 CPPFLAGS="$cf_old_cflag"
9104 cf_new_extra_cppflags=
9106 for cf_add_cflags in $cf_add_cflags
9108 case "$cf_fix_cppflags" in
9110 case "$cf_add_cflags" in
9111 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9112 case "$cf_add_cflags" in
9114 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9116 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9117 && test -z "${cf_tst_cflags}" \
9118 && cf_fix_cppflags=yes
9120 if test "$cf_fix_cppflags" = yes ; then
9122 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9123 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9126 elif test "${cf_tst_cflags}" = "\"'" ; then
9128 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9129 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9139 case "$cf_add_cflags" in
9141 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9143 CPPFLAGS=`echo "$CPPFLAGS" | \
9144 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
9145 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
9150 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9151 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9158 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9159 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9166 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9167 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9169 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
9171 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9172 && test -z "${cf_tst_cflags}" \
9173 && cf_fix_cppflags=no
9178 if test -n "$cf_new_cflags" ; then
9180 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9181 CFLAGS="${CFLAGS}$cf_new_cflags"
9185 if test -n "$cf_new_cppflags" ; then
9187 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9188 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9192 if test -n "$cf_new_extra_cppflags" ; then
9194 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9195 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9204 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9206 for cf_add_1lib in $cf_add_0lib; do
9207 for cf_add_2lib in $cf_add_libs; do
9208 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9213 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9217 # even with config script, some packages use no-override for curses.h
9219 echo "$as_me:9219: checking if we have identified curses headers" >&5
9220 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
9221 if test "${cf_cv_ncurses_header+set}" = set; then
9222 echo $ECHO_N "(cached) $ECHO_C" >&6
9225 cf_cv_ncurses_header=none
9227 ncurses.h $cf_cv_screen/ncurses.h \
9228 curses.h $cf_cv_screen/curses.h
9230 cat >"conftest.$ac_ext" <<_ACEOF
9231 #line 9231 "configure"
9232 #include "confdefs.h"
9233 #include <${cf_header}>
9242 rm -f "conftest.$ac_objext"
9243 if { (eval echo "$as_me:9243: \"$ac_compile\"") >&5
9244 (eval $ac_compile) 2>&5
9246 echo "$as_me:9246: \$? = $ac_status" >&5
9247 (exit "$ac_status"); } &&
9248 { ac_try='test -s "conftest.$ac_objext"'
9249 { (eval echo "$as_me:9249: \"$ac_try\"") >&5
9252 echo "$as_me:9252: \$? = $ac_status" >&5
9253 (exit "$ac_status"); }; }; then
9254 cf_cv_ncurses_header=$cf_header; break
9256 echo "$as_me: failed program was:" >&5
9257 cat "conftest.$ac_ext" >&5
9259 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9263 echo "$as_me:9263: result: $cf_cv_ncurses_header" >&5
9264 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
9266 if test "$cf_cv_ncurses_header" = none ; then
9267 { { echo "$as_me:9267: error: No curses header-files found" >&5
9268 echo "$as_me: error: No curses header-files found" >&2;}
9269 { (exit 1); exit 1; }; }
9272 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
9274 for ac_header in $cf_cv_ncurses_header
9276 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9277 echo "$as_me:9277: checking for $ac_header" >&5
9278 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9279 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9280 echo $ECHO_N "(cached) $ECHO_C" >&6
9282 cat >"conftest.$ac_ext" <<_ACEOF
9283 #line 9283 "configure"
9284 #include "confdefs.h"
9285 #include <$ac_header>
9287 if { (eval echo "$as_me:9287: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9288 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9290 $EGREP -v '^ *\+' conftest.er1 >conftest.err
9292 cat conftest.err >&5
9293 echo "$as_me:9293: \$? = $ac_status" >&5
9294 (exit "$ac_status"); } >/dev/null; then
9295 if test -s conftest.err; then
9296 ac_cpp_err=$ac_c_preproc_warn_flag
9303 if test -z "$ac_cpp_err"; then
9304 eval "$as_ac_Header=yes"
9306 echo "$as_me: failed program was:" >&5
9307 cat "conftest.$ac_ext" >&5
9308 eval "$as_ac_Header=no"
9310 rm -f conftest.err "conftest.$ac_ext"
9312 echo "$as_me:9312: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9313 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9314 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9315 cat >>confdefs.h <<EOF
9316 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9322 cat >>confdefs.h <<\EOF
9326 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9328 cat >>confdefs.h <<EOF
9329 #define $cf_nculib_ROOT 1
9332 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
9336 cf_ncuhdr_root=$cf_cv_screen
9338 test -n "$cf_cv_curses_dir" && \
9339 test "$cf_cv_curses_dir" != "no" && { \
9341 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
9342 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
9344 while test "$cf_add_incdir" != /usr/include
9346 if test -d "$cf_add_incdir"
9349 if test -n "$CFLAGS$CPPFLAGS" ; then
9350 # a loop is needed to ensure we can add subdirs of existing dirs
9351 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9352 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9353 cf_have_incdir=yes; break
9358 if test "$cf_have_incdir" = no ; then
9359 if test "$cf_add_incdir" = /usr/local/include ; then
9360 if test "$GCC" = yes
9362 cf_save_CPPFLAGS=$CPPFLAGS
9364 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9365 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9367 cat >"conftest.$ac_ext" <<_ACEOF
9368 #line 9368 "configure"
9369 #include "confdefs.h"
9379 rm -f "conftest.$ac_objext"
9380 if { (eval echo "$as_me:9380: \"$ac_compile\"") >&5
9381 (eval $ac_compile) 2>&5
9383 echo "$as_me:9383: \$? = $ac_status" >&5
9384 (exit "$ac_status"); } &&
9385 { ac_try='test -s "conftest.$ac_objext"'
9386 { (eval echo "$as_me:9386: \"$ac_try\"") >&5
9389 echo "$as_me:9389: \$? = $ac_status" >&5
9390 (exit "$ac_status"); }; }; then
9393 echo "$as_me: failed program was:" >&5
9394 cat "conftest.$ac_ext" >&5
9397 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9398 CPPFLAGS=$cf_save_CPPFLAGS
9403 if test "$cf_have_incdir" = no ; then
9404 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9406 echo "${as_me:-configure}:9406: testing adding $cf_add_incdir to include-path ..." 1>&5
9408 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9410 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9411 test "$cf_top_incdir" = "$cf_add_incdir" && break
9412 cf_add_incdir="$cf_top_incdir"
9425 echo "$as_me:9425: checking for $cf_ncuhdr_root header in include-path" >&5
9426 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
9427 if test "${cf_cv_ncurses_h+set}" = set; then
9428 echo $ECHO_N "(cached) $ECHO_C" >&6
9431 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
9432 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
9433 for cf_header in $cf_header_list
9436 cat >"conftest.$ac_ext" <<_ACEOF
9437 #line 9437 "configure"
9438 #include "confdefs.h"
9440 #include <$cf_header>
9445 #ifdef NCURSES_VERSION
9447 printf("%s\\n", NCURSES_VERSION);
9452 #error __NCURSES_H is not defined
9460 rm -f "conftest.$ac_objext"
9461 if { (eval echo "$as_me:9461: \"$ac_compile\"") >&5
9462 (eval $ac_compile) 2>&5
9464 echo "$as_me:9464: \$? = $ac_status" >&5
9465 (exit "$ac_status"); } &&
9466 { ac_try='test -s "conftest.$ac_objext"'
9467 { (eval echo "$as_me:9467: \"$ac_try\"") >&5
9470 echo "$as_me:9470: \$? = $ac_status" >&5
9471 (exit "$ac_status"); }; }; then
9472 cf_cv_ncurses_h=$cf_header
9475 echo "$as_me: failed program was:" >&5
9476 cat "conftest.$ac_ext" >&5
9479 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9481 test "$cf_cv_ncurses_h" != no && break
9485 echo "$as_me:9485: result: $cf_cv_ncurses_h" >&5
9486 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
9488 if test "$cf_cv_ncurses_h" != no ; then
9489 cf_cv_ncurses_header=$cf_cv_ncurses_h
9492 echo "$as_me:9492: checking for $cf_ncuhdr_root include-path" >&5
9493 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
9494 if test "${cf_cv_ncurses_h2+set}" = set; then
9495 echo $ECHO_N "(cached) $ECHO_C" >&6
9498 test -n "$verbose" && echo
9502 # collect the current set of include-directories from compiler flags
9503 cf_header_path_list=""
9504 if test -n "${CFLAGS}${CPPFLAGS}" ; then
9505 for cf_header_path in $CPPFLAGS $CFLAGS
9507 case "$cf_header_path" in
9509 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9511 test "x$cf_header_path" != "xNONE" && \
9512 test -d "$cf_header_path" && \
9514 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
9515 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
9516 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
9517 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
9518 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
9519 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"
9522 cf_header_path_list="$cf_header_path_list $cf_search"
9528 # add the variations for the package we are looking for
9532 test "x$prefix" != "xNONE" && \
9533 test -d "$prefix" && \
9535 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
9536 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
9537 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
9538 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
9539 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
9540 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9543 for cf_subdir_prefix in \
9552 test "x$cf_subdir_prefix" != "x$prefix" && \
9553 test -d "$cf_subdir_prefix" && \
9554 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9555 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
9556 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
9557 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
9558 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
9559 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
9560 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
9565 test "$includedir" != NONE && \
9566 test "$includedir" != "/usr/include" && \
9567 test -d "$includedir" && {
9568 test -d "$includedir" && cf_search="$cf_search $includedir"
9569 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
9572 test "$oldincludedir" != NONE && \
9573 test "$oldincludedir" != "/usr/include" && \
9574 test -d "$oldincludedir" && {
9575 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
9576 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
9579 cf_search="$cf_search $cf_header_path_list"
9581 test -n "$verbose" && echo "search path $cf_search"
9582 cf_save2_CPPFLAGS="$CPPFLAGS"
9583 for cf_incdir in $cf_search
9586 if test -n "$cf_incdir" ; then
9587 for cf_add_incdir in $cf_incdir
9589 while test "$cf_add_incdir" != /usr/include
9591 if test -d "$cf_add_incdir"
9594 if test -n "$CFLAGS$CPPFLAGS" ; then
9595 # a loop is needed to ensure we can add subdirs of existing dirs
9596 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9597 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9598 cf_have_incdir=yes; break
9603 if test "$cf_have_incdir" = no ; then
9604 if test "$cf_add_incdir" = /usr/local/include ; then
9605 if test "$GCC" = yes
9607 cf_save_CPPFLAGS=$CPPFLAGS
9609 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9610 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9612 cat >"conftest.$ac_ext" <<_ACEOF
9613 #line 9613 "configure"
9614 #include "confdefs.h"
9624 rm -f "conftest.$ac_objext"
9625 if { (eval echo "$as_me:9625: \"$ac_compile\"") >&5
9626 (eval $ac_compile) 2>&5
9628 echo "$as_me:9628: \$? = $ac_status" >&5
9629 (exit "$ac_status"); } &&
9630 { ac_try='test -s "conftest.$ac_objext"'
9631 { (eval echo "$as_me:9631: \"$ac_try\"") >&5
9634 echo "$as_me:9634: \$? = $ac_status" >&5
9635 (exit "$ac_status"); }; }; then
9638 echo "$as_me: failed program was:" >&5
9639 cat "conftest.$ac_ext" >&5
9642 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9643 CPPFLAGS=$cf_save_CPPFLAGS
9648 if test "$cf_have_incdir" = no ; then
9649 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9651 echo "${as_me:-configure}:9651: testing adding $cf_add_incdir to include-path ..." 1>&5
9653 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9655 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9656 test "$cf_top_incdir" = "$cf_add_incdir" && break
9657 cf_add_incdir="$cf_top_incdir"
9673 cat >"conftest.$ac_ext" <<_ACEOF
9674 #line 9674 "configure"
9675 #include "confdefs.h"
9677 #include <$cf_header>
9682 #ifdef NCURSES_VERSION
9684 printf("%s\\n", NCURSES_VERSION);
9689 #error __NCURSES_H is not defined
9697 rm -f "conftest.$ac_objext"
9698 if { (eval echo "$as_me:9698: \"$ac_compile\"") >&5
9699 (eval $ac_compile) 2>&5
9701 echo "$as_me:9701: \$? = $ac_status" >&5
9702 (exit "$ac_status"); } &&
9703 { ac_try='test -s "conftest.$ac_objext"'
9704 { (eval echo "$as_me:9704: \"$ac_try\"") >&5
9707 echo "$as_me:9707: \$? = $ac_status" >&5
9708 (exit "$ac_status"); }; }; then
9709 cf_cv_ncurses_h2=$cf_header
9712 echo "$as_me: failed program was:" >&5
9713 cat "conftest.$ac_ext" >&5
9716 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9718 if test "$cf_cv_ncurses_h2" != no ; then
9719 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9720 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
9723 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
9725 CPPFLAGS="$cf_save2_CPPFLAGS"
9726 test "$cf_cv_ncurses_h2" != no && break
9728 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9728: error: not found" >&5
9729 echo "$as_me: error: not found" >&2;}
9730 { (exit 1); exit 1; }; }
9733 echo "$as_me:9733: result: $cf_cv_ncurses_h2" >&5
9734 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9736 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
9737 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
9738 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
9739 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
9742 if test -n "$cf_1st_incdir" ; then
9743 for cf_add_incdir in $cf_1st_incdir
9745 while test "$cf_add_incdir" != /usr/include
9747 if test -d "$cf_add_incdir"
9750 if test -n "$CFLAGS$CPPFLAGS" ; then
9751 # a loop is needed to ensure we can add subdirs of existing dirs
9752 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9753 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9754 cf_have_incdir=yes; break
9759 if test "$cf_have_incdir" = no ; then
9760 if test "$cf_add_incdir" = /usr/local/include ; then
9761 if test "$GCC" = yes
9763 cf_save_CPPFLAGS=$CPPFLAGS
9765 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9766 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9768 cat >"conftest.$ac_ext" <<_ACEOF
9769 #line 9769 "configure"
9770 #include "confdefs.h"
9780 rm -f "conftest.$ac_objext"
9781 if { (eval echo "$as_me:9781: \"$ac_compile\"") >&5
9782 (eval $ac_compile) 2>&5
9784 echo "$as_me:9784: \$? = $ac_status" >&5
9785 (exit "$ac_status"); } &&
9786 { ac_try='test -s "conftest.$ac_objext"'
9787 { (eval echo "$as_me:9787: \"$ac_try\"") >&5
9790 echo "$as_me:9790: \$? = $ac_status" >&5
9791 (exit "$ac_status"); }; }; then
9794 echo "$as_me: failed program was:" >&5
9795 cat "conftest.$ac_ext" >&5
9798 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9799 CPPFLAGS=$cf_save_CPPFLAGS
9804 if test "$cf_have_incdir" = no ; then
9805 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9807 echo "${as_me:-configure}:9807: testing adding $cf_add_incdir to include-path ..." 1>&5
9809 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9811 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9812 test "$cf_top_incdir" = "$cf_add_incdir" && break
9813 cf_add_incdir="$cf_top_incdir"
9826 # Set definitions to allow ifdef'ing for ncurses.h
9828 case "$cf_cv_ncurses_header" in
9831 cat >>confdefs.h <<\EOF
9832 #define HAVE_NCURSES_H 1
9838 case "$cf_cv_ncurses_header" in
9839 (ncurses/curses.h|ncurses/ncurses.h)
9841 cat >>confdefs.h <<\EOF
9842 #define HAVE_NCURSES_NCURSES_H 1
9846 (ncursesw/curses.h|ncursesw/ncurses.h)
9848 cat >>confdefs.h <<\EOF
9849 #define HAVE_NCURSESW_NCURSES_H 1
9855 echo "$as_me:9855: checking for terminfo header" >&5
9856 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9857 if test "${cf_cv_term_header+set}" = set; then
9858 echo $ECHO_N "(cached) $ECHO_C" >&6
9861 case "${cf_cv_ncurses_header}" in
9862 (*/ncurses.h|*/ncursesw.h)
9863 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9866 cf_term_header=term.h
9870 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9872 cat >"conftest.$ac_ext" <<_ACEOF
9873 #line 9873 "configure"
9874 #include "confdefs.h"
9876 #include <${cf_cv_ncurses_header:-curses.h}>
9882 int x = auto_left_margin; (void)x
9887 rm -f "conftest.$ac_objext"
9888 if { (eval echo "$as_me:9888: \"$ac_compile\"") >&5
9889 (eval $ac_compile) 2>&5
9891 echo "$as_me:9891: \$? = $ac_status" >&5
9892 (exit "$ac_status"); } &&
9893 { ac_try='test -s "conftest.$ac_objext"'
9894 { (eval echo "$as_me:9894: \"$ac_try\"") >&5
9897 echo "$as_me:9897: \$? = $ac_status" >&5
9898 (exit "$ac_status"); }; }; then
9900 cf_cv_term_header="$cf_test"
9902 echo "$as_me: failed program was:" >&5
9903 cat "conftest.$ac_ext" >&5
9905 cf_cv_term_header=unknown
9908 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9909 test "$cf_cv_term_header" != unknown && break
9913 echo "$as_me:9913: result: $cf_cv_term_header" >&5
9914 echo "${ECHO_T}$cf_cv_term_header" >&6
9916 # Set definitions to allow ifdef'ing to accommodate subdirectories
9918 case "$cf_cv_term_header" in
9921 cat >>confdefs.h <<\EOF
9922 #define HAVE_TERM_H 1
9928 case "$cf_cv_term_header" in
9931 cat >>confdefs.h <<\EOF
9932 #define HAVE_NCURSES_TERM_H 1
9938 cat >>confdefs.h <<\EOF
9939 #define HAVE_NCURSESW_TERM_H 1
9945 # some applications need this, but should check for NCURSES_VERSION
9947 cat >>confdefs.h <<\EOF
9951 echo "$as_me:9951: checking for ncurses version" >&5
9952 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9953 if test "${cf_cv_ncurses_version+set}" = set; then
9954 echo $ECHO_N "(cached) $ECHO_C" >&6
9957 cf_cv_ncurses_version=no
9959 rm -f "$cf_tempfile"
9960 if test "$cross_compiling" = yes; then
9962 # This will not work if the preprocessor splits the line after the
9963 # Autoconf token. The 'unproto' program does that.
9964 cat > "conftest.$ac_ext" <<EOF
9965 #include <${cf_cv_ncurses_header:-curses.h}>
9967 #ifdef NCURSES_VERSION
9968 Autoconf NCURSES_VERSION
9976 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9977 { (eval echo "$as_me:9977: \"$cf_try\"") >&5
9980 echo "$as_me:9980: \$? = $ac_status" >&5
9981 (exit "$ac_status"); }
9982 if test -f conftest.out ; then
9983 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
9984 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9989 cat >"conftest.$ac_ext" <<_ACEOF
9990 #line 9990 "configure"
9991 #include "confdefs.h"
9993 $ac_includes_default
9995 #include <${cf_cv_ncurses_header:-curses.h}>
9999 FILE *fp = fopen("$cf_tempfile", "w");
10000 #ifdef NCURSES_VERSION
10001 # ifdef NCURSES_VERSION_PATCH
10002 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
10004 fprintf(fp, "%s\\n", NCURSES_VERSION);
10007 # ifdef __NCURSES_H
10008 fprintf(fp, "old\\n");
10013 ${cf_cv_main_return:-return}(0);
10016 rm -f "conftest$ac_exeext"
10017 if { (eval echo "$as_me:10017: \"$ac_link\"") >&5
10018 (eval $ac_link) 2>&5
10020 echo "$as_me:10020: \$? = $ac_status" >&5
10021 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10022 { (eval echo "$as_me:10022: \"$ac_try\"") >&5
10023 (eval $ac_try) 2>&5
10025 echo "$as_me:10025: \$? = $ac_status" >&5
10026 (exit "$ac_status"); }; }; then
10028 cf_cv_ncurses_version=`cat $cf_tempfile`
10030 echo "$as_me: program exited with status $ac_status" >&5
10031 echo "$as_me: failed program was:" >&5
10032 cat "conftest.$ac_ext" >&5
10034 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10036 rm -f "$cf_tempfile"
10039 echo "$as_me:10039: result: $cf_cv_ncurses_version" >&5
10040 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
10041 test "$cf_cv_ncurses_version" = no ||
10042 cat >>confdefs.h <<\EOF
10046 cf_nculib_root=$cf_cv_screen
10047 # This works, except for the special case where we find gpm, but
10048 # ncurses is in a nonstandard location via $LIBS, and we really want
10051 cf_ncurses_SAVE="$LIBS"
10052 echo "$as_me:10052: checking for Gpm_Open in -lgpm" >&5
10053 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
10054 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
10055 echo $ECHO_N "(cached) $ECHO_C" >&6
10057 ac_check_lib_save_LIBS=$LIBS
10059 cat >"conftest.$ac_ext" <<_ACEOF
10060 #line 10060 "configure"
10061 #include "confdefs.h"
10063 /* Override any gcc2 internal prototype to avoid an error. */
10067 /* We use char because int might match the return type of a gcc2
10068 builtin and then its argument prototype would still apply. */
10078 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10079 if { (eval echo "$as_me:10079: \"$ac_link\"") >&5
10080 (eval $ac_link) 2>&5
10082 echo "$as_me:10082: \$? = $ac_status" >&5
10083 (exit "$ac_status"); } &&
10084 { ac_try='test -s "conftest$ac_exeext"'
10085 { (eval echo "$as_me:10085: \"$ac_try\"") >&5
10086 (eval $ac_try) 2>&5
10088 echo "$as_me:10088: \$? = $ac_status" >&5
10089 (exit "$ac_status"); }; }; then
10090 ac_cv_lib_gpm_Gpm_Open=yes
10092 echo "$as_me: failed program was:" >&5
10093 cat "conftest.$ac_ext" >&5
10094 ac_cv_lib_gpm_Gpm_Open=no
10096 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10097 LIBS=$ac_check_lib_save_LIBS
10099 echo "$as_me:10099: result: $ac_cv_lib_gpm_Gpm_Open" >&5
10100 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
10101 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
10102 echo "$as_me:10102: checking for initscr in -lgpm" >&5
10103 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
10104 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
10105 echo $ECHO_N "(cached) $ECHO_C" >&6
10107 ac_check_lib_save_LIBS=$LIBS
10109 cat >"conftest.$ac_ext" <<_ACEOF
10110 #line 10110 "configure"
10111 #include "confdefs.h"
10113 /* Override any gcc2 internal prototype to avoid an error. */
10117 /* We use char because int might match the return type of a gcc2
10118 builtin and then its argument prototype would still apply. */
10128 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10129 if { (eval echo "$as_me:10129: \"$ac_link\"") >&5
10130 (eval $ac_link) 2>&5
10132 echo "$as_me:10132: \$? = $ac_status" >&5
10133 (exit "$ac_status"); } &&
10134 { ac_try='test -s "conftest$ac_exeext"'
10135 { (eval echo "$as_me:10135: \"$ac_try\"") >&5
10136 (eval $ac_try) 2>&5
10138 echo "$as_me:10138: \$? = $ac_status" >&5
10139 (exit "$ac_status"); }; }; then
10140 ac_cv_lib_gpm_initscr=yes
10142 echo "$as_me: failed program was:" >&5
10143 cat "conftest.$ac_ext" >&5
10144 ac_cv_lib_gpm_initscr=no
10146 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10147 LIBS=$ac_check_lib_save_LIBS
10149 echo "$as_me:10149: result: $ac_cv_lib_gpm_initscr" >&5
10150 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
10151 if test "$ac_cv_lib_gpm_initscr" = yes; then
10152 LIBS="$cf_ncurses_SAVE"
10154 cf_ncurses_LIBS="-lgpm"
10161 # This is only necessary if you are linking against an obsolete
10162 # version of ncurses (but it should do no harm, since it is static).
10163 if test "$cf_nculib_root" = ncurses ; then
10164 echo "$as_me:10164: checking for tgoto in -lmytinfo" >&5
10165 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
10166 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
10167 echo $ECHO_N "(cached) $ECHO_C" >&6
10169 ac_check_lib_save_LIBS=$LIBS
10170 LIBS="-lmytinfo $LIBS"
10171 cat >"conftest.$ac_ext" <<_ACEOF
10172 #line 10172 "configure"
10173 #include "confdefs.h"
10175 /* Override any gcc2 internal prototype to avoid an error. */
10179 /* We use char because int might match the return type of a gcc2
10180 builtin and then its argument prototype would still apply. */
10190 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10191 if { (eval echo "$as_me:10191: \"$ac_link\"") >&5
10192 (eval $ac_link) 2>&5
10194 echo "$as_me:10194: \$? = $ac_status" >&5
10195 (exit "$ac_status"); } &&
10196 { ac_try='test -s "conftest$ac_exeext"'
10197 { (eval echo "$as_me:10197: \"$ac_try\"") >&5
10198 (eval $ac_try) 2>&5
10200 echo "$as_me:10200: \$? = $ac_status" >&5
10201 (exit "$ac_status"); }; }; then
10202 ac_cv_lib_mytinfo_tgoto=yes
10204 echo "$as_me: failed program was:" >&5
10205 cat "conftest.$ac_ext" >&5
10206 ac_cv_lib_mytinfo_tgoto=no
10208 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10209 LIBS=$ac_check_lib_save_LIBS
10211 echo "$as_me:10211: result: $ac_cv_lib_mytinfo_tgoto" >&5
10212 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
10213 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
10214 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
10221 cf_add_libs="$LIBS"
10224 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10225 # filter duplicates
10226 for cf_add_1lib in $cf_add_0lib; do
10227 for cf_add_2lib in $cf_add_libs; do
10228 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10233 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10235 LIBS="$cf_add_libs"
10237 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
10240 cf_add_libs="$LIBS"
10243 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10244 # filter duplicates
10245 for cf_add_1lib in $cf_add_0lib; do
10246 for cf_add_2lib in $cf_add_libs; do
10247 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10252 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10254 LIBS="$cf_add_libs"
10258 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
10260 echo "$as_me:10260: checking for initscr" >&5
10261 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
10262 if test "${ac_cv_func_initscr+set}" = set; then
10263 echo $ECHO_N "(cached) $ECHO_C" >&6
10265 cat >"conftest.$ac_ext" <<_ACEOF
10266 #line 10266 "configure"
10267 #include "confdefs.h"
10268 #define initscr autoconf_temporary
10269 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
10276 /* We use char because int might match the return type of a gcc2
10277 builtin and then its argument prototype would still apply. */
10278 char initscr (void);
10284 /* The GNU C library defines stubs for functions which it implements
10285 to always fail with ENOSYS. Some functions are actually named
10286 something starting with __ and the normal name is an alias. */
10287 #if defined (__stub_initscr) || defined (__stub___initscr)
10288 #error found stub for initscr
10296 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10297 if { (eval echo "$as_me:10297: \"$ac_link\"") >&5
10298 (eval $ac_link) 2>&5
10300 echo "$as_me:10300: \$? = $ac_status" >&5
10301 (exit "$ac_status"); } &&
10302 { ac_try='test -s "conftest$ac_exeext"'
10303 { (eval echo "$as_me:10303: \"$ac_try\"") >&5
10304 (eval $ac_try) 2>&5
10306 echo "$as_me:10306: \$? = $ac_status" >&5
10307 (exit "$ac_status"); }; }; then
10308 ac_cv_func_initscr=yes
10310 echo "$as_me: failed program was:" >&5
10311 cat "conftest.$ac_ext" >&5
10312 ac_cv_func_initscr=no
10314 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10316 echo "$as_me:10316: result: $ac_cv_func_initscr" >&5
10317 echo "${ECHO_T}$ac_cv_func_initscr" >&6
10318 if test "$ac_cv_func_initscr" = yes; then
10319 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10322 cf_save_LIBS="$LIBS"
10323 echo "$as_me:10323: checking for initscr in -l$cf_nculib_root" >&5
10324 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
10325 LIBS="-l$cf_nculib_root $LIBS"
10326 cat >"conftest.$ac_ext" <<_ACEOF
10327 #line 10327 "configure"
10328 #include "confdefs.h"
10329 #include <${cf_cv_ncurses_header:-curses.h}>
10338 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10339 if { (eval echo "$as_me:10339: \"$ac_link\"") >&5
10340 (eval $ac_link) 2>&5
10342 echo "$as_me:10342: \$? = $ac_status" >&5
10343 (exit "$ac_status"); } &&
10344 { ac_try='test -s "conftest$ac_exeext"'
10345 { (eval echo "$as_me:10345: \"$ac_try\"") >&5
10346 (eval $ac_try) 2>&5
10348 echo "$as_me:10348: \$? = $ac_status" >&5
10349 (exit "$ac_status"); }; }; then
10350 echo "$as_me:10350: result: yes" >&5
10351 echo "${ECHO_T}yes" >&6
10352 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10355 echo "$as_me: failed program was:" >&5
10356 cat "conftest.$ac_ext" >&5
10357 echo "$as_me:10357: result: no" >&5
10358 echo "${ECHO_T}no" >&6
10361 cf_library_path_list=""
10362 if test -n "${LDFLAGS}${LIBS}" ; then
10363 for cf_library_path in $LDFLAGS $LIBS
10365 case "$cf_library_path" in
10367 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10369 test "x$cf_library_path" != "xNONE" && \
10370 test -d "$cf_library_path" && \
10372 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
10373 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
10374 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
10375 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
10376 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
10377 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"
10380 cf_library_path_list="$cf_library_path_list $cf_search"
10388 test "x$prefix" != "xNONE" && \
10389 test -d "$prefix" && \
10391 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
10392 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
10393 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
10394 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
10395 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
10396 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
10399 for cf_subdir_prefix in \
10408 test "x$cf_subdir_prefix" != "x$prefix" && \
10409 test -d "$cf_subdir_prefix" && \
10410 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10411 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
10412 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
10413 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
10414 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
10415 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
10416 test -d "$cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
10421 cf_search="$cf_library_path_list $cf_search"
10423 for cf_libdir in $cf_search
10425 echo "$as_me:10425: checking for -l$cf_nculib_root in $cf_libdir" >&5
10426 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
10427 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
10428 cat >"conftest.$ac_ext" <<_ACEOF
10429 #line 10429 "configure"
10430 #include "confdefs.h"
10431 #include <${cf_cv_ncurses_header:-curses.h}>
10440 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10441 if { (eval echo "$as_me:10441: \"$ac_link\"") >&5
10442 (eval $ac_link) 2>&5
10444 echo "$as_me:10444: \$? = $ac_status" >&5
10445 (exit "$ac_status"); } &&
10446 { ac_try='test -s "conftest$ac_exeext"'
10447 { (eval echo "$as_me:10447: \"$ac_try\"") >&5
10448 (eval $ac_try) 2>&5
10450 echo "$as_me:10450: \$? = $ac_status" >&5
10451 (exit "$ac_status"); }; }; then
10452 echo "$as_me:10452: result: yes" >&5
10453 echo "${ECHO_T}yes" >&6
10454 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
10457 echo "$as_me: failed program was:" >&5
10458 cat "conftest.$ac_ext" >&5
10459 echo "$as_me:10459: result: no" >&5
10460 echo "${ECHO_T}no" >&6
10461 LIBS="$cf_save_LIBS"
10463 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10467 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10471 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
10473 if test "$cf_found_library" = no ; then
10474 { { echo "$as_me:10474: error: Cannot link $cf_nculib_root library" >&5
10475 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
10476 { (exit 1); exit 1; }; }
10481 if test -n "$cf_ncurses_LIBS" ; then
10482 echo "$as_me:10482: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
10483 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
10484 cf_ncurses_SAVE="$LIBS"
10485 for p in $cf_ncurses_LIBS ; do
10486 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
10487 if test "$q" != "$LIBS" ; then
10491 cat >"conftest.$ac_ext" <<_ACEOF
10492 #line 10492 "configure"
10493 #include "confdefs.h"
10494 #include <${cf_cv_ncurses_header:-curses.h}>
10498 initscr(); mousemask(0,0); tigetstr((char *)0);
10503 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10504 if { (eval echo "$as_me:10504: \"$ac_link\"") >&5
10505 (eval $ac_link) 2>&5
10507 echo "$as_me:10507: \$? = $ac_status" >&5
10508 (exit "$ac_status"); } &&
10509 { ac_try='test -s "conftest$ac_exeext"'
10510 { (eval echo "$as_me:10510: \"$ac_try\"") >&5
10511 (eval $ac_try) 2>&5
10513 echo "$as_me:10513: \$? = $ac_status" >&5
10514 (exit "$ac_status"); }; }; then
10515 echo "$as_me:10515: result: yes" >&5
10516 echo "${ECHO_T}yes" >&6
10518 echo "$as_me: failed program was:" >&5
10519 cat "conftest.$ac_ext" >&5
10520 echo "$as_me:10520: result: no" >&5
10521 echo "${ECHO_T}no" >&6
10522 LIBS="$cf_ncurses_SAVE"
10524 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10527 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10529 cat >>confdefs.h <<EOF
10530 #define $cf_nculib_ROOT 1
10535 NCURSES_CONFIG=none
10541 cf_ncuconfig_root=$cf_cv_screen
10542 cf_have_ncuconfig=no
10544 if test "x${PKG_CONFIG:=none}" != xnone; then
10545 echo "$as_me:10545: checking pkg-config for $cf_ncuconfig_root" >&5
10546 echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
10547 if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
10548 echo "$as_me:10548: result: yes" >&5
10549 echo "${ECHO_T}yes" >&6
10551 echo "$as_me:10551: checking if the $cf_ncuconfig_root package files work" >&5
10552 echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
10553 cf_have_ncuconfig=unknown
10555 cf_save_CFLAGS="$CFLAGS"
10556 cf_save_CPPFLAGS="$CPPFLAGS"
10557 cf_save_LIBS="$LIBS"
10559 cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
10560 cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
10562 # while -W for passing linker flags is prevalent, it is not "standard".
10563 # At least one wrapper for c89/c99 (in Apple's xcode) has its own
10564 # incompatible _and_ non-standard -W option which gives an error. Work
10565 # around that pitfall.
10566 case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
10572 cf_new_extra_cppflags=
10574 for cf_add_cflags in $cf_pkg_cflags
10576 case "$cf_fix_cppflags" in
10578 case "$cf_add_cflags" in
10579 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10580 case "$cf_add_cflags" in
10582 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10584 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10585 && test -z "${cf_tst_cflags}" \
10586 && cf_fix_cppflags=yes
10588 if test "$cf_fix_cppflags" = yes ; then
10590 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10591 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10594 elif test "${cf_tst_cflags}" = "\"'" ; then
10596 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10597 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10603 case "$CPPFLAGS" in
10607 case "$cf_add_cflags" in
10609 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10611 CPPFLAGS=`echo "$CPPFLAGS" | \
10612 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10613 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10618 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10619 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10626 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10627 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10634 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10635 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10637 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10639 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10640 && test -z "${cf_tst_cflags}" \
10641 && cf_fix_cppflags=no
10646 if test -n "$cf_new_cflags" ; then
10648 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10649 CFLAGS="${CFLAGS}$cf_new_cflags"
10653 if test -n "$cf_new_cppflags" ; then
10655 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10656 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10660 if test -n "$cf_new_extra_cppflags" ; then
10662 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10663 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10667 cf_add_libs="$LIBS"
10670 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10671 # filter duplicates
10672 for cf_add_1lib in $cf_add_0lib; do
10673 for cf_add_2lib in $cf_add_libs; do
10674 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10679 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10681 LIBS="$cf_add_libs"
10683 cat >"conftest.$ac_ext" <<_ACEOF
10684 #line 10684 "configure"
10685 #include "confdefs.h"
10686 #include <${cf_cv_ncurses_header:-curses.h}>
10690 initscr(); mousemask(0,0); tigetstr((char *)0);
10695 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10696 if { (eval echo "$as_me:10696: \"$ac_link\"") >&5
10697 (eval $ac_link) 2>&5
10699 echo "$as_me:10699: \$? = $ac_status" >&5
10700 (exit "$ac_status"); } &&
10701 { ac_try='test -s "conftest$ac_exeext"'
10702 { (eval echo "$as_me:10702: \"$ac_try\"") >&5
10703 (eval $ac_try) 2>&5
10705 echo "$as_me:10705: \$? = $ac_status" >&5
10706 (exit "$ac_status"); }; }; then
10707 if test "$cross_compiling" = yes; then
10708 cf_test_ncuconfig=maybe
10710 cat >"conftest.$ac_ext" <<_ACEOF
10711 #line 10711 "configure"
10712 #include "confdefs.h"
10713 #include <${cf_cv_ncurses_header:-curses.h}>
10715 { const char *xx = curses_version(); return (xx == 0); }
10717 rm -f "conftest$ac_exeext"
10718 if { (eval echo "$as_me:10718: \"$ac_link\"") >&5
10719 (eval $ac_link) 2>&5
10721 echo "$as_me:10721: \$? = $ac_status" >&5
10722 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10723 { (eval echo "$as_me:10723: \"$ac_try\"") >&5
10724 (eval $ac_try) 2>&5
10726 echo "$as_me:10726: \$? = $ac_status" >&5
10727 (exit "$ac_status"); }; }; then
10728 cf_test_ncuconfig=yes
10730 echo "$as_me: program exited with status $ac_status" >&5
10731 echo "$as_me: failed program was:" >&5
10732 cat "conftest.$ac_ext" >&5
10733 cf_test_ncuconfig=no
10735 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10738 echo "$as_me: failed program was:" >&5
10739 cat "conftest.$ac_ext" >&5
10740 cf_test_ncuconfig=no
10742 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10744 CFLAGS="$cf_save_CFLAGS"
10745 CPPFLAGS="$cf_save_CPPFLAGS"
10746 LIBS="$cf_save_LIBS"
10748 if test "x$cf_test_ncuconfig" != xyes; then
10749 cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ ]*//g'`
10750 cf_pkg_cflags="$cf_temp"
10751 cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ ]*//g'`
10752 cf_pkg_libs="$cf_temp"
10757 for cf_add_cflags in $cf_pkg_cflags
10759 case "x$cf_add_cflags" in
10762 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10765 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
10766 test "$CFLAGS" != "$cf_old_cflag" || break
10768 CFLAGS="$cf_old_cflag"
10771 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10774 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
10775 test "$CPPFLAGS" != "$cf_old_cflag" || break
10777 CPPFLAGS="$cf_old_cflag"
10786 cf_new_extra_cppflags=
10788 for cf_add_cflags in $cf_add_cflags
10790 case "$cf_fix_cppflags" in
10792 case "$cf_add_cflags" in
10793 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10794 case "$cf_add_cflags" in
10796 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10798 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10799 && test -z "${cf_tst_cflags}" \
10800 && cf_fix_cppflags=yes
10802 if test "$cf_fix_cppflags" = yes ; then
10804 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10805 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10808 elif test "${cf_tst_cflags}" = "\"'" ; then
10810 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10811 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10817 case "$CPPFLAGS" in
10821 case "$cf_add_cflags" in
10823 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10825 CPPFLAGS=`echo "$CPPFLAGS" | \
10826 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10827 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10832 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10833 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10840 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10841 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10848 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10849 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10851 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10853 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10854 && test -z "${cf_tst_cflags}" \
10855 && cf_fix_cppflags=no
10860 if test -n "$cf_new_cflags" ; then
10862 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10863 CFLAGS="${CFLAGS}$cf_new_cflags"
10867 if test -n "$cf_new_cppflags" ; then
10869 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10870 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10874 if test -n "$cf_new_extra_cppflags" ; then
10876 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10877 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10883 cf_add_libs="$LIBS"
10886 for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10887 # filter duplicates
10888 for cf_add_1lib in $cf_add_0lib; do
10889 for cf_add_2lib in $cf_add_libs; do
10890 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10895 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10897 LIBS="$cf_add_libs"
10899 cat >"conftest.$ac_ext" <<_ACEOF
10900 #line 10900 "configure"
10901 #include "confdefs.h"
10902 #include <${cf_cv_ncurses_header:-curses.h}>
10906 initscr(); mousemask(0,0); tigetstr((char *)0);
10911 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10912 if { (eval echo "$as_me:10912: \"$ac_link\"") >&5
10913 (eval $ac_link) 2>&5
10915 echo "$as_me:10915: \$? = $ac_status" >&5
10916 (exit "$ac_status"); } &&
10917 { ac_try='test -s "conftest$ac_exeext"'
10918 { (eval echo "$as_me:10918: \"$ac_try\"") >&5
10919 (eval $ac_try) 2>&5
10921 echo "$as_me:10921: \$? = $ac_status" >&5
10922 (exit "$ac_status"); }; }; then
10923 if test "$cross_compiling" = yes; then
10924 cf_have_ncuconfig=maybe
10926 cat >"conftest.$ac_ext" <<_ACEOF
10927 #line 10927 "configure"
10928 #include "confdefs.h"
10929 #include <${cf_cv_ncurses_header:-curses.h}>
10931 { const char *xx = curses_version(); return (xx == 0); }
10933 rm -f "conftest$ac_exeext"
10934 if { (eval echo "$as_me:10934: \"$ac_link\"") >&5
10935 (eval $ac_link) 2>&5
10937 echo "$as_me:10937: \$? = $ac_status" >&5
10938 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10939 { (eval echo "$as_me:10939: \"$ac_try\"") >&5
10940 (eval $ac_try) 2>&5
10942 echo "$as_me:10942: \$? = $ac_status" >&5
10943 (exit "$ac_status"); }; }; then
10944 cf_have_ncuconfig=yes
10946 echo "$as_me: program exited with status $ac_status" >&5
10947 echo "$as_me: failed program was:" >&5
10948 cat "conftest.$ac_ext" >&5
10949 cf_have_ncuconfig=no
10951 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10954 echo "$as_me: failed program was:" >&5
10955 cat "conftest.$ac_ext" >&5
10956 cf_have_ncuconfig=no
10958 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10959 echo "$as_me:10959: result: $cf_have_ncuconfig" >&5
10960 echo "${ECHO_T}$cf_have_ncuconfig" >&6
10961 test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
10962 if test "$cf_have_ncuconfig" != "yes"
10964 CPPFLAGS="$cf_save_CPPFLAGS"
10965 LIBS="$cf_save_LIBS"
10966 NCURSES_CONFIG_PKG=none
10969 cat >>confdefs.h <<\EOF
10973 NCURSES_CONFIG_PKG=$cf_ncuconfig_root
10975 echo "$as_me:10975: checking for terminfo header" >&5
10976 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
10977 if test "${cf_cv_term_header+set}" = set; then
10978 echo $ECHO_N "(cached) $ECHO_C" >&6
10981 case "${cf_cv_ncurses_header}" in
10982 (*/ncurses.h|*/ncursesw.h)
10983 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
10986 cf_term_header=term.h
10990 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
10992 cat >"conftest.$ac_ext" <<_ACEOF
10993 #line 10993 "configure"
10994 #include "confdefs.h"
10996 #include <${cf_cv_ncurses_header:-curses.h}>
10997 #include <$cf_test>
11002 int x = auto_left_margin; (void)x
11007 rm -f "conftest.$ac_objext"
11008 if { (eval echo "$as_me:11008: \"$ac_compile\"") >&5
11009 (eval $ac_compile) 2>&5
11011 echo "$as_me:11011: \$? = $ac_status" >&5
11012 (exit "$ac_status"); } &&
11013 { ac_try='test -s "conftest.$ac_objext"'
11014 { (eval echo "$as_me:11014: \"$ac_try\"") >&5
11015 (eval $ac_try) 2>&5
11017 echo "$as_me:11017: \$? = $ac_status" >&5
11018 (exit "$ac_status"); }; }; then
11020 cf_cv_term_header="$cf_test"
11022 echo "$as_me: failed program was:" >&5
11023 cat "conftest.$ac_ext" >&5
11025 cf_cv_term_header=unknown
11028 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11029 test "$cf_cv_term_header" != unknown && break
11033 echo "$as_me:11033: result: $cf_cv_term_header" >&5
11034 echo "${ECHO_T}$cf_cv_term_header" >&6
11036 # Set definitions to allow ifdef'ing to accommodate subdirectories
11038 case "$cf_cv_term_header" in
11041 cat >>confdefs.h <<\EOF
11042 #define HAVE_TERM_H 1
11048 case "$cf_cv_term_header" in
11051 cat >>confdefs.h <<\EOF
11052 #define HAVE_NCURSES_TERM_H 1
11058 cat >>confdefs.h <<\EOF
11059 #define HAVE_NCURSESW_TERM_H 1
11068 echo "$as_me:11068: result: no" >&5
11069 echo "${ECHO_T}no" >&6
11070 NCURSES_CONFIG_PKG=none
11073 NCURSES_CONFIG_PKG=none
11076 if test "x$cf_have_ncuconfig" = "xno"; then
11077 cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
11079 if test -n "$ac_tool_prefix"; then
11080 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
11082 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
11083 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
11084 echo "$as_me:11084: checking for $ac_word" >&5
11085 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11086 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
11087 echo $ECHO_N "(cached) $ECHO_C" >&6
11089 if test -n "$NCURSES_CONFIG"; then
11090 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
11092 ac_save_IFS=$IFS; IFS=$ac_path_separator
11094 for ac_dir in $ac_dummy; do
11096 test -z "$ac_dir" && ac_dir=.
11097 $as_executable_p "$ac_dir/$ac_word" || continue
11098 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
11099 echo "$as_me:11099: found $ac_dir/$ac_word" >&5
11105 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
11106 if test -n "$NCURSES_CONFIG"; then
11107 echo "$as_me:11107: result: $NCURSES_CONFIG" >&5
11108 echo "${ECHO_T}$NCURSES_CONFIG" >&6
11110 echo "$as_me:11110: result: no" >&5
11111 echo "${ECHO_T}no" >&6
11114 test -n "$NCURSES_CONFIG" && break
11117 if test -z "$NCURSES_CONFIG"; then
11118 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
11119 for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
11121 # Extract the first word of "$ac_prog", so it can be a program name with args.
11122 set dummy $ac_prog; ac_word=$2
11123 echo "$as_me:11123: checking for $ac_word" >&5
11124 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
11125 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
11126 echo $ECHO_N "(cached) $ECHO_C" >&6
11128 if test -n "$ac_ct_NCURSES_CONFIG"; then
11129 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
11131 ac_save_IFS=$IFS; IFS=$ac_path_separator
11133 for ac_dir in $ac_dummy; do
11135 test -z "$ac_dir" && ac_dir=.
11136 $as_executable_p "$ac_dir/$ac_word" || continue
11137 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
11138 echo "$as_me:11138: found $ac_dir/$ac_word" >&5
11144 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
11145 if test -n "$ac_ct_NCURSES_CONFIG"; then
11146 echo "$as_me:11146: result: $ac_ct_NCURSES_CONFIG" >&5
11147 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
11149 echo "$as_me:11149: result: no" >&5
11150 echo "${ECHO_T}no" >&6
11153 test -n "$ac_ct_NCURSES_CONFIG" && break
11155 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
11157 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
11160 if test "$NCURSES_CONFIG" != none ; then
11162 for cf_add_cflags in `$NCURSES_CONFIG --cflags`
11164 case "x$cf_add_cflags" in
11167 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11170 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11171 test "$CFLAGS" != "$cf_old_cflag" || break
11173 CFLAGS="$cf_old_cflag"
11176 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11179 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11180 test "$CPPFLAGS" != "$cf_old_cflag" || break
11182 CPPFLAGS="$cf_old_cflag"
11191 cf_new_extra_cppflags=
11193 for cf_add_cflags in $cf_add_cflags
11195 case "$cf_fix_cppflags" in
11197 case "$cf_add_cflags" in
11198 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11199 case "$cf_add_cflags" in
11201 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11203 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11204 && test -z "${cf_tst_cflags}" \
11205 && cf_fix_cppflags=yes
11207 if test "$cf_fix_cppflags" = yes ; then
11209 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11210 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11213 elif test "${cf_tst_cflags}" = "\"'" ; then
11215 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11216 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11222 case "$CPPFLAGS" in
11226 case "$cf_add_cflags" in
11228 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11230 CPPFLAGS=`echo "$CPPFLAGS" | \
11231 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11232 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11237 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11238 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11245 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11246 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11253 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11254 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11256 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11258 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11259 && test -z "${cf_tst_cflags}" \
11260 && cf_fix_cppflags=no
11265 if test -n "$cf_new_cflags" ; then
11267 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11268 CFLAGS="${CFLAGS}$cf_new_cflags"
11272 if test -n "$cf_new_cppflags" ; then
11274 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11275 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11279 if test -n "$cf_new_extra_cppflags" ; then
11281 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11282 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11288 cf_add_libs="$LIBS"
11291 for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11292 # filter duplicates
11293 for cf_add_1lib in $cf_add_0lib; do
11294 for cf_add_2lib in $cf_add_libs; do
11295 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11300 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11302 LIBS="$cf_add_libs"
11304 # even with config script, some packages use no-override for curses.h
11306 echo "$as_me:11306: checking if we have identified curses headers" >&5
11307 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
11308 if test "${cf_cv_ncurses_header+set}" = set; then
11309 echo $ECHO_N "(cached) $ECHO_C" >&6
11312 cf_cv_ncurses_header=none
11314 ncurses.h $cf_cv_screen/ncurses.h \
11315 curses.h $cf_cv_screen/curses.h
11317 cat >"conftest.$ac_ext" <<_ACEOF
11318 #line 11318 "configure"
11319 #include "confdefs.h"
11320 #include <${cf_header}>
11324 initscr(); endwin()
11329 rm -f "conftest.$ac_objext"
11330 if { (eval echo "$as_me:11330: \"$ac_compile\"") >&5
11331 (eval $ac_compile) 2>&5
11333 echo "$as_me:11333: \$? = $ac_status" >&5
11334 (exit "$ac_status"); } &&
11335 { ac_try='test -s "conftest.$ac_objext"'
11336 { (eval echo "$as_me:11336: \"$ac_try\"") >&5
11337 (eval $ac_try) 2>&5
11339 echo "$as_me:11339: \$? = $ac_status" >&5
11340 (exit "$ac_status"); }; }; then
11341 cf_cv_ncurses_header=$cf_header; break
11343 echo "$as_me: failed program was:" >&5
11344 cat "conftest.$ac_ext" >&5
11346 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11350 echo "$as_me:11350: result: $cf_cv_ncurses_header" >&5
11351 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
11353 if test "$cf_cv_ncurses_header" = none ; then
11354 { { echo "$as_me:11354: error: No curses header-files found" >&5
11355 echo "$as_me: error: No curses header-files found" >&2;}
11356 { (exit 1); exit 1; }; }
11359 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
11361 for ac_header in $cf_cv_ncurses_header
11363 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11364 echo "$as_me:11364: checking for $ac_header" >&5
11365 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11366 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11367 echo $ECHO_N "(cached) $ECHO_C" >&6
11369 cat >"conftest.$ac_ext" <<_ACEOF
11370 #line 11370 "configure"
11371 #include "confdefs.h"
11372 #include <$ac_header>
11374 if { (eval echo "$as_me:11374: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11375 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11377 $EGREP -v '^ *\+' conftest.er1 >conftest.err
11379 cat conftest.err >&5
11380 echo "$as_me:11380: \$? = $ac_status" >&5
11381 (exit "$ac_status"); } >/dev/null; then
11382 if test -s conftest.err; then
11383 ac_cpp_err=$ac_c_preproc_warn_flag
11390 if test -z "$ac_cpp_err"; then
11391 eval "$as_ac_Header=yes"
11393 echo "$as_me: failed program was:" >&5
11394 cat "conftest.$ac_ext" >&5
11395 eval "$as_ac_Header=no"
11397 rm -f conftest.err "conftest.$ac_ext"
11399 echo "$as_me:11399: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11400 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11401 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11402 cat >>confdefs.h <<EOF
11403 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11409 cat >>confdefs.h <<\EOF
11413 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11415 cat >>confdefs.h <<EOF
11416 #define $cf_nculib_ROOT 1
11419 cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
11423 cf_ncuhdr_root=$cf_cv_screen
11425 test -n "$cf_cv_curses_dir" && \
11426 test "$cf_cv_curses_dir" != "no" && { \
11428 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
11429 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
11431 while test "$cf_add_incdir" != /usr/include
11433 if test -d "$cf_add_incdir"
11436 if test -n "$CFLAGS$CPPFLAGS" ; then
11437 # a loop is needed to ensure we can add subdirs of existing dirs
11438 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11439 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11440 cf_have_incdir=yes; break
11445 if test "$cf_have_incdir" = no ; then
11446 if test "$cf_add_incdir" = /usr/local/include ; then
11447 if test "$GCC" = yes
11449 cf_save_CPPFLAGS=$CPPFLAGS
11451 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11452 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11454 cat >"conftest.$ac_ext" <<_ACEOF
11455 #line 11455 "configure"
11456 #include "confdefs.h"
11466 rm -f "conftest.$ac_objext"
11467 if { (eval echo "$as_me:11467: \"$ac_compile\"") >&5
11468 (eval $ac_compile) 2>&5
11470 echo "$as_me:11470: \$? = $ac_status" >&5
11471 (exit "$ac_status"); } &&
11472 { ac_try='test -s "conftest.$ac_objext"'
11473 { (eval echo "$as_me:11473: \"$ac_try\"") >&5
11474 (eval $ac_try) 2>&5
11476 echo "$as_me:11476: \$? = $ac_status" >&5
11477 (exit "$ac_status"); }; }; then
11480 echo "$as_me: failed program was:" >&5
11481 cat "conftest.$ac_ext" >&5
11484 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11485 CPPFLAGS=$cf_save_CPPFLAGS
11490 if test "$cf_have_incdir" = no ; then
11491 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11493 echo "${as_me:-configure}:11493: testing adding $cf_add_incdir to include-path ..." 1>&5
11495 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11497 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11498 test "$cf_top_incdir" = "$cf_add_incdir" && break
11499 cf_add_incdir="$cf_top_incdir"
11512 echo "$as_me:11512: checking for $cf_ncuhdr_root header in include-path" >&5
11513 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
11514 if test "${cf_cv_ncurses_h+set}" = set; then
11515 echo $ECHO_N "(cached) $ECHO_C" >&6
11518 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
11519 { test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
11520 for cf_header in $cf_header_list
11523 cat >"conftest.$ac_ext" <<_ACEOF
11524 #line 11524 "configure"
11525 #include "confdefs.h"
11527 #include <$cf_header>
11532 #ifdef NCURSES_VERSION
11534 printf("%s\\n", NCURSES_VERSION);
11539 #error __NCURSES_H is not defined
11547 rm -f "conftest.$ac_objext"
11548 if { (eval echo "$as_me:11548: \"$ac_compile\"") >&5
11549 (eval $ac_compile) 2>&5
11551 echo "$as_me:11551: \$? = $ac_status" >&5
11552 (exit "$ac_status"); } &&
11553 { ac_try='test -s "conftest.$ac_objext"'
11554 { (eval echo "$as_me:11554: \"$ac_try\"") >&5
11555 (eval $ac_try) 2>&5
11557 echo "$as_me:11557: \$? = $ac_status" >&5
11558 (exit "$ac_status"); }; }; then
11559 cf_cv_ncurses_h=$cf_header
11562 echo "$as_me: failed program was:" >&5
11563 cat "conftest.$ac_ext" >&5
11566 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11568 test "$cf_cv_ncurses_h" != no && break
11572 echo "$as_me:11572: result: $cf_cv_ncurses_h" >&5
11573 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
11575 if test "$cf_cv_ncurses_h" != no ; then
11576 cf_cv_ncurses_header=$cf_cv_ncurses_h
11579 echo "$as_me:11579: checking for $cf_ncuhdr_root include-path" >&5
11580 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
11581 if test "${cf_cv_ncurses_h2+set}" = set; then
11582 echo $ECHO_N "(cached) $ECHO_C" >&6
11585 test -n "$verbose" && echo
11589 # collect the current set of include-directories from compiler flags
11590 cf_header_path_list=""
11591 if test -n "${CFLAGS}${CPPFLAGS}" ; then
11592 for cf_header_path in $CPPFLAGS $CFLAGS
11594 case "$cf_header_path" in
11596 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
11598 test "x$cf_header_path" != "xNONE" && \
11599 test -d "$cf_header_path" && \
11601 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
11602 test -d "$cf_header_path/include" && cf_search="$cf_search $cf_header_path/include"
11603 test -d "$cf_header_path/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
11604 test -d "$cf_header_path/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
11605 test -d "$cf_header_path/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
11606 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"
11609 cf_header_path_list="$cf_header_path_list $cf_search"
11615 # add the variations for the package we are looking for
11619 test "x$prefix" != "xNONE" && \
11620 test -d "$prefix" && \
11622 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
11623 test -d "$prefix/include" && cf_search="$cf_search $prefix/include"
11624 test -d "$prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
11625 test -d "$prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
11626 test -d "$prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
11627 test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
11630 for cf_subdir_prefix in \
11639 test "x$cf_subdir_prefix" != "x$prefix" && \
11640 test -d "$cf_subdir_prefix" && \
11641 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
11642 test -n "$verbose" && echo " ... testing for include-directories under $cf_subdir_prefix"
11643 test -d "$cf_subdir_prefix/include" && cf_search="$cf_search $cf_subdir_prefix/include"
11644 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
11645 test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
11646 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
11647 test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" && cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
11652 test "$includedir" != NONE && \
11653 test "$includedir" != "/usr/include" && \
11654 test -d "$includedir" && {
11655 test -d "$includedir" && cf_search="$cf_search $includedir"
11656 test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
11659 test "$oldincludedir" != NONE && \
11660 test "$oldincludedir" != "/usr/include" && \
11661 test -d "$oldincludedir" && {
11662 test -d "$oldincludedir" && cf_search="$cf_search $oldincludedir"
11663 test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
11666 cf_search="$cf_search $cf_header_path_list"
11668 test -n "$verbose" && echo "search path $cf_search"
11669 cf_save2_CPPFLAGS="$CPPFLAGS"
11670 for cf_incdir in $cf_search
11673 if test -n "$cf_incdir" ; then
11674 for cf_add_incdir in $cf_incdir
11676 while test "$cf_add_incdir" != /usr/include
11678 if test -d "$cf_add_incdir"
11681 if test -n "$CFLAGS$CPPFLAGS" ; then
11682 # a loop is needed to ensure we can add subdirs of existing dirs
11683 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11684 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11685 cf_have_incdir=yes; break
11690 if test "$cf_have_incdir" = no ; then
11691 if test "$cf_add_incdir" = /usr/local/include ; then
11692 if test "$GCC" = yes
11694 cf_save_CPPFLAGS=$CPPFLAGS
11696 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11697 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11699 cat >"conftest.$ac_ext" <<_ACEOF
11700 #line 11700 "configure"
11701 #include "confdefs.h"
11711 rm -f "conftest.$ac_objext"
11712 if { (eval echo "$as_me:11712: \"$ac_compile\"") >&5
11713 (eval $ac_compile) 2>&5
11715 echo "$as_me:11715: \$? = $ac_status" >&5
11716 (exit "$ac_status"); } &&
11717 { ac_try='test -s "conftest.$ac_objext"'
11718 { (eval echo "$as_me:11718: \"$ac_try\"") >&5
11719 (eval $ac_try) 2>&5
11721 echo "$as_me:11721: \$? = $ac_status" >&5
11722 (exit "$ac_status"); }; }; then
11725 echo "$as_me: failed program was:" >&5
11726 cat "conftest.$ac_ext" >&5
11729 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11730 CPPFLAGS=$cf_save_CPPFLAGS
11735 if test "$cf_have_incdir" = no ; then
11736 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11738 echo "${as_me:-configure}:11738: testing adding $cf_add_incdir to include-path ..." 1>&5
11740 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11742 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11743 test "$cf_top_incdir" = "$cf_add_incdir" && break
11744 cf_add_incdir="$cf_top_incdir"
11760 cat >"conftest.$ac_ext" <<_ACEOF
11761 #line 11761 "configure"
11762 #include "confdefs.h"
11764 #include <$cf_header>
11769 #ifdef NCURSES_VERSION
11771 printf("%s\\n", NCURSES_VERSION);
11776 #error __NCURSES_H is not defined
11784 rm -f "conftest.$ac_objext"
11785 if { (eval echo "$as_me:11785: \"$ac_compile\"") >&5
11786 (eval $ac_compile) 2>&5
11788 echo "$as_me:11788: \$? = $ac_status" >&5
11789 (exit "$ac_status"); } &&
11790 { ac_try='test -s "conftest.$ac_objext"'
11791 { (eval echo "$as_me:11791: \"$ac_try\"") >&5
11792 (eval $ac_try) 2>&5
11794 echo "$as_me:11794: \$? = $ac_status" >&5
11795 (exit "$ac_status"); }; }; then
11796 cf_cv_ncurses_h2=$cf_header
11799 echo "$as_me: failed program was:" >&5
11800 cat "conftest.$ac_ext" >&5
11801 cf_cv_ncurses_h2=no
11803 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11805 if test "$cf_cv_ncurses_h2" != no ; then
11806 cf_cv_ncurses_h2=$cf_incdir/$cf_header
11807 test -n "$verbose" && echo $ECHO_N " ... found $ECHO_C" 1>&6
11810 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
11812 CPPFLAGS="$cf_save2_CPPFLAGS"
11813 test "$cf_cv_ncurses_h2" != no && break
11815 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:11815: error: not found" >&5
11816 echo "$as_me: error: not found" >&2;}
11817 { (exit 1); exit 1; }; }
11820 echo "$as_me:11820: result: $cf_cv_ncurses_h2" >&5
11821 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
11823 cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
11824 cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
11825 if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
11826 cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
11829 if test -n "$cf_1st_incdir" ; then
11830 for cf_add_incdir in $cf_1st_incdir
11832 while test "$cf_add_incdir" != /usr/include
11834 if test -d "$cf_add_incdir"
11837 if test -n "$CFLAGS$CPPFLAGS" ; then
11838 # a loop is needed to ensure we can add subdirs of existing dirs
11839 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11840 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11841 cf_have_incdir=yes; break
11846 if test "$cf_have_incdir" = no ; then
11847 if test "$cf_add_incdir" = /usr/local/include ; then
11848 if test "$GCC" = yes
11850 cf_save_CPPFLAGS=$CPPFLAGS
11852 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11853 CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11855 cat >"conftest.$ac_ext" <<_ACEOF
11856 #line 11856 "configure"
11857 #include "confdefs.h"
11867 rm -f "conftest.$ac_objext"
11868 if { (eval echo "$as_me:11868: \"$ac_compile\"") >&5
11869 (eval $ac_compile) 2>&5
11871 echo "$as_me:11871: \$? = $ac_status" >&5
11872 (exit "$ac_status"); } &&
11873 { ac_try='test -s "conftest.$ac_objext"'
11874 { (eval echo "$as_me:11874: \"$ac_try\"") >&5
11875 (eval $ac_try) 2>&5
11877 echo "$as_me:11877: \$? = $ac_status" >&5
11878 (exit "$ac_status"); }; }; then
11881 echo "$as_me: failed program was:" >&5
11882 cat "conftest.$ac_ext" >&5
11885 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11886 CPPFLAGS=$cf_save_CPPFLAGS
11891 if test "$cf_have_incdir" = no ; then
11892 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
11894 echo "${as_me:-configure}:11894: testing adding $cf_add_incdir to include-path ..." 1>&5
11896 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11898 cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
11899 test "$cf_top_incdir" = "$cf_add_incdir" && break
11900 cf_add_incdir="$cf_top_incdir"
11913 # Set definitions to allow ifdef'ing for ncurses.h
11915 case "$cf_cv_ncurses_header" in
11918 cat >>confdefs.h <<\EOF
11919 #define HAVE_NCURSES_H 1
11925 case "$cf_cv_ncurses_header" in
11926 (ncurses/curses.h|ncurses/ncurses.h)
11928 cat >>confdefs.h <<\EOF
11929 #define HAVE_NCURSES_NCURSES_H 1
11933 (ncursesw/curses.h|ncursesw/ncurses.h)
11935 cat >>confdefs.h <<\EOF
11936 #define HAVE_NCURSESW_NCURSES_H 1
11942 echo "$as_me:11942: checking for terminfo header" >&5
11943 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
11944 if test "${cf_cv_term_header+set}" = set; then
11945 echo $ECHO_N "(cached) $ECHO_C" >&6
11948 case "${cf_cv_ncurses_header}" in
11949 (*/ncurses.h|*/ncursesw.h)
11950 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
11953 cf_term_header=term.h
11957 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
11959 cat >"conftest.$ac_ext" <<_ACEOF
11960 #line 11960 "configure"
11961 #include "confdefs.h"
11963 #include <${cf_cv_ncurses_header:-curses.h}>
11964 #include <$cf_test>
11969 int x = auto_left_margin; (void)x
11974 rm -f "conftest.$ac_objext"
11975 if { (eval echo "$as_me:11975: \"$ac_compile\"") >&5
11976 (eval $ac_compile) 2>&5
11978 echo "$as_me:11978: \$? = $ac_status" >&5
11979 (exit "$ac_status"); } &&
11980 { ac_try='test -s "conftest.$ac_objext"'
11981 { (eval echo "$as_me:11981: \"$ac_try\"") >&5
11982 (eval $ac_try) 2>&5
11984 echo "$as_me:11984: \$? = $ac_status" >&5
11985 (exit "$ac_status"); }; }; then
11987 cf_cv_term_header="$cf_test"
11989 echo "$as_me: failed program was:" >&5
11990 cat "conftest.$ac_ext" >&5
11992 cf_cv_term_header=unknown
11995 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11996 test "$cf_cv_term_header" != unknown && break
12000 echo "$as_me:12000: result: $cf_cv_term_header" >&5
12001 echo "${ECHO_T}$cf_cv_term_header" >&6
12003 # Set definitions to allow ifdef'ing to accommodate subdirectories
12005 case "$cf_cv_term_header" in
12008 cat >>confdefs.h <<\EOF
12009 #define HAVE_TERM_H 1
12015 case "$cf_cv_term_header" in
12018 cat >>confdefs.h <<\EOF
12019 #define HAVE_NCURSES_TERM_H 1
12025 cat >>confdefs.h <<\EOF
12026 #define HAVE_NCURSESW_TERM_H 1
12032 # some applications need this, but should check for NCURSES_VERSION
12034 cat >>confdefs.h <<\EOF
12038 echo "$as_me:12038: checking for ncurses version" >&5
12039 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
12040 if test "${cf_cv_ncurses_version+set}" = set; then
12041 echo $ECHO_N "(cached) $ECHO_C" >&6
12044 cf_cv_ncurses_version=no
12046 rm -f "$cf_tempfile"
12047 if test "$cross_compiling" = yes; then
12049 # This will not work if the preprocessor splits the line after the
12050 # Autoconf token. The 'unproto' program does that.
12051 cat > "conftest.$ac_ext" <<EOF
12052 #include <${cf_cv_ncurses_header:-curses.h}>
12054 #ifdef NCURSES_VERSION
12055 Autoconf NCURSES_VERSION
12063 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
12064 { (eval echo "$as_me:12064: \"$cf_try\"") >&5
12065 (eval $cf_try) 2>&5
12067 echo "$as_me:12067: \$? = $ac_status" >&5
12068 (exit "$ac_status"); }
12069 if test -f conftest.out ; then
12070 cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
12071 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
12076 cat >"conftest.$ac_ext" <<_ACEOF
12077 #line 12077 "configure"
12078 #include "confdefs.h"
12080 $ac_includes_default
12082 #include <${cf_cv_ncurses_header:-curses.h}>
12086 FILE *fp = fopen("$cf_tempfile", "w");
12087 #ifdef NCURSES_VERSION
12088 # ifdef NCURSES_VERSION_PATCH
12089 fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
12091 fprintf(fp, "%s\\n", NCURSES_VERSION);
12094 # ifdef __NCURSES_H
12095 fprintf(fp, "old\\n");
12100 ${cf_cv_main_return:-return}(0);
12103 rm -f "conftest$ac_exeext"
12104 if { (eval echo "$as_me:12104: \"$ac_link\"") >&5
12105 (eval $ac_link) 2>&5
12107 echo "$as_me:12107: \$? = $ac_status" >&5
12108 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12109 { (eval echo "$as_me:12109: \"$ac_try\"") >&5
12110 (eval $ac_try) 2>&5
12112 echo "$as_me:12112: \$? = $ac_status" >&5
12113 (exit "$ac_status"); }; }; then
12115 cf_cv_ncurses_version=`cat $cf_tempfile`
12117 echo "$as_me: program exited with status $ac_status" >&5
12118 echo "$as_me: failed program was:" >&5
12119 cat "conftest.$ac_ext" >&5
12121 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12123 rm -f "$cf_tempfile"
12126 echo "$as_me:12126: result: $cf_cv_ncurses_version" >&5
12127 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
12128 test "$cf_cv_ncurses_version" = no ||
12129 cat >>confdefs.h <<\EOF
12133 cf_nculib_root=$cf_cv_screen
12134 # This works, except for the special case where we find gpm, but
12135 # ncurses is in a nonstandard location via $LIBS, and we really want
12138 cf_ncurses_SAVE="$LIBS"
12139 echo "$as_me:12139: checking for Gpm_Open in -lgpm" >&5
12140 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
12141 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
12142 echo $ECHO_N "(cached) $ECHO_C" >&6
12144 ac_check_lib_save_LIBS=$LIBS
12146 cat >"conftest.$ac_ext" <<_ACEOF
12147 #line 12147 "configure"
12148 #include "confdefs.h"
12150 /* Override any gcc2 internal prototype to avoid an error. */
12154 /* We use char because int might match the return type of a gcc2
12155 builtin and then its argument prototype would still apply. */
12165 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12166 if { (eval echo "$as_me:12166: \"$ac_link\"") >&5
12167 (eval $ac_link) 2>&5
12169 echo "$as_me:12169: \$? = $ac_status" >&5
12170 (exit "$ac_status"); } &&
12171 { ac_try='test -s "conftest$ac_exeext"'
12172 { (eval echo "$as_me:12172: \"$ac_try\"") >&5
12173 (eval $ac_try) 2>&5
12175 echo "$as_me:12175: \$? = $ac_status" >&5
12176 (exit "$ac_status"); }; }; then
12177 ac_cv_lib_gpm_Gpm_Open=yes
12179 echo "$as_me: failed program was:" >&5
12180 cat "conftest.$ac_ext" >&5
12181 ac_cv_lib_gpm_Gpm_Open=no
12183 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12184 LIBS=$ac_check_lib_save_LIBS
12186 echo "$as_me:12186: result: $ac_cv_lib_gpm_Gpm_Open" >&5
12187 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
12188 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
12189 echo "$as_me:12189: checking for initscr in -lgpm" >&5
12190 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
12191 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
12192 echo $ECHO_N "(cached) $ECHO_C" >&6
12194 ac_check_lib_save_LIBS=$LIBS
12196 cat >"conftest.$ac_ext" <<_ACEOF
12197 #line 12197 "configure"
12198 #include "confdefs.h"
12200 /* Override any gcc2 internal prototype to avoid an error. */
12204 /* We use char because int might match the return type of a gcc2
12205 builtin and then its argument prototype would still apply. */
12215 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12216 if { (eval echo "$as_me:12216: \"$ac_link\"") >&5
12217 (eval $ac_link) 2>&5
12219 echo "$as_me:12219: \$? = $ac_status" >&5
12220 (exit "$ac_status"); } &&
12221 { ac_try='test -s "conftest$ac_exeext"'
12222 { (eval echo "$as_me:12222: \"$ac_try\"") >&5
12223 (eval $ac_try) 2>&5
12225 echo "$as_me:12225: \$? = $ac_status" >&5
12226 (exit "$ac_status"); }; }; then
12227 ac_cv_lib_gpm_initscr=yes
12229 echo "$as_me: failed program was:" >&5
12230 cat "conftest.$ac_ext" >&5
12231 ac_cv_lib_gpm_initscr=no
12233 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12234 LIBS=$ac_check_lib_save_LIBS
12236 echo "$as_me:12236: result: $ac_cv_lib_gpm_initscr" >&5
12237 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
12238 if test "$ac_cv_lib_gpm_initscr" = yes; then
12239 LIBS="$cf_ncurses_SAVE"
12241 cf_ncurses_LIBS="-lgpm"
12248 # This is only necessary if you are linking against an obsolete
12249 # version of ncurses (but it should do no harm, since it is static).
12250 if test "$cf_nculib_root" = ncurses ; then
12251 echo "$as_me:12251: checking for tgoto in -lmytinfo" >&5
12252 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
12253 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
12254 echo $ECHO_N "(cached) $ECHO_C" >&6
12256 ac_check_lib_save_LIBS=$LIBS
12257 LIBS="-lmytinfo $LIBS"
12258 cat >"conftest.$ac_ext" <<_ACEOF
12259 #line 12259 "configure"
12260 #include "confdefs.h"
12262 /* Override any gcc2 internal prototype to avoid an error. */
12266 /* We use char because int might match the return type of a gcc2
12267 builtin and then its argument prototype would still apply. */
12277 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12278 if { (eval echo "$as_me:12278: \"$ac_link\"") >&5
12279 (eval $ac_link) 2>&5
12281 echo "$as_me:12281: \$? = $ac_status" >&5
12282 (exit "$ac_status"); } &&
12283 { ac_try='test -s "conftest$ac_exeext"'
12284 { (eval echo "$as_me:12284: \"$ac_try\"") >&5
12285 (eval $ac_try) 2>&5
12287 echo "$as_me:12287: \$? = $ac_status" >&5
12288 (exit "$ac_status"); }; }; then
12289 ac_cv_lib_mytinfo_tgoto=yes
12291 echo "$as_me: failed program was:" >&5
12292 cat "conftest.$ac_ext" >&5
12293 ac_cv_lib_mytinfo_tgoto=no
12295 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12296 LIBS=$ac_check_lib_save_LIBS
12298 echo "$as_me:12298: result: $ac_cv_lib_mytinfo_tgoto" >&5
12299 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
12300 if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
12301 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
12308 cf_add_libs="$LIBS"
12311 for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12312 # filter duplicates
12313 for cf_add_1lib in $cf_add_0lib; do
12314 for cf_add_2lib in $cf_add_libs; do
12315 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12320 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12322 LIBS="$cf_add_libs"
12324 if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
12327 cf_add_libs="$LIBS"
12330 for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12331 # filter duplicates
12332 for cf_add_1lib in $cf_add_0lib; do
12333 for cf_add_2lib in $cf_add_libs; do
12334 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12339 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12341 LIBS="$cf_add_libs"
12345 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
12347 echo "$as_me:12347: checking for initscr" >&5
12348 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
12349 if test "${ac_cv_func_initscr+set}" = set; then
12350 echo $ECHO_N "(cached) $ECHO_C" >&6
12352 cat >"conftest.$ac_ext" <<_ACEOF
12353 #line 12353 "configure"
12354 #include "confdefs.h"
12355 #define initscr autoconf_temporary
12356 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
12363 /* We use char because int might match the return type of a gcc2
12364 builtin and then its argument prototype would still apply. */
12365 char initscr (void);
12371 /* The GNU C library defines stubs for functions which it implements
12372 to always fail with ENOSYS. Some functions are actually named
12373 something starting with __ and the normal name is an alias. */
12374 #if defined (__stub_initscr) || defined (__stub___initscr)
12375 #error found stub for initscr
12383 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12384 if { (eval echo "$as_me:12384: \"$ac_link\"") >&5
12385 (eval $ac_link) 2>&5
12387 echo "$as_me:12387: \$? = $ac_status" >&5
12388 (exit "$ac_status"); } &&
12389 { ac_try='test -s "conftest$ac_exeext"'
12390 { (eval echo "$as_me:12390: \"$ac_try\"") >&5
12391 (eval $ac_try) 2>&5
12393 echo "$as_me:12393: \$? = $ac_status" >&5
12394 (exit "$ac_status"); }; }; then
12395 ac_cv_func_initscr=yes
12397 echo "$as_me: failed program was:" >&5
12398 cat "conftest.$ac_ext" >&5
12399 ac_cv_func_initscr=no
12401 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12403 echo "$as_me:12403: result: $ac_cv_func_initscr" >&5
12404 echo "${ECHO_T}$ac_cv_func_initscr" >&6
12405 if test "$ac_cv_func_initscr" = yes; then
12406 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
12409 cf_save_LIBS="$LIBS"
12410 echo "$as_me:12410: checking for initscr in -l$cf_nculib_root" >&5
12411 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
12412 LIBS="-l$cf_nculib_root $LIBS"
12413 cat >"conftest.$ac_ext" <<_ACEOF
12414 #line 12414 "configure"
12415 #include "confdefs.h"
12416 #include <${cf_cv_ncurses_header:-curses.h}>
12425 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12426 if { (eval echo "$as_me:12426: \"$ac_link\"") >&5
12427 (eval $ac_link) 2>&5
12429 echo "$as_me:12429: \$? = $ac_status" >&5
12430 (exit "$ac_status"); } &&
12431 { ac_try='test -s "conftest$ac_exeext"'
12432 { (eval echo "$as_me:12432: \"$ac_try\"") >&5
12433 (eval $ac_try) 2>&5
12435 echo "$as_me:12435: \$? = $ac_status" >&5
12436 (exit "$ac_status"); }; }; then
12437 echo "$as_me:12437: result: yes" >&5
12438 echo "${ECHO_T}yes" >&6
12439 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
12442 echo "$as_me: failed program was:" >&5
12443 cat "conftest.$ac_ext" >&5
12444 echo "$as_me:12444: result: no" >&5
12445 echo "${ECHO_T}no" >&6
12448 cf_library_path_list=""
12449 if test -n "${LDFLAGS}${LIBS}" ; then
12450 for cf_library_path in $LDFLAGS $LIBS
12452 case "$cf_library_path" in
12454 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12456 test "x$cf_library_path" != "xNONE" && \
12457 test -d "$cf_library_path" && \
12459 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
12460 test -d "$cf_library_path/lib" && cf_search="$cf_search $cf_library_path/lib"
12461 test -d "$cf_library_path/lib/$cf_nculib_root" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
12462 test -d "$cf_library_path/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
12463 test -d "$cf_library_path/$cf_nculib_root/lib" && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
12464 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"
12467 cf_library_path_list="$cf_library_path_list $cf_search"
12475 test "x$prefix" != "xNONE" && \
12476 test -d "$prefix" && \
12478 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
12479 test -d "$prefix/lib" && cf_search="$cf_search $prefix/lib"
12480 test -d "$prefix/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
12481 test -d "$prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
12482 test -d "$prefix/$cf_nculib_root/lib" && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
12483 test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
12486 for cf_subdir_prefix in \
12495 test "x$cf_subdir_prefix" != "x$prefix" && \
12496 test -d "$cf_subdir_prefix" && \
12497 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12498 test -n "$verbose" && echo " ... testing for lib-directories under $cf_subdir_prefix"
12499 test -d "$cf_subdir_prefix/lib" && cf_search="$cf_search $cf_subdir_prefix/lib"
12500 test -d "$cf_subdir_prefix/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
12501 test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
12502 test -d "$cf_subdir_prefix/$cf_nculib_root/lib" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
12503 test -d "$cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root" && cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
12508 cf_search="$cf_library_path_list $cf_search"
12510 for cf_libdir in $cf_search
12512 echo "$as_me:12512: checking for -l$cf_nculib_root in $cf_libdir" >&5
12513 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
12514 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
12515 cat >"conftest.$ac_ext" <<_ACEOF
12516 #line 12516 "configure"
12517 #include "confdefs.h"
12518 #include <${cf_cv_ncurses_header:-curses.h}>
12527 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12528 if { (eval echo "$as_me:12528: \"$ac_link\"") >&5
12529 (eval $ac_link) 2>&5
12531 echo "$as_me:12531: \$? = $ac_status" >&5
12532 (exit "$ac_status"); } &&
12533 { ac_try='test -s "conftest$ac_exeext"'
12534 { (eval echo "$as_me:12534: \"$ac_try\"") >&5
12535 (eval $ac_try) 2>&5
12537 echo "$as_me:12537: \$? = $ac_status" >&5
12538 (exit "$ac_status"); }; }; then
12539 echo "$as_me:12539: result: yes" >&5
12540 echo "${ECHO_T}yes" >&6
12541 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
12544 echo "$as_me: failed program was:" >&5
12545 cat "conftest.$ac_ext" >&5
12546 echo "$as_me:12546: result: no" >&5
12547 echo "${ECHO_T}no" >&6
12548 LIBS="$cf_save_LIBS"
12550 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12554 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12558 eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
12560 if test "$cf_found_library" = no ; then
12561 { { echo "$as_me:12561: error: Cannot link $cf_nculib_root library" >&5
12562 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
12563 { (exit 1); exit 1; }; }
12568 if test -n "$cf_ncurses_LIBS" ; then
12569 echo "$as_me:12569: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
12570 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
12571 cf_ncurses_SAVE="$LIBS"
12572 for p in $cf_ncurses_LIBS ; do
12573 q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
12574 if test "$q" != "$LIBS" ; then
12578 cat >"conftest.$ac_ext" <<_ACEOF
12579 #line 12579 "configure"
12580 #include "confdefs.h"
12581 #include <${cf_cv_ncurses_header:-curses.h}>
12585 initscr(); mousemask(0,0); tigetstr((char *)0);
12590 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12591 if { (eval echo "$as_me:12591: \"$ac_link\"") >&5
12592 (eval $ac_link) 2>&5
12594 echo "$as_me:12594: \$? = $ac_status" >&5
12595 (exit "$ac_status"); } &&
12596 { ac_try='test -s "conftest$ac_exeext"'
12597 { (eval echo "$as_me:12597: \"$ac_try\"") >&5
12598 (eval $ac_try) 2>&5
12600 echo "$as_me:12600: \$? = $ac_status" >&5
12601 (exit "$ac_status"); }; }; then
12602 echo "$as_me:12602: result: yes" >&5
12603 echo "${ECHO_T}yes" >&6
12605 echo "$as_me: failed program was:" >&5
12606 cat "conftest.$ac_ext" >&5
12607 echo "$as_me:12607: result: no" >&5
12608 echo "${ECHO_T}no" >&6
12609 LIBS="$cf_ncurses_SAVE"
12611 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12614 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12616 cat >>confdefs.h <<EOF
12617 #define $cf_nculib_ROOT 1
12622 NCURSES_CONFIG=none
12627 echo "$as_me:12627: checking for X" >&5
12628 echo $ECHO_N "checking for X... $ECHO_C" >&6
12630 # Check whether --with-x or --without-x was given.
12631 if test "${with_x+set}" = set; then
12635 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
12636 if test "x$with_x" = xno; then
12637 # The user explicitly disabled X.
12640 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
12641 # Both variables are already set.
12644 if test "${ac_cv_have_x+set}" = set; then
12645 echo $ECHO_N "(cached) $ECHO_C" >&6
12647 # One or both of the vars are not set, and there is no cached value.
12648 ac_x_includes=no ac_x_libraries=no
12649 rm -fr conftest.dir
12650 if mkdir conftest.dir; then
12652 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
12653 cat >Imakefile <<'EOF'
12655 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
12657 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
12658 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
12659 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
12660 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
12661 for ac_extension in a so sl dylib dll; do
12662 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
12663 test -f "$ac_im_libdir/libX11.$ac_extension"; then
12664 ac_im_usrlibdir=$ac_im_libdir; break
12667 # Screen out bogus values from the imake configuration. They are
12668 # bogus both because they are the default anyway, and because
12669 # using them would break gcc on systems where it needs fixed includes.
12670 case $ac_im_incroot in
12672 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
12674 case $ac_im_usrlibdir in
12675 /usr/lib | /lib) ;;
12676 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
12680 rm -fr conftest.dir
12683 # Standard set of common directories for X headers.
12684 # Check X11 before X11Rn because it is often a symlink to the current release.
12701 /usr/local/X11/include
12702 /usr/local/X11R7/include
12703 /usr/local/X11R6/include
12704 /usr/local/X11R5/include
12705 /usr/local/X11R4/include
12707 /usr/local/include/X11
12708 /usr/local/include/X11R7
12709 /usr/local/include/X11R6
12710 /usr/local/include/X11R5
12711 /usr/local/include/X11R4
12715 /usr/XFree86/include/X11
12719 /usr/unsupported/include
12720 /usr/athena/include
12721 /usr/local/x11r5/include
12722 /usr/lpp/Xamples/include
12724 /usr/openwin/include
12725 /usr/openwin/share/include'
12727 if test "$ac_x_includes" = no; then
12728 # Guess where to find include files, by looking for Intrinsic.h.
12729 # First, try using that file with no special directory specified.
12730 cat >"conftest.$ac_ext" <<_ACEOF
12731 #line 12731 "configure"
12732 #include "confdefs.h"
12733 #include <X11/Intrinsic.h>
12735 if { (eval echo "$as_me:12735: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12736 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12738 $EGREP -v '^ *\+' conftest.er1 >conftest.err
12740 cat conftest.err >&5
12741 echo "$as_me:12741: \$? = $ac_status" >&5
12742 (exit "$ac_status"); } >/dev/null; then
12743 if test -s conftest.err; then
12744 ac_cpp_err=$ac_c_preproc_warn_flag
12751 if test -z "$ac_cpp_err"; then
12752 # We can compile using X headers with no special include directory.
12755 echo "$as_me: failed program was:" >&5
12756 cat "conftest.$ac_ext" >&5
12757 for ac_dir in $ac_x_header_dirs; do
12758 if test -r "$ac_dir/X11/Intrinsic.h"; then
12759 ac_x_includes=$ac_dir
12764 rm -f conftest.err "conftest.$ac_ext"
12765 fi # $ac_x_includes = no
12767 if test "$ac_x_libraries" = no; then
12768 # Check for the libraries.
12769 # See if we find them without any special options.
12770 # Don't add to $LIBS permanently.
12773 cat >"conftest.$ac_ext" <<_ACEOF
12774 #line 12774 "configure"
12775 #include "confdefs.h"
12776 #include <X11/Intrinsic.h>
12785 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12786 if { (eval echo "$as_me:12786: \"$ac_link\"") >&5
12787 (eval $ac_link) 2>&5
12789 echo "$as_me:12789: \$? = $ac_status" >&5
12790 (exit "$ac_status"); } &&
12791 { ac_try='test -s "conftest$ac_exeext"'
12792 { (eval echo "$as_me:12792: \"$ac_try\"") >&5
12793 (eval $ac_try) 2>&5
12795 echo "$as_me:12795: \$? = $ac_status" >&5
12796 (exit "$ac_status"); }; }; then
12798 # We can link X programs with no special library path.
12801 echo "$as_me: failed program was:" >&5
12802 cat "conftest.$ac_ext" >&5
12804 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
12806 # Don't even attempt the hair of trying to link an X program!
12807 for ac_extension in a so sl dylib dll; do
12808 if test -r "$ac_dir/libXt.$ac_extension"; then
12809 ac_x_libraries=$ac_dir
12815 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12816 fi # $ac_x_libraries = no
12818 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
12819 # Didn't find X anywhere. Cache the known absence of X.
12820 ac_cv_have_x="have_x=no"
12822 # Record where we found X for the cache.
12823 ac_cv_have_x="have_x=yes \
12824 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
12829 eval "$ac_cv_have_x"
12832 if test "$have_x" != yes; then
12833 echo "$as_me:12833: result: $have_x" >&5
12834 echo "${ECHO_T}$have_x" >&6
12837 # If each of the values was on the command line, it overrides each guess.
12838 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
12839 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
12840 # Update the cache value to reflect the command line values.
12841 ac_cv_have_x="have_x=yes \
12842 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
12843 echo "$as_me:12843: result: libraries $x_libraries, headers $x_includes" >&5
12844 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
12847 if test "$no_x" = yes; then
12848 # Not all programs may use this symbol, but it does not hurt to define it.
12850 cat >>confdefs.h <<\EOF
12851 #define X_DISPLAY_MISSING 1
12859 if test -n "$x_includes"; then
12860 X_CFLAGS="$X_CFLAGS -I$x_includes"
12863 # It would also be nice to do this for all -L options, not just this one.
12864 if test -n "$x_libraries"; then
12865 X_LIBS="$X_LIBS -L$x_libraries"
12866 # For Solaris; some versions of Sun CC require a space after -R and
12867 # others require no space. Words are not sufficient . . . .
12868 case `(uname -sr) 2>/dev/null` in
12870 echo "$as_me:12870: checking whether -R must be followed by a space" >&5
12871 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
12872 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
12873 cat >"conftest.$ac_ext" <<_ACEOF
12874 #line 12874 "configure"
12875 #include "confdefs.h"
12885 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12886 if { (eval echo "$as_me:12886: \"$ac_link\"") >&5
12887 (eval $ac_link) 2>&5
12889 echo "$as_me:12889: \$? = $ac_status" >&5
12890 (exit "$ac_status"); } &&
12891 { ac_try='test -s "conftest$ac_exeext"'
12892 { (eval echo "$as_me:12892: \"$ac_try\"") >&5
12893 (eval $ac_try) 2>&5
12895 echo "$as_me:12895: \$? = $ac_status" >&5
12896 (exit "$ac_status"); }; }; then
12899 echo "$as_me: failed program was:" >&5
12900 cat "conftest.$ac_ext" >&5
12903 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12904 if test $ac_R_nospace = yes; then
12905 echo "$as_me:12905: result: no" >&5
12906 echo "${ECHO_T}no" >&6
12907 X_LIBS="$X_LIBS -R$x_libraries"
12909 LIBS="$ac_xsave_LIBS -R $x_libraries"
12910 cat >"conftest.$ac_ext" <<_ACEOF
12911 #line 12911 "configure"
12912 #include "confdefs.h"
12922 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12923 if { (eval echo "$as_me:12923: \"$ac_link\"") >&5
12924 (eval $ac_link) 2>&5
12926 echo "$as_me:12926: \$? = $ac_status" >&5
12927 (exit "$ac_status"); } &&
12928 { ac_try='test -s "conftest$ac_exeext"'
12929 { (eval echo "$as_me:12929: \"$ac_try\"") >&5
12930 (eval $ac_try) 2>&5
12932 echo "$as_me:12932: \$? = $ac_status" >&5
12933 (exit "$ac_status"); }; }; then
12936 echo "$as_me: failed program was:" >&5
12937 cat "conftest.$ac_ext" >&5
12940 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12941 if test $ac_R_space = yes; then
12942 echo "$as_me:12942: result: yes" >&5
12943 echo "${ECHO_T}yes" >&6
12944 X_LIBS="$X_LIBS -R $x_libraries"
12946 echo "$as_me:12946: result: neither works" >&5
12947 echo "${ECHO_T}neither works" >&6
12950 LIBS=$ac_xsave_LIBS
12954 # Check for system-dependent libraries X programs must link with.
12955 # Do this before checking for the system-independent R6 libraries
12956 # (-lICE), since we may need -lsocket or whatever for X linking.
12958 if test "$ISC" = yes; then
12959 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
12961 # Martyn Johnson says this is needed for Ultrix, if the X
12962 # libraries were built with DECnet support. And Karl Berry says
12963 # the Alpha needs dnet_stub (dnet does not exist).
12964 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
12965 cat >"conftest.$ac_ext" <<_ACEOF
12966 #line 12966 "configure"
12967 #include "confdefs.h"
12969 /* Override any gcc2 internal prototype to avoid an error. */
12973 /* We use char because int might match the return type of a gcc2
12974 builtin and then its argument prototype would still apply. */
12975 char XOpenDisplay ();
12984 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12985 if { (eval echo "$as_me:12985: \"$ac_link\"") >&5
12986 (eval $ac_link) 2>&5
12988 echo "$as_me:12988: \$? = $ac_status" >&5
12989 (exit "$ac_status"); } &&
12990 { ac_try='test -s "conftest$ac_exeext"'
12991 { (eval echo "$as_me:12991: \"$ac_try\"") >&5
12992 (eval $ac_try) 2>&5
12994 echo "$as_me:12994: \$? = $ac_status" >&5
12995 (exit "$ac_status"); }; }; then
12998 echo "$as_me: failed program was:" >&5
12999 cat "conftest.$ac_ext" >&5
13000 echo "$as_me:13000: checking for dnet_ntoa in -ldnet" >&5
13001 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
13002 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
13003 echo $ECHO_N "(cached) $ECHO_C" >&6
13005 ac_check_lib_save_LIBS=$LIBS
13006 LIBS="-ldnet $LIBS"
13007 cat >"conftest.$ac_ext" <<_ACEOF
13008 #line 13008 "configure"
13009 #include "confdefs.h"
13011 /* Override any gcc2 internal prototype to avoid an error. */
13015 /* We use char because int might match the return type of a gcc2
13016 builtin and then its argument prototype would still apply. */
13026 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13027 if { (eval echo "$as_me:13027: \"$ac_link\"") >&5
13028 (eval $ac_link) 2>&5
13030 echo "$as_me:13030: \$? = $ac_status" >&5
13031 (exit "$ac_status"); } &&
13032 { ac_try='test -s "conftest$ac_exeext"'
13033 { (eval echo "$as_me:13033: \"$ac_try\"") >&5
13034 (eval $ac_try) 2>&5
13036 echo "$as_me:13036: \$? = $ac_status" >&5
13037 (exit "$ac_status"); }; }; then
13038 ac_cv_lib_dnet_dnet_ntoa=yes
13040 echo "$as_me: failed program was:" >&5
13041 cat "conftest.$ac_ext" >&5
13042 ac_cv_lib_dnet_dnet_ntoa=no
13044 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13045 LIBS=$ac_check_lib_save_LIBS
13047 echo "$as_me:13047: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
13048 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
13049 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
13050 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
13053 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
13054 echo "$as_me:13054: checking for dnet_ntoa in -ldnet_stub" >&5
13055 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
13056 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
13057 echo $ECHO_N "(cached) $ECHO_C" >&6
13059 ac_check_lib_save_LIBS=$LIBS
13060 LIBS="-ldnet_stub $LIBS"
13061 cat >"conftest.$ac_ext" <<_ACEOF
13062 #line 13062 "configure"
13063 #include "confdefs.h"
13065 /* Override any gcc2 internal prototype to avoid an error. */
13069 /* We use char because int might match the return type of a gcc2
13070 builtin and then its argument prototype would still apply. */
13080 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13081 if { (eval echo "$as_me:13081: \"$ac_link\"") >&5
13082 (eval $ac_link) 2>&5
13084 echo "$as_me:13084: \$? = $ac_status" >&5
13085 (exit "$ac_status"); } &&
13086 { ac_try='test -s "conftest$ac_exeext"'
13087 { (eval echo "$as_me:13087: \"$ac_try\"") >&5
13088 (eval $ac_try) 2>&5
13090 echo "$as_me:13090: \$? = $ac_status" >&5
13091 (exit "$ac_status"); }; }; then
13092 ac_cv_lib_dnet_stub_dnet_ntoa=yes
13094 echo "$as_me: failed program was:" >&5
13095 cat "conftest.$ac_ext" >&5
13096 ac_cv_lib_dnet_stub_dnet_ntoa=no
13098 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13099 LIBS=$ac_check_lib_save_LIBS
13101 echo "$as_me:13101: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
13102 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
13103 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
13104 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
13109 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13110 LIBS="$ac_xsave_LIBS"
13112 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
13113 # to get the SysV transport functions.
13114 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
13116 # The nsl library prevents programs from opening the X display
13117 # on Irix 5.2, according to T.E. Dickey.
13118 # The functions gethostbyname, getservbyname, and inet_addr are
13119 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
13120 echo "$as_me:13120: checking for gethostbyname" >&5
13121 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
13122 if test "${ac_cv_func_gethostbyname+set}" = set; then
13123 echo $ECHO_N "(cached) $ECHO_C" >&6
13125 cat >"conftest.$ac_ext" <<_ACEOF
13126 #line 13126 "configure"
13127 #include "confdefs.h"
13128 #define gethostbyname autoconf_temporary
13129 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
13130 #undef gethostbyname
13136 /* We use char because int might match the return type of a gcc2
13137 builtin and then its argument prototype would still apply. */
13138 char gethostbyname (void);
13144 /* The GNU C library defines stubs for functions which it implements
13145 to always fail with ENOSYS. Some functions are actually named
13146 something starting with __ and the normal name is an alias. */
13147 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
13148 #error found stub for gethostbyname
13151 return gethostbyname ();
13156 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13157 if { (eval echo "$as_me:13157: \"$ac_link\"") >&5
13158 (eval $ac_link) 2>&5
13160 echo "$as_me:13160: \$? = $ac_status" >&5
13161 (exit "$ac_status"); } &&
13162 { ac_try='test -s "conftest$ac_exeext"'
13163 { (eval echo "$as_me:13163: \"$ac_try\"") >&5
13164 (eval $ac_try) 2>&5
13166 echo "$as_me:13166: \$? = $ac_status" >&5
13167 (exit "$ac_status"); }; }; then
13168 ac_cv_func_gethostbyname=yes
13170 echo "$as_me: failed program was:" >&5
13171 cat "conftest.$ac_ext" >&5
13172 ac_cv_func_gethostbyname=no
13174 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13176 echo "$as_me:13176: result: $ac_cv_func_gethostbyname" >&5
13177 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
13179 if test $ac_cv_func_gethostbyname = no; then
13180 echo "$as_me:13180: checking for gethostbyname in -lnsl" >&5
13181 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
13182 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
13183 echo $ECHO_N "(cached) $ECHO_C" >&6
13185 ac_check_lib_save_LIBS=$LIBS
13187 cat >"conftest.$ac_ext" <<_ACEOF
13188 #line 13188 "configure"
13189 #include "confdefs.h"
13191 /* Override any gcc2 internal prototype to avoid an error. */
13195 /* We use char because int might match the return type of a gcc2
13196 builtin and then its argument prototype would still apply. */
13197 char gethostbyname ();
13206 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13207 if { (eval echo "$as_me:13207: \"$ac_link\"") >&5
13208 (eval $ac_link) 2>&5
13210 echo "$as_me:13210: \$? = $ac_status" >&5
13211 (exit "$ac_status"); } &&
13212 { ac_try='test -s "conftest$ac_exeext"'
13213 { (eval echo "$as_me:13213: \"$ac_try\"") >&5
13214 (eval $ac_try) 2>&5
13216 echo "$as_me:13216: \$? = $ac_status" >&5
13217 (exit "$ac_status"); }; }; then
13218 ac_cv_lib_nsl_gethostbyname=yes
13220 echo "$as_me: failed program was:" >&5
13221 cat "conftest.$ac_ext" >&5
13222 ac_cv_lib_nsl_gethostbyname=no
13224 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13225 LIBS=$ac_check_lib_save_LIBS
13227 echo "$as_me:13227: result: $ac_cv_lib_nsl_gethostbyname" >&5
13228 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
13229 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
13230 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
13233 if test $ac_cv_lib_nsl_gethostbyname = no; then
13234 echo "$as_me:13234: checking for gethostbyname in -lbsd" >&5
13235 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
13236 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
13237 echo $ECHO_N "(cached) $ECHO_C" >&6
13239 ac_check_lib_save_LIBS=$LIBS
13241 cat >"conftest.$ac_ext" <<_ACEOF
13242 #line 13242 "configure"
13243 #include "confdefs.h"
13245 /* Override any gcc2 internal prototype to avoid an error. */
13249 /* We use char because int might match the return type of a gcc2
13250 builtin and then its argument prototype would still apply. */
13251 char gethostbyname ();
13260 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13261 if { (eval echo "$as_me:13261: \"$ac_link\"") >&5
13262 (eval $ac_link) 2>&5
13264 echo "$as_me:13264: \$? = $ac_status" >&5
13265 (exit "$ac_status"); } &&
13266 { ac_try='test -s "conftest$ac_exeext"'
13267 { (eval echo "$as_me:13267: \"$ac_try\"") >&5
13268 (eval $ac_try) 2>&5
13270 echo "$as_me:13270: \$? = $ac_status" >&5
13271 (exit "$ac_status"); }; }; then
13272 ac_cv_lib_bsd_gethostbyname=yes
13274 echo "$as_me: failed program was:" >&5
13275 cat "conftest.$ac_ext" >&5
13276 ac_cv_lib_bsd_gethostbyname=no
13278 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13279 LIBS=$ac_check_lib_save_LIBS
13281 echo "$as_me:13281: result: $ac_cv_lib_bsd_gethostbyname" >&5
13282 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
13283 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
13284 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
13290 # lieder@skyler.mavd.honeywell.com says without -lsocket,
13291 # socket/setsockopt and other routines are undefined under SCO ODT
13292 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
13293 # on later versions), says Simon Leinen: it contains gethostby*
13294 # variants that don't use the nameserver (or something). -lsocket
13295 # must be given before -lnsl if both are needed. We assume that
13296 # if connect needs -lnsl, so does gethostbyname.
13297 echo "$as_me:13297: checking for connect" >&5
13298 echo $ECHO_N "checking for connect... $ECHO_C" >&6
13299 if test "${ac_cv_func_connect+set}" = set; then
13300 echo $ECHO_N "(cached) $ECHO_C" >&6
13302 cat >"conftest.$ac_ext" <<_ACEOF
13303 #line 13303 "configure"
13304 #include "confdefs.h"
13305 #define connect autoconf_temporary
13306 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
13313 /* We use char because int might match the return type of a gcc2
13314 builtin and then its argument prototype would still apply. */
13315 char connect (void);
13321 /* The GNU C library defines stubs for functions which it implements
13322 to always fail with ENOSYS. Some functions are actually named
13323 something starting with __ and the normal name is an alias. */
13324 #if defined (__stub_connect) || defined (__stub___connect)
13325 #error found stub for connect
13333 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13334 if { (eval echo "$as_me:13334: \"$ac_link\"") >&5
13335 (eval $ac_link) 2>&5
13337 echo "$as_me:13337: \$? = $ac_status" >&5
13338 (exit "$ac_status"); } &&
13339 { ac_try='test -s "conftest$ac_exeext"'
13340 { (eval echo "$as_me:13340: \"$ac_try\"") >&5
13341 (eval $ac_try) 2>&5
13343 echo "$as_me:13343: \$? = $ac_status" >&5
13344 (exit "$ac_status"); }; }; then
13345 ac_cv_func_connect=yes
13347 echo "$as_me: failed program was:" >&5
13348 cat "conftest.$ac_ext" >&5
13349 ac_cv_func_connect=no
13351 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13353 echo "$as_me:13353: result: $ac_cv_func_connect" >&5
13354 echo "${ECHO_T}$ac_cv_func_connect" >&6
13356 if test $ac_cv_func_connect = no; then
13357 echo "$as_me:13357: checking for connect in -lsocket" >&5
13358 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
13359 if test "${ac_cv_lib_socket_connect+set}" = set; then
13360 echo $ECHO_N "(cached) $ECHO_C" >&6
13362 ac_check_lib_save_LIBS=$LIBS
13363 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
13364 cat >"conftest.$ac_ext" <<_ACEOF
13365 #line 13365 "configure"
13366 #include "confdefs.h"
13368 /* Override any gcc2 internal prototype to avoid an error. */
13372 /* We use char because int might match the return type of a gcc2
13373 builtin and then its argument prototype would still apply. */
13383 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13384 if { (eval echo "$as_me:13384: \"$ac_link\"") >&5
13385 (eval $ac_link) 2>&5
13387 echo "$as_me:13387: \$? = $ac_status" >&5
13388 (exit "$ac_status"); } &&
13389 { ac_try='test -s "conftest$ac_exeext"'
13390 { (eval echo "$as_me:13390: \"$ac_try\"") >&5
13391 (eval $ac_try) 2>&5
13393 echo "$as_me:13393: \$? = $ac_status" >&5
13394 (exit "$ac_status"); }; }; then
13395 ac_cv_lib_socket_connect=yes
13397 echo "$as_me: failed program was:" >&5
13398 cat "conftest.$ac_ext" >&5
13399 ac_cv_lib_socket_connect=no
13401 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13402 LIBS=$ac_check_lib_save_LIBS
13404 echo "$as_me:13404: result: $ac_cv_lib_socket_connect" >&5
13405 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
13406 if test "$ac_cv_lib_socket_connect" = yes; then
13407 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
13412 # Guillermo Gomez says -lposix is necessary on A/UX.
13413 echo "$as_me:13413: checking for remove" >&5
13414 echo $ECHO_N "checking for remove... $ECHO_C" >&6
13415 if test "${ac_cv_func_remove+set}" = set; then
13416 echo $ECHO_N "(cached) $ECHO_C" >&6
13418 cat >"conftest.$ac_ext" <<_ACEOF
13419 #line 13419 "configure"
13420 #include "confdefs.h"
13421 #define remove autoconf_temporary
13422 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
13429 /* We use char because int might match the return type of a gcc2
13430 builtin and then its argument prototype would still apply. */
13431 char remove (void);
13437 /* The GNU C library defines stubs for functions which it implements
13438 to always fail with ENOSYS. Some functions are actually named
13439 something starting with __ and the normal name is an alias. */
13440 #if defined (__stub_remove) || defined (__stub___remove)
13441 #error found stub for remove
13449 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13450 if { (eval echo "$as_me:13450: \"$ac_link\"") >&5
13451 (eval $ac_link) 2>&5
13453 echo "$as_me:13453: \$? = $ac_status" >&5
13454 (exit "$ac_status"); } &&
13455 { ac_try='test -s "conftest$ac_exeext"'
13456 { (eval echo "$as_me:13456: \"$ac_try\"") >&5
13457 (eval $ac_try) 2>&5
13459 echo "$as_me:13459: \$? = $ac_status" >&5
13460 (exit "$ac_status"); }; }; then
13461 ac_cv_func_remove=yes
13463 echo "$as_me: failed program was:" >&5
13464 cat "conftest.$ac_ext" >&5
13465 ac_cv_func_remove=no
13467 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13469 echo "$as_me:13469: result: $ac_cv_func_remove" >&5
13470 echo "${ECHO_T}$ac_cv_func_remove" >&6
13472 if test $ac_cv_func_remove = no; then
13473 echo "$as_me:13473: checking for remove in -lposix" >&5
13474 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
13475 if test "${ac_cv_lib_posix_remove+set}" = set; then
13476 echo $ECHO_N "(cached) $ECHO_C" >&6
13478 ac_check_lib_save_LIBS=$LIBS
13479 LIBS="-lposix $LIBS"
13480 cat >"conftest.$ac_ext" <<_ACEOF
13481 #line 13481 "configure"
13482 #include "confdefs.h"
13484 /* Override any gcc2 internal prototype to avoid an error. */
13488 /* We use char because int might match the return type of a gcc2
13489 builtin and then its argument prototype would still apply. */
13499 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13500 if { (eval echo "$as_me:13500: \"$ac_link\"") >&5
13501 (eval $ac_link) 2>&5
13503 echo "$as_me:13503: \$? = $ac_status" >&5
13504 (exit "$ac_status"); } &&
13505 { ac_try='test -s "conftest$ac_exeext"'
13506 { (eval echo "$as_me:13506: \"$ac_try\"") >&5
13507 (eval $ac_try) 2>&5
13509 echo "$as_me:13509: \$? = $ac_status" >&5
13510 (exit "$ac_status"); }; }; then
13511 ac_cv_lib_posix_remove=yes
13513 echo "$as_me: failed program was:" >&5
13514 cat "conftest.$ac_ext" >&5
13515 ac_cv_lib_posix_remove=no
13517 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13518 LIBS=$ac_check_lib_save_LIBS
13520 echo "$as_me:13520: result: $ac_cv_lib_posix_remove" >&5
13521 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
13522 if test "$ac_cv_lib_posix_remove" = yes; then
13523 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
13528 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
13529 echo "$as_me:13529: checking for shmat" >&5
13530 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
13531 if test "${ac_cv_func_shmat+set}" = set; then
13532 echo $ECHO_N "(cached) $ECHO_C" >&6
13534 cat >"conftest.$ac_ext" <<_ACEOF
13535 #line 13535 "configure"
13536 #include "confdefs.h"
13537 #define shmat autoconf_temporary
13538 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
13545 /* We use char because int might match the return type of a gcc2
13546 builtin and then its argument prototype would still apply. */
13553 /* The GNU C library defines stubs for functions which it implements
13554 to always fail with ENOSYS. Some functions are actually named
13555 something starting with __ and the normal name is an alias. */
13556 #if defined (__stub_shmat) || defined (__stub___shmat)
13557 #error found stub for shmat
13565 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13566 if { (eval echo "$as_me:13566: \"$ac_link\"") >&5
13567 (eval $ac_link) 2>&5
13569 echo "$as_me:13569: \$? = $ac_status" >&5
13570 (exit "$ac_status"); } &&
13571 { ac_try='test -s "conftest$ac_exeext"'
13572 { (eval echo "$as_me:13572: \"$ac_try\"") >&5
13573 (eval $ac_try) 2>&5
13575 echo "$as_me:13575: \$? = $ac_status" >&5
13576 (exit "$ac_status"); }; }; then
13577 ac_cv_func_shmat=yes
13579 echo "$as_me: failed program was:" >&5
13580 cat "conftest.$ac_ext" >&5
13581 ac_cv_func_shmat=no
13583 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13585 echo "$as_me:13585: result: $ac_cv_func_shmat" >&5
13586 echo "${ECHO_T}$ac_cv_func_shmat" >&6
13588 if test $ac_cv_func_shmat = no; then
13589 echo "$as_me:13589: checking for shmat in -lipc" >&5
13590 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
13591 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
13592 echo $ECHO_N "(cached) $ECHO_C" >&6
13594 ac_check_lib_save_LIBS=$LIBS
13596 cat >"conftest.$ac_ext" <<_ACEOF
13597 #line 13597 "configure"
13598 #include "confdefs.h"
13600 /* Override any gcc2 internal prototype to avoid an error. */
13604 /* We use char because int might match the return type of a gcc2
13605 builtin and then its argument prototype would still apply. */
13615 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13616 if { (eval echo "$as_me:13616: \"$ac_link\"") >&5
13617 (eval $ac_link) 2>&5
13619 echo "$as_me:13619: \$? = $ac_status" >&5
13620 (exit "$ac_status"); } &&
13621 { ac_try='test -s "conftest$ac_exeext"'
13622 { (eval echo "$as_me:13622: \"$ac_try\"") >&5
13623 (eval $ac_try) 2>&5
13625 echo "$as_me:13625: \$? = $ac_status" >&5
13626 (exit "$ac_status"); }; }; then
13627 ac_cv_lib_ipc_shmat=yes
13629 echo "$as_me: failed program was:" >&5
13630 cat "conftest.$ac_ext" >&5
13631 ac_cv_lib_ipc_shmat=no
13633 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13634 LIBS=$ac_check_lib_save_LIBS
13636 echo "$as_me:13636: result: $ac_cv_lib_ipc_shmat" >&5
13637 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
13638 if test "$ac_cv_lib_ipc_shmat" = yes; then
13639 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
13645 # Check for libraries that X11R6 Xt/Xaw programs need.
13646 ac_save_LDFLAGS=$LDFLAGS
13647 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
13648 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
13649 # check for ICE first), but we must link in the order -lSM -lICE or
13650 # we get undefined symbols. So assume we have SM if we have ICE.
13651 # These have to be linked with before -lX11, unlike the other
13652 # libraries we check for below, so use a different variable.
13653 # John Interrante, Karl Berry
13654 echo "$as_me:13654: checking for IceConnectionNumber in -lICE" >&5
13655 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
13656 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
13657 echo $ECHO_N "(cached) $ECHO_C" >&6
13659 ac_check_lib_save_LIBS=$LIBS
13660 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
13661 cat >"conftest.$ac_ext" <<_ACEOF
13662 #line 13662 "configure"
13663 #include "confdefs.h"
13665 /* Override any gcc2 internal prototype to avoid an error. */
13669 /* We use char because int might match the return type of a gcc2
13670 builtin and then its argument prototype would still apply. */
13671 char IceConnectionNumber ();
13675 IceConnectionNumber ();
13680 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13681 if { (eval echo "$as_me:13681: \"$ac_link\"") >&5
13682 (eval $ac_link) 2>&5
13684 echo "$as_me:13684: \$? = $ac_status" >&5
13685 (exit "$ac_status"); } &&
13686 { ac_try='test -s "conftest$ac_exeext"'
13687 { (eval echo "$as_me:13687: \"$ac_try\"") >&5
13688 (eval $ac_try) 2>&5
13690 echo "$as_me:13690: \$? = $ac_status" >&5
13691 (exit "$ac_status"); }; }; then
13692 ac_cv_lib_ICE_IceConnectionNumber=yes
13694 echo "$as_me: failed program was:" >&5
13695 cat "conftest.$ac_ext" >&5
13696 ac_cv_lib_ICE_IceConnectionNumber=no
13698 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13699 LIBS=$ac_check_lib_save_LIBS
13701 echo "$as_me:13701: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
13702 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
13703 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
13704 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
13707 LDFLAGS=$ac_save_LDFLAGS
13711 cf_x_athena=${cf_x_athena:-Xaw}
13713 echo "$as_me:13713: checking if you want to link with Xaw 3d library" >&5
13714 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
13717 # Check whether --with-Xaw3d or --without-Xaw3d was given.
13718 if test "${with_Xaw3d+set}" = set; then
13719 withval="$with_Xaw3d"
13722 if test "$withval" = yes ; then
13724 echo "$as_me:13724: result: yes" >&5
13725 echo "${ECHO_T}yes" >&6
13727 echo "$as_me:13727: result: no" >&5
13728 echo "${ECHO_T}no" >&6
13731 echo "$as_me:13731: checking if you want to link with Xaw 3d xft library" >&5
13732 echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
13735 # Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
13736 if test "${with_Xaw3dxft+set}" = set; then
13737 withval="$with_Xaw3dxft"
13740 if test "$withval" = yes ; then
13741 cf_x_athena=Xaw3dxft
13742 echo "$as_me:13742: result: yes" >&5
13743 echo "${ECHO_T}yes" >&6
13745 echo "$as_me:13745: result: no" >&5
13746 echo "${ECHO_T}no" >&6
13749 echo "$as_me:13749: checking if you want to link with neXT Athena library" >&5
13750 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
13753 # Check whether --with-neXtaw or --without-neXtaw was given.
13754 if test "${with_neXtaw+set}" = set; then
13755 withval="$with_neXtaw"
13758 if test "$withval" = yes ; then
13760 echo "$as_me:13760: result: yes" >&5
13761 echo "${ECHO_T}yes" >&6
13763 echo "$as_me:13763: result: no" >&5
13764 echo "${ECHO_T}no" >&6
13767 echo "$as_me:13767: checking if you want to link with Athena-Plus library" >&5
13768 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
13771 # Check whether --with-XawPlus or --without-XawPlus was given.
13772 if test "${with_XawPlus+set}" = set; then
13773 withval="$with_XawPlus"
13776 if test "$withval" = yes ; then
13777 cf_x_athena=XawPlus
13778 echo "$as_me:13778: result: yes" >&5
13779 echo "${ECHO_T}yes" >&6
13781 echo "$as_me:13781: result: no" >&5
13782 echo "${ECHO_T}no" >&6
13787 if test "$PKG_CONFIG" != none ; then
13789 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
13790 for cf_athena_pkg in \
13793 ${cf_x_athena}-devel \
13794 lib${cf_x_athena} \
13795 lib${cf_x_athena}-devel
13798 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then
13799 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
13801 echo "${as_me:-configure}:13801: testing found package $cf_athena_pkg ..." 1>&5
13803 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`"
13804 cf_pkgconfig_libs="`$PKG_CONFIG --libs "$cf_athena_pkg" 2>/dev/null`"
13805 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
13807 echo "${as_me:-configure}:13807: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13809 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
13811 echo "${as_me:-configure}:13811: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
13816 cf_new_extra_cppflags=
13818 for cf_add_cflags in $cf_pkgconfig_incs
13820 case "$cf_fix_cppflags" in
13822 case "$cf_add_cflags" in
13823 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13824 case "$cf_add_cflags" in
13826 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13828 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13829 && test -z "${cf_tst_cflags}" \
13830 && cf_fix_cppflags=yes
13832 if test "$cf_fix_cppflags" = yes ; then
13834 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13835 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13838 elif test "${cf_tst_cflags}" = "\"'" ; then
13840 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13841 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13847 case "$CPPFLAGS" in
13851 case "$cf_add_cflags" in
13853 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13855 CPPFLAGS=`echo "$CPPFLAGS" | \
13856 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
13857 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
13862 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13863 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13870 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13871 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13878 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13879 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13881 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13883 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13884 && test -z "${cf_tst_cflags}" \
13885 && cf_fix_cppflags=no
13890 if test -n "$cf_new_cflags" ; then
13892 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13893 CFLAGS="${CFLAGS}$cf_new_cflags"
13897 if test -n "$cf_new_cppflags" ; then
13899 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13900 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13904 if test -n "$cf_new_extra_cppflags" ; then
13906 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13907 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13911 cf_add_libs="$LIBS"
13914 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13915 # filter duplicates
13916 for cf_add_1lib in $cf_add_0lib; do
13917 for cf_add_2lib in $cf_add_libs; do
13918 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13923 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13925 LIBS="$cf_add_libs"
13927 cf_x_athena_lib="$cf_pkgconfig_libs"
13929 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13931 cat >>confdefs.h <<EOF
13932 #define $cf_x_athena_LIBS 1
13935 for cf_trim_lib in Xmu Xt X11
13938 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
13939 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
13940 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
13942 echo "${as_me:-configure}:13942: testing ..trimmed $LIBS ..." 1>&5
13948 echo "$as_me:13948: checking for usable $cf_x_athena/Xmu package" >&5
13949 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
13950 if test "${cf_cv_xaw_compat+set}" = set; then
13951 echo $ECHO_N "(cached) $ECHO_C" >&6
13954 cat >"conftest.$ac_ext" <<_ACEOF
13955 #line 13955 "configure"
13956 #include "confdefs.h"
13958 $ac_includes_default
13959 #include <X11/Xmu/CharSet.h>
13965 int check = XmuCompareISOLatin1("big", "small");
13972 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13973 if { (eval echo "$as_me:13973: \"$ac_link\"") >&5
13974 (eval $ac_link) 2>&5
13976 echo "$as_me:13976: \$? = $ac_status" >&5
13977 (exit "$ac_status"); } &&
13978 { ac_try='test -s "conftest$ac_exeext"'
13979 { (eval echo "$as_me:13979: \"$ac_try\"") >&5
13980 (eval $ac_try) 2>&5
13982 echo "$as_me:13982: \$? = $ac_status" >&5
13983 (exit "$ac_status"); }; }; then
13984 cf_cv_xaw_compat=yes
13986 echo "$as_me: failed program was:" >&5
13987 cat "conftest.$ac_ext" >&5
13988 cf_cv_xaw_compat=no
13990 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13992 echo "$as_me:13992: result: $cf_cv_xaw_compat" >&5
13993 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
13995 if test "$cf_cv_xaw_compat" = no
13997 # workaround for broken ".pc" files...
13998 case "$cf_x_athena_lib" in
14002 test -n "$verbose" && echo " work around broken package" 1>&6
14004 echo "${as_me:-configure}:14004: testing work around broken package ..." 1>&5
14006 cf_save_xmu="$LIBS"
14007 cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^ *//' -e 's/ .*//'`
14009 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then
14010 test -n "$verbose" && echo " found package xmu" 1>&6
14012 echo "${as_me:-configure}:14012: testing found package xmu ..." 1>&5
14014 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`"
14015 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xmu" 2>/dev/null`"
14016 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
14018 echo "${as_me:-configure}:14018: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14020 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
14022 echo "${as_me:-configure}:14022: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
14027 cf_new_extra_cppflags=
14029 for cf_add_cflags in $cf_pkgconfig_incs
14031 case "$cf_fix_cppflags" in
14033 case "$cf_add_cflags" in
14034 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14035 case "$cf_add_cflags" in
14037 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14039 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14040 && test -z "${cf_tst_cflags}" \
14041 && cf_fix_cppflags=yes
14043 if test "$cf_fix_cppflags" = yes ; then
14045 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14046 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14049 elif test "${cf_tst_cflags}" = "\"'" ; then
14051 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14052 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14058 case "$CPPFLAGS" in
14062 case "$cf_add_cflags" in
14064 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14066 CPPFLAGS=`echo "$CPPFLAGS" | \
14067 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14068 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14073 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14074 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14081 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14082 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14089 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14090 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14092 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14094 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14095 && test -z "${cf_tst_cflags}" \
14096 && cf_fix_cppflags=no
14101 if test -n "$cf_new_cflags" ; then
14103 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14104 CFLAGS="${CFLAGS}$cf_new_cflags"
14108 if test -n "$cf_new_cppflags" ; then
14110 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14111 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14115 if test -n "$cf_new_extra_cppflags" ; then
14117 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14118 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14122 cf_add_libs="$LIBS"
14125 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14126 # filter duplicates
14127 for cf_add_1lib in $cf_add_0lib; do
14128 for cf_add_2lib in $cf_add_libs; do
14129 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14134 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14136 LIBS="$cf_add_libs"
14138 LIBS="$cf_save_xmu"
14140 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14142 echo "${as_me:-configure}:14142: testing ...before $LIBS ..." 1>&5
14144 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's% % %g'`
14145 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14147 echo "${as_me:-configure}:14147: testing ...after $LIBS ..." 1>&5
14153 test -n "$verbose" && echo " ...before $LIBS" 1>&6
14155 echo "${as_me:-configure}:14155: testing ...before $LIBS ..." 1>&5
14157 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's% % %g'`
14158 test -n "$verbose" && echo " ...after $LIBS" 1>&6
14160 echo "${as_me:-configure}:14160: testing ...after $LIBS ..." 1>&5
14164 for cf_trim_lib in Xmu Xt X11
14167 (*-l$cf_trim_lib\ *-l$cf_trim_lib*)
14168 LIBS=`echo "$LIBS " | sed -e 's/ / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
14169 test -n "$verbose" && echo " ..trimmed $LIBS" 1>&6
14171 echo "${as_me:-configure}:14171: testing ..trimmed $LIBS ..." 1>&5
14191 if test -z "$cf_x_athena_lib" ; then
14193 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
14194 test -n "$verbose" && echo " found package Xext" 1>&6
14196 echo "${as_me:-configure}:14196: testing found package Xext ..." 1>&5
14198 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
14199 cf_pkgconfig_libs="`$PKG_CONFIG --libs "Xext" 2>/dev/null`"
14200 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
14202 echo "${as_me:-configure}:14202: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14204 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
14206 echo "${as_me:-configure}:14206: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
14211 cf_new_extra_cppflags=
14213 for cf_add_cflags in $cf_pkgconfig_incs
14215 case "$cf_fix_cppflags" in
14217 case "$cf_add_cflags" in
14218 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14219 case "$cf_add_cflags" in
14221 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14223 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14224 && test -z "${cf_tst_cflags}" \
14225 && cf_fix_cppflags=yes
14227 if test "$cf_fix_cppflags" = yes ; then
14229 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14230 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14233 elif test "${cf_tst_cflags}" = "\"'" ; then
14235 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14236 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14242 case "$CPPFLAGS" in
14246 case "$cf_add_cflags" in
14248 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14250 CPPFLAGS=`echo "$CPPFLAGS" | \
14251 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14252 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14257 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14258 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14265 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14266 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14273 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14274 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14276 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14278 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14279 && test -z "${cf_tst_cflags}" \
14280 && cf_fix_cppflags=no
14285 if test -n "$cf_new_cflags" ; then
14287 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14288 CFLAGS="${CFLAGS}$cf_new_cflags"
14292 if test -n "$cf_new_cppflags" ; then
14294 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14295 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14299 if test -n "$cf_new_extra_cppflags" ; then
14301 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14302 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14306 cf_add_libs="$LIBS"
14309 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14310 # filter duplicates
14311 for cf_add_1lib in $cf_add_0lib; do
14312 for cf_add_2lib in $cf_add_libs; do
14313 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14318 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14320 LIBS="$cf_add_libs"
14327 echo "$as_me:14327: checking for XextCreateExtension in -lXext" >&5
14328 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
14329 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
14330 echo $ECHO_N "(cached) $ECHO_C" >&6
14332 ac_check_lib_save_LIBS=$LIBS
14333 LIBS="-lXext $LIBS"
14334 cat >"conftest.$ac_ext" <<_ACEOF
14335 #line 14335 "configure"
14336 #include "confdefs.h"
14338 /* Override any gcc2 internal prototype to avoid an error. */
14342 /* We use char because int might match the return type of a gcc2
14343 builtin and then its argument prototype would still apply. */
14344 char XextCreateExtension ();
14348 XextCreateExtension ();
14353 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14354 if { (eval echo "$as_me:14354: \"$ac_link\"") >&5
14355 (eval $ac_link) 2>&5
14357 echo "$as_me:14357: \$? = $ac_status" >&5
14358 (exit "$ac_status"); } &&
14359 { ac_try='test -s "conftest$ac_exeext"'
14360 { (eval echo "$as_me:14360: \"$ac_try\"") >&5
14361 (eval $ac_try) 2>&5
14363 echo "$as_me:14363: \$? = $ac_status" >&5
14364 (exit "$ac_status"); }; }; then
14365 ac_cv_lib_Xext_XextCreateExtension=yes
14367 echo "$as_me: failed program was:" >&5
14368 cat "conftest.$ac_ext" >&5
14369 ac_cv_lib_Xext_XextCreateExtension=no
14371 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14372 LIBS=$ac_check_lib_save_LIBS
14374 echo "$as_me:14374: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
14375 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
14376 if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
14378 cf_add_libs="$LIBS"
14381 for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14382 # filter duplicates
14383 for cf_add_1lib in $cf_add_0lib; do
14384 for cf_add_2lib in $cf_add_libs; do
14385 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14390 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14392 LIBS="$cf_add_libs"
14398 # OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
14399 # in some cases has installed dummy files in the former, other cases replaced
14400 # it with a link to the new location). This complicates the configure script.
14401 # Check for that pitfall, and recover using pkg-config
14403 # If none of these are set, the configuration is almost certainly broken.
14404 if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
14407 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
14408 test -n "$verbose" && echo " found package x11" 1>&6
14410 echo "${as_me:-configure}:14410: testing found package x11 ..." 1>&5
14412 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
14413 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
14414 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
14416 echo "${as_me:-configure}:14416: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14418 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
14420 echo "${as_me:-configure}:14420: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
14425 cf_new_extra_cppflags=
14427 for cf_add_cflags in $cf_pkgconfig_incs
14429 case "$cf_fix_cppflags" in
14431 case "$cf_add_cflags" in
14432 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14433 case "$cf_add_cflags" in
14435 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14437 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14438 && test -z "${cf_tst_cflags}" \
14439 && cf_fix_cppflags=yes
14441 if test "$cf_fix_cppflags" = yes ; then
14443 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14444 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14447 elif test "${cf_tst_cflags}" = "\"'" ; then
14449 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14450 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14456 case "$CPPFLAGS" in
14460 case "$cf_add_cflags" in
14462 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14464 CPPFLAGS=`echo "$CPPFLAGS" | \
14465 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14466 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14471 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14472 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14479 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14480 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14487 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14488 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14490 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14492 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14493 && test -z "${cf_tst_cflags}" \
14494 && cf_fix_cppflags=no
14499 if test -n "$cf_new_cflags" ; then
14501 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14502 CFLAGS="${CFLAGS}$cf_new_cflags"
14506 if test -n "$cf_new_cppflags" ; then
14508 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14509 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14513 if test -n "$cf_new_extra_cppflags" ; then
14515 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14516 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14520 cf_add_libs="$LIBS"
14523 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14524 # filter duplicates
14525 for cf_add_1lib in $cf_add_0lib; do
14526 for cf_add_2lib in $cf_add_libs; do
14527 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14532 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14534 LIBS="$cf_add_libs"
14540 { echo "$as_me:14540: WARNING: unable to find X11 library" >&5
14541 echo "$as_me: WARNING: unable to find X11 library" >&2;}
14544 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
14545 test -n "$verbose" && echo " found package ice" 1>&6
14547 echo "${as_me:-configure}:14547: testing found package ice ..." 1>&5
14549 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
14550 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
14551 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
14553 echo "${as_me:-configure}:14553: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14555 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
14557 echo "${as_me:-configure}:14557: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
14562 cf_new_extra_cppflags=
14564 for cf_add_cflags in $cf_pkgconfig_incs
14566 case "$cf_fix_cppflags" in
14568 case "$cf_add_cflags" in
14569 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14570 case "$cf_add_cflags" in
14572 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14574 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14575 && test -z "${cf_tst_cflags}" \
14576 && cf_fix_cppflags=yes
14578 if test "$cf_fix_cppflags" = yes ; then
14580 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14581 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14584 elif test "${cf_tst_cflags}" = "\"'" ; then
14586 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14587 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14593 case "$CPPFLAGS" in
14597 case "$cf_add_cflags" in
14599 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14601 CPPFLAGS=`echo "$CPPFLAGS" | \
14602 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14603 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14608 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14609 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14616 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14617 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14624 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14625 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14627 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14629 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14630 && test -z "${cf_tst_cflags}" \
14631 && cf_fix_cppflags=no
14636 if test -n "$cf_new_cflags" ; then
14638 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14639 CFLAGS="${CFLAGS}$cf_new_cflags"
14643 if test -n "$cf_new_cppflags" ; then
14645 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14646 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14650 if test -n "$cf_new_extra_cppflags" ; then
14652 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14653 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14657 cf_add_libs="$LIBS"
14660 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14661 # filter duplicates
14662 for cf_add_1lib in $cf_add_0lib; do
14663 for cf_add_2lib in $cf_add_libs; do
14664 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14669 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14671 LIBS="$cf_add_libs"
14677 { echo "$as_me:14677: WARNING: unable to find ICE library" >&5
14678 echo "$as_me: WARNING: unable to find ICE library" >&2;}
14681 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
14682 test -n "$verbose" && echo " found package sm" 1>&6
14684 echo "${as_me:-configure}:14684: testing found package sm ..." 1>&5
14686 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
14687 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
14688 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
14690 echo "${as_me:-configure}:14690: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14692 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
14694 echo "${as_me:-configure}:14694: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
14699 cf_new_extra_cppflags=
14701 for cf_add_cflags in $cf_pkgconfig_incs
14703 case "$cf_fix_cppflags" in
14705 case "$cf_add_cflags" in
14706 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14707 case "$cf_add_cflags" in
14709 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14711 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14712 && test -z "${cf_tst_cflags}" \
14713 && cf_fix_cppflags=yes
14715 if test "$cf_fix_cppflags" = yes ; then
14717 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14718 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14721 elif test "${cf_tst_cflags}" = "\"'" ; then
14723 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14724 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14730 case "$CPPFLAGS" in
14734 case "$cf_add_cflags" in
14736 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14738 CPPFLAGS=`echo "$CPPFLAGS" | \
14739 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14740 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14745 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14746 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14753 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14754 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14761 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14762 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14764 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14766 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14767 && test -z "${cf_tst_cflags}" \
14768 && cf_fix_cppflags=no
14773 if test -n "$cf_new_cflags" ; then
14775 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14776 CFLAGS="${CFLAGS}$cf_new_cflags"
14780 if test -n "$cf_new_cppflags" ; then
14782 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14783 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14787 if test -n "$cf_new_extra_cppflags" ; then
14789 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14790 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14794 cf_add_libs="$LIBS"
14797 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14798 # filter duplicates
14799 for cf_add_1lib in $cf_add_0lib; do
14800 for cf_add_2lib in $cf_add_libs; do
14801 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14806 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14808 LIBS="$cf_add_libs"
14814 { echo "$as_me:14814: WARNING: unable to find SM library" >&5
14815 echo "$as_me: WARNING: unable to find SM library" >&2;}
14818 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14819 test -n "$verbose" && echo " found package xt" 1>&6
14821 echo "${as_me:-configure}:14821: testing found package xt ..." 1>&5
14823 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14824 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14825 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14827 echo "${as_me:-configure}:14827: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14829 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14831 echo "${as_me:-configure}:14831: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14836 cf_new_extra_cppflags=
14838 for cf_add_cflags in $cf_pkgconfig_incs
14840 case "$cf_fix_cppflags" in
14842 case "$cf_add_cflags" in
14843 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14844 case "$cf_add_cflags" in
14846 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14848 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14849 && test -z "${cf_tst_cflags}" \
14850 && cf_fix_cppflags=yes
14852 if test "$cf_fix_cppflags" = yes ; then
14854 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14855 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14858 elif test "${cf_tst_cflags}" = "\"'" ; then
14860 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14861 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14867 case "$CPPFLAGS" in
14871 case "$cf_add_cflags" in
14873 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14875 CPPFLAGS=`echo "$CPPFLAGS" | \
14876 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
14877 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
14882 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14883 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14890 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14891 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14898 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14899 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14901 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14903 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14904 && test -z "${cf_tst_cflags}" \
14905 && cf_fix_cppflags=no
14910 if test -n "$cf_new_cflags" ; then
14912 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14913 CFLAGS="${CFLAGS}$cf_new_cflags"
14917 if test -n "$cf_new_cppflags" ; then
14919 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14920 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14924 if test -n "$cf_new_extra_cppflags" ; then
14926 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14927 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14931 cf_add_libs="$LIBS"
14934 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14935 # filter duplicates
14936 for cf_add_1lib in $cf_add_0lib; do
14937 for cf_add_2lib in $cf_add_libs; do
14938 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14943 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14945 LIBS="$cf_add_libs"
14951 { echo "$as_me:14951: WARNING: unable to find Xt library" >&5
14952 echo "$as_me: WARNING: unable to find Xt library" >&2;}
14956 LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
14961 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
14962 test -n "$verbose" && echo " found package xt" 1>&6
14964 echo "${as_me:-configure}:14964: testing found package xt ..." 1>&5
14966 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
14967 cf_pkgconfig_libs="`$PKG_CONFIG --libs "xt" 2>/dev/null`"
14968 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
14970 echo "${as_me:-configure}:14970: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14972 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
14974 echo "${as_me:-configure}:14974: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
14979 cf_new_extra_cppflags=
14981 for cf_add_cflags in $cf_pkgconfig_incs
14983 case "$cf_fix_cppflags" in
14985 case "$cf_add_cflags" in
14986 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14987 case "$cf_add_cflags" in
14989 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14991 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14992 && test -z "${cf_tst_cflags}" \
14993 && cf_fix_cppflags=yes
14995 if test "$cf_fix_cppflags" = yes ; then
14997 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14998 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15001 elif test "${cf_tst_cflags}" = "\"'" ; then
15003 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15004 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15010 case "$CPPFLAGS" in
15014 case "$cf_add_cflags" in
15016 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15018 CPPFLAGS=`echo "$CPPFLAGS" | \
15019 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15020 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15025 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15026 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15033 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15034 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15041 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15042 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15044 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15046 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15047 && test -z "${cf_tst_cflags}" \
15048 && cf_fix_cppflags=no
15053 if test -n "$cf_new_cflags" ; then
15055 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15056 CFLAGS="${CFLAGS}$cf_new_cflags"
15060 if test -n "$cf_new_cppflags" ; then
15062 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15063 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15067 if test -n "$cf_new_extra_cppflags" ; then
15069 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15070 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15074 cf_add_libs="$LIBS"
15077 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15078 # filter duplicates
15079 for cf_add_1lib in $cf_add_0lib; do
15080 for cf_add_2lib in $cf_add_libs; do
15081 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15086 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15088 LIBS="$cf_add_libs"
15094 # we have an "xt" package, but it may omit Xt's dependency on X11
15095 echo "$as_me:15095: checking for usable X dependency" >&5
15096 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
15097 if test "${cf_cv_xt_x11_compat+set}" = set; then
15098 echo $ECHO_N "(cached) $ECHO_C" >&6
15101 cat >"conftest.$ac_ext" <<_ACEOF
15102 #line 15102 "configure"
15103 #include "confdefs.h"
15105 $ac_includes_default
15106 #include <X11/Xlib.h>
15112 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
15113 int rc2 = XClearWindow((Display*) 0, (Window) 0);
15114 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
15115 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
15121 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15122 if { (eval echo "$as_me:15122: \"$ac_link\"") >&5
15123 (eval $ac_link) 2>&5
15125 echo "$as_me:15125: \$? = $ac_status" >&5
15126 (exit "$ac_status"); } &&
15127 { ac_try='test -s "conftest$ac_exeext"'
15128 { (eval echo "$as_me:15128: \"$ac_try\"") >&5
15129 (eval $ac_try) 2>&5
15131 echo "$as_me:15131: \$? = $ac_status" >&5
15132 (exit "$ac_status"); }; }; then
15133 cf_cv_xt_x11_compat=yes
15135 echo "$as_me: failed program was:" >&5
15136 cat "conftest.$ac_ext" >&5
15137 cf_cv_xt_x11_compat=no
15139 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15141 echo "$as_me:15141: result: $cf_cv_xt_x11_compat" >&5
15142 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
15143 if test "$cf_cv_xt_x11_compat" = no
15145 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
15147 echo "${as_me:-configure}:15147: testing work around broken X11 dependency ..." 1>&5
15149 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
15151 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
15152 test -n "$verbose" && echo " found package x11" 1>&6
15154 echo "${as_me:-configure}:15154: testing found package x11 ..." 1>&5
15156 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
15157 cf_pkgconfig_libs="`$PKG_CONFIG --libs "x11" 2>/dev/null`"
15158 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
15160 echo "${as_me:-configure}:15160: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
15162 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
15164 echo "${as_me:-configure}:15164: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
15169 cf_new_extra_cppflags=
15171 for cf_add_cflags in $cf_pkgconfig_incs
15173 case "$cf_fix_cppflags" in
15175 case "$cf_add_cflags" in
15176 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15177 case "$cf_add_cflags" in
15179 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15181 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15182 && test -z "${cf_tst_cflags}" \
15183 && cf_fix_cppflags=yes
15185 if test "$cf_fix_cppflags" = yes ; then
15187 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15188 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15191 elif test "${cf_tst_cflags}" = "\"'" ; then
15193 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15194 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15200 case "$CPPFLAGS" in
15204 case "$cf_add_cflags" in
15206 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15208 CPPFLAGS=`echo "$CPPFLAGS" | \
15209 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15210 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15215 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15216 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15223 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15224 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15231 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15232 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15234 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15236 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15237 && test -z "${cf_tst_cflags}" \
15238 && cf_fix_cppflags=no
15243 if test -n "$cf_new_cflags" ; then
15245 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15246 CFLAGS="${CFLAGS}$cf_new_cflags"
15250 if test -n "$cf_new_cppflags" ; then
15252 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15253 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15257 if test -n "$cf_new_extra_cppflags" ; then
15259 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15260 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15264 cf_add_libs="$LIBS"
15267 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15268 # filter duplicates
15269 for cf_add_1lib in $cf_add_0lib; do
15270 for cf_add_2lib in $cf_add_libs; do
15271 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15276 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15278 LIBS="$cf_add_libs"
15285 test -n "$verbose" && echo " ...before $LIBS" 1>&6
15287 echo "${as_me:-configure}:15287: testing ...before $LIBS ..." 1>&5
15289 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's% % %g'`
15290 test -n "$verbose" && echo " ...after $LIBS" 1>&6
15292 echo "${as_me:-configure}:15292: testing ...after $LIBS ..." 1>&5
15300 echo "$as_me:15300: checking for usable X Toolkit package" >&5
15301 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
15302 if test "${cf_cv_xt_ice_compat+set}" = set; then
15303 echo $ECHO_N "(cached) $ECHO_C" >&6
15306 cat >"conftest.$ac_ext" <<_ACEOF
15307 #line 15307 "configure"
15308 #include "confdefs.h"
15310 $ac_includes_default
15311 #include <X11/Shell.h>
15316 int num = IceConnectionNumber(0); (void) num
15322 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15323 if { (eval echo "$as_me:15323: \"$ac_link\"") >&5
15324 (eval $ac_link) 2>&5
15326 echo "$as_me:15326: \$? = $ac_status" >&5
15327 (exit "$ac_status"); } &&
15328 { ac_try='test -s "conftest$ac_exeext"'
15329 { (eval echo "$as_me:15329: \"$ac_try\"") >&5
15330 (eval $ac_try) 2>&5
15332 echo "$as_me:15332: \$? = $ac_status" >&5
15333 (exit "$ac_status"); }; }; then
15334 cf_cv_xt_ice_compat=yes
15336 echo "$as_me: failed program was:" >&5
15337 cat "conftest.$ac_ext" >&5
15338 cf_cv_xt_ice_compat=no
15340 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15342 echo "$as_me:15342: result: $cf_cv_xt_ice_compat" >&5
15343 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
15345 if test "$cf_cv_xt_ice_compat" = no
15347 # workaround for broken ".pc" files used for X Toolkit.
15348 case "x$X_PRE_LIBS" in
15354 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
15356 echo "${as_me:-configure}:15356: testing work around broken ICE dependency ..." 1>&5
15358 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
15359 test -n "$verbose" && echo " found package ice" 1>&6
15361 echo "${as_me:-configure}:15361: testing found package ice ..." 1>&5
15363 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
15364 cf_pkgconfig_libs="`$PKG_CONFIG --libs "ice" 2>/dev/null`"
15365 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
15367 echo "${as_me:-configure}:15367: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
15369 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
15371 echo "${as_me:-configure}:15371: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
15376 cf_new_extra_cppflags=
15378 for cf_add_cflags in $cf_pkgconfig_incs
15380 case "$cf_fix_cppflags" in
15382 case "$cf_add_cflags" in
15383 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15384 case "$cf_add_cflags" in
15386 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15388 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15389 && test -z "${cf_tst_cflags}" \
15390 && cf_fix_cppflags=yes
15392 if test "$cf_fix_cppflags" = yes ; then
15394 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15395 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15398 elif test "${cf_tst_cflags}" = "\"'" ; then
15400 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15401 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15407 case "$CPPFLAGS" in
15411 case "$cf_add_cflags" in
15413 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15415 CPPFLAGS=`echo "$CPPFLAGS" | \
15416 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15417 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15422 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15423 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15430 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15431 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15438 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15439 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15441 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15443 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15444 && test -z "${cf_tst_cflags}" \
15445 && cf_fix_cppflags=no
15450 if test -n "$cf_new_cflags" ; then
15452 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15453 CFLAGS="${CFLAGS}$cf_new_cflags"
15457 if test -n "$cf_new_cppflags" ; then
15459 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15460 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15464 if test -n "$cf_new_extra_cppflags" ; then
15466 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15467 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15471 cf_add_libs="$LIBS"
15474 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15475 # filter duplicates
15476 for cf_add_1lib in $cf_add_0lib; do
15477 for cf_add_2lib in $cf_add_libs; do
15478 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15483 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15485 LIBS="$cf_add_libs"
15487 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
15488 test -n "$verbose" && echo " found package sm" 1>&6
15490 echo "${as_me:-configure}:15490: testing found package sm ..." 1>&5
15492 cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
15493 cf_pkgconfig_libs="`$PKG_CONFIG --libs "sm" 2>/dev/null`"
15494 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
15496 echo "${as_me:-configure}:15496: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
15498 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
15500 echo "${as_me:-configure}:15500: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
15505 cf_new_extra_cppflags=
15507 for cf_add_cflags in $cf_pkgconfig_incs
15509 case "$cf_fix_cppflags" in
15511 case "$cf_add_cflags" in
15512 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15513 case "$cf_add_cflags" in
15515 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15517 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15518 && test -z "${cf_tst_cflags}" \
15519 && cf_fix_cppflags=yes
15521 if test "$cf_fix_cppflags" = yes ; then
15523 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15524 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15527 elif test "${cf_tst_cflags}" = "\"'" ; then
15529 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15530 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15536 case "$CPPFLAGS" in
15540 case "$cf_add_cflags" in
15542 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15544 CPPFLAGS=`echo "$CPPFLAGS" | \
15545 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15546 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15551 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15552 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15559 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15560 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15567 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15568 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15570 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15572 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15573 && test -z "${cf_tst_cflags}" \
15574 && cf_fix_cppflags=no
15579 if test -n "$cf_new_cflags" ; then
15581 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15582 CFLAGS="${CFLAGS}$cf_new_cflags"
15586 if test -n "$cf_new_cppflags" ; then
15588 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15589 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15593 if test -n "$cf_new_extra_cppflags" ; then
15595 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15596 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15600 cf_add_libs="$LIBS"
15603 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15604 # filter duplicates
15605 for cf_add_1lib in $cf_add_0lib; do
15606 for cf_add_2lib in $cf_add_libs; do
15607 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15612 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15614 LIBS="$cf_add_libs"
15627 test -n "$verbose" && echo " ...before $LIBS" 1>&6
15629 echo "${as_me:-configure}:15629: testing ...before $LIBS ..." 1>&5
15631 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's% % %g'`
15632 test -n "$verbose" && echo " ...after $LIBS" 1>&6
15634 echo "${as_me:-configure}:15634: testing ...after $LIBS ..." 1>&5
15650 LDFLAGS="$X_LIBS $LDFLAGS"
15652 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
15654 echo "${as_me:-configure}:15654: testing checking additions to CFLAGS ..." 1>&5
15656 cf_check_cflags="$CFLAGS"
15657 cf_check_cppflags="$CPPFLAGS"
15662 cf_new_extra_cppflags=
15664 for cf_add_cflags in $X_CFLAGS
15666 case "$cf_fix_cppflags" in
15668 case "$cf_add_cflags" in
15669 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15670 case "$cf_add_cflags" in
15672 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15674 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15675 && test -z "${cf_tst_cflags}" \
15676 && cf_fix_cppflags=yes
15678 if test "$cf_fix_cppflags" = yes ; then
15680 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15681 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15684 elif test "${cf_tst_cflags}" = "\"'" ; then
15686 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15687 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15693 case "$CPPFLAGS" in
15697 case "$cf_add_cflags" in
15699 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15701 CPPFLAGS=`echo "$CPPFLAGS" | \
15702 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
15703 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
15708 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15709 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15716 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15717 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15724 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15725 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15727 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
15729 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15730 && test -z "${cf_tst_cflags}" \
15731 && cf_fix_cppflags=no
15736 if test -n "$cf_new_cflags" ; then
15737 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
15739 echo "${as_me:-configure}:15739: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
15741 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15742 CFLAGS="${CFLAGS}$cf_new_cflags"
15746 if test -n "$cf_new_cppflags" ; then
15747 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
15749 echo "${as_me:-configure}:15749: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
15751 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15752 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15756 if test -n "$cf_new_extra_cppflags" ; then
15757 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
15759 echo "${as_me:-configure}:15759: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
15761 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15762 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15766 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
15767 cat >"conftest.$ac_ext" <<_ACEOF
15768 #line 15768 "configure"
15769 #include "confdefs.h"
15774 printf("Hello world");
15779 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15780 if { (eval echo "$as_me:15780: \"$ac_link\"") >&5
15781 (eval $ac_link) 2>&5
15783 echo "$as_me:15783: \$? = $ac_status" >&5
15784 (exit "$ac_status"); } &&
15785 { ac_try='test -s "conftest$ac_exeext"'
15786 { (eval echo "$as_me:15786: \"$ac_try\"") >&5
15787 (eval $ac_try) 2>&5
15789 echo "$as_me:15789: \$? = $ac_status" >&5
15790 (exit "$ac_status"); }; }; then
15793 echo "$as_me: failed program was:" >&5
15794 cat "conftest.$ac_ext" >&5
15795 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
15797 echo "${as_me:-configure}:15797: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
15799 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
15800 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
15802 echo "${as_me:-configure}:15802: testing but keeping change to \$CPPFLAGS ..." 1>&5
15805 CFLAGS="$cf_check_cflags"
15807 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15810 echo "$as_me:15810: checking for XOpenDisplay" >&5
15811 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
15812 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
15813 echo $ECHO_N "(cached) $ECHO_C" >&6
15815 cat >"conftest.$ac_ext" <<_ACEOF
15816 #line 15816 "configure"
15817 #include "confdefs.h"
15818 #define XOpenDisplay autoconf_temporary
15819 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15820 #undef XOpenDisplay
15826 /* We use char because int might match the return type of a gcc2
15827 builtin and then its argument prototype would still apply. */
15828 char XOpenDisplay (void);
15834 /* The GNU C library defines stubs for functions which it implements
15835 to always fail with ENOSYS. Some functions are actually named
15836 something starting with __ and the normal name is an alias. */
15837 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
15838 #error found stub for XOpenDisplay
15841 return XOpenDisplay ();
15846 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15847 if { (eval echo "$as_me:15847: \"$ac_link\"") >&5
15848 (eval $ac_link) 2>&5
15850 echo "$as_me:15850: \$? = $ac_status" >&5
15851 (exit "$ac_status"); } &&
15852 { ac_try='test -s "conftest$ac_exeext"'
15853 { (eval echo "$as_me:15853: \"$ac_try\"") >&5
15854 (eval $ac_try) 2>&5
15856 echo "$as_me:15856: \$? = $ac_status" >&5
15857 (exit "$ac_status"); }; }; then
15858 ac_cv_func_XOpenDisplay=yes
15860 echo "$as_me: failed program was:" >&5
15861 cat "conftest.$ac_ext" >&5
15862 ac_cv_func_XOpenDisplay=no
15864 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15866 echo "$as_me:15866: result: $ac_cv_func_XOpenDisplay" >&5
15867 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
15868 if test "$ac_cv_func_XOpenDisplay" = yes; then
15872 echo "$as_me:15872: checking for XOpenDisplay in -lX11" >&5
15873 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
15874 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
15875 echo $ECHO_N "(cached) $ECHO_C" >&6
15877 ac_check_lib_save_LIBS=$LIBS
15879 cat >"conftest.$ac_ext" <<_ACEOF
15880 #line 15880 "configure"
15881 #include "confdefs.h"
15883 /* Override any gcc2 internal prototype to avoid an error. */
15887 /* We use char because int might match the return type of a gcc2
15888 builtin and then its argument prototype would still apply. */
15889 char XOpenDisplay ();
15898 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15899 if { (eval echo "$as_me:15899: \"$ac_link\"") >&5
15900 (eval $ac_link) 2>&5
15902 echo "$as_me:15902: \$? = $ac_status" >&5
15903 (exit "$ac_status"); } &&
15904 { ac_try='test -s "conftest$ac_exeext"'
15905 { (eval echo "$as_me:15905: \"$ac_try\"") >&5
15906 (eval $ac_try) 2>&5
15908 echo "$as_me:15908: \$? = $ac_status" >&5
15909 (exit "$ac_status"); }; }; then
15910 ac_cv_lib_X11_XOpenDisplay=yes
15912 echo "$as_me: failed program was:" >&5
15913 cat "conftest.$ac_ext" >&5
15914 ac_cv_lib_X11_XOpenDisplay=no
15916 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15917 LIBS=$ac_check_lib_save_LIBS
15919 echo "$as_me:15919: result: $ac_cv_lib_X11_XOpenDisplay" >&5
15920 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
15921 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
15923 cf_add_libs="$LIBS"
15926 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15927 # filter duplicates
15928 for cf_add_1lib in $cf_add_0lib; do
15929 for cf_add_2lib in $cf_add_libs; do
15930 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15935 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15937 LIBS="$cf_add_libs"
15943 echo "$as_me:15943: checking for XtAppInitialize" >&5
15944 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
15945 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
15946 echo $ECHO_N "(cached) $ECHO_C" >&6
15948 cat >"conftest.$ac_ext" <<_ACEOF
15949 #line 15949 "configure"
15950 #include "confdefs.h"
15951 #define XtAppInitialize autoconf_temporary
15952 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
15953 #undef XtAppInitialize
15959 /* We use char because int might match the return type of a gcc2
15960 builtin and then its argument prototype would still apply. */
15961 char XtAppInitialize (void);
15967 /* The GNU C library defines stubs for functions which it implements
15968 to always fail with ENOSYS. Some functions are actually named
15969 something starting with __ and the normal name is an alias. */
15970 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
15971 #error found stub for XtAppInitialize
15974 return XtAppInitialize ();
15979 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15980 if { (eval echo "$as_me:15980: \"$ac_link\"") >&5
15981 (eval $ac_link) 2>&5
15983 echo "$as_me:15983: \$? = $ac_status" >&5
15984 (exit "$ac_status"); } &&
15985 { ac_try='test -s "conftest$ac_exeext"'
15986 { (eval echo "$as_me:15986: \"$ac_try\"") >&5
15987 (eval $ac_try) 2>&5
15989 echo "$as_me:15989: \$? = $ac_status" >&5
15990 (exit "$ac_status"); }; }; then
15991 ac_cv_func_XtAppInitialize=yes
15993 echo "$as_me: failed program was:" >&5
15994 cat "conftest.$ac_ext" >&5
15995 ac_cv_func_XtAppInitialize=no
15997 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15999 echo "$as_me:15999: result: $ac_cv_func_XtAppInitialize" >&5
16000 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
16001 if test "$ac_cv_func_XtAppInitialize" = yes; then
16005 echo "$as_me:16005: checking for XtAppInitialize in -lXt" >&5
16006 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
16007 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
16008 echo $ECHO_N "(cached) $ECHO_C" >&6
16010 ac_check_lib_save_LIBS=$LIBS
16012 cat >"conftest.$ac_ext" <<_ACEOF
16013 #line 16013 "configure"
16014 #include "confdefs.h"
16016 /* Override any gcc2 internal prototype to avoid an error. */
16020 /* We use char because int might match the return type of a gcc2
16021 builtin and then its argument prototype would still apply. */
16022 char XtAppInitialize ();
16026 XtAppInitialize ();
16031 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16032 if { (eval echo "$as_me:16032: \"$ac_link\"") >&5
16033 (eval $ac_link) 2>&5
16035 echo "$as_me:16035: \$? = $ac_status" >&5
16036 (exit "$ac_status"); } &&
16037 { ac_try='test -s "conftest$ac_exeext"'
16038 { (eval echo "$as_me:16038: \"$ac_try\"") >&5
16039 (eval $ac_try) 2>&5
16041 echo "$as_me:16041: \$? = $ac_status" >&5
16042 (exit "$ac_status"); }; }; then
16043 ac_cv_lib_Xt_XtAppInitialize=yes
16045 echo "$as_me: failed program was:" >&5
16046 cat "conftest.$ac_ext" >&5
16047 ac_cv_lib_Xt_XtAppInitialize=no
16049 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16050 LIBS=$ac_check_lib_save_LIBS
16052 echo "$as_me:16052: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
16053 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
16054 if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
16056 cat >>confdefs.h <<\EOF
16057 #define HAVE_LIBXT 1
16068 if test "$cf_have_X_LIBS" = no ; then
16069 { echo "$as_me:16069: WARNING: Unable to successfully link X Toolkit library (-lXt) with
16070 test program. You will have to check and add the proper libraries by hand
16072 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
16073 test program. You will have to check and add the proper libraries by hand
16074 to makefile." >&2;}
16077 cf_x_athena_root=$cf_x_athena
16080 for cf_path in default \
16081 /usr/contrib/X11R6 \
16082 /usr/contrib/X11R5 \
16086 if test -z "$cf_x_athena_inc" ; then
16088 cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
16089 cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
16090 cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
16091 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16092 for cf_X_CFLAGS in $X_CFLAGS
16094 case "x$cf_X_CFLAGS" in
16096 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16099 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16104 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
16105 if test "$cf_path" != default ; then
16107 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16108 CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
16110 echo "$as_me:16110: checking for $cf_test in $cf_path" >&5
16111 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
16113 echo "$as_me:16113: checking for $cf_test" >&5
16114 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
16116 cat >"conftest.$ac_ext" <<_ACEOF
16117 #line 16117 "configure"
16118 #include "confdefs.h"
16120 #include <X11/Intrinsic.h>
16121 #include <$cf_test>
16130 rm -f "conftest.$ac_objext"
16131 if { (eval echo "$as_me:16131: \"$ac_compile\"") >&5
16132 (eval $ac_compile) 2>&5
16134 echo "$as_me:16134: \$? = $ac_status" >&5
16135 (exit "$ac_status"); } &&
16136 { ac_try='test -s "conftest.$ac_objext"'
16137 { (eval echo "$as_me:16137: \"$ac_try\"") >&5
16138 (eval $ac_try) 2>&5
16140 echo "$as_me:16140: \$? = $ac_status" >&5
16141 (exit "$ac_status"); }; }; then
16144 echo "$as_me: failed program was:" >&5
16145 cat "conftest.$ac_ext" >&5
16148 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16149 echo "$as_me:16149: result: $cf_result" >&5
16150 echo "${ECHO_T}$cf_result" >&6
16152 LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
16153 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
16154 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
16156 if test "$cf_result" = yes ; then
16157 test "$cf_path" = default && cf_x_athena_inc=default
16158 test "$cf_path" != default && cf_x_athena_inc="$cf_path/include"
16164 if test -z "$cf_x_athena_inc" ; then
16165 { echo "$as_me:16165: WARNING: Unable to find Athena header files" >&5
16166 echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
16167 elif test "$cf_x_athena_inc" != default ; then
16169 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16170 CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
16174 cf_x_athena_root=$cf_x_athena
16177 for cf_path in default \
16178 /usr/contrib/X11R6 \
16179 /usr/contrib/X11R5 \
16184 ${cf_x_athena_root} \
16185 ${cf_x_athena_root}7 \
16186 ${cf_x_athena_root}6
16189 "-l$cf_lib -lXmu" \
16190 "-l$cf_lib -lXpm -lXmu" \
16191 "-l${cf_lib}_s -lXmu_s"
16193 test -n "$cf_x_athena_lib" && break
16195 cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
16196 cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
16197 cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
16198 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16199 for cf_X_CFLAGS in $X_CFLAGS
16201 case "x$cf_X_CFLAGS" in
16203 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16206 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16211 cf_test=XawSimpleMenuAddGlobalActions
16212 test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
16214 cf_add_libs="$LIBS"
16217 for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16218 # filter duplicates
16219 for cf_add_1lib in $cf_add_0lib; do
16220 for cf_add_2lib in $cf_add_libs; do
16221 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16226 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16228 LIBS="$cf_add_libs"
16230 echo "$as_me:16230: checking for $cf_test in $cf_libs" >&5
16231 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
16232 cat >"conftest.$ac_ext" <<_ACEOF
16233 #line 16233 "configure"
16234 #include "confdefs.h"
16236 $ac_includes_default
16237 #include <X11/Intrinsic.h>
16238 #include <X11/$cf_x_athena_root/SimpleMenu.h>
16244 $cf_test((XtAppContext) 0)
16249 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16250 if { (eval echo "$as_me:16250: \"$ac_link\"") >&5
16251 (eval $ac_link) 2>&5
16253 echo "$as_me:16253: \$? = $ac_status" >&5
16254 (exit "$ac_status"); } &&
16255 { ac_try='test -s "conftest$ac_exeext"'
16256 { (eval echo "$as_me:16256: \"$ac_try\"") >&5
16257 (eval $ac_try) 2>&5
16259 echo "$as_me:16259: \$? = $ac_status" >&5
16260 (exit "$ac_status"); }; }; then
16263 echo "$as_me: failed program was:" >&5
16264 cat "conftest.$ac_ext" >&5
16267 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16268 echo "$as_me:16268: result: $cf_result" >&5
16269 echo "${ECHO_T}$cf_result" >&6
16271 LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
16272 CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
16273 CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
16275 if test "$cf_result" = yes ; then
16276 cf_x_athena_lib="$cf_libs"
16280 test -n "$cf_x_athena_lib" && break
16284 if test -z "$cf_x_athena_lib" ; then
16285 { { echo "$as_me:16285: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
16286 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
16287 { (exit 1); exit 1; }; }
16290 cf_add_libs="$LIBS"
16293 for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16294 # filter duplicates
16295 for cf_add_1lib in $cf_add_0lib; do
16296 for cf_add_2lib in $cf_add_libs; do
16297 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16302 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16304 LIBS="$cf_add_libs"
16306 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16308 cat >>confdefs.h <<EOF
16309 #define $cf_x_athena_LIBS 1
16314 if test -n "$ac_tool_prefix"; then
16315 for ac_prog in xcurses-config
16317 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
16318 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
16319 echo "$as_me:16319: checking for $ac_word" >&5
16320 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16321 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
16322 echo $ECHO_N "(cached) $ECHO_C" >&6
16324 if test -n "$XCURSES_CONFIG"; then
16325 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
16327 ac_save_IFS=$IFS; IFS=$ac_path_separator
16329 for ac_dir in $ac_dummy; do
16331 test -z "$ac_dir" && ac_dir=.
16332 $as_executable_p "$ac_dir/$ac_word" || continue
16333 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
16334 echo "$as_me:16334: found $ac_dir/$ac_word" >&5
16340 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
16341 if test -n "$XCURSES_CONFIG"; then
16342 echo "$as_me:16342: result: $XCURSES_CONFIG" >&5
16343 echo "${ECHO_T}$XCURSES_CONFIG" >&6
16345 echo "$as_me:16345: result: no" >&5
16346 echo "${ECHO_T}no" >&6
16349 test -n "$XCURSES_CONFIG" && break
16352 if test -z "$XCURSES_CONFIG"; then
16353 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
16354 for ac_prog in xcurses-config
16356 # Extract the first word of "$ac_prog", so it can be a program name with args.
16357 set dummy $ac_prog; ac_word=$2
16358 echo "$as_me:16358: checking for $ac_word" >&5
16359 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16360 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
16361 echo $ECHO_N "(cached) $ECHO_C" >&6
16363 if test -n "$ac_ct_XCURSES_CONFIG"; then
16364 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
16366 ac_save_IFS=$IFS; IFS=$ac_path_separator
16368 for ac_dir in $ac_dummy; do
16370 test -z "$ac_dir" && ac_dir=.
16371 $as_executable_p "$ac_dir/$ac_word" || continue
16372 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
16373 echo "$as_me:16373: found $ac_dir/$ac_word" >&5
16379 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
16380 if test -n "$ac_ct_XCURSES_CONFIG"; then
16381 echo "$as_me:16381: result: $ac_ct_XCURSES_CONFIG" >&5
16382 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
16384 echo "$as_me:16384: result: no" >&5
16385 echo "${ECHO_T}no" >&6
16388 test -n "$ac_ct_XCURSES_CONFIG" && break
16390 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
16392 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
16395 if test "$XCURSES_CONFIG" != none ; then
16400 cf_new_extra_cppflags=
16402 for cf_add_cflags in `$XCURSES_CONFIG --cflags`
16404 case "$cf_fix_cppflags" in
16406 case "$cf_add_cflags" in
16407 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16408 case "$cf_add_cflags" in
16410 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16412 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16413 && test -z "${cf_tst_cflags}" \
16414 && cf_fix_cppflags=yes
16416 if test "$cf_fix_cppflags" = yes ; then
16418 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16419 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16422 elif test "${cf_tst_cflags}" = "\"'" ; then
16424 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16425 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16431 case "$CPPFLAGS" in
16435 case "$cf_add_cflags" in
16437 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16439 CPPFLAGS=`echo "$CPPFLAGS" | \
16440 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16441 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16446 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16447 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16454 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16455 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16462 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16463 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16465 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16467 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16468 && test -z "${cf_tst_cflags}" \
16469 && cf_fix_cppflags=no
16474 if test -n "$cf_new_cflags" ; then
16476 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16477 CFLAGS="${CFLAGS}$cf_new_cflags"
16481 if test -n "$cf_new_cppflags" ; then
16483 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16484 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16488 if test -n "$cf_new_extra_cppflags" ; then
16490 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16491 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16495 cf_add_libs="$LIBS"
16498 for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16499 # filter duplicates
16500 for cf_add_1lib in $cf_add_0lib; do
16501 for cf_add_2lib in $cf_add_libs; do
16502 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16507 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16509 LIBS="$cf_add_libs"
16511 cf_cv_lib_XCurses=yes
16515 LDFLAGS="$LDFLAGS $X_LIBS"
16517 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
16519 echo "${as_me:-configure}:16519: testing checking additions to CFLAGS ..." 1>&5
16521 cf_check_cflags="$CFLAGS"
16522 cf_check_cppflags="$CPPFLAGS"
16527 cf_new_extra_cppflags=
16529 for cf_add_cflags in $X_CFLAGS
16531 case "$cf_fix_cppflags" in
16533 case "$cf_add_cflags" in
16534 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16535 case "$cf_add_cflags" in
16537 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16539 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16540 && test -z "${cf_tst_cflags}" \
16541 && cf_fix_cppflags=yes
16543 if test "$cf_fix_cppflags" = yes ; then
16545 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16546 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16549 elif test "${cf_tst_cflags}" = "\"'" ; then
16551 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16552 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16558 case "$CPPFLAGS" in
16562 case "$cf_add_cflags" in
16564 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16566 CPPFLAGS=`echo "$CPPFLAGS" | \
16567 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
16568 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
16573 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16574 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16581 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16582 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16589 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16590 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16592 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16594 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16595 && test -z "${cf_tst_cflags}" \
16596 && cf_fix_cppflags=no
16601 if test -n "$cf_new_cflags" ; then
16602 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
16604 echo "${as_me:-configure}:16604: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
16606 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16607 CFLAGS="${CFLAGS}$cf_new_cflags"
16611 if test -n "$cf_new_cppflags" ; then
16612 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
16614 echo "${as_me:-configure}:16614: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
16616 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16617 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16621 if test -n "$cf_new_extra_cppflags" ; then
16622 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
16624 echo "${as_me:-configure}:16624: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
16626 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16627 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16631 if test "x$cf_check_cflags" != "x$CFLAGS" ; then
16632 cat >"conftest.$ac_ext" <<_ACEOF
16633 #line 16633 "configure"
16634 #include "confdefs.h"
16639 printf("Hello world");
16644 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16645 if { (eval echo "$as_me:16645: \"$ac_link\"") >&5
16646 (eval $ac_link) 2>&5
16648 echo "$as_me:16648: \$? = $ac_status" >&5
16649 (exit "$ac_status"); } &&
16650 { ac_try='test -s "conftest$ac_exeext"'
16651 { (eval echo "$as_me:16651: \"$ac_try\"") >&5
16652 (eval $ac_try) 2>&5
16654 echo "$as_me:16654: \$? = $ac_status" >&5
16655 (exit "$ac_status"); }; }; then
16658 echo "$as_me: failed program was:" >&5
16659 cat "conftest.$ac_ext" >&5
16660 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
16662 echo "${as_me:-configure}:16662: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
16664 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
16665 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
16667 echo "${as_me:-configure}:16667: testing but keeping change to \$CPPFLAGS ..." 1>&5
16670 CFLAGS="$cf_check_cflags"
16672 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16675 echo "$as_me:16675: checking for XOpenDisplay in -lX11" >&5
16676 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
16677 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
16678 echo $ECHO_N "(cached) $ECHO_C" >&6
16680 ac_check_lib_save_LIBS=$LIBS
16681 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
16682 cat >"conftest.$ac_ext" <<_ACEOF
16683 #line 16683 "configure"
16684 #include "confdefs.h"
16686 /* Override any gcc2 internal prototype to avoid an error. */
16690 /* We use char because int might match the return type of a gcc2
16691 builtin and then its argument prototype would still apply. */
16692 char XOpenDisplay ();
16701 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16702 if { (eval echo "$as_me:16702: \"$ac_link\"") >&5
16703 (eval $ac_link) 2>&5
16705 echo "$as_me:16705: \$? = $ac_status" >&5
16706 (exit "$ac_status"); } &&
16707 { ac_try='test -s "conftest$ac_exeext"'
16708 { (eval echo "$as_me:16708: \"$ac_try\"") >&5
16709 (eval $ac_try) 2>&5
16711 echo "$as_me:16711: \$? = $ac_status" >&5
16712 (exit "$ac_status"); }; }; then
16713 ac_cv_lib_X11_XOpenDisplay=yes
16715 echo "$as_me: failed program was:" >&5
16716 cat "conftest.$ac_ext" >&5
16717 ac_cv_lib_X11_XOpenDisplay=no
16719 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16720 LIBS=$ac_check_lib_save_LIBS
16722 echo "$as_me:16722: result: $ac_cv_lib_X11_XOpenDisplay" >&5
16723 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
16724 if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
16726 cf_add_libs="$LIBS"
16729 for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16730 # filter duplicates
16731 for cf_add_1lib in $cf_add_0lib; do
16732 for cf_add_2lib in $cf_add_libs; do
16733 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16738 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16740 LIBS="$cf_add_libs"
16744 echo "$as_me:16744: checking for XCurses library" >&5
16745 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
16746 if test "${cf_cv_lib_XCurses+set}" = set; then
16747 echo $ECHO_N "(cached) $ECHO_C" >&6
16750 cf_add_libs="$LIBS"
16753 for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16754 # filter duplicates
16755 for cf_add_1lib in $cf_add_0lib; do
16756 for cf_add_2lib in $cf_add_libs; do
16757 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16762 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16764 LIBS="$cf_add_libs"
16766 cat >"conftest.$ac_ext" <<_ACEOF
16767 #line 16767 "configure"
16768 #include "confdefs.h"
16770 #include <xcurses.h>
16771 char *XCursesProgramName = "test";
16781 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16782 if { (eval echo "$as_me:16782: \"$ac_link\"") >&5
16783 (eval $ac_link) 2>&5
16785 echo "$as_me:16785: \$? = $ac_status" >&5
16786 (exit "$ac_status"); } &&
16787 { ac_try='test -s "conftest$ac_exeext"'
16788 { (eval echo "$as_me:16788: \"$ac_try\"") >&5
16789 (eval $ac_try) 2>&5
16791 echo "$as_me:16791: \$? = $ac_status" >&5
16792 (exit "$ac_status"); }; }; then
16793 cf_cv_lib_XCurses=yes
16795 echo "$as_me: failed program was:" >&5
16796 cat "conftest.$ac_ext" >&5
16797 cf_cv_lib_XCurses=no
16799 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16802 echo "$as_me:16802: result: $cf_cv_lib_XCurses" >&5
16803 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
16807 if test "$cf_cv_lib_XCurses" = yes ; then
16809 cat >>confdefs.h <<\EOF
16813 cat >>confdefs.h <<\EOF
16817 echo "$as_me:16817: checking for xcurses.h" >&5
16818 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
16819 if test "${ac_cv_header_xcurses_h+set}" = set; then
16820 echo $ECHO_N "(cached) $ECHO_C" >&6
16822 cat >"conftest.$ac_ext" <<_ACEOF
16823 #line 16823 "configure"
16824 #include "confdefs.h"
16825 #include <xcurses.h>
16827 if { (eval echo "$as_me:16827: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16828 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16830 $EGREP -v '^ *\+' conftest.er1 >conftest.err
16832 cat conftest.err >&5
16833 echo "$as_me:16833: \$? = $ac_status" >&5
16834 (exit "$ac_status"); } >/dev/null; then
16835 if test -s conftest.err; then
16836 ac_cpp_err=$ac_c_preproc_warn_flag
16843 if test -z "$ac_cpp_err"; then
16844 ac_cv_header_xcurses_h=yes
16846 echo "$as_me: failed program was:" >&5
16847 cat "conftest.$ac_ext" >&5
16848 ac_cv_header_xcurses_h=no
16850 rm -f conftest.err "conftest.$ac_ext"
16852 echo "$as_me:16852: result: $ac_cv_header_xcurses_h" >&5
16853 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
16854 if test "$ac_cv_header_xcurses_h" = yes; then
16856 cat >>confdefs.h <<\EOF
16857 #define HAVE_XCURSES 1
16863 { { echo "$as_me:16863: error: Cannot link with XCurses" >&5
16864 echo "$as_me: error: Cannot link with XCurses" >&2;}
16865 { (exit 1); exit 1; }; }
16870 { { echo "$as_me:16870: error: unexpected screen-value: $cf_cv_screen" >&5
16871 echo "$as_me: error: unexpected screen-value: $cf_cv_screen" >&2;}
16872 { (exit 1); exit 1; }; }
16876 : ${cf_nculib_root:=$cf_cv_screen}
16877 as_ac_Lib=`echo "ac_cv_lib_$cf_nculib_root''__nc_init_pthreads" | $as_tr_sh`
16878 echo "$as_me:16878: checking for _nc_init_pthreads in -l$cf_nculib_root" >&5
16879 echo $ECHO_N "checking for _nc_init_pthreads in -l$cf_nculib_root... $ECHO_C" >&6
16880 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
16881 echo $ECHO_N "(cached) $ECHO_C" >&6
16883 ac_check_lib_save_LIBS=$LIBS
16884 LIBS="-l$cf_nculib_root $LIBS"
16885 cat >"conftest.$ac_ext" <<_ACEOF
16886 #line 16886 "configure"
16887 #include "confdefs.h"
16889 /* Override any gcc2 internal prototype to avoid an error. */
16893 /* We use char because int might match the return type of a gcc2
16894 builtin and then its argument prototype would still apply. */
16895 char _nc_init_pthreads ();
16899 _nc_init_pthreads ();
16904 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16905 if { (eval echo "$as_me:16905: \"$ac_link\"") >&5
16906 (eval $ac_link) 2>&5
16908 echo "$as_me:16908: \$? = $ac_status" >&5
16909 (exit "$ac_status"); } &&
16910 { ac_try='test -s "conftest$ac_exeext"'
16911 { (eval echo "$as_me:16911: \"$ac_try\"") >&5
16912 (eval $ac_try) 2>&5
16914 echo "$as_me:16914: \$? = $ac_status" >&5
16915 (exit "$ac_status"); }; }; then
16916 eval "$as_ac_Lib=yes"
16918 echo "$as_me: failed program was:" >&5
16919 cat "conftest.$ac_ext" >&5
16920 eval "$as_ac_Lib=no"
16922 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16923 LIBS=$ac_check_lib_save_LIBS
16925 echo "$as_me:16925: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
16926 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
16927 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
16928 cf_cv_ncurses_pthreads=yes
16930 cf_cv_ncurses_pthreads=no
16933 if test "$cf_cv_ncurses_pthreads" = yes
16936 cf_add_libs="$LIBS"
16939 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16940 # filter duplicates
16941 for cf_add_1lib in $cf_add_0lib; do
16942 for cf_add_2lib in $cf_add_libs; do
16943 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16948 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16950 LIBS="$cf_add_libs"
16954 case $cf_cv_screen in
16956 cf_cv_libtype=`echo "$cf_cv_screen" | sed -e 's/^ncurses//'`
16960 echo "$as_me:16960: checking for X11 rgb file" >&5
16961 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
16963 # Check whether --with-x11-rgb or --without-x11-rgb was given.
16964 if test "${with_x11_rgb+set}" = set; then
16965 withval="$with_x11_rgb"
16971 if test "x$RGB_PATH" = xauto
16973 RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
16975 /opt/local/share/X11/rgb.txt \
16976 /opt/X11/share/X11/rgb.txt \
16977 /usr/share/X11/rgb.txt \
16978 /usr/X11/share/X11/rgb.txt \
16979 /usr/X11/lib/X11/rgb.txt \
16980 /usr/lib/X11/rgb.txt \
16982 /usr/pkg/lib/X11/rgb.txt \
16983 /usr/X11R7/lib/X11/rgb.txt \
16984 /usr/X11R6/lib/X11/rgb.txt \
16985 /usr/X11R5/lib/X11/rgb.txt \
16986 /usr/X11R4/lib/X11/rgb.txt \
16987 /usr/local/lib/X11/rgb.txt \
16988 /usr/local/share/X11/rgb.txt \
16989 /usr/lib64/X11/rgb.txt
16991 if test -f "$cf_path" ; then
16992 RGB_PATH="$cf_path"
16999 if test "x$prefix" != xNONE; then
17000 cf_path_syntax="$prefix"
17002 cf_path_syntax="$ac_default_prefix"
17005 case ".$cf_path" in
17006 (.\$\(*\)*|.\'*\'*)
17010 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
17012 (.\$\{*prefix\}*|.\$\{*dir\}*)
17013 eval cf_path="$cf_path"
17014 case ".$cf_path" in
17016 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
17021 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
17024 { { echo "$as_me:17024: error: expected a pathname, not \"$cf_path\"" >&5
17025 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
17026 { (exit 1); exit 1; }; }
17032 echo "$as_me:17032: result: $RGB_PATH" >&5
17033 echo "${ECHO_T}$RGB_PATH" >&6
17035 cat >>confdefs.h <<EOF
17036 #define RGB_PATH "$cf_path"
17040 if test "$RGB_PATH" = no
17047 case $cf_cv_screen in
17049 cf_default_panel=no
17052 cf_default_tinfo=no
17054 (xcurses|bsdcurses)
17055 cf_default_panel=no
17058 cf_default_tinfo=yes
17061 cf_default_panel=yes
17062 cf_default_form=yes
17063 cf_default_menu=yes
17064 cf_default_tinfo=yes
17065 case $cf_cv_screen in
17067 cf_curses_headers="nc_alloc.h nomacros.h term_entry.h"
17073 echo "$as_me:17073: checking for desired basename for form library" >&5
17074 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
17076 # Check whether --with-form-libname or --without-form-libname was given.
17077 if test "${with_form_libname+set}" = set; then
17078 withval="$with_form_libname"
17079 with_lib_basename=$withval
17081 with_lib_basename=form
17083 FORM_NAME="$with_lib_basename"
17085 case "x$FORM_NAME" in
17093 echo "$as_me:17093: result: $FORM_NAME" >&5
17094 echo "${ECHO_T}$FORM_NAME" >&6
17096 echo "$as_me:17096: checking for desired basename for menu library" >&5
17097 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
17099 # Check whether --with-menu-libname or --without-menu-libname was given.
17100 if test "${with_menu_libname+set}" = set; then
17101 withval="$with_menu_libname"
17102 with_lib_basename=$withval
17104 with_lib_basename=menu
17106 MENU_NAME="$with_lib_basename"
17108 case "x$MENU_NAME" in
17116 echo "$as_me:17116: result: $MENU_NAME" >&5
17117 echo "${ECHO_T}$MENU_NAME" >&6
17119 echo "$as_me:17119: checking for desired basename for panel library" >&5
17120 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
17122 # Check whether --with-panel-libname or --without-panel-libname was given.
17123 if test "${with_panel_libname+set}" = set; then
17124 withval="$with_panel_libname"
17125 with_lib_basename=$withval
17127 with_lib_basename=panel
17129 PANEL_NAME="$with_lib_basename"
17131 case "x$PANEL_NAME" in
17139 echo "$as_me:17139: result: $PANEL_NAME" >&5
17140 echo "${ECHO_T}$PANEL_NAME" >&6
17142 echo "$as_me:17142: checking if you want to check for panel functions" >&5
17143 echo $ECHO_N "checking if you want to check for panel functions... $ECHO_C" >&6
17145 # Check whether --enable-panel or --disable-panel was given.
17146 if test "${enable_panel+set}" = set; then
17147 enableval="$enable_panel"
17148 test "$enableval" != no && enableval=yes
17149 if test "$enableval" != "yes" ; then
17152 cf_enable_panel=$cf_default_panel
17156 cf_enable_panel=$cf_default_panel
17159 echo "$as_me:17159: result: $cf_enable_panel" >&5
17160 echo "${ECHO_T}$cf_enable_panel" >&6
17161 if test $cf_enable_panel = yes
17164 cf_have_curses_lib=no
17166 : ${NCURSES_CONFIG_PKG:=none}
17167 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
17169 elif test "x${PKG_CONFIG:=none}" != xnone; then
17170 echo "$as_me:17170: checking pkg-config for $PANEL_NAME$cf_cv_libtype" >&5
17171 echo $ECHO_N "checking pkg-config for $PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
17172 if "$PKG_CONFIG" --exists "$PANEL_NAME$cf_cv_libtype" ; then
17173 echo "$as_me:17173: result: yes" >&5
17174 echo "${ECHO_T}yes" >&6
17176 echo "$as_me:17176: checking if the $PANEL_NAME$cf_cv_libtype package files work" >&5
17177 echo $ECHO_N "checking if the $PANEL_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
17179 cf_save_CFLAGS="$CFLAGS"
17180 cf_save_CPPFLAGS="$CPPFLAGS"
17181 cf_save_LIBS="$LIBS"
17183 for cf_add_cflags in `$PKG_CONFIG --cflags "$PANEL_NAME$cf_cv_libtype"`
17185 case "x$cf_add_cflags" in
17188 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
17191 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
17192 test "$CFLAGS" != "$cf_old_cflag" || break
17194 CFLAGS="$cf_old_cflag"
17197 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
17200 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
17201 test "$CPPFLAGS" != "$cf_old_cflag" || break
17203 CPPFLAGS="$cf_old_cflag"
17212 cf_new_extra_cppflags=
17214 for cf_add_cflags in $cf_add_cflags
17216 case "$cf_fix_cppflags" in
17218 case "$cf_add_cflags" in
17219 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17220 case "$cf_add_cflags" in
17222 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17224 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17225 && test -z "${cf_tst_cflags}" \
17226 && cf_fix_cppflags=yes
17228 if test "$cf_fix_cppflags" = yes ; then
17230 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17231 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17234 elif test "${cf_tst_cflags}" = "\"'" ; then
17236 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17237 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17243 case "$CPPFLAGS" in
17247 case "$cf_add_cflags" in
17249 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17251 CPPFLAGS=`echo "$CPPFLAGS" | \
17252 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17253 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17258 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17259 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17266 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17267 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17274 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17275 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17277 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17279 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17280 && test -z "${cf_tst_cflags}" \
17281 && cf_fix_cppflags=no
17286 if test -n "$cf_new_cflags" ; then
17288 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17289 CFLAGS="${CFLAGS}$cf_new_cflags"
17293 if test -n "$cf_new_cppflags" ; then
17295 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17296 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17300 if test -n "$cf_new_extra_cppflags" ; then
17302 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17303 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17309 cf_add_libs="$LIBS"
17312 for cf_add_1lib in `$PKG_CONFIG --libs "$PANEL_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17313 # filter duplicates
17314 for cf_add_1lib in $cf_add_0lib; do
17315 for cf_add_2lib in $cf_add_libs; do
17316 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17321 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17323 LIBS="$cf_add_libs"
17325 cat >"conftest.$ac_ext" <<_ACEOF
17326 #line 17326 "configure"
17327 #include "confdefs.h"
17328 #include <$PANEL_NAME.h>
17332 (void) new_panel ( 0 );
17337 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17338 if { (eval echo "$as_me:17338: \"$ac_link\"") >&5
17339 (eval $ac_link) 2>&5
17341 echo "$as_me:17341: \$? = $ac_status" >&5
17342 (exit "$ac_status"); } &&
17343 { ac_try='test -s "conftest$ac_exeext"'
17344 { (eval echo "$as_me:17344: \"$ac_try\"") >&5
17345 (eval $ac_try) 2>&5
17347 echo "$as_me:17347: \$? = $ac_status" >&5
17348 (exit "$ac_status"); }; }; then
17349 if test "$cross_compiling" = yes; then
17350 cf_have_curses_lib=maybe
17352 cat >"conftest.$ac_ext" <<_ACEOF
17353 #line 17353 "configure"
17354 #include "confdefs.h"
17355 #include <$PANEL_NAME.h>
17357 { (void) new_panel ( 0 ); return 0; }
17359 rm -f "conftest$ac_exeext"
17360 if { (eval echo "$as_me:17360: \"$ac_link\"") >&5
17361 (eval $ac_link) 2>&5
17363 echo "$as_me:17363: \$? = $ac_status" >&5
17364 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17365 { (eval echo "$as_me:17365: \"$ac_try\"") >&5
17366 (eval $ac_try) 2>&5
17368 echo "$as_me:17368: \$? = $ac_status" >&5
17369 (exit "$ac_status"); }; }; then
17370 cf_have_curses_lib=yes
17372 echo "$as_me: program exited with status $ac_status" >&5
17373 echo "$as_me: failed program was:" >&5
17374 cat "conftest.$ac_ext" >&5
17375 cf_have_curses_lib=no
17377 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17380 echo "$as_me: failed program was:" >&5
17381 cat "conftest.$ac_ext" >&5
17382 cf_have_curses_lib=no
17384 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17385 echo "$as_me:17385: result: $cf_have_curses_lib" >&5
17386 echo "${ECHO_T}$cf_have_curses_lib" >&6
17387 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17388 if test "$cf_have_curses_lib" = "yes"
17391 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17393 cat >>confdefs.h <<EOF
17394 #define $cf_upper 1
17398 CFLAGS="$cf_save_CFLAGS"
17399 CPPFLAGS="$cf_save_CPPFLAGS"
17400 LIBS="$cf_save_LIBS"
17404 if test "$cf_have_curses_lib" = no; then
17405 as_ac_Lib=`echo "ac_cv_lib_$PANEL_NAME$cf_cv_libtype''_new_panel" | $as_tr_sh`
17406 echo "$as_me:17406: checking for new_panel in -l$PANEL_NAME$cf_cv_libtype" >&5
17407 echo $ECHO_N "checking for new_panel in -l$PANEL_NAME$cf_cv_libtype... $ECHO_C" >&6
17408 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17409 echo $ECHO_N "(cached) $ECHO_C" >&6
17411 ac_check_lib_save_LIBS=$LIBS
17412 LIBS="-l$PANEL_NAME$cf_cv_libtype $LIBS"
17413 cat >"conftest.$ac_ext" <<_ACEOF
17414 #line 17414 "configure"
17415 #include "confdefs.h"
17417 /* Override any gcc2 internal prototype to avoid an error. */
17421 /* We use char because int might match the return type of a gcc2
17422 builtin and then its argument prototype would still apply. */
17432 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17433 if { (eval echo "$as_me:17433: \"$ac_link\"") >&5
17434 (eval $ac_link) 2>&5
17436 echo "$as_me:17436: \$? = $ac_status" >&5
17437 (exit "$ac_status"); } &&
17438 { ac_try='test -s "conftest$ac_exeext"'
17439 { (eval echo "$as_me:17439: \"$ac_try\"") >&5
17440 (eval $ac_try) 2>&5
17442 echo "$as_me:17442: \$? = $ac_status" >&5
17443 (exit "$ac_status"); }; }; then
17444 eval "$as_ac_Lib=yes"
17446 echo "$as_me: failed program was:" >&5
17447 cat "conftest.$ac_ext" >&5
17448 eval "$as_ac_Lib=no"
17450 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17451 LIBS=$ac_check_lib_save_LIBS
17453 echo "$as_me:17453: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
17454 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
17455 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
17457 cf_upper=`echo "have_lib$PANEL_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17459 cf_add_libs="$LIBS"
17462 for cf_add_1lib in -l$PANEL_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17463 # filter duplicates
17464 for cf_add_1lib in $cf_add_0lib; do
17465 for cf_add_2lib in $cf_add_libs; do
17466 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17471 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17473 LIBS="$cf_add_libs"
17475 cat >>confdefs.h <<EOF
17476 #define $cf_upper 1
17483 cf_curses_headers="$cf_curses_headers panel.h"
17486 echo "$as_me:17486: checking if you want to check for menu functions" >&5
17487 echo $ECHO_N "checking if you want to check for menu functions... $ECHO_C" >&6
17489 # Check whether --enable-menu or --disable-menu was given.
17490 if test "${enable_menu+set}" = set; then
17491 enableval="$enable_menu"
17492 test "$enableval" != no && enableval=yes
17493 if test "$enableval" != "yes" ; then
17496 cf_enable_menu=$cf_default_menu
17500 cf_enable_menu=$cf_default_menu
17503 echo "$as_me:17503: result: $cf_enable_menu" >&5
17504 echo "${ECHO_T}$cf_enable_menu" >&6
17505 if test $cf_enable_menu = yes
17507 case $cf_cv_screen in
17512 echo "$as_me:17512: checking for NetBSD menu.h" >&5
17513 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
17514 if test "${cf_cv_netbsd_menu_h+set}" = set; then
17515 echo $ECHO_N "(cached) $ECHO_C" >&6
17518 cat >"conftest.$ac_ext" <<_ACEOF
17519 #line 17519 "configure"
17520 #include "confdefs.h"
17522 #include <${cf_cv_ncurses_header:-curses.h}>
17530 int y = menu->max_item_width;
17536 rm -f "conftest.$ac_objext"
17537 if { (eval echo "$as_me:17537: \"$ac_compile\"") >&5
17538 (eval $ac_compile) 2>&5
17540 echo "$as_me:17540: \$? = $ac_status" >&5
17541 (exit "$ac_status"); } &&
17542 { ac_try='test -s "conftest.$ac_objext"'
17543 { (eval echo "$as_me:17543: \"$ac_try\"") >&5
17544 (eval $ac_try) 2>&5
17546 echo "$as_me:17546: \$? = $ac_status" >&5
17547 (exit "$ac_status"); }; }; then
17548 cf_cv_netbsd_menu_h=yes
17551 echo "$as_me: failed program was:" >&5
17552 cat "conftest.$ac_ext" >&5
17553 cf_cv_netbsd_menu_h=no
17555 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17558 echo "$as_me:17558: result: $cf_cv_netbsd_menu_h" >&5
17559 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
17561 test "$cf_cv_netbsd_menu_h" = yes &&
17562 cat >>confdefs.h <<\EOF
17563 #define HAVE_NETBSD_MENU_H 1
17569 cf_have_curses_lib=no
17571 : ${NCURSES_CONFIG_PKG:=none}
17572 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
17574 elif test "x${PKG_CONFIG:=none}" != xnone; then
17575 echo "$as_me:17575: checking pkg-config for $MENU_NAME$cf_cv_libtype" >&5
17576 echo $ECHO_N "checking pkg-config for $MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
17577 if "$PKG_CONFIG" --exists "$MENU_NAME$cf_cv_libtype" ; then
17578 echo "$as_me:17578: result: yes" >&5
17579 echo "${ECHO_T}yes" >&6
17581 echo "$as_me:17581: checking if the $MENU_NAME$cf_cv_libtype package files work" >&5
17582 echo $ECHO_N "checking if the $MENU_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
17584 cf_save_CFLAGS="$CFLAGS"
17585 cf_save_CPPFLAGS="$CPPFLAGS"
17586 cf_save_LIBS="$LIBS"
17588 for cf_add_cflags in `$PKG_CONFIG --cflags "$MENU_NAME$cf_cv_libtype"`
17590 case "x$cf_add_cflags" in
17593 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
17596 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
17597 test "$CFLAGS" != "$cf_old_cflag" || break
17599 CFLAGS="$cf_old_cflag"
17602 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
17605 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
17606 test "$CPPFLAGS" != "$cf_old_cflag" || break
17608 CPPFLAGS="$cf_old_cflag"
17617 cf_new_extra_cppflags=
17619 for cf_add_cflags in $cf_add_cflags
17621 case "$cf_fix_cppflags" in
17623 case "$cf_add_cflags" in
17624 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17625 case "$cf_add_cflags" in
17627 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17629 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17630 && test -z "${cf_tst_cflags}" \
17631 && cf_fix_cppflags=yes
17633 if test "$cf_fix_cppflags" = yes ; then
17635 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17636 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17639 elif test "${cf_tst_cflags}" = "\"'" ; then
17641 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17642 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17648 case "$CPPFLAGS" in
17652 case "$cf_add_cflags" in
17654 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17656 CPPFLAGS=`echo "$CPPFLAGS" | \
17657 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
17658 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
17663 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17664 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17671 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17672 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17679 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17680 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17682 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17684 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17685 && test -z "${cf_tst_cflags}" \
17686 && cf_fix_cppflags=no
17691 if test -n "$cf_new_cflags" ; then
17693 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17694 CFLAGS="${CFLAGS}$cf_new_cflags"
17698 if test -n "$cf_new_cppflags" ; then
17700 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17701 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17705 if test -n "$cf_new_extra_cppflags" ; then
17707 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17708 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17714 cf_add_libs="$LIBS"
17717 for cf_add_1lib in `$PKG_CONFIG --libs "$MENU_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17718 # filter duplicates
17719 for cf_add_1lib in $cf_add_0lib; do
17720 for cf_add_2lib in $cf_add_libs; do
17721 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17726 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17728 LIBS="$cf_add_libs"
17730 cat >"conftest.$ac_ext" <<_ACEOF
17731 #line 17731 "configure"
17732 #include "confdefs.h"
17733 #include <$MENU_NAME.h>
17737 (void) menu_driver ( 0,0 );
17742 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17743 if { (eval echo "$as_me:17743: \"$ac_link\"") >&5
17744 (eval $ac_link) 2>&5
17746 echo "$as_me:17746: \$? = $ac_status" >&5
17747 (exit "$ac_status"); } &&
17748 { ac_try='test -s "conftest$ac_exeext"'
17749 { (eval echo "$as_me:17749: \"$ac_try\"") >&5
17750 (eval $ac_try) 2>&5
17752 echo "$as_me:17752: \$? = $ac_status" >&5
17753 (exit "$ac_status"); }; }; then
17754 if test "$cross_compiling" = yes; then
17755 cf_have_curses_lib=maybe
17757 cat >"conftest.$ac_ext" <<_ACEOF
17758 #line 17758 "configure"
17759 #include "confdefs.h"
17760 #include <$MENU_NAME.h>
17762 { (void) menu_driver ( 0,0 ); return 0; }
17764 rm -f "conftest$ac_exeext"
17765 if { (eval echo "$as_me:17765: \"$ac_link\"") >&5
17766 (eval $ac_link) 2>&5
17768 echo "$as_me:17768: \$? = $ac_status" >&5
17769 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
17770 { (eval echo "$as_me:17770: \"$ac_try\"") >&5
17771 (eval $ac_try) 2>&5
17773 echo "$as_me:17773: \$? = $ac_status" >&5
17774 (exit "$ac_status"); }; }; then
17775 cf_have_curses_lib=yes
17777 echo "$as_me: program exited with status $ac_status" >&5
17778 echo "$as_me: failed program was:" >&5
17779 cat "conftest.$ac_ext" >&5
17780 cf_have_curses_lib=no
17782 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
17785 echo "$as_me: failed program was:" >&5
17786 cat "conftest.$ac_ext" >&5
17787 cf_have_curses_lib=no
17789 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17790 echo "$as_me:17790: result: $cf_have_curses_lib" >&5
17791 echo "${ECHO_T}$cf_have_curses_lib" >&6
17792 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
17793 if test "$cf_have_curses_lib" = "yes"
17796 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17798 cat >>confdefs.h <<EOF
17799 #define $cf_upper 1
17803 CFLAGS="$cf_save_CFLAGS"
17804 CPPFLAGS="$cf_save_CPPFLAGS"
17805 LIBS="$cf_save_LIBS"
17809 if test "$cf_have_curses_lib" = no; then
17810 as_ac_Lib=`echo "ac_cv_lib_$MENU_NAME$cf_cv_libtype''_menu_driver" | $as_tr_sh`
17811 echo "$as_me:17811: checking for menu_driver in -l$MENU_NAME$cf_cv_libtype" >&5
17812 echo $ECHO_N "checking for menu_driver in -l$MENU_NAME$cf_cv_libtype... $ECHO_C" >&6
17813 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17814 echo $ECHO_N "(cached) $ECHO_C" >&6
17816 ac_check_lib_save_LIBS=$LIBS
17817 LIBS="-l$MENU_NAME$cf_cv_libtype $LIBS"
17818 cat >"conftest.$ac_ext" <<_ACEOF
17819 #line 17819 "configure"
17820 #include "confdefs.h"
17822 /* Override any gcc2 internal prototype to avoid an error. */
17826 /* We use char because int might match the return type of a gcc2
17827 builtin and then its argument prototype would still apply. */
17828 char menu_driver ();
17837 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17838 if { (eval echo "$as_me:17838: \"$ac_link\"") >&5
17839 (eval $ac_link) 2>&5
17841 echo "$as_me:17841: \$? = $ac_status" >&5
17842 (exit "$ac_status"); } &&
17843 { ac_try='test -s "conftest$ac_exeext"'
17844 { (eval echo "$as_me:17844: \"$ac_try\"") >&5
17845 (eval $ac_try) 2>&5
17847 echo "$as_me:17847: \$? = $ac_status" >&5
17848 (exit "$ac_status"); }; }; then
17849 eval "$as_ac_Lib=yes"
17851 echo "$as_me: failed program was:" >&5
17852 cat "conftest.$ac_ext" >&5
17853 eval "$as_ac_Lib=no"
17855 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17856 LIBS=$ac_check_lib_save_LIBS
17858 echo "$as_me:17858: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
17859 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
17860 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
17862 cf_upper=`echo "have_lib$MENU_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17864 cf_add_libs="$LIBS"
17867 for cf_add_1lib in -l$MENU_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17868 # filter duplicates
17869 for cf_add_1lib in $cf_add_0lib; do
17870 for cf_add_2lib in $cf_add_libs; do
17871 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17876 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17878 LIBS="$cf_add_libs"
17880 cat >>confdefs.h <<EOF
17881 #define $cf_upper 1
17888 cf_curses_headers="$cf_curses_headers menu.h"
17891 echo "$as_me:17891: checking if you want to check for form functions" >&5
17892 echo $ECHO_N "checking if you want to check for form functions... $ECHO_C" >&6
17894 # Check whether --enable-form or --disable-form was given.
17895 if test "${enable_form+set}" = set; then
17896 enableval="$enable_form"
17897 test "$enableval" != no && enableval=yes
17898 if test "$enableval" != "yes" ; then
17901 cf_enable_form=$cf_default_form
17905 cf_enable_form=$cf_default_form
17908 echo "$as_me:17908: result: $cf_enable_form" >&5
17909 echo "${ECHO_T}$cf_enable_form" >&6
17910 if test $cf_enable_form = yes
17912 case $cf_cv_screen in
17917 echo "$as_me:17917: checking for NetBSD form.h" >&5
17918 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
17919 if test "${cf_cv_netbsd_form_h+set}" = set; then
17920 echo $ECHO_N "(cached) $ECHO_C" >&6
17923 cat >"conftest.$ac_ext" <<_ACEOF
17924 #line 17924 "configure"
17925 #include "confdefs.h"
17927 #include <${cf_cv_ncurses_header:-curses.h}>
17935 int y = current_field(form)->cursor_ypos;
17936 int x = current_field(form)->cursor_xpos;
17942 rm -f "conftest.$ac_objext"
17943 if { (eval echo "$as_me:17943: \"$ac_compile\"") >&5
17944 (eval $ac_compile) 2>&5
17946 echo "$as_me:17946: \$? = $ac_status" >&5
17947 (exit "$ac_status"); } &&
17948 { ac_try='test -s "conftest.$ac_objext"'
17949 { (eval echo "$as_me:17949: \"$ac_try\"") >&5
17950 (eval $ac_try) 2>&5
17952 echo "$as_me:17952: \$? = $ac_status" >&5
17953 (exit "$ac_status"); }; }; then
17954 cf_cv_netbsd_form_h=yes
17957 echo "$as_me: failed program was:" >&5
17958 cat "conftest.$ac_ext" >&5
17959 cf_cv_netbsd_form_h=no
17961 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17964 echo "$as_me:17964: result: $cf_cv_netbsd_form_h" >&5
17965 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
17967 test "$cf_cv_netbsd_form_h" = yes &&
17968 cat >>confdefs.h <<\EOF
17969 #define HAVE_NETBSD_FORM_H 1
17975 cf_have_curses_lib=no
17977 : ${NCURSES_CONFIG_PKG:=none}
17978 if test "x${NCURSES_CONFIG_PKG}" = xnone; then
17980 elif test "x${PKG_CONFIG:=none}" != xnone; then
17981 echo "$as_me:17981: checking pkg-config for $FORM_NAME$cf_cv_libtype" >&5
17982 echo $ECHO_N "checking pkg-config for $FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
17983 if "$PKG_CONFIG" --exists "$FORM_NAME$cf_cv_libtype" ; then
17984 echo "$as_me:17984: result: yes" >&5
17985 echo "${ECHO_T}yes" >&6
17987 echo "$as_me:17987: checking if the $FORM_NAME$cf_cv_libtype package files work" >&5
17988 echo $ECHO_N "checking if the $FORM_NAME$cf_cv_libtype package files work... $ECHO_C" >&6
17990 cf_save_CFLAGS="$CFLAGS"
17991 cf_save_CPPFLAGS="$CPPFLAGS"
17992 cf_save_LIBS="$LIBS"
17994 for cf_add_cflags in `$PKG_CONFIG --cflags "$FORM_NAME$cf_cv_libtype"`
17996 case "x$cf_add_cflags" in
17999 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
18002 cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
18003 test "$CFLAGS" != "$cf_old_cflag" || break
18005 CFLAGS="$cf_old_cflag"
18008 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
18011 cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ ][ ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ ][^ ]*\\)\?%%" -e 's/^[ ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
18012 test "$CPPFLAGS" != "$cf_old_cflag" || break
18014 CPPFLAGS="$cf_old_cflag"
18023 cf_new_extra_cppflags=
18025 for cf_add_cflags in $cf_add_cflags
18027 case "$cf_fix_cppflags" in
18029 case "$cf_add_cflags" in
18030 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18031 case "$cf_add_cflags" in
18033 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18035 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18036 && test -z "${cf_tst_cflags}" \
18037 && cf_fix_cppflags=yes
18039 if test "$cf_fix_cppflags" = yes ; then
18041 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18042 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18045 elif test "${cf_tst_cflags}" = "\"'" ; then
18047 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18048 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18054 case "$CPPFLAGS" in
18058 case "$cf_add_cflags" in
18060 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18062 CPPFLAGS=`echo "$CPPFLAGS" | \
18063 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
18064 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
18069 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18070 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18077 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18078 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18085 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18086 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18088 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18090 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18091 && test -z "${cf_tst_cflags}" \
18092 && cf_fix_cppflags=no
18097 if test -n "$cf_new_cflags" ; then
18099 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18100 CFLAGS="${CFLAGS}$cf_new_cflags"
18104 if test -n "$cf_new_cppflags" ; then
18106 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18107 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18111 if test -n "$cf_new_extra_cppflags" ; then
18113 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18114 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18120 cf_add_libs="$LIBS"
18123 for cf_add_1lib in `$PKG_CONFIG --libs "$FORM_NAME$cf_cv_libtype"`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18124 # filter duplicates
18125 for cf_add_1lib in $cf_add_0lib; do
18126 for cf_add_2lib in $cf_add_libs; do
18127 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18132 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18134 LIBS="$cf_add_libs"
18136 cat >"conftest.$ac_ext" <<_ACEOF
18137 #line 18137 "configure"
18138 #include "confdefs.h"
18139 #include <$FORM_NAME.h>
18143 (void) form_driver ( 0,0 );
18148 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18149 if { (eval echo "$as_me:18149: \"$ac_link\"") >&5
18150 (eval $ac_link) 2>&5
18152 echo "$as_me:18152: \$? = $ac_status" >&5
18153 (exit "$ac_status"); } &&
18154 { ac_try='test -s "conftest$ac_exeext"'
18155 { (eval echo "$as_me:18155: \"$ac_try\"") >&5
18156 (eval $ac_try) 2>&5
18158 echo "$as_me:18158: \$? = $ac_status" >&5
18159 (exit "$ac_status"); }; }; then
18160 if test "$cross_compiling" = yes; then
18161 cf_have_curses_lib=maybe
18163 cat >"conftest.$ac_ext" <<_ACEOF
18164 #line 18164 "configure"
18165 #include "confdefs.h"
18166 #include <$FORM_NAME.h>
18168 { (void) form_driver ( 0,0 ); return 0; }
18170 rm -f "conftest$ac_exeext"
18171 if { (eval echo "$as_me:18171: \"$ac_link\"") >&5
18172 (eval $ac_link) 2>&5
18174 echo "$as_me:18174: \$? = $ac_status" >&5
18175 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
18176 { (eval echo "$as_me:18176: \"$ac_try\"") >&5
18177 (eval $ac_try) 2>&5
18179 echo "$as_me:18179: \$? = $ac_status" >&5
18180 (exit "$ac_status"); }; }; then
18181 cf_have_curses_lib=yes
18183 echo "$as_me: program exited with status $ac_status" >&5
18184 echo "$as_me: failed program was:" >&5
18185 cat "conftest.$ac_ext" >&5
18186 cf_have_curses_lib=no
18188 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
18191 echo "$as_me: failed program was:" >&5
18192 cat "conftest.$ac_ext" >&5
18193 cf_have_curses_lib=no
18195 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18196 echo "$as_me:18196: result: $cf_have_curses_lib" >&5
18197 echo "${ECHO_T}$cf_have_curses_lib" >&6
18198 test "$cf_have_curses_lib" = maybe && cf_have_curses_lib=yes
18199 if test "$cf_have_curses_lib" = "yes"
18202 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18204 cat >>confdefs.h <<EOF
18205 #define $cf_upper 1
18209 CFLAGS="$cf_save_CFLAGS"
18210 CPPFLAGS="$cf_save_CPPFLAGS"
18211 LIBS="$cf_save_LIBS"
18215 if test "$cf_have_curses_lib" = no; then
18216 as_ac_Lib=`echo "ac_cv_lib_$FORM_NAME$cf_cv_libtype''_form_driver" | $as_tr_sh`
18217 echo "$as_me:18217: checking for form_driver in -l$FORM_NAME$cf_cv_libtype" >&5
18218 echo $ECHO_N "checking for form_driver in -l$FORM_NAME$cf_cv_libtype... $ECHO_C" >&6
18219 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
18220 echo $ECHO_N "(cached) $ECHO_C" >&6
18222 ac_check_lib_save_LIBS=$LIBS
18223 LIBS="-l$FORM_NAME$cf_cv_libtype $LIBS"
18224 cat >"conftest.$ac_ext" <<_ACEOF
18225 #line 18225 "configure"
18226 #include "confdefs.h"
18228 /* Override any gcc2 internal prototype to avoid an error. */
18232 /* We use char because int might match the return type of a gcc2
18233 builtin and then its argument prototype would still apply. */
18234 char form_driver ();
18243 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18244 if { (eval echo "$as_me:18244: \"$ac_link\"") >&5
18245 (eval $ac_link) 2>&5
18247 echo "$as_me:18247: \$? = $ac_status" >&5
18248 (exit "$ac_status"); } &&
18249 { ac_try='test -s "conftest$ac_exeext"'
18250 { (eval echo "$as_me:18250: \"$ac_try\"") >&5
18251 (eval $ac_try) 2>&5
18253 echo "$as_me:18253: \$? = $ac_status" >&5
18254 (exit "$ac_status"); }; }; then
18255 eval "$as_ac_Lib=yes"
18257 echo "$as_me: failed program was:" >&5
18258 cat "conftest.$ac_ext" >&5
18259 eval "$as_ac_Lib=no"
18261 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18262 LIBS=$ac_check_lib_save_LIBS
18264 echo "$as_me:18264: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
18265 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
18266 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
18268 cf_upper=`echo "have_lib$FORM_NAME" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18270 cf_add_libs="$LIBS"
18273 for cf_add_1lib in -l$FORM_NAME$cf_cv_libtype; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18274 # filter duplicates
18275 for cf_add_1lib in $cf_add_0lib; do
18276 for cf_add_2lib in $cf_add_libs; do
18277 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18282 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18284 LIBS="$cf_add_libs"
18286 cat >>confdefs.h <<EOF
18287 #define $cf_upper 1
18294 cf_curses_headers="$cf_curses_headers form.h"
18297 # look for curses-related headers
18299 for ac_header in $cf_curses_headers
18301 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18302 echo "$as_me:18302: checking for $ac_header" >&5
18303 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18304 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18305 echo $ECHO_N "(cached) $ECHO_C" >&6
18307 cat >"conftest.$ac_ext" <<_ACEOF
18308 #line 18308 "configure"
18309 #include "confdefs.h"
18310 #include <$ac_header>
18312 if { (eval echo "$as_me:18312: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18313 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18315 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18317 cat conftest.err >&5
18318 echo "$as_me:18318: \$? = $ac_status" >&5
18319 (exit "$ac_status"); } >/dev/null; then
18320 if test -s conftest.err; then
18321 ac_cpp_err=$ac_c_preproc_warn_flag
18328 if test -z "$ac_cpp_err"; then
18329 eval "$as_ac_Header=yes"
18331 echo "$as_me: failed program was:" >&5
18332 cat "conftest.$ac_ext" >&5
18333 eval "$as_ac_Header=no"
18335 rm -f conftest.err "conftest.$ac_ext"
18337 echo "$as_me:18337: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18338 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18339 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18340 cat >>confdefs.h <<EOF
18341 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18347 echo "$as_me:18347: checking whether time.h and sys/time.h may both be included" >&5
18348 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
18349 if test "${ac_cv_header_time+set}" = set; then
18350 echo $ECHO_N "(cached) $ECHO_C" >&6
18352 cat >"conftest.$ac_ext" <<_ACEOF
18353 #line 18353 "configure"
18354 #include "confdefs.h"
18355 #include <sys/types.h>
18356 #include <sys/time.h>
18362 if ((struct tm *) 0)
18368 rm -f "conftest.$ac_objext"
18369 if { (eval echo "$as_me:18369: \"$ac_compile\"") >&5
18370 (eval $ac_compile) 2>&5
18372 echo "$as_me:18372: \$? = $ac_status" >&5
18373 (exit "$ac_status"); } &&
18374 { ac_try='test -s "conftest.$ac_objext"'
18375 { (eval echo "$as_me:18375: \"$ac_try\"") >&5
18376 (eval $ac_try) 2>&5
18378 echo "$as_me:18378: \$? = $ac_status" >&5
18379 (exit "$ac_status"); }; }; then
18380 ac_cv_header_time=yes
18382 echo "$as_me: failed program was:" >&5
18383 cat "conftest.$ac_ext" >&5
18384 ac_cv_header_time=no
18386 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18388 echo "$as_me:18388: result: $ac_cv_header_time" >&5
18389 echo "${ECHO_T}$ac_cv_header_time" >&6
18390 if test $ac_cv_header_time = yes; then
18392 cat >>confdefs.h <<\EOF
18393 #define TIME_WITH_SYS_TIME 1
18410 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18411 echo "$as_me:18411: checking for $ac_header" >&5
18412 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18413 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18414 echo $ECHO_N "(cached) $ECHO_C" >&6
18416 cat >"conftest.$ac_ext" <<_ACEOF
18417 #line 18417 "configure"
18418 #include "confdefs.h"
18419 #include <$ac_header>
18421 if { (eval echo "$as_me:18421: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18422 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18424 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18426 cat conftest.err >&5
18427 echo "$as_me:18427: \$? = $ac_status" >&5
18428 (exit "$ac_status"); } >/dev/null; then
18429 if test -s conftest.err; then
18430 ac_cpp_err=$ac_c_preproc_warn_flag
18437 if test -z "$ac_cpp_err"; then
18438 eval "$as_ac_Header=yes"
18440 echo "$as_me: failed program was:" >&5
18441 cat "conftest.$ac_ext" >&5
18442 eval "$as_ac_Header=no"
18444 rm -f conftest.err "conftest.$ac_ext"
18446 echo "$as_me:18446: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18447 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18448 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18449 cat >>confdefs.h <<EOF
18450 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18456 for ac_header in unistd.h getopt.h
18458 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18459 echo "$as_me:18459: checking for $ac_header" >&5
18460 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18461 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18462 echo $ECHO_N "(cached) $ECHO_C" >&6
18464 cat >"conftest.$ac_ext" <<_ACEOF
18465 #line 18465 "configure"
18466 #include "confdefs.h"
18467 #include <$ac_header>
18469 if { (eval echo "$as_me:18469: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18470 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18472 $EGREP -v '^ *\+' conftest.er1 >conftest.err
18474 cat conftest.err >&5
18475 echo "$as_me:18475: \$? = $ac_status" >&5
18476 (exit "$ac_status"); } >/dev/null; then
18477 if test -s conftest.err; then
18478 ac_cpp_err=$ac_c_preproc_warn_flag
18485 if test -z "$ac_cpp_err"; then
18486 eval "$as_ac_Header=yes"
18488 echo "$as_me: failed program was:" >&5
18489 cat "conftest.$ac_ext" >&5
18490 eval "$as_ac_Header=no"
18492 rm -f conftest.err "conftest.$ac_ext"
18494 echo "$as_me:18494: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18495 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18496 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18497 cat >>confdefs.h <<EOF
18498 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18504 echo "$as_me:18504: checking for header declaring getopt variables" >&5
18505 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
18506 if test "${cf_cv_getopt_header+set}" = set; then
18507 echo $ECHO_N "(cached) $ECHO_C" >&6
18510 cf_cv_getopt_header=none
18511 for cf_header in stdio.h stdlib.h unistd.h getopt.h
18513 cat >"conftest.$ac_ext" <<_ACEOF
18514 #line 18514 "configure"
18515 #include "confdefs.h"
18517 #include <$cf_header>
18521 int x = optind; char *y = optarg; (void)x; (void)y
18526 rm -f "conftest.$ac_objext"
18527 if { (eval echo "$as_me:18527: \"$ac_compile\"") >&5
18528 (eval $ac_compile) 2>&5
18530 echo "$as_me:18530: \$? = $ac_status" >&5
18531 (exit "$ac_status"); } &&
18532 { ac_try='test -s "conftest.$ac_objext"'
18533 { (eval echo "$as_me:18533: \"$ac_try\"") >&5
18534 (eval $ac_try) 2>&5
18536 echo "$as_me:18536: \$? = $ac_status" >&5
18537 (exit "$ac_status"); }; }; then
18538 cf_cv_getopt_header=$cf_header
18541 echo "$as_me: failed program was:" >&5
18542 cat "conftest.$ac_ext" >&5
18544 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18548 echo "$as_me:18548: result: $cf_cv_getopt_header" >&5
18549 echo "${ECHO_T}$cf_cv_getopt_header" >&6
18550 if test "$cf_cv_getopt_header" != none ; then
18552 cat >>confdefs.h <<\EOF
18553 #define HAVE_GETOPT_HEADER 1
18557 if test "$cf_cv_getopt_header" = getopt.h ; then
18559 cat >>confdefs.h <<\EOF
18560 #define NEED_GETOPT_H 1
18565 echo "$as_me:18565: checking for clock_gettime" >&5
18566 echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
18567 if test "${cf_cv_func_clock_gettime+set}" = set; then
18568 echo $ECHO_N "(cached) $ECHO_C" >&6
18571 cat >"conftest.$ac_ext" <<_ACEOF
18572 #line 18572 "configure"
18573 #include "confdefs.h"
18578 struct timespec ts;
18579 int rc = clock_gettime(CLOCK_REALTIME, &ts); (void) rc; (void)ts
18584 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18585 if { (eval echo "$as_me:18585: \"$ac_link\"") >&5
18586 (eval $ac_link) 2>&5
18588 echo "$as_me:18588: \$? = $ac_status" >&5
18589 (exit "$ac_status"); } &&
18590 { ac_try='test -s "conftest$ac_exeext"'
18591 { (eval echo "$as_me:18591: \"$ac_try\"") >&5
18592 (eval $ac_try) 2>&5
18594 echo "$as_me:18594: \$? = $ac_status" >&5
18595 (exit "$ac_status"); }; }; then
18596 cf_cv_func_clock_gettime=yes
18598 echo "$as_me: failed program was:" >&5
18599 cat "conftest.$ac_ext" >&5
18600 cf_cv_func_clock_gettime=no
18602 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18605 echo "$as_me:18605: result: $cf_cv_func_clock_gettime" >&5
18606 echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6
18608 if test "$cf_cv_func_clock_gettime" = yes
18611 cat >>confdefs.h <<\EOF
18612 #define HAVE_CLOCK_GETTIME 1
18616 echo "$as_me:18616: checking for gettimeofday" >&5
18617 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18618 if test "${ac_cv_func_gettimeofday+set}" = set; then
18619 echo $ECHO_N "(cached) $ECHO_C" >&6
18621 cat >"conftest.$ac_ext" <<_ACEOF
18622 #line 18622 "configure"
18623 #include "confdefs.h"
18624 #define gettimeofday autoconf_temporary
18625 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18626 #undef gettimeofday
18632 /* We use char because int might match the return type of a gcc2
18633 builtin and then its argument prototype would still apply. */
18634 char gettimeofday (void);
18640 /* The GNU C library defines stubs for functions which it implements
18641 to always fail with ENOSYS. Some functions are actually named
18642 something starting with __ and the normal name is an alias. */
18643 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18644 #error found stub for gettimeofday
18647 return gettimeofday ();
18652 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18653 if { (eval echo "$as_me:18653: \"$ac_link\"") >&5
18654 (eval $ac_link) 2>&5
18656 echo "$as_me:18656: \$? = $ac_status" >&5
18657 (exit "$ac_status"); } &&
18658 { ac_try='test -s "conftest$ac_exeext"'
18659 { (eval echo "$as_me:18659: \"$ac_try\"") >&5
18660 (eval $ac_try) 2>&5
18662 echo "$as_me:18662: \$? = $ac_status" >&5
18663 (exit "$ac_status"); }; }; then
18664 ac_cv_func_gettimeofday=yes
18666 echo "$as_me: failed program was:" >&5
18667 cat "conftest.$ac_ext" >&5
18668 ac_cv_func_gettimeofday=no
18670 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18672 echo "$as_me:18672: result: $ac_cv_func_gettimeofday" >&5
18673 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18674 if test "$ac_cv_func_gettimeofday" = yes; then
18676 cat >>confdefs.h <<\EOF
18677 #define HAVE_GETTIMEOFDAY 1
18682 echo "$as_me:18682: checking for gettimeofday in -lbsd" >&5
18683 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18684 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18685 echo $ECHO_N "(cached) $ECHO_C" >&6
18687 ac_check_lib_save_LIBS=$LIBS
18689 cat >"conftest.$ac_ext" <<_ACEOF
18690 #line 18690 "configure"
18691 #include "confdefs.h"
18693 /* Override any gcc2 internal prototype to avoid an error. */
18697 /* We use char because int might match the return type of a gcc2
18698 builtin and then its argument prototype would still apply. */
18699 char gettimeofday ();
18708 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18709 if { (eval echo "$as_me:18709: \"$ac_link\"") >&5
18710 (eval $ac_link) 2>&5
18712 echo "$as_me:18712: \$? = $ac_status" >&5
18713 (exit "$ac_status"); } &&
18714 { ac_try='test -s "conftest$ac_exeext"'
18715 { (eval echo "$as_me:18715: \"$ac_try\"") >&5
18716 (eval $ac_try) 2>&5
18718 echo "$as_me:18718: \$? = $ac_status" >&5
18719 (exit "$ac_status"); }; }; then
18720 ac_cv_lib_bsd_gettimeofday=yes
18722 echo "$as_me: failed program was:" >&5
18723 cat "conftest.$ac_ext" >&5
18724 ac_cv_lib_bsd_gettimeofday=no
18726 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18727 LIBS=$ac_check_lib_save_LIBS
18729 echo "$as_me:18729: result: $ac_cv_lib_bsd_gettimeofday" >&5
18730 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18731 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18733 cat >>confdefs.h <<\EOF
18734 #define HAVE_GETTIMEOFDAY 1
18737 cf_add_libs="$LIBS"
18740 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18741 # filter duplicates
18742 for cf_add_1lib in $cf_add_0lib; do
18743 for cf_add_2lib in $cf_add_libs; do
18744 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18749 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18751 LIBS="$cf_add_libs"
18767 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18768 echo "$as_me:18768: checking for $ac_func" >&5
18769 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18770 if eval "test \"\${$as_ac_var+set}\" = set"; then
18771 echo $ECHO_N "(cached) $ECHO_C" >&6
18773 cat >"conftest.$ac_ext" <<_ACEOF
18774 #line 18774 "configure"
18775 #include "confdefs.h"
18776 #define $ac_func autoconf_temporary
18777 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18784 /* We use char because int might match the return type of a gcc2
18785 builtin and then its argument prototype would still apply. */
18786 char $ac_func (void);
18792 /* The GNU C library defines stubs for functions which it implements
18793 to always fail with ENOSYS. Some functions are actually named
18794 something starting with __ and the normal name is an alias. */
18795 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18796 #error found stub for $ac_func
18799 return $ac_func ();
18804 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18805 if { (eval echo "$as_me:18805: \"$ac_link\"") >&5
18806 (eval $ac_link) 2>&5
18808 echo "$as_me:18808: \$? = $ac_status" >&5
18809 (exit "$ac_status"); } &&
18810 { ac_try='test -s "conftest$ac_exeext"'
18811 { (eval echo "$as_me:18811: \"$ac_try\"") >&5
18812 (eval $ac_try) 2>&5
18814 echo "$as_me:18814: \$? = $ac_status" >&5
18815 (exit "$ac_status"); }; }; then
18816 eval "$as_ac_var=yes"
18818 echo "$as_me: failed program was:" >&5
18819 cat "conftest.$ac_ext" >&5
18820 eval "$as_ac_var=no"
18822 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18824 echo "$as_me:18824: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18825 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18826 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18827 cat >>confdefs.h <<EOF
18828 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18834 # use a compile-check to work with ncurses*-config and subdirectory includes
18835 echo "$as_me:18835: checking if we can use termcap.h" >&5
18836 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
18837 if test "${cf_cv_have_termcap_h+set}" = set; then
18838 echo $ECHO_N "(cached) $ECHO_C" >&6
18841 cat >"conftest.$ac_ext" <<_ACEOF
18842 #line 18842 "configure"
18843 #include "confdefs.h"
18845 #include <curses.h>
18846 #ifdef NCURSES_VERSION
18847 #undef NCURSES_VERSION
18849 #include <termcap.h>
18850 #ifndef NCURSES_VERSION
18851 #error wrong header
18862 rm -f "conftest.$ac_objext"
18863 if { (eval echo "$as_me:18863: \"$ac_compile\"") >&5
18864 (eval $ac_compile) 2>&5
18866 echo "$as_me:18866: \$? = $ac_status" >&5
18867 (exit "$ac_status"); } &&
18868 { ac_try='test -s "conftest.$ac_objext"'
18869 { (eval echo "$as_me:18869: \"$ac_try\"") >&5
18870 (eval $ac_try) 2>&5
18872 echo "$as_me:18872: \$? = $ac_status" >&5
18873 (exit "$ac_status"); }; }; then
18874 cf_cv_have_termcap_h=yes
18876 echo "$as_me: failed program was:" >&5
18877 cat "conftest.$ac_ext" >&5
18878 cf_cv_have_termcap_h=no
18880 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18882 echo "$as_me:18882: result: $cf_cv_have_termcap_h" >&5
18883 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
18884 if test "x$cf_cv_have_termcap_h" = xyes
18887 cat >>confdefs.h <<\EOF
18888 #define HAVE_TERMCAP_H 1
18892 echo "$as_me:18892: checking if we can use ncurses/termcap.h" >&5
18893 echo $ECHO_N "checking if we can use ncurses/termcap.h... $ECHO_C" >&6
18894 if test "${cf_cv_have_ncurses_termcap_h+set}" = set; then
18895 echo $ECHO_N "(cached) $ECHO_C" >&6
18898 cat >"conftest.$ac_ext" <<_ACEOF
18899 #line 18899 "configure"
18900 #include "confdefs.h"
18902 #include <ncurses/curses.h>
18903 #ifdef NCURSES_VERSION
18904 #undef NCURSES_VERSION
18906 #include <ncurses/termcap.h>
18907 #ifndef NCURSES_VERSION
18908 #error wrong header
18919 rm -f "conftest.$ac_objext"
18920 if { (eval echo "$as_me:18920: \"$ac_compile\"") >&5
18921 (eval $ac_compile) 2>&5
18923 echo "$as_me:18923: \$? = $ac_status" >&5
18924 (exit "$ac_status"); } &&
18925 { ac_try='test -s "conftest.$ac_objext"'
18926 { (eval echo "$as_me:18926: \"$ac_try\"") >&5
18927 (eval $ac_try) 2>&5
18929 echo "$as_me:18929: \$? = $ac_status" >&5
18930 (exit "$ac_status"); }; }; then
18931 cf_cv_have_ncurses_termcap_h=yes
18933 echo "$as_me: failed program was:" >&5
18934 cat "conftest.$ac_ext" >&5
18935 cf_cv_have_ncurses_termcap_h=no
18937 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18939 echo "$as_me:18939: result: $cf_cv_have_ncurses_termcap_h" >&5
18940 echo "${ECHO_T}$cf_cv_have_ncurses_termcap_h" >&6
18941 test "x$cf_cv_have_ncurses_termcap_h" = xyes &&
18942 cat >>confdefs.h <<\EOF
18943 #define HAVE_NCURSES_TERMCAP_H 1
18948 if test "x$ac_cv_func_getopt" = xno; then
18949 { { echo "$as_me:18949: error: getopt is required for building programs" >&5
18950 echo "$as_me: error: getopt is required for building programs" >&2;}
18951 { (exit 1); exit 1; }; }
18954 if test "$cf_enable_widec" = yes; then
18967 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18968 echo "$as_me:18968: checking for $ac_func" >&5
18969 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18970 if eval "test \"\${$as_ac_var+set}\" = set"; then
18971 echo $ECHO_N "(cached) $ECHO_C" >&6
18973 cat >"conftest.$ac_ext" <<_ACEOF
18974 #line 18974 "configure"
18975 #include "confdefs.h"
18976 #define $ac_func autoconf_temporary
18977 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18984 /* We use char because int might match the return type of a gcc2
18985 builtin and then its argument prototype would still apply. */
18986 char $ac_func (void);
18992 /* The GNU C library defines stubs for functions which it implements
18993 to always fail with ENOSYS. Some functions are actually named
18994 something starting with __ and the normal name is an alias. */
18995 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18996 #error found stub for $ac_func
18999 return $ac_func ();
19004 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19005 if { (eval echo "$as_me:19005: \"$ac_link\"") >&5
19006 (eval $ac_link) 2>&5
19008 echo "$as_me:19008: \$? = $ac_status" >&5
19009 (exit "$ac_status"); } &&
19010 { ac_try='test -s "conftest$ac_exeext"'
19011 { (eval echo "$as_me:19011: \"$ac_try\"") >&5
19012 (eval $ac_try) 2>&5
19014 echo "$as_me:19014: \$? = $ac_status" >&5
19015 (exit "$ac_status"); }; }; then
19016 eval "$as_ac_var=yes"
19018 echo "$as_me: failed program was:" >&5
19019 cat "conftest.$ac_ext" >&5
19020 eval "$as_ac_var=no"
19022 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19024 echo "$as_me:19024: result: `eval echo '${'"$as_ac_var"'}'`" >&5
19025 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
19026 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
19027 cat >>confdefs.h <<EOF
19028 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19036 echo "$as_me:19036: checking definition to turn on extended curses functions" >&5
19037 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
19038 if test "${cf_cv_need_xopen_extension+set}" = set; then
19039 echo $ECHO_N "(cached) $ECHO_C" >&6
19042 cf_cv_need_xopen_extension=unknown
19043 cat >"conftest.$ac_ext" <<_ACEOF
19044 #line 19044 "configure"
19045 #include "confdefs.h"
19047 $ac_includes_default
19048 #include <${cf_cv_ncurses_header:-curses.h}>
19053 #if defined(NCURSES_VERSION_PATCH)
19054 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
19058 #ifdef NCURSES_WIDECHAR
19059 make an error /* prefer to fall-through on the second checks */
19062 int check2 = curs_set((int)sizeof(check));
19063 long x = winnstr(stdscr, "", 0);
19066 getbegyx(stdscr, y1, x1);
19075 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19076 if { (eval echo "$as_me:19076: \"$ac_link\"") >&5
19077 (eval $ac_link) 2>&5
19079 echo "$as_me:19079: \$? = $ac_status" >&5
19080 (exit "$ac_status"); } &&
19081 { ac_try='test -s "conftest$ac_exeext"'
19082 { (eval echo "$as_me:19082: \"$ac_try\"") >&5
19083 (eval $ac_try) 2>&5
19085 echo "$as_me:19085: \$? = $ac_status" >&5
19086 (exit "$ac_status"); }; }; then
19087 cf_cv_need_xopen_extension=none
19089 echo "$as_me: failed program was:" >&5
19090 cat "conftest.$ac_ext" >&5
19092 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
19094 cat >"conftest.$ac_ext" <<_ACEOF
19095 #line 19095 "configure"
19096 #include "confdefs.h"
19098 #define $cf_try_xopen_extension 1
19099 $ac_includes_default
19100 #include <${cf_cv_ncurses_header:-curses.h}>
19106 int check2 = curs_set((int)sizeof(check));
19107 long x = winnstr(stdscr, "", 0);
19109 getbegyx(stdscr, y1, x1);
19119 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19120 if { (eval echo "$as_me:19120: \"$ac_link\"") >&5
19121 (eval $ac_link) 2>&5
19123 echo "$as_me:19123: \$? = $ac_status" >&5
19124 (exit "$ac_status"); } &&
19125 { ac_try='test -s "conftest$ac_exeext"'
19126 { (eval echo "$as_me:19126: \"$ac_try\"") >&5
19127 (eval $ac_try) 2>&5
19129 echo "$as_me:19129: \$? = $ac_status" >&5
19130 (exit "$ac_status"); }; }; then
19131 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
19133 echo "$as_me: failed program was:" >&5
19134 cat "conftest.$ac_ext" >&5
19136 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19140 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19143 echo "$as_me:19143: result: $cf_cv_need_xopen_extension" >&5
19144 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
19146 case "$cf_cv_need_xopen_extension" in
19149 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19150 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
19155 echo "$as_me:19155: checking for term.h" >&5
19156 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
19157 if test "${cf_cv_term_header+set}" = set; then
19158 echo $ECHO_N "(cached) $ECHO_C" >&6
19161 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
19162 # for <term.h> if we do not find the variant.
19164 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
19166 case "${cf_cv_ncurses_header:-curses.h}" in
19168 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
19169 cf_header_list="$cf_header_item $cf_header_list"
19173 for cf_header in $cf_header_list
19175 cat >"conftest.$ac_ext" <<_ACEOF
19176 #line 19176 "configure"
19177 #include "confdefs.h"
19179 #include <${cf_cv_ncurses_header:-curses.h}>
19180 #include <${cf_header}>
19189 rm -f "conftest.$ac_objext"
19190 if { (eval echo "$as_me:19190: \"$ac_compile\"") >&5
19191 (eval $ac_compile) 2>&5
19193 echo "$as_me:19193: \$? = $ac_status" >&5
19194 (exit "$ac_status"); } &&
19195 { ac_try='test -s "conftest.$ac_objext"'
19196 { (eval echo "$as_me:19196: \"$ac_try\"") >&5
19197 (eval $ac_try) 2>&5
19199 echo "$as_me:19199: \$? = $ac_status" >&5
19200 (exit "$ac_status"); }; }; then
19201 cf_cv_term_header=$cf_header
19204 echo "$as_me: failed program was:" >&5
19205 cat "conftest.$ac_ext" >&5
19206 cf_cv_term_header=no
19208 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19211 case "$cf_cv_term_header" in
19213 # If curses is ncurses, some packagers still mess it up by trying to make
19214 # us use GNU termcap. This handles the most common case.
19215 for cf_header in ncurses/term.h ncursesw/term.h
19217 cat >"conftest.$ac_ext" <<_ACEOF
19218 #line 19218 "configure"
19219 #include "confdefs.h"
19221 #include <${cf_cv_ncurses_header:-curses.h}>
19222 #ifdef NCURSES_VERSION
19223 #include <${cf_header}>
19235 rm -f "conftest.$ac_objext"
19236 if { (eval echo "$as_me:19236: \"$ac_compile\"") >&5
19237 (eval $ac_compile) 2>&5
19239 echo "$as_me:19239: \$? = $ac_status" >&5
19240 (exit "$ac_status"); } &&
19241 { ac_try='test -s "conftest.$ac_objext"'
19242 { (eval echo "$as_me:19242: \"$ac_try\"") >&5
19243 (eval $ac_try) 2>&5
19245 echo "$as_me:19245: \$? = $ac_status" >&5
19246 (exit "$ac_status"); }; }; then
19247 cf_cv_term_header=$cf_header
19250 echo "$as_me: failed program was:" >&5
19251 cat "conftest.$ac_ext" >&5
19252 cf_cv_term_header=no
19254 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19260 echo "$as_me:19260: result: $cf_cv_term_header" >&5
19261 echo "${ECHO_T}$cf_cv_term_header" >&6
19263 case "$cf_cv_term_header" in
19266 cat >>confdefs.h <<\EOF
19267 #define HAVE_TERM_H 1
19273 cat >>confdefs.h <<\EOF
19274 #define HAVE_NCURSES_TERM_H 1
19280 cat >>confdefs.h <<\EOF
19281 #define HAVE_NCURSESW_TERM_H 1
19287 echo "$as_me:19287: checking for unctrl.h" >&5
19288 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
19289 if test "${cf_cv_unctrl_header+set}" = set; then
19290 echo $ECHO_N "(cached) $ECHO_C" >&6
19293 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
19294 # for <unctrl.h> if we do not find the variant.
19296 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
19298 case "${cf_cv_ncurses_header:-curses.h}" in
19300 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
19301 cf_header_list="$cf_header_item $cf_header_list"
19305 for cf_header in $cf_header_list
19307 cat >"conftest.$ac_ext" <<_ACEOF
19308 #line 19308 "configure"
19309 #include "confdefs.h"
19311 #include <${cf_cv_ncurses_header:-curses.h}>
19312 #include <${cf_header}>
19321 rm -f "conftest.$ac_objext"
19322 if { (eval echo "$as_me:19322: \"$ac_compile\"") >&5
19323 (eval $ac_compile) 2>&5
19325 echo "$as_me:19325: \$? = $ac_status" >&5
19326 (exit "$ac_status"); } &&
19327 { ac_try='test -s "conftest.$ac_objext"'
19328 { (eval echo "$as_me:19328: \"$ac_try\"") >&5
19329 (eval $ac_try) 2>&5
19331 echo "$as_me:19331: \$? = $ac_status" >&5
19332 (exit "$ac_status"); }; }; then
19333 cf_cv_unctrl_header=$cf_header
19336 echo "$as_me: failed program was:" >&5
19337 cat "conftest.$ac_ext" >&5
19338 cf_cv_unctrl_header=no
19340 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19344 echo "$as_me:19344: result: $cf_cv_unctrl_header" >&5
19345 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
19347 case "$cf_cv_unctrl_header" in
19349 { echo "$as_me:19349: WARNING: unctrl.h header not found" >&5
19350 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
19354 case "$cf_cv_unctrl_header" in
19357 cat >>confdefs.h <<\EOF
19358 #define HAVE_UNCTRL_H 1
19364 cat >>confdefs.h <<\EOF
19365 #define HAVE_NCURSES_UNCTRL_H 1
19369 (ncursesw/unctrl.h)
19371 cat >>confdefs.h <<\EOF
19372 #define HAVE_NCURSESW_UNCTRL_H 1
19379 _nc_tparm_analyze \
19382 assume_default_colors \
19400 init_extended_color \
19408 reset_color_pairs \
19428 use_default_colors \
19430 use_extended_names \
19445 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19447 echo "$as_me:19447: checking for ${cf_func}" >&5
19448 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
19450 echo "${as_me:-configure}:19450: testing ${cf_func} ..." 1>&5
19452 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
19453 echo $ECHO_N "(cached) $ECHO_C" >&6
19456 eval cf_result='$ac_cv_func_'$cf_func
19457 if test ".$cf_result" != ".no"; then
19458 cat >"conftest.$ac_ext" <<_ACEOF
19459 #line 19459 "configure"
19460 #include "confdefs.h"
19462 #ifdef HAVE_XCURSES
19463 #include <xcurses.h>
19464 char * XCursesProgramName = "test";
19466 #include <${cf_cv_ncurses_header:-curses.h}>
19467 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19468 #include <ncursesw/term.h>
19469 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19470 #include <ncurses/term.h>
19471 #elif defined(HAVE_TERM_H)
19481 long foo = (long)(&${cf_func});
19482 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
19483 if (foo + 1234L > 5678L)
19484 ${cf_cv_main_return:-return}(foo != 0);
19491 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19492 if { (eval echo "$as_me:19492: \"$ac_link\"") >&5
19493 (eval $ac_link) 2>&5
19495 echo "$as_me:19495: \$? = $ac_status" >&5
19496 (exit "$ac_status"); } &&
19497 { ac_try='test -s "conftest$ac_exeext"'
19498 { (eval echo "$as_me:19498: \"$ac_try\"") >&5
19499 (eval $ac_try) 2>&5
19501 echo "$as_me:19501: \$? = $ac_status" >&5
19502 (exit "$ac_status"); }; }; then
19505 echo "$as_me: failed program was:" >&5
19506 cat "conftest.$ac_ext" >&5
19509 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19511 eval 'cf_cv_func_'$cf_func'="$cf_result"'
19515 # use the computed/retrieved cache-value:
19516 eval 'cf_result=$cf_cv_func_'$cf_func
19517 echo "$as_me:19517: result: $cf_result" >&5
19518 echo "${ECHO_T}$cf_result" >&6
19519 if test "$cf_result" != no; then
19520 cat >>confdefs.h <<EOF
19521 #define HAVE_${cf_tr_func} 1
19527 for cf_func in tputs
19530 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19532 echo "$as_me:19532: checking for ${cf_func}" >&5
19533 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
19535 echo "${as_me:-configure}:19535: testing ${cf_func} ..." 1>&5
19537 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
19538 echo $ECHO_N "(cached) $ECHO_C" >&6
19541 eval cf_result='$ac_cv_func_'$cf_func
19542 if test ".$cf_result" != ".no"; then
19543 cat >"conftest.$ac_ext" <<_ACEOF
19544 #line 19544 "configure"
19545 #include "confdefs.h"
19547 #ifdef HAVE_XCURSES
19548 #include <xcurses.h>
19549 char * XCursesProgramName = "test";
19551 #include <${cf_cv_ncurses_header:-curses.h}>
19552 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19553 #include <ncursesw/term.h>
19554 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19555 #include <ncurses/term.h>
19556 #elif defined(HAVE_TERM_H)
19566 long foo = (long)(&${cf_func});
19567 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
19568 if (foo + 1234L > 5678L)
19569 ${cf_cv_main_return:-return}(foo != 0);
19576 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19577 if { (eval echo "$as_me:19577: \"$ac_link\"") >&5
19578 (eval $ac_link) 2>&5
19580 echo "$as_me:19580: \$? = $ac_status" >&5
19581 (exit "$ac_status"); } &&
19582 { ac_try='test -s "conftest$ac_exeext"'
19583 { (eval echo "$as_me:19583: \"$ac_try\"") >&5
19584 (eval $ac_try) 2>&5
19586 echo "$as_me:19586: \$? = $ac_status" >&5
19587 (exit "$ac_status"); }; }; then
19590 echo "$as_me: failed program was:" >&5
19591 cat "conftest.$ac_ext" >&5
19594 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19596 eval 'cf_cv_func_'$cf_func'="$cf_result"'
19600 # use the computed/retrieved cache-value:
19601 eval 'cf_result=$cf_cv_func_'$cf_func
19602 echo "$as_me:19602: result: $cf_result" >&5
19603 echo "${ECHO_T}$cf_result" >&6
19604 if test "$cf_result" != no; then
19605 cat >>confdefs.h <<EOF
19606 #define HAVE_${cf_tr_func} 1
19612 if test "x$cf_cv_func_tputs" = xyes
19615 for cf_arg in int char
19617 for cf_ret in int void
19619 if test "$cf_ret" = void
19621 cf_return="/* nothing */"
19623 cf_return="return value"
19625 cat >"conftest.$ac_ext" <<_ACEOF
19626 #line 19626 "configure"
19627 #include "confdefs.h"
19629 #include <${cf_cv_ncurses_header:-curses.h}>
19630 #include <$cf_cv_term_header>
19632 static $cf_ret outc($cf_arg value) { $cf_return; }
19638 tputs("hello", 0, outc);
19639 ${cf_cv_main_return:-return}(0);
19645 rm -f "conftest.$ac_objext"
19646 if { (eval echo "$as_me:19646: \"$ac_compile\"") >&5
19647 (eval $ac_compile) 2>&5
19649 echo "$as_me:19649: \$? = $ac_status" >&5
19650 (exit "$ac_status"); } &&
19651 { ac_try='test -s "conftest.$ac_objext"'
19652 { (eval echo "$as_me:19652: \"$ac_try\"") >&5
19653 (eval $ac_try) 2>&5
19655 echo "$as_me:19655: \$? = $ac_status" >&5
19656 (exit "$ac_status"); }; }; then
19658 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
19660 echo "${as_me:-configure}:19660: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
19662 cat >>confdefs.h <<EOF
19663 #define TPUTS_ARG $cf_arg
19664 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
19665 #define TPUTS_RETURN(value) $cf_return
19671 echo "$as_me: failed program was:" >&5
19672 cat "conftest.$ac_ext" >&5
19674 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19676 test "$cf_done" = yes && break
19680 echo "$as_me:19680: checking for ncurses extended functions" >&5
19681 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
19682 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
19683 echo $ECHO_N "(cached) $ECHO_C" >&6
19686 cat >"conftest.$ac_ext" <<_ACEOF
19687 #line 19687 "configure"
19688 #include "confdefs.h"
19690 #include <${cf_cv_ncurses_header:-curses.h}>
19695 int x = NCURSES_EXT_FUNCS
19701 rm -f "conftest.$ac_objext"
19702 if { (eval echo "$as_me:19702: \"$ac_compile\"") >&5
19703 (eval $ac_compile) 2>&5
19705 echo "$as_me:19705: \$? = $ac_status" >&5
19706 (exit "$ac_status"); } &&
19707 { ac_try='test -s "conftest.$ac_objext"'
19708 { (eval echo "$as_me:19708: \"$ac_try\"") >&5
19709 (eval $ac_try) 2>&5
19711 echo "$as_me:19711: \$? = $ac_status" >&5
19712 (exit "$ac_status"); }; }; then
19713 cf_cv_ncurses_ext_funcs=defined
19715 echo "$as_me: failed program was:" >&5
19716 cat "conftest.$ac_ext" >&5
19718 cat >"conftest.$ac_ext" <<_ACEOF
19719 #line 19719 "configure"
19720 #include "confdefs.h"
19722 #include <${cf_cv_ncurses_header:-curses.h}>
19727 (void) assume_default_colors (0, 0);
19728 (void) curses_version ();
19729 (void) define_key (0, 0);
19730 (void) is_term_resized (0, 0);
19731 (void) key_defined (0);
19732 (void) keybound (0, 0);
19733 (void) keyok (0, 0);
19734 (void) resize_term (0, 0);
19735 (void) resizeterm (0, 0);
19736 (void) use_default_colors ();
19737 (void) use_extended_names (0);
19738 (void) wresize (0, 0, 0);
19743 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19744 if { (eval echo "$as_me:19744: \"$ac_link\"") >&5
19745 (eval $ac_link) 2>&5
19747 echo "$as_me:19747: \$? = $ac_status" >&5
19748 (exit "$ac_status"); } &&
19749 { ac_try='test -s "conftest$ac_exeext"'
19750 { (eval echo "$as_me:19750: \"$ac_try\"") >&5
19751 (eval $ac_try) 2>&5
19753 echo "$as_me:19753: \$? = $ac_status" >&5
19754 (exit "$ac_status"); }; }; then
19755 cf_cv_ncurses_ext_funcs=yes
19757 echo "$as_me: failed program was:" >&5
19758 cat "conftest.$ac_ext" >&5
19759 cf_cv_ncurses_ext_funcs=no
19761 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19764 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19767 echo "$as_me:19767: result: $cf_cv_ncurses_ext_funcs" >&5
19768 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
19769 test "$cf_cv_ncurses_ext_funcs" = yes &&
19770 cat >>confdefs.h <<\EOF
19771 #define NCURSES_EXT_FUNCS 1
19774 if test "$cf_enable_widec" = yes
19776 # workaround for systems with ncurses before 20111029, due to change of
19777 # feature test macro from _XPG5 to _XOPEN_SOURCE
19778 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
19781 echo "$as_me:19781: checking if _XPG5 should be defined to enable wide-characters" >&5
19782 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
19784 cat >"conftest.$ac_ext" <<_ACEOF
19785 #line 19785 "configure"
19786 #include "confdefs.h"
19788 #include <${cf_cv_ncurses_header:-curses.h}>
19797 rm -f "conftest.$ac_objext"
19798 if { (eval echo "$as_me:19798: \"$ac_compile\"") >&5
19799 (eval $ac_compile) 2>&5
19801 echo "$as_me:19801: \$? = $ac_status" >&5
19802 (exit "$ac_status"); } &&
19803 { ac_try='test -s "conftest.$ac_objext"'
19804 { (eval echo "$as_me:19804: \"$ac_try\"") >&5
19805 (eval $ac_try) 2>&5
19807 echo "$as_me:19807: \$? = $ac_status" >&5
19808 (exit "$ac_status"); }; }; then
19811 echo "$as_me: failed program was:" >&5
19812 cat "conftest.$ac_ext" >&5
19813 cf_save_cppflags="$CPPFLAGS"
19814 CPPFLAGS="$CPPFLAGS -D_XPG5"
19815 cat >"conftest.$ac_ext" <<_ACEOF
19816 #line 19816 "configure"
19817 #include "confdefs.h"
19819 #include <${cf_cv_ncurses_header:-curses.h}>
19828 rm -f "conftest.$ac_objext"
19829 if { (eval echo "$as_me:19829: \"$ac_compile\"") >&5
19830 (eval $ac_compile) 2>&5
19832 echo "$as_me:19832: \$? = $ac_status" >&5
19833 (exit "$ac_status"); } &&
19834 { ac_try='test -s "conftest.$ac_objext"'
19835 { (eval echo "$as_me:19835: \"$ac_try\"") >&5
19836 (eval $ac_try) 2>&5
19838 echo "$as_me:19838: \$? = $ac_status" >&5
19839 (exit "$ac_status"); }; }; then
19842 echo "$as_me: failed program was:" >&5
19843 cat "conftest.$ac_ext" >&5
19845 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19846 CPPFLAGS="$cf_save_cppflags"
19848 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19849 echo "$as_me:19849: result: $cf_define_xpg5" >&5
19850 echo "${ECHO_T}$cf_define_xpg5" >&6
19852 if test "$cf_define_xpg5" = yes
19854 CPPFLAGS="$CPPFLAGS -D_XPG5"
19858 echo "$as_me:19858: checking for wide-character functions" >&5
19859 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
19860 if test "${cf_cv_widechar_funcs+set}" = set; then
19861 echo $ECHO_N "(cached) $ECHO_C" >&6
19864 cat >"conftest.$ac_ext" <<_ACEOF
19865 #line 19865 "configure"
19866 #include "confdefs.h"
19868 #include <${cf_cv_ncurses_header:-curses.h}>
19873 static wchar_t src_wchar[2];
19874 static cchar_t dst_cchar;
19875 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
19881 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19882 if { (eval echo "$as_me:19882: \"$ac_link\"") >&5
19883 (eval $ac_link) 2>&5
19885 echo "$as_me:19885: \$? = $ac_status" >&5
19886 (exit "$ac_status"); } &&
19887 { ac_try='test -s "conftest$ac_exeext"'
19888 { (eval echo "$as_me:19888: \"$ac_try\"") >&5
19889 (eval $ac_try) 2>&5
19891 echo "$as_me:19891: \$? = $ac_status" >&5
19892 (exit "$ac_status"); }; }; then
19893 cf_cv_widechar_funcs=yes
19895 echo "$as_me: failed program was:" >&5
19896 cat "conftest.$ac_ext" >&5
19897 cf_cv_widechar_funcs=no
19899 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19902 echo "$as_me:19902: result: $cf_cv_widechar_funcs" >&5
19903 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
19904 if test "$cf_cv_widechar_funcs" != no ; then
19906 cat >>confdefs.h <<\EOF
19907 #define USE_WIDEC_SUPPORT 1
19911 cat >>confdefs.h <<\EOF
19912 #define USE_WIDEC_SUPPORT 0
19917 cat >>confdefs.h <<\EOF
19918 #define USE_WIDEC_SUPPORT 0
19923 echo "$as_me:19923: checking if $cf_cv_screen library uses pthreads" >&5
19924 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
19925 if test "${cf_cv_use_pthreads+set}" = set; then
19926 echo $ECHO_N "(cached) $ECHO_C" >&6
19929 cat >"conftest.$ac_ext" <<_ACEOF
19930 #line 19930 "configure"
19931 #include "confdefs.h"
19933 #include <${cf_cv_ncurses_header:-curses.h}>
19934 extern void _nc_init_pthreads(void);
19941 _nc_init_pthreads();
19947 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19948 if { (eval echo "$as_me:19948: \"$ac_link\"") >&5
19949 (eval $ac_link) 2>&5
19951 echo "$as_me:19951: \$? = $ac_status" >&5
19952 (exit "$ac_status"); } &&
19953 { ac_try='test -s "conftest$ac_exeext"'
19954 { (eval echo "$as_me:19954: \"$ac_try\"") >&5
19955 (eval $ac_try) 2>&5
19957 echo "$as_me:19957: \$? = $ac_status" >&5
19958 (exit "$ac_status"); }; }; then
19959 cf_cv_use_pthreads=yes
19961 echo "$as_me: failed program was:" >&5
19962 cat "conftest.$ac_ext" >&5
19963 cf_cv_use_pthreads=no
19965 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19968 echo "$as_me:19968: result: $cf_cv_use_pthreads" >&5
19969 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
19970 test $cf_cv_use_pthreads = yes &&
19971 cat >>confdefs.h <<\EOF
19972 #define USE_PTHREADS 1
19975 echo "$as_me:19975: checking if sys/time.h works with sys/select.h" >&5
19976 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
19977 if test "${cf_cv_sys_time_select+set}" = set; then
19978 echo $ECHO_N "(cached) $ECHO_C" >&6
19981 cat >"conftest.$ac_ext" <<_ACEOF
19982 #line 19982 "configure"
19983 #include "confdefs.h"
19985 #include <sys/types.h>
19986 #ifdef HAVE_SYS_TIME_H
19987 #include <sys/time.h>
19989 #ifdef HAVE_SYS_SELECT_H
19990 #include <sys/select.h>
20001 rm -f "conftest.$ac_objext"
20002 if { (eval echo "$as_me:20002: \"$ac_compile\"") >&5
20003 (eval $ac_compile) 2>&5
20005 echo "$as_me:20005: \$? = $ac_status" >&5
20006 (exit "$ac_status"); } &&
20007 { ac_try='test -s "conftest.$ac_objext"'
20008 { (eval echo "$as_me:20008: \"$ac_try\"") >&5
20009 (eval $ac_try) 2>&5
20011 echo "$as_me:20011: \$? = $ac_status" >&5
20012 (exit "$ac_status"); }; }; then
20013 cf_cv_sys_time_select=yes
20015 echo "$as_me: failed program was:" >&5
20016 cat "conftest.$ac_ext" >&5
20017 cf_cv_sys_time_select=no
20019 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20023 echo "$as_me:20023: result: $cf_cv_sys_time_select" >&5
20024 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20025 test "$cf_cv_sys_time_select" = yes &&
20026 cat >>confdefs.h <<\EOF
20027 #define HAVE_SYS_TIME_SELECT 1
20030 # special check for test/ditto.c
20032 echo "$as_me:20032: checking for openpty in -lutil" >&5
20033 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
20034 if test "${ac_cv_lib_util_openpty+set}" = set; then
20035 echo $ECHO_N "(cached) $ECHO_C" >&6
20037 ac_check_lib_save_LIBS=$LIBS
20038 LIBS="-lutil $LIBS"
20039 cat >"conftest.$ac_ext" <<_ACEOF
20040 #line 20040 "configure"
20041 #include "confdefs.h"
20043 /* Override any gcc2 internal prototype to avoid an error. */
20047 /* We use char because int might match the return type of a gcc2
20048 builtin and then its argument prototype would still apply. */
20058 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20059 if { (eval echo "$as_me:20059: \"$ac_link\"") >&5
20060 (eval $ac_link) 2>&5
20062 echo "$as_me:20062: \$? = $ac_status" >&5
20063 (exit "$ac_status"); } &&
20064 { ac_try='test -s "conftest$ac_exeext"'
20065 { (eval echo "$as_me:20065: \"$ac_try\"") >&5
20066 (eval $ac_try) 2>&5
20068 echo "$as_me:20068: \$? = $ac_status" >&5
20069 (exit "$ac_status"); }; }; then
20070 ac_cv_lib_util_openpty=yes
20072 echo "$as_me: failed program was:" >&5
20073 cat "conftest.$ac_ext" >&5
20074 ac_cv_lib_util_openpty=no
20076 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20077 LIBS=$ac_check_lib_save_LIBS
20079 echo "$as_me:20079: result: $ac_cv_lib_util_openpty" >&5
20080 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
20081 if test "$ac_cv_lib_util_openpty" = yes; then
20087 echo "$as_me:20087: checking for openpty header" >&5
20088 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
20089 if test "${cf_cv_func_openpty+set}" = set; then
20090 echo $ECHO_N "(cached) $ECHO_C" >&6
20093 cf_save_LIBS="$LIBS"
20094 test "$cf_cv_lib_util" = yes && {
20095 cf_add_libs="$LIBS"
20098 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20099 # filter duplicates
20100 for cf_add_1lib in $cf_add_0lib; do
20101 for cf_add_2lib in $cf_add_libs; do
20102 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20107 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20109 LIBS="$cf_add_libs"
20111 for cf_header in pty.h libutil.h util.h
20113 cat >"conftest.$ac_ext" <<_ACEOF
20114 #line 20114 "configure"
20115 #include "confdefs.h"
20117 #include <$cf_header>
20123 int x = openpty((int *)0, (int *)0, (char *)0,
20124 (struct termios *)0, (struct winsize *)0);
20130 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20131 if { (eval echo "$as_me:20131: \"$ac_link\"") >&5
20132 (eval $ac_link) 2>&5
20134 echo "$as_me:20134: \$? = $ac_status" >&5
20135 (exit "$ac_status"); } &&
20136 { ac_try='test -s "conftest$ac_exeext"'
20137 { (eval echo "$as_me:20137: \"$ac_try\"") >&5
20138 (eval $ac_try) 2>&5
20140 echo "$as_me:20140: \$? = $ac_status" >&5
20141 (exit "$ac_status"); }; }; then
20143 cf_cv_func_openpty=$cf_header
20147 echo "$as_me: failed program was:" >&5
20148 cat "conftest.$ac_ext" >&5
20150 cf_cv_func_openpty=no
20153 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20155 LIBS="$cf_save_LIBS"
20158 echo "$as_me:20158: result: $cf_cv_func_openpty" >&5
20159 echo "${ECHO_T}$cf_cv_func_openpty" >&6
20161 if test "$cf_cv_func_openpty" != no ; then
20163 cat >>confdefs.h <<EOF
20164 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
20167 cat >>confdefs.h <<\EOF
20168 #define USE_XTERM_PTY 1
20171 if test "x$cf_cv_lib_util" = xyes ; then
20173 cf_add_libs="$TEST_LIBS"
20176 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20177 # filter duplicates
20178 for cf_add_1lib in $cf_add_0lib; do
20179 for cf_add_2lib in $cf_add_libs; do
20180 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20185 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20187 TEST_LIBS="$cf_add_libs"
20192 echo "$as_me:20192: checking for function curses_version" >&5
20193 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
20194 if test "${cf_cv_func_curses_version+set}" = set; then
20195 echo $ECHO_N "(cached) $ECHO_C" >&6
20198 if test "$cross_compiling" = yes; then
20199 cf_cv_func_curses_version=unknown
20201 cat >"conftest.$ac_ext" <<_ACEOF
20202 #line 20202 "configure"
20203 #include "confdefs.h"
20205 $ac_includes_default
20207 #include <${cf_cv_ncurses_header:-curses.h}>
20212 sprintf(temp, "%.999s\\n", curses_version());
20213 ${cf_cv_main_return:-return}(0);
20217 rm -f "conftest$ac_exeext"
20218 if { (eval echo "$as_me:20218: \"$ac_link\"") >&5
20219 (eval $ac_link) 2>&5
20221 echo "$as_me:20221: \$? = $ac_status" >&5
20222 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20223 { (eval echo "$as_me:20223: \"$ac_try\"") >&5
20224 (eval $ac_try) 2>&5
20226 echo "$as_me:20226: \$? = $ac_status" >&5
20227 (exit "$ac_status"); }; }; then
20228 cf_cv_func_curses_version=yes
20231 echo "$as_me: program exited with status $ac_status" >&5
20232 echo "$as_me: failed program was:" >&5
20233 cat "conftest.$ac_ext" >&5
20234 cf_cv_func_curses_version=no
20237 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20241 echo "$as_me:20241: result: $cf_cv_func_curses_version" >&5
20242 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
20243 test "$cf_cv_func_curses_version" = yes &&
20244 cat >>confdefs.h <<\EOF
20245 #define HAVE_CURSES_VERSION 1
20248 echo "$as_me:20248: checking for alternate character set array" >&5
20249 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
20250 if test "${cf_cv_curses_acs_map+set}" = set; then
20251 echo $ECHO_N "(cached) $ECHO_C" >&6
20254 cf_cv_curses_acs_map=unknown
20255 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
20257 cat >"conftest.$ac_ext" <<_ACEOF
20258 #line 20258 "configure"
20259 #include "confdefs.h"
20261 #include <${cf_cv_ncurses_header:-curses.h}>
20267 ${name}['k'] = ACS_PLUS
20273 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20274 if { (eval echo "$as_me:20274: \"$ac_link\"") >&5
20275 (eval $ac_link) 2>&5
20277 echo "$as_me:20277: \$? = $ac_status" >&5
20278 (exit "$ac_status"); } &&
20279 { ac_try='test -s "conftest$ac_exeext"'
20280 { (eval echo "$as_me:20280: \"$ac_try\"") >&5
20281 (eval $ac_try) 2>&5
20283 echo "$as_me:20283: \$? = $ac_status" >&5
20284 (exit "$ac_status"); }; }; then
20285 cf_cv_curses_acs_map=$name; break
20287 echo "$as_me: failed program was:" >&5
20288 cat "conftest.$ac_ext" >&5
20290 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20294 echo "$as_me:20294: result: $cf_cv_curses_acs_map" >&5
20295 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
20297 test "$cf_cv_curses_acs_map" != unknown &&
20298 cat >>confdefs.h <<EOF
20299 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
20302 if test "$cf_enable_widec" = yes; then
20304 echo "$as_me:20304: checking for wide alternate character set array" >&5
20305 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
20306 if test "${cf_cv_curses_wacs_map+set}" = set; then
20307 echo $ECHO_N "(cached) $ECHO_C" >&6
20310 cf_cv_curses_wacs_map=unknown
20311 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
20313 cat >"conftest.$ac_ext" <<_ACEOF
20314 #line 20314 "configure"
20315 #include "confdefs.h"
20317 #ifndef _XOPEN_SOURCE_EXTENDED
20318 #define _XOPEN_SOURCE_EXTENDED
20320 #include <${cf_cv_ncurses_header:-curses.h}>
20324 void *foo = &(${name}['k']); (void)foo
20329 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20330 if { (eval echo "$as_me:20330: \"$ac_link\"") >&5
20331 (eval $ac_link) 2>&5
20333 echo "$as_me:20333: \$? = $ac_status" >&5
20334 (exit "$ac_status"); } &&
20335 { ac_try='test -s "conftest$ac_exeext"'
20336 { (eval echo "$as_me:20336: \"$ac_try\"") >&5
20337 (eval $ac_try) 2>&5
20339 echo "$as_me:20339: \$? = $ac_status" >&5
20340 (exit "$ac_status"); }; }; then
20341 cf_cv_curses_wacs_map=$name
20344 echo "$as_me: failed program was:" >&5
20345 cat "conftest.$ac_ext" >&5
20347 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20350 echo "$as_me:20350: result: $cf_cv_curses_wacs_map" >&5
20351 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
20353 test "$cf_cv_curses_wacs_map" != unknown &&
20354 cat >>confdefs.h <<EOF
20355 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
20358 echo "$as_me:20358: checking for wide alternate character constants" >&5
20359 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
20360 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
20361 echo $ECHO_N "(cached) $ECHO_C" >&6
20364 cf_cv_curses_wacs_symbols=no
20365 if test "$cf_cv_curses_wacs_map" != unknown
20367 cat >"conftest.$ac_ext" <<_ACEOF
20368 #line 20368 "configure"
20369 #include "confdefs.h"
20371 #ifndef _XOPEN_SOURCE_EXTENDED
20372 #define _XOPEN_SOURCE_EXTENDED
20374 #include <${cf_cv_ncurses_header:-curses.h}>
20378 cchar_t *foo = WACS_PLUS;
20379 ${cf_cv_curses_wacs_map}['k'] = *WACS_PLUS; (void)foo
20384 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20385 if { (eval echo "$as_me:20385: \"$ac_link\"") >&5
20386 (eval $ac_link) 2>&5
20388 echo "$as_me:20388: \$? = $ac_status" >&5
20389 (exit "$ac_status"); } &&
20390 { ac_try='test -s "conftest$ac_exeext"'
20391 { (eval echo "$as_me:20391: \"$ac_try\"") >&5
20392 (eval $ac_try) 2>&5
20394 echo "$as_me:20394: \$? = $ac_status" >&5
20395 (exit "$ac_status"); }; }; then
20396 cf_cv_curses_wacs_symbols=yes
20398 echo "$as_me: failed program was:" >&5
20399 cat "conftest.$ac_ext" >&5
20401 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20403 cat >"conftest.$ac_ext" <<_ACEOF
20404 #line 20404 "configure"
20405 #include "confdefs.h"
20407 #ifndef _XOPEN_SOURCE_EXTENDED
20408 #define _XOPEN_SOURCE_EXTENDED
20410 #include <${cf_cv_ncurses_header:-curses.h}>
20414 cchar_t *foo = WACS_PLUS; (void)foo
20419 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20420 if { (eval echo "$as_me:20420: \"$ac_link\"") >&5
20421 (eval $ac_link) 2>&5
20423 echo "$as_me:20423: \$? = $ac_status" >&5
20424 (exit "$ac_status"); } &&
20425 { ac_try='test -s "conftest$ac_exeext"'
20426 { (eval echo "$as_me:20426: \"$ac_try\"") >&5
20427 (eval $ac_try) 2>&5
20429 echo "$as_me:20429: \$? = $ac_status" >&5
20430 (exit "$ac_status"); }; }; then
20431 cf_cv_curses_wacs_symbols=yes
20433 echo "$as_me: failed program was:" >&5
20434 cat "conftest.$ac_ext" >&5
20436 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20440 echo "$as_me:20440: result: $cf_cv_curses_wacs_symbols" >&5
20441 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
20443 test "$cf_cv_curses_wacs_symbols" != no &&
20444 cat >>confdefs.h <<\EOF
20445 #define CURSES_WACS_SYMBOLS 1
20450 echo "$as_me:20450: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20451 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20452 cat >"conftest.$ac_ext" <<_ACEOF
20453 #line 20453 "configure"
20454 #include "confdefs.h"
20456 #ifndef _XOPEN_SOURCE_EXTENDED
20457 #define _XOPEN_SOURCE_EXTENDED
20459 #include <${cf_cv_ncurses_header:-curses.h}>
20470 rm -f "conftest.$ac_objext"
20471 if { (eval echo "$as_me:20471: \"$ac_compile\"") >&5
20472 (eval $ac_compile) 2>&5
20474 echo "$as_me:20474: \$? = $ac_status" >&5
20475 (exit "$ac_status"); } &&
20476 { ac_try='test -s "conftest.$ac_objext"'
20477 { (eval echo "$as_me:20477: \"$ac_try\"") >&5
20478 (eval $ac_try) 2>&5
20480 echo "$as_me:20480: \$? = $ac_status" >&5
20481 (exit "$ac_status"); }; }; then
20484 echo "$as_me: failed program was:" >&5
20485 cat "conftest.$ac_ext" >&5
20488 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20489 echo "$as_me:20489: result: $cf_result" >&5
20490 echo "${ECHO_T}$cf_result" >&6
20491 if test "$cf_result" = yes ; then
20493 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20495 cat >>confdefs.h <<EOF
20496 #define $cf_result 1
20501 cat >>confdefs.h <<EOF
20502 #define attr_t long
20507 if test "$cf_enable_widec" = yes; then
20509 # This is needed on Tru64 5.0 to declare mbstate_t
20510 echo "$as_me:20510: checking if we must include wchar.h to declare mbstate_t" >&5
20511 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
20512 if test "${cf_cv_mbstate_t+set}" = set; then
20513 echo $ECHO_N "(cached) $ECHO_C" >&6
20516 cat >"conftest.$ac_ext" <<_ACEOF
20517 #line 20517 "configure"
20518 #include "confdefs.h"
20520 #include <stdlib.h>
20521 #include <stdarg.h>
20523 #ifdef HAVE_LIBUTF8_H
20524 #include <libutf8.h>
20534 rm -f "conftest.$ac_objext"
20535 if { (eval echo "$as_me:20535: \"$ac_compile\"") >&5
20536 (eval $ac_compile) 2>&5
20538 echo "$as_me:20538: \$? = $ac_status" >&5
20539 (exit "$ac_status"); } &&
20540 { ac_try='test -s "conftest.$ac_objext"'
20541 { (eval echo "$as_me:20541: \"$ac_try\"") >&5
20542 (eval $ac_try) 2>&5
20544 echo "$as_me:20544: \$? = $ac_status" >&5
20545 (exit "$ac_status"); }; }; then
20548 echo "$as_me: failed program was:" >&5
20549 cat "conftest.$ac_ext" >&5
20550 cat >"conftest.$ac_ext" <<_ACEOF
20551 #line 20551 "configure"
20552 #include "confdefs.h"
20554 #include <stdlib.h>
20555 #include <stdarg.h>
20558 #ifdef HAVE_LIBUTF8_H
20559 #include <libutf8.h>
20569 rm -f "conftest.$ac_objext"
20570 if { (eval echo "$as_me:20570: \"$ac_compile\"") >&5
20571 (eval $ac_compile) 2>&5
20573 echo "$as_me:20573: \$? = $ac_status" >&5
20574 (exit "$ac_status"); } &&
20575 { ac_try='test -s "conftest.$ac_objext"'
20576 { (eval echo "$as_me:20576: \"$ac_try\"") >&5
20577 (eval $ac_try) 2>&5
20579 echo "$as_me:20579: \$? = $ac_status" >&5
20580 (exit "$ac_status"); }; }; then
20581 cf_cv_mbstate_t=yes
20583 echo "$as_me: failed program was:" >&5
20584 cat "conftest.$ac_ext" >&5
20585 cf_cv_mbstate_t=unknown
20587 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20589 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20591 echo "$as_me:20591: result: $cf_cv_mbstate_t" >&5
20592 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
20594 if test "$cf_cv_mbstate_t" = yes ; then
20596 cat >>confdefs.h <<\EOF
20597 #define NEED_WCHAR_H 1
20603 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
20604 if test "$cf_cv_mbstate_t" = unknown ; then
20605 NCURSES_MBSTATE_T=1
20608 # if we find mbstate_t in either place, use substitution to provide a fallback.
20609 if test "$cf_cv_mbstate_t" != unknown ; then
20610 NCURSES_OK_MBSTATE_T=1
20613 # This is needed on Tru64 5.0 to declare wchar_t
20614 echo "$as_me:20614: checking if we must include wchar.h to declare wchar_t" >&5
20615 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
20616 if test "${cf_cv_wchar_t+set}" = set; then
20617 echo $ECHO_N "(cached) $ECHO_C" >&6
20620 cat >"conftest.$ac_ext" <<_ACEOF
20621 #line 20621 "configure"
20622 #include "confdefs.h"
20624 #include <stdlib.h>
20625 #include <stdarg.h>
20627 #ifdef HAVE_LIBUTF8_H
20628 #include <libutf8.h>
20638 rm -f "conftest.$ac_objext"
20639 if { (eval echo "$as_me:20639: \"$ac_compile\"") >&5
20640 (eval $ac_compile) 2>&5
20642 echo "$as_me:20642: \$? = $ac_status" >&5
20643 (exit "$ac_status"); } &&
20644 { ac_try='test -s "conftest.$ac_objext"'
20645 { (eval echo "$as_me:20645: \"$ac_try\"") >&5
20646 (eval $ac_try) 2>&5
20648 echo "$as_me:20648: \$? = $ac_status" >&5
20649 (exit "$ac_status"); }; }; then
20652 echo "$as_me: failed program was:" >&5
20653 cat "conftest.$ac_ext" >&5
20654 cat >"conftest.$ac_ext" <<_ACEOF
20655 #line 20655 "configure"
20656 #include "confdefs.h"
20658 #include <stdlib.h>
20659 #include <stdarg.h>
20662 #ifdef HAVE_LIBUTF8_H
20663 #include <libutf8.h>
20673 rm -f "conftest.$ac_objext"
20674 if { (eval echo "$as_me:20674: \"$ac_compile\"") >&5
20675 (eval $ac_compile) 2>&5
20677 echo "$as_me:20677: \$? = $ac_status" >&5
20678 (exit "$ac_status"); } &&
20679 { ac_try='test -s "conftest.$ac_objext"'
20680 { (eval echo "$as_me:20680: \"$ac_try\"") >&5
20681 (eval $ac_try) 2>&5
20683 echo "$as_me:20683: \$? = $ac_status" >&5
20684 (exit "$ac_status"); }; }; then
20687 echo "$as_me: failed program was:" >&5
20688 cat "conftest.$ac_ext" >&5
20689 cf_cv_wchar_t=unknown
20691 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20693 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20695 echo "$as_me:20695: result: $cf_cv_wchar_t" >&5
20696 echo "${ECHO_T}$cf_cv_wchar_t" >&6
20698 if test "$cf_cv_wchar_t" = yes ; then
20700 cat >>confdefs.h <<\EOF
20701 #define NEED_WCHAR_H 1
20707 # if we do not find wchar_t in either place, use substitution to provide a fallback.
20708 if test "$cf_cv_wchar_t" = unknown ; then
20712 # if we find wchar_t in either place, use substitution to provide a fallback.
20713 if test "$cf_cv_wchar_t" != unknown ; then
20714 NCURSES_OK_WCHAR_T=1
20717 # This is needed on Tru64 5.0 to declare wint_t
20718 echo "$as_me:20718: checking if we must include wchar.h to declare wint_t" >&5
20719 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
20720 if test "${cf_cv_wint_t+set}" = set; then
20721 echo $ECHO_N "(cached) $ECHO_C" >&6
20724 cat >"conftest.$ac_ext" <<_ACEOF
20725 #line 20725 "configure"
20726 #include "confdefs.h"
20728 #include <stdlib.h>
20729 #include <stdarg.h>
20731 #ifdef HAVE_LIBUTF8_H
20732 #include <libutf8.h>
20742 rm -f "conftest.$ac_objext"
20743 if { (eval echo "$as_me:20743: \"$ac_compile\"") >&5
20744 (eval $ac_compile) 2>&5
20746 echo "$as_me:20746: \$? = $ac_status" >&5
20747 (exit "$ac_status"); } &&
20748 { ac_try='test -s "conftest.$ac_objext"'
20749 { (eval echo "$as_me:20749: \"$ac_try\"") >&5
20750 (eval $ac_try) 2>&5
20752 echo "$as_me:20752: \$? = $ac_status" >&5
20753 (exit "$ac_status"); }; }; then
20756 echo "$as_me: failed program was:" >&5
20757 cat "conftest.$ac_ext" >&5
20758 cat >"conftest.$ac_ext" <<_ACEOF
20759 #line 20759 "configure"
20760 #include "confdefs.h"
20762 #include <stdlib.h>
20763 #include <stdarg.h>
20766 #ifdef HAVE_LIBUTF8_H
20767 #include <libutf8.h>
20777 rm -f "conftest.$ac_objext"
20778 if { (eval echo "$as_me:20778: \"$ac_compile\"") >&5
20779 (eval $ac_compile) 2>&5
20781 echo "$as_me:20781: \$? = $ac_status" >&5
20782 (exit "$ac_status"); } &&
20783 { ac_try='test -s "conftest.$ac_objext"'
20784 { (eval echo "$as_me:20784: \"$ac_try\"") >&5
20785 (eval $ac_try) 2>&5
20787 echo "$as_me:20787: \$? = $ac_status" >&5
20788 (exit "$ac_status"); }; }; then
20791 echo "$as_me: failed program was:" >&5
20792 cat "conftest.$ac_ext" >&5
20793 cf_cv_wint_t=unknown
20795 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20797 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20799 echo "$as_me:20799: result: $cf_cv_wint_t" >&5
20800 echo "${ECHO_T}$cf_cv_wint_t" >&6
20802 if test "$cf_cv_wint_t" = yes ; then
20804 cat >>confdefs.h <<\EOF
20805 #define NEED_WCHAR_H 1
20811 # if we do not find wint_t in either place, use substitution to provide a fallback.
20812 if test "$cf_cv_wint_t" = unknown ; then
20816 # if we find wint_t in either place, use substitution to provide a fallback.
20817 if test "$cf_cv_wint_t" != unknown ; then
20818 NCURSES_OK_WINT_T=1
20821 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
20823 echo "$as_me:20823: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20824 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20825 cat >"conftest.$ac_ext" <<_ACEOF
20826 #line 20826 "configure"
20827 #include "confdefs.h"
20829 #ifndef _XOPEN_SOURCE_EXTENDED
20830 #define _XOPEN_SOURCE_EXTENDED
20832 #include <${cf_cv_ncurses_header:-curses.h}>
20843 rm -f "conftest.$ac_objext"
20844 if { (eval echo "$as_me:20844: \"$ac_compile\"") >&5
20845 (eval $ac_compile) 2>&5
20847 echo "$as_me:20847: \$? = $ac_status" >&5
20848 (exit "$ac_status"); } &&
20849 { ac_try='test -s "conftest.$ac_objext"'
20850 { (eval echo "$as_me:20850: \"$ac_try\"") >&5
20851 (eval $ac_try) 2>&5
20853 echo "$as_me:20853: \$? = $ac_status" >&5
20854 (exit "$ac_status"); }; }; then
20857 echo "$as_me: failed program was:" >&5
20858 cat "conftest.$ac_ext" >&5
20861 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20862 echo "$as_me:20862: result: $cf_result" >&5
20863 echo "${ECHO_T}$cf_result" >&6
20864 if test "$cf_result" = yes ; then
20866 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20868 cat >>confdefs.h <<EOF
20869 #define $cf_result 1
20874 cat >>confdefs.h <<EOF
20875 #define mbstate_t long
20882 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
20884 echo "$as_me:20884: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20885 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20886 cat >"conftest.$ac_ext" <<_ACEOF
20887 #line 20887 "configure"
20888 #include "confdefs.h"
20890 #ifndef _XOPEN_SOURCE_EXTENDED
20891 #define _XOPEN_SOURCE_EXTENDED
20893 #include <${cf_cv_ncurses_header:-curses.h}>
20904 rm -f "conftest.$ac_objext"
20905 if { (eval echo "$as_me:20905: \"$ac_compile\"") >&5
20906 (eval $ac_compile) 2>&5
20908 echo "$as_me:20908: \$? = $ac_status" >&5
20909 (exit "$ac_status"); } &&
20910 { ac_try='test -s "conftest.$ac_objext"'
20911 { (eval echo "$as_me:20911: \"$ac_try\"") >&5
20912 (eval $ac_try) 2>&5
20914 echo "$as_me:20914: \$? = $ac_status" >&5
20915 (exit "$ac_status"); }; }; then
20918 echo "$as_me: failed program was:" >&5
20919 cat "conftest.$ac_ext" >&5
20922 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20923 echo "$as_me:20923: result: $cf_result" >&5
20924 echo "${ECHO_T}$cf_result" >&6
20925 if test "$cf_result" = yes ; then
20927 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20929 cat >>confdefs.h <<EOF
20930 #define $cf_result 1
20935 cat >>confdefs.h <<EOF
20936 #define wchar_t long
20943 if test "$NCURSES_OK_WINT_T" = 0 ; then
20945 echo "$as_me:20945: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20946 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20947 cat >"conftest.$ac_ext" <<_ACEOF
20948 #line 20948 "configure"
20949 #include "confdefs.h"
20951 #ifndef _XOPEN_SOURCE_EXTENDED
20952 #define _XOPEN_SOURCE_EXTENDED
20954 #include <${cf_cv_ncurses_header:-curses.h}>
20965 rm -f "conftest.$ac_objext"
20966 if { (eval echo "$as_me:20966: \"$ac_compile\"") >&5
20967 (eval $ac_compile) 2>&5
20969 echo "$as_me:20969: \$? = $ac_status" >&5
20970 (exit "$ac_status"); } &&
20971 { ac_try='test -s "conftest.$ac_objext"'
20972 { (eval echo "$as_me:20972: \"$ac_try\"") >&5
20973 (eval $ac_try) 2>&5
20975 echo "$as_me:20975: \$? = $ac_status" >&5
20976 (exit "$ac_status"); }; }; then
20979 echo "$as_me: failed program was:" >&5
20980 cat "conftest.$ac_ext" >&5
20983 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20984 echo "$as_me:20984: result: $cf_result" >&5
20985 echo "${ECHO_T}$cf_result" >&6
20986 if test "$cf_result" = yes ; then
20988 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20990 cat >>confdefs.h <<EOF
20991 #define $cf_result 1
20996 cat >>confdefs.h <<EOF
20997 #define wint_t long
21013 echo "$as_me:21013: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
21014 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
21016 cat >"conftest.$ac_ext" <<_ACEOF
21017 #line 21017 "configure"
21018 #include "confdefs.h"
21020 #ifdef HAVE_XCURSES
21021 #include <xcurses.h>
21022 char * XCursesProgramName = "test";
21024 #include <${cf_cv_ncurses_header:-curses.h}>
21025 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
21026 #include <ncursesw/term.h>
21027 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
21028 #include <ncurses/term.h>
21029 #elif defined(HAVE_TERM_H)
21038 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
21039 const void *foo = (const void *)($cf_data);
21041 const void *foo = &($cf_data);
21043 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
21049 rm -f "conftest.$ac_objext"
21050 if { (eval echo "$as_me:21050: \"$ac_compile\"") >&5
21051 (eval $ac_compile) 2>&5
21053 echo "$as_me:21053: \$? = $ac_status" >&5
21054 (exit "$ac_status"); } &&
21055 { ac_try='test -s "conftest.$ac_objext"'
21056 { (eval echo "$as_me:21056: \"$ac_try\"") >&5
21057 (eval $ac_try) 2>&5
21059 echo "$as_me:21059: \$? = $ac_status" >&5
21060 (exit "$ac_status"); }; }; then
21064 echo "$as_me: failed program was:" >&5
21065 cat "conftest.$ac_ext" >&5
21068 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21069 echo "$as_me:21069: result: $cf_result" >&5
21070 echo "${ECHO_T}$cf_result" >&6
21072 if test "$cf_result" = yes ; then
21074 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21076 cat >>confdefs.h <<EOF
21077 #define $cf_result 1
21081 echo "$as_me:21081: checking for data $cf_data in library" >&5
21082 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
21083 # BSD linkers insist on making weak linkage, but resolve at runtime.
21084 if test "$cross_compiling" = yes; then
21087 cat >"conftest.$ac_ext" <<_ACEOF
21088 #line 21088 "configure"
21089 #include "confdefs.h"
21091 #ifdef HAVE_XCURSES
21092 #include <xcurses.h>
21093 char * XCursesProgramName = "test";
21095 #include <${cf_cv_ncurses_header:-curses.h}>
21096 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
21097 #include <ncursesw/term.h>
21098 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
21099 #include <ncurses/term.h>
21100 #elif defined(HAVE_TERM_H)
21105 extern char $cf_data;
21112 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
21113 const void *foo = (const void *)($cf_data);
21115 const void *foo = &($cf_data);
21117 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
21119 ${cf_cv_main_return:-return}(foo == 0);
21126 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21127 if { (eval echo "$as_me:21127: \"$ac_link\"") >&5
21128 (eval $ac_link) 2>&5
21130 echo "$as_me:21130: \$? = $ac_status" >&5
21131 (exit "$ac_status"); } &&
21132 { ac_try='test -s "conftest$ac_exeext"'
21133 { (eval echo "$as_me:21133: \"$ac_try\"") >&5
21134 (eval $ac_try) 2>&5
21136 echo "$as_me:21136: \$? = $ac_status" >&5
21137 (exit "$ac_status"); }; }; then
21140 echo "$as_me: failed program was:" >&5
21141 cat "conftest.$ac_ext" >&5
21144 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21147 cat >"conftest.$ac_ext" <<_ACEOF
21148 #line 21148 "configure"
21149 #include "confdefs.h"
21151 #ifdef HAVE_XCURSES
21152 #include <xcurses.h>
21153 char * XCursesProgramName = "test";
21155 #include <${cf_cv_ncurses_header:-curses.h}>
21156 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
21157 #include <ncursesw/term.h>
21158 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
21159 #include <ncurses/term.h>
21160 #elif defined(HAVE_TERM_H)
21165 extern char $cf_data;
21169 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
21170 const void *foo = (const void *)($cf_data);
21172 const void *foo = &($cf_data);
21174 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
21176 ${cf_cv_main_return:-return}(foo == 0);
21179 rm -f "conftest$ac_exeext"
21180 if { (eval echo "$as_me:21180: \"$ac_link\"") >&5
21181 (eval $ac_link) 2>&5
21183 echo "$as_me:21183: \$? = $ac_status" >&5
21184 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21185 { (eval echo "$as_me:21185: \"$ac_try\"") >&5
21186 (eval $ac_try) 2>&5
21188 echo "$as_me:21188: \$? = $ac_status" >&5
21189 (exit "$ac_status"); }; }; then
21193 echo "$as_me: program exited with status $ac_status" >&5
21194 echo "$as_me: failed program was:" >&5
21195 cat "conftest.$ac_ext" >&5
21198 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21200 echo "$as_me:21200: result: $cf_result" >&5
21201 echo "${ECHO_T}$cf_result" >&6
21202 if test "$cf_result" = yes ; then
21204 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21206 cat >>confdefs.h <<EOF
21207 #define $cf_result 1
21210 # do not exit loop here, since we prefer system's declarations
21215 if test -n "$with_screen" && test "x$with_screen" = "xpdcurses"
21217 echo "$as_me:21217: checking for X" >&5
21218 echo $ECHO_N "checking for X... $ECHO_C" >&6
21220 # Check whether --with-x or --without-x was given.
21221 if test "${with_x+set}" = set; then
21225 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
21226 if test "x$with_x" = xno; then
21227 # The user explicitly disabled X.
21230 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
21231 # Both variables are already set.
21234 if test "${ac_cv_have_x+set}" = set; then
21235 echo $ECHO_N "(cached) $ECHO_C" >&6
21237 # One or both of the vars are not set, and there is no cached value.
21238 ac_x_includes=no ac_x_libraries=no
21239 rm -fr conftest.dir
21240 if mkdir conftest.dir; then
21242 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
21243 cat >Imakefile <<'EOF'
21245 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
21247 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
21248 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
21249 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
21250 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
21251 for ac_extension in a so sl dylib dll; do
21252 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
21253 test -f "$ac_im_libdir/libX11.$ac_extension"; then
21254 ac_im_usrlibdir=$ac_im_libdir; break
21257 # Screen out bogus values from the imake configuration. They are
21258 # bogus both because they are the default anyway, and because
21259 # using them would break gcc on systems where it needs fixed includes.
21260 case $ac_im_incroot in
21262 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
21264 case $ac_im_usrlibdir in
21265 /usr/lib | /lib) ;;
21266 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
21270 rm -fr conftest.dir
21273 # Standard set of common directories for X headers.
21274 # Check X11 before X11Rn because it is often a symlink to the current release.
21291 /usr/local/X11/include
21292 /usr/local/X11R7/include
21293 /usr/local/X11R6/include
21294 /usr/local/X11R5/include
21295 /usr/local/X11R4/include
21297 /usr/local/include/X11
21298 /usr/local/include/X11R7
21299 /usr/local/include/X11R6
21300 /usr/local/include/X11R5
21301 /usr/local/include/X11R4
21305 /usr/XFree86/include/X11
21309 /usr/unsupported/include
21310 /usr/athena/include
21311 /usr/local/x11r5/include
21312 /usr/lpp/Xamples/include
21314 /usr/openwin/include
21315 /usr/openwin/share/include'
21317 if test "$ac_x_includes" = no; then
21318 # Guess where to find include files, by looking for Intrinsic.h.
21319 # First, try using that file with no special directory specified.
21320 cat >"conftest.$ac_ext" <<_ACEOF
21321 #line 21321 "configure"
21322 #include "confdefs.h"
21323 #include <X11/Intrinsic.h>
21325 if { (eval echo "$as_me:21325: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21326 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21328 $EGREP -v '^ *\+' conftest.er1 >conftest.err
21330 cat conftest.err >&5
21331 echo "$as_me:21331: \$? = $ac_status" >&5
21332 (exit "$ac_status"); } >/dev/null; then
21333 if test -s conftest.err; then
21334 ac_cpp_err=$ac_c_preproc_warn_flag
21341 if test -z "$ac_cpp_err"; then
21342 # We can compile using X headers with no special include directory.
21345 echo "$as_me: failed program was:" >&5
21346 cat "conftest.$ac_ext" >&5
21347 for ac_dir in $ac_x_header_dirs; do
21348 if test -r "$ac_dir/X11/Intrinsic.h"; then
21349 ac_x_includes=$ac_dir
21354 rm -f conftest.err "conftest.$ac_ext"
21355 fi # $ac_x_includes = no
21357 if test "$ac_x_libraries" = no; then
21358 # Check for the libraries.
21359 # See if we find them without any special options.
21360 # Don't add to $LIBS permanently.
21363 cat >"conftest.$ac_ext" <<_ACEOF
21364 #line 21364 "configure"
21365 #include "confdefs.h"
21366 #include <X11/Intrinsic.h>
21375 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21376 if { (eval echo "$as_me:21376: \"$ac_link\"") >&5
21377 (eval $ac_link) 2>&5
21379 echo "$as_me:21379: \$? = $ac_status" >&5
21380 (exit "$ac_status"); } &&
21381 { ac_try='test -s "conftest$ac_exeext"'
21382 { (eval echo "$as_me:21382: \"$ac_try\"") >&5
21383 (eval $ac_try) 2>&5
21385 echo "$as_me:21385: \$? = $ac_status" >&5
21386 (exit "$ac_status"); }; }; then
21388 # We can link X programs with no special library path.
21391 echo "$as_me: failed program was:" >&5
21392 cat "conftest.$ac_ext" >&5
21394 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
21396 # Don't even attempt the hair of trying to link an X program!
21397 for ac_extension in a so sl dylib dll; do
21398 if test -r "$ac_dir/libXt.$ac_extension"; then
21399 ac_x_libraries=$ac_dir
21405 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21406 fi # $ac_x_libraries = no
21408 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
21409 # Didn't find X anywhere. Cache the known absence of X.
21410 ac_cv_have_x="have_x=no"
21412 # Record where we found X for the cache.
21413 ac_cv_have_x="have_x=yes \
21414 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
21419 eval "$ac_cv_have_x"
21422 if test "$have_x" != yes; then
21423 echo "$as_me:21423: result: $have_x" >&5
21424 echo "${ECHO_T}$have_x" >&6
21427 # If each of the values was on the command line, it overrides each guess.
21428 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
21429 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
21430 # Update the cache value to reflect the command line values.
21431 ac_cv_have_x="have_x=yes \
21432 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
21433 echo "$as_me:21433: result: libraries $x_libraries, headers $x_includes" >&5
21434 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
21437 if test "$no_x" = yes; then
21438 # Not all programs may use this symbol, but it does not hurt to define it.
21440 cat >>confdefs.h <<\EOF
21441 #define X_DISPLAY_MISSING 1
21449 if test -n "$x_includes"; then
21450 X_CFLAGS="$X_CFLAGS -I$x_includes"
21453 # It would also be nice to do this for all -L options, not just this one.
21454 if test -n "$x_libraries"; then
21455 X_LIBS="$X_LIBS -L$x_libraries"
21456 # For Solaris; some versions of Sun CC require a space after -R and
21457 # others require no space. Words are not sufficient . . . .
21458 case `(uname -sr) 2>/dev/null` in
21460 echo "$as_me:21460: checking whether -R must be followed by a space" >&5
21461 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
21462 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
21463 cat >"conftest.$ac_ext" <<_ACEOF
21464 #line 21464 "configure"
21465 #include "confdefs.h"
21475 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21476 if { (eval echo "$as_me:21476: \"$ac_link\"") >&5
21477 (eval $ac_link) 2>&5
21479 echo "$as_me:21479: \$? = $ac_status" >&5
21480 (exit "$ac_status"); } &&
21481 { ac_try='test -s "conftest$ac_exeext"'
21482 { (eval echo "$as_me:21482: \"$ac_try\"") >&5
21483 (eval $ac_try) 2>&5
21485 echo "$as_me:21485: \$? = $ac_status" >&5
21486 (exit "$ac_status"); }; }; then
21489 echo "$as_me: failed program was:" >&5
21490 cat "conftest.$ac_ext" >&5
21493 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21494 if test $ac_R_nospace = yes; then
21495 echo "$as_me:21495: result: no" >&5
21496 echo "${ECHO_T}no" >&6
21497 X_LIBS="$X_LIBS -R$x_libraries"
21499 LIBS="$ac_xsave_LIBS -R $x_libraries"
21500 cat >"conftest.$ac_ext" <<_ACEOF
21501 #line 21501 "configure"
21502 #include "confdefs.h"
21512 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21513 if { (eval echo "$as_me:21513: \"$ac_link\"") >&5
21514 (eval $ac_link) 2>&5
21516 echo "$as_me:21516: \$? = $ac_status" >&5
21517 (exit "$ac_status"); } &&
21518 { ac_try='test -s "conftest$ac_exeext"'
21519 { (eval echo "$as_me:21519: \"$ac_try\"") >&5
21520 (eval $ac_try) 2>&5
21522 echo "$as_me:21522: \$? = $ac_status" >&5
21523 (exit "$ac_status"); }; }; then
21526 echo "$as_me: failed program was:" >&5
21527 cat "conftest.$ac_ext" >&5
21530 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21531 if test $ac_R_space = yes; then
21532 echo "$as_me:21532: result: yes" >&5
21533 echo "${ECHO_T}yes" >&6
21534 X_LIBS="$X_LIBS -R $x_libraries"
21536 echo "$as_me:21536: result: neither works" >&5
21537 echo "${ECHO_T}neither works" >&6
21540 LIBS=$ac_xsave_LIBS
21544 # Check for system-dependent libraries X programs must link with.
21545 # Do this before checking for the system-independent R6 libraries
21546 # (-lICE), since we may need -lsocket or whatever for X linking.
21548 if test "$ISC" = yes; then
21549 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
21551 # Martyn Johnson says this is needed for Ultrix, if the X
21552 # libraries were built with DECnet support. And Karl Berry says
21553 # the Alpha needs dnet_stub (dnet does not exist).
21554 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
21555 cat >"conftest.$ac_ext" <<_ACEOF
21556 #line 21556 "configure"
21557 #include "confdefs.h"
21559 /* Override any gcc2 internal prototype to avoid an error. */
21563 /* We use char because int might match the return type of a gcc2
21564 builtin and then its argument prototype would still apply. */
21565 char XOpenDisplay ();
21574 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21575 if { (eval echo "$as_me:21575: \"$ac_link\"") >&5
21576 (eval $ac_link) 2>&5
21578 echo "$as_me:21578: \$? = $ac_status" >&5
21579 (exit "$ac_status"); } &&
21580 { ac_try='test -s "conftest$ac_exeext"'
21581 { (eval echo "$as_me:21581: \"$ac_try\"") >&5
21582 (eval $ac_try) 2>&5
21584 echo "$as_me:21584: \$? = $ac_status" >&5
21585 (exit "$ac_status"); }; }; then
21588 echo "$as_me: failed program was:" >&5
21589 cat "conftest.$ac_ext" >&5
21590 echo "$as_me:21590: checking for dnet_ntoa in -ldnet" >&5
21591 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
21592 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
21593 echo $ECHO_N "(cached) $ECHO_C" >&6
21595 ac_check_lib_save_LIBS=$LIBS
21596 LIBS="-ldnet $LIBS"
21597 cat >"conftest.$ac_ext" <<_ACEOF
21598 #line 21598 "configure"
21599 #include "confdefs.h"
21601 /* Override any gcc2 internal prototype to avoid an error. */
21605 /* We use char because int might match the return type of a gcc2
21606 builtin and then its argument prototype would still apply. */
21616 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21617 if { (eval echo "$as_me:21617: \"$ac_link\"") >&5
21618 (eval $ac_link) 2>&5
21620 echo "$as_me:21620: \$? = $ac_status" >&5
21621 (exit "$ac_status"); } &&
21622 { ac_try='test -s "conftest$ac_exeext"'
21623 { (eval echo "$as_me:21623: \"$ac_try\"") >&5
21624 (eval $ac_try) 2>&5
21626 echo "$as_me:21626: \$? = $ac_status" >&5
21627 (exit "$ac_status"); }; }; then
21628 ac_cv_lib_dnet_dnet_ntoa=yes
21630 echo "$as_me: failed program was:" >&5
21631 cat "conftest.$ac_ext" >&5
21632 ac_cv_lib_dnet_dnet_ntoa=no
21634 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21635 LIBS=$ac_check_lib_save_LIBS
21637 echo "$as_me:21637: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
21638 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
21639 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
21640 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
21643 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
21644 echo "$as_me:21644: checking for dnet_ntoa in -ldnet_stub" >&5
21645 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
21646 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
21647 echo $ECHO_N "(cached) $ECHO_C" >&6
21649 ac_check_lib_save_LIBS=$LIBS
21650 LIBS="-ldnet_stub $LIBS"
21651 cat >"conftest.$ac_ext" <<_ACEOF
21652 #line 21652 "configure"
21653 #include "confdefs.h"
21655 /* Override any gcc2 internal prototype to avoid an error. */
21659 /* We use char because int might match the return type of a gcc2
21660 builtin and then its argument prototype would still apply. */
21670 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21671 if { (eval echo "$as_me:21671: \"$ac_link\"") >&5
21672 (eval $ac_link) 2>&5
21674 echo "$as_me:21674: \$? = $ac_status" >&5
21675 (exit "$ac_status"); } &&
21676 { ac_try='test -s "conftest$ac_exeext"'
21677 { (eval echo "$as_me:21677: \"$ac_try\"") >&5
21678 (eval $ac_try) 2>&5
21680 echo "$as_me:21680: \$? = $ac_status" >&5
21681 (exit "$ac_status"); }; }; then
21682 ac_cv_lib_dnet_stub_dnet_ntoa=yes
21684 echo "$as_me: failed program was:" >&5
21685 cat "conftest.$ac_ext" >&5
21686 ac_cv_lib_dnet_stub_dnet_ntoa=no
21688 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21689 LIBS=$ac_check_lib_save_LIBS
21691 echo "$as_me:21691: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
21692 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
21693 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
21694 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
21699 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21700 LIBS="$ac_xsave_LIBS"
21702 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
21703 # to get the SysV transport functions.
21704 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
21706 # The nsl library prevents programs from opening the X display
21707 # on Irix 5.2, according to T.E. Dickey.
21708 # The functions gethostbyname, getservbyname, and inet_addr are
21709 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
21710 echo "$as_me:21710: checking for gethostbyname" >&5
21711 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
21712 if test "${ac_cv_func_gethostbyname+set}" = set; then
21713 echo $ECHO_N "(cached) $ECHO_C" >&6
21715 cat >"conftest.$ac_ext" <<_ACEOF
21716 #line 21716 "configure"
21717 #include "confdefs.h"
21718 #define gethostbyname autoconf_temporary
21719 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21720 #undef gethostbyname
21726 /* We use char because int might match the return type of a gcc2
21727 builtin and then its argument prototype would still apply. */
21728 char gethostbyname (void);
21734 /* The GNU C library defines stubs for functions which it implements
21735 to always fail with ENOSYS. Some functions are actually named
21736 something starting with __ and the normal name is an alias. */
21737 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
21738 #error found stub for gethostbyname
21741 return gethostbyname ();
21746 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21747 if { (eval echo "$as_me:21747: \"$ac_link\"") >&5
21748 (eval $ac_link) 2>&5
21750 echo "$as_me:21750: \$? = $ac_status" >&5
21751 (exit "$ac_status"); } &&
21752 { ac_try='test -s "conftest$ac_exeext"'
21753 { (eval echo "$as_me:21753: \"$ac_try\"") >&5
21754 (eval $ac_try) 2>&5
21756 echo "$as_me:21756: \$? = $ac_status" >&5
21757 (exit "$ac_status"); }; }; then
21758 ac_cv_func_gethostbyname=yes
21760 echo "$as_me: failed program was:" >&5
21761 cat "conftest.$ac_ext" >&5
21762 ac_cv_func_gethostbyname=no
21764 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21766 echo "$as_me:21766: result: $ac_cv_func_gethostbyname" >&5
21767 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
21769 if test $ac_cv_func_gethostbyname = no; then
21770 echo "$as_me:21770: checking for gethostbyname in -lnsl" >&5
21771 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
21772 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
21773 echo $ECHO_N "(cached) $ECHO_C" >&6
21775 ac_check_lib_save_LIBS=$LIBS
21777 cat >"conftest.$ac_ext" <<_ACEOF
21778 #line 21778 "configure"
21779 #include "confdefs.h"
21781 /* Override any gcc2 internal prototype to avoid an error. */
21785 /* We use char because int might match the return type of a gcc2
21786 builtin and then its argument prototype would still apply. */
21787 char gethostbyname ();
21796 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21797 if { (eval echo "$as_me:21797: \"$ac_link\"") >&5
21798 (eval $ac_link) 2>&5
21800 echo "$as_me:21800: \$? = $ac_status" >&5
21801 (exit "$ac_status"); } &&
21802 { ac_try='test -s "conftest$ac_exeext"'
21803 { (eval echo "$as_me:21803: \"$ac_try\"") >&5
21804 (eval $ac_try) 2>&5
21806 echo "$as_me:21806: \$? = $ac_status" >&5
21807 (exit "$ac_status"); }; }; then
21808 ac_cv_lib_nsl_gethostbyname=yes
21810 echo "$as_me: failed program was:" >&5
21811 cat "conftest.$ac_ext" >&5
21812 ac_cv_lib_nsl_gethostbyname=no
21814 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21815 LIBS=$ac_check_lib_save_LIBS
21817 echo "$as_me:21817: result: $ac_cv_lib_nsl_gethostbyname" >&5
21818 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
21819 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
21820 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
21823 if test $ac_cv_lib_nsl_gethostbyname = no; then
21824 echo "$as_me:21824: checking for gethostbyname in -lbsd" >&5
21825 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
21826 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
21827 echo $ECHO_N "(cached) $ECHO_C" >&6
21829 ac_check_lib_save_LIBS=$LIBS
21831 cat >"conftest.$ac_ext" <<_ACEOF
21832 #line 21832 "configure"
21833 #include "confdefs.h"
21835 /* Override any gcc2 internal prototype to avoid an error. */
21839 /* We use char because int might match the return type of a gcc2
21840 builtin and then its argument prototype would still apply. */
21841 char gethostbyname ();
21850 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21851 if { (eval echo "$as_me:21851: \"$ac_link\"") >&5
21852 (eval $ac_link) 2>&5
21854 echo "$as_me:21854: \$? = $ac_status" >&5
21855 (exit "$ac_status"); } &&
21856 { ac_try='test -s "conftest$ac_exeext"'
21857 { (eval echo "$as_me:21857: \"$ac_try\"") >&5
21858 (eval $ac_try) 2>&5
21860 echo "$as_me:21860: \$? = $ac_status" >&5
21861 (exit "$ac_status"); }; }; then
21862 ac_cv_lib_bsd_gethostbyname=yes
21864 echo "$as_me: failed program was:" >&5
21865 cat "conftest.$ac_ext" >&5
21866 ac_cv_lib_bsd_gethostbyname=no
21868 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21869 LIBS=$ac_check_lib_save_LIBS
21871 echo "$as_me:21871: result: $ac_cv_lib_bsd_gethostbyname" >&5
21872 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
21873 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
21874 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
21880 # lieder@skyler.mavd.honeywell.com says without -lsocket,
21881 # socket/setsockopt and other routines are undefined under SCO ODT
21882 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
21883 # on later versions), says Simon Leinen: it contains gethostby*
21884 # variants that don't use the nameserver (or something). -lsocket
21885 # must be given before -lnsl if both are needed. We assume that
21886 # if connect needs -lnsl, so does gethostbyname.
21887 echo "$as_me:21887: checking for connect" >&5
21888 echo $ECHO_N "checking for connect... $ECHO_C" >&6
21889 if test "${ac_cv_func_connect+set}" = set; then
21890 echo $ECHO_N "(cached) $ECHO_C" >&6
21892 cat >"conftest.$ac_ext" <<_ACEOF
21893 #line 21893 "configure"
21894 #include "confdefs.h"
21895 #define connect autoconf_temporary
21896 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21903 /* We use char because int might match the return type of a gcc2
21904 builtin and then its argument prototype would still apply. */
21905 char connect (void);
21911 /* The GNU C library defines stubs for functions which it implements
21912 to always fail with ENOSYS. Some functions are actually named
21913 something starting with __ and the normal name is an alias. */
21914 #if defined (__stub_connect) || defined (__stub___connect)
21915 #error found stub for connect
21923 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21924 if { (eval echo "$as_me:21924: \"$ac_link\"") >&5
21925 (eval $ac_link) 2>&5
21927 echo "$as_me:21927: \$? = $ac_status" >&5
21928 (exit "$ac_status"); } &&
21929 { ac_try='test -s "conftest$ac_exeext"'
21930 { (eval echo "$as_me:21930: \"$ac_try\"") >&5
21931 (eval $ac_try) 2>&5
21933 echo "$as_me:21933: \$? = $ac_status" >&5
21934 (exit "$ac_status"); }; }; then
21935 ac_cv_func_connect=yes
21937 echo "$as_me: failed program was:" >&5
21938 cat "conftest.$ac_ext" >&5
21939 ac_cv_func_connect=no
21941 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21943 echo "$as_me:21943: result: $ac_cv_func_connect" >&5
21944 echo "${ECHO_T}$ac_cv_func_connect" >&6
21946 if test $ac_cv_func_connect = no; then
21947 echo "$as_me:21947: checking for connect in -lsocket" >&5
21948 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
21949 if test "${ac_cv_lib_socket_connect+set}" = set; then
21950 echo $ECHO_N "(cached) $ECHO_C" >&6
21952 ac_check_lib_save_LIBS=$LIBS
21953 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
21954 cat >"conftest.$ac_ext" <<_ACEOF
21955 #line 21955 "configure"
21956 #include "confdefs.h"
21958 /* Override any gcc2 internal prototype to avoid an error. */
21962 /* We use char because int might match the return type of a gcc2
21963 builtin and then its argument prototype would still apply. */
21973 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21974 if { (eval echo "$as_me:21974: \"$ac_link\"") >&5
21975 (eval $ac_link) 2>&5
21977 echo "$as_me:21977: \$? = $ac_status" >&5
21978 (exit "$ac_status"); } &&
21979 { ac_try='test -s "conftest$ac_exeext"'
21980 { (eval echo "$as_me:21980: \"$ac_try\"") >&5
21981 (eval $ac_try) 2>&5
21983 echo "$as_me:21983: \$? = $ac_status" >&5
21984 (exit "$ac_status"); }; }; then
21985 ac_cv_lib_socket_connect=yes
21987 echo "$as_me: failed program was:" >&5
21988 cat "conftest.$ac_ext" >&5
21989 ac_cv_lib_socket_connect=no
21991 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21992 LIBS=$ac_check_lib_save_LIBS
21994 echo "$as_me:21994: result: $ac_cv_lib_socket_connect" >&5
21995 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
21996 if test "$ac_cv_lib_socket_connect" = yes; then
21997 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
22002 # Guillermo Gomez says -lposix is necessary on A/UX.
22003 echo "$as_me:22003: checking for remove" >&5
22004 echo $ECHO_N "checking for remove... $ECHO_C" >&6
22005 if test "${ac_cv_func_remove+set}" = set; then
22006 echo $ECHO_N "(cached) $ECHO_C" >&6
22008 cat >"conftest.$ac_ext" <<_ACEOF
22009 #line 22009 "configure"
22010 #include "confdefs.h"
22011 #define remove autoconf_temporary
22012 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
22019 /* We use char because int might match the return type of a gcc2
22020 builtin and then its argument prototype would still apply. */
22021 char remove (void);
22027 /* The GNU C library defines stubs for functions which it implements
22028 to always fail with ENOSYS. Some functions are actually named
22029 something starting with __ and the normal name is an alias. */
22030 #if defined (__stub_remove) || defined (__stub___remove)
22031 #error found stub for remove
22039 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22040 if { (eval echo "$as_me:22040: \"$ac_link\"") >&5
22041 (eval $ac_link) 2>&5
22043 echo "$as_me:22043: \$? = $ac_status" >&5
22044 (exit "$ac_status"); } &&
22045 { ac_try='test -s "conftest$ac_exeext"'
22046 { (eval echo "$as_me:22046: \"$ac_try\"") >&5
22047 (eval $ac_try) 2>&5
22049 echo "$as_me:22049: \$? = $ac_status" >&5
22050 (exit "$ac_status"); }; }; then
22051 ac_cv_func_remove=yes
22053 echo "$as_me: failed program was:" >&5
22054 cat "conftest.$ac_ext" >&5
22055 ac_cv_func_remove=no
22057 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22059 echo "$as_me:22059: result: $ac_cv_func_remove" >&5
22060 echo "${ECHO_T}$ac_cv_func_remove" >&6
22062 if test $ac_cv_func_remove = no; then
22063 echo "$as_me:22063: checking for remove in -lposix" >&5
22064 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
22065 if test "${ac_cv_lib_posix_remove+set}" = set; then
22066 echo $ECHO_N "(cached) $ECHO_C" >&6
22068 ac_check_lib_save_LIBS=$LIBS
22069 LIBS="-lposix $LIBS"
22070 cat >"conftest.$ac_ext" <<_ACEOF
22071 #line 22071 "configure"
22072 #include "confdefs.h"
22074 /* Override any gcc2 internal prototype to avoid an error. */
22078 /* We use char because int might match the return type of a gcc2
22079 builtin and then its argument prototype would still apply. */
22089 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22090 if { (eval echo "$as_me:22090: \"$ac_link\"") >&5
22091 (eval $ac_link) 2>&5
22093 echo "$as_me:22093: \$? = $ac_status" >&5
22094 (exit "$ac_status"); } &&
22095 { ac_try='test -s "conftest$ac_exeext"'
22096 { (eval echo "$as_me:22096: \"$ac_try\"") >&5
22097 (eval $ac_try) 2>&5
22099 echo "$as_me:22099: \$? = $ac_status" >&5
22100 (exit "$ac_status"); }; }; then
22101 ac_cv_lib_posix_remove=yes
22103 echo "$as_me: failed program was:" >&5
22104 cat "conftest.$ac_ext" >&5
22105 ac_cv_lib_posix_remove=no
22107 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22108 LIBS=$ac_check_lib_save_LIBS
22110 echo "$as_me:22110: result: $ac_cv_lib_posix_remove" >&5
22111 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
22112 if test "$ac_cv_lib_posix_remove" = yes; then
22113 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
22118 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
22119 echo "$as_me:22119: checking for shmat" >&5
22120 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
22121 if test "${ac_cv_func_shmat+set}" = set; then
22122 echo $ECHO_N "(cached) $ECHO_C" >&6
22124 cat >"conftest.$ac_ext" <<_ACEOF
22125 #line 22125 "configure"
22126 #include "confdefs.h"
22127 #define shmat autoconf_temporary
22128 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
22135 /* We use char because int might match the return type of a gcc2
22136 builtin and then its argument prototype would still apply. */
22143 /* The GNU C library defines stubs for functions which it implements
22144 to always fail with ENOSYS. Some functions are actually named
22145 something starting with __ and the normal name is an alias. */
22146 #if defined (__stub_shmat) || defined (__stub___shmat)
22147 #error found stub for shmat
22155 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22156 if { (eval echo "$as_me:22156: \"$ac_link\"") >&5
22157 (eval $ac_link) 2>&5
22159 echo "$as_me:22159: \$? = $ac_status" >&5
22160 (exit "$ac_status"); } &&
22161 { ac_try='test -s "conftest$ac_exeext"'
22162 { (eval echo "$as_me:22162: \"$ac_try\"") >&5
22163 (eval $ac_try) 2>&5
22165 echo "$as_me:22165: \$? = $ac_status" >&5
22166 (exit "$ac_status"); }; }; then
22167 ac_cv_func_shmat=yes
22169 echo "$as_me: failed program was:" >&5
22170 cat "conftest.$ac_ext" >&5
22171 ac_cv_func_shmat=no
22173 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22175 echo "$as_me:22175: result: $ac_cv_func_shmat" >&5
22176 echo "${ECHO_T}$ac_cv_func_shmat" >&6
22178 if test $ac_cv_func_shmat = no; then
22179 echo "$as_me:22179: checking for shmat in -lipc" >&5
22180 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
22181 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
22182 echo $ECHO_N "(cached) $ECHO_C" >&6
22184 ac_check_lib_save_LIBS=$LIBS
22186 cat >"conftest.$ac_ext" <<_ACEOF
22187 #line 22187 "configure"
22188 #include "confdefs.h"
22190 /* Override any gcc2 internal prototype to avoid an error. */
22194 /* We use char because int might match the return type of a gcc2
22195 builtin and then its argument prototype would still apply. */
22205 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22206 if { (eval echo "$as_me:22206: \"$ac_link\"") >&5
22207 (eval $ac_link) 2>&5
22209 echo "$as_me:22209: \$? = $ac_status" >&5
22210 (exit "$ac_status"); } &&
22211 { ac_try='test -s "conftest$ac_exeext"'
22212 { (eval echo "$as_me:22212: \"$ac_try\"") >&5
22213 (eval $ac_try) 2>&5
22215 echo "$as_me:22215: \$? = $ac_status" >&5
22216 (exit "$ac_status"); }; }; then
22217 ac_cv_lib_ipc_shmat=yes
22219 echo "$as_me: failed program was:" >&5
22220 cat "conftest.$ac_ext" >&5
22221 ac_cv_lib_ipc_shmat=no
22223 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22224 LIBS=$ac_check_lib_save_LIBS
22226 echo "$as_me:22226: result: $ac_cv_lib_ipc_shmat" >&5
22227 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
22228 if test "$ac_cv_lib_ipc_shmat" = yes; then
22229 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
22235 # Check for libraries that X11R6 Xt/Xaw programs need.
22236 ac_save_LDFLAGS=$LDFLAGS
22237 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
22238 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
22239 # check for ICE first), but we must link in the order -lSM -lICE or
22240 # we get undefined symbols. So assume we have SM if we have ICE.
22241 # These have to be linked with before -lX11, unlike the other
22242 # libraries we check for below, so use a different variable.
22243 # John Interrante, Karl Berry
22244 echo "$as_me:22244: checking for IceConnectionNumber in -lICE" >&5
22245 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
22246 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
22247 echo $ECHO_N "(cached) $ECHO_C" >&6
22249 ac_check_lib_save_LIBS=$LIBS
22250 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
22251 cat >"conftest.$ac_ext" <<_ACEOF
22252 #line 22252 "configure"
22253 #include "confdefs.h"
22255 /* Override any gcc2 internal prototype to avoid an error. */
22259 /* We use char because int might match the return type of a gcc2
22260 builtin and then its argument prototype would still apply. */
22261 char IceConnectionNumber ();
22265 IceConnectionNumber ();
22270 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22271 if { (eval echo "$as_me:22271: \"$ac_link\"") >&5
22272 (eval $ac_link) 2>&5
22274 echo "$as_me:22274: \$? = $ac_status" >&5
22275 (exit "$ac_status"); } &&
22276 { ac_try='test -s "conftest$ac_exeext"'
22277 { (eval echo "$as_me:22277: \"$ac_try\"") >&5
22278 (eval $ac_try) 2>&5
22280 echo "$as_me:22280: \$? = $ac_status" >&5
22281 (exit "$ac_status"); }; }; then
22282 ac_cv_lib_ICE_IceConnectionNumber=yes
22284 echo "$as_me: failed program was:" >&5
22285 cat "conftest.$ac_ext" >&5
22286 ac_cv_lib_ICE_IceConnectionNumber=no
22288 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22289 LIBS=$ac_check_lib_save_LIBS
22291 echo "$as_me:22291: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
22292 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
22293 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
22294 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
22297 LDFLAGS=$ac_save_LDFLAGS
22303 if test "$GCC" = yes || test "$GXX" = yes
22306 if test "$GCC" = yes || test "$GXX" = yes
22311 for cf_temp_scan in $CFLAGS
22313 case "x$cf_temp_scan" in
22316 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22317 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22322 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
22323 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
22328 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22329 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22334 if test "x$CFLAGS" != "x$cf_temp_flags"
22336 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
22338 echo "${as_me:-configure}:22338: testing repairing CFLAGS: $CFLAGS ..." 1>&5
22340 CFLAGS="$cf_temp_flags"
22341 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
22343 echo "${as_me:-configure}:22343: testing ... fixed $CFLAGS ..." 1>&5
22345 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
22347 echo "${as_me:-configure}:22347: testing ... extra $EXTRA_CFLAGS ..." 1>&5
22354 if test "$GCC" = yes || test "$GXX" = yes
22359 for cf_temp_scan in $CPPFLAGS
22361 case "x$cf_temp_scan" in
22364 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22365 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22370 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
22371 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
22376 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22377 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22382 if test "x$CPPFLAGS" != "x$cf_temp_flags"
22384 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
22386 echo "${as_me:-configure}:22386: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
22388 CPPFLAGS="$cf_temp_flags"
22389 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
22391 echo "${as_me:-configure}:22391: testing ... fixed $CPPFLAGS ..." 1>&5
22393 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
22395 echo "${as_me:-configure}:22395: testing ... extra $EXTRA_CFLAGS ..." 1>&5
22402 if test "$GCC" = yes || test "$GXX" = yes
22407 for cf_temp_scan in $LDFLAGS
22409 case "x$cf_temp_scan" in
22412 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22413 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22418 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
22419 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
22424 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22425 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22430 if test "x$LDFLAGS" != "x$cf_temp_flags"
22432 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
22434 echo "${as_me:-configure}:22434: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
22436 LDFLAGS="$cf_temp_flags"
22437 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
22439 echo "${as_me:-configure}:22439: testing ... fixed $LDFLAGS ..." 1>&5
22441 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
22443 echo "${as_me:-configure}:22443: testing ... extra $EXTRA_CFLAGS ..." 1>&5
22450 echo "$as_me:22450: checking if you want to turn on gcc warnings" >&5
22451 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
22453 # Check whether --enable-warnings or --disable-warnings was given.
22454 if test "${enable_warnings+set}" = set; then
22455 enableval="$enable_warnings"
22456 test "$enableval" != yes && enableval=no
22457 if test "$enableval" != "no" ; then
22458 enable_warnings=yes
22467 echo "$as_me:22467: result: $enable_warnings" >&5
22468 echo "${ECHO_T}$enable_warnings" >&6
22469 if test "$enable_warnings" = "yes"
22472 if test "$GCC" = yes || test "$GXX" = yes
22474 cat > conftest.i <<EOF
22476 #define GCC_PRINTF 0
22479 #define GCC_SCANF 0
22481 #ifndef GCC_NORETURN
22482 #define GCC_NORETURN /* nothing */
22485 #define GCC_UNUSED /* nothing */
22488 if test "$GCC" = yes
22490 { echo "$as_me:22490: checking for $CC __attribute__ directives..." >&5
22491 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
22492 cat > "conftest.$ac_ext" <<EOF
22493 #line 22493 "${as_me:-configure}"
22495 #include "confdefs.h"
22496 #include "conftest.h"
22497 #include "conftest.i"
22499 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
22501 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
22504 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
22506 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
22508 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
22509 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
22510 extern GCC_NORETURN void foo(void);
22511 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
22513 cf_printf_attribute=no
22514 cf_scanf_attribute=no
22515 for cf_attribute in scanf printf unused noreturn
22518 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22520 cf_directive="__attribute__(($cf_attribute))"
22521 echo "checking for $CC $cf_directive" 1>&5
22523 case "$cf_attribute" in
22525 cf_printf_attribute=yes
22526 cat >conftest.h <<EOF
22527 #define GCC_$cf_ATTRIBUTE 1
22531 cf_scanf_attribute=yes
22532 cat >conftest.h <<EOF
22533 #define GCC_$cf_ATTRIBUTE 1
22537 cat >conftest.h <<EOF
22538 #define GCC_$cf_ATTRIBUTE $cf_directive
22543 if { (eval echo "$as_me:22543: \"$ac_compile\"") >&5
22544 (eval $ac_compile) 2>&5
22546 echo "$as_me:22546: \$? = $ac_status" >&5
22547 (exit "$ac_status"); }; then
22548 test -n "$verbose" && echo "$as_me:22548: result: ... $cf_attribute" >&5
22549 echo "${ECHO_T}... $cf_attribute" >&6
22550 cat conftest.h >>confdefs.h
22551 case "$cf_attribute" in
22554 cat >>confdefs.h <<EOF
22555 #define GCC_NORETURN $cf_directive
22560 cf_value='/* nothing */'
22561 if test "$cf_printf_attribute" != no ; then
22562 cf_value='__attribute__((format(printf,fmt,var)))'
22564 cat >>confdefs.h <<\EOF
22565 #define GCC_PRINTF 1
22570 cat >>confdefs.h <<EOF
22571 #define GCC_PRINTFLIKE(fmt,var) $cf_value
22576 cf_value='/* nothing */'
22577 if test "$cf_scanf_attribute" != no ; then
22578 cf_value='__attribute__((format(scanf,fmt,var)))'
22580 cat >>confdefs.h <<\EOF
22581 #define GCC_SCANF 1
22586 cat >>confdefs.h <<EOF
22587 #define GCC_SCANFLIKE(fmt,var) $cf_value
22593 cat >>confdefs.h <<EOF
22594 #define GCC_UNUSED $cf_directive
22602 ${FGREP-fgrep} define conftest.i >>confdefs.h
22607 if test "x$have_x" = xyes; then
22609 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
22610 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
22611 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
22612 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
22613 for cf_X_CFLAGS in $X_CFLAGS
22615 case "x$cf_X_CFLAGS" in
22617 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
22620 CFLAGS="$CFLAGS $cf_X_CFLAGS"
22625 cat >"conftest.$ac_ext" <<_ACEOF
22626 #line 22626 "configure"
22627 #include "confdefs.h"
22629 #include <stdlib.h>
22630 #include <X11/Intrinsic.h>
22635 String foo = malloc(1); free((void*)foo)
22640 rm -f "conftest.$ac_objext"
22641 if { (eval echo "$as_me:22641: \"$ac_compile\"") >&5
22642 (eval $ac_compile) 2>&5
22644 echo "$as_me:22644: \$? = $ac_status" >&5
22645 (exit "$ac_status"); } &&
22646 { ac_try='test -s "conftest.$ac_objext"'
22647 { (eval echo "$as_me:22647: \"$ac_try\"") >&5
22648 (eval $ac_try) 2>&5
22650 echo "$as_me:22650: \$? = $ac_status" >&5
22651 (exit "$ac_status"); }; }; then
22653 echo "$as_me:22653: checking for X11/Xt const-feature" >&5
22654 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
22655 if test "${cf_cv_const_x_string+set}" = set; then
22656 echo $ECHO_N "(cached) $ECHO_C" >&6
22659 cat >"conftest.$ac_ext" <<_ACEOF
22660 #line 22660 "configure"
22661 #include "confdefs.h"
22663 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
22664 #undef XTSTRINGDEFINES /* X11R5 and later */
22665 #include <stdlib.h>
22666 #include <X11/Intrinsic.h>
22671 String foo = malloc(1); *foo = 0
22676 rm -f "conftest.$ac_objext"
22677 if { (eval echo "$as_me:22677: \"$ac_compile\"") >&5
22678 (eval $ac_compile) 2>&5
22680 echo "$as_me:22680: \$? = $ac_status" >&5
22681 (exit "$ac_status"); } &&
22682 { ac_try='test -s "conftest.$ac_objext"'
22683 { (eval echo "$as_me:22683: \"$ac_try\"") >&5
22684 (eval $ac_try) 2>&5
22686 echo "$as_me:22686: \$? = $ac_status" >&5
22687 (exit "$ac_status"); }; }; then
22689 cf_cv_const_x_string=no
22692 echo "$as_me: failed program was:" >&5
22693 cat "conftest.$ac_ext" >&5
22695 cf_cv_const_x_string=yes
22698 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22701 echo "$as_me:22701: result: $cf_cv_const_x_string" >&5
22702 echo "${ECHO_T}$cf_cv_const_x_string" >&6
22704 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
22705 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
22706 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
22708 case "$cf_cv_const_x_string" in
22711 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22712 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
22717 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22718 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
22724 echo "$as_me: failed program was:" >&5
22725 cat "conftest.$ac_ext" >&5
22727 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22729 cat > "conftest.$ac_ext" <<EOF
22730 #line 22730 "${as_me:-configure}"
22731 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
22733 if test "$INTEL_COMPILER" = yes
22735 # The "-wdXXX" options suppress warnings:
22736 # remark #1419: external declaration in primary source file
22737 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
22738 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
22739 # remark #193: zero used for undefined preprocessing identifier
22740 # remark #593: variable "curs_sb_left_arrow" was set but never used
22741 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
22742 # remark #869: parameter "tw" was never referenced
22743 # remark #981: operands are evaluated in unspecified order
22744 # warning #279: controlling expression is constant
22746 { echo "$as_me:22746: checking for $CC warning options..." >&5
22747 echo "$as_me: checking for $CC warning options..." >&6;}
22748 cf_save_CFLAGS="$CFLAGS"
22749 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
22761 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
22762 if { (eval echo "$as_me:22762: \"$ac_compile\"") >&5
22763 (eval $ac_compile) 2>&5
22765 echo "$as_me:22765: \$? = $ac_status" >&5
22766 (exit "$ac_status"); }; then
22767 test -n "$verbose" && echo "$as_me:22767: result: ... -$cf_opt" >&5
22768 echo "${ECHO_T}... -$cf_opt" >&6
22769 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
22772 CFLAGS="$cf_save_CFLAGS"
22773 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
22775 { echo "$as_me:22775: checking for $CC warning options..." >&5
22776 echo "$as_me: checking for $CC warning options..." >&6;}
22777 cf_save_CFLAGS="$CFLAGS"
22779 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
22780 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
22781 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
22782 for cf_opt in W Wall \
22783 Wbad-function-cast \
22786 Wdeclaration-after-statement \
22789 Wmissing-declarations \
22790 Wmissing-prototypes \
22794 Wstrict-prototypes \
22795 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
22797 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
22798 if { (eval echo "$as_me:22798: \"$ac_compile\"") >&5
22799 (eval $ac_compile) 2>&5
22801 echo "$as_me:22801: \$? = $ac_status" >&5
22802 (exit "$ac_status"); }; then
22803 test -n "$verbose" && echo "$as_me:22803: result: ... -$cf_opt" >&5
22804 echo "${ECHO_T}... -$cf_opt" >&6
22807 case "$GCC_VERSION" in
22809 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
22811 echo "${as_me:-configure}:22811: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
22817 case "$GCC_VERSION" in
22819 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
22821 echo "${as_me:-configure}:22821: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
22827 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
22830 CFLAGS="$cf_save_CFLAGS"
22838 echo "$as_me:22838: checking if you want to use dmalloc for testing" >&5
22839 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
22841 # Check whether --with-dmalloc or --without-dmalloc was given.
22842 if test "${with_dmalloc+set}" = set; then
22843 withval="$with_dmalloc"
22844 case "x$withval" in
22847 : "${with_cflags:=-g}"
22848 : "${enable_leaks:=no}"
22851 cat >>confdefs.h <<EOF
22852 #define USE_DMALLOC 1
22860 echo "$as_me:22860: result: ${with_dmalloc:-no}" >&5
22861 echo "${ECHO_T}${with_dmalloc:-no}" >&6
22863 case ".$with_cflags" in
22873 cf_new_extra_cppflags=
22875 for cf_add_cflags in -g
22877 case "$cf_fix_cppflags" in
22879 case "$cf_add_cflags" in
22880 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22881 case "$cf_add_cflags" in
22883 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22885 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22886 && test -z "${cf_tst_cflags}" \
22887 && cf_fix_cppflags=yes
22889 if test "$cf_fix_cppflags" = yes ; then
22891 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22892 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22895 elif test "${cf_tst_cflags}" = "\"'" ; then
22897 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22898 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22904 case "$CPPFLAGS" in
22908 case "$cf_add_cflags" in
22910 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22912 CPPFLAGS=`echo "$CPPFLAGS" | \
22913 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22914 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22919 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22920 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22927 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22928 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22935 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22936 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22938 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22940 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22941 && test -z "${cf_tst_cflags}" \
22942 && cf_fix_cppflags=no
22947 if test -n "$cf_new_cflags" ; then
22949 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22950 CFLAGS="${CFLAGS}$cf_new_cflags"
22954 if test -n "$cf_new_cppflags" ; then
22956 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22957 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22961 if test -n "$cf_new_extra_cppflags" ; then
22963 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22964 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22973 if test "$with_dmalloc" = yes ; then
22974 echo "$as_me:22974: checking for dmalloc.h" >&5
22975 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
22976 if test "${ac_cv_header_dmalloc_h+set}" = set; then
22977 echo $ECHO_N "(cached) $ECHO_C" >&6
22979 cat >"conftest.$ac_ext" <<_ACEOF
22980 #line 22980 "configure"
22981 #include "confdefs.h"
22982 #include <dmalloc.h>
22984 if { (eval echo "$as_me:22984: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22985 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22987 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22989 cat conftest.err >&5
22990 echo "$as_me:22990: \$? = $ac_status" >&5
22991 (exit "$ac_status"); } >/dev/null; then
22992 if test -s conftest.err; then
22993 ac_cpp_err=$ac_c_preproc_warn_flag
23000 if test -z "$ac_cpp_err"; then
23001 ac_cv_header_dmalloc_h=yes
23003 echo "$as_me: failed program was:" >&5
23004 cat "conftest.$ac_ext" >&5
23005 ac_cv_header_dmalloc_h=no
23007 rm -f conftest.err "conftest.$ac_ext"
23009 echo "$as_me:23009: result: $ac_cv_header_dmalloc_h" >&5
23010 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
23011 if test "$ac_cv_header_dmalloc_h" = yes; then
23013 echo "$as_me:23013: checking for dmalloc_debug in -ldmalloc" >&5
23014 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
23015 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
23016 echo $ECHO_N "(cached) $ECHO_C" >&6
23018 ac_check_lib_save_LIBS=$LIBS
23019 LIBS="-ldmalloc $LIBS"
23020 cat >"conftest.$ac_ext" <<_ACEOF
23021 #line 23021 "configure"
23022 #include "confdefs.h"
23024 /* Override any gcc2 internal prototype to avoid an error. */
23028 /* We use char because int might match the return type of a gcc2
23029 builtin and then its argument prototype would still apply. */
23030 char dmalloc_debug ();
23039 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23040 if { (eval echo "$as_me:23040: \"$ac_link\"") >&5
23041 (eval $ac_link) 2>&5
23043 echo "$as_me:23043: \$? = $ac_status" >&5
23044 (exit "$ac_status"); } &&
23045 { ac_try='test -s "conftest$ac_exeext"'
23046 { (eval echo "$as_me:23046: \"$ac_try\"") >&5
23047 (eval $ac_try) 2>&5
23049 echo "$as_me:23049: \$? = $ac_status" >&5
23050 (exit "$ac_status"); }; }; then
23051 ac_cv_lib_dmalloc_dmalloc_debug=yes
23053 echo "$as_me: failed program was:" >&5
23054 cat "conftest.$ac_ext" >&5
23055 ac_cv_lib_dmalloc_dmalloc_debug=no
23057 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23058 LIBS=$ac_check_lib_save_LIBS
23060 echo "$as_me:23060: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
23061 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
23062 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
23063 cat >>confdefs.h <<EOF
23064 #define HAVE_LIBDMALLOC 1
23067 LIBS="-ldmalloc $LIBS"
23075 echo "$as_me:23075: checking if you want to use dbmalloc for testing" >&5
23076 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
23078 # Check whether --with-dbmalloc or --without-dbmalloc was given.
23079 if test "${with_dbmalloc+set}" = set; then
23080 withval="$with_dbmalloc"
23081 case "x$withval" in
23084 : "${with_cflags:=-g}"
23085 : "${enable_leaks:=no}"
23088 cat >>confdefs.h <<EOF
23089 #define USE_DBMALLOC 1
23097 echo "$as_me:23097: result: ${with_dbmalloc:-no}" >&5
23098 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
23100 case ".$with_cflags" in
23110 cf_new_extra_cppflags=
23112 for cf_add_cflags in -g
23114 case "$cf_fix_cppflags" in
23116 case "$cf_add_cflags" in
23117 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23118 case "$cf_add_cflags" in
23120 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23122 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23123 && test -z "${cf_tst_cflags}" \
23124 && cf_fix_cppflags=yes
23126 if test "$cf_fix_cppflags" = yes ; then
23128 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23129 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23132 elif test "${cf_tst_cflags}" = "\"'" ; then
23134 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23135 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23141 case "$CPPFLAGS" in
23145 case "$cf_add_cflags" in
23147 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23149 CPPFLAGS=`echo "$CPPFLAGS" | \
23150 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
23151 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
23156 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23157 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23164 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23165 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23172 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23173 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23175 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23177 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23178 && test -z "${cf_tst_cflags}" \
23179 && cf_fix_cppflags=no
23184 if test -n "$cf_new_cflags" ; then
23186 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23187 CFLAGS="${CFLAGS}$cf_new_cflags"
23191 if test -n "$cf_new_cppflags" ; then
23193 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23194 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23198 if test -n "$cf_new_extra_cppflags" ; then
23200 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23201 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23210 if test "$with_dbmalloc" = yes ; then
23211 echo "$as_me:23211: checking for dbmalloc.h" >&5
23212 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
23213 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
23214 echo $ECHO_N "(cached) $ECHO_C" >&6
23216 cat >"conftest.$ac_ext" <<_ACEOF
23217 #line 23217 "configure"
23218 #include "confdefs.h"
23219 #include <dbmalloc.h>
23221 if { (eval echo "$as_me:23221: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23222 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23224 $EGREP -v '^ *\+' conftest.er1 >conftest.err
23226 cat conftest.err >&5
23227 echo "$as_me:23227: \$? = $ac_status" >&5
23228 (exit "$ac_status"); } >/dev/null; then
23229 if test -s conftest.err; then
23230 ac_cpp_err=$ac_c_preproc_warn_flag
23237 if test -z "$ac_cpp_err"; then
23238 ac_cv_header_dbmalloc_h=yes
23240 echo "$as_me: failed program was:" >&5
23241 cat "conftest.$ac_ext" >&5
23242 ac_cv_header_dbmalloc_h=no
23244 rm -f conftest.err "conftest.$ac_ext"
23246 echo "$as_me:23246: result: $ac_cv_header_dbmalloc_h" >&5
23247 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
23248 if test "$ac_cv_header_dbmalloc_h" = yes; then
23250 echo "$as_me:23250: checking for debug_malloc in -ldbmalloc" >&5
23251 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
23252 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
23253 echo $ECHO_N "(cached) $ECHO_C" >&6
23255 ac_check_lib_save_LIBS=$LIBS
23256 LIBS="-ldbmalloc $LIBS"
23257 cat >"conftest.$ac_ext" <<_ACEOF
23258 #line 23258 "configure"
23259 #include "confdefs.h"
23261 /* Override any gcc2 internal prototype to avoid an error. */
23265 /* We use char because int might match the return type of a gcc2
23266 builtin and then its argument prototype would still apply. */
23267 char debug_malloc ();
23276 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23277 if { (eval echo "$as_me:23277: \"$ac_link\"") >&5
23278 (eval $ac_link) 2>&5
23280 echo "$as_me:23280: \$? = $ac_status" >&5
23281 (exit "$ac_status"); } &&
23282 { ac_try='test -s "conftest$ac_exeext"'
23283 { (eval echo "$as_me:23283: \"$ac_try\"") >&5
23284 (eval $ac_try) 2>&5
23286 echo "$as_me:23286: \$? = $ac_status" >&5
23287 (exit "$ac_status"); }; }; then
23288 ac_cv_lib_dbmalloc_debug_malloc=yes
23290 echo "$as_me: failed program was:" >&5
23291 cat "conftest.$ac_ext" >&5
23292 ac_cv_lib_dbmalloc_debug_malloc=no
23294 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23295 LIBS=$ac_check_lib_save_LIBS
23297 echo "$as_me:23297: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
23298 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
23299 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
23300 cat >>confdefs.h <<EOF
23301 #define HAVE_LIBDBMALLOC 1
23304 LIBS="-ldbmalloc $LIBS"
23312 echo "$as_me:23312: checking if you want to use valgrind for testing" >&5
23313 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
23315 # Check whether --with-valgrind or --without-valgrind was given.
23316 if test "${with_valgrind+set}" = set; then
23317 withval="$with_valgrind"
23318 case "x$withval" in
23321 : "${with_cflags:=-g}"
23322 : "${enable_leaks:=no}"
23325 cat >>confdefs.h <<EOF
23326 #define USE_VALGRIND 1
23334 echo "$as_me:23334: result: ${with_valgrind:-no}" >&5
23335 echo "${ECHO_T}${with_valgrind:-no}" >&6
23337 case ".$with_cflags" in
23347 cf_new_extra_cppflags=
23349 for cf_add_cflags in -g
23351 case "$cf_fix_cppflags" in
23353 case "$cf_add_cflags" in
23354 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23355 case "$cf_add_cflags" in
23357 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23359 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23360 && test -z "${cf_tst_cflags}" \
23361 && cf_fix_cppflags=yes
23363 if test "$cf_fix_cppflags" = yes ; then
23365 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23366 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23369 elif test "${cf_tst_cflags}" = "\"'" ; then
23371 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23372 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23378 case "$CPPFLAGS" in
23382 case "$cf_add_cflags" in
23384 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23386 CPPFLAGS=`echo "$CPPFLAGS" | \
23387 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
23388 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
23393 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23394 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23401 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23402 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23409 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23410 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23412 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23414 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23415 && test -z "${cf_tst_cflags}" \
23416 && cf_fix_cppflags=no
23421 if test -n "$cf_new_cflags" ; then
23423 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23424 CFLAGS="${CFLAGS}$cf_new_cflags"
23428 if test -n "$cf_new_cppflags" ; then
23430 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23431 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23435 if test -n "$cf_new_extra_cppflags" ; then
23437 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23438 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23447 echo "$as_me:23447: checking if you want to perform memory-leak testing" >&5
23448 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
23450 # Check whether --enable-leaks or --disable-leaks was given.
23451 if test "${enable_leaks+set}" = set; then
23452 enableval="$enable_leaks"
23453 enable_leaks=$enableval
23457 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
23458 echo "$as_me:23458: result: $with_no_leaks" >&5
23459 echo "${ECHO_T}$with_no_leaks" >&6
23461 if test "$enable_leaks" = no ; then
23463 cat >>confdefs.h <<\EOF
23467 cat >>confdefs.h <<\EOF
23468 #define YY_NO_LEAKS 1
23474 if test "x$cf_cv_enable_rpath" != xno
23476 echo "$as_me:23476: checking for an rpath option" >&5
23477 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
23478 case "$cf_cv_system_name" in
23480 if test "$GCC" = yes; then
23481 LD_RPATH_OPT="-Wl,-rpath,"
23483 LD_RPATH_OPT="-rpath "
23486 (linux*|gnu*|k*bsd*-gnu|freebsd*)
23487 LD_RPATH_OPT="-Wl,-rpath,"
23489 (openbsd[2-9].*|mirbsd*)
23490 LD_RPATH_OPT="-Wl,-rpath,"
23493 LD_RPATH_OPT="-rpath "
23496 LD_RPATH_OPT="-Wl,-rpath,"
23499 LD_RPATH_OPT="-rpath "
23507 echo "$as_me:23507: result: $LD_RPATH_OPT" >&5
23508 echo "${ECHO_T}$LD_RPATH_OPT" >&6
23510 case "x$LD_RPATH_OPT" in
23512 echo "$as_me:23512: checking if we need a space after rpath option" >&5
23513 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
23514 cf_save_LIBS="$LIBS"
23516 cf_add_libs="$LIBS"
23519 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23520 # filter duplicates
23521 for cf_add_1lib in $cf_add_0lib; do
23522 for cf_add_2lib in $cf_add_libs; do
23523 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23528 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23530 LIBS="$cf_add_libs"
23532 cat >"conftest.$ac_ext" <<_ACEOF
23533 #line 23533 "configure"
23534 #include "confdefs.h"
23544 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23545 if { (eval echo "$as_me:23545: \"$ac_link\"") >&5
23546 (eval $ac_link) 2>&5
23548 echo "$as_me:23548: \$? = $ac_status" >&5
23549 (exit "$ac_status"); } &&
23550 { ac_try='test -s "conftest$ac_exeext"'
23551 { (eval echo "$as_me:23551: \"$ac_try\"") >&5
23552 (eval $ac_try) 2>&5
23554 echo "$as_me:23554: \$? = $ac_status" >&5
23555 (exit "$ac_status"); }; }; then
23558 echo "$as_me: failed program was:" >&5
23559 cat "conftest.$ac_ext" >&5
23562 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23563 LIBS="$cf_save_LIBS"
23564 echo "$as_me:23564: result: $cf_rpath_space" >&5
23565 echo "${ECHO_T}$cf_rpath_space" >&6
23566 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
23571 echo "$as_me:23571: checking if rpath-hack should be disabled" >&5
23572 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
23574 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
23575 if test "${enable_rpath_hack+set}" = set; then
23576 enableval="$enable_rpath_hack"
23577 test "$enableval" != no && enableval=yes
23578 if test "$enableval" != "yes" ; then
23579 enable_rpath_hack=no
23581 enable_rpath_hack=yes
23585 enable_rpath_hack=yes
23588 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
23589 echo "$as_me:23589: result: $cf_disable_rpath_hack" >&5
23590 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
23592 if test "$enable_rpath_hack" = yes ; then
23594 echo "$as_me:23594: checking for updated LDFLAGS" >&5
23595 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
23596 if test -n "$LD_RPATH_OPT" ; then
23597 echo "$as_me:23597: result: maybe" >&5
23598 echo "${ECHO_T}maybe" >&6
23602 # Extract the first word of "$ac_prog", so it can be a program name with args.
23603 set dummy $ac_prog; ac_word=$2
23604 echo "$as_me:23604: checking for $ac_word" >&5
23605 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23606 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
23607 echo $ECHO_N "(cached) $ECHO_C" >&6
23609 if test -n "$cf_ldd_prog"; then
23610 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
23612 ac_save_IFS=$IFS; IFS=$ac_path_separator
23614 for ac_dir in $ac_dummy; do
23616 test -z "$ac_dir" && ac_dir=.
23617 $as_executable_p "$ac_dir/$ac_word" || continue
23618 ac_cv_prog_cf_ldd_prog="$ac_prog"
23619 echo "$as_me:23619: found $ac_dir/$ac_word" >&5
23625 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
23626 if test -n "$cf_ldd_prog"; then
23627 echo "$as_me:23627: result: $cf_ldd_prog" >&5
23628 echo "${ECHO_T}$cf_ldd_prog" >&6
23630 echo "$as_me:23630: result: no" >&5
23631 echo "${ECHO_T}no" >&6
23634 test -n "$cf_ldd_prog" && break
23636 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
23638 cf_rpath_list="/usr/lib /lib"
23639 if test "$cf_ldd_prog" != no
23643 cat >"conftest.$ac_ext" <<_ACEOF
23644 #line 23644 "configure"
23645 #include "confdefs.h"
23655 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23656 if { (eval echo "$as_me:23656: \"$ac_link\"") >&5
23657 (eval $ac_link) 2>&5
23659 echo "$as_me:23659: \$? = $ac_status" >&5
23660 (exit "$ac_status"); } &&
23661 { ac_try='test -s "conftest$ac_exeext"'
23662 { (eval echo "$as_me:23662: \"$ac_try\"") >&5
23663 (eval $ac_try) 2>&5
23665 echo "$as_me:23665: \$? = $ac_status" >&5
23666 (exit "$ac_status"); }; }; then
23667 cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
23668 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
23670 echo "$as_me: failed program was:" >&5
23671 cat "conftest.$ac_ext" >&5
23673 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23675 # If we passed the link-test, but get a "not found" on a given library,
23676 # this could be due to inept reconfiguration of gcc to make it only
23677 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
23678 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
23679 # /usr/local libraries.
23680 if test -n "$cf_rpath_oops"
23682 for cf_rpath_src in $cf_rpath_oops
23684 for cf_rpath_dir in \
23689 if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
23691 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
23693 echo "${as_me:-configure}:23693: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
23695 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
23703 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
23705 echo "${as_me:-configure}:23705: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
23707 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
23709 echo "${as_me:-configure}:23709: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
23712 for cf_rpath_src in $LDFLAGS
23714 case "$cf_rpath_src" in
23717 # check if this refers to a directory which we will ignore
23719 if test -n "$cf_rpath_list"
23721 for cf_rpath_item in $cf_rpath_list
23723 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
23731 if test "$cf_rpath_skip" = no
23733 # transform the option
23734 if test "$LD_RPATH_OPT" = "-R " ; then
23735 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
23737 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
23740 # if we have not already added this, add it now
23741 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
23742 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
23744 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
23746 echo "${as_me:-configure}:23746: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
23748 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
23753 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
23755 LDFLAGS=$cf_rpath_dst
23757 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
23759 echo "${as_me:-configure}:23759: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
23761 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
23763 echo "${as_me:-configure}:23763: testing ...checking LIBS $LIBS ..." 1>&5
23766 for cf_rpath_src in $LIBS
23768 case "$cf_rpath_src" in
23771 # check if this refers to a directory which we will ignore
23773 if test -n "$cf_rpath_list"
23775 for cf_rpath_item in $cf_rpath_list
23777 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
23785 if test "$cf_rpath_skip" = no
23787 # transform the option
23788 if test "$LD_RPATH_OPT" = "-R " ; then
23789 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
23791 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
23794 # if we have not already added this, add it now
23795 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
23796 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
23798 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
23800 echo "${as_me:-configure}:23800: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
23802 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
23807 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
23811 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
23813 echo "${as_me:-configure}:23813: testing ...checked LIBS $LIBS ..." 1>&5
23815 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
23817 echo "${as_me:-configure}:23817: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
23820 echo "$as_me:23820: result: no" >&5
23821 echo "${ECHO_T}no" >&6
23829 ac_config_files="$ac_config_files Makefile"
23830 ac_config_commands="$ac_config_commands default"
23831 cat >confcache <<\_ACEOF
23832 # This file is a shell script that caches the results of configure
23833 # tests run on this system so they can be shared between configure
23834 # scripts and configure runs, see configure's option --config-cache.
23835 # It is not useful on other systems. If it contains results you don't
23836 # want to keep, you may remove or edit it.
23838 # config.status only pays attention to the cache file if you give it
23839 # the --recheck option to rerun configure.
23841 # `ac_cv_env_foo' variables (set or unset) will be overriden when
23842 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23843 # following values.
23847 # The following way of writing the cache mishandles newlines in values,
23848 # but we know of no workaround that is simple, portable, and efficient.
23849 # So, don't put newlines in cache variables' values.
23850 # Ultrix sh set writes to stderr and can't be redirected directly,
23851 # and sets the high bit in the cache file unless we assign to the vars.
23854 case `(ac_space=' '; set | grep ac_space) 2>&1` in
23856 # `set' does not quote correctly, so add quotes (double-quote
23857 # substitution turns \\\\ into \\, and sed turns \\ into \).
23860 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23863 # `set' quotes correctly as required by POSIX, so do not add quotes.
23865 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23872 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23874 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23876 if cmp -s $cache_file confcache; then :; else
23877 if test -w $cache_file; then
23878 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23879 cat confcache >$cache_file
23881 echo "not updating unwritable cache $cache_file"
23886 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23887 # Let make expand exec_prefix.
23888 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23890 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23891 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23892 # trailing colons and then remove the whole line if VPATH becomes empty
23893 # (actually we leave an empty line to preserve line numbers).
23894 if test "x$srcdir" = x.; then
23895 ac_vpsub='/^[ ]*VPATH[ ]*=/{
23896 s/:*\$(srcdir):*/:/;
23897 s/:*\${srcdir}:*/:/;
23899 s/^\([^=]*=[ ]*\):*/\1/;
23905 DEFS=-DHAVE_CONFIG_H
23907 : "${CONFIG_STATUS=./config.status}"
23908 ac_clean_files_save=$ac_clean_files
23909 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23910 { echo "$as_me:23910: creating $CONFIG_STATUS" >&5
23911 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23912 cat >"$CONFIG_STATUS" <<_ACEOF
23914 # Generated automatically by configure.
23915 # Run this file to recreate the current configuration.
23916 # Compiler output produced by configure, useful for debugging
23917 # configure, is in config.log if it exists.
23919 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
23922 SHELL=\${CONFIG_SHELL-$SHELL}
23923 ac_cs_invocation="\$0 \$@"
23925 CLICOLOR_FORCE= GREP_OPTIONS=
23926 unset CLICOLOR_FORCE GREP_OPTIONS
23929 cat >>"$CONFIG_STATUS" <<\_ACEOF
23930 # Be Bourne compatible
23931 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23934 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23938 # Name of the executable.
23939 as_me=`echo "$0" |sed 's,.*[\\/],,'`
23941 if expr a : '\(a\)' >/dev/null 2>&1; then
23947 rm -f conf$$ conf$$.exe conf$$.file
23949 if ln -s conf$$.file conf$$ 2>/dev/null; then
23950 # We could just check for DJGPP; but this test a) works b) is more generic
23951 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23952 if test -f conf$$.exe; then
23953 # Don't use ln at all; we don't have any links
23958 elif ln conf$$.file conf$$ 2>/dev/null; then
23963 rm -f conf$$ conf$$.exe conf$$.file
23965 as_executable_p="test -f"
23967 # Support unset when possible.
23968 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
23975 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
23976 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
23977 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
23978 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
23979 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
23980 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
23981 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
23982 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
23985 # We need space, tab and new line, in precisely that order.
23991 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
23997 # Files that config.status was made for.
23998 if test -n "$ac_config_files"; then
23999 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
24002 if test -n "$ac_config_headers"; then
24003 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
24006 if test -n "$ac_config_links"; then
24007 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
24010 if test -n "$ac_config_commands"; then
24011 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
24014 cat >>"$CONFIG_STATUS" <<\EOF
24017 \`$as_me' instantiates files from templates according to the
24018 current configuration.
24020 Usage: $0 [OPTIONS] [FILE]...
24022 -h, --help print this help, then exit
24023 -V, --version print version number, then exit
24024 -d, --debug don't remove temporary files
24025 --recheck update $as_me by reconfiguring in the same conditions
24026 --file=FILE[:TEMPLATE]
24027 instantiate the configuration file FILE
24028 --header=FILE[:TEMPLATE]
24029 instantiate the configuration header FILE
24031 Configuration files:
24034 Configuration headers:
24037 Configuration commands:
24040 Report bugs to <dickey@invisible-island.net>."
24043 cat >>"$CONFIG_STATUS" <<EOF
24046 configured by $0, generated by GNU Autoconf 2.52.20230114,
24047 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
24049 Copyright 2003-2022,2023 Thomas E. Dickey
24050 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
24051 Free Software Foundation, Inc.
24052 This config.status script is free software; the Free Software Foundation
24053 gives unlimited permission to copy, distribute and modify it."
24058 cat >>"$CONFIG_STATUS" <<\EOF
24059 # If no file are specified by the user, then we need to provide default
24060 # value. By we need to know if files were specified by the user.
24066 ac_option=`expr "x$1" : 'x\([^=]*\)='`
24067 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
24069 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
24073 *) # This is not an option, so the user has probably given explicit
24075 ac_need_defaults=false;;
24079 # Handling of the options.
24081 cat >>"$CONFIG_STATUS" <<EOF
24082 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24083 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
24084 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
24086 cat >>"$CONFIG_STATUS" <<\EOF
24087 --version | --vers* | -V )
24088 echo "$ac_cs_version"; exit 0 ;;
24090 # Conflict between --help and --header
24091 { { echo "$as_me:24091: error: ambiguous option: $1
24092 Try \`$0 --help' for more information." >&5
24093 echo "$as_me: error: ambiguous option: $1
24094 Try \`$0 --help' for more information." >&2;}
24095 { (exit 1); exit 1; }; };;
24096 --help | --hel | -h )
24097 echo "$ac_cs_usage"; exit 0 ;;
24098 --debug | --d* | -d )
24100 --file | --fil | --fi | --f )
24102 CONFIG_FILES="$CONFIG_FILES $1"
24103 ac_need_defaults=false;;
24104 --header | --heade | --head | --hea )
24106 CONFIG_HEADERS="$CONFIG_HEADERS $1"
24107 ac_need_defaults=false;;
24109 # This is an error.
24110 -*) { { echo "$as_me:24110: error: unrecognized option: $1
24111 Try \`$0 --help' for more information." >&5
24112 echo "$as_me: error: unrecognized option: $1
24113 Try \`$0 --help' for more information." >&2;}
24114 { (exit 1); exit 1; }; } ;;
24116 *) ac_config_targets="$ac_config_targets $1" ;;
24125 ## ----------------------- ##
24126 ## Running config.status. ##
24127 ## ----------------------- ##
24129 This file was extended by $as_me 2.52.20230114, executed with
24130 CONFIG_FILES = $CONFIG_FILES
24131 CONFIG_HEADERS = $CONFIG_HEADERS
24132 CONFIG_LINKS = $CONFIG_LINKS
24133 CONFIG_COMMANDS = $CONFIG_COMMANDS
24134 > "$ac_cs_invocation"
24135 on `(hostname || uname -n) 2>/dev/null | sed 1q`
24140 cat >>"$CONFIG_STATUS" <<EOF
24142 # INIT-COMMANDS section.
24152 cat >>"$CONFIG_STATUS" <<\EOF
24153 for ac_config_target in $ac_config_targets
24155 case "$ac_config_target" in
24156 # Handling of arguments.
24157 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24158 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24159 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
24160 *) { { echo "$as_me:24160: error: invalid argument: $ac_config_target" >&5
24161 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24162 { (exit 1); exit 1; }; };;
24166 # If the user did not use the arguments to specify the items to instantiate,
24167 # then the envvar interface is used. Set only those that are not.
24168 # We use the long form for the default assignment because of an extremely
24169 # bizarre bug on SunOS 4.1.3.
24170 if "$ac_need_defaults"; then
24171 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24172 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24173 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
24176 # Create a temporary directory, and hook for its removal unless debugging.
24179 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
24180 trap '{ (exit 1); exit 1; }' 1 2 13 15
24183 # Create a (secure) tmp directory for tmp files.
24186 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
24187 test -n "$tmp" && test -d "$tmp"
24190 tmp=$TMPDIR/cs$$-$RANDOM
24191 (umask 077 && mkdir "$tmp")
24194 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
24195 { (exit 1); exit 1; }
24200 cat >>"$CONFIG_STATUS" <<EOF
24203 # CONFIG_FILES section.
24206 # No need to generate the scripts if there are no CONFIG_FILES.
24207 # This happens for instance when ./config.status config.h
24208 if test -n "\$CONFIG_FILES"; then
24209 # Protect against being on the right side of a sed subst in config.status.
24210 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
24211 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
24212 s,@SHELL@,$SHELL,;t t
24213 s,@exec_prefix@,$exec_prefix,;t t
24214 s,@prefix@,$prefix,;t t
24215 s,@program_transform_name@,$program_transform_name,;t t
24216 s,@bindir@,$bindir,;t t
24217 s,@sbindir@,$sbindir,;t t
24218 s,@libexecdir@,$libexecdir,;t t
24219 s,@datarootdir@,$datarootdir,;t t
24220 s,@datadir@,$datadir,;t t
24221 s,@sysconfdir@,$sysconfdir,;t t
24222 s,@sharedstatedir@,$sharedstatedir,;t t
24223 s,@localstatedir@,$localstatedir,;t t
24224 s,@runstatedir@,$runstatedir,;t t
24225 s,@libdir@,$libdir,;t t
24226 s,@includedir@,$includedir,;t t
24227 s,@oldincludedir@,$oldincludedir,;t t
24228 s,@infodir@,$infodir,;t t
24229 s,@mandir@,$mandir,;t t
24230 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
24231 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
24232 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
24233 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
24234 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
24235 s,@build_alias@,$build_alias,;t t
24236 s,@host_alias@,$host_alias,;t t
24237 s,@target_alias@,$target_alias,;t t
24238 s,@ECHO_C@,$ECHO_C,;t t
24239 s,@ECHO_N@,$ECHO_N,;t t
24240 s,@ECHO_T@,$ECHO_T,;t t
24241 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
24242 s,@DEFS@,$DEFS,;t t
24243 s,@LIBS@,$LIBS,;t t
24244 s,@build@,$build,;t t
24245 s,@build_cpu@,$build_cpu,;t t
24246 s,@build_vendor@,$build_vendor,;t t
24247 s,@build_os@,$build_os,;t t
24248 s,@host@,$host,;t t
24249 s,@host_cpu@,$host_cpu,;t t
24250 s,@host_vendor@,$host_vendor,;t t
24251 s,@host_os@,$host_os,;t t
24252 s,@SET_MAKE@,$SET_MAKE,;t t
24254 s,@CFLAGS@,$CFLAGS,;t t
24255 s,@LDFLAGS@,$LDFLAGS,;t t
24256 s,@CPPFLAGS@,$CPPFLAGS,;t t
24257 s,@ac_ct_CC@,$ac_ct_CC,;t t
24258 s,@EXEEXT@,$EXEEXT,;t t
24259 s,@OBJEXT@,$OBJEXT,;t t
24260 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
24262 s,@GREP@,$GREP,;t t
24263 s,@EGREP@,$EGREP,;t t
24265 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
24266 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
24267 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
24268 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
24269 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
24270 s,@LINT@,$LINT,;t t
24271 s,@LINT_OPTS@,$LINT_OPTS,;t t
24272 s,@LINT_LIBS@,$LINT_LIBS,;t t
24273 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
24274 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
24275 s,@CTAGS@,$CTAGS,;t t
24276 s,@ETAGS@,$ETAGS,;t t
24277 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
24278 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
24279 s,@MATH_LIB@,$MATH_LIB,;t t
24280 s,@top_builddir@,$top_builddir,;t t
24281 s,@CC_G_OPT@,$CC_G_OPT,;t t
24282 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
24283 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
24284 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
24285 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
24287 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
24288 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
24289 s,@LD_MODEL@,$LD_MODEL,;t t
24290 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
24291 s,@LIBTOOL@,$LIBTOOL,;t t
24292 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
24293 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
24294 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
24295 s,@LIB_LINK@,$LIB_LINK,;t t
24296 s,@LINK_TESTS@,$LINK_TESTS,;t t
24297 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
24298 s,@PACKAGE@,$PACKAGE,;t t
24299 s,@PTHREAD@,$PTHREAD,;t t
24300 s,@TEST_ARGS@,$TEST_ARGS,;t t
24301 s,@TEST_DEPS@,$TEST_DEPS,;t t
24302 s,@TEST_LIBS@,$TEST_LIBS,;t t
24303 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
24304 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
24305 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
24306 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
24307 s,@includesubdir@,$includesubdir,;t t
24308 s,@FGREP@,$FGREP,;t t
24309 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
24310 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
24311 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
24312 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
24313 s,@ECHO_LT@,$ECHO_LT,;t t
24314 s,@ECHO_LD@,$ECHO_LD,;t t
24315 s,@RULE_CC@,$RULE_CC,;t t
24316 s,@SHOW_CC@,$SHOW_CC,;t t
24317 s,@ECHO_CC@,$ECHO_CC,;t t
24318 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
24319 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
24320 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
24321 s,@X_CFLAGS@,$X_CFLAGS,;t t
24322 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
24323 s,@X_LIBS@,$X_LIBS,;t t
24324 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
24325 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
24326 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
24327 s,@cf_cv_screen@,$cf_cv_screen,;t t
24328 s,@RGB_PATH@,$RGB_PATH,;t t
24329 s,@no_x11_rgb@,$no_x11_rgb,;t t
24330 s,@FORM_NAME@,$FORM_NAME,;t t
24331 s,@MENU_NAME@,$MENU_NAME,;t t
24332 s,@PANEL_NAME@,$PANEL_NAME,;t t
24333 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
24334 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
24335 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
24340 cat >>"$CONFIG_STATUS" <<\EOF
24341 # Split the substitutions into bite-sized pieces for seds with
24342 # small command number limits, like on Digital OSF/1 and HP-UX.
24343 ac_max_sed_lines=48
24344 ac_sed_frag=1 # Number of current file.
24345 ac_beg=1 # First line for current file.
24346 ac_end=$ac_max_sed_lines # Line after last line for current file.
24349 while "$ac_more_lines"; do
24350 if test "$ac_beg" -gt 1; then
24351 sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
24353 sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
24355 if test ! -s "$tmp"/subs.frag; then
24356 ac_more_lines=false
24358 # The purpose of the label and of the branching condition is to
24359 # speed up the sed processing (if there are no `@' at all, there
24360 # is no need to browse any of the substitutions).
24361 # These are the two extra sed commands mentioned above.
24363 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
24364 # It is possible to make a multiline substitution using escaped newlines.
24365 # Ensure that we do not split the substitution between script fragments.
24367 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
24368 sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
24369 if test -s "$tmp"/subs.next; then
24370 grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
24371 if test ! -s "$tmp"/subs.edit; then
24372 grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
24373 if test ! -s "$tmp"/subs.edit; then
24374 if test "$ac_beg" -gt 1; then
24375 ac_end=`expr "$ac_end" - 1`
24382 if test -z "$ac_sed_cmds"; then
24383 ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
24385 ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
24387 ac_sed_frag=`expr "$ac_sed_frag" + 1`
24389 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
24392 if test -z "$ac_sed_cmds"; then
24395 fi # test -n "$CONFIG_FILES"
24398 cat >>"$CONFIG_STATUS" <<\EOF
24399 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
24400 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24402 - | *:- | *:-:* ) # input from stdin
24404 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24405 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24406 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24407 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24408 * ) ac_file_in=$ac_file.in ;;
24411 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
24412 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24413 X"$ac_file" : 'X\(//\)[^/]' \| \
24414 X"$ac_file" : 'X\(//\)$' \| \
24415 X"$ac_file" : 'X\(/\)' \| \
24416 . : '\(.\)' 2>/dev/null ||
24418 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24419 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24420 /^X\(\/\/\)$/{ s//\1/; q; }
24421 /^X\(\/\).*/{ s//\1/; q; }
24423 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24424 { case "$ac_dir" in
24425 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24429 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24430 case $as_mkdir_dir in
24431 # Skip DOS drivespec
24432 ?:) as_incr_dir=$as_mkdir_dir ;;
24434 as_incr_dir=$as_incr_dir/$as_mkdir_dir
24435 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24440 ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
24441 # A "../" for each directory in $ac_dir_suffix.
24442 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
24444 ac_dir_suffix= ac_dots=
24449 if test -z "$ac_dots"; then
24452 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
24454 [\\/]* | ?:[\\/]* )
24455 ac_srcdir="$srcdir$ac_dir_suffix";
24456 ac_top_srcdir="$srcdir" ;;
24457 *) # Relative path.
24458 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
24459 ac_top_srcdir="$ac_dots$srcdir" ;;
24463 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
24464 *) ac_INSTALL=$ac_dots$INSTALL ;;
24467 if test x"$ac_file" != x-; then
24468 { echo "$as_me:24468: creating $ac_file" >&5
24469 echo "$as_me: creating $ac_file" >&6;}
24472 # Let's still pretend it is `configure' which instantiates (i.e., don't
24473 # use $as_me), people would be surprised to read:
24474 # /* config.h. Generated automatically by config.status. */
24475 configure_input="Generated automatically from `echo $ac_file_in |
24476 sed 's,.*/,,'` by configure."
24478 # First look for the input files in the build tree, otherwise in the
24480 ac_file_inputs=`IFS=:
24481 for f in $ac_file_in; do
24483 -) echo "$tmp"/stdin ;;
24485 # Absolute (can't be DOS-style, as IFS=:)
24486 test -f "$f" || { { echo "$as_me:24486: error: cannot find input file: $f" >&5
24487 echo "$as_me: error: cannot find input file: $f" >&2;}
24488 { (exit 1); exit 1; }; }
24491 if test -f "$f"; then
24494 elif test -f "$srcdir/$f"; then
24499 { { echo "$as_me:24499: error: cannot find input file: $f" >&5
24500 echo "$as_me: error: cannot find input file: $f" >&2;}
24501 { (exit 1); exit 1; }; }
24504 done` || { (exit 1); exit 1; }
24506 cat >>"$CONFIG_STATUS" <<\EOF
24507 ac_warn_datarootdir=no
24508 if test x"$ac_file" != x-; then
24509 for ac_item in $ac_file_inputs
24511 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
24512 if test -n "$ac_seen"; then
24513 ac_used=`grep '@datarootdir@' "$ac_item"`
24514 if test -z "$ac_used"; then
24515 { echo "$as_me:24515: WARNING: datarootdir was used implicitly but not set:
24517 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
24519 ac_warn_datarootdir=yes
24522 ac_seen=`grep '${datarootdir}' "$ac_item"`
24523 if test -n "$ac_seen"; then
24524 { echo "$as_me:24524: WARNING: datarootdir was used explicitly but not set:
24526 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
24528 ac_warn_datarootdir=yes
24533 if test "x$ac_warn_datarootdir" = xyes; then
24534 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
24538 cat >>"$CONFIG_STATUS" <<EOF
24542 cat >>"$CONFIG_STATUS" <<\EOF
24544 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24545 s,@configure_input@,$configure_input,;t t
24546 s,@srcdir@,$ac_srcdir,;t t
24547 s,@top_srcdir@,$ac_top_srcdir,;t t
24548 s,@INSTALL@,$ac_INSTALL,;t t
24549 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
24552 : "${FGREP:=grep -F}"
24553 : "${EGREP:=grep -E}"
24554 cat >>"$CONFIG_STATUS" <<EOF
24555 : "\${FGREP:=$FGREP}"
24556 : "\${EGREP:=$EGREP}"
24558 cat >>"$CONFIG_STATUS" <<\EOF
24559 if test x"$ac_file" != x-; then
24560 cp "$tmp/out" "$ac_file"
24562 for ac_name in prefix exec_prefix datarootdir
24564 ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
24565 if test -n "$ac_seen"; then
24566 ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"`
24567 if test -z "$ac_init"; then
24568 ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
24569 { echo "$as_me:24569: WARNING: Variable $ac_name is used but was not set:
24571 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
24576 $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
24577 $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
24578 if test -s "$tmp"/out; then
24579 ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
24580 { echo "$as_me:24580: WARNING: Some variables may not be substituted:
24582 echo "$as_me: WARNING: Some variables may not be substituted:
24592 cat >>"$CONFIG_STATUS" <<\EOF
24595 # CONFIG_HEADER section.
24598 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24599 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24601 # ac_d sets the value in "#define NAME VALUE" lines.
24602 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
24603 ac_dB='[ ].*$,\1#\2'
24606 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24607 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
24608 ac_iB='\([ ]\),\1#\2define\3'
24611 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24612 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
24613 ac_uB='$,\1#\2define\3'
24617 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24618 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24620 - | *:- | *:-:* ) # input from stdin
24622 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24623 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24624 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24625 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24626 * ) ac_file_in=$ac_file.in ;;
24629 test x"$ac_file" != x- && { echo "$as_me:24629: creating $ac_file" >&5
24630 echo "$as_me: creating $ac_file" >&6;}
24632 # First look for the input files in the build tree, otherwise in the
24634 ac_file_inputs=`IFS=:
24635 for f in $ac_file_in; do
24637 -) echo "$tmp"/stdin ;;
24639 # Absolute (can't be DOS-style, as IFS=:)
24640 test -f "$f" || { { echo "$as_me:24640: error: cannot find input file: $f" >&5
24641 echo "$as_me: error: cannot find input file: $f" >&2;}
24642 { (exit 1); exit 1; }; }
24645 if test -f "$f"; then
24648 elif test -f "$srcdir/$f"; then
24653 { { echo "$as_me:24653: error: cannot find input file: $f" >&5
24654 echo "$as_me: error: cannot find input file: $f" >&2;}
24655 { (exit 1); exit 1; }; }
24658 done` || { (exit 1); exit 1; }
24659 # Remove the trailing spaces.
24660 sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in
24664 # Transform confdefs.h into a list of #define's. We won't use it as a sed
24665 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
24666 # be either 'cat' or 'sort'.
24667 cat confdefs.h | uniq >conftest.vals
24669 # Break up conftest.vals because some shells have a limit on
24670 # the size of here documents, and old seds have small limits too.
24672 rm -f conftest.tail
24673 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
24674 while grep . conftest.vals >/dev/null
24676 # Write chunks of a limited-size here document to conftest.frag.
24677 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
24678 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
24679 echo 'CEOF' >> "$CONFIG_STATUS"
24680 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
24681 rm -f conftest.vals
24682 mv conftest.tail conftest.vals
24684 rm -f conftest.vals
24686 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
24688 echo ' cat >> conftest.edit <<CEOF
24689 /@DEFS@/r conftest.frag
24692 sed -f conftest.edit "$tmp"/in > "$tmp"/out
24694 mv "$tmp"/out "$tmp"/in
24695 rm -f conftest.edit conftest.frag
24696 ' >> "$CONFIG_STATUS"
24698 cat >>"$CONFIG_STATUS" <<\EOF
24699 # Let's still pretend it is `configure' which instantiates (i.e., don't
24700 # use $as_me), people would be surprised to read:
24701 # /* config.h. Generated automatically by config.status. */
24702 if test x"$ac_file" = x-; then
24703 echo "/* Generated automatically by configure. */" >"$tmp"/config.h
24705 echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h
24707 cat "$tmp"/in >>"$tmp"/config.h
24709 if test x"$ac_file" != x-; then
24710 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
24711 { echo "$as_me:24711: $ac_file is unchanged" >&5
24712 echo "$as_me: $ac_file is unchanged" >&6;}
24714 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24715 X"$ac_file" : 'X\(//\)[^/]' \| \
24716 X"$ac_file" : 'X\(//\)$' \| \
24717 X"$ac_file" : 'X\(/\)' \| \
24718 . : '\(.\)' 2>/dev/null ||
24720 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24721 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24722 /^X\(\/\/\)$/{ s//\1/; q; }
24723 /^X\(\/\).*/{ s//\1/; q; }
24725 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24726 { case "$ac_dir" in
24727 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24731 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24732 case $as_mkdir_dir in
24733 # Skip DOS drivespec
24734 ?:) as_incr_dir=$as_mkdir_dir ;;
24736 as_incr_dir=$as_incr_dir/$as_mkdir_dir
24737 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24744 mv "$tmp/config.h" "$ac_file"
24747 cat "$tmp"/config.h
24748 rm -f "$tmp"/config.h
24752 cat >>"$CONFIG_STATUS" <<\EOF
24754 # CONFIG_COMMANDS section.
24756 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24757 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24758 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24765 if test ! -d "$srcdir/$cf_dir" ; then
24767 elif test -f "$srcdir/$cf_dir/programs" ; then
24768 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
24772 cat >>Makefile <<TEST_EOF
24774 # These rules are generated so we do not rely on suffix rules, which do not
24775 # work consistently for different make-programs (the '\$(MODEL)/' confuses
24776 # some, and the '\$x' confuses others).
24779 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
24782 cat >>Makefile <<TEST_EOF
24784 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
24785 \$(srcdir)/test.priv.h \\
24788 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
24792 if test -f ../config.guess && test -f ../config.sub
24794 cat >>Makefile <<TEST_EOF
24796 # if we used CF_INHERIT for getting these files, we can remove them
24798 rm -f config.guess config.sub
24806 cat >>"$CONFIG_STATUS" <<\EOF
24808 { (exit 0); exit 0; }
24810 chmod +x "$CONFIG_STATUS"
24811 ac_clean_files=$ac_clean_files_save
24813 # configure is writing to config.log, and then calls config.status.
24814 # config.status does its own redirection, appending to config.log.
24815 # Unfortunately, on DOS this fails, as config.log is still kept open
24816 # by configure, so config.status won't be able to write to it; its
24817 # output is simply discarded. So we exec the FD to /dev/null,
24818 # effectively closing config.log, so it can be properly (re)opened and
24819 # appended to by config.status. When coming back to configure, we
24820 # need to make the FD available again.
24821 if test "$no_create" != yes; then
24824 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
24826 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24827 # would make configure fail if this is the last instruction.
24828 "$ac_cs_success" || { (exit 1); exit 1; }