2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20101002.
5 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6 # Free Software Foundation, Inc.
7 # This configure script is free software; the Free Software Foundation
8 # gives unlimited permission to copy, distribute and modify it.
10 # Avoid depending upon Character Ranges.
11 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14 as_cr_digits='0123456789'
15 as_cr_alnum=$as_cr_Letters$as_cr_digits
17 # Sed expression to map a string onto a valid variable name.
18 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20 # Sed expression to map a string onto a valid CPP name.
21 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23 # Be Bourne compatible
24 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
31 # Name of the executable.
32 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34 if expr a : '\(a\)' >/dev/null 2>&1; then
40 rm -f conf$$ conf$$.exe conf$$.file
42 if ln -s conf$$.file conf$$ 2>/dev/null; then
43 # We could just check for DJGPP; but this test a) works b) is more generic
44 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45 if test -f conf$$.exe; then
46 # Don't use ln at all; we don't have any links
51 elif ln conf$$.file conf$$ 2>/dev/null; then
56 rm -f conf$$ conf$$.exe conf$$.file
58 as_executable_p="test -f"
60 # Support unset when possible.
61 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
68 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78 # We need space, tab and new line, in precisely that order.
84 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88 # so uname gets run too.
89 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
96 ac_default_prefix=/usr/local
100 SHELL=${CONFIG_SHELL-/bin/sh}
102 # Maximum number of lines to put in a shell here document.
103 # This variable seems obsolete. It should probably be removed, and
104 # only ac_max_sed_lines should be used.
105 : ${ac_max_here_lines=38}
107 ac_unique_file="ncurses.c"
109 # Initialize some variables set by options.
111 ac_init_version=false
112 # The variables have the same names as the options, with
113 # dashes changed to underlines.
121 program_transform_name=s,x,x,
129 # Installation directory options.
130 # These are left unexpanded so users can "make install exec_prefix=/foo"
131 # and all the variables that are supposed to be based on exec_prefix
132 # by default will actually change.
133 # Use braces instead of parens because sh, perl, etc. also accept them.
134 bindir='${exec_prefix}/bin'
135 sbindir='${exec_prefix}/sbin'
136 libexecdir='${exec_prefix}/libexec'
137 datadir='${prefix}/share'
138 sysconfdir='${prefix}/etc'
139 sharedstatedir='${prefix}/com'
140 localstatedir='${prefix}/var'
141 libdir='${exec_prefix}/lib'
142 includedir='${prefix}/include'
143 oldincludedir='/usr/include'
144 infodir='${prefix}/info'
145 mandir='${prefix}/man'
147 # Identity of this package.
157 # If the previous option needs an argument, assign it.
158 if test -n "$ac_prev"; then
159 eval "$ac_prev=\$ac_option"
164 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
166 # Accept the important Cygnus configure options, so we can diagnose typos.
170 -bindir | --bindir | --bindi | --bind | --bin | --bi)
172 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
175 -build | --build | --buil | --bui | --bu)
176 ac_prev=build_alias ;;
177 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
178 build_alias=$ac_optarg ;;
180 -cache-file | --cache-file | --cache-fil | --cache-fi \
181 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
182 ac_prev=cache_file ;;
183 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
184 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
185 cache_file=$ac_optarg ;;
188 cache_file=config.cache ;;
190 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
192 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
194 datadir=$ac_optarg ;;
196 -disable-* | --disable-*)
197 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
198 # Reject names that are not valid shell variable names.
199 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
200 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
201 { (exit 1); exit 1; }; }
202 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
203 eval "enable_$ac_feature=no" ;;
205 -enable-* | --enable-*)
206 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
207 # Reject names that are not valid shell variable names.
208 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
209 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
210 { (exit 1); exit 1; }; }
211 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
213 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
216 eval "enable_$ac_feature='$ac_optarg'" ;;
218 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
219 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
220 | --exec | --exe | --ex)
221 ac_prev=exec_prefix ;;
222 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
223 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
224 | --exec=* | --exe=* | --ex=*)
225 exec_prefix=$ac_optarg ;;
227 -gas | --gas | --ga | --g)
228 # Obsolete; use --with-gas.
231 -help | --help | --hel | --he | -h)
233 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
234 ac_init_help=recursive ;;
235 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
236 ac_init_help=short ;;
238 -host | --host | --hos | --ho)
239 ac_prev=host_alias ;;
240 -host=* | --host=* | --hos=* | --ho=*)
241 host_alias=$ac_optarg ;;
243 -includedir | --includedir | --includedi | --included | --include \
244 | --includ | --inclu | --incl | --inc)
245 ac_prev=includedir ;;
246 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
247 | --includ=* | --inclu=* | --incl=* | --inc=*)
248 includedir=$ac_optarg ;;
250 -infodir | --infodir | --infodi | --infod | --info | --inf)
252 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
253 infodir=$ac_optarg ;;
255 -libdir | --libdir | --libdi | --libd)
257 -libdir=* | --libdir=* | --libdi=* | --libd=*)
260 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
261 | --libexe | --libex | --libe)
262 ac_prev=libexecdir ;;
263 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
264 | --libexe=* | --libex=* | --libe=*)
265 libexecdir=$ac_optarg ;;
267 -localstatedir | --localstatedir | --localstatedi | --localstated \
268 | --localstate | --localstat | --localsta | --localst \
269 | --locals | --local | --loca | --loc | --lo)
270 ac_prev=localstatedir ;;
271 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
272 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
273 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
274 localstatedir=$ac_optarg ;;
276 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
278 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
282 # Obsolete; use --without-fp.
285 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
289 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
290 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
293 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
294 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
295 | --oldin | --oldi | --old | --ol | --o)
296 ac_prev=oldincludedir ;;
297 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
298 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
299 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
300 oldincludedir=$ac_optarg ;;
302 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
304 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
307 -program-prefix | --program-prefix | --program-prefi | --program-pref \
308 | --program-pre | --program-pr | --program-p)
309 ac_prev=program_prefix ;;
310 -program-prefix=* | --program-prefix=* | --program-prefi=* \
311 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
312 program_prefix=$ac_optarg ;;
314 -program-suffix | --program-suffix | --program-suffi | --program-suff \
315 | --program-suf | --program-su | --program-s)
316 ac_prev=program_suffix ;;
317 -program-suffix=* | --program-suffix=* | --program-suffi=* \
318 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
319 program_suffix=$ac_optarg ;;
321 -program-transform-name | --program-transform-name \
322 | --program-transform-nam | --program-transform-na \
323 | --program-transform-n | --program-transform- \
324 | --program-transform | --program-transfor \
325 | --program-transfo | --program-transf \
326 | --program-trans | --program-tran \
327 | --progr-tra | --program-tr | --program-t)
328 ac_prev=program_transform_name ;;
329 -program-transform-name=* | --program-transform-name=* \
330 | --program-transform-nam=* | --program-transform-na=* \
331 | --program-transform-n=* | --program-transform-=* \
332 | --program-transform=* | --program-transfor=* \
333 | --program-transfo=* | --program-transf=* \
334 | --program-trans=* | --program-tran=* \
335 | --progr-tra=* | --program-tr=* | --program-t=*)
336 program_transform_name=$ac_optarg ;;
338 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
339 | -silent | --silent | --silen | --sile | --sil)
342 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
344 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
346 sbindir=$ac_optarg ;;
348 -sharedstatedir | --sharedstatedir | --sharedstatedi \
349 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
350 | --sharedst | --shareds | --shared | --share | --shar \
352 ac_prev=sharedstatedir ;;
353 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
354 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
355 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
357 sharedstatedir=$ac_optarg ;;
359 -site | --site | --sit)
361 -site=* | --site=* | --sit=*)
364 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
366 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
369 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
370 | --syscon | --sysco | --sysc | --sys | --sy)
371 ac_prev=sysconfdir ;;
372 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
373 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
374 sysconfdir=$ac_optarg ;;
376 -target | --target | --targe | --targ | --tar | --ta | --t)
377 ac_prev=target_alias ;;
378 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
379 target_alias=$ac_optarg ;;
381 -v | -verbose | --verbose | --verbos | --verbo | --verb)
384 -version | --version | --versio | --versi | --vers | -V)
388 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
389 # Reject names that are not valid shell variable names.
390 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
391 { echo "$as_me: error: invalid package name: $ac_package" >&2
392 { (exit 1); exit 1; }; }
393 ac_package=`echo $ac_package| sed 's/-/_/g'`
395 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
398 eval "with_$ac_package='$ac_optarg'" ;;
400 -without-* | --without-*)
401 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
402 # Reject names that are not valid shell variable names.
403 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
404 { echo "$as_me: error: invalid package name: $ac_package" >&2
405 { (exit 1); exit 1; }; }
406 ac_package=`echo $ac_package | sed 's/-/_/g'`
407 eval "with_$ac_package=no" ;;
410 # Obsolete; use --with-x.
413 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
414 | --x-incl | --x-inc | --x-in | --x-i)
415 ac_prev=x_includes ;;
416 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
417 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
418 x_includes=$ac_optarg ;;
420 -x-libraries | --x-libraries | --x-librarie | --x-librari \
421 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
422 ac_prev=x_libraries ;;
423 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
424 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
425 x_libraries=$ac_optarg ;;
427 -*) { echo "$as_me: error: unrecognized option: $ac_option
428 Try \`$0 --help' for more information." >&2
429 { (exit 1); exit 1; }; }
433 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
434 # Reject names that are not valid shell variable names.
435 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
436 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
437 { (exit 1); exit 1; }; }
438 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
439 eval "$ac_envvar='$ac_optarg'"
443 # FIXME: should be removed in autoconf 3.0.
444 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
445 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
446 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
447 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
453 if test -n "$ac_prev"; then
454 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
455 { echo "$as_me: error: missing argument to $ac_option" >&2
456 { (exit 1); exit 1; }; }
459 # Be sure to have absolute paths.
460 for ac_var in exec_prefix prefix
462 eval ac_val=$`echo $ac_var`
464 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
465 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
466 { (exit 1); exit 1; }; };;
470 # Be sure to have absolute paths.
471 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
472 localstatedir libdir includedir oldincludedir infodir mandir
474 eval ac_val=$`echo $ac_var`
476 [\\/$]* | ?:[\\/]* ) ;;
477 *) { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
478 { (exit 1); exit 1; }; };;
482 # There might be people who depend on the old broken behavior: `$host'
483 # used to hold the argument of --host etc.
488 # FIXME: should be removed in autoconf 3.0.
489 if test "x$host_alias" != x; then
490 if test "x$build_alias" = x; then
491 cross_compiling=maybe
492 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
493 If a cross compiler is detected then cross compile mode will be used." >&2
494 elif test "x$build_alias" != "x$host_alias"; then
500 test -n "$host_alias" && ac_tool_prefix=$host_alias-
502 test "$silent" = yes && exec 6>/dev/null
504 # Find the source files, if location was not specified.
505 if test -z "$srcdir"; then
506 ac_srcdir_defaulted=yes
507 # Try the directory containing this script, then its parent.
509 ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
510 test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
512 if test ! -r $srcdir/$ac_unique_file; then
516 ac_srcdir_defaulted=no
518 if test ! -r $srcdir/$ac_unique_file; then
519 if test "$ac_srcdir_defaulted" = yes; then
520 { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
521 { (exit 1); exit 1; }; }
523 { echo "$as_me: error: cannot find sources in $srcdir" >&2
524 { (exit 1); exit 1; }; }
527 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
528 ac_env_build_alias_set=${build_alias+set}
529 ac_env_build_alias_value=$build_alias
530 ac_cv_env_build_alias_set=${build_alias+set}
531 ac_cv_env_build_alias_value=$build_alias
532 ac_env_host_alias_set=${host_alias+set}
533 ac_env_host_alias_value=$host_alias
534 ac_cv_env_host_alias_set=${host_alias+set}
535 ac_cv_env_host_alias_value=$host_alias
536 ac_env_target_alias_set=${target_alias+set}
537 ac_env_target_alias_value=$target_alias
538 ac_cv_env_target_alias_set=${target_alias+set}
539 ac_cv_env_target_alias_value=$target_alias
540 ac_env_CC_set=${CC+set}
542 ac_cv_env_CC_set=${CC+set}
543 ac_cv_env_CC_value=$CC
544 ac_env_CFLAGS_set=${CFLAGS+set}
545 ac_env_CFLAGS_value=$CFLAGS
546 ac_cv_env_CFLAGS_set=${CFLAGS+set}
547 ac_cv_env_CFLAGS_value=$CFLAGS
548 ac_env_LDFLAGS_set=${LDFLAGS+set}
549 ac_env_LDFLAGS_value=$LDFLAGS
550 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
551 ac_cv_env_LDFLAGS_value=$LDFLAGS
552 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
553 ac_env_CPPFLAGS_value=$CPPFLAGS
554 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
555 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
556 ac_env_CPP_set=${CPP+set}
557 ac_env_CPP_value=$CPP
558 ac_cv_env_CPP_set=${CPP+set}
559 ac_cv_env_CPP_value=$CPP
562 # Report the --help message.
564 if test "$ac_init_help" = "long"; then
565 # Omit some internal or obsolete options to make the list less imposing.
566 # This message is too long to be a string in the A/UX 3.1 sh.
568 \`configure' configures this package to adapt to many kinds of systems.
570 Usage: $0 [OPTION]... [VAR=VALUE]...
572 To assign environment variables (e.g., CC, CFLAGS...), specify them as
573 VAR=VALUE. See below for descriptions of some of the useful variables.
575 Defaults for the options are specified in brackets.
578 -h, --help display this help and exit
579 --help=short display options specific to this package
580 --help=recursive display the short help of all the included packages
581 -V, --version display version information and exit
582 -q, --quiet, --silent do not print \`checking...' messages
583 --cache-file=FILE cache test results in FILE [disabled]
584 -C, --config-cache alias for \`--cache-file=config.cache'
585 -n, --no-create do not create output files
586 --srcdir=DIR find the sources in DIR [configure dir or \`..']
591 Installation directories:
592 --prefix=PREFIX install architecture-independent files in PREFIX
594 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
597 By default, \`make install' will install all the files in
598 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
599 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
600 for instance \`--prefix=\$HOME'.
602 For better control, use the options below.
604 Fine tuning of the installation directories:
605 --bindir=DIR user executables [EPREFIX/bin]
606 --sbindir=DIR system admin executables [EPREFIX/sbin]
607 --libexecdir=DIR program executables [EPREFIX/libexec]
608 --datadir=DIR read-only architecture-independent data [PREFIX/share]
609 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
610 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
611 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
612 --libdir=DIR object code libraries [EPREFIX/lib]
613 --includedir=DIR C header files [PREFIX/include]
614 --oldincludedir=DIR C header files for non-gcc [/usr/include]
615 --infodir=DIR info documentation [PREFIX/info]
616 --mandir=DIR man documentation [PREFIX/man]
622 --program-prefix=PREFIX prepend PREFIX to installed program names
623 --program-suffix=SUFFIX append SUFFIX to installed program names
624 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
627 --x-includes=DIR X include files are in DIR
628 --x-libraries=DIR X library files are in DIR
631 --build=BUILD configure for building on BUILD [guessed]
632 --host=HOST build programs to run on HOST [BUILD]
636 if test -n "$ac_init_help"; then
641 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
642 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
645 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
646 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
648 --disable-echo display "compiling" commands
649 --enable-warnings test: turn on gcc compiler warnings
650 --with-dmalloc test: use Gray Watson's dmalloc library
651 --with-dbmalloc test: use Conor Cahill's dbmalloc library
652 --with-valgrind test: use valgrind
653 --disable-leaks test: free permanent memory, analyze leaks
654 --disable-widec disable checks for wide-character functions
655 --with-curses-dir=DIR directory in which (n)curses is installed
656 --with-ncursesw use wide ncurses-libraries (installed)
657 --with-ncurses use ncurses-libraries (installed)
658 --with-pdcurses compile/link with pdcurses X11 library
659 --with-curses-colr compile/link with HPUX 10.x color-curses
660 --with-curses-5lib compile/link with SunOS 5lib curses
661 --with-Xaw3d link with Xaw 3d library
662 --with-neXtaw link with neXT Athena library
663 --with-XawPlus link with Athena-Plus library
664 --with-pkg-config{=path} enable/disable use of pkg-config
665 --with-x use the X Window System
666 --with-ncurses-wrap-prefix naming-prefix for ncurses wrapped-variables
667 --disable-rpath-hack don't add rpath options for additional libraries
669 Some influential environment variables:
670 CC C compiler command
671 CFLAGS C compiler flags
672 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
673 nonstandard directory <lib dir>
674 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
675 headers in a nonstandard directory <include dir>
678 Use these variables to override the choices made by `configure' or to help
679 it to find libraries and programs with nonstandard names/locations.
684 if test "$ac_init_help" = "recursive"; then
685 # If there are subdirs, report their specific --help.
687 for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
689 # A "../" for each directory in /$ac_subdir.
690 ac_dots=`echo $ac_subdir |
691 sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
694 .) # No --srcdir option. We are building in place.
695 ac_sub_srcdir=$srcdir ;;
696 [\\/]* | ?:[\\/]* ) # Absolute path.
697 ac_sub_srcdir=$srcdir/$ac_subdir ;;
699 ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
702 # Check for guested configure; otherwise get Cygnus style configure.
703 if test -f $ac_sub_srcdir/configure.gnu; then
705 $SHELL $ac_sub_srcdir/configure.gnu --help=recursive
706 elif test -f $ac_sub_srcdir/configure; then
708 $SHELL $ac_sub_srcdir/configure --help=recursive
709 elif test -f $ac_sub_srcdir/configure.ac ||
710 test -f $ac_sub_srcdir/configure.in; then
714 echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
720 test -n "$ac_init_help" && exit 0
721 if $ac_init_version; then
724 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
725 Free Software Foundation, Inc.
726 This configure script is free software; the Free Software Foundation
727 gives unlimited permission to copy, distribute and modify it.
733 This file contains any messages produced by compilers while
734 running configure, to aid debugging if configure makes a mistake.
736 It was created by $as_me, which was
737 generated by GNU Autoconf 2.52.20101002. Invocation command line was
748 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
749 uname -m = `(uname -m) 2>/dev/null || echo unknown`
750 uname -r = `(uname -r) 2>/dev/null || echo unknown`
751 uname -s = `(uname -s) 2>/dev/null || echo unknown`
752 uname -v = `(uname -v) 2>/dev/null || echo unknown`
754 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
755 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
757 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
758 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
759 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
760 hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
761 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
762 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
763 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
777 # Keep a trace of the command line.
778 # Strip out --no-create and --no-recursion so they do not pile up.
779 # Also quote any args containing shell meta-characters.
785 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
786 | --no-cr | --no-c) ;;
787 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
788 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
789 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
790 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
791 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
793 *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
796 # Get rid of the leading space.
799 # When interrupted or exit'd, cleanup temporary files, and complete
800 # config.log. We remove comments because anyway the quotes in there
801 # would cause problems or look ugly.
803 # Save into config.log some information that might help in debugging.
805 echo "## ----------------- ##" >&5
806 echo "## Cache variables. ##" >&5
807 echo "## ----------------- ##" >&5
809 # The following way of writing the cache mishandles newlines in values,
812 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
815 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
816 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
820 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
824 sed "/^$/d" confdefs.h >conftest.log
825 if test -s conftest.log; then
827 echo "## ------------ ##" >&5
828 echo "## confdefs.h. ##" >&5
829 echo "## ------------ ##" >&5
834 test "$ac_signal" != 0 &&
835 echo "$as_me: caught signal $ac_signal" >&5
836 echo "$as_me: exit $exit_status" >&5
837 rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
840 for ac_signal in 1 2 13 15; do
841 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
845 # confdefs.h avoids OS command line length limits that DEFS can exceed.
846 rm -rf conftest* confdefs.h
847 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
850 # Let the site file select an alternate cache file if it wants to.
851 # Prefer explicitly selected file to automatically selected ones.
852 if test -z "$CONFIG_SITE"; then
853 if test "x$prefix" != xNONE; then
854 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
856 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
859 for ac_site_file in $CONFIG_SITE; do
860 if test -r "$ac_site_file"; then
861 { echo "$as_me:861: loading site script $ac_site_file" >&5
862 echo "$as_me: loading site script $ac_site_file" >&6;}
863 cat "$ac_site_file" >&5
868 if test -r "$cache_file"; then
869 # Some versions of bash will fail to source /dev/null (special
870 # files actually), so we avoid doing that.
871 if test -f "$cache_file"; then
872 { echo "$as_me:872: loading cache $cache_file" >&5
873 echo "$as_me: loading cache $cache_file" >&6;}
875 [\\/]* | ?:[\\/]* ) . $cache_file;;
880 { echo "$as_me:880: creating cache $cache_file" >&5
881 echo "$as_me: creating cache $cache_file" >&6;}
885 # Check that the precious variables saved in the cache have kept the same
887 ac_cache_corrupted=false
888 for ac_var in `(set) 2>&1 |
889 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
890 eval ac_old_set=\$ac_cv_env_${ac_var}_set
891 eval ac_new_set=\$ac_env_${ac_var}_set
892 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
893 eval ac_new_val="\$ac_env_${ac_var}_value"
894 case $ac_old_set,$ac_new_set in
896 { echo "$as_me:896: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
897 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
898 ac_cache_corrupted=: ;;
900 { echo "$as_me:900: error: \`$ac_var' was not set in the previous run" >&5
901 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
902 ac_cache_corrupted=: ;;
905 if test "x$ac_old_val" != "x$ac_new_val"; then
906 { echo "$as_me:906: error: \`$ac_var' has changed since the previous run:" >&5
907 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
908 { echo "$as_me:908: former value: $ac_old_val" >&5
909 echo "$as_me: former value: $ac_old_val" >&2;}
910 { echo "$as_me:910: current value: $ac_new_val" >&5
911 echo "$as_me: current value: $ac_new_val" >&2;}
915 # Pass precious variables to config.status. It doesn't matter if
916 # we pass some twice (in addition to the command line arguments).
917 if test "$ac_new_set" = set; then
919 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
920 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
921 ac_configure_args="$ac_configure_args '$ac_arg'"
923 *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
928 if $ac_cache_corrupted; then
929 { echo "$as_me:929: error: changes in the environment can compromise the build" >&5
930 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
931 { { echo "$as_me:931: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
932 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
933 { (exit 1); exit 1; }; }
937 ac_cpp='$CPP $CPPFLAGS'
938 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
939 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
940 ac_compiler_gnu=$ac_cv_c_compiler_gnu
941 ac_main_return=return
943 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
944 *c*,-n*) ECHO_N= ECHO_C='
946 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
947 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
949 echo "#! $SHELL" >conftest.sh
950 echo "exit 0" >>conftest.sh
952 if { (echo "$as_me:952: PATH=\".;.\"; conftest.sh") >&5
953 (PATH=".;."; conftest.sh) 2>&5
955 echo "$as_me:955: \$? = $ac_status" >&5
956 (exit $ac_status); }; then
957 ac_path_separator=';'
961 PATH_SEPARATOR="$ac_path_separator"
964 ac_config_headers="$ac_config_headers ncurses_cfg.h:ncurses_tst.hin"
966 test -f config.guess || ( test -f ../config.guess && cp ../config.guess ./ )
968 test -f config.sub || ( test -f ../config.sub && cp ../config.sub ./ )
971 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
972 if test -f $ac_dir/install-sh; then
974 ac_install_sh="$ac_aux_dir/install-sh -c"
976 elif test -f $ac_dir/install.sh; then
978 ac_install_sh="$ac_aux_dir/install.sh -c"
980 elif test -f $ac_dir/shtool; then
982 ac_install_sh="$ac_aux_dir/shtool install -c"
986 if test -z "$ac_aux_dir"; then
987 { { echo "$as_me:987: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
988 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
989 { (exit 1); exit 1; }; }
991 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
992 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
993 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
995 # Make sure we can run config.sub.
996 $ac_config_sub sun4 >/dev/null 2>&1 ||
997 { { echo "$as_me:997: error: cannot run $ac_config_sub" >&5
998 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
999 { (exit 1); exit 1; }; }
1001 echo "$as_me:1001: checking build system type" >&5
1002 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1003 if test "${ac_cv_build+set}" = set; then
1004 echo $ECHO_N "(cached) $ECHO_C" >&6
1006 ac_cv_build_alias=$build_alias
1007 test -z "$ac_cv_build_alias" &&
1008 ac_cv_build_alias=`$ac_config_guess`
1009 test -z "$ac_cv_build_alias" &&
1010 { { echo "$as_me:1010: error: cannot guess build type; you must specify one" >&5
1011 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1012 { (exit 1); exit 1; }; }
1013 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1014 { { echo "$as_me:1014: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1015 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1016 { (exit 1); exit 1; }; }
1019 echo "$as_me:1019: result: $ac_cv_build" >&5
1020 echo "${ECHO_T}$ac_cv_build" >&6
1022 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1023 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1024 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1026 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1027 echo "$as_me:1027: checking host system type" >&5
1028 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1029 if test "${ac_cv_host+set}" = set; then
1030 echo $ECHO_N "(cached) $ECHO_C" >&6
1032 ac_cv_host_alias=$host_alias
1033 test -z "$ac_cv_host_alias" &&
1034 ac_cv_host_alias=$ac_cv_build_alias
1035 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1036 { { echo "$as_me:1036: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1037 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1038 { (exit 1); exit 1; }; }
1041 echo "$as_me:1041: result: $ac_cv_host" >&5
1042 echo "${ECHO_T}$ac_cv_host" >&6
1044 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1045 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1046 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1048 system_name="$host_os"
1050 system_name="`(uname -s -r) 2>/dev/null`"
1051 if test -z "$system_name" ; then
1052 system_name="`(hostname) 2>/dev/null`"
1055 test -n "$system_name" && cat >>confdefs.h <<EOF
1056 #define SYSTEM_NAME "$system_name"
1059 if test "${cf_cv_system_name+set}" = set; then
1060 echo $ECHO_N "(cached) $ECHO_C" >&6
1062 cf_cv_system_name="$system_name"
1065 test -z "$system_name" && system_name="$cf_cv_system_name"
1066 test -n "$cf_cv_system_name" && echo "$as_me:1066: result: Configuring for $cf_cv_system_name" >&5
1067 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1069 if test ".$system_name" != ".$cf_cv_system_name" ; then
1070 echo "$as_me:1070: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1071 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1072 { { echo "$as_me:1072: error: \"Please remove config.cache and try again.\"" >&5
1073 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1074 { (exit 1); exit 1; }; }
1077 test "$program_prefix" != NONE &&
1078 program_transform_name="s,^,$program_prefix,;$program_transform_name"
1079 # Use a double $ so make ignores it.
1080 test "$program_suffix" != NONE &&
1081 program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1082 # Double any \ or $. echo might interpret backslashes.
1083 # By default was `s,x,x', remove it if useless.
1084 cat <<\_ACEOF >conftest.sed
1085 s/[\\$]/&&/g;s/;s,x,x,$//
1087 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1090 echo "$as_me:1090: checking whether ${MAKE-make} sets \${MAKE}" >&5
1091 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
1092 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
1093 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1094 echo $ECHO_N "(cached) $ECHO_C" >&6
1096 cat >conftest.make <<\EOF
1098 @echo 'ac_maketemp="${MAKE}"'
1100 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1101 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
1102 if test -n "$ac_maketemp"; then
1103 eval ac_cv_prog_make_${ac_make}_set=yes
1105 eval ac_cv_prog_make_${ac_make}_set=no
1109 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1110 echo "$as_me:1110: result: yes" >&5
1111 echo "${ECHO_T}yes" >&6
1114 echo "$as_me:1114: result: no" >&5
1115 echo "${ECHO_T}no" >&6
1116 SET_MAKE="MAKE=${MAKE-make}"
1120 ac_cpp='$CPP $CPPFLAGS'
1121 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1122 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1123 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1124 ac_main_return=return
1125 if test -n "$ac_tool_prefix"; then
1126 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1127 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1128 echo "$as_me:1128: checking for $ac_word" >&5
1129 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1130 if test "${ac_cv_prog_CC+set}" = set; then
1131 echo $ECHO_N "(cached) $ECHO_C" >&6
1133 if test -n "$CC"; then
1134 ac_cv_prog_CC="$CC" # Let the user override the test.
1136 ac_save_IFS=$IFS; IFS=$ac_path_separator
1138 for ac_dir in $ac_dummy; do
1140 test -z "$ac_dir" && ac_dir=.
1141 $as_executable_p "$ac_dir/$ac_word" || continue
1142 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1143 echo "$as_me:1143: found $ac_dir/$ac_word" >&5
1150 if test -n "$CC"; then
1151 echo "$as_me:1151: result: $CC" >&5
1152 echo "${ECHO_T}$CC" >&6
1154 echo "$as_me:1154: result: no" >&5
1155 echo "${ECHO_T}no" >&6
1159 if test -z "$ac_cv_prog_CC"; then
1161 # Extract the first word of "gcc", so it can be a program name with args.
1162 set dummy gcc; ac_word=$2
1163 echo "$as_me:1163: checking for $ac_word" >&5
1164 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1165 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1166 echo $ECHO_N "(cached) $ECHO_C" >&6
1168 if test -n "$ac_ct_CC"; then
1169 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1171 ac_save_IFS=$IFS; IFS=$ac_path_separator
1173 for ac_dir in $ac_dummy; do
1175 test -z "$ac_dir" && ac_dir=.
1176 $as_executable_p "$ac_dir/$ac_word" || continue
1177 ac_cv_prog_ac_ct_CC="gcc"
1178 echo "$as_me:1178: found $ac_dir/$ac_word" >&5
1184 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1185 if test -n "$ac_ct_CC"; then
1186 echo "$as_me:1186: result: $ac_ct_CC" >&5
1187 echo "${ECHO_T}$ac_ct_CC" >&6
1189 echo "$as_me:1189: result: no" >&5
1190 echo "${ECHO_T}no" >&6
1198 if test -z "$CC"; then
1199 if test -n "$ac_tool_prefix"; then
1200 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1201 set dummy ${ac_tool_prefix}cc; ac_word=$2
1202 echo "$as_me:1202: checking for $ac_word" >&5
1203 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1204 if test "${ac_cv_prog_CC+set}" = set; then
1205 echo $ECHO_N "(cached) $ECHO_C" >&6
1207 if test -n "$CC"; then
1208 ac_cv_prog_CC="$CC" # Let the user override the test.
1210 ac_save_IFS=$IFS; IFS=$ac_path_separator
1212 for ac_dir in $ac_dummy; do
1214 test -z "$ac_dir" && ac_dir=.
1215 $as_executable_p "$ac_dir/$ac_word" || continue
1216 ac_cv_prog_CC="${ac_tool_prefix}cc"
1217 echo "$as_me:1217: found $ac_dir/$ac_word" >&5
1224 if test -n "$CC"; then
1225 echo "$as_me:1225: result: $CC" >&5
1226 echo "${ECHO_T}$CC" >&6
1228 echo "$as_me:1228: result: no" >&5
1229 echo "${ECHO_T}no" >&6
1233 if test -z "$ac_cv_prog_CC"; then
1235 # Extract the first word of "cc", so it can be a program name with args.
1236 set dummy cc; ac_word=$2
1237 echo "$as_me:1237: checking for $ac_word" >&5
1238 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1239 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1240 echo $ECHO_N "(cached) $ECHO_C" >&6
1242 if test -n "$ac_ct_CC"; then
1243 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1245 ac_save_IFS=$IFS; IFS=$ac_path_separator
1247 for ac_dir in $ac_dummy; do
1249 test -z "$ac_dir" && ac_dir=.
1250 $as_executable_p "$ac_dir/$ac_word" || continue
1251 ac_cv_prog_ac_ct_CC="cc"
1252 echo "$as_me:1252: found $ac_dir/$ac_word" >&5
1258 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1259 if test -n "$ac_ct_CC"; then
1260 echo "$as_me:1260: result: $ac_ct_CC" >&5
1261 echo "${ECHO_T}$ac_ct_CC" >&6
1263 echo "$as_me:1263: result: no" >&5
1264 echo "${ECHO_T}no" >&6
1273 if test -z "$CC"; then
1274 # Extract the first word of "cc", so it can be a program name with args.
1275 set dummy cc; ac_word=$2
1276 echo "$as_me:1276: checking for $ac_word" >&5
1277 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1278 if test "${ac_cv_prog_CC+set}" = set; then
1279 echo $ECHO_N "(cached) $ECHO_C" >&6
1281 if test -n "$CC"; then
1282 ac_cv_prog_CC="$CC" # Let the user override the test.
1285 ac_save_IFS=$IFS; IFS=$ac_path_separator
1287 for ac_dir in $ac_dummy; do
1289 test -z "$ac_dir" && ac_dir=.
1290 $as_executable_p "$ac_dir/$ac_word" || continue
1291 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1292 ac_prog_rejected=yes
1296 echo "$as_me:1296: found $ac_dir/$ac_word" >&5
1300 if test $ac_prog_rejected = yes; then
1301 # We found a bogon in the path, so make sure we never use it.
1302 set dummy $ac_cv_prog_CC
1304 if test $# != 0; then
1305 # We chose a different compiler from the bogus one.
1306 # However, it has the same basename, so the bogon will be chosen
1307 # first if we set CC to just the basename; use the full file name.
1309 set dummy "$ac_dir/$ac_word" ${1+"$@"}
1317 if test -n "$CC"; then
1318 echo "$as_me:1318: result: $CC" >&5
1319 echo "${ECHO_T}$CC" >&6
1321 echo "$as_me:1321: result: no" >&5
1322 echo "${ECHO_T}no" >&6
1326 if test -z "$CC"; then
1327 if test -n "$ac_tool_prefix"; then
1330 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1331 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1332 echo "$as_me:1332: checking for $ac_word" >&5
1333 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1334 if test "${ac_cv_prog_CC+set}" = set; then
1335 echo $ECHO_N "(cached) $ECHO_C" >&6
1337 if test -n "$CC"; then
1338 ac_cv_prog_CC="$CC" # Let the user override the test.
1340 ac_save_IFS=$IFS; IFS=$ac_path_separator
1342 for ac_dir in $ac_dummy; do
1344 test -z "$ac_dir" && ac_dir=.
1345 $as_executable_p "$ac_dir/$ac_word" || continue
1346 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1347 echo "$as_me:1347: found $ac_dir/$ac_word" >&5
1354 if test -n "$CC"; then
1355 echo "$as_me:1355: result: $CC" >&5
1356 echo "${ECHO_T}$CC" >&6
1358 echo "$as_me:1358: result: no" >&5
1359 echo "${ECHO_T}no" >&6
1362 test -n "$CC" && break
1365 if test -z "$CC"; then
1369 # Extract the first word of "$ac_prog", so it can be a program name with args.
1370 set dummy $ac_prog; ac_word=$2
1371 echo "$as_me:1371: checking for $ac_word" >&5
1372 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1373 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1374 echo $ECHO_N "(cached) $ECHO_C" >&6
1376 if test -n "$ac_ct_CC"; then
1377 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1379 ac_save_IFS=$IFS; IFS=$ac_path_separator
1381 for ac_dir in $ac_dummy; do
1383 test -z "$ac_dir" && ac_dir=.
1384 $as_executable_p "$ac_dir/$ac_word" || continue
1385 ac_cv_prog_ac_ct_CC="$ac_prog"
1386 echo "$as_me:1386: found $ac_dir/$ac_word" >&5
1392 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1393 if test -n "$ac_ct_CC"; then
1394 echo "$as_me:1394: result: $ac_ct_CC" >&5
1395 echo "${ECHO_T}$ac_ct_CC" >&6
1397 echo "$as_me:1397: result: no" >&5
1398 echo "${ECHO_T}no" >&6
1401 test -n "$ac_ct_CC" && break
1409 test -z "$CC" && { { echo "$as_me:1409: error: no acceptable cc found in \$PATH" >&5
1410 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1411 { (exit 1); exit 1; }; }
1413 # Provide some information about the compiler.
1414 echo "$as_me:1414:" \
1415 "checking for C compiler version" >&5
1416 ac_compiler=`set X $ac_compile; echo $2`
1417 { (eval echo "$as_me:1417: \"$ac_compiler --version </dev/null >&5\"") >&5
1418 (eval $ac_compiler --version </dev/null >&5) 2>&5
1420 echo "$as_me:1420: \$? = $ac_status" >&5
1421 (exit $ac_status); }
1422 { (eval echo "$as_me:1422: \"$ac_compiler -v </dev/null >&5\"") >&5
1423 (eval $ac_compiler -v </dev/null >&5) 2>&5
1425 echo "$as_me:1425: \$? = $ac_status" >&5
1426 (exit $ac_status); }
1427 { (eval echo "$as_me:1427: \"$ac_compiler -V </dev/null >&5\"") >&5
1428 (eval $ac_compiler -V </dev/null >&5) 2>&5
1430 echo "$as_me:1430: \$? = $ac_status" >&5
1431 (exit $ac_status); }
1433 cat >conftest.$ac_ext <<_ACEOF
1434 #line 1434 "configure"
1435 #include "confdefs.h"
1445 ac_clean_files_save=$ac_clean_files
1446 ac_clean_files="$ac_clean_files a.out a.exe"
1447 # Try to create an executable without -o first, disregard a.out.
1448 # It will help us diagnose broken compilers, and finding out an intuition
1450 echo "$as_me:1450: checking for C compiler default output" >&5
1451 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1452 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1453 if { (eval echo "$as_me:1453: \"$ac_link_default\"") >&5
1454 (eval $ac_link_default) 2>&5
1456 echo "$as_me:1456: \$? = $ac_status" >&5
1457 (exit $ac_status); }; then
1458 # Find the output, starting from the most likely. This scheme is
1459 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1461 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1462 ls a.out conftest 2>/dev/null;
1463 ls a.* conftest.* 2>/dev/null`; do
1465 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1466 a.out ) # We found the default executable, but exeext='' is most
1469 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1470 # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1477 echo "$as_me: failed program was:" >&5
1478 cat conftest.$ac_ext >&5
1479 { { echo "$as_me:1479: error: C compiler cannot create executables" >&5
1480 echo "$as_me: error: C compiler cannot create executables" >&2;}
1481 { (exit 77); exit 77; }; }
1484 ac_exeext=$ac_cv_exeext
1485 echo "$as_me:1485: result: $ac_file" >&5
1486 echo "${ECHO_T}$ac_file" >&6
1488 # Check the compiler produces executables we can run. If not, either
1489 # the compiler is broken, or we cross compile.
1490 echo "$as_me:1490: checking whether the C compiler works" >&5
1491 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1492 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1493 # If not cross compiling, check that we can run a simple program.
1494 if test "$cross_compiling" != yes; then
1495 if { ac_try='./$ac_file'
1496 { (eval echo "$as_me:1496: \"$ac_try\"") >&5
1499 echo "$as_me:1499: \$? = $ac_status" >&5
1500 (exit $ac_status); }; }; then
1503 if test "$cross_compiling" = maybe; then
1506 { { echo "$as_me:1506: error: cannot run C compiled programs.
1507 If you meant to cross compile, use \`--host'." >&5
1508 echo "$as_me: error: cannot run C compiled programs.
1509 If you meant to cross compile, use \`--host'." >&2;}
1510 { (exit 1); exit 1; }; }
1514 echo "$as_me:1514: result: yes" >&5
1515 echo "${ECHO_T}yes" >&6
1517 rm -f a.out a.exe conftest$ac_cv_exeext
1518 ac_clean_files=$ac_clean_files_save
1519 # Check the compiler produces executables we can run. If not, either
1520 # the compiler is broken, or we cross compile.
1521 echo "$as_me:1521: checking whether we are cross compiling" >&5
1522 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1523 echo "$as_me:1523: result: $cross_compiling" >&5
1524 echo "${ECHO_T}$cross_compiling" >&6
1526 echo "$as_me:1526: checking for executable suffix" >&5
1527 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1528 if { (eval echo "$as_me:1528: \"$ac_link\"") >&5
1529 (eval $ac_link) 2>&5
1531 echo "$as_me:1531: \$? = $ac_status" >&5
1532 (exit $ac_status); }; then
1533 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1534 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1535 # work properly (i.e., refer to `conftest.exe'), while it won't with
1537 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1539 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1540 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1547 { { echo "$as_me:1547: error: cannot compute EXEEXT: cannot compile and link" >&5
1548 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1549 { (exit 1); exit 1; }; }
1552 rm -f conftest$ac_cv_exeext
1553 echo "$as_me:1553: result: $ac_cv_exeext" >&5
1554 echo "${ECHO_T}$ac_cv_exeext" >&6
1556 rm -f conftest.$ac_ext
1557 EXEEXT=$ac_cv_exeext
1559 echo "$as_me:1559: checking for object suffix" >&5
1560 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1561 if test "${ac_cv_objext+set}" = set; then
1562 echo $ECHO_N "(cached) $ECHO_C" >&6
1564 cat >conftest.$ac_ext <<_ACEOF
1565 #line 1565 "configure"
1566 #include "confdefs.h"
1576 rm -f conftest.o conftest.obj
1577 if { (eval echo "$as_me:1577: \"$ac_compile\"") >&5
1578 (eval $ac_compile) 2>&5
1580 echo "$as_me:1580: \$? = $ac_status" >&5
1581 (exit $ac_status); }; then
1582 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1584 *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1585 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1590 echo "$as_me: failed program was:" >&5
1591 cat conftest.$ac_ext >&5
1592 { { echo "$as_me:1592: error: cannot compute OBJEXT: cannot compile" >&5
1593 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1594 { (exit 1); exit 1; }; }
1597 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1599 echo "$as_me:1599: result: $ac_cv_objext" >&5
1600 echo "${ECHO_T}$ac_cv_objext" >&6
1601 OBJEXT=$ac_cv_objext
1603 echo "$as_me:1603: checking whether we are using the GNU C compiler" >&5
1604 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1605 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1606 echo $ECHO_N "(cached) $ECHO_C" >&6
1608 cat >conftest.$ac_ext <<_ACEOF
1609 #line 1609 "configure"
1610 #include "confdefs.h"
1623 rm -f conftest.$ac_objext
1624 if { (eval echo "$as_me:1624: \"$ac_compile\"") >&5
1625 (eval $ac_compile) 2>&5
1627 echo "$as_me:1627: \$? = $ac_status" >&5
1628 (exit $ac_status); } &&
1629 { ac_try='test -s conftest.$ac_objext'
1630 { (eval echo "$as_me:1630: \"$ac_try\"") >&5
1633 echo "$as_me:1633: \$? = $ac_status" >&5
1634 (exit $ac_status); }; }; then
1637 echo "$as_me: failed program was:" >&5
1638 cat conftest.$ac_ext >&5
1641 rm -f conftest.$ac_objext conftest.$ac_ext
1642 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1645 echo "$as_me:1645: result: $ac_cv_c_compiler_gnu" >&5
1646 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1647 GCC=`test $ac_compiler_gnu = yes && echo yes`
1648 ac_test_CFLAGS=${CFLAGS+set}
1649 ac_save_CFLAGS=$CFLAGS
1651 echo "$as_me:1651: checking whether $CC accepts -g" >&5
1652 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1653 if test "${ac_cv_prog_cc_g+set}" = set; then
1654 echo $ECHO_N "(cached) $ECHO_C" >&6
1656 cat >conftest.$ac_ext <<_ACEOF
1657 #line 1657 "configure"
1658 #include "confdefs.h"
1668 rm -f conftest.$ac_objext
1669 if { (eval echo "$as_me:1669: \"$ac_compile\"") >&5
1670 (eval $ac_compile) 2>&5
1672 echo "$as_me:1672: \$? = $ac_status" >&5
1673 (exit $ac_status); } &&
1674 { ac_try='test -s conftest.$ac_objext'
1675 { (eval echo "$as_me:1675: \"$ac_try\"") >&5
1678 echo "$as_me:1678: \$? = $ac_status" >&5
1679 (exit $ac_status); }; }; then
1682 echo "$as_me: failed program was:" >&5
1683 cat conftest.$ac_ext >&5
1686 rm -f conftest.$ac_objext conftest.$ac_ext
1688 echo "$as_me:1688: result: $ac_cv_prog_cc_g" >&5
1689 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1690 if test "$ac_test_CFLAGS" = set; then
1691 CFLAGS=$ac_save_CFLAGS
1692 elif test $ac_cv_prog_cc_g = yes; then
1693 if test "$GCC" = yes; then
1699 if test "$GCC" = yes; then
1705 # Some people use a C++ compiler to compile C. Since we use `exit',
1706 # in C++ we need to declare it. In case someone uses the same compiler
1707 # for both compiling C and C++ we need to have the C++ compiler decide
1708 # the declaration of exit, since it's the most demanding environment.
1709 cat >conftest.$ac_ext <<_ACEOF
1714 rm -f conftest.$ac_objext
1715 if { (eval echo "$as_me:1715: \"$ac_compile\"") >&5
1716 (eval $ac_compile) 2>&5
1718 echo "$as_me:1718: \$? = $ac_status" >&5
1719 (exit $ac_status); } &&
1720 { ac_try='test -s conftest.$ac_objext'
1721 { (eval echo "$as_me:1721: \"$ac_try\"") >&5
1724 echo "$as_me:1724: \$? = $ac_status" >&5
1725 (exit $ac_status); }; }; then
1726 for ac_declaration in \
1728 '#include <stdlib.h>' \
1729 'extern "C" void std::exit (int) throw (); using std::exit;' \
1730 'extern "C" void std::exit (int); using std::exit;' \
1731 'extern "C" void exit (int) throw ();' \
1732 'extern "C" void exit (int);' \
1735 cat >conftest.$ac_ext <<_ACEOF
1736 #line 1736 "configure"
1737 #include "confdefs.h"
1748 rm -f conftest.$ac_objext
1749 if { (eval echo "$as_me:1749: \"$ac_compile\"") >&5
1750 (eval $ac_compile) 2>&5
1752 echo "$as_me:1752: \$? = $ac_status" >&5
1753 (exit $ac_status); } &&
1754 { ac_try='test -s conftest.$ac_objext'
1755 { (eval echo "$as_me:1755: \"$ac_try\"") >&5
1758 echo "$as_me:1758: \$? = $ac_status" >&5
1759 (exit $ac_status); }; }; then
1762 echo "$as_me: failed program was:" >&5
1763 cat conftest.$ac_ext >&5
1766 rm -f conftest.$ac_objext conftest.$ac_ext
1767 cat >conftest.$ac_ext <<_ACEOF
1768 #line 1768 "configure"
1769 #include "confdefs.h"
1779 rm -f conftest.$ac_objext
1780 if { (eval echo "$as_me:1780: \"$ac_compile\"") >&5
1781 (eval $ac_compile) 2>&5
1783 echo "$as_me:1783: \$? = $ac_status" >&5
1784 (exit $ac_status); } &&
1785 { ac_try='test -s conftest.$ac_objext'
1786 { (eval echo "$as_me:1786: \"$ac_try\"") >&5
1789 echo "$as_me:1789: \$? = $ac_status" >&5
1790 (exit $ac_status); }; }; then
1793 echo "$as_me: failed program was:" >&5
1794 cat conftest.$ac_ext >&5
1796 rm -f conftest.$ac_objext conftest.$ac_ext
1799 if test -n "$ac_declaration"; then
1800 echo '#ifdef __cplusplus' >>confdefs.h
1801 echo $ac_declaration >>confdefs.h
1802 echo '#endif' >>confdefs.h
1806 echo "$as_me: failed program was:" >&5
1807 cat conftest.$ac_ext >&5
1809 rm -f conftest.$ac_objext conftest.$ac_ext
1811 ac_cpp='$CPP $CPPFLAGS'
1812 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1813 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1814 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1815 ac_main_return=return
1818 ac_cpp='$CPP $CPPFLAGS'
1819 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1820 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1821 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1822 ac_main_return=return
1823 echo "$as_me:1823: checking how to run the C preprocessor" >&5
1824 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
1825 # On Suns, sometimes $CPP names a directory.
1826 if test -n "$CPP" && test -d "$CPP"; then
1829 if test -z "$CPP"; then
1830 if test "${ac_cv_prog_CPP+set}" = set; then
1831 echo $ECHO_N "(cached) $ECHO_C" >&6
1833 # Double quotes because CPP needs to be expanded
1834 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
1837 for ac_c_preproc_warn_flag in '' yes
1839 # Use a header file that comes with gcc, so configuring glibc
1840 # with a fresh cross-compiler works.
1841 # On the NeXT, cc -E runs the code through the compiler's parser,
1842 # not just through cpp. "Syntax error" is here to catch this case.
1843 cat >conftest.$ac_ext <<_ACEOF
1844 #line 1844 "configure"
1845 #include "confdefs.h"
1849 if { (eval echo "$as_me:1849: \"$ac_cpp conftest.$ac_ext\"") >&5
1850 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1852 egrep -v '^ *\+' conftest.er1 >conftest.err
1854 cat conftest.err >&5
1855 echo "$as_me:1855: \$? = $ac_status" >&5
1856 (exit $ac_status); } >/dev/null; then
1857 if test -s conftest.err; then
1858 ac_cpp_err=$ac_c_preproc_warn_flag
1865 if test -z "$ac_cpp_err"; then
1868 echo "$as_me: failed program was:" >&5
1869 cat conftest.$ac_ext >&5
1870 # Broken: fails on valid input.
1873 rm -f conftest.err conftest.$ac_ext
1875 # OK, works on sane cases. Now check whether non-existent headers
1876 # can be detected and how.
1877 cat >conftest.$ac_ext <<_ACEOF
1878 #line 1878 "configure"
1879 #include "confdefs.h"
1880 #include <ac_nonexistent.h>
1882 if { (eval echo "$as_me:1882: \"$ac_cpp conftest.$ac_ext\"") >&5
1883 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1885 egrep -v '^ *\+' conftest.er1 >conftest.err
1887 cat conftest.err >&5
1888 echo "$as_me:1888: \$? = $ac_status" >&5
1889 (exit $ac_status); } >/dev/null; then
1890 if test -s conftest.err; then
1891 ac_cpp_err=$ac_c_preproc_warn_flag
1898 if test -z "$ac_cpp_err"; then
1899 # Broken: success on invalid input.
1902 echo "$as_me: failed program was:" >&5
1903 cat conftest.$ac_ext >&5
1904 # Passes both tests.
1908 rm -f conftest.err conftest.$ac_ext
1911 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
1912 rm -f conftest.err conftest.$ac_ext
1913 if $ac_preproc_ok; then
1925 echo "$as_me:1925: result: $CPP" >&5
1926 echo "${ECHO_T}$CPP" >&6
1928 for ac_c_preproc_warn_flag in '' yes
1930 # Use a header file that comes with gcc, so configuring glibc
1931 # with a fresh cross-compiler works.
1932 # On the NeXT, cc -E runs the code through the compiler's parser,
1933 # not just through cpp. "Syntax error" is here to catch this case.
1934 cat >conftest.$ac_ext <<_ACEOF
1935 #line 1935 "configure"
1936 #include "confdefs.h"
1940 if { (eval echo "$as_me:1940: \"$ac_cpp conftest.$ac_ext\"") >&5
1941 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1943 egrep -v '^ *\+' conftest.er1 >conftest.err
1945 cat conftest.err >&5
1946 echo "$as_me:1946: \$? = $ac_status" >&5
1947 (exit $ac_status); } >/dev/null; then
1948 if test -s conftest.err; then
1949 ac_cpp_err=$ac_c_preproc_warn_flag
1956 if test -z "$ac_cpp_err"; then
1959 echo "$as_me: failed program was:" >&5
1960 cat conftest.$ac_ext >&5
1961 # Broken: fails on valid input.
1964 rm -f conftest.err conftest.$ac_ext
1966 # OK, works on sane cases. Now check whether non-existent headers
1967 # can be detected and how.
1968 cat >conftest.$ac_ext <<_ACEOF
1969 #line 1969 "configure"
1970 #include "confdefs.h"
1971 #include <ac_nonexistent.h>
1973 if { (eval echo "$as_me:1973: \"$ac_cpp conftest.$ac_ext\"") >&5
1974 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
1976 egrep -v '^ *\+' conftest.er1 >conftest.err
1978 cat conftest.err >&5
1979 echo "$as_me:1979: \$? = $ac_status" >&5
1980 (exit $ac_status); } >/dev/null; then
1981 if test -s conftest.err; then
1982 ac_cpp_err=$ac_c_preproc_warn_flag
1989 if test -z "$ac_cpp_err"; then
1990 # Broken: success on invalid input.
1993 echo "$as_me: failed program was:" >&5
1994 cat conftest.$ac_ext >&5
1995 # Passes both tests.
1999 rm -f conftest.err conftest.$ac_ext
2002 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2003 rm -f conftest.err conftest.$ac_ext
2004 if $ac_preproc_ok; then
2007 { { echo "$as_me:2007: error: C preprocessor \"$CPP\" fails sanity check" >&5
2008 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2009 { (exit 1); exit 1; }; }
2013 ac_cpp='$CPP $CPPFLAGS'
2014 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2015 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2016 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2017 ac_main_return=return
2019 for ac_prog in mawk gawk nawk awk
2021 # Extract the first word of "$ac_prog", so it can be a program name with args.
2022 set dummy $ac_prog; ac_word=$2
2023 echo "$as_me:2023: checking for $ac_word" >&5
2024 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2025 if test "${ac_cv_prog_AWK+set}" = set; then
2026 echo $ECHO_N "(cached) $ECHO_C" >&6
2028 if test -n "$AWK"; then
2029 ac_cv_prog_AWK="$AWK" # Let the user override the test.
2031 ac_save_IFS=$IFS; IFS=$ac_path_separator
2033 for ac_dir in $ac_dummy; do
2035 test -z "$ac_dir" && ac_dir=.
2036 $as_executable_p "$ac_dir/$ac_word" || continue
2037 ac_cv_prog_AWK="$ac_prog"
2038 echo "$as_me:2038: found $ac_dir/$ac_word" >&5
2045 if test -n "$AWK"; then
2046 echo "$as_me:2046: result: $AWK" >&5
2047 echo "${ECHO_T}$AWK" >&6
2049 echo "$as_me:2049: result: no" >&5
2050 echo "${ECHO_T}no" >&6
2053 test -n "$AWK" && break
2056 # Find a good install program. We prefer a C program (faster),
2057 # so one script is as good as another. But avoid the broken or
2058 # incompatible versions:
2059 # SysV /etc/install, /usr/sbin/install
2060 # SunOS /usr/etc/install
2061 # IRIX /sbin/install
2063 # AmigaOS /C/install, which installs bootblocks on floppy discs
2064 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2065 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2066 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2067 # ./install, which can be erroneously created by make from ./install.sh.
2068 echo "$as_me:2068: checking for a BSD compatible install" >&5
2069 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2070 if test -z "$INSTALL"; then
2071 if test "${ac_cv_path_install+set}" = set; then
2072 echo $ECHO_N "(cached) $ECHO_C" >&6
2074 ac_save_IFS=$IFS; IFS=$ac_path_separator
2075 for ac_dir in $PATH; do
2077 # Account for people who put trailing slashes in PATH elements.
2079 / | ./ | .// | /cC/* \
2080 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2083 # OSF1 and SCO ODT 3.0 have their own names for install.
2084 # Don't use installbsd from OSF since it installs stuff as root
2086 for ac_prog in ginstall scoinst install; do
2087 if $as_executable_p "$ac_dir/$ac_prog"; then
2088 if test $ac_prog = install &&
2089 grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2090 # AIX install. It has an incompatible calling convention.
2092 elif test $ac_prog = install &&
2093 grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2094 # program-specific install script used by HP pwplus--don't use.
2097 ac_cv_path_install="$ac_dir/$ac_prog -c"
2107 if test "${ac_cv_path_install+set}" = set; then
2108 INSTALL=$ac_cv_path_install
2110 # As a last resort, use the slow shell script. We don't cache a
2111 # path for INSTALL within a source directory, because that will
2112 # break other packages using the cache if that directory is
2113 # removed, or if the path is relative.
2114 INSTALL=$ac_install_sh
2117 echo "$as_me:2117: result: $INSTALL" >&5
2118 echo "${ECHO_T}$INSTALL" >&6
2120 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2121 # It thinks the first close brace ends the variable substitution.
2122 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2124 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2126 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2132 cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
2133 test -z "$cf_dir" && cf_dir=.
2134 INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
2138 for ac_prog in tdlint lint alint splint lclint
2140 # Extract the first word of "$ac_prog", so it can be a program name with args.
2141 set dummy $ac_prog; ac_word=$2
2142 echo "$as_me:2142: checking for $ac_word" >&5
2143 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2144 if test "${ac_cv_prog_LINT+set}" = set; then
2145 echo $ECHO_N "(cached) $ECHO_C" >&6
2147 if test -n "$LINT"; then
2148 ac_cv_prog_LINT="$LINT" # Let the user override the test.
2150 ac_save_IFS=$IFS; IFS=$ac_path_separator
2152 for ac_dir in $ac_dummy; do
2154 test -z "$ac_dir" && ac_dir=.
2155 $as_executable_p "$ac_dir/$ac_word" || continue
2156 ac_cv_prog_LINT="$ac_prog"
2157 echo "$as_me:2157: found $ac_dir/$ac_word" >&5
2163 LINT=$ac_cv_prog_LINT
2164 if test -n "$LINT"; then
2165 echo "$as_me:2165: result: $LINT" >&5
2166 echo "${ECHO_T}$LINT" >&6
2168 echo "$as_me:2168: result: no" >&5
2169 echo "${ECHO_T}no" >&6
2172 test -n "$LINT" && break
2175 echo "$as_me:2175: checking if filesystem supports mixed-case filenames" >&5
2176 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
2177 if test "${cf_cv_mixedcase+set}" = set; then
2178 echo $ECHO_N "(cached) $ECHO_C" >&6
2181 if test "$cross_compiling" = yes ; then
2182 case $target_alias in #(vi
2183 *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
2191 rm -f conftest CONFTEST
2193 if test -f CONFTEST ; then
2198 rm -f conftest CONFTEST
2202 echo "$as_me:2202: result: $cf_cv_mixedcase" >&5
2203 echo "${ECHO_T}$cf_cv_mixedcase" >&6
2204 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
2205 #define MIXEDCASE_FILENAMES 1
2208 for ac_prog in exctags ctags
2210 # Extract the first word of "$ac_prog", so it can be a program name with args.
2211 set dummy $ac_prog; ac_word=$2
2212 echo "$as_me:2212: checking for $ac_word" >&5
2213 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2214 if test "${ac_cv_prog_CTAGS+set}" = set; then
2215 echo $ECHO_N "(cached) $ECHO_C" >&6
2217 if test -n "$CTAGS"; then
2218 ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
2220 ac_save_IFS=$IFS; IFS=$ac_path_separator
2222 for ac_dir in $ac_dummy; do
2224 test -z "$ac_dir" && ac_dir=.
2225 $as_executable_p "$ac_dir/$ac_word" || continue
2226 ac_cv_prog_CTAGS="$ac_prog"
2227 echo "$as_me:2227: found $ac_dir/$ac_word" >&5
2233 CTAGS=$ac_cv_prog_CTAGS
2234 if test -n "$CTAGS"; then
2235 echo "$as_me:2235: result: $CTAGS" >&5
2236 echo "${ECHO_T}$CTAGS" >&6
2238 echo "$as_me:2238: result: no" >&5
2239 echo "${ECHO_T}no" >&6
2242 test -n "$CTAGS" && break
2245 for ac_prog in exetags etags
2247 # Extract the first word of "$ac_prog", so it can be a program name with args.
2248 set dummy $ac_prog; ac_word=$2
2249 echo "$as_me:2249: checking for $ac_word" >&5
2250 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2251 if test "${ac_cv_prog_ETAGS+set}" = set; then
2252 echo $ECHO_N "(cached) $ECHO_C" >&6
2254 if test -n "$ETAGS"; then
2255 ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
2257 ac_save_IFS=$IFS; IFS=$ac_path_separator
2259 for ac_dir in $ac_dummy; do
2261 test -z "$ac_dir" && ac_dir=.
2262 $as_executable_p "$ac_dir/$ac_word" || continue
2263 ac_cv_prog_ETAGS="$ac_prog"
2264 echo "$as_me:2264: found $ac_dir/$ac_word" >&5
2270 ETAGS=$ac_cv_prog_ETAGS
2271 if test -n "$ETAGS"; then
2272 echo "$as_me:2272: result: $ETAGS" >&5
2273 echo "${ECHO_T}$ETAGS" >&6
2275 echo "$as_me:2275: result: no" >&5
2276 echo "${ECHO_T}no" >&6
2279 test -n "$ETAGS" && break
2282 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
2283 set dummy ${CTAGS:-ctags}; ac_word=$2
2284 echo "$as_me:2284: checking for $ac_word" >&5
2285 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2286 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
2287 echo $ECHO_N "(cached) $ECHO_C" >&6
2289 if test -n "$MAKE_LOWER_TAGS"; then
2290 ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
2292 ac_save_IFS=$IFS; IFS=$ac_path_separator
2294 for ac_dir in $ac_dummy; do
2296 test -z "$ac_dir" && ac_dir=.
2297 $as_executable_p "$ac_dir/$ac_word" || continue
2298 ac_cv_prog_MAKE_LOWER_TAGS="yes"
2299 echo "$as_me:2299: found $ac_dir/$ac_word" >&5
2303 test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
2306 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
2307 if test -n "$MAKE_LOWER_TAGS"; then
2308 echo "$as_me:2308: result: $MAKE_LOWER_TAGS" >&5
2309 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
2311 echo "$as_me:2311: result: no" >&5
2312 echo "${ECHO_T}no" >&6
2315 if test "$cf_cv_mixedcase" = yes ; then
2316 # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
2317 set dummy ${ETAGS:-etags}; ac_word=$2
2318 echo "$as_me:2318: checking for $ac_word" >&5
2319 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2320 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
2321 echo $ECHO_N "(cached) $ECHO_C" >&6
2323 if test -n "$MAKE_UPPER_TAGS"; then
2324 ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
2326 ac_save_IFS=$IFS; IFS=$ac_path_separator
2328 for ac_dir in $ac_dummy; do
2330 test -z "$ac_dir" && ac_dir=.
2331 $as_executable_p "$ac_dir/$ac_word" || continue
2332 ac_cv_prog_MAKE_UPPER_TAGS="yes"
2333 echo "$as_me:2333: found $ac_dir/$ac_word" >&5
2337 test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
2340 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
2341 if test -n "$MAKE_UPPER_TAGS"; then
2342 echo "$as_me:2342: result: $MAKE_UPPER_TAGS" >&5
2343 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
2345 echo "$as_me:2345: result: no" >&5
2346 echo "${ECHO_T}no" >&6
2353 if test "$MAKE_UPPER_TAGS" = yes ; then
2359 if test "$MAKE_LOWER_TAGS" = yes ; then
2365 echo "$as_me:2365: checking if -lm needed for math functions" >&5
2366 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
2367 if test "${cf_cv_need_libm+set}" = set; then
2368 echo $ECHO_N "(cached) $ECHO_C" >&6
2371 cat >conftest.$ac_ext <<_ACEOF
2372 #line 2372 "configure"
2373 #include "confdefs.h"
2381 double x = rand(); printf("result = %g\n", sin(x))
2386 rm -f conftest.$ac_objext conftest$ac_exeext
2387 if { (eval echo "$as_me:2387: \"$ac_link\"") >&5
2388 (eval $ac_link) 2>&5
2390 echo "$as_me:2390: \$? = $ac_status" >&5
2391 (exit $ac_status); } &&
2392 { ac_try='test -s conftest$ac_exeext'
2393 { (eval echo "$as_me:2393: \"$ac_try\"") >&5
2396 echo "$as_me:2396: \$? = $ac_status" >&5
2397 (exit $ac_status); }; }; then
2400 echo "$as_me: failed program was:" >&5
2401 cat conftest.$ac_ext >&5
2404 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2406 echo "$as_me:2406: result: $cf_cv_need_libm" >&5
2407 echo "${ECHO_T}$cf_cv_need_libm" >&6
2408 if test "$cf_cv_need_libm" = yes
2416 CC_SHARED_OPTS=unknown
2417 CPPFLAGS="$CPPFLAGS"
2419 DFT_OBJ_SUBDIR=`pwd|sed -e's:.*/::'`
2420 DFT_UPR_MODEL="NORMAL"
2437 TINFO_LIBS='$(LIBS_CURSES)'
2438 cf_cv_abi_version=""
2439 cf_cv_rel_version=""
2444 # This should have been defined by AC_PROG_CC
2447 # Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2448 # into CC. This will not help with broken scripts that wrap the compiler with
2449 # options, but eliminates a more common category of user confusion.
2450 echo "$as_me:2450: checking \$CC variable" >&5
2451 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2454 echo "$as_me:2454: result: broken" >&5
2455 echo "${ECHO_T}broken" >&6
2456 { echo "$as_me:2456: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2457 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2459 cf_flags=`echo "$CC" | sed -e 's/^[^ ]*[ ]//'`
2460 CC=`echo "$CC" | sed -e 's/[ ].*//'`
2465 cf_new_extra_cppflags=
2467 for cf_add_cflags in $cf_flags
2469 case $cf_fix_cppflags in
2471 case $cf_add_cflags in #(vi
2472 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2473 case $cf_add_cflags in
2475 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2477 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2478 && test -z "${cf_tst_cflags}" \
2479 && cf_fix_cppflags=yes
2481 if test $cf_fix_cppflags = yes ; then
2482 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2484 elif test "${cf_tst_cflags}" = "\"'" ; then
2485 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2491 *$cf_add_cflags) #(vi
2494 case $cf_add_cflags in #(vi
2496 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2498 CPPFLAGS=`echo "$CPPFLAGS" | \
2499 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2500 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2504 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2509 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2514 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2516 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2518 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2519 && test -z "${cf_tst_cflags}" \
2520 && cf_fix_cppflags=no
2525 if test -n "$cf_new_cflags" ; then
2527 CFLAGS="$CFLAGS $cf_new_cflags"
2530 if test -n "$cf_new_cppflags" ; then
2532 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2535 if test -n "$cf_new_extra_cppflags" ; then
2537 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2542 echo "$as_me:2542: result: ok" >&5
2543 echo "${ECHO_T}ok" >&6
2547 echo "$as_me:2547: checking for ${CC:-cc} option to accept ANSI C" >&5
2548 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2549 if test "${cf_cv_ansi_cc+set}" = set; then
2550 echo $ECHO_N "(cached) $ECHO_C" >&6
2554 cf_save_CFLAGS="$CFLAGS"
2555 cf_save_CPPFLAGS="$CPPFLAGS"
2556 # Don't try gcc -ansi; that turns off useful extensions and
2557 # breaks some systems' header files.
2558 # AIX -qlanglvl=ansi
2559 # Ultrix and OSF/1 -std1
2560 # HP-UX -Aa -D_HPUX_SOURCE
2562 # UnixWare 1.2 (cannot use -Xc, since ANSI/POSIX clashes)
2563 for cf_arg in "-DCC_HAS_PROTOS" \
2568 "-Aa -D_HPUX_SOURCE" \
2575 cf_new_extra_cppflags=
2577 for cf_add_cflags in $cf_arg
2579 case $cf_fix_cppflags in
2581 case $cf_add_cflags in #(vi
2582 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2583 case $cf_add_cflags in
2585 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2587 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2588 && test -z "${cf_tst_cflags}" \
2589 && cf_fix_cppflags=yes
2591 if test $cf_fix_cppflags = yes ; then
2592 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2594 elif test "${cf_tst_cflags}" = "\"'" ; then
2595 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2601 *$cf_add_cflags) #(vi
2604 case $cf_add_cflags in #(vi
2606 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2608 CPPFLAGS=`echo "$CPPFLAGS" | \
2609 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2610 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2614 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2619 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2624 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2626 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2628 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2629 && test -z "${cf_tst_cflags}" \
2630 && cf_fix_cppflags=no
2635 if test -n "$cf_new_cflags" ; then
2637 CFLAGS="$CFLAGS $cf_new_cflags"
2640 if test -n "$cf_new_cppflags" ; then
2642 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2645 if test -n "$cf_new_extra_cppflags" ; then
2647 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2650 cat >conftest.$ac_ext <<_ACEOF
2651 #line 2651 "configure"
2652 #include "confdefs.h"
2654 #ifndef CC_HAS_PROTOS
2655 #if !defined(__STDC__) || (__STDC__ != 1)
2664 int test (int i, double x);
2665 struct s1 {int (*f) (int a);};
2666 struct s2 {int (*f) (double a);};
2671 rm -f conftest.$ac_objext
2672 if { (eval echo "$as_me:2672: \"$ac_compile\"") >&5
2673 (eval $ac_compile) 2>&5
2675 echo "$as_me:2675: \$? = $ac_status" >&5
2676 (exit $ac_status); } &&
2677 { ac_try='test -s conftest.$ac_objext'
2678 { (eval echo "$as_me:2678: \"$ac_try\"") >&5
2681 echo "$as_me:2681: \$? = $ac_status" >&5
2682 (exit $ac_status); }; }; then
2683 cf_cv_ansi_cc="$cf_arg"; break
2685 echo "$as_me: failed program was:" >&5
2686 cat conftest.$ac_ext >&5
2688 rm -f conftest.$ac_objext conftest.$ac_ext
2690 CFLAGS="$cf_save_CFLAGS"
2691 CPPFLAGS="$cf_save_CPPFLAGS"
2694 echo "$as_me:2694: result: $cf_cv_ansi_cc" >&5
2695 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2697 if test "$cf_cv_ansi_cc" != "no"; then
2698 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2703 cf_new_extra_cppflags=
2705 for cf_add_cflags in $cf_cv_ansi_cc
2707 case $cf_fix_cppflags in
2709 case $cf_add_cflags in #(vi
2710 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2711 case $cf_add_cflags in
2713 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2715 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2716 && test -z "${cf_tst_cflags}" \
2717 && cf_fix_cppflags=yes
2719 if test $cf_fix_cppflags = yes ; then
2720 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2722 elif test "${cf_tst_cflags}" = "\"'" ; then
2723 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2729 *$cf_add_cflags) #(vi
2732 case $cf_add_cflags in #(vi
2734 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2736 CPPFLAGS=`echo "$CPPFLAGS" | \
2737 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
2738 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
2742 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2747 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2752 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2754 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2756 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2757 && test -z "${cf_tst_cflags}" \
2758 && cf_fix_cppflags=no
2763 if test -n "$cf_new_cflags" ; then
2765 CFLAGS="$CFLAGS $cf_new_cflags"
2768 if test -n "$cf_new_cppflags" ; then
2770 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2773 if test -n "$cf_new_extra_cppflags" ; then
2775 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2779 cat >>confdefs.h <<\EOF
2780 #define CC_HAS_PROTOS 1
2786 if test "$cf_cv_ansi_cc" = "no"; then
2787 { { echo "$as_me:2787: error: Your compiler does not appear to recognize prototypes.
2788 You have the following choices:
2789 a. adjust your compiler options
2790 b. get an up-to-date compiler
2791 c. use a wrapper such as unproto" >&5
2792 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2793 You have the following choices:
2794 a. adjust your compiler options
2795 b. get an up-to-date compiler
2796 c. use a wrapper such as unproto" >&2;}
2797 { (exit 1); exit 1; }; }
2800 if test "$GCC" = yes
2802 cat > conftest.i <<EOF
2804 #define GCC_PRINTF 0
2809 #ifndef GCC_NORETURN
2810 #define GCC_NORETURN /* nothing */
2813 #define GCC_UNUSED /* nothing */
2816 if test "$GCC" = yes
2818 { echo "$as_me:2818: checking for $CC __attribute__ directives..." >&5
2819 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
2820 cat > conftest.$ac_ext <<EOF
2821 #line 2821 "${as_me:-configure}"
2822 #include "confdefs.h"
2823 #include "conftest.h"
2824 #include "conftest.i"
2826 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2828 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
2831 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2833 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
2835 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
2836 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
2837 extern void foo(void) GCC_NORETURN;
2838 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
2840 cf_printf_attribute=no
2841 cf_scanf_attribute=no
2842 for cf_attribute in scanf printf unused noreturn
2845 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
2847 cf_directive="__attribute__(($cf_attribute))"
2848 echo "checking for $CC $cf_directive" 1>&5
2850 case $cf_attribute in #(vi
2852 cf_printf_attribute=yes
2853 cat >conftest.h <<EOF
2854 #define GCC_$cf_ATTRIBUTE 1
2858 cf_scanf_attribute=yes
2859 cat >conftest.h <<EOF
2860 #define GCC_$cf_ATTRIBUTE 1
2864 cat >conftest.h <<EOF
2865 #define GCC_$cf_ATTRIBUTE $cf_directive
2870 if { (eval echo "$as_me:2870: \"$ac_compile\"") >&5
2871 (eval $ac_compile) 2>&5
2873 echo "$as_me:2873: \$? = $ac_status" >&5
2874 (exit $ac_status); }; then
2875 test -n "$verbose" && echo "$as_me:2875: result: ... $cf_attribute" >&5
2876 echo "${ECHO_T}... $cf_attribute" >&6
2877 cat conftest.h >>confdefs.h
2878 case $cf_attribute in #(vi
2880 if test "$cf_printf_attribute" = no ; then
2881 cat >>confdefs.h <<EOF
2882 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
2885 cat >>confdefs.h <<EOF
2886 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
2891 if test "$cf_scanf_attribute" = no ; then
2892 cat >>confdefs.h <<EOF
2893 #define GCC_SCANFLIKE(fmt,var) /* nothing */
2896 cat >>confdefs.h <<EOF
2897 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
2905 fgrep define conftest.i >>confdefs.h
2911 cf_POSIX_C_SOURCE=199506L
2914 case $host_os in #(vi
2916 cf_xopen_source="-D_ALL_SOURCE"
2922 cf_xopen_source="-D_APPLE_C_SOURCE"
2925 cf_xopen_source="-D_DARWIN_C_SOURCE"
2927 freebsd*|dragonfly*) #(vi
2928 # 5.x headers associate
2929 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2930 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2931 cf_POSIX_C_SOURCE=200112L
2933 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2936 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2939 cf_xopen_source="-D_HPUX_SOURCE"
2942 cf_xopen_source="-D_SGI_SOURCE"
2944 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
2946 echo "$as_me:2946: checking if we must define _GNU_SOURCE" >&5
2947 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2948 if test "${cf_cv_gnu_source+set}" = set; then
2949 echo $ECHO_N "(cached) $ECHO_C" >&6
2952 cat >conftest.$ac_ext <<_ACEOF
2953 #line 2953 "configure"
2954 #include "confdefs.h"
2955 #include <sys/types.h>
2960 #ifndef _XOPEN_SOURCE
2967 rm -f conftest.$ac_objext
2968 if { (eval echo "$as_me:2968: \"$ac_compile\"") >&5
2969 (eval $ac_compile) 2>&5
2971 echo "$as_me:2971: \$? = $ac_status" >&5
2972 (exit $ac_status); } &&
2973 { ac_try='test -s conftest.$ac_objext'
2974 { (eval echo "$as_me:2974: \"$ac_try\"") >&5
2977 echo "$as_me:2977: \$? = $ac_status" >&5
2978 (exit $ac_status); }; }; then
2981 echo "$as_me: failed program was:" >&5
2982 cat conftest.$ac_ext >&5
2984 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2985 cat >conftest.$ac_ext <<_ACEOF
2986 #line 2986 "configure"
2987 #include "confdefs.h"
2988 #include <sys/types.h>
2993 #ifdef _XOPEN_SOURCE
3000 rm -f conftest.$ac_objext
3001 if { (eval echo "$as_me:3001: \"$ac_compile\"") >&5
3002 (eval $ac_compile) 2>&5
3004 echo "$as_me:3004: \$? = $ac_status" >&5
3005 (exit $ac_status); } &&
3006 { ac_try='test -s conftest.$ac_objext'
3007 { (eval echo "$as_me:3007: \"$ac_try\"") >&5
3010 echo "$as_me:3010: \$? = $ac_status" >&5
3011 (exit $ac_status); }; }; then
3014 echo "$as_me: failed program was:" >&5
3015 cat conftest.$ac_ext >&5
3016 cf_cv_gnu_source=yes
3018 rm -f conftest.$ac_objext conftest.$ac_ext
3022 rm -f conftest.$ac_objext conftest.$ac_ext
3025 echo "$as_me:3025: result: $cf_cv_gnu_source" >&5
3026 echo "${ECHO_T}$cf_cv_gnu_source" >&6
3027 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
3031 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
3034 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3037 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3040 cf_xopen_source="-D_OSF_SOURCE"
3043 cf_xopen_source="-D_QNX_SOURCE"
3046 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3049 cf_xopen_source="-D__EXTENSIONS__"
3053 echo "$as_me:3053: checking if we should define _XOPEN_SOURCE" >&5
3054 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3055 if test "${cf_cv_xopen_source+set}" = set; then
3056 echo $ECHO_N "(cached) $ECHO_C" >&6
3059 cat >conftest.$ac_ext <<_ACEOF
3060 #line 3060 "configure"
3061 #include "confdefs.h"
3065 #include <sys/types.h>
3071 #ifndef _XOPEN_SOURCE
3078 rm -f conftest.$ac_objext
3079 if { (eval echo "$as_me:3079: \"$ac_compile\"") >&5
3080 (eval $ac_compile) 2>&5
3082 echo "$as_me:3082: \$? = $ac_status" >&5
3083 (exit $ac_status); } &&
3084 { ac_try='test -s conftest.$ac_objext'
3085 { (eval echo "$as_me:3085: \"$ac_try\"") >&5
3088 echo "$as_me:3088: \$? = $ac_status" >&5
3089 (exit $ac_status); }; }; then
3090 cf_cv_xopen_source=no
3092 echo "$as_me: failed program was:" >&5
3093 cat conftest.$ac_ext >&5
3095 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3096 cat >conftest.$ac_ext <<_ACEOF
3097 #line 3097 "configure"
3098 #include "confdefs.h"
3102 #include <sys/types.h>
3108 #ifdef _XOPEN_SOURCE
3115 rm -f conftest.$ac_objext
3116 if { (eval echo "$as_me:3116: \"$ac_compile\"") >&5
3117 (eval $ac_compile) 2>&5
3119 echo "$as_me:3119: \$? = $ac_status" >&5
3120 (exit $ac_status); } &&
3121 { ac_try='test -s conftest.$ac_objext'
3122 { (eval echo "$as_me:3122: \"$ac_try\"") >&5
3125 echo "$as_me:3125: \$? = $ac_status" >&5
3126 (exit $ac_status); }; }; then
3127 cf_cv_xopen_source=no
3129 echo "$as_me: failed program was:" >&5
3130 cat conftest.$ac_ext >&5
3131 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3133 rm -f conftest.$ac_objext conftest.$ac_ext
3137 rm -f conftest.$ac_objext conftest.$ac_ext
3140 echo "$as_me:3140: result: $cf_cv_xopen_source" >&5
3141 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3143 if test "$cf_cv_xopen_source" != no ; then
3145 CFLAGS=`echo "$CFLAGS" | \
3146 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3147 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3149 CPPFLAGS=`echo "$CPPFLAGS" | \
3150 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3151 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3153 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3158 cf_new_extra_cppflags=
3160 for cf_add_cflags in $cf_temp_xopen_source
3162 case $cf_fix_cppflags in
3164 case $cf_add_cflags in #(vi
3165 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3166 case $cf_add_cflags in
3168 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3170 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3171 && test -z "${cf_tst_cflags}" \
3172 && cf_fix_cppflags=yes
3174 if test $cf_fix_cppflags = yes ; then
3175 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3177 elif test "${cf_tst_cflags}" = "\"'" ; then
3178 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3184 *$cf_add_cflags) #(vi
3187 case $cf_add_cflags in #(vi
3189 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3191 CPPFLAGS=`echo "$CPPFLAGS" | \
3192 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3193 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3197 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3202 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3207 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3209 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3211 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3212 && test -z "${cf_tst_cflags}" \
3213 && cf_fix_cppflags=no
3218 if test -n "$cf_new_cflags" ; then
3220 CFLAGS="$CFLAGS $cf_new_cflags"
3223 if test -n "$cf_new_cppflags" ; then
3225 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3228 if test -n "$cf_new_extra_cppflags" ; then
3230 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3235 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3237 cf_save_CFLAGS="$CFLAGS"
3238 cf_save_CPPFLAGS="$CPPFLAGS"
3240 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3241 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3242 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3244 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3245 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3246 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3248 echo "$as_me:3248: checking if we should define _POSIX_C_SOURCE" >&5
3249 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3250 if test "${cf_cv_posix_c_source+set}" = set; then
3251 echo $ECHO_N "(cached) $ECHO_C" >&6
3254 echo "${as_me:-configure}:3254: testing if the symbol is already defined go no further ..." 1>&5
3256 cat >conftest.$ac_ext <<_ACEOF
3257 #line 3257 "configure"
3258 #include "confdefs.h"
3259 #include <sys/types.h>
3264 #ifndef _POSIX_C_SOURCE
3271 rm -f conftest.$ac_objext
3272 if { (eval echo "$as_me:3272: \"$ac_compile\"") >&5
3273 (eval $ac_compile) 2>&5
3275 echo "$as_me:3275: \$? = $ac_status" >&5
3276 (exit $ac_status); } &&
3277 { ac_try='test -s conftest.$ac_objext'
3278 { (eval echo "$as_me:3278: \"$ac_try\"") >&5
3281 echo "$as_me:3281: \$? = $ac_status" >&5
3282 (exit $ac_status); }; }; then
3283 cf_cv_posix_c_source=no
3285 echo "$as_me: failed program was:" >&5
3286 cat conftest.$ac_ext >&5
3287 cf_want_posix_source=no
3288 case .$cf_POSIX_C_SOURCE in #(vi
3290 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3293 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3294 cf_want_posix_source=yes
3297 cf_want_posix_source=yes
3300 if test "$cf_want_posix_source" = yes ; then
3301 cat >conftest.$ac_ext <<_ACEOF
3302 #line 3302 "configure"
3303 #include "confdefs.h"
3304 #include <sys/types.h>
3309 #ifdef _POSIX_SOURCE
3316 rm -f conftest.$ac_objext
3317 if { (eval echo "$as_me:3317: \"$ac_compile\"") >&5
3318 (eval $ac_compile) 2>&5
3320 echo "$as_me:3320: \$? = $ac_status" >&5
3321 (exit $ac_status); } &&
3322 { ac_try='test -s conftest.$ac_objext'
3323 { (eval echo "$as_me:3323: \"$ac_try\"") >&5
3326 echo "$as_me:3326: \$? = $ac_status" >&5
3327 (exit $ac_status); }; }; then
3330 echo "$as_me: failed program was:" >&5
3331 cat conftest.$ac_ext >&5
3332 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3334 rm -f conftest.$ac_objext conftest.$ac_ext
3337 echo "${as_me:-configure}:3337: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3339 CFLAGS="$cf_trim_CFLAGS"
3340 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3342 echo "${as_me:-configure}:3342: testing if the second compile does not leave our definition intact error ..." 1>&5
3344 cat >conftest.$ac_ext <<_ACEOF
3345 #line 3345 "configure"
3346 #include "confdefs.h"
3347 #include <sys/types.h>
3352 #ifndef _POSIX_C_SOURCE
3359 rm -f conftest.$ac_objext
3360 if { (eval echo "$as_me:3360: \"$ac_compile\"") >&5
3361 (eval $ac_compile) 2>&5
3363 echo "$as_me:3363: \$? = $ac_status" >&5
3364 (exit $ac_status); } &&
3365 { ac_try='test -s conftest.$ac_objext'
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
3375 cf_cv_posix_c_source=no
3377 rm -f conftest.$ac_objext conftest.$ac_ext
3378 CFLAGS="$cf_save_CFLAGS"
3379 CPPFLAGS="$cf_save_CPPFLAGS"
3382 rm -f conftest.$ac_objext conftest.$ac_ext
3385 echo "$as_me:3385: result: $cf_cv_posix_c_source" >&5
3386 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3388 if test "$cf_cv_posix_c_source" != no ; then
3389 CFLAGS="$cf_trim_CFLAGS"
3390 CPPFLAGS="$cf_trim_CPPFLAGS"
3395 cf_new_extra_cppflags=
3397 for cf_add_cflags in $cf_cv_posix_c_source
3399 case $cf_fix_cppflags in
3401 case $cf_add_cflags in #(vi
3402 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3403 case $cf_add_cflags in
3405 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3407 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3408 && test -z "${cf_tst_cflags}" \
3409 && cf_fix_cppflags=yes
3411 if test $cf_fix_cppflags = yes ; then
3412 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3414 elif test "${cf_tst_cflags}" = "\"'" ; then
3415 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3421 *$cf_add_cflags) #(vi
3424 case $cf_add_cflags in #(vi
3426 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3428 CPPFLAGS=`echo "$CPPFLAGS" | \
3429 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3430 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3434 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3439 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3444 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3446 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3448 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3449 && test -z "${cf_tst_cflags}" \
3450 && cf_fix_cppflags=no
3455 if test -n "$cf_new_cflags" ; then
3457 CFLAGS="$CFLAGS $cf_new_cflags"
3460 if test -n "$cf_new_cppflags" ; then
3462 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3465 if test -n "$cf_new_extra_cppflags" ; then
3467 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3475 if test -n "$cf_xopen_source" ; then
3480 cf_new_extra_cppflags=
3482 for cf_add_cflags in $cf_xopen_source
3484 case $cf_fix_cppflags in
3486 case $cf_add_cflags in #(vi
3487 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3488 case $cf_add_cflags in
3490 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3492 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3493 && test -z "${cf_tst_cflags}" \
3494 && cf_fix_cppflags=yes
3496 if test $cf_fix_cppflags = yes ; then
3497 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3499 elif test "${cf_tst_cflags}" = "\"'" ; then
3500 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3506 *$cf_add_cflags) #(vi
3509 case $cf_add_cflags in #(vi
3511 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3513 CPPFLAGS=`echo "$CPPFLAGS" | \
3514 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3515 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3519 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3524 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3529 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3531 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3533 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3534 && test -z "${cf_tst_cflags}" \
3535 && cf_fix_cppflags=no
3540 if test -n "$cf_new_cflags" ; then
3542 CFLAGS="$CFLAGS $cf_new_cflags"
3545 if test -n "$cf_new_cppflags" ; then
3547 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3550 if test -n "$cf_new_extra_cppflags" ; then
3552 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3557 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
3558 echo "$as_me:3558: checking if _XOPEN_SOURCE really is set" >&5
3559 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
3560 cat >conftest.$ac_ext <<_ACEOF
3561 #line 3561 "configure"
3562 #include "confdefs.h"
3568 #ifndef _XOPEN_SOURCE
3575 rm -f conftest.$ac_objext
3576 if { (eval echo "$as_me:3576: \"$ac_compile\"") >&5
3577 (eval $ac_compile) 2>&5
3579 echo "$as_me:3579: \$? = $ac_status" >&5
3580 (exit $ac_status); } &&
3581 { ac_try='test -s conftest.$ac_objext'
3582 { (eval echo "$as_me:3582: \"$ac_try\"") >&5
3585 echo "$as_me:3585: \$? = $ac_status" >&5
3586 (exit $ac_status); }; }; then
3587 cf_XOPEN_SOURCE_set=yes
3589 echo "$as_me: failed program was:" >&5
3590 cat conftest.$ac_ext >&5
3591 cf_XOPEN_SOURCE_set=no
3593 rm -f conftest.$ac_objext conftest.$ac_ext
3594 echo "$as_me:3594: result: $cf_XOPEN_SOURCE_set" >&5
3595 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
3596 if test $cf_XOPEN_SOURCE_set = yes
3598 cat >conftest.$ac_ext <<_ACEOF
3599 #line 3599 "configure"
3600 #include "confdefs.h"
3606 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
3613 rm -f conftest.$ac_objext
3614 if { (eval echo "$as_me:3614: \"$ac_compile\"") >&5
3615 (eval $ac_compile) 2>&5
3617 echo "$as_me:3617: \$? = $ac_status" >&5
3618 (exit $ac_status); } &&
3619 { ac_try='test -s conftest.$ac_objext'
3620 { (eval echo "$as_me:3620: \"$ac_try\"") >&5
3623 echo "$as_me:3623: \$? = $ac_status" >&5
3624 (exit $ac_status); }; }; then
3625 cf_XOPEN_SOURCE_set_ok=yes
3627 echo "$as_me: failed program was:" >&5
3628 cat conftest.$ac_ext >&5
3629 cf_XOPEN_SOURCE_set_ok=no
3631 rm -f conftest.$ac_objext conftest.$ac_ext
3632 if test $cf_XOPEN_SOURCE_set_ok = no
3634 { echo "$as_me:3634: WARNING: _XOPEN_SOURCE is lower than requested" >&5
3635 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
3639 echo "$as_me:3639: checking if we should define _XOPEN_SOURCE" >&5
3640 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3641 if test "${cf_cv_xopen_source+set}" = set; then
3642 echo $ECHO_N "(cached) $ECHO_C" >&6
3645 cat >conftest.$ac_ext <<_ACEOF
3646 #line 3646 "configure"
3647 #include "confdefs.h"
3651 #include <sys/types.h>
3657 #ifndef _XOPEN_SOURCE
3664 rm -f conftest.$ac_objext
3665 if { (eval echo "$as_me:3665: \"$ac_compile\"") >&5
3666 (eval $ac_compile) 2>&5
3668 echo "$as_me:3668: \$? = $ac_status" >&5
3669 (exit $ac_status); } &&
3670 { ac_try='test -s conftest.$ac_objext'
3671 { (eval echo "$as_me:3671: \"$ac_try\"") >&5
3674 echo "$as_me:3674: \$? = $ac_status" >&5
3675 (exit $ac_status); }; }; then
3676 cf_cv_xopen_source=no
3678 echo "$as_me: failed program was:" >&5
3679 cat conftest.$ac_ext >&5
3681 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3682 cat >conftest.$ac_ext <<_ACEOF
3683 #line 3683 "configure"
3684 #include "confdefs.h"
3688 #include <sys/types.h>
3694 #ifdef _XOPEN_SOURCE
3701 rm -f conftest.$ac_objext
3702 if { (eval echo "$as_me:3702: \"$ac_compile\"") >&5
3703 (eval $ac_compile) 2>&5
3705 echo "$as_me:3705: \$? = $ac_status" >&5
3706 (exit $ac_status); } &&
3707 { ac_try='test -s conftest.$ac_objext'
3708 { (eval echo "$as_me:3708: \"$ac_try\"") >&5
3711 echo "$as_me:3711: \$? = $ac_status" >&5
3712 (exit $ac_status); }; }; then
3713 cf_cv_xopen_source=no
3715 echo "$as_me: failed program was:" >&5
3716 cat conftest.$ac_ext >&5
3717 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3719 rm -f conftest.$ac_objext conftest.$ac_ext
3723 rm -f conftest.$ac_objext conftest.$ac_ext
3726 echo "$as_me:3726: result: $cf_cv_xopen_source" >&5
3727 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3729 if test "$cf_cv_xopen_source" != no ; then
3731 CFLAGS=`echo "$CFLAGS" | \
3732 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3733 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3735 CPPFLAGS=`echo "$CPPFLAGS" | \
3736 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3737 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3739 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3744 cf_new_extra_cppflags=
3746 for cf_add_cflags in $cf_temp_xopen_source
3748 case $cf_fix_cppflags in
3750 case $cf_add_cflags in #(vi
3751 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3752 case $cf_add_cflags in
3754 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3756 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3757 && test -z "${cf_tst_cflags}" \
3758 && cf_fix_cppflags=yes
3760 if test $cf_fix_cppflags = yes ; then
3761 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3763 elif test "${cf_tst_cflags}" = "\"'" ; then
3764 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3770 *$cf_add_cflags) #(vi
3773 case $cf_add_cflags in #(vi
3775 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3777 CPPFLAGS=`echo "$CPPFLAGS" | \
3778 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3779 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3783 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3788 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3793 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3795 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3797 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3798 && test -z "${cf_tst_cflags}" \
3799 && cf_fix_cppflags=no
3804 if test -n "$cf_new_cflags" ; then
3806 CFLAGS="$CFLAGS $cf_new_cflags"
3809 if test -n "$cf_new_cppflags" ; then
3811 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3814 if test -n "$cf_new_extra_cppflags" ; then
3816 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3824 echo "$as_me:3824: checking for $CC option to accept ANSI C" >&5
3825 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
3826 if test "${ac_cv_prog_cc_stdc+set}" = set; then
3827 echo $ECHO_N "(cached) $ECHO_C" >&6
3829 ac_cv_prog_cc_stdc=no
3831 cat >conftest.$ac_ext <<_ACEOF
3832 #line 3832 "configure"
3833 #include "confdefs.h"
3836 #include <sys/types.h>
3837 #include <sys/stat.h>
3838 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3839 struct buf { int x; };
3840 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3841 static char *e (p, i)
3847 static char *f (char * (*g) (char **, int), char **p, ...)
3852 s = g (p, va_arg (v,int));
3856 int test (int i, double x);
3857 struct s1 {int (*f) (int a);};
3858 struct s2 {int (*f) (double a);};
3859 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3865 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3870 # Don't try gcc -ansi; that turns off useful extensions and
3871 # breaks some systems' header files.
3872 # AIX -qlanglvl=ansi
3873 # Ultrix and OSF/1 -std1
3874 # HP-UX 10.20 and later -Ae
3875 # HP-UX older versions -Aa -D_HPUX_SOURCE
3876 # SVR4 -Xc -D__EXTENSIONS__
3877 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3879 CC="$ac_save_CC $ac_arg"
3880 rm -f conftest.$ac_objext
3881 if { (eval echo "$as_me:3881: \"$ac_compile\"") >&5
3882 (eval $ac_compile) 2>&5
3884 echo "$as_me:3884: \$? = $ac_status" >&5
3885 (exit $ac_status); } &&
3886 { ac_try='test -s conftest.$ac_objext'
3887 { (eval echo "$as_me:3887: \"$ac_try\"") >&5
3890 echo "$as_me:3890: \$? = $ac_status" >&5
3891 (exit $ac_status); }; }; then
3892 ac_cv_prog_cc_stdc=$ac_arg
3895 echo "$as_me: failed program was:" >&5
3896 cat conftest.$ac_ext >&5
3898 rm -f conftest.$ac_objext
3900 rm -f conftest.$ac_ext conftest.$ac_objext
3905 case "x$ac_cv_prog_cc_stdc" in
3907 echo "$as_me:3907: result: none needed" >&5
3908 echo "${ECHO_T}none needed" >&6 ;;
3910 echo "$as_me:3910: result: $ac_cv_prog_cc_stdc" >&5
3911 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
3912 CC="$CC $ac_cv_prog_cc_stdc" ;;
3915 echo "$as_me:3915: checking for an ANSI C-conforming const" >&5
3916 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
3917 if test "${ac_cv_c_const+set}" = set; then
3918 echo $ECHO_N "(cached) $ECHO_C" >&6
3920 cat >conftest.$ac_ext <<_ACEOF
3921 #line 3921 "configure"
3922 #include "confdefs.h"
3927 /* FIXME: Include the comments suggested by Paul. */
3929 /* Ultrix mips cc rejects this. */
3930 typedef int charset[2];
3932 /* SunOS 4.1.1 cc rejects this. */
3933 char const *const *ccp;
3935 /* NEC SVR4.0.2 mips cc rejects this. */
3936 struct point {int x, y;};
3937 static struct point const zero = {0,0};
3938 /* AIX XL C 1.02.0.0 rejects this.
3939 It does not let you subtract one const X* pointer from another in
3940 an arm of an if-expression whose if-part is not a constant
3942 const char *g = "string";
3943 ccp = &g + (g ? g-g : 0);
3944 /* HPUX 7.0 cc rejects these. */
3947 ccp = (char const *const *) p;
3948 { /* SCO 3.2v4 cc rejects this. */
3950 char const *s = 0 ? (char *) 0 : (char const *) 0;
3954 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
3956 const int *foo = &x[0];
3959 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
3960 typedef const int *iptr;
3964 { /* AIX XL C 1.02.0.0 rejects this saying
3965 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
3966 struct s { int j; const int *ap[3]; };
3967 struct s *b; b->j = 5;
3969 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
3978 rm -f conftest.$ac_objext
3979 if { (eval echo "$as_me:3979: \"$ac_compile\"") >&5
3980 (eval $ac_compile) 2>&5
3982 echo "$as_me:3982: \$? = $ac_status" >&5
3983 (exit $ac_status); } &&
3984 { ac_try='test -s conftest.$ac_objext'
3985 { (eval echo "$as_me:3985: \"$ac_try\"") >&5
3988 echo "$as_me:3988: \$? = $ac_status" >&5
3989 (exit $ac_status); }; }; then
3992 echo "$as_me: failed program was:" >&5
3993 cat conftest.$ac_ext >&5
3996 rm -f conftest.$ac_objext conftest.$ac_ext
3998 echo "$as_me:3998: result: $ac_cv_c_const" >&5
3999 echo "${ECHO_T}$ac_cv_c_const" >&6
4000 if test $ac_cv_c_const = no; then
4002 cat >>confdefs.h <<\EOF
4008 echo "$as_me:4008: checking for signal global datatype" >&5
4009 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
4010 if test "${cf_cv_sig_atomic_t+set}" = set; then
4011 echo $ECHO_N "(cached) $ECHO_C" >&6
4015 "volatile sig_atomic_t" \
4019 cat >conftest.$ac_ext <<_ACEOF
4020 #line 4020 "configure"
4021 #include "confdefs.h"
4023 #include <sys/types.h>
4029 static void handler(int sig)
4036 signal(SIGINT, handler);
4042 rm -f conftest.$ac_objext
4043 if { (eval echo "$as_me:4043: \"$ac_compile\"") >&5
4044 (eval $ac_compile) 2>&5
4046 echo "$as_me:4046: \$? = $ac_status" >&5
4047 (exit $ac_status); } &&
4048 { ac_try='test -s conftest.$ac_objext'
4049 { (eval echo "$as_me:4049: \"$ac_try\"") >&5
4052 echo "$as_me:4052: \$? = $ac_status" >&5
4053 (exit $ac_status); }; }; then
4054 cf_cv_sig_atomic_t=$cf_type
4056 echo "$as_me: failed program was:" >&5
4057 cat conftest.$ac_ext >&5
4058 cf_cv_sig_atomic_t=no
4060 rm -f conftest.$ac_objext conftest.$ac_ext
4061 test "$cf_cv_sig_atomic_t" != no && break
4066 echo "$as_me:4066: result: $cf_cv_sig_atomic_t" >&5
4067 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
4068 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
4069 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
4072 echo "$as_me:4072: checking if you want to see long compiling messages" >&5
4073 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
4075 # Check whether --enable-echo or --disable-echo was given.
4076 if test "${enable_echo+set}" = set; then
4077 enableval="$enable_echo"
4078 test "$enableval" != no && enableval=yes
4079 if test "$enableval" != "yes" ; then
4082 ECHO_LD='@echo linking $@;'
4083 RULE_CC='@echo compiling $<'
4084 SHOW_CC='@echo compiling $@'
4106 echo "$as_me:4106: result: $enableval" >&5
4107 echo "${ECHO_T}$enableval" >&6
4110 if test "$GCC" = yes ; then
4111 echo "$as_me:4111: checking version of $CC" >&5
4112 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
4113 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
4114 test -z "$GCC_VERSION" && GCC_VERSION=unknown
4115 echo "$as_me:4115: result: $GCC_VERSION" >&5
4116 echo "${ECHO_T}$GCC_VERSION" >&6
4119 if ( test "$GCC" = yes || test "$GXX" = yes )
4121 echo "$as_me:4121: checking if you want to turn on gcc warnings" >&5
4122 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
4124 # Check whether --enable-warnings or --disable-warnings was given.
4125 if test "${enable_warnings+set}" = set; then
4126 enableval="$enable_warnings"
4127 test "$enableval" != yes && enableval=no
4128 if test "$enableval" != "no" ; then
4138 echo "$as_me:4138: result: $with_warnings" >&5
4139 echo "${ECHO_T}$with_warnings" >&6
4140 if test "$with_warnings" = "yes"
4143 if test "$GCC" = yes
4145 cat > conftest.i <<EOF
4147 #define GCC_PRINTF 0
4152 #ifndef GCC_NORETURN
4153 #define GCC_NORETURN /* nothing */
4156 #define GCC_UNUSED /* nothing */
4159 if test "$GCC" = yes
4161 { echo "$as_me:4161: checking for $CC __attribute__ directives..." >&5
4162 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
4163 cat > conftest.$ac_ext <<EOF
4164 #line 4164 "${as_me:-configure}"
4165 #include "confdefs.h"
4166 #include "conftest.h"
4167 #include "conftest.i"
4169 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
4171 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
4174 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
4176 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
4178 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
4179 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
4180 extern void foo(void) GCC_NORETURN;
4181 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
4183 cf_printf_attribute=no
4184 cf_scanf_attribute=no
4185 for cf_attribute in scanf printf unused noreturn
4188 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4190 cf_directive="__attribute__(($cf_attribute))"
4191 echo "checking for $CC $cf_directive" 1>&5
4193 case $cf_attribute in #(vi
4195 cf_printf_attribute=yes
4196 cat >conftest.h <<EOF
4197 #define GCC_$cf_ATTRIBUTE 1
4201 cf_scanf_attribute=yes
4202 cat >conftest.h <<EOF
4203 #define GCC_$cf_ATTRIBUTE 1
4207 cat >conftest.h <<EOF
4208 #define GCC_$cf_ATTRIBUTE $cf_directive
4213 if { (eval echo "$as_me:4213: \"$ac_compile\"") >&5
4214 (eval $ac_compile) 2>&5
4216 echo "$as_me:4216: \$? = $ac_status" >&5
4217 (exit $ac_status); }; then
4218 test -n "$verbose" && echo "$as_me:4218: result: ... $cf_attribute" >&5
4219 echo "${ECHO_T}... $cf_attribute" >&6
4220 cat conftest.h >>confdefs.h
4221 case $cf_attribute in #(vi
4223 if test "$cf_printf_attribute" = no ; then
4224 cat >>confdefs.h <<EOF
4225 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
4228 cat >>confdefs.h <<EOF
4229 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
4234 if test "$cf_scanf_attribute" = no ; then
4235 cat >>confdefs.h <<EOF
4236 #define GCC_SCANFLIKE(fmt,var) /* nothing */
4239 cat >>confdefs.h <<EOF
4240 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
4248 fgrep define conftest.i >>confdefs.h
4255 if test "$GCC" = yes ; then
4258 echo "$as_me:4258: checking if this is really Intel C compiler" >&5
4259 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
4260 cf_save_CFLAGS="$CFLAGS"
4261 CFLAGS="$CFLAGS -no-gcc"
4262 cat >conftest.$ac_ext <<_ACEOF
4263 #line 4263 "configure"
4264 #include "confdefs.h"
4270 #ifdef __INTEL_COMPILER
4279 rm -f conftest.$ac_objext
4280 if { (eval echo "$as_me:4280: \"$ac_compile\"") >&5
4281 (eval $ac_compile) 2>&5
4283 echo "$as_me:4283: \$? = $ac_status" >&5
4284 (exit $ac_status); } &&
4285 { ac_try='test -s conftest.$ac_objext'
4286 { (eval echo "$as_me:4286: \"$ac_try\"") >&5
4289 echo "$as_me:4289: \$? = $ac_status" >&5
4290 (exit $ac_status); }; }; then
4292 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
4295 echo "$as_me: failed program was:" >&5
4296 cat conftest.$ac_ext >&5
4298 rm -f conftest.$ac_objext conftest.$ac_ext
4299 CFLAGS="$cf_save_CFLAGS"
4300 echo "$as_me:4300: result: $INTEL_COMPILER" >&5
4301 echo "${ECHO_T}$INTEL_COMPILER" >&6
4306 cat > conftest.$ac_ext <<EOF
4307 #line 4307 "${as_me:-configure}"
4308 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
4311 if test "$INTEL_COMPILER" = yes
4313 # The "-wdXXX" options suppress warnings:
4314 # remark #1419: external declaration in primary source file
4315 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
4316 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
4317 # remark #193: zero used for undefined preprocessing identifier
4318 # remark #593: variable "curs_sb_left_arrow" was set but never used
4319 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
4320 # remark #869: parameter "tw" was never referenced
4321 # remark #981: operands are evaluated in unspecified order
4322 # warning #279: controlling expression is constant
4324 { echo "$as_me:4324: checking for $CC warning options..." >&5
4325 echo "$as_me: checking for $CC warning options..." >&6;}
4326 cf_save_CFLAGS="$CFLAGS"
4327 EXTRA_CFLAGS="-Wall"
4339 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4340 if { (eval echo "$as_me:4340: \"$ac_compile\"") >&5
4341 (eval $ac_compile) 2>&5
4343 echo "$as_me:4343: \$? = $ac_status" >&5
4344 (exit $ac_status); }; then
4345 test -n "$verbose" && echo "$as_me:4345: result: ... -$cf_opt" >&5
4346 echo "${ECHO_T}... -$cf_opt" >&6
4347 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4350 CFLAGS="$cf_save_CFLAGS"
4352 elif test "$GCC" = yes
4354 { echo "$as_me:4354: checking for $CC warning options..." >&5
4355 echo "$as_me: checking for $CC warning options..." >&6;}
4356 cf_save_CFLAGS="$CFLAGS"
4359 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
4360 for cf_opt in W Wall \
4361 Wbad-function-cast \
4365 Wmissing-declarations \
4366 Wmissing-prototypes \
4370 Wstrict-prototypes \
4371 Wundef $cf_warn_CONST
4373 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4374 if { (eval echo "$as_me:4374: \"$ac_compile\"") >&5
4375 (eval $ac_compile) 2>&5
4377 echo "$as_me:4377: \$? = $ac_status" >&5
4378 (exit $ac_status); }; then
4379 test -n "$verbose" && echo "$as_me:4379: result: ... -$cf_opt" >&5
4380 echo "${ECHO_T}... -$cf_opt" >&6
4381 case $cf_opt in #(vi
4383 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
4386 case $GCC_VERSION in
4388 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
4390 echo "${as_me:-configure}:4390: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
4396 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4399 CFLAGS="$cf_save_CFLAGS"
4406 echo "$as_me:4406: checking if you want to use dmalloc for testing" >&5
4407 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
4409 # Check whether --with-dmalloc or --without-dmalloc was given.
4410 if test "${with_dmalloc+set}" = set; then
4411 withval="$with_dmalloc"
4412 cat >>confdefs.h <<\EOF
4413 #define USE_DMALLOC 1
4416 : ${with_cflags:=-g}
4417 : ${with_no_leaks:=yes}
4422 echo "$as_me:4422: result: ${with_dmalloc:-no}" >&5
4423 echo "${ECHO_T}${with_dmalloc:-no}" >&6
4425 case .$with_cflags in #(vi
4427 case .$CFLAGS in #(vi
4435 cf_new_extra_cppflags=
4437 for cf_add_cflags in -g
4439 case $cf_fix_cppflags in
4441 case $cf_add_cflags in #(vi
4442 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4443 case $cf_add_cflags in
4445 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4447 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4448 && test -z "${cf_tst_cflags}" \
4449 && cf_fix_cppflags=yes
4451 if test $cf_fix_cppflags = yes ; then
4452 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4454 elif test "${cf_tst_cflags}" = "\"'" ; then
4455 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4461 *$cf_add_cflags) #(vi
4464 case $cf_add_cflags in #(vi
4466 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4468 CPPFLAGS=`echo "$CPPFLAGS" | \
4469 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4470 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4474 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4479 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4484 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4486 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4488 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4489 && test -z "${cf_tst_cflags}" \
4490 && cf_fix_cppflags=no
4495 if test -n "$cf_new_cflags" ; then
4497 CFLAGS="$CFLAGS $cf_new_cflags"
4500 if test -n "$cf_new_cppflags" ; then
4502 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4505 if test -n "$cf_new_extra_cppflags" ; then
4507 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4515 if test "$with_dmalloc" = yes ; then
4516 echo "$as_me:4516: checking for dmalloc.h" >&5
4517 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
4518 if test "${ac_cv_header_dmalloc_h+set}" = set; then
4519 echo $ECHO_N "(cached) $ECHO_C" >&6
4521 cat >conftest.$ac_ext <<_ACEOF
4522 #line 4522 "configure"
4523 #include "confdefs.h"
4524 #include <dmalloc.h>
4526 if { (eval echo "$as_me:4526: \"$ac_cpp conftest.$ac_ext\"") >&5
4527 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4529 egrep -v '^ *\+' conftest.er1 >conftest.err
4531 cat conftest.err >&5
4532 echo "$as_me:4532: \$? = $ac_status" >&5
4533 (exit $ac_status); } >/dev/null; then
4534 if test -s conftest.err; then
4535 ac_cpp_err=$ac_c_preproc_warn_flag
4542 if test -z "$ac_cpp_err"; then
4543 ac_cv_header_dmalloc_h=yes
4545 echo "$as_me: failed program was:" >&5
4546 cat conftest.$ac_ext >&5
4547 ac_cv_header_dmalloc_h=no
4549 rm -f conftest.err conftest.$ac_ext
4551 echo "$as_me:4551: result: $ac_cv_header_dmalloc_h" >&5
4552 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
4553 if test $ac_cv_header_dmalloc_h = yes; then
4555 echo "$as_me:4555: checking for dmalloc_debug in -ldmalloc" >&5
4556 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
4557 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
4558 echo $ECHO_N "(cached) $ECHO_C" >&6
4560 ac_check_lib_save_LIBS=$LIBS
4561 LIBS="-ldmalloc $LIBS"
4562 cat >conftest.$ac_ext <<_ACEOF
4563 #line 4563 "configure"
4564 #include "confdefs.h"
4566 /* Override any gcc2 internal prototype to avoid an error. */
4570 /* We use char because int might match the return type of a gcc2
4571 builtin and then its argument prototype would still apply. */
4572 char dmalloc_debug ();
4581 rm -f conftest.$ac_objext conftest$ac_exeext
4582 if { (eval echo "$as_me:4582: \"$ac_link\"") >&5
4583 (eval $ac_link) 2>&5
4585 echo "$as_me:4585: \$? = $ac_status" >&5
4586 (exit $ac_status); } &&
4587 { ac_try='test -s conftest$ac_exeext'
4588 { (eval echo "$as_me:4588: \"$ac_try\"") >&5
4591 echo "$as_me:4591: \$? = $ac_status" >&5
4592 (exit $ac_status); }; }; then
4593 ac_cv_lib_dmalloc_dmalloc_debug=yes
4595 echo "$as_me: failed program was:" >&5
4596 cat conftest.$ac_ext >&5
4597 ac_cv_lib_dmalloc_dmalloc_debug=no
4599 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4600 LIBS=$ac_check_lib_save_LIBS
4602 echo "$as_me:4602: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
4603 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
4604 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
4605 cat >>confdefs.h <<EOF
4606 #define HAVE_LIBDMALLOC 1
4609 LIBS="-ldmalloc $LIBS"
4617 echo "$as_me:4617: checking if you want to use dbmalloc for testing" >&5
4618 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
4620 # Check whether --with-dbmalloc or --without-dbmalloc was given.
4621 if test "${with_dbmalloc+set}" = set; then
4622 withval="$with_dbmalloc"
4623 cat >>confdefs.h <<\EOF
4624 #define USE_DBMALLOC 1
4627 : ${with_cflags:=-g}
4628 : ${with_no_leaks:=yes}
4633 echo "$as_me:4633: result: ${with_dbmalloc:-no}" >&5
4634 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
4636 case .$with_cflags in #(vi
4638 case .$CFLAGS in #(vi
4646 cf_new_extra_cppflags=
4648 for cf_add_cflags in -g
4650 case $cf_fix_cppflags in
4652 case $cf_add_cflags in #(vi
4653 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4654 case $cf_add_cflags in
4656 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4658 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4659 && test -z "${cf_tst_cflags}" \
4660 && cf_fix_cppflags=yes
4662 if test $cf_fix_cppflags = yes ; then
4663 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4665 elif test "${cf_tst_cflags}" = "\"'" ; then
4666 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4672 *$cf_add_cflags) #(vi
4675 case $cf_add_cflags in #(vi
4677 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4679 CPPFLAGS=`echo "$CPPFLAGS" | \
4680 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4681 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4685 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4690 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4695 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4697 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4699 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4700 && test -z "${cf_tst_cflags}" \
4701 && cf_fix_cppflags=no
4706 if test -n "$cf_new_cflags" ; then
4708 CFLAGS="$CFLAGS $cf_new_cflags"
4711 if test -n "$cf_new_cppflags" ; then
4713 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4716 if test -n "$cf_new_extra_cppflags" ; then
4718 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4726 if test "$with_dbmalloc" = yes ; then
4727 echo "$as_me:4727: checking for dbmalloc.h" >&5
4728 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
4729 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
4730 echo $ECHO_N "(cached) $ECHO_C" >&6
4732 cat >conftest.$ac_ext <<_ACEOF
4733 #line 4733 "configure"
4734 #include "confdefs.h"
4735 #include <dbmalloc.h>
4737 if { (eval echo "$as_me:4737: \"$ac_cpp conftest.$ac_ext\"") >&5
4738 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4740 egrep -v '^ *\+' conftest.er1 >conftest.err
4742 cat conftest.err >&5
4743 echo "$as_me:4743: \$? = $ac_status" >&5
4744 (exit $ac_status); } >/dev/null; then
4745 if test -s conftest.err; then
4746 ac_cpp_err=$ac_c_preproc_warn_flag
4753 if test -z "$ac_cpp_err"; then
4754 ac_cv_header_dbmalloc_h=yes
4756 echo "$as_me: failed program was:" >&5
4757 cat conftest.$ac_ext >&5
4758 ac_cv_header_dbmalloc_h=no
4760 rm -f conftest.err conftest.$ac_ext
4762 echo "$as_me:4762: result: $ac_cv_header_dbmalloc_h" >&5
4763 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
4764 if test $ac_cv_header_dbmalloc_h = yes; then
4766 echo "$as_me:4766: checking for debug_malloc in -ldbmalloc" >&5
4767 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
4768 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
4769 echo $ECHO_N "(cached) $ECHO_C" >&6
4771 ac_check_lib_save_LIBS=$LIBS
4772 LIBS="-ldbmalloc $LIBS"
4773 cat >conftest.$ac_ext <<_ACEOF
4774 #line 4774 "configure"
4775 #include "confdefs.h"
4777 /* Override any gcc2 internal prototype to avoid an error. */
4781 /* We use char because int might match the return type of a gcc2
4782 builtin and then its argument prototype would still apply. */
4783 char debug_malloc ();
4792 rm -f conftest.$ac_objext conftest$ac_exeext
4793 if { (eval echo "$as_me:4793: \"$ac_link\"") >&5
4794 (eval $ac_link) 2>&5
4796 echo "$as_me:4796: \$? = $ac_status" >&5
4797 (exit $ac_status); } &&
4798 { ac_try='test -s conftest$ac_exeext'
4799 { (eval echo "$as_me:4799: \"$ac_try\"") >&5
4802 echo "$as_me:4802: \$? = $ac_status" >&5
4803 (exit $ac_status); }; }; then
4804 ac_cv_lib_dbmalloc_debug_malloc=yes
4806 echo "$as_me: failed program was:" >&5
4807 cat conftest.$ac_ext >&5
4808 ac_cv_lib_dbmalloc_debug_malloc=no
4810 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4811 LIBS=$ac_check_lib_save_LIBS
4813 echo "$as_me:4813: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
4814 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
4815 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
4816 cat >>confdefs.h <<EOF
4817 #define HAVE_LIBDBMALLOC 1
4820 LIBS="-ldbmalloc $LIBS"
4828 echo "$as_me:4828: checking if you want to use valgrind for testing" >&5
4829 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
4831 # Check whether --with-valgrind or --without-valgrind was given.
4832 if test "${with_valgrind+set}" = set; then
4833 withval="$with_valgrind"
4834 cat >>confdefs.h <<\EOF
4835 #define USE_VALGRIND 1
4838 : ${with_cflags:=-g}
4839 : ${with_no_leaks:=yes}
4844 echo "$as_me:4844: result: ${with_valgrind:-no}" >&5
4845 echo "${ECHO_T}${with_valgrind:-no}" >&6
4847 case .$with_cflags in #(vi
4849 case .$CFLAGS in #(vi
4857 cf_new_extra_cppflags=
4859 for cf_add_cflags in -g
4861 case $cf_fix_cppflags in
4863 case $cf_add_cflags in #(vi
4864 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4865 case $cf_add_cflags in
4867 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4869 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4870 && test -z "${cf_tst_cflags}" \
4871 && cf_fix_cppflags=yes
4873 if test $cf_fix_cppflags = yes ; then
4874 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4876 elif test "${cf_tst_cflags}" = "\"'" ; then
4877 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4883 *$cf_add_cflags) #(vi
4886 case $cf_add_cflags in #(vi
4888 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4890 CPPFLAGS=`echo "$CPPFLAGS" | \
4891 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4892 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4896 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4901 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4906 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4908 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4910 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4911 && test -z "${cf_tst_cflags}" \
4912 && cf_fix_cppflags=no
4917 if test -n "$cf_new_cflags" ; then
4919 CFLAGS="$CFLAGS $cf_new_cflags"
4922 if test -n "$cf_new_cppflags" ; then
4924 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4927 if test -n "$cf_new_extra_cppflags" ; then
4929 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4937 echo "$as_me:4937: checking if you want to perform memory-leak testing" >&5
4938 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
4940 # Check whether --enable-leaks or --disable-leaks was given.
4941 if test "${enable_leaks+set}" = set; then
4942 enableval="$enable_leaks"
4943 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
4945 : ${with_no_leaks:=no}
4947 echo "$as_me:4947: result: $with_no_leaks" >&5
4948 echo "${ECHO_T}$with_no_leaks" >&6
4950 if test "$with_no_leaks" = yes ; then
4951 cat >>confdefs.h <<\EOF
4955 cat >>confdefs.h <<\EOF
4956 #define YY_NO_LEAKS 1
4961 echo "$as_me:4961: checking if you want to check for wide-character functions" >&5
4962 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
4964 # Check whether --enable-widec or --disable-widec was given.
4965 if test "${enable_widec+set}" = set; then
4966 enableval="$enable_widec"
4967 test "$enableval" != no && enableval=yes
4968 if test "$enableval" != "yes" ; then
4978 echo "$as_me:4978: result: $cf_enable_widec" >&5
4979 echo "${ECHO_T}$cf_enable_widec" >&6
4981 echo "$as_me:4981: checking for specific curses-directory" >&5
4982 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
4984 # Check whether --with-curses-dir or --without-curses-dir was given.
4985 if test "${with_curses_dir+set}" = set; then
4986 withval="$with_curses_dir"
4987 cf_cv_curses_dir=$withval
4991 echo "$as_me:4991: result: $cf_cv_curses_dir" >&5
4992 echo "${ECHO_T}$cf_cv_curses_dir" >&6
4994 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
4997 if test "x$prefix" != xNONE; then
4998 cf_path_syntax="$prefix"
5000 cf_path_syntax="$ac_default_prefix"
5003 case ".$withval" in #(vi
5004 .\$\(*\)*|.\'*\'*) #(vi
5008 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5011 eval withval="$withval"
5012 case ".$withval" in #(vi
5014 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5019 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5022 { { echo "$as_me:5022: error: expected a pathname, not \"$withval\"" >&5
5023 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5024 { (exit 1); exit 1; }; }
5028 if test -d "$cf_cv_curses_dir"
5031 if test -n "$cf_cv_curses_dir/include" ; then
5032 for cf_add_incdir in $cf_cv_curses_dir/include
5034 while test $cf_add_incdir != /usr/include
5036 if test -d $cf_add_incdir
5039 if test -n "$CFLAGS$CPPFLAGS" ; then
5040 # a loop is needed to ensure we can add subdirs of existing dirs
5041 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5042 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5043 cf_have_incdir=yes; break
5048 if test "$cf_have_incdir" = no ; then
5049 if test "$cf_add_incdir" = /usr/local/include ; then
5050 if test "$GCC" = yes
5052 cf_save_CPPFLAGS=$CPPFLAGS
5053 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5054 cat >conftest.$ac_ext <<_ACEOF
5055 #line 5055 "configure"
5056 #include "confdefs.h"
5066 rm -f conftest.$ac_objext
5067 if { (eval echo "$as_me:5067: \"$ac_compile\"") >&5
5068 (eval $ac_compile) 2>&5
5070 echo "$as_me:5070: \$? = $ac_status" >&5
5071 (exit $ac_status); } &&
5072 { ac_try='test -s conftest.$ac_objext'
5073 { (eval echo "$as_me:5073: \"$ac_try\"") >&5
5076 echo "$as_me:5076: \$? = $ac_status" >&5
5077 (exit $ac_status); }; }; then
5080 echo "$as_me: failed program was:" >&5
5081 cat conftest.$ac_ext >&5
5084 rm -f conftest.$ac_objext conftest.$ac_ext
5085 CPPFLAGS=$cf_save_CPPFLAGS
5090 if test "$cf_have_incdir" = no ; then
5091 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5093 echo "${as_me:-configure}:5093: testing adding $cf_add_incdir to include-path ..." 1>&5
5095 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5097 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5098 test "$cf_top_incdir" = "$cf_add_incdir" && break
5099 cf_add_incdir="$cf_top_incdir"
5108 if test -n "$cf_cv_curses_dir/lib" ; then
5109 for cf_add_libdir in $cf_cv_curses_dir/lib
5111 if test $cf_add_libdir = /usr/lib ; then
5113 elif test -d $cf_add_libdir
5116 if test -n "$LDFLAGS$LIBS" ; then
5117 # a loop is needed to ensure we can add subdirs of existing dirs
5118 for cf_test_libdir in $LDFLAGS $LIBS ; do
5119 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5120 cf_have_libdir=yes; break
5124 if test "$cf_have_libdir" = no ; then
5125 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5127 echo "${as_me:-configure}:5127: testing adding $cf_add_libdir to library-path ..." 1>&5
5129 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5138 echo "$as_me:5138: checking for specified curses library type" >&5
5139 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
5141 # Check whether --with-ncursesw or --without-ncursesw was given.
5142 if test "${with_ncursesw+set}" = set; then
5143 withval="$with_ncursesw"
5144 cf_cv_screen=ncursesw
5147 # Check whether --with-ncurses or --without-ncurses was given.
5148 if test "${with_ncurses+set}" = set; then
5149 withval="$with_ncurses"
5150 cf_cv_screen=ncurses
5153 # Check whether --with-pdcurses or --without-pdcurses was given.
5154 if test "${with_pdcurses+set}" = set; then
5155 withval="$with_pdcurses"
5156 cf_cv_screen=pdcurses
5159 # Check whether --with-curses-colr or --without-curses-colr was given.
5160 if test "${with_curses_colr+set}" = set; then
5161 withval="$with_curses_colr"
5162 cf_cv_screen=curses_colr
5165 # Check whether --with-curses-5lib or --without-curses-5lib was given.
5166 if test "${with_curses_5lib+set}" = set; then
5167 withval="$with_curses_5lib"
5168 cf_cv_screen=curses_5lib
5175 echo "$as_me:5175: result: $cf_cv_screen" >&5
5176 echo "${ECHO_T}$cf_cv_screen" >&6
5178 case $cf_cv_screen in
5181 echo "$as_me:5181: checking for extra include directories" >&5
5182 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
5183 if test "${cf_cv_curses_incdir+set}" = set; then
5184 echo $ECHO_N "(cached) $ECHO_C" >&6
5187 cf_cv_curses_incdir=no
5188 case $host_os in #(vi
5190 if test "x$cf_cv_screen" = "xcurses_colr"
5192 test -d /usr/include/curses_colr && \
5193 cf_cv_curses_incdir="-I/usr/include/curses_colr"
5197 if test "x$cf_cv_screen" = "xcurses_5lib"
5199 test -d /usr/5lib && \
5200 test -d /usr/5include && \
5201 cf_cv_curses_incdir="-I/usr/5include"
5207 echo "$as_me:5207: result: $cf_cv_curses_incdir" >&5
5208 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
5209 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
5211 echo "$as_me:5211: checking if we have identified curses headers" >&5
5212 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5213 if test "${cf_cv_ncurses_header+set}" = set; then
5214 echo $ECHO_N "(cached) $ECHO_C" >&6
5217 cf_cv_ncurses_header=none
5220 curses.h ncurses/ncurses.h ncurses/curses.h
5222 cat >conftest.$ac_ext <<_ACEOF
5223 #line 5223 "configure"
5224 #include "confdefs.h"
5225 #include <${cf_header}>
5229 initscr(); tgoto("?", 0,0)
5234 rm -f conftest.$ac_objext
5235 if { (eval echo "$as_me:5235: \"$ac_compile\"") >&5
5236 (eval $ac_compile) 2>&5
5238 echo "$as_me:5238: \$? = $ac_status" >&5
5239 (exit $ac_status); } &&
5240 { ac_try='test -s conftest.$ac_objext'
5241 { (eval echo "$as_me:5241: \"$ac_try\"") >&5
5244 echo "$as_me:5244: \$? = $ac_status" >&5
5245 (exit $ac_status); }; }; then
5246 cf_cv_ncurses_header=$cf_header; break
5248 echo "$as_me: failed program was:" >&5
5249 cat conftest.$ac_ext >&5
5251 rm -f conftest.$ac_objext conftest.$ac_ext
5255 echo "$as_me:5255: result: $cf_cv_ncurses_header" >&5
5256 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5258 if test "$cf_cv_ncurses_header" = none ; then
5259 { { echo "$as_me:5259: error: No curses header-files found" >&5
5260 echo "$as_me: error: No curses header-files found" >&2;}
5261 { (exit 1); exit 1; }; }
5264 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5266 for ac_header in $cf_cv_ncurses_header
5268 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5269 echo "$as_me:5269: checking for $ac_header" >&5
5270 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5271 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5272 echo $ECHO_N "(cached) $ECHO_C" >&6
5274 cat >conftest.$ac_ext <<_ACEOF
5275 #line 5275 "configure"
5276 #include "confdefs.h"
5277 #include <$ac_header>
5279 if { (eval echo "$as_me:5279: \"$ac_cpp conftest.$ac_ext\"") >&5
5280 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5282 egrep -v '^ *\+' conftest.er1 >conftest.err
5284 cat conftest.err >&5
5285 echo "$as_me:5285: \$? = $ac_status" >&5
5286 (exit $ac_status); } >/dev/null; then
5287 if test -s conftest.err; then
5288 ac_cpp_err=$ac_c_preproc_warn_flag
5295 if test -z "$ac_cpp_err"; then
5296 eval "$as_ac_Header=yes"
5298 echo "$as_me: failed program was:" >&5
5299 cat conftest.$ac_ext >&5
5300 eval "$as_ac_Header=no"
5302 rm -f conftest.err conftest.$ac_ext
5304 echo "$as_me:5304: result: `eval echo '${'$as_ac_Header'}'`" >&5
5305 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5306 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5307 cat >>confdefs.h <<EOF
5308 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5314 echo "$as_me:5314: checking for terminfo header" >&5
5315 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5316 if test "${cf_cv_term_header+set}" = set; then
5317 echo $ECHO_N "(cached) $ECHO_C" >&6
5320 case ${cf_cv_ncurses_header} in #(vi
5321 */ncurses.h|*/ncursesw.h) #(vi
5322 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5325 cf_term_header=term.h
5329 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5331 cat >conftest.$ac_ext <<_ACEOF
5332 #line 5332 "configure"
5333 #include "confdefs.h"
5335 #include <${cf_cv_ncurses_header:-curses.h}>
5341 int x = auto_left_margin
5346 rm -f conftest.$ac_objext
5347 if { (eval echo "$as_me:5347: \"$ac_compile\"") >&5
5348 (eval $ac_compile) 2>&5
5350 echo "$as_me:5350: \$? = $ac_status" >&5
5351 (exit $ac_status); } &&
5352 { ac_try='test -s conftest.$ac_objext'
5353 { (eval echo "$as_me:5353: \"$ac_try\"") >&5
5356 echo "$as_me:5356: \$? = $ac_status" >&5
5357 (exit $ac_status); }; }; then
5359 cf_cv_term_header="$cf_test"
5361 echo "$as_me: failed program was:" >&5
5362 cat conftest.$ac_ext >&5
5364 cf_cv_term_header=unknown
5367 rm -f conftest.$ac_objext conftest.$ac_ext
5368 test "$cf_cv_term_header" != unknown && break
5372 echo "$as_me:5372: result: $cf_cv_term_header" >&5
5373 echo "${ECHO_T}$cf_cv_term_header" >&6
5375 # Set definitions to allow ifdef'ing to accommodate subdirectories
5377 case $cf_cv_term_header in # (vi
5379 cat >>confdefs.h <<\EOF
5380 #define HAVE_TERM_H 1
5386 case $cf_cv_term_header in # (vi
5387 ncurses/term.h) #(vi
5388 cat >>confdefs.h <<\EOF
5389 #define HAVE_NCURSES_TERM_H 1
5394 cat >>confdefs.h <<\EOF
5395 #define HAVE_NCURSESW_TERM_H 1
5401 echo "$as_me:5401: checking for ncurses version" >&5
5402 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5403 if test "${cf_cv_ncurses_version+set}" = set; then
5404 echo $ECHO_N "(cached) $ECHO_C" >&6
5407 cf_cv_ncurses_version=no
5410 if test "$cross_compiling" = yes; then
5412 # This will not work if the preprocessor splits the line after the
5413 # Autoconf token. The 'unproto' program does that.
5414 cat > conftest.$ac_ext <<EOF
5415 #include <${cf_cv_ncurses_header:-curses.h}>
5417 #ifdef NCURSES_VERSION
5418 Autoconf NCURSES_VERSION
5426 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5427 { (eval echo "$as_me:5427: \"$cf_try\"") >&5
5430 echo "$as_me:5430: \$? = $ac_status" >&5
5431 (exit $ac_status); }
5432 if test -f conftest.out ; then
5433 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5434 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5439 cat >conftest.$ac_ext <<_ACEOF
5440 #line 5440 "configure"
5441 #include "confdefs.h"
5443 #include <${cf_cv_ncurses_header:-curses.h}>
5447 FILE *fp = fopen("$cf_tempfile", "w");
5448 #ifdef NCURSES_VERSION
5449 # ifdef NCURSES_VERSION_PATCH
5450 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5452 fprintf(fp, "%s\n", NCURSES_VERSION);
5456 fprintf(fp, "old\n");
5461 ${cf_cv_main_return:-return}(0);
5464 rm -f conftest$ac_exeext
5465 if { (eval echo "$as_me:5465: \"$ac_link\"") >&5
5466 (eval $ac_link) 2>&5
5468 echo "$as_me:5468: \$? = $ac_status" >&5
5469 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5470 { (eval echo "$as_me:5470: \"$ac_try\"") >&5
5473 echo "$as_me:5473: \$? = $ac_status" >&5
5474 (exit $ac_status); }; }; then
5476 cf_cv_ncurses_version=`cat $cf_tempfile`
5478 echo "$as_me: program exited with status $ac_status" >&5
5479 echo "$as_me: failed program was:" >&5
5480 cat conftest.$ac_ext >&5
5482 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5487 echo "$as_me:5487: result: $cf_cv_ncurses_version" >&5
5488 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5489 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
5493 echo "$as_me:5493: checking if we have identified curses libraries" >&5
5494 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
5495 cat >conftest.$ac_ext <<_ACEOF
5496 #line 5496 "configure"
5497 #include "confdefs.h"
5498 #include <${cf_cv_ncurses_header:-curses.h}>
5502 initscr(); tgoto("?", 0,0)
5507 rm -f conftest.$ac_objext conftest$ac_exeext
5508 if { (eval echo "$as_me:5508: \"$ac_link\"") >&5
5509 (eval $ac_link) 2>&5
5511 echo "$as_me:5511: \$? = $ac_status" >&5
5512 (exit $ac_status); } &&
5513 { ac_try='test -s conftest$ac_exeext'
5514 { (eval echo "$as_me:5514: \"$ac_try\"") >&5
5517 echo "$as_me:5517: \$? = $ac_status" >&5
5518 (exit $ac_status); }; }; then
5521 echo "$as_me: failed program was:" >&5
5522 cat conftest.$ac_ext >&5
5525 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5526 echo "$as_me:5526: result: $cf_result" >&5
5527 echo "${ECHO_T}$cf_result" >&6
5529 if test "$cf_result" = no ; then
5530 case $host_os in #(vi
5532 echo "$as_me:5532: checking for tgoto in -lmytinfo" >&5
5533 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5534 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5535 echo $ECHO_N "(cached) $ECHO_C" >&6
5537 ac_check_lib_save_LIBS=$LIBS
5538 LIBS="-lmytinfo $LIBS"
5539 cat >conftest.$ac_ext <<_ACEOF
5540 #line 5540 "configure"
5541 #include "confdefs.h"
5543 /* Override any gcc2 internal prototype to avoid an error. */
5547 /* We use char because int might match the return type of a gcc2
5548 builtin and then its argument prototype would still apply. */
5558 rm -f conftest.$ac_objext conftest$ac_exeext
5559 if { (eval echo "$as_me:5559: \"$ac_link\"") >&5
5560 (eval $ac_link) 2>&5
5562 echo "$as_me:5562: \$? = $ac_status" >&5
5563 (exit $ac_status); } &&
5564 { ac_try='test -s conftest$ac_exeext'
5565 { (eval echo "$as_me:5565: \"$ac_try\"") >&5
5568 echo "$as_me:5568: \$? = $ac_status" >&5
5569 (exit $ac_status); }; }; then
5570 ac_cv_lib_mytinfo_tgoto=yes
5572 echo "$as_me: failed program was:" >&5
5573 cat conftest.$ac_ext >&5
5574 ac_cv_lib_mytinfo_tgoto=no
5576 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5577 LIBS=$ac_check_lib_save_LIBS
5579 echo "$as_me:5579: result: $ac_cv_lib_mytinfo_tgoto" >&5
5580 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5581 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5582 LIBS="-lmytinfo $LIBS"
5587 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
5588 # next (1998), and xcurses "newer" (2000). There is no header file for
5589 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
5590 # term.h) for cur_colr
5591 if test "x$cf_cv_screen" = "xcurses_colr"
5593 echo "$as_me:5593: checking for initscr in -lcur_colr" >&5
5594 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
5595 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
5596 echo $ECHO_N "(cached) $ECHO_C" >&6
5598 ac_check_lib_save_LIBS=$LIBS
5599 LIBS="-lcur_colr $LIBS"
5600 cat >conftest.$ac_ext <<_ACEOF
5601 #line 5601 "configure"
5602 #include "confdefs.h"
5604 /* Override any gcc2 internal prototype to avoid an error. */
5608 /* We use char because int might match the return type of a gcc2
5609 builtin and then its argument prototype would still apply. */
5619 rm -f conftest.$ac_objext conftest$ac_exeext
5620 if { (eval echo "$as_me:5620: \"$ac_link\"") >&5
5621 (eval $ac_link) 2>&5
5623 echo "$as_me:5623: \$? = $ac_status" >&5
5624 (exit $ac_status); } &&
5625 { ac_try='test -s conftest$ac_exeext'
5626 { (eval echo "$as_me:5626: \"$ac_try\"") >&5
5629 echo "$as_me:5629: \$? = $ac_status" >&5
5630 (exit $ac_status); }; }; then
5631 ac_cv_lib_cur_colr_initscr=yes
5633 echo "$as_me: failed program was:" >&5
5634 cat conftest.$ac_ext >&5
5635 ac_cv_lib_cur_colr_initscr=no
5637 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5638 LIBS=$ac_check_lib_save_LIBS
5640 echo "$as_me:5640: result: $ac_cv_lib_cur_colr_initscr" >&5
5641 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
5642 if test $ac_cv_lib_cur_colr_initscr = yes; then
5644 LIBS="-lcur_colr $LIBS"
5645 ac_cv_func_initscr=yes
5649 echo "$as_me:5649: checking for initscr in -lHcurses" >&5
5650 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
5651 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
5652 echo $ECHO_N "(cached) $ECHO_C" >&6
5654 ac_check_lib_save_LIBS=$LIBS
5655 LIBS="-lHcurses $LIBS"
5656 cat >conftest.$ac_ext <<_ACEOF
5657 #line 5657 "configure"
5658 #include "confdefs.h"
5660 /* Override any gcc2 internal prototype to avoid an error. */
5664 /* We use char because int might match the return type of a gcc2
5665 builtin and then its argument prototype would still apply. */
5675 rm -f conftest.$ac_objext conftest$ac_exeext
5676 if { (eval echo "$as_me:5676: \"$ac_link\"") >&5
5677 (eval $ac_link) 2>&5
5679 echo "$as_me:5679: \$? = $ac_status" >&5
5680 (exit $ac_status); } &&
5681 { ac_try='test -s conftest$ac_exeext'
5682 { (eval echo "$as_me:5682: \"$ac_try\"") >&5
5685 echo "$as_me:5685: \$? = $ac_status" >&5
5686 (exit $ac_status); }; }; then
5687 ac_cv_lib_Hcurses_initscr=yes
5689 echo "$as_me: failed program was:" >&5
5690 cat conftest.$ac_ext >&5
5691 ac_cv_lib_Hcurses_initscr=no
5693 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5694 LIBS=$ac_check_lib_save_LIBS
5696 echo "$as_me:5696: result: $ac_cv_lib_Hcurses_initscr" >&5
5697 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
5698 if test $ac_cv_lib_Hcurses_initscr = yes; then
5700 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
5701 LIBS="-lHcurses $LIBS"
5702 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
5703 ac_cv_func_initscr=yes
5712 case `arch 2>/dev/null` in
5717 if test -n "/lib64" ; then
5718 for cf_add_libdir in /lib64
5720 if test $cf_add_libdir = /usr/lib ; then
5722 elif test -d $cf_add_libdir
5725 if test -n "$LDFLAGS$LIBS" ; then
5726 # a loop is needed to ensure we can add subdirs of existing dirs
5727 for cf_test_libdir in $LDFLAGS $LIBS ; do
5728 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5729 cf_have_libdir=yes; break
5733 if test "$cf_have_libdir" = no ; then
5734 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5736 echo "${as_me:-configure}:5736: testing adding $cf_add_libdir to library-path ..." 1>&5
5738 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5746 if test -n "/lib" ; then
5747 for cf_add_libdir in /lib
5749 if test $cf_add_libdir = /usr/lib ; then
5751 elif test -d $cf_add_libdir
5754 if test -n "$LDFLAGS$LIBS" ; then
5755 # a loop is needed to ensure we can add subdirs of existing dirs
5756 for cf_test_libdir in $LDFLAGS $LIBS ; do
5757 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5758 cf_have_libdir=yes; break
5762 if test "$cf_have_libdir" = no ; then
5763 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5765 echo "${as_me:-configure}:5765: testing adding $cf_add_libdir to library-path ..." 1>&5
5767 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5777 if test -n "/lib" ; then
5778 for cf_add_libdir in /lib
5780 if test $cf_add_libdir = /usr/lib ; then
5782 elif test -d $cf_add_libdir
5785 if test -n "$LDFLAGS$LIBS" ; then
5786 # a loop is needed to ensure we can add subdirs of existing dirs
5787 for cf_test_libdir in $LDFLAGS $LIBS ; do
5788 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5789 cf_have_libdir=yes; break
5793 if test "$cf_have_libdir" = no ; then
5794 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5796 echo "${as_me:-configure}:5796: testing adding $cf_add_libdir to library-path ..." 1>&5
5798 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5808 if test "x$cf_cv_screen" = "xcurses_5lib"
5810 if test -d /usr/5lib ; then
5812 if test -n "/usr/5lib" ; then
5813 for cf_add_libdir in /usr/5lib
5815 if test $cf_add_libdir = /usr/lib ; then
5817 elif test -d $cf_add_libdir
5820 if test -n "$LDFLAGS$LIBS" ; then
5821 # a loop is needed to ensure we can add subdirs of existing dirs
5822 for cf_test_libdir in $LDFLAGS $LIBS ; do
5823 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5824 cf_have_libdir=yes; break
5828 if test "$cf_have_libdir" = no ; then
5829 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5831 echo "${as_me:-configure}:5831: testing adding $cf_add_libdir to library-path ..." 1>&5
5833 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5839 LIBS="-lcurses -ltermcap $LIBS"
5842 ac_cv_func_initscr=yes
5846 if test ".$ac_cv_func_initscr" != .yes ; then
5847 cf_save_LIBS="$LIBS"
5851 if test ".${cf_cv_ncurses_version:-no}" != .no
5853 cf_check_list="ncurses curses cursesX"
5855 cf_check_list="cursesX curses ncurses"
5858 # Check for library containing tgoto. Do this before curses library
5859 # because it may be needed to link the test-case for initscr.
5860 echo "$as_me:5860: checking for tgoto" >&5
5861 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
5862 if test "${ac_cv_func_tgoto+set}" = set; then
5863 echo $ECHO_N "(cached) $ECHO_C" >&6
5865 cat >conftest.$ac_ext <<_ACEOF
5866 #line 5866 "configure"
5867 #include "confdefs.h"
5868 /* System header to define __stub macros and hopefully few prototypes,
5869 which can conflict with char tgoto (); below. */
5871 /* Override any gcc2 internal prototype to avoid an error. */
5875 /* We use char because int might match the return type of a gcc2
5876 builtin and then its argument prototype would still apply. */
5883 /* The GNU C library defines this for functions which it implements
5884 to always fail with ENOSYS. Some functions are actually named
5885 something starting with __ and the normal name is an alias. */
5886 #if defined (__stub_tgoto) || defined (__stub___tgoto)
5896 rm -f conftest.$ac_objext conftest$ac_exeext
5897 if { (eval echo "$as_me:5897: \"$ac_link\"") >&5
5898 (eval $ac_link) 2>&5
5900 echo "$as_me:5900: \$? = $ac_status" >&5
5901 (exit $ac_status); } &&
5902 { ac_try='test -s conftest$ac_exeext'
5903 { (eval echo "$as_me:5903: \"$ac_try\"") >&5
5906 echo "$as_me:5906: \$? = $ac_status" >&5
5907 (exit $ac_status); }; }; then
5908 ac_cv_func_tgoto=yes
5910 echo "$as_me: failed program was:" >&5
5911 cat conftest.$ac_ext >&5
5914 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5916 echo "$as_me:5916: result: $ac_cv_func_tgoto" >&5
5917 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
5918 if test $ac_cv_func_tgoto = yes; then
5919 cf_term_lib=predefined
5922 for cf_term_lib in $cf_check_list otermcap termcap termlib unknown
5924 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
5925 echo "$as_me:5925: checking for tgoto in -l$cf_term_lib" >&5
5926 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
5927 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5928 echo $ECHO_N "(cached) $ECHO_C" >&6
5930 ac_check_lib_save_LIBS=$LIBS
5931 LIBS="-l$cf_term_lib $LIBS"
5932 cat >conftest.$ac_ext <<_ACEOF
5933 #line 5933 "configure"
5934 #include "confdefs.h"
5936 /* Override any gcc2 internal prototype to avoid an error. */
5940 /* We use char because int might match the return type of a gcc2
5941 builtin and then its argument prototype would still apply. */
5951 rm -f conftest.$ac_objext conftest$ac_exeext
5952 if { (eval echo "$as_me:5952: \"$ac_link\"") >&5
5953 (eval $ac_link) 2>&5
5955 echo "$as_me:5955: \$? = $ac_status" >&5
5956 (exit $ac_status); } &&
5957 { ac_try='test -s conftest$ac_exeext'
5958 { (eval echo "$as_me:5958: \"$ac_try\"") >&5
5961 echo "$as_me:5961: \$? = $ac_status" >&5
5962 (exit $ac_status); }; }; then
5963 eval "$as_ac_Lib=yes"
5965 echo "$as_me: failed program was:" >&5
5966 cat conftest.$ac_ext >&5
5967 eval "$as_ac_Lib=no"
5969 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5970 LIBS=$ac_check_lib_save_LIBS
5972 echo "$as_me:5972: result: `eval echo '${'$as_ac_Lib'}'`" >&5
5973 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
5974 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
5982 # Check for library containing initscr
5983 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
5984 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
5986 as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
5987 echo "$as_me:5987: checking for initscr in -l$cf_curs_lib" >&5
5988 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
5989 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
5990 echo $ECHO_N "(cached) $ECHO_C" >&6
5992 ac_check_lib_save_LIBS=$LIBS
5993 LIBS="-l$cf_curs_lib $LIBS"
5994 cat >conftest.$ac_ext <<_ACEOF
5995 #line 5995 "configure"
5996 #include "confdefs.h"
5998 /* Override any gcc2 internal prototype to avoid an error. */
6002 /* We use char because int might match the return type of a gcc2
6003 builtin and then its argument prototype would still apply. */
6013 rm -f conftest.$ac_objext conftest$ac_exeext
6014 if { (eval echo "$as_me:6014: \"$ac_link\"") >&5
6015 (eval $ac_link) 2>&5
6017 echo "$as_me:6017: \$? = $ac_status" >&5
6018 (exit $ac_status); } &&
6019 { ac_try='test -s conftest$ac_exeext'
6020 { (eval echo "$as_me:6020: \"$ac_try\"") >&5
6023 echo "$as_me:6023: \$? = $ac_status" >&5
6024 (exit $ac_status); }; }; then
6025 eval "$as_ac_Lib=yes"
6027 echo "$as_me: failed program was:" >&5
6028 cat conftest.$ac_ext >&5
6029 eval "$as_ac_Lib=no"
6031 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6032 LIBS=$ac_check_lib_save_LIBS
6034 echo "$as_me:6034: result: `eval echo '${'$as_ac_Lib'}'`" >&5
6035 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
6036 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
6041 test $cf_curs_lib = unknown && { { echo "$as_me:6041: error: no curses library found" >&5
6042 echo "$as_me: error: no curses library found" >&2;}
6043 { (exit 1); exit 1; }; }
6045 LIBS="-l$cf_curs_lib $cf_save_LIBS"
6046 if test "$cf_term_lib" = unknown ; then
6047 echo "$as_me:6047: checking if we can link with $cf_curs_lib library" >&5
6048 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
6049 cat >conftest.$ac_ext <<_ACEOF
6050 #line 6050 "configure"
6051 #include "confdefs.h"
6052 #include <${cf_cv_ncurses_header:-curses.h}>
6061 rm -f conftest.$ac_objext conftest$ac_exeext
6062 if { (eval echo "$as_me:6062: \"$ac_link\"") >&5
6063 (eval $ac_link) 2>&5
6065 echo "$as_me:6065: \$? = $ac_status" >&5
6066 (exit $ac_status); } &&
6067 { ac_try='test -s conftest$ac_exeext'
6068 { (eval echo "$as_me:6068: \"$ac_try\"") >&5
6071 echo "$as_me:6071: \$? = $ac_status" >&5
6072 (exit $ac_status); }; }; then
6075 echo "$as_me: failed program was:" >&5
6076 cat conftest.$ac_ext >&5
6079 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6080 echo "$as_me:6080: result: $cf_result" >&5
6081 echo "${ECHO_T}$cf_result" >&6
6082 test $cf_result = no && { { echo "$as_me:6082: error: Cannot link curses library" >&5
6083 echo "$as_me: error: Cannot link curses library" >&2;}
6084 { (exit 1); exit 1; }; }
6085 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
6087 elif test "$cf_term_lib" != predefined ; then
6088 echo "$as_me:6088: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
6089 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
6090 cat >conftest.$ac_ext <<_ACEOF
6091 #line 6091 "configure"
6092 #include "confdefs.h"
6093 #include <${cf_cv_ncurses_header:-curses.h}>
6097 initscr(); tgoto((char *)0, 0, 0);
6102 rm -f conftest.$ac_objext conftest$ac_exeext
6103 if { (eval echo "$as_me:6103: \"$ac_link\"") >&5
6104 (eval $ac_link) 2>&5
6106 echo "$as_me:6106: \$? = $ac_status" >&5
6107 (exit $ac_status); } &&
6108 { ac_try='test -s conftest$ac_exeext'
6109 { (eval echo "$as_me:6109: \"$ac_try\"") >&5
6112 echo "$as_me:6112: \$? = $ac_status" >&5
6113 (exit $ac_status); }; }; then
6116 echo "$as_me: failed program was:" >&5
6117 cat conftest.$ac_ext >&5
6119 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
6120 cat >conftest.$ac_ext <<_ACEOF
6121 #line 6121 "configure"
6122 #include "confdefs.h"
6123 #include <${cf_cv_ncurses_header:-curses.h}>
6132 rm -f conftest.$ac_objext conftest$ac_exeext
6133 if { (eval echo "$as_me:6133: \"$ac_link\"") >&5
6134 (eval $ac_link) 2>&5
6136 echo "$as_me:6136: \$? = $ac_status" >&5
6137 (exit $ac_status); } &&
6138 { ac_try='test -s conftest$ac_exeext'
6139 { (eval echo "$as_me:6139: \"$ac_try\"") >&5
6142 echo "$as_me:6142: \$? = $ac_status" >&5
6143 (exit $ac_status); }; }; then
6146 echo "$as_me: failed program was:" >&5
6147 cat conftest.$ac_ext >&5
6150 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6153 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6154 echo "$as_me:6154: result: $cf_result" >&5
6155 echo "${ECHO_T}$cf_result" >&6
6160 echo "$as_me:6160: checking for NetBSD form.h" >&5
6161 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
6162 if test "${cf_cv_netbsd_form_h+set}" = set; then
6163 echo $ECHO_N "(cached) $ECHO_C" >&6
6166 cat >conftest.$ac_ext <<_ACEOF
6167 #line 6167 "configure"
6168 #include "confdefs.h"
6170 #include <${cf_cv_ncurses_header:-curses.h}>
6178 int y = current_field(form)->cursor_ypos;
6179 int x = current_field(form)->cursor_xpos;
6185 rm -f conftest.$ac_objext
6186 if { (eval echo "$as_me:6186: \"$ac_compile\"") >&5
6187 (eval $ac_compile) 2>&5
6189 echo "$as_me:6189: \$? = $ac_status" >&5
6190 (exit $ac_status); } &&
6191 { ac_try='test -s conftest.$ac_objext'
6192 { (eval echo "$as_me:6192: \"$ac_try\"") >&5
6195 echo "$as_me:6195: \$? = $ac_status" >&5
6196 (exit $ac_status); }; }; then
6197 cf_cv_netbsd_form_h=yes
6200 echo "$as_me: failed program was:" >&5
6201 cat conftest.$ac_ext >&5
6202 cf_cv_netbsd_form_h=no
6204 rm -f conftest.$ac_objext conftest.$ac_ext
6207 echo "$as_me:6207: result: $cf_cv_netbsd_form_h" >&5
6208 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
6210 test "$cf_cv_netbsd_form_h" = yes && cat >>confdefs.h <<\EOF
6211 #define HAVE_NETBSD_FORM_H 1
6214 echo "$as_me:6214: checking for NetBSD menu.h" >&5
6215 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
6216 if test "${cf_cv_netbsd_menu_h+set}" = set; then
6217 echo $ECHO_N "(cached) $ECHO_C" >&6
6220 cat >conftest.$ac_ext <<_ACEOF
6221 #line 6221 "configure"
6222 #include "confdefs.h"
6224 #include <${cf_cv_ncurses_header:-curses.h}>
6232 int y = menu->max_item_width;
6238 rm -f conftest.$ac_objext
6239 if { (eval echo "$as_me:6239: \"$ac_compile\"") >&5
6240 (eval $ac_compile) 2>&5
6242 echo "$as_me:6242: \$? = $ac_status" >&5
6243 (exit $ac_status); } &&
6244 { ac_try='test -s conftest.$ac_objext'
6245 { (eval echo "$as_me:6245: \"$ac_try\"") >&5
6248 echo "$as_me:6248: \$? = $ac_status" >&5
6249 (exit $ac_status); }; }; then
6250 cf_cv_netbsd_menu_h=yes
6253 echo "$as_me: failed program was:" >&5
6254 cat conftest.$ac_ext >&5
6255 cf_cv_netbsd_menu_h=no
6257 rm -f conftest.$ac_objext conftest.$ac_ext
6260 echo "$as_me:6260: result: $cf_cv_netbsd_menu_h" >&5
6261 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
6263 test "$cf_cv_netbsd_menu_h" = yes && cat >>confdefs.h <<\EOF
6264 #define HAVE_NETBSD_MENU_H 1
6270 cf_ncuconfig_root=ncurses
6272 echo "Looking for ${cf_ncuconfig_root}-config"
6273 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6275 # Extract the first word of "$ac_prog", so it can be a program name with args.
6276 set dummy $ac_prog; ac_word=$2
6277 echo "$as_me:6277: checking for $ac_word" >&5
6278 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6279 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
6280 echo $ECHO_N "(cached) $ECHO_C" >&6
6282 case $NCURSES_CONFIG in
6284 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
6287 ac_save_IFS=$IFS; IFS=$ac_path_separator
6289 for ac_dir in $ac_dummy; do
6291 test -z "$ac_dir" && ac_dir=.
6292 if $as_executable_p "$ac_dir/$ac_word"; then
6293 ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
6294 echo "$as_me:6294: found $ac_dir/$ac_word" >&5
6302 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
6304 if test -n "$NCURSES_CONFIG"; then
6305 echo "$as_me:6305: result: $NCURSES_CONFIG" >&5
6306 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6308 echo "$as_me:6308: result: no" >&5
6309 echo "${ECHO_T}no" >&6
6312 test -n "$NCURSES_CONFIG" && break
6314 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
6316 if test "$NCURSES_CONFIG" != none ; then
6318 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
6319 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
6321 # even with config script, some packages use no-override for curses.h
6323 echo "$as_me:6323: checking if we have identified curses headers" >&5
6324 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6325 if test "${cf_cv_ncurses_header+set}" = set; then
6326 echo $ECHO_N "(cached) $ECHO_C" >&6
6329 cf_cv_ncurses_header=none
6336 cat >conftest.$ac_ext <<_ACEOF
6337 #line 6337 "configure"
6338 #include "confdefs.h"
6339 #include <${cf_header}>
6343 initscr(); tgoto("?", 0,0)
6348 rm -f conftest.$ac_objext
6349 if { (eval echo "$as_me:6349: \"$ac_compile\"") >&5
6350 (eval $ac_compile) 2>&5
6352 echo "$as_me:6352: \$? = $ac_status" >&5
6353 (exit $ac_status); } &&
6354 { ac_try='test -s conftest.$ac_objext'
6355 { (eval echo "$as_me:6355: \"$ac_try\"") >&5
6358 echo "$as_me:6358: \$? = $ac_status" >&5
6359 (exit $ac_status); }; }; then
6360 cf_cv_ncurses_header=$cf_header; break
6362 echo "$as_me: failed program was:" >&5
6363 cat conftest.$ac_ext >&5
6365 rm -f conftest.$ac_objext conftest.$ac_ext
6369 echo "$as_me:6369: result: $cf_cv_ncurses_header" >&5
6370 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6372 if test "$cf_cv_ncurses_header" = none ; then
6373 { { echo "$as_me:6373: error: No curses header-files found" >&5
6374 echo "$as_me: error: No curses header-files found" >&2;}
6375 { (exit 1); exit 1; }; }
6378 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6380 for ac_header in $cf_cv_ncurses_header
6382 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6383 echo "$as_me:6383: checking for $ac_header" >&5
6384 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6385 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6386 echo $ECHO_N "(cached) $ECHO_C" >&6
6388 cat >conftest.$ac_ext <<_ACEOF
6389 #line 6389 "configure"
6390 #include "confdefs.h"
6391 #include <$ac_header>
6393 if { (eval echo "$as_me:6393: \"$ac_cpp conftest.$ac_ext\"") >&5
6394 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6396 egrep -v '^ *\+' conftest.er1 >conftest.err
6398 cat conftest.err >&5
6399 echo "$as_me:6399: \$? = $ac_status" >&5
6400 (exit $ac_status); } >/dev/null; then
6401 if test -s conftest.err; then
6402 ac_cpp_err=$ac_c_preproc_warn_flag
6409 if test -z "$ac_cpp_err"; then
6410 eval "$as_ac_Header=yes"
6412 echo "$as_me: failed program was:" >&5
6413 cat conftest.$ac_ext >&5
6414 eval "$as_ac_Header=no"
6416 rm -f conftest.err conftest.$ac_ext
6418 echo "$as_me:6418: result: `eval echo '${'$as_ac_Header'}'`" >&5
6419 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6420 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6421 cat >>confdefs.h <<EOF
6422 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6428 cat >>confdefs.h <<\EOF
6432 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6434 cat >>confdefs.h <<EOF
6435 #define $cf_nculib_ROOT 1
6438 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6442 cf_ncuhdr_root=ncurses
6444 test -n "$cf_cv_curses_dir" && \
6445 test "$cf_cv_curses_dir" != "no" && { \
6447 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6448 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6450 while test $cf_add_incdir != /usr/include
6452 if test -d $cf_add_incdir
6455 if test -n "$CFLAGS$CPPFLAGS" ; then
6456 # a loop is needed to ensure we can add subdirs of existing dirs
6457 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6458 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6459 cf_have_incdir=yes; break
6464 if test "$cf_have_incdir" = no ; then
6465 if test "$cf_add_incdir" = /usr/local/include ; then
6466 if test "$GCC" = yes
6468 cf_save_CPPFLAGS=$CPPFLAGS
6469 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6470 cat >conftest.$ac_ext <<_ACEOF
6471 #line 6471 "configure"
6472 #include "confdefs.h"
6482 rm -f conftest.$ac_objext
6483 if { (eval echo "$as_me:6483: \"$ac_compile\"") >&5
6484 (eval $ac_compile) 2>&5
6486 echo "$as_me:6486: \$? = $ac_status" >&5
6487 (exit $ac_status); } &&
6488 { ac_try='test -s conftest.$ac_objext'
6489 { (eval echo "$as_me:6489: \"$ac_try\"") >&5
6492 echo "$as_me:6492: \$? = $ac_status" >&5
6493 (exit $ac_status); }; }; then
6496 echo "$as_me: failed program was:" >&5
6497 cat conftest.$ac_ext >&5
6500 rm -f conftest.$ac_objext conftest.$ac_ext
6501 CPPFLAGS=$cf_save_CPPFLAGS
6506 if test "$cf_have_incdir" = no ; then
6507 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6509 echo "${as_me:-configure}:6509: testing adding $cf_add_incdir to include-path ..." 1>&5
6511 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6513 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6514 test "$cf_top_incdir" = "$cf_add_incdir" && break
6515 cf_add_incdir="$cf_top_incdir"
6526 echo "$as_me:6526: checking for $cf_ncuhdr_root header in include-path" >&5
6527 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6528 if test "${cf_cv_ncurses_h+set}" = set; then
6529 echo $ECHO_N "(cached) $ECHO_C" >&6
6532 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6533 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6534 for cf_header in $cf_header_list
6537 cat >conftest.$ac_ext <<_ACEOF
6538 #line 6538 "configure"
6539 #include "confdefs.h"
6541 #include <$cf_header>
6546 #ifdef NCURSES_VERSION
6548 printf("%s\n", NCURSES_VERSION);
6561 rm -f conftest.$ac_objext
6562 if { (eval echo "$as_me:6562: \"$ac_compile\"") >&5
6563 (eval $ac_compile) 2>&5
6565 echo "$as_me:6565: \$? = $ac_status" >&5
6566 (exit $ac_status); } &&
6567 { ac_try='test -s conftest.$ac_objext'
6568 { (eval echo "$as_me:6568: \"$ac_try\"") >&5
6571 echo "$as_me:6571: \$? = $ac_status" >&5
6572 (exit $ac_status); }; }; then
6573 cf_cv_ncurses_h=$cf_header
6576 echo "$as_me: failed program was:" >&5
6577 cat conftest.$ac_ext >&5
6580 rm -f conftest.$ac_objext conftest.$ac_ext
6582 test "$cf_cv_ncurses_h" != no && break
6586 echo "$as_me:6586: result: $cf_cv_ncurses_h" >&5
6587 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6589 if test "$cf_cv_ncurses_h" != no ; then
6590 cf_cv_ncurses_header=$cf_cv_ncurses_h
6593 echo "$as_me:6593: checking for $cf_ncuhdr_root include-path" >&5
6594 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6595 if test "${cf_cv_ncurses_h2+set}" = set; then
6596 echo $ECHO_N "(cached) $ECHO_C" >&6
6599 test -n "$verbose" && echo
6603 # collect the current set of include-directories from compiler flags
6604 cf_header_path_list=""
6605 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6606 for cf_header_path in $CPPFLAGS $CFLAGS
6608 case $cf_header_path in #(vi
6610 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6612 test "$cf_header_path" != "NONE" && \
6613 test -d "$cf_header_path" && \
6615 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6616 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6617 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6618 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6619 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6620 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"
6623 cf_header_path_list="$cf_header_path_list $cf_search"
6629 # add the variations for the package we are looking for
6633 test "/usr" != "$prefix" && \
6635 (test $prefix = NONE || test "/usr" != "$prefix") && {
6636 test -n "$verbose" && echo " ... testing for include-directories under /usr"
6637 test -d /usr/include && cf_search="$cf_search /usr/include"
6638 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
6639 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
6640 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
6641 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6644 test "$prefix" != "NONE" && \
6645 test -d "$prefix" && \
6647 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6648 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6649 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6650 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6651 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6652 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6655 test "/usr/local" != "$prefix" && \
6656 test -d "/usr/local" && \
6657 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6658 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
6659 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
6660 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
6661 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
6662 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
6663 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6666 test "/opt" != "$prefix" && \
6668 (test $prefix = NONE || test "/opt" != "$prefix") && {
6669 test -n "$verbose" && echo " ... testing for include-directories under /opt"
6670 test -d /opt/include && cf_search="$cf_search /opt/include"
6671 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
6672 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
6673 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
6674 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6677 test "$HOME" != "$prefix" && \
6678 test -d "$HOME" && \
6679 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6680 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
6681 test -d $HOME/include && cf_search="$cf_search $HOME/include"
6682 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
6683 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
6684 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
6685 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6688 test "$includedir" != NONE && \
6689 test "$includedir" != "/usr/include" && \
6690 test -d "$includedir" && {
6691 test -d $includedir && cf_search="$cf_search $includedir"
6692 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6695 test "$oldincludedir" != NONE && \
6696 test "$oldincludedir" != "/usr/include" && \
6697 test -d "$oldincludedir" && {
6698 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6699 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6702 cf_search="$cf_search $cf_header_path_list"
6704 test -n "$verbose" && echo search path $cf_search
6705 cf_save2_CPPFLAGS="$CPPFLAGS"
6706 for cf_incdir in $cf_search
6709 if test -n "$cf_incdir" ; then
6710 for cf_add_incdir in $cf_incdir
6712 while test $cf_add_incdir != /usr/include
6714 if test -d $cf_add_incdir
6717 if test -n "$CFLAGS$CPPFLAGS" ; then
6718 # a loop is needed to ensure we can add subdirs of existing dirs
6719 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6720 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6721 cf_have_incdir=yes; break
6726 if test "$cf_have_incdir" = no ; then
6727 if test "$cf_add_incdir" = /usr/local/include ; then
6728 if test "$GCC" = yes
6730 cf_save_CPPFLAGS=$CPPFLAGS
6731 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6732 cat >conftest.$ac_ext <<_ACEOF
6733 #line 6733 "configure"
6734 #include "confdefs.h"
6744 rm -f conftest.$ac_objext
6745 if { (eval echo "$as_me:6745: \"$ac_compile\"") >&5
6746 (eval $ac_compile) 2>&5
6748 echo "$as_me:6748: \$? = $ac_status" >&5
6749 (exit $ac_status); } &&
6750 { ac_try='test -s conftest.$ac_objext'
6751 { (eval echo "$as_me:6751: \"$ac_try\"") >&5
6754 echo "$as_me:6754: \$? = $ac_status" >&5
6755 (exit $ac_status); }; }; then
6758 echo "$as_me: failed program was:" >&5
6759 cat conftest.$ac_ext >&5
6762 rm -f conftest.$ac_objext conftest.$ac_ext
6763 CPPFLAGS=$cf_save_CPPFLAGS
6768 if test "$cf_have_incdir" = no ; then
6769 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6771 echo "${as_me:-configure}:6771: testing adding $cf_add_incdir to include-path ..." 1>&5
6773 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6775 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6776 test "$cf_top_incdir" = "$cf_add_incdir" && break
6777 cf_add_incdir="$cf_top_incdir"
6791 cat >conftest.$ac_ext <<_ACEOF
6792 #line 6792 "configure"
6793 #include "confdefs.h"
6795 #include <$cf_header>
6800 #ifdef NCURSES_VERSION
6802 printf("%s\n", NCURSES_VERSION);
6815 rm -f conftest.$ac_objext
6816 if { (eval echo "$as_me:6816: \"$ac_compile\"") >&5
6817 (eval $ac_compile) 2>&5
6819 echo "$as_me:6819: \$? = $ac_status" >&5
6820 (exit $ac_status); } &&
6821 { ac_try='test -s conftest.$ac_objext'
6822 { (eval echo "$as_me:6822: \"$ac_try\"") >&5
6825 echo "$as_me:6825: \$? = $ac_status" >&5
6826 (exit $ac_status); }; }; then
6827 cf_cv_ncurses_h2=$cf_header
6830 echo "$as_me: failed program was:" >&5
6831 cat conftest.$ac_ext >&5
6834 rm -f conftest.$ac_objext conftest.$ac_ext
6836 if test "$cf_cv_ncurses_h2" != no ; then
6837 cf_cv_ncurses_h2=$cf_incdir/$cf_header
6838 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
6841 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
6843 CPPFLAGS="$cf_save2_CPPFLAGS"
6844 test "$cf_cv_ncurses_h2" != no && break
6846 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:6846: error: not found" >&5
6847 echo "$as_me: error: not found" >&2;}
6848 { (exit 1); exit 1; }; }
6851 echo "$as_me:6851: result: $cf_cv_ncurses_h2" >&5
6852 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
6854 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
6855 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
6856 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
6857 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
6860 if test -n "$cf_1st_incdir" ; then
6861 for cf_add_incdir in $cf_1st_incdir
6863 while test $cf_add_incdir != /usr/include
6865 if test -d $cf_add_incdir
6868 if test -n "$CFLAGS$CPPFLAGS" ; then
6869 # a loop is needed to ensure we can add subdirs of existing dirs
6870 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6871 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6872 cf_have_incdir=yes; break
6877 if test "$cf_have_incdir" = no ; then
6878 if test "$cf_add_incdir" = /usr/local/include ; then
6879 if test "$GCC" = yes
6881 cf_save_CPPFLAGS=$CPPFLAGS
6882 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6883 cat >conftest.$ac_ext <<_ACEOF
6884 #line 6884 "configure"
6885 #include "confdefs.h"
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
6909 echo "$as_me: failed program was:" >&5
6910 cat conftest.$ac_ext >&5
6913 rm -f conftest.$ac_objext conftest.$ac_ext
6914 CPPFLAGS=$cf_save_CPPFLAGS
6919 if test "$cf_have_incdir" = no ; then
6920 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6922 echo "${as_me:-configure}:6922: testing adding $cf_add_incdir to include-path ..." 1>&5
6924 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6926 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6927 test "$cf_top_incdir" = "$cf_add_incdir" && break
6928 cf_add_incdir="$cf_top_incdir"
6939 # Set definitions to allow ifdef'ing for ncurses.h
6941 case $cf_cv_ncurses_header in # (vi
6943 cat >>confdefs.h <<\EOF
6944 #define HAVE_NCURSES_H 1
6950 case $cf_cv_ncurses_header in # (vi
6951 ncurses/curses.h|ncurses/ncurses.h)
6952 cat >>confdefs.h <<\EOF
6953 #define HAVE_NCURSES_NCURSES_H 1
6957 ncursesw/curses.h|ncursesw/ncurses.h)
6958 cat >>confdefs.h <<\EOF
6959 #define HAVE_NCURSESW_NCURSES_H 1
6965 echo "$as_me:6965: checking for terminfo header" >&5
6966 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
6967 if test "${cf_cv_term_header+set}" = set; then
6968 echo $ECHO_N "(cached) $ECHO_C" >&6
6971 case ${cf_cv_ncurses_header} in #(vi
6972 */ncurses.h|*/ncursesw.h) #(vi
6973 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
6976 cf_term_header=term.h
6980 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
6982 cat >conftest.$ac_ext <<_ACEOF
6983 #line 6983 "configure"
6984 #include "confdefs.h"
6986 #include <${cf_cv_ncurses_header:-curses.h}>
6992 int x = auto_left_margin
6997 rm -f conftest.$ac_objext
6998 if { (eval echo "$as_me:6998: \"$ac_compile\"") >&5
6999 (eval $ac_compile) 2>&5
7001 echo "$as_me:7001: \$? = $ac_status" >&5
7002 (exit $ac_status); } &&
7003 { ac_try='test -s conftest.$ac_objext'
7004 { (eval echo "$as_me:7004: \"$ac_try\"") >&5
7007 echo "$as_me:7007: \$? = $ac_status" >&5
7008 (exit $ac_status); }; }; then
7010 cf_cv_term_header="$cf_test"
7012 echo "$as_me: failed program was:" >&5
7013 cat conftest.$ac_ext >&5
7015 cf_cv_term_header=unknown
7018 rm -f conftest.$ac_objext conftest.$ac_ext
7019 test "$cf_cv_term_header" != unknown && break
7023 echo "$as_me:7023: result: $cf_cv_term_header" >&5
7024 echo "${ECHO_T}$cf_cv_term_header" >&6
7026 # Set definitions to allow ifdef'ing to accommodate subdirectories
7028 case $cf_cv_term_header in # (vi
7030 cat >>confdefs.h <<\EOF
7031 #define HAVE_TERM_H 1
7037 case $cf_cv_term_header in # (vi
7038 ncurses/term.h) #(vi
7039 cat >>confdefs.h <<\EOF
7040 #define HAVE_NCURSES_TERM_H 1
7045 cat >>confdefs.h <<\EOF
7046 #define HAVE_NCURSESW_TERM_H 1
7052 # some applications need this, but should check for NCURSES_VERSION
7053 cat >>confdefs.h <<\EOF
7057 echo "$as_me:7057: checking for ncurses version" >&5
7058 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7059 if test "${cf_cv_ncurses_version+set}" = set; then
7060 echo $ECHO_N "(cached) $ECHO_C" >&6
7063 cf_cv_ncurses_version=no
7066 if test "$cross_compiling" = yes; then
7068 # This will not work if the preprocessor splits the line after the
7069 # Autoconf token. The 'unproto' program does that.
7070 cat > conftest.$ac_ext <<EOF
7071 #include <${cf_cv_ncurses_header:-curses.h}>
7073 #ifdef NCURSES_VERSION
7074 Autoconf NCURSES_VERSION
7082 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7083 { (eval echo "$as_me:7083: \"$cf_try\"") >&5
7086 echo "$as_me:7086: \$? = $ac_status" >&5
7087 (exit $ac_status); }
7088 if test -f conftest.out ; then
7089 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
7090 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7095 cat >conftest.$ac_ext <<_ACEOF
7096 #line 7096 "configure"
7097 #include "confdefs.h"
7099 #include <${cf_cv_ncurses_header:-curses.h}>
7103 FILE *fp = fopen("$cf_tempfile", "w");
7104 #ifdef NCURSES_VERSION
7105 # ifdef NCURSES_VERSION_PATCH
7106 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7108 fprintf(fp, "%s\n", NCURSES_VERSION);
7112 fprintf(fp, "old\n");
7117 ${cf_cv_main_return:-return}(0);
7120 rm -f conftest$ac_exeext
7121 if { (eval echo "$as_me:7121: \"$ac_link\"") >&5
7122 (eval $ac_link) 2>&5
7124 echo "$as_me:7124: \$? = $ac_status" >&5
7125 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7126 { (eval echo "$as_me:7126: \"$ac_try\"") >&5
7129 echo "$as_me:7129: \$? = $ac_status" >&5
7130 (exit $ac_status); }; }; then
7132 cf_cv_ncurses_version=`cat $cf_tempfile`
7134 echo "$as_me: program exited with status $ac_status" >&5
7135 echo "$as_me: failed program was:" >&5
7136 cat conftest.$ac_ext >&5
7138 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7143 echo "$as_me:7143: result: $cf_cv_ncurses_version" >&5
7144 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7145 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
7149 cf_nculib_root=ncurses
7150 # This works, except for the special case where we find gpm, but
7151 # ncurses is in a nonstandard location via $LIBS, and we really want
7154 cf_ncurses_SAVE="$LIBS"
7155 echo "$as_me:7155: checking for Gpm_Open in -lgpm" >&5
7156 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7157 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7158 echo $ECHO_N "(cached) $ECHO_C" >&6
7160 ac_check_lib_save_LIBS=$LIBS
7162 cat >conftest.$ac_ext <<_ACEOF
7163 #line 7163 "configure"
7164 #include "confdefs.h"
7166 /* Override any gcc2 internal prototype to avoid an error. */
7170 /* We use char because int might match the return type of a gcc2
7171 builtin and then its argument prototype would still apply. */
7181 rm -f conftest.$ac_objext conftest$ac_exeext
7182 if { (eval echo "$as_me:7182: \"$ac_link\"") >&5
7183 (eval $ac_link) 2>&5
7185 echo "$as_me:7185: \$? = $ac_status" >&5
7186 (exit $ac_status); } &&
7187 { ac_try='test -s conftest$ac_exeext'
7188 { (eval echo "$as_me:7188: \"$ac_try\"") >&5
7191 echo "$as_me:7191: \$? = $ac_status" >&5
7192 (exit $ac_status); }; }; then
7193 ac_cv_lib_gpm_Gpm_Open=yes
7195 echo "$as_me: failed program was:" >&5
7196 cat conftest.$ac_ext >&5
7197 ac_cv_lib_gpm_Gpm_Open=no
7199 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7200 LIBS=$ac_check_lib_save_LIBS
7202 echo "$as_me:7202: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7203 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7204 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
7205 echo "$as_me:7205: checking for initscr in -lgpm" >&5
7206 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
7207 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
7208 echo $ECHO_N "(cached) $ECHO_C" >&6
7210 ac_check_lib_save_LIBS=$LIBS
7212 cat >conftest.$ac_ext <<_ACEOF
7213 #line 7213 "configure"
7214 #include "confdefs.h"
7216 /* Override any gcc2 internal prototype to avoid an error. */
7220 /* We use char because int might match the return type of a gcc2
7221 builtin and then its argument prototype would still apply. */
7231 rm -f conftest.$ac_objext conftest$ac_exeext
7232 if { (eval echo "$as_me:7232: \"$ac_link\"") >&5
7233 (eval $ac_link) 2>&5
7235 echo "$as_me:7235: \$? = $ac_status" >&5
7236 (exit $ac_status); } &&
7237 { ac_try='test -s conftest$ac_exeext'
7238 { (eval echo "$as_me:7238: \"$ac_try\"") >&5
7241 echo "$as_me:7241: \$? = $ac_status" >&5
7242 (exit $ac_status); }; }; then
7243 ac_cv_lib_gpm_initscr=yes
7245 echo "$as_me: failed program was:" >&5
7246 cat conftest.$ac_ext >&5
7247 ac_cv_lib_gpm_initscr=no
7249 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7250 LIBS=$ac_check_lib_save_LIBS
7252 echo "$as_me:7252: result: $ac_cv_lib_gpm_initscr" >&5
7253 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
7254 if test $ac_cv_lib_gpm_initscr = yes; then
7255 LIBS="$cf_ncurses_SAVE"
7257 cf_ncurses_LIBS="-lgpm"
7262 case $host_os in #(vi
7264 # This is only necessary if you are linking against an obsolete
7265 # version of ncurses (but it should do no harm, since it's static).
7266 if test "$cf_nculib_root" = ncurses ; then
7267 echo "$as_me:7267: checking for tgoto in -lmytinfo" >&5
7268 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7269 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7270 echo $ECHO_N "(cached) $ECHO_C" >&6
7272 ac_check_lib_save_LIBS=$LIBS
7273 LIBS="-lmytinfo $LIBS"
7274 cat >conftest.$ac_ext <<_ACEOF
7275 #line 7275 "configure"
7276 #include "confdefs.h"
7278 /* Override any gcc2 internal prototype to avoid an error. */
7282 /* We use char because int might match the return type of a gcc2
7283 builtin and then its argument prototype would still apply. */
7293 rm -f conftest.$ac_objext conftest$ac_exeext
7294 if { (eval echo "$as_me:7294: \"$ac_link\"") >&5
7295 (eval $ac_link) 2>&5
7297 echo "$as_me:7297: \$? = $ac_status" >&5
7298 (exit $ac_status); } &&
7299 { ac_try='test -s conftest$ac_exeext'
7300 { (eval echo "$as_me:7300: \"$ac_try\"") >&5
7303 echo "$as_me:7303: \$? = $ac_status" >&5
7304 (exit $ac_status); }; }; then
7305 ac_cv_lib_mytinfo_tgoto=yes
7307 echo "$as_me: failed program was:" >&5
7308 cat conftest.$ac_ext >&5
7309 ac_cv_lib_mytinfo_tgoto=no
7311 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7312 LIBS=$ac_check_lib_save_LIBS
7314 echo "$as_me:7314: result: $ac_cv_lib_mytinfo_tgoto" >&5
7315 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7316 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7317 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7324 LIBS="$cf_ncurses_LIBS $LIBS"
7326 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7328 LIBS="-l$cf_nculib_root $LIBS"
7331 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7333 echo "$as_me:7333: checking for initscr" >&5
7334 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7335 if test "${ac_cv_func_initscr+set}" = set; then
7336 echo $ECHO_N "(cached) $ECHO_C" >&6
7338 cat >conftest.$ac_ext <<_ACEOF
7339 #line 7339 "configure"
7340 #include "confdefs.h"
7341 /* System header to define __stub macros and hopefully few prototypes,
7342 which can conflict with char initscr (); below. */
7344 /* Override any gcc2 internal prototype to avoid an error. */
7348 /* We use char because int might match the return type of a gcc2
7349 builtin and then its argument prototype would still apply. */
7356 /* The GNU C library defines this for functions which it implements
7357 to always fail with ENOSYS. Some functions are actually named
7358 something starting with __ and the normal name is an alias. */
7359 #if defined (__stub_initscr) || defined (__stub___initscr)
7369 rm -f conftest.$ac_objext conftest$ac_exeext
7370 if { (eval echo "$as_me:7370: \"$ac_link\"") >&5
7371 (eval $ac_link) 2>&5
7373 echo "$as_me:7373: \$? = $ac_status" >&5
7374 (exit $ac_status); } &&
7375 { ac_try='test -s conftest$ac_exeext'
7376 { (eval echo "$as_me:7376: \"$ac_try\"") >&5
7379 echo "$as_me:7379: \$? = $ac_status" >&5
7380 (exit $ac_status); }; }; then
7381 ac_cv_func_initscr=yes
7383 echo "$as_me: failed program was:" >&5
7384 cat conftest.$ac_ext >&5
7385 ac_cv_func_initscr=no
7387 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7389 echo "$as_me:7389: result: $ac_cv_func_initscr" >&5
7390 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7391 if test $ac_cv_func_initscr = yes; then
7392 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7395 cf_save_LIBS="$LIBS"
7396 echo "$as_me:7396: checking for initscr in -l$cf_nculib_root" >&5
7397 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7398 LIBS="-l$cf_nculib_root $LIBS"
7399 cat >conftest.$ac_ext <<_ACEOF
7400 #line 7400 "configure"
7401 #include "confdefs.h"
7402 #include <${cf_cv_ncurses_header:-curses.h}>
7411 rm -f conftest.$ac_objext conftest$ac_exeext
7412 if { (eval echo "$as_me:7412: \"$ac_link\"") >&5
7413 (eval $ac_link) 2>&5
7415 echo "$as_me:7415: \$? = $ac_status" >&5
7416 (exit $ac_status); } &&
7417 { ac_try='test -s conftest$ac_exeext'
7418 { (eval echo "$as_me:7418: \"$ac_try\"") >&5
7421 echo "$as_me:7421: \$? = $ac_status" >&5
7422 (exit $ac_status); }; }; then
7423 echo "$as_me:7423: result: yes" >&5
7424 echo "${ECHO_T}yes" >&6
7425 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7428 echo "$as_me: failed program was:" >&5
7429 cat conftest.$ac_ext >&5
7430 echo "$as_me:7430: result: no" >&5
7431 echo "${ECHO_T}no" >&6
7434 cf_library_path_list=""
7435 if test -n "${LDFLAGS}${LIBS}" ; then
7436 for cf_library_path in $LDFLAGS $LIBS
7438 case $cf_library_path in #(vi
7440 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7442 test "$cf_library_path" != "NONE" && \
7443 test -d "$cf_library_path" && \
7445 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7446 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7447 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7448 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7449 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7450 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"
7453 cf_library_path_list="$cf_library_path_list $cf_search"
7461 test "/usr" != "$prefix" && \
7463 (test $prefix = NONE || test "/usr" != "$prefix") && {
7464 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
7465 test -d /usr/lib && cf_search="$cf_search /usr/lib"
7466 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
7467 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
7468 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
7469 test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
7472 test "$prefix" != "NONE" && \
7473 test -d "$prefix" && \
7475 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7476 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7477 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7478 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7479 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7480 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7483 test "/usr/local" != "$prefix" && \
7484 test -d "/usr/local" && \
7485 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7486 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
7487 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
7488 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
7489 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
7490 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
7491 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
7494 test "/opt" != "$prefix" && \
7496 (test $prefix = NONE || test "/opt" != "$prefix") && {
7497 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
7498 test -d /opt/lib && cf_search="$cf_search /opt/lib"
7499 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
7500 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
7501 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
7502 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
7505 test "$HOME" != "$prefix" && \
7506 test -d "$HOME" && \
7507 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7508 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
7509 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
7510 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
7511 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
7512 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
7513 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
7516 cf_search="$cf_library_path_list $cf_search"
7518 for cf_libdir in $cf_search
7520 echo "$as_me:7520: checking for -l$cf_nculib_root in $cf_libdir" >&5
7521 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7522 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7523 cat >conftest.$ac_ext <<_ACEOF
7524 #line 7524 "configure"
7525 #include "confdefs.h"
7526 #include <${cf_cv_ncurses_header:-curses.h}>
7535 rm -f conftest.$ac_objext conftest$ac_exeext
7536 if { (eval echo "$as_me:7536: \"$ac_link\"") >&5
7537 (eval $ac_link) 2>&5
7539 echo "$as_me:7539: \$? = $ac_status" >&5
7540 (exit $ac_status); } &&
7541 { ac_try='test -s conftest$ac_exeext'
7542 { (eval echo "$as_me:7542: \"$ac_try\"") >&5
7545 echo "$as_me:7545: \$? = $ac_status" >&5
7546 (exit $ac_status); }; }; then
7547 echo "$as_me:7547: result: yes" >&5
7548 echo "${ECHO_T}yes" >&6
7549 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7552 echo "$as_me: failed program was:" >&5
7553 cat conftest.$ac_ext >&5
7554 echo "$as_me:7554: result: no" >&5
7555 echo "${ECHO_T}no" >&6
7556 LIBS="$cf_save_LIBS"
7558 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7562 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7566 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7568 if test $cf_found_library = no ; then
7569 { { echo "$as_me:7569: error: Cannot link $cf_nculib_root library" >&5
7570 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7571 { (exit 1); exit 1; }; }
7576 if test -n "$cf_ncurses_LIBS" ; then
7577 echo "$as_me:7577: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7578 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7579 cf_ncurses_SAVE="$LIBS"
7580 for p in $cf_ncurses_LIBS ; do
7581 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7582 if test "$q" != "$LIBS" ; then
7586 cat >conftest.$ac_ext <<_ACEOF
7587 #line 7587 "configure"
7588 #include "confdefs.h"
7589 #include <${cf_cv_ncurses_header:-curses.h}>
7593 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7598 rm -f conftest.$ac_objext conftest$ac_exeext
7599 if { (eval echo "$as_me:7599: \"$ac_link\"") >&5
7600 (eval $ac_link) 2>&5
7602 echo "$as_me:7602: \$? = $ac_status" >&5
7603 (exit $ac_status); } &&
7604 { ac_try='test -s conftest$ac_exeext'
7605 { (eval echo "$as_me:7605: \"$ac_try\"") >&5
7608 echo "$as_me:7608: \$? = $ac_status" >&5
7609 (exit $ac_status); }; }; then
7610 echo "$as_me:7610: result: yes" >&5
7611 echo "${ECHO_T}yes" >&6
7613 echo "$as_me: failed program was:" >&5
7614 cat conftest.$ac_ext >&5
7615 echo "$as_me:7615: result: no" >&5
7616 echo "${ECHO_T}no" >&6
7617 LIBS="$cf_ncurses_SAVE"
7619 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7622 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7624 cat >>confdefs.h <<EOF
7625 #define $cf_nculib_ROOT 1
7634 echo "$as_me:7634: checking for multibyte character support" >&5
7635 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7636 if test "${cf_cv_utf8_lib+set}" = set; then
7637 echo $ECHO_N "(cached) $ECHO_C" >&6
7640 cf_save_LIBS="$LIBS"
7641 cat >conftest.$ac_ext <<_ACEOF
7642 #line 7642 "configure"
7643 #include "confdefs.h"
7654 rm -f conftest.$ac_objext conftest$ac_exeext
7655 if { (eval echo "$as_me:7655: \"$ac_link\"") >&5
7656 (eval $ac_link) 2>&5
7658 echo "$as_me:7658: \$? = $ac_status" >&5
7659 (exit $ac_status); } &&
7660 { ac_try='test -s conftest$ac_exeext'
7661 { (eval echo "$as_me:7661: \"$ac_try\"") >&5
7664 echo "$as_me:7664: \$? = $ac_status" >&5
7665 (exit $ac_status); }; }; then
7668 echo "$as_me: failed program was:" >&5
7669 cat conftest.$ac_ext >&5
7671 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7672 # will be set on completion of the AC_TRY_LINK below.
7673 cf_cv_header_path_utf8=
7674 cf_cv_library_path_utf8=
7676 echo "${as_me:-configure}:7676: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7678 cf_save_LIBS="$LIBS"
7680 cat >conftest.$ac_ext <<_ACEOF
7681 #line 7681 "configure"
7682 #include "confdefs.h"
7684 #include <libutf8.h>
7693 rm -f conftest.$ac_objext conftest$ac_exeext
7694 if { (eval echo "$as_me:7694: \"$ac_link\"") >&5
7695 (eval $ac_link) 2>&5
7697 echo "$as_me:7697: \$? = $ac_status" >&5
7698 (exit $ac_status); } &&
7699 { ac_try='test -s conftest$ac_exeext'
7700 { (eval echo "$as_me:7700: \"$ac_try\"") >&5
7703 echo "$as_me:7703: \$? = $ac_status" >&5
7704 (exit $ac_status); }; }; then
7706 cf_cv_find_linkage_utf8=yes
7707 cf_cv_header_path_utf8=/usr/include
7708 cf_cv_library_path_utf8=/usr/lib
7711 echo "$as_me: failed program was:" >&5
7712 cat conftest.$ac_ext >&5
7714 LIBS="-lutf8 $cf_save_LIBS"
7716 cat >conftest.$ac_ext <<_ACEOF
7717 #line 7717 "configure"
7718 #include "confdefs.h"
7720 #include <libutf8.h>
7729 rm -f conftest.$ac_objext conftest$ac_exeext
7730 if { (eval echo "$as_me:7730: \"$ac_link\"") >&5
7731 (eval $ac_link) 2>&5
7733 echo "$as_me:7733: \$? = $ac_status" >&5
7734 (exit $ac_status); } &&
7735 { ac_try='test -s conftest$ac_exeext'
7736 { (eval echo "$as_me:7736: \"$ac_try\"") >&5
7739 echo "$as_me:7739: \$? = $ac_status" >&5
7740 (exit $ac_status); }; }; then
7742 cf_cv_find_linkage_utf8=yes
7743 cf_cv_header_path_utf8=/usr/include
7744 cf_cv_library_path_utf8=/usr/lib
7745 cf_cv_library_file_utf8="-lutf8"
7748 echo "$as_me: failed program was:" >&5
7749 cat conftest.$ac_ext >&5
7751 cf_cv_find_linkage_utf8=no
7752 LIBS="$cf_save_LIBS"
7754 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
7756 echo "${as_me:-configure}:7756: testing find linkage for utf8 library ..." 1>&5
7758 echo "${as_me:-configure}:7758: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7760 cf_save_CPPFLAGS="$CPPFLAGS"
7761 cf_test_CPPFLAGS="$CPPFLAGS"
7765 # collect the current set of include-directories from compiler flags
7766 cf_header_path_list=""
7767 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7768 for cf_header_path in $CPPFLAGS $CFLAGS
7770 case $cf_header_path in #(vi
7772 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7774 test "$cf_header_path" != "NONE" && \
7775 test -d "$cf_header_path" && \
7777 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
7778 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
7779 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
7780 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
7781 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
7782 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7785 cf_header_path_list="$cf_header_path_list $cf_search"
7791 # add the variations for the package we are looking for
7795 test "/usr" != "$prefix" && \
7797 (test $prefix = NONE || test "/usr" != "$prefix") && {
7798 test -n "$verbose" && echo " ... testing for include-directories under /usr"
7799 test -d /usr/include && cf_search="$cf_search /usr/include"
7800 test -d /usr/include/utf8 && cf_search="$cf_search /usr/include/utf8"
7801 test -d /usr/include/utf8/include && cf_search="$cf_search /usr/include/utf8/include"
7802 test -d /usr/utf8/include && cf_search="$cf_search /usr/utf8/include"
7803 test -d /usr/utf8/include/utf8 && cf_search="$cf_search /usr/utf8/include/utf8"
7806 test "$prefix" != "NONE" && \
7807 test -d "$prefix" && \
7809 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
7810 test -d $prefix/include && cf_search="$cf_search $prefix/include"
7811 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
7812 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
7813 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
7814 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
7817 test "/usr/local" != "$prefix" && \
7818 test -d "/usr/local" && \
7819 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7820 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
7821 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
7822 test -d /usr/local/include/utf8 && cf_search="$cf_search /usr/local/include/utf8"
7823 test -d /usr/local/include/utf8/include && cf_search="$cf_search /usr/local/include/utf8/include"
7824 test -d /usr/local/utf8/include && cf_search="$cf_search /usr/local/utf8/include"
7825 test -d /usr/local/utf8/include/utf8 && cf_search="$cf_search /usr/local/utf8/include/utf8"
7828 test "/opt" != "$prefix" && \
7830 (test $prefix = NONE || test "/opt" != "$prefix") && {
7831 test -n "$verbose" && echo " ... testing for include-directories under /opt"
7832 test -d /opt/include && cf_search="$cf_search /opt/include"
7833 test -d /opt/include/utf8 && cf_search="$cf_search /opt/include/utf8"
7834 test -d /opt/include/utf8/include && cf_search="$cf_search /opt/include/utf8/include"
7835 test -d /opt/utf8/include && cf_search="$cf_search /opt/utf8/include"
7836 test -d /opt/utf8/include/utf8 && cf_search="$cf_search /opt/utf8/include/utf8"
7839 test "$HOME" != "$prefix" && \
7840 test -d "$HOME" && \
7841 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7842 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
7843 test -d $HOME/include && cf_search="$cf_search $HOME/include"
7844 test -d $HOME/include/utf8 && cf_search="$cf_search $HOME/include/utf8"
7845 test -d $HOME/include/utf8/include && cf_search="$cf_search $HOME/include/utf8/include"
7846 test -d $HOME/utf8/include && cf_search="$cf_search $HOME/utf8/include"
7847 test -d $HOME/utf8/include/utf8 && cf_search="$cf_search $HOME/utf8/include/utf8"
7850 test "$includedir" != NONE && \
7851 test "$includedir" != "/usr/include" && \
7852 test -d "$includedir" && {
7853 test -d $includedir && cf_search="$cf_search $includedir"
7854 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7857 test "$oldincludedir" != NONE && \
7858 test "$oldincludedir" != "/usr/include" && \
7859 test -d "$oldincludedir" && {
7860 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
7861 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7864 cf_search="$cf_search $cf_header_path_list"
7866 for cf_cv_header_path_utf8 in $cf_search
7868 if test -d $cf_cv_header_path_utf8 ; then
7869 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
7871 echo "${as_me:-configure}:7871: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7873 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7874 cat >conftest.$ac_ext <<_ACEOF
7875 #line 7875 "configure"
7876 #include "confdefs.h"
7878 #include <libutf8.h>
7887 rm -f conftest.$ac_objext
7888 if { (eval echo "$as_me:7888: \"$ac_compile\"") >&5
7889 (eval $ac_compile) 2>&5
7891 echo "$as_me:7891: \$? = $ac_status" >&5
7892 (exit $ac_status); } &&
7893 { ac_try='test -s conftest.$ac_objext'
7894 { (eval echo "$as_me:7894: \"$ac_try\"") >&5
7897 echo "$as_me:7897: \$? = $ac_status" >&5
7898 (exit $ac_status); }; }; then
7900 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7902 echo "${as_me:-configure}:7902: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7904 cf_cv_find_linkage_utf8=maybe
7905 cf_test_CPPFLAGS="$CPPFLAGS"
7908 echo "$as_me: failed program was:" >&5
7909 cat conftest.$ac_ext >&5
7911 CPPFLAGS="$cf_save_CPPFLAGS"
7914 rm -f conftest.$ac_objext conftest.$ac_ext
7918 if test "$cf_cv_find_linkage_utf8" = maybe ; then
7920 echo "${as_me:-configure}:7920: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7922 cf_save_LIBS="$LIBS"
7923 cf_save_LDFLAGS="$LDFLAGS"
7925 if test "$cf_cv_find_linkage_utf8" != yes ; then
7928 cf_library_path_list=""
7929 if test -n "${LDFLAGS}${LIBS}" ; then
7930 for cf_library_path in $LDFLAGS $LIBS
7932 case $cf_library_path in #(vi
7934 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7936 test "$cf_library_path" != "NONE" && \
7937 test -d "$cf_library_path" && \
7939 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7940 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7941 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
7942 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7943 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
7944 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7947 cf_library_path_list="$cf_library_path_list $cf_search"
7955 test "/usr" != "$prefix" && \
7957 (test $prefix = NONE || test "/usr" != "$prefix") && {
7958 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
7959 test -d /usr/lib && cf_search="$cf_search /usr/lib"
7960 test -d /usr/lib/utf8 && cf_search="$cf_search /usr/lib/utf8"
7961 test -d /usr/lib/utf8/lib && cf_search="$cf_search /usr/lib/utf8/lib"
7962 test -d /usr/utf8/lib && cf_search="$cf_search /usr/utf8/lib"
7963 test -d /usr/utf8/lib/utf8 && cf_search="$cf_search /usr/utf8/lib/utf8"
7966 test "$prefix" != "NONE" && \
7967 test -d "$prefix" && \
7969 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7970 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7971 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
7972 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
7973 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
7974 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
7977 test "/usr/local" != "$prefix" && \
7978 test -d "/usr/local" && \
7979 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7980 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
7981 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
7982 test -d /usr/local/lib/utf8 && cf_search="$cf_search /usr/local/lib/utf8"
7983 test -d /usr/local/lib/utf8/lib && cf_search="$cf_search /usr/local/lib/utf8/lib"
7984 test -d /usr/local/utf8/lib && cf_search="$cf_search /usr/local/utf8/lib"
7985 test -d /usr/local/utf8/lib/utf8 && cf_search="$cf_search /usr/local/utf8/lib/utf8"
7988 test "/opt" != "$prefix" && \
7990 (test $prefix = NONE || test "/opt" != "$prefix") && {
7991 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
7992 test -d /opt/lib && cf_search="$cf_search /opt/lib"
7993 test -d /opt/lib/utf8 && cf_search="$cf_search /opt/lib/utf8"
7994 test -d /opt/lib/utf8/lib && cf_search="$cf_search /opt/lib/utf8/lib"
7995 test -d /opt/utf8/lib && cf_search="$cf_search /opt/utf8/lib"
7996 test -d /opt/utf8/lib/utf8 && cf_search="$cf_search /opt/utf8/lib/utf8"
7999 test "$HOME" != "$prefix" && \
8000 test -d "$HOME" && \
8001 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8002 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
8003 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
8004 test -d $HOME/lib/utf8 && cf_search="$cf_search $HOME/lib/utf8"
8005 test -d $HOME/lib/utf8/lib && cf_search="$cf_search $HOME/lib/utf8/lib"
8006 test -d $HOME/utf8/lib && cf_search="$cf_search $HOME/utf8/lib"
8007 test -d $HOME/utf8/lib/utf8 && cf_search="$cf_search $HOME/utf8/lib/utf8"
8010 cf_search="$cf_library_path_list $cf_search"
8012 for cf_cv_library_path_utf8 in $cf_search
8014 if test -d $cf_cv_library_path_utf8 ; then
8015 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
8017 echo "${as_me:-configure}:8017: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8019 CPPFLAGS="$cf_test_CPPFLAGS"
8020 LIBS="-lutf8 $cf_save_LIBS"
8021 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8022 cat >conftest.$ac_ext <<_ACEOF
8023 #line 8023 "configure"
8024 #include "confdefs.h"
8026 #include <libutf8.h>
8035 rm -f conftest.$ac_objext conftest$ac_exeext
8036 if { (eval echo "$as_me:8036: \"$ac_link\"") >&5
8037 (eval $ac_link) 2>&5
8039 echo "$as_me:8039: \$? = $ac_status" >&5
8040 (exit $ac_status); } &&
8041 { ac_try='test -s conftest$ac_exeext'
8042 { (eval echo "$as_me:8042: \"$ac_try\"") >&5
8045 echo "$as_me:8045: \$? = $ac_status" >&5
8046 (exit $ac_status); }; }; then
8048 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8050 echo "${as_me:-configure}:8050: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8052 cf_cv_find_linkage_utf8=yes
8053 cf_cv_library_file_utf8="-lutf8"
8056 echo "$as_me: failed program was:" >&5
8057 cat conftest.$ac_ext >&5
8059 CPPFLAGS="$cf_save_CPPFLAGS"
8060 LIBS="$cf_save_LIBS"
8061 LDFLAGS="$cf_save_LDFLAGS"
8064 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8067 CPPFLAGS="$cf_save_CPPFLAGS"
8068 LDFLAGS="$cf_save_LDFLAGS"
8072 cf_cv_find_linkage_utf8=no
8076 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8079 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8081 LIBS="$cf_save_LIBS"
8083 if test "$cf_cv_find_linkage_utf8" = yes ; then
8084 cf_cv_utf8_lib=add-on
8090 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8092 echo "$as_me:8092: result: $cf_cv_utf8_lib" >&5
8093 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8095 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8097 if test "$cf_cv_utf8_lib" = "add-on" ; then
8098 cat >>confdefs.h <<\EOF
8099 #define HAVE_LIBUTF8_H 1
8102 if test -n "$cf_cv_header_path_utf8" ; then
8103 for cf_add_incdir in $cf_cv_header_path_utf8
8105 while test $cf_add_incdir != /usr/include
8107 if test -d $cf_add_incdir
8110 if test -n "$CFLAGS$CPPFLAGS" ; then
8111 # a loop is needed to ensure we can add subdirs of existing dirs
8112 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8113 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8114 cf_have_incdir=yes; break
8119 if test "$cf_have_incdir" = no ; then
8120 if test "$cf_add_incdir" = /usr/local/include ; then
8121 if test "$GCC" = yes
8123 cf_save_CPPFLAGS=$CPPFLAGS
8124 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8125 cat >conftest.$ac_ext <<_ACEOF
8126 #line 8126 "configure"
8127 #include "confdefs.h"
8137 rm -f conftest.$ac_objext
8138 if { (eval echo "$as_me:8138: \"$ac_compile\"") >&5
8139 (eval $ac_compile) 2>&5
8141 echo "$as_me:8141: \$? = $ac_status" >&5
8142 (exit $ac_status); } &&
8143 { ac_try='test -s conftest.$ac_objext'
8144 { (eval echo "$as_me:8144: \"$ac_try\"") >&5
8147 echo "$as_me:8147: \$? = $ac_status" >&5
8148 (exit $ac_status); }; }; then
8151 echo "$as_me: failed program was:" >&5
8152 cat conftest.$ac_ext >&5
8155 rm -f conftest.$ac_objext conftest.$ac_ext
8156 CPPFLAGS=$cf_save_CPPFLAGS
8161 if test "$cf_have_incdir" = no ; then
8162 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8164 echo "${as_me:-configure}:8164: testing adding $cf_add_incdir to include-path ..." 1>&5
8166 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8168 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8169 test "$cf_top_incdir" = "$cf_add_incdir" && break
8170 cf_add_incdir="$cf_top_incdir"
8179 if test -n "$cf_cv_library_path_utf8" ; then
8180 for cf_add_libdir in $cf_cv_library_path_utf8
8182 if test $cf_add_libdir = /usr/lib ; then
8184 elif test -d $cf_add_libdir
8187 if test -n "$LDFLAGS$LIBS" ; then
8188 # a loop is needed to ensure we can add subdirs of existing dirs
8189 for cf_test_libdir in $LDFLAGS $LIBS ; do
8190 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8191 cf_have_libdir=yes; break
8195 if test "$cf_have_libdir" = no ; then
8196 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
8198 echo "${as_me:-configure}:8198: testing adding $cf_add_libdir to library-path ..." 1>&5
8200 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8206 LIBS="$cf_cv_library_file_utf8 $LIBS"
8209 cf_ncuconfig_root=ncursesw
8211 echo "Looking for ${cf_ncuconfig_root}-config"
8212 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8214 # Extract the first word of "$ac_prog", so it can be a program name with args.
8215 set dummy $ac_prog; ac_word=$2
8216 echo "$as_me:8216: checking for $ac_word" >&5
8217 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8218 if test "${ac_cv_path_NCURSES_CONFIG+set}" = set; then
8219 echo $ECHO_N "(cached) $ECHO_C" >&6
8221 case $NCURSES_CONFIG in
8223 ac_cv_path_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test with a path.
8226 ac_save_IFS=$IFS; IFS=$ac_path_separator
8228 for ac_dir in $ac_dummy; do
8230 test -z "$ac_dir" && ac_dir=.
8231 if $as_executable_p "$ac_dir/$ac_word"; then
8232 ac_cv_path_NCURSES_CONFIG="$ac_dir/$ac_word"
8233 echo "$as_me:8233: found $ac_dir/$ac_word" >&5
8241 NCURSES_CONFIG=$ac_cv_path_NCURSES_CONFIG
8243 if test -n "$NCURSES_CONFIG"; then
8244 echo "$as_me:8244: result: $NCURSES_CONFIG" >&5
8245 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8247 echo "$as_me:8247: result: no" >&5
8248 echo "${ECHO_T}no" >&6
8251 test -n "$NCURSES_CONFIG" && break
8253 test -n "$NCURSES_CONFIG" || NCURSES_CONFIG="none"
8255 if test "$NCURSES_CONFIG" != none ; then
8257 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
8258 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
8260 # even with config script, some packages use no-override for curses.h
8262 echo "$as_me:8262: checking if we have identified curses headers" >&5
8263 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8264 if test "${cf_cv_ncurses_header+set}" = set; then
8265 echo $ECHO_N "(cached) $ECHO_C" >&6
8268 cf_cv_ncurses_header=none
8270 ncursesw/ncurses.h \
8275 cat >conftest.$ac_ext <<_ACEOF
8276 #line 8276 "configure"
8277 #include "confdefs.h"
8278 #include <${cf_header}>
8282 initscr(); tgoto("?", 0,0)
8287 rm -f conftest.$ac_objext
8288 if { (eval echo "$as_me:8288: \"$ac_compile\"") >&5
8289 (eval $ac_compile) 2>&5
8291 echo "$as_me:8291: \$? = $ac_status" >&5
8292 (exit $ac_status); } &&
8293 { ac_try='test -s conftest.$ac_objext'
8294 { (eval echo "$as_me:8294: \"$ac_try\"") >&5
8297 echo "$as_me:8297: \$? = $ac_status" >&5
8298 (exit $ac_status); }; }; then
8299 cf_cv_ncurses_header=$cf_header; break
8301 echo "$as_me: failed program was:" >&5
8302 cat conftest.$ac_ext >&5
8304 rm -f conftest.$ac_objext conftest.$ac_ext
8308 echo "$as_me:8308: result: $cf_cv_ncurses_header" >&5
8309 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8311 if test "$cf_cv_ncurses_header" = none ; then
8312 { { echo "$as_me:8312: error: No curses header-files found" >&5
8313 echo "$as_me: error: No curses header-files found" >&2;}
8314 { (exit 1); exit 1; }; }
8317 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8319 for ac_header in $cf_cv_ncurses_header
8321 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8322 echo "$as_me:8322: checking for $ac_header" >&5
8323 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8324 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8325 echo $ECHO_N "(cached) $ECHO_C" >&6
8327 cat >conftest.$ac_ext <<_ACEOF
8328 #line 8328 "configure"
8329 #include "confdefs.h"
8330 #include <$ac_header>
8332 if { (eval echo "$as_me:8332: \"$ac_cpp conftest.$ac_ext\"") >&5
8333 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8335 egrep -v '^ *\+' conftest.er1 >conftest.err
8337 cat conftest.err >&5
8338 echo "$as_me:8338: \$? = $ac_status" >&5
8339 (exit $ac_status); } >/dev/null; then
8340 if test -s conftest.err; then
8341 ac_cpp_err=$ac_c_preproc_warn_flag
8348 if test -z "$ac_cpp_err"; then
8349 eval "$as_ac_Header=yes"
8351 echo "$as_me: failed program was:" >&5
8352 cat conftest.$ac_ext >&5
8353 eval "$as_ac_Header=no"
8355 rm -f conftest.err conftest.$ac_ext
8357 echo "$as_me:8357: result: `eval echo '${'$as_ac_Header'}'`" >&5
8358 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8359 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8360 cat >>confdefs.h <<EOF
8361 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8367 cat >>confdefs.h <<\EOF
8371 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8373 cat >>confdefs.h <<EOF
8374 #define $cf_nculib_ROOT 1
8377 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8381 cf_ncuhdr_root=ncursesw
8383 test -n "$cf_cv_curses_dir" && \
8384 test "$cf_cv_curses_dir" != "no" && { \
8386 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8387 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8389 while test $cf_add_incdir != /usr/include
8391 if test -d $cf_add_incdir
8394 if test -n "$CFLAGS$CPPFLAGS" ; then
8395 # a loop is needed to ensure we can add subdirs of existing dirs
8396 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8397 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8398 cf_have_incdir=yes; break
8403 if test "$cf_have_incdir" = no ; then
8404 if test "$cf_add_incdir" = /usr/local/include ; then
8405 if test "$GCC" = yes
8407 cf_save_CPPFLAGS=$CPPFLAGS
8408 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8409 cat >conftest.$ac_ext <<_ACEOF
8410 #line 8410 "configure"
8411 #include "confdefs.h"
8421 rm -f conftest.$ac_objext
8422 if { (eval echo "$as_me:8422: \"$ac_compile\"") >&5
8423 (eval $ac_compile) 2>&5
8425 echo "$as_me:8425: \$? = $ac_status" >&5
8426 (exit $ac_status); } &&
8427 { ac_try='test -s conftest.$ac_objext'
8428 { (eval echo "$as_me:8428: \"$ac_try\"") >&5
8431 echo "$as_me:8431: \$? = $ac_status" >&5
8432 (exit $ac_status); }; }; then
8435 echo "$as_me: failed program was:" >&5
8436 cat conftest.$ac_ext >&5
8439 rm -f conftest.$ac_objext conftest.$ac_ext
8440 CPPFLAGS=$cf_save_CPPFLAGS
8445 if test "$cf_have_incdir" = no ; then
8446 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8448 echo "${as_me:-configure}:8448: testing adding $cf_add_incdir to include-path ..." 1>&5
8450 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8452 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8453 test "$cf_top_incdir" = "$cf_add_incdir" && break
8454 cf_add_incdir="$cf_top_incdir"
8465 echo "$as_me:8465: checking for $cf_ncuhdr_root header in include-path" >&5
8466 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8467 if test "${cf_cv_ncurses_h+set}" = set; then
8468 echo $ECHO_N "(cached) $ECHO_C" >&6
8471 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8472 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8473 for cf_header in $cf_header_list
8476 cat >conftest.$ac_ext <<_ACEOF
8477 #line 8477 "configure"
8478 #include "confdefs.h"
8480 #define _XOPEN_SOURCE_EXTENDED
8481 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
8482 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
8484 #include <$cf_header>
8489 #ifdef NCURSES_VERSION
8495 printf("%s\n", NCURSES_VERSION);
8508 rm -f conftest.$ac_objext
8509 if { (eval echo "$as_me:8509: \"$ac_compile\"") >&5
8510 (eval $ac_compile) 2>&5
8512 echo "$as_me:8512: \$? = $ac_status" >&5
8513 (exit $ac_status); } &&
8514 { ac_try='test -s conftest.$ac_objext'
8515 { (eval echo "$as_me:8515: \"$ac_try\"") >&5
8518 echo "$as_me:8518: \$? = $ac_status" >&5
8519 (exit $ac_status); }; }; then
8520 cf_cv_ncurses_h=$cf_header
8523 echo "$as_me: failed program was:" >&5
8524 cat conftest.$ac_ext >&5
8527 rm -f conftest.$ac_objext conftest.$ac_ext
8529 test "$cf_cv_ncurses_h" != no && break
8533 echo "$as_me:8533: result: $cf_cv_ncurses_h" >&5
8534 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8536 if test "$cf_cv_ncurses_h" != no ; then
8537 cf_cv_ncurses_header=$cf_cv_ncurses_h
8540 echo "$as_me:8540: checking for $cf_ncuhdr_root include-path" >&5
8541 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8542 if test "${cf_cv_ncurses_h2+set}" = set; then
8543 echo $ECHO_N "(cached) $ECHO_C" >&6
8546 test -n "$verbose" && echo
8550 # collect the current set of include-directories from compiler flags
8551 cf_header_path_list=""
8552 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8553 for cf_header_path in $CPPFLAGS $CFLAGS
8555 case $cf_header_path in #(vi
8557 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8559 test "$cf_header_path" != "NONE" && \
8560 test -d "$cf_header_path" && \
8562 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8563 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8564 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8565 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8566 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8567 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"
8570 cf_header_path_list="$cf_header_path_list $cf_search"
8576 # add the variations for the package we are looking for
8580 test "/usr" != "$prefix" && \
8582 (test $prefix = NONE || test "/usr" != "$prefix") && {
8583 test -n "$verbose" && echo " ... testing for include-directories under /usr"
8584 test -d /usr/include && cf_search="$cf_search /usr/include"
8585 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
8586 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
8587 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
8588 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8591 test "$prefix" != "NONE" && \
8592 test -d "$prefix" && \
8594 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8595 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8596 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8597 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8598 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8599 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8602 test "/usr/local" != "$prefix" && \
8603 test -d "/usr/local" && \
8604 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8605 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
8606 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
8607 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
8608 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
8609 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
8610 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8613 test "/opt" != "$prefix" && \
8615 (test $prefix = NONE || test "/opt" != "$prefix") && {
8616 test -n "$verbose" && echo " ... testing for include-directories under /opt"
8617 test -d /opt/include && cf_search="$cf_search /opt/include"
8618 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
8619 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
8620 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
8621 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8624 test "$HOME" != "$prefix" && \
8625 test -d "$HOME" && \
8626 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8627 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
8628 test -d $HOME/include && cf_search="$cf_search $HOME/include"
8629 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
8630 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
8631 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
8632 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8635 test "$includedir" != NONE && \
8636 test "$includedir" != "/usr/include" && \
8637 test -d "$includedir" && {
8638 test -d $includedir && cf_search="$cf_search $includedir"
8639 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8642 test "$oldincludedir" != NONE && \
8643 test "$oldincludedir" != "/usr/include" && \
8644 test -d "$oldincludedir" && {
8645 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8646 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8649 cf_search="$cf_search $cf_header_path_list"
8651 test -n "$verbose" && echo search path $cf_search
8652 cf_save2_CPPFLAGS="$CPPFLAGS"
8653 for cf_incdir in $cf_search
8656 if test -n "$cf_incdir" ; then
8657 for cf_add_incdir in $cf_incdir
8659 while test $cf_add_incdir != /usr/include
8661 if test -d $cf_add_incdir
8664 if test -n "$CFLAGS$CPPFLAGS" ; then
8665 # a loop is needed to ensure we can add subdirs of existing dirs
8666 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8667 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8668 cf_have_incdir=yes; break
8673 if test "$cf_have_incdir" = no ; then
8674 if test "$cf_add_incdir" = /usr/local/include ; then
8675 if test "$GCC" = yes
8677 cf_save_CPPFLAGS=$CPPFLAGS
8678 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8679 cat >conftest.$ac_ext <<_ACEOF
8680 #line 8680 "configure"
8681 #include "confdefs.h"
8691 rm -f conftest.$ac_objext
8692 if { (eval echo "$as_me:8692: \"$ac_compile\"") >&5
8693 (eval $ac_compile) 2>&5
8695 echo "$as_me:8695: \$? = $ac_status" >&5
8696 (exit $ac_status); } &&
8697 { ac_try='test -s conftest.$ac_objext'
8698 { (eval echo "$as_me:8698: \"$ac_try\"") >&5
8701 echo "$as_me:8701: \$? = $ac_status" >&5
8702 (exit $ac_status); }; }; then
8705 echo "$as_me: failed program was:" >&5
8706 cat conftest.$ac_ext >&5
8709 rm -f conftest.$ac_objext conftest.$ac_ext
8710 CPPFLAGS=$cf_save_CPPFLAGS
8715 if test "$cf_have_incdir" = no ; then
8716 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8718 echo "${as_me:-configure}:8718: testing adding $cf_add_incdir to include-path ..." 1>&5
8720 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8722 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8723 test "$cf_top_incdir" = "$cf_add_incdir" && break
8724 cf_add_incdir="$cf_top_incdir"
8738 cat >conftest.$ac_ext <<_ACEOF
8739 #line 8739 "configure"
8740 #include "confdefs.h"
8742 #include <$cf_header>
8747 #ifdef NCURSES_VERSION
8749 printf("%s\n", NCURSES_VERSION);
8762 rm -f conftest.$ac_objext
8763 if { (eval echo "$as_me:8763: \"$ac_compile\"") >&5
8764 (eval $ac_compile) 2>&5
8766 echo "$as_me:8766: \$? = $ac_status" >&5
8767 (exit $ac_status); } &&
8768 { ac_try='test -s conftest.$ac_objext'
8769 { (eval echo "$as_me:8769: \"$ac_try\"") >&5
8772 echo "$as_me:8772: \$? = $ac_status" >&5
8773 (exit $ac_status); }; }; then
8774 cf_cv_ncurses_h2=$cf_header
8777 echo "$as_me: failed program was:" >&5
8778 cat conftest.$ac_ext >&5
8781 rm -f conftest.$ac_objext conftest.$ac_ext
8783 if test "$cf_cv_ncurses_h2" != no ; then
8784 cf_cv_ncurses_h2=$cf_incdir/$cf_header
8785 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
8788 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
8790 CPPFLAGS="$cf_save2_CPPFLAGS"
8791 test "$cf_cv_ncurses_h2" != no && break
8793 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:8793: error: not found" >&5
8794 echo "$as_me: error: not found" >&2;}
8795 { (exit 1); exit 1; }; }
8798 echo "$as_me:8798: result: $cf_cv_ncurses_h2" >&5
8799 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
8801 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
8802 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
8803 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
8804 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
8807 if test -n "$cf_1st_incdir" ; then
8808 for cf_add_incdir in $cf_1st_incdir
8810 while test $cf_add_incdir != /usr/include
8812 if test -d $cf_add_incdir
8815 if test -n "$CFLAGS$CPPFLAGS" ; then
8816 # a loop is needed to ensure we can add subdirs of existing dirs
8817 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8818 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8819 cf_have_incdir=yes; break
8824 if test "$cf_have_incdir" = no ; then
8825 if test "$cf_add_incdir" = /usr/local/include ; then
8826 if test "$GCC" = yes
8828 cf_save_CPPFLAGS=$CPPFLAGS
8829 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8830 cat >conftest.$ac_ext <<_ACEOF
8831 #line 8831 "configure"
8832 #include "confdefs.h"
8842 rm -f conftest.$ac_objext
8843 if { (eval echo "$as_me:8843: \"$ac_compile\"") >&5
8844 (eval $ac_compile) 2>&5
8846 echo "$as_me:8846: \$? = $ac_status" >&5
8847 (exit $ac_status); } &&
8848 { ac_try='test -s conftest.$ac_objext'
8849 { (eval echo "$as_me:8849: \"$ac_try\"") >&5
8852 echo "$as_me:8852: \$? = $ac_status" >&5
8853 (exit $ac_status); }; }; then
8856 echo "$as_me: failed program was:" >&5
8857 cat conftest.$ac_ext >&5
8860 rm -f conftest.$ac_objext conftest.$ac_ext
8861 CPPFLAGS=$cf_save_CPPFLAGS
8866 if test "$cf_have_incdir" = no ; then
8867 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8869 echo "${as_me:-configure}:8869: testing adding $cf_add_incdir to include-path ..." 1>&5
8871 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8873 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8874 test "$cf_top_incdir" = "$cf_add_incdir" && break
8875 cf_add_incdir="$cf_top_incdir"
8886 # Set definitions to allow ifdef'ing for ncurses.h
8888 case $cf_cv_ncurses_header in # (vi
8890 cat >>confdefs.h <<\EOF
8891 #define HAVE_NCURSES_H 1
8897 case $cf_cv_ncurses_header in # (vi
8898 ncurses/curses.h|ncurses/ncurses.h)
8899 cat >>confdefs.h <<\EOF
8900 #define HAVE_NCURSES_NCURSES_H 1
8904 ncursesw/curses.h|ncursesw/ncurses.h)
8905 cat >>confdefs.h <<\EOF
8906 #define HAVE_NCURSESW_NCURSES_H 1
8912 echo "$as_me:8912: checking for terminfo header" >&5
8913 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
8914 if test "${cf_cv_term_header+set}" = set; then
8915 echo $ECHO_N "(cached) $ECHO_C" >&6
8918 case ${cf_cv_ncurses_header} in #(vi
8919 */ncurses.h|*/ncursesw.h) #(vi
8920 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
8923 cf_term_header=term.h
8927 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
8929 cat >conftest.$ac_ext <<_ACEOF
8930 #line 8930 "configure"
8931 #include "confdefs.h"
8933 #include <${cf_cv_ncurses_header:-curses.h}>
8939 int x = auto_left_margin
8944 rm -f conftest.$ac_objext
8945 if { (eval echo "$as_me:8945: \"$ac_compile\"") >&5
8946 (eval $ac_compile) 2>&5
8948 echo "$as_me:8948: \$? = $ac_status" >&5
8949 (exit $ac_status); } &&
8950 { ac_try='test -s conftest.$ac_objext'
8951 { (eval echo "$as_me:8951: \"$ac_try\"") >&5
8954 echo "$as_me:8954: \$? = $ac_status" >&5
8955 (exit $ac_status); }; }; then
8957 cf_cv_term_header="$cf_test"
8959 echo "$as_me: failed program was:" >&5
8960 cat conftest.$ac_ext >&5
8962 cf_cv_term_header=unknown
8965 rm -f conftest.$ac_objext conftest.$ac_ext
8966 test "$cf_cv_term_header" != unknown && break
8970 echo "$as_me:8970: result: $cf_cv_term_header" >&5
8971 echo "${ECHO_T}$cf_cv_term_header" >&6
8973 # Set definitions to allow ifdef'ing to accommodate subdirectories
8975 case $cf_cv_term_header in # (vi
8977 cat >>confdefs.h <<\EOF
8978 #define HAVE_TERM_H 1
8984 case $cf_cv_term_header in # (vi
8985 ncurses/term.h) #(vi
8986 cat >>confdefs.h <<\EOF
8987 #define HAVE_NCURSES_TERM_H 1
8992 cat >>confdefs.h <<\EOF
8993 #define HAVE_NCURSESW_TERM_H 1
8999 # some applications need this, but should check for NCURSES_VERSION
9000 cat >>confdefs.h <<\EOF
9004 echo "$as_me:9004: checking for ncurses version" >&5
9005 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9006 if test "${cf_cv_ncurses_version+set}" = set; then
9007 echo $ECHO_N "(cached) $ECHO_C" >&6
9010 cf_cv_ncurses_version=no
9013 if test "$cross_compiling" = yes; then
9015 # This will not work if the preprocessor splits the line after the
9016 # Autoconf token. The 'unproto' program does that.
9017 cat > conftest.$ac_ext <<EOF
9018 #include <${cf_cv_ncurses_header:-curses.h}>
9020 #ifdef NCURSES_VERSION
9021 Autoconf NCURSES_VERSION
9029 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9030 { (eval echo "$as_me:9030: \"$cf_try\"") >&5
9033 echo "$as_me:9033: \$? = $ac_status" >&5
9034 (exit $ac_status); }
9035 if test -f conftest.out ; then
9036 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
9037 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9042 cat >conftest.$ac_ext <<_ACEOF
9043 #line 9043 "configure"
9044 #include "confdefs.h"
9046 #include <${cf_cv_ncurses_header:-curses.h}>
9050 FILE *fp = fopen("$cf_tempfile", "w");
9051 #ifdef NCURSES_VERSION
9052 # ifdef NCURSES_VERSION_PATCH
9053 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9055 fprintf(fp, "%s\n", NCURSES_VERSION);
9059 fprintf(fp, "old\n");
9064 ${cf_cv_main_return:-return}(0);
9067 rm -f conftest$ac_exeext
9068 if { (eval echo "$as_me:9068: \"$ac_link\"") >&5
9069 (eval $ac_link) 2>&5
9071 echo "$as_me:9071: \$? = $ac_status" >&5
9072 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9073 { (eval echo "$as_me:9073: \"$ac_try\"") >&5
9076 echo "$as_me:9076: \$? = $ac_status" >&5
9077 (exit $ac_status); }; }; then
9079 cf_cv_ncurses_version=`cat $cf_tempfile`
9081 echo "$as_me: program exited with status $ac_status" >&5
9082 echo "$as_me: failed program was:" >&5
9083 cat conftest.$ac_ext >&5
9085 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9090 echo "$as_me:9090: result: $cf_cv_ncurses_version" >&5
9091 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9092 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
9096 cf_nculib_root=ncursesw
9097 # This works, except for the special case where we find gpm, but
9098 # ncurses is in a nonstandard location via $LIBS, and we really want
9101 cf_ncurses_SAVE="$LIBS"
9102 echo "$as_me:9102: checking for Gpm_Open in -lgpm" >&5
9103 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9104 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9105 echo $ECHO_N "(cached) $ECHO_C" >&6
9107 ac_check_lib_save_LIBS=$LIBS
9109 cat >conftest.$ac_ext <<_ACEOF
9110 #line 9110 "configure"
9111 #include "confdefs.h"
9113 /* Override any gcc2 internal prototype to avoid an error. */
9117 /* We use char because int might match the return type of a gcc2
9118 builtin and then its argument prototype would still apply. */
9128 rm -f conftest.$ac_objext conftest$ac_exeext
9129 if { (eval echo "$as_me:9129: \"$ac_link\"") >&5
9130 (eval $ac_link) 2>&5
9132 echo "$as_me:9132: \$? = $ac_status" >&5
9133 (exit $ac_status); } &&
9134 { ac_try='test -s conftest$ac_exeext'
9135 { (eval echo "$as_me:9135: \"$ac_try\"") >&5
9138 echo "$as_me:9138: \$? = $ac_status" >&5
9139 (exit $ac_status); }; }; then
9140 ac_cv_lib_gpm_Gpm_Open=yes
9142 echo "$as_me: failed program was:" >&5
9143 cat conftest.$ac_ext >&5
9144 ac_cv_lib_gpm_Gpm_Open=no
9146 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9147 LIBS=$ac_check_lib_save_LIBS
9149 echo "$as_me:9149: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9150 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9151 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
9152 echo "$as_me:9152: checking for initscr in -lgpm" >&5
9153 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9154 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9155 echo $ECHO_N "(cached) $ECHO_C" >&6
9157 ac_check_lib_save_LIBS=$LIBS
9159 cat >conftest.$ac_ext <<_ACEOF
9160 #line 9160 "configure"
9161 #include "confdefs.h"
9163 /* Override any gcc2 internal prototype to avoid an error. */
9167 /* We use char because int might match the return type of a gcc2
9168 builtin and then its argument prototype would still apply. */
9178 rm -f conftest.$ac_objext conftest$ac_exeext
9179 if { (eval echo "$as_me:9179: \"$ac_link\"") >&5
9180 (eval $ac_link) 2>&5
9182 echo "$as_me:9182: \$? = $ac_status" >&5
9183 (exit $ac_status); } &&
9184 { ac_try='test -s conftest$ac_exeext'
9185 { (eval echo "$as_me:9185: \"$ac_try\"") >&5
9188 echo "$as_me:9188: \$? = $ac_status" >&5
9189 (exit $ac_status); }; }; then
9190 ac_cv_lib_gpm_initscr=yes
9192 echo "$as_me: failed program was:" >&5
9193 cat conftest.$ac_ext >&5
9194 ac_cv_lib_gpm_initscr=no
9196 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9197 LIBS=$ac_check_lib_save_LIBS
9199 echo "$as_me:9199: result: $ac_cv_lib_gpm_initscr" >&5
9200 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9201 if test $ac_cv_lib_gpm_initscr = yes; then
9202 LIBS="$cf_ncurses_SAVE"
9204 cf_ncurses_LIBS="-lgpm"
9209 case $host_os in #(vi
9211 # This is only necessary if you are linking against an obsolete
9212 # version of ncurses (but it should do no harm, since it's static).
9213 if test "$cf_nculib_root" = ncurses ; then
9214 echo "$as_me:9214: checking for tgoto in -lmytinfo" >&5
9215 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9216 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9217 echo $ECHO_N "(cached) $ECHO_C" >&6
9219 ac_check_lib_save_LIBS=$LIBS
9220 LIBS="-lmytinfo $LIBS"
9221 cat >conftest.$ac_ext <<_ACEOF
9222 #line 9222 "configure"
9223 #include "confdefs.h"
9225 /* Override any gcc2 internal prototype to avoid an error. */
9229 /* We use char because int might match the return type of a gcc2
9230 builtin and then its argument prototype would still apply. */
9240 rm -f conftest.$ac_objext conftest$ac_exeext
9241 if { (eval echo "$as_me:9241: \"$ac_link\"") >&5
9242 (eval $ac_link) 2>&5
9244 echo "$as_me:9244: \$? = $ac_status" >&5
9245 (exit $ac_status); } &&
9246 { ac_try='test -s conftest$ac_exeext'
9247 { (eval echo "$as_me:9247: \"$ac_try\"") >&5
9250 echo "$as_me:9250: \$? = $ac_status" >&5
9251 (exit $ac_status); }; }; then
9252 ac_cv_lib_mytinfo_tgoto=yes
9254 echo "$as_me: failed program was:" >&5
9255 cat conftest.$ac_ext >&5
9256 ac_cv_lib_mytinfo_tgoto=no
9258 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9259 LIBS=$ac_check_lib_save_LIBS
9261 echo "$as_me:9261: result: $ac_cv_lib_mytinfo_tgoto" >&5
9262 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9263 if test $ac_cv_lib_mytinfo_tgoto = yes; then
9264 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9271 LIBS="$cf_ncurses_LIBS $LIBS"
9273 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9275 LIBS="-l$cf_nculib_root $LIBS"
9278 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9280 echo "$as_me:9280: checking for initscr" >&5
9281 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9282 if test "${ac_cv_func_initscr+set}" = set; then
9283 echo $ECHO_N "(cached) $ECHO_C" >&6
9285 cat >conftest.$ac_ext <<_ACEOF
9286 #line 9286 "configure"
9287 #include "confdefs.h"
9288 /* System header to define __stub macros and hopefully few prototypes,
9289 which can conflict with char initscr (); below. */
9291 /* Override any gcc2 internal prototype to avoid an error. */
9295 /* We use char because int might match the return type of a gcc2
9296 builtin and then its argument prototype would still apply. */
9303 /* The GNU C library defines this for functions which it implements
9304 to always fail with ENOSYS. Some functions are actually named
9305 something starting with __ and the normal name is an alias. */
9306 #if defined (__stub_initscr) || defined (__stub___initscr)
9316 rm -f conftest.$ac_objext conftest$ac_exeext
9317 if { (eval echo "$as_me:9317: \"$ac_link\"") >&5
9318 (eval $ac_link) 2>&5
9320 echo "$as_me:9320: \$? = $ac_status" >&5
9321 (exit $ac_status); } &&
9322 { ac_try='test -s conftest$ac_exeext'
9323 { (eval echo "$as_me:9323: \"$ac_try\"") >&5
9326 echo "$as_me:9326: \$? = $ac_status" >&5
9327 (exit $ac_status); }; }; then
9328 ac_cv_func_initscr=yes
9330 echo "$as_me: failed program was:" >&5
9331 cat conftest.$ac_ext >&5
9332 ac_cv_func_initscr=no
9334 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9336 echo "$as_me:9336: result: $ac_cv_func_initscr" >&5
9337 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9338 if test $ac_cv_func_initscr = yes; then
9339 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9342 cf_save_LIBS="$LIBS"
9343 echo "$as_me:9343: checking for initscr in -l$cf_nculib_root" >&5
9344 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9345 LIBS="-l$cf_nculib_root $LIBS"
9346 cat >conftest.$ac_ext <<_ACEOF
9347 #line 9347 "configure"
9348 #include "confdefs.h"
9349 #include <${cf_cv_ncurses_header:-curses.h}>
9358 rm -f conftest.$ac_objext conftest$ac_exeext
9359 if { (eval echo "$as_me:9359: \"$ac_link\"") >&5
9360 (eval $ac_link) 2>&5
9362 echo "$as_me:9362: \$? = $ac_status" >&5
9363 (exit $ac_status); } &&
9364 { ac_try='test -s conftest$ac_exeext'
9365 { (eval echo "$as_me:9365: \"$ac_try\"") >&5
9368 echo "$as_me:9368: \$? = $ac_status" >&5
9369 (exit $ac_status); }; }; then
9370 echo "$as_me:9370: result: yes" >&5
9371 echo "${ECHO_T}yes" >&6
9372 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9375 echo "$as_me: failed program was:" >&5
9376 cat conftest.$ac_ext >&5
9377 echo "$as_me:9377: result: no" >&5
9378 echo "${ECHO_T}no" >&6
9381 cf_library_path_list=""
9382 if test -n "${LDFLAGS}${LIBS}" ; then
9383 for cf_library_path in $LDFLAGS $LIBS
9385 case $cf_library_path in #(vi
9387 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9389 test "$cf_library_path" != "NONE" && \
9390 test -d "$cf_library_path" && \
9392 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9393 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9394 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9395 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9396 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9397 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"
9400 cf_library_path_list="$cf_library_path_list $cf_search"
9408 test "/usr" != "$prefix" && \
9410 (test $prefix = NONE || test "/usr" != "$prefix") && {
9411 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
9412 test -d /usr/lib && cf_search="$cf_search /usr/lib"
9413 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
9414 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
9415 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
9416 test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
9419 test "$prefix" != "NONE" && \
9420 test -d "$prefix" && \
9422 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9423 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9424 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9425 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9426 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9427 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9430 test "/usr/local" != "$prefix" && \
9431 test -d "/usr/local" && \
9432 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
9433 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
9434 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
9435 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
9436 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
9437 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
9438 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
9441 test "/opt" != "$prefix" && \
9443 (test $prefix = NONE || test "/opt" != "$prefix") && {
9444 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
9445 test -d /opt/lib && cf_search="$cf_search /opt/lib"
9446 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
9447 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
9448 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
9449 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
9452 test "$HOME" != "$prefix" && \
9453 test -d "$HOME" && \
9454 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9455 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
9456 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
9457 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
9458 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
9459 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
9460 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
9463 cf_search="$cf_library_path_list $cf_search"
9465 for cf_libdir in $cf_search
9467 echo "$as_me:9467: checking for -l$cf_nculib_root in $cf_libdir" >&5
9468 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9469 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9470 cat >conftest.$ac_ext <<_ACEOF
9471 #line 9471 "configure"
9472 #include "confdefs.h"
9473 #include <${cf_cv_ncurses_header:-curses.h}>
9482 rm -f conftest.$ac_objext conftest$ac_exeext
9483 if { (eval echo "$as_me:9483: \"$ac_link\"") >&5
9484 (eval $ac_link) 2>&5
9486 echo "$as_me:9486: \$? = $ac_status" >&5
9487 (exit $ac_status); } &&
9488 { ac_try='test -s conftest$ac_exeext'
9489 { (eval echo "$as_me:9489: \"$ac_try\"") >&5
9492 echo "$as_me:9492: \$? = $ac_status" >&5
9493 (exit $ac_status); }; }; then
9494 echo "$as_me:9494: result: yes" >&5
9495 echo "${ECHO_T}yes" >&6
9496 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9499 echo "$as_me: failed program was:" >&5
9500 cat conftest.$ac_ext >&5
9501 echo "$as_me:9501: result: no" >&5
9502 echo "${ECHO_T}no" >&6
9503 LIBS="$cf_save_LIBS"
9505 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9509 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9513 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9515 if test $cf_found_library = no ; then
9516 { { echo "$as_me:9516: error: Cannot link $cf_nculib_root library" >&5
9517 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9518 { (exit 1); exit 1; }; }
9523 if test -n "$cf_ncurses_LIBS" ; then
9524 echo "$as_me:9524: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9525 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9526 cf_ncurses_SAVE="$LIBS"
9527 for p in $cf_ncurses_LIBS ; do
9528 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9529 if test "$q" != "$LIBS" ; then
9533 cat >conftest.$ac_ext <<_ACEOF
9534 #line 9534 "configure"
9535 #include "confdefs.h"
9536 #include <${cf_cv_ncurses_header:-curses.h}>
9540 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9545 rm -f conftest.$ac_objext conftest$ac_exeext
9546 if { (eval echo "$as_me:9546: \"$ac_link\"") >&5
9547 (eval $ac_link) 2>&5
9549 echo "$as_me:9549: \$? = $ac_status" >&5
9550 (exit $ac_status); } &&
9551 { ac_try='test -s conftest$ac_exeext'
9552 { (eval echo "$as_me:9552: \"$ac_try\"") >&5
9555 echo "$as_me:9555: \$? = $ac_status" >&5
9556 (exit $ac_status); }; }; then
9557 echo "$as_me:9557: result: yes" >&5
9558 echo "${ECHO_T}yes" >&6
9560 echo "$as_me: failed program was:" >&5
9561 cat conftest.$ac_ext >&5
9562 echo "$as_me:9562: result: no" >&5
9563 echo "${ECHO_T}no" >&6
9564 LIBS="$cf_ncurses_SAVE"
9566 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9569 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9571 cat >>confdefs.h <<EOF
9572 #define $cf_nculib_ROOT 1
9580 echo "$as_me:9580: checking if you want to use pkg-config" >&5
9581 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
9583 # Check whether --with-pkg-config or --without-pkg-config was given.
9584 if test "${with_pkg_config+set}" = set; then
9585 withval="$with_pkg_config"
9586 cf_pkg_config=$withval
9590 echo "$as_me:9590: result: $cf_pkg_config" >&5
9591 echo "${ECHO_T}$cf_pkg_config" >&6
9593 case $cf_pkg_config in #(vi
9599 if test -n "$ac_tool_prefix"; then
9600 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9601 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9602 echo "$as_me:9602: checking for $ac_word" >&5
9603 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9604 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
9605 echo $ECHO_N "(cached) $ECHO_C" >&6
9609 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9612 ac_save_IFS=$IFS; IFS=$ac_path_separator
9614 for ac_dir in $ac_dummy; do
9616 test -z "$ac_dir" && ac_dir=.
9617 if $as_executable_p "$ac_dir/$ac_word"; then
9618 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
9619 echo "$as_me:9619: found $ac_dir/$ac_word" >&5
9627 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9629 if test -n "$PKG_CONFIG"; then
9630 echo "$as_me:9630: result: $PKG_CONFIG" >&5
9631 echo "${ECHO_T}$PKG_CONFIG" >&6
9633 echo "$as_me:9633: result: no" >&5
9634 echo "${ECHO_T}no" >&6
9638 if test -z "$ac_cv_path_PKG_CONFIG"; then
9639 ac_pt_PKG_CONFIG=$PKG_CONFIG
9640 # Extract the first word of "pkg-config", so it can be a program name with args.
9641 set dummy pkg-config; ac_word=$2
9642 echo "$as_me:9642: checking for $ac_word" >&5
9643 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9644 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
9645 echo $ECHO_N "(cached) $ECHO_C" >&6
9647 case $ac_pt_PKG_CONFIG in
9649 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9652 ac_save_IFS=$IFS; IFS=$ac_path_separator
9654 for ac_dir in $ac_dummy; do
9656 test -z "$ac_dir" && ac_dir=.
9657 if $as_executable_p "$ac_dir/$ac_word"; then
9658 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
9659 echo "$as_me:9659: found $ac_dir/$ac_word" >&5
9664 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
9668 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9670 if test -n "$ac_pt_PKG_CONFIG"; then
9671 echo "$as_me:9671: result: $ac_pt_PKG_CONFIG" >&5
9672 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
9674 echo "$as_me:9674: result: no" >&5
9675 echo "${ECHO_T}no" >&6
9678 PKG_CONFIG=$ac_pt_PKG_CONFIG
9680 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9689 test -z "$PKG_CONFIG" && PKG_CONFIG=none
9690 if test "$PKG_CONFIG" != none ; then
9692 if test "x$prefix" != xNONE; then
9693 cf_path_syntax="$prefix"
9695 cf_path_syntax="$ac_default_prefix"
9698 case ".$PKG_CONFIG" in #(vi
9699 .\$\(*\)*|.\'*\'*) #(vi
9703 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
9706 eval PKG_CONFIG="$PKG_CONFIG"
9707 case ".$PKG_CONFIG" in #(vi
9709 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
9714 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
9717 { { echo "$as_me:9717: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
9718 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
9719 { (exit 1); exit 1; }; }
9725 echo "$as_me:9725: checking for X" >&5
9726 echo $ECHO_N "checking for X... $ECHO_C" >&6
9728 # Check whether --with-x or --without-x was given.
9729 if test "${with_x+set}" = set; then
9733 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
9734 if test "x$with_x" = xno; then
9735 # The user explicitly disabled X.
9738 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
9739 # Both variables are already set.
9742 if test "${ac_cv_have_x+set}" = set; then
9743 echo $ECHO_N "(cached) $ECHO_C" >&6
9745 # One or both of the vars are not set, and there is no cached value.
9746 ac_x_includes=no ac_x_libraries=no
9748 if mkdir conftest.dir; then
9750 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
9751 cat >Imakefile <<'EOF'
9753 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
9755 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
9756 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
9757 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
9758 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
9759 for ac_extension in a so sl dylib dll; do
9760 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
9761 test -f $ac_im_libdir/libX11.$ac_extension; then
9762 ac_im_usrlibdir=$ac_im_libdir; break
9765 # Screen out bogus values from the imake configuration. They are
9766 # bogus both because they are the default anyway, and because
9767 # using them would break gcc on systems where it needs fixed includes.
9768 case $ac_im_incroot in
9770 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
9772 case $ac_im_usrlibdir in
9774 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
9781 # Standard set of common directories for X headers.
9782 # Check X11 before X11Rn because it is often a symlink to the current release.
9794 /usr/local/X11/include
9795 /usr/local/X11R6/include
9796 /usr/local/X11R5/include
9797 /usr/local/X11R4/include
9799 /usr/local/include/X11
9800 /usr/local/include/X11R6
9801 /usr/local/include/X11R5
9802 /usr/local/include/X11R4
9806 /usr/XFree86/include/X11
9810 /usr/unsupported/include
9812 /usr/local/x11r5/include
9813 /usr/lpp/Xamples/include
9815 /usr/openwin/include
9816 /usr/openwin/share/include'
9818 if test "$ac_x_includes" = no; then
9819 # Guess where to find include files, by looking for Intrinsic.h.
9820 # First, try using that file with no special directory specified.
9821 cat >conftest.$ac_ext <<_ACEOF
9822 #line 9822 "configure"
9823 #include "confdefs.h"
9824 #include <X11/Intrinsic.h>
9826 if { (eval echo "$as_me:9826: \"$ac_cpp conftest.$ac_ext\"") >&5
9827 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9829 egrep -v '^ *\+' conftest.er1 >conftest.err
9831 cat conftest.err >&5
9832 echo "$as_me:9832: \$? = $ac_status" >&5
9833 (exit $ac_status); } >/dev/null; then
9834 if test -s conftest.err; then
9835 ac_cpp_err=$ac_c_preproc_warn_flag
9842 if test -z "$ac_cpp_err"; then
9843 # We can compile using X headers with no special include directory.
9846 echo "$as_me: failed program was:" >&5
9847 cat conftest.$ac_ext >&5
9848 for ac_dir in $ac_x_header_dirs; do
9849 if test -r "$ac_dir/X11/Intrinsic.h"; then
9850 ac_x_includes=$ac_dir
9855 rm -f conftest.err conftest.$ac_ext
9856 fi # $ac_x_includes = no
9858 if test "$ac_x_libraries" = no; then
9859 # Check for the libraries.
9860 # See if we find them without any special options.
9861 # Don't add to $LIBS permanently.
9864 cat >conftest.$ac_ext <<_ACEOF
9865 #line 9865 "configure"
9866 #include "confdefs.h"
9867 #include <X11/Intrinsic.h>
9876 rm -f conftest.$ac_objext conftest$ac_exeext
9877 if { (eval echo "$as_me:9877: \"$ac_link\"") >&5
9878 (eval $ac_link) 2>&5
9880 echo "$as_me:9880: \$? = $ac_status" >&5
9881 (exit $ac_status); } &&
9882 { ac_try='test -s conftest$ac_exeext'
9883 { (eval echo "$as_me:9883: \"$ac_try\"") >&5
9886 echo "$as_me:9886: \$? = $ac_status" >&5
9887 (exit $ac_status); }; }; then
9889 # We can link X programs with no special library path.
9892 echo "$as_me: failed program was:" >&5
9893 cat conftest.$ac_ext >&5
9895 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
9897 # Don't even attempt the hair of trying to link an X program!
9898 for ac_extension in a so sl dylib dll; do
9899 if test -r $ac_dir/libXt.$ac_extension; then
9900 ac_x_libraries=$ac_dir
9906 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9907 fi # $ac_x_libraries = no
9909 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
9910 # Didn't find X anywhere. Cache the known absence of X.
9911 ac_cv_have_x="have_x=no"
9913 # Record where we found X for the cache.
9914 ac_cv_have_x="have_x=yes \
9915 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
9920 eval "$ac_cv_have_x"
9923 if test "$have_x" != yes; then
9924 echo "$as_me:9924: result: $have_x" >&5
9925 echo "${ECHO_T}$have_x" >&6
9928 # If each of the values was on the command line, it overrides each guess.
9929 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
9930 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
9931 # Update the cache value to reflect the command line values.
9932 ac_cv_have_x="have_x=yes \
9933 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
9934 echo "$as_me:9934: result: libraries $x_libraries, headers $x_includes" >&5
9935 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
9938 if test "$no_x" = yes; then
9939 # Not all programs may use this symbol, but it does not hurt to define it.
9941 cat >>confdefs.h <<\EOF
9942 #define X_DISPLAY_MISSING 1
9945 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
9947 if test -n "$x_includes"; then
9948 X_CFLAGS="$X_CFLAGS -I$x_includes"
9951 # It would also be nice to do this for all -L options, not just this one.
9952 if test -n "$x_libraries"; then
9953 X_LIBS="$X_LIBS -L$x_libraries"
9954 # For Solaris; some versions of Sun CC require a space after -R and
9955 # others require no space. Words are not sufficient . . . .
9956 case `(uname -sr) 2>/dev/null` in
9958 echo "$as_me:9958: checking whether -R must be followed by a space" >&5
9959 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
9960 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
9961 cat >conftest.$ac_ext <<_ACEOF
9962 #line 9962 "configure"
9963 #include "confdefs.h"
9973 rm -f conftest.$ac_objext conftest$ac_exeext
9974 if { (eval echo "$as_me:9974: \"$ac_link\"") >&5
9975 (eval $ac_link) 2>&5
9977 echo "$as_me:9977: \$? = $ac_status" >&5
9978 (exit $ac_status); } &&
9979 { ac_try='test -s conftest$ac_exeext'
9980 { (eval echo "$as_me:9980: \"$ac_try\"") >&5
9983 echo "$as_me:9983: \$? = $ac_status" >&5
9984 (exit $ac_status); }; }; then
9987 echo "$as_me: failed program was:" >&5
9988 cat conftest.$ac_ext >&5
9991 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9992 if test $ac_R_nospace = yes; then
9993 echo "$as_me:9993: result: no" >&5
9994 echo "${ECHO_T}no" >&6
9995 X_LIBS="$X_LIBS -R$x_libraries"
9997 LIBS="$ac_xsave_LIBS -R $x_libraries"
9998 cat >conftest.$ac_ext <<_ACEOF
9999 #line 9999 "configure"
10000 #include "confdefs.h"
10010 rm -f conftest.$ac_objext conftest$ac_exeext
10011 if { (eval echo "$as_me:10011: \"$ac_link\"") >&5
10012 (eval $ac_link) 2>&5
10014 echo "$as_me:10014: \$? = $ac_status" >&5
10015 (exit $ac_status); } &&
10016 { ac_try='test -s conftest$ac_exeext'
10017 { (eval echo "$as_me:10017: \"$ac_try\"") >&5
10018 (eval $ac_try) 2>&5
10020 echo "$as_me:10020: \$? = $ac_status" >&5
10021 (exit $ac_status); }; }; then
10024 echo "$as_me: failed program was:" >&5
10025 cat conftest.$ac_ext >&5
10028 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10029 if test $ac_R_space = yes; then
10030 echo "$as_me:10030: result: yes" >&5
10031 echo "${ECHO_T}yes" >&6
10032 X_LIBS="$X_LIBS -R $x_libraries"
10034 echo "$as_me:10034: result: neither works" >&5
10035 echo "${ECHO_T}neither works" >&6
10038 LIBS=$ac_xsave_LIBS
10042 # Check for system-dependent libraries X programs must link with.
10043 # Do this before checking for the system-independent R6 libraries
10044 # (-lICE), since we may need -lsocket or whatever for X linking.
10046 if test "$ISC" = yes; then
10047 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
10049 # Martyn Johnson says this is needed for Ultrix, if the X
10050 # libraries were built with DECnet support. And Karl Berry says
10051 # the Alpha needs dnet_stub (dnet does not exist).
10052 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
10053 cat >conftest.$ac_ext <<_ACEOF
10054 #line 10054 "configure"
10055 #include "confdefs.h"
10057 /* Override any gcc2 internal prototype to avoid an error. */
10061 /* We use char because int might match the return type of a gcc2
10062 builtin and then its argument prototype would still apply. */
10063 char XOpenDisplay ();
10072 rm -f conftest.$ac_objext conftest$ac_exeext
10073 if { (eval echo "$as_me:10073: \"$ac_link\"") >&5
10074 (eval $ac_link) 2>&5
10076 echo "$as_me:10076: \$? = $ac_status" >&5
10077 (exit $ac_status); } &&
10078 { ac_try='test -s conftest$ac_exeext'
10079 { (eval echo "$as_me:10079: \"$ac_try\"") >&5
10080 (eval $ac_try) 2>&5
10082 echo "$as_me:10082: \$? = $ac_status" >&5
10083 (exit $ac_status); }; }; then
10086 echo "$as_me: failed program was:" >&5
10087 cat conftest.$ac_ext >&5
10088 echo "$as_me:10088: checking for dnet_ntoa in -ldnet" >&5
10089 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
10090 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10091 echo $ECHO_N "(cached) $ECHO_C" >&6
10093 ac_check_lib_save_LIBS=$LIBS
10094 LIBS="-ldnet $LIBS"
10095 cat >conftest.$ac_ext <<_ACEOF
10096 #line 10096 "configure"
10097 #include "confdefs.h"
10099 /* Override any gcc2 internal prototype to avoid an error. */
10103 /* We use char because int might match the return type of a gcc2
10104 builtin and then its argument prototype would still apply. */
10114 rm -f conftest.$ac_objext conftest$ac_exeext
10115 if { (eval echo "$as_me:10115: \"$ac_link\"") >&5
10116 (eval $ac_link) 2>&5
10118 echo "$as_me:10118: \$? = $ac_status" >&5
10119 (exit $ac_status); } &&
10120 { ac_try='test -s conftest$ac_exeext'
10121 { (eval echo "$as_me:10121: \"$ac_try\"") >&5
10122 (eval $ac_try) 2>&5
10124 echo "$as_me:10124: \$? = $ac_status" >&5
10125 (exit $ac_status); }; }; then
10126 ac_cv_lib_dnet_dnet_ntoa=yes
10128 echo "$as_me: failed program was:" >&5
10129 cat conftest.$ac_ext >&5
10130 ac_cv_lib_dnet_dnet_ntoa=no
10132 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10133 LIBS=$ac_check_lib_save_LIBS
10135 echo "$as_me:10135: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10136 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
10137 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
10138 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
10141 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
10142 echo "$as_me:10142: checking for dnet_ntoa in -ldnet_stub" >&5
10143 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
10144 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
10145 echo $ECHO_N "(cached) $ECHO_C" >&6
10147 ac_check_lib_save_LIBS=$LIBS
10148 LIBS="-ldnet_stub $LIBS"
10149 cat >conftest.$ac_ext <<_ACEOF
10150 #line 10150 "configure"
10151 #include "confdefs.h"
10153 /* Override any gcc2 internal prototype to avoid an error. */
10157 /* We use char because int might match the return type of a gcc2
10158 builtin and then its argument prototype would still apply. */
10168 rm -f conftest.$ac_objext conftest$ac_exeext
10169 if { (eval echo "$as_me:10169: \"$ac_link\"") >&5
10170 (eval $ac_link) 2>&5
10172 echo "$as_me:10172: \$? = $ac_status" >&5
10173 (exit $ac_status); } &&
10174 { ac_try='test -s conftest$ac_exeext'
10175 { (eval echo "$as_me:10175: \"$ac_try\"") >&5
10176 (eval $ac_try) 2>&5
10178 echo "$as_me:10178: \$? = $ac_status" >&5
10179 (exit $ac_status); }; }; then
10180 ac_cv_lib_dnet_stub_dnet_ntoa=yes
10182 echo "$as_me: failed program was:" >&5
10183 cat conftest.$ac_ext >&5
10184 ac_cv_lib_dnet_stub_dnet_ntoa=no
10186 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10187 LIBS=$ac_check_lib_save_LIBS
10189 echo "$as_me:10189: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
10190 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
10191 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
10192 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
10197 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10198 LIBS="$ac_xsave_LIBS"
10200 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
10201 # to get the SysV transport functions.
10202 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
10204 # The nsl library prevents programs from opening the X display
10205 # on Irix 5.2, according to T.E. Dickey.
10206 # The functions gethostbyname, getservbyname, and inet_addr are
10207 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
10208 echo "$as_me:10208: checking for gethostbyname" >&5
10209 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
10210 if test "${ac_cv_func_gethostbyname+set}" = set; then
10211 echo $ECHO_N "(cached) $ECHO_C" >&6
10213 cat >conftest.$ac_ext <<_ACEOF
10214 #line 10214 "configure"
10215 #include "confdefs.h"
10216 /* System header to define __stub macros and hopefully few prototypes,
10217 which can conflict with char gethostbyname (); below. */
10218 #include <assert.h>
10219 /* Override any gcc2 internal prototype to avoid an error. */
10223 /* We use char because int might match the return type of a gcc2
10224 builtin and then its argument prototype would still apply. */
10225 char gethostbyname ();
10231 /* The GNU C library defines this for functions which it implements
10232 to always fail with ENOSYS. Some functions are actually named
10233 something starting with __ and the normal name is an alias. */
10234 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
10244 rm -f conftest.$ac_objext conftest$ac_exeext
10245 if { (eval echo "$as_me:10245: \"$ac_link\"") >&5
10246 (eval $ac_link) 2>&5
10248 echo "$as_me:10248: \$? = $ac_status" >&5
10249 (exit $ac_status); } &&
10250 { ac_try='test -s conftest$ac_exeext'
10251 { (eval echo "$as_me:10251: \"$ac_try\"") >&5
10252 (eval $ac_try) 2>&5
10254 echo "$as_me:10254: \$? = $ac_status" >&5
10255 (exit $ac_status); }; }; then
10256 ac_cv_func_gethostbyname=yes
10258 echo "$as_me: failed program was:" >&5
10259 cat conftest.$ac_ext >&5
10260 ac_cv_func_gethostbyname=no
10262 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10264 echo "$as_me:10264: result: $ac_cv_func_gethostbyname" >&5
10265 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
10267 if test $ac_cv_func_gethostbyname = no; then
10268 echo "$as_me:10268: checking for gethostbyname in -lnsl" >&5
10269 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
10270 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
10271 echo $ECHO_N "(cached) $ECHO_C" >&6
10273 ac_check_lib_save_LIBS=$LIBS
10275 cat >conftest.$ac_ext <<_ACEOF
10276 #line 10276 "configure"
10277 #include "confdefs.h"
10279 /* Override any gcc2 internal prototype to avoid an error. */
10283 /* We use char because int might match the return type of a gcc2
10284 builtin and then its argument prototype would still apply. */
10285 char gethostbyname ();
10294 rm -f conftest.$ac_objext conftest$ac_exeext
10295 if { (eval echo "$as_me:10295: \"$ac_link\"") >&5
10296 (eval $ac_link) 2>&5
10298 echo "$as_me:10298: \$? = $ac_status" >&5
10299 (exit $ac_status); } &&
10300 { ac_try='test -s conftest$ac_exeext'
10301 { (eval echo "$as_me:10301: \"$ac_try\"") >&5
10302 (eval $ac_try) 2>&5
10304 echo "$as_me:10304: \$? = $ac_status" >&5
10305 (exit $ac_status); }; }; then
10306 ac_cv_lib_nsl_gethostbyname=yes
10308 echo "$as_me: failed program was:" >&5
10309 cat conftest.$ac_ext >&5
10310 ac_cv_lib_nsl_gethostbyname=no
10312 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10313 LIBS=$ac_check_lib_save_LIBS
10315 echo "$as_me:10315: result: $ac_cv_lib_nsl_gethostbyname" >&5
10316 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
10317 if test $ac_cv_lib_nsl_gethostbyname = yes; then
10318 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
10321 if test $ac_cv_lib_nsl_gethostbyname = no; then
10322 echo "$as_me:10322: checking for gethostbyname in -lbsd" >&5
10323 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
10324 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
10325 echo $ECHO_N "(cached) $ECHO_C" >&6
10327 ac_check_lib_save_LIBS=$LIBS
10329 cat >conftest.$ac_ext <<_ACEOF
10330 #line 10330 "configure"
10331 #include "confdefs.h"
10333 /* Override any gcc2 internal prototype to avoid an error. */
10337 /* We use char because int might match the return type of a gcc2
10338 builtin and then its argument prototype would still apply. */
10339 char gethostbyname ();
10348 rm -f conftest.$ac_objext conftest$ac_exeext
10349 if { (eval echo "$as_me:10349: \"$ac_link\"") >&5
10350 (eval $ac_link) 2>&5
10352 echo "$as_me:10352: \$? = $ac_status" >&5
10353 (exit $ac_status); } &&
10354 { ac_try='test -s conftest$ac_exeext'
10355 { (eval echo "$as_me:10355: \"$ac_try\"") >&5
10356 (eval $ac_try) 2>&5
10358 echo "$as_me:10358: \$? = $ac_status" >&5
10359 (exit $ac_status); }; }; then
10360 ac_cv_lib_bsd_gethostbyname=yes
10362 echo "$as_me: failed program was:" >&5
10363 cat conftest.$ac_ext >&5
10364 ac_cv_lib_bsd_gethostbyname=no
10366 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10367 LIBS=$ac_check_lib_save_LIBS
10369 echo "$as_me:10369: result: $ac_cv_lib_bsd_gethostbyname" >&5
10370 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
10371 if test $ac_cv_lib_bsd_gethostbyname = yes; then
10372 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
10378 # lieder@skyler.mavd.honeywell.com says without -lsocket,
10379 # socket/setsockopt and other routines are undefined under SCO ODT
10380 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
10381 # on later versions), says Simon Leinen: it contains gethostby*
10382 # variants that don't use the nameserver (or something). -lsocket
10383 # must be given before -lnsl if both are needed. We assume that
10384 # if connect needs -lnsl, so does gethostbyname.
10385 echo "$as_me:10385: checking for connect" >&5
10386 echo $ECHO_N "checking for connect... $ECHO_C" >&6
10387 if test "${ac_cv_func_connect+set}" = set; then
10388 echo $ECHO_N "(cached) $ECHO_C" >&6
10390 cat >conftest.$ac_ext <<_ACEOF
10391 #line 10391 "configure"
10392 #include "confdefs.h"
10393 /* System header to define __stub macros and hopefully few prototypes,
10394 which can conflict with char connect (); below. */
10395 #include <assert.h>
10396 /* Override any gcc2 internal prototype to avoid an error. */
10400 /* We use char because int might match the return type of a gcc2
10401 builtin and then its argument prototype would still apply. */
10408 /* The GNU C library defines this for functions which it implements
10409 to always fail with ENOSYS. Some functions are actually named
10410 something starting with __ and the normal name is an alias. */
10411 #if defined (__stub_connect) || defined (__stub___connect)
10421 rm -f conftest.$ac_objext conftest$ac_exeext
10422 if { (eval echo "$as_me:10422: \"$ac_link\"") >&5
10423 (eval $ac_link) 2>&5
10425 echo "$as_me:10425: \$? = $ac_status" >&5
10426 (exit $ac_status); } &&
10427 { ac_try='test -s conftest$ac_exeext'
10428 { (eval echo "$as_me:10428: \"$ac_try\"") >&5
10429 (eval $ac_try) 2>&5
10431 echo "$as_me:10431: \$? = $ac_status" >&5
10432 (exit $ac_status); }; }; then
10433 ac_cv_func_connect=yes
10435 echo "$as_me: failed program was:" >&5
10436 cat conftest.$ac_ext >&5
10437 ac_cv_func_connect=no
10439 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10441 echo "$as_me:10441: result: $ac_cv_func_connect" >&5
10442 echo "${ECHO_T}$ac_cv_func_connect" >&6
10444 if test $ac_cv_func_connect = no; then
10445 echo "$as_me:10445: checking for connect in -lsocket" >&5
10446 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
10447 if test "${ac_cv_lib_socket_connect+set}" = set; then
10448 echo $ECHO_N "(cached) $ECHO_C" >&6
10450 ac_check_lib_save_LIBS=$LIBS
10451 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
10452 cat >conftest.$ac_ext <<_ACEOF
10453 #line 10453 "configure"
10454 #include "confdefs.h"
10456 /* Override any gcc2 internal prototype to avoid an error. */
10460 /* We use char because int might match the return type of a gcc2
10461 builtin and then its argument prototype would still apply. */
10471 rm -f conftest.$ac_objext conftest$ac_exeext
10472 if { (eval echo "$as_me:10472: \"$ac_link\"") >&5
10473 (eval $ac_link) 2>&5
10475 echo "$as_me:10475: \$? = $ac_status" >&5
10476 (exit $ac_status); } &&
10477 { ac_try='test -s conftest$ac_exeext'
10478 { (eval echo "$as_me:10478: \"$ac_try\"") >&5
10479 (eval $ac_try) 2>&5
10481 echo "$as_me:10481: \$? = $ac_status" >&5
10482 (exit $ac_status); }; }; then
10483 ac_cv_lib_socket_connect=yes
10485 echo "$as_me: failed program was:" >&5
10486 cat conftest.$ac_ext >&5
10487 ac_cv_lib_socket_connect=no
10489 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10490 LIBS=$ac_check_lib_save_LIBS
10492 echo "$as_me:10492: result: $ac_cv_lib_socket_connect" >&5
10493 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
10494 if test $ac_cv_lib_socket_connect = yes; then
10495 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
10500 # Guillermo Gomez says -lposix is necessary on A/UX.
10501 echo "$as_me:10501: checking for remove" >&5
10502 echo $ECHO_N "checking for remove... $ECHO_C" >&6
10503 if test "${ac_cv_func_remove+set}" = set; then
10504 echo $ECHO_N "(cached) $ECHO_C" >&6
10506 cat >conftest.$ac_ext <<_ACEOF
10507 #line 10507 "configure"
10508 #include "confdefs.h"
10509 /* System header to define __stub macros and hopefully few prototypes,
10510 which can conflict with char remove (); below. */
10511 #include <assert.h>
10512 /* Override any gcc2 internal prototype to avoid an error. */
10516 /* We use char because int might match the return type of a gcc2
10517 builtin and then its argument prototype would still apply. */
10524 /* The GNU C library defines this for functions which it implements
10525 to always fail with ENOSYS. Some functions are actually named
10526 something starting with __ and the normal name is an alias. */
10527 #if defined (__stub_remove) || defined (__stub___remove)
10537 rm -f conftest.$ac_objext conftest$ac_exeext
10538 if { (eval echo "$as_me:10538: \"$ac_link\"") >&5
10539 (eval $ac_link) 2>&5
10541 echo "$as_me:10541: \$? = $ac_status" >&5
10542 (exit $ac_status); } &&
10543 { ac_try='test -s conftest$ac_exeext'
10544 { (eval echo "$as_me:10544: \"$ac_try\"") >&5
10545 (eval $ac_try) 2>&5
10547 echo "$as_me:10547: \$? = $ac_status" >&5
10548 (exit $ac_status); }; }; then
10549 ac_cv_func_remove=yes
10551 echo "$as_me: failed program was:" >&5
10552 cat conftest.$ac_ext >&5
10553 ac_cv_func_remove=no
10555 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10557 echo "$as_me:10557: result: $ac_cv_func_remove" >&5
10558 echo "${ECHO_T}$ac_cv_func_remove" >&6
10560 if test $ac_cv_func_remove = no; then
10561 echo "$as_me:10561: checking for remove in -lposix" >&5
10562 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
10563 if test "${ac_cv_lib_posix_remove+set}" = set; then
10564 echo $ECHO_N "(cached) $ECHO_C" >&6
10566 ac_check_lib_save_LIBS=$LIBS
10567 LIBS="-lposix $LIBS"
10568 cat >conftest.$ac_ext <<_ACEOF
10569 #line 10569 "configure"
10570 #include "confdefs.h"
10572 /* Override any gcc2 internal prototype to avoid an error. */
10576 /* We use char because int might match the return type of a gcc2
10577 builtin and then its argument prototype would still apply. */
10587 rm -f conftest.$ac_objext conftest$ac_exeext
10588 if { (eval echo "$as_me:10588: \"$ac_link\"") >&5
10589 (eval $ac_link) 2>&5
10591 echo "$as_me:10591: \$? = $ac_status" >&5
10592 (exit $ac_status); } &&
10593 { ac_try='test -s conftest$ac_exeext'
10594 { (eval echo "$as_me:10594: \"$ac_try\"") >&5
10595 (eval $ac_try) 2>&5
10597 echo "$as_me:10597: \$? = $ac_status" >&5
10598 (exit $ac_status); }; }; then
10599 ac_cv_lib_posix_remove=yes
10601 echo "$as_me: failed program was:" >&5
10602 cat conftest.$ac_ext >&5
10603 ac_cv_lib_posix_remove=no
10605 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10606 LIBS=$ac_check_lib_save_LIBS
10608 echo "$as_me:10608: result: $ac_cv_lib_posix_remove" >&5
10609 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
10610 if test $ac_cv_lib_posix_remove = yes; then
10611 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
10616 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
10617 echo "$as_me:10617: checking for shmat" >&5
10618 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
10619 if test "${ac_cv_func_shmat+set}" = set; then
10620 echo $ECHO_N "(cached) $ECHO_C" >&6
10622 cat >conftest.$ac_ext <<_ACEOF
10623 #line 10623 "configure"
10624 #include "confdefs.h"
10625 /* System header to define __stub macros and hopefully few prototypes,
10626 which can conflict with char shmat (); below. */
10627 #include <assert.h>
10628 /* Override any gcc2 internal prototype to avoid an error. */
10632 /* We use char because int might match the return type of a gcc2
10633 builtin and then its argument prototype would still apply. */
10640 /* The GNU C library defines this for functions which it implements
10641 to always fail with ENOSYS. Some functions are actually named
10642 something starting with __ and the normal name is an alias. */
10643 #if defined (__stub_shmat) || defined (__stub___shmat)
10653 rm -f conftest.$ac_objext conftest$ac_exeext
10654 if { (eval echo "$as_me:10654: \"$ac_link\"") >&5
10655 (eval $ac_link) 2>&5
10657 echo "$as_me:10657: \$? = $ac_status" >&5
10658 (exit $ac_status); } &&
10659 { ac_try='test -s conftest$ac_exeext'
10660 { (eval echo "$as_me:10660: \"$ac_try\"") >&5
10661 (eval $ac_try) 2>&5
10663 echo "$as_me:10663: \$? = $ac_status" >&5
10664 (exit $ac_status); }; }; then
10665 ac_cv_func_shmat=yes
10667 echo "$as_me: failed program was:" >&5
10668 cat conftest.$ac_ext >&5
10669 ac_cv_func_shmat=no
10671 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10673 echo "$as_me:10673: result: $ac_cv_func_shmat" >&5
10674 echo "${ECHO_T}$ac_cv_func_shmat" >&6
10676 if test $ac_cv_func_shmat = no; then
10677 echo "$as_me:10677: checking for shmat in -lipc" >&5
10678 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
10679 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
10680 echo $ECHO_N "(cached) $ECHO_C" >&6
10682 ac_check_lib_save_LIBS=$LIBS
10684 cat >conftest.$ac_ext <<_ACEOF
10685 #line 10685 "configure"
10686 #include "confdefs.h"
10688 /* Override any gcc2 internal prototype to avoid an error. */
10692 /* We use char because int might match the return type of a gcc2
10693 builtin and then its argument prototype would still apply. */
10703 rm -f conftest.$ac_objext conftest$ac_exeext
10704 if { (eval echo "$as_me:10704: \"$ac_link\"") >&5
10705 (eval $ac_link) 2>&5
10707 echo "$as_me:10707: \$? = $ac_status" >&5
10708 (exit $ac_status); } &&
10709 { ac_try='test -s conftest$ac_exeext'
10710 { (eval echo "$as_me:10710: \"$ac_try\"") >&5
10711 (eval $ac_try) 2>&5
10713 echo "$as_me:10713: \$? = $ac_status" >&5
10714 (exit $ac_status); }; }; then
10715 ac_cv_lib_ipc_shmat=yes
10717 echo "$as_me: failed program was:" >&5
10718 cat conftest.$ac_ext >&5
10719 ac_cv_lib_ipc_shmat=no
10721 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10722 LIBS=$ac_check_lib_save_LIBS
10724 echo "$as_me:10724: result: $ac_cv_lib_ipc_shmat" >&5
10725 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
10726 if test $ac_cv_lib_ipc_shmat = yes; then
10727 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
10733 # Check for libraries that X11R6 Xt/Xaw programs need.
10734 ac_save_LDFLAGS=$LDFLAGS
10735 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
10736 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
10737 # check for ICE first), but we must link in the order -lSM -lICE or
10738 # we get undefined symbols. So assume we have SM if we have ICE.
10739 # These have to be linked with before -lX11, unlike the other
10740 # libraries we check for below, so use a different variable.
10741 # John Interrante, Karl Berry
10742 echo "$as_me:10742: checking for IceConnectionNumber in -lICE" >&5
10743 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
10744 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
10745 echo $ECHO_N "(cached) $ECHO_C" >&6
10747 ac_check_lib_save_LIBS=$LIBS
10748 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
10749 cat >conftest.$ac_ext <<_ACEOF
10750 #line 10750 "configure"
10751 #include "confdefs.h"
10753 /* Override any gcc2 internal prototype to avoid an error. */
10757 /* We use char because int might match the return type of a gcc2
10758 builtin and then its argument prototype would still apply. */
10759 char IceConnectionNumber ();
10763 IceConnectionNumber ();
10768 rm -f conftest.$ac_objext conftest$ac_exeext
10769 if { (eval echo "$as_me:10769: \"$ac_link\"") >&5
10770 (eval $ac_link) 2>&5
10772 echo "$as_me:10772: \$? = $ac_status" >&5
10773 (exit $ac_status); } &&
10774 { ac_try='test -s conftest$ac_exeext'
10775 { (eval echo "$as_me:10775: \"$ac_try\"") >&5
10776 (eval $ac_try) 2>&5
10778 echo "$as_me:10778: \$? = $ac_status" >&5
10779 (exit $ac_status); }; }; then
10780 ac_cv_lib_ICE_IceConnectionNumber=yes
10782 echo "$as_me: failed program was:" >&5
10783 cat conftest.$ac_ext >&5
10784 ac_cv_lib_ICE_IceConnectionNumber=no
10786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10787 LIBS=$ac_check_lib_save_LIBS
10789 echo "$as_me:10789: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
10790 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
10791 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
10792 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
10795 LDFLAGS=$ac_save_LDFLAGS
10799 cf_x_athena=${cf_x_athena:-Xaw}
10801 echo "$as_me:10801: checking if you want to link with Xaw 3d library" >&5
10802 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
10805 # Check whether --with-Xaw3d or --without-Xaw3d was given.
10806 if test "${with_Xaw3d+set}" = set; then
10807 withval="$with_Xaw3d"
10810 if test "$withval" = yes ; then
10812 echo "$as_me:10812: result: yes" >&5
10813 echo "${ECHO_T}yes" >&6
10815 echo "$as_me:10815: result: no" >&5
10816 echo "${ECHO_T}no" >&6
10819 echo "$as_me:10819: checking if you want to link with neXT Athena library" >&5
10820 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
10823 # Check whether --with-neXtaw or --without-neXtaw was given.
10824 if test "${with_neXtaw+set}" = set; then
10825 withval="$with_neXtaw"
10828 if test "$withval" = yes ; then
10830 echo "$as_me:10830: result: yes" >&5
10831 echo "${ECHO_T}yes" >&6
10833 echo "$as_me:10833: result: no" >&5
10834 echo "${ECHO_T}no" >&6
10837 echo "$as_me:10837: checking if you want to link with Athena-Plus library" >&5
10838 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
10841 # Check whether --with-XawPlus or --without-XawPlus was given.
10842 if test "${with_XawPlus+set}" = set; then
10843 withval="$with_XawPlus"
10846 if test "$withval" = yes ; then
10847 cf_x_athena=XawPlus
10848 echo "$as_me:10848: result: yes" >&5
10849 echo "${ECHO_T}yes" >&6
10851 echo "$as_me:10851: result: no" >&5
10852 echo "${ECHO_T}no" >&6
10857 if test "$PKG_CONFIG" != none ; then
10859 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
10860 for cf_athena_pkg in \
10863 ${cf_x_athena}-devel \
10864 lib${cf_x_athena} \
10865 lib${cf_x_athena}-devel
10868 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
10869 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
10871 echo "${as_me:-configure}:10871: testing found package $cf_athena_pkg ..." 1>&5
10873 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
10874 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
10875 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
10877 echo "${as_me:-configure}:10877: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10879 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
10881 echo "${as_me:-configure}:10881: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
10886 cf_new_extra_cppflags=
10888 for cf_add_cflags in $cf_pkgconfig_incs
10890 case $cf_fix_cppflags in
10892 case $cf_add_cflags in #(vi
10893 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10894 case $cf_add_cflags in
10896 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10898 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10899 && test -z "${cf_tst_cflags}" \
10900 && cf_fix_cppflags=yes
10902 if test $cf_fix_cppflags = yes ; then
10903 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10905 elif test "${cf_tst_cflags}" = "\"'" ; then
10906 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10911 case "$CPPFLAGS" in
10912 *$cf_add_cflags) #(vi
10915 case $cf_add_cflags in #(vi
10917 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10919 CPPFLAGS=`echo "$CPPFLAGS" | \
10920 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
10921 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
10925 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10930 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10935 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10937 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10939 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10940 && test -z "${cf_tst_cflags}" \
10941 && cf_fix_cppflags=no
10946 if test -n "$cf_new_cflags" ; then
10948 CFLAGS="$CFLAGS $cf_new_cflags"
10951 if test -n "$cf_new_cppflags" ; then
10953 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10956 if test -n "$cf_new_extra_cppflags" ; then
10958 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10961 LIBS="$cf_pkgconfig_libs $LIBS"
10963 cf_x_athena_lib="$cf_pkgconfig_libs"
10965 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10967 cat >>confdefs.h <<EOF
10968 #define $cf_x_athena_LIBS 1
10971 echo "$as_me:10971: checking for usable $cf_x_athena/Xmu package" >&5
10972 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
10973 if test "${cf_cv_xaw_compat+set}" = set; then
10974 echo $ECHO_N "(cached) $ECHO_C" >&6
10977 cat >conftest.$ac_ext <<_ACEOF
10978 #line 10978 "configure"
10979 #include "confdefs.h"
10981 #include <X11/Xmu/CharSet.h>
10987 int check = XmuCompareISOLatin1("big", "small")
10993 rm -f conftest.$ac_objext conftest$ac_exeext
10994 if { (eval echo "$as_me:10994: \"$ac_link\"") >&5
10995 (eval $ac_link) 2>&5
10997 echo "$as_me:10997: \$? = $ac_status" >&5
10998 (exit $ac_status); } &&
10999 { ac_try='test -s conftest$ac_exeext'
11000 { (eval echo "$as_me:11000: \"$ac_try\"") >&5
11001 (eval $ac_try) 2>&5
11003 echo "$as_me:11003: \$? = $ac_status" >&5
11004 (exit $ac_status); }; }; then
11005 cf_cv_xaw_compat=yes
11007 echo "$as_me: failed program was:" >&5
11008 cat conftest.$ac_ext >&5
11009 cf_cv_xaw_compat=no
11011 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11013 echo "$as_me:11013: result: $cf_cv_xaw_compat" >&5
11014 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
11016 if test "$cf_cv_xaw_compat" = no
11018 # workaround for broken ".pc" files...
11019 case "$cf_x_athena_lib" in #(vi
11023 test -n "$verbose" && echo " work around broken package" 1>&6
11025 echo "${as_me:-configure}:11025: testing work around broken package ..." 1>&5
11027 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
11028 test -n "$verbose" && echo " found package xmu" 1>&6
11030 echo "${as_me:-configure}:11030: testing found package xmu ..." 1>&5
11032 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
11033 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
11034 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
11036 echo "${as_me:-configure}:11036: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11038 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
11040 echo "${as_me:-configure}:11040: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
11045 cf_new_extra_cppflags=
11047 for cf_add_cflags in $cf_pkgconfig_incs
11049 case $cf_fix_cppflags in
11051 case $cf_add_cflags in #(vi
11052 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11053 case $cf_add_cflags in
11055 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11057 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11058 && test -z "${cf_tst_cflags}" \
11059 && cf_fix_cppflags=yes
11061 if test $cf_fix_cppflags = yes ; then
11062 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11064 elif test "${cf_tst_cflags}" = "\"'" ; then
11065 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11070 case "$CPPFLAGS" in
11071 *$cf_add_cflags) #(vi
11074 case $cf_add_cflags in #(vi
11076 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11078 CPPFLAGS=`echo "$CPPFLAGS" | \
11079 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11080 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11084 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11089 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11094 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11096 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11098 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11099 && test -z "${cf_tst_cflags}" \
11100 && cf_fix_cppflags=no
11105 if test -n "$cf_new_cflags" ; then
11107 CFLAGS="$CFLAGS $cf_new_cflags"
11110 if test -n "$cf_new_cppflags" ; then
11112 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11115 if test -n "$cf_new_extra_cppflags" ; then
11117 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11120 LIBS="$cf_pkgconfig_libs $LIBS"
11124 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11126 echo "${as_me:-configure}:11126: testing ...before $LIBS ..." 1>&5
11128 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s,-lXt ,-lXt -lXmu ," -e 's/ / /g'`
11129 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11131 echo "${as_me:-configure}:11131: testing ...after $LIBS ..." 1>&5
11147 if test -z "$cf_x_athena_lib" ; then
11149 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
11150 test -n "$verbose" && echo " found package Xext" 1>&6
11152 echo "${as_me:-configure}:11152: testing found package Xext ..." 1>&5
11154 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
11155 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
11156 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
11158 echo "${as_me:-configure}:11158: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11160 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
11162 echo "${as_me:-configure}:11162: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
11167 cf_new_extra_cppflags=
11169 for cf_add_cflags in $cf_pkgconfig_incs
11171 case $cf_fix_cppflags in
11173 case $cf_add_cflags in #(vi
11174 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11175 case $cf_add_cflags in
11177 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11179 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11180 && test -z "${cf_tst_cflags}" \
11181 && cf_fix_cppflags=yes
11183 if test $cf_fix_cppflags = yes ; then
11184 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11186 elif test "${cf_tst_cflags}" = "\"'" ; then
11187 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11192 case "$CPPFLAGS" in
11193 *$cf_add_cflags) #(vi
11196 case $cf_add_cflags in #(vi
11198 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11200 CPPFLAGS=`echo "$CPPFLAGS" | \
11201 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11202 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11206 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11211 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11216 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11218 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11220 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11221 && test -z "${cf_tst_cflags}" \
11222 && cf_fix_cppflags=no
11227 if test -n "$cf_new_cflags" ; then
11229 CFLAGS="$CFLAGS $cf_new_cflags"
11232 if test -n "$cf_new_cppflags" ; then
11234 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11237 if test -n "$cf_new_extra_cppflags" ; then
11239 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11242 LIBS="$cf_pkgconfig_libs $LIBS"
11246 echo "$as_me:11246: checking for XextCreateExtension in -lXext" >&5
11247 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
11248 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
11249 echo $ECHO_N "(cached) $ECHO_C" >&6
11251 ac_check_lib_save_LIBS=$LIBS
11252 LIBS="-lXext $LIBS"
11253 cat >conftest.$ac_ext <<_ACEOF
11254 #line 11254 "configure"
11255 #include "confdefs.h"
11257 /* Override any gcc2 internal prototype to avoid an error. */
11261 /* We use char because int might match the return type of a gcc2
11262 builtin and then its argument prototype would still apply. */
11263 char XextCreateExtension ();
11267 XextCreateExtension ();
11272 rm -f conftest.$ac_objext conftest$ac_exeext
11273 if { (eval echo "$as_me:11273: \"$ac_link\"") >&5
11274 (eval $ac_link) 2>&5
11276 echo "$as_me:11276: \$? = $ac_status" >&5
11277 (exit $ac_status); } &&
11278 { ac_try='test -s conftest$ac_exeext'
11279 { (eval echo "$as_me:11279: \"$ac_try\"") >&5
11280 (eval $ac_try) 2>&5
11282 echo "$as_me:11282: \$? = $ac_status" >&5
11283 (exit $ac_status); }; }; then
11284 ac_cv_lib_Xext_XextCreateExtension=yes
11286 echo "$as_me: failed program was:" >&5
11287 cat conftest.$ac_ext >&5
11288 ac_cv_lib_Xext_XextCreateExtension=no
11290 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11291 LIBS=$ac_check_lib_save_LIBS
11293 echo "$as_me:11293: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
11294 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
11295 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
11296 LIBS="-lXext $LIBS"
11303 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11304 test -n "$verbose" && echo " found package xt" 1>&6
11306 echo "${as_me:-configure}:11306: testing found package xt ..." 1>&5
11308 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11309 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
11310 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11312 echo "${as_me:-configure}:11312: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11314 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11316 echo "${as_me:-configure}:11316: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11321 cf_new_extra_cppflags=
11323 for cf_add_cflags in $cf_pkgconfig_incs
11325 case $cf_fix_cppflags in
11327 case $cf_add_cflags in #(vi
11328 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11329 case $cf_add_cflags in
11331 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11333 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11334 && test -z "${cf_tst_cflags}" \
11335 && cf_fix_cppflags=yes
11337 if test $cf_fix_cppflags = yes ; then
11338 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11340 elif test "${cf_tst_cflags}" = "\"'" ; then
11341 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11346 case "$CPPFLAGS" in
11347 *$cf_add_cflags) #(vi
11350 case $cf_add_cflags in #(vi
11352 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11354 CPPFLAGS=`echo "$CPPFLAGS" | \
11355 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11356 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11360 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11365 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11370 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11372 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11374 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11375 && test -z "${cf_tst_cflags}" \
11376 && cf_fix_cppflags=no
11381 if test -n "$cf_new_cflags" ; then
11383 CFLAGS="$CFLAGS $cf_new_cflags"
11386 if test -n "$cf_new_cppflags" ; then
11388 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11391 if test -n "$cf_new_extra_cppflags" ; then
11393 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11396 LIBS="$cf_pkgconfig_libs $LIBS"
11398 case "x$LIBS" in #(vi
11402 # we have an "xt" package, but it may omit Xt's dependency on X11
11403 echo "$as_me:11403: checking for usable X dependency" >&5
11404 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11405 if test "${cf_cv_xt_x11_compat+set}" = set; then
11406 echo $ECHO_N "(cached) $ECHO_C" >&6
11409 cat >conftest.$ac_ext <<_ACEOF
11410 #line 11410 "configure"
11411 #include "confdefs.h"
11413 #include <X11/Xlib.h>
11419 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
11420 int rc2 = XClearWindow((Display*) 0, (Window) 0);
11421 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11422 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11428 rm -f conftest.$ac_objext conftest$ac_exeext
11429 if { (eval echo "$as_me:11429: \"$ac_link\"") >&5
11430 (eval $ac_link) 2>&5
11432 echo "$as_me:11432: \$? = $ac_status" >&5
11433 (exit $ac_status); } &&
11434 { ac_try='test -s conftest$ac_exeext'
11435 { (eval echo "$as_me:11435: \"$ac_try\"") >&5
11436 (eval $ac_try) 2>&5
11438 echo "$as_me:11438: \$? = $ac_status" >&5
11439 (exit $ac_status); }; }; then
11440 cf_cv_xt_x11_compat=yes
11442 echo "$as_me: failed program was:" >&5
11443 cat conftest.$ac_ext >&5
11444 cf_cv_xt_x11_compat=no
11446 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11448 echo "$as_me:11448: result: $cf_cv_xt_x11_compat" >&5
11449 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11450 if test "$cf_cv_xt_x11_compat" = no
11452 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
11454 echo "${as_me:-configure}:11454: testing work around broken X11 dependency ..." 1>&5
11456 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11458 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11459 test -n "$verbose" && echo " found package x11" 1>&6
11461 echo "${as_me:-configure}:11461: testing found package x11 ..." 1>&5
11463 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11464 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
11465 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11467 echo "${as_me:-configure}:11467: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11469 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11471 echo "${as_me:-configure}:11471: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11476 cf_new_extra_cppflags=
11478 for cf_add_cflags in $cf_pkgconfig_incs
11480 case $cf_fix_cppflags in
11482 case $cf_add_cflags in #(vi
11483 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11484 case $cf_add_cflags in
11486 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11488 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11489 && test -z "${cf_tst_cflags}" \
11490 && cf_fix_cppflags=yes
11492 if test $cf_fix_cppflags = yes ; then
11493 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11495 elif test "${cf_tst_cflags}" = "\"'" ; then
11496 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11501 case "$CPPFLAGS" in
11502 *$cf_add_cflags) #(vi
11505 case $cf_add_cflags in #(vi
11507 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11509 CPPFLAGS=`echo "$CPPFLAGS" | \
11510 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11511 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11515 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11520 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11525 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11527 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11529 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11530 && test -z "${cf_tst_cflags}" \
11531 && cf_fix_cppflags=no
11536 if test -n "$cf_new_cflags" ; then
11538 CFLAGS="$CFLAGS $cf_new_cflags"
11541 if test -n "$cf_new_cppflags" ; then
11543 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11546 if test -n "$cf_new_extra_cppflags" ; then
11548 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11551 LIBS="$cf_pkgconfig_libs $LIBS"
11555 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11557 echo "${as_me:-configure}:11557: testing ...before $LIBS ..." 1>&5
11559 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s,-lXt ,-lXt -lX11 ," -e 's/ / /g'`
11560 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11562 echo "${as_me:-configure}:11562: testing ...after $LIBS ..." 1>&5
11570 echo "$as_me:11570: checking for usable X Toolkit package" >&5
11571 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
11572 if test "${cf_cv_xt_ice_compat+set}" = set; then
11573 echo $ECHO_N "(cached) $ECHO_C" >&6
11576 cat >conftest.$ac_ext <<_ACEOF
11577 #line 11577 "configure"
11578 #include "confdefs.h"
11580 #include <X11/Shell.h>
11585 int num = IceConnectionNumber(0)
11591 rm -f conftest.$ac_objext conftest$ac_exeext
11592 if { (eval echo "$as_me:11592: \"$ac_link\"") >&5
11593 (eval $ac_link) 2>&5
11595 echo "$as_me:11595: \$? = $ac_status" >&5
11596 (exit $ac_status); } &&
11597 { ac_try='test -s conftest$ac_exeext'
11598 { (eval echo "$as_me:11598: \"$ac_try\"") >&5
11599 (eval $ac_try) 2>&5
11601 echo "$as_me:11601: \$? = $ac_status" >&5
11602 (exit $ac_status); }; }; then
11603 cf_cv_xt_ice_compat=yes
11605 echo "$as_me: failed program was:" >&5
11606 cat conftest.$ac_ext >&5
11607 cf_cv_xt_ice_compat=no
11609 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11611 echo "$as_me:11611: result: $cf_cv_xt_ice_compat" >&5
11612 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
11614 if test "$cf_cv_xt_ice_compat" = no
11616 # workaround for broken ".pc" files used for X Toolkit.
11617 case "x$X_PRE_LIBS" in #(vi
11619 case "x$LIBS" in #(vi
11623 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
11625 echo "${as_me:-configure}:11625: testing work around broken ICE dependency ..." 1>&5
11627 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11628 test -n "$verbose" && echo " found package ice" 1>&6
11630 echo "${as_me:-configure}:11630: testing found package ice ..." 1>&5
11632 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11633 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
11634 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11636 echo "${as_me:-configure}:11636: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11638 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
11640 echo "${as_me:-configure}:11640: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11645 cf_new_extra_cppflags=
11647 for cf_add_cflags in $cf_pkgconfig_incs
11649 case $cf_fix_cppflags in
11651 case $cf_add_cflags in #(vi
11652 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11653 case $cf_add_cflags in
11655 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11657 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11658 && test -z "${cf_tst_cflags}" \
11659 && cf_fix_cppflags=yes
11661 if test $cf_fix_cppflags = yes ; then
11662 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11664 elif test "${cf_tst_cflags}" = "\"'" ; then
11665 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11670 case "$CPPFLAGS" in
11671 *$cf_add_cflags) #(vi
11674 case $cf_add_cflags in #(vi
11676 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11678 CPPFLAGS=`echo "$CPPFLAGS" | \
11679 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11680 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11684 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11689 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11694 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11696 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11698 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11699 && test -z "${cf_tst_cflags}" \
11700 && cf_fix_cppflags=no
11705 if test -n "$cf_new_cflags" ; then
11707 CFLAGS="$CFLAGS $cf_new_cflags"
11710 if test -n "$cf_new_cppflags" ; then
11712 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11715 if test -n "$cf_new_extra_cppflags" ; then
11717 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11720 LIBS="$cf_pkgconfig_libs $LIBS"
11722 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
11723 test -n "$verbose" && echo " found package sm" 1>&6
11725 echo "${as_me:-configure}:11725: testing found package sm ..." 1>&5
11727 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
11728 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
11729 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11731 echo "${as_me:-configure}:11731: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11733 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
11735 echo "${as_me:-configure}:11735: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11740 cf_new_extra_cppflags=
11742 for cf_add_cflags in $cf_pkgconfig_incs
11744 case $cf_fix_cppflags in
11746 case $cf_add_cflags in #(vi
11747 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11748 case $cf_add_cflags in
11750 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11752 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11753 && test -z "${cf_tst_cflags}" \
11754 && cf_fix_cppflags=yes
11756 if test $cf_fix_cppflags = yes ; then
11757 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11759 elif test "${cf_tst_cflags}" = "\"'" ; then
11760 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11765 case "$CPPFLAGS" in
11766 *$cf_add_cflags) #(vi
11769 case $cf_add_cflags in #(vi
11771 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11773 CPPFLAGS=`echo "$CPPFLAGS" | \
11774 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11775 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11779 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11784 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11789 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11791 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11793 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11794 && test -z "${cf_tst_cflags}" \
11795 && cf_fix_cppflags=no
11800 if test -n "$cf_new_cflags" ; then
11802 CFLAGS="$CFLAGS $cf_new_cflags"
11805 if test -n "$cf_new_cppflags" ; then
11807 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11810 if test -n "$cf_new_extra_cppflags" ; then
11812 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11815 LIBS="$cf_pkgconfig_libs $LIBS"
11823 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11825 echo "${as_me:-configure}:11825: testing ...before $LIBS ..." 1>&5
11827 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s,-lXt ,-lXt $X_PRE_LIBS ," -e 's/ / /g'`
11828 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11830 echo "${as_me:-configure}:11830: testing ...after $LIBS ..." 1>&5
11844 LDFLAGS="$X_LIBS $LDFLAGS"
11846 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
11848 echo "${as_me:-configure}:11848: testing checking additions to CFLAGS ..." 1>&5
11850 cf_check_cflags="$CFLAGS"
11851 cf_check_cppflags="$CPPFLAGS"
11856 cf_new_extra_cppflags=
11858 for cf_add_cflags in $X_CFLAGS
11860 case $cf_fix_cppflags in
11862 case $cf_add_cflags in #(vi
11863 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11864 case $cf_add_cflags in
11866 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11868 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11869 && test -z "${cf_tst_cflags}" \
11870 && cf_fix_cppflags=yes
11872 if test $cf_fix_cppflags = yes ; then
11873 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11875 elif test "${cf_tst_cflags}" = "\"'" ; then
11876 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11881 case "$CPPFLAGS" in
11882 *$cf_add_cflags) #(vi
11885 case $cf_add_cflags in #(vi
11887 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11889 CPPFLAGS=`echo "$CPPFLAGS" | \
11890 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11891 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11895 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11900 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11905 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11907 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11909 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11910 && test -z "${cf_tst_cflags}" \
11911 && cf_fix_cppflags=no
11916 if test -n "$cf_new_cflags" ; then
11917 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
11919 echo "${as_me:-configure}:11919: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11921 CFLAGS="$CFLAGS $cf_new_cflags"
11924 if test -n "$cf_new_cppflags" ; then
11925 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11927 echo "${as_me:-configure}:11927: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11929 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11932 if test -n "$cf_new_extra_cppflags" ; then
11933 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11935 echo "${as_me:-configure}:11935: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11937 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11940 if test "$cf_check_cflags" != "$CFLAGS" ; then
11941 cat >conftest.$ac_ext <<_ACEOF
11942 #line 11942 "configure"
11943 #include "confdefs.h"
11948 printf("Hello world");
11953 rm -f conftest.$ac_objext conftest$ac_exeext
11954 if { (eval echo "$as_me:11954: \"$ac_link\"") >&5
11955 (eval $ac_link) 2>&5
11957 echo "$as_me:11957: \$? = $ac_status" >&5
11958 (exit $ac_status); } &&
11959 { ac_try='test -s conftest$ac_exeext'
11960 { (eval echo "$as_me:11960: \"$ac_try\"") >&5
11961 (eval $ac_try) 2>&5
11963 echo "$as_me:11963: \$? = $ac_status" >&5
11964 (exit $ac_status); }; }; then
11967 echo "$as_me: failed program was:" >&5
11968 cat conftest.$ac_ext >&5
11969 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
11971 echo "${as_me:-configure}:11971: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
11973 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
11974 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
11976 echo "${as_me:-configure}:11976: testing but keeping change to \$CPPFLAGS ..." 1>&5
11979 CFLAGS="$cf_check_flags"
11981 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11984 echo "$as_me:11984: checking for XOpenDisplay" >&5
11985 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
11986 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
11987 echo $ECHO_N "(cached) $ECHO_C" >&6
11989 cat >conftest.$ac_ext <<_ACEOF
11990 #line 11990 "configure"
11991 #include "confdefs.h"
11992 /* System header to define __stub macros and hopefully few prototypes,
11993 which can conflict with char XOpenDisplay (); below. */
11994 #include <assert.h>
11995 /* Override any gcc2 internal prototype to avoid an error. */
11999 /* We use char because int might match the return type of a gcc2
12000 builtin and then its argument prototype would still apply. */
12001 char XOpenDisplay ();
12007 /* The GNU C library defines this for functions which it implements
12008 to always fail with ENOSYS. Some functions are actually named
12009 something starting with __ and the normal name is an alias. */
12010 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
12020 rm -f conftest.$ac_objext conftest$ac_exeext
12021 if { (eval echo "$as_me:12021: \"$ac_link\"") >&5
12022 (eval $ac_link) 2>&5
12024 echo "$as_me:12024: \$? = $ac_status" >&5
12025 (exit $ac_status); } &&
12026 { ac_try='test -s conftest$ac_exeext'
12027 { (eval echo "$as_me:12027: \"$ac_try\"") >&5
12028 (eval $ac_try) 2>&5
12030 echo "$as_me:12030: \$? = $ac_status" >&5
12031 (exit $ac_status); }; }; then
12032 ac_cv_func_XOpenDisplay=yes
12034 echo "$as_me: failed program was:" >&5
12035 cat conftest.$ac_ext >&5
12036 ac_cv_func_XOpenDisplay=no
12038 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12040 echo "$as_me:12040: result: $ac_cv_func_XOpenDisplay" >&5
12041 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
12042 if test $ac_cv_func_XOpenDisplay = yes; then
12046 echo "$as_me:12046: checking for XOpenDisplay in -lX11" >&5
12047 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12048 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12049 echo $ECHO_N "(cached) $ECHO_C" >&6
12051 ac_check_lib_save_LIBS=$LIBS
12052 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12053 cat >conftest.$ac_ext <<_ACEOF
12054 #line 12054 "configure"
12055 #include "confdefs.h"
12057 /* Override any gcc2 internal prototype to avoid an error. */
12061 /* We use char because int might match the return type of a gcc2
12062 builtin and then its argument prototype would still apply. */
12063 char XOpenDisplay ();
12072 rm -f conftest.$ac_objext conftest$ac_exeext
12073 if { (eval echo "$as_me:12073: \"$ac_link\"") >&5
12074 (eval $ac_link) 2>&5
12076 echo "$as_me:12076: \$? = $ac_status" >&5
12077 (exit $ac_status); } &&
12078 { ac_try='test -s conftest$ac_exeext'
12079 { (eval echo "$as_me:12079: \"$ac_try\"") >&5
12080 (eval $ac_try) 2>&5
12082 echo "$as_me:12082: \$? = $ac_status" >&5
12083 (exit $ac_status); }; }; then
12084 ac_cv_lib_X11_XOpenDisplay=yes
12086 echo "$as_me: failed program was:" >&5
12087 cat conftest.$ac_ext >&5
12088 ac_cv_lib_X11_XOpenDisplay=no
12090 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12091 LIBS=$ac_check_lib_save_LIBS
12093 echo "$as_me:12093: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12094 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12095 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12101 echo "$as_me:12101: checking for XtAppInitialize" >&5
12102 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
12103 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
12104 echo $ECHO_N "(cached) $ECHO_C" >&6
12106 cat >conftest.$ac_ext <<_ACEOF
12107 #line 12107 "configure"
12108 #include "confdefs.h"
12109 /* System header to define __stub macros and hopefully few prototypes,
12110 which can conflict with char XtAppInitialize (); below. */
12111 #include <assert.h>
12112 /* Override any gcc2 internal prototype to avoid an error. */
12116 /* We use char because int might match the return type of a gcc2
12117 builtin and then its argument prototype would still apply. */
12118 char XtAppInitialize ();
12124 /* The GNU C library defines this for functions which it implements
12125 to always fail with ENOSYS. Some functions are actually named
12126 something starting with __ and the normal name is an alias. */
12127 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
12130 f = XtAppInitialize;
12137 rm -f conftest.$ac_objext conftest$ac_exeext
12138 if { (eval echo "$as_me:12138: \"$ac_link\"") >&5
12139 (eval $ac_link) 2>&5
12141 echo "$as_me:12141: \$? = $ac_status" >&5
12142 (exit $ac_status); } &&
12143 { ac_try='test -s conftest$ac_exeext'
12144 { (eval echo "$as_me:12144: \"$ac_try\"") >&5
12145 (eval $ac_try) 2>&5
12147 echo "$as_me:12147: \$? = $ac_status" >&5
12148 (exit $ac_status); }; }; then
12149 ac_cv_func_XtAppInitialize=yes
12151 echo "$as_me: failed program was:" >&5
12152 cat conftest.$ac_ext >&5
12153 ac_cv_func_XtAppInitialize=no
12155 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12157 echo "$as_me:12157: result: $ac_cv_func_XtAppInitialize" >&5
12158 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
12159 if test $ac_cv_func_XtAppInitialize = yes; then
12163 echo "$as_me:12163: checking for XtAppInitialize in -lXt" >&5
12164 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
12165 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
12166 echo $ECHO_N "(cached) $ECHO_C" >&6
12168 ac_check_lib_save_LIBS=$LIBS
12169 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12170 cat >conftest.$ac_ext <<_ACEOF
12171 #line 12171 "configure"
12172 #include "confdefs.h"
12174 /* Override any gcc2 internal prototype to avoid an error. */
12178 /* We use char because int might match the return type of a gcc2
12179 builtin and then its argument prototype would still apply. */
12180 char XtAppInitialize ();
12184 XtAppInitialize ();
12189 rm -f conftest.$ac_objext conftest$ac_exeext
12190 if { (eval echo "$as_me:12190: \"$ac_link\"") >&5
12191 (eval $ac_link) 2>&5
12193 echo "$as_me:12193: \$? = $ac_status" >&5
12194 (exit $ac_status); } &&
12195 { ac_try='test -s conftest$ac_exeext'
12196 { (eval echo "$as_me:12196: \"$ac_try\"") >&5
12197 (eval $ac_try) 2>&5
12199 echo "$as_me:12199: \$? = $ac_status" >&5
12200 (exit $ac_status); }; }; then
12201 ac_cv_lib_Xt_XtAppInitialize=yes
12203 echo "$as_me: failed program was:" >&5
12204 cat conftest.$ac_ext >&5
12205 ac_cv_lib_Xt_XtAppInitialize=no
12207 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12208 LIBS=$ac_check_lib_save_LIBS
12210 echo "$as_me:12210: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
12211 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
12212 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
12213 cat >>confdefs.h <<\EOF
12214 #define HAVE_LIBXT 1
12218 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
12225 if test $cf_have_X_LIBS = no ; then
12226 { echo "$as_me:12226: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12227 test program. You will have to check and add the proper libraries by hand
12229 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12230 test program. You will have to check and add the proper libraries by hand
12231 to makefile." >&2;}
12234 cf_x_athena_root=$cf_x_athena
12237 for cf_path in default \
12238 /usr/contrib/X11R6 \
12239 /usr/contrib/X11R5 \
12243 if test -z "$cf_x_athena_inc" ; then
12244 cf_save="$CPPFLAGS"
12245 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
12246 if test $cf_path != default ; then
12247 CPPFLAGS="$cf_save -I$cf_path/include"
12248 echo "$as_me:12248: checking for $cf_test in $cf_path" >&5
12249 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
12251 echo "$as_me:12251: checking for $cf_test" >&5
12252 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
12254 cat >conftest.$ac_ext <<_ACEOF
12255 #line 12255 "configure"
12256 #include "confdefs.h"
12258 #include <X11/Intrinsic.h>
12259 #include <$cf_test>
12268 rm -f conftest.$ac_objext
12269 if { (eval echo "$as_me:12269: \"$ac_compile\"") >&5
12270 (eval $ac_compile) 2>&5
12272 echo "$as_me:12272: \$? = $ac_status" >&5
12273 (exit $ac_status); } &&
12274 { ac_try='test -s conftest.$ac_objext'
12275 { (eval echo "$as_me:12275: \"$ac_try\"") >&5
12276 (eval $ac_try) 2>&5
12278 echo "$as_me:12278: \$? = $ac_status" >&5
12279 (exit $ac_status); }; }; then
12282 echo "$as_me: failed program was:" >&5
12283 cat conftest.$ac_ext >&5
12286 rm -f conftest.$ac_objext conftest.$ac_ext
12287 echo "$as_me:12287: result: $cf_result" >&5
12288 echo "${ECHO_T}$cf_result" >&6
12289 if test "$cf_result" = yes ; then
12290 cf_x_athena_inc=$cf_path
12293 CPPFLAGS="$cf_save"
12298 if test -z "$cf_x_athena_inc" ; then
12299 { echo "$as_me:12299: WARNING: Unable to successfully find Athena header files with test program" >&5
12300 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
12301 elif test "$cf_x_athena_inc" != default ; then
12302 CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
12305 cf_x_athena_root=$cf_x_athena
12308 for cf_path in default \
12309 /usr/contrib/X11R6 \
12310 /usr/contrib/X11R5 \
12315 ${cf_x_athena_root} \
12316 ${cf_x_athena_root}7 \
12317 ${cf_x_athena_root}6
12320 "-l$cf_lib -lXmu" \
12321 "-l$cf_lib -lXpm -lXmu" \
12322 "-l${cf_lib}_s -lXmu_s"
12324 if test -z "$cf_x_athena_lib" ; then
12326 cf_test=XawSimpleMenuAddGlobalActions
12327 if test $cf_path != default ; then
12328 LIBS="-L$cf_path/lib $cf_libs $LIBS"
12329 echo "$as_me:12329: checking for $cf_libs in $cf_path" >&5
12330 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
12332 LIBS="$cf_libs $LIBS"
12333 echo "$as_me:12333: checking for $cf_test in $cf_libs" >&5
12334 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
12336 cat >conftest.$ac_ext <<_ACEOF
12337 #line 12337 "configure"
12338 #include "confdefs.h"
12340 #include <X11/Intrinsic.h>
12341 #include <X11/$cf_x_athena_root/SimpleMenu.h>
12347 $cf_test((XtAppContext) 0)
12352 rm -f conftest.$ac_objext conftest$ac_exeext
12353 if { (eval echo "$as_me:12353: \"$ac_link\"") >&5
12354 (eval $ac_link) 2>&5
12356 echo "$as_me:12356: \$? = $ac_status" >&5
12357 (exit $ac_status); } &&
12358 { ac_try='test -s conftest$ac_exeext'
12359 { (eval echo "$as_me:12359: \"$ac_try\"") >&5
12360 (eval $ac_try) 2>&5
12362 echo "$as_me:12362: \$? = $ac_status" >&5
12363 (exit $ac_status); }; }; then
12366 echo "$as_me: failed program was:" >&5
12367 cat conftest.$ac_ext >&5
12370 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12371 echo "$as_me:12371: result: $cf_result" >&5
12372 echo "${ECHO_T}$cf_result" >&6
12373 if test "$cf_result" = yes ; then
12374 cf_x_athena_lib="$cf_libs"
12380 test -n "$cf_x_athena_lib" && break
12384 if test -z "$cf_x_athena_lib" ; then
12385 { { echo "$as_me:12385: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
12386 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
12387 { (exit 1); exit 1; }; }
12390 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12392 cat >>confdefs.h <<EOF
12393 #define $cf_x_athena_LIBS 1
12398 for ac_prog in xcurses-config
12400 # Extract the first word of "$ac_prog", so it can be a program name with args.
12401 set dummy $ac_prog; ac_word=$2
12402 echo "$as_me:12402: checking for $ac_word" >&5
12403 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12404 if test "${ac_cv_path_XCURSES_CONFIG+set}" = set; then
12405 echo $ECHO_N "(cached) $ECHO_C" >&6
12407 case $XCURSES_CONFIG in
12409 ac_cv_path_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test with a path.
12412 ac_save_IFS=$IFS; IFS=$ac_path_separator
12414 for ac_dir in $ac_dummy; do
12416 test -z "$ac_dir" && ac_dir=.
12417 if $as_executable_p "$ac_dir/$ac_word"; then
12418 ac_cv_path_XCURSES_CONFIG="$ac_dir/$ac_word"
12419 echo "$as_me:12419: found $ac_dir/$ac_word" >&5
12427 XCURSES_CONFIG=$ac_cv_path_XCURSES_CONFIG
12429 if test -n "$XCURSES_CONFIG"; then
12430 echo "$as_me:12430: result: $XCURSES_CONFIG" >&5
12431 echo "${ECHO_T}$XCURSES_CONFIG" >&6
12433 echo "$as_me:12433: result: no" >&5
12434 echo "${ECHO_T}no" >&6
12437 test -n "$XCURSES_CONFIG" && break
12439 test -n "$XCURSES_CONFIG" || XCURSES_CONFIG="none"
12441 if test "$XCURSES_CONFIG" != none ; then
12443 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
12444 LIBS="`$XCURSES_CONFIG --libs` $LIBS"
12446 cf_cv_lib_XCurses=yes
12450 LDFLAGS="$LDFLAGS $X_LIBS"
12452 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
12454 echo "${as_me:-configure}:12454: testing checking additions to CFLAGS ..." 1>&5
12456 cf_check_cflags="$CFLAGS"
12457 cf_check_cppflags="$CPPFLAGS"
12462 cf_new_extra_cppflags=
12464 for cf_add_cflags in $X_CFLAGS
12466 case $cf_fix_cppflags in
12468 case $cf_add_cflags in #(vi
12469 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12470 case $cf_add_cflags in
12472 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12474 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12475 && test -z "${cf_tst_cflags}" \
12476 && cf_fix_cppflags=yes
12478 if test $cf_fix_cppflags = yes ; then
12479 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12481 elif test "${cf_tst_cflags}" = "\"'" ; then
12482 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12487 case "$CPPFLAGS" in
12488 *$cf_add_cflags) #(vi
12491 case $cf_add_cflags in #(vi
12493 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12495 CPPFLAGS=`echo "$CPPFLAGS" | \
12496 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12497 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12501 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12506 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12511 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12513 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12515 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12516 && test -z "${cf_tst_cflags}" \
12517 && cf_fix_cppflags=no
12522 if test -n "$cf_new_cflags" ; then
12523 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12525 echo "${as_me:-configure}:12525: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12527 CFLAGS="$CFLAGS $cf_new_cflags"
12530 if test -n "$cf_new_cppflags" ; then
12531 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12533 echo "${as_me:-configure}:12533: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12535 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12538 if test -n "$cf_new_extra_cppflags" ; then
12539 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12541 echo "${as_me:-configure}:12541: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12543 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12546 if test "$cf_check_cflags" != "$CFLAGS" ; then
12547 cat >conftest.$ac_ext <<_ACEOF
12548 #line 12548 "configure"
12549 #include "confdefs.h"
12554 printf("Hello world");
12559 rm -f conftest.$ac_objext conftest$ac_exeext
12560 if { (eval echo "$as_me:12560: \"$ac_link\"") >&5
12561 (eval $ac_link) 2>&5
12563 echo "$as_me:12563: \$? = $ac_status" >&5
12564 (exit $ac_status); } &&
12565 { ac_try='test -s conftest$ac_exeext'
12566 { (eval echo "$as_me:12566: \"$ac_try\"") >&5
12567 (eval $ac_try) 2>&5
12569 echo "$as_me:12569: \$? = $ac_status" >&5
12570 (exit $ac_status); }; }; then
12573 echo "$as_me: failed program was:" >&5
12574 cat conftest.$ac_ext >&5
12575 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
12577 echo "${as_me:-configure}:12577: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
12579 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
12580 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
12582 echo "${as_me:-configure}:12582: testing but keeping change to \$CPPFLAGS ..." 1>&5
12585 CFLAGS="$cf_check_flags"
12587 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12590 echo "$as_me:12590: checking for XOpenDisplay in -lX11" >&5
12591 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12592 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12593 echo $ECHO_N "(cached) $ECHO_C" >&6
12595 ac_check_lib_save_LIBS=$LIBS
12596 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12597 cat >conftest.$ac_ext <<_ACEOF
12598 #line 12598 "configure"
12599 #include "confdefs.h"
12601 /* Override any gcc2 internal prototype to avoid an error. */
12605 /* We use char because int might match the return type of a gcc2
12606 builtin and then its argument prototype would still apply. */
12607 char XOpenDisplay ();
12616 rm -f conftest.$ac_objext conftest$ac_exeext
12617 if { (eval echo "$as_me:12617: \"$ac_link\"") >&5
12618 (eval $ac_link) 2>&5
12620 echo "$as_me:12620: \$? = $ac_status" >&5
12621 (exit $ac_status); } &&
12622 { ac_try='test -s conftest$ac_exeext'
12623 { (eval echo "$as_me:12623: \"$ac_try\"") >&5
12624 (eval $ac_try) 2>&5
12626 echo "$as_me:12626: \$? = $ac_status" >&5
12627 (exit $ac_status); }; }; then
12628 ac_cv_lib_X11_XOpenDisplay=yes
12630 echo "$as_me: failed program was:" >&5
12631 cat conftest.$ac_ext >&5
12632 ac_cv_lib_X11_XOpenDisplay=no
12634 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12635 LIBS=$ac_check_lib_save_LIBS
12637 echo "$as_me:12637: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12638 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12639 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12643 echo "$as_me:12643: checking for XCurses library" >&5
12644 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
12645 if test "${cf_cv_lib_XCurses+set}" = set; then
12646 echo $ECHO_N "(cached) $ECHO_C" >&6
12649 LIBS="-lXCurses $LIBS"
12650 cat >conftest.$ac_ext <<_ACEOF
12651 #line 12651 "configure"
12652 #include "confdefs.h"
12654 #include <xcurses.h>
12655 char *XCursesProgramName = "test";
12665 rm -f conftest.$ac_objext conftest$ac_exeext
12666 if { (eval echo "$as_me:12666: \"$ac_link\"") >&5
12667 (eval $ac_link) 2>&5
12669 echo "$as_me:12669: \$? = $ac_status" >&5
12670 (exit $ac_status); } &&
12671 { ac_try='test -s conftest$ac_exeext'
12672 { (eval echo "$as_me:12672: \"$ac_try\"") >&5
12673 (eval $ac_try) 2>&5
12675 echo "$as_me:12675: \$? = $ac_status" >&5
12676 (exit $ac_status); }; }; then
12677 cf_cv_lib_XCurses=yes
12679 echo "$as_me: failed program was:" >&5
12680 cat conftest.$ac_ext >&5
12681 cf_cv_lib_XCurses=no
12683 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12686 echo "$as_me:12686: result: $cf_cv_lib_XCurses" >&5
12687 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
12691 if test $cf_cv_lib_XCurses = yes ; then
12692 cat >>confdefs.h <<\EOF
12696 cat >>confdefs.h <<\EOF
12700 echo "$as_me:12700: checking for xcurses.h" >&5
12701 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
12702 if test "${ac_cv_header_xcurses_h+set}" = set; then
12703 echo $ECHO_N "(cached) $ECHO_C" >&6
12705 cat >conftest.$ac_ext <<_ACEOF
12706 #line 12706 "configure"
12707 #include "confdefs.h"
12708 #include <xcurses.h>
12710 if { (eval echo "$as_me:12710: \"$ac_cpp conftest.$ac_ext\"") >&5
12711 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12713 egrep -v '^ *\+' conftest.er1 >conftest.err
12715 cat conftest.err >&5
12716 echo "$as_me:12716: \$? = $ac_status" >&5
12717 (exit $ac_status); } >/dev/null; then
12718 if test -s conftest.err; then
12719 ac_cpp_err=$ac_c_preproc_warn_flag
12726 if test -z "$ac_cpp_err"; then
12727 ac_cv_header_xcurses_h=yes
12729 echo "$as_me: failed program was:" >&5
12730 cat conftest.$ac_ext >&5
12731 ac_cv_header_xcurses_h=no
12733 rm -f conftest.err conftest.$ac_ext
12735 echo "$as_me:12735: result: $ac_cv_header_xcurses_h" >&5
12736 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
12737 if test $ac_cv_header_xcurses_h = yes; then
12738 cat >>confdefs.h <<\EOF
12739 #define HAVE_XCURSES 1
12745 { { echo "$as_me:12745: error: Cannot link with XCurses" >&5
12746 echo "$as_me: error: Cannot link with XCurses" >&2;}
12747 { (exit 1); exit 1; }; }
12753 case $cf_cv_screen in #(vi
12757 # look for curses-related libraries
12759 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
12760 echo "$as_me:12760: checking for new_panel in -lpanel$cf_cv_libtype" >&5
12761 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
12762 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12763 echo $ECHO_N "(cached) $ECHO_C" >&6
12765 ac_check_lib_save_LIBS=$LIBS
12766 LIBS="-lpanel$cf_cv_libtype $LIBS"
12767 cat >conftest.$ac_ext <<_ACEOF
12768 #line 12768 "configure"
12769 #include "confdefs.h"
12771 /* Override any gcc2 internal prototype to avoid an error. */
12775 /* We use char because int might match the return type of a gcc2
12776 builtin and then its argument prototype would still apply. */
12786 rm -f conftest.$ac_objext conftest$ac_exeext
12787 if { (eval echo "$as_me:12787: \"$ac_link\"") >&5
12788 (eval $ac_link) 2>&5
12790 echo "$as_me:12790: \$? = $ac_status" >&5
12791 (exit $ac_status); } &&
12792 { ac_try='test -s conftest$ac_exeext'
12793 { (eval echo "$as_me:12793: \"$ac_try\"") >&5
12794 (eval $ac_try) 2>&5
12796 echo "$as_me:12796: \$? = $ac_status" >&5
12797 (exit $ac_status); }; }; then
12798 eval "$as_ac_Lib=yes"
12800 echo "$as_me: failed program was:" >&5
12801 cat conftest.$ac_ext >&5
12802 eval "$as_ac_Lib=no"
12804 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12805 LIBS=$ac_check_lib_save_LIBS
12807 echo "$as_me:12807: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12808 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12809 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12810 cat >>confdefs.h <<EOF
12811 #define `echo "HAVE_LIBpanel$cf_cv_libtype" | $as_tr_cpp` 1
12814 LIBS="-lpanel$cf_cv_libtype $LIBS"
12818 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
12819 echo "$as_me:12819: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
12820 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
12821 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12822 echo $ECHO_N "(cached) $ECHO_C" >&6
12824 ac_check_lib_save_LIBS=$LIBS
12825 LIBS="-lmenu$cf_cv_libtype $LIBS"
12826 cat >conftest.$ac_ext <<_ACEOF
12827 #line 12827 "configure"
12828 #include "confdefs.h"
12830 /* Override any gcc2 internal prototype to avoid an error. */
12834 /* We use char because int might match the return type of a gcc2
12835 builtin and then its argument prototype would still apply. */
12836 char menu_driver ();
12845 rm -f conftest.$ac_objext conftest$ac_exeext
12846 if { (eval echo "$as_me:12846: \"$ac_link\"") >&5
12847 (eval $ac_link) 2>&5
12849 echo "$as_me:12849: \$? = $ac_status" >&5
12850 (exit $ac_status); } &&
12851 { ac_try='test -s conftest$ac_exeext'
12852 { (eval echo "$as_me:12852: \"$ac_try\"") >&5
12853 (eval $ac_try) 2>&5
12855 echo "$as_me:12855: \$? = $ac_status" >&5
12856 (exit $ac_status); }; }; then
12857 eval "$as_ac_Lib=yes"
12859 echo "$as_me: failed program was:" >&5
12860 cat conftest.$ac_ext >&5
12861 eval "$as_ac_Lib=no"
12863 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12864 LIBS=$ac_check_lib_save_LIBS
12866 echo "$as_me:12866: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12867 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12868 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12869 cat >>confdefs.h <<EOF
12870 #define `echo "HAVE_LIBmenu$cf_cv_libtype" | $as_tr_cpp` 1
12873 LIBS="-lmenu$cf_cv_libtype $LIBS"
12877 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
12878 echo "$as_me:12878: checking for form_driver in -lform$cf_cv_libtype" >&5
12879 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
12880 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12881 echo $ECHO_N "(cached) $ECHO_C" >&6
12883 ac_check_lib_save_LIBS=$LIBS
12884 LIBS="-lform$cf_cv_libtype $LIBS"
12885 cat >conftest.$ac_ext <<_ACEOF
12886 #line 12886 "configure"
12887 #include "confdefs.h"
12889 /* Override any gcc2 internal prototype to avoid an error. */
12893 /* We use char because int might match the return type of a gcc2
12894 builtin and then its argument prototype would still apply. */
12895 char form_driver ();
12904 rm -f conftest.$ac_objext conftest$ac_exeext
12905 if { (eval echo "$as_me:12905: \"$ac_link\"") >&5
12906 (eval $ac_link) 2>&5
12908 echo "$as_me:12908: \$? = $ac_status" >&5
12909 (exit $ac_status); } &&
12910 { ac_try='test -s conftest$ac_exeext'
12911 { (eval echo "$as_me:12911: \"$ac_try\"") >&5
12912 (eval $ac_try) 2>&5
12914 echo "$as_me:12914: \$? = $ac_status" >&5
12915 (exit $ac_status); }; }; then
12916 eval "$as_ac_Lib=yes"
12918 echo "$as_me: failed program was:" >&5
12919 cat conftest.$ac_ext >&5
12920 eval "$as_ac_Lib=no"
12922 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12923 LIBS=$ac_check_lib_save_LIBS
12925 echo "$as_me:12925: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12926 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12927 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12928 cat >>confdefs.h <<EOF
12929 #define `echo "HAVE_LIBform$cf_cv_libtype" | $as_tr_cpp` 1
12932 LIBS="-lform$cf_cv_libtype $LIBS"
12936 # look for curses-related headers
12947 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12948 echo "$as_me:12948: checking for $ac_header" >&5
12949 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12950 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12951 echo $ECHO_N "(cached) $ECHO_C" >&6
12953 cat >conftest.$ac_ext <<_ACEOF
12954 #line 12954 "configure"
12955 #include "confdefs.h"
12956 #include <$ac_header>
12958 if { (eval echo "$as_me:12958: \"$ac_cpp conftest.$ac_ext\"") >&5
12959 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12961 egrep -v '^ *\+' conftest.er1 >conftest.err
12963 cat conftest.err >&5
12964 echo "$as_me:12964: \$? = $ac_status" >&5
12965 (exit $ac_status); } >/dev/null; then
12966 if test -s conftest.err; then
12967 ac_cpp_err=$ac_c_preproc_warn_flag
12974 if test -z "$ac_cpp_err"; then
12975 eval "$as_ac_Header=yes"
12977 echo "$as_me: failed program was:" >&5
12978 cat conftest.$ac_ext >&5
12979 eval "$as_ac_Header=no"
12981 rm -f conftest.err conftest.$ac_ext
12983 echo "$as_me:12983: result: `eval echo '${'$as_ac_Header'}'`" >&5
12984 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12985 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12986 cat >>confdefs.h <<EOF
12987 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12996 echo "$as_me:12996: checking return type of signal handlers" >&5
12997 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
12998 if test "${ac_cv_type_signal+set}" = set; then
12999 echo $ECHO_N "(cached) $ECHO_C" >&6
13001 cat >conftest.$ac_ext <<_ACEOF
13002 #line 13002 "configure"
13003 #include "confdefs.h"
13004 #include <sys/types.h>
13005 #include <signal.h>
13010 extern "C" void (*signal (int, void (*)(int)))(int);
13012 void (*signal ()) ();
13023 rm -f conftest.$ac_objext
13024 if { (eval echo "$as_me:13024: \"$ac_compile\"") >&5
13025 (eval $ac_compile) 2>&5
13027 echo "$as_me:13027: \$? = $ac_status" >&5
13028 (exit $ac_status); } &&
13029 { ac_try='test -s conftest.$ac_objext'
13030 { (eval echo "$as_me:13030: \"$ac_try\"") >&5
13031 (eval $ac_try) 2>&5
13033 echo "$as_me:13033: \$? = $ac_status" >&5
13034 (exit $ac_status); }; }; then
13035 ac_cv_type_signal=void
13037 echo "$as_me: failed program was:" >&5
13038 cat conftest.$ac_ext >&5
13039 ac_cv_type_signal=int
13041 rm -f conftest.$ac_objext conftest.$ac_ext
13043 echo "$as_me:13043: result: $ac_cv_type_signal" >&5
13044 echo "${ECHO_T}$ac_cv_type_signal" >&6
13046 cat >>confdefs.h <<EOF
13047 #define RETSIGTYPE $ac_cv_type_signal
13050 echo "$as_me:13050: checking for ANSI C header files" >&5
13051 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13052 if test "${ac_cv_header_stdc+set}" = set; then
13053 echo $ECHO_N "(cached) $ECHO_C" >&6
13055 cat >conftest.$ac_ext <<_ACEOF
13056 #line 13056 "configure"
13057 #include "confdefs.h"
13058 #include <stdlib.h>
13059 #include <stdarg.h>
13060 #include <string.h>
13064 if { (eval echo "$as_me:13064: \"$ac_cpp conftest.$ac_ext\"") >&5
13065 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13067 egrep -v '^ *\+' conftest.er1 >conftest.err
13069 cat conftest.err >&5
13070 echo "$as_me:13070: \$? = $ac_status" >&5
13071 (exit $ac_status); } >/dev/null; then
13072 if test -s conftest.err; then
13073 ac_cpp_err=$ac_c_preproc_warn_flag
13080 if test -z "$ac_cpp_err"; then
13081 ac_cv_header_stdc=yes
13083 echo "$as_me: failed program was:" >&5
13084 cat conftest.$ac_ext >&5
13085 ac_cv_header_stdc=no
13087 rm -f conftest.err conftest.$ac_ext
13089 if test $ac_cv_header_stdc = yes; then
13090 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13091 cat >conftest.$ac_ext <<_ACEOF
13092 #line 13092 "configure"
13093 #include "confdefs.h"
13094 #include <string.h>
13097 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13098 egrep "memchr" >/dev/null 2>&1; then
13101 ac_cv_header_stdc=no
13107 if test $ac_cv_header_stdc = yes; then
13108 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13109 cat >conftest.$ac_ext <<_ACEOF
13110 #line 13110 "configure"
13111 #include "confdefs.h"
13112 #include <stdlib.h>
13115 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13116 egrep "free" >/dev/null 2>&1; then
13119 ac_cv_header_stdc=no
13125 if test $ac_cv_header_stdc = yes; then
13126 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13127 if test "$cross_compiling" = yes; then
13130 cat >conftest.$ac_ext <<_ACEOF
13131 #line 13131 "configure"
13132 #include "confdefs.h"
13134 #if ((' ' & 0x0FF) == 0x020)
13135 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13136 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13138 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13139 || ('j' <= (c) && (c) <= 'r') \
13140 || ('s' <= (c) && (c) <= 'z'))
13141 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13144 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13149 for (i = 0; i < 256; i++)
13150 if (XOR (islower (i), ISLOWER (i))
13151 || toupper (i) != TOUPPER (i))
13152 $ac_main_return(2);
13153 $ac_main_return (0);
13156 rm -f 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); } && { ac_try='./conftest$ac_exeext'
13162 { (eval echo "$as_me:13162: \"$ac_try\"") >&5
13163 (eval $ac_try) 2>&5
13165 echo "$as_me:13165: \$? = $ac_status" >&5
13166 (exit $ac_status); }; }; then
13169 echo "$as_me: program exited with status $ac_status" >&5
13170 echo "$as_me: failed program was:" >&5
13171 cat conftest.$ac_ext >&5
13172 ac_cv_header_stdc=no
13174 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13178 echo "$as_me:13178: result: $ac_cv_header_stdc" >&5
13179 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13180 if test $ac_cv_header_stdc = yes; then
13182 cat >>confdefs.h <<\EOF
13183 #define STDC_HEADERS 1
13188 echo "$as_me:13188: checking whether time.h and sys/time.h may both be included" >&5
13189 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13190 if test "${ac_cv_header_time+set}" = set; then
13191 echo $ECHO_N "(cached) $ECHO_C" >&6
13193 cat >conftest.$ac_ext <<_ACEOF
13194 #line 13194 "configure"
13195 #include "confdefs.h"
13196 #include <sys/types.h>
13197 #include <sys/time.h>
13203 if ((struct tm *) 0)
13209 rm -f conftest.$ac_objext
13210 if { (eval echo "$as_me:13210: \"$ac_compile\"") >&5
13211 (eval $ac_compile) 2>&5
13213 echo "$as_me:13213: \$? = $ac_status" >&5
13214 (exit $ac_status); } &&
13215 { ac_try='test -s conftest.$ac_objext'
13216 { (eval echo "$as_me:13216: \"$ac_try\"") >&5
13217 (eval $ac_try) 2>&5
13219 echo "$as_me:13219: \$? = $ac_status" >&5
13220 (exit $ac_status); }; }; then
13221 ac_cv_header_time=yes
13223 echo "$as_me: failed program was:" >&5
13224 cat conftest.$ac_ext >&5
13225 ac_cv_header_time=no
13227 rm -f conftest.$ac_objext conftest.$ac_ext
13229 echo "$as_me:13229: result: $ac_cv_header_time" >&5
13230 echo "${ECHO_T}$ac_cv_header_time" >&6
13231 if test $ac_cv_header_time = yes; then
13233 cat >>confdefs.h <<\EOF
13234 #define TIME_WITH_SYS_TIME 1
13251 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13252 echo "$as_me:13252: checking for $ac_header" >&5
13253 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13254 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13255 echo $ECHO_N "(cached) $ECHO_C" >&6
13257 cat >conftest.$ac_ext <<_ACEOF
13258 #line 13258 "configure"
13259 #include "confdefs.h"
13260 #include <$ac_header>
13262 if { (eval echo "$as_me:13262: \"$ac_cpp conftest.$ac_ext\"") >&5
13263 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13265 egrep -v '^ *\+' conftest.er1 >conftest.err
13267 cat conftest.err >&5
13268 echo "$as_me:13268: \$? = $ac_status" >&5
13269 (exit $ac_status); } >/dev/null; then
13270 if test -s conftest.err; then
13271 ac_cpp_err=$ac_c_preproc_warn_flag
13278 if test -z "$ac_cpp_err"; then
13279 eval "$as_ac_Header=yes"
13281 echo "$as_me: failed program was:" >&5
13282 cat conftest.$ac_ext >&5
13283 eval "$as_ac_Header=no"
13285 rm -f conftest.err conftest.$ac_ext
13287 echo "$as_me:13287: result: `eval echo '${'$as_ac_Header'}'`" >&5
13288 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13289 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13290 cat >>confdefs.h <<EOF
13291 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13297 for ac_header in unistd.h getopt.h
13299 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13300 echo "$as_me:13300: checking for $ac_header" >&5
13301 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13302 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13303 echo $ECHO_N "(cached) $ECHO_C" >&6
13305 cat >conftest.$ac_ext <<_ACEOF
13306 #line 13306 "configure"
13307 #include "confdefs.h"
13308 #include <$ac_header>
13310 if { (eval echo "$as_me:13310: \"$ac_cpp conftest.$ac_ext\"") >&5
13311 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13313 egrep -v '^ *\+' conftest.er1 >conftest.err
13315 cat conftest.err >&5
13316 echo "$as_me:13316: \$? = $ac_status" >&5
13317 (exit $ac_status); } >/dev/null; then
13318 if test -s conftest.err; then
13319 ac_cpp_err=$ac_c_preproc_warn_flag
13326 if test -z "$ac_cpp_err"; then
13327 eval "$as_ac_Header=yes"
13329 echo "$as_me: failed program was:" >&5
13330 cat conftest.$ac_ext >&5
13331 eval "$as_ac_Header=no"
13333 rm -f conftest.err conftest.$ac_ext
13335 echo "$as_me:13335: result: `eval echo '${'$as_ac_Header'}'`" >&5
13336 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13337 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13338 cat >>confdefs.h <<EOF
13339 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13345 echo "$as_me:13345: checking for header declaring getopt variables" >&5
13346 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
13347 if test "${cf_cv_getopt_header+set}" = set; then
13348 echo $ECHO_N "(cached) $ECHO_C" >&6
13351 cf_cv_getopt_header=none
13352 for cf_header in stdio.h stdlib.h unistd.h getopt.h
13354 cat >conftest.$ac_ext <<_ACEOF
13355 #line 13355 "configure"
13356 #include "confdefs.h"
13358 #include <$cf_header>
13362 int x = optind; char *y = optarg
13367 rm -f conftest.$ac_objext
13368 if { (eval echo "$as_me:13368: \"$ac_compile\"") >&5
13369 (eval $ac_compile) 2>&5
13371 echo "$as_me:13371: \$? = $ac_status" >&5
13372 (exit $ac_status); } &&
13373 { ac_try='test -s conftest.$ac_objext'
13374 { (eval echo "$as_me:13374: \"$ac_try\"") >&5
13375 (eval $ac_try) 2>&5
13377 echo "$as_me:13377: \$? = $ac_status" >&5
13378 (exit $ac_status); }; }; then
13379 cf_cv_getopt_header=$cf_header
13382 echo "$as_me: failed program was:" >&5
13383 cat conftest.$ac_ext >&5
13385 rm -f conftest.$ac_objext conftest.$ac_ext
13389 echo "$as_me:13389: result: $cf_cv_getopt_header" >&5
13390 echo "${ECHO_T}$cf_cv_getopt_header" >&6
13391 if test $cf_cv_getopt_header != none ; then
13392 cat >>confdefs.h <<\EOF
13393 #define HAVE_GETOPT_HEADER 1
13403 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13404 echo "$as_me:13404: checking for $ac_func" >&5
13405 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13406 if eval "test \"\${$as_ac_var+set}\" = set"; then
13407 echo $ECHO_N "(cached) $ECHO_C" >&6
13409 cat >conftest.$ac_ext <<_ACEOF
13410 #line 13410 "configure"
13411 #include "confdefs.h"
13412 /* System header to define __stub macros and hopefully few prototypes,
13413 which can conflict with char $ac_func (); below. */
13414 #include <assert.h>
13415 /* Override any gcc2 internal prototype to avoid an error. */
13419 /* We use char because int might match the return type of a gcc2
13420 builtin and then its argument prototype would still apply. */
13427 /* The GNU C library defines this for functions which it implements
13428 to always fail with ENOSYS. Some functions are actually named
13429 something starting with __ and the normal name is an alias. */
13430 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13440 rm -f conftest.$ac_objext conftest$ac_exeext
13441 if { (eval echo "$as_me:13441: \"$ac_link\"") >&5
13442 (eval $ac_link) 2>&5
13444 echo "$as_me:13444: \$? = $ac_status" >&5
13445 (exit $ac_status); } &&
13446 { ac_try='test -s conftest$ac_exeext'
13447 { (eval echo "$as_me:13447: \"$ac_try\"") >&5
13448 (eval $ac_try) 2>&5
13450 echo "$as_me:13450: \$? = $ac_status" >&5
13451 (exit $ac_status); }; }; then
13452 eval "$as_ac_var=yes"
13454 echo "$as_me: failed program was:" >&5
13455 cat conftest.$ac_ext >&5
13456 eval "$as_ac_var=no"
13458 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13460 echo "$as_me:13460: result: `eval echo '${'$as_ac_var'}'`" >&5
13461 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13462 if test `eval echo '${'$as_ac_var'}'` = yes; then
13463 cat >>confdefs.h <<EOF
13464 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13470 if test "$cf_enable_widec" = yes; then
13483 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13484 echo "$as_me:13484: checking for $ac_func" >&5
13485 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13486 if eval "test \"\${$as_ac_var+set}\" = set"; then
13487 echo $ECHO_N "(cached) $ECHO_C" >&6
13489 cat >conftest.$ac_ext <<_ACEOF
13490 #line 13490 "configure"
13491 #include "confdefs.h"
13492 /* System header to define __stub macros and hopefully few prototypes,
13493 which can conflict with char $ac_func (); below. */
13494 #include <assert.h>
13495 /* Override any gcc2 internal prototype to avoid an error. */
13499 /* We use char because int might match the return type of a gcc2
13500 builtin and then its argument prototype would still apply. */
13507 /* The GNU C library defines this for functions which it implements
13508 to always fail with ENOSYS. Some functions are actually named
13509 something starting with __ and the normal name is an alias. */
13510 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13520 rm -f conftest.$ac_objext conftest$ac_exeext
13521 if { (eval echo "$as_me:13521: \"$ac_link\"") >&5
13522 (eval $ac_link) 2>&5
13524 echo "$as_me:13524: \$? = $ac_status" >&5
13525 (exit $ac_status); } &&
13526 { ac_try='test -s conftest$ac_exeext'
13527 { (eval echo "$as_me:13527: \"$ac_try\"") >&5
13528 (eval $ac_try) 2>&5
13530 echo "$as_me:13530: \$? = $ac_status" >&5
13531 (exit $ac_status); }; }; then
13532 eval "$as_ac_var=yes"
13534 echo "$as_me: failed program was:" >&5
13535 cat conftest.$ac_ext >&5
13536 eval "$as_ac_var=no"
13538 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13540 echo "$as_me:13540: result: `eval echo '${'$as_ac_var'}'`" >&5
13541 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13542 if test `eval echo '${'$as_ac_var'}'` = yes; then
13543 cat >>confdefs.h <<EOF
13544 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13552 echo "$as_me:13552: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
13553 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
13554 if test "${cf_cv_need_xopen_extension+set}" = set; then
13555 echo $ECHO_N "(cached) $ECHO_C" >&6
13558 cat >conftest.$ac_ext <<_ACEOF
13559 #line 13559 "configure"
13560 #include "confdefs.h"
13562 #include <stdlib.h>
13563 #include <${cf_cv_ncurses_header:-curses.h}>
13568 #if defined(NCURSES_VERSION_PATCH)
13569 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
13573 long x = winnstr(stdscr, "", 0);
13575 getbegyx(stdscr, y1, x1)
13580 rm -f conftest.$ac_objext conftest$ac_exeext
13581 if { (eval echo "$as_me:13581: \"$ac_link\"") >&5
13582 (eval $ac_link) 2>&5
13584 echo "$as_me:13584: \$? = $ac_status" >&5
13585 (exit $ac_status); } &&
13586 { ac_try='test -s conftest$ac_exeext'
13587 { (eval echo "$as_me:13587: \"$ac_try\"") >&5
13588 (eval $ac_try) 2>&5
13590 echo "$as_me:13590: \$? = $ac_status" >&5
13591 (exit $ac_status); }; }; then
13592 cf_cv_need_xopen_extension=no
13594 echo "$as_me: failed program was:" >&5
13595 cat conftest.$ac_ext >&5
13596 cat >conftest.$ac_ext <<_ACEOF
13597 #line 13597 "configure"
13598 #include "confdefs.h"
13600 #define _XOPEN_SOURCE_EXTENDED
13601 #include <stdlib.h>
13602 #include <${cf_cv_ncurses_header:-curses.h}>
13607 #ifdef NCURSES_VERSION
13609 int check2 = curs_set((int)sizeof(check));
13611 long x = winnstr(stdscr, "", 0);
13613 getbegyx(stdscr, y1, x1)
13618 rm -f conftest.$ac_objext conftest$ac_exeext
13619 if { (eval echo "$as_me:13619: \"$ac_link\"") >&5
13620 (eval $ac_link) 2>&5
13622 echo "$as_me:13622: \$? = $ac_status" >&5
13623 (exit $ac_status); } &&
13624 { ac_try='test -s conftest$ac_exeext'
13625 { (eval echo "$as_me:13625: \"$ac_try\"") >&5
13626 (eval $ac_try) 2>&5
13628 echo "$as_me:13628: \$? = $ac_status" >&5
13629 (exit $ac_status); }; }; then
13630 cf_cv_need_xopen_extension=yes
13632 echo "$as_me: failed program was:" >&5
13633 cat conftest.$ac_ext >&5
13634 cf_cv_need_xopen_extension=unknown
13636 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13638 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13640 echo "$as_me:13640: result: $cf_cv_need_xopen_extension" >&5
13641 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
13642 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
13644 echo "$as_me:13644: checking for term.h" >&5
13645 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
13646 if test "${cf_cv_term_header+set}" = set; then
13647 echo $ECHO_N "(cached) $ECHO_C" >&6
13650 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
13651 # for <term.h> if we do not find the variant.
13653 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
13655 case ${cf_cv_ncurses_header:-curses.h} in #(vi
13657 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
13658 cf_header_list="$cf_header_item $cf_header_list"
13662 for cf_header in $cf_header_list
13664 cat >conftest.$ac_ext <<_ACEOF
13665 #line 13665 "configure"
13666 #include "confdefs.h"
13668 #include <${cf_cv_ncurses_header:-curses.h}>
13669 #include <${cf_header}>
13678 rm -f conftest.$ac_objext
13679 if { (eval echo "$as_me:13679: \"$ac_compile\"") >&5
13680 (eval $ac_compile) 2>&5
13682 echo "$as_me:13682: \$? = $ac_status" >&5
13683 (exit $ac_status); } &&
13684 { ac_try='test -s conftest.$ac_objext'
13685 { (eval echo "$as_me:13685: \"$ac_try\"") >&5
13686 (eval $ac_try) 2>&5
13688 echo "$as_me:13688: \$? = $ac_status" >&5
13689 (exit $ac_status); }; }; then
13690 cf_cv_term_header=$cf_header
13693 echo "$as_me: failed program was:" >&5
13694 cat conftest.$ac_ext >&5
13695 cf_cv_term_header=no
13697 rm -f conftest.$ac_objext conftest.$ac_ext
13700 case $cf_cv_term_header in #(vi
13702 # If curses is ncurses, some packagers still mess it up by trying to make
13703 # us use GNU termcap. This handles the most common case.
13704 for cf_header in ncurses/term.h ncursesw/term.h
13706 cat >conftest.$ac_ext <<_ACEOF
13707 #line 13707 "configure"
13708 #include "confdefs.h"
13710 #include <${cf_cv_ncurses_header:-curses.h}>
13711 #ifdef NCURSES_VERSION
13712 #include <${cf_header}>
13724 rm -f conftest.$ac_objext
13725 if { (eval echo "$as_me:13725: \"$ac_compile\"") >&5
13726 (eval $ac_compile) 2>&5
13728 echo "$as_me:13728: \$? = $ac_status" >&5
13729 (exit $ac_status); } &&
13730 { ac_try='test -s conftest.$ac_objext'
13731 { (eval echo "$as_me:13731: \"$ac_try\"") >&5
13732 (eval $ac_try) 2>&5
13734 echo "$as_me:13734: \$? = $ac_status" >&5
13735 (exit $ac_status); }; }; then
13736 cf_cv_term_header=$cf_header
13739 echo "$as_me: failed program was:" >&5
13740 cat conftest.$ac_ext >&5
13741 cf_cv_term_header=no
13743 rm -f conftest.$ac_objext conftest.$ac_ext
13749 echo "$as_me:13749: result: $cf_cv_term_header" >&5
13750 echo "${ECHO_T}$cf_cv_term_header" >&6
13752 case $cf_cv_term_header in #(vi
13754 cat >>confdefs.h <<\EOF
13755 #define HAVE_TERM_H 1
13759 ncurses/term.h) #(vi
13760 cat >>confdefs.h <<\EOF
13761 #define HAVE_NCURSES_TERM_H 1
13766 cat >>confdefs.h <<\EOF
13767 #define HAVE_NCURSESW_TERM_H 1
13773 echo "$as_me:13773: checking for unctrl.h" >&5
13774 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
13775 if test "${cf_cv_unctrl_header+set}" = set; then
13776 echo $ECHO_N "(cached) $ECHO_C" >&6
13779 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
13780 # for <unctrl.h> if we do not find the variant.
13782 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
13784 case ${cf_cv_ncurses_header:-curses.h} in #(vi
13786 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
13787 cf_header_list="$cf_header_item $cf_header_list"
13791 for cf_header in $cf_header_list
13793 cat >conftest.$ac_ext <<_ACEOF
13794 #line 13794 "configure"
13795 #include "confdefs.h"
13797 #include <${cf_cv_ncurses_header:-curses.h}>
13798 #include <${cf_header}>
13807 rm -f conftest.$ac_objext
13808 if { (eval echo "$as_me:13808: \"$ac_compile\"") >&5
13809 (eval $ac_compile) 2>&5
13811 echo "$as_me:13811: \$? = $ac_status" >&5
13812 (exit $ac_status); } &&
13813 { ac_try='test -s conftest.$ac_objext'
13814 { (eval echo "$as_me:13814: \"$ac_try\"") >&5
13815 (eval $ac_try) 2>&5
13817 echo "$as_me:13817: \$? = $ac_status" >&5
13818 (exit $ac_status); }; }; then
13819 cf_cv_unctrl_header=$cf_header
13822 echo "$as_me: failed program was:" >&5
13823 cat conftest.$ac_ext >&5
13824 cf_cv_unctrl_header=no
13826 rm -f conftest.$ac_objext conftest.$ac_ext
13829 case $cf_cv_unctrl_header in #(vi
13831 { echo "$as_me:13831: WARNING: unctrl.h header not found" >&5
13832 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
13837 echo "$as_me:13837: result: $cf_cv_unctrl_header" >&5
13838 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
13840 case $cf_cv_unctrl_header in #(vi
13842 cat >>confdefs.h <<\EOF
13843 #define HAVE_UNCTRL_H 1
13847 ncurses/unctrl.h) #(vi
13848 cat >>confdefs.h <<\EOF
13849 #define HAVE_NCURSES_UNCTRL_H 1
13854 cat >>confdefs.h <<\EOF
13855 #define HAVE_NCURSESW_UNCTRL_H 1
13862 assume_default_colors \
13888 use_default_colors \
13900 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13902 echo "$as_me:13902: checking for ${cf_func}" >&5
13903 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
13905 echo "${as_me:-configure}:13905: testing ${cf_func} ..." 1>&5
13907 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
13908 echo $ECHO_N "(cached) $ECHO_C" >&6
13911 eval cf_result='$ac_cv_func_'$cf_func
13912 if test ".$cf_result" != ".no"; then
13913 cat >conftest.$ac_ext <<_ACEOF
13914 #line 13914 "configure"
13915 #include "confdefs.h"
13917 #ifdef HAVE_XCURSES
13918 #include <xcurses.h>
13919 char * XCursesProgramName = "test";
13921 #include <${cf_cv_ncurses_header:-curses.h}>
13922 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
13923 #include <ncursesw/term.h>
13924 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
13925 #include <ncurses/term.h>
13926 #elif defined(HAVE_TERM_H)
13936 long foo = (long)(&${cf_func});
13937 if (foo + 1234 > 5678)
13938 ${cf_cv_main_return:-return}(foo);
13945 rm -f conftest.$ac_objext conftest$ac_exeext
13946 if { (eval echo "$as_me:13946: \"$ac_link\"") >&5
13947 (eval $ac_link) 2>&5
13949 echo "$as_me:13949: \$? = $ac_status" >&5
13950 (exit $ac_status); } &&
13951 { ac_try='test -s conftest$ac_exeext'
13952 { (eval echo "$as_me:13952: \"$ac_try\"") >&5
13953 (eval $ac_try) 2>&5
13955 echo "$as_me:13955: \$? = $ac_status" >&5
13956 (exit $ac_status); }; }; then
13959 echo "$as_me: failed program was:" >&5
13960 cat conftest.$ac_ext >&5
13963 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13965 eval 'cf_cv_func_'$cf_func'=$cf_result'
13969 # use the computed/retrieved cache-value:
13970 eval 'cf_result=$cf_cv_func_'$cf_func
13971 echo "$as_me:13971: result: $cf_result" >&5
13972 echo "${ECHO_T}$cf_result" >&6
13973 if test $cf_result != no; then
13974 cat >>confdefs.h <<EOF
13975 #define HAVE_${cf_tr_func} 1
13981 for cf_func in tputs
13984 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13986 echo "$as_me:13986: checking for ${cf_func}" >&5
13987 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
13989 echo "${as_me:-configure}:13989: testing ${cf_func} ..." 1>&5
13991 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
13992 echo $ECHO_N "(cached) $ECHO_C" >&6
13995 eval cf_result='$ac_cv_func_'$cf_func
13996 if test ".$cf_result" != ".no"; then
13997 cat >conftest.$ac_ext <<_ACEOF
13998 #line 13998 "configure"
13999 #include "confdefs.h"
14001 #ifdef HAVE_XCURSES
14002 #include <xcurses.h>
14003 char * XCursesProgramName = "test";
14005 #include <${cf_cv_ncurses_header:-curses.h}>
14006 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14007 #include <ncursesw/term.h>
14008 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14009 #include <ncurses/term.h>
14010 #elif defined(HAVE_TERM_H)
14020 long foo = (long)(&${cf_func});
14021 if (foo + 1234 > 5678)
14022 ${cf_cv_main_return:-return}(foo);
14029 rm -f conftest.$ac_objext conftest$ac_exeext
14030 if { (eval echo "$as_me:14030: \"$ac_link\"") >&5
14031 (eval $ac_link) 2>&5
14033 echo "$as_me:14033: \$? = $ac_status" >&5
14034 (exit $ac_status); } &&
14035 { ac_try='test -s conftest$ac_exeext'
14036 { (eval echo "$as_me:14036: \"$ac_try\"") >&5
14037 (eval $ac_try) 2>&5
14039 echo "$as_me:14039: \$? = $ac_status" >&5
14040 (exit $ac_status); }; }; then
14043 echo "$as_me: failed program was:" >&5
14044 cat conftest.$ac_ext >&5
14047 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14049 eval 'cf_cv_func_'$cf_func'=$cf_result'
14053 # use the computed/retrieved cache-value:
14054 eval 'cf_result=$cf_cv_func_'$cf_func
14055 echo "$as_me:14055: result: $cf_result" >&5
14056 echo "${ECHO_T}$cf_result" >&6
14057 if test $cf_result != no; then
14058 cat >>confdefs.h <<EOF
14059 #define HAVE_${cf_tr_func} 1
14065 if test x$cf_cv_func_tputs = xyes
14068 for cf_arg in int char
14070 for cf_ret in int void
14072 if test $cf_ret = void
14074 cf_return="/* nothing */"
14076 cf_return="return value"
14078 cat >conftest.$ac_ext <<_ACEOF
14079 #line 14079 "configure"
14080 #include "confdefs.h"
14082 #include <${cf_cv_ncurses_header:-curses.h}>
14083 #include <$cf_cv_term_header>
14085 static $cf_ret outc($cf_arg value) { $cf_return; }
14091 tputs("hello", 0, outc);
14092 ${cf_cv_main_return:-return}(0);
14098 rm -f conftest.$ac_objext
14099 if { (eval echo "$as_me:14099: \"$ac_compile\"") >&5
14100 (eval $ac_compile) 2>&5
14102 echo "$as_me:14102: \$? = $ac_status" >&5
14103 (exit $ac_status); } &&
14104 { ac_try='test -s conftest.$ac_objext'
14105 { (eval echo "$as_me:14105: \"$ac_try\"") >&5
14106 (eval $ac_try) 2>&5
14108 echo "$as_me:14108: \$? = $ac_status" >&5
14109 (exit $ac_status); }; }; then
14111 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
14113 echo "${as_me:-configure}:14113: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
14115 cat >>confdefs.h <<EOF
14116 #define TPUTS_ARG $cf_arg
14117 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
14118 #define TPUTS_RETURN(value) $cf_return
14124 echo "$as_me: failed program was:" >&5
14125 cat conftest.$ac_ext >&5
14127 rm -f conftest.$ac_objext conftest.$ac_ext
14129 test $cf_done = yes && break
14133 echo "$as_me:14133: checking for ncurses extended functions" >&5
14134 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
14135 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
14136 echo $ECHO_N "(cached) $ECHO_C" >&6
14139 cat >conftest.$ac_ext <<_ACEOF
14140 #line 14140 "configure"
14141 #include "confdefs.h"
14143 #include <${cf_cv_ncurses_header:-curses.h}>
14148 int x = NCURSES_EXT_FUNCS
14154 rm -f conftest.$ac_objext
14155 if { (eval echo "$as_me:14155: \"$ac_compile\"") >&5
14156 (eval $ac_compile) 2>&5
14158 echo "$as_me:14158: \$? = $ac_status" >&5
14159 (exit $ac_status); } &&
14160 { ac_try='test -s conftest.$ac_objext'
14161 { (eval echo "$as_me:14161: \"$ac_try\"") >&5
14162 (eval $ac_try) 2>&5
14164 echo "$as_me:14164: \$? = $ac_status" >&5
14165 (exit $ac_status); }; }; then
14166 cf_cv_ncurses_ext_funcs=defined
14168 echo "$as_me: failed program was:" >&5
14169 cat conftest.$ac_ext >&5
14171 cat >conftest.$ac_ext <<_ACEOF
14172 #line 14172 "configure"
14173 #include "confdefs.h"
14175 #include <${cf_cv_ncurses_header:-curses.h}>
14180 (void) assume_default_colors (0, 0);
14181 (void) curses_version ();
14182 (void) define_key (0, 0);
14183 (void) is_term_resized (0, 0);
14184 (void) key_defined (0);
14185 (void) keybound (0, 0);
14186 (void) keyok (0, 0);
14187 (void) resize_term (0, 0);
14188 (void) resizeterm (0, 0);
14189 (void) use_default_colors ();
14190 (void) use_extended_names (0);
14191 (void) wresize (0, 0, 0);
14196 rm -f conftest.$ac_objext conftest$ac_exeext
14197 if { (eval echo "$as_me:14197: \"$ac_link\"") >&5
14198 (eval $ac_link) 2>&5
14200 echo "$as_me:14200: \$? = $ac_status" >&5
14201 (exit $ac_status); } &&
14202 { ac_try='test -s conftest$ac_exeext'
14203 { (eval echo "$as_me:14203: \"$ac_try\"") >&5
14204 (eval $ac_try) 2>&5
14206 echo "$as_me:14206: \$? = $ac_status" >&5
14207 (exit $ac_status); }; }; then
14208 cf_cv_ncurses_ext_funcs=yes
14210 echo "$as_me: failed program was:" >&5
14211 cat conftest.$ac_ext >&5
14212 cf_cv_ncurses_ext_funcs=no
14214 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14217 rm -f conftest.$ac_objext conftest.$ac_ext
14220 echo "$as_me:14220: result: $cf_cv_ncurses_ext_funcs" >&5
14221 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
14222 test "$cf_cv_ncurses_ext_funcs" = yes && cat >>confdefs.h <<\EOF
14223 #define NCURSES_EXT_FUNCS 1
14226 if test "$cf_enable_widec" = yes
14228 # workaround for systems with ncurses before 20111029, due to change of
14229 # feature test macro from _XPG5 to _XOPEN_SOURCE
14230 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
14233 echo "$as_me:14233: checking if _XPG5 should be defined to enable wide-characters" >&5
14234 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
14236 cat >conftest.$ac_ext <<_ACEOF
14237 #line 14237 "configure"
14238 #include "confdefs.h"
14240 #include <${cf_cv_ncurses_header:-curses.h}>
14249 rm -f conftest.$ac_objext
14250 if { (eval echo "$as_me:14250: \"$ac_compile\"") >&5
14251 (eval $ac_compile) 2>&5
14253 echo "$as_me:14253: \$? = $ac_status" >&5
14254 (exit $ac_status); } &&
14255 { ac_try='test -s conftest.$ac_objext'
14256 { (eval echo "$as_me:14256: \"$ac_try\"") >&5
14257 (eval $ac_try) 2>&5
14259 echo "$as_me:14259: \$? = $ac_status" >&5
14260 (exit $ac_status); }; }; then
14263 echo "$as_me: failed program was:" >&5
14264 cat conftest.$ac_ext >&5
14265 cf_save_cppflags="$CPPFLAGS"
14266 CPPFLAGS="$CPPFLAGS -D_XPG5"
14267 cat >conftest.$ac_ext <<_ACEOF
14268 #line 14268 "configure"
14269 #include "confdefs.h"
14271 #include <${cf_cv_ncurses_header:-curses.h}>
14280 rm -f conftest.$ac_objext
14281 if { (eval echo "$as_me:14281: \"$ac_compile\"") >&5
14282 (eval $ac_compile) 2>&5
14284 echo "$as_me:14284: \$? = $ac_status" >&5
14285 (exit $ac_status); } &&
14286 { ac_try='test -s conftest.$ac_objext'
14287 { (eval echo "$as_me:14287: \"$ac_try\"") >&5
14288 (eval $ac_try) 2>&5
14290 echo "$as_me:14290: \$? = $ac_status" >&5
14291 (exit $ac_status); }; }; then
14294 echo "$as_me: failed program was:" >&5
14295 cat conftest.$ac_ext >&5
14297 rm -f conftest.$ac_objext conftest.$ac_ext
14298 CPPFLAGS="$cf_save_cppflags"
14300 rm -f conftest.$ac_objext conftest.$ac_ext
14301 echo "$as_me:14301: result: $cf_define_xpg5" >&5
14302 echo "${ECHO_T}$cf_define_xpg5" >&6
14304 if test "$cf_define_xpg5" = yes
14306 CPPFLAGS="$CPPFLAGS -D_XPG5"
14310 echo "$as_me:14310: checking for wide-character functions" >&5
14311 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
14312 if test "${cf_cv_widechar_funcs+set}" = set; then
14313 echo $ECHO_N "(cached) $ECHO_C" >&6
14316 cat >conftest.$ac_ext <<_ACEOF
14317 #line 14317 "configure"
14318 #include "confdefs.h"
14320 #include <${cf_cv_ncurses_header:-curses.h}>
14325 static wchar_t src_wchar[2];
14326 static cchar_t dst_cchar;
14327 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
14333 rm -f conftest.$ac_objext conftest$ac_exeext
14334 if { (eval echo "$as_me:14334: \"$ac_link\"") >&5
14335 (eval $ac_link) 2>&5
14337 echo "$as_me:14337: \$? = $ac_status" >&5
14338 (exit $ac_status); } &&
14339 { ac_try='test -s conftest$ac_exeext'
14340 { (eval echo "$as_me:14340: \"$ac_try\"") >&5
14341 (eval $ac_try) 2>&5
14343 echo "$as_me:14343: \$? = $ac_status" >&5
14344 (exit $ac_status); }; }; then
14345 cf_cv_widechar_funcs=yes
14347 echo "$as_me: failed program was:" >&5
14348 cat conftest.$ac_ext >&5
14349 cf_cv_widechar_funcs=no
14351 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14354 echo "$as_me:14354: result: $cf_cv_widechar_funcs" >&5
14355 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
14356 if test "$cf_cv_widechar_funcs" != no ; then
14357 cat >>confdefs.h <<\EOF
14358 #define USE_WIDEC_SUPPORT 1
14362 cat >>confdefs.h <<\EOF
14363 #define USE_WIDEC_SUPPORT 0
14368 cat >>confdefs.h <<\EOF
14369 #define USE_WIDEC_SUPPORT 0
14374 echo "$as_me:14374: checking if sys/time.h works with sys/select.h" >&5
14375 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14376 if test "${cf_cv_sys_time_select+set}" = set; then
14377 echo $ECHO_N "(cached) $ECHO_C" >&6
14380 cat >conftest.$ac_ext <<_ACEOF
14381 #line 14381 "configure"
14382 #include "confdefs.h"
14384 #include <sys/types.h>
14385 #ifdef HAVE_SYS_TIME_H
14386 #include <sys/time.h>
14388 #ifdef HAVE_SYS_SELECT_H
14389 #include <sys/select.h>
14400 rm -f conftest.$ac_objext
14401 if { (eval echo "$as_me:14401: \"$ac_compile\"") >&5
14402 (eval $ac_compile) 2>&5
14404 echo "$as_me:14404: \$? = $ac_status" >&5
14405 (exit $ac_status); } &&
14406 { ac_try='test -s conftest.$ac_objext'
14407 { (eval echo "$as_me:14407: \"$ac_try\"") >&5
14408 (eval $ac_try) 2>&5
14410 echo "$as_me:14410: \$? = $ac_status" >&5
14411 (exit $ac_status); }; }; then
14412 cf_cv_sys_time_select=yes
14414 echo "$as_me: failed program was:" >&5
14415 cat conftest.$ac_ext >&5
14416 cf_cv_sys_time_select=no
14418 rm -f conftest.$ac_objext conftest.$ac_ext
14422 echo "$as_me:14422: result: $cf_cv_sys_time_select" >&5
14423 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14424 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
14425 #define HAVE_SYS_TIME_SELECT 1
14428 echo "$as_me:14428: checking for function curses_version" >&5
14429 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
14430 if test "${cf_cv_func_curses_version+set}" = set; then
14431 echo $ECHO_N "(cached) $ECHO_C" >&6
14434 if test "$cross_compiling" = yes; then
14435 cf_cv_func_curses_version=unknown
14437 cat >conftest.$ac_ext <<_ACEOF
14438 #line 14438 "configure"
14439 #include "confdefs.h"
14441 #include <${cf_cv_ncurses_header:-curses.h}>
14445 sprintf(temp, "%s\n", curses_version());
14446 ${cf_cv_main_return:-return}(0);
14450 rm -f conftest$ac_exeext
14451 if { (eval echo "$as_me:14451: \"$ac_link\"") >&5
14452 (eval $ac_link) 2>&5
14454 echo "$as_me:14454: \$? = $ac_status" >&5
14455 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14456 { (eval echo "$as_me:14456: \"$ac_try\"") >&5
14457 (eval $ac_try) 2>&5
14459 echo "$as_me:14459: \$? = $ac_status" >&5
14460 (exit $ac_status); }; }; then
14461 cf_cv_func_curses_version=yes
14464 echo "$as_me: program exited with status $ac_status" >&5
14465 echo "$as_me: failed program was:" >&5
14466 cat conftest.$ac_ext >&5
14467 cf_cv_func_curses_version=no
14470 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14474 echo "$as_me:14474: result: $cf_cv_func_curses_version" >&5
14475 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
14476 test "$cf_cv_func_curses_version" = yes && cat >>confdefs.h <<\EOF
14477 #define HAVE_CURSES_VERSION 1
14480 echo "$as_me:14480: checking for ncurses wrap-prefix" >&5
14481 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
14483 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
14484 if test "${with_ncurses_wrap_prefix+set}" = set; then
14485 withval="$with_ncurses_wrap_prefix"
14486 NCURSES_WRAP_PREFIX=$withval
14488 NCURSES_WRAP_PREFIX=_nc_
14490 echo "$as_me:14490: result: $NCURSES_WRAP_PREFIX" >&5
14491 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14493 echo "$as_me:14493: checking for alternate character set array" >&5
14494 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
14495 if test "${cf_cv_curses_acs_map+set}" = set; then
14496 echo $ECHO_N "(cached) $ECHO_C" >&6
14499 cf_cv_curses_acs_map=unknown
14500 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
14502 cat >conftest.$ac_ext <<_ACEOF
14503 #line 14503 "configure"
14504 #include "confdefs.h"
14506 #include <${cf_cv_ncurses_header:-curses.h}>
14512 $name['k'] = ACS_PLUS
14518 rm -f conftest.$ac_objext conftest$ac_exeext
14519 if { (eval echo "$as_me:14519: \"$ac_link\"") >&5
14520 (eval $ac_link) 2>&5
14522 echo "$as_me:14522: \$? = $ac_status" >&5
14523 (exit $ac_status); } &&
14524 { ac_try='test -s conftest$ac_exeext'
14525 { (eval echo "$as_me:14525: \"$ac_try\"") >&5
14526 (eval $ac_try) 2>&5
14528 echo "$as_me:14528: \$? = $ac_status" >&5
14529 (exit $ac_status); }; }; then
14530 cf_cv_curses_acs_map=$name; break
14532 echo "$as_me: failed program was:" >&5
14533 cat conftest.$ac_ext >&5
14535 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14539 echo "$as_me:14539: result: $cf_cv_curses_acs_map" >&5
14540 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
14542 test "$cf_cv_curses_acs_map" != unknown && cat >>confdefs.h <<EOF
14543 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
14546 if test "$cf_enable_widec" = yes; then
14548 echo "$as_me:14548: checking for wide alternate character set array" >&5
14549 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
14550 if test "${cf_cv_curses_wacs_map+set}" = set; then
14551 echo $ECHO_N "(cached) $ECHO_C" >&6
14554 cf_cv_curses_wacs_map=unknown
14555 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
14557 cat >conftest.$ac_ext <<_ACEOF
14558 #line 14558 "configure"
14559 #include "confdefs.h"
14561 #ifndef _XOPEN_SOURCE_EXTENDED
14562 #define _XOPEN_SOURCE_EXTENDED
14564 #include <${cf_cv_ncurses_header:-curses.h}>
14568 void *foo = &($name['k'])
14573 rm -f conftest.$ac_objext conftest$ac_exeext
14574 if { (eval echo "$as_me:14574: \"$ac_link\"") >&5
14575 (eval $ac_link) 2>&5
14577 echo "$as_me:14577: \$? = $ac_status" >&5
14578 (exit $ac_status); } &&
14579 { ac_try='test -s conftest$ac_exeext'
14580 { (eval echo "$as_me:14580: \"$ac_try\"") >&5
14581 (eval $ac_try) 2>&5
14583 echo "$as_me:14583: \$? = $ac_status" >&5
14584 (exit $ac_status); }; }; then
14585 cf_cv_curses_wacs_map=$name
14588 echo "$as_me: failed program was:" >&5
14589 cat conftest.$ac_ext >&5
14591 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14594 echo "$as_me:14594: result: $cf_cv_curses_wacs_map" >&5
14595 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
14597 test "$cf_cv_curses_wacs_map" != unknown && cat >>confdefs.h <<EOF
14598 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
14601 echo "$as_me:14601: checking for wide alternate character constants" >&5
14602 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
14603 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
14604 echo $ECHO_N "(cached) $ECHO_C" >&6
14607 cf_cv_curses_wacs_symbols=no
14608 if test "$cf_cv_curses_wacs_map" != unknown
14610 cat >conftest.$ac_ext <<_ACEOF
14611 #line 14611 "configure"
14612 #include "confdefs.h"
14614 #ifndef _XOPEN_SOURCE_EXTENDED
14615 #define _XOPEN_SOURCE_EXTENDED
14617 #include <${cf_cv_ncurses_header:-curses.h}>
14621 cchar_t *foo = WACS_PLUS;
14622 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
14627 rm -f conftest.$ac_objext conftest$ac_exeext
14628 if { (eval echo "$as_me:14628: \"$ac_link\"") >&5
14629 (eval $ac_link) 2>&5
14631 echo "$as_me:14631: \$? = $ac_status" >&5
14632 (exit $ac_status); } &&
14633 { ac_try='test -s conftest$ac_exeext'
14634 { (eval echo "$as_me:14634: \"$ac_try\"") >&5
14635 (eval $ac_try) 2>&5
14637 echo "$as_me:14637: \$? = $ac_status" >&5
14638 (exit $ac_status); }; }; then
14639 cf_cv_curses_wacs_symbols=yes
14641 echo "$as_me: failed program was:" >&5
14642 cat conftest.$ac_ext >&5
14644 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14646 cat >conftest.$ac_ext <<_ACEOF
14647 #line 14647 "configure"
14648 #include "confdefs.h"
14650 #ifndef _XOPEN_SOURCE_EXTENDED
14651 #define _XOPEN_SOURCE_EXTENDED
14653 #include <${cf_cv_ncurses_header:-curses.h}>
14657 cchar_t *foo = WACS_PLUS
14662 rm -f conftest.$ac_objext conftest$ac_exeext
14663 if { (eval echo "$as_me:14663: \"$ac_link\"") >&5
14664 (eval $ac_link) 2>&5
14666 echo "$as_me:14666: \$? = $ac_status" >&5
14667 (exit $ac_status); } &&
14668 { ac_try='test -s conftest$ac_exeext'
14669 { (eval echo "$as_me:14669: \"$ac_try\"") >&5
14670 (eval $ac_try) 2>&5
14672 echo "$as_me:14672: \$? = $ac_status" >&5
14673 (exit $ac_status); }; }; then
14674 cf_cv_curses_wacs_symbols=yes
14676 echo "$as_me: failed program was:" >&5
14677 cat conftest.$ac_ext >&5
14679 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14683 echo "$as_me:14683: result: $cf_cv_curses_wacs_symbols" >&5
14684 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
14686 test "$cf_cv_curses_wacs_symbols" != no && cat >>confdefs.h <<\EOF
14687 #define CURSES_WACS_SYMBOLS 1
14692 echo "$as_me:14692: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
14693 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
14694 cat >conftest.$ac_ext <<_ACEOF
14695 #line 14695 "configure"
14696 #include "confdefs.h"
14698 #ifndef _XOPEN_SOURCE_EXTENDED
14699 #define _XOPEN_SOURCE_EXTENDED
14701 #include <${cf_cv_ncurses_header:-curses.h}>
14712 rm -f conftest.$ac_objext
14713 if { (eval echo "$as_me:14713: \"$ac_compile\"") >&5
14714 (eval $ac_compile) 2>&5
14716 echo "$as_me:14716: \$? = $ac_status" >&5
14717 (exit $ac_status); } &&
14718 { ac_try='test -s conftest.$ac_objext'
14719 { (eval echo "$as_me:14719: \"$ac_try\"") >&5
14720 (eval $ac_try) 2>&5
14722 echo "$as_me:14722: \$? = $ac_status" >&5
14723 (exit $ac_status); }; }; then
14726 echo "$as_me: failed program was:" >&5
14727 cat conftest.$ac_ext >&5
14730 rm -f conftest.$ac_objext conftest.$ac_ext
14731 echo "$as_me:14731: result: $cf_result" >&5
14732 echo "${ECHO_T}$cf_result" >&6
14733 if test $cf_result = yes ; then
14735 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14737 cat >>confdefs.h <<EOF
14738 #define $cf_result 1
14742 cat >>confdefs.h <<EOF
14743 #define attr_t long
14748 if test "$cf_enable_widec" = yes; then
14750 # This is needed on Tru64 5.0 to declare mbstate_t
14751 echo "$as_me:14751: checking if we must include wchar.h to declare mbstate_t" >&5
14752 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
14753 if test "${cf_cv_mbstate_t+set}" = set; then
14754 echo $ECHO_N "(cached) $ECHO_C" >&6
14757 cat >conftest.$ac_ext <<_ACEOF
14758 #line 14758 "configure"
14759 #include "confdefs.h"
14761 #include <stdlib.h>
14762 #include <stdarg.h>
14764 #ifdef HAVE_LIBUTF8_H
14765 #include <libutf8.h>
14775 rm -f conftest.$ac_objext
14776 if { (eval echo "$as_me:14776: \"$ac_compile\"") >&5
14777 (eval $ac_compile) 2>&5
14779 echo "$as_me:14779: \$? = $ac_status" >&5
14780 (exit $ac_status); } &&
14781 { ac_try='test -s conftest.$ac_objext'
14782 { (eval echo "$as_me:14782: \"$ac_try\"") >&5
14783 (eval $ac_try) 2>&5
14785 echo "$as_me:14785: \$? = $ac_status" >&5
14786 (exit $ac_status); }; }; then
14789 echo "$as_me: failed program was:" >&5
14790 cat conftest.$ac_ext >&5
14791 cat >conftest.$ac_ext <<_ACEOF
14792 #line 14792 "configure"
14793 #include "confdefs.h"
14795 #include <stdlib.h>
14796 #include <stdarg.h>
14799 #ifdef HAVE_LIBUTF8_H
14800 #include <libutf8.h>
14810 rm -f conftest.$ac_objext
14811 if { (eval echo "$as_me:14811: \"$ac_compile\"") >&5
14812 (eval $ac_compile) 2>&5
14814 echo "$as_me:14814: \$? = $ac_status" >&5
14815 (exit $ac_status); } &&
14816 { ac_try='test -s conftest.$ac_objext'
14817 { (eval echo "$as_me:14817: \"$ac_try\"") >&5
14818 (eval $ac_try) 2>&5
14820 echo "$as_me:14820: \$? = $ac_status" >&5
14821 (exit $ac_status); }; }; then
14822 cf_cv_mbstate_t=yes
14824 echo "$as_me: failed program was:" >&5
14825 cat conftest.$ac_ext >&5
14826 cf_cv_mbstate_t=unknown
14828 rm -f conftest.$ac_objext conftest.$ac_ext
14830 rm -f conftest.$ac_objext conftest.$ac_ext
14832 echo "$as_me:14832: result: $cf_cv_mbstate_t" >&5
14833 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
14835 if test "$cf_cv_mbstate_t" = yes ; then
14836 cat >>confdefs.h <<\EOF
14837 #define NEED_WCHAR_H 1
14843 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
14844 if test "$cf_cv_mbstate_t" = unknown ; then
14845 NCURSES_MBSTATE_T=1
14848 # if we find mbstate_t in either place, use substitution to provide a fallback.
14849 if test "$cf_cv_mbstate_t" != unknown ; then
14850 NCURSES_OK_MBSTATE_T=1
14853 # This is needed on Tru64 5.0 to declare wchar_t
14854 echo "$as_me:14854: checking if we must include wchar.h to declare wchar_t" >&5
14855 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
14856 if test "${cf_cv_wchar_t+set}" = set; then
14857 echo $ECHO_N "(cached) $ECHO_C" >&6
14860 cat >conftest.$ac_ext <<_ACEOF
14861 #line 14861 "configure"
14862 #include "confdefs.h"
14864 #include <stdlib.h>
14865 #include <stdarg.h>
14867 #ifdef HAVE_LIBUTF8_H
14868 #include <libutf8.h>
14878 rm -f conftest.$ac_objext
14879 if { (eval echo "$as_me:14879: \"$ac_compile\"") >&5
14880 (eval $ac_compile) 2>&5
14882 echo "$as_me:14882: \$? = $ac_status" >&5
14883 (exit $ac_status); } &&
14884 { ac_try='test -s conftest.$ac_objext'
14885 { (eval echo "$as_me:14885: \"$ac_try\"") >&5
14886 (eval $ac_try) 2>&5
14888 echo "$as_me:14888: \$? = $ac_status" >&5
14889 (exit $ac_status); }; }; then
14892 echo "$as_me: failed program was:" >&5
14893 cat conftest.$ac_ext >&5
14894 cat >conftest.$ac_ext <<_ACEOF
14895 #line 14895 "configure"
14896 #include "confdefs.h"
14898 #include <stdlib.h>
14899 #include <stdarg.h>
14902 #ifdef HAVE_LIBUTF8_H
14903 #include <libutf8.h>
14913 rm -f conftest.$ac_objext
14914 if { (eval echo "$as_me:14914: \"$ac_compile\"") >&5
14915 (eval $ac_compile) 2>&5
14917 echo "$as_me:14917: \$? = $ac_status" >&5
14918 (exit $ac_status); } &&
14919 { ac_try='test -s conftest.$ac_objext'
14920 { (eval echo "$as_me:14920: \"$ac_try\"") >&5
14921 (eval $ac_try) 2>&5
14923 echo "$as_me:14923: \$? = $ac_status" >&5
14924 (exit $ac_status); }; }; then
14927 echo "$as_me: failed program was:" >&5
14928 cat conftest.$ac_ext >&5
14929 cf_cv_wchar_t=unknown
14931 rm -f conftest.$ac_objext conftest.$ac_ext
14933 rm -f conftest.$ac_objext conftest.$ac_ext
14935 echo "$as_me:14935: result: $cf_cv_wchar_t" >&5
14936 echo "${ECHO_T}$cf_cv_wchar_t" >&6
14938 if test "$cf_cv_wchar_t" = yes ; then
14939 cat >>confdefs.h <<\EOF
14940 #define NEED_WCHAR_H 1
14946 # if we do not find wchar_t in either place, use substitution to provide a fallback.
14947 if test "$cf_cv_wchar_t" = unknown ; then
14951 # if we find wchar_t in either place, use substitution to provide a fallback.
14952 if test "$cf_cv_wchar_t" != unknown ; then
14953 NCURSES_OK_WCHAR_T=1
14956 # This is needed on Tru64 5.0 to declare wint_t
14957 echo "$as_me:14957: checking if we must include wchar.h to declare wint_t" >&5
14958 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
14959 if test "${cf_cv_wint_t+set}" = set; then
14960 echo $ECHO_N "(cached) $ECHO_C" >&6
14963 cat >conftest.$ac_ext <<_ACEOF
14964 #line 14964 "configure"
14965 #include "confdefs.h"
14967 #include <stdlib.h>
14968 #include <stdarg.h>
14970 #ifdef HAVE_LIBUTF8_H
14971 #include <libutf8.h>
14981 rm -f conftest.$ac_objext
14982 if { (eval echo "$as_me:14982: \"$ac_compile\"") >&5
14983 (eval $ac_compile) 2>&5
14985 echo "$as_me:14985: \$? = $ac_status" >&5
14986 (exit $ac_status); } &&
14987 { ac_try='test -s conftest.$ac_objext'
14988 { (eval echo "$as_me:14988: \"$ac_try\"") >&5
14989 (eval $ac_try) 2>&5
14991 echo "$as_me:14991: \$? = $ac_status" >&5
14992 (exit $ac_status); }; }; then
14995 echo "$as_me: failed program was:" >&5
14996 cat conftest.$ac_ext >&5
14997 cat >conftest.$ac_ext <<_ACEOF
14998 #line 14998 "configure"
14999 #include "confdefs.h"
15001 #include <stdlib.h>
15002 #include <stdarg.h>
15005 #ifdef HAVE_LIBUTF8_H
15006 #include <libutf8.h>
15016 rm -f conftest.$ac_objext
15017 if { (eval echo "$as_me:15017: \"$ac_compile\"") >&5
15018 (eval $ac_compile) 2>&5
15020 echo "$as_me:15020: \$? = $ac_status" >&5
15021 (exit $ac_status); } &&
15022 { ac_try='test -s conftest.$ac_objext'
15023 { (eval echo "$as_me:15023: \"$ac_try\"") >&5
15024 (eval $ac_try) 2>&5
15026 echo "$as_me:15026: \$? = $ac_status" >&5
15027 (exit $ac_status); }; }; then
15030 echo "$as_me: failed program was:" >&5
15031 cat conftest.$ac_ext >&5
15032 cf_cv_wint_t=unknown
15034 rm -f conftest.$ac_objext conftest.$ac_ext
15036 rm -f conftest.$ac_objext conftest.$ac_ext
15038 echo "$as_me:15038: result: $cf_cv_wint_t" >&5
15039 echo "${ECHO_T}$cf_cv_wint_t" >&6
15041 if test "$cf_cv_wint_t" = yes ; then
15042 cat >>confdefs.h <<\EOF
15043 #define NEED_WCHAR_H 1
15049 # if we do not find wint_t in either place, use substitution to provide a fallback.
15050 if test "$cf_cv_wint_t" = unknown ; then
15054 # if we find wint_t in either place, use substitution to provide a fallback.
15055 if test "$cf_cv_wint_t" != unknown ; then
15056 NCURSES_OK_WINT_T=1
15059 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
15061 echo "$as_me:15061: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15062 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15063 cat >conftest.$ac_ext <<_ACEOF
15064 #line 15064 "configure"
15065 #include "confdefs.h"
15067 #ifndef _XOPEN_SOURCE_EXTENDED
15068 #define _XOPEN_SOURCE_EXTENDED
15070 #include <${cf_cv_ncurses_header:-curses.h}>
15081 rm -f conftest.$ac_objext
15082 if { (eval echo "$as_me:15082: \"$ac_compile\"") >&5
15083 (eval $ac_compile) 2>&5
15085 echo "$as_me:15085: \$? = $ac_status" >&5
15086 (exit $ac_status); } &&
15087 { ac_try='test -s conftest.$ac_objext'
15088 { (eval echo "$as_me:15088: \"$ac_try\"") >&5
15089 (eval $ac_try) 2>&5
15091 echo "$as_me:15091: \$? = $ac_status" >&5
15092 (exit $ac_status); }; }; then
15095 echo "$as_me: failed program was:" >&5
15096 cat conftest.$ac_ext >&5
15099 rm -f conftest.$ac_objext conftest.$ac_ext
15100 echo "$as_me:15100: result: $cf_result" >&5
15101 echo "${ECHO_T}$cf_result" >&6
15102 if test $cf_result = yes ; then
15104 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15106 cat >>confdefs.h <<EOF
15107 #define $cf_result 1
15111 cat >>confdefs.h <<EOF
15112 #define mbstate_t long
15119 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
15121 echo "$as_me:15121: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15122 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15123 cat >conftest.$ac_ext <<_ACEOF
15124 #line 15124 "configure"
15125 #include "confdefs.h"
15127 #ifndef _XOPEN_SOURCE_EXTENDED
15128 #define _XOPEN_SOURCE_EXTENDED
15130 #include <${cf_cv_ncurses_header:-curses.h}>
15141 rm -f conftest.$ac_objext
15142 if { (eval echo "$as_me:15142: \"$ac_compile\"") >&5
15143 (eval $ac_compile) 2>&5
15145 echo "$as_me:15145: \$? = $ac_status" >&5
15146 (exit $ac_status); } &&
15147 { ac_try='test -s conftest.$ac_objext'
15148 { (eval echo "$as_me:15148: \"$ac_try\"") >&5
15149 (eval $ac_try) 2>&5
15151 echo "$as_me:15151: \$? = $ac_status" >&5
15152 (exit $ac_status); }; }; then
15155 echo "$as_me: failed program was:" >&5
15156 cat conftest.$ac_ext >&5
15159 rm -f conftest.$ac_objext conftest.$ac_ext
15160 echo "$as_me:15160: result: $cf_result" >&5
15161 echo "${ECHO_T}$cf_result" >&6
15162 if test $cf_result = yes ; then
15164 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15166 cat >>confdefs.h <<EOF
15167 #define $cf_result 1
15171 cat >>confdefs.h <<EOF
15172 #define wchar_t long
15179 if test "$NCURSES_OK_WINT_T" = 0 ; then
15181 echo "$as_me:15181: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15182 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15183 cat >conftest.$ac_ext <<_ACEOF
15184 #line 15184 "configure"
15185 #include "confdefs.h"
15187 #ifndef _XOPEN_SOURCE_EXTENDED
15188 #define _XOPEN_SOURCE_EXTENDED
15190 #include <${cf_cv_ncurses_header:-curses.h}>
15201 rm -f conftest.$ac_objext
15202 if { (eval echo "$as_me:15202: \"$ac_compile\"") >&5
15203 (eval $ac_compile) 2>&5
15205 echo "$as_me:15205: \$? = $ac_status" >&5
15206 (exit $ac_status); } &&
15207 { ac_try='test -s conftest.$ac_objext'
15208 { (eval echo "$as_me:15208: \"$ac_try\"") >&5
15209 (eval $ac_try) 2>&5
15211 echo "$as_me:15211: \$? = $ac_status" >&5
15212 (exit $ac_status); }; }; then
15215 echo "$as_me: failed program was:" >&5
15216 cat conftest.$ac_ext >&5
15219 rm -f conftest.$ac_objext conftest.$ac_ext
15220 echo "$as_me:15220: result: $cf_result" >&5
15221 echo "${ECHO_T}$cf_result" >&6
15222 if test $cf_result = yes ; then
15224 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15226 cat >>confdefs.h <<EOF
15227 #define $cf_result 1
15231 cat >>confdefs.h <<EOF
15232 #define wint_t long
15240 echo "$as_me:15240: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
15241 echo $ECHO_N "checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15243 cat >conftest.$ac_ext <<_ACEOF
15244 #line 15244 "configure"
15245 #include "confdefs.h"
15247 #ifdef HAVE_XCURSES
15248 #include <xcurses.h>
15249 char * XCursesProgramName = "test";
15251 #include <${cf_cv_ncurses_header:-curses.h}>
15252 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15253 #include <ncursesw/term.h>
15254 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15255 #include <ncurses/term.h>
15256 #elif defined(HAVE_TERM_H)
15265 void *foo = &(boolnames)
15271 rm -f conftest.$ac_objext
15272 if { (eval echo "$as_me:15272: \"$ac_compile\"") >&5
15273 (eval $ac_compile) 2>&5
15275 echo "$as_me:15275: \$? = $ac_status" >&5
15276 (exit $ac_status); } &&
15277 { ac_try='test -s conftest.$ac_objext'
15278 { (eval echo "$as_me:15278: \"$ac_try\"") >&5
15279 (eval $ac_try) 2>&5
15281 echo "$as_me:15281: \$? = $ac_status" >&5
15282 (exit $ac_status); }; }; then
15285 echo "$as_me: failed program was:" >&5
15286 cat conftest.$ac_ext >&5
15289 rm -f conftest.$ac_objext conftest.$ac_ext
15290 echo "$as_me:15290: result: $cf_result" >&5
15291 echo "${ECHO_T}$cf_result" >&6
15293 if test $cf_result = yes ; then
15295 cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15297 cat >>confdefs.h <<EOF
15298 #define $cf_result 1
15302 echo "$as_me:15302: checking for data boolnames in library" >&5
15303 echo $ECHO_N "checking for data boolnames in library... $ECHO_C" >&6
15304 # BSD linkers insist on making weak linkage, but resolve at runtime.
15305 if test "$cross_compiling" = yes; then
15308 cat >conftest.$ac_ext <<_ACEOF
15309 #line 15309 "configure"
15310 #include "confdefs.h"
15312 #ifdef HAVE_XCURSES
15313 #include <xcurses.h>
15314 char * XCursesProgramName = "test";
15316 #include <${cf_cv_ncurses_header:-curses.h}>
15317 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15318 #include <ncursesw/term.h>
15319 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15320 #include <ncurses/term.h>
15321 #elif defined(HAVE_TERM_H)
15326 extern char boolnames;
15332 void *foo = &(boolnames);
15333 ${cf_cv_main_return:-return}(foo == 0);
15340 rm -f conftest.$ac_objext conftest$ac_exeext
15341 if { (eval echo "$as_me:15341: \"$ac_link\"") >&5
15342 (eval $ac_link) 2>&5
15344 echo "$as_me:15344: \$? = $ac_status" >&5
15345 (exit $ac_status); } &&
15346 { ac_try='test -s conftest$ac_exeext'
15347 { (eval echo "$as_me:15347: \"$ac_try\"") >&5
15348 (eval $ac_try) 2>&5
15350 echo "$as_me:15350: \$? = $ac_status" >&5
15351 (exit $ac_status); }; }; then
15354 echo "$as_me: failed program was:" >&5
15355 cat conftest.$ac_ext >&5
15358 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15361 cat >conftest.$ac_ext <<_ACEOF
15362 #line 15362 "configure"
15363 #include "confdefs.h"
15365 #ifdef HAVE_XCURSES
15366 #include <xcurses.h>
15367 char * XCursesProgramName = "test";
15369 #include <${cf_cv_ncurses_header:-curses.h}>
15370 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15371 #include <ncursesw/term.h>
15372 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15373 #include <ncurses/term.h>
15374 #elif defined(HAVE_TERM_H)
15379 extern char boolnames;
15382 void *foo = &(boolnames);
15383 ${cf_cv_main_return:-return}(foo == 0);
15386 rm -f conftest$ac_exeext
15387 if { (eval echo "$as_me:15387: \"$ac_link\"") >&5
15388 (eval $ac_link) 2>&5
15390 echo "$as_me:15390: \$? = $ac_status" >&5
15391 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15392 { (eval echo "$as_me:15392: \"$ac_try\"") >&5
15393 (eval $ac_try) 2>&5
15395 echo "$as_me:15395: \$? = $ac_status" >&5
15396 (exit $ac_status); }; }; then
15399 echo "$as_me: program exited with status $ac_status" >&5
15400 echo "$as_me: failed program was:" >&5
15401 cat conftest.$ac_ext >&5
15404 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15406 echo "$as_me:15406: result: $cf_result" >&5
15407 echo "${ECHO_T}$cf_result" >&6
15408 if test $cf_result = yes ; then
15410 cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15412 cat >>confdefs.h <<EOF
15413 #define $cf_result 1
15419 echo "$as_me:15419: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
15420 echo $ECHO_N "checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15422 cat >conftest.$ac_ext <<_ACEOF
15423 #line 15423 "configure"
15424 #include "confdefs.h"
15426 #ifdef HAVE_XCURSES
15427 #include <xcurses.h>
15428 char * XCursesProgramName = "test";
15430 #include <${cf_cv_ncurses_header:-curses.h}>
15431 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15432 #include <ncursesw/term.h>
15433 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15434 #include <ncurses/term.h>
15435 #elif defined(HAVE_TERM_H)
15444 void *foo = &(boolfnames)
15450 rm -f conftest.$ac_objext
15451 if { (eval echo "$as_me:15451: \"$ac_compile\"") >&5
15452 (eval $ac_compile) 2>&5
15454 echo "$as_me:15454: \$? = $ac_status" >&5
15455 (exit $ac_status); } &&
15456 { ac_try='test -s conftest.$ac_objext'
15457 { (eval echo "$as_me:15457: \"$ac_try\"") >&5
15458 (eval $ac_try) 2>&5
15460 echo "$as_me:15460: \$? = $ac_status" >&5
15461 (exit $ac_status); }; }; then
15464 echo "$as_me: failed program was:" >&5
15465 cat conftest.$ac_ext >&5
15468 rm -f conftest.$ac_objext conftest.$ac_ext
15469 echo "$as_me:15469: result: $cf_result" >&5
15470 echo "${ECHO_T}$cf_result" >&6
15472 if test $cf_result = yes ; then
15474 cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15476 cat >>confdefs.h <<EOF
15477 #define $cf_result 1
15481 echo "$as_me:15481: checking for data boolfnames in library" >&5
15482 echo $ECHO_N "checking for data boolfnames in library... $ECHO_C" >&6
15483 # BSD linkers insist on making weak linkage, but resolve at runtime.
15484 if test "$cross_compiling" = yes; then
15487 cat >conftest.$ac_ext <<_ACEOF
15488 #line 15488 "configure"
15489 #include "confdefs.h"
15491 #ifdef HAVE_XCURSES
15492 #include <xcurses.h>
15493 char * XCursesProgramName = "test";
15495 #include <${cf_cv_ncurses_header:-curses.h}>
15496 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15497 #include <ncursesw/term.h>
15498 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15499 #include <ncurses/term.h>
15500 #elif defined(HAVE_TERM_H)
15505 extern char boolfnames;
15511 void *foo = &(boolfnames);
15512 ${cf_cv_main_return:-return}(foo == 0);
15519 rm -f conftest.$ac_objext conftest$ac_exeext
15520 if { (eval echo "$as_me:15520: \"$ac_link\"") >&5
15521 (eval $ac_link) 2>&5
15523 echo "$as_me:15523: \$? = $ac_status" >&5
15524 (exit $ac_status); } &&
15525 { ac_try='test -s conftest$ac_exeext'
15526 { (eval echo "$as_me:15526: \"$ac_try\"") >&5
15527 (eval $ac_try) 2>&5
15529 echo "$as_me:15529: \$? = $ac_status" >&5
15530 (exit $ac_status); }; }; then
15533 echo "$as_me: failed program was:" >&5
15534 cat conftest.$ac_ext >&5
15537 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15540 cat >conftest.$ac_ext <<_ACEOF
15541 #line 15541 "configure"
15542 #include "confdefs.h"
15544 #ifdef HAVE_XCURSES
15545 #include <xcurses.h>
15546 char * XCursesProgramName = "test";
15548 #include <${cf_cv_ncurses_header:-curses.h}>
15549 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15550 #include <ncursesw/term.h>
15551 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15552 #include <ncurses/term.h>
15553 #elif defined(HAVE_TERM_H)
15558 extern char boolfnames;
15561 void *foo = &(boolfnames);
15562 ${cf_cv_main_return:-return}(foo == 0);
15565 rm -f conftest$ac_exeext
15566 if { (eval echo "$as_me:15566: \"$ac_link\"") >&5
15567 (eval $ac_link) 2>&5
15569 echo "$as_me:15569: \$? = $ac_status" >&5
15570 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15571 { (eval echo "$as_me:15571: \"$ac_try\"") >&5
15572 (eval $ac_try) 2>&5
15574 echo "$as_me:15574: \$? = $ac_status" >&5
15575 (exit $ac_status); }; }; then
15578 echo "$as_me: program exited with status $ac_status" >&5
15579 echo "$as_me: failed program was:" >&5
15580 cat conftest.$ac_ext >&5
15583 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15585 echo "$as_me:15585: result: $cf_result" >&5
15586 echo "${ECHO_T}$cf_result" >&6
15587 if test $cf_result = yes ; then
15589 cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15591 cat >>confdefs.h <<EOF
15592 #define $cf_result 1
15599 echo "$as_me:15599: checking for an rpath option" >&5
15600 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
15601 case $cf_cv_system_name in #(vi
15603 if test "$GCC" = yes; then
15604 LD_RPATH_OPT="-Wl,-rpath,"
15606 LD_RPATH_OPT="-rpath "
15609 linux*|gnu*|k*bsd*-gnu) #(vi
15610 LD_RPATH_OPT="-Wl,-rpath,"
15612 openbsd[2-9].*|mirbsd*) #(vi
15613 LD_RPATH_OPT="-Wl,-rpath,"
15615 dragonfly*|freebsd*) #(vi
15616 LD_RPATH_OPT="-rpath "
15619 LD_RPATH_OPT="-Wl,-rpath,"
15622 LD_RPATH_OPT="-rpath "
15630 echo "$as_me:15630: result: $LD_RPATH_OPT" >&5
15631 echo "${ECHO_T}$LD_RPATH_OPT" >&6
15633 case "x$LD_RPATH_OPT" in #(vi
15635 echo "$as_me:15635: checking if we need a space after rpath option" >&5
15636 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
15637 cf_save_LIBS="$LIBS"
15638 LIBS="${LD_RPATH_OPT}$libdir $LIBS"
15639 cat >conftest.$ac_ext <<_ACEOF
15640 #line 15640 "configure"
15641 #include "confdefs.h"
15651 rm -f conftest.$ac_objext conftest$ac_exeext
15652 if { (eval echo "$as_me:15652: \"$ac_link\"") >&5
15653 (eval $ac_link) 2>&5
15655 echo "$as_me:15655: \$? = $ac_status" >&5
15656 (exit $ac_status); } &&
15657 { ac_try='test -s conftest$ac_exeext'
15658 { (eval echo "$as_me:15658: \"$ac_try\"") >&5
15659 (eval $ac_try) 2>&5
15661 echo "$as_me:15661: \$? = $ac_status" >&5
15662 (exit $ac_status); }; }; then
15665 echo "$as_me: failed program was:" >&5
15666 cat conftest.$ac_ext >&5
15669 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15670 LIBS="$cf_save_LIBS"
15671 echo "$as_me:15671: result: $cf_rpath_space" >&5
15672 echo "${ECHO_T}$cf_rpath_space" >&6
15673 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
15677 echo "$as_me:15677: checking if rpath-hack should be disabled" >&5
15678 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
15680 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
15681 if test "${enable_rpath_hack+set}" = set; then
15682 enableval="$enable_rpath_hack"
15683 test "$enableval" != no && enableval=yes
15684 if test "$enableval" != "yes" ; then
15685 cf_disable_rpath_hack=yes
15687 cf_disable_rpath_hack=no
15691 cf_disable_rpath_hack=no
15694 echo "$as_me:15694: result: $cf_disable_rpath_hack" >&5
15695 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
15696 if test "$cf_disable_rpath_hack" = no ; then
15698 echo "$as_me:15698: checking for updated LDFLAGS" >&5
15699 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
15700 if test -n "$LD_RPATH_OPT" ; then
15701 echo "$as_me:15701: result: maybe" >&5
15702 echo "${ECHO_T}maybe" >&6
15706 # Extract the first word of "$ac_prog", so it can be a program name with args.
15707 set dummy $ac_prog; ac_word=$2
15708 echo "$as_me:15708: checking for $ac_word" >&5
15709 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15710 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
15711 echo $ECHO_N "(cached) $ECHO_C" >&6
15713 if test -n "$cf_ldd_prog"; then
15714 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
15716 ac_save_IFS=$IFS; IFS=$ac_path_separator
15718 for ac_dir in $ac_dummy; do
15720 test -z "$ac_dir" && ac_dir=.
15721 $as_executable_p "$ac_dir/$ac_word" || continue
15722 ac_cv_prog_cf_ldd_prog="$ac_prog"
15723 echo "$as_me:15723: found $ac_dir/$ac_word" >&5
15729 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
15730 if test -n "$cf_ldd_prog"; then
15731 echo "$as_me:15731: result: $cf_ldd_prog" >&5
15732 echo "${ECHO_T}$cf_ldd_prog" >&6
15734 echo "$as_me:15734: result: no" >&5
15735 echo "${ECHO_T}no" >&6
15738 test -n "$cf_ldd_prog" && break
15740 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
15742 cf_rpath_list="/usr/lib /lib"
15743 if test "$cf_ldd_prog" != no
15747 cat >conftest.$ac_ext <<_ACEOF
15748 #line 15748 "configure"
15749 #include "confdefs.h"
15759 rm -f conftest.$ac_objext conftest$ac_exeext
15760 if { (eval echo "$as_me:15760: \"$ac_link\"") >&5
15761 (eval $ac_link) 2>&5
15763 echo "$as_me:15763: \$? = $ac_status" >&5
15764 (exit $ac_status); } &&
15765 { ac_try='test -s conftest$ac_exeext'
15766 { (eval echo "$as_me:15766: \"$ac_try\"") >&5
15767 (eval $ac_try) 2>&5
15769 echo "$as_me:15769: \$? = $ac_status" >&5
15770 (exit $ac_status); }; }; then
15771 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
15772 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
15774 echo "$as_me: failed program was:" >&5
15775 cat conftest.$ac_ext >&5
15777 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15779 # If we passed the link-test, but get a "not found" on a given library,
15780 # this could be due to inept reconfiguration of gcc to make it only
15781 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
15782 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
15783 # /usr/local libraries.
15784 if test -n "$cf_rpath_oops"
15786 for cf_rpath_src in $cf_rpath_oops
15788 for cf_rpath_dir in \
15793 if test -f $cf_rpath_dir/lib/$cf_rpath_src
15795 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
15797 echo "${as_me:-configure}:15797: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
15799 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
15807 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
15809 echo "${as_me:-configure}:15809: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
15811 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
15813 echo "${as_me:-configure}:15813: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
15816 for cf_rpath_src in $LDFLAGS
15818 case $cf_rpath_src in #(vi
15821 # check if this refers to a directory which we will ignore
15823 if test -n "$cf_rpath_list"
15825 for cf_rpath_item in $cf_rpath_list
15827 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
15835 if test "$cf_rpath_skip" = no
15837 # transform the option
15838 if test "$LD_RPATH_OPT" = "-R " ; then
15839 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
15841 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
15844 # if we have not already added this, add it now
15845 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
15846 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
15848 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
15850 echo "${as_me:-configure}:15850: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
15852 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
15857 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
15859 LDFLAGS=$cf_rpath_dst
15861 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
15863 echo "${as_me:-configure}:15863: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
15865 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
15867 echo "${as_me:-configure}:15867: testing ...checking LIBS $LIBS ..." 1>&5
15870 for cf_rpath_src in $LIBS
15872 case $cf_rpath_src in #(vi
15875 # check if this refers to a directory which we will ignore
15877 if test -n "$cf_rpath_list"
15879 for cf_rpath_item in $cf_rpath_list
15881 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
15889 if test "$cf_rpath_skip" = no
15891 # transform the option
15892 if test "$LD_RPATH_OPT" = "-R " ; then
15893 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
15895 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
15898 # if we have not already added this, add it now
15899 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
15900 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
15902 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
15904 echo "${as_me:-configure}:15904: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
15906 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
15911 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
15915 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
15917 echo "${as_me:-configure}:15917: testing ...checked LIBS $LIBS ..." 1>&5
15919 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
15921 echo "${as_me:-configure}:15921: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
15930 ac_config_files="$ac_config_files Makefile"
15931 ac_config_commands="$ac_config_commands default"
15932 cat >confcache <<\_ACEOF
15933 # This file is a shell script that caches the results of configure
15934 # tests run on this system so they can be shared between configure
15935 # scripts and configure runs, see configure's option --config-cache.
15936 # It is not useful on other systems. If it contains results you don't
15937 # want to keep, you may remove or edit it.
15939 # config.status only pays attention to the cache file if you give it
15940 # the --recheck option to rerun configure.
15942 # `ac_cv_env_foo' variables (set or unset) will be overriden when
15943 # loading this file, other *unset* `ac_cv_foo' will be assigned the
15944 # following values.
15948 # The following way of writing the cache mishandles newlines in values,
15949 # but we know of no workaround that is simple, portable, and efficient.
15950 # So, don't put newlines in cache variables' values.
15951 # Ultrix sh set writes to stderr and can't be redirected directly,
15952 # and sets the high bit in the cache file unless we assign to the vars.
15955 case `(ac_space=' '; set | grep ac_space) 2>&1` in
15957 # `set' does not quote correctly, so add quotes (double-quote
15958 # substitution turns \\\\ into \\, and sed turns \\ into \).
15961 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
15964 # `set' quotes correctly as required by POSIX, so do not add quotes.
15966 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
15973 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15975 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15977 if cmp -s $cache_file confcache; then :; else
15978 if test -w $cache_file; then
15979 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
15980 cat confcache >$cache_file
15982 echo "not updating unwritable cache $cache_file"
15987 test "x$prefix" = xNONE && prefix=$ac_default_prefix
15988 # Let make expand exec_prefix.
15989 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15991 # VPATH may cause trouble with some makes, so we remove $(srcdir),
15992 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
15993 # trailing colons and then remove the whole line if VPATH becomes empty
15994 # (actually we leave an empty line to preserve line numbers).
15995 if test "x$srcdir" = x.; then
15996 ac_vpsub='/^[ ]*VPATH[ ]*=/{
15997 s/:*\$(srcdir):*/:/;
15998 s/:*\${srcdir}:*/:/;
16000 s/^\([^=]*=[ ]*\):*/\1/;
16006 DEFS=-DHAVE_CONFIG_H
16008 : ${CONFIG_STATUS=./config.status}
16009 ac_clean_files_save=$ac_clean_files
16010 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16011 { echo "$as_me:16011: creating $CONFIG_STATUS" >&5
16012 echo "$as_me: creating $CONFIG_STATUS" >&6;}
16013 cat >$CONFIG_STATUS <<_ACEOF
16015 # Generated automatically by configure.
16016 # Run this file to recreate the current configuration.
16017 # Compiler output produced by configure, useful for debugging
16018 # configure, is in config.log if it exists.
16021 SHELL=\${CONFIG_SHELL-$SHELL}
16022 ac_cs_invocation="\$0 \$@"
16026 cat >>$CONFIG_STATUS <<\_ACEOF
16027 # Be Bourne compatible
16028 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16031 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16035 # Name of the executable.
16036 as_me=`echo "$0" |sed 's,.*[\\/],,'`
16038 if expr a : '\(a\)' >/dev/null 2>&1; then
16044 rm -f conf$$ conf$$.exe conf$$.file
16046 if ln -s conf$$.file conf$$ 2>/dev/null; then
16047 # We could just check for DJGPP; but this test a) works b) is more generic
16048 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16049 if test -f conf$$.exe; then
16050 # Don't use ln at all; we don't have any links
16055 elif ln conf$$.file conf$$ 2>/dev/null; then
16060 rm -f conf$$ conf$$.exe conf$$.file
16062 as_executable_p="test -f"
16064 # Support unset when possible.
16065 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16072 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
16073 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
16074 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
16075 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
16076 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
16077 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
16078 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
16079 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
16082 # We need space, tab and new line, in precisely that order.
16088 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
16094 # Files that config.status was made for.
16095 if test -n "$ac_config_files"; then
16096 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16099 if test -n "$ac_config_headers"; then
16100 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16103 if test -n "$ac_config_links"; then
16104 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16107 if test -n "$ac_config_commands"; then
16108 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16111 cat >>$CONFIG_STATUS <<\EOF
16114 \`$as_me' instantiates files from templates according to the
16115 current configuration.
16117 Usage: $0 [OPTIONS] [FILE]...
16119 -h, --help print this help, then exit
16120 -V, --version print version number, then exit
16121 -d, --debug don't remove temporary files
16122 --recheck update $as_me by reconfiguring in the same conditions
16123 --file=FILE[:TEMPLATE]
16124 instantiate the configuration file FILE
16125 --header=FILE[:TEMPLATE]
16126 instantiate the configuration header FILE
16128 Configuration files:
16131 Configuration headers:
16134 Configuration commands:
16137 Report bugs to <dickey@invisible-island.net>."
16140 cat >>$CONFIG_STATUS <<EOF
16143 configured by $0, generated by GNU Autoconf 2.52.20101002,
16144 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16146 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16147 Free Software Foundation, Inc.
16148 This config.status script is free software; the Free Software Foundation
16149 gives unlimited permission to copy, distribute and modify it."
16154 cat >>$CONFIG_STATUS <<\EOF
16155 # If no file are specified by the user, then we need to provide default
16156 # value. By we need to know if files were specified by the user.
16162 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16163 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16165 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16169 *) # This is not an option, so the user has probably given explicit
16171 ac_need_defaults=false;;
16175 # Handling of the options.
16177 cat >>$CONFIG_STATUS <<EOF
16178 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16179 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16180 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16182 cat >>$CONFIG_STATUS <<\EOF
16183 --version | --vers* | -V )
16184 echo "$ac_cs_version"; exit 0 ;;
16186 # Conflict between --help and --header
16187 { { echo "$as_me:16187: error: ambiguous option: $1
16188 Try \`$0 --help' for more information." >&5
16189 echo "$as_me: error: ambiguous option: $1
16190 Try \`$0 --help' for more information." >&2;}
16191 { (exit 1); exit 1; }; };;
16192 --help | --hel | -h )
16193 echo "$ac_cs_usage"; exit 0 ;;
16194 --debug | --d* | -d )
16196 --file | --fil | --fi | --f )
16198 CONFIG_FILES="$CONFIG_FILES $1"
16199 ac_need_defaults=false;;
16200 --header | --heade | --head | --hea )
16202 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16203 ac_need_defaults=false;;
16205 # This is an error.
16206 -*) { { echo "$as_me:16206: error: unrecognized option: $1
16207 Try \`$0 --help' for more information." >&5
16208 echo "$as_me: error: unrecognized option: $1
16209 Try \`$0 --help' for more information." >&2;}
16210 { (exit 1); exit 1; }; } ;;
16212 *) ac_config_targets="$ac_config_targets $1" ;;
16221 ## ----------------------- ##
16222 ## Running config.status. ##
16223 ## ----------------------- ##
16225 This file was extended by $as_me 2.52.20101002, executed with
16226 CONFIG_FILES = $CONFIG_FILES
16227 CONFIG_HEADERS = $CONFIG_HEADERS
16228 CONFIG_LINKS = $CONFIG_LINKS
16229 CONFIG_COMMANDS = $CONFIG_COMMANDS
16230 > $ac_cs_invocation
16231 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16236 cat >>$CONFIG_STATUS <<EOF
16238 # INIT-COMMANDS section.
16246 cat >>$CONFIG_STATUS <<\EOF
16247 for ac_config_target in $ac_config_targets
16249 case "$ac_config_target" in
16250 # Handling of arguments.
16251 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16252 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16253 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
16254 *) { { echo "$as_me:16254: error: invalid argument: $ac_config_target" >&5
16255 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16256 { (exit 1); exit 1; }; };;
16260 # If the user did not use the arguments to specify the items to instantiate,
16261 # then the envvar interface is used. Set only those that are not.
16262 # We use the long form for the default assignment because of an extremely
16263 # bizarre bug on SunOS 4.1.3.
16264 if $ac_need_defaults; then
16265 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16266 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16267 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16270 # Create a temporary directory, and hook for its removal unless debugging.
16273 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16274 trap '{ (exit 1); exit 1; }' 1 2 13 15
16277 # Create a (secure) tmp directory for tmp files.
16280 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16281 test -n "$tmp" && test -d "$tmp"
16284 tmp=$TMPDIR/cs$$-$RANDOM
16285 (umask 077 && mkdir $tmp)
16288 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16289 { (exit 1); exit 1; }
16294 cat >>$CONFIG_STATUS <<EOF
16297 # CONFIG_FILES section.
16300 # No need to generate the scripts if there are no CONFIG_FILES.
16301 # This happens for instance when ./config.status config.h
16302 if test -n "\$CONFIG_FILES"; then
16303 # Protect against being on the right side of a sed subst in config.status.
16304 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16305 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16306 s,@SHELL@,$SHELL,;t t
16307 s,@exec_prefix@,$exec_prefix,;t t
16308 s,@prefix@,$prefix,;t t
16309 s,@program_transform_name@,$program_transform_name,;t t
16310 s,@bindir@,$bindir,;t t
16311 s,@sbindir@,$sbindir,;t t
16312 s,@libexecdir@,$libexecdir,;t t
16313 s,@datadir@,$datadir,;t t
16314 s,@sysconfdir@,$sysconfdir,;t t
16315 s,@sharedstatedir@,$sharedstatedir,;t t
16316 s,@localstatedir@,$localstatedir,;t t
16317 s,@libdir@,$libdir,;t t
16318 s,@includedir@,$includedir,;t t
16319 s,@oldincludedir@,$oldincludedir,;t t
16320 s,@infodir@,$infodir,;t t
16321 s,@mandir@,$mandir,;t t
16322 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16323 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16324 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16325 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16326 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16327 s,@build_alias@,$build_alias,;t t
16328 s,@host_alias@,$host_alias,;t t
16329 s,@target_alias@,$target_alias,;t t
16330 s,@ECHO_C@,$ECHO_C,;t t
16331 s,@ECHO_N@,$ECHO_N,;t t
16332 s,@ECHO_T@,$ECHO_T,;t t
16333 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16334 s,@DEFS@,$DEFS,;t t
16335 s,@LIBS@,$LIBS,;t t
16336 s,@build@,$build,;t t
16337 s,@build_cpu@,$build_cpu,;t t
16338 s,@build_vendor@,$build_vendor,;t t
16339 s,@build_os@,$build_os,;t t
16340 s,@host@,$host,;t t
16341 s,@host_cpu@,$host_cpu,;t t
16342 s,@host_vendor@,$host_vendor,;t t
16343 s,@host_os@,$host_os,;t t
16344 s,@SET_MAKE@,$SET_MAKE,;t t
16346 s,@CFLAGS@,$CFLAGS,;t t
16347 s,@LDFLAGS@,$LDFLAGS,;t t
16348 s,@CPPFLAGS@,$CPPFLAGS,;t t
16349 s,@ac_ct_CC@,$ac_ct_CC,;t t
16350 s,@EXEEXT@,$EXEEXT,;t t
16351 s,@OBJEXT@,$OBJEXT,;t t
16354 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16355 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16356 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16357 s,@LINT@,$LINT,;t t
16358 s,@LINT_OPTS@,$LINT_OPTS,;t t
16359 s,@CTAGS@,$CTAGS,;t t
16360 s,@ETAGS@,$ETAGS,;t t
16361 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16362 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16363 s,@MATH_LIB@,$MATH_LIB,;t t
16364 s,@top_builddir@,$top_builddir,;t t
16365 s,@CC_G_OPT@,$CC_G_OPT,;t t
16366 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16367 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16368 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
16369 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
16371 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
16372 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
16373 s,@LD_MODEL@,$LD_MODEL,;t t
16374 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16375 s,@LIBTOOL@,$LIBTOOL,;t t
16376 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
16377 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
16378 s,@LIB_LINK@,$LIB_LINK,;t t
16379 s,@LINK_TESTS@,$LINK_TESTS,;t t
16380 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16381 s,@PTHREAD@,$PTHREAD,;t t
16382 s,@TEST_ARGS@,$TEST_ARGS,;t t
16383 s,@TEST_DEPS@,$TEST_DEPS,;t t
16384 s,@TEST_LIBS@,$TEST_LIBS,;t t
16385 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
16386 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
16387 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
16388 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
16389 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16390 s,@ECHO_LT@,$ECHO_LT,;t t
16391 s,@ECHO_LD@,$ECHO_LD,;t t
16392 s,@RULE_CC@,$RULE_CC,;t t
16393 s,@SHOW_CC@,$SHOW_CC,;t t
16394 s,@ECHO_CC@,$ECHO_CC,;t t
16395 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16396 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
16397 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
16398 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
16399 s,@X_CFLAGS@,$X_CFLAGS,;t t
16400 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
16401 s,@X_LIBS@,$X_LIBS,;t t
16402 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
16403 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
16404 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
16405 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
16406 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16411 cat >>$CONFIG_STATUS <<\EOF
16412 # Split the substitutions into bite-sized pieces for seds with
16413 # small command number limits, like on Digital OSF/1 and HP-UX.
16414 ac_max_sed_lines=48
16415 ac_sed_frag=1 # Number of current file.
16416 ac_beg=1 # First line for current file.
16417 ac_end=$ac_max_sed_lines # Line after last line for current file.
16420 while $ac_more_lines; do
16421 if test $ac_beg -gt 1; then
16422 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16424 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16426 if test ! -s $tmp/subs.frag; then
16427 ac_more_lines=false
16429 # The purpose of the label and of the branching condition is to
16430 # speed up the sed processing (if there are no `@' at all, there
16431 # is no need to browse any of the substitutions).
16432 # These are the two extra sed commands mentioned above.
16434 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16435 if test -z "$ac_sed_cmds"; then
16436 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16438 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16440 ac_sed_frag=`expr $ac_sed_frag + 1`
16442 ac_end=`expr $ac_end + $ac_max_sed_lines`
16445 if test -z "$ac_sed_cmds"; then
16448 fi # test -n "$CONFIG_FILES"
16451 cat >>$CONFIG_STATUS <<\EOF
16452 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16453 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16455 - | *:- | *:-:* ) # input from stdin
16457 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16458 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16459 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16460 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16461 * ) ac_file_in=$ac_file.in ;;
16464 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16465 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16466 X"$ac_file" : 'X\(//\)[^/]' \| \
16467 X"$ac_file" : 'X\(//\)$' \| \
16468 X"$ac_file" : 'X\(/\)' \| \
16469 . : '\(.\)' 2>/dev/null ||
16471 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16472 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16473 /^X\(\/\/\)$/{ s//\1/; q; }
16474 /^X\(\/\).*/{ s//\1/; q; }
16476 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16477 { case "$ac_dir" in
16478 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16482 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16483 case $as_mkdir_dir in
16484 # Skip DOS drivespec
16485 ?:) as_incr_dir=$as_mkdir_dir ;;
16487 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16488 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16493 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16494 # A "../" for each directory in $ac_dir_suffix.
16495 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16497 ac_dir_suffix= ac_dots=
16502 if test -z "$ac_dots"; then
16505 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16507 [\\/]* | ?:[\\/]* )
16508 ac_srcdir=$srcdir$ac_dir_suffix;
16509 ac_top_srcdir=$srcdir ;;
16510 *) # Relative path.
16511 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16512 ac_top_srcdir=$ac_dots$srcdir ;;
16516 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16517 *) ac_INSTALL=$ac_dots$INSTALL ;;
16520 if test x"$ac_file" != x-; then
16521 { echo "$as_me:16521: creating $ac_file" >&5
16522 echo "$as_me: creating $ac_file" >&6;}
16525 # Let's still pretend it is `configure' which instantiates (i.e., don't
16526 # use $as_me), people would be surprised to read:
16527 # /* config.h. Generated automatically by config.status. */
16528 configure_input="Generated automatically from `echo $ac_file_in |
16529 sed 's,.*/,,'` by configure."
16531 # First look for the input files in the build tree, otherwise in the
16533 ac_file_inputs=`IFS=:
16534 for f in $ac_file_in; do
16536 -) echo $tmp/stdin ;;
16538 # Absolute (can't be DOS-style, as IFS=:)
16539 test -f "$f" || { { echo "$as_me:16539: error: cannot find input file: $f" >&5
16540 echo "$as_me: error: cannot find input file: $f" >&2;}
16541 { (exit 1); exit 1; }; }
16544 if test -f "$f"; then
16547 elif test -f "$srcdir/$f"; then
16552 { { echo "$as_me:16552: error: cannot find input file: $f" >&5
16553 echo "$as_me: error: cannot find input file: $f" >&2;}
16554 { (exit 1); exit 1; }; }
16557 done` || { (exit 1); exit 1; }
16559 cat >>$CONFIG_STATUS <<EOF
16563 cat >>$CONFIG_STATUS <<\EOF
16565 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
16566 s,@configure_input@,$configure_input,;t t
16567 s,@srcdir@,$ac_srcdir,;t t
16568 s,@top_srcdir@,$ac_top_srcdir,;t t
16569 s,@INSTALL@,$ac_INSTALL,;t t
16570 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
16572 if test x"$ac_file" != x-; then
16573 mv $tmp/out $ac_file
16581 cat >>$CONFIG_STATUS <<\EOF
16584 # CONFIG_HEADER section.
16587 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
16588 # NAME is the cpp macro being defined and VALUE is the value it is being given.
16590 # ac_d sets the value in "#define NAME VALUE" lines.
16591 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
16592 ac_dB='[ ].*$,\1#\2'
16595 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
16596 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16597 ac_iB='\([ ]\),\1#\2define\3'
16600 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
16601 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
16602 ac_uB='$,\1#\2define\3'
16606 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
16607 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16609 - | *:- | *:-:* ) # input from stdin
16611 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16612 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16613 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16614 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16615 * ) ac_file_in=$ac_file.in ;;
16618 test x"$ac_file" != x- && { echo "$as_me:16618: creating $ac_file" >&5
16619 echo "$as_me: creating $ac_file" >&6;}
16621 # First look for the input files in the build tree, otherwise in the
16623 ac_file_inputs=`IFS=:
16624 for f in $ac_file_in; do
16626 -) echo $tmp/stdin ;;
16628 # Absolute (can't be DOS-style, as IFS=:)
16629 test -f "$f" || { { echo "$as_me:16629: error: cannot find input file: $f" >&5
16630 echo "$as_me: error: cannot find input file: $f" >&2;}
16631 { (exit 1); exit 1; }; }
16634 if test -f "$f"; then
16637 elif test -f "$srcdir/$f"; then
16642 { { echo "$as_me:16642: error: cannot find input file: $f" >&5
16643 echo "$as_me: error: cannot find input file: $f" >&2;}
16644 { (exit 1); exit 1; }; }
16647 done` || { (exit 1); exit 1; }
16648 # Remove the trailing spaces.
16649 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
16653 # Transform confdefs.h into a list of #define's. We won't use it as a sed
16654 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
16655 # be either 'cat' or 'sort'.
16656 cat confdefs.h | uniq >conftest.vals
16658 # Break up conftest.vals because some shells have a limit on
16659 # the size of here documents, and old seds have small limits too.
16661 rm -f conftest.tail
16662 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
16663 while grep . conftest.vals >/dev/null
16665 # Write chunks of a limited-size here document to conftest.frag.
16666 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
16667 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
16668 echo 'CEOF' >> $CONFIG_STATUS
16669 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
16670 rm -f conftest.vals
16671 mv conftest.tail conftest.vals
16673 rm -f conftest.vals
16675 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
16677 echo ' cat >> conftest.edit <<CEOF
16678 /@DEFS@/r conftest.frag
16681 sed -f conftest.edit $tmp/in > $tmp/out
16683 mv $tmp/out $tmp/in
16684 rm -f conftest.edit conftest.frag
16685 ' >> $CONFIG_STATUS
16687 cat >>$CONFIG_STATUS <<\EOF
16688 # Let's still pretend it is `configure' which instantiates (i.e., don't
16689 # use $as_me), people would be surprised to read:
16690 # /* config.h. Generated automatically by config.status. */
16691 if test x"$ac_file" = x-; then
16692 echo "/* Generated automatically by configure. */" >$tmp/config.h
16694 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
16696 cat $tmp/in >>$tmp/config.h
16698 if test x"$ac_file" != x-; then
16699 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
16700 { echo "$as_me:16700: $ac_file is unchanged" >&5
16701 echo "$as_me: $ac_file is unchanged" >&6;}
16703 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16704 X"$ac_file" : 'X\(//\)[^/]' \| \
16705 X"$ac_file" : 'X\(//\)$' \| \
16706 X"$ac_file" : 'X\(/\)' \| \
16707 . : '\(.\)' 2>/dev/null ||
16709 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16710 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16711 /^X\(\/\/\)$/{ s//\1/; q; }
16712 /^X\(\/\).*/{ s//\1/; q; }
16714 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16715 { case "$ac_dir" in
16716 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16720 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16721 case $as_mkdir_dir in
16722 # Skip DOS drivespec
16723 ?:) as_incr_dir=$as_mkdir_dir ;;
16725 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16726 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16733 mv $tmp/config.h $ac_file
16737 rm -f $tmp/config.h
16741 cat >>$CONFIG_STATUS <<\EOF
16743 # CONFIG_COMMANDS section.
16745 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
16746 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
16747 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
16754 if test ! -d $srcdir/$cf_dir; then
16756 elif test -f $srcdir/$cf_dir/programs; then
16757 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
16761 cat >>Makefile <<TEST_EOF
16763 # These rules are generated so we do not rely on suffix rules, which do not
16764 # work consistently for different make-programs (the '\$(MODEL)/' confuses
16765 # some, and the '\$x' confuses others).
16768 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
16771 cat >>Makefile <<TEST_EOF
16773 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
16774 \$(srcdir)/test.priv.h \\
16776 @echo compiling $N; \$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
16780 if test -f ../config.guess && test -f ../config.sub
16782 cat >>Makefile <<TEST_EOF
16784 # if we used CF_INHERIT for getting these files, we can remove them
16786 rm -f config.guess config.sub
16794 cat >>$CONFIG_STATUS <<\EOF
16796 { (exit 0); exit 0; }
16798 chmod +x $CONFIG_STATUS
16799 ac_clean_files=$ac_clean_files_save
16801 # configure is writing to config.log, and then calls config.status.
16802 # config.status does its own redirection, appending to config.log.
16803 # Unfortunately, on DOS this fails, as config.log is still kept open
16804 # by configure, so config.status won't be able to write to it; its
16805 # output is simply discarded. So we exec the FD to /dev/null,
16806 # effectively closing config.log, so it can be properly (re)opened and
16807 # appended to by config.status. When coming back to configure, we
16808 # need to make the FD available again.
16809 if test "$no_create" != yes; then
16812 $SHELL $CONFIG_STATUS || ac_cs_success=false
16814 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16815 # would make configure fail if this is the last instruction.
16816 $ac_cs_success || { (exit 1); exit 1; }