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/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -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" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(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)
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 inteferes" 1>&6
5401 echo "${as_me:-configure}:5401: testing checking if _POSIX_C_SOURCE inteferes ..." 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 gettimeofday" >&5
18566 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18567 if test "${ac_cv_func_gettimeofday+set}" = set; then
18568 echo $ECHO_N "(cached) $ECHO_C" >&6
18570 cat >"conftest.$ac_ext" <<_ACEOF
18571 #line 18571 "configure"
18572 #include "confdefs.h"
18573 #define gettimeofday autoconf_temporary
18574 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18575 #undef gettimeofday
18581 /* We use char because int might match the return type of a gcc2
18582 builtin and then its argument prototype would still apply. */
18583 char gettimeofday (void);
18589 /* The GNU C library defines stubs for functions which it implements
18590 to always fail with ENOSYS. Some functions are actually named
18591 something starting with __ and the normal name is an alias. */
18592 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18593 #error found stub for gettimeofday
18596 return gettimeofday ();
18601 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18602 if { (eval echo "$as_me:18602: \"$ac_link\"") >&5
18603 (eval $ac_link) 2>&5
18605 echo "$as_me:18605: \$? = $ac_status" >&5
18606 (exit "$ac_status"); } &&
18607 { ac_try='test -s "conftest$ac_exeext"'
18608 { (eval echo "$as_me:18608: \"$ac_try\"") >&5
18609 (eval $ac_try) 2>&5
18611 echo "$as_me:18611: \$? = $ac_status" >&5
18612 (exit "$ac_status"); }; }; then
18613 ac_cv_func_gettimeofday=yes
18615 echo "$as_me: failed program was:" >&5
18616 cat "conftest.$ac_ext" >&5
18617 ac_cv_func_gettimeofday=no
18619 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18621 echo "$as_me:18621: result: $ac_cv_func_gettimeofday" >&5
18622 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18623 if test "$ac_cv_func_gettimeofday" = yes; then
18625 cat >>confdefs.h <<\EOF
18626 #define HAVE_GETTIMEOFDAY 1
18631 echo "$as_me:18631: checking for gettimeofday in -lbsd" >&5
18632 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18633 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18634 echo $ECHO_N "(cached) $ECHO_C" >&6
18636 ac_check_lib_save_LIBS=$LIBS
18638 cat >"conftest.$ac_ext" <<_ACEOF
18639 #line 18639 "configure"
18640 #include "confdefs.h"
18642 /* Override any gcc2 internal prototype to avoid an error. */
18646 /* We use char because int might match the return type of a gcc2
18647 builtin and then its argument prototype would still apply. */
18648 char gettimeofday ();
18657 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18658 if { (eval echo "$as_me:18658: \"$ac_link\"") >&5
18659 (eval $ac_link) 2>&5
18661 echo "$as_me:18661: \$? = $ac_status" >&5
18662 (exit "$ac_status"); } &&
18663 { ac_try='test -s "conftest$ac_exeext"'
18664 { (eval echo "$as_me:18664: \"$ac_try\"") >&5
18665 (eval $ac_try) 2>&5
18667 echo "$as_me:18667: \$? = $ac_status" >&5
18668 (exit "$ac_status"); }; }; then
18669 ac_cv_lib_bsd_gettimeofday=yes
18671 echo "$as_me: failed program was:" >&5
18672 cat "conftest.$ac_ext" >&5
18673 ac_cv_lib_bsd_gettimeofday=no
18675 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18676 LIBS=$ac_check_lib_save_LIBS
18678 echo "$as_me:18678: result: $ac_cv_lib_bsd_gettimeofday" >&5
18679 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18680 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18682 cat >>confdefs.h <<\EOF
18683 #define HAVE_GETTIMEOFDAY 1
18686 cf_add_libs="$LIBS"
18689 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18690 # filter duplicates
18691 for cf_add_1lib in $cf_add_0lib; do
18692 for cf_add_2lib in $cf_add_libs; do
18693 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18698 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18700 LIBS="$cf_add_libs"
18715 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18716 echo "$as_me:18716: checking for $ac_func" >&5
18717 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18718 if eval "test \"\${$as_ac_var+set}\" = set"; then
18719 echo $ECHO_N "(cached) $ECHO_C" >&6
18721 cat >"conftest.$ac_ext" <<_ACEOF
18722 #line 18722 "configure"
18723 #include "confdefs.h"
18724 #define $ac_func autoconf_temporary
18725 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18732 /* We use char because int might match the return type of a gcc2
18733 builtin and then its argument prototype would still apply. */
18734 char $ac_func (void);
18740 /* The GNU C library defines stubs for functions which it implements
18741 to always fail with ENOSYS. Some functions are actually named
18742 something starting with __ and the normal name is an alias. */
18743 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18744 #error found stub for $ac_func
18747 return $ac_func ();
18752 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18753 if { (eval echo "$as_me:18753: \"$ac_link\"") >&5
18754 (eval $ac_link) 2>&5
18756 echo "$as_me:18756: \$? = $ac_status" >&5
18757 (exit "$ac_status"); } &&
18758 { ac_try='test -s "conftest$ac_exeext"'
18759 { (eval echo "$as_me:18759: \"$ac_try\"") >&5
18760 (eval $ac_try) 2>&5
18762 echo "$as_me:18762: \$? = $ac_status" >&5
18763 (exit "$ac_status"); }; }; then
18764 eval "$as_ac_var=yes"
18766 echo "$as_me: failed program was:" >&5
18767 cat "conftest.$ac_ext" >&5
18768 eval "$as_ac_var=no"
18770 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18772 echo "$as_me:18772: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18773 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18774 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18775 cat >>confdefs.h <<EOF
18776 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18782 # use a compile-check to work with ncurses*-config and subdirectory includes
18783 echo "$as_me:18783: checking if we can use termcap.h" >&5
18784 echo $ECHO_N "checking if we can use termcap.h... $ECHO_C" >&6
18785 if test "${cf_cv_have_termcap_h+set}" = set; then
18786 echo $ECHO_N "(cached) $ECHO_C" >&6
18789 cat >"conftest.$ac_ext" <<_ACEOF
18790 #line 18790 "configure"
18791 #include "confdefs.h"
18793 #include <curses.h>
18794 #ifdef NCURSES_VERSION
18795 #undef NCURSES_VERSION
18797 #include <termcap.h>
18798 #ifndef NCURSES_VERSION
18799 #error wrong header
18810 rm -f "conftest.$ac_objext"
18811 if { (eval echo "$as_me:18811: \"$ac_compile\"") >&5
18812 (eval $ac_compile) 2>&5
18814 echo "$as_me:18814: \$? = $ac_status" >&5
18815 (exit "$ac_status"); } &&
18816 { ac_try='test -s "conftest.$ac_objext"'
18817 { (eval echo "$as_me:18817: \"$ac_try\"") >&5
18818 (eval $ac_try) 2>&5
18820 echo "$as_me:18820: \$? = $ac_status" >&5
18821 (exit "$ac_status"); }; }; then
18822 cf_cv_have_termcap_h=yes
18824 echo "$as_me: failed program was:" >&5
18825 cat "conftest.$ac_ext" >&5
18826 cf_cv_have_termcap_h=no
18828 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18830 echo "$as_me:18830: result: $cf_cv_have_termcap_h" >&5
18831 echo "${ECHO_T}$cf_cv_have_termcap_h" >&6
18832 if test "x$cf_cv_have_termcap_h" = xyes
18835 cat >>confdefs.h <<\EOF
18836 #define HAVE_TERMCAP_H 1
18840 echo "$as_me:18840: checking if we can use ncurses/termcap.h" >&5
18841 echo $ECHO_N "checking if we can use ncurses/termcap.h... $ECHO_C" >&6
18842 if test "${cf_cv_have_ncurses_termcap_h+set}" = set; then
18843 echo $ECHO_N "(cached) $ECHO_C" >&6
18846 cat >"conftest.$ac_ext" <<_ACEOF
18847 #line 18847 "configure"
18848 #include "confdefs.h"
18850 #include <ncurses/curses.h>
18851 #ifdef NCURSES_VERSION
18852 #undef NCURSES_VERSION
18854 #include <ncurses/termcap.h>
18855 #ifndef NCURSES_VERSION
18856 #error wrong header
18867 rm -f "conftest.$ac_objext"
18868 if { (eval echo "$as_me:18868: \"$ac_compile\"") >&5
18869 (eval $ac_compile) 2>&5
18871 echo "$as_me:18871: \$? = $ac_status" >&5
18872 (exit "$ac_status"); } &&
18873 { ac_try='test -s "conftest.$ac_objext"'
18874 { (eval echo "$as_me:18874: \"$ac_try\"") >&5
18875 (eval $ac_try) 2>&5
18877 echo "$as_me:18877: \$? = $ac_status" >&5
18878 (exit "$ac_status"); }; }; then
18879 cf_cv_have_ncurses_termcap_h=yes
18881 echo "$as_me: failed program was:" >&5
18882 cat "conftest.$ac_ext" >&5
18883 cf_cv_have_ncurses_termcap_h=no
18885 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18887 echo "$as_me:18887: result: $cf_cv_have_ncurses_termcap_h" >&5
18888 echo "${ECHO_T}$cf_cv_have_ncurses_termcap_h" >&6
18889 test "x$cf_cv_have_ncurses_termcap_h" = xyes &&
18890 cat >>confdefs.h <<\EOF
18891 #define HAVE_NCURSES_TERMCAP_H 1
18896 if test "x$ac_cv_func_getopt" = xno; then
18897 { { echo "$as_me:18897: error: getopt is required for building programs" >&5
18898 echo "$as_me: error: getopt is required for building programs" >&2;}
18899 { (exit 1); exit 1; }; }
18902 if test "$cf_enable_widec" = yes; then
18915 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18916 echo "$as_me:18916: checking for $ac_func" >&5
18917 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18918 if eval "test \"\${$as_ac_var+set}\" = set"; then
18919 echo $ECHO_N "(cached) $ECHO_C" >&6
18921 cat >"conftest.$ac_ext" <<_ACEOF
18922 #line 18922 "configure"
18923 #include "confdefs.h"
18924 #define $ac_func autoconf_temporary
18925 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
18932 /* We use char because int might match the return type of a gcc2
18933 builtin and then its argument prototype would still apply. */
18934 char $ac_func (void);
18940 /* The GNU C library defines stubs for functions which it implements
18941 to always fail with ENOSYS. Some functions are actually named
18942 something starting with __ and the normal name is an alias. */
18943 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18944 #error found stub for $ac_func
18947 return $ac_func ();
18952 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18953 if { (eval echo "$as_me:18953: \"$ac_link\"") >&5
18954 (eval $ac_link) 2>&5
18956 echo "$as_me:18956: \$? = $ac_status" >&5
18957 (exit "$ac_status"); } &&
18958 { ac_try='test -s "conftest$ac_exeext"'
18959 { (eval echo "$as_me:18959: \"$ac_try\"") >&5
18960 (eval $ac_try) 2>&5
18962 echo "$as_me:18962: \$? = $ac_status" >&5
18963 (exit "$ac_status"); }; }; then
18964 eval "$as_ac_var=yes"
18966 echo "$as_me: failed program was:" >&5
18967 cat "conftest.$ac_ext" >&5
18968 eval "$as_ac_var=no"
18970 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18972 echo "$as_me:18972: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18973 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18974 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18975 cat >>confdefs.h <<EOF
18976 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18984 echo "$as_me:18984: checking definition to turn on extended curses functions" >&5
18985 echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
18986 if test "${cf_cv_need_xopen_extension+set}" = set; then
18987 echo $ECHO_N "(cached) $ECHO_C" >&6
18990 cf_cv_need_xopen_extension=unknown
18991 cat >"conftest.$ac_ext" <<_ACEOF
18992 #line 18992 "configure"
18993 #include "confdefs.h"
18995 $ac_includes_default
18996 #include <${cf_cv_ncurses_header:-curses.h}>
19001 #if defined(NCURSES_VERSION_PATCH)
19002 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
19006 #ifdef NCURSES_WIDECHAR
19007 make an error /* prefer to fall-through on the second checks */
19010 int check2 = curs_set((int)sizeof(check));
19011 long x = winnstr(stdscr, "", 0);
19014 getbegyx(stdscr, y1, x1);
19023 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19024 if { (eval echo "$as_me:19024: \"$ac_link\"") >&5
19025 (eval $ac_link) 2>&5
19027 echo "$as_me:19027: \$? = $ac_status" >&5
19028 (exit "$ac_status"); } &&
19029 { ac_try='test -s "conftest$ac_exeext"'
19030 { (eval echo "$as_me:19030: \"$ac_try\"") >&5
19031 (eval $ac_try) 2>&5
19033 echo "$as_me:19033: \$? = $ac_status" >&5
19034 (exit "$ac_status"); }; }; then
19035 cf_cv_need_xopen_extension=none
19037 echo "$as_me: failed program was:" >&5
19038 cat "conftest.$ac_ext" >&5
19040 for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
19042 cat >"conftest.$ac_ext" <<_ACEOF
19043 #line 19043 "configure"
19044 #include "confdefs.h"
19046 #define $cf_try_xopen_extension 1
19047 $ac_includes_default
19048 #include <${cf_cv_ncurses_header:-curses.h}>
19054 int check2 = curs_set((int)sizeof(check));
19055 long x = winnstr(stdscr, "", 0);
19057 getbegyx(stdscr, y1, x1);
19067 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19068 if { (eval echo "$as_me:19068: \"$ac_link\"") >&5
19069 (eval $ac_link) 2>&5
19071 echo "$as_me:19071: \$? = $ac_status" >&5
19072 (exit "$ac_status"); } &&
19073 { ac_try='test -s "conftest$ac_exeext"'
19074 { (eval echo "$as_me:19074: \"$ac_try\"") >&5
19075 (eval $ac_try) 2>&5
19077 echo "$as_me:19077: \$? = $ac_status" >&5
19078 (exit "$ac_status"); }; }; then
19079 cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
19081 echo "$as_me: failed program was:" >&5
19082 cat "conftest.$ac_ext" >&5
19084 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19088 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19091 echo "$as_me:19091: result: $cf_cv_need_xopen_extension" >&5
19092 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
19094 case "$cf_cv_need_xopen_extension" in
19097 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19098 CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
19103 echo "$as_me:19103: checking for term.h" >&5
19104 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
19105 if test "${cf_cv_term_header+set}" = set; then
19106 echo $ECHO_N "(cached) $ECHO_C" >&6
19109 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
19110 # for <term.h> if we do not find the variant.
19112 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
19114 case "${cf_cv_ncurses_header:-curses.h}" in
19116 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
19117 cf_header_list="$cf_header_item $cf_header_list"
19121 for cf_header in $cf_header_list
19123 cat >"conftest.$ac_ext" <<_ACEOF
19124 #line 19124 "configure"
19125 #include "confdefs.h"
19127 #include <${cf_cv_ncurses_header:-curses.h}>
19128 #include <${cf_header}>
19137 rm -f "conftest.$ac_objext"
19138 if { (eval echo "$as_me:19138: \"$ac_compile\"") >&5
19139 (eval $ac_compile) 2>&5
19141 echo "$as_me:19141: \$? = $ac_status" >&5
19142 (exit "$ac_status"); } &&
19143 { ac_try='test -s "conftest.$ac_objext"'
19144 { (eval echo "$as_me:19144: \"$ac_try\"") >&5
19145 (eval $ac_try) 2>&5
19147 echo "$as_me:19147: \$? = $ac_status" >&5
19148 (exit "$ac_status"); }; }; then
19149 cf_cv_term_header=$cf_header
19152 echo "$as_me: failed program was:" >&5
19153 cat "conftest.$ac_ext" >&5
19154 cf_cv_term_header=no
19156 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19159 case "$cf_cv_term_header" in
19161 # If curses is ncurses, some packagers still mess it up by trying to make
19162 # us use GNU termcap. This handles the most common case.
19163 for cf_header in ncurses/term.h ncursesw/term.h
19165 cat >"conftest.$ac_ext" <<_ACEOF
19166 #line 19166 "configure"
19167 #include "confdefs.h"
19169 #include <${cf_cv_ncurses_header:-curses.h}>
19170 #ifdef NCURSES_VERSION
19171 #include <${cf_header}>
19183 rm -f "conftest.$ac_objext"
19184 if { (eval echo "$as_me:19184: \"$ac_compile\"") >&5
19185 (eval $ac_compile) 2>&5
19187 echo "$as_me:19187: \$? = $ac_status" >&5
19188 (exit "$ac_status"); } &&
19189 { ac_try='test -s "conftest.$ac_objext"'
19190 { (eval echo "$as_me:19190: \"$ac_try\"") >&5
19191 (eval $ac_try) 2>&5
19193 echo "$as_me:19193: \$? = $ac_status" >&5
19194 (exit "$ac_status"); }; }; then
19195 cf_cv_term_header=$cf_header
19198 echo "$as_me: failed program was:" >&5
19199 cat "conftest.$ac_ext" >&5
19200 cf_cv_term_header=no
19202 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19208 echo "$as_me:19208: result: $cf_cv_term_header" >&5
19209 echo "${ECHO_T}$cf_cv_term_header" >&6
19211 case "$cf_cv_term_header" in
19214 cat >>confdefs.h <<\EOF
19215 #define HAVE_TERM_H 1
19221 cat >>confdefs.h <<\EOF
19222 #define HAVE_NCURSES_TERM_H 1
19228 cat >>confdefs.h <<\EOF
19229 #define HAVE_NCURSESW_TERM_H 1
19235 echo "$as_me:19235: checking for unctrl.h" >&5
19236 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
19237 if test "${cf_cv_unctrl_header+set}" = set; then
19238 echo $ECHO_N "(cached) $ECHO_C" >&6
19241 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
19242 # for <unctrl.h> if we do not find the variant.
19244 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
19246 case "${cf_cv_ncurses_header:-curses.h}" in
19248 cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
19249 cf_header_list="$cf_header_item $cf_header_list"
19253 for cf_header in $cf_header_list
19255 cat >"conftest.$ac_ext" <<_ACEOF
19256 #line 19256 "configure"
19257 #include "confdefs.h"
19259 #include <${cf_cv_ncurses_header:-curses.h}>
19260 #include <${cf_header}>
19269 rm -f "conftest.$ac_objext"
19270 if { (eval echo "$as_me:19270: \"$ac_compile\"") >&5
19271 (eval $ac_compile) 2>&5
19273 echo "$as_me:19273: \$? = $ac_status" >&5
19274 (exit "$ac_status"); } &&
19275 { ac_try='test -s "conftest.$ac_objext"'
19276 { (eval echo "$as_me:19276: \"$ac_try\"") >&5
19277 (eval $ac_try) 2>&5
19279 echo "$as_me:19279: \$? = $ac_status" >&5
19280 (exit "$ac_status"); }; }; then
19281 cf_cv_unctrl_header=$cf_header
19284 echo "$as_me: failed program was:" >&5
19285 cat "conftest.$ac_ext" >&5
19286 cf_cv_unctrl_header=no
19288 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19292 echo "$as_me:19292: result: $cf_cv_unctrl_header" >&5
19293 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
19295 case "$cf_cv_unctrl_header" in
19297 { echo "$as_me:19297: WARNING: unctrl.h header not found" >&5
19298 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
19302 case "$cf_cv_unctrl_header" in
19305 cat >>confdefs.h <<\EOF
19306 #define HAVE_UNCTRL_H 1
19312 cat >>confdefs.h <<\EOF
19313 #define HAVE_NCURSES_UNCTRL_H 1
19317 (ncursesw/unctrl.h)
19319 cat >>confdefs.h <<\EOF
19320 #define HAVE_NCURSESW_UNCTRL_H 1
19328 assume_default_colors \
19346 init_extended_color \
19354 reset_color_pairs \
19371 use_default_colors \
19373 use_extended_names \
19389 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19391 echo "$as_me:19391: checking for ${cf_func}" >&5
19392 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
19394 echo "${as_me:-configure}:19394: testing ${cf_func} ..." 1>&5
19396 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
19397 echo $ECHO_N "(cached) $ECHO_C" >&6
19400 eval cf_result='$ac_cv_func_'$cf_func
19401 if test ".$cf_result" != ".no"; then
19402 cat >"conftest.$ac_ext" <<_ACEOF
19403 #line 19403 "configure"
19404 #include "confdefs.h"
19406 #ifdef HAVE_XCURSES
19407 #include <xcurses.h>
19408 char * XCursesProgramName = "test";
19410 #include <${cf_cv_ncurses_header:-curses.h}>
19411 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19412 #include <ncursesw/term.h>
19413 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19414 #include <ncurses/term.h>
19415 #elif defined(HAVE_TERM_H)
19425 long foo = (long)(&${cf_func});
19426 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
19427 if (foo + 1234L > 5678L)
19428 ${cf_cv_main_return:-return}(foo != 0);
19435 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19436 if { (eval echo "$as_me:19436: \"$ac_link\"") >&5
19437 (eval $ac_link) 2>&5
19439 echo "$as_me:19439: \$? = $ac_status" >&5
19440 (exit "$ac_status"); } &&
19441 { ac_try='test -s "conftest$ac_exeext"'
19442 { (eval echo "$as_me:19442: \"$ac_try\"") >&5
19443 (eval $ac_try) 2>&5
19445 echo "$as_me:19445: \$? = $ac_status" >&5
19446 (exit "$ac_status"); }; }; then
19449 echo "$as_me: failed program was:" >&5
19450 cat "conftest.$ac_ext" >&5
19453 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19455 eval 'cf_cv_func_'$cf_func'="$cf_result"'
19459 # use the computed/retrieved cache-value:
19460 eval 'cf_result=$cf_cv_func_'$cf_func
19461 echo "$as_me:19461: result: $cf_result" >&5
19462 echo "${ECHO_T}$cf_result" >&6
19463 if test "$cf_result" != no; then
19464 cat >>confdefs.h <<EOF
19465 #define HAVE_${cf_tr_func} 1
19471 for cf_func in tputs
19474 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19476 echo "$as_me:19476: checking for ${cf_func}" >&5
19477 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
19479 echo "${as_me:-configure}:19479: testing ${cf_func} ..." 1>&5
19481 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
19482 echo $ECHO_N "(cached) $ECHO_C" >&6
19485 eval cf_result='$ac_cv_func_'$cf_func
19486 if test ".$cf_result" != ".no"; then
19487 cat >"conftest.$ac_ext" <<_ACEOF
19488 #line 19488 "configure"
19489 #include "confdefs.h"
19491 #ifdef HAVE_XCURSES
19492 #include <xcurses.h>
19493 char * XCursesProgramName = "test";
19495 #include <${cf_cv_ncurses_header:-curses.h}>
19496 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
19497 #include <ncursesw/term.h>
19498 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
19499 #include <ncurses/term.h>
19500 #elif defined(HAVE_TERM_H)
19510 long foo = (long)(&${cf_func});
19511 fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
19512 if (foo + 1234L > 5678L)
19513 ${cf_cv_main_return:-return}(foo != 0);
19520 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19521 if { (eval echo "$as_me:19521: \"$ac_link\"") >&5
19522 (eval $ac_link) 2>&5
19524 echo "$as_me:19524: \$? = $ac_status" >&5
19525 (exit "$ac_status"); } &&
19526 { ac_try='test -s "conftest$ac_exeext"'
19527 { (eval echo "$as_me:19527: \"$ac_try\"") >&5
19528 (eval $ac_try) 2>&5
19530 echo "$as_me:19530: \$? = $ac_status" >&5
19531 (exit "$ac_status"); }; }; then
19534 echo "$as_me: failed program was:" >&5
19535 cat "conftest.$ac_ext" >&5
19538 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19540 eval 'cf_cv_func_'$cf_func'="$cf_result"'
19544 # use the computed/retrieved cache-value:
19545 eval 'cf_result=$cf_cv_func_'$cf_func
19546 echo "$as_me:19546: result: $cf_result" >&5
19547 echo "${ECHO_T}$cf_result" >&6
19548 if test "$cf_result" != no; then
19549 cat >>confdefs.h <<EOF
19550 #define HAVE_${cf_tr_func} 1
19556 if test "x$cf_cv_func_tputs" = xyes
19559 for cf_arg in int char
19561 for cf_ret in int void
19563 if test "$cf_ret" = void
19565 cf_return="/* nothing */"
19567 cf_return="return value"
19569 cat >"conftest.$ac_ext" <<_ACEOF
19570 #line 19570 "configure"
19571 #include "confdefs.h"
19573 #include <${cf_cv_ncurses_header:-curses.h}>
19574 #include <$cf_cv_term_header>
19576 static $cf_ret outc($cf_arg value) { $cf_return; }
19582 tputs("hello", 0, outc);
19583 ${cf_cv_main_return:-return}(0);
19589 rm -f "conftest.$ac_objext"
19590 if { (eval echo "$as_me:19590: \"$ac_compile\"") >&5
19591 (eval $ac_compile) 2>&5
19593 echo "$as_me:19593: \$? = $ac_status" >&5
19594 (exit "$ac_status"); } &&
19595 { ac_try='test -s "conftest.$ac_objext"'
19596 { (eval echo "$as_me:19596: \"$ac_try\"") >&5
19597 (eval $ac_try) 2>&5
19599 echo "$as_me:19599: \$? = $ac_status" >&5
19600 (exit "$ac_status"); }; }; then
19602 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
19604 echo "${as_me:-configure}:19604: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
19606 cat >>confdefs.h <<EOF
19607 #define TPUTS_ARG $cf_arg
19608 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
19609 #define TPUTS_RETURN(value) $cf_return
19615 echo "$as_me: failed program was:" >&5
19616 cat "conftest.$ac_ext" >&5
19618 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19620 test "$cf_done" = yes && break
19624 echo "$as_me:19624: checking for ncurses extended functions" >&5
19625 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
19626 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
19627 echo $ECHO_N "(cached) $ECHO_C" >&6
19630 cat >"conftest.$ac_ext" <<_ACEOF
19631 #line 19631 "configure"
19632 #include "confdefs.h"
19634 #include <${cf_cv_ncurses_header:-curses.h}>
19639 int x = NCURSES_EXT_FUNCS
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
19657 cf_cv_ncurses_ext_funcs=defined
19659 echo "$as_me: failed program was:" >&5
19660 cat "conftest.$ac_ext" >&5
19662 cat >"conftest.$ac_ext" <<_ACEOF
19663 #line 19663 "configure"
19664 #include "confdefs.h"
19666 #include <${cf_cv_ncurses_header:-curses.h}>
19671 (void) assume_default_colors (0, 0);
19672 (void) curses_version ();
19673 (void) define_key (0, 0);
19674 (void) is_term_resized (0, 0);
19675 (void) key_defined (0);
19676 (void) keybound (0, 0);
19677 (void) keyok (0, 0);
19678 (void) resize_term (0, 0);
19679 (void) resizeterm (0, 0);
19680 (void) use_default_colors ();
19681 (void) use_extended_names (0);
19682 (void) wresize (0, 0, 0);
19687 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19688 if { (eval echo "$as_me:19688: \"$ac_link\"") >&5
19689 (eval $ac_link) 2>&5
19691 echo "$as_me:19691: \$? = $ac_status" >&5
19692 (exit "$ac_status"); } &&
19693 { ac_try='test -s "conftest$ac_exeext"'
19694 { (eval echo "$as_me:19694: \"$ac_try\"") >&5
19695 (eval $ac_try) 2>&5
19697 echo "$as_me:19697: \$? = $ac_status" >&5
19698 (exit "$ac_status"); }; }; then
19699 cf_cv_ncurses_ext_funcs=yes
19701 echo "$as_me: failed program was:" >&5
19702 cat "conftest.$ac_ext" >&5
19703 cf_cv_ncurses_ext_funcs=no
19705 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19708 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19711 echo "$as_me:19711: result: $cf_cv_ncurses_ext_funcs" >&5
19712 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
19713 test "$cf_cv_ncurses_ext_funcs" = yes &&
19714 cat >>confdefs.h <<\EOF
19715 #define NCURSES_EXT_FUNCS 1
19718 if test "$cf_enable_widec" = yes
19720 # workaround for systems with ncurses before 20111029, due to change of
19721 # feature test macro from _XPG5 to _XOPEN_SOURCE
19722 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
19725 echo "$as_me:19725: checking if _XPG5 should be defined to enable wide-characters" >&5
19726 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
19728 cat >"conftest.$ac_ext" <<_ACEOF
19729 #line 19729 "configure"
19730 #include "confdefs.h"
19732 #include <${cf_cv_ncurses_header:-curses.h}>
19741 rm -f "conftest.$ac_objext"
19742 if { (eval echo "$as_me:19742: \"$ac_compile\"") >&5
19743 (eval $ac_compile) 2>&5
19745 echo "$as_me:19745: \$? = $ac_status" >&5
19746 (exit "$ac_status"); } &&
19747 { ac_try='test -s "conftest.$ac_objext"'
19748 { (eval echo "$as_me:19748: \"$ac_try\"") >&5
19749 (eval $ac_try) 2>&5
19751 echo "$as_me:19751: \$? = $ac_status" >&5
19752 (exit "$ac_status"); }; }; then
19755 echo "$as_me: failed program was:" >&5
19756 cat "conftest.$ac_ext" >&5
19757 cf_save_cppflags="$CPPFLAGS"
19758 CPPFLAGS="$CPPFLAGS -D_XPG5"
19759 cat >"conftest.$ac_ext" <<_ACEOF
19760 #line 19760 "configure"
19761 #include "confdefs.h"
19763 #include <${cf_cv_ncurses_header:-curses.h}>
19772 rm -f "conftest.$ac_objext"
19773 if { (eval echo "$as_me:19773: \"$ac_compile\"") >&5
19774 (eval $ac_compile) 2>&5
19776 echo "$as_me:19776: \$? = $ac_status" >&5
19777 (exit "$ac_status"); } &&
19778 { ac_try='test -s "conftest.$ac_objext"'
19779 { (eval echo "$as_me:19779: \"$ac_try\"") >&5
19780 (eval $ac_try) 2>&5
19782 echo "$as_me:19782: \$? = $ac_status" >&5
19783 (exit "$ac_status"); }; }; then
19786 echo "$as_me: failed program was:" >&5
19787 cat "conftest.$ac_ext" >&5
19789 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19790 CPPFLAGS="$cf_save_cppflags"
19792 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19793 echo "$as_me:19793: result: $cf_define_xpg5" >&5
19794 echo "${ECHO_T}$cf_define_xpg5" >&6
19796 if test "$cf_define_xpg5" = yes
19798 CPPFLAGS="$CPPFLAGS -D_XPG5"
19802 echo "$as_me:19802: checking for wide-character functions" >&5
19803 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
19804 if test "${cf_cv_widechar_funcs+set}" = set; then
19805 echo $ECHO_N "(cached) $ECHO_C" >&6
19808 cat >"conftest.$ac_ext" <<_ACEOF
19809 #line 19809 "configure"
19810 #include "confdefs.h"
19812 #include <${cf_cv_ncurses_header:-curses.h}>
19817 static wchar_t src_wchar[2];
19818 static cchar_t dst_cchar;
19819 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
19825 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19826 if { (eval echo "$as_me:19826: \"$ac_link\"") >&5
19827 (eval $ac_link) 2>&5
19829 echo "$as_me:19829: \$? = $ac_status" >&5
19830 (exit "$ac_status"); } &&
19831 { ac_try='test -s "conftest$ac_exeext"'
19832 { (eval echo "$as_me:19832: \"$ac_try\"") >&5
19833 (eval $ac_try) 2>&5
19835 echo "$as_me:19835: \$? = $ac_status" >&5
19836 (exit "$ac_status"); }; }; then
19837 cf_cv_widechar_funcs=yes
19839 echo "$as_me: failed program was:" >&5
19840 cat "conftest.$ac_ext" >&5
19841 cf_cv_widechar_funcs=no
19843 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19846 echo "$as_me:19846: result: $cf_cv_widechar_funcs" >&5
19847 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
19848 if test "$cf_cv_widechar_funcs" != no ; then
19850 cat >>confdefs.h <<\EOF
19851 #define USE_WIDEC_SUPPORT 1
19855 cat >>confdefs.h <<\EOF
19856 #define USE_WIDEC_SUPPORT 0
19861 cat >>confdefs.h <<\EOF
19862 #define USE_WIDEC_SUPPORT 0
19867 echo "$as_me:19867: checking if $cf_cv_screen library uses pthreads" >&5
19868 echo $ECHO_N "checking if $cf_cv_screen library uses pthreads... $ECHO_C" >&6
19869 if test "${cf_cv_use_pthreads+set}" = set; then
19870 echo $ECHO_N "(cached) $ECHO_C" >&6
19873 cat >"conftest.$ac_ext" <<_ACEOF
19874 #line 19874 "configure"
19875 #include "confdefs.h"
19877 #include <${cf_cv_ncurses_header:-curses.h}>
19878 extern void _nc_init_pthreads(void);
19885 _nc_init_pthreads();
19891 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19892 if { (eval echo "$as_me:19892: \"$ac_link\"") >&5
19893 (eval $ac_link) 2>&5
19895 echo "$as_me:19895: \$? = $ac_status" >&5
19896 (exit "$ac_status"); } &&
19897 { ac_try='test -s "conftest$ac_exeext"'
19898 { (eval echo "$as_me:19898: \"$ac_try\"") >&5
19899 (eval $ac_try) 2>&5
19901 echo "$as_me:19901: \$? = $ac_status" >&5
19902 (exit "$ac_status"); }; }; then
19903 cf_cv_use_pthreads=yes
19905 echo "$as_me: failed program was:" >&5
19906 cat "conftest.$ac_ext" >&5
19907 cf_cv_use_pthreads=no
19909 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19912 echo "$as_me:19912: result: $cf_cv_use_pthreads" >&5
19913 echo "${ECHO_T}$cf_cv_use_pthreads" >&6
19914 test $cf_cv_use_pthreads = yes &&
19915 cat >>confdefs.h <<\EOF
19916 #define USE_PTHREADS 1
19919 echo "$as_me:19919: checking if sys/time.h works with sys/select.h" >&5
19920 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
19921 if test "${cf_cv_sys_time_select+set}" = set; then
19922 echo $ECHO_N "(cached) $ECHO_C" >&6
19925 cat >"conftest.$ac_ext" <<_ACEOF
19926 #line 19926 "configure"
19927 #include "confdefs.h"
19929 #include <sys/types.h>
19930 #ifdef HAVE_SYS_TIME_H
19931 #include <sys/time.h>
19933 #ifdef HAVE_SYS_SELECT_H
19934 #include <sys/select.h>
19945 rm -f "conftest.$ac_objext"
19946 if { (eval echo "$as_me:19946: \"$ac_compile\"") >&5
19947 (eval $ac_compile) 2>&5
19949 echo "$as_me:19949: \$? = $ac_status" >&5
19950 (exit "$ac_status"); } &&
19951 { ac_try='test -s "conftest.$ac_objext"'
19952 { (eval echo "$as_me:19952: \"$ac_try\"") >&5
19953 (eval $ac_try) 2>&5
19955 echo "$as_me:19955: \$? = $ac_status" >&5
19956 (exit "$ac_status"); }; }; then
19957 cf_cv_sys_time_select=yes
19959 echo "$as_me: failed program was:" >&5
19960 cat "conftest.$ac_ext" >&5
19961 cf_cv_sys_time_select=no
19963 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19967 echo "$as_me:19967: result: $cf_cv_sys_time_select" >&5
19968 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
19969 test "$cf_cv_sys_time_select" = yes &&
19970 cat >>confdefs.h <<\EOF
19971 #define HAVE_SYS_TIME_SELECT 1
19974 # special check for test/ditto.c
19976 echo "$as_me:19976: checking for openpty in -lutil" >&5
19977 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
19978 if test "${ac_cv_lib_util_openpty+set}" = set; then
19979 echo $ECHO_N "(cached) $ECHO_C" >&6
19981 ac_check_lib_save_LIBS=$LIBS
19982 LIBS="-lutil $LIBS"
19983 cat >"conftest.$ac_ext" <<_ACEOF
19984 #line 19984 "configure"
19985 #include "confdefs.h"
19987 /* Override any gcc2 internal prototype to avoid an error. */
19991 /* We use char because int might match the return type of a gcc2
19992 builtin and then its argument prototype would still apply. */
20002 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20003 if { (eval echo "$as_me:20003: \"$ac_link\"") >&5
20004 (eval $ac_link) 2>&5
20006 echo "$as_me:20006: \$? = $ac_status" >&5
20007 (exit "$ac_status"); } &&
20008 { ac_try='test -s "conftest$ac_exeext"'
20009 { (eval echo "$as_me:20009: \"$ac_try\"") >&5
20010 (eval $ac_try) 2>&5
20012 echo "$as_me:20012: \$? = $ac_status" >&5
20013 (exit "$ac_status"); }; }; then
20014 ac_cv_lib_util_openpty=yes
20016 echo "$as_me: failed program was:" >&5
20017 cat "conftest.$ac_ext" >&5
20018 ac_cv_lib_util_openpty=no
20020 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20021 LIBS=$ac_check_lib_save_LIBS
20023 echo "$as_me:20023: result: $ac_cv_lib_util_openpty" >&5
20024 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
20025 if test "$ac_cv_lib_util_openpty" = yes; then
20031 echo "$as_me:20031: checking for openpty header" >&5
20032 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
20033 if test "${cf_cv_func_openpty+set}" = set; then
20034 echo $ECHO_N "(cached) $ECHO_C" >&6
20037 cf_save_LIBS="$LIBS"
20038 test "$cf_cv_lib_util" = yes && {
20039 cf_add_libs="$LIBS"
20042 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20043 # filter duplicates
20044 for cf_add_1lib in $cf_add_0lib; do
20045 for cf_add_2lib in $cf_add_libs; do
20046 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20051 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20053 LIBS="$cf_add_libs"
20055 for cf_header in pty.h libutil.h util.h
20057 cat >"conftest.$ac_ext" <<_ACEOF
20058 #line 20058 "configure"
20059 #include "confdefs.h"
20061 #include <$cf_header>
20067 int x = openpty((int *)0, (int *)0, (char *)0,
20068 (struct termios *)0, (struct winsize *)0);
20074 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20075 if { (eval echo "$as_me:20075: \"$ac_link\"") >&5
20076 (eval $ac_link) 2>&5
20078 echo "$as_me:20078: \$? = $ac_status" >&5
20079 (exit "$ac_status"); } &&
20080 { ac_try='test -s "conftest$ac_exeext"'
20081 { (eval echo "$as_me:20081: \"$ac_try\"") >&5
20082 (eval $ac_try) 2>&5
20084 echo "$as_me:20084: \$? = $ac_status" >&5
20085 (exit "$ac_status"); }; }; then
20087 cf_cv_func_openpty=$cf_header
20091 echo "$as_me: failed program was:" >&5
20092 cat "conftest.$ac_ext" >&5
20094 cf_cv_func_openpty=no
20097 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20099 LIBS="$cf_save_LIBS"
20102 echo "$as_me:20102: result: $cf_cv_func_openpty" >&5
20103 echo "${ECHO_T}$cf_cv_func_openpty" >&6
20105 if test "$cf_cv_func_openpty" != no ; then
20107 cat >>confdefs.h <<EOF
20108 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
20111 cat >>confdefs.h <<\EOF
20112 #define USE_XTERM_PTY 1
20115 if test "x$cf_cv_lib_util" = xyes ; then
20117 cf_add_libs="$TEST_LIBS"
20120 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20121 # filter duplicates
20122 for cf_add_1lib in $cf_add_0lib; do
20123 for cf_add_2lib in $cf_add_libs; do
20124 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20129 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20131 TEST_LIBS="$cf_add_libs"
20136 echo "$as_me:20136: checking for function curses_version" >&5
20137 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
20138 if test "${cf_cv_func_curses_version+set}" = set; then
20139 echo $ECHO_N "(cached) $ECHO_C" >&6
20142 if test "$cross_compiling" = yes; then
20143 cf_cv_func_curses_version=unknown
20145 cat >"conftest.$ac_ext" <<_ACEOF
20146 #line 20146 "configure"
20147 #include "confdefs.h"
20149 $ac_includes_default
20151 #include <${cf_cv_ncurses_header:-curses.h}>
20156 sprintf(temp, "%.999s\\n", curses_version());
20157 ${cf_cv_main_return:-return}(0);
20161 rm -f "conftest$ac_exeext"
20162 if { (eval echo "$as_me:20162: \"$ac_link\"") >&5
20163 (eval $ac_link) 2>&5
20165 echo "$as_me:20165: \$? = $ac_status" >&5
20166 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20167 { (eval echo "$as_me:20167: \"$ac_try\"") >&5
20168 (eval $ac_try) 2>&5
20170 echo "$as_me:20170: \$? = $ac_status" >&5
20171 (exit "$ac_status"); }; }; then
20172 cf_cv_func_curses_version=yes
20175 echo "$as_me: program exited with status $ac_status" >&5
20176 echo "$as_me: failed program was:" >&5
20177 cat "conftest.$ac_ext" >&5
20178 cf_cv_func_curses_version=no
20181 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20185 echo "$as_me:20185: result: $cf_cv_func_curses_version" >&5
20186 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
20187 test "$cf_cv_func_curses_version" = yes &&
20188 cat >>confdefs.h <<\EOF
20189 #define HAVE_CURSES_VERSION 1
20192 echo "$as_me:20192: checking for alternate character set array" >&5
20193 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
20194 if test "${cf_cv_curses_acs_map+set}" = set; then
20195 echo $ECHO_N "(cached) $ECHO_C" >&6
20198 cf_cv_curses_acs_map=unknown
20199 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
20201 cat >"conftest.$ac_ext" <<_ACEOF
20202 #line 20202 "configure"
20203 #include "confdefs.h"
20205 #include <${cf_cv_ncurses_header:-curses.h}>
20211 ${name}['k'] = ACS_PLUS
20217 rm -f "conftest.$ac_objext" "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"); } &&
20223 { ac_try='test -s "conftest$ac_exeext"'
20224 { (eval echo "$as_me:20224: \"$ac_try\"") >&5
20225 (eval $ac_try) 2>&5
20227 echo "$as_me:20227: \$? = $ac_status" >&5
20228 (exit "$ac_status"); }; }; then
20229 cf_cv_curses_acs_map=$name; break
20231 echo "$as_me: failed program was:" >&5
20232 cat "conftest.$ac_ext" >&5
20234 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20238 echo "$as_me:20238: result: $cf_cv_curses_acs_map" >&5
20239 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
20241 test "$cf_cv_curses_acs_map" != unknown &&
20242 cat >>confdefs.h <<EOF
20243 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
20246 if test "$cf_enable_widec" = yes; then
20248 echo "$as_me:20248: checking for wide alternate character set array" >&5
20249 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
20250 if test "${cf_cv_curses_wacs_map+set}" = set; then
20251 echo $ECHO_N "(cached) $ECHO_C" >&6
20254 cf_cv_curses_wacs_map=unknown
20255 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
20257 cat >"conftest.$ac_ext" <<_ACEOF
20258 #line 20258 "configure"
20259 #include "confdefs.h"
20261 #ifndef _XOPEN_SOURCE_EXTENDED
20262 #define _XOPEN_SOURCE_EXTENDED
20264 #include <${cf_cv_ncurses_header:-curses.h}>
20268 void *foo = &(${name}['k']); (void)foo
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_wacs_map=$name
20288 echo "$as_me: failed program was:" >&5
20289 cat "conftest.$ac_ext" >&5
20291 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20294 echo "$as_me:20294: result: $cf_cv_curses_wacs_map" >&5
20295 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
20297 test "$cf_cv_curses_wacs_map" != unknown &&
20298 cat >>confdefs.h <<EOF
20299 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
20302 echo "$as_me:20302: checking for wide alternate character constants" >&5
20303 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
20304 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
20305 echo $ECHO_N "(cached) $ECHO_C" >&6
20308 cf_cv_curses_wacs_symbols=no
20309 if test "$cf_cv_curses_wacs_map" != unknown
20311 cat >"conftest.$ac_ext" <<_ACEOF
20312 #line 20312 "configure"
20313 #include "confdefs.h"
20315 #ifndef _XOPEN_SOURCE_EXTENDED
20316 #define _XOPEN_SOURCE_EXTENDED
20318 #include <${cf_cv_ncurses_header:-curses.h}>
20322 cchar_t *foo = WACS_PLUS;
20323 ${cf_cv_curses_wacs_map}['k'] = *WACS_PLUS; (void)foo
20328 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20329 if { (eval echo "$as_me:20329: \"$ac_link\"") >&5
20330 (eval $ac_link) 2>&5
20332 echo "$as_me:20332: \$? = $ac_status" >&5
20333 (exit "$ac_status"); } &&
20334 { ac_try='test -s "conftest$ac_exeext"'
20335 { (eval echo "$as_me:20335: \"$ac_try\"") >&5
20336 (eval $ac_try) 2>&5
20338 echo "$as_me:20338: \$? = $ac_status" >&5
20339 (exit "$ac_status"); }; }; then
20340 cf_cv_curses_wacs_symbols=yes
20342 echo "$as_me: failed program was:" >&5
20343 cat "conftest.$ac_ext" >&5
20345 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20347 cat >"conftest.$ac_ext" <<_ACEOF
20348 #line 20348 "configure"
20349 #include "confdefs.h"
20351 #ifndef _XOPEN_SOURCE_EXTENDED
20352 #define _XOPEN_SOURCE_EXTENDED
20354 #include <${cf_cv_ncurses_header:-curses.h}>
20358 cchar_t *foo = WACS_PLUS; (void)foo
20363 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20364 if { (eval echo "$as_me:20364: \"$ac_link\"") >&5
20365 (eval $ac_link) 2>&5
20367 echo "$as_me:20367: \$? = $ac_status" >&5
20368 (exit "$ac_status"); } &&
20369 { ac_try='test -s "conftest$ac_exeext"'
20370 { (eval echo "$as_me:20370: \"$ac_try\"") >&5
20371 (eval $ac_try) 2>&5
20373 echo "$as_me:20373: \$? = $ac_status" >&5
20374 (exit "$ac_status"); }; }; then
20375 cf_cv_curses_wacs_symbols=yes
20377 echo "$as_me: failed program was:" >&5
20378 cat "conftest.$ac_ext" >&5
20380 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20384 echo "$as_me:20384: result: $cf_cv_curses_wacs_symbols" >&5
20385 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
20387 test "$cf_cv_curses_wacs_symbols" != no &&
20388 cat >>confdefs.h <<\EOF
20389 #define CURSES_WACS_SYMBOLS 1
20394 echo "$as_me:20394: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20395 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20396 cat >"conftest.$ac_ext" <<_ACEOF
20397 #line 20397 "configure"
20398 #include "confdefs.h"
20400 #ifndef _XOPEN_SOURCE_EXTENDED
20401 #define _XOPEN_SOURCE_EXTENDED
20403 #include <${cf_cv_ncurses_header:-curses.h}>
20414 rm -f "conftest.$ac_objext"
20415 if { (eval echo "$as_me:20415: \"$ac_compile\"") >&5
20416 (eval $ac_compile) 2>&5
20418 echo "$as_me:20418: \$? = $ac_status" >&5
20419 (exit "$ac_status"); } &&
20420 { ac_try='test -s "conftest.$ac_objext"'
20421 { (eval echo "$as_me:20421: \"$ac_try\"") >&5
20422 (eval $ac_try) 2>&5
20424 echo "$as_me:20424: \$? = $ac_status" >&5
20425 (exit "$ac_status"); }; }; then
20428 echo "$as_me: failed program was:" >&5
20429 cat "conftest.$ac_ext" >&5
20432 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20433 echo "$as_me:20433: result: $cf_result" >&5
20434 echo "${ECHO_T}$cf_result" >&6
20435 if test "$cf_result" = yes ; then
20437 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20439 cat >>confdefs.h <<EOF
20440 #define $cf_result 1
20445 cat >>confdefs.h <<EOF
20446 #define attr_t long
20451 if test "$cf_enable_widec" = yes; then
20453 # This is needed on Tru64 5.0 to declare mbstate_t
20454 echo "$as_me:20454: checking if we must include wchar.h to declare mbstate_t" >&5
20455 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
20456 if test "${cf_cv_mbstate_t+set}" = set; then
20457 echo $ECHO_N "(cached) $ECHO_C" >&6
20460 cat >"conftest.$ac_ext" <<_ACEOF
20461 #line 20461 "configure"
20462 #include "confdefs.h"
20464 #include <stdlib.h>
20465 #include <stdarg.h>
20467 #ifdef HAVE_LIBUTF8_H
20468 #include <libutf8.h>
20478 rm -f "conftest.$ac_objext"
20479 if { (eval echo "$as_me:20479: \"$ac_compile\"") >&5
20480 (eval $ac_compile) 2>&5
20482 echo "$as_me:20482: \$? = $ac_status" >&5
20483 (exit "$ac_status"); } &&
20484 { ac_try='test -s "conftest.$ac_objext"'
20485 { (eval echo "$as_me:20485: \"$ac_try\"") >&5
20486 (eval $ac_try) 2>&5
20488 echo "$as_me:20488: \$? = $ac_status" >&5
20489 (exit "$ac_status"); }; }; then
20492 echo "$as_me: failed program was:" >&5
20493 cat "conftest.$ac_ext" >&5
20494 cat >"conftest.$ac_ext" <<_ACEOF
20495 #line 20495 "configure"
20496 #include "confdefs.h"
20498 #include <stdlib.h>
20499 #include <stdarg.h>
20502 #ifdef HAVE_LIBUTF8_H
20503 #include <libutf8.h>
20513 rm -f "conftest.$ac_objext"
20514 if { (eval echo "$as_me:20514: \"$ac_compile\"") >&5
20515 (eval $ac_compile) 2>&5
20517 echo "$as_me:20517: \$? = $ac_status" >&5
20518 (exit "$ac_status"); } &&
20519 { ac_try='test -s "conftest.$ac_objext"'
20520 { (eval echo "$as_me:20520: \"$ac_try\"") >&5
20521 (eval $ac_try) 2>&5
20523 echo "$as_me:20523: \$? = $ac_status" >&5
20524 (exit "$ac_status"); }; }; then
20525 cf_cv_mbstate_t=yes
20527 echo "$as_me: failed program was:" >&5
20528 cat "conftest.$ac_ext" >&5
20529 cf_cv_mbstate_t=unknown
20531 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20533 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20535 echo "$as_me:20535: result: $cf_cv_mbstate_t" >&5
20536 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
20538 if test "$cf_cv_mbstate_t" = yes ; then
20540 cat >>confdefs.h <<\EOF
20541 #define NEED_WCHAR_H 1
20547 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
20548 if test "$cf_cv_mbstate_t" = unknown ; then
20549 NCURSES_MBSTATE_T=1
20552 # if we find mbstate_t in either place, use substitution to provide a fallback.
20553 if test "$cf_cv_mbstate_t" != unknown ; then
20554 NCURSES_OK_MBSTATE_T=1
20557 # This is needed on Tru64 5.0 to declare wchar_t
20558 echo "$as_me:20558: checking if we must include wchar.h to declare wchar_t" >&5
20559 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
20560 if test "${cf_cv_wchar_t+set}" = set; then
20561 echo $ECHO_N "(cached) $ECHO_C" >&6
20564 cat >"conftest.$ac_ext" <<_ACEOF
20565 #line 20565 "configure"
20566 #include "confdefs.h"
20568 #include <stdlib.h>
20569 #include <stdarg.h>
20571 #ifdef HAVE_LIBUTF8_H
20572 #include <libutf8.h>
20582 rm -f "conftest.$ac_objext"
20583 if { (eval echo "$as_me:20583: \"$ac_compile\"") >&5
20584 (eval $ac_compile) 2>&5
20586 echo "$as_me:20586: \$? = $ac_status" >&5
20587 (exit "$ac_status"); } &&
20588 { ac_try='test -s "conftest.$ac_objext"'
20589 { (eval echo "$as_me:20589: \"$ac_try\"") >&5
20590 (eval $ac_try) 2>&5
20592 echo "$as_me:20592: \$? = $ac_status" >&5
20593 (exit "$ac_status"); }; }; then
20596 echo "$as_me: failed program was:" >&5
20597 cat "conftest.$ac_ext" >&5
20598 cat >"conftest.$ac_ext" <<_ACEOF
20599 #line 20599 "configure"
20600 #include "confdefs.h"
20602 #include <stdlib.h>
20603 #include <stdarg.h>
20606 #ifdef HAVE_LIBUTF8_H
20607 #include <libutf8.h>
20617 rm -f "conftest.$ac_objext"
20618 if { (eval echo "$as_me:20618: \"$ac_compile\"") >&5
20619 (eval $ac_compile) 2>&5
20621 echo "$as_me:20621: \$? = $ac_status" >&5
20622 (exit "$ac_status"); } &&
20623 { ac_try='test -s "conftest.$ac_objext"'
20624 { (eval echo "$as_me:20624: \"$ac_try\"") >&5
20625 (eval $ac_try) 2>&5
20627 echo "$as_me:20627: \$? = $ac_status" >&5
20628 (exit "$ac_status"); }; }; then
20631 echo "$as_me: failed program was:" >&5
20632 cat "conftest.$ac_ext" >&5
20633 cf_cv_wchar_t=unknown
20635 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20637 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20639 echo "$as_me:20639: result: $cf_cv_wchar_t" >&5
20640 echo "${ECHO_T}$cf_cv_wchar_t" >&6
20642 if test "$cf_cv_wchar_t" = yes ; then
20644 cat >>confdefs.h <<\EOF
20645 #define NEED_WCHAR_H 1
20651 # if we do not find wchar_t in either place, use substitution to provide a fallback.
20652 if test "$cf_cv_wchar_t" = unknown ; then
20656 # if we find wchar_t in either place, use substitution to provide a fallback.
20657 if test "$cf_cv_wchar_t" != unknown ; then
20658 NCURSES_OK_WCHAR_T=1
20661 # This is needed on Tru64 5.0 to declare wint_t
20662 echo "$as_me:20662: checking if we must include wchar.h to declare wint_t" >&5
20663 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
20664 if test "${cf_cv_wint_t+set}" = set; then
20665 echo $ECHO_N "(cached) $ECHO_C" >&6
20668 cat >"conftest.$ac_ext" <<_ACEOF
20669 #line 20669 "configure"
20670 #include "confdefs.h"
20672 #include <stdlib.h>
20673 #include <stdarg.h>
20675 #ifdef HAVE_LIBUTF8_H
20676 #include <libutf8.h>
20686 rm -f "conftest.$ac_objext"
20687 if { (eval echo "$as_me:20687: \"$ac_compile\"") >&5
20688 (eval $ac_compile) 2>&5
20690 echo "$as_me:20690: \$? = $ac_status" >&5
20691 (exit "$ac_status"); } &&
20692 { ac_try='test -s "conftest.$ac_objext"'
20693 { (eval echo "$as_me:20693: \"$ac_try\"") >&5
20694 (eval $ac_try) 2>&5
20696 echo "$as_me:20696: \$? = $ac_status" >&5
20697 (exit "$ac_status"); }; }; then
20700 echo "$as_me: failed program was:" >&5
20701 cat "conftest.$ac_ext" >&5
20702 cat >"conftest.$ac_ext" <<_ACEOF
20703 #line 20703 "configure"
20704 #include "confdefs.h"
20706 #include <stdlib.h>
20707 #include <stdarg.h>
20710 #ifdef HAVE_LIBUTF8_H
20711 #include <libutf8.h>
20721 rm -f "conftest.$ac_objext"
20722 if { (eval echo "$as_me:20722: \"$ac_compile\"") >&5
20723 (eval $ac_compile) 2>&5
20725 echo "$as_me:20725: \$? = $ac_status" >&5
20726 (exit "$ac_status"); } &&
20727 { ac_try='test -s "conftest.$ac_objext"'
20728 { (eval echo "$as_me:20728: \"$ac_try\"") >&5
20729 (eval $ac_try) 2>&5
20731 echo "$as_me:20731: \$? = $ac_status" >&5
20732 (exit "$ac_status"); }; }; then
20735 echo "$as_me: failed program was:" >&5
20736 cat "conftest.$ac_ext" >&5
20737 cf_cv_wint_t=unknown
20739 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20741 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20743 echo "$as_me:20743: result: $cf_cv_wint_t" >&5
20744 echo "${ECHO_T}$cf_cv_wint_t" >&6
20746 if test "$cf_cv_wint_t" = yes ; then
20748 cat >>confdefs.h <<\EOF
20749 #define NEED_WCHAR_H 1
20755 # if we do not find wint_t in either place, use substitution to provide a fallback.
20756 if test "$cf_cv_wint_t" = unknown ; then
20760 # if we find wint_t in either place, use substitution to provide a fallback.
20761 if test "$cf_cv_wint_t" != unknown ; then
20762 NCURSES_OK_WINT_T=1
20765 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
20767 echo "$as_me:20767: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20768 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20769 cat >"conftest.$ac_ext" <<_ACEOF
20770 #line 20770 "configure"
20771 #include "confdefs.h"
20773 #ifndef _XOPEN_SOURCE_EXTENDED
20774 #define _XOPEN_SOURCE_EXTENDED
20776 #include <${cf_cv_ncurses_header:-curses.h}>
20787 rm -f "conftest.$ac_objext"
20788 if { (eval echo "$as_me:20788: \"$ac_compile\"") >&5
20789 (eval $ac_compile) 2>&5
20791 echo "$as_me:20791: \$? = $ac_status" >&5
20792 (exit "$ac_status"); } &&
20793 { ac_try='test -s "conftest.$ac_objext"'
20794 { (eval echo "$as_me:20794: \"$ac_try\"") >&5
20795 (eval $ac_try) 2>&5
20797 echo "$as_me:20797: \$? = $ac_status" >&5
20798 (exit "$ac_status"); }; }; then
20801 echo "$as_me: failed program was:" >&5
20802 cat "conftest.$ac_ext" >&5
20805 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20806 echo "$as_me:20806: result: $cf_result" >&5
20807 echo "${ECHO_T}$cf_result" >&6
20808 if test "$cf_result" = yes ; then
20810 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20812 cat >>confdefs.h <<EOF
20813 #define $cf_result 1
20818 cat >>confdefs.h <<EOF
20819 #define mbstate_t long
20826 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
20828 echo "$as_me:20828: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20829 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20830 cat >"conftest.$ac_ext" <<_ACEOF
20831 #line 20831 "configure"
20832 #include "confdefs.h"
20834 #ifndef _XOPEN_SOURCE_EXTENDED
20835 #define _XOPEN_SOURCE_EXTENDED
20837 #include <${cf_cv_ncurses_header:-curses.h}>
20848 rm -f "conftest.$ac_objext"
20849 if { (eval echo "$as_me:20849: \"$ac_compile\"") >&5
20850 (eval $ac_compile) 2>&5
20852 echo "$as_me:20852: \$? = $ac_status" >&5
20853 (exit "$ac_status"); } &&
20854 { ac_try='test -s "conftest.$ac_objext"'
20855 { (eval echo "$as_me:20855: \"$ac_try\"") >&5
20856 (eval $ac_try) 2>&5
20858 echo "$as_me:20858: \$? = $ac_status" >&5
20859 (exit "$ac_status"); }; }; then
20862 echo "$as_me: failed program was:" >&5
20863 cat "conftest.$ac_ext" >&5
20866 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20867 echo "$as_me:20867: result: $cf_result" >&5
20868 echo "${ECHO_T}$cf_result" >&6
20869 if test "$cf_result" = yes ; then
20871 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20873 cat >>confdefs.h <<EOF
20874 #define $cf_result 1
20879 cat >>confdefs.h <<EOF
20880 #define wchar_t long
20887 if test "$NCURSES_OK_WINT_T" = 0 ; then
20889 echo "$as_me:20889: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
20890 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20891 cat >"conftest.$ac_ext" <<_ACEOF
20892 #line 20892 "configure"
20893 #include "confdefs.h"
20895 #ifndef _XOPEN_SOURCE_EXTENDED
20896 #define _XOPEN_SOURCE_EXTENDED
20898 #include <${cf_cv_ncurses_header:-curses.h}>
20909 rm -f "conftest.$ac_objext"
20910 if { (eval echo "$as_me:20910: \"$ac_compile\"") >&5
20911 (eval $ac_compile) 2>&5
20913 echo "$as_me:20913: \$? = $ac_status" >&5
20914 (exit "$ac_status"); } &&
20915 { ac_try='test -s "conftest.$ac_objext"'
20916 { (eval echo "$as_me:20916: \"$ac_try\"") >&5
20917 (eval $ac_try) 2>&5
20919 echo "$as_me:20919: \$? = $ac_status" >&5
20920 (exit "$ac_status"); }; }; then
20923 echo "$as_me: failed program was:" >&5
20924 cat "conftest.$ac_ext" >&5
20927 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20928 echo "$as_me:20928: result: $cf_result" >&5
20929 echo "${ECHO_T}$cf_result" >&6
20930 if test "$cf_result" = yes ; then
20932 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20934 cat >>confdefs.h <<EOF
20935 #define $cf_result 1
20940 cat >>confdefs.h <<EOF
20941 #define wint_t long
20957 echo "$as_me:20957: checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
20958 echo $ECHO_N "checking for data $cf_data declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
20960 cat >"conftest.$ac_ext" <<_ACEOF
20961 #line 20961 "configure"
20962 #include "confdefs.h"
20964 #ifdef HAVE_XCURSES
20965 #include <xcurses.h>
20966 char * XCursesProgramName = "test";
20968 #include <${cf_cv_ncurses_header:-curses.h}>
20969 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
20970 #include <ncursesw/term.h>
20971 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
20972 #include <ncurses/term.h>
20973 #elif defined(HAVE_TERM_H)
20982 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
20983 const void *foo = (const void *)($cf_data);
20985 const void *foo = &($cf_data);
20987 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
20993 rm -f "conftest.$ac_objext"
20994 if { (eval echo "$as_me:20994: \"$ac_compile\"") >&5
20995 (eval $ac_compile) 2>&5
20997 echo "$as_me:20997: \$? = $ac_status" >&5
20998 (exit "$ac_status"); } &&
20999 { ac_try='test -s "conftest.$ac_objext"'
21000 { (eval echo "$as_me:21000: \"$ac_try\"") >&5
21001 (eval $ac_try) 2>&5
21003 echo "$as_me:21003: \$? = $ac_status" >&5
21004 (exit "$ac_status"); }; }; then
21008 echo "$as_me: failed program was:" >&5
21009 cat "conftest.$ac_ext" >&5
21012 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21013 echo "$as_me:21013: result: $cf_result" >&5
21014 echo "${ECHO_T}$cf_result" >&6
21016 if test "$cf_result" = yes ; then
21018 cf_result=`echo "have_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21020 cat >>confdefs.h <<EOF
21021 #define $cf_result 1
21025 echo "$as_me:21025: checking for data $cf_data in library" >&5
21026 echo $ECHO_N "checking for data $cf_data in library... $ECHO_C" >&6
21027 # BSD linkers insist on making weak linkage, but resolve at runtime.
21028 if test "$cross_compiling" = yes; then
21031 cat >"conftest.$ac_ext" <<_ACEOF
21032 #line 21032 "configure"
21033 #include "confdefs.h"
21035 #ifdef HAVE_XCURSES
21036 #include <xcurses.h>
21037 char * XCursesProgramName = "test";
21039 #include <${cf_cv_ncurses_header:-curses.h}>
21040 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
21041 #include <ncursesw/term.h>
21042 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
21043 #include <ncurses/term.h>
21044 #elif defined(HAVE_TERM_H)
21049 extern char $cf_data;
21056 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
21057 const void *foo = (const void *)($cf_data);
21059 const void *foo = &($cf_data);
21061 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
21063 ${cf_cv_main_return:-return}(foo == 0);
21070 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21071 if { (eval echo "$as_me:21071: \"$ac_link\"") >&5
21072 (eval $ac_link) 2>&5
21074 echo "$as_me:21074: \$? = $ac_status" >&5
21075 (exit "$ac_status"); } &&
21076 { ac_try='test -s "conftest$ac_exeext"'
21077 { (eval echo "$as_me:21077: \"$ac_try\"") >&5
21078 (eval $ac_try) 2>&5
21080 echo "$as_me:21080: \$? = $ac_status" >&5
21081 (exit "$ac_status"); }; }; then
21084 echo "$as_me: failed program was:" >&5
21085 cat "conftest.$ac_ext" >&5
21088 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21091 cat >"conftest.$ac_ext" <<_ACEOF
21092 #line 21092 "configure"
21093 #include "confdefs.h"
21095 #ifdef HAVE_XCURSES
21096 #include <xcurses.h>
21097 char * XCursesProgramName = "test";
21099 #include <${cf_cv_ncurses_header:-curses.h}>
21100 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
21101 #include <ncursesw/term.h>
21102 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
21103 #include <ncurses/term.h>
21104 #elif defined(HAVE_TERM_H)
21109 extern char $cf_data;
21113 #if defined($cf_data) && ((defined(NCURSES_WRAPPED_VAR) && (NCURSES_VERSION_PATCH < 20200208)) || defined(NCURSES_BROKEN_LINKER) || defined(NCURSES_REENTRANT))
21114 const void *foo = (const void *)($cf_data);
21116 const void *foo = &($cf_data);
21118 fprintf(stderr, "testing linkage of $cf_data:%p\\n", (const void *)foo);
21120 ${cf_cv_main_return:-return}(foo == 0);
21123 rm -f "conftest$ac_exeext"
21124 if { (eval echo "$as_me:21124: \"$ac_link\"") >&5
21125 (eval $ac_link) 2>&5
21127 echo "$as_me:21127: \$? = $ac_status" >&5
21128 (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21129 { (eval echo "$as_me:21129: \"$ac_try\"") >&5
21130 (eval $ac_try) 2>&5
21132 echo "$as_me:21132: \$? = $ac_status" >&5
21133 (exit "$ac_status"); }; }; then
21137 echo "$as_me: program exited with status $ac_status" >&5
21138 echo "$as_me: failed program was:" >&5
21139 cat "conftest.$ac_ext" >&5
21142 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21144 echo "$as_me:21144: result: $cf_result" >&5
21145 echo "${ECHO_T}$cf_result" >&6
21146 if test "$cf_result" = yes ; then
21148 cf_result=`echo "decl_curses_data_$cf_data" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21150 cat >>confdefs.h <<EOF
21151 #define $cf_result 1
21154 # do not exit loop here, since we prefer system's declarations
21159 if test -n "$with_screen" && test "x$with_screen" = "xpdcurses"
21161 echo "$as_me:21161: checking for X" >&5
21162 echo $ECHO_N "checking for X... $ECHO_C" >&6
21164 # Check whether --with-x or --without-x was given.
21165 if test "${with_x+set}" = set; then
21169 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
21170 if test "x$with_x" = xno; then
21171 # The user explicitly disabled X.
21174 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
21175 # Both variables are already set.
21178 if test "${ac_cv_have_x+set}" = set; then
21179 echo $ECHO_N "(cached) $ECHO_C" >&6
21181 # One or both of the vars are not set, and there is no cached value.
21182 ac_x_includes=no ac_x_libraries=no
21183 rm -fr conftest.dir
21184 if mkdir conftest.dir; then
21186 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
21187 cat >Imakefile <<'EOF'
21189 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
21191 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
21192 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
21193 eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
21194 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
21195 for ac_extension in a so sl dylib dll; do
21196 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
21197 test -f "$ac_im_libdir/libX11.$ac_extension"; then
21198 ac_im_usrlibdir=$ac_im_libdir; break
21201 # Screen out bogus values from the imake configuration. They are
21202 # bogus both because they are the default anyway, and because
21203 # using them would break gcc on systems where it needs fixed includes.
21204 case $ac_im_incroot in
21206 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
21208 case $ac_im_usrlibdir in
21209 /usr/lib | /lib) ;;
21210 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
21214 rm -fr conftest.dir
21217 # Standard set of common directories for X headers.
21218 # Check X11 before X11Rn because it is often a symlink to the current release.
21235 /usr/local/X11/include
21236 /usr/local/X11R7/include
21237 /usr/local/X11R6/include
21238 /usr/local/X11R5/include
21239 /usr/local/X11R4/include
21241 /usr/local/include/X11
21242 /usr/local/include/X11R7
21243 /usr/local/include/X11R6
21244 /usr/local/include/X11R5
21245 /usr/local/include/X11R4
21249 /usr/XFree86/include/X11
21253 /usr/unsupported/include
21254 /usr/athena/include
21255 /usr/local/x11r5/include
21256 /usr/lpp/Xamples/include
21258 /usr/openwin/include
21259 /usr/openwin/share/include'
21261 if test "$ac_x_includes" = no; then
21262 # Guess where to find include files, by looking for Intrinsic.h.
21263 # First, try using that file with no special directory specified.
21264 cat >"conftest.$ac_ext" <<_ACEOF
21265 #line 21265 "configure"
21266 #include "confdefs.h"
21267 #include <X11/Intrinsic.h>
21269 if { (eval echo "$as_me:21269: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21270 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21272 $EGREP -v '^ *\+' conftest.er1 >conftest.err
21274 cat conftest.err >&5
21275 echo "$as_me:21275: \$? = $ac_status" >&5
21276 (exit "$ac_status"); } >/dev/null; then
21277 if test -s conftest.err; then
21278 ac_cpp_err=$ac_c_preproc_warn_flag
21285 if test -z "$ac_cpp_err"; then
21286 # We can compile using X headers with no special include directory.
21289 echo "$as_me: failed program was:" >&5
21290 cat "conftest.$ac_ext" >&5
21291 for ac_dir in $ac_x_header_dirs; do
21292 if test -r "$ac_dir/X11/Intrinsic.h"; then
21293 ac_x_includes=$ac_dir
21298 rm -f conftest.err "conftest.$ac_ext"
21299 fi # $ac_x_includes = no
21301 if test "$ac_x_libraries" = no; then
21302 # Check for the libraries.
21303 # See if we find them without any special options.
21304 # Don't add to $LIBS permanently.
21307 cat >"conftest.$ac_ext" <<_ACEOF
21308 #line 21308 "configure"
21309 #include "confdefs.h"
21310 #include <X11/Intrinsic.h>
21319 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21320 if { (eval echo "$as_me:21320: \"$ac_link\"") >&5
21321 (eval $ac_link) 2>&5
21323 echo "$as_me:21323: \$? = $ac_status" >&5
21324 (exit "$ac_status"); } &&
21325 { ac_try='test -s "conftest$ac_exeext"'
21326 { (eval echo "$as_me:21326: \"$ac_try\"") >&5
21327 (eval $ac_try) 2>&5
21329 echo "$as_me:21329: \$? = $ac_status" >&5
21330 (exit "$ac_status"); }; }; then
21332 # We can link X programs with no special library path.
21335 echo "$as_me: failed program was:" >&5
21336 cat "conftest.$ac_ext" >&5
21338 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
21340 # Don't even attempt the hair of trying to link an X program!
21341 for ac_extension in a so sl dylib dll; do
21342 if test -r "$ac_dir/libXt.$ac_extension"; then
21343 ac_x_libraries=$ac_dir
21349 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21350 fi # $ac_x_libraries = no
21352 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
21353 # Didn't find X anywhere. Cache the known absence of X.
21354 ac_cv_have_x="have_x=no"
21356 # Record where we found X for the cache.
21357 ac_cv_have_x="have_x=yes \
21358 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
21363 eval "$ac_cv_have_x"
21366 if test "$have_x" != yes; then
21367 echo "$as_me:21367: result: $have_x" >&5
21368 echo "${ECHO_T}$have_x" >&6
21371 # If each of the values was on the command line, it overrides each guess.
21372 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
21373 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
21374 # Update the cache value to reflect the command line values.
21375 ac_cv_have_x="have_x=yes \
21376 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
21377 echo "$as_me:21377: result: libraries $x_libraries, headers $x_includes" >&5
21378 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
21381 if test "$no_x" = yes; then
21382 # Not all programs may use this symbol, but it does not hurt to define it.
21384 cat >>confdefs.h <<\EOF
21385 #define X_DISPLAY_MISSING 1
21393 if test -n "$x_includes"; then
21394 X_CFLAGS="$X_CFLAGS -I$x_includes"
21397 # It would also be nice to do this for all -L options, not just this one.
21398 if test -n "$x_libraries"; then
21399 X_LIBS="$X_LIBS -L$x_libraries"
21400 # For Solaris; some versions of Sun CC require a space after -R and
21401 # others require no space. Words are not sufficient . . . .
21402 case `(uname -sr) 2>/dev/null` in
21404 echo "$as_me:21404: checking whether -R must be followed by a space" >&5
21405 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
21406 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
21407 cat >"conftest.$ac_ext" <<_ACEOF
21408 #line 21408 "configure"
21409 #include "confdefs.h"
21419 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21420 if { (eval echo "$as_me:21420: \"$ac_link\"") >&5
21421 (eval $ac_link) 2>&5
21423 echo "$as_me:21423: \$? = $ac_status" >&5
21424 (exit "$ac_status"); } &&
21425 { ac_try='test -s "conftest$ac_exeext"'
21426 { (eval echo "$as_me:21426: \"$ac_try\"") >&5
21427 (eval $ac_try) 2>&5
21429 echo "$as_me:21429: \$? = $ac_status" >&5
21430 (exit "$ac_status"); }; }; then
21433 echo "$as_me: failed program was:" >&5
21434 cat "conftest.$ac_ext" >&5
21437 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21438 if test $ac_R_nospace = yes; then
21439 echo "$as_me:21439: result: no" >&5
21440 echo "${ECHO_T}no" >&6
21441 X_LIBS="$X_LIBS -R$x_libraries"
21443 LIBS="$ac_xsave_LIBS -R $x_libraries"
21444 cat >"conftest.$ac_ext" <<_ACEOF
21445 #line 21445 "configure"
21446 #include "confdefs.h"
21456 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21457 if { (eval echo "$as_me:21457: \"$ac_link\"") >&5
21458 (eval $ac_link) 2>&5
21460 echo "$as_me:21460: \$? = $ac_status" >&5
21461 (exit "$ac_status"); } &&
21462 { ac_try='test -s "conftest$ac_exeext"'
21463 { (eval echo "$as_me:21463: \"$ac_try\"") >&5
21464 (eval $ac_try) 2>&5
21466 echo "$as_me:21466: \$? = $ac_status" >&5
21467 (exit "$ac_status"); }; }; then
21470 echo "$as_me: failed program was:" >&5
21471 cat "conftest.$ac_ext" >&5
21474 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21475 if test $ac_R_space = yes; then
21476 echo "$as_me:21476: result: yes" >&5
21477 echo "${ECHO_T}yes" >&6
21478 X_LIBS="$X_LIBS -R $x_libraries"
21480 echo "$as_me:21480: result: neither works" >&5
21481 echo "${ECHO_T}neither works" >&6
21484 LIBS=$ac_xsave_LIBS
21488 # Check for system-dependent libraries X programs must link with.
21489 # Do this before checking for the system-independent R6 libraries
21490 # (-lICE), since we may need -lsocket or whatever for X linking.
21492 if test "$ISC" = yes; then
21493 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
21495 # Martyn Johnson says this is needed for Ultrix, if the X
21496 # libraries were built with DECnet support. And Karl Berry says
21497 # the Alpha needs dnet_stub (dnet does not exist).
21498 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
21499 cat >"conftest.$ac_ext" <<_ACEOF
21500 #line 21500 "configure"
21501 #include "confdefs.h"
21503 /* Override any gcc2 internal prototype to avoid an error. */
21507 /* We use char because int might match the return type of a gcc2
21508 builtin and then its argument prototype would still apply. */
21509 char XOpenDisplay ();
21518 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21519 if { (eval echo "$as_me:21519: \"$ac_link\"") >&5
21520 (eval $ac_link) 2>&5
21522 echo "$as_me:21522: \$? = $ac_status" >&5
21523 (exit "$ac_status"); } &&
21524 { ac_try='test -s "conftest$ac_exeext"'
21525 { (eval echo "$as_me:21525: \"$ac_try\"") >&5
21526 (eval $ac_try) 2>&5
21528 echo "$as_me:21528: \$? = $ac_status" >&5
21529 (exit "$ac_status"); }; }; then
21532 echo "$as_me: failed program was:" >&5
21533 cat "conftest.$ac_ext" >&5
21534 echo "$as_me:21534: checking for dnet_ntoa in -ldnet" >&5
21535 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
21536 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
21537 echo $ECHO_N "(cached) $ECHO_C" >&6
21539 ac_check_lib_save_LIBS=$LIBS
21540 LIBS="-ldnet $LIBS"
21541 cat >"conftest.$ac_ext" <<_ACEOF
21542 #line 21542 "configure"
21543 #include "confdefs.h"
21545 /* Override any gcc2 internal prototype to avoid an error. */
21549 /* We use char because int might match the return type of a gcc2
21550 builtin and then its argument prototype would still apply. */
21560 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21561 if { (eval echo "$as_me:21561: \"$ac_link\"") >&5
21562 (eval $ac_link) 2>&5
21564 echo "$as_me:21564: \$? = $ac_status" >&5
21565 (exit "$ac_status"); } &&
21566 { ac_try='test -s "conftest$ac_exeext"'
21567 { (eval echo "$as_me:21567: \"$ac_try\"") >&5
21568 (eval $ac_try) 2>&5
21570 echo "$as_me:21570: \$? = $ac_status" >&5
21571 (exit "$ac_status"); }; }; then
21572 ac_cv_lib_dnet_dnet_ntoa=yes
21574 echo "$as_me: failed program was:" >&5
21575 cat "conftest.$ac_ext" >&5
21576 ac_cv_lib_dnet_dnet_ntoa=no
21578 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21579 LIBS=$ac_check_lib_save_LIBS
21581 echo "$as_me:21581: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
21582 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
21583 if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
21584 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
21587 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
21588 echo "$as_me:21588: checking for dnet_ntoa in -ldnet_stub" >&5
21589 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
21590 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
21591 echo $ECHO_N "(cached) $ECHO_C" >&6
21593 ac_check_lib_save_LIBS=$LIBS
21594 LIBS="-ldnet_stub $LIBS"
21595 cat >"conftest.$ac_ext" <<_ACEOF
21596 #line 21596 "configure"
21597 #include "confdefs.h"
21599 /* Override any gcc2 internal prototype to avoid an error. */
21603 /* We use char because int might match the return type of a gcc2
21604 builtin and then its argument prototype would still apply. */
21614 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21615 if { (eval echo "$as_me:21615: \"$ac_link\"") >&5
21616 (eval $ac_link) 2>&5
21618 echo "$as_me:21618: \$? = $ac_status" >&5
21619 (exit "$ac_status"); } &&
21620 { ac_try='test -s "conftest$ac_exeext"'
21621 { (eval echo "$as_me:21621: \"$ac_try\"") >&5
21622 (eval $ac_try) 2>&5
21624 echo "$as_me:21624: \$? = $ac_status" >&5
21625 (exit "$ac_status"); }; }; then
21626 ac_cv_lib_dnet_stub_dnet_ntoa=yes
21628 echo "$as_me: failed program was:" >&5
21629 cat "conftest.$ac_ext" >&5
21630 ac_cv_lib_dnet_stub_dnet_ntoa=no
21632 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21633 LIBS=$ac_check_lib_save_LIBS
21635 echo "$as_me:21635: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
21636 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
21637 if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
21638 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
21643 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21644 LIBS="$ac_xsave_LIBS"
21646 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
21647 # to get the SysV transport functions.
21648 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
21650 # The nsl library prevents programs from opening the X display
21651 # on Irix 5.2, according to T.E. Dickey.
21652 # The functions gethostbyname, getservbyname, and inet_addr are
21653 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
21654 echo "$as_me:21654: checking for gethostbyname" >&5
21655 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
21656 if test "${ac_cv_func_gethostbyname+set}" = set; then
21657 echo $ECHO_N "(cached) $ECHO_C" >&6
21659 cat >"conftest.$ac_ext" <<_ACEOF
21660 #line 21660 "configure"
21661 #include "confdefs.h"
21662 #define gethostbyname autoconf_temporary
21663 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21664 #undef gethostbyname
21670 /* We use char because int might match the return type of a gcc2
21671 builtin and then its argument prototype would still apply. */
21672 char gethostbyname (void);
21678 /* The GNU C library defines stubs for functions which it implements
21679 to always fail with ENOSYS. Some functions are actually named
21680 something starting with __ and the normal name is an alias. */
21681 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
21682 #error found stub for gethostbyname
21685 return gethostbyname ();
21690 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21691 if { (eval echo "$as_me:21691: \"$ac_link\"") >&5
21692 (eval $ac_link) 2>&5
21694 echo "$as_me:21694: \$? = $ac_status" >&5
21695 (exit "$ac_status"); } &&
21696 { ac_try='test -s "conftest$ac_exeext"'
21697 { (eval echo "$as_me:21697: \"$ac_try\"") >&5
21698 (eval $ac_try) 2>&5
21700 echo "$as_me:21700: \$? = $ac_status" >&5
21701 (exit "$ac_status"); }; }; then
21702 ac_cv_func_gethostbyname=yes
21704 echo "$as_me: failed program was:" >&5
21705 cat "conftest.$ac_ext" >&5
21706 ac_cv_func_gethostbyname=no
21708 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21710 echo "$as_me:21710: result: $ac_cv_func_gethostbyname" >&5
21711 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
21713 if test $ac_cv_func_gethostbyname = no; then
21714 echo "$as_me:21714: checking for gethostbyname in -lnsl" >&5
21715 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
21716 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
21717 echo $ECHO_N "(cached) $ECHO_C" >&6
21719 ac_check_lib_save_LIBS=$LIBS
21721 cat >"conftest.$ac_ext" <<_ACEOF
21722 #line 21722 "configure"
21723 #include "confdefs.h"
21725 /* Override any gcc2 internal prototype to avoid an error. */
21729 /* We use char because int might match the return type of a gcc2
21730 builtin and then its argument prototype would still apply. */
21731 char gethostbyname ();
21740 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21741 if { (eval echo "$as_me:21741: \"$ac_link\"") >&5
21742 (eval $ac_link) 2>&5
21744 echo "$as_me:21744: \$? = $ac_status" >&5
21745 (exit "$ac_status"); } &&
21746 { ac_try='test -s "conftest$ac_exeext"'
21747 { (eval echo "$as_me:21747: \"$ac_try\"") >&5
21748 (eval $ac_try) 2>&5
21750 echo "$as_me:21750: \$? = $ac_status" >&5
21751 (exit "$ac_status"); }; }; then
21752 ac_cv_lib_nsl_gethostbyname=yes
21754 echo "$as_me: failed program was:" >&5
21755 cat "conftest.$ac_ext" >&5
21756 ac_cv_lib_nsl_gethostbyname=no
21758 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21759 LIBS=$ac_check_lib_save_LIBS
21761 echo "$as_me:21761: result: $ac_cv_lib_nsl_gethostbyname" >&5
21762 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
21763 if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
21764 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
21767 if test $ac_cv_lib_nsl_gethostbyname = no; then
21768 echo "$as_me:21768: checking for gethostbyname in -lbsd" >&5
21769 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
21770 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
21771 echo $ECHO_N "(cached) $ECHO_C" >&6
21773 ac_check_lib_save_LIBS=$LIBS
21775 cat >"conftest.$ac_ext" <<_ACEOF
21776 #line 21776 "configure"
21777 #include "confdefs.h"
21779 /* Override any gcc2 internal prototype to avoid an error. */
21783 /* We use char because int might match the return type of a gcc2
21784 builtin and then its argument prototype would still apply. */
21785 char gethostbyname ();
21794 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21795 if { (eval echo "$as_me:21795: \"$ac_link\"") >&5
21796 (eval $ac_link) 2>&5
21798 echo "$as_me:21798: \$? = $ac_status" >&5
21799 (exit "$ac_status"); } &&
21800 { ac_try='test -s "conftest$ac_exeext"'
21801 { (eval echo "$as_me:21801: \"$ac_try\"") >&5
21802 (eval $ac_try) 2>&5
21804 echo "$as_me:21804: \$? = $ac_status" >&5
21805 (exit "$ac_status"); }; }; then
21806 ac_cv_lib_bsd_gethostbyname=yes
21808 echo "$as_me: failed program was:" >&5
21809 cat "conftest.$ac_ext" >&5
21810 ac_cv_lib_bsd_gethostbyname=no
21812 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21813 LIBS=$ac_check_lib_save_LIBS
21815 echo "$as_me:21815: result: $ac_cv_lib_bsd_gethostbyname" >&5
21816 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
21817 if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
21818 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
21824 # lieder@skyler.mavd.honeywell.com says without -lsocket,
21825 # socket/setsockopt and other routines are undefined under SCO ODT
21826 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
21827 # on later versions), says Simon Leinen: it contains gethostby*
21828 # variants that don't use the nameserver (or something). -lsocket
21829 # must be given before -lnsl if both are needed. We assume that
21830 # if connect needs -lnsl, so does gethostbyname.
21831 echo "$as_me:21831: checking for connect" >&5
21832 echo $ECHO_N "checking for connect... $ECHO_C" >&6
21833 if test "${ac_cv_func_connect+set}" = set; then
21834 echo $ECHO_N "(cached) $ECHO_C" >&6
21836 cat >"conftest.$ac_ext" <<_ACEOF
21837 #line 21837 "configure"
21838 #include "confdefs.h"
21839 #define connect autoconf_temporary
21840 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21847 /* We use char because int might match the return type of a gcc2
21848 builtin and then its argument prototype would still apply. */
21849 char connect (void);
21855 /* The GNU C library defines stubs for functions which it implements
21856 to always fail with ENOSYS. Some functions are actually named
21857 something starting with __ and the normal name is an alias. */
21858 #if defined (__stub_connect) || defined (__stub___connect)
21859 #error found stub for connect
21867 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21868 if { (eval echo "$as_me:21868: \"$ac_link\"") >&5
21869 (eval $ac_link) 2>&5
21871 echo "$as_me:21871: \$? = $ac_status" >&5
21872 (exit "$ac_status"); } &&
21873 { ac_try='test -s "conftest$ac_exeext"'
21874 { (eval echo "$as_me:21874: \"$ac_try\"") >&5
21875 (eval $ac_try) 2>&5
21877 echo "$as_me:21877: \$? = $ac_status" >&5
21878 (exit "$ac_status"); }; }; then
21879 ac_cv_func_connect=yes
21881 echo "$as_me: failed program was:" >&5
21882 cat "conftest.$ac_ext" >&5
21883 ac_cv_func_connect=no
21885 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21887 echo "$as_me:21887: result: $ac_cv_func_connect" >&5
21888 echo "${ECHO_T}$ac_cv_func_connect" >&6
21890 if test $ac_cv_func_connect = no; then
21891 echo "$as_me:21891: checking for connect in -lsocket" >&5
21892 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
21893 if test "${ac_cv_lib_socket_connect+set}" = set; then
21894 echo $ECHO_N "(cached) $ECHO_C" >&6
21896 ac_check_lib_save_LIBS=$LIBS
21897 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
21898 cat >"conftest.$ac_ext" <<_ACEOF
21899 #line 21899 "configure"
21900 #include "confdefs.h"
21902 /* Override any gcc2 internal prototype to avoid an error. */
21906 /* We use char because int might match the return type of a gcc2
21907 builtin and then its argument prototype would still apply. */
21917 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21918 if { (eval echo "$as_me:21918: \"$ac_link\"") >&5
21919 (eval $ac_link) 2>&5
21921 echo "$as_me:21921: \$? = $ac_status" >&5
21922 (exit "$ac_status"); } &&
21923 { ac_try='test -s "conftest$ac_exeext"'
21924 { (eval echo "$as_me:21924: \"$ac_try\"") >&5
21925 (eval $ac_try) 2>&5
21927 echo "$as_me:21927: \$? = $ac_status" >&5
21928 (exit "$ac_status"); }; }; then
21929 ac_cv_lib_socket_connect=yes
21931 echo "$as_me: failed program was:" >&5
21932 cat "conftest.$ac_ext" >&5
21933 ac_cv_lib_socket_connect=no
21935 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21936 LIBS=$ac_check_lib_save_LIBS
21938 echo "$as_me:21938: result: $ac_cv_lib_socket_connect" >&5
21939 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
21940 if test "$ac_cv_lib_socket_connect" = yes; then
21941 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
21946 # Guillermo Gomez says -lposix is necessary on A/UX.
21947 echo "$as_me:21947: checking for remove" >&5
21948 echo $ECHO_N "checking for remove... $ECHO_C" >&6
21949 if test "${ac_cv_func_remove+set}" = set; then
21950 echo $ECHO_N "(cached) $ECHO_C" >&6
21952 cat >"conftest.$ac_ext" <<_ACEOF
21953 #line 21953 "configure"
21954 #include "confdefs.h"
21955 #define remove autoconf_temporary
21956 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
21963 /* We use char because int might match the return type of a gcc2
21964 builtin and then its argument prototype would still apply. */
21965 char remove (void);
21971 /* The GNU C library defines stubs for functions which it implements
21972 to always fail with ENOSYS. Some functions are actually named
21973 something starting with __ and the normal name is an alias. */
21974 #if defined (__stub_remove) || defined (__stub___remove)
21975 #error found stub for remove
21983 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21984 if { (eval echo "$as_me:21984: \"$ac_link\"") >&5
21985 (eval $ac_link) 2>&5
21987 echo "$as_me:21987: \$? = $ac_status" >&5
21988 (exit "$ac_status"); } &&
21989 { ac_try='test -s "conftest$ac_exeext"'
21990 { (eval echo "$as_me:21990: \"$ac_try\"") >&5
21991 (eval $ac_try) 2>&5
21993 echo "$as_me:21993: \$? = $ac_status" >&5
21994 (exit "$ac_status"); }; }; then
21995 ac_cv_func_remove=yes
21997 echo "$as_me: failed program was:" >&5
21998 cat "conftest.$ac_ext" >&5
21999 ac_cv_func_remove=no
22001 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22003 echo "$as_me:22003: result: $ac_cv_func_remove" >&5
22004 echo "${ECHO_T}$ac_cv_func_remove" >&6
22006 if test $ac_cv_func_remove = no; then
22007 echo "$as_me:22007: checking for remove in -lposix" >&5
22008 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
22009 if test "${ac_cv_lib_posix_remove+set}" = set; then
22010 echo $ECHO_N "(cached) $ECHO_C" >&6
22012 ac_check_lib_save_LIBS=$LIBS
22013 LIBS="-lposix $LIBS"
22014 cat >"conftest.$ac_ext" <<_ACEOF
22015 #line 22015 "configure"
22016 #include "confdefs.h"
22018 /* Override any gcc2 internal prototype to avoid an error. */
22022 /* We use char because int might match the return type of a gcc2
22023 builtin and then its argument prototype would still apply. */
22033 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22034 if { (eval echo "$as_me:22034: \"$ac_link\"") >&5
22035 (eval $ac_link) 2>&5
22037 echo "$as_me:22037: \$? = $ac_status" >&5
22038 (exit "$ac_status"); } &&
22039 { ac_try='test -s "conftest$ac_exeext"'
22040 { (eval echo "$as_me:22040: \"$ac_try\"") >&5
22041 (eval $ac_try) 2>&5
22043 echo "$as_me:22043: \$? = $ac_status" >&5
22044 (exit "$ac_status"); }; }; then
22045 ac_cv_lib_posix_remove=yes
22047 echo "$as_me: failed program was:" >&5
22048 cat "conftest.$ac_ext" >&5
22049 ac_cv_lib_posix_remove=no
22051 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22052 LIBS=$ac_check_lib_save_LIBS
22054 echo "$as_me:22054: result: $ac_cv_lib_posix_remove" >&5
22055 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
22056 if test "$ac_cv_lib_posix_remove" = yes; then
22057 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
22062 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
22063 echo "$as_me:22063: checking for shmat" >&5
22064 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
22065 if test "${ac_cv_func_shmat+set}" = set; then
22066 echo $ECHO_N "(cached) $ECHO_C" >&6
22068 cat >"conftest.$ac_ext" <<_ACEOF
22069 #line 22069 "configure"
22070 #include "confdefs.h"
22071 #define shmat autoconf_temporary
22072 #include <limits.h> /* least-intrusive standard header which defines gcc2 __stub macros */
22079 /* We use char because int might match the return type of a gcc2
22080 builtin and then its argument prototype would still apply. */
22087 /* The GNU C library defines stubs for functions which it implements
22088 to always fail with ENOSYS. Some functions are actually named
22089 something starting with __ and the normal name is an alias. */
22090 #if defined (__stub_shmat) || defined (__stub___shmat)
22091 #error found stub for shmat
22099 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22100 if { (eval echo "$as_me:22100: \"$ac_link\"") >&5
22101 (eval $ac_link) 2>&5
22103 echo "$as_me:22103: \$? = $ac_status" >&5
22104 (exit "$ac_status"); } &&
22105 { ac_try='test -s "conftest$ac_exeext"'
22106 { (eval echo "$as_me:22106: \"$ac_try\"") >&5
22107 (eval $ac_try) 2>&5
22109 echo "$as_me:22109: \$? = $ac_status" >&5
22110 (exit "$ac_status"); }; }; then
22111 ac_cv_func_shmat=yes
22113 echo "$as_me: failed program was:" >&5
22114 cat "conftest.$ac_ext" >&5
22115 ac_cv_func_shmat=no
22117 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22119 echo "$as_me:22119: result: $ac_cv_func_shmat" >&5
22120 echo "${ECHO_T}$ac_cv_func_shmat" >&6
22122 if test $ac_cv_func_shmat = no; then
22123 echo "$as_me:22123: checking for shmat in -lipc" >&5
22124 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
22125 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
22126 echo $ECHO_N "(cached) $ECHO_C" >&6
22128 ac_check_lib_save_LIBS=$LIBS
22130 cat >"conftest.$ac_ext" <<_ACEOF
22131 #line 22131 "configure"
22132 #include "confdefs.h"
22134 /* Override any gcc2 internal prototype to avoid an error. */
22138 /* We use char because int might match the return type of a gcc2
22139 builtin and then its argument prototype would still apply. */
22149 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22150 if { (eval echo "$as_me:22150: \"$ac_link\"") >&5
22151 (eval $ac_link) 2>&5
22153 echo "$as_me:22153: \$? = $ac_status" >&5
22154 (exit "$ac_status"); } &&
22155 { ac_try='test -s "conftest$ac_exeext"'
22156 { (eval echo "$as_me:22156: \"$ac_try\"") >&5
22157 (eval $ac_try) 2>&5
22159 echo "$as_me:22159: \$? = $ac_status" >&5
22160 (exit "$ac_status"); }; }; then
22161 ac_cv_lib_ipc_shmat=yes
22163 echo "$as_me: failed program was:" >&5
22164 cat "conftest.$ac_ext" >&5
22165 ac_cv_lib_ipc_shmat=no
22167 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22168 LIBS=$ac_check_lib_save_LIBS
22170 echo "$as_me:22170: result: $ac_cv_lib_ipc_shmat" >&5
22171 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
22172 if test "$ac_cv_lib_ipc_shmat" = yes; then
22173 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
22179 # Check for libraries that X11R6 Xt/Xaw programs need.
22180 ac_save_LDFLAGS=$LDFLAGS
22181 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
22182 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
22183 # check for ICE first), but we must link in the order -lSM -lICE or
22184 # we get undefined symbols. So assume we have SM if we have ICE.
22185 # These have to be linked with before -lX11, unlike the other
22186 # libraries we check for below, so use a different variable.
22187 # John Interrante, Karl Berry
22188 echo "$as_me:22188: checking for IceConnectionNumber in -lICE" >&5
22189 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
22190 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
22191 echo $ECHO_N "(cached) $ECHO_C" >&6
22193 ac_check_lib_save_LIBS=$LIBS
22194 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
22195 cat >"conftest.$ac_ext" <<_ACEOF
22196 #line 22196 "configure"
22197 #include "confdefs.h"
22199 /* Override any gcc2 internal prototype to avoid an error. */
22203 /* We use char because int might match the return type of a gcc2
22204 builtin and then its argument prototype would still apply. */
22205 char IceConnectionNumber ();
22209 IceConnectionNumber ();
22214 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22215 if { (eval echo "$as_me:22215: \"$ac_link\"") >&5
22216 (eval $ac_link) 2>&5
22218 echo "$as_me:22218: \$? = $ac_status" >&5
22219 (exit "$ac_status"); } &&
22220 { ac_try='test -s "conftest$ac_exeext"'
22221 { (eval echo "$as_me:22221: \"$ac_try\"") >&5
22222 (eval $ac_try) 2>&5
22224 echo "$as_me:22224: \$? = $ac_status" >&5
22225 (exit "$ac_status"); }; }; then
22226 ac_cv_lib_ICE_IceConnectionNumber=yes
22228 echo "$as_me: failed program was:" >&5
22229 cat "conftest.$ac_ext" >&5
22230 ac_cv_lib_ICE_IceConnectionNumber=no
22232 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22233 LIBS=$ac_check_lib_save_LIBS
22235 echo "$as_me:22235: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
22236 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
22237 if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
22238 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
22241 LDFLAGS=$ac_save_LDFLAGS
22247 if test "$GCC" = yes || test "$GXX" = yes
22250 if test "$GCC" = yes || test "$GXX" = yes
22255 for cf_temp_scan in $CFLAGS
22257 case "x$cf_temp_scan" in
22260 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22261 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22266 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
22267 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
22272 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22273 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22278 if test "x$CFLAGS" != "x$cf_temp_flags"
22280 test -n "$verbose" && echo " repairing CFLAGS: $CFLAGS" 1>&6
22282 echo "${as_me:-configure}:22282: testing repairing CFLAGS: $CFLAGS ..." 1>&5
22284 CFLAGS="$cf_temp_flags"
22285 test -n "$verbose" && echo " ... fixed $CFLAGS" 1>&6
22287 echo "${as_me:-configure}:22287: testing ... fixed $CFLAGS ..." 1>&5
22289 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
22291 echo "${as_me:-configure}:22291: testing ... extra $EXTRA_CFLAGS ..." 1>&5
22298 if test "$GCC" = yes || test "$GXX" = yes
22303 for cf_temp_scan in $CPPFLAGS
22305 case "x$cf_temp_scan" in
22308 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22309 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22314 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
22315 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
22320 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22321 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22326 if test "x$CPPFLAGS" != "x$cf_temp_flags"
22328 test -n "$verbose" && echo " repairing CPPFLAGS: $CPPFLAGS" 1>&6
22330 echo "${as_me:-configure}:22330: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
22332 CPPFLAGS="$cf_temp_flags"
22333 test -n "$verbose" && echo " ... fixed $CPPFLAGS" 1>&6
22335 echo "${as_me:-configure}:22335: testing ... fixed $CPPFLAGS ..." 1>&5
22337 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
22339 echo "${as_me:-configure}:22339: testing ... extra $EXTRA_CFLAGS ..." 1>&5
22346 if test "$GCC" = yes || test "$GXX" = yes
22351 for cf_temp_scan in $LDFLAGS
22353 case "x$cf_temp_scan" in
22356 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22357 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22362 test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
22363 EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
22368 test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
22369 cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
22374 if test "x$LDFLAGS" != "x$cf_temp_flags"
22376 test -n "$verbose" && echo " repairing LDFLAGS: $LDFLAGS" 1>&6
22378 echo "${as_me:-configure}:22378: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
22380 LDFLAGS="$cf_temp_flags"
22381 test -n "$verbose" && echo " ... fixed $LDFLAGS" 1>&6
22383 echo "${as_me:-configure}:22383: testing ... fixed $LDFLAGS ..." 1>&5
22385 test -n "$verbose" && echo " ... extra $EXTRA_CFLAGS" 1>&6
22387 echo "${as_me:-configure}:22387: testing ... extra $EXTRA_CFLAGS ..." 1>&5
22394 echo "$as_me:22394: checking if you want to turn on gcc warnings" >&5
22395 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
22397 # Check whether --enable-warnings or --disable-warnings was given.
22398 if test "${enable_warnings+set}" = set; then
22399 enableval="$enable_warnings"
22400 test "$enableval" != yes && enableval=no
22401 if test "$enableval" != "no" ; then
22402 enable_warnings=yes
22411 echo "$as_me:22411: result: $enable_warnings" >&5
22412 echo "${ECHO_T}$enable_warnings" >&6
22413 if test "$enable_warnings" = "yes"
22416 if test "$GCC" = yes || test "$GXX" = yes
22418 cat > conftest.i <<EOF
22420 #define GCC_PRINTF 0
22423 #define GCC_SCANF 0
22425 #ifndef GCC_NORETURN
22426 #define GCC_NORETURN /* nothing */
22429 #define GCC_UNUSED /* nothing */
22432 if test "$GCC" = yes
22434 { echo "$as_me:22434: checking for $CC __attribute__ directives..." >&5
22435 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
22436 cat > "conftest.$ac_ext" <<EOF
22437 #line 22437 "${as_me:-configure}"
22439 #include "confdefs.h"
22440 #include "conftest.h"
22441 #include "conftest.i"
22443 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
22445 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
22448 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
22450 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
22452 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
22453 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
22454 extern GCC_NORETURN void foo(void);
22455 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
22457 cf_printf_attribute=no
22458 cf_scanf_attribute=no
22459 for cf_attribute in scanf printf unused noreturn
22462 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
22464 cf_directive="__attribute__(($cf_attribute))"
22465 echo "checking for $CC $cf_directive" 1>&5
22467 case "$cf_attribute" in
22469 cf_printf_attribute=yes
22470 cat >conftest.h <<EOF
22471 #define GCC_$cf_ATTRIBUTE 1
22475 cf_scanf_attribute=yes
22476 cat >conftest.h <<EOF
22477 #define GCC_$cf_ATTRIBUTE 1
22481 cat >conftest.h <<EOF
22482 #define GCC_$cf_ATTRIBUTE $cf_directive
22487 if { (eval echo "$as_me:22487: \"$ac_compile\"") >&5
22488 (eval $ac_compile) 2>&5
22490 echo "$as_me:22490: \$? = $ac_status" >&5
22491 (exit "$ac_status"); }; then
22492 test -n "$verbose" && echo "$as_me:22492: result: ... $cf_attribute" >&5
22493 echo "${ECHO_T}... $cf_attribute" >&6
22494 cat conftest.h >>confdefs.h
22495 case "$cf_attribute" in
22498 cat >>confdefs.h <<EOF
22499 #define GCC_NORETURN $cf_directive
22504 cf_value='/* nothing */'
22505 if test "$cf_printf_attribute" != no ; then
22506 cf_value='__attribute__((format(printf,fmt,var)))'
22508 cat >>confdefs.h <<\EOF
22509 #define GCC_PRINTF 1
22514 cat >>confdefs.h <<EOF
22515 #define GCC_PRINTFLIKE(fmt,var) $cf_value
22520 cf_value='/* nothing */'
22521 if test "$cf_scanf_attribute" != no ; then
22522 cf_value='__attribute__((format(scanf,fmt,var)))'
22524 cat >>confdefs.h <<\EOF
22525 #define GCC_SCANF 1
22530 cat >>confdefs.h <<EOF
22531 #define GCC_SCANFLIKE(fmt,var) $cf_value
22537 cat >>confdefs.h <<EOF
22538 #define GCC_UNUSED $cf_directive
22546 ${FGREP-fgrep} define conftest.i >>confdefs.h
22551 if test "x$have_x" = xyes; then
22553 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
22554 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
22555 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
22556 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
22557 for cf_X_CFLAGS in $X_CFLAGS
22559 case "x$cf_X_CFLAGS" in
22561 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
22564 CFLAGS="$CFLAGS $cf_X_CFLAGS"
22569 cat >"conftest.$ac_ext" <<_ACEOF
22570 #line 22570 "configure"
22571 #include "confdefs.h"
22573 #include <stdlib.h>
22574 #include <X11/Intrinsic.h>
22579 String foo = malloc(1); free((void*)foo)
22584 rm -f "conftest.$ac_objext"
22585 if { (eval echo "$as_me:22585: \"$ac_compile\"") >&5
22586 (eval $ac_compile) 2>&5
22588 echo "$as_me:22588: \$? = $ac_status" >&5
22589 (exit "$ac_status"); } &&
22590 { ac_try='test -s "conftest.$ac_objext"'
22591 { (eval echo "$as_me:22591: \"$ac_try\"") >&5
22592 (eval $ac_try) 2>&5
22594 echo "$as_me:22594: \$? = $ac_status" >&5
22595 (exit "$ac_status"); }; }; then
22597 echo "$as_me:22597: checking for X11/Xt const-feature" >&5
22598 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
22599 if test "${cf_cv_const_x_string+set}" = set; then
22600 echo $ECHO_N "(cached) $ECHO_C" >&6
22603 cat >"conftest.$ac_ext" <<_ACEOF
22604 #line 22604 "configure"
22605 #include "confdefs.h"
22607 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
22608 #undef XTSTRINGDEFINES /* X11R5 and later */
22609 #include <stdlib.h>
22610 #include <X11/Intrinsic.h>
22615 String foo = malloc(1); *foo = 0
22620 rm -f "conftest.$ac_objext"
22621 if { (eval echo "$as_me:22621: \"$ac_compile\"") >&5
22622 (eval $ac_compile) 2>&5
22624 echo "$as_me:22624: \$? = $ac_status" >&5
22625 (exit "$ac_status"); } &&
22626 { ac_try='test -s "conftest.$ac_objext"'
22627 { (eval echo "$as_me:22627: \"$ac_try\"") >&5
22628 (eval $ac_try) 2>&5
22630 echo "$as_me:22630: \$? = $ac_status" >&5
22631 (exit "$ac_status"); }; }; then
22633 cf_cv_const_x_string=no
22636 echo "$as_me: failed program was:" >&5
22637 cat "conftest.$ac_ext" >&5
22639 cf_cv_const_x_string=yes
22642 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22645 echo "$as_me:22645: result: $cf_cv_const_x_string" >&5
22646 echo "${ECHO_T}$cf_cv_const_x_string" >&6
22648 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
22649 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
22650 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
22652 case "$cf_cv_const_x_string" in
22655 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22656 CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
22661 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22662 CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
22668 echo "$as_me: failed program was:" >&5
22669 cat "conftest.$ac_ext" >&5
22671 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22673 cat > "conftest.$ac_ext" <<EOF
22674 #line 22674 "${as_me:-configure}"
22675 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
22677 if test "$INTEL_COMPILER" = yes
22679 # The "-wdXXX" options suppress warnings:
22680 # remark #1419: external declaration in primary source file
22681 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
22682 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
22683 # remark #193: zero used for undefined preprocessing identifier
22684 # remark #593: variable "curs_sb_left_arrow" was set but never used
22685 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
22686 # remark #869: parameter "tw" was never referenced
22687 # remark #981: operands are evaluated in unspecified order
22688 # warning #279: controlling expression is constant
22690 { echo "$as_me:22690: checking for $CC warning options..." >&5
22691 echo "$as_me: checking for $CC warning options..." >&6;}
22692 cf_save_CFLAGS="$CFLAGS"
22693 EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
22705 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
22706 if { (eval echo "$as_me:22706: \"$ac_compile\"") >&5
22707 (eval $ac_compile) 2>&5
22709 echo "$as_me:22709: \$? = $ac_status" >&5
22710 (exit "$ac_status"); }; then
22711 test -n "$verbose" && echo "$as_me:22711: result: ... -$cf_opt" >&5
22712 echo "${ECHO_T}... -$cf_opt" >&6
22713 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
22716 CFLAGS="$cf_save_CFLAGS"
22717 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
22719 { echo "$as_me:22719: checking for $CC warning options..." >&5
22720 echo "$as_me: checking for $CC warning options..." >&6;}
22721 cf_save_CFLAGS="$CFLAGS"
22723 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
22724 cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
22725 test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
22726 for cf_opt in W Wall \
22727 Wbad-function-cast \
22730 Wdeclaration-after-statement \
22733 Wmissing-declarations \
22734 Wmissing-prototypes \
22738 Wstrict-prototypes \
22739 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas
22741 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
22742 if { (eval echo "$as_me:22742: \"$ac_compile\"") >&5
22743 (eval $ac_compile) 2>&5
22745 echo "$as_me:22745: \$? = $ac_status" >&5
22746 (exit "$ac_status"); }; then
22747 test -n "$verbose" && echo "$as_me:22747: result: ... -$cf_opt" >&5
22748 echo "${ECHO_T}... -$cf_opt" >&6
22751 case "$GCC_VERSION" in
22753 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
22755 echo "${as_me:-configure}:22755: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
22761 case "$GCC_VERSION" in
22763 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
22765 echo "${as_me:-configure}:22765: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
22771 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
22774 CFLAGS="$cf_save_CFLAGS"
22782 echo "$as_me:22782: checking if you want to use dmalloc for testing" >&5
22783 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
22785 # Check whether --with-dmalloc or --without-dmalloc was given.
22786 if test "${with_dmalloc+set}" = set; then
22787 withval="$with_dmalloc"
22788 case "x$withval" in
22791 : "${with_cflags:=-g}"
22792 : "${enable_leaks:=no}"
22795 cat >>confdefs.h <<EOF
22796 #define USE_DMALLOC 1
22804 echo "$as_me:22804: result: ${with_dmalloc:-no}" >&5
22805 echo "${ECHO_T}${with_dmalloc:-no}" >&6
22807 case ".$with_cflags" in
22817 cf_new_extra_cppflags=
22819 for cf_add_cflags in -g
22821 case "$cf_fix_cppflags" in
22823 case "$cf_add_cflags" in
22824 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22825 case "$cf_add_cflags" in
22827 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22829 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22830 && test -z "${cf_tst_cflags}" \
22831 && cf_fix_cppflags=yes
22833 if test "$cf_fix_cppflags" = yes ; then
22835 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22836 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22839 elif test "${cf_tst_cflags}" = "\"'" ; then
22841 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22842 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22848 case "$CPPFLAGS" in
22852 case "$cf_add_cflags" in
22854 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22856 CPPFLAGS=`echo "$CPPFLAGS" | \
22857 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
22858 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
22863 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22864 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22871 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22872 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22879 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22880 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22882 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22884 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22885 && test -z "${cf_tst_cflags}" \
22886 && cf_fix_cppflags=no
22891 if test -n "$cf_new_cflags" ; then
22893 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22894 CFLAGS="${CFLAGS}$cf_new_cflags"
22898 if test -n "$cf_new_cppflags" ; then
22900 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22901 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22905 if test -n "$cf_new_extra_cppflags" ; then
22907 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22908 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22917 if test "$with_dmalloc" = yes ; then
22918 echo "$as_me:22918: checking for dmalloc.h" >&5
22919 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
22920 if test "${ac_cv_header_dmalloc_h+set}" = set; then
22921 echo $ECHO_N "(cached) $ECHO_C" >&6
22923 cat >"conftest.$ac_ext" <<_ACEOF
22924 #line 22924 "configure"
22925 #include "confdefs.h"
22926 #include <dmalloc.h>
22928 if { (eval echo "$as_me:22928: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22929 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22931 $EGREP -v '^ *\+' conftest.er1 >conftest.err
22933 cat conftest.err >&5
22934 echo "$as_me:22934: \$? = $ac_status" >&5
22935 (exit "$ac_status"); } >/dev/null; then
22936 if test -s conftest.err; then
22937 ac_cpp_err=$ac_c_preproc_warn_flag
22944 if test -z "$ac_cpp_err"; then
22945 ac_cv_header_dmalloc_h=yes
22947 echo "$as_me: failed program was:" >&5
22948 cat "conftest.$ac_ext" >&5
22949 ac_cv_header_dmalloc_h=no
22951 rm -f conftest.err "conftest.$ac_ext"
22953 echo "$as_me:22953: result: $ac_cv_header_dmalloc_h" >&5
22954 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
22955 if test "$ac_cv_header_dmalloc_h" = yes; then
22957 echo "$as_me:22957: checking for dmalloc_debug in -ldmalloc" >&5
22958 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
22959 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
22960 echo $ECHO_N "(cached) $ECHO_C" >&6
22962 ac_check_lib_save_LIBS=$LIBS
22963 LIBS="-ldmalloc $LIBS"
22964 cat >"conftest.$ac_ext" <<_ACEOF
22965 #line 22965 "configure"
22966 #include "confdefs.h"
22968 /* Override any gcc2 internal prototype to avoid an error. */
22972 /* We use char because int might match the return type of a gcc2
22973 builtin and then its argument prototype would still apply. */
22974 char dmalloc_debug ();
22983 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22984 if { (eval echo "$as_me:22984: \"$ac_link\"") >&5
22985 (eval $ac_link) 2>&5
22987 echo "$as_me:22987: \$? = $ac_status" >&5
22988 (exit "$ac_status"); } &&
22989 { ac_try='test -s "conftest$ac_exeext"'
22990 { (eval echo "$as_me:22990: \"$ac_try\"") >&5
22991 (eval $ac_try) 2>&5
22993 echo "$as_me:22993: \$? = $ac_status" >&5
22994 (exit "$ac_status"); }; }; then
22995 ac_cv_lib_dmalloc_dmalloc_debug=yes
22997 echo "$as_me: failed program was:" >&5
22998 cat "conftest.$ac_ext" >&5
22999 ac_cv_lib_dmalloc_dmalloc_debug=no
23001 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23002 LIBS=$ac_check_lib_save_LIBS
23004 echo "$as_me:23004: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
23005 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
23006 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
23007 cat >>confdefs.h <<EOF
23008 #define HAVE_LIBDMALLOC 1
23011 LIBS="-ldmalloc $LIBS"
23019 echo "$as_me:23019: checking if you want to use dbmalloc for testing" >&5
23020 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
23022 # Check whether --with-dbmalloc or --without-dbmalloc was given.
23023 if test "${with_dbmalloc+set}" = set; then
23024 withval="$with_dbmalloc"
23025 case "x$withval" in
23028 : "${with_cflags:=-g}"
23029 : "${enable_leaks:=no}"
23032 cat >>confdefs.h <<EOF
23033 #define USE_DBMALLOC 1
23041 echo "$as_me:23041: result: ${with_dbmalloc:-no}" >&5
23042 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
23044 case ".$with_cflags" in
23054 cf_new_extra_cppflags=
23056 for cf_add_cflags in -g
23058 case "$cf_fix_cppflags" in
23060 case "$cf_add_cflags" in
23061 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23062 case "$cf_add_cflags" in
23064 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23066 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23067 && test -z "${cf_tst_cflags}" \
23068 && cf_fix_cppflags=yes
23070 if test "$cf_fix_cppflags" = yes ; then
23072 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23073 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23076 elif test "${cf_tst_cflags}" = "\"'" ; then
23078 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23079 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23085 case "$CPPFLAGS" in
23089 case "$cf_add_cflags" in
23091 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23093 CPPFLAGS=`echo "$CPPFLAGS" | \
23094 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
23095 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
23100 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23101 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23108 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23109 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23116 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23117 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23119 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23121 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23122 && test -z "${cf_tst_cflags}" \
23123 && cf_fix_cppflags=no
23128 if test -n "$cf_new_cflags" ; then
23130 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23131 CFLAGS="${CFLAGS}$cf_new_cflags"
23135 if test -n "$cf_new_cppflags" ; then
23137 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23138 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23142 if test -n "$cf_new_extra_cppflags" ; then
23144 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23145 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23154 if test "$with_dbmalloc" = yes ; then
23155 echo "$as_me:23155: checking for dbmalloc.h" >&5
23156 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
23157 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
23158 echo $ECHO_N "(cached) $ECHO_C" >&6
23160 cat >"conftest.$ac_ext" <<_ACEOF
23161 #line 23161 "configure"
23162 #include "confdefs.h"
23163 #include <dbmalloc.h>
23165 if { (eval echo "$as_me:23165: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23166 (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23168 $EGREP -v '^ *\+' conftest.er1 >conftest.err
23170 cat conftest.err >&5
23171 echo "$as_me:23171: \$? = $ac_status" >&5
23172 (exit "$ac_status"); } >/dev/null; then
23173 if test -s conftest.err; then
23174 ac_cpp_err=$ac_c_preproc_warn_flag
23181 if test -z "$ac_cpp_err"; then
23182 ac_cv_header_dbmalloc_h=yes
23184 echo "$as_me: failed program was:" >&5
23185 cat "conftest.$ac_ext" >&5
23186 ac_cv_header_dbmalloc_h=no
23188 rm -f conftest.err "conftest.$ac_ext"
23190 echo "$as_me:23190: result: $ac_cv_header_dbmalloc_h" >&5
23191 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
23192 if test "$ac_cv_header_dbmalloc_h" = yes; then
23194 echo "$as_me:23194: checking for debug_malloc in -ldbmalloc" >&5
23195 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
23196 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
23197 echo $ECHO_N "(cached) $ECHO_C" >&6
23199 ac_check_lib_save_LIBS=$LIBS
23200 LIBS="-ldbmalloc $LIBS"
23201 cat >"conftest.$ac_ext" <<_ACEOF
23202 #line 23202 "configure"
23203 #include "confdefs.h"
23205 /* Override any gcc2 internal prototype to avoid an error. */
23209 /* We use char because int might match the return type of a gcc2
23210 builtin and then its argument prototype would still apply. */
23211 char debug_malloc ();
23220 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23221 if { (eval echo "$as_me:23221: \"$ac_link\"") >&5
23222 (eval $ac_link) 2>&5
23224 echo "$as_me:23224: \$? = $ac_status" >&5
23225 (exit "$ac_status"); } &&
23226 { ac_try='test -s "conftest$ac_exeext"'
23227 { (eval echo "$as_me:23227: \"$ac_try\"") >&5
23228 (eval $ac_try) 2>&5
23230 echo "$as_me:23230: \$? = $ac_status" >&5
23231 (exit "$ac_status"); }; }; then
23232 ac_cv_lib_dbmalloc_debug_malloc=yes
23234 echo "$as_me: failed program was:" >&5
23235 cat "conftest.$ac_ext" >&5
23236 ac_cv_lib_dbmalloc_debug_malloc=no
23238 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23239 LIBS=$ac_check_lib_save_LIBS
23241 echo "$as_me:23241: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
23242 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
23243 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
23244 cat >>confdefs.h <<EOF
23245 #define HAVE_LIBDBMALLOC 1
23248 LIBS="-ldbmalloc $LIBS"
23256 echo "$as_me:23256: checking if you want to use valgrind for testing" >&5
23257 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
23259 # Check whether --with-valgrind or --without-valgrind was given.
23260 if test "${with_valgrind+set}" = set; then
23261 withval="$with_valgrind"
23262 case "x$withval" in
23265 : "${with_cflags:=-g}"
23266 : "${enable_leaks:=no}"
23269 cat >>confdefs.h <<EOF
23270 #define USE_VALGRIND 1
23278 echo "$as_me:23278: result: ${with_valgrind:-no}" >&5
23279 echo "${ECHO_T}${with_valgrind:-no}" >&6
23281 case ".$with_cflags" in
23291 cf_new_extra_cppflags=
23293 for cf_add_cflags in -g
23295 case "$cf_fix_cppflags" in
23297 case "$cf_add_cflags" in
23298 (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23299 case "$cf_add_cflags" in
23301 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23303 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23304 && test -z "${cf_tst_cflags}" \
23305 && cf_fix_cppflags=yes
23307 if test "$cf_fix_cppflags" = yes ; then
23309 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23310 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23313 elif test "${cf_tst_cflags}" = "\"'" ; then
23315 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23316 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23322 case "$CPPFLAGS" in
23326 case "$cf_add_cflags" in
23328 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23330 CPPFLAGS=`echo "$CPPFLAGS" | \
23331 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
23332 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
23337 test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23338 cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23345 test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23346 cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23353 test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23354 cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23356 cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23358 test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23359 && test -z "${cf_tst_cflags}" \
23360 && cf_fix_cppflags=no
23365 if test -n "$cf_new_cflags" ; then
23367 test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23368 CFLAGS="${CFLAGS}$cf_new_cflags"
23372 if test -n "$cf_new_cppflags" ; then
23374 test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23375 CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23379 if test -n "$cf_new_extra_cppflags" ; then
23381 test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23382 EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23391 echo "$as_me:23391: checking if you want to perform memory-leak testing" >&5
23392 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
23394 # Check whether --enable-leaks or --disable-leaks was given.
23395 if test "${enable_leaks+set}" = set; then
23396 enableval="$enable_leaks"
23397 enable_leaks=$enableval
23401 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
23402 echo "$as_me:23402: result: $with_no_leaks" >&5
23403 echo "${ECHO_T}$with_no_leaks" >&6
23405 if test "$enable_leaks" = no ; then
23407 cat >>confdefs.h <<\EOF
23411 cat >>confdefs.h <<\EOF
23412 #define YY_NO_LEAKS 1
23418 if test "x$cf_cv_enable_rpath" != xno
23420 echo "$as_me:23420: checking for an rpath option" >&5
23421 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
23422 case "$cf_cv_system_name" in
23424 if test "$GCC" = yes; then
23425 LD_RPATH_OPT="-Wl,-rpath,"
23427 LD_RPATH_OPT="-rpath "
23430 (linux*|gnu*|k*bsd*-gnu|freebsd*)
23431 LD_RPATH_OPT="-Wl,-rpath,"
23433 (openbsd[2-9].*|mirbsd*)
23434 LD_RPATH_OPT="-Wl,-rpath,"
23437 LD_RPATH_OPT="-rpath "
23440 LD_RPATH_OPT="-Wl,-rpath,"
23443 LD_RPATH_OPT="-rpath "
23451 echo "$as_me:23451: result: $LD_RPATH_OPT" >&5
23452 echo "${ECHO_T}$LD_RPATH_OPT" >&6
23454 case "x$LD_RPATH_OPT" in
23456 echo "$as_me:23456: checking if we need a space after rpath option" >&5
23457 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
23458 cf_save_LIBS="$LIBS"
23460 cf_add_libs="$LIBS"
23463 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23464 # filter duplicates
23465 for cf_add_1lib in $cf_add_0lib; do
23466 for cf_add_2lib in $cf_add_libs; do
23467 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23472 test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23474 LIBS="$cf_add_libs"
23476 cat >"conftest.$ac_ext" <<_ACEOF
23477 #line 23477 "configure"
23478 #include "confdefs.h"
23488 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23489 if { (eval echo "$as_me:23489: \"$ac_link\"") >&5
23490 (eval $ac_link) 2>&5
23492 echo "$as_me:23492: \$? = $ac_status" >&5
23493 (exit "$ac_status"); } &&
23494 { ac_try='test -s "conftest$ac_exeext"'
23495 { (eval echo "$as_me:23495: \"$ac_try\"") >&5
23496 (eval $ac_try) 2>&5
23498 echo "$as_me:23498: \$? = $ac_status" >&5
23499 (exit "$ac_status"); }; }; then
23502 echo "$as_me: failed program was:" >&5
23503 cat "conftest.$ac_ext" >&5
23506 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23507 LIBS="$cf_save_LIBS"
23508 echo "$as_me:23508: result: $cf_rpath_space" >&5
23509 echo "${ECHO_T}$cf_rpath_space" >&6
23510 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
23515 echo "$as_me:23515: checking if rpath-hack should be disabled" >&5
23516 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
23518 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
23519 if test "${enable_rpath_hack+set}" = set; then
23520 enableval="$enable_rpath_hack"
23521 test "$enableval" != no && enableval=yes
23522 if test "$enableval" != "yes" ; then
23523 enable_rpath_hack=no
23525 enable_rpath_hack=yes
23529 enable_rpath_hack=yes
23532 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
23533 echo "$as_me:23533: result: $cf_disable_rpath_hack" >&5
23534 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
23536 if test "$enable_rpath_hack" = yes ; then
23538 echo "$as_me:23538: checking for updated LDFLAGS" >&5
23539 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
23540 if test -n "$LD_RPATH_OPT" ; then
23541 echo "$as_me:23541: result: maybe" >&5
23542 echo "${ECHO_T}maybe" >&6
23546 # Extract the first word of "$ac_prog", so it can be a program name with args.
23547 set dummy $ac_prog; ac_word=$2
23548 echo "$as_me:23548: checking for $ac_word" >&5
23549 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23550 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
23551 echo $ECHO_N "(cached) $ECHO_C" >&6
23553 if test -n "$cf_ldd_prog"; then
23554 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
23556 ac_save_IFS=$IFS; IFS=$ac_path_separator
23558 for ac_dir in $ac_dummy; do
23560 test -z "$ac_dir" && ac_dir=.
23561 $as_executable_p "$ac_dir/$ac_word" || continue
23562 ac_cv_prog_cf_ldd_prog="$ac_prog"
23563 echo "$as_me:23563: found $ac_dir/$ac_word" >&5
23569 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
23570 if test -n "$cf_ldd_prog"; then
23571 echo "$as_me:23571: result: $cf_ldd_prog" >&5
23572 echo "${ECHO_T}$cf_ldd_prog" >&6
23574 echo "$as_me:23574: result: no" >&5
23575 echo "${ECHO_T}no" >&6
23578 test -n "$cf_ldd_prog" && break
23580 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
23582 cf_rpath_list="/usr/lib /lib"
23583 if test "$cf_ldd_prog" != no
23587 cat >"conftest.$ac_ext" <<_ACEOF
23588 #line 23588 "configure"
23589 #include "confdefs.h"
23599 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23600 if { (eval echo "$as_me:23600: \"$ac_link\"") >&5
23601 (eval $ac_link) 2>&5
23603 echo "$as_me:23603: \$? = $ac_status" >&5
23604 (exit "$ac_status"); } &&
23605 { ac_try='test -s "conftest$ac_exeext"'
23606 { (eval echo "$as_me:23606: \"$ac_try\"") >&5
23607 (eval $ac_try) 2>&5
23609 echo "$as_me:23609: \$? = $ac_status" >&5
23610 (exit "$ac_status"); }; }; then
23611 cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
23612 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
23614 echo "$as_me: failed program was:" >&5
23615 cat "conftest.$ac_ext" >&5
23617 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23619 # If we passed the link-test, but get a "not found" on a given library,
23620 # this could be due to inept reconfiguration of gcc to make it only
23621 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
23622 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
23623 # /usr/local libraries.
23624 if test -n "$cf_rpath_oops"
23626 for cf_rpath_src in $cf_rpath_oops
23628 for cf_rpath_dir in \
23633 if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
23635 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
23637 echo "${as_me:-configure}:23637: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
23639 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
23647 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
23649 echo "${as_me:-configure}:23649: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
23651 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
23653 echo "${as_me:-configure}:23653: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
23656 for cf_rpath_src in $LDFLAGS
23658 case "$cf_rpath_src" in
23661 # check if this refers to a directory which we will ignore
23663 if test -n "$cf_rpath_list"
23665 for cf_rpath_item in $cf_rpath_list
23667 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
23675 if test "$cf_rpath_skip" = no
23677 # transform the option
23678 if test "$LD_RPATH_OPT" = "-R " ; then
23679 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
23681 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
23684 # if we have not already added this, add it now
23685 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
23686 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
23688 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
23690 echo "${as_me:-configure}:23690: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
23692 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
23697 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
23699 LDFLAGS=$cf_rpath_dst
23701 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
23703 echo "${as_me:-configure}:23703: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
23705 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
23707 echo "${as_me:-configure}:23707: testing ...checking LIBS $LIBS ..." 1>&5
23710 for cf_rpath_src in $LIBS
23712 case "$cf_rpath_src" in
23715 # check if this refers to a directory which we will ignore
23717 if test -n "$cf_rpath_list"
23719 for cf_rpath_item in $cf_rpath_list
23721 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
23729 if test "$cf_rpath_skip" = no
23731 # transform the option
23732 if test "$LD_RPATH_OPT" = "-R " ; then
23733 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
23735 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
23738 # if we have not already added this, add it now
23739 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
23740 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
23742 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
23744 echo "${as_me:-configure}:23744: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
23746 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
23751 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
23755 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
23757 echo "${as_me:-configure}:23757: testing ...checked LIBS $LIBS ..." 1>&5
23759 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
23761 echo "${as_me:-configure}:23761: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
23764 echo "$as_me:23764: result: no" >&5
23765 echo "${ECHO_T}no" >&6
23773 ac_config_files="$ac_config_files Makefile"
23774 ac_config_commands="$ac_config_commands default"
23775 cat >confcache <<\_ACEOF
23776 # This file is a shell script that caches the results of configure
23777 # tests run on this system so they can be shared between configure
23778 # scripts and configure runs, see configure's option --config-cache.
23779 # It is not useful on other systems. If it contains results you don't
23780 # want to keep, you may remove or edit it.
23782 # config.status only pays attention to the cache file if you give it
23783 # the --recheck option to rerun configure.
23785 # `ac_cv_env_foo' variables (set or unset) will be overriden when
23786 # loading this file, other *unset* `ac_cv_foo' will be assigned the
23787 # following values.
23791 # The following way of writing the cache mishandles newlines in values,
23792 # but we know of no workaround that is simple, portable, and efficient.
23793 # So, don't put newlines in cache variables' values.
23794 # Ultrix sh set writes to stderr and can't be redirected directly,
23795 # and sets the high bit in the cache file unless we assign to the vars.
23798 case `(ac_space=' '; set | grep ac_space) 2>&1` in
23800 # `set' does not quote correctly, so add quotes (double-quote
23801 # substitution turns \\\\ into \\, and sed turns \\ into \).
23804 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
23807 # `set' quotes correctly as required by POSIX, so do not add quotes.
23809 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
23816 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
23818 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
23820 if cmp -s $cache_file confcache; then :; else
23821 if test -w $cache_file; then
23822 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
23823 cat confcache >$cache_file
23825 echo "not updating unwritable cache $cache_file"
23830 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23831 # Let make expand exec_prefix.
23832 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23834 # VPATH may cause trouble with some makes, so we remove $(srcdir),
23835 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
23836 # trailing colons and then remove the whole line if VPATH becomes empty
23837 # (actually we leave an empty line to preserve line numbers).
23838 if test "x$srcdir" = x.; then
23839 ac_vpsub='/^[ ]*VPATH[ ]*=/{
23840 s/:*\$(srcdir):*/:/;
23841 s/:*\${srcdir}:*/:/;
23843 s/^\([^=]*=[ ]*\):*/\1/;
23849 DEFS=-DHAVE_CONFIG_H
23851 : "${CONFIG_STATUS=./config.status}"
23852 ac_clean_files_save=$ac_clean_files
23853 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
23854 { echo "$as_me:23854: creating $CONFIG_STATUS" >&5
23855 echo "$as_me: creating $CONFIG_STATUS" >&6;}
23856 cat >"$CONFIG_STATUS" <<_ACEOF
23858 # Generated automatically by configure.
23859 # Run this file to recreate the current configuration.
23860 # Compiler output produced by configure, useful for debugging
23861 # configure, is in config.log if it exists.
23863 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
23866 SHELL=\${CONFIG_SHELL-$SHELL}
23867 ac_cs_invocation="\$0 \$@"
23869 CLICOLOR_FORCE= GREP_OPTIONS=
23870 unset CLICOLOR_FORCE GREP_OPTIONS
23873 cat >>"$CONFIG_STATUS" <<\_ACEOF
23874 # Be Bourne compatible
23875 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
23878 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23882 # Name of the executable.
23883 as_me=`echo "$0" |sed 's,.*[\\/],,'`
23885 if expr a : '\(a\)' >/dev/null 2>&1; then
23891 rm -f conf$$ conf$$.exe conf$$.file
23893 if ln -s conf$$.file conf$$ 2>/dev/null; then
23894 # We could just check for DJGPP; but this test a) works b) is more generic
23895 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23896 if test -f conf$$.exe; then
23897 # Don't use ln at all; we don't have any links
23902 elif ln conf$$.file conf$$ 2>/dev/null; then
23907 rm -f conf$$ conf$$.exe conf$$.file
23909 as_executable_p="test -f"
23911 # Support unset when possible.
23912 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
23919 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
23920 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
23921 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
23922 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
23923 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
23924 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
23925 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
23926 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
23929 # We need space, tab and new line, in precisely that order.
23935 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
23941 # Files that config.status was made for.
23942 if test -n "$ac_config_files"; then
23943 echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
23946 if test -n "$ac_config_headers"; then
23947 echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
23950 if test -n "$ac_config_links"; then
23951 echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
23954 if test -n "$ac_config_commands"; then
23955 echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
23958 cat >>"$CONFIG_STATUS" <<\EOF
23961 \`$as_me' instantiates files from templates according to the
23962 current configuration.
23964 Usage: $0 [OPTIONS] [FILE]...
23966 -h, --help print this help, then exit
23967 -V, --version print version number, then exit
23968 -d, --debug don't remove temporary files
23969 --recheck update $as_me by reconfiguring in the same conditions
23970 --file=FILE[:TEMPLATE]
23971 instantiate the configuration file FILE
23972 --header=FILE[:TEMPLATE]
23973 instantiate the configuration header FILE
23975 Configuration files:
23978 Configuration headers:
23981 Configuration commands:
23984 Report bugs to <dickey@invisible-island.net>."
23987 cat >>"$CONFIG_STATUS" <<EOF
23990 configured by $0, generated by GNU Autoconf 2.52.20230114,
23991 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
23993 Copyright 2003-2022,2023 Thomas E. Dickey
23994 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
23995 Free Software Foundation, Inc.
23996 This config.status script is free software; the Free Software Foundation
23997 gives unlimited permission to copy, distribute and modify it."
24002 cat >>"$CONFIG_STATUS" <<\EOF
24003 # If no file are specified by the user, then we need to provide default
24004 # value. By we need to know if files were specified by the user.
24010 ac_option=`expr "x$1" : 'x\([^=]*\)='`
24011 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
24013 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
24017 *) # This is not an option, so the user has probably given explicit
24019 ac_need_defaults=false;;
24023 # Handling of the options.
24025 cat >>"$CONFIG_STATUS" <<EOF
24026 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24027 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
24028 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
24030 cat >>"$CONFIG_STATUS" <<\EOF
24031 --version | --vers* | -V )
24032 echo "$ac_cs_version"; exit 0 ;;
24034 # Conflict between --help and --header
24035 { { echo "$as_me:24035: error: ambiguous option: $1
24036 Try \`$0 --help' for more information." >&5
24037 echo "$as_me: error: ambiguous option: $1
24038 Try \`$0 --help' for more information." >&2;}
24039 { (exit 1); exit 1; }; };;
24040 --help | --hel | -h )
24041 echo "$ac_cs_usage"; exit 0 ;;
24042 --debug | --d* | -d )
24044 --file | --fil | --fi | --f )
24046 CONFIG_FILES="$CONFIG_FILES $1"
24047 ac_need_defaults=false;;
24048 --header | --heade | --head | --hea )
24050 CONFIG_HEADERS="$CONFIG_HEADERS $1"
24051 ac_need_defaults=false;;
24053 # This is an error.
24054 -*) { { echo "$as_me:24054: error: unrecognized option: $1
24055 Try \`$0 --help' for more information." >&5
24056 echo "$as_me: error: unrecognized option: $1
24057 Try \`$0 --help' for more information." >&2;}
24058 { (exit 1); exit 1; }; } ;;
24060 *) ac_config_targets="$ac_config_targets $1" ;;
24069 ## ----------------------- ##
24070 ## Running config.status. ##
24071 ## ----------------------- ##
24073 This file was extended by $as_me 2.52.20230114, executed with
24074 CONFIG_FILES = $CONFIG_FILES
24075 CONFIG_HEADERS = $CONFIG_HEADERS
24076 CONFIG_LINKS = $CONFIG_LINKS
24077 CONFIG_COMMANDS = $CONFIG_COMMANDS
24078 > "$ac_cs_invocation"
24079 on `(hostname || uname -n) 2>/dev/null | sed 1q`
24084 cat >>"$CONFIG_STATUS" <<EOF
24086 # INIT-COMMANDS section.
24096 cat >>"$CONFIG_STATUS" <<\EOF
24097 for ac_config_target in $ac_config_targets
24099 case "$ac_config_target" in
24100 # Handling of arguments.
24101 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
24102 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
24103 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
24104 *) { { echo "$as_me:24104: error: invalid argument: $ac_config_target" >&5
24105 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
24106 { (exit 1); exit 1; }; };;
24110 # If the user did not use the arguments to specify the items to instantiate,
24111 # then the envvar interface is used. Set only those that are not.
24112 # We use the long form for the default assignment because of an extremely
24113 # bizarre bug on SunOS 4.1.3.
24114 if "$ac_need_defaults"; then
24115 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
24116 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
24117 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
24120 # Create a temporary directory, and hook for its removal unless debugging.
24123 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
24124 trap '{ (exit 1); exit 1; }' 1 2 13 15
24127 # Create a (secure) tmp directory for tmp files.
24130 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
24131 test -n "$tmp" && test -d "$tmp"
24134 tmp=$TMPDIR/cs$$-$RANDOM
24135 (umask 077 && mkdir "$tmp")
24138 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
24139 { (exit 1); exit 1; }
24144 cat >>"$CONFIG_STATUS" <<EOF
24147 # CONFIG_FILES section.
24150 # No need to generate the scripts if there are no CONFIG_FILES.
24151 # This happens for instance when ./config.status config.h
24152 if test -n "\$CONFIG_FILES"; then
24153 # Protect against being on the right side of a sed subst in config.status.
24154 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
24155 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
24156 s,@SHELL@,$SHELL,;t t
24157 s,@exec_prefix@,$exec_prefix,;t t
24158 s,@prefix@,$prefix,;t t
24159 s,@program_transform_name@,$program_transform_name,;t t
24160 s,@bindir@,$bindir,;t t
24161 s,@sbindir@,$sbindir,;t t
24162 s,@libexecdir@,$libexecdir,;t t
24163 s,@datarootdir@,$datarootdir,;t t
24164 s,@datadir@,$datadir,;t t
24165 s,@sysconfdir@,$sysconfdir,;t t
24166 s,@sharedstatedir@,$sharedstatedir,;t t
24167 s,@localstatedir@,$localstatedir,;t t
24168 s,@runstatedir@,$runstatedir,;t t
24169 s,@libdir@,$libdir,;t t
24170 s,@includedir@,$includedir,;t t
24171 s,@oldincludedir@,$oldincludedir,;t t
24172 s,@infodir@,$infodir,;t t
24173 s,@mandir@,$mandir,;t t
24174 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
24175 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
24176 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
24177 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
24178 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
24179 s,@build_alias@,$build_alias,;t t
24180 s,@host_alias@,$host_alias,;t t
24181 s,@target_alias@,$target_alias,;t t
24182 s,@ECHO_C@,$ECHO_C,;t t
24183 s,@ECHO_N@,$ECHO_N,;t t
24184 s,@ECHO_T@,$ECHO_T,;t t
24185 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
24186 s,@DEFS@,$DEFS,;t t
24187 s,@LIBS@,$LIBS,;t t
24188 s,@build@,$build,;t t
24189 s,@build_cpu@,$build_cpu,;t t
24190 s,@build_vendor@,$build_vendor,;t t
24191 s,@build_os@,$build_os,;t t
24192 s,@host@,$host,;t t
24193 s,@host_cpu@,$host_cpu,;t t
24194 s,@host_vendor@,$host_vendor,;t t
24195 s,@host_os@,$host_os,;t t
24196 s,@SET_MAKE@,$SET_MAKE,;t t
24198 s,@CFLAGS@,$CFLAGS,;t t
24199 s,@LDFLAGS@,$LDFLAGS,;t t
24200 s,@CPPFLAGS@,$CPPFLAGS,;t t
24201 s,@ac_ct_CC@,$ac_ct_CC,;t t
24202 s,@EXEEXT@,$EXEEXT,;t t
24203 s,@OBJEXT@,$OBJEXT,;t t
24204 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
24206 s,@GREP@,$GREP,;t t
24207 s,@EGREP@,$EGREP,;t t
24209 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
24210 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
24211 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
24212 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
24213 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
24214 s,@LINT@,$LINT,;t t
24215 s,@LINT_OPTS@,$LINT_OPTS,;t t
24216 s,@LINT_LIBS@,$LINT_LIBS,;t t
24217 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
24218 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
24219 s,@CTAGS@,$CTAGS,;t t
24220 s,@ETAGS@,$ETAGS,;t t
24221 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
24222 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
24223 s,@MATH_LIB@,$MATH_LIB,;t t
24224 s,@top_builddir@,$top_builddir,;t t
24225 s,@CC_G_OPT@,$CC_G_OPT,;t t
24226 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
24227 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
24228 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
24229 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
24231 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
24232 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
24233 s,@LD_MODEL@,$LD_MODEL,;t t
24234 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
24235 s,@LIBTOOL@,$LIBTOOL,;t t
24236 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
24237 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
24238 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
24239 s,@LIB_LINK@,$LIB_LINK,;t t
24240 s,@LINK_TESTS@,$LINK_TESTS,;t t
24241 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
24242 s,@PACKAGE@,$PACKAGE,;t t
24243 s,@PTHREAD@,$PTHREAD,;t t
24244 s,@TEST_ARGS@,$TEST_ARGS,;t t
24245 s,@TEST_DEPS@,$TEST_DEPS,;t t
24246 s,@TEST_LIBS@,$TEST_LIBS,;t t
24247 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
24248 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
24249 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
24250 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
24251 s,@includesubdir@,$includesubdir,;t t
24252 s,@FGREP@,$FGREP,;t t
24253 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
24254 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
24255 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
24256 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
24257 s,@ECHO_LT@,$ECHO_LT,;t t
24258 s,@ECHO_LD@,$ECHO_LD,;t t
24259 s,@RULE_CC@,$RULE_CC,;t t
24260 s,@SHOW_CC@,$SHOW_CC,;t t
24261 s,@ECHO_CC@,$ECHO_CC,;t t
24262 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
24263 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
24264 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
24265 s,@X_CFLAGS@,$X_CFLAGS,;t t
24266 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
24267 s,@X_LIBS@,$X_LIBS,;t t
24268 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
24269 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
24270 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
24271 s,@cf_cv_screen@,$cf_cv_screen,;t t
24272 s,@RGB_PATH@,$RGB_PATH,;t t
24273 s,@no_x11_rgb@,$no_x11_rgb,;t t
24274 s,@FORM_NAME@,$FORM_NAME,;t t
24275 s,@MENU_NAME@,$MENU_NAME,;t t
24276 s,@PANEL_NAME@,$PANEL_NAME,;t t
24277 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
24278 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
24279 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
24284 cat >>"$CONFIG_STATUS" <<\EOF
24285 # Split the substitutions into bite-sized pieces for seds with
24286 # small command number limits, like on Digital OSF/1 and HP-UX.
24287 ac_max_sed_lines=48
24288 ac_sed_frag=1 # Number of current file.
24289 ac_beg=1 # First line for current file.
24290 ac_end=$ac_max_sed_lines # Line after last line for current file.
24293 while "$ac_more_lines"; do
24294 if test "$ac_beg" -gt 1; then
24295 sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
24297 sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
24299 if test ! -s "$tmp"/subs.frag; then
24300 ac_more_lines=false
24302 # The purpose of the label and of the branching condition is to
24303 # speed up the sed processing (if there are no `@' at all, there
24304 # is no need to browse any of the substitutions).
24305 # These are the two extra sed commands mentioned above.
24307 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
24308 # It is possible to make a multiline substitution using escaped newlines.
24309 # Ensure that we do not split the substitution between script fragments.
24311 ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
24312 sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
24313 if test -s "$tmp"/subs.next; then
24314 grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
24315 if test ! -s "$tmp"/subs.edit; then
24316 grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
24317 if test ! -s "$tmp"/subs.edit; then
24318 if test "$ac_beg" -gt 1; then
24319 ac_end=`expr "$ac_end" - 1`
24326 if test -z "$ac_sed_cmds"; then
24327 ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
24329 ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
24331 ac_sed_frag=`expr "$ac_sed_frag" + 1`
24333 ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
24336 if test -z "$ac_sed_cmds"; then
24339 fi # test -n "$CONFIG_FILES"
24342 cat >>"$CONFIG_STATUS" <<\EOF
24343 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
24344 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24346 - | *:- | *:-:* ) # input from stdin
24348 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24349 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24350 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24351 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24352 * ) ac_file_in=$ac_file.in ;;
24355 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
24356 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24357 X"$ac_file" : 'X\(//\)[^/]' \| \
24358 X"$ac_file" : 'X\(//\)$' \| \
24359 X"$ac_file" : 'X\(/\)' \| \
24360 . : '\(.\)' 2>/dev/null ||
24362 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24363 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24364 /^X\(\/\/\)$/{ s//\1/; q; }
24365 /^X\(\/\).*/{ s//\1/; q; }
24367 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24368 { case "$ac_dir" in
24369 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24373 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24374 case $as_mkdir_dir in
24375 # Skip DOS drivespec
24376 ?:) as_incr_dir=$as_mkdir_dir ;;
24378 as_incr_dir=$as_incr_dir/$as_mkdir_dir
24379 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24384 ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
24385 # A "../" for each directory in $ac_dir_suffix.
24386 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
24388 ac_dir_suffix= ac_dots=
24393 if test -z "$ac_dots"; then
24396 ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
24398 [\\/]* | ?:[\\/]* )
24399 ac_srcdir="$srcdir$ac_dir_suffix";
24400 ac_top_srcdir="$srcdir" ;;
24401 *) # Relative path.
24402 ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
24403 ac_top_srcdir="$ac_dots$srcdir" ;;
24407 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
24408 *) ac_INSTALL=$ac_dots$INSTALL ;;
24411 if test x"$ac_file" != x-; then
24412 { echo "$as_me:24412: creating $ac_file" >&5
24413 echo "$as_me: creating $ac_file" >&6;}
24416 # Let's still pretend it is `configure' which instantiates (i.e., don't
24417 # use $as_me), people would be surprised to read:
24418 # /* config.h. Generated automatically by config.status. */
24419 configure_input="Generated automatically from `echo $ac_file_in |
24420 sed 's,.*/,,'` by configure."
24422 # First look for the input files in the build tree, otherwise in the
24424 ac_file_inputs=`IFS=:
24425 for f in $ac_file_in; do
24427 -) echo "$tmp"/stdin ;;
24429 # Absolute (can't be DOS-style, as IFS=:)
24430 test -f "$f" || { { echo "$as_me:24430: error: cannot find input file: $f" >&5
24431 echo "$as_me: error: cannot find input file: $f" >&2;}
24432 { (exit 1); exit 1; }; }
24435 if test -f "$f"; then
24438 elif test -f "$srcdir/$f"; then
24443 { { echo "$as_me:24443: error: cannot find input file: $f" >&5
24444 echo "$as_me: error: cannot find input file: $f" >&2;}
24445 { (exit 1); exit 1; }; }
24448 done` || { (exit 1); exit 1; }
24450 cat >>"$CONFIG_STATUS" <<\EOF
24451 ac_warn_datarootdir=no
24452 if test x"$ac_file" != x-; then
24453 for ac_item in $ac_file_inputs
24455 ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
24456 if test -n "$ac_seen"; then
24457 ac_used=`grep '@datarootdir@' "$ac_item"`
24458 if test -z "$ac_used"; then
24459 { echo "$as_me:24459: WARNING: datarootdir was used implicitly but not set:
24461 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
24463 ac_warn_datarootdir=yes
24466 ac_seen=`grep '${datarootdir}' "$ac_item"`
24467 if test -n "$ac_seen"; then
24468 { echo "$as_me:24468: WARNING: datarootdir was used explicitly but not set:
24470 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
24472 ac_warn_datarootdir=yes
24477 if test "x$ac_warn_datarootdir" = xyes; then
24478 ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
24482 cat >>"$CONFIG_STATUS" <<EOF
24486 cat >>"$CONFIG_STATUS" <<\EOF
24488 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
24489 s,@configure_input@,$configure_input,;t t
24490 s,@srcdir@,$ac_srcdir,;t t
24491 s,@top_srcdir@,$ac_top_srcdir,;t t
24492 s,@INSTALL@,$ac_INSTALL,;t t
24493 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
24496 : "${FGREP:=grep -F}"
24497 : "${EGREP:=grep -E}"
24498 cat >>"$CONFIG_STATUS" <<EOF
24499 : "\${FGREP:=$FGREP}"
24500 : "\${EGREP:=$EGREP}"
24502 cat >>"$CONFIG_STATUS" <<\EOF
24503 if test x"$ac_file" != x-; then
24504 cp "$tmp/out" "$ac_file"
24506 for ac_name in prefix exec_prefix datarootdir
24508 ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
24509 if test -n "$ac_seen"; then
24510 ac_init=`$EGREP '[ ]*'$ac_name'[ ]*=' "$ac_file"`
24511 if test -z "$ac_init"; then
24512 ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
24513 { echo "$as_me:24513: WARNING: Variable $ac_name is used but was not set:
24515 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
24520 $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
24521 $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
24522 if test -s "$tmp"/out; then
24523 ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
24524 { echo "$as_me:24524: WARNING: Some variables may not be substituted:
24526 echo "$as_me: WARNING: Some variables may not be substituted:
24536 cat >>"$CONFIG_STATUS" <<\EOF
24539 # CONFIG_HEADER section.
24542 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24543 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24545 # ac_d sets the value in "#define NAME VALUE" lines.
24546 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
24547 ac_dB='[ ].*$,\1#\2'
24550 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24551 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
24552 ac_iB='\([ ]\),\1#\2define\3'
24555 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24556 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
24557 ac_uB='$,\1#\2define\3'
24561 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
24562 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24564 - | *:- | *:-:* ) # input from stdin
24566 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24567 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24568 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
24569 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
24570 * ) ac_file_in=$ac_file.in ;;
24573 test x"$ac_file" != x- && { echo "$as_me:24573: creating $ac_file" >&5
24574 echo "$as_me: creating $ac_file" >&6;}
24576 # First look for the input files in the build tree, otherwise in the
24578 ac_file_inputs=`IFS=:
24579 for f in $ac_file_in; do
24581 -) echo "$tmp"/stdin ;;
24583 # Absolute (can't be DOS-style, as IFS=:)
24584 test -f "$f" || { { echo "$as_me:24584: error: cannot find input file: $f" >&5
24585 echo "$as_me: error: cannot find input file: $f" >&2;}
24586 { (exit 1); exit 1; }; }
24589 if test -f "$f"; then
24592 elif test -f "$srcdir/$f"; then
24597 { { echo "$as_me:24597: error: cannot find input file: $f" >&5
24598 echo "$as_me: error: cannot find input file: $f" >&2;}
24599 { (exit 1); exit 1; }; }
24602 done` || { (exit 1); exit 1; }
24603 # Remove the trailing spaces.
24604 sed 's/[ ]*$//' $ac_file_inputs >"$tmp"/in
24608 # Transform confdefs.h into a list of #define's. We won't use it as a sed
24609 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
24610 # be either 'cat' or 'sort'.
24611 cat confdefs.h | uniq >conftest.vals
24613 # Break up conftest.vals because some shells have a limit on
24614 # the size of here documents, and old seds have small limits too.
24616 rm -f conftest.tail
24617 echo ' rm -f conftest.frag' >> "$CONFIG_STATUS"
24618 while grep . conftest.vals >/dev/null
24620 # Write chunks of a limited-size here document to conftest.frag.
24621 echo ' cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
24622 sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
24623 echo 'CEOF' >> "$CONFIG_STATUS"
24624 sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
24625 rm -f conftest.vals
24626 mv conftest.tail conftest.vals
24628 rm -f conftest.vals
24630 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
24632 echo ' cat >> conftest.edit <<CEOF
24633 /@DEFS@/r conftest.frag
24636 sed -f conftest.edit "$tmp"/in > "$tmp"/out
24638 mv "$tmp"/out "$tmp"/in
24639 rm -f conftest.edit conftest.frag
24640 ' >> "$CONFIG_STATUS"
24642 cat >>"$CONFIG_STATUS" <<\EOF
24643 # Let's still pretend it is `configure' which instantiates (i.e., don't
24644 # use $as_me), people would be surprised to read:
24645 # /* config.h. Generated automatically by config.status. */
24646 if test x"$ac_file" = x-; then
24647 echo "/* Generated automatically by configure. */" >"$tmp"/config.h
24649 echo "/* $ac_file. Generated automatically by configure. */" >"$tmp"/config.h
24651 cat "$tmp"/in >>"$tmp"/config.h
24653 if test x"$ac_file" != x-; then
24654 if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
24655 { echo "$as_me:24655: $ac_file is unchanged" >&5
24656 echo "$as_me: $ac_file is unchanged" >&6;}
24658 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
24659 X"$ac_file" : 'X\(//\)[^/]' \| \
24660 X"$ac_file" : 'X\(//\)$' \| \
24661 X"$ac_file" : 'X\(/\)' \| \
24662 . : '\(.\)' 2>/dev/null ||
24664 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
24665 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
24666 /^X\(\/\/\)$/{ s//\1/; q; }
24667 /^X\(\/\).*/{ s//\1/; q; }
24669 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24670 { case "$ac_dir" in
24671 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
24675 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
24676 case $as_mkdir_dir in
24677 # Skip DOS drivespec
24678 ?:) as_incr_dir=$as_mkdir_dir ;;
24680 as_incr_dir=$as_incr_dir/$as_mkdir_dir
24681 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
24688 mv "$tmp/config.h" "$ac_file"
24691 cat "$tmp"/config.h
24692 rm -f "$tmp"/config.h
24696 cat >>"$CONFIG_STATUS" <<\EOF
24698 # CONFIG_COMMANDS section.
24700 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
24701 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
24702 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
24709 if test ! -d "$srcdir/$cf_dir" ; then
24711 elif test -f "$srcdir/$cf_dir/programs" ; then
24712 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
24716 cat >>Makefile <<TEST_EOF
24718 # These rules are generated so we do not rely on suffix rules, which do not
24719 # work consistently for different make-programs (the '\$(MODEL)/' confuses
24720 # some, and the '\$x' confuses others).
24723 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
24726 cat >>Makefile <<TEST_EOF
24728 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
24729 \$(srcdir)/test.priv.h \\
24732 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) -DMODULE_NAME="$N" \$(srcdir)/$N.c
24736 if test -f ../config.guess && test -f ../config.sub
24738 cat >>Makefile <<TEST_EOF
24740 # if we used CF_INHERIT for getting these files, we can remove them
24742 rm -f config.guess config.sub
24750 cat >>"$CONFIG_STATUS" <<\EOF
24752 { (exit 0); exit 0; }
24754 chmod +x "$CONFIG_STATUS"
24755 ac_clean_files=$ac_clean_files_save
24757 # configure is writing to config.log, and then calls config.status.
24758 # config.status does its own redirection, appending to config.log.
24759 # Unfortunately, on DOS this fails, as config.log is still kept open
24760 # by configure, so config.status won't be able to write to it; its
24761 # output is simply discarded. So we exec the FD to /dev/null,
24762 # effectively closing config.log, so it can be properly (re)opened and
24763 # appended to by config.status. When coming back to configure, we
24764 # need to make the FD available again.
24765 if test "$no_create" != yes; then
24768 $SHELL "$CONFIG_STATUS" || ac_cs_success=false
24770 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
24771 # would make configure fail if this is the last instruction.
24772 "$ac_cs_success" || { (exit 1); exit 1; }