2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by Autoconf 2.52.20120310.
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
657 --with-ncurses use ncurses-libraries
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.20120310. 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"
2928 freebsd*|dragonfly*) #(vi
2929 # 5.x headers associate
2930 # _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2931 # _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2932 cf_POSIX_C_SOURCE=200112L
2934 cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2937 cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2940 cf_xopen_source="-D_HPUX_SOURCE"
2943 cf_xopen_source="-D_SGI_SOURCE"
2946 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
2948 echo "$as_me:2948: checking if we must define _GNU_SOURCE" >&5
2949 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2950 if test "${cf_cv_gnu_source+set}" = set; then
2951 echo $ECHO_N "(cached) $ECHO_C" >&6
2954 cat >conftest.$ac_ext <<_ACEOF
2955 #line 2955 "configure"
2956 #include "confdefs.h"
2957 #include <sys/types.h>
2962 #ifndef _XOPEN_SOURCE
2969 rm -f conftest.$ac_objext
2970 if { (eval echo "$as_me:2970: \"$ac_compile\"") >&5
2971 (eval $ac_compile) 2>&5
2973 echo "$as_me:2973: \$? = $ac_status" >&5
2974 (exit $ac_status); } &&
2975 { ac_try='test -s conftest.$ac_objext'
2976 { (eval echo "$as_me:2976: \"$ac_try\"") >&5
2979 echo "$as_me:2979: \$? = $ac_status" >&5
2980 (exit $ac_status); }; }; then
2983 echo "$as_me: failed program was:" >&5
2984 cat conftest.$ac_ext >&5
2986 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2987 cat >conftest.$ac_ext <<_ACEOF
2988 #line 2988 "configure"
2989 #include "confdefs.h"
2990 #include <sys/types.h>
2995 #ifdef _XOPEN_SOURCE
3002 rm -f conftest.$ac_objext
3003 if { (eval echo "$as_me:3003: \"$ac_compile\"") >&5
3004 (eval $ac_compile) 2>&5
3006 echo "$as_me:3006: \$? = $ac_status" >&5
3007 (exit $ac_status); } &&
3008 { ac_try='test -s conftest.$ac_objext'
3009 { (eval echo "$as_me:3009: \"$ac_try\"") >&5
3012 echo "$as_me:3012: \$? = $ac_status" >&5
3013 (exit $ac_status); }; }; then
3016 echo "$as_me: failed program was:" >&5
3017 cat conftest.$ac_ext >&5
3018 cf_cv_gnu_source=yes
3020 rm -f conftest.$ac_objext conftest.$ac_ext
3024 rm -f conftest.$ac_objext conftest.$ac_ext
3027 echo "$as_me:3027: result: $cf_cv_gnu_source" >&5
3028 echo "${ECHO_T}$cf_cv_gnu_source" >&6
3029 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
3033 # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3036 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3038 cf_save_CFLAGS="$CFLAGS"
3039 cf_save_CPPFLAGS="$CPPFLAGS"
3041 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3042 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3043 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3045 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3046 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3047 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3049 echo "$as_me:3049: checking if we should define _POSIX_C_SOURCE" >&5
3050 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3051 if test "${cf_cv_posix_c_source+set}" = set; then
3052 echo $ECHO_N "(cached) $ECHO_C" >&6
3055 echo "${as_me:-configure}:3055: testing if the symbol is already defined go no further ..." 1>&5
3057 cat >conftest.$ac_ext <<_ACEOF
3058 #line 3058 "configure"
3059 #include "confdefs.h"
3060 #include <sys/types.h>
3065 #ifndef _POSIX_C_SOURCE
3072 rm -f conftest.$ac_objext
3073 if { (eval echo "$as_me:3073: \"$ac_compile\"") >&5
3074 (eval $ac_compile) 2>&5
3076 echo "$as_me:3076: \$? = $ac_status" >&5
3077 (exit $ac_status); } &&
3078 { ac_try='test -s conftest.$ac_objext'
3079 { (eval echo "$as_me:3079: \"$ac_try\"") >&5
3082 echo "$as_me:3082: \$? = $ac_status" >&5
3083 (exit $ac_status); }; }; then
3084 cf_cv_posix_c_source=no
3086 echo "$as_me: failed program was:" >&5
3087 cat conftest.$ac_ext >&5
3088 cf_want_posix_source=no
3089 case .$cf_POSIX_C_SOURCE in #(vi
3091 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3094 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3095 cf_want_posix_source=yes
3098 cf_want_posix_source=yes
3101 if test "$cf_want_posix_source" = yes ; then
3102 cat >conftest.$ac_ext <<_ACEOF
3103 #line 3103 "configure"
3104 #include "confdefs.h"
3105 #include <sys/types.h>
3110 #ifdef _POSIX_SOURCE
3117 rm -f conftest.$ac_objext
3118 if { (eval echo "$as_me:3118: \"$ac_compile\"") >&5
3119 (eval $ac_compile) 2>&5
3121 echo "$as_me:3121: \$? = $ac_status" >&5
3122 (exit $ac_status); } &&
3123 { ac_try='test -s conftest.$ac_objext'
3124 { (eval echo "$as_me:3124: \"$ac_try\"") >&5
3127 echo "$as_me:3127: \$? = $ac_status" >&5
3128 (exit $ac_status); }; }; then
3131 echo "$as_me: failed program was:" >&5
3132 cat conftest.$ac_ext >&5
3133 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3135 rm -f conftest.$ac_objext conftest.$ac_ext
3138 echo "${as_me:-configure}:3138: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3140 CFLAGS="$cf_trim_CFLAGS"
3141 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3143 echo "${as_me:-configure}:3143: testing if the second compile does not leave our definition intact error ..." 1>&5
3145 cat >conftest.$ac_ext <<_ACEOF
3146 #line 3146 "configure"
3147 #include "confdefs.h"
3148 #include <sys/types.h>
3153 #ifndef _POSIX_C_SOURCE
3160 rm -f conftest.$ac_objext
3161 if { (eval echo "$as_me:3161: \"$ac_compile\"") >&5
3162 (eval $ac_compile) 2>&5
3164 echo "$as_me:3164: \$? = $ac_status" >&5
3165 (exit $ac_status); } &&
3166 { ac_try='test -s conftest.$ac_objext'
3167 { (eval echo "$as_me:3167: \"$ac_try\"") >&5
3170 echo "$as_me:3170: \$? = $ac_status" >&5
3171 (exit $ac_status); }; }; then
3174 echo "$as_me: failed program was:" >&5
3175 cat conftest.$ac_ext >&5
3176 cf_cv_posix_c_source=no
3178 rm -f conftest.$ac_objext conftest.$ac_ext
3179 CFLAGS="$cf_save_CFLAGS"
3180 CPPFLAGS="$cf_save_CPPFLAGS"
3183 rm -f conftest.$ac_objext conftest.$ac_ext
3186 echo "$as_me:3186: result: $cf_cv_posix_c_source" >&5
3187 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3189 if test "$cf_cv_posix_c_source" != no ; then
3190 CFLAGS="$cf_trim_CFLAGS"
3191 CPPFLAGS="$cf_trim_CPPFLAGS"
3196 cf_new_extra_cppflags=
3198 for cf_add_cflags in $cf_cv_posix_c_source
3200 case $cf_fix_cppflags in
3202 case $cf_add_cflags in #(vi
3203 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3204 case $cf_add_cflags in
3206 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3208 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3209 && test -z "${cf_tst_cflags}" \
3210 && cf_fix_cppflags=yes
3212 if test $cf_fix_cppflags = yes ; then
3213 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3215 elif test "${cf_tst_cflags}" = "\"'" ; then
3216 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3222 *$cf_add_cflags) #(vi
3225 case $cf_add_cflags in #(vi
3227 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3229 CPPFLAGS=`echo "$CPPFLAGS" | \
3230 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3231 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3235 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3240 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3245 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3247 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3249 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3250 && test -z "${cf_tst_cflags}" \
3251 && cf_fix_cppflags=no
3256 if test -n "$cf_new_cflags" ; then
3258 CFLAGS="$CFLAGS $cf_new_cflags"
3261 if test -n "$cf_new_cppflags" ; then
3263 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3266 if test -n "$cf_new_extra_cppflags" ; then
3268 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3275 cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3278 # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3279 cf_xopen_source="-D_BSD_SOURCE"
3283 # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3286 cf_xopen_source="-D_OSF_SOURCE"
3289 cf_xopen_source="-D_QNX_SOURCE"
3292 # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3295 cf_xopen_source="-D__EXTENSIONS__"
3299 echo "$as_me:3299: checking if we should define _XOPEN_SOURCE" >&5
3300 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3301 if test "${cf_cv_xopen_source+set}" = set; then
3302 echo $ECHO_N "(cached) $ECHO_C" >&6
3305 cat >conftest.$ac_ext <<_ACEOF
3306 #line 3306 "configure"
3307 #include "confdefs.h"
3311 #include <sys/types.h>
3317 #ifndef _XOPEN_SOURCE
3324 rm -f conftest.$ac_objext
3325 if { (eval echo "$as_me:3325: \"$ac_compile\"") >&5
3326 (eval $ac_compile) 2>&5
3328 echo "$as_me:3328: \$? = $ac_status" >&5
3329 (exit $ac_status); } &&
3330 { ac_try='test -s conftest.$ac_objext'
3331 { (eval echo "$as_me:3331: \"$ac_try\"") >&5
3334 echo "$as_me:3334: \$? = $ac_status" >&5
3335 (exit $ac_status); }; }; then
3336 cf_cv_xopen_source=no
3338 echo "$as_me: failed program was:" >&5
3339 cat conftest.$ac_ext >&5
3341 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3342 cat >conftest.$ac_ext <<_ACEOF
3343 #line 3343 "configure"
3344 #include "confdefs.h"
3348 #include <sys/types.h>
3354 #ifdef _XOPEN_SOURCE
3361 rm -f conftest.$ac_objext
3362 if { (eval echo "$as_me:3362: \"$ac_compile\"") >&5
3363 (eval $ac_compile) 2>&5
3365 echo "$as_me:3365: \$? = $ac_status" >&5
3366 (exit $ac_status); } &&
3367 { ac_try='test -s conftest.$ac_objext'
3368 { (eval echo "$as_me:3368: \"$ac_try\"") >&5
3371 echo "$as_me:3371: \$? = $ac_status" >&5
3372 (exit $ac_status); }; }; then
3373 cf_cv_xopen_source=no
3375 echo "$as_me: failed program was:" >&5
3376 cat conftest.$ac_ext >&5
3377 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3379 rm -f conftest.$ac_objext conftest.$ac_ext
3383 rm -f conftest.$ac_objext conftest.$ac_ext
3386 echo "$as_me:3386: result: $cf_cv_xopen_source" >&5
3387 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3389 if test "$cf_cv_xopen_source" != no ; then
3391 CFLAGS=`echo "$CFLAGS" | \
3392 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3393 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3395 CPPFLAGS=`echo "$CPPFLAGS" | \
3396 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3397 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3399 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3404 cf_new_extra_cppflags=
3406 for cf_add_cflags in $cf_temp_xopen_source
3408 case $cf_fix_cppflags in
3410 case $cf_add_cflags in #(vi
3411 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3412 case $cf_add_cflags in
3414 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3416 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3417 && test -z "${cf_tst_cflags}" \
3418 && cf_fix_cppflags=yes
3420 if test $cf_fix_cppflags = yes ; then
3421 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3423 elif test "${cf_tst_cflags}" = "\"'" ; then
3424 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3430 *$cf_add_cflags) #(vi
3433 case $cf_add_cflags in #(vi
3435 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3437 CPPFLAGS=`echo "$CPPFLAGS" | \
3438 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3439 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3443 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3448 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3453 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3455 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3457 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3458 && test -z "${cf_tst_cflags}" \
3459 && cf_fix_cppflags=no
3464 if test -n "$cf_new_cflags" ; then
3466 CFLAGS="$CFLAGS $cf_new_cflags"
3469 if test -n "$cf_new_cppflags" ; then
3471 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3474 if test -n "$cf_new_extra_cppflags" ; then
3476 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3481 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3483 cf_save_CFLAGS="$CFLAGS"
3484 cf_save_CPPFLAGS="$CPPFLAGS"
3486 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3487 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3488 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3490 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3491 sed -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3492 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ ]*\)\?$//g'`
3494 echo "$as_me:3494: checking if we should define _POSIX_C_SOURCE" >&5
3495 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3496 if test "${cf_cv_posix_c_source+set}" = set; then
3497 echo $ECHO_N "(cached) $ECHO_C" >&6
3500 echo "${as_me:-configure}:3500: testing if the symbol is already defined go no further ..." 1>&5
3502 cat >conftest.$ac_ext <<_ACEOF
3503 #line 3503 "configure"
3504 #include "confdefs.h"
3505 #include <sys/types.h>
3510 #ifndef _POSIX_C_SOURCE
3517 rm -f conftest.$ac_objext
3518 if { (eval echo "$as_me:3518: \"$ac_compile\"") >&5
3519 (eval $ac_compile) 2>&5
3521 echo "$as_me:3521: \$? = $ac_status" >&5
3522 (exit $ac_status); } &&
3523 { ac_try='test -s conftest.$ac_objext'
3524 { (eval echo "$as_me:3524: \"$ac_try\"") >&5
3527 echo "$as_me:3527: \$? = $ac_status" >&5
3528 (exit $ac_status); }; }; then
3529 cf_cv_posix_c_source=no
3531 echo "$as_me: failed program was:" >&5
3532 cat conftest.$ac_ext >&5
3533 cf_want_posix_source=no
3534 case .$cf_POSIX_C_SOURCE in #(vi
3536 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3539 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3540 cf_want_posix_source=yes
3543 cf_want_posix_source=yes
3546 if test "$cf_want_posix_source" = yes ; then
3547 cat >conftest.$ac_ext <<_ACEOF
3548 #line 3548 "configure"
3549 #include "confdefs.h"
3550 #include <sys/types.h>
3555 #ifdef _POSIX_SOURCE
3562 rm -f conftest.$ac_objext
3563 if { (eval echo "$as_me:3563: \"$ac_compile\"") >&5
3564 (eval $ac_compile) 2>&5
3566 echo "$as_me:3566: \$? = $ac_status" >&5
3567 (exit $ac_status); } &&
3568 { ac_try='test -s conftest.$ac_objext'
3569 { (eval echo "$as_me:3569: \"$ac_try\"") >&5
3572 echo "$as_me:3572: \$? = $ac_status" >&5
3573 (exit $ac_status); }; }; then
3576 echo "$as_me: failed program was:" >&5
3577 cat conftest.$ac_ext >&5
3578 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3580 rm -f conftest.$ac_objext conftest.$ac_ext
3583 echo "${as_me:-configure}:3583: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3585 CFLAGS="$cf_trim_CFLAGS"
3586 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3588 echo "${as_me:-configure}:3588: testing if the second compile does not leave our definition intact error ..." 1>&5
3590 cat >conftest.$ac_ext <<_ACEOF
3591 #line 3591 "configure"
3592 #include "confdefs.h"
3593 #include <sys/types.h>
3598 #ifndef _POSIX_C_SOURCE
3605 rm -f conftest.$ac_objext
3606 if { (eval echo "$as_me:3606: \"$ac_compile\"") >&5
3607 (eval $ac_compile) 2>&5
3609 echo "$as_me:3609: \$? = $ac_status" >&5
3610 (exit $ac_status); } &&
3611 { ac_try='test -s conftest.$ac_objext'
3612 { (eval echo "$as_me:3612: \"$ac_try\"") >&5
3615 echo "$as_me:3615: \$? = $ac_status" >&5
3616 (exit $ac_status); }; }; then
3619 echo "$as_me: failed program was:" >&5
3620 cat conftest.$ac_ext >&5
3621 cf_cv_posix_c_source=no
3623 rm -f conftest.$ac_objext conftest.$ac_ext
3624 CFLAGS="$cf_save_CFLAGS"
3625 CPPFLAGS="$cf_save_CPPFLAGS"
3628 rm -f conftest.$ac_objext conftest.$ac_ext
3631 echo "$as_me:3631: result: $cf_cv_posix_c_source" >&5
3632 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3634 if test "$cf_cv_posix_c_source" != no ; then
3635 CFLAGS="$cf_trim_CFLAGS"
3636 CPPFLAGS="$cf_trim_CPPFLAGS"
3641 cf_new_extra_cppflags=
3643 for cf_add_cflags in $cf_cv_posix_c_source
3645 case $cf_fix_cppflags in
3647 case $cf_add_cflags in #(vi
3648 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3649 case $cf_add_cflags in
3651 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3653 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3654 && test -z "${cf_tst_cflags}" \
3655 && cf_fix_cppflags=yes
3657 if test $cf_fix_cppflags = yes ; then
3658 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3660 elif test "${cf_tst_cflags}" = "\"'" ; then
3661 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3667 *$cf_add_cflags) #(vi
3670 case $cf_add_cflags in #(vi
3672 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3674 CPPFLAGS=`echo "$CPPFLAGS" | \
3675 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3676 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3680 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3685 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3690 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3692 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3694 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3695 && test -z "${cf_tst_cflags}" \
3696 && cf_fix_cppflags=no
3701 if test -n "$cf_new_cflags" ; then
3703 CFLAGS="$CFLAGS $cf_new_cflags"
3706 if test -n "$cf_new_cppflags" ; then
3708 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3711 if test -n "$cf_new_extra_cppflags" ; then
3713 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3721 if test -n "$cf_xopen_source" ; then
3726 cf_new_extra_cppflags=
3728 for cf_add_cflags in $cf_xopen_source
3730 case $cf_fix_cppflags in
3732 case $cf_add_cflags in #(vi
3733 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3734 case $cf_add_cflags in
3736 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3738 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3739 && test -z "${cf_tst_cflags}" \
3740 && cf_fix_cppflags=yes
3742 if test $cf_fix_cppflags = yes ; then
3743 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3745 elif test "${cf_tst_cflags}" = "\"'" ; then
3746 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3752 *$cf_add_cflags) #(vi
3755 case $cf_add_cflags in #(vi
3757 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3759 CPPFLAGS=`echo "$CPPFLAGS" | \
3760 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
3761 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
3765 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3770 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3775 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3777 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3779 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
3780 && test -z "${cf_tst_cflags}" \
3781 && cf_fix_cppflags=no
3786 if test -n "$cf_new_cflags" ; then
3788 CFLAGS="$CFLAGS $cf_new_cflags"
3791 if test -n "$cf_new_cppflags" ; then
3793 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3796 if test -n "$cf_new_extra_cppflags" ; then
3798 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3803 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
3804 echo "$as_me:3804: checking if _XOPEN_SOURCE really is set" >&5
3805 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
3806 cat >conftest.$ac_ext <<_ACEOF
3807 #line 3807 "configure"
3808 #include "confdefs.h"
3814 #ifndef _XOPEN_SOURCE
3821 rm -f conftest.$ac_objext
3822 if { (eval echo "$as_me:3822: \"$ac_compile\"") >&5
3823 (eval $ac_compile) 2>&5
3825 echo "$as_me:3825: \$? = $ac_status" >&5
3826 (exit $ac_status); } &&
3827 { ac_try='test -s conftest.$ac_objext'
3828 { (eval echo "$as_me:3828: \"$ac_try\"") >&5
3831 echo "$as_me:3831: \$? = $ac_status" >&5
3832 (exit $ac_status); }; }; then
3833 cf_XOPEN_SOURCE_set=yes
3835 echo "$as_me: failed program was:" >&5
3836 cat conftest.$ac_ext >&5
3837 cf_XOPEN_SOURCE_set=no
3839 rm -f conftest.$ac_objext conftest.$ac_ext
3840 echo "$as_me:3840: result: $cf_XOPEN_SOURCE_set" >&5
3841 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
3842 if test $cf_XOPEN_SOURCE_set = yes
3844 cat >conftest.$ac_ext <<_ACEOF
3845 #line 3845 "configure"
3846 #include "confdefs.h"
3852 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
3859 rm -f conftest.$ac_objext
3860 if { (eval echo "$as_me:3860: \"$ac_compile\"") >&5
3861 (eval $ac_compile) 2>&5
3863 echo "$as_me:3863: \$? = $ac_status" >&5
3864 (exit $ac_status); } &&
3865 { ac_try='test -s conftest.$ac_objext'
3866 { (eval echo "$as_me:3866: \"$ac_try\"") >&5
3869 echo "$as_me:3869: \$? = $ac_status" >&5
3870 (exit $ac_status); }; }; then
3871 cf_XOPEN_SOURCE_set_ok=yes
3873 echo "$as_me: failed program was:" >&5
3874 cat conftest.$ac_ext >&5
3875 cf_XOPEN_SOURCE_set_ok=no
3877 rm -f conftest.$ac_objext conftest.$ac_ext
3878 if test $cf_XOPEN_SOURCE_set_ok = no
3880 { echo "$as_me:3880: WARNING: _XOPEN_SOURCE is lower than requested" >&5
3881 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
3885 echo "$as_me:3885: checking if we should define _XOPEN_SOURCE" >&5
3886 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3887 if test "${cf_cv_xopen_source+set}" = set; then
3888 echo $ECHO_N "(cached) $ECHO_C" >&6
3891 cat >conftest.$ac_ext <<_ACEOF
3892 #line 3892 "configure"
3893 #include "confdefs.h"
3897 #include <sys/types.h>
3903 #ifndef _XOPEN_SOURCE
3910 rm -f conftest.$ac_objext
3911 if { (eval echo "$as_me:3911: \"$ac_compile\"") >&5
3912 (eval $ac_compile) 2>&5
3914 echo "$as_me:3914: \$? = $ac_status" >&5
3915 (exit $ac_status); } &&
3916 { ac_try='test -s conftest.$ac_objext'
3917 { (eval echo "$as_me:3917: \"$ac_try\"") >&5
3920 echo "$as_me:3920: \$? = $ac_status" >&5
3921 (exit $ac_status); }; }; then
3922 cf_cv_xopen_source=no
3924 echo "$as_me: failed program was:" >&5
3925 cat conftest.$ac_ext >&5
3927 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3928 cat >conftest.$ac_ext <<_ACEOF
3929 #line 3929 "configure"
3930 #include "confdefs.h"
3934 #include <sys/types.h>
3940 #ifdef _XOPEN_SOURCE
3947 rm -f conftest.$ac_objext
3948 if { (eval echo "$as_me:3948: \"$ac_compile\"") >&5
3949 (eval $ac_compile) 2>&5
3951 echo "$as_me:3951: \$? = $ac_status" >&5
3952 (exit $ac_status); } &&
3953 { ac_try='test -s conftest.$ac_objext'
3954 { (eval echo "$as_me:3954: \"$ac_try\"") >&5
3957 echo "$as_me:3957: \$? = $ac_status" >&5
3958 (exit $ac_status); }; }; then
3959 cf_cv_xopen_source=no
3961 echo "$as_me: failed program was:" >&5
3962 cat conftest.$ac_ext >&5
3963 cf_cv_xopen_source=$cf_XOPEN_SOURCE
3965 rm -f conftest.$ac_objext conftest.$ac_ext
3969 rm -f conftest.$ac_objext conftest.$ac_ext
3972 echo "$as_me:3972: result: $cf_cv_xopen_source" >&5
3973 echo "${ECHO_T}$cf_cv_xopen_source" >&6
3975 if test "$cf_cv_xopen_source" != no ; then
3977 CFLAGS=`echo "$CFLAGS" | \
3978 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3979 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3981 CPPFLAGS=`echo "$CPPFLAGS" | \
3982 sed -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?[ ]/ /g' \
3983 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ ]*\)\?$//g'`
3985 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3990 cf_new_extra_cppflags=
3992 for cf_add_cflags in $cf_temp_xopen_source
3994 case $cf_fix_cppflags in
3996 case $cf_add_cflags in #(vi
3997 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
3998 case $cf_add_cflags in
4000 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4002 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4003 && test -z "${cf_tst_cflags}" \
4004 && cf_fix_cppflags=yes
4006 if test $cf_fix_cppflags = yes ; then
4007 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4009 elif test "${cf_tst_cflags}" = "\"'" ; then
4010 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4016 *$cf_add_cflags) #(vi
4019 case $cf_add_cflags in #(vi
4021 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4023 CPPFLAGS=`echo "$CPPFLAGS" | \
4024 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4025 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4029 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4034 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4039 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4041 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4043 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4044 && test -z "${cf_tst_cflags}" \
4045 && cf_fix_cppflags=no
4050 if test -n "$cf_new_cflags" ; then
4052 CFLAGS="$CFLAGS $cf_new_cflags"
4055 if test -n "$cf_new_cppflags" ; then
4057 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4060 if test -n "$cf_new_extra_cppflags" ; then
4062 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4070 echo "$as_me:4070: checking for $CC option to accept ANSI C" >&5
4071 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
4072 if test "${ac_cv_prog_cc_stdc+set}" = set; then
4073 echo $ECHO_N "(cached) $ECHO_C" >&6
4075 ac_cv_prog_cc_stdc=no
4077 cat >conftest.$ac_ext <<_ACEOF
4078 #line 4078 "configure"
4079 #include "confdefs.h"
4082 #include <sys/types.h>
4083 #include <sys/stat.h>
4084 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4085 struct buf { int x; };
4086 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4087 static char *e (p, i)
4093 static char *f (char * (*g) (char **, int), char **p, ...)
4098 s = g (p, va_arg (v,int));
4102 int test (int i, double x);
4103 struct s1 {int (*f) (int a);};
4104 struct s2 {int (*f) (double a);};
4105 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4111 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4116 # Don't try gcc -ansi; that turns off useful extensions and
4117 # breaks some systems' header files.
4118 # AIX -qlanglvl=ansi
4119 # Ultrix and OSF/1 -std1
4120 # HP-UX 10.20 and later -Ae
4121 # HP-UX older versions -Aa -D_HPUX_SOURCE
4122 # SVR4 -Xc -D__EXTENSIONS__
4123 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4125 CC="$ac_save_CC $ac_arg"
4126 rm -f conftest.$ac_objext
4127 if { (eval echo "$as_me:4127: \"$ac_compile\"") >&5
4128 (eval $ac_compile) 2>&5
4130 echo "$as_me:4130: \$? = $ac_status" >&5
4131 (exit $ac_status); } &&
4132 { ac_try='test -s conftest.$ac_objext'
4133 { (eval echo "$as_me:4133: \"$ac_try\"") >&5
4136 echo "$as_me:4136: \$? = $ac_status" >&5
4137 (exit $ac_status); }; }; then
4138 ac_cv_prog_cc_stdc=$ac_arg
4141 echo "$as_me: failed program was:" >&5
4142 cat conftest.$ac_ext >&5
4144 rm -f conftest.$ac_objext
4146 rm -f conftest.$ac_ext conftest.$ac_objext
4151 case "x$ac_cv_prog_cc_stdc" in
4153 echo "$as_me:4153: result: none needed" >&5
4154 echo "${ECHO_T}none needed" >&6 ;;
4156 echo "$as_me:4156: result: $ac_cv_prog_cc_stdc" >&5
4157 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
4158 CC="$CC $ac_cv_prog_cc_stdc" ;;
4161 echo "$as_me:4161: checking for an ANSI C-conforming const" >&5
4162 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
4163 if test "${ac_cv_c_const+set}" = set; then
4164 echo $ECHO_N "(cached) $ECHO_C" >&6
4166 cat >conftest.$ac_ext <<_ACEOF
4167 #line 4167 "configure"
4168 #include "confdefs.h"
4173 /* FIXME: Include the comments suggested by Paul. */
4175 /* Ultrix mips cc rejects this. */
4176 typedef int charset[2];
4178 /* SunOS 4.1.1 cc rejects this. */
4179 char const *const *ccp;
4181 /* NEC SVR4.0.2 mips cc rejects this. */
4182 struct point {int x, y;};
4183 static struct point const zero = {0,0};
4184 /* AIX XL C 1.02.0.0 rejects this.
4185 It does not let you subtract one const X* pointer from another in
4186 an arm of an if-expression whose if-part is not a constant
4188 const char *g = "string";
4189 ccp = &g + (g ? g-g : 0);
4190 /* HPUX 7.0 cc rejects these. */
4193 ccp = (char const *const *) p;
4194 { /* SCO 3.2v4 cc rejects this. */
4196 char const *s = 0 ? (char *) 0 : (char const *) 0;
4200 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
4202 const int *foo = &x[0];
4205 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
4206 typedef const int *iptr;
4210 { /* AIX XL C 1.02.0.0 rejects this saying
4211 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
4212 struct s { int j; const int *ap[3]; };
4213 struct s *b; b->j = 5;
4215 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
4224 rm -f conftest.$ac_objext
4225 if { (eval echo "$as_me:4225: \"$ac_compile\"") >&5
4226 (eval $ac_compile) 2>&5
4228 echo "$as_me:4228: \$? = $ac_status" >&5
4229 (exit $ac_status); } &&
4230 { ac_try='test -s conftest.$ac_objext'
4231 { (eval echo "$as_me:4231: \"$ac_try\"") >&5
4234 echo "$as_me:4234: \$? = $ac_status" >&5
4235 (exit $ac_status); }; }; then
4238 echo "$as_me: failed program was:" >&5
4239 cat conftest.$ac_ext >&5
4242 rm -f conftest.$ac_objext conftest.$ac_ext
4244 echo "$as_me:4244: result: $ac_cv_c_const" >&5
4245 echo "${ECHO_T}$ac_cv_c_const" >&6
4246 if test $ac_cv_c_const = no; then
4248 cat >>confdefs.h <<\EOF
4254 echo "$as_me:4254: checking for signal global datatype" >&5
4255 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
4256 if test "${cf_cv_sig_atomic_t+set}" = set; then
4257 echo $ECHO_N "(cached) $ECHO_C" >&6
4261 "volatile sig_atomic_t" \
4265 cat >conftest.$ac_ext <<_ACEOF
4266 #line 4266 "configure"
4267 #include "confdefs.h"
4269 #include <sys/types.h>
4275 static void handler(int sig)
4282 signal(SIGINT, handler);
4288 rm -f conftest.$ac_objext
4289 if { (eval echo "$as_me:4289: \"$ac_compile\"") >&5
4290 (eval $ac_compile) 2>&5
4292 echo "$as_me:4292: \$? = $ac_status" >&5
4293 (exit $ac_status); } &&
4294 { ac_try='test -s conftest.$ac_objext'
4295 { (eval echo "$as_me:4295: \"$ac_try\"") >&5
4298 echo "$as_me:4298: \$? = $ac_status" >&5
4299 (exit $ac_status); }; }; then
4300 cf_cv_sig_atomic_t=$cf_type
4302 echo "$as_me: failed program was:" >&5
4303 cat conftest.$ac_ext >&5
4304 cf_cv_sig_atomic_t=no
4306 rm -f conftest.$ac_objext conftest.$ac_ext
4307 test "$cf_cv_sig_atomic_t" != no && break
4312 echo "$as_me:4312: result: $cf_cv_sig_atomic_t" >&5
4313 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
4314 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
4315 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
4318 echo "$as_me:4318: checking if you want to see long compiling messages" >&5
4319 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
4321 # Check whether --enable-echo or --disable-echo was given.
4322 if test "${enable_echo+set}" = set; then
4323 enableval="$enable_echo"
4324 test "$enableval" != no && enableval=yes
4325 if test "$enableval" != "yes" ; then
4328 ECHO_LD='@echo linking $@;'
4329 RULE_CC='@echo compiling $<'
4330 SHOW_CC='@echo compiling $@'
4352 echo "$as_me:4352: result: $enableval" >&5
4353 echo "${ECHO_T}$enableval" >&6
4356 if test "$GCC" = yes ; then
4357 echo "$as_me:4357: checking version of $CC" >&5
4358 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
4359 GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
4360 test -z "$GCC_VERSION" && GCC_VERSION=unknown
4361 echo "$as_me:4361: result: $GCC_VERSION" >&5
4362 echo "${ECHO_T}$GCC_VERSION" >&6
4365 if ( test "$GCC" = yes || test "$GXX" = yes )
4367 echo "$as_me:4367: checking if you want to turn on gcc warnings" >&5
4368 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
4370 # Check whether --enable-warnings or --disable-warnings was given.
4371 if test "${enable_warnings+set}" = set; then
4372 enableval="$enable_warnings"
4373 test "$enableval" != yes && enableval=no
4374 if test "$enableval" != "no" ; then
4384 echo "$as_me:4384: result: $with_warnings" >&5
4385 echo "${ECHO_T}$with_warnings" >&6
4386 if test "$with_warnings" = "yes"
4389 if test "$GCC" = yes
4391 cat > conftest.i <<EOF
4393 #define GCC_PRINTF 0
4398 #ifndef GCC_NORETURN
4399 #define GCC_NORETURN /* nothing */
4402 #define GCC_UNUSED /* nothing */
4405 if test "$GCC" = yes
4407 { echo "$as_me:4407: checking for $CC __attribute__ directives..." >&5
4408 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
4409 cat > conftest.$ac_ext <<EOF
4410 #line 4410 "${as_me:-configure}"
4411 #include "confdefs.h"
4412 #include "conftest.h"
4413 #include "conftest.i"
4415 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
4417 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
4420 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
4422 #define GCC_SCANFLIKE(fmt,var) /*nothing*/
4424 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
4425 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
4426 extern void foo(void) GCC_NORETURN;
4427 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
4429 cf_printf_attribute=no
4430 cf_scanf_attribute=no
4431 for cf_attribute in scanf printf unused noreturn
4434 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4436 cf_directive="__attribute__(($cf_attribute))"
4437 echo "checking for $CC $cf_directive" 1>&5
4439 case $cf_attribute in #(vi
4441 cf_printf_attribute=yes
4442 cat >conftest.h <<EOF
4443 #define GCC_$cf_ATTRIBUTE 1
4447 cf_scanf_attribute=yes
4448 cat >conftest.h <<EOF
4449 #define GCC_$cf_ATTRIBUTE 1
4453 cat >conftest.h <<EOF
4454 #define GCC_$cf_ATTRIBUTE $cf_directive
4459 if { (eval echo "$as_me:4459: \"$ac_compile\"") >&5
4460 (eval $ac_compile) 2>&5
4462 echo "$as_me:4462: \$? = $ac_status" >&5
4463 (exit $ac_status); }; then
4464 test -n "$verbose" && echo "$as_me:4464: result: ... $cf_attribute" >&5
4465 echo "${ECHO_T}... $cf_attribute" >&6
4466 cat conftest.h >>confdefs.h
4467 case $cf_attribute in #(vi
4469 if test "$cf_printf_attribute" = no ; then
4470 cat >>confdefs.h <<EOF
4471 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
4474 cat >>confdefs.h <<EOF
4475 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
4480 if test "$cf_scanf_attribute" = no ; then
4481 cat >>confdefs.h <<EOF
4482 #define GCC_SCANFLIKE(fmt,var) /* nothing */
4485 cat >>confdefs.h <<EOF
4486 #define GCC_SCANFLIKE(fmt,var) __attribute__((format(scanf,fmt,var)))
4494 fgrep define conftest.i >>confdefs.h
4501 if test "$GCC" = yes ; then
4504 echo "$as_me:4504: checking if this is really Intel C compiler" >&5
4505 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
4506 cf_save_CFLAGS="$CFLAGS"
4507 CFLAGS="$CFLAGS -no-gcc"
4508 cat >conftest.$ac_ext <<_ACEOF
4509 #line 4509 "configure"
4510 #include "confdefs.h"
4516 #ifdef __INTEL_COMPILER
4525 rm -f conftest.$ac_objext
4526 if { (eval echo "$as_me:4526: \"$ac_compile\"") >&5
4527 (eval $ac_compile) 2>&5
4529 echo "$as_me:4529: \$? = $ac_status" >&5
4530 (exit $ac_status); } &&
4531 { ac_try='test -s conftest.$ac_objext'
4532 { (eval echo "$as_me:4532: \"$ac_try\"") >&5
4535 echo "$as_me:4535: \$? = $ac_status" >&5
4536 (exit $ac_status); }; }; then
4538 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
4541 echo "$as_me: failed program was:" >&5
4542 cat conftest.$ac_ext >&5
4544 rm -f conftest.$ac_objext conftest.$ac_ext
4545 CFLAGS="$cf_save_CFLAGS"
4546 echo "$as_me:4546: result: $INTEL_COMPILER" >&5
4547 echo "${ECHO_T}$INTEL_COMPILER" >&6
4554 if test "$GCC" = yes ; then
4555 echo "$as_me:4555: checking if this is really Clang C compiler" >&5
4556 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
4557 cf_save_CFLAGS="$CFLAGS"
4558 CFLAGS="$CFLAGS -Qunused-arguments"
4559 cat >conftest.$ac_ext <<_ACEOF
4560 #line 4560 "configure"
4561 #include "confdefs.h"
4576 rm -f conftest.$ac_objext
4577 if { (eval echo "$as_me:4577: \"$ac_compile\"") >&5
4578 (eval $ac_compile) 2>&5
4580 echo "$as_me:4580: \$? = $ac_status" >&5
4581 (exit $ac_status); } &&
4582 { ac_try='test -s conftest.$ac_objext'
4583 { (eval echo "$as_me:4583: \"$ac_try\"") >&5
4586 echo "$as_me:4586: \$? = $ac_status" >&5
4587 (exit $ac_status); }; }; then
4589 cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
4592 echo "$as_me: failed program was:" >&5
4593 cat conftest.$ac_ext >&5
4595 rm -f conftest.$ac_objext conftest.$ac_ext
4596 CFLAGS="$cf_save_CFLAGS"
4597 echo "$as_me:4597: result: $CLANG_COMPILER" >&5
4598 echo "${ECHO_T}$CLANG_COMPILER" >&6
4601 cat > conftest.$ac_ext <<EOF
4602 #line 4602 "${as_me:-configure}"
4603 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
4606 if test "$INTEL_COMPILER" = yes
4608 # The "-wdXXX" options suppress warnings:
4609 # remark #1419: external declaration in primary source file
4610 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
4611 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
4612 # remark #193: zero used for undefined preprocessing identifier
4613 # remark #593: variable "curs_sb_left_arrow" was set but never used
4614 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
4615 # remark #869: parameter "tw" was never referenced
4616 # remark #981: operands are evaluated in unspecified order
4617 # warning #279: controlling expression is constant
4619 { echo "$as_me:4619: checking for $CC warning options..." >&5
4620 echo "$as_me: checking for $CC warning options..." >&6;}
4621 cf_save_CFLAGS="$CFLAGS"
4622 EXTRA_CFLAGS="-Wall"
4634 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4635 if { (eval echo "$as_me:4635: \"$ac_compile\"") >&5
4636 (eval $ac_compile) 2>&5
4638 echo "$as_me:4638: \$? = $ac_status" >&5
4639 (exit $ac_status); }; then
4640 test -n "$verbose" && echo "$as_me:4640: result: ... -$cf_opt" >&5
4641 echo "${ECHO_T}... -$cf_opt" >&6
4642 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4645 CFLAGS="$cf_save_CFLAGS"
4647 elif test "$GCC" = yes
4649 { echo "$as_me:4649: checking for $CC warning options..." >&5
4650 echo "$as_me: checking for $CC warning options..." >&6;}
4651 cf_save_CFLAGS="$CFLAGS"
4654 test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
4655 for cf_opt in W Wall \
4656 Wbad-function-cast \
4660 Wmissing-declarations \
4661 Wmissing-prototypes \
4665 Wstrict-prototypes \
4666 Wundef $cf_warn_CONST
4668 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
4669 if { (eval echo "$as_me:4669: \"$ac_compile\"") >&5
4670 (eval $ac_compile) 2>&5
4672 echo "$as_me:4672: \$? = $ac_status" >&5
4673 (exit $ac_status); }; then
4674 test -n "$verbose" && echo "$as_me:4674: result: ... -$cf_opt" >&5
4675 echo "${ECHO_T}... -$cf_opt" >&6
4676 case $cf_opt in #(vi
4678 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
4681 case $GCC_VERSION in
4683 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
4685 echo "${as_me:-configure}:4685: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
4690 Wpointer-arith) #(vi
4691 case $GCC_VERSION in
4693 test -n "$verbose" && echo " feature is broken in gcc $GCC_VERSION" 1>&6
4695 echo "${as_me:-configure}:4695: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
4701 EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
4704 CFLAGS="$cf_save_CFLAGS"
4711 echo "$as_me:4711: checking if you want to use dmalloc for testing" >&5
4712 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
4714 # Check whether --with-dmalloc or --without-dmalloc was given.
4715 if test "${with_dmalloc+set}" = set; then
4716 withval="$with_dmalloc"
4717 cat >>confdefs.h <<\EOF
4718 #define USE_DMALLOC 1
4721 : ${with_cflags:=-g}
4722 : ${with_no_leaks:=yes}
4727 echo "$as_me:4727: result: ${with_dmalloc:-no}" >&5
4728 echo "${ECHO_T}${with_dmalloc:-no}" >&6
4730 case .$with_cflags in #(vi
4732 case .$CFLAGS in #(vi
4740 cf_new_extra_cppflags=
4742 for cf_add_cflags in -g
4744 case $cf_fix_cppflags in
4746 case $cf_add_cflags in #(vi
4747 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4748 case $cf_add_cflags in
4750 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4752 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4753 && test -z "${cf_tst_cflags}" \
4754 && cf_fix_cppflags=yes
4756 if test $cf_fix_cppflags = yes ; then
4757 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4759 elif test "${cf_tst_cflags}" = "\"'" ; then
4760 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4766 *$cf_add_cflags) #(vi
4769 case $cf_add_cflags in #(vi
4771 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4773 CPPFLAGS=`echo "$CPPFLAGS" | \
4774 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4775 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4779 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4784 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
4789 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4791 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4793 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4794 && test -z "${cf_tst_cflags}" \
4795 && cf_fix_cppflags=no
4800 if test -n "$cf_new_cflags" ; then
4802 CFLAGS="$CFLAGS $cf_new_cflags"
4805 if test -n "$cf_new_cppflags" ; then
4807 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
4810 if test -n "$cf_new_extra_cppflags" ; then
4812 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
4820 if test "$with_dmalloc" = yes ; then
4821 echo "$as_me:4821: checking for dmalloc.h" >&5
4822 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
4823 if test "${ac_cv_header_dmalloc_h+set}" = set; then
4824 echo $ECHO_N "(cached) $ECHO_C" >&6
4826 cat >conftest.$ac_ext <<_ACEOF
4827 #line 4827 "configure"
4828 #include "confdefs.h"
4829 #include <dmalloc.h>
4831 if { (eval echo "$as_me:4831: \"$ac_cpp conftest.$ac_ext\"") >&5
4832 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4834 egrep -v '^ *\+' conftest.er1 >conftest.err
4836 cat conftest.err >&5
4837 echo "$as_me:4837: \$? = $ac_status" >&5
4838 (exit $ac_status); } >/dev/null; then
4839 if test -s conftest.err; then
4840 ac_cpp_err=$ac_c_preproc_warn_flag
4847 if test -z "$ac_cpp_err"; then
4848 ac_cv_header_dmalloc_h=yes
4850 echo "$as_me: failed program was:" >&5
4851 cat conftest.$ac_ext >&5
4852 ac_cv_header_dmalloc_h=no
4854 rm -f conftest.err conftest.$ac_ext
4856 echo "$as_me:4856: result: $ac_cv_header_dmalloc_h" >&5
4857 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
4858 if test $ac_cv_header_dmalloc_h = yes; then
4860 echo "$as_me:4860: checking for dmalloc_debug in -ldmalloc" >&5
4861 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
4862 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
4863 echo $ECHO_N "(cached) $ECHO_C" >&6
4865 ac_check_lib_save_LIBS=$LIBS
4866 LIBS="-ldmalloc $LIBS"
4867 cat >conftest.$ac_ext <<_ACEOF
4868 #line 4868 "configure"
4869 #include "confdefs.h"
4871 /* Override any gcc2 internal prototype to avoid an error. */
4875 /* We use char because int might match the return type of a gcc2
4876 builtin and then its argument prototype would still apply. */
4877 char dmalloc_debug ();
4886 rm -f conftest.$ac_objext conftest$ac_exeext
4887 if { (eval echo "$as_me:4887: \"$ac_link\"") >&5
4888 (eval $ac_link) 2>&5
4890 echo "$as_me:4890: \$? = $ac_status" >&5
4891 (exit $ac_status); } &&
4892 { ac_try='test -s conftest$ac_exeext'
4893 { (eval echo "$as_me:4893: \"$ac_try\"") >&5
4896 echo "$as_me:4896: \$? = $ac_status" >&5
4897 (exit $ac_status); }; }; then
4898 ac_cv_lib_dmalloc_dmalloc_debug=yes
4900 echo "$as_me: failed program was:" >&5
4901 cat conftest.$ac_ext >&5
4902 ac_cv_lib_dmalloc_dmalloc_debug=no
4904 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4905 LIBS=$ac_check_lib_save_LIBS
4907 echo "$as_me:4907: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
4908 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
4909 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
4910 cat >>confdefs.h <<EOF
4911 #define HAVE_LIBDMALLOC 1
4914 LIBS="-ldmalloc $LIBS"
4922 echo "$as_me:4922: checking if you want to use dbmalloc for testing" >&5
4923 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
4925 # Check whether --with-dbmalloc or --without-dbmalloc was given.
4926 if test "${with_dbmalloc+set}" = set; then
4927 withval="$with_dbmalloc"
4928 cat >>confdefs.h <<\EOF
4929 #define USE_DBMALLOC 1
4932 : ${with_cflags:=-g}
4933 : ${with_no_leaks:=yes}
4938 echo "$as_me:4938: result: ${with_dbmalloc:-no}" >&5
4939 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
4941 case .$with_cflags in #(vi
4943 case .$CFLAGS in #(vi
4951 cf_new_extra_cppflags=
4953 for cf_add_cflags in -g
4955 case $cf_fix_cppflags in
4957 case $cf_add_cflags in #(vi
4958 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
4959 case $cf_add_cflags in
4961 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4963 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
4964 && test -z "${cf_tst_cflags}" \
4965 && cf_fix_cppflags=yes
4967 if test $cf_fix_cppflags = yes ; then
4968 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4970 elif test "${cf_tst_cflags}" = "\"'" ; then
4971 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
4977 *$cf_add_cflags) #(vi
4980 case $cf_add_cflags in #(vi
4982 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4984 CPPFLAGS=`echo "$CPPFLAGS" | \
4985 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
4986 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
4990 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
4995 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
5000 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5002 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
5004 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
5005 && test -z "${cf_tst_cflags}" \
5006 && cf_fix_cppflags=no
5011 if test -n "$cf_new_cflags" ; then
5013 CFLAGS="$CFLAGS $cf_new_cflags"
5016 if test -n "$cf_new_cppflags" ; then
5018 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
5021 if test -n "$cf_new_extra_cppflags" ; then
5023 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
5031 if test "$with_dbmalloc" = yes ; then
5032 echo "$as_me:5032: checking for dbmalloc.h" >&5
5033 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
5034 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
5035 echo $ECHO_N "(cached) $ECHO_C" >&6
5037 cat >conftest.$ac_ext <<_ACEOF
5038 #line 5038 "configure"
5039 #include "confdefs.h"
5040 #include <dbmalloc.h>
5042 if { (eval echo "$as_me:5042: \"$ac_cpp conftest.$ac_ext\"") >&5
5043 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5045 egrep -v '^ *\+' conftest.er1 >conftest.err
5047 cat conftest.err >&5
5048 echo "$as_me:5048: \$? = $ac_status" >&5
5049 (exit $ac_status); } >/dev/null; then
5050 if test -s conftest.err; then
5051 ac_cpp_err=$ac_c_preproc_warn_flag
5058 if test -z "$ac_cpp_err"; then
5059 ac_cv_header_dbmalloc_h=yes
5061 echo "$as_me: failed program was:" >&5
5062 cat conftest.$ac_ext >&5
5063 ac_cv_header_dbmalloc_h=no
5065 rm -f conftest.err conftest.$ac_ext
5067 echo "$as_me:5067: result: $ac_cv_header_dbmalloc_h" >&5
5068 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
5069 if test $ac_cv_header_dbmalloc_h = yes; then
5071 echo "$as_me:5071: checking for debug_malloc in -ldbmalloc" >&5
5072 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
5073 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
5074 echo $ECHO_N "(cached) $ECHO_C" >&6
5076 ac_check_lib_save_LIBS=$LIBS
5077 LIBS="-ldbmalloc $LIBS"
5078 cat >conftest.$ac_ext <<_ACEOF
5079 #line 5079 "configure"
5080 #include "confdefs.h"
5082 /* Override any gcc2 internal prototype to avoid an error. */
5086 /* We use char because int might match the return type of a gcc2
5087 builtin and then its argument prototype would still apply. */
5088 char debug_malloc ();
5097 rm -f conftest.$ac_objext conftest$ac_exeext
5098 if { (eval echo "$as_me:5098: \"$ac_link\"") >&5
5099 (eval $ac_link) 2>&5
5101 echo "$as_me:5101: \$? = $ac_status" >&5
5102 (exit $ac_status); } &&
5103 { ac_try='test -s conftest$ac_exeext'
5104 { (eval echo "$as_me:5104: \"$ac_try\"") >&5
5107 echo "$as_me:5107: \$? = $ac_status" >&5
5108 (exit $ac_status); }; }; then
5109 ac_cv_lib_dbmalloc_debug_malloc=yes
5111 echo "$as_me: failed program was:" >&5
5112 cat conftest.$ac_ext >&5
5113 ac_cv_lib_dbmalloc_debug_malloc=no
5115 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5116 LIBS=$ac_check_lib_save_LIBS
5118 echo "$as_me:5118: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
5119 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
5120 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
5121 cat >>confdefs.h <<EOF
5122 #define HAVE_LIBDBMALLOC 1
5125 LIBS="-ldbmalloc $LIBS"
5133 echo "$as_me:5133: checking if you want to use valgrind for testing" >&5
5134 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
5136 # Check whether --with-valgrind or --without-valgrind was given.
5137 if test "${with_valgrind+set}" = set; then
5138 withval="$with_valgrind"
5139 cat >>confdefs.h <<\EOF
5140 #define USE_VALGRIND 1
5143 : ${with_cflags:=-g}
5144 : ${with_no_leaks:=yes}
5149 echo "$as_me:5149: result: ${with_valgrind:-no}" >&5
5150 echo "${ECHO_T}${with_valgrind:-no}" >&6
5152 case .$with_cflags in #(vi
5154 case .$CFLAGS in #(vi
5162 cf_new_extra_cppflags=
5164 for cf_add_cflags in -g
5166 case $cf_fix_cppflags in
5168 case $cf_add_cflags in #(vi
5169 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
5170 case $cf_add_cflags in
5172 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5174 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
5175 && test -z "${cf_tst_cflags}" \
5176 && cf_fix_cppflags=yes
5178 if test $cf_fix_cppflags = yes ; then
5179 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5181 elif test "${cf_tst_cflags}" = "\"'" ; then
5182 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5188 *$cf_add_cflags) #(vi
5191 case $cf_add_cflags in #(vi
5193 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5195 CPPFLAGS=`echo "$CPPFLAGS" | \
5196 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
5197 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
5201 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
5206 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
5211 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
5213 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
5215 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
5216 && test -z "${cf_tst_cflags}" \
5217 && cf_fix_cppflags=no
5222 if test -n "$cf_new_cflags" ; then
5224 CFLAGS="$CFLAGS $cf_new_cflags"
5227 if test -n "$cf_new_cppflags" ; then
5229 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
5232 if test -n "$cf_new_extra_cppflags" ; then
5234 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
5242 echo "$as_me:5242: checking if you want to perform memory-leak testing" >&5
5243 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
5245 # Check whether --enable-leaks or --disable-leaks was given.
5246 if test "${enable_leaks+set}" = set; then
5247 enableval="$enable_leaks"
5248 if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
5250 : ${with_no_leaks:=no}
5252 echo "$as_me:5252: result: $with_no_leaks" >&5
5253 echo "${ECHO_T}$with_no_leaks" >&6
5255 if test "$with_no_leaks" = yes ; then
5256 cat >>confdefs.h <<\EOF
5260 cat >>confdefs.h <<\EOF
5261 #define YY_NO_LEAKS 1
5266 echo "$as_me:5266: checking if you want to check for wide-character functions" >&5
5267 echo $ECHO_N "checking if you want to check for wide-character functions... $ECHO_C" >&6
5269 # Check whether --enable-widec or --disable-widec was given.
5270 if test "${enable_widec+set}" = set; then
5271 enableval="$enable_widec"
5272 test "$enableval" != no && enableval=yes
5273 if test "$enableval" != "yes" ; then
5283 echo "$as_me:5283: result: $cf_enable_widec" >&5
5284 echo "${ECHO_T}$cf_enable_widec" >&6
5286 echo "$as_me:5286: checking for specific curses-directory" >&5
5287 echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
5289 # Check whether --with-curses-dir or --without-curses-dir was given.
5290 if test "${with_curses_dir+set}" = set; then
5291 withval="$with_curses_dir"
5292 cf_cv_curses_dir=$withval
5296 echo "$as_me:5296: result: $cf_cv_curses_dir" >&5
5297 echo "${ECHO_T}$cf_cv_curses_dir" >&6
5299 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
5302 if test "x$prefix" != xNONE; then
5303 cf_path_syntax="$prefix"
5305 cf_path_syntax="$ac_default_prefix"
5308 case ".$withval" in #(vi
5309 .\$\(*\)*|.\'*\'*) #(vi
5313 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5315 .\${*prefix}*|.\${*dir}*) #(vi
5316 eval withval="$withval"
5317 case ".$withval" in #(vi
5319 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5324 withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5327 { { echo "$as_me:5327: error: expected a pathname, not \"$withval\"" >&5
5328 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5329 { (exit 1); exit 1; }; }
5333 if test -d "$cf_cv_curses_dir"
5336 if test -n "$cf_cv_curses_dir/include" ; then
5337 for cf_add_incdir in $cf_cv_curses_dir/include
5339 while test $cf_add_incdir != /usr/include
5341 if test -d $cf_add_incdir
5344 if test -n "$CFLAGS$CPPFLAGS" ; then
5345 # a loop is needed to ensure we can add subdirs of existing dirs
5346 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
5347 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
5348 cf_have_incdir=yes; break
5353 if test "$cf_have_incdir" = no ; then
5354 if test "$cf_add_incdir" = /usr/local/include ; then
5355 if test "$GCC" = yes
5357 cf_save_CPPFLAGS=$CPPFLAGS
5358 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5359 cat >conftest.$ac_ext <<_ACEOF
5360 #line 5360 "configure"
5361 #include "confdefs.h"
5371 rm -f conftest.$ac_objext
5372 if { (eval echo "$as_me:5372: \"$ac_compile\"") >&5
5373 (eval $ac_compile) 2>&5
5375 echo "$as_me:5375: \$? = $ac_status" >&5
5376 (exit $ac_status); } &&
5377 { ac_try='test -s conftest.$ac_objext'
5378 { (eval echo "$as_me:5378: \"$ac_try\"") >&5
5381 echo "$as_me:5381: \$? = $ac_status" >&5
5382 (exit $ac_status); }; }; then
5385 echo "$as_me: failed program was:" >&5
5386 cat conftest.$ac_ext >&5
5389 rm -f conftest.$ac_objext conftest.$ac_ext
5390 CPPFLAGS=$cf_save_CPPFLAGS
5395 if test "$cf_have_incdir" = no ; then
5396 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
5398 echo "${as_me:-configure}:5398: testing adding $cf_add_incdir to include-path ..." 1>&5
5400 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
5402 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
5403 test "$cf_top_incdir" = "$cf_add_incdir" && break
5404 cf_add_incdir="$cf_top_incdir"
5413 if test -n "$cf_cv_curses_dir/lib" ; then
5414 for cf_add_libdir in $cf_cv_curses_dir/lib
5416 if test $cf_add_libdir = /usr/lib ; then
5418 elif test -d $cf_add_libdir
5421 if test -n "$LDFLAGS$LIBS" ; then
5422 # a loop is needed to ensure we can add subdirs of existing dirs
5423 for cf_test_libdir in $LDFLAGS $LIBS ; do
5424 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
5425 cf_have_libdir=yes; break
5429 if test "$cf_have_libdir" = no ; then
5430 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
5432 echo "${as_me:-configure}:5432: testing adding $cf_add_libdir to library-path ..." 1>&5
5434 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
5445 echo "$as_me:5445: checking for specified curses library type" >&5
5446 echo $ECHO_N "checking for specified curses library type... $ECHO_C" >&6
5448 # Check whether --with-ncursesw or --without-ncursesw was given.
5449 if test "${with_ncursesw+set}" = set; then
5450 withval="$with_ncursesw"
5451 cf_cv_screen=ncursesw
5454 # Check whether --with-ncurses or --without-ncurses was given.
5455 if test "${with_ncurses+set}" = set; then
5456 withval="$with_ncurses"
5457 cf_cv_screen=ncurses
5460 # Check whether --with-pdcurses or --without-pdcurses was given.
5461 if test "${with_pdcurses+set}" = set; then
5462 withval="$with_pdcurses"
5463 cf_cv_screen=pdcurses
5466 # Check whether --with-curses-colr or --without-curses-colr was given.
5467 if test "${with_curses_colr+set}" = set; then
5468 withval="$with_curses_colr"
5469 cf_cv_screen=curses_colr
5472 # Check whether --with-curses-5lib or --without-curses-5lib was given.
5473 if test "${with_curses_5lib+set}" = set; then
5474 withval="$with_curses_5lib"
5475 cf_cv_screen=curses_5lib
5482 echo "$as_me:5482: result: $cf_cv_screen" >&5
5483 echo "${ECHO_T}$cf_cv_screen" >&6
5485 case $cf_cv_screen in #(vi
5486 curses|curses_*) #(vi
5488 echo "$as_me:5488: checking for extra include directories" >&5
5489 echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
5490 if test "${cf_cv_curses_incdir+set}" = set; then
5491 echo $ECHO_N "(cached) $ECHO_C" >&6
5494 cf_cv_curses_incdir=no
5495 case $host_os in #(vi
5497 if test "x$cf_cv_screen" = "xcurses_colr"
5499 test -d /usr/include/curses_colr && \
5500 cf_cv_curses_incdir="-I/usr/include/curses_colr"
5504 if test "x$cf_cv_screen" = "xcurses_5lib"
5506 test -d /usr/5lib && \
5507 test -d /usr/5include && \
5508 cf_cv_curses_incdir="-I/usr/5include"
5514 echo "$as_me:5514: result: $cf_cv_curses_incdir" >&5
5515 echo "${ECHO_T}$cf_cv_curses_incdir" >&6
5516 test "$cf_cv_curses_incdir" != no && CPPFLAGS="$CPPFLAGS $cf_cv_curses_incdir"
5518 echo "$as_me:5518: checking if we have identified curses headers" >&5
5519 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
5520 if test "${cf_cv_ncurses_header+set}" = set; then
5521 echo $ECHO_N "(cached) $ECHO_C" >&6
5524 cf_cv_ncurses_header=none
5527 curses.h ncurses/ncurses.h ncurses/curses.h
5529 cat >conftest.$ac_ext <<_ACEOF
5530 #line 5530 "configure"
5531 #include "confdefs.h"
5532 #include <${cf_header}>
5536 initscr(); tgoto("?", 0,0)
5541 rm -f conftest.$ac_objext
5542 if { (eval echo "$as_me:5542: \"$ac_compile\"") >&5
5543 (eval $ac_compile) 2>&5
5545 echo "$as_me:5545: \$? = $ac_status" >&5
5546 (exit $ac_status); } &&
5547 { ac_try='test -s conftest.$ac_objext'
5548 { (eval echo "$as_me:5548: \"$ac_try\"") >&5
5551 echo "$as_me:5551: \$? = $ac_status" >&5
5552 (exit $ac_status); }; }; then
5553 cf_cv_ncurses_header=$cf_header; break
5555 echo "$as_me: failed program was:" >&5
5556 cat conftest.$ac_ext >&5
5558 rm -f conftest.$ac_objext conftest.$ac_ext
5562 echo "$as_me:5562: result: $cf_cv_ncurses_header" >&5
5563 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
5565 if test "$cf_cv_ncurses_header" = none ; then
5566 { { echo "$as_me:5566: error: No curses header-files found" >&5
5567 echo "$as_me: error: No curses header-files found" >&2;}
5568 { (exit 1); exit 1; }; }
5571 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
5573 for ac_header in $cf_cv_ncurses_header
5575 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5576 echo "$as_me:5576: checking for $ac_header" >&5
5577 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5578 if eval "test \"\${$as_ac_Header+set}\" = set"; then
5579 echo $ECHO_N "(cached) $ECHO_C" >&6
5581 cat >conftest.$ac_ext <<_ACEOF
5582 #line 5582 "configure"
5583 #include "confdefs.h"
5584 #include <$ac_header>
5586 if { (eval echo "$as_me:5586: \"$ac_cpp conftest.$ac_ext\"") >&5
5587 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5589 egrep -v '^ *\+' conftest.er1 >conftest.err
5591 cat conftest.err >&5
5592 echo "$as_me:5592: \$? = $ac_status" >&5
5593 (exit $ac_status); } >/dev/null; then
5594 if test -s conftest.err; then
5595 ac_cpp_err=$ac_c_preproc_warn_flag
5602 if test -z "$ac_cpp_err"; then
5603 eval "$as_ac_Header=yes"
5605 echo "$as_me: failed program was:" >&5
5606 cat conftest.$ac_ext >&5
5607 eval "$as_ac_Header=no"
5609 rm -f conftest.err conftest.$ac_ext
5611 echo "$as_me:5611: result: `eval echo '${'$as_ac_Header'}'`" >&5
5612 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5613 if test `eval echo '${'$as_ac_Header'}'` = yes; then
5614 cat >>confdefs.h <<EOF
5615 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5621 echo "$as_me:5621: checking for terminfo header" >&5
5622 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
5623 if test "${cf_cv_term_header+set}" = set; then
5624 echo $ECHO_N "(cached) $ECHO_C" >&6
5627 case ${cf_cv_ncurses_header} in #(vi
5628 */ncurses.h|*/ncursesw.h) #(vi
5629 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
5632 cf_term_header=term.h
5636 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
5638 cat >conftest.$ac_ext <<_ACEOF
5639 #line 5639 "configure"
5640 #include "confdefs.h"
5642 #include <${cf_cv_ncurses_header:-curses.h}>
5648 int x = auto_left_margin
5653 rm -f conftest.$ac_objext
5654 if { (eval echo "$as_me:5654: \"$ac_compile\"") >&5
5655 (eval $ac_compile) 2>&5
5657 echo "$as_me:5657: \$? = $ac_status" >&5
5658 (exit $ac_status); } &&
5659 { ac_try='test -s conftest.$ac_objext'
5660 { (eval echo "$as_me:5660: \"$ac_try\"") >&5
5663 echo "$as_me:5663: \$? = $ac_status" >&5
5664 (exit $ac_status); }; }; then
5666 cf_cv_term_header="$cf_test"
5668 echo "$as_me: failed program was:" >&5
5669 cat conftest.$ac_ext >&5
5671 cf_cv_term_header=unknown
5674 rm -f conftest.$ac_objext conftest.$ac_ext
5675 test "$cf_cv_term_header" != unknown && break
5679 echo "$as_me:5679: result: $cf_cv_term_header" >&5
5680 echo "${ECHO_T}$cf_cv_term_header" >&6
5682 # Set definitions to allow ifdef'ing to accommodate subdirectories
5684 case $cf_cv_term_header in # (vi
5686 cat >>confdefs.h <<\EOF
5687 #define HAVE_TERM_H 1
5693 case $cf_cv_term_header in # (vi
5694 ncurses/term.h) #(vi
5695 cat >>confdefs.h <<\EOF
5696 #define HAVE_NCURSES_TERM_H 1
5701 cat >>confdefs.h <<\EOF
5702 #define HAVE_NCURSESW_TERM_H 1
5708 echo "$as_me:5708: checking for ncurses version" >&5
5709 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
5710 if test "${cf_cv_ncurses_version+set}" = set; then
5711 echo $ECHO_N "(cached) $ECHO_C" >&6
5714 cf_cv_ncurses_version=no
5717 if test "$cross_compiling" = yes; then
5719 # This will not work if the preprocessor splits the line after the
5720 # Autoconf token. The 'unproto' program does that.
5721 cat > conftest.$ac_ext <<EOF
5722 #include <${cf_cv_ncurses_header:-curses.h}>
5724 #ifdef NCURSES_VERSION
5725 Autoconf NCURSES_VERSION
5733 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
5734 { (eval echo "$as_me:5734: \"$cf_try\"") >&5
5737 echo "$as_me:5737: \$? = $ac_status" >&5
5738 (exit $ac_status); }
5739 if test -f conftest.out ; then
5740 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
5741 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
5746 cat >conftest.$ac_ext <<_ACEOF
5747 #line 5747 "configure"
5748 #include "confdefs.h"
5750 #include <${cf_cv_ncurses_header:-curses.h}>
5754 FILE *fp = fopen("$cf_tempfile", "w");
5755 #ifdef NCURSES_VERSION
5756 # ifdef NCURSES_VERSION_PATCH
5757 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
5759 fprintf(fp, "%s\n", NCURSES_VERSION);
5763 fprintf(fp, "old\n");
5768 ${cf_cv_main_return:-return}(0);
5771 rm -f conftest$ac_exeext
5772 if { (eval echo "$as_me:5772: \"$ac_link\"") >&5
5773 (eval $ac_link) 2>&5
5775 echo "$as_me:5775: \$? = $ac_status" >&5
5776 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5777 { (eval echo "$as_me:5777: \"$ac_try\"") >&5
5780 echo "$as_me:5780: \$? = $ac_status" >&5
5781 (exit $ac_status); }; }; then
5783 cf_cv_ncurses_version=`cat $cf_tempfile`
5785 echo "$as_me: program exited with status $ac_status" >&5
5786 echo "$as_me: failed program was:" >&5
5787 cat conftest.$ac_ext >&5
5789 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5794 echo "$as_me:5794: result: $cf_cv_ncurses_version" >&5
5795 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
5796 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
5800 echo "$as_me:5800: checking if we have identified curses libraries" >&5
5801 echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
5802 cat >conftest.$ac_ext <<_ACEOF
5803 #line 5803 "configure"
5804 #include "confdefs.h"
5805 #include <${cf_cv_ncurses_header:-curses.h}>
5809 initscr(); tgoto("?", 0,0)
5814 rm -f conftest.$ac_objext conftest$ac_exeext
5815 if { (eval echo "$as_me:5815: \"$ac_link\"") >&5
5816 (eval $ac_link) 2>&5
5818 echo "$as_me:5818: \$? = $ac_status" >&5
5819 (exit $ac_status); } &&
5820 { ac_try='test -s conftest$ac_exeext'
5821 { (eval echo "$as_me:5821: \"$ac_try\"") >&5
5824 echo "$as_me:5824: \$? = $ac_status" >&5
5825 (exit $ac_status); }; }; then
5828 echo "$as_me: failed program was:" >&5
5829 cat conftest.$ac_ext >&5
5832 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5833 echo "$as_me:5833: result: $cf_result" >&5
5834 echo "${ECHO_T}$cf_result" >&6
5836 if test "$cf_result" = no ; then
5837 case $host_os in #(vi
5839 echo "$as_me:5839: checking for tgoto in -lmytinfo" >&5
5840 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
5841 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
5842 echo $ECHO_N "(cached) $ECHO_C" >&6
5844 ac_check_lib_save_LIBS=$LIBS
5845 LIBS="-lmytinfo $LIBS"
5846 cat >conftest.$ac_ext <<_ACEOF
5847 #line 5847 "configure"
5848 #include "confdefs.h"
5850 /* Override any gcc2 internal prototype to avoid an error. */
5854 /* We use char because int might match the return type of a gcc2
5855 builtin and then its argument prototype would still apply. */
5865 rm -f conftest.$ac_objext conftest$ac_exeext
5866 if { (eval echo "$as_me:5866: \"$ac_link\"") >&5
5867 (eval $ac_link) 2>&5
5869 echo "$as_me:5869: \$? = $ac_status" >&5
5870 (exit $ac_status); } &&
5871 { ac_try='test -s conftest$ac_exeext'
5872 { (eval echo "$as_me:5872: \"$ac_try\"") >&5
5875 echo "$as_me:5875: \$? = $ac_status" >&5
5876 (exit $ac_status); }; }; then
5877 ac_cv_lib_mytinfo_tgoto=yes
5879 echo "$as_me: failed program was:" >&5
5880 cat conftest.$ac_ext >&5
5881 ac_cv_lib_mytinfo_tgoto=no
5883 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5884 LIBS=$ac_check_lib_save_LIBS
5886 echo "$as_me:5886: result: $ac_cv_lib_mytinfo_tgoto" >&5
5887 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
5888 if test $ac_cv_lib_mytinfo_tgoto = yes; then
5889 LIBS="-lmytinfo $LIBS"
5894 # Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
5895 # next (1998), and xcurses "newer" (2000). There is no header file for
5896 # Hcurses; the subdirectory curses_colr has the headers (curses.h and
5897 # term.h) for cur_colr
5898 if test "x$cf_cv_screen" = "xcurses_colr"
5900 echo "$as_me:5900: checking for initscr in -lcur_colr" >&5
5901 echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
5902 if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
5903 echo $ECHO_N "(cached) $ECHO_C" >&6
5905 ac_check_lib_save_LIBS=$LIBS
5906 LIBS="-lcur_colr $LIBS"
5907 cat >conftest.$ac_ext <<_ACEOF
5908 #line 5908 "configure"
5909 #include "confdefs.h"
5911 /* Override any gcc2 internal prototype to avoid an error. */
5915 /* We use char because int might match the return type of a gcc2
5916 builtin and then its argument prototype would still apply. */
5926 rm -f conftest.$ac_objext conftest$ac_exeext
5927 if { (eval echo "$as_me:5927: \"$ac_link\"") >&5
5928 (eval $ac_link) 2>&5
5930 echo "$as_me:5930: \$? = $ac_status" >&5
5931 (exit $ac_status); } &&
5932 { ac_try='test -s conftest$ac_exeext'
5933 { (eval echo "$as_me:5933: \"$ac_try\"") >&5
5936 echo "$as_me:5936: \$? = $ac_status" >&5
5937 (exit $ac_status); }; }; then
5938 ac_cv_lib_cur_colr_initscr=yes
5940 echo "$as_me: failed program was:" >&5
5941 cat conftest.$ac_ext >&5
5942 ac_cv_lib_cur_colr_initscr=no
5944 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5945 LIBS=$ac_check_lib_save_LIBS
5947 echo "$as_me:5947: result: $ac_cv_lib_cur_colr_initscr" >&5
5948 echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
5949 if test $ac_cv_lib_cur_colr_initscr = yes; then
5951 LIBS="-lcur_colr $LIBS"
5952 ac_cv_func_initscr=yes
5956 echo "$as_me:5956: checking for initscr in -lHcurses" >&5
5957 echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
5958 if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
5959 echo $ECHO_N "(cached) $ECHO_C" >&6
5961 ac_check_lib_save_LIBS=$LIBS
5962 LIBS="-lHcurses $LIBS"
5963 cat >conftest.$ac_ext <<_ACEOF
5964 #line 5964 "configure"
5965 #include "confdefs.h"
5967 /* Override any gcc2 internal prototype to avoid an error. */
5971 /* We use char because int might match the return type of a gcc2
5972 builtin and then its argument prototype would still apply. */
5982 rm -f conftest.$ac_objext conftest$ac_exeext
5983 if { (eval echo "$as_me:5983: \"$ac_link\"") >&5
5984 (eval $ac_link) 2>&5
5986 echo "$as_me:5986: \$? = $ac_status" >&5
5987 (exit $ac_status); } &&
5988 { ac_try='test -s conftest$ac_exeext'
5989 { (eval echo "$as_me:5989: \"$ac_try\"") >&5
5992 echo "$as_me:5992: \$? = $ac_status" >&5
5993 (exit $ac_status); }; }; then
5994 ac_cv_lib_Hcurses_initscr=yes
5996 echo "$as_me: failed program was:" >&5
5997 cat conftest.$ac_ext >&5
5998 ac_cv_lib_Hcurses_initscr=no
6000 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6001 LIBS=$ac_check_lib_save_LIBS
6003 echo "$as_me:6003: result: $ac_cv_lib_Hcurses_initscr" >&5
6004 echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
6005 if test $ac_cv_lib_Hcurses_initscr = yes; then
6007 # HP's header uses __HP_CURSES, but user claims _HP_CURSES.
6008 LIBS="-lHcurses $LIBS"
6009 CPPFLAGS="$CPPFLAGS -D__HP_CURSES -D_HP_CURSES"
6010 ac_cv_func_initscr=yes
6019 case `arch 2>/dev/null` in
6024 if test -n "/lib64" ; then
6025 for cf_add_libdir in /lib64
6027 if test $cf_add_libdir = /usr/lib ; then
6029 elif test -d $cf_add_libdir
6032 if test -n "$LDFLAGS$LIBS" ; then
6033 # a loop is needed to ensure we can add subdirs of existing dirs
6034 for cf_test_libdir in $LDFLAGS $LIBS ; do
6035 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6036 cf_have_libdir=yes; break
6040 if test "$cf_have_libdir" = no ; then
6041 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6043 echo "${as_me:-configure}:6043: testing adding $cf_add_libdir to library-path ..." 1>&5
6045 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6053 if test -n "/lib" ; then
6054 for cf_add_libdir in /lib
6056 if test $cf_add_libdir = /usr/lib ; then
6058 elif test -d $cf_add_libdir
6061 if test -n "$LDFLAGS$LIBS" ; then
6062 # a loop is needed to ensure we can add subdirs of existing dirs
6063 for cf_test_libdir in $LDFLAGS $LIBS ; do
6064 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6065 cf_have_libdir=yes; break
6069 if test "$cf_have_libdir" = no ; then
6070 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6072 echo "${as_me:-configure}:6072: testing adding $cf_add_libdir to library-path ..." 1>&5
6074 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6084 if test -n "/lib" ; then
6085 for cf_add_libdir in /lib
6087 if test $cf_add_libdir = /usr/lib ; then
6089 elif test -d $cf_add_libdir
6092 if test -n "$LDFLAGS$LIBS" ; then
6093 # a loop is needed to ensure we can add subdirs of existing dirs
6094 for cf_test_libdir in $LDFLAGS $LIBS ; do
6095 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6096 cf_have_libdir=yes; break
6100 if test "$cf_have_libdir" = no ; then
6101 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6103 echo "${as_me:-configure}:6103: testing adding $cf_add_libdir to library-path ..." 1>&5
6105 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6115 if test "x$cf_cv_screen" = "xcurses_5lib"
6117 if test -d /usr/5lib ; then
6119 if test -n "/usr/5lib" ; then
6120 for cf_add_libdir in /usr/5lib
6122 if test $cf_add_libdir = /usr/lib ; then
6124 elif test -d $cf_add_libdir
6127 if test -n "$LDFLAGS$LIBS" ; then
6128 # a loop is needed to ensure we can add subdirs of existing dirs
6129 for cf_test_libdir in $LDFLAGS $LIBS ; do
6130 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
6131 cf_have_libdir=yes; break
6135 if test "$cf_have_libdir" = no ; then
6136 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
6138 echo "${as_me:-configure}:6138: testing adding $cf_add_libdir to library-path ..." 1>&5
6140 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
6146 LIBS="-lcurses -ltermcap $LIBS"
6149 ac_cv_func_initscr=yes
6153 if test ".$ac_cv_func_initscr" != .yes ; then
6154 cf_save_LIBS="$LIBS"
6158 if test ".${cf_cv_ncurses_version:-no}" != .no
6160 cf_check_list="ncurses curses cursesX"
6162 cf_check_list="cursesX curses ncurses"
6165 # Check for library containing tgoto. Do this before curses library
6166 # because it may be needed to link the test-case for initscr.
6167 echo "$as_me:6167: checking for tgoto" >&5
6168 echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
6169 if test "${ac_cv_func_tgoto+set}" = set; then
6170 echo $ECHO_N "(cached) $ECHO_C" >&6
6172 cat >conftest.$ac_ext <<_ACEOF
6173 #line 6173 "configure"
6174 #include "confdefs.h"
6175 /* System header to define __stub macros and hopefully few prototypes,
6176 which can conflict with char tgoto (); below. */
6178 /* Override any gcc2 internal prototype to avoid an error. */
6182 /* We use char because int might match the return type of a gcc2
6183 builtin and then its argument prototype would still apply. */
6190 /* The GNU C library defines this for functions which it implements
6191 to always fail with ENOSYS. Some functions are actually named
6192 something starting with __ and the normal name is an alias. */
6193 #if defined (__stub_tgoto) || defined (__stub___tgoto)
6196 f = tgoto; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
6203 rm -f conftest.$ac_objext conftest$ac_exeext
6204 if { (eval echo "$as_me:6204: \"$ac_link\"") >&5
6205 (eval $ac_link) 2>&5
6207 echo "$as_me:6207: \$? = $ac_status" >&5
6208 (exit $ac_status); } &&
6209 { ac_try='test -s conftest$ac_exeext'
6210 { (eval echo "$as_me:6210: \"$ac_try\"") >&5
6213 echo "$as_me:6213: \$? = $ac_status" >&5
6214 (exit $ac_status); }; }; then
6215 ac_cv_func_tgoto=yes
6217 echo "$as_me: failed program was:" >&5
6218 cat conftest.$ac_ext >&5
6221 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6223 echo "$as_me:6223: result: $ac_cv_func_tgoto" >&5
6224 echo "${ECHO_T}$ac_cv_func_tgoto" >&6
6225 if test $ac_cv_func_tgoto = yes; then
6226 cf_term_lib=predefined
6229 for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
6231 as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
6232 echo "$as_me:6232: checking for tgoto in -l$cf_term_lib" >&5
6233 echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
6234 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
6235 echo $ECHO_N "(cached) $ECHO_C" >&6
6237 ac_check_lib_save_LIBS=$LIBS
6238 LIBS="-l$cf_term_lib $LIBS"
6239 cat >conftest.$ac_ext <<_ACEOF
6240 #line 6240 "configure"
6241 #include "confdefs.h"
6243 /* Override any gcc2 internal prototype to avoid an error. */
6247 /* We use char because int might match the return type of a gcc2
6248 builtin and then its argument prototype would still apply. */
6258 rm -f conftest.$ac_objext conftest$ac_exeext
6259 if { (eval echo "$as_me:6259: \"$ac_link\"") >&5
6260 (eval $ac_link) 2>&5
6262 echo "$as_me:6262: \$? = $ac_status" >&5
6263 (exit $ac_status); } &&
6264 { ac_try='test -s conftest$ac_exeext'
6265 { (eval echo "$as_me:6265: \"$ac_try\"") >&5
6268 echo "$as_me:6268: \$? = $ac_status" >&5
6269 (exit $ac_status); }; }; then
6270 eval "$as_ac_Lib=yes"
6272 echo "$as_me: failed program was:" >&5
6273 cat conftest.$ac_ext >&5
6274 eval "$as_ac_Lib=no"
6276 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6277 LIBS=$ac_check_lib_save_LIBS
6279 echo "$as_me:6279: result: `eval echo '${'$as_ac_Lib'}'`" >&5
6280 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
6281 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
6289 # Check for library containing initscr
6290 test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
6291 for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
6293 as_ac_Lib=`echo "ac_cv_lib_$cf_curs_lib''_initscr" | $as_tr_sh`
6294 echo "$as_me:6294: checking for initscr in -l$cf_curs_lib" >&5
6295 echo $ECHO_N "checking for initscr in -l$cf_curs_lib... $ECHO_C" >&6
6296 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
6297 echo $ECHO_N "(cached) $ECHO_C" >&6
6299 ac_check_lib_save_LIBS=$LIBS
6300 LIBS="-l$cf_curs_lib $LIBS"
6301 cat >conftest.$ac_ext <<_ACEOF
6302 #line 6302 "configure"
6303 #include "confdefs.h"
6305 /* Override any gcc2 internal prototype to avoid an error. */
6309 /* We use char because int might match the return type of a gcc2
6310 builtin and then its argument prototype would still apply. */
6320 rm -f conftest.$ac_objext conftest$ac_exeext
6321 if { (eval echo "$as_me:6321: \"$ac_link\"") >&5
6322 (eval $ac_link) 2>&5
6324 echo "$as_me:6324: \$? = $ac_status" >&5
6325 (exit $ac_status); } &&
6326 { ac_try='test -s conftest$ac_exeext'
6327 { (eval echo "$as_me:6327: \"$ac_try\"") >&5
6330 echo "$as_me:6330: \$? = $ac_status" >&5
6331 (exit $ac_status); }; }; then
6332 eval "$as_ac_Lib=yes"
6334 echo "$as_me: failed program was:" >&5
6335 cat conftest.$ac_ext >&5
6336 eval "$as_ac_Lib=no"
6338 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6339 LIBS=$ac_check_lib_save_LIBS
6341 echo "$as_me:6341: result: `eval echo '${'$as_ac_Lib'}'`" >&5
6342 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
6343 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
6348 test $cf_curs_lib = unknown && { { echo "$as_me:6348: error: no curses library found" >&5
6349 echo "$as_me: error: no curses library found" >&2;}
6350 { (exit 1); exit 1; }; }
6352 LIBS="-l$cf_curs_lib $cf_save_LIBS"
6353 if test "$cf_term_lib" = unknown ; then
6354 echo "$as_me:6354: checking if we can link with $cf_curs_lib library" >&5
6355 echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
6356 cat >conftest.$ac_ext <<_ACEOF
6357 #line 6357 "configure"
6358 #include "confdefs.h"
6359 #include <${cf_cv_ncurses_header:-curses.h}>
6368 rm -f conftest.$ac_objext conftest$ac_exeext
6369 if { (eval echo "$as_me:6369: \"$ac_link\"") >&5
6370 (eval $ac_link) 2>&5
6372 echo "$as_me:6372: \$? = $ac_status" >&5
6373 (exit $ac_status); } &&
6374 { ac_try='test -s conftest$ac_exeext'
6375 { (eval echo "$as_me:6375: \"$ac_try\"") >&5
6378 echo "$as_me:6378: \$? = $ac_status" >&5
6379 (exit $ac_status); }; }; then
6382 echo "$as_me: failed program was:" >&5
6383 cat conftest.$ac_ext >&5
6386 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6387 echo "$as_me:6387: result: $cf_result" >&5
6388 echo "${ECHO_T}$cf_result" >&6
6389 test $cf_result = no && { { echo "$as_me:6389: error: Cannot link curses library" >&5
6390 echo "$as_me: error: Cannot link curses library" >&2;}
6391 { (exit 1); exit 1; }; }
6392 elif test "$cf_curs_lib" = "$cf_term_lib" ; then
6394 elif test "$cf_term_lib" != predefined ; then
6395 echo "$as_me:6395: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
6396 echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
6397 cat >conftest.$ac_ext <<_ACEOF
6398 #line 6398 "configure"
6399 #include "confdefs.h"
6400 #include <${cf_cv_ncurses_header:-curses.h}>
6404 initscr(); tgoto((char *)0, 0, 0);
6409 rm -f conftest.$ac_objext conftest$ac_exeext
6410 if { (eval echo "$as_me:6410: \"$ac_link\"") >&5
6411 (eval $ac_link) 2>&5
6413 echo "$as_me:6413: \$? = $ac_status" >&5
6414 (exit $ac_status); } &&
6415 { ac_try='test -s conftest$ac_exeext'
6416 { (eval echo "$as_me:6416: \"$ac_try\"") >&5
6419 echo "$as_me:6419: \$? = $ac_status" >&5
6420 (exit $ac_status); }; }; then
6423 echo "$as_me: failed program was:" >&5
6424 cat conftest.$ac_ext >&5
6426 LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
6427 cat >conftest.$ac_ext <<_ACEOF
6428 #line 6428 "configure"
6429 #include "confdefs.h"
6430 #include <${cf_cv_ncurses_header:-curses.h}>
6439 rm -f conftest.$ac_objext conftest$ac_exeext
6440 if { (eval echo "$as_me:6440: \"$ac_link\"") >&5
6441 (eval $ac_link) 2>&5
6443 echo "$as_me:6443: \$? = $ac_status" >&5
6444 (exit $ac_status); } &&
6445 { ac_try='test -s conftest$ac_exeext'
6446 { (eval echo "$as_me:6446: \"$ac_try\"") >&5
6449 echo "$as_me:6449: \$? = $ac_status" >&5
6450 (exit $ac_status); }; }; then
6453 echo "$as_me: failed program was:" >&5
6454 cat conftest.$ac_ext >&5
6457 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6460 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6461 echo "$as_me:6461: result: $cf_result" >&5
6462 echo "${ECHO_T}$cf_result" >&6
6470 cf_ncuconfig_root=ncurses
6472 echo "Looking for ${cf_ncuconfig_root}-config"
6474 if test -n "$ac_tool_prefix"; then
6475 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6477 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
6478 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
6479 echo "$as_me:6479: checking for $ac_word" >&5
6480 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6481 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
6482 echo $ECHO_N "(cached) $ECHO_C" >&6
6484 if test -n "$NCURSES_CONFIG"; then
6485 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
6487 ac_save_IFS=$IFS; IFS=$ac_path_separator
6489 for ac_dir in $ac_dummy; do
6491 test -z "$ac_dir" && ac_dir=.
6492 $as_executable_p "$ac_dir/$ac_word" || continue
6493 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
6494 echo "$as_me:6494: found $ac_dir/$ac_word" >&5
6500 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
6501 if test -n "$NCURSES_CONFIG"; then
6502 echo "$as_me:6502: result: $NCURSES_CONFIG" >&5
6503 echo "${ECHO_T}$NCURSES_CONFIG" >&6
6505 echo "$as_me:6505: result: no" >&5
6506 echo "${ECHO_T}no" >&6
6509 test -n "$NCURSES_CONFIG" && break
6512 if test -z "$NCURSES_CONFIG"; then
6513 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
6514 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
6516 # Extract the first word of "$ac_prog", so it can be a program name with args.
6517 set dummy $ac_prog; ac_word=$2
6518 echo "$as_me:6518: checking for $ac_word" >&5
6519 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6520 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
6521 echo $ECHO_N "(cached) $ECHO_C" >&6
6523 if test -n "$ac_ct_NCURSES_CONFIG"; then
6524 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
6526 ac_save_IFS=$IFS; IFS=$ac_path_separator
6528 for ac_dir in $ac_dummy; do
6530 test -z "$ac_dir" && ac_dir=.
6531 $as_executable_p "$ac_dir/$ac_word" || continue
6532 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
6533 echo "$as_me:6533: found $ac_dir/$ac_word" >&5
6539 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
6540 if test -n "$ac_ct_NCURSES_CONFIG"; then
6541 echo "$as_me:6541: result: $ac_ct_NCURSES_CONFIG" >&5
6542 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
6544 echo "$as_me:6544: result: no" >&5
6545 echo "${ECHO_T}no" >&6
6548 test -n "$ac_ct_NCURSES_CONFIG" && break
6550 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
6552 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
6555 if test "$NCURSES_CONFIG" != none ; then
6557 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
6558 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
6560 # even with config script, some packages use no-override for curses.h
6562 echo "$as_me:6562: checking if we have identified curses headers" >&5
6563 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
6564 if test "${cf_cv_ncurses_header+set}" = set; then
6565 echo $ECHO_N "(cached) $ECHO_C" >&6
6568 cf_cv_ncurses_header=none
6575 cat >conftest.$ac_ext <<_ACEOF
6576 #line 6576 "configure"
6577 #include "confdefs.h"
6578 #include <${cf_header}>
6582 initscr(); tgoto("?", 0,0)
6587 rm -f conftest.$ac_objext
6588 if { (eval echo "$as_me:6588: \"$ac_compile\"") >&5
6589 (eval $ac_compile) 2>&5
6591 echo "$as_me:6591: \$? = $ac_status" >&5
6592 (exit $ac_status); } &&
6593 { ac_try='test -s conftest.$ac_objext'
6594 { (eval echo "$as_me:6594: \"$ac_try\"") >&5
6597 echo "$as_me:6597: \$? = $ac_status" >&5
6598 (exit $ac_status); }; }; then
6599 cf_cv_ncurses_header=$cf_header; break
6601 echo "$as_me: failed program was:" >&5
6602 cat conftest.$ac_ext >&5
6604 rm -f conftest.$ac_objext conftest.$ac_ext
6608 echo "$as_me:6608: result: $cf_cv_ncurses_header" >&5
6609 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
6611 if test "$cf_cv_ncurses_header" = none ; then
6612 { { echo "$as_me:6612: error: No curses header-files found" >&5
6613 echo "$as_me: error: No curses header-files found" >&2;}
6614 { (exit 1); exit 1; }; }
6617 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
6619 for ac_header in $cf_cv_ncurses_header
6621 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6622 echo "$as_me:6622: checking for $ac_header" >&5
6623 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6624 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6625 echo $ECHO_N "(cached) $ECHO_C" >&6
6627 cat >conftest.$ac_ext <<_ACEOF
6628 #line 6628 "configure"
6629 #include "confdefs.h"
6630 #include <$ac_header>
6632 if { (eval echo "$as_me:6632: \"$ac_cpp conftest.$ac_ext\"") >&5
6633 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6635 egrep -v '^ *\+' conftest.er1 >conftest.err
6637 cat conftest.err >&5
6638 echo "$as_me:6638: \$? = $ac_status" >&5
6639 (exit $ac_status); } >/dev/null; then
6640 if test -s conftest.err; then
6641 ac_cpp_err=$ac_c_preproc_warn_flag
6648 if test -z "$ac_cpp_err"; then
6649 eval "$as_ac_Header=yes"
6651 echo "$as_me: failed program was:" >&5
6652 cat conftest.$ac_ext >&5
6653 eval "$as_ac_Header=no"
6655 rm -f conftest.err conftest.$ac_ext
6657 echo "$as_me:6657: result: `eval echo '${'$as_ac_Header'}'`" >&5
6658 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6659 if test `eval echo '${'$as_ac_Header'}'` = yes; then
6660 cat >>confdefs.h <<EOF
6661 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6667 cat >>confdefs.h <<\EOF
6671 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6673 cat >>confdefs.h <<EOF
6674 #define $cf_nculib_ROOT 1
6677 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
6681 cf_ncuhdr_root=ncurses
6683 test -n "$cf_cv_curses_dir" && \
6684 test "$cf_cv_curses_dir" != "no" && { \
6686 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
6687 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
6689 while test $cf_add_incdir != /usr/include
6691 if test -d $cf_add_incdir
6694 if test -n "$CFLAGS$CPPFLAGS" ; then
6695 # a loop is needed to ensure we can add subdirs of existing dirs
6696 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6697 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6698 cf_have_incdir=yes; break
6703 if test "$cf_have_incdir" = no ; then
6704 if test "$cf_add_incdir" = /usr/local/include ; then
6705 if test "$GCC" = yes
6707 cf_save_CPPFLAGS=$CPPFLAGS
6708 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6709 cat >conftest.$ac_ext <<_ACEOF
6710 #line 6710 "configure"
6711 #include "confdefs.h"
6721 rm -f conftest.$ac_objext
6722 if { (eval echo "$as_me:6722: \"$ac_compile\"") >&5
6723 (eval $ac_compile) 2>&5
6725 echo "$as_me:6725: \$? = $ac_status" >&5
6726 (exit $ac_status); } &&
6727 { ac_try='test -s conftest.$ac_objext'
6728 { (eval echo "$as_me:6728: \"$ac_try\"") >&5
6731 echo "$as_me:6731: \$? = $ac_status" >&5
6732 (exit $ac_status); }; }; then
6735 echo "$as_me: failed program was:" >&5
6736 cat conftest.$ac_ext >&5
6739 rm -f conftest.$ac_objext conftest.$ac_ext
6740 CPPFLAGS=$cf_save_CPPFLAGS
6745 if test "$cf_have_incdir" = no ; then
6746 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
6748 echo "${as_me:-configure}:6748: testing adding $cf_add_incdir to include-path ..." 1>&5
6750 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6752 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
6753 test "$cf_top_incdir" = "$cf_add_incdir" && break
6754 cf_add_incdir="$cf_top_incdir"
6765 echo "$as_me:6765: checking for $cf_ncuhdr_root header in include-path" >&5
6766 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
6767 if test "${cf_cv_ncurses_h+set}" = set; then
6768 echo $ECHO_N "(cached) $ECHO_C" >&6
6771 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
6772 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
6773 for cf_header in $cf_header_list
6776 cat >conftest.$ac_ext <<_ACEOF
6777 #line 6777 "configure"
6778 #include "confdefs.h"
6780 #include <$cf_header>
6785 #ifdef NCURSES_VERSION
6787 printf("%s\n", NCURSES_VERSION);
6800 rm -f conftest.$ac_objext
6801 if { (eval echo "$as_me:6801: \"$ac_compile\"") >&5
6802 (eval $ac_compile) 2>&5
6804 echo "$as_me:6804: \$? = $ac_status" >&5
6805 (exit $ac_status); } &&
6806 { ac_try='test -s conftest.$ac_objext'
6807 { (eval echo "$as_me:6807: \"$ac_try\"") >&5
6810 echo "$as_me:6810: \$? = $ac_status" >&5
6811 (exit $ac_status); }; }; then
6812 cf_cv_ncurses_h=$cf_header
6815 echo "$as_me: failed program was:" >&5
6816 cat conftest.$ac_ext >&5
6819 rm -f conftest.$ac_objext conftest.$ac_ext
6821 test "$cf_cv_ncurses_h" != no && break
6825 echo "$as_me:6825: result: $cf_cv_ncurses_h" >&5
6826 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
6828 if test "$cf_cv_ncurses_h" != no ; then
6829 cf_cv_ncurses_header=$cf_cv_ncurses_h
6832 echo "$as_me:6832: checking for $cf_ncuhdr_root include-path" >&5
6833 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
6834 if test "${cf_cv_ncurses_h2+set}" = set; then
6835 echo $ECHO_N "(cached) $ECHO_C" >&6
6838 test -n "$verbose" && echo
6842 # collect the current set of include-directories from compiler flags
6843 cf_header_path_list=""
6844 if test -n "${CFLAGS}${CPPFLAGS}" ; then
6845 for cf_header_path in $CPPFLAGS $CFLAGS
6847 case $cf_header_path in #(vi
6849 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
6851 test "$cf_header_path" != "NONE" && \
6852 test -d "$cf_header_path" && \
6854 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
6855 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
6856 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
6857 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
6858 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
6859 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"
6862 cf_header_path_list="$cf_header_path_list $cf_search"
6868 # add the variations for the package we are looking for
6872 test "/usr" != "$prefix" && \
6874 (test $prefix = NONE || test "/usr" != "$prefix") && {
6875 test -n "$verbose" && echo " ... testing for include-directories under /usr"
6876 test -d /usr/include && cf_search="$cf_search /usr/include"
6877 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
6878 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
6879 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
6880 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6883 test "$prefix" != "NONE" && \
6884 test -d "$prefix" && \
6886 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
6887 test -d $prefix/include && cf_search="$cf_search $prefix/include"
6888 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
6889 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
6890 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
6891 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6894 test "/usr/local" != "$prefix" && \
6895 test -d "/usr/local" && \
6896 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
6897 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
6898 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
6899 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
6900 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
6901 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
6902 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6905 test "/opt" != "$prefix" && \
6907 (test $prefix = NONE || test "/opt" != "$prefix") && {
6908 test -n "$verbose" && echo " ... testing for include-directories under /opt"
6909 test -d /opt/include && cf_search="$cf_search /opt/include"
6910 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
6911 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
6912 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
6913 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6916 test "$HOME" != "$prefix" && \
6917 test -d "$HOME" && \
6918 (test $prefix = NONE || test "$HOME" != "$prefix") && {
6919 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
6920 test -d $HOME/include && cf_search="$cf_search $HOME/include"
6921 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
6922 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
6923 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
6924 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
6927 test "$includedir" != NONE && \
6928 test "$includedir" != "/usr/include" && \
6929 test -d "$includedir" && {
6930 test -d $includedir && cf_search="$cf_search $includedir"
6931 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
6934 test "$oldincludedir" != NONE && \
6935 test "$oldincludedir" != "/usr/include" && \
6936 test -d "$oldincludedir" && {
6937 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
6938 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
6941 cf_search="$cf_search $cf_header_path_list"
6943 test -n "$verbose" && echo search path $cf_search
6944 cf_save2_CPPFLAGS="$CPPFLAGS"
6945 for cf_incdir in $cf_search
6948 if test -n "$cf_incdir" ; then
6949 for cf_add_incdir in $cf_incdir
6951 while test $cf_add_incdir != /usr/include
6953 if test -d $cf_add_incdir
6956 if test -n "$CFLAGS$CPPFLAGS" ; then
6957 # a loop is needed to ensure we can add subdirs of existing dirs
6958 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
6959 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
6960 cf_have_incdir=yes; break
6965 if test "$cf_have_incdir" = no ; then
6966 if test "$cf_add_incdir" = /usr/local/include ; then
6967 if test "$GCC" = yes
6969 cf_save_CPPFLAGS=$CPPFLAGS
6970 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
6971 cat >conftest.$ac_ext <<_ACEOF
6972 #line 6972 "configure"
6973 #include "confdefs.h"
6983 rm -f conftest.$ac_objext
6984 if { (eval echo "$as_me:6984: \"$ac_compile\"") >&5
6985 (eval $ac_compile) 2>&5
6987 echo "$as_me:6987: \$? = $ac_status" >&5
6988 (exit $ac_status); } &&
6989 { ac_try='test -s conftest.$ac_objext'
6990 { (eval echo "$as_me:6990: \"$ac_try\"") >&5
6993 echo "$as_me:6993: \$? = $ac_status" >&5
6994 (exit $ac_status); }; }; then
6997 echo "$as_me: failed program was:" >&5
6998 cat conftest.$ac_ext >&5
7001 rm -f conftest.$ac_objext conftest.$ac_ext
7002 CPPFLAGS=$cf_save_CPPFLAGS
7007 if test "$cf_have_incdir" = no ; then
7008 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7010 echo "${as_me:-configure}:7010: testing adding $cf_add_incdir to include-path ..." 1>&5
7012 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7014 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7015 test "$cf_top_incdir" = "$cf_add_incdir" && break
7016 cf_add_incdir="$cf_top_incdir"
7030 cat >conftest.$ac_ext <<_ACEOF
7031 #line 7031 "configure"
7032 #include "confdefs.h"
7034 #include <$cf_header>
7039 #ifdef NCURSES_VERSION
7041 printf("%s\n", NCURSES_VERSION);
7054 rm -f conftest.$ac_objext
7055 if { (eval echo "$as_me:7055: \"$ac_compile\"") >&5
7056 (eval $ac_compile) 2>&5
7058 echo "$as_me:7058: \$? = $ac_status" >&5
7059 (exit $ac_status); } &&
7060 { ac_try='test -s conftest.$ac_objext'
7061 { (eval echo "$as_me:7061: \"$ac_try\"") >&5
7064 echo "$as_me:7064: \$? = $ac_status" >&5
7065 (exit $ac_status); }; }; then
7066 cf_cv_ncurses_h2=$cf_header
7069 echo "$as_me: failed program was:" >&5
7070 cat conftest.$ac_ext >&5
7073 rm -f conftest.$ac_objext conftest.$ac_ext
7075 if test "$cf_cv_ncurses_h2" != no ; then
7076 cf_cv_ncurses_h2=$cf_incdir/$cf_header
7077 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
7080 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
7082 CPPFLAGS="$cf_save2_CPPFLAGS"
7083 test "$cf_cv_ncurses_h2" != no && break
7085 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:7085: error: not found" >&5
7086 echo "$as_me: error: not found" >&2;}
7087 { (exit 1); exit 1; }; }
7090 echo "$as_me:7090: result: $cf_cv_ncurses_h2" >&5
7091 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
7093 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
7094 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
7095 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
7096 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
7099 if test -n "$cf_1st_incdir" ; then
7100 for cf_add_incdir in $cf_1st_incdir
7102 while test $cf_add_incdir != /usr/include
7104 if test -d $cf_add_incdir
7107 if test -n "$CFLAGS$CPPFLAGS" ; then
7108 # a loop is needed to ensure we can add subdirs of existing dirs
7109 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7110 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7111 cf_have_incdir=yes; break
7116 if test "$cf_have_incdir" = no ; then
7117 if test "$cf_add_incdir" = /usr/local/include ; then
7118 if test "$GCC" = yes
7120 cf_save_CPPFLAGS=$CPPFLAGS
7121 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7122 cat >conftest.$ac_ext <<_ACEOF
7123 #line 7123 "configure"
7124 #include "confdefs.h"
7134 rm -f conftest.$ac_objext
7135 if { (eval echo "$as_me:7135: \"$ac_compile\"") >&5
7136 (eval $ac_compile) 2>&5
7138 echo "$as_me:7138: \$? = $ac_status" >&5
7139 (exit $ac_status); } &&
7140 { ac_try='test -s conftest.$ac_objext'
7141 { (eval echo "$as_me:7141: \"$ac_try\"") >&5
7144 echo "$as_me:7144: \$? = $ac_status" >&5
7145 (exit $ac_status); }; }; then
7148 echo "$as_me: failed program was:" >&5
7149 cat conftest.$ac_ext >&5
7152 rm -f conftest.$ac_objext conftest.$ac_ext
7153 CPPFLAGS=$cf_save_CPPFLAGS
7158 if test "$cf_have_incdir" = no ; then
7159 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
7161 echo "${as_me:-configure}:7161: testing adding $cf_add_incdir to include-path ..." 1>&5
7163 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7165 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7166 test "$cf_top_incdir" = "$cf_add_incdir" && break
7167 cf_add_incdir="$cf_top_incdir"
7178 # Set definitions to allow ifdef'ing for ncurses.h
7180 case $cf_cv_ncurses_header in # (vi
7182 cat >>confdefs.h <<\EOF
7183 #define HAVE_NCURSES_H 1
7189 case $cf_cv_ncurses_header in # (vi
7190 ncurses/curses.h|ncurses/ncurses.h)
7191 cat >>confdefs.h <<\EOF
7192 #define HAVE_NCURSES_NCURSES_H 1
7196 ncursesw/curses.h|ncursesw/ncurses.h)
7197 cat >>confdefs.h <<\EOF
7198 #define HAVE_NCURSESW_NCURSES_H 1
7204 echo "$as_me:7204: checking for terminfo header" >&5
7205 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
7206 if test "${cf_cv_term_header+set}" = set; then
7207 echo $ECHO_N "(cached) $ECHO_C" >&6
7210 case ${cf_cv_ncurses_header} in #(vi
7211 */ncurses.h|*/ncursesw.h) #(vi
7212 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
7215 cf_term_header=term.h
7219 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
7221 cat >conftest.$ac_ext <<_ACEOF
7222 #line 7222 "configure"
7223 #include "confdefs.h"
7225 #include <${cf_cv_ncurses_header:-curses.h}>
7231 int x = auto_left_margin
7236 rm -f conftest.$ac_objext
7237 if { (eval echo "$as_me:7237: \"$ac_compile\"") >&5
7238 (eval $ac_compile) 2>&5
7240 echo "$as_me:7240: \$? = $ac_status" >&5
7241 (exit $ac_status); } &&
7242 { ac_try='test -s conftest.$ac_objext'
7243 { (eval echo "$as_me:7243: \"$ac_try\"") >&5
7246 echo "$as_me:7246: \$? = $ac_status" >&5
7247 (exit $ac_status); }; }; then
7249 cf_cv_term_header="$cf_test"
7251 echo "$as_me: failed program was:" >&5
7252 cat conftest.$ac_ext >&5
7254 cf_cv_term_header=unknown
7257 rm -f conftest.$ac_objext conftest.$ac_ext
7258 test "$cf_cv_term_header" != unknown && break
7262 echo "$as_me:7262: result: $cf_cv_term_header" >&5
7263 echo "${ECHO_T}$cf_cv_term_header" >&6
7265 # Set definitions to allow ifdef'ing to accommodate subdirectories
7267 case $cf_cv_term_header in # (vi
7269 cat >>confdefs.h <<\EOF
7270 #define HAVE_TERM_H 1
7276 case $cf_cv_term_header in # (vi
7277 ncurses/term.h) #(vi
7278 cat >>confdefs.h <<\EOF
7279 #define HAVE_NCURSES_TERM_H 1
7284 cat >>confdefs.h <<\EOF
7285 #define HAVE_NCURSESW_TERM_H 1
7291 # some applications need this, but should check for NCURSES_VERSION
7292 cat >>confdefs.h <<\EOF
7296 echo "$as_me:7296: checking for ncurses version" >&5
7297 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
7298 if test "${cf_cv_ncurses_version+set}" = set; then
7299 echo $ECHO_N "(cached) $ECHO_C" >&6
7302 cf_cv_ncurses_version=no
7305 if test "$cross_compiling" = yes; then
7307 # This will not work if the preprocessor splits the line after the
7308 # Autoconf token. The 'unproto' program does that.
7309 cat > conftest.$ac_ext <<EOF
7310 #include <${cf_cv_ncurses_header:-curses.h}>
7312 #ifdef NCURSES_VERSION
7313 Autoconf NCURSES_VERSION
7321 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
7322 { (eval echo "$as_me:7322: \"$cf_try\"") >&5
7325 echo "$as_me:7325: \$? = $ac_status" >&5
7326 (exit $ac_status); }
7327 if test -f conftest.out ; then
7328 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
7329 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
7334 cat >conftest.$ac_ext <<_ACEOF
7335 #line 7335 "configure"
7336 #include "confdefs.h"
7338 #include <${cf_cv_ncurses_header:-curses.h}>
7342 FILE *fp = fopen("$cf_tempfile", "w");
7343 #ifdef NCURSES_VERSION
7344 # ifdef NCURSES_VERSION_PATCH
7345 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
7347 fprintf(fp, "%s\n", NCURSES_VERSION);
7351 fprintf(fp, "old\n");
7356 ${cf_cv_main_return:-return}(0);
7359 rm -f conftest$ac_exeext
7360 if { (eval echo "$as_me:7360: \"$ac_link\"") >&5
7361 (eval $ac_link) 2>&5
7363 echo "$as_me:7363: \$? = $ac_status" >&5
7364 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7365 { (eval echo "$as_me:7365: \"$ac_try\"") >&5
7368 echo "$as_me:7368: \$? = $ac_status" >&5
7369 (exit $ac_status); }; }; then
7371 cf_cv_ncurses_version=`cat $cf_tempfile`
7373 echo "$as_me: program exited with status $ac_status" >&5
7374 echo "$as_me: failed program was:" >&5
7375 cat conftest.$ac_ext >&5
7377 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7382 echo "$as_me:7382: result: $cf_cv_ncurses_version" >&5
7383 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
7384 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
7388 cf_nculib_root=ncurses
7389 # This works, except for the special case where we find gpm, but
7390 # ncurses is in a nonstandard location via $LIBS, and we really want
7393 cf_ncurses_SAVE="$LIBS"
7394 echo "$as_me:7394: checking for Gpm_Open in -lgpm" >&5
7395 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7396 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7397 echo $ECHO_N "(cached) $ECHO_C" >&6
7399 ac_check_lib_save_LIBS=$LIBS
7401 cat >conftest.$ac_ext <<_ACEOF
7402 #line 7402 "configure"
7403 #include "confdefs.h"
7405 /* Override any gcc2 internal prototype to avoid an error. */
7409 /* We use char because int might match the return type of a gcc2
7410 builtin and then its argument prototype would still apply. */
7420 rm -f conftest.$ac_objext conftest$ac_exeext
7421 if { (eval echo "$as_me:7421: \"$ac_link\"") >&5
7422 (eval $ac_link) 2>&5
7424 echo "$as_me:7424: \$? = $ac_status" >&5
7425 (exit $ac_status); } &&
7426 { ac_try='test -s conftest$ac_exeext'
7427 { (eval echo "$as_me:7427: \"$ac_try\"") >&5
7430 echo "$as_me:7430: \$? = $ac_status" >&5
7431 (exit $ac_status); }; }; then
7432 ac_cv_lib_gpm_Gpm_Open=yes
7434 echo "$as_me: failed program was:" >&5
7435 cat conftest.$ac_ext >&5
7436 ac_cv_lib_gpm_Gpm_Open=no
7438 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7439 LIBS=$ac_check_lib_save_LIBS
7441 echo "$as_me:7441: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7442 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7443 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
7444 echo "$as_me:7444: checking for initscr in -lgpm" >&5
7445 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
7446 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
7447 echo $ECHO_N "(cached) $ECHO_C" >&6
7449 ac_check_lib_save_LIBS=$LIBS
7451 cat >conftest.$ac_ext <<_ACEOF
7452 #line 7452 "configure"
7453 #include "confdefs.h"
7455 /* Override any gcc2 internal prototype to avoid an error. */
7459 /* We use char because int might match the return type of a gcc2
7460 builtin and then its argument prototype would still apply. */
7470 rm -f conftest.$ac_objext conftest$ac_exeext
7471 if { (eval echo "$as_me:7471: \"$ac_link\"") >&5
7472 (eval $ac_link) 2>&5
7474 echo "$as_me:7474: \$? = $ac_status" >&5
7475 (exit $ac_status); } &&
7476 { ac_try='test -s conftest$ac_exeext'
7477 { (eval echo "$as_me:7477: \"$ac_try\"") >&5
7480 echo "$as_me:7480: \$? = $ac_status" >&5
7481 (exit $ac_status); }; }; then
7482 ac_cv_lib_gpm_initscr=yes
7484 echo "$as_me: failed program was:" >&5
7485 cat conftest.$ac_ext >&5
7486 ac_cv_lib_gpm_initscr=no
7488 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7489 LIBS=$ac_check_lib_save_LIBS
7491 echo "$as_me:7491: result: $ac_cv_lib_gpm_initscr" >&5
7492 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
7493 if test $ac_cv_lib_gpm_initscr = yes; then
7494 LIBS="$cf_ncurses_SAVE"
7496 cf_ncurses_LIBS="-lgpm"
7501 case $host_os in #(vi
7503 # This is only necessary if you are linking against an obsolete
7504 # version of ncurses (but it should do no harm, since it's static).
7505 if test "$cf_nculib_root" = ncurses ; then
7506 echo "$as_me:7506: checking for tgoto in -lmytinfo" >&5
7507 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
7508 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
7509 echo $ECHO_N "(cached) $ECHO_C" >&6
7511 ac_check_lib_save_LIBS=$LIBS
7512 LIBS="-lmytinfo $LIBS"
7513 cat >conftest.$ac_ext <<_ACEOF
7514 #line 7514 "configure"
7515 #include "confdefs.h"
7517 /* Override any gcc2 internal prototype to avoid an error. */
7521 /* We use char because int might match the return type of a gcc2
7522 builtin and then its argument prototype would still apply. */
7532 rm -f conftest.$ac_objext conftest$ac_exeext
7533 if { (eval echo "$as_me:7533: \"$ac_link\"") >&5
7534 (eval $ac_link) 2>&5
7536 echo "$as_me:7536: \$? = $ac_status" >&5
7537 (exit $ac_status); } &&
7538 { ac_try='test -s conftest$ac_exeext'
7539 { (eval echo "$as_me:7539: \"$ac_try\"") >&5
7542 echo "$as_me:7542: \$? = $ac_status" >&5
7543 (exit $ac_status); }; }; then
7544 ac_cv_lib_mytinfo_tgoto=yes
7546 echo "$as_me: failed program was:" >&5
7547 cat conftest.$ac_ext >&5
7548 ac_cv_lib_mytinfo_tgoto=no
7550 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7551 LIBS=$ac_check_lib_save_LIBS
7553 echo "$as_me:7553: result: $ac_cv_lib_mytinfo_tgoto" >&5
7554 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
7555 if test $ac_cv_lib_mytinfo_tgoto = yes; then
7556 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
7563 LIBS="$cf_ncurses_LIBS $LIBS"
7565 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
7567 LIBS="-l$cf_nculib_root $LIBS"
7570 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
7572 echo "$as_me:7572: checking for initscr" >&5
7573 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
7574 if test "${ac_cv_func_initscr+set}" = set; then
7575 echo $ECHO_N "(cached) $ECHO_C" >&6
7577 cat >conftest.$ac_ext <<_ACEOF
7578 #line 7578 "configure"
7579 #include "confdefs.h"
7580 /* System header to define __stub macros and hopefully few prototypes,
7581 which can conflict with char initscr (); below. */
7583 /* Override any gcc2 internal prototype to avoid an error. */
7587 /* We use char because int might match the return type of a gcc2
7588 builtin and then its argument prototype would still apply. */
7595 /* The GNU C library defines this for functions which it implements
7596 to always fail with ENOSYS. Some functions are actually named
7597 something starting with __ and the normal name is an alias. */
7598 #if defined (__stub_initscr) || defined (__stub___initscr)
7601 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
7608 rm -f conftest.$ac_objext conftest$ac_exeext
7609 if { (eval echo "$as_me:7609: \"$ac_link\"") >&5
7610 (eval $ac_link) 2>&5
7612 echo "$as_me:7612: \$? = $ac_status" >&5
7613 (exit $ac_status); } &&
7614 { ac_try='test -s conftest$ac_exeext'
7615 { (eval echo "$as_me:7615: \"$ac_try\"") >&5
7618 echo "$as_me:7618: \$? = $ac_status" >&5
7619 (exit $ac_status); }; }; then
7620 ac_cv_func_initscr=yes
7622 echo "$as_me: failed program was:" >&5
7623 cat conftest.$ac_ext >&5
7624 ac_cv_func_initscr=no
7626 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7628 echo "$as_me:7628: result: $ac_cv_func_initscr" >&5
7629 echo "${ECHO_T}$ac_cv_func_initscr" >&6
7630 if test $ac_cv_func_initscr = yes; then
7631 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7634 cf_save_LIBS="$LIBS"
7635 echo "$as_me:7635: checking for initscr in -l$cf_nculib_root" >&5
7636 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
7637 LIBS="-l$cf_nculib_root $LIBS"
7638 cat >conftest.$ac_ext <<_ACEOF
7639 #line 7639 "configure"
7640 #include "confdefs.h"
7641 #include <${cf_cv_ncurses_header:-curses.h}>
7650 rm -f conftest.$ac_objext conftest$ac_exeext
7651 if { (eval echo "$as_me:7651: \"$ac_link\"") >&5
7652 (eval $ac_link) 2>&5
7654 echo "$as_me:7654: \$? = $ac_status" >&5
7655 (exit $ac_status); } &&
7656 { ac_try='test -s conftest$ac_exeext'
7657 { (eval echo "$as_me:7657: \"$ac_try\"") >&5
7660 echo "$as_me:7660: \$? = $ac_status" >&5
7661 (exit $ac_status); }; }; then
7662 echo "$as_me:7662: result: yes" >&5
7663 echo "${ECHO_T}yes" >&6
7664 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7667 echo "$as_me: failed program was:" >&5
7668 cat conftest.$ac_ext >&5
7669 echo "$as_me:7669: result: no" >&5
7670 echo "${ECHO_T}no" >&6
7673 cf_library_path_list=""
7674 if test -n "${LDFLAGS}${LIBS}" ; then
7675 for cf_library_path in $LDFLAGS $LIBS
7677 case $cf_library_path in #(vi
7679 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7681 test "$cf_library_path" != "NONE" && \
7682 test -d "$cf_library_path" && \
7684 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
7685 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
7686 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
7687 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
7688 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
7689 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"
7692 cf_library_path_list="$cf_library_path_list $cf_search"
7700 test "/usr" != "$prefix" && \
7702 (test $prefix = NONE || test "/usr" != "$prefix") && {
7703 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
7704 test -d /usr/lib && cf_search="$cf_search /usr/lib"
7705 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
7706 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
7707 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
7708 test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
7711 test "$prefix" != "NONE" && \
7712 test -d "$prefix" && \
7714 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
7715 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
7716 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
7717 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
7718 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
7719 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
7722 test "/usr/local" != "$prefix" && \
7723 test -d "/usr/local" && \
7724 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
7725 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
7726 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
7727 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
7728 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
7729 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
7730 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
7733 test "/opt" != "$prefix" && \
7735 (test $prefix = NONE || test "/opt" != "$prefix") && {
7736 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
7737 test -d /opt/lib && cf_search="$cf_search /opt/lib"
7738 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
7739 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
7740 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
7741 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
7744 test "$HOME" != "$prefix" && \
7745 test -d "$HOME" && \
7746 (test $prefix = NONE || test "$HOME" != "$prefix") && {
7747 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
7748 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
7749 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
7750 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
7751 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
7752 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
7755 cf_search="$cf_library_path_list $cf_search"
7757 for cf_libdir in $cf_search
7759 echo "$as_me:7759: checking for -l$cf_nculib_root in $cf_libdir" >&5
7760 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
7761 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
7762 cat >conftest.$ac_ext <<_ACEOF
7763 #line 7763 "configure"
7764 #include "confdefs.h"
7765 #include <${cf_cv_ncurses_header:-curses.h}>
7774 rm -f conftest.$ac_objext conftest$ac_exeext
7775 if { (eval echo "$as_me:7775: \"$ac_link\"") >&5
7776 (eval $ac_link) 2>&5
7778 echo "$as_me:7778: \$? = $ac_status" >&5
7779 (exit $ac_status); } &&
7780 { ac_try='test -s conftest$ac_exeext'
7781 { (eval echo "$as_me:7781: \"$ac_try\"") >&5
7784 echo "$as_me:7784: \$? = $ac_status" >&5
7785 (exit $ac_status); }; }; then
7786 echo "$as_me:7786: result: yes" >&5
7787 echo "${ECHO_T}yes" >&6
7788 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
7791 echo "$as_me: failed program was:" >&5
7792 cat conftest.$ac_ext >&5
7793 echo "$as_me:7793: result: no" >&5
7794 echo "${ECHO_T}no" >&6
7795 LIBS="$cf_save_LIBS"
7797 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7801 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7805 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
7807 if test $cf_found_library = no ; then
7808 { { echo "$as_me:7808: error: Cannot link $cf_nculib_root library" >&5
7809 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
7810 { (exit 1); exit 1; }; }
7815 if test -n "$cf_ncurses_LIBS" ; then
7816 echo "$as_me:7816: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
7817 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
7818 cf_ncurses_SAVE="$LIBS"
7819 for p in $cf_ncurses_LIBS ; do
7820 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
7821 if test "$q" != "$LIBS" ; then
7825 cat >conftest.$ac_ext <<_ACEOF
7826 #line 7826 "configure"
7827 #include "confdefs.h"
7828 #include <${cf_cv_ncurses_header:-curses.h}>
7832 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
7837 rm -f conftest.$ac_objext conftest$ac_exeext
7838 if { (eval echo "$as_me:7838: \"$ac_link\"") >&5
7839 (eval $ac_link) 2>&5
7841 echo "$as_me:7841: \$? = $ac_status" >&5
7842 (exit $ac_status); } &&
7843 { ac_try='test -s conftest$ac_exeext'
7844 { (eval echo "$as_me:7844: \"$ac_try\"") >&5
7847 echo "$as_me:7847: \$? = $ac_status" >&5
7848 (exit $ac_status); }; }; then
7849 echo "$as_me:7849: result: yes" >&5
7850 echo "${ECHO_T}yes" >&6
7852 echo "$as_me: failed program was:" >&5
7853 cat conftest.$ac_ext >&5
7854 echo "$as_me:7854: result: no" >&5
7855 echo "${ECHO_T}no" >&6
7856 LIBS="$cf_ncurses_SAVE"
7858 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7861 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7863 cat >>confdefs.h <<EOF
7864 #define $cf_nculib_ROOT 1
7872 echo "$as_me:7872: checking for multibyte character support" >&5
7873 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7874 if test "${cf_cv_utf8_lib+set}" = set; then
7875 echo $ECHO_N "(cached) $ECHO_C" >&6
7878 cf_save_LIBS="$LIBS"
7879 cat >conftest.$ac_ext <<_ACEOF
7880 #line 7880 "configure"
7881 #include "confdefs.h"
7892 rm -f conftest.$ac_objext conftest$ac_exeext
7893 if { (eval echo "$as_me:7893: \"$ac_link\"") >&5
7894 (eval $ac_link) 2>&5
7896 echo "$as_me:7896: \$? = $ac_status" >&5
7897 (exit $ac_status); } &&
7898 { ac_try='test -s conftest$ac_exeext'
7899 { (eval echo "$as_me:7899: \"$ac_try\"") >&5
7902 echo "$as_me:7902: \$? = $ac_status" >&5
7903 (exit $ac_status); }; }; then
7906 echo "$as_me: failed program was:" >&5
7907 cat conftest.$ac_ext >&5
7909 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7910 # will be set on completion of the AC_TRY_LINK below.
7911 cf_cv_header_path_utf8=
7912 cf_cv_library_path_utf8=
7914 echo "${as_me:-configure}:7914: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7916 cf_save_LIBS="$LIBS"
7918 cat >conftest.$ac_ext <<_ACEOF
7919 #line 7919 "configure"
7920 #include "confdefs.h"
7922 #include <libutf8.h>
7931 rm -f conftest.$ac_objext conftest$ac_exeext
7932 if { (eval echo "$as_me:7932: \"$ac_link\"") >&5
7933 (eval $ac_link) 2>&5
7935 echo "$as_me:7935: \$? = $ac_status" >&5
7936 (exit $ac_status); } &&
7937 { ac_try='test -s conftest$ac_exeext'
7938 { (eval echo "$as_me:7938: \"$ac_try\"") >&5
7941 echo "$as_me:7941: \$? = $ac_status" >&5
7942 (exit $ac_status); }; }; then
7944 cf_cv_find_linkage_utf8=yes
7945 cf_cv_header_path_utf8=/usr/include
7946 cf_cv_library_path_utf8=/usr/lib
7949 echo "$as_me: failed program was:" >&5
7950 cat conftest.$ac_ext >&5
7952 LIBS="-lutf8 $cf_save_LIBS"
7954 cat >conftest.$ac_ext <<_ACEOF
7955 #line 7955 "configure"
7956 #include "confdefs.h"
7958 #include <libutf8.h>
7967 rm -f conftest.$ac_objext conftest$ac_exeext
7968 if { (eval echo "$as_me:7968: \"$ac_link\"") >&5
7969 (eval $ac_link) 2>&5
7971 echo "$as_me:7971: \$? = $ac_status" >&5
7972 (exit $ac_status); } &&
7973 { ac_try='test -s conftest$ac_exeext'
7974 { (eval echo "$as_me:7974: \"$ac_try\"") >&5
7977 echo "$as_me:7977: \$? = $ac_status" >&5
7978 (exit $ac_status); }; }; then
7980 cf_cv_find_linkage_utf8=yes
7981 cf_cv_header_path_utf8=/usr/include
7982 cf_cv_library_path_utf8=/usr/lib
7983 cf_cv_library_file_utf8="-lutf8"
7986 echo "$as_me: failed program was:" >&5
7987 cat conftest.$ac_ext >&5
7989 cf_cv_find_linkage_utf8=no
7990 LIBS="$cf_save_LIBS"
7992 test -n "$verbose" && echo " find linkage for utf8 library" 1>&6
7994 echo "${as_me:-configure}:7994: testing find linkage for utf8 library ..." 1>&5
7996 echo "${as_me:-configure}:7996: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7998 cf_save_CPPFLAGS="$CPPFLAGS"
7999 cf_test_CPPFLAGS="$CPPFLAGS"
8003 # collect the current set of include-directories from compiler flags
8004 cf_header_path_list=""
8005 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8006 for cf_header_path in $CPPFLAGS $CFLAGS
8008 case $cf_header_path in #(vi
8010 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8012 test "$cf_header_path" != "NONE" && \
8013 test -d "$cf_header_path" && \
8015 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8016 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8017 test -d $cf_header_path/include/utf8 && cf_search="$cf_search $cf_header_path/include/utf8"
8018 test -d $cf_header_path/include/utf8/include && cf_search="$cf_search $cf_header_path/include/utf8/include"
8019 test -d $cf_header_path/utf8/include && cf_search="$cf_search $cf_header_path/utf8/include"
8020 test -d $cf_header_path/utf8/include/utf8 && cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8023 cf_header_path_list="$cf_header_path_list $cf_search"
8029 # add the variations for the package we are looking for
8033 test "/usr" != "$prefix" && \
8035 (test $prefix = NONE || test "/usr" != "$prefix") && {
8036 test -n "$verbose" && echo " ... testing for include-directories under /usr"
8037 test -d /usr/include && cf_search="$cf_search /usr/include"
8038 test -d /usr/include/utf8 && cf_search="$cf_search /usr/include/utf8"
8039 test -d /usr/include/utf8/include && cf_search="$cf_search /usr/include/utf8/include"
8040 test -d /usr/utf8/include && cf_search="$cf_search /usr/utf8/include"
8041 test -d /usr/utf8/include/utf8 && cf_search="$cf_search /usr/utf8/include/utf8"
8044 test "$prefix" != "NONE" && \
8045 test -d "$prefix" && \
8047 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8048 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8049 test -d $prefix/include/utf8 && cf_search="$cf_search $prefix/include/utf8"
8050 test -d $prefix/include/utf8/include && cf_search="$cf_search $prefix/include/utf8/include"
8051 test -d $prefix/utf8/include && cf_search="$cf_search $prefix/utf8/include"
8052 test -d $prefix/utf8/include/utf8 && cf_search="$cf_search $prefix/utf8/include/utf8"
8055 test "/usr/local" != "$prefix" && \
8056 test -d "/usr/local" && \
8057 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8058 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
8059 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
8060 test -d /usr/local/include/utf8 && cf_search="$cf_search /usr/local/include/utf8"
8061 test -d /usr/local/include/utf8/include && cf_search="$cf_search /usr/local/include/utf8/include"
8062 test -d /usr/local/utf8/include && cf_search="$cf_search /usr/local/utf8/include"
8063 test -d /usr/local/utf8/include/utf8 && cf_search="$cf_search /usr/local/utf8/include/utf8"
8066 test "/opt" != "$prefix" && \
8068 (test $prefix = NONE || test "/opt" != "$prefix") && {
8069 test -n "$verbose" && echo " ... testing for include-directories under /opt"
8070 test -d /opt/include && cf_search="$cf_search /opt/include"
8071 test -d /opt/include/utf8 && cf_search="$cf_search /opt/include/utf8"
8072 test -d /opt/include/utf8/include && cf_search="$cf_search /opt/include/utf8/include"
8073 test -d /opt/utf8/include && cf_search="$cf_search /opt/utf8/include"
8074 test -d /opt/utf8/include/utf8 && cf_search="$cf_search /opt/utf8/include/utf8"
8077 test "$HOME" != "$prefix" && \
8078 test -d "$HOME" && \
8079 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8080 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
8081 test -d $HOME/include && cf_search="$cf_search $HOME/include"
8082 test -d $HOME/include/utf8 && cf_search="$cf_search $HOME/include/utf8"
8083 test -d $HOME/include/utf8/include && cf_search="$cf_search $HOME/include/utf8/include"
8084 test -d $HOME/utf8/include && cf_search="$cf_search $HOME/utf8/include"
8085 test -d $HOME/utf8/include/utf8 && cf_search="$cf_search $HOME/utf8/include/utf8"
8088 test "$includedir" != NONE && \
8089 test "$includedir" != "/usr/include" && \
8090 test -d "$includedir" && {
8091 test -d $includedir && cf_search="$cf_search $includedir"
8092 test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8095 test "$oldincludedir" != NONE && \
8096 test "$oldincludedir" != "/usr/include" && \
8097 test -d "$oldincludedir" && {
8098 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8099 test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8102 cf_search="$cf_search $cf_header_path_list"
8104 for cf_cv_header_path_utf8 in $cf_search
8106 if test -d $cf_cv_header_path_utf8 ; then
8107 test -n "$verbose" && echo " ... testing $cf_cv_header_path_utf8" 1>&6
8109 echo "${as_me:-configure}:8109: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8111 CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8112 cat >conftest.$ac_ext <<_ACEOF
8113 #line 8113 "configure"
8114 #include "confdefs.h"
8116 #include <libutf8.h>
8125 rm -f conftest.$ac_objext
8126 if { (eval echo "$as_me:8126: \"$ac_compile\"") >&5
8127 (eval $ac_compile) 2>&5
8129 echo "$as_me:8129: \$? = $ac_status" >&5
8130 (exit $ac_status); } &&
8131 { ac_try='test -s conftest.$ac_objext'
8132 { (eval echo "$as_me:8132: \"$ac_try\"") >&5
8135 echo "$as_me:8135: \$? = $ac_status" >&5
8136 (exit $ac_status); }; }; then
8138 test -n "$verbose" && echo " ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8140 echo "${as_me:-configure}:8140: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8142 cf_cv_find_linkage_utf8=maybe
8143 cf_test_CPPFLAGS="$CPPFLAGS"
8146 echo "$as_me: failed program was:" >&5
8147 cat conftest.$ac_ext >&5
8149 CPPFLAGS="$cf_save_CPPFLAGS"
8152 rm -f conftest.$ac_objext conftest.$ac_ext
8156 if test "$cf_cv_find_linkage_utf8" = maybe ; then
8158 echo "${as_me:-configure}:8158: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8160 cf_save_LIBS="$LIBS"
8161 cf_save_LDFLAGS="$LDFLAGS"
8163 if test "$cf_cv_find_linkage_utf8" != yes ; then
8166 cf_library_path_list=""
8167 if test -n "${LDFLAGS}${LIBS}" ; then
8168 for cf_library_path in $LDFLAGS $LIBS
8170 case $cf_library_path in #(vi
8172 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8174 test "$cf_library_path" != "NONE" && \
8175 test -d "$cf_library_path" && \
8177 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
8178 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
8179 test -d $cf_library_path/lib/utf8 && cf_search="$cf_search $cf_library_path/lib/utf8"
8180 test -d $cf_library_path/lib/utf8/lib && cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8181 test -d $cf_library_path/utf8/lib && cf_search="$cf_search $cf_library_path/utf8/lib"
8182 test -d $cf_library_path/utf8/lib/utf8 && cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8185 cf_library_path_list="$cf_library_path_list $cf_search"
8193 test "/usr" != "$prefix" && \
8195 (test $prefix = NONE || test "/usr" != "$prefix") && {
8196 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
8197 test -d /usr/lib && cf_search="$cf_search /usr/lib"
8198 test -d /usr/lib/utf8 && cf_search="$cf_search /usr/lib/utf8"
8199 test -d /usr/lib/utf8/lib && cf_search="$cf_search /usr/lib/utf8/lib"
8200 test -d /usr/utf8/lib && cf_search="$cf_search /usr/utf8/lib"
8201 test -d /usr/utf8/lib/utf8 && cf_search="$cf_search /usr/utf8/lib/utf8"
8204 test "$prefix" != "NONE" && \
8205 test -d "$prefix" && \
8207 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
8208 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
8209 test -d $prefix/lib/utf8 && cf_search="$cf_search $prefix/lib/utf8"
8210 test -d $prefix/lib/utf8/lib && cf_search="$cf_search $prefix/lib/utf8/lib"
8211 test -d $prefix/utf8/lib && cf_search="$cf_search $prefix/utf8/lib"
8212 test -d $prefix/utf8/lib/utf8 && cf_search="$cf_search $prefix/utf8/lib/utf8"
8215 test "/usr/local" != "$prefix" && \
8216 test -d "/usr/local" && \
8217 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8218 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
8219 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
8220 test -d /usr/local/lib/utf8 && cf_search="$cf_search /usr/local/lib/utf8"
8221 test -d /usr/local/lib/utf8/lib && cf_search="$cf_search /usr/local/lib/utf8/lib"
8222 test -d /usr/local/utf8/lib && cf_search="$cf_search /usr/local/utf8/lib"
8223 test -d /usr/local/utf8/lib/utf8 && cf_search="$cf_search /usr/local/utf8/lib/utf8"
8226 test "/opt" != "$prefix" && \
8228 (test $prefix = NONE || test "/opt" != "$prefix") && {
8229 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
8230 test -d /opt/lib && cf_search="$cf_search /opt/lib"
8231 test -d /opt/lib/utf8 && cf_search="$cf_search /opt/lib/utf8"
8232 test -d /opt/lib/utf8/lib && cf_search="$cf_search /opt/lib/utf8/lib"
8233 test -d /opt/utf8/lib && cf_search="$cf_search /opt/utf8/lib"
8234 test -d /opt/utf8/lib/utf8 && cf_search="$cf_search /opt/utf8/lib/utf8"
8237 test "$HOME" != "$prefix" && \
8238 test -d "$HOME" && \
8239 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8240 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
8241 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
8242 test -d $HOME/lib/utf8 && cf_search="$cf_search $HOME/lib/utf8"
8243 test -d $HOME/lib/utf8/lib && cf_search="$cf_search $HOME/lib/utf8/lib"
8244 test -d $HOME/utf8/lib && cf_search="$cf_search $HOME/utf8/lib"
8245 test -d $HOME/utf8/lib/utf8 && cf_search="$cf_search $HOME/utf8/lib/utf8"
8248 cf_search="$cf_library_path_list $cf_search"
8250 for cf_cv_library_path_utf8 in $cf_search
8252 if test -d $cf_cv_library_path_utf8 ; then
8253 test -n "$verbose" && echo " ... testing $cf_cv_library_path_utf8" 1>&6
8255 echo "${as_me:-configure}:8255: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8257 CPPFLAGS="$cf_test_CPPFLAGS"
8258 LIBS="-lutf8 $cf_save_LIBS"
8259 LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8260 cat >conftest.$ac_ext <<_ACEOF
8261 #line 8261 "configure"
8262 #include "confdefs.h"
8264 #include <libutf8.h>
8273 rm -f conftest.$ac_objext conftest$ac_exeext
8274 if { (eval echo "$as_me:8274: \"$ac_link\"") >&5
8275 (eval $ac_link) 2>&5
8277 echo "$as_me:8277: \$? = $ac_status" >&5
8278 (exit $ac_status); } &&
8279 { ac_try='test -s conftest$ac_exeext'
8280 { (eval echo "$as_me:8280: \"$ac_try\"") >&5
8283 echo "$as_me:8283: \$? = $ac_status" >&5
8284 (exit $ac_status); }; }; then
8286 test -n "$verbose" && echo " ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8288 echo "${as_me:-configure}:8288: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8290 cf_cv_find_linkage_utf8=yes
8291 cf_cv_library_file_utf8="-lutf8"
8294 echo "$as_me: failed program was:" >&5
8295 cat conftest.$ac_ext >&5
8297 CPPFLAGS="$cf_save_CPPFLAGS"
8298 LIBS="$cf_save_LIBS"
8299 LDFLAGS="$cf_save_LDFLAGS"
8302 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8305 CPPFLAGS="$cf_save_CPPFLAGS"
8306 LDFLAGS="$cf_save_LDFLAGS"
8310 cf_cv_find_linkage_utf8=no
8314 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8317 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8319 LIBS="$cf_save_LIBS"
8321 if test "$cf_cv_find_linkage_utf8" = yes ; then
8322 cf_cv_utf8_lib=add-on
8328 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8330 echo "$as_me:8330: result: $cf_cv_utf8_lib" >&5
8331 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8333 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8335 if test "$cf_cv_utf8_lib" = "add-on" ; then
8336 cat >>confdefs.h <<\EOF
8337 #define HAVE_LIBUTF8_H 1
8340 if test -n "$cf_cv_header_path_utf8" ; then
8341 for cf_add_incdir in $cf_cv_header_path_utf8
8343 while test $cf_add_incdir != /usr/include
8345 if test -d $cf_add_incdir
8348 if test -n "$CFLAGS$CPPFLAGS" ; then
8349 # a loop is needed to ensure we can add subdirs of existing dirs
8350 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8351 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8352 cf_have_incdir=yes; break
8357 if test "$cf_have_incdir" = no ; then
8358 if test "$cf_add_incdir" = /usr/local/include ; then
8359 if test "$GCC" = yes
8361 cf_save_CPPFLAGS=$CPPFLAGS
8362 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8363 cat >conftest.$ac_ext <<_ACEOF
8364 #line 8364 "configure"
8365 #include "confdefs.h"
8375 rm -f conftest.$ac_objext
8376 if { (eval echo "$as_me:8376: \"$ac_compile\"") >&5
8377 (eval $ac_compile) 2>&5
8379 echo "$as_me:8379: \$? = $ac_status" >&5
8380 (exit $ac_status); } &&
8381 { ac_try='test -s conftest.$ac_objext'
8382 { (eval echo "$as_me:8382: \"$ac_try\"") >&5
8385 echo "$as_me:8385: \$? = $ac_status" >&5
8386 (exit $ac_status); }; }; then
8389 echo "$as_me: failed program was:" >&5
8390 cat conftest.$ac_ext >&5
8393 rm -f conftest.$ac_objext conftest.$ac_ext
8394 CPPFLAGS=$cf_save_CPPFLAGS
8399 if test "$cf_have_incdir" = no ; then
8400 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8402 echo "${as_me:-configure}:8402: testing adding $cf_add_incdir to include-path ..." 1>&5
8404 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8406 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8407 test "$cf_top_incdir" = "$cf_add_incdir" && break
8408 cf_add_incdir="$cf_top_incdir"
8417 if test -n "$cf_cv_library_path_utf8" ; then
8418 for cf_add_libdir in $cf_cv_library_path_utf8
8420 if test $cf_add_libdir = /usr/lib ; then
8422 elif test -d $cf_add_libdir
8425 if test -n "$LDFLAGS$LIBS" ; then
8426 # a loop is needed to ensure we can add subdirs of existing dirs
8427 for cf_test_libdir in $LDFLAGS $LIBS ; do
8428 if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8429 cf_have_libdir=yes; break
8433 if test "$cf_have_libdir" = no ; then
8434 test -n "$verbose" && echo " adding $cf_add_libdir to library-path" 1>&6
8436 echo "${as_me:-configure}:8436: testing adding $cf_add_libdir to library-path ..." 1>&5
8438 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8444 LIBS="$cf_cv_library_file_utf8 $LIBS"
8447 cf_ncuconfig_root=ncursesw
8449 echo "Looking for ${cf_ncuconfig_root}-config"
8451 if test -n "$ac_tool_prefix"; then
8452 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8454 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
8455 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
8456 echo "$as_me:8456: checking for $ac_word" >&5
8457 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8458 if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
8459 echo $ECHO_N "(cached) $ECHO_C" >&6
8461 if test -n "$NCURSES_CONFIG"; then
8462 ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
8464 ac_save_IFS=$IFS; IFS=$ac_path_separator
8466 for ac_dir in $ac_dummy; do
8468 test -z "$ac_dir" && ac_dir=.
8469 $as_executable_p "$ac_dir/$ac_word" || continue
8470 ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
8471 echo "$as_me:8471: found $ac_dir/$ac_word" >&5
8477 NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
8478 if test -n "$NCURSES_CONFIG"; then
8479 echo "$as_me:8479: result: $NCURSES_CONFIG" >&5
8480 echo "${ECHO_T}$NCURSES_CONFIG" >&6
8482 echo "$as_me:8482: result: no" >&5
8483 echo "${ECHO_T}no" >&6
8486 test -n "$NCURSES_CONFIG" && break
8489 if test -z "$NCURSES_CONFIG"; then
8490 ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
8491 for ac_prog in ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
8493 # Extract the first word of "$ac_prog", so it can be a program name with args.
8494 set dummy $ac_prog; ac_word=$2
8495 echo "$as_me:8495: checking for $ac_word" >&5
8496 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8497 if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
8498 echo $ECHO_N "(cached) $ECHO_C" >&6
8500 if test -n "$ac_ct_NCURSES_CONFIG"; then
8501 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
8503 ac_save_IFS=$IFS; IFS=$ac_path_separator
8505 for ac_dir in $ac_dummy; do
8507 test -z "$ac_dir" && ac_dir=.
8508 $as_executable_p "$ac_dir/$ac_word" || continue
8509 ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
8510 echo "$as_me:8510: found $ac_dir/$ac_word" >&5
8516 ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
8517 if test -n "$ac_ct_NCURSES_CONFIG"; then
8518 echo "$as_me:8518: result: $ac_ct_NCURSES_CONFIG" >&5
8519 echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
8521 echo "$as_me:8521: result: no" >&5
8522 echo "${ECHO_T}no" >&6
8525 test -n "$ac_ct_NCURSES_CONFIG" && break
8527 test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
8529 NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
8532 if test "$NCURSES_CONFIG" != none ; then
8534 CPPFLAGS="$CPPFLAGS `$NCURSES_CONFIG --cflags`"
8535 LIBS="`$NCURSES_CONFIG --libs` $LIBS"
8537 # even with config script, some packages use no-override for curses.h
8539 echo "$as_me:8539: checking if we have identified curses headers" >&5
8540 echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
8541 if test "${cf_cv_ncurses_header+set}" = set; then
8542 echo $ECHO_N "(cached) $ECHO_C" >&6
8545 cf_cv_ncurses_header=none
8547 ncursesw/ncurses.h \
8552 cat >conftest.$ac_ext <<_ACEOF
8553 #line 8553 "configure"
8554 #include "confdefs.h"
8555 #include <${cf_header}>
8559 initscr(); tgoto("?", 0,0)
8564 rm -f conftest.$ac_objext
8565 if { (eval echo "$as_me:8565: \"$ac_compile\"") >&5
8566 (eval $ac_compile) 2>&5
8568 echo "$as_me:8568: \$? = $ac_status" >&5
8569 (exit $ac_status); } &&
8570 { ac_try='test -s conftest.$ac_objext'
8571 { (eval echo "$as_me:8571: \"$ac_try\"") >&5
8574 echo "$as_me:8574: \$? = $ac_status" >&5
8575 (exit $ac_status); }; }; then
8576 cf_cv_ncurses_header=$cf_header; break
8578 echo "$as_me: failed program was:" >&5
8579 cat conftest.$ac_ext >&5
8581 rm -f conftest.$ac_objext conftest.$ac_ext
8585 echo "$as_me:8585: result: $cf_cv_ncurses_header" >&5
8586 echo "${ECHO_T}$cf_cv_ncurses_header" >&6
8588 if test "$cf_cv_ncurses_header" = none ; then
8589 { { echo "$as_me:8589: error: No curses header-files found" >&5
8590 echo "$as_me: error: No curses header-files found" >&2;}
8591 { (exit 1); exit 1; }; }
8594 # cheat, to get the right #define's for HAVE_NCURSES_H, etc.
8596 for ac_header in $cf_cv_ncurses_header
8598 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8599 echo "$as_me:8599: checking for $ac_header" >&5
8600 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8601 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8602 echo $ECHO_N "(cached) $ECHO_C" >&6
8604 cat >conftest.$ac_ext <<_ACEOF
8605 #line 8605 "configure"
8606 #include "confdefs.h"
8607 #include <$ac_header>
8609 if { (eval echo "$as_me:8609: \"$ac_cpp conftest.$ac_ext\"") >&5
8610 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8612 egrep -v '^ *\+' conftest.er1 >conftest.err
8614 cat conftest.err >&5
8615 echo "$as_me:8615: \$? = $ac_status" >&5
8616 (exit $ac_status); } >/dev/null; then
8617 if test -s conftest.err; then
8618 ac_cpp_err=$ac_c_preproc_warn_flag
8625 if test -z "$ac_cpp_err"; then
8626 eval "$as_ac_Header=yes"
8628 echo "$as_me: failed program was:" >&5
8629 cat conftest.$ac_ext >&5
8630 eval "$as_ac_Header=no"
8632 rm -f conftest.err conftest.$ac_ext
8634 echo "$as_me:8634: result: `eval echo '${'$as_ac_Header'}'`" >&5
8635 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
8636 if test `eval echo '${'$as_ac_Header'}'` = yes; then
8637 cat >>confdefs.h <<EOF
8638 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8644 cat >>confdefs.h <<\EOF
8648 cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8650 cat >>confdefs.h <<EOF
8651 #define $cf_nculib_ROOT 1
8654 cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
8658 cf_ncuhdr_root=ncursesw
8660 test -n "$cf_cv_curses_dir" && \
8661 test "$cf_cv_curses_dir" != "no" && { \
8663 if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
8664 for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
8666 while test $cf_add_incdir != /usr/include
8668 if test -d $cf_add_incdir
8671 if test -n "$CFLAGS$CPPFLAGS" ; then
8672 # a loop is needed to ensure we can add subdirs of existing dirs
8673 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8674 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8675 cf_have_incdir=yes; break
8680 if test "$cf_have_incdir" = no ; then
8681 if test "$cf_add_incdir" = /usr/local/include ; then
8682 if test "$GCC" = yes
8684 cf_save_CPPFLAGS=$CPPFLAGS
8685 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8686 cat >conftest.$ac_ext <<_ACEOF
8687 #line 8687 "configure"
8688 #include "confdefs.h"
8698 rm -f conftest.$ac_objext
8699 if { (eval echo "$as_me:8699: \"$ac_compile\"") >&5
8700 (eval $ac_compile) 2>&5
8702 echo "$as_me:8702: \$? = $ac_status" >&5
8703 (exit $ac_status); } &&
8704 { ac_try='test -s conftest.$ac_objext'
8705 { (eval echo "$as_me:8705: \"$ac_try\"") >&5
8708 echo "$as_me:8708: \$? = $ac_status" >&5
8709 (exit $ac_status); }; }; then
8712 echo "$as_me: failed program was:" >&5
8713 cat conftest.$ac_ext >&5
8716 rm -f conftest.$ac_objext conftest.$ac_ext
8717 CPPFLAGS=$cf_save_CPPFLAGS
8722 if test "$cf_have_incdir" = no ; then
8723 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8725 echo "${as_me:-configure}:8725: testing adding $cf_add_incdir to include-path ..." 1>&5
8727 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8729 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8730 test "$cf_top_incdir" = "$cf_add_incdir" && break
8731 cf_add_incdir="$cf_top_incdir"
8742 echo "$as_me:8742: checking for $cf_ncuhdr_root header in include-path" >&5
8743 echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
8744 if test "${cf_cv_ncurses_h+set}" = set; then
8745 echo $ECHO_N "(cached) $ECHO_C" >&6
8748 cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
8749 ( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
8750 for cf_header in $cf_header_list
8753 cat >conftest.$ac_ext <<_ACEOF
8754 #line 8754 "configure"
8755 #include "confdefs.h"
8757 #define _XOPEN_SOURCE_EXTENDED
8758 #undef HAVE_LIBUTF8_H /* in case we used CF_UTF8_LIB */
8759 #define HAVE_LIBUTF8_H /* to force ncurses' header file to use cchar_t */
8761 #include <$cf_header>
8766 #ifdef NCURSES_VERSION
8772 printf("%s\n", NCURSES_VERSION);
8785 rm -f conftest.$ac_objext
8786 if { (eval echo "$as_me:8786: \"$ac_compile\"") >&5
8787 (eval $ac_compile) 2>&5
8789 echo "$as_me:8789: \$? = $ac_status" >&5
8790 (exit $ac_status); } &&
8791 { ac_try='test -s conftest.$ac_objext'
8792 { (eval echo "$as_me:8792: \"$ac_try\"") >&5
8795 echo "$as_me:8795: \$? = $ac_status" >&5
8796 (exit $ac_status); }; }; then
8797 cf_cv_ncurses_h=$cf_header
8800 echo "$as_me: failed program was:" >&5
8801 cat conftest.$ac_ext >&5
8804 rm -f conftest.$ac_objext conftest.$ac_ext
8806 test "$cf_cv_ncurses_h" != no && break
8810 echo "$as_me:8810: result: $cf_cv_ncurses_h" >&5
8811 echo "${ECHO_T}$cf_cv_ncurses_h" >&6
8813 if test "$cf_cv_ncurses_h" != no ; then
8814 cf_cv_ncurses_header=$cf_cv_ncurses_h
8817 echo "$as_me:8817: checking for $cf_ncuhdr_root include-path" >&5
8818 echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
8819 if test "${cf_cv_ncurses_h2+set}" = set; then
8820 echo $ECHO_N "(cached) $ECHO_C" >&6
8823 test -n "$verbose" && echo
8827 # collect the current set of include-directories from compiler flags
8828 cf_header_path_list=""
8829 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8830 for cf_header_path in $CPPFLAGS $CFLAGS
8832 case $cf_header_path in #(vi
8834 cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8836 test "$cf_header_path" != "NONE" && \
8837 test -d "$cf_header_path" && \
8839 test -n "$verbose" && echo " ... testing for include-directories under $cf_header_path"
8840 test -d $cf_header_path/include && cf_search="$cf_search $cf_header_path/include"
8841 test -d $cf_header_path/include/$cf_ncuhdr_root && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
8842 test -d $cf_header_path/include/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
8843 test -d $cf_header_path/$cf_ncuhdr_root/include && cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
8844 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"
8847 cf_header_path_list="$cf_header_path_list $cf_search"
8853 # add the variations for the package we are looking for
8857 test "/usr" != "$prefix" && \
8859 (test $prefix = NONE || test "/usr" != "$prefix") && {
8860 test -n "$verbose" && echo " ... testing for include-directories under /usr"
8861 test -d /usr/include && cf_search="$cf_search /usr/include"
8862 test -d /usr/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/include/$cf_ncuhdr_root"
8863 test -d /usr/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/include/$cf_ncuhdr_root/include"
8864 test -d /usr/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/$cf_ncuhdr_root/include"
8865 test -d /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8868 test "$prefix" != "NONE" && \
8869 test -d "$prefix" && \
8871 test -n "$verbose" && echo " ... testing for include-directories under $prefix"
8872 test -d $prefix/include && cf_search="$cf_search $prefix/include"
8873 test -d $prefix/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
8874 test -d $prefix/include/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
8875 test -d $prefix/$cf_ncuhdr_root/include && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
8876 test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8879 test "/usr/local" != "$prefix" && \
8880 test -d "/usr/local" && \
8881 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8882 test -n "$verbose" && echo " ... testing for include-directories under /usr/local"
8883 test -d /usr/local/include && cf_search="$cf_search /usr/local/include"
8884 test -d /usr/local/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root"
8885 test -d /usr/local/include/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/include/$cf_ncuhdr_root/include"
8886 test -d /usr/local/$cf_ncuhdr_root/include && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include"
8887 test -d /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /usr/local/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8890 test "/opt" != "$prefix" && \
8892 (test $prefix = NONE || test "/opt" != "$prefix") && {
8893 test -n "$verbose" && echo " ... testing for include-directories under /opt"
8894 test -d /opt/include && cf_search="$cf_search /opt/include"
8895 test -d /opt/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/include/$cf_ncuhdr_root"
8896 test -d /opt/include/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/include/$cf_ncuhdr_root/include"
8897 test -d /opt/$cf_ncuhdr_root/include && cf_search="$cf_search /opt/$cf_ncuhdr_root/include"
8898 test -d /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search /opt/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8901 test "$HOME" != "$prefix" && \
8902 test -d "$HOME" && \
8903 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8904 test -n "$verbose" && echo " ... testing for include-directories under $HOME"
8905 test -d $HOME/include && cf_search="$cf_search $HOME/include"
8906 test -d $HOME/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root"
8907 test -d $HOME/include/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/include/$cf_ncuhdr_root/include"
8908 test -d $HOME/$cf_ncuhdr_root/include && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include"
8909 test -d $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root && cf_search="$cf_search $HOME/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
8912 test "$includedir" != NONE && \
8913 test "$includedir" != "/usr/include" && \
8914 test -d "$includedir" && {
8915 test -d $includedir && cf_search="$cf_search $includedir"
8916 test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
8919 test "$oldincludedir" != NONE && \
8920 test "$oldincludedir" != "/usr/include" && \
8921 test -d "$oldincludedir" && {
8922 test -d $oldincludedir && cf_search="$cf_search $oldincludedir"
8923 test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
8926 cf_search="$cf_search $cf_header_path_list"
8928 test -n "$verbose" && echo search path $cf_search
8929 cf_save2_CPPFLAGS="$CPPFLAGS"
8930 for cf_incdir in $cf_search
8933 if test -n "$cf_incdir" ; then
8934 for cf_add_incdir in $cf_incdir
8936 while test $cf_add_incdir != /usr/include
8938 if test -d $cf_add_incdir
8941 if test -n "$CFLAGS$CPPFLAGS" ; then
8942 # a loop is needed to ensure we can add subdirs of existing dirs
8943 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8944 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8945 cf_have_incdir=yes; break
8950 if test "$cf_have_incdir" = no ; then
8951 if test "$cf_add_incdir" = /usr/local/include ; then
8952 if test "$GCC" = yes
8954 cf_save_CPPFLAGS=$CPPFLAGS
8955 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8956 cat >conftest.$ac_ext <<_ACEOF
8957 #line 8957 "configure"
8958 #include "confdefs.h"
8968 rm -f conftest.$ac_objext
8969 if { (eval echo "$as_me:8969: \"$ac_compile\"") >&5
8970 (eval $ac_compile) 2>&5
8972 echo "$as_me:8972: \$? = $ac_status" >&5
8973 (exit $ac_status); } &&
8974 { ac_try='test -s conftest.$ac_objext'
8975 { (eval echo "$as_me:8975: \"$ac_try\"") >&5
8978 echo "$as_me:8978: \$? = $ac_status" >&5
8979 (exit $ac_status); }; }; then
8982 echo "$as_me: failed program was:" >&5
8983 cat conftest.$ac_ext >&5
8986 rm -f conftest.$ac_objext conftest.$ac_ext
8987 CPPFLAGS=$cf_save_CPPFLAGS
8992 if test "$cf_have_incdir" = no ; then
8993 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
8995 echo "${as_me:-configure}:8995: testing adding $cf_add_incdir to include-path ..." 1>&5
8997 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8999 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9000 test "$cf_top_incdir" = "$cf_add_incdir" && break
9001 cf_add_incdir="$cf_top_incdir"
9015 cat >conftest.$ac_ext <<_ACEOF
9016 #line 9016 "configure"
9017 #include "confdefs.h"
9019 #include <$cf_header>
9024 #ifdef NCURSES_VERSION
9026 printf("%s\n", NCURSES_VERSION);
9039 rm -f conftest.$ac_objext
9040 if { (eval echo "$as_me:9040: \"$ac_compile\"") >&5
9041 (eval $ac_compile) 2>&5
9043 echo "$as_me:9043: \$? = $ac_status" >&5
9044 (exit $ac_status); } &&
9045 { ac_try='test -s conftest.$ac_objext'
9046 { (eval echo "$as_me:9046: \"$ac_try\"") >&5
9049 echo "$as_me:9049: \$? = $ac_status" >&5
9050 (exit $ac_status); }; }; then
9051 cf_cv_ncurses_h2=$cf_header
9054 echo "$as_me: failed program was:" >&5
9055 cat conftest.$ac_ext >&5
9058 rm -f conftest.$ac_objext conftest.$ac_ext
9060 if test "$cf_cv_ncurses_h2" != no ; then
9061 cf_cv_ncurses_h2=$cf_incdir/$cf_header
9062 test -n "$verbose" && echo $ac_n " ... found $ac_c" 1>&6
9065 test -n "$verbose" && echo " ... tested $cf_incdir/$cf_header" 1>&6
9067 CPPFLAGS="$cf_save2_CPPFLAGS"
9068 test "$cf_cv_ncurses_h2" != no && break
9070 test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:9070: error: not found" >&5
9071 echo "$as_me: error: not found" >&2;}
9072 { (exit 1); exit 1; }; }
9075 echo "$as_me:9075: result: $cf_cv_ncurses_h2" >&5
9076 echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
9078 cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
9079 cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
9080 if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
9081 cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
9084 if test -n "$cf_1st_incdir" ; then
9085 for cf_add_incdir in $cf_1st_incdir
9087 while test $cf_add_incdir != /usr/include
9089 if test -d $cf_add_incdir
9092 if test -n "$CFLAGS$CPPFLAGS" ; then
9093 # a loop is needed to ensure we can add subdirs of existing dirs
9094 for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9095 if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9096 cf_have_incdir=yes; break
9101 if test "$cf_have_incdir" = no ; then
9102 if test "$cf_add_incdir" = /usr/local/include ; then
9103 if test "$GCC" = yes
9105 cf_save_CPPFLAGS=$CPPFLAGS
9106 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9107 cat >conftest.$ac_ext <<_ACEOF
9108 #line 9108 "configure"
9109 #include "confdefs.h"
9119 rm -f conftest.$ac_objext
9120 if { (eval echo "$as_me:9120: \"$ac_compile\"") >&5
9121 (eval $ac_compile) 2>&5
9123 echo "$as_me:9123: \$? = $ac_status" >&5
9124 (exit $ac_status); } &&
9125 { ac_try='test -s conftest.$ac_objext'
9126 { (eval echo "$as_me:9126: \"$ac_try\"") >&5
9129 echo "$as_me:9129: \$? = $ac_status" >&5
9130 (exit $ac_status); }; }; then
9133 echo "$as_me: failed program was:" >&5
9134 cat conftest.$ac_ext >&5
9137 rm -f conftest.$ac_objext conftest.$ac_ext
9138 CPPFLAGS=$cf_save_CPPFLAGS
9143 if test "$cf_have_incdir" = no ; then
9144 test -n "$verbose" && echo " adding $cf_add_incdir to include-path" 1>&6
9146 echo "${as_me:-configure}:9146: testing adding $cf_add_incdir to include-path ..." 1>&5
9148 CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9150 cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9151 test "$cf_top_incdir" = "$cf_add_incdir" && break
9152 cf_add_incdir="$cf_top_incdir"
9163 # Set definitions to allow ifdef'ing for ncurses.h
9165 case $cf_cv_ncurses_header in # (vi
9167 cat >>confdefs.h <<\EOF
9168 #define HAVE_NCURSES_H 1
9174 case $cf_cv_ncurses_header in # (vi
9175 ncurses/curses.h|ncurses/ncurses.h)
9176 cat >>confdefs.h <<\EOF
9177 #define HAVE_NCURSES_NCURSES_H 1
9181 ncursesw/curses.h|ncursesw/ncurses.h)
9182 cat >>confdefs.h <<\EOF
9183 #define HAVE_NCURSESW_NCURSES_H 1
9189 echo "$as_me:9189: checking for terminfo header" >&5
9190 echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
9191 if test "${cf_cv_term_header+set}" = set; then
9192 echo $ECHO_N "(cached) $ECHO_C" >&6
9195 case ${cf_cv_ncurses_header} in #(vi
9196 */ncurses.h|*/ncursesw.h) #(vi
9197 cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
9200 cf_term_header=term.h
9204 for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
9206 cat >conftest.$ac_ext <<_ACEOF
9207 #line 9207 "configure"
9208 #include "confdefs.h"
9210 #include <${cf_cv_ncurses_header:-curses.h}>
9216 int x = auto_left_margin
9221 rm -f conftest.$ac_objext
9222 if { (eval echo "$as_me:9222: \"$ac_compile\"") >&5
9223 (eval $ac_compile) 2>&5
9225 echo "$as_me:9225: \$? = $ac_status" >&5
9226 (exit $ac_status); } &&
9227 { ac_try='test -s conftest.$ac_objext'
9228 { (eval echo "$as_me:9228: \"$ac_try\"") >&5
9231 echo "$as_me:9231: \$? = $ac_status" >&5
9232 (exit $ac_status); }; }; then
9234 cf_cv_term_header="$cf_test"
9236 echo "$as_me: failed program was:" >&5
9237 cat conftest.$ac_ext >&5
9239 cf_cv_term_header=unknown
9242 rm -f conftest.$ac_objext conftest.$ac_ext
9243 test "$cf_cv_term_header" != unknown && break
9247 echo "$as_me:9247: result: $cf_cv_term_header" >&5
9248 echo "${ECHO_T}$cf_cv_term_header" >&6
9250 # Set definitions to allow ifdef'ing to accommodate subdirectories
9252 case $cf_cv_term_header in # (vi
9254 cat >>confdefs.h <<\EOF
9255 #define HAVE_TERM_H 1
9261 case $cf_cv_term_header in # (vi
9262 ncurses/term.h) #(vi
9263 cat >>confdefs.h <<\EOF
9264 #define HAVE_NCURSES_TERM_H 1
9269 cat >>confdefs.h <<\EOF
9270 #define HAVE_NCURSESW_TERM_H 1
9276 # some applications need this, but should check for NCURSES_VERSION
9277 cat >>confdefs.h <<\EOF
9281 echo "$as_me:9281: checking for ncurses version" >&5
9282 echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
9283 if test "${cf_cv_ncurses_version+set}" = set; then
9284 echo $ECHO_N "(cached) $ECHO_C" >&6
9287 cf_cv_ncurses_version=no
9290 if test "$cross_compiling" = yes; then
9292 # This will not work if the preprocessor splits the line after the
9293 # Autoconf token. The 'unproto' program does that.
9294 cat > conftest.$ac_ext <<EOF
9295 #include <${cf_cv_ncurses_header:-curses.h}>
9297 #ifdef NCURSES_VERSION
9298 Autoconf NCURSES_VERSION
9306 cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
9307 { (eval echo "$as_me:9307: \"$cf_try\"") >&5
9310 echo "$as_me:9310: \$? = $ac_status" >&5
9311 (exit $ac_status); }
9312 if test -f conftest.out ; then
9313 cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
9314 test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
9319 cat >conftest.$ac_ext <<_ACEOF
9320 #line 9320 "configure"
9321 #include "confdefs.h"
9323 #include <${cf_cv_ncurses_header:-curses.h}>
9327 FILE *fp = fopen("$cf_tempfile", "w");
9328 #ifdef NCURSES_VERSION
9329 # ifdef NCURSES_VERSION_PATCH
9330 fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
9332 fprintf(fp, "%s\n", NCURSES_VERSION);
9336 fprintf(fp, "old\n");
9341 ${cf_cv_main_return:-return}(0);
9344 rm -f conftest$ac_exeext
9345 if { (eval echo "$as_me:9345: \"$ac_link\"") >&5
9346 (eval $ac_link) 2>&5
9348 echo "$as_me:9348: \$? = $ac_status" >&5
9349 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9350 { (eval echo "$as_me:9350: \"$ac_try\"") >&5
9353 echo "$as_me:9353: \$? = $ac_status" >&5
9354 (exit $ac_status); }; }; then
9356 cf_cv_ncurses_version=`cat $cf_tempfile`
9358 echo "$as_me: program exited with status $ac_status" >&5
9359 echo "$as_me: failed program was:" >&5
9360 cat conftest.$ac_ext >&5
9362 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9367 echo "$as_me:9367: result: $cf_cv_ncurses_version" >&5
9368 echo "${ECHO_T}$cf_cv_ncurses_version" >&6
9369 test "$cf_cv_ncurses_version" = no || cat >>confdefs.h <<\EOF
9373 cf_nculib_root=ncursesw
9374 # This works, except for the special case where we find gpm, but
9375 # ncurses is in a nonstandard location via $LIBS, and we really want
9378 cf_ncurses_SAVE="$LIBS"
9379 echo "$as_me:9379: checking for Gpm_Open in -lgpm" >&5
9380 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
9381 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
9382 echo $ECHO_N "(cached) $ECHO_C" >&6
9384 ac_check_lib_save_LIBS=$LIBS
9386 cat >conftest.$ac_ext <<_ACEOF
9387 #line 9387 "configure"
9388 #include "confdefs.h"
9390 /* Override any gcc2 internal prototype to avoid an error. */
9394 /* We use char because int might match the return type of a gcc2
9395 builtin and then its argument prototype would still apply. */
9405 rm -f conftest.$ac_objext conftest$ac_exeext
9406 if { (eval echo "$as_me:9406: \"$ac_link\"") >&5
9407 (eval $ac_link) 2>&5
9409 echo "$as_me:9409: \$? = $ac_status" >&5
9410 (exit $ac_status); } &&
9411 { ac_try='test -s conftest$ac_exeext'
9412 { (eval echo "$as_me:9412: \"$ac_try\"") >&5
9415 echo "$as_me:9415: \$? = $ac_status" >&5
9416 (exit $ac_status); }; }; then
9417 ac_cv_lib_gpm_Gpm_Open=yes
9419 echo "$as_me: failed program was:" >&5
9420 cat conftest.$ac_ext >&5
9421 ac_cv_lib_gpm_Gpm_Open=no
9423 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9424 LIBS=$ac_check_lib_save_LIBS
9426 echo "$as_me:9426: result: $ac_cv_lib_gpm_Gpm_Open" >&5
9427 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
9428 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
9429 echo "$as_me:9429: checking for initscr in -lgpm" >&5
9430 echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
9431 if test "${ac_cv_lib_gpm_initscr+set}" = set; then
9432 echo $ECHO_N "(cached) $ECHO_C" >&6
9434 ac_check_lib_save_LIBS=$LIBS
9436 cat >conftest.$ac_ext <<_ACEOF
9437 #line 9437 "configure"
9438 #include "confdefs.h"
9440 /* Override any gcc2 internal prototype to avoid an error. */
9444 /* We use char because int might match the return type of a gcc2
9445 builtin and then its argument prototype would still apply. */
9455 rm -f conftest.$ac_objext conftest$ac_exeext
9456 if { (eval echo "$as_me:9456: \"$ac_link\"") >&5
9457 (eval $ac_link) 2>&5
9459 echo "$as_me:9459: \$? = $ac_status" >&5
9460 (exit $ac_status); } &&
9461 { ac_try='test -s conftest$ac_exeext'
9462 { (eval echo "$as_me:9462: \"$ac_try\"") >&5
9465 echo "$as_me:9465: \$? = $ac_status" >&5
9466 (exit $ac_status); }; }; then
9467 ac_cv_lib_gpm_initscr=yes
9469 echo "$as_me: failed program was:" >&5
9470 cat conftest.$ac_ext >&5
9471 ac_cv_lib_gpm_initscr=no
9473 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9474 LIBS=$ac_check_lib_save_LIBS
9476 echo "$as_me:9476: result: $ac_cv_lib_gpm_initscr" >&5
9477 echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
9478 if test $ac_cv_lib_gpm_initscr = yes; then
9479 LIBS="$cf_ncurses_SAVE"
9481 cf_ncurses_LIBS="-lgpm"
9486 case $host_os in #(vi
9488 # This is only necessary if you are linking against an obsolete
9489 # version of ncurses (but it should do no harm, since it's static).
9490 if test "$cf_nculib_root" = ncurses ; then
9491 echo "$as_me:9491: checking for tgoto in -lmytinfo" >&5
9492 echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
9493 if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
9494 echo $ECHO_N "(cached) $ECHO_C" >&6
9496 ac_check_lib_save_LIBS=$LIBS
9497 LIBS="-lmytinfo $LIBS"
9498 cat >conftest.$ac_ext <<_ACEOF
9499 #line 9499 "configure"
9500 #include "confdefs.h"
9502 /* Override any gcc2 internal prototype to avoid an error. */
9506 /* We use char because int might match the return type of a gcc2
9507 builtin and then its argument prototype would still apply. */
9517 rm -f conftest.$ac_objext conftest$ac_exeext
9518 if { (eval echo "$as_me:9518: \"$ac_link\"") >&5
9519 (eval $ac_link) 2>&5
9521 echo "$as_me:9521: \$? = $ac_status" >&5
9522 (exit $ac_status); } &&
9523 { ac_try='test -s conftest$ac_exeext'
9524 { (eval echo "$as_me:9524: \"$ac_try\"") >&5
9527 echo "$as_me:9527: \$? = $ac_status" >&5
9528 (exit $ac_status); }; }; then
9529 ac_cv_lib_mytinfo_tgoto=yes
9531 echo "$as_me: failed program was:" >&5
9532 cat conftest.$ac_ext >&5
9533 ac_cv_lib_mytinfo_tgoto=no
9535 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9536 LIBS=$ac_check_lib_save_LIBS
9538 echo "$as_me:9538: result: $ac_cv_lib_mytinfo_tgoto" >&5
9539 echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
9540 if test $ac_cv_lib_mytinfo_tgoto = yes; then
9541 cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
9548 LIBS="$cf_ncurses_LIBS $LIBS"
9550 if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
9552 LIBS="-l$cf_nculib_root $LIBS"
9555 eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
9557 echo "$as_me:9557: checking for initscr" >&5
9558 echo $ECHO_N "checking for initscr... $ECHO_C" >&6
9559 if test "${ac_cv_func_initscr+set}" = set; then
9560 echo $ECHO_N "(cached) $ECHO_C" >&6
9562 cat >conftest.$ac_ext <<_ACEOF
9563 #line 9563 "configure"
9564 #include "confdefs.h"
9565 /* System header to define __stub macros and hopefully few prototypes,
9566 which can conflict with char initscr (); below. */
9568 /* Override any gcc2 internal prototype to avoid an error. */
9572 /* We use char because int might match the return type of a gcc2
9573 builtin and then its argument prototype would still apply. */
9580 /* The GNU C library defines this for functions which it implements
9581 to always fail with ENOSYS. Some functions are actually named
9582 something starting with __ and the normal name is an alias. */
9583 #if defined (__stub_initscr) || defined (__stub___initscr)
9586 f = initscr; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
9593 rm -f conftest.$ac_objext conftest$ac_exeext
9594 if { (eval echo "$as_me:9594: \"$ac_link\"") >&5
9595 (eval $ac_link) 2>&5
9597 echo "$as_me:9597: \$? = $ac_status" >&5
9598 (exit $ac_status); } &&
9599 { ac_try='test -s conftest$ac_exeext'
9600 { (eval echo "$as_me:9600: \"$ac_try\"") >&5
9603 echo "$as_me:9603: \$? = $ac_status" >&5
9604 (exit $ac_status); }; }; then
9605 ac_cv_func_initscr=yes
9607 echo "$as_me: failed program was:" >&5
9608 cat conftest.$ac_ext >&5
9609 ac_cv_func_initscr=no
9611 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9613 echo "$as_me:9613: result: $ac_cv_func_initscr" >&5
9614 echo "${ECHO_T}$ac_cv_func_initscr" >&6
9615 if test $ac_cv_func_initscr = yes; then
9616 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9619 cf_save_LIBS="$LIBS"
9620 echo "$as_me:9620: checking for initscr in -l$cf_nculib_root" >&5
9621 echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
9622 LIBS="-l$cf_nculib_root $LIBS"
9623 cat >conftest.$ac_ext <<_ACEOF
9624 #line 9624 "configure"
9625 #include "confdefs.h"
9626 #include <${cf_cv_ncurses_header:-curses.h}>
9635 rm -f conftest.$ac_objext conftest$ac_exeext
9636 if { (eval echo "$as_me:9636: \"$ac_link\"") >&5
9637 (eval $ac_link) 2>&5
9639 echo "$as_me:9639: \$? = $ac_status" >&5
9640 (exit $ac_status); } &&
9641 { ac_try='test -s conftest$ac_exeext'
9642 { (eval echo "$as_me:9642: \"$ac_try\"") >&5
9645 echo "$as_me:9645: \$? = $ac_status" >&5
9646 (exit $ac_status); }; }; then
9647 echo "$as_me:9647: result: yes" >&5
9648 echo "${ECHO_T}yes" >&6
9649 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9652 echo "$as_me: failed program was:" >&5
9653 cat conftest.$ac_ext >&5
9654 echo "$as_me:9654: result: no" >&5
9655 echo "${ECHO_T}no" >&6
9658 cf_library_path_list=""
9659 if test -n "${LDFLAGS}${LIBS}" ; then
9660 for cf_library_path in $LDFLAGS $LIBS
9662 case $cf_library_path in #(vi
9664 cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9666 test "$cf_library_path" != "NONE" && \
9667 test -d "$cf_library_path" && \
9669 test -n "$verbose" && echo " ... testing for lib-directories under $cf_library_path"
9670 test -d $cf_library_path/lib && cf_search="$cf_search $cf_library_path/lib"
9671 test -d $cf_library_path/lib/$cf_nculib_root && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
9672 test -d $cf_library_path/lib/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
9673 test -d $cf_library_path/$cf_nculib_root/lib && cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
9674 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"
9677 cf_library_path_list="$cf_library_path_list $cf_search"
9685 test "/usr" != "$prefix" && \
9687 (test $prefix = NONE || test "/usr" != "$prefix") && {
9688 test -n "$verbose" && echo " ... testing for lib-directories under /usr"
9689 test -d /usr/lib && cf_search="$cf_search /usr/lib"
9690 test -d /usr/lib/$cf_nculib_root && cf_search="$cf_search /usr/lib/$cf_nculib_root"
9691 test -d /usr/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/lib/$cf_nculib_root/lib"
9692 test -d /usr/$cf_nculib_root/lib && cf_search="$cf_search /usr/$cf_nculib_root/lib"
9693 test -d /usr/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/$cf_nculib_root/lib/$cf_nculib_root"
9696 test "$prefix" != "NONE" && \
9697 test -d "$prefix" && \
9699 test -n "$verbose" && echo " ... testing for lib-directories under $prefix"
9700 test -d $prefix/lib && cf_search="$cf_search $prefix/lib"
9701 test -d $prefix/lib/$cf_nculib_root && cf_search="$cf_search $prefix/lib/$cf_nculib_root"
9702 test -d $prefix/lib/$cf_nculib_root/lib && cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
9703 test -d $prefix/$cf_nculib_root/lib && cf_search="$cf_search $prefix/$cf_nculib_root/lib"
9704 test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
9707 test "/usr/local" != "$prefix" && \
9708 test -d "/usr/local" && \
9709 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
9710 test -n "$verbose" && echo " ... testing for lib-directories under /usr/local"
9711 test -d /usr/local/lib && cf_search="$cf_search /usr/local/lib"
9712 test -d /usr/local/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/lib/$cf_nculib_root"
9713 test -d /usr/local/lib/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/lib/$cf_nculib_root/lib"
9714 test -d /usr/local/$cf_nculib_root/lib && cf_search="$cf_search /usr/local/$cf_nculib_root/lib"
9715 test -d /usr/local/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /usr/local/$cf_nculib_root/lib/$cf_nculib_root"
9718 test "/opt" != "$prefix" && \
9720 (test $prefix = NONE || test "/opt" != "$prefix") && {
9721 test -n "$verbose" && echo " ... testing for lib-directories under /opt"
9722 test -d /opt/lib && cf_search="$cf_search /opt/lib"
9723 test -d /opt/lib/$cf_nculib_root && cf_search="$cf_search /opt/lib/$cf_nculib_root"
9724 test -d /opt/lib/$cf_nculib_root/lib && cf_search="$cf_search /opt/lib/$cf_nculib_root/lib"
9725 test -d /opt/$cf_nculib_root/lib && cf_search="$cf_search /opt/$cf_nculib_root/lib"
9726 test -d /opt/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search /opt/$cf_nculib_root/lib/$cf_nculib_root"
9729 test "$HOME" != "$prefix" && \
9730 test -d "$HOME" && \
9731 (test $prefix = NONE || test "$HOME" != "$prefix") && {
9732 test -n "$verbose" && echo " ... testing for lib-directories under $HOME"
9733 test -d $HOME/lib && cf_search="$cf_search $HOME/lib"
9734 test -d $HOME/lib/$cf_nculib_root && cf_search="$cf_search $HOME/lib/$cf_nculib_root"
9735 test -d $HOME/lib/$cf_nculib_root/lib && cf_search="$cf_search $HOME/lib/$cf_nculib_root/lib"
9736 test -d $HOME/$cf_nculib_root/lib && cf_search="$cf_search $HOME/$cf_nculib_root/lib"
9737 test -d $HOME/$cf_nculib_root/lib/$cf_nculib_root && cf_search="$cf_search $HOME/$cf_nculib_root/lib/$cf_nculib_root"
9740 cf_search="$cf_library_path_list $cf_search"
9742 for cf_libdir in $cf_search
9744 echo "$as_me:9744: checking for -l$cf_nculib_root in $cf_libdir" >&5
9745 echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
9746 LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
9747 cat >conftest.$ac_ext <<_ACEOF
9748 #line 9748 "configure"
9749 #include "confdefs.h"
9750 #include <${cf_cv_ncurses_header:-curses.h}>
9759 rm -f conftest.$ac_objext conftest$ac_exeext
9760 if { (eval echo "$as_me:9760: \"$ac_link\"") >&5
9761 (eval $ac_link) 2>&5
9763 echo "$as_me:9763: \$? = $ac_status" >&5
9764 (exit $ac_status); } &&
9765 { ac_try='test -s conftest$ac_exeext'
9766 { (eval echo "$as_me:9766: \"$ac_try\"") >&5
9769 echo "$as_me:9769: \$? = $ac_status" >&5
9770 (exit $ac_status); }; }; then
9771 echo "$as_me:9771: result: yes" >&5
9772 echo "${ECHO_T}yes" >&6
9773 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
9776 echo "$as_me: failed program was:" >&5
9777 cat conftest.$ac_ext >&5
9778 echo "$as_me:9778: result: no" >&5
9779 echo "${ECHO_T}no" >&6
9780 LIBS="$cf_save_LIBS"
9782 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9790 eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
9792 if test $cf_found_library = no ; then
9793 { { echo "$as_me:9793: error: Cannot link $cf_nculib_root library" >&5
9794 echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
9795 { (exit 1); exit 1; }; }
9800 if test -n "$cf_ncurses_LIBS" ; then
9801 echo "$as_me:9801: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
9802 echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
9803 cf_ncurses_SAVE="$LIBS"
9804 for p in $cf_ncurses_LIBS ; do
9805 q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
9806 if test "$q" != "$LIBS" ; then
9810 cat >conftest.$ac_ext <<_ACEOF
9811 #line 9811 "configure"
9812 #include "confdefs.h"
9813 #include <${cf_cv_ncurses_header:-curses.h}>
9817 initscr(); mousemask(0,0); tgoto((char *)0, 0, 0);
9822 rm -f conftest.$ac_objext conftest$ac_exeext
9823 if { (eval echo "$as_me:9823: \"$ac_link\"") >&5
9824 (eval $ac_link) 2>&5
9826 echo "$as_me:9826: \$? = $ac_status" >&5
9827 (exit $ac_status); } &&
9828 { ac_try='test -s conftest$ac_exeext'
9829 { (eval echo "$as_me:9829: \"$ac_try\"") >&5
9832 echo "$as_me:9832: \$? = $ac_status" >&5
9833 (exit $ac_status); }; }; then
9834 echo "$as_me:9834: result: yes" >&5
9835 echo "${ECHO_T}yes" >&6
9837 echo "$as_me: failed program was:" >&5
9838 cat conftest.$ac_ext >&5
9839 echo "$as_me:9839: result: no" >&5
9840 echo "${ECHO_T}no" >&6
9841 LIBS="$cf_ncurses_SAVE"
9843 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9846 cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9848 cat >>confdefs.h <<EOF
9849 #define $cf_nculib_ROOT 1
9857 echo "$as_me:9857: checking if you want to use pkg-config" >&5
9858 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
9860 # Check whether --with-pkg-config or --without-pkg-config was given.
9861 if test "${with_pkg_config+set}" = set; then
9862 withval="$with_pkg_config"
9863 cf_pkg_config=$withval
9867 echo "$as_me:9867: result: $cf_pkg_config" >&5
9868 echo "${ECHO_T}$cf_pkg_config" >&6
9870 case $cf_pkg_config in #(vi
9876 if test -n "$ac_tool_prefix"; then
9877 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9878 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9879 echo "$as_me:9879: checking for $ac_word" >&5
9880 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9881 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
9882 echo $ECHO_N "(cached) $ECHO_C" >&6
9886 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9889 ac_save_IFS=$IFS; IFS=$ac_path_separator
9891 for ac_dir in $ac_dummy; do
9893 test -z "$ac_dir" && ac_dir=.
9894 if $as_executable_p "$ac_dir/$ac_word"; then
9895 ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
9896 echo "$as_me:9896: found $ac_dir/$ac_word" >&5
9904 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9906 if test -n "$PKG_CONFIG"; then
9907 echo "$as_me:9907: result: $PKG_CONFIG" >&5
9908 echo "${ECHO_T}$PKG_CONFIG" >&6
9910 echo "$as_me:9910: result: no" >&5
9911 echo "${ECHO_T}no" >&6
9915 if test -z "$ac_cv_path_PKG_CONFIG"; then
9916 ac_pt_PKG_CONFIG=$PKG_CONFIG
9917 # Extract the first word of "pkg-config", so it can be a program name with args.
9918 set dummy pkg-config; ac_word=$2
9919 echo "$as_me:9919: checking for $ac_word" >&5
9920 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9921 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
9922 echo $ECHO_N "(cached) $ECHO_C" >&6
9924 case $ac_pt_PKG_CONFIG in
9926 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9929 ac_save_IFS=$IFS; IFS=$ac_path_separator
9931 for ac_dir in $ac_dummy; do
9933 test -z "$ac_dir" && ac_dir=.
9934 if $as_executable_p "$ac_dir/$ac_word"; then
9935 ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
9936 echo "$as_me:9936: found $ac_dir/$ac_word" >&5
9941 test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
9945 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9947 if test -n "$ac_pt_PKG_CONFIG"; then
9948 echo "$as_me:9948: result: $ac_pt_PKG_CONFIG" >&5
9949 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
9951 echo "$as_me:9951: result: no" >&5
9952 echo "${ECHO_T}no" >&6
9955 PKG_CONFIG=$ac_pt_PKG_CONFIG
9957 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9966 test -z "$PKG_CONFIG" && PKG_CONFIG=none
9967 if test "$PKG_CONFIG" != none ; then
9969 if test "x$prefix" != xNONE; then
9970 cf_path_syntax="$prefix"
9972 cf_path_syntax="$ac_default_prefix"
9975 case ".$PKG_CONFIG" in #(vi
9976 .\$\(*\)*|.\'*\'*) #(vi
9980 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
9982 .\${*prefix}*|.\${*dir}*) #(vi
9983 eval PKG_CONFIG="$PKG_CONFIG"
9984 case ".$PKG_CONFIG" in #(vi
9986 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
9991 PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
9994 { { echo "$as_me:9994: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
9995 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
9996 { (exit 1); exit 1; }; }
10002 echo "$as_me:10002: checking for X" >&5
10003 echo $ECHO_N "checking for X... $ECHO_C" >&6
10005 # Check whether --with-x or --without-x was given.
10006 if test "${with_x+set}" = set; then
10010 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
10011 if test "x$with_x" = xno; then
10012 # The user explicitly disabled X.
10015 if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
10016 # Both variables are already set.
10019 if test "${ac_cv_have_x+set}" = set; then
10020 echo $ECHO_N "(cached) $ECHO_C" >&6
10022 # One or both of the vars are not set, and there is no cached value.
10023 ac_x_includes=no ac_x_libraries=no
10024 rm -fr conftest.dir
10025 if mkdir conftest.dir; then
10027 # Make sure to not put "make" in the Imakefile rules, since we grep it out.
10028 cat >Imakefile <<'EOF'
10030 @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
10032 if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
10033 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
10034 eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
10035 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
10036 for ac_extension in a so sl dylib dll; do
10037 if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
10038 test -f $ac_im_libdir/libX11.$ac_extension; then
10039 ac_im_usrlibdir=$ac_im_libdir; break
10042 # Screen out bogus values from the imake configuration. They are
10043 # bogus both because they are the default anyway, and because
10044 # using them would break gcc on systems where it needs fixed includes.
10045 case $ac_im_incroot in
10047 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
10049 case $ac_im_usrlibdir in
10050 /usr/lib | /lib) ;;
10051 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
10055 rm -fr conftest.dir
10058 # Standard set of common directories for X headers.
10059 # Check X11 before X11Rn because it is often a symlink to the current release.
10071 /usr/local/X11/include
10072 /usr/local/X11R6/include
10073 /usr/local/X11R5/include
10074 /usr/local/X11R4/include
10076 /usr/local/include/X11
10077 /usr/local/include/X11R6
10078 /usr/local/include/X11R5
10079 /usr/local/include/X11R4
10083 /usr/XFree86/include/X11
10087 /usr/unsupported/include
10088 /usr/athena/include
10089 /usr/local/x11r5/include
10090 /usr/lpp/Xamples/include
10092 /usr/openwin/include
10093 /usr/openwin/share/include'
10095 if test "$ac_x_includes" = no; then
10096 # Guess where to find include files, by looking for Intrinsic.h.
10097 # First, try using that file with no special directory specified.
10098 cat >conftest.$ac_ext <<_ACEOF
10099 #line 10099 "configure"
10100 #include "confdefs.h"
10101 #include <X11/Intrinsic.h>
10103 if { (eval echo "$as_me:10103: \"$ac_cpp conftest.$ac_ext\"") >&5
10104 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10106 egrep -v '^ *\+' conftest.er1 >conftest.err
10108 cat conftest.err >&5
10109 echo "$as_me:10109: \$? = $ac_status" >&5
10110 (exit $ac_status); } >/dev/null; then
10111 if test -s conftest.err; then
10112 ac_cpp_err=$ac_c_preproc_warn_flag
10119 if test -z "$ac_cpp_err"; then
10120 # We can compile using X headers with no special include directory.
10123 echo "$as_me: failed program was:" >&5
10124 cat conftest.$ac_ext >&5
10125 for ac_dir in $ac_x_header_dirs; do
10126 if test -r "$ac_dir/X11/Intrinsic.h"; then
10127 ac_x_includes=$ac_dir
10132 rm -f conftest.err conftest.$ac_ext
10133 fi # $ac_x_includes = no
10135 if test "$ac_x_libraries" = no; then
10136 # Check for the libraries.
10137 # See if we find them without any special options.
10138 # Don't add to $LIBS permanently.
10141 cat >conftest.$ac_ext <<_ACEOF
10142 #line 10142 "configure"
10143 #include "confdefs.h"
10144 #include <X11/Intrinsic.h>
10153 rm -f conftest.$ac_objext conftest$ac_exeext
10154 if { (eval echo "$as_me:10154: \"$ac_link\"") >&5
10155 (eval $ac_link) 2>&5
10157 echo "$as_me:10157: \$? = $ac_status" >&5
10158 (exit $ac_status); } &&
10159 { ac_try='test -s conftest$ac_exeext'
10160 { (eval echo "$as_me:10160: \"$ac_try\"") >&5
10161 (eval $ac_try) 2>&5
10163 echo "$as_me:10163: \$? = $ac_status" >&5
10164 (exit $ac_status); }; }; then
10166 # We can link X programs with no special library path.
10169 echo "$as_me: failed program was:" >&5
10170 cat conftest.$ac_ext >&5
10172 for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
10174 # Don't even attempt the hair of trying to link an X program!
10175 for ac_extension in a so sl dylib dll; do
10176 if test -r $ac_dir/libXt.$ac_extension; then
10177 ac_x_libraries=$ac_dir
10183 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10184 fi # $ac_x_libraries = no
10186 if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
10187 # Didn't find X anywhere. Cache the known absence of X.
10188 ac_cv_have_x="have_x=no"
10190 # Record where we found X for the cache.
10191 ac_cv_have_x="have_x=yes \
10192 ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
10197 eval "$ac_cv_have_x"
10200 if test "$have_x" != yes; then
10201 echo "$as_me:10201: result: $have_x" >&5
10202 echo "${ECHO_T}$have_x" >&6
10205 # If each of the values was on the command line, it overrides each guess.
10206 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
10207 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
10208 # Update the cache value to reflect the command line values.
10209 ac_cv_have_x="have_x=yes \
10210 ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
10211 echo "$as_me:10211: result: libraries $x_libraries, headers $x_includes" >&5
10212 echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
10215 if test "$no_x" = yes; then
10216 # Not all programs may use this symbol, but it does not hurt to define it.
10218 cat >>confdefs.h <<\EOF
10219 #define X_DISPLAY_MISSING 1
10222 X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
10224 if test -n "$x_includes"; then
10225 X_CFLAGS="$X_CFLAGS -I$x_includes"
10228 # It would also be nice to do this for all -L options, not just this one.
10229 if test -n "$x_libraries"; then
10230 X_LIBS="$X_LIBS -L$x_libraries"
10231 # For Solaris; some versions of Sun CC require a space after -R and
10232 # others require no space. Words are not sufficient . . . .
10233 case `(uname -sr) 2>/dev/null` in
10235 echo "$as_me:10235: checking whether -R must be followed by a space" >&5
10236 echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
10237 ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
10238 cat >conftest.$ac_ext <<_ACEOF
10239 #line 10239 "configure"
10240 #include "confdefs.h"
10250 rm -f conftest.$ac_objext conftest$ac_exeext
10251 if { (eval echo "$as_me:10251: \"$ac_link\"") >&5
10252 (eval $ac_link) 2>&5
10254 echo "$as_me:10254: \$? = $ac_status" >&5
10255 (exit $ac_status); } &&
10256 { ac_try='test -s conftest$ac_exeext'
10257 { (eval echo "$as_me:10257: \"$ac_try\"") >&5
10258 (eval $ac_try) 2>&5
10260 echo "$as_me:10260: \$? = $ac_status" >&5
10261 (exit $ac_status); }; }; then
10264 echo "$as_me: failed program was:" >&5
10265 cat conftest.$ac_ext >&5
10268 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10269 if test $ac_R_nospace = yes; then
10270 echo "$as_me:10270: result: no" >&5
10271 echo "${ECHO_T}no" >&6
10272 X_LIBS="$X_LIBS -R$x_libraries"
10274 LIBS="$ac_xsave_LIBS -R $x_libraries"
10275 cat >conftest.$ac_ext <<_ACEOF
10276 #line 10276 "configure"
10277 #include "confdefs.h"
10287 rm -f conftest.$ac_objext conftest$ac_exeext
10288 if { (eval echo "$as_me:10288: \"$ac_link\"") >&5
10289 (eval $ac_link) 2>&5
10291 echo "$as_me:10291: \$? = $ac_status" >&5
10292 (exit $ac_status); } &&
10293 { ac_try='test -s conftest$ac_exeext'
10294 { (eval echo "$as_me:10294: \"$ac_try\"") >&5
10295 (eval $ac_try) 2>&5
10297 echo "$as_me:10297: \$? = $ac_status" >&5
10298 (exit $ac_status); }; }; then
10301 echo "$as_me: failed program was:" >&5
10302 cat conftest.$ac_ext >&5
10305 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10306 if test $ac_R_space = yes; then
10307 echo "$as_me:10307: result: yes" >&5
10308 echo "${ECHO_T}yes" >&6
10309 X_LIBS="$X_LIBS -R $x_libraries"
10311 echo "$as_me:10311: result: neither works" >&5
10312 echo "${ECHO_T}neither works" >&6
10315 LIBS=$ac_xsave_LIBS
10319 # Check for system-dependent libraries X programs must link with.
10320 # Do this before checking for the system-independent R6 libraries
10321 # (-lICE), since we may need -lsocket or whatever for X linking.
10323 if test "$ISC" = yes; then
10324 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
10326 # Martyn Johnson says this is needed for Ultrix, if the X
10327 # libraries were built with DECnet support. And Karl Berry says
10328 # the Alpha needs dnet_stub (dnet does not exist).
10329 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
10330 cat >conftest.$ac_ext <<_ACEOF
10331 #line 10331 "configure"
10332 #include "confdefs.h"
10334 /* Override any gcc2 internal prototype to avoid an error. */
10338 /* We use char because int might match the return type of a gcc2
10339 builtin and then its argument prototype would still apply. */
10340 char XOpenDisplay ();
10349 rm -f conftest.$ac_objext conftest$ac_exeext
10350 if { (eval echo "$as_me:10350: \"$ac_link\"") >&5
10351 (eval $ac_link) 2>&5
10353 echo "$as_me:10353: \$? = $ac_status" >&5
10354 (exit $ac_status); } &&
10355 { ac_try='test -s conftest$ac_exeext'
10356 { (eval echo "$as_me:10356: \"$ac_try\"") >&5
10357 (eval $ac_try) 2>&5
10359 echo "$as_me:10359: \$? = $ac_status" >&5
10360 (exit $ac_status); }; }; then
10363 echo "$as_me: failed program was:" >&5
10364 cat conftest.$ac_ext >&5
10365 echo "$as_me:10365: checking for dnet_ntoa in -ldnet" >&5
10366 echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
10367 if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
10368 echo $ECHO_N "(cached) $ECHO_C" >&6
10370 ac_check_lib_save_LIBS=$LIBS
10371 LIBS="-ldnet $LIBS"
10372 cat >conftest.$ac_ext <<_ACEOF
10373 #line 10373 "configure"
10374 #include "confdefs.h"
10376 /* Override any gcc2 internal prototype to avoid an error. */
10380 /* We use char because int might match the return type of a gcc2
10381 builtin and then its argument prototype would still apply. */
10391 rm -f conftest.$ac_objext conftest$ac_exeext
10392 if { (eval echo "$as_me:10392: \"$ac_link\"") >&5
10393 (eval $ac_link) 2>&5
10395 echo "$as_me:10395: \$? = $ac_status" >&5
10396 (exit $ac_status); } &&
10397 { ac_try='test -s conftest$ac_exeext'
10398 { (eval echo "$as_me:10398: \"$ac_try\"") >&5
10399 (eval $ac_try) 2>&5
10401 echo "$as_me:10401: \$? = $ac_status" >&5
10402 (exit $ac_status); }; }; then
10403 ac_cv_lib_dnet_dnet_ntoa=yes
10405 echo "$as_me: failed program was:" >&5
10406 cat conftest.$ac_ext >&5
10407 ac_cv_lib_dnet_dnet_ntoa=no
10409 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10410 LIBS=$ac_check_lib_save_LIBS
10412 echo "$as_me:10412: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
10413 echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
10414 if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
10415 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
10418 if test $ac_cv_lib_dnet_dnet_ntoa = no; then
10419 echo "$as_me:10419: checking for dnet_ntoa in -ldnet_stub" >&5
10420 echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
10421 if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
10422 echo $ECHO_N "(cached) $ECHO_C" >&6
10424 ac_check_lib_save_LIBS=$LIBS
10425 LIBS="-ldnet_stub $LIBS"
10426 cat >conftest.$ac_ext <<_ACEOF
10427 #line 10427 "configure"
10428 #include "confdefs.h"
10430 /* Override any gcc2 internal prototype to avoid an error. */
10434 /* We use char because int might match the return type of a gcc2
10435 builtin and then its argument prototype would still apply. */
10445 rm -f conftest.$ac_objext conftest$ac_exeext
10446 if { (eval echo "$as_me:10446: \"$ac_link\"") >&5
10447 (eval $ac_link) 2>&5
10449 echo "$as_me:10449: \$? = $ac_status" >&5
10450 (exit $ac_status); } &&
10451 { ac_try='test -s conftest$ac_exeext'
10452 { (eval echo "$as_me:10452: \"$ac_try\"") >&5
10453 (eval $ac_try) 2>&5
10455 echo "$as_me:10455: \$? = $ac_status" >&5
10456 (exit $ac_status); }; }; then
10457 ac_cv_lib_dnet_stub_dnet_ntoa=yes
10459 echo "$as_me: failed program was:" >&5
10460 cat conftest.$ac_ext >&5
10461 ac_cv_lib_dnet_stub_dnet_ntoa=no
10463 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10464 LIBS=$ac_check_lib_save_LIBS
10466 echo "$as_me:10466: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
10467 echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
10468 if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
10469 X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
10474 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10475 LIBS="$ac_xsave_LIBS"
10477 # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
10478 # to get the SysV transport functions.
10479 # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
10481 # The nsl library prevents programs from opening the X display
10482 # on Irix 5.2, according to T.E. Dickey.
10483 # The functions gethostbyname, getservbyname, and inet_addr are
10484 # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
10485 echo "$as_me:10485: checking for gethostbyname" >&5
10486 echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
10487 if test "${ac_cv_func_gethostbyname+set}" = set; then
10488 echo $ECHO_N "(cached) $ECHO_C" >&6
10490 cat >conftest.$ac_ext <<_ACEOF
10491 #line 10491 "configure"
10492 #include "confdefs.h"
10493 /* System header to define __stub macros and hopefully few prototypes,
10494 which can conflict with char gethostbyname (); below. */
10495 #include <assert.h>
10496 /* Override any gcc2 internal prototype to avoid an error. */
10500 /* We use char because int might match the return type of a gcc2
10501 builtin and then its argument prototype would still apply. */
10502 char gethostbyname ();
10508 /* The GNU C library defines this for functions which it implements
10509 to always fail with ENOSYS. Some functions are actually named
10510 something starting with __ and the normal name is an alias. */
10511 #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
10514 f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10521 rm -f conftest.$ac_objext conftest$ac_exeext
10522 if { (eval echo "$as_me:10522: \"$ac_link\"") >&5
10523 (eval $ac_link) 2>&5
10525 echo "$as_me:10525: \$? = $ac_status" >&5
10526 (exit $ac_status); } &&
10527 { ac_try='test -s conftest$ac_exeext'
10528 { (eval echo "$as_me:10528: \"$ac_try\"") >&5
10529 (eval $ac_try) 2>&5
10531 echo "$as_me:10531: \$? = $ac_status" >&5
10532 (exit $ac_status); }; }; then
10533 ac_cv_func_gethostbyname=yes
10535 echo "$as_me: failed program was:" >&5
10536 cat conftest.$ac_ext >&5
10537 ac_cv_func_gethostbyname=no
10539 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10541 echo "$as_me:10541: result: $ac_cv_func_gethostbyname" >&5
10542 echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
10544 if test $ac_cv_func_gethostbyname = no; then
10545 echo "$as_me:10545: checking for gethostbyname in -lnsl" >&5
10546 echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
10547 if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
10548 echo $ECHO_N "(cached) $ECHO_C" >&6
10550 ac_check_lib_save_LIBS=$LIBS
10552 cat >conftest.$ac_ext <<_ACEOF
10553 #line 10553 "configure"
10554 #include "confdefs.h"
10556 /* Override any gcc2 internal prototype to avoid an error. */
10560 /* We use char because int might match the return type of a gcc2
10561 builtin and then its argument prototype would still apply. */
10562 char gethostbyname ();
10571 rm -f conftest.$ac_objext conftest$ac_exeext
10572 if { (eval echo "$as_me:10572: \"$ac_link\"") >&5
10573 (eval $ac_link) 2>&5
10575 echo "$as_me:10575: \$? = $ac_status" >&5
10576 (exit $ac_status); } &&
10577 { ac_try='test -s conftest$ac_exeext'
10578 { (eval echo "$as_me:10578: \"$ac_try\"") >&5
10579 (eval $ac_try) 2>&5
10581 echo "$as_me:10581: \$? = $ac_status" >&5
10582 (exit $ac_status); }; }; then
10583 ac_cv_lib_nsl_gethostbyname=yes
10585 echo "$as_me: failed program was:" >&5
10586 cat conftest.$ac_ext >&5
10587 ac_cv_lib_nsl_gethostbyname=no
10589 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10590 LIBS=$ac_check_lib_save_LIBS
10592 echo "$as_me:10592: result: $ac_cv_lib_nsl_gethostbyname" >&5
10593 echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
10594 if test $ac_cv_lib_nsl_gethostbyname = yes; then
10595 X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
10598 if test $ac_cv_lib_nsl_gethostbyname = no; then
10599 echo "$as_me:10599: checking for gethostbyname in -lbsd" >&5
10600 echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
10601 if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
10602 echo $ECHO_N "(cached) $ECHO_C" >&6
10604 ac_check_lib_save_LIBS=$LIBS
10606 cat >conftest.$ac_ext <<_ACEOF
10607 #line 10607 "configure"
10608 #include "confdefs.h"
10610 /* Override any gcc2 internal prototype to avoid an error. */
10614 /* We use char because int might match the return type of a gcc2
10615 builtin and then its argument prototype would still apply. */
10616 char gethostbyname ();
10625 rm -f conftest.$ac_objext conftest$ac_exeext
10626 if { (eval echo "$as_me:10626: \"$ac_link\"") >&5
10627 (eval $ac_link) 2>&5
10629 echo "$as_me:10629: \$? = $ac_status" >&5
10630 (exit $ac_status); } &&
10631 { ac_try='test -s conftest$ac_exeext'
10632 { (eval echo "$as_me:10632: \"$ac_try\"") >&5
10633 (eval $ac_try) 2>&5
10635 echo "$as_me:10635: \$? = $ac_status" >&5
10636 (exit $ac_status); }; }; then
10637 ac_cv_lib_bsd_gethostbyname=yes
10639 echo "$as_me: failed program was:" >&5
10640 cat conftest.$ac_ext >&5
10641 ac_cv_lib_bsd_gethostbyname=no
10643 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10644 LIBS=$ac_check_lib_save_LIBS
10646 echo "$as_me:10646: result: $ac_cv_lib_bsd_gethostbyname" >&5
10647 echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
10648 if test $ac_cv_lib_bsd_gethostbyname = yes; then
10649 X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
10655 # lieder@skyler.mavd.honeywell.com says without -lsocket,
10656 # socket/setsockopt and other routines are undefined under SCO ODT
10657 # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
10658 # on later versions), says Simon Leinen: it contains gethostby*
10659 # variants that don't use the nameserver (or something). -lsocket
10660 # must be given before -lnsl if both are needed. We assume that
10661 # if connect needs -lnsl, so does gethostbyname.
10662 echo "$as_me:10662: checking for connect" >&5
10663 echo $ECHO_N "checking for connect... $ECHO_C" >&6
10664 if test "${ac_cv_func_connect+set}" = set; then
10665 echo $ECHO_N "(cached) $ECHO_C" >&6
10667 cat >conftest.$ac_ext <<_ACEOF
10668 #line 10668 "configure"
10669 #include "confdefs.h"
10670 /* System header to define __stub macros and hopefully few prototypes,
10671 which can conflict with char connect (); below. */
10672 #include <assert.h>
10673 /* Override any gcc2 internal prototype to avoid an error. */
10677 /* We use char because int might match the return type of a gcc2
10678 builtin and then its argument prototype would still apply. */
10685 /* The GNU C library defines this for functions which it implements
10686 to always fail with ENOSYS. Some functions are actually named
10687 something starting with __ and the normal name is an alias. */
10688 #if defined (__stub_connect) || defined (__stub___connect)
10691 f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10698 rm -f conftest.$ac_objext conftest$ac_exeext
10699 if { (eval echo "$as_me:10699: \"$ac_link\"") >&5
10700 (eval $ac_link) 2>&5
10702 echo "$as_me:10702: \$? = $ac_status" >&5
10703 (exit $ac_status); } &&
10704 { ac_try='test -s conftest$ac_exeext'
10705 { (eval echo "$as_me:10705: \"$ac_try\"") >&5
10706 (eval $ac_try) 2>&5
10708 echo "$as_me:10708: \$? = $ac_status" >&5
10709 (exit $ac_status); }; }; then
10710 ac_cv_func_connect=yes
10712 echo "$as_me: failed program was:" >&5
10713 cat conftest.$ac_ext >&5
10714 ac_cv_func_connect=no
10716 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10718 echo "$as_me:10718: result: $ac_cv_func_connect" >&5
10719 echo "${ECHO_T}$ac_cv_func_connect" >&6
10721 if test $ac_cv_func_connect = no; then
10722 echo "$as_me:10722: checking for connect in -lsocket" >&5
10723 echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
10724 if test "${ac_cv_lib_socket_connect+set}" = set; then
10725 echo $ECHO_N "(cached) $ECHO_C" >&6
10727 ac_check_lib_save_LIBS=$LIBS
10728 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
10729 cat >conftest.$ac_ext <<_ACEOF
10730 #line 10730 "configure"
10731 #include "confdefs.h"
10733 /* Override any gcc2 internal prototype to avoid an error. */
10737 /* We use char because int might match the return type of a gcc2
10738 builtin and then its argument prototype would still apply. */
10748 rm -f conftest.$ac_objext conftest$ac_exeext
10749 if { (eval echo "$as_me:10749: \"$ac_link\"") >&5
10750 (eval $ac_link) 2>&5
10752 echo "$as_me:10752: \$? = $ac_status" >&5
10753 (exit $ac_status); } &&
10754 { ac_try='test -s conftest$ac_exeext'
10755 { (eval echo "$as_me:10755: \"$ac_try\"") >&5
10756 (eval $ac_try) 2>&5
10758 echo "$as_me:10758: \$? = $ac_status" >&5
10759 (exit $ac_status); }; }; then
10760 ac_cv_lib_socket_connect=yes
10762 echo "$as_me: failed program was:" >&5
10763 cat conftest.$ac_ext >&5
10764 ac_cv_lib_socket_connect=no
10766 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10767 LIBS=$ac_check_lib_save_LIBS
10769 echo "$as_me:10769: result: $ac_cv_lib_socket_connect" >&5
10770 echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
10771 if test $ac_cv_lib_socket_connect = yes; then
10772 X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
10777 # Guillermo Gomez says -lposix is necessary on A/UX.
10778 echo "$as_me:10778: checking for remove" >&5
10779 echo $ECHO_N "checking for remove... $ECHO_C" >&6
10780 if test "${ac_cv_func_remove+set}" = set; then
10781 echo $ECHO_N "(cached) $ECHO_C" >&6
10783 cat >conftest.$ac_ext <<_ACEOF
10784 #line 10784 "configure"
10785 #include "confdefs.h"
10786 /* System header to define __stub macros and hopefully few prototypes,
10787 which can conflict with char remove (); below. */
10788 #include <assert.h>
10789 /* Override any gcc2 internal prototype to avoid an error. */
10793 /* We use char because int might match the return type of a gcc2
10794 builtin and then its argument prototype would still apply. */
10801 /* The GNU C library defines this for functions which it implements
10802 to always fail with ENOSYS. Some functions are actually named
10803 something starting with __ and the normal name is an alias. */
10804 #if defined (__stub_remove) || defined (__stub___remove)
10807 f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10814 rm -f conftest.$ac_objext conftest$ac_exeext
10815 if { (eval echo "$as_me:10815: \"$ac_link\"") >&5
10816 (eval $ac_link) 2>&5
10818 echo "$as_me:10818: \$? = $ac_status" >&5
10819 (exit $ac_status); } &&
10820 { ac_try='test -s conftest$ac_exeext'
10821 { (eval echo "$as_me:10821: \"$ac_try\"") >&5
10822 (eval $ac_try) 2>&5
10824 echo "$as_me:10824: \$? = $ac_status" >&5
10825 (exit $ac_status); }; }; then
10826 ac_cv_func_remove=yes
10828 echo "$as_me: failed program was:" >&5
10829 cat conftest.$ac_ext >&5
10830 ac_cv_func_remove=no
10832 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10834 echo "$as_me:10834: result: $ac_cv_func_remove" >&5
10835 echo "${ECHO_T}$ac_cv_func_remove" >&6
10837 if test $ac_cv_func_remove = no; then
10838 echo "$as_me:10838: checking for remove in -lposix" >&5
10839 echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
10840 if test "${ac_cv_lib_posix_remove+set}" = set; then
10841 echo $ECHO_N "(cached) $ECHO_C" >&6
10843 ac_check_lib_save_LIBS=$LIBS
10844 LIBS="-lposix $LIBS"
10845 cat >conftest.$ac_ext <<_ACEOF
10846 #line 10846 "configure"
10847 #include "confdefs.h"
10849 /* Override any gcc2 internal prototype to avoid an error. */
10853 /* We use char because int might match the return type of a gcc2
10854 builtin and then its argument prototype would still apply. */
10864 rm -f conftest.$ac_objext conftest$ac_exeext
10865 if { (eval echo "$as_me:10865: \"$ac_link\"") >&5
10866 (eval $ac_link) 2>&5
10868 echo "$as_me:10868: \$? = $ac_status" >&5
10869 (exit $ac_status); } &&
10870 { ac_try='test -s conftest$ac_exeext'
10871 { (eval echo "$as_me:10871: \"$ac_try\"") >&5
10872 (eval $ac_try) 2>&5
10874 echo "$as_me:10874: \$? = $ac_status" >&5
10875 (exit $ac_status); }; }; then
10876 ac_cv_lib_posix_remove=yes
10878 echo "$as_me: failed program was:" >&5
10879 cat conftest.$ac_ext >&5
10880 ac_cv_lib_posix_remove=no
10882 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10883 LIBS=$ac_check_lib_save_LIBS
10885 echo "$as_me:10885: result: $ac_cv_lib_posix_remove" >&5
10886 echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
10887 if test $ac_cv_lib_posix_remove = yes; then
10888 X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
10893 # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
10894 echo "$as_me:10894: checking for shmat" >&5
10895 echo $ECHO_N "checking for shmat... $ECHO_C" >&6
10896 if test "${ac_cv_func_shmat+set}" = set; then
10897 echo $ECHO_N "(cached) $ECHO_C" >&6
10899 cat >conftest.$ac_ext <<_ACEOF
10900 #line 10900 "configure"
10901 #include "confdefs.h"
10902 /* System header to define __stub macros and hopefully few prototypes,
10903 which can conflict with char shmat (); below. */
10904 #include <assert.h>
10905 /* Override any gcc2 internal prototype to avoid an error. */
10909 /* We use char because int might match the return type of a gcc2
10910 builtin and then its argument prototype would still apply. */
10917 /* The GNU C library defines this for functions which it implements
10918 to always fail with ENOSYS. Some functions are actually named
10919 something starting with __ and the normal name is an alias. */
10920 #if defined (__stub_shmat) || defined (__stub___shmat)
10923 f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10930 rm -f conftest.$ac_objext conftest$ac_exeext
10931 if { (eval echo "$as_me:10931: \"$ac_link\"") >&5
10932 (eval $ac_link) 2>&5
10934 echo "$as_me:10934: \$? = $ac_status" >&5
10935 (exit $ac_status); } &&
10936 { ac_try='test -s conftest$ac_exeext'
10937 { (eval echo "$as_me:10937: \"$ac_try\"") >&5
10938 (eval $ac_try) 2>&5
10940 echo "$as_me:10940: \$? = $ac_status" >&5
10941 (exit $ac_status); }; }; then
10942 ac_cv_func_shmat=yes
10944 echo "$as_me: failed program was:" >&5
10945 cat conftest.$ac_ext >&5
10946 ac_cv_func_shmat=no
10948 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10950 echo "$as_me:10950: result: $ac_cv_func_shmat" >&5
10951 echo "${ECHO_T}$ac_cv_func_shmat" >&6
10953 if test $ac_cv_func_shmat = no; then
10954 echo "$as_me:10954: checking for shmat in -lipc" >&5
10955 echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
10956 if test "${ac_cv_lib_ipc_shmat+set}" = set; then
10957 echo $ECHO_N "(cached) $ECHO_C" >&6
10959 ac_check_lib_save_LIBS=$LIBS
10961 cat >conftest.$ac_ext <<_ACEOF
10962 #line 10962 "configure"
10963 #include "confdefs.h"
10965 /* Override any gcc2 internal prototype to avoid an error. */
10969 /* We use char because int might match the return type of a gcc2
10970 builtin and then its argument prototype would still apply. */
10980 rm -f conftest.$ac_objext conftest$ac_exeext
10981 if { (eval echo "$as_me:10981: \"$ac_link\"") >&5
10982 (eval $ac_link) 2>&5
10984 echo "$as_me:10984: \$? = $ac_status" >&5
10985 (exit $ac_status); } &&
10986 { ac_try='test -s conftest$ac_exeext'
10987 { (eval echo "$as_me:10987: \"$ac_try\"") >&5
10988 (eval $ac_try) 2>&5
10990 echo "$as_me:10990: \$? = $ac_status" >&5
10991 (exit $ac_status); }; }; then
10992 ac_cv_lib_ipc_shmat=yes
10994 echo "$as_me: failed program was:" >&5
10995 cat conftest.$ac_ext >&5
10996 ac_cv_lib_ipc_shmat=no
10998 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10999 LIBS=$ac_check_lib_save_LIBS
11001 echo "$as_me:11001: result: $ac_cv_lib_ipc_shmat" >&5
11002 echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
11003 if test $ac_cv_lib_ipc_shmat = yes; then
11004 X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
11010 # Check for libraries that X11R6 Xt/Xaw programs need.
11011 ac_save_LDFLAGS=$LDFLAGS
11012 test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
11013 # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
11014 # check for ICE first), but we must link in the order -lSM -lICE or
11015 # we get undefined symbols. So assume we have SM if we have ICE.
11016 # These have to be linked with before -lX11, unlike the other
11017 # libraries we check for below, so use a different variable.
11018 # John Interrante, Karl Berry
11019 echo "$as_me:11019: checking for IceConnectionNumber in -lICE" >&5
11020 echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
11021 if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
11022 echo $ECHO_N "(cached) $ECHO_C" >&6
11024 ac_check_lib_save_LIBS=$LIBS
11025 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
11026 cat >conftest.$ac_ext <<_ACEOF
11027 #line 11027 "configure"
11028 #include "confdefs.h"
11030 /* Override any gcc2 internal prototype to avoid an error. */
11034 /* We use char because int might match the return type of a gcc2
11035 builtin and then its argument prototype would still apply. */
11036 char IceConnectionNumber ();
11040 IceConnectionNumber ();
11045 rm -f conftest.$ac_objext conftest$ac_exeext
11046 if { (eval echo "$as_me:11046: \"$ac_link\"") >&5
11047 (eval $ac_link) 2>&5
11049 echo "$as_me:11049: \$? = $ac_status" >&5
11050 (exit $ac_status); } &&
11051 { ac_try='test -s conftest$ac_exeext'
11052 { (eval echo "$as_me:11052: \"$ac_try\"") >&5
11053 (eval $ac_try) 2>&5
11055 echo "$as_me:11055: \$? = $ac_status" >&5
11056 (exit $ac_status); }; }; then
11057 ac_cv_lib_ICE_IceConnectionNumber=yes
11059 echo "$as_me: failed program was:" >&5
11060 cat conftest.$ac_ext >&5
11061 ac_cv_lib_ICE_IceConnectionNumber=no
11063 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11064 LIBS=$ac_check_lib_save_LIBS
11066 echo "$as_me:11066: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
11067 echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
11068 if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
11069 X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
11072 LDFLAGS=$ac_save_LDFLAGS
11076 cf_x_athena=${cf_x_athena:-Xaw}
11078 echo "$as_me:11078: checking if you want to link with Xaw 3d library" >&5
11079 echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
11082 # Check whether --with-Xaw3d or --without-Xaw3d was given.
11083 if test "${with_Xaw3d+set}" = set; then
11084 withval="$with_Xaw3d"
11087 if test "$withval" = yes ; then
11089 echo "$as_me:11089: result: yes" >&5
11090 echo "${ECHO_T}yes" >&6
11092 echo "$as_me:11092: result: no" >&5
11093 echo "${ECHO_T}no" >&6
11096 echo "$as_me:11096: checking if you want to link with neXT Athena library" >&5
11097 echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
11100 # Check whether --with-neXtaw or --without-neXtaw was given.
11101 if test "${with_neXtaw+set}" = set; then
11102 withval="$with_neXtaw"
11105 if test "$withval" = yes ; then
11107 echo "$as_me:11107: result: yes" >&5
11108 echo "${ECHO_T}yes" >&6
11110 echo "$as_me:11110: result: no" >&5
11111 echo "${ECHO_T}no" >&6
11114 echo "$as_me:11114: checking if you want to link with Athena-Plus library" >&5
11115 echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
11118 # Check whether --with-XawPlus or --without-XawPlus was given.
11119 if test "${with_XawPlus+set}" = set; then
11120 withval="$with_XawPlus"
11123 if test "$withval" = yes ; then
11124 cf_x_athena=XawPlus
11125 echo "$as_me:11125: result: yes" >&5
11126 echo "${ECHO_T}yes" >&6
11128 echo "$as_me:11128: result: no" >&5
11129 echo "${ECHO_T}no" >&6
11134 if test "$PKG_CONFIG" != none ; then
11136 test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
11137 for cf_athena_pkg in \
11140 ${cf_x_athena}-devel \
11141 lib${cf_x_athena} \
11142 lib${cf_x_athena}-devel
11145 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
11146 test -n "$verbose" && echo " found package $cf_athena_pkg" 1>&6
11148 echo "${as_me:-configure}:11148: testing found package $cf_athena_pkg ..." 1>&5
11150 cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
11151 cf_pkgconfig_libs="`$PKG_CONFIG --libs $cf_athena_pkg 2>/dev/null`"
11152 test -n "$verbose" && echo " package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
11154 echo "${as_me:-configure}:11154: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11156 test -n "$verbose" && echo " package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
11158 echo "${as_me:-configure}:11158: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
11163 cf_new_extra_cppflags=
11165 for cf_add_cflags in $cf_pkgconfig_incs
11167 case $cf_fix_cppflags in
11169 case $cf_add_cflags in #(vi
11170 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11171 case $cf_add_cflags in
11173 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11175 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11176 && test -z "${cf_tst_cflags}" \
11177 && cf_fix_cppflags=yes
11179 if test $cf_fix_cppflags = yes ; then
11180 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11182 elif test "${cf_tst_cflags}" = "\"'" ; then
11183 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11188 case "$CPPFLAGS" in
11189 *$cf_add_cflags) #(vi
11192 case $cf_add_cflags in #(vi
11194 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11196 CPPFLAGS=`echo "$CPPFLAGS" | \
11197 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11198 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11202 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11207 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11212 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11214 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11216 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11217 && test -z "${cf_tst_cflags}" \
11218 && cf_fix_cppflags=no
11223 if test -n "$cf_new_cflags" ; then
11225 CFLAGS="$CFLAGS $cf_new_cflags"
11228 if test -n "$cf_new_cppflags" ; then
11230 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11233 if test -n "$cf_new_extra_cppflags" ; then
11235 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11238 LIBS="$cf_pkgconfig_libs $LIBS"
11240 cf_x_athena_lib="$cf_pkgconfig_libs"
11242 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11244 cat >>confdefs.h <<EOF
11245 #define $cf_x_athena_LIBS 1
11248 echo "$as_me:11248: checking for usable $cf_x_athena/Xmu package" >&5
11249 echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
11250 if test "${cf_cv_xaw_compat+set}" = set; then
11251 echo $ECHO_N "(cached) $ECHO_C" >&6
11254 cat >conftest.$ac_ext <<_ACEOF
11255 #line 11255 "configure"
11256 #include "confdefs.h"
11258 #include <X11/Xmu/CharSet.h>
11264 int check = XmuCompareISOLatin1("big", "small")
11270 rm -f conftest.$ac_objext conftest$ac_exeext
11271 if { (eval echo "$as_me:11271: \"$ac_link\"") >&5
11272 (eval $ac_link) 2>&5
11274 echo "$as_me:11274: \$? = $ac_status" >&5
11275 (exit $ac_status); } &&
11276 { ac_try='test -s conftest$ac_exeext'
11277 { (eval echo "$as_me:11277: \"$ac_try\"") >&5
11278 (eval $ac_try) 2>&5
11280 echo "$as_me:11280: \$? = $ac_status" >&5
11281 (exit $ac_status); }; }; then
11282 cf_cv_xaw_compat=yes
11284 echo "$as_me: failed program was:" >&5
11285 cat conftest.$ac_ext >&5
11286 cf_cv_xaw_compat=no
11288 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11290 echo "$as_me:11290: result: $cf_cv_xaw_compat" >&5
11291 echo "${ECHO_T}$cf_cv_xaw_compat" >&6
11293 if test "$cf_cv_xaw_compat" = no
11295 # workaround for broken ".pc" files...
11296 case "$cf_x_athena_lib" in #(vi
11300 test -n "$verbose" && echo " work around broken package" 1>&6
11302 echo "${as_me:-configure}:11302: testing work around broken package ..." 1>&5
11304 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
11305 test -n "$verbose" && echo " found package xmu" 1>&6
11307 echo "${as_me:-configure}:11307: testing found package xmu ..." 1>&5
11309 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
11310 cf_pkgconfig_libs="`$PKG_CONFIG --libs xmu 2>/dev/null`"
11311 test -n "$verbose" && echo " package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
11313 echo "${as_me:-configure}:11313: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11315 test -n "$verbose" && echo " package xmu LIBS: $cf_pkgconfig_libs" 1>&6
11317 echo "${as_me:-configure}:11317: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
11322 cf_new_extra_cppflags=
11324 for cf_add_cflags in $cf_pkgconfig_incs
11326 case $cf_fix_cppflags in
11328 case $cf_add_cflags in #(vi
11329 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11330 case $cf_add_cflags in
11332 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11334 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11335 && test -z "${cf_tst_cflags}" \
11336 && cf_fix_cppflags=yes
11338 if test $cf_fix_cppflags = yes ; then
11339 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11341 elif test "${cf_tst_cflags}" = "\"'" ; then
11342 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11347 case "$CPPFLAGS" in
11348 *$cf_add_cflags) #(vi
11351 case $cf_add_cflags in #(vi
11353 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11355 CPPFLAGS=`echo "$CPPFLAGS" | \
11356 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11357 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11361 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11366 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11371 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11373 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11375 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11376 && test -z "${cf_tst_cflags}" \
11377 && cf_fix_cppflags=no
11382 if test -n "$cf_new_cflags" ; then
11384 CFLAGS="$CFLAGS $cf_new_cflags"
11387 if test -n "$cf_new_cppflags" ; then
11389 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11392 if test -n "$cf_new_extra_cppflags" ; then
11394 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11397 LIBS="$cf_pkgconfig_libs $LIBS"
11401 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11403 echo "${as_me:-configure}:11403: testing ...before $LIBS ..." 1>&5
11405 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s,-lXt ,-lXt -lXmu ," -e 's/ / /g'`
11406 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11408 echo "${as_me:-configure}:11408: testing ...after $LIBS ..." 1>&5
11424 if test -z "$cf_x_athena_lib" ; then
11426 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
11427 test -n "$verbose" && echo " found package Xext" 1>&6
11429 echo "${as_me:-configure}:11429: testing found package Xext ..." 1>&5
11431 cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
11432 cf_pkgconfig_libs="`$PKG_CONFIG --libs Xext 2>/dev/null`"
11433 test -n "$verbose" && echo " package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
11435 echo "${as_me:-configure}:11435: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11437 test -n "$verbose" && echo " package Xext LIBS: $cf_pkgconfig_libs" 1>&6
11439 echo "${as_me:-configure}:11439: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
11444 cf_new_extra_cppflags=
11446 for cf_add_cflags in $cf_pkgconfig_incs
11448 case $cf_fix_cppflags in
11450 case $cf_add_cflags in #(vi
11451 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11452 case $cf_add_cflags in
11454 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11456 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11457 && test -z "${cf_tst_cflags}" \
11458 && cf_fix_cppflags=yes
11460 if test $cf_fix_cppflags = yes ; then
11461 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11463 elif test "${cf_tst_cflags}" = "\"'" ; then
11464 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11469 case "$CPPFLAGS" in
11470 *$cf_add_cflags) #(vi
11473 case $cf_add_cflags in #(vi
11475 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11477 CPPFLAGS=`echo "$CPPFLAGS" | \
11478 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11479 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11483 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11488 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11493 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11495 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11497 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11498 && test -z "${cf_tst_cflags}" \
11499 && cf_fix_cppflags=no
11504 if test -n "$cf_new_cflags" ; then
11506 CFLAGS="$CFLAGS $cf_new_cflags"
11509 if test -n "$cf_new_cppflags" ; then
11511 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11514 if test -n "$cf_new_extra_cppflags" ; then
11516 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11519 LIBS="$cf_pkgconfig_libs $LIBS"
11523 echo "$as_me:11523: checking for XextCreateExtension in -lXext" >&5
11524 echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
11525 if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
11526 echo $ECHO_N "(cached) $ECHO_C" >&6
11528 ac_check_lib_save_LIBS=$LIBS
11529 LIBS="-lXext $LIBS"
11530 cat >conftest.$ac_ext <<_ACEOF
11531 #line 11531 "configure"
11532 #include "confdefs.h"
11534 /* Override any gcc2 internal prototype to avoid an error. */
11538 /* We use char because int might match the return type of a gcc2
11539 builtin and then its argument prototype would still apply. */
11540 char XextCreateExtension ();
11544 XextCreateExtension ();
11549 rm -f conftest.$ac_objext conftest$ac_exeext
11550 if { (eval echo "$as_me:11550: \"$ac_link\"") >&5
11551 (eval $ac_link) 2>&5
11553 echo "$as_me:11553: \$? = $ac_status" >&5
11554 (exit $ac_status); } &&
11555 { ac_try='test -s conftest$ac_exeext'
11556 { (eval echo "$as_me:11556: \"$ac_try\"") >&5
11557 (eval $ac_try) 2>&5
11559 echo "$as_me:11559: \$? = $ac_status" >&5
11560 (exit $ac_status); }; }; then
11561 ac_cv_lib_Xext_XextCreateExtension=yes
11563 echo "$as_me: failed program was:" >&5
11564 cat conftest.$ac_ext >&5
11565 ac_cv_lib_Xext_XextCreateExtension=no
11567 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11568 LIBS=$ac_check_lib_save_LIBS
11570 echo "$as_me:11570: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
11571 echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
11572 if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
11573 LIBS="-lXext $LIBS"
11580 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11581 test -n "$verbose" && echo " found package xt" 1>&6
11583 echo "${as_me:-configure}:11583: testing found package xt ..." 1>&5
11585 cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11586 cf_pkgconfig_libs="`$PKG_CONFIG --libs xt 2>/dev/null`"
11587 test -n "$verbose" && echo " package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11589 echo "${as_me:-configure}:11589: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11591 test -n "$verbose" && echo " package xt LIBS: $cf_pkgconfig_libs" 1>&6
11593 echo "${as_me:-configure}:11593: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11598 cf_new_extra_cppflags=
11600 for cf_add_cflags in $cf_pkgconfig_incs
11602 case $cf_fix_cppflags in
11604 case $cf_add_cflags in #(vi
11605 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11606 case $cf_add_cflags in
11608 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11610 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11611 && test -z "${cf_tst_cflags}" \
11612 && cf_fix_cppflags=yes
11614 if test $cf_fix_cppflags = yes ; then
11615 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11617 elif test "${cf_tst_cflags}" = "\"'" ; then
11618 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11623 case "$CPPFLAGS" in
11624 *$cf_add_cflags) #(vi
11627 case $cf_add_cflags in #(vi
11629 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11631 CPPFLAGS=`echo "$CPPFLAGS" | \
11632 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11633 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11637 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11642 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11647 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11649 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11651 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11652 && test -z "${cf_tst_cflags}" \
11653 && cf_fix_cppflags=no
11658 if test -n "$cf_new_cflags" ; then
11660 CFLAGS="$CFLAGS $cf_new_cflags"
11663 if test -n "$cf_new_cppflags" ; then
11665 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11668 if test -n "$cf_new_extra_cppflags" ; then
11670 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11673 LIBS="$cf_pkgconfig_libs $LIBS"
11675 case "x$LIBS" in #(vi
11679 # we have an "xt" package, but it may omit Xt's dependency on X11
11680 echo "$as_me:11680: checking for usable X dependency" >&5
11681 echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11682 if test "${cf_cv_xt_x11_compat+set}" = set; then
11683 echo $ECHO_N "(cached) $ECHO_C" >&6
11686 cat >conftest.$ac_ext <<_ACEOF
11687 #line 11687 "configure"
11688 #include "confdefs.h"
11690 #include <X11/Xlib.h>
11696 int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
11697 int rc2 = XClearWindow((Display*) 0, (Window) 0);
11698 int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11699 int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11705 rm -f conftest.$ac_objext conftest$ac_exeext
11706 if { (eval echo "$as_me:11706: \"$ac_link\"") >&5
11707 (eval $ac_link) 2>&5
11709 echo "$as_me:11709: \$? = $ac_status" >&5
11710 (exit $ac_status); } &&
11711 { ac_try='test -s conftest$ac_exeext'
11712 { (eval echo "$as_me:11712: \"$ac_try\"") >&5
11713 (eval $ac_try) 2>&5
11715 echo "$as_me:11715: \$? = $ac_status" >&5
11716 (exit $ac_status); }; }; then
11717 cf_cv_xt_x11_compat=yes
11719 echo "$as_me: failed program was:" >&5
11720 cat conftest.$ac_ext >&5
11721 cf_cv_xt_x11_compat=no
11723 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11725 echo "$as_me:11725: result: $cf_cv_xt_x11_compat" >&5
11726 echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11727 if test "$cf_cv_xt_x11_compat" = no
11729 test -n "$verbose" && echo " work around broken X11 dependency" 1>&6
11731 echo "${as_me:-configure}:11731: testing work around broken X11 dependency ..." 1>&5
11733 # 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11735 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11736 test -n "$verbose" && echo " found package x11" 1>&6
11738 echo "${as_me:-configure}:11738: testing found package x11 ..." 1>&5
11740 cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11741 cf_pkgconfig_libs="`$PKG_CONFIG --libs x11 2>/dev/null`"
11742 test -n "$verbose" && echo " package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11744 echo "${as_me:-configure}:11744: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11746 test -n "$verbose" && echo " package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11748 echo "${as_me:-configure}:11748: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11753 cf_new_extra_cppflags=
11755 for cf_add_cflags in $cf_pkgconfig_incs
11757 case $cf_fix_cppflags in
11759 case $cf_add_cflags in #(vi
11760 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11761 case $cf_add_cflags in
11763 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11765 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11766 && test -z "${cf_tst_cflags}" \
11767 && cf_fix_cppflags=yes
11769 if test $cf_fix_cppflags = yes ; then
11770 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11772 elif test "${cf_tst_cflags}" = "\"'" ; then
11773 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11778 case "$CPPFLAGS" in
11779 *$cf_add_cflags) #(vi
11782 case $cf_add_cflags in #(vi
11784 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11786 CPPFLAGS=`echo "$CPPFLAGS" | \
11787 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11788 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11792 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11797 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11802 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11804 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11806 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11807 && test -z "${cf_tst_cflags}" \
11808 && cf_fix_cppflags=no
11813 if test -n "$cf_new_cflags" ; then
11815 CFLAGS="$CFLAGS $cf_new_cflags"
11818 if test -n "$cf_new_cppflags" ; then
11820 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11823 if test -n "$cf_new_extra_cppflags" ; then
11825 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11828 LIBS="$cf_pkgconfig_libs $LIBS"
11832 test -n "$verbose" && echo " ...before $LIBS" 1>&6
11834 echo "${as_me:-configure}:11834: testing ...before $LIBS ..." 1>&5
11836 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s,-lXt ,-lXt -lX11 ," -e 's/ / /g'`
11837 test -n "$verbose" && echo " ...after $LIBS" 1>&6
11839 echo "${as_me:-configure}:11839: testing ...after $LIBS ..." 1>&5
11847 echo "$as_me:11847: checking for usable X Toolkit package" >&5
11848 echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
11849 if test "${cf_cv_xt_ice_compat+set}" = set; then
11850 echo $ECHO_N "(cached) $ECHO_C" >&6
11853 cat >conftest.$ac_ext <<_ACEOF
11854 #line 11854 "configure"
11855 #include "confdefs.h"
11857 #include <X11/Shell.h>
11862 int num = IceConnectionNumber(0)
11868 rm -f conftest.$ac_objext conftest$ac_exeext
11869 if { (eval echo "$as_me:11869: \"$ac_link\"") >&5
11870 (eval $ac_link) 2>&5
11872 echo "$as_me:11872: \$? = $ac_status" >&5
11873 (exit $ac_status); } &&
11874 { ac_try='test -s conftest$ac_exeext'
11875 { (eval echo "$as_me:11875: \"$ac_try\"") >&5
11876 (eval $ac_try) 2>&5
11878 echo "$as_me:11878: \$? = $ac_status" >&5
11879 (exit $ac_status); }; }; then
11880 cf_cv_xt_ice_compat=yes
11882 echo "$as_me: failed program was:" >&5
11883 cat conftest.$ac_ext >&5
11884 cf_cv_xt_ice_compat=no
11886 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11888 echo "$as_me:11888: result: $cf_cv_xt_ice_compat" >&5
11889 echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
11891 if test "$cf_cv_xt_ice_compat" = no
11893 # workaround for broken ".pc" files used for X Toolkit.
11894 case "x$X_PRE_LIBS" in #(vi
11896 case "x$LIBS" in #(vi
11900 test -n "$verbose" && echo " work around broken ICE dependency" 1>&6
11902 echo "${as_me:-configure}:11902: testing work around broken ICE dependency ..." 1>&5
11904 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11905 test -n "$verbose" && echo " found package ice" 1>&6
11907 echo "${as_me:-configure}:11907: testing found package ice ..." 1>&5
11909 cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11910 cf_pkgconfig_libs="`$PKG_CONFIG --libs ice 2>/dev/null`"
11911 test -n "$verbose" && echo " package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11913 echo "${as_me:-configure}:11913: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11915 test -n "$verbose" && echo " package ice LIBS: $cf_pkgconfig_libs" 1>&6
11917 echo "${as_me:-configure}:11917: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11922 cf_new_extra_cppflags=
11924 for cf_add_cflags in $cf_pkgconfig_incs
11926 case $cf_fix_cppflags in
11928 case $cf_add_cflags in #(vi
11929 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11930 case $cf_add_cflags in
11932 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11934 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11935 && test -z "${cf_tst_cflags}" \
11936 && cf_fix_cppflags=yes
11938 if test $cf_fix_cppflags = yes ; then
11939 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11941 elif test "${cf_tst_cflags}" = "\"'" ; then
11942 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11947 case "$CPPFLAGS" in
11948 *$cf_add_cflags) #(vi
11951 case $cf_add_cflags in #(vi
11953 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11955 CPPFLAGS=`echo "$CPPFLAGS" | \
11956 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
11957 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
11961 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11966 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11971 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11973 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11975 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11976 && test -z "${cf_tst_cflags}" \
11977 && cf_fix_cppflags=no
11982 if test -n "$cf_new_cflags" ; then
11984 CFLAGS="$CFLAGS $cf_new_cflags"
11987 if test -n "$cf_new_cppflags" ; then
11989 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11992 if test -n "$cf_new_extra_cppflags" ; then
11994 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11997 LIBS="$cf_pkgconfig_libs $LIBS"
11999 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
12000 test -n "$verbose" && echo " found package sm" 1>&6
12002 echo "${as_me:-configure}:12002: testing found package sm ..." 1>&5
12004 cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
12005 cf_pkgconfig_libs="`$PKG_CONFIG --libs sm 2>/dev/null`"
12006 test -n "$verbose" && echo " package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
12008 echo "${as_me:-configure}:12008: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12010 test -n "$verbose" && echo " package sm LIBS: $cf_pkgconfig_libs" 1>&6
12012 echo "${as_me:-configure}:12012: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
12017 cf_new_extra_cppflags=
12019 for cf_add_cflags in $cf_pkgconfig_incs
12021 case $cf_fix_cppflags in
12023 case $cf_add_cflags in #(vi
12024 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12025 case $cf_add_cflags in
12027 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12029 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12030 && test -z "${cf_tst_cflags}" \
12031 && cf_fix_cppflags=yes
12033 if test $cf_fix_cppflags = yes ; then
12034 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12036 elif test "${cf_tst_cflags}" = "\"'" ; then
12037 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12042 case "$CPPFLAGS" in
12043 *$cf_add_cflags) #(vi
12046 case $cf_add_cflags in #(vi
12048 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12050 CPPFLAGS=`echo "$CPPFLAGS" | \
12051 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12052 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12056 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12061 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12066 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12068 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12070 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12071 && test -z "${cf_tst_cflags}" \
12072 && cf_fix_cppflags=no
12077 if test -n "$cf_new_cflags" ; then
12079 CFLAGS="$CFLAGS $cf_new_cflags"
12082 if test -n "$cf_new_cppflags" ; then
12084 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12087 if test -n "$cf_new_extra_cppflags" ; then
12089 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12092 LIBS="$cf_pkgconfig_libs $LIBS"
12100 test -n "$verbose" && echo " ...before $LIBS" 1>&6
12102 echo "${as_me:-configure}:12102: testing ...before $LIBS ..." 1>&5
12104 LIBS=`echo "$LIBS" | sed -e "s/[ ][ ]*/ /g" -e "s,-lXt ,-lXt $X_PRE_LIBS ," -e 's/ / /g'`
12105 test -n "$verbose" && echo " ...after $LIBS" 1>&6
12107 echo "${as_me:-configure}:12107: testing ...after $LIBS ..." 1>&5
12121 LDFLAGS="$X_LIBS $LDFLAGS"
12123 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
12125 echo "${as_me:-configure}:12125: testing checking additions to CFLAGS ..." 1>&5
12127 cf_check_cflags="$CFLAGS"
12128 cf_check_cppflags="$CPPFLAGS"
12133 cf_new_extra_cppflags=
12135 for cf_add_cflags in $X_CFLAGS
12137 case $cf_fix_cppflags in
12139 case $cf_add_cflags in #(vi
12140 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12141 case $cf_add_cflags in
12143 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12145 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12146 && test -z "${cf_tst_cflags}" \
12147 && cf_fix_cppflags=yes
12149 if test $cf_fix_cppflags = yes ; then
12150 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12152 elif test "${cf_tst_cflags}" = "\"'" ; then
12153 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12158 case "$CPPFLAGS" in
12159 *$cf_add_cflags) #(vi
12162 case $cf_add_cflags in #(vi
12164 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12166 CPPFLAGS=`echo "$CPPFLAGS" | \
12167 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12168 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12172 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12177 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12182 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12184 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12186 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12187 && test -z "${cf_tst_cflags}" \
12188 && cf_fix_cppflags=no
12193 if test -n "$cf_new_cflags" ; then
12194 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12196 echo "${as_me:-configure}:12196: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12198 CFLAGS="$CFLAGS $cf_new_cflags"
12201 if test -n "$cf_new_cppflags" ; then
12202 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12204 echo "${as_me:-configure}:12204: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12206 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12209 if test -n "$cf_new_extra_cppflags" ; then
12210 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12212 echo "${as_me:-configure}:12212: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12214 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12217 if test "$cf_check_cflags" != "$CFLAGS" ; then
12218 cat >conftest.$ac_ext <<_ACEOF
12219 #line 12219 "configure"
12220 #include "confdefs.h"
12225 printf("Hello world");
12230 rm -f conftest.$ac_objext conftest$ac_exeext
12231 if { (eval echo "$as_me:12231: \"$ac_link\"") >&5
12232 (eval $ac_link) 2>&5
12234 echo "$as_me:12234: \$? = $ac_status" >&5
12235 (exit $ac_status); } &&
12236 { ac_try='test -s conftest$ac_exeext'
12237 { (eval echo "$as_me:12237: \"$ac_try\"") >&5
12238 (eval $ac_try) 2>&5
12240 echo "$as_me:12240: \$? = $ac_status" >&5
12241 (exit $ac_status); }; }; then
12244 echo "$as_me: failed program was:" >&5
12245 cat conftest.$ac_ext >&5
12246 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
12248 echo "${as_me:-configure}:12248: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
12250 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
12251 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
12253 echo "${as_me:-configure}:12253: testing but keeping change to \$CPPFLAGS ..." 1>&5
12256 CFLAGS="$cf_check_flags"
12258 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12261 echo "$as_me:12261: checking for XOpenDisplay" >&5
12262 echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
12263 if test "${ac_cv_func_XOpenDisplay+set}" = set; then
12264 echo $ECHO_N "(cached) $ECHO_C" >&6
12266 cat >conftest.$ac_ext <<_ACEOF
12267 #line 12267 "configure"
12268 #include "confdefs.h"
12269 /* System header to define __stub macros and hopefully few prototypes,
12270 which can conflict with char XOpenDisplay (); below. */
12271 #include <assert.h>
12272 /* Override any gcc2 internal prototype to avoid an error. */
12276 /* We use char because int might match the return type of a gcc2
12277 builtin and then its argument prototype would still apply. */
12278 char XOpenDisplay ();
12284 /* The GNU C library defines this for functions which it implements
12285 to always fail with ENOSYS. Some functions are actually named
12286 something starting with __ and the normal name is an alias. */
12287 #if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
12290 f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12297 rm -f conftest.$ac_objext conftest$ac_exeext
12298 if { (eval echo "$as_me:12298: \"$ac_link\"") >&5
12299 (eval $ac_link) 2>&5
12301 echo "$as_me:12301: \$? = $ac_status" >&5
12302 (exit $ac_status); } &&
12303 { ac_try='test -s conftest$ac_exeext'
12304 { (eval echo "$as_me:12304: \"$ac_try\"") >&5
12305 (eval $ac_try) 2>&5
12307 echo "$as_me:12307: \$? = $ac_status" >&5
12308 (exit $ac_status); }; }; then
12309 ac_cv_func_XOpenDisplay=yes
12311 echo "$as_me: failed program was:" >&5
12312 cat conftest.$ac_ext >&5
12313 ac_cv_func_XOpenDisplay=no
12315 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12317 echo "$as_me:12317: result: $ac_cv_func_XOpenDisplay" >&5
12318 echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
12319 if test $ac_cv_func_XOpenDisplay = yes; then
12323 echo "$as_me:12323: checking for XOpenDisplay in -lX11" >&5
12324 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12325 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12326 echo $ECHO_N "(cached) $ECHO_C" >&6
12328 ac_check_lib_save_LIBS=$LIBS
12329 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12330 cat >conftest.$ac_ext <<_ACEOF
12331 #line 12331 "configure"
12332 #include "confdefs.h"
12334 /* Override any gcc2 internal prototype to avoid an error. */
12338 /* We use char because int might match the return type of a gcc2
12339 builtin and then its argument prototype would still apply. */
12340 char XOpenDisplay ();
12349 rm -f conftest.$ac_objext conftest$ac_exeext
12350 if { (eval echo "$as_me:12350: \"$ac_link\"") >&5
12351 (eval $ac_link) 2>&5
12353 echo "$as_me:12353: \$? = $ac_status" >&5
12354 (exit $ac_status); } &&
12355 { ac_try='test -s conftest$ac_exeext'
12356 { (eval echo "$as_me:12356: \"$ac_try\"") >&5
12357 (eval $ac_try) 2>&5
12359 echo "$as_me:12359: \$? = $ac_status" >&5
12360 (exit $ac_status); }; }; then
12361 ac_cv_lib_X11_XOpenDisplay=yes
12363 echo "$as_me: failed program was:" >&5
12364 cat conftest.$ac_ext >&5
12365 ac_cv_lib_X11_XOpenDisplay=no
12367 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12368 LIBS=$ac_check_lib_save_LIBS
12370 echo "$as_me:12370: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12371 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12372 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12378 echo "$as_me:12378: checking for XtAppInitialize" >&5
12379 echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
12380 if test "${ac_cv_func_XtAppInitialize+set}" = set; then
12381 echo $ECHO_N "(cached) $ECHO_C" >&6
12383 cat >conftest.$ac_ext <<_ACEOF
12384 #line 12384 "configure"
12385 #include "confdefs.h"
12386 /* System header to define __stub macros and hopefully few prototypes,
12387 which can conflict with char XtAppInitialize (); below. */
12388 #include <assert.h>
12389 /* Override any gcc2 internal prototype to avoid an error. */
12393 /* We use char because int might match the return type of a gcc2
12394 builtin and then its argument prototype would still apply. */
12395 char XtAppInitialize ();
12401 /* The GNU C library defines this for functions which it implements
12402 to always fail with ENOSYS. Some functions are actually named
12403 something starting with __ and the normal name is an alias. */
12404 #if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
12407 f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12414 rm -f conftest.$ac_objext conftest$ac_exeext
12415 if { (eval echo "$as_me:12415: \"$ac_link\"") >&5
12416 (eval $ac_link) 2>&5
12418 echo "$as_me:12418: \$? = $ac_status" >&5
12419 (exit $ac_status); } &&
12420 { ac_try='test -s conftest$ac_exeext'
12421 { (eval echo "$as_me:12421: \"$ac_try\"") >&5
12422 (eval $ac_try) 2>&5
12424 echo "$as_me:12424: \$? = $ac_status" >&5
12425 (exit $ac_status); }; }; then
12426 ac_cv_func_XtAppInitialize=yes
12428 echo "$as_me: failed program was:" >&5
12429 cat conftest.$ac_ext >&5
12430 ac_cv_func_XtAppInitialize=no
12432 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12434 echo "$as_me:12434: result: $ac_cv_func_XtAppInitialize" >&5
12435 echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
12436 if test $ac_cv_func_XtAppInitialize = yes; then
12440 echo "$as_me:12440: checking for XtAppInitialize in -lXt" >&5
12441 echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
12442 if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
12443 echo $ECHO_N "(cached) $ECHO_C" >&6
12445 ac_check_lib_save_LIBS=$LIBS
12446 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12447 cat >conftest.$ac_ext <<_ACEOF
12448 #line 12448 "configure"
12449 #include "confdefs.h"
12451 /* Override any gcc2 internal prototype to avoid an error. */
12455 /* We use char because int might match the return type of a gcc2
12456 builtin and then its argument prototype would still apply. */
12457 char XtAppInitialize ();
12461 XtAppInitialize ();
12466 rm -f conftest.$ac_objext conftest$ac_exeext
12467 if { (eval echo "$as_me:12467: \"$ac_link\"") >&5
12468 (eval $ac_link) 2>&5
12470 echo "$as_me:12470: \$? = $ac_status" >&5
12471 (exit $ac_status); } &&
12472 { ac_try='test -s conftest$ac_exeext'
12473 { (eval echo "$as_me:12473: \"$ac_try\"") >&5
12474 (eval $ac_try) 2>&5
12476 echo "$as_me:12476: \$? = $ac_status" >&5
12477 (exit $ac_status); }; }; then
12478 ac_cv_lib_Xt_XtAppInitialize=yes
12480 echo "$as_me: failed program was:" >&5
12481 cat conftest.$ac_ext >&5
12482 ac_cv_lib_Xt_XtAppInitialize=no
12484 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12485 LIBS=$ac_check_lib_save_LIBS
12487 echo "$as_me:12487: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
12488 echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
12489 if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
12490 cat >>confdefs.h <<\EOF
12491 #define HAVE_LIBXT 1
12495 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
12502 if test $cf_have_X_LIBS = no ; then
12503 { echo "$as_me:12503: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12504 test program. You will have to check and add the proper libraries by hand
12506 echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12507 test program. You will have to check and add the proper libraries by hand
12508 to makefile." >&2;}
12511 cf_x_athena_root=$cf_x_athena
12514 for cf_path in default \
12515 /usr/contrib/X11R6 \
12516 /usr/contrib/X11R5 \
12520 if test -z "$cf_x_athena_inc" ; then
12521 cf_save="$CPPFLAGS"
12522 cf_test=X11/$cf_x_athena_root/SimpleMenu.h
12523 if test $cf_path != default ; then
12524 CPPFLAGS="$cf_save -I$cf_path/include"
12525 echo "$as_me:12525: checking for $cf_test in $cf_path" >&5
12526 echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
12528 echo "$as_me:12528: checking for $cf_test" >&5
12529 echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
12531 cat >conftest.$ac_ext <<_ACEOF
12532 #line 12532 "configure"
12533 #include "confdefs.h"
12535 #include <X11/Intrinsic.h>
12536 #include <$cf_test>
12545 rm -f conftest.$ac_objext
12546 if { (eval echo "$as_me:12546: \"$ac_compile\"") >&5
12547 (eval $ac_compile) 2>&5
12549 echo "$as_me:12549: \$? = $ac_status" >&5
12550 (exit $ac_status); } &&
12551 { ac_try='test -s conftest.$ac_objext'
12552 { (eval echo "$as_me:12552: \"$ac_try\"") >&5
12553 (eval $ac_try) 2>&5
12555 echo "$as_me:12555: \$? = $ac_status" >&5
12556 (exit $ac_status); }; }; then
12559 echo "$as_me: failed program was:" >&5
12560 cat conftest.$ac_ext >&5
12563 rm -f conftest.$ac_objext conftest.$ac_ext
12564 echo "$as_me:12564: result: $cf_result" >&5
12565 echo "${ECHO_T}$cf_result" >&6
12566 if test "$cf_result" = yes ; then
12567 cf_x_athena_inc=$cf_path
12570 CPPFLAGS="$cf_save"
12575 if test -z "$cf_x_athena_inc" ; then
12576 { echo "$as_me:12576: WARNING: Unable to successfully find Athena header files with test program" >&5
12577 echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
12578 elif test "$cf_x_athena_inc" != default ; then
12579 CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
12582 cf_x_athena_root=$cf_x_athena
12585 for cf_path in default \
12586 /usr/contrib/X11R6 \
12587 /usr/contrib/X11R5 \
12592 ${cf_x_athena_root} \
12593 ${cf_x_athena_root}7 \
12594 ${cf_x_athena_root}6
12597 "-l$cf_lib -lXmu" \
12598 "-l$cf_lib -lXpm -lXmu" \
12599 "-l${cf_lib}_s -lXmu_s"
12601 if test -z "$cf_x_athena_lib" ; then
12603 cf_test=XawSimpleMenuAddGlobalActions
12604 if test $cf_path != default ; then
12605 LIBS="-L$cf_path/lib $cf_libs $LIBS"
12606 echo "$as_me:12606: checking for $cf_libs in $cf_path" >&5
12607 echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
12609 LIBS="$cf_libs $LIBS"
12610 echo "$as_me:12610: checking for $cf_test in $cf_libs" >&5
12611 echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
12613 cat >conftest.$ac_ext <<_ACEOF
12614 #line 12614 "configure"
12615 #include "confdefs.h"
12617 #include <X11/Intrinsic.h>
12618 #include <X11/$cf_x_athena_root/SimpleMenu.h>
12624 $cf_test((XtAppContext) 0)
12629 rm -f conftest.$ac_objext conftest$ac_exeext
12630 if { (eval echo "$as_me:12630: \"$ac_link\"") >&5
12631 (eval $ac_link) 2>&5
12633 echo "$as_me:12633: \$? = $ac_status" >&5
12634 (exit $ac_status); } &&
12635 { ac_try='test -s conftest$ac_exeext'
12636 { (eval echo "$as_me:12636: \"$ac_try\"") >&5
12637 (eval $ac_try) 2>&5
12639 echo "$as_me:12639: \$? = $ac_status" >&5
12640 (exit $ac_status); }; }; then
12643 echo "$as_me: failed program was:" >&5
12644 cat conftest.$ac_ext >&5
12647 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12648 echo "$as_me:12648: result: $cf_result" >&5
12649 echo "${ECHO_T}$cf_result" >&6
12650 if test "$cf_result" = yes ; then
12651 cf_x_athena_lib="$cf_libs"
12657 test -n "$cf_x_athena_lib" && break
12661 if test -z "$cf_x_athena_lib" ; then
12662 { { echo "$as_me:12662: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
12663 echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
12664 { (exit 1); exit 1; }; }
12667 cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12669 cat >>confdefs.h <<EOF
12670 #define $cf_x_athena_LIBS 1
12675 if test -n "$ac_tool_prefix"; then
12676 for ac_prog in xcurses-config
12678 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12679 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12680 echo "$as_me:12680: checking for $ac_word" >&5
12681 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12682 if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
12683 echo $ECHO_N "(cached) $ECHO_C" >&6
12685 if test -n "$XCURSES_CONFIG"; then
12686 ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
12688 ac_save_IFS=$IFS; IFS=$ac_path_separator
12690 for ac_dir in $ac_dummy; do
12692 test -z "$ac_dir" && ac_dir=.
12693 $as_executable_p "$ac_dir/$ac_word" || continue
12694 ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
12695 echo "$as_me:12695: found $ac_dir/$ac_word" >&5
12701 XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
12702 if test -n "$XCURSES_CONFIG"; then
12703 echo "$as_me:12703: result: $XCURSES_CONFIG" >&5
12704 echo "${ECHO_T}$XCURSES_CONFIG" >&6
12706 echo "$as_me:12706: result: no" >&5
12707 echo "${ECHO_T}no" >&6
12710 test -n "$XCURSES_CONFIG" && break
12713 if test -z "$XCURSES_CONFIG"; then
12714 ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
12715 for ac_prog in xcurses-config
12717 # Extract the first word of "$ac_prog", so it can be a program name with args.
12718 set dummy $ac_prog; ac_word=$2
12719 echo "$as_me:12719: checking for $ac_word" >&5
12720 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12721 if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
12722 echo $ECHO_N "(cached) $ECHO_C" >&6
12724 if test -n "$ac_ct_XCURSES_CONFIG"; then
12725 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
12727 ac_save_IFS=$IFS; IFS=$ac_path_separator
12729 for ac_dir in $ac_dummy; do
12731 test -z "$ac_dir" && ac_dir=.
12732 $as_executable_p "$ac_dir/$ac_word" || continue
12733 ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
12734 echo "$as_me:12734: found $ac_dir/$ac_word" >&5
12740 ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
12741 if test -n "$ac_ct_XCURSES_CONFIG"; then
12742 echo "$as_me:12742: result: $ac_ct_XCURSES_CONFIG" >&5
12743 echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
12745 echo "$as_me:12745: result: no" >&5
12746 echo "${ECHO_T}no" >&6
12749 test -n "$ac_ct_XCURSES_CONFIG" && break
12751 test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
12753 XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
12756 if test "$XCURSES_CONFIG" != none ; then
12758 CPPFLAGS="$CPPFLAGS `$XCURSES_CONFIG --cflags`"
12759 LIBS="`$XCURSES_CONFIG --libs` $LIBS"
12761 cf_cv_lib_XCurses=yes
12765 LDFLAGS="$LDFLAGS $X_LIBS"
12767 test -n "$verbose" && echo " checking additions to CFLAGS" 1>&6
12769 echo "${as_me:-configure}:12769: testing checking additions to CFLAGS ..." 1>&5
12771 cf_check_cflags="$CFLAGS"
12772 cf_check_cppflags="$CPPFLAGS"
12777 cf_new_extra_cppflags=
12779 for cf_add_cflags in $X_CFLAGS
12781 case $cf_fix_cppflags in
12783 case $cf_add_cflags in #(vi
12784 -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12785 case $cf_add_cflags in
12787 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12789 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12790 && test -z "${cf_tst_cflags}" \
12791 && cf_fix_cppflags=yes
12793 if test $cf_fix_cppflags = yes ; then
12794 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12796 elif test "${cf_tst_cflags}" = "\"'" ; then
12797 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12802 case "$CPPFLAGS" in
12803 *$cf_add_cflags) #(vi
12806 case $cf_add_cflags in #(vi
12808 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12810 CPPFLAGS=`echo "$CPPFLAGS" | \
12811 sed -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?[ ]/ /g' \
12812 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ ]*\)\?$//g'`
12816 cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12821 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12826 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12828 cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12830 test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12831 && test -z "${cf_tst_cflags}" \
12832 && cf_fix_cppflags=no
12837 if test -n "$cf_new_cflags" ; then
12838 test -n "$verbose" && echo " add to \$CFLAGS $cf_new_cflags" 1>&6
12840 echo "${as_me:-configure}:12840: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12842 CFLAGS="$CFLAGS $cf_new_cflags"
12845 if test -n "$cf_new_cppflags" ; then
12846 test -n "$verbose" && echo " add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12848 echo "${as_me:-configure}:12848: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12850 CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12853 if test -n "$cf_new_extra_cppflags" ; then
12854 test -n "$verbose" && echo " add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12856 echo "${as_me:-configure}:12856: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12858 EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12861 if test "$cf_check_cflags" != "$CFLAGS" ; then
12862 cat >conftest.$ac_ext <<_ACEOF
12863 #line 12863 "configure"
12864 #include "confdefs.h"
12869 printf("Hello world");
12874 rm -f conftest.$ac_objext conftest$ac_exeext
12875 if { (eval echo "$as_me:12875: \"$ac_link\"") >&5
12876 (eval $ac_link) 2>&5
12878 echo "$as_me:12878: \$? = $ac_status" >&5
12879 (exit $ac_status); } &&
12880 { ac_try='test -s conftest$ac_exeext'
12881 { (eval echo "$as_me:12881: \"$ac_try\"") >&5
12882 (eval $ac_try) 2>&5
12884 echo "$as_me:12884: \$? = $ac_status" >&5
12885 (exit $ac_status); }; }; then
12888 echo "$as_me: failed program was:" >&5
12889 cat conftest.$ac_ext >&5
12890 test -n "$verbose" && echo " test-compile failed. Undoing change to \$CFLAGS" 1>&6
12892 echo "${as_me:-configure}:12892: testing test-compile failed. Undoing change to \$CFLAGS ..." 1>&5
12894 if test "$cf_check_cppflags" != "$CPPFLAGS" ; then
12895 test -n "$verbose" && echo " but keeping change to \$CPPFLAGS" 1>&6
12897 echo "${as_me:-configure}:12897: testing but keeping change to \$CPPFLAGS ..." 1>&5
12900 CFLAGS="$cf_check_flags"
12902 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12905 echo "$as_me:12905: checking for XOpenDisplay in -lX11" >&5
12906 echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12907 if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12908 echo $ECHO_N "(cached) $ECHO_C" >&6
12910 ac_check_lib_save_LIBS=$LIBS
12911 LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12912 cat >conftest.$ac_ext <<_ACEOF
12913 #line 12913 "configure"
12914 #include "confdefs.h"
12916 /* Override any gcc2 internal prototype to avoid an error. */
12920 /* We use char because int might match the return type of a gcc2
12921 builtin and then its argument prototype would still apply. */
12922 char XOpenDisplay ();
12931 rm -f conftest.$ac_objext conftest$ac_exeext
12932 if { (eval echo "$as_me:12932: \"$ac_link\"") >&5
12933 (eval $ac_link) 2>&5
12935 echo "$as_me:12935: \$? = $ac_status" >&5
12936 (exit $ac_status); } &&
12937 { ac_try='test -s conftest$ac_exeext'
12938 { (eval echo "$as_me:12938: \"$ac_try\"") >&5
12939 (eval $ac_try) 2>&5
12941 echo "$as_me:12941: \$? = $ac_status" >&5
12942 (exit $ac_status); }; }; then
12943 ac_cv_lib_X11_XOpenDisplay=yes
12945 echo "$as_me: failed program was:" >&5
12946 cat conftest.$ac_ext >&5
12947 ac_cv_lib_X11_XOpenDisplay=no
12949 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12950 LIBS=$ac_check_lib_save_LIBS
12952 echo "$as_me:12952: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12953 echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12954 if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12958 echo "$as_me:12958: checking for XCurses library" >&5
12959 echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
12960 if test "${cf_cv_lib_XCurses+set}" = set; then
12961 echo $ECHO_N "(cached) $ECHO_C" >&6
12964 LIBS="-lXCurses $LIBS"
12965 cat >conftest.$ac_ext <<_ACEOF
12966 #line 12966 "configure"
12967 #include "confdefs.h"
12969 #include <xcurses.h>
12970 char *XCursesProgramName = "test";
12980 rm -f conftest.$ac_objext conftest$ac_exeext
12981 if { (eval echo "$as_me:12981: \"$ac_link\"") >&5
12982 (eval $ac_link) 2>&5
12984 echo "$as_me:12984: \$? = $ac_status" >&5
12985 (exit $ac_status); } &&
12986 { ac_try='test -s conftest$ac_exeext'
12987 { (eval echo "$as_me:12987: \"$ac_try\"") >&5
12988 (eval $ac_try) 2>&5
12990 echo "$as_me:12990: \$? = $ac_status" >&5
12991 (exit $ac_status); }; }; then
12992 cf_cv_lib_XCurses=yes
12994 echo "$as_me: failed program was:" >&5
12995 cat conftest.$ac_ext >&5
12996 cf_cv_lib_XCurses=no
12998 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13001 echo "$as_me:13001: result: $cf_cv_lib_XCurses" >&5
13002 echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
13006 if test $cf_cv_lib_XCurses = yes ; then
13007 cat >>confdefs.h <<\EOF
13011 cat >>confdefs.h <<\EOF
13015 echo "$as_me:13015: checking for xcurses.h" >&5
13016 echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
13017 if test "${ac_cv_header_xcurses_h+set}" = set; then
13018 echo $ECHO_N "(cached) $ECHO_C" >&6
13020 cat >conftest.$ac_ext <<_ACEOF
13021 #line 13021 "configure"
13022 #include "confdefs.h"
13023 #include <xcurses.h>
13025 if { (eval echo "$as_me:13025: \"$ac_cpp conftest.$ac_ext\"") >&5
13026 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13028 egrep -v '^ *\+' conftest.er1 >conftest.err
13030 cat conftest.err >&5
13031 echo "$as_me:13031: \$? = $ac_status" >&5
13032 (exit $ac_status); } >/dev/null; then
13033 if test -s conftest.err; then
13034 ac_cpp_err=$ac_c_preproc_warn_flag
13041 if test -z "$ac_cpp_err"; then
13042 ac_cv_header_xcurses_h=yes
13044 echo "$as_me: failed program was:" >&5
13045 cat conftest.$ac_ext >&5
13046 ac_cv_header_xcurses_h=no
13048 rm -f conftest.err conftest.$ac_ext
13050 echo "$as_me:13050: result: $ac_cv_header_xcurses_h" >&5
13051 echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
13052 if test $ac_cv_header_xcurses_h = yes; then
13053 cat >>confdefs.h <<\EOF
13054 #define HAVE_XCURSES 1
13060 { { echo "$as_me:13060: error: Cannot link with XCurses" >&5
13061 echo "$as_me: error: Cannot link with XCurses" >&2;}
13062 { (exit 1); exit 1; }; }
13068 case $cf_cv_screen in
13071 echo "$as_me:13071: checking for NetBSD form.h" >&5
13072 echo $ECHO_N "checking for NetBSD form.h... $ECHO_C" >&6
13073 if test "${cf_cv_netbsd_form_h+set}" = set; then
13074 echo $ECHO_N "(cached) $ECHO_C" >&6
13077 cat >conftest.$ac_ext <<_ACEOF
13078 #line 13078 "configure"
13079 #include "confdefs.h"
13081 #include <${cf_cv_ncurses_header:-curses.h}>
13089 int y = current_field(form)->cursor_ypos;
13090 int x = current_field(form)->cursor_xpos;
13096 rm -f conftest.$ac_objext
13097 if { (eval echo "$as_me:13097: \"$ac_compile\"") >&5
13098 (eval $ac_compile) 2>&5
13100 echo "$as_me:13100: \$? = $ac_status" >&5
13101 (exit $ac_status); } &&
13102 { ac_try='test -s conftest.$ac_objext'
13103 { (eval echo "$as_me:13103: \"$ac_try\"") >&5
13104 (eval $ac_try) 2>&5
13106 echo "$as_me:13106: \$? = $ac_status" >&5
13107 (exit $ac_status); }; }; then
13108 cf_cv_netbsd_form_h=yes
13111 echo "$as_me: failed program was:" >&5
13112 cat conftest.$ac_ext >&5
13113 cf_cv_netbsd_form_h=no
13115 rm -f conftest.$ac_objext conftest.$ac_ext
13118 echo "$as_me:13118: result: $cf_cv_netbsd_form_h" >&5
13119 echo "${ECHO_T}$cf_cv_netbsd_form_h" >&6
13121 test "$cf_cv_netbsd_form_h" = yes && cat >>confdefs.h <<\EOF
13122 #define HAVE_NETBSD_FORM_H 1
13125 echo "$as_me:13125: checking for NetBSD menu.h" >&5
13126 echo $ECHO_N "checking for NetBSD menu.h... $ECHO_C" >&6
13127 if test "${cf_cv_netbsd_menu_h+set}" = set; then
13128 echo $ECHO_N "(cached) $ECHO_C" >&6
13131 cat >conftest.$ac_ext <<_ACEOF
13132 #line 13132 "configure"
13133 #include "confdefs.h"
13135 #include <${cf_cv_ncurses_header:-curses.h}>
13143 int y = menu->max_item_width;
13149 rm -f conftest.$ac_objext
13150 if { (eval echo "$as_me:13150: \"$ac_compile\"") >&5
13151 (eval $ac_compile) 2>&5
13153 echo "$as_me:13153: \$? = $ac_status" >&5
13154 (exit $ac_status); } &&
13155 { ac_try='test -s conftest.$ac_objext'
13156 { (eval echo "$as_me:13156: \"$ac_try\"") >&5
13157 (eval $ac_try) 2>&5
13159 echo "$as_me:13159: \$? = $ac_status" >&5
13160 (exit $ac_status); }; }; then
13161 cf_cv_netbsd_menu_h=yes
13164 echo "$as_me: failed program was:" >&5
13165 cat conftest.$ac_ext >&5
13166 cf_cv_netbsd_menu_h=no
13168 rm -f conftest.$ac_objext conftest.$ac_ext
13171 echo "$as_me:13171: result: $cf_cv_netbsd_menu_h" >&5
13172 echo "${ECHO_T}$cf_cv_netbsd_menu_h" >&6
13174 test "$cf_cv_netbsd_menu_h" = yes && cat >>confdefs.h <<\EOF
13175 #define HAVE_NETBSD_MENU_H 1
13184 case $cf_cv_screen in #(vi
13188 # look for curses-related libraries
13190 as_ac_Lib=`echo "ac_cv_lib_panel$cf_cv_libtype''_new_panel" | $as_tr_sh`
13191 echo "$as_me:13191: checking for new_panel in -lpanel$cf_cv_libtype" >&5
13192 echo $ECHO_N "checking for new_panel in -lpanel$cf_cv_libtype... $ECHO_C" >&6
13193 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13194 echo $ECHO_N "(cached) $ECHO_C" >&6
13196 ac_check_lib_save_LIBS=$LIBS
13197 LIBS="-lpanel$cf_cv_libtype $LIBS"
13198 cat >conftest.$ac_ext <<_ACEOF
13199 #line 13199 "configure"
13200 #include "confdefs.h"
13202 /* Override any gcc2 internal prototype to avoid an error. */
13206 /* We use char because int might match the return type of a gcc2
13207 builtin and then its argument prototype would still apply. */
13217 rm -f conftest.$ac_objext conftest$ac_exeext
13218 if { (eval echo "$as_me:13218: \"$ac_link\"") >&5
13219 (eval $ac_link) 2>&5
13221 echo "$as_me:13221: \$? = $ac_status" >&5
13222 (exit $ac_status); } &&
13223 { ac_try='test -s conftest$ac_exeext'
13224 { (eval echo "$as_me:13224: \"$ac_try\"") >&5
13225 (eval $ac_try) 2>&5
13227 echo "$as_me:13227: \$? = $ac_status" >&5
13228 (exit $ac_status); }; }; then
13229 eval "$as_ac_Lib=yes"
13231 echo "$as_me: failed program was:" >&5
13232 cat conftest.$ac_ext >&5
13233 eval "$as_ac_Lib=no"
13235 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13236 LIBS=$ac_check_lib_save_LIBS
13238 echo "$as_me:13238: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13239 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13240 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13241 cat >>confdefs.h <<EOF
13242 #define `echo "HAVE_LIBpanel$cf_cv_libtype" | $as_tr_cpp` 1
13245 LIBS="-lpanel$cf_cv_libtype $LIBS"
13249 as_ac_Lib=`echo "ac_cv_lib_menu$cf_cv_libtype''_menu_driver" | $as_tr_sh`
13250 echo "$as_me:13250: checking for menu_driver in -lmenu$cf_cv_libtype" >&5
13251 echo $ECHO_N "checking for menu_driver in -lmenu$cf_cv_libtype... $ECHO_C" >&6
13252 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13253 echo $ECHO_N "(cached) $ECHO_C" >&6
13255 ac_check_lib_save_LIBS=$LIBS
13256 LIBS="-lmenu$cf_cv_libtype $LIBS"
13257 cat >conftest.$ac_ext <<_ACEOF
13258 #line 13258 "configure"
13259 #include "confdefs.h"
13261 /* Override any gcc2 internal prototype to avoid an error. */
13265 /* We use char because int might match the return type of a gcc2
13266 builtin and then its argument prototype would still apply. */
13267 char menu_driver ();
13276 rm -f conftest.$ac_objext conftest$ac_exeext
13277 if { (eval echo "$as_me:13277: \"$ac_link\"") >&5
13278 (eval $ac_link) 2>&5
13280 echo "$as_me:13280: \$? = $ac_status" >&5
13281 (exit $ac_status); } &&
13282 { ac_try='test -s conftest$ac_exeext'
13283 { (eval echo "$as_me:13283: \"$ac_try\"") >&5
13284 (eval $ac_try) 2>&5
13286 echo "$as_me:13286: \$? = $ac_status" >&5
13287 (exit $ac_status); }; }; then
13288 eval "$as_ac_Lib=yes"
13290 echo "$as_me: failed program was:" >&5
13291 cat conftest.$ac_ext >&5
13292 eval "$as_ac_Lib=no"
13294 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13295 LIBS=$ac_check_lib_save_LIBS
13297 echo "$as_me:13297: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13298 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13299 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13300 cat >>confdefs.h <<EOF
13301 #define `echo "HAVE_LIBmenu$cf_cv_libtype" | $as_tr_cpp` 1
13304 LIBS="-lmenu$cf_cv_libtype $LIBS"
13308 as_ac_Lib=`echo "ac_cv_lib_form$cf_cv_libtype''_form_driver" | $as_tr_sh`
13309 echo "$as_me:13309: checking for form_driver in -lform$cf_cv_libtype" >&5
13310 echo $ECHO_N "checking for form_driver in -lform$cf_cv_libtype... $ECHO_C" >&6
13311 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13312 echo $ECHO_N "(cached) $ECHO_C" >&6
13314 ac_check_lib_save_LIBS=$LIBS
13315 LIBS="-lform$cf_cv_libtype $LIBS"
13316 cat >conftest.$ac_ext <<_ACEOF
13317 #line 13317 "configure"
13318 #include "confdefs.h"
13320 /* Override any gcc2 internal prototype to avoid an error. */
13324 /* We use char because int might match the return type of a gcc2
13325 builtin and then its argument prototype would still apply. */
13326 char form_driver ();
13335 rm -f conftest.$ac_objext conftest$ac_exeext
13336 if { (eval echo "$as_me:13336: \"$ac_link\"") >&5
13337 (eval $ac_link) 2>&5
13339 echo "$as_me:13339: \$? = $ac_status" >&5
13340 (exit $ac_status); } &&
13341 { ac_try='test -s conftest$ac_exeext'
13342 { (eval echo "$as_me:13342: \"$ac_try\"") >&5
13343 (eval $ac_try) 2>&5
13345 echo "$as_me:13345: \$? = $ac_status" >&5
13346 (exit $ac_status); }; }; then
13347 eval "$as_ac_Lib=yes"
13349 echo "$as_me: failed program was:" >&5
13350 cat conftest.$ac_ext >&5
13351 eval "$as_ac_Lib=no"
13353 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13354 LIBS=$ac_check_lib_save_LIBS
13356 echo "$as_me:13356: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13357 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13358 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13359 cat >>confdefs.h <<EOF
13360 #define `echo "HAVE_LIBform$cf_cv_libtype" | $as_tr_cpp` 1
13363 LIBS="-lform$cf_cv_libtype $LIBS"
13367 # look for curses-related headers
13378 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13379 echo "$as_me:13379: checking for $ac_header" >&5
13380 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13381 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13382 echo $ECHO_N "(cached) $ECHO_C" >&6
13384 cat >conftest.$ac_ext <<_ACEOF
13385 #line 13385 "configure"
13386 #include "confdefs.h"
13387 #include <$ac_header>
13389 if { (eval echo "$as_me:13389: \"$ac_cpp conftest.$ac_ext\"") >&5
13390 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13392 egrep -v '^ *\+' conftest.er1 >conftest.err
13394 cat conftest.err >&5
13395 echo "$as_me:13395: \$? = $ac_status" >&5
13396 (exit $ac_status); } >/dev/null; then
13397 if test -s conftest.err; then
13398 ac_cpp_err=$ac_c_preproc_warn_flag
13405 if test -z "$ac_cpp_err"; then
13406 eval "$as_ac_Header=yes"
13408 echo "$as_me: failed program was:" >&5
13409 cat conftest.$ac_ext >&5
13410 eval "$as_ac_Header=no"
13412 rm -f conftest.err conftest.$ac_ext
13414 echo "$as_me:13414: result: `eval echo '${'$as_ac_Header'}'`" >&5
13415 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13416 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13417 cat >>confdefs.h <<EOF
13418 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13427 echo "$as_me:13427: checking return type of signal handlers" >&5
13428 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
13429 if test "${ac_cv_type_signal+set}" = set; then
13430 echo $ECHO_N "(cached) $ECHO_C" >&6
13432 cat >conftest.$ac_ext <<_ACEOF
13433 #line 13433 "configure"
13434 #include "confdefs.h"
13435 #include <sys/types.h>
13436 #include <signal.h>
13441 extern "C" void (*signal (int, void (*)(int)))(int);
13443 void (*signal ()) ();
13454 rm -f conftest.$ac_objext
13455 if { (eval echo "$as_me:13455: \"$ac_compile\"") >&5
13456 (eval $ac_compile) 2>&5
13458 echo "$as_me:13458: \$? = $ac_status" >&5
13459 (exit $ac_status); } &&
13460 { ac_try='test -s conftest.$ac_objext'
13461 { (eval echo "$as_me:13461: \"$ac_try\"") >&5
13462 (eval $ac_try) 2>&5
13464 echo "$as_me:13464: \$? = $ac_status" >&5
13465 (exit $ac_status); }; }; then
13466 ac_cv_type_signal=void
13468 echo "$as_me: failed program was:" >&5
13469 cat conftest.$ac_ext >&5
13470 ac_cv_type_signal=int
13472 rm -f conftest.$ac_objext conftest.$ac_ext
13474 echo "$as_me:13474: result: $ac_cv_type_signal" >&5
13475 echo "${ECHO_T}$ac_cv_type_signal" >&6
13477 cat >>confdefs.h <<EOF
13478 #define RETSIGTYPE $ac_cv_type_signal
13481 echo "$as_me:13481: checking for ANSI C header files" >&5
13482 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
13483 if test "${ac_cv_header_stdc+set}" = set; then
13484 echo $ECHO_N "(cached) $ECHO_C" >&6
13486 cat >conftest.$ac_ext <<_ACEOF
13487 #line 13487 "configure"
13488 #include "confdefs.h"
13489 #include <stdlib.h>
13490 #include <stdarg.h>
13491 #include <string.h>
13495 if { (eval echo "$as_me:13495: \"$ac_cpp conftest.$ac_ext\"") >&5
13496 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13498 egrep -v '^ *\+' conftest.er1 >conftest.err
13500 cat conftest.err >&5
13501 echo "$as_me:13501: \$? = $ac_status" >&5
13502 (exit $ac_status); } >/dev/null; then
13503 if test -s conftest.err; then
13504 ac_cpp_err=$ac_c_preproc_warn_flag
13511 if test -z "$ac_cpp_err"; then
13512 ac_cv_header_stdc=yes
13514 echo "$as_me: failed program was:" >&5
13515 cat conftest.$ac_ext >&5
13516 ac_cv_header_stdc=no
13518 rm -f conftest.err conftest.$ac_ext
13520 if test $ac_cv_header_stdc = yes; then
13521 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
13522 cat >conftest.$ac_ext <<_ACEOF
13523 #line 13523 "configure"
13524 #include "confdefs.h"
13525 #include <string.h>
13528 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13529 egrep "memchr" >/dev/null 2>&1; then
13532 ac_cv_header_stdc=no
13538 if test $ac_cv_header_stdc = yes; then
13539 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
13540 cat >conftest.$ac_ext <<_ACEOF
13541 #line 13541 "configure"
13542 #include "confdefs.h"
13543 #include <stdlib.h>
13546 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13547 egrep "free" >/dev/null 2>&1; then
13550 ac_cv_header_stdc=no
13556 if test $ac_cv_header_stdc = yes; then
13557 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
13558 if test "$cross_compiling" = yes; then
13561 cat >conftest.$ac_ext <<_ACEOF
13562 #line 13562 "configure"
13563 #include "confdefs.h"
13565 #if ((' ' & 0x0FF) == 0x020)
13566 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
13567 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
13569 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
13570 || ('j' <= (c) && (c) <= 'r') \
13571 || ('s' <= (c) && (c) <= 'z'))
13572 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
13575 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
13580 for (i = 0; i < 256; i++)
13581 if (XOR (islower (i), ISLOWER (i))
13582 || toupper (i) != TOUPPER (i))
13583 $ac_main_return(2);
13584 $ac_main_return (0);
13587 rm -f conftest$ac_exeext
13588 if { (eval echo "$as_me:13588: \"$ac_link\"") >&5
13589 (eval $ac_link) 2>&5
13591 echo "$as_me:13591: \$? = $ac_status" >&5
13592 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13593 { (eval echo "$as_me:13593: \"$ac_try\"") >&5
13594 (eval $ac_try) 2>&5
13596 echo "$as_me:13596: \$? = $ac_status" >&5
13597 (exit $ac_status); }; }; then
13600 echo "$as_me: program exited with status $ac_status" >&5
13601 echo "$as_me: failed program was:" >&5
13602 cat conftest.$ac_ext >&5
13603 ac_cv_header_stdc=no
13605 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13609 echo "$as_me:13609: result: $ac_cv_header_stdc" >&5
13610 echo "${ECHO_T}$ac_cv_header_stdc" >&6
13611 if test $ac_cv_header_stdc = yes; then
13613 cat >>confdefs.h <<\EOF
13614 #define STDC_HEADERS 1
13619 echo "$as_me:13619: checking whether time.h and sys/time.h may both be included" >&5
13620 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13621 if test "${ac_cv_header_time+set}" = set; then
13622 echo $ECHO_N "(cached) $ECHO_C" >&6
13624 cat >conftest.$ac_ext <<_ACEOF
13625 #line 13625 "configure"
13626 #include "confdefs.h"
13627 #include <sys/types.h>
13628 #include <sys/time.h>
13634 if ((struct tm *) 0)
13640 rm -f conftest.$ac_objext
13641 if { (eval echo "$as_me:13641: \"$ac_compile\"") >&5
13642 (eval $ac_compile) 2>&5
13644 echo "$as_me:13644: \$? = $ac_status" >&5
13645 (exit $ac_status); } &&
13646 { ac_try='test -s conftest.$ac_objext'
13647 { (eval echo "$as_me:13647: \"$ac_try\"") >&5
13648 (eval $ac_try) 2>&5
13650 echo "$as_me:13650: \$? = $ac_status" >&5
13651 (exit $ac_status); }; }; then
13652 ac_cv_header_time=yes
13654 echo "$as_me: failed program was:" >&5
13655 cat conftest.$ac_ext >&5
13656 ac_cv_header_time=no
13658 rm -f conftest.$ac_objext conftest.$ac_ext
13660 echo "$as_me:13660: result: $ac_cv_header_time" >&5
13661 echo "${ECHO_T}$ac_cv_header_time" >&6
13662 if test $ac_cv_header_time = yes; then
13664 cat >>confdefs.h <<\EOF
13665 #define TIME_WITH_SYS_TIME 1
13682 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13683 echo "$as_me:13683: checking for $ac_header" >&5
13684 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13685 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13686 echo $ECHO_N "(cached) $ECHO_C" >&6
13688 cat >conftest.$ac_ext <<_ACEOF
13689 #line 13689 "configure"
13690 #include "confdefs.h"
13691 #include <$ac_header>
13693 if { (eval echo "$as_me:13693: \"$ac_cpp conftest.$ac_ext\"") >&5
13694 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13696 egrep -v '^ *\+' conftest.er1 >conftest.err
13698 cat conftest.err >&5
13699 echo "$as_me:13699: \$? = $ac_status" >&5
13700 (exit $ac_status); } >/dev/null; then
13701 if test -s conftest.err; then
13702 ac_cpp_err=$ac_c_preproc_warn_flag
13709 if test -z "$ac_cpp_err"; then
13710 eval "$as_ac_Header=yes"
13712 echo "$as_me: failed program was:" >&5
13713 cat conftest.$ac_ext >&5
13714 eval "$as_ac_Header=no"
13716 rm -f conftest.err conftest.$ac_ext
13718 echo "$as_me:13718: result: `eval echo '${'$as_ac_Header'}'`" >&5
13719 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13720 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13721 cat >>confdefs.h <<EOF
13722 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13728 for ac_header in unistd.h getopt.h
13730 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13731 echo "$as_me:13731: checking for $ac_header" >&5
13732 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13733 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13734 echo $ECHO_N "(cached) $ECHO_C" >&6
13736 cat >conftest.$ac_ext <<_ACEOF
13737 #line 13737 "configure"
13738 #include "confdefs.h"
13739 #include <$ac_header>
13741 if { (eval echo "$as_me:13741: \"$ac_cpp conftest.$ac_ext\"") >&5
13742 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13744 egrep -v '^ *\+' conftest.er1 >conftest.err
13746 cat conftest.err >&5
13747 echo "$as_me:13747: \$? = $ac_status" >&5
13748 (exit $ac_status); } >/dev/null; then
13749 if test -s conftest.err; then
13750 ac_cpp_err=$ac_c_preproc_warn_flag
13757 if test -z "$ac_cpp_err"; then
13758 eval "$as_ac_Header=yes"
13760 echo "$as_me: failed program was:" >&5
13761 cat conftest.$ac_ext >&5
13762 eval "$as_ac_Header=no"
13764 rm -f conftest.err conftest.$ac_ext
13766 echo "$as_me:13766: result: `eval echo '${'$as_ac_Header'}'`" >&5
13767 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13768 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13769 cat >>confdefs.h <<EOF
13770 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13776 echo "$as_me:13776: checking for header declaring getopt variables" >&5
13777 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
13778 if test "${cf_cv_getopt_header+set}" = set; then
13779 echo $ECHO_N "(cached) $ECHO_C" >&6
13782 cf_cv_getopt_header=none
13783 for cf_header in stdio.h stdlib.h unistd.h getopt.h
13785 cat >conftest.$ac_ext <<_ACEOF
13786 #line 13786 "configure"
13787 #include "confdefs.h"
13789 #include <$cf_header>
13793 int x = optind; char *y = optarg
13798 rm -f conftest.$ac_objext
13799 if { (eval echo "$as_me:13799: \"$ac_compile\"") >&5
13800 (eval $ac_compile) 2>&5
13802 echo "$as_me:13802: \$? = $ac_status" >&5
13803 (exit $ac_status); } &&
13804 { ac_try='test -s conftest.$ac_objext'
13805 { (eval echo "$as_me:13805: \"$ac_try\"") >&5
13806 (eval $ac_try) 2>&5
13808 echo "$as_me:13808: \$? = $ac_status" >&5
13809 (exit $ac_status); }; }; then
13810 cf_cv_getopt_header=$cf_header
13813 echo "$as_me: failed program was:" >&5
13814 cat conftest.$ac_ext >&5
13816 rm -f conftest.$ac_objext conftest.$ac_ext
13820 echo "$as_me:13820: result: $cf_cv_getopt_header" >&5
13821 echo "${ECHO_T}$cf_cv_getopt_header" >&6
13822 if test $cf_cv_getopt_header != none ; then
13823 cat >>confdefs.h <<\EOF
13824 #define HAVE_GETOPT_HEADER 1
13834 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13835 echo "$as_me:13835: checking for $ac_func" >&5
13836 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13837 if eval "test \"\${$as_ac_var+set}\" = set"; then
13838 echo $ECHO_N "(cached) $ECHO_C" >&6
13840 cat >conftest.$ac_ext <<_ACEOF
13841 #line 13841 "configure"
13842 #include "confdefs.h"
13843 /* System header to define __stub macros and hopefully few prototypes,
13844 which can conflict with char $ac_func (); below. */
13845 #include <assert.h>
13846 /* Override any gcc2 internal prototype to avoid an error. */
13850 /* We use char because int might match the return type of a gcc2
13851 builtin and then its argument prototype would still apply. */
13858 /* The GNU C library defines this for functions which it implements
13859 to always fail with ENOSYS. Some functions are actually named
13860 something starting with __ and the normal name is an alias. */
13861 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13864 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13871 rm -f conftest.$ac_objext conftest$ac_exeext
13872 if { (eval echo "$as_me:13872: \"$ac_link\"") >&5
13873 (eval $ac_link) 2>&5
13875 echo "$as_me:13875: \$? = $ac_status" >&5
13876 (exit $ac_status); } &&
13877 { ac_try='test -s conftest$ac_exeext'
13878 { (eval echo "$as_me:13878: \"$ac_try\"") >&5
13879 (eval $ac_try) 2>&5
13881 echo "$as_me:13881: \$? = $ac_status" >&5
13882 (exit $ac_status); }; }; then
13883 eval "$as_ac_var=yes"
13885 echo "$as_me: failed program was:" >&5
13886 cat conftest.$ac_ext >&5
13887 eval "$as_ac_var=no"
13889 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13891 echo "$as_me:13891: result: `eval echo '${'$as_ac_var'}'`" >&5
13892 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13893 if test `eval echo '${'$as_ac_var'}'` = yes; then
13894 cat >>confdefs.h <<EOF
13895 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13901 if test "$cf_enable_widec" = yes; then
13914 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13915 echo "$as_me:13915: checking for $ac_func" >&5
13916 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13917 if eval "test \"\${$as_ac_var+set}\" = set"; then
13918 echo $ECHO_N "(cached) $ECHO_C" >&6
13920 cat >conftest.$ac_ext <<_ACEOF
13921 #line 13921 "configure"
13922 #include "confdefs.h"
13923 /* System header to define __stub macros and hopefully few prototypes,
13924 which can conflict with char $ac_func (); below. */
13925 #include <assert.h>
13926 /* Override any gcc2 internal prototype to avoid an error. */
13930 /* We use char because int might match the return type of a gcc2
13931 builtin and then its argument prototype would still apply. */
13938 /* The GNU C library defines this for functions which it implements
13939 to always fail with ENOSYS. Some functions are actually named
13940 something starting with __ and the normal name is an alias. */
13941 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13944 f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13951 rm -f conftest.$ac_objext conftest$ac_exeext
13952 if { (eval echo "$as_me:13952: \"$ac_link\"") >&5
13953 (eval $ac_link) 2>&5
13955 echo "$as_me:13955: \$? = $ac_status" >&5
13956 (exit $ac_status); } &&
13957 { ac_try='test -s conftest$ac_exeext'
13958 { (eval echo "$as_me:13958: \"$ac_try\"") >&5
13959 (eval $ac_try) 2>&5
13961 echo "$as_me:13961: \$? = $ac_status" >&5
13962 (exit $ac_status); }; }; then
13963 eval "$as_ac_var=yes"
13965 echo "$as_me: failed program was:" >&5
13966 cat conftest.$ac_ext >&5
13967 eval "$as_ac_var=no"
13969 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13971 echo "$as_me:13971: result: `eval echo '${'$as_ac_var'}'`" >&5
13972 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13973 if test `eval echo '${'$as_ac_var'}'` = yes; then
13974 cat >>confdefs.h <<EOF
13975 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13983 echo "$as_me:13983: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
13984 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
13985 if test "${cf_cv_need_xopen_extension+set}" = set; then
13986 echo $ECHO_N "(cached) $ECHO_C" >&6
13989 cat >conftest.$ac_ext <<_ACEOF
13990 #line 13990 "configure"
13991 #include "confdefs.h"
13993 #include <stdlib.h>
13994 #include <${cf_cv_ncurses_header:-curses.h}>
13999 #if defined(NCURSES_VERSION_PATCH)
14000 #if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
14004 long x = winnstr(stdscr, "", 0);
14006 getbegyx(stdscr, y1, x1)
14011 rm -f conftest.$ac_objext conftest$ac_exeext
14012 if { (eval echo "$as_me:14012: \"$ac_link\"") >&5
14013 (eval $ac_link) 2>&5
14015 echo "$as_me:14015: \$? = $ac_status" >&5
14016 (exit $ac_status); } &&
14017 { ac_try='test -s conftest$ac_exeext'
14018 { (eval echo "$as_me:14018: \"$ac_try\"") >&5
14019 (eval $ac_try) 2>&5
14021 echo "$as_me:14021: \$? = $ac_status" >&5
14022 (exit $ac_status); }; }; then
14023 cf_cv_need_xopen_extension=no
14025 echo "$as_me: failed program was:" >&5
14026 cat conftest.$ac_ext >&5
14027 cat >conftest.$ac_ext <<_ACEOF
14028 #line 14028 "configure"
14029 #include "confdefs.h"
14031 #define _XOPEN_SOURCE_EXTENDED
14032 #include <stdlib.h>
14033 #include <${cf_cv_ncurses_header:-curses.h}>
14038 #ifdef NCURSES_VERSION
14040 int check2 = curs_set((int)sizeof(check));
14042 long x = winnstr(stdscr, "", 0);
14044 getbegyx(stdscr, y1, x1)
14049 rm -f conftest.$ac_objext conftest$ac_exeext
14050 if { (eval echo "$as_me:14050: \"$ac_link\"") >&5
14051 (eval $ac_link) 2>&5
14053 echo "$as_me:14053: \$? = $ac_status" >&5
14054 (exit $ac_status); } &&
14055 { ac_try='test -s conftest$ac_exeext'
14056 { (eval echo "$as_me:14056: \"$ac_try\"") >&5
14057 (eval $ac_try) 2>&5
14059 echo "$as_me:14059: \$? = $ac_status" >&5
14060 (exit $ac_status); }; }; then
14061 cf_cv_need_xopen_extension=yes
14063 echo "$as_me: failed program was:" >&5
14064 cat conftest.$ac_ext >&5
14065 cf_cv_need_xopen_extension=unknown
14067 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14069 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14071 echo "$as_me:14071: result: $cf_cv_need_xopen_extension" >&5
14072 echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
14073 test $cf_cv_need_xopen_extension = yes && CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
14075 echo "$as_me:14075: checking for term.h" >&5
14076 echo $ECHO_N "checking for term.h... $ECHO_C" >&6
14077 if test "${cf_cv_term_header+set}" = set; then
14078 echo $ECHO_N "(cached) $ECHO_C" >&6
14081 # If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
14082 # for <term.h> if we do not find the variant.
14084 cf_header_list="term.h ncurses/term.h ncursesw/term.h"
14086 case ${cf_cv_ncurses_header:-curses.h} in #(vi
14088 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
14089 cf_header_list="$cf_header_item $cf_header_list"
14093 for cf_header in $cf_header_list
14095 cat >conftest.$ac_ext <<_ACEOF
14096 #line 14096 "configure"
14097 #include "confdefs.h"
14099 #include <${cf_cv_ncurses_header:-curses.h}>
14100 #include <${cf_header}>
14109 rm -f conftest.$ac_objext
14110 if { (eval echo "$as_me:14110: \"$ac_compile\"") >&5
14111 (eval $ac_compile) 2>&5
14113 echo "$as_me:14113: \$? = $ac_status" >&5
14114 (exit $ac_status); } &&
14115 { ac_try='test -s conftest.$ac_objext'
14116 { (eval echo "$as_me:14116: \"$ac_try\"") >&5
14117 (eval $ac_try) 2>&5
14119 echo "$as_me:14119: \$? = $ac_status" >&5
14120 (exit $ac_status); }; }; then
14121 cf_cv_term_header=$cf_header
14124 echo "$as_me: failed program was:" >&5
14125 cat conftest.$ac_ext >&5
14126 cf_cv_term_header=no
14128 rm -f conftest.$ac_objext conftest.$ac_ext
14131 case $cf_cv_term_header in #(vi
14133 # If curses is ncurses, some packagers still mess it up by trying to make
14134 # us use GNU termcap. This handles the most common case.
14135 for cf_header in ncurses/term.h ncursesw/term.h
14137 cat >conftest.$ac_ext <<_ACEOF
14138 #line 14138 "configure"
14139 #include "confdefs.h"
14141 #include <${cf_cv_ncurses_header:-curses.h}>
14142 #ifdef NCURSES_VERSION
14143 #include <${cf_header}>
14155 rm -f conftest.$ac_objext
14156 if { (eval echo "$as_me:14156: \"$ac_compile\"") >&5
14157 (eval $ac_compile) 2>&5
14159 echo "$as_me:14159: \$? = $ac_status" >&5
14160 (exit $ac_status); } &&
14161 { ac_try='test -s conftest.$ac_objext'
14162 { (eval echo "$as_me:14162: \"$ac_try\"") >&5
14163 (eval $ac_try) 2>&5
14165 echo "$as_me:14165: \$? = $ac_status" >&5
14166 (exit $ac_status); }; }; then
14167 cf_cv_term_header=$cf_header
14170 echo "$as_me: failed program was:" >&5
14171 cat conftest.$ac_ext >&5
14172 cf_cv_term_header=no
14174 rm -f conftest.$ac_objext conftest.$ac_ext
14180 echo "$as_me:14180: result: $cf_cv_term_header" >&5
14181 echo "${ECHO_T}$cf_cv_term_header" >&6
14183 case $cf_cv_term_header in #(vi
14185 cat >>confdefs.h <<\EOF
14186 #define HAVE_TERM_H 1
14190 ncurses/term.h) #(vi
14191 cat >>confdefs.h <<\EOF
14192 #define HAVE_NCURSES_TERM_H 1
14197 cat >>confdefs.h <<\EOF
14198 #define HAVE_NCURSESW_TERM_H 1
14204 echo "$as_me:14204: checking for unctrl.h" >&5
14205 echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
14206 if test "${cf_cv_unctrl_header+set}" = set; then
14207 echo $ECHO_N "(cached) $ECHO_C" >&6
14210 # If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
14211 # for <unctrl.h> if we do not find the variant.
14213 cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
14215 case ${cf_cv_ncurses_header:-curses.h} in #(vi
14217 cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
14218 cf_header_list="$cf_header_item $cf_header_list"
14222 for cf_header in $cf_header_list
14224 cat >conftest.$ac_ext <<_ACEOF
14225 #line 14225 "configure"
14226 #include "confdefs.h"
14228 #include <${cf_cv_ncurses_header:-curses.h}>
14229 #include <${cf_header}>
14238 rm -f conftest.$ac_objext
14239 if { (eval echo "$as_me:14239: \"$ac_compile\"") >&5
14240 (eval $ac_compile) 2>&5
14242 echo "$as_me:14242: \$? = $ac_status" >&5
14243 (exit $ac_status); } &&
14244 { ac_try='test -s conftest.$ac_objext'
14245 { (eval echo "$as_me:14245: \"$ac_try\"") >&5
14246 (eval $ac_try) 2>&5
14248 echo "$as_me:14248: \$? = $ac_status" >&5
14249 (exit $ac_status); }; }; then
14250 cf_cv_unctrl_header=$cf_header
14253 echo "$as_me: failed program was:" >&5
14254 cat conftest.$ac_ext >&5
14255 cf_cv_unctrl_header=no
14257 rm -f conftest.$ac_objext conftest.$ac_ext
14260 case $cf_cv_unctrl_header in #(vi
14262 { echo "$as_me:14262: WARNING: unctrl.h header not found" >&5
14263 echo "$as_me: WARNING: unctrl.h header not found" >&2;}
14268 echo "$as_me:14268: result: $cf_cv_unctrl_header" >&5
14269 echo "${ECHO_T}$cf_cv_unctrl_header" >&6
14271 case $cf_cv_unctrl_header in #(vi
14273 cat >>confdefs.h <<\EOF
14274 #define HAVE_UNCTRL_H 1
14278 ncurses/unctrl.h) #(vi
14279 cat >>confdefs.h <<\EOF
14280 #define HAVE_NCURSES_UNCTRL_H 1
14285 cat >>confdefs.h <<\EOF
14286 #define HAVE_NCURSESW_UNCTRL_H 1
14293 assume_default_colors \
14319 use_default_colors \
14331 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14333 echo "$as_me:14333: checking for ${cf_func}" >&5
14334 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14336 echo "${as_me:-configure}:14336: testing ${cf_func} ..." 1>&5
14338 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14339 echo $ECHO_N "(cached) $ECHO_C" >&6
14342 eval cf_result='$ac_cv_func_'$cf_func
14343 if test ".$cf_result" != ".no"; then
14344 cat >conftest.$ac_ext <<_ACEOF
14345 #line 14345 "configure"
14346 #include "confdefs.h"
14348 #ifdef HAVE_XCURSES
14349 #include <xcurses.h>
14350 char * XCursesProgramName = "test";
14352 #include <${cf_cv_ncurses_header:-curses.h}>
14353 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14354 #include <ncursesw/term.h>
14355 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14356 #include <ncurses/term.h>
14357 #elif defined(HAVE_TERM_H)
14367 long foo = (long)(&${cf_func});
14368 if (foo + 1234 > 5678)
14369 ${cf_cv_main_return:-return}(foo);
14376 rm -f conftest.$ac_objext conftest$ac_exeext
14377 if { (eval echo "$as_me:14377: \"$ac_link\"") >&5
14378 (eval $ac_link) 2>&5
14380 echo "$as_me:14380: \$? = $ac_status" >&5
14381 (exit $ac_status); } &&
14382 { ac_try='test -s conftest$ac_exeext'
14383 { (eval echo "$as_me:14383: \"$ac_try\"") >&5
14384 (eval $ac_try) 2>&5
14386 echo "$as_me:14386: \$? = $ac_status" >&5
14387 (exit $ac_status); }; }; then
14390 echo "$as_me: failed program was:" >&5
14391 cat conftest.$ac_ext >&5
14394 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14396 eval 'cf_cv_func_'$cf_func'=$cf_result'
14400 # use the computed/retrieved cache-value:
14401 eval 'cf_result=$cf_cv_func_'$cf_func
14402 echo "$as_me:14402: result: $cf_result" >&5
14403 echo "${ECHO_T}$cf_result" >&6
14404 if test $cf_result != no; then
14405 cat >>confdefs.h <<EOF
14406 #define HAVE_${cf_tr_func} 1
14412 for cf_func in tputs
14415 cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14417 echo "$as_me:14417: checking for ${cf_func}" >&5
14418 echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
14420 echo "${as_me:-configure}:14420: testing ${cf_func} ..." 1>&5
14422 if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
14423 echo $ECHO_N "(cached) $ECHO_C" >&6
14426 eval cf_result='$ac_cv_func_'$cf_func
14427 if test ".$cf_result" != ".no"; then
14428 cat >conftest.$ac_ext <<_ACEOF
14429 #line 14429 "configure"
14430 #include "confdefs.h"
14432 #ifdef HAVE_XCURSES
14433 #include <xcurses.h>
14434 char * XCursesProgramName = "test";
14436 #include <${cf_cv_ncurses_header:-curses.h}>
14437 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
14438 #include <ncursesw/term.h>
14439 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
14440 #include <ncurses/term.h>
14441 #elif defined(HAVE_TERM_H)
14451 long foo = (long)(&${cf_func});
14452 if (foo + 1234 > 5678)
14453 ${cf_cv_main_return:-return}(foo);
14460 rm -f conftest.$ac_objext conftest$ac_exeext
14461 if { (eval echo "$as_me:14461: \"$ac_link\"") >&5
14462 (eval $ac_link) 2>&5
14464 echo "$as_me:14464: \$? = $ac_status" >&5
14465 (exit $ac_status); } &&
14466 { ac_try='test -s conftest$ac_exeext'
14467 { (eval echo "$as_me:14467: \"$ac_try\"") >&5
14468 (eval $ac_try) 2>&5
14470 echo "$as_me:14470: \$? = $ac_status" >&5
14471 (exit $ac_status); }; }; then
14474 echo "$as_me: failed program was:" >&5
14475 cat conftest.$ac_ext >&5
14478 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14480 eval 'cf_cv_func_'$cf_func'=$cf_result'
14484 # use the computed/retrieved cache-value:
14485 eval 'cf_result=$cf_cv_func_'$cf_func
14486 echo "$as_me:14486: result: $cf_result" >&5
14487 echo "${ECHO_T}$cf_result" >&6
14488 if test $cf_result != no; then
14489 cat >>confdefs.h <<EOF
14490 #define HAVE_${cf_tr_func} 1
14496 if test x$cf_cv_func_tputs = xyes
14499 for cf_arg in int char
14501 for cf_ret in int void
14503 if test $cf_ret = void
14505 cf_return="/* nothing */"
14507 cf_return="return value"
14509 cat >conftest.$ac_ext <<_ACEOF
14510 #line 14510 "configure"
14511 #include "confdefs.h"
14513 #include <${cf_cv_ncurses_header:-curses.h}>
14514 #include <$cf_cv_term_header>
14516 static $cf_ret outc($cf_arg value) { $cf_return; }
14522 tputs("hello", 0, outc);
14523 ${cf_cv_main_return:-return}(0);
14529 rm -f conftest.$ac_objext
14530 if { (eval echo "$as_me:14530: \"$ac_compile\"") >&5
14531 (eval $ac_compile) 2>&5
14533 echo "$as_me:14533: \$? = $ac_status" >&5
14534 (exit $ac_status); } &&
14535 { ac_try='test -s conftest.$ac_objext'
14536 { (eval echo "$as_me:14536: \"$ac_try\"") >&5
14537 (eval $ac_try) 2>&5
14539 echo "$as_me:14539: \$? = $ac_status" >&5
14540 (exit $ac_status); }; }; then
14542 test -n "$verbose" && echo " prototype $cf_ret func($cf_arg value)" 1>&6
14544 echo "${as_me:-configure}:14544: testing prototype $cf_ret func($cf_arg value) ..." 1>&5
14546 cat >>confdefs.h <<EOF
14547 #define TPUTS_ARG $cf_arg
14548 #define TPUTS_PROTO(func,value) $cf_ret func(TPUTS_ARG value)
14549 #define TPUTS_RETURN(value) $cf_return
14555 echo "$as_me: failed program was:" >&5
14556 cat conftest.$ac_ext >&5
14558 rm -f conftest.$ac_objext conftest.$ac_ext
14560 test $cf_done = yes && break
14564 echo "$as_me:14564: checking for ncurses extended functions" >&5
14565 echo $ECHO_N "checking for ncurses extended functions... $ECHO_C" >&6
14566 if test "${cf_cv_ncurses_ext_funcs+set}" = set; then
14567 echo $ECHO_N "(cached) $ECHO_C" >&6
14570 cat >conftest.$ac_ext <<_ACEOF
14571 #line 14571 "configure"
14572 #include "confdefs.h"
14574 #include <${cf_cv_ncurses_header:-curses.h}>
14579 int x = NCURSES_EXT_FUNCS
14585 rm -f conftest.$ac_objext
14586 if { (eval echo "$as_me:14586: \"$ac_compile\"") >&5
14587 (eval $ac_compile) 2>&5
14589 echo "$as_me:14589: \$? = $ac_status" >&5
14590 (exit $ac_status); } &&
14591 { ac_try='test -s conftest.$ac_objext'
14592 { (eval echo "$as_me:14592: \"$ac_try\"") >&5
14593 (eval $ac_try) 2>&5
14595 echo "$as_me:14595: \$? = $ac_status" >&5
14596 (exit $ac_status); }; }; then
14597 cf_cv_ncurses_ext_funcs=defined
14599 echo "$as_me: failed program was:" >&5
14600 cat conftest.$ac_ext >&5
14602 cat >conftest.$ac_ext <<_ACEOF
14603 #line 14603 "configure"
14604 #include "confdefs.h"
14606 #include <${cf_cv_ncurses_header:-curses.h}>
14611 (void) assume_default_colors (0, 0);
14612 (void) curses_version ();
14613 (void) define_key (0, 0);
14614 (void) is_term_resized (0, 0);
14615 (void) key_defined (0);
14616 (void) keybound (0, 0);
14617 (void) keyok (0, 0);
14618 (void) resize_term (0, 0);
14619 (void) resizeterm (0, 0);
14620 (void) use_default_colors ();
14621 (void) use_extended_names (0);
14622 (void) wresize (0, 0, 0);
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_ncurses_ext_funcs=yes
14641 echo "$as_me: failed program was:" >&5
14642 cat conftest.$ac_ext >&5
14643 cf_cv_ncurses_ext_funcs=no
14645 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14648 rm -f conftest.$ac_objext conftest.$ac_ext
14651 echo "$as_me:14651: result: $cf_cv_ncurses_ext_funcs" >&5
14652 echo "${ECHO_T}$cf_cv_ncurses_ext_funcs" >&6
14653 test "$cf_cv_ncurses_ext_funcs" = yes && cat >>confdefs.h <<\EOF
14654 #define NCURSES_EXT_FUNCS 1
14657 if test "$cf_enable_widec" = yes
14659 # workaround for systems with ncurses before 20111029, due to change of
14660 # feature test macro from _XPG5 to _XOPEN_SOURCE
14661 if test -n "$cf_cv_ncurses_version" && test "x$cf_cv_ncurses_version" != xno
14664 echo "$as_me:14664: checking if _XPG5 should be defined to enable wide-characters" >&5
14665 echo $ECHO_N "checking if _XPG5 should be defined to enable wide-characters... $ECHO_C" >&6
14667 cat >conftest.$ac_ext <<_ACEOF
14668 #line 14668 "configure"
14669 #include "confdefs.h"
14671 #include <${cf_cv_ncurses_header:-curses.h}>
14680 rm -f conftest.$ac_objext
14681 if { (eval echo "$as_me:14681: \"$ac_compile\"") >&5
14682 (eval $ac_compile) 2>&5
14684 echo "$as_me:14684: \$? = $ac_status" >&5
14685 (exit $ac_status); } &&
14686 { ac_try='test -s conftest.$ac_objext'
14687 { (eval echo "$as_me:14687: \"$ac_try\"") >&5
14688 (eval $ac_try) 2>&5
14690 echo "$as_me:14690: \$? = $ac_status" >&5
14691 (exit $ac_status); }; }; then
14694 echo "$as_me: failed program was:" >&5
14695 cat conftest.$ac_ext >&5
14696 cf_save_cppflags="$CPPFLAGS"
14697 CPPFLAGS="$CPPFLAGS -D_XPG5"
14698 cat >conftest.$ac_ext <<_ACEOF
14699 #line 14699 "configure"
14700 #include "confdefs.h"
14702 #include <${cf_cv_ncurses_header:-curses.h}>
14711 rm -f conftest.$ac_objext
14712 if { (eval echo "$as_me:14712: \"$ac_compile\"") >&5
14713 (eval $ac_compile) 2>&5
14715 echo "$as_me:14715: \$? = $ac_status" >&5
14716 (exit $ac_status); } &&
14717 { ac_try='test -s conftest.$ac_objext'
14718 { (eval echo "$as_me:14718: \"$ac_try\"") >&5
14719 (eval $ac_try) 2>&5
14721 echo "$as_me:14721: \$? = $ac_status" >&5
14722 (exit $ac_status); }; }; then
14725 echo "$as_me: failed program was:" >&5
14726 cat conftest.$ac_ext >&5
14728 rm -f conftest.$ac_objext conftest.$ac_ext
14729 CPPFLAGS="$cf_save_cppflags"
14731 rm -f conftest.$ac_objext conftest.$ac_ext
14732 echo "$as_me:14732: result: $cf_define_xpg5" >&5
14733 echo "${ECHO_T}$cf_define_xpg5" >&6
14735 if test "$cf_define_xpg5" = yes
14737 CPPFLAGS="$CPPFLAGS -D_XPG5"
14741 echo "$as_me:14741: checking for wide-character functions" >&5
14742 echo $ECHO_N "checking for wide-character functions... $ECHO_C" >&6
14743 if test "${cf_cv_widechar_funcs+set}" = set; then
14744 echo $ECHO_N "(cached) $ECHO_C" >&6
14747 cat >conftest.$ac_ext <<_ACEOF
14748 #line 14748 "configure"
14749 #include "confdefs.h"
14751 #include <${cf_cv_ncurses_header:-curses.h}>
14756 static wchar_t src_wchar[2];
14757 static cchar_t dst_cchar;
14758 setcchar(&dst_cchar, src_wchar, A_NORMAL, 0, (void *) 0);
14764 rm -f conftest.$ac_objext conftest$ac_exeext
14765 if { (eval echo "$as_me:14765: \"$ac_link\"") >&5
14766 (eval $ac_link) 2>&5
14768 echo "$as_me:14768: \$? = $ac_status" >&5
14769 (exit $ac_status); } &&
14770 { ac_try='test -s conftest$ac_exeext'
14771 { (eval echo "$as_me:14771: \"$ac_try\"") >&5
14772 (eval $ac_try) 2>&5
14774 echo "$as_me:14774: \$? = $ac_status" >&5
14775 (exit $ac_status); }; }; then
14776 cf_cv_widechar_funcs=yes
14778 echo "$as_me: failed program was:" >&5
14779 cat conftest.$ac_ext >&5
14780 cf_cv_widechar_funcs=no
14782 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14785 echo "$as_me:14785: result: $cf_cv_widechar_funcs" >&5
14786 echo "${ECHO_T}$cf_cv_widechar_funcs" >&6
14787 if test "$cf_cv_widechar_funcs" != no ; then
14788 cat >>confdefs.h <<\EOF
14789 #define USE_WIDEC_SUPPORT 1
14793 cat >>confdefs.h <<\EOF
14794 #define USE_WIDEC_SUPPORT 0
14799 cat >>confdefs.h <<\EOF
14800 #define USE_WIDEC_SUPPORT 0
14805 echo "$as_me:14805: checking if sys/time.h works with sys/select.h" >&5
14806 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
14807 if test "${cf_cv_sys_time_select+set}" = set; then
14808 echo $ECHO_N "(cached) $ECHO_C" >&6
14811 cat >conftest.$ac_ext <<_ACEOF
14812 #line 14812 "configure"
14813 #include "confdefs.h"
14815 #include <sys/types.h>
14816 #ifdef HAVE_SYS_TIME_H
14817 #include <sys/time.h>
14819 #ifdef HAVE_SYS_SELECT_H
14820 #include <sys/select.h>
14831 rm -f conftest.$ac_objext
14832 if { (eval echo "$as_me:14832: \"$ac_compile\"") >&5
14833 (eval $ac_compile) 2>&5
14835 echo "$as_me:14835: \$? = $ac_status" >&5
14836 (exit $ac_status); } &&
14837 { ac_try='test -s conftest.$ac_objext'
14838 { (eval echo "$as_me:14838: \"$ac_try\"") >&5
14839 (eval $ac_try) 2>&5
14841 echo "$as_me:14841: \$? = $ac_status" >&5
14842 (exit $ac_status); }; }; then
14843 cf_cv_sys_time_select=yes
14845 echo "$as_me: failed program was:" >&5
14846 cat conftest.$ac_ext >&5
14847 cf_cv_sys_time_select=no
14849 rm -f conftest.$ac_objext conftest.$ac_ext
14853 echo "$as_me:14853: result: $cf_cv_sys_time_select" >&5
14854 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
14855 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
14856 #define HAVE_SYS_TIME_SELECT 1
14859 echo "$as_me:14859: checking for function curses_version" >&5
14860 echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
14861 if test "${cf_cv_func_curses_version+set}" = set; then
14862 echo $ECHO_N "(cached) $ECHO_C" >&6
14865 if test "$cross_compiling" = yes; then
14866 cf_cv_func_curses_version=unknown
14868 cat >conftest.$ac_ext <<_ACEOF
14869 #line 14869 "configure"
14870 #include "confdefs.h"
14872 #include <${cf_cv_ncurses_header:-curses.h}>
14876 sprintf(temp, "%s\n", curses_version());
14877 ${cf_cv_main_return:-return}(0);
14881 rm -f conftest$ac_exeext
14882 if { (eval echo "$as_me:14882: \"$ac_link\"") >&5
14883 (eval $ac_link) 2>&5
14885 echo "$as_me:14885: \$? = $ac_status" >&5
14886 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14887 { (eval echo "$as_me:14887: \"$ac_try\"") >&5
14888 (eval $ac_try) 2>&5
14890 echo "$as_me:14890: \$? = $ac_status" >&5
14891 (exit $ac_status); }; }; then
14892 cf_cv_func_curses_version=yes
14895 echo "$as_me: program exited with status $ac_status" >&5
14896 echo "$as_me: failed program was:" >&5
14897 cat conftest.$ac_ext >&5
14898 cf_cv_func_curses_version=no
14901 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14905 echo "$as_me:14905: result: $cf_cv_func_curses_version" >&5
14906 echo "${ECHO_T}$cf_cv_func_curses_version" >&6
14907 test "$cf_cv_func_curses_version" = yes && cat >>confdefs.h <<\EOF
14908 #define HAVE_CURSES_VERSION 1
14911 echo "$as_me:14911: checking for ncurses wrap-prefix" >&5
14912 echo $ECHO_N "checking for ncurses wrap-prefix... $ECHO_C" >&6
14914 # Check whether --with-ncurses-wrap-prefix or --without-ncurses-wrap-prefix was given.
14915 if test "${with_ncurses_wrap_prefix+set}" = set; then
14916 withval="$with_ncurses_wrap_prefix"
14917 NCURSES_WRAP_PREFIX=$withval
14919 NCURSES_WRAP_PREFIX=_nc_
14921 echo "$as_me:14921: result: $NCURSES_WRAP_PREFIX" >&5
14922 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
14924 echo "$as_me:14924: checking for alternate character set array" >&5
14925 echo $ECHO_N "checking for alternate character set array... $ECHO_C" >&6
14926 if test "${cf_cv_curses_acs_map+set}" = set; then
14927 echo $ECHO_N "(cached) $ECHO_C" >&6
14930 cf_cv_curses_acs_map=unknown
14931 for name in acs_map _acs_map __acs_map ${NCURSES_WRAP_PREFIX}acs_map
14933 cat >conftest.$ac_ext <<_ACEOF
14934 #line 14934 "configure"
14935 #include "confdefs.h"
14937 #include <${cf_cv_ncurses_header:-curses.h}>
14943 $name['k'] = ACS_PLUS
14949 rm -f conftest.$ac_objext conftest$ac_exeext
14950 if { (eval echo "$as_me:14950: \"$ac_link\"") >&5
14951 (eval $ac_link) 2>&5
14953 echo "$as_me:14953: \$? = $ac_status" >&5
14954 (exit $ac_status); } &&
14955 { ac_try='test -s conftest$ac_exeext'
14956 { (eval echo "$as_me:14956: \"$ac_try\"") >&5
14957 (eval $ac_try) 2>&5
14959 echo "$as_me:14959: \$? = $ac_status" >&5
14960 (exit $ac_status); }; }; then
14961 cf_cv_curses_acs_map=$name; break
14963 echo "$as_me: failed program was:" >&5
14964 cat conftest.$ac_ext >&5
14966 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14970 echo "$as_me:14970: result: $cf_cv_curses_acs_map" >&5
14971 echo "${ECHO_T}$cf_cv_curses_acs_map" >&6
14973 test "$cf_cv_curses_acs_map" != unknown && cat >>confdefs.h <<EOF
14974 #define CURSES_ACS_ARRAY $cf_cv_curses_acs_map
14977 if test "$cf_enable_widec" = yes; then
14979 echo "$as_me:14979: checking for wide alternate character set array" >&5
14980 echo $ECHO_N "checking for wide alternate character set array... $ECHO_C" >&6
14981 if test "${cf_cv_curses_wacs_map+set}" = set; then
14982 echo $ECHO_N "(cached) $ECHO_C" >&6
14985 cf_cv_curses_wacs_map=unknown
14986 for name in wacs_map _wacs_map __wacs_map _nc_wacs _wacs_char
14988 cat >conftest.$ac_ext <<_ACEOF
14989 #line 14989 "configure"
14990 #include "confdefs.h"
14992 #ifndef _XOPEN_SOURCE_EXTENDED
14993 #define _XOPEN_SOURCE_EXTENDED
14995 #include <${cf_cv_ncurses_header:-curses.h}>
14999 void *foo = &($name['k'])
15004 rm -f conftest.$ac_objext conftest$ac_exeext
15005 if { (eval echo "$as_me:15005: \"$ac_link\"") >&5
15006 (eval $ac_link) 2>&5
15008 echo "$as_me:15008: \$? = $ac_status" >&5
15009 (exit $ac_status); } &&
15010 { ac_try='test -s conftest$ac_exeext'
15011 { (eval echo "$as_me:15011: \"$ac_try\"") >&5
15012 (eval $ac_try) 2>&5
15014 echo "$as_me:15014: \$? = $ac_status" >&5
15015 (exit $ac_status); }; }; then
15016 cf_cv_curses_wacs_map=$name
15019 echo "$as_me: failed program was:" >&5
15020 cat conftest.$ac_ext >&5
15022 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15025 echo "$as_me:15025: result: $cf_cv_curses_wacs_map" >&5
15026 echo "${ECHO_T}$cf_cv_curses_wacs_map" >&6
15028 test "$cf_cv_curses_wacs_map" != unknown && cat >>confdefs.h <<EOF
15029 #define CURSES_WACS_ARRAY $cf_cv_curses_wacs_map
15032 echo "$as_me:15032: checking for wide alternate character constants" >&5
15033 echo $ECHO_N "checking for wide alternate character constants... $ECHO_C" >&6
15034 if test "${cf_cv_curses_wacs_symbols+set}" = set; then
15035 echo $ECHO_N "(cached) $ECHO_C" >&6
15038 cf_cv_curses_wacs_symbols=no
15039 if test "$cf_cv_curses_wacs_map" != unknown
15041 cat >conftest.$ac_ext <<_ACEOF
15042 #line 15042 "configure"
15043 #include "confdefs.h"
15045 #ifndef _XOPEN_SOURCE_EXTENDED
15046 #define _XOPEN_SOURCE_EXTENDED
15048 #include <${cf_cv_ncurses_header:-curses.h}>
15052 cchar_t *foo = WACS_PLUS;
15053 $cf_cv_curses_wacs_map['k'] = *WACS_PLUS
15058 rm -f conftest.$ac_objext conftest$ac_exeext
15059 if { (eval echo "$as_me:15059: \"$ac_link\"") >&5
15060 (eval $ac_link) 2>&5
15062 echo "$as_me:15062: \$? = $ac_status" >&5
15063 (exit $ac_status); } &&
15064 { ac_try='test -s conftest$ac_exeext'
15065 { (eval echo "$as_me:15065: \"$ac_try\"") >&5
15066 (eval $ac_try) 2>&5
15068 echo "$as_me:15068: \$? = $ac_status" >&5
15069 (exit $ac_status); }; }; then
15070 cf_cv_curses_wacs_symbols=yes
15072 echo "$as_me: failed program was:" >&5
15073 cat conftest.$ac_ext >&5
15075 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15077 cat >conftest.$ac_ext <<_ACEOF
15078 #line 15078 "configure"
15079 #include "confdefs.h"
15081 #ifndef _XOPEN_SOURCE_EXTENDED
15082 #define _XOPEN_SOURCE_EXTENDED
15084 #include <${cf_cv_ncurses_header:-curses.h}>
15088 cchar_t *foo = WACS_PLUS
15093 rm -f conftest.$ac_objext conftest$ac_exeext
15094 if { (eval echo "$as_me:15094: \"$ac_link\"") >&5
15095 (eval $ac_link) 2>&5
15097 echo "$as_me:15097: \$? = $ac_status" >&5
15098 (exit $ac_status); } &&
15099 { ac_try='test -s conftest$ac_exeext'
15100 { (eval echo "$as_me:15100: \"$ac_try\"") >&5
15101 (eval $ac_try) 2>&5
15103 echo "$as_me:15103: \$? = $ac_status" >&5
15104 (exit $ac_status); }; }; then
15105 cf_cv_curses_wacs_symbols=yes
15107 echo "$as_me: failed program was:" >&5
15108 cat conftest.$ac_ext >&5
15110 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15114 echo "$as_me:15114: result: $cf_cv_curses_wacs_symbols" >&5
15115 echo "${ECHO_T}$cf_cv_curses_wacs_symbols" >&6
15117 test "$cf_cv_curses_wacs_symbols" != no && cat >>confdefs.h <<\EOF
15118 #define CURSES_WACS_SYMBOLS 1
15123 echo "$as_me:15123: checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15124 echo $ECHO_N "checking for type attr_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15125 cat >conftest.$ac_ext <<_ACEOF
15126 #line 15126 "configure"
15127 #include "confdefs.h"
15129 #ifndef _XOPEN_SOURCE_EXTENDED
15130 #define _XOPEN_SOURCE_EXTENDED
15132 #include <${cf_cv_ncurses_header:-curses.h}>
15143 rm -f conftest.$ac_objext
15144 if { (eval echo "$as_me:15144: \"$ac_compile\"") >&5
15145 (eval $ac_compile) 2>&5
15147 echo "$as_me:15147: \$? = $ac_status" >&5
15148 (exit $ac_status); } &&
15149 { ac_try='test -s conftest.$ac_objext'
15150 { (eval echo "$as_me:15150: \"$ac_try\"") >&5
15151 (eval $ac_try) 2>&5
15153 echo "$as_me:15153: \$? = $ac_status" >&5
15154 (exit $ac_status); }; }; then
15157 echo "$as_me: failed program was:" >&5
15158 cat conftest.$ac_ext >&5
15161 rm -f conftest.$ac_objext conftest.$ac_ext
15162 echo "$as_me:15162: result: $cf_result" >&5
15163 echo "${ECHO_T}$cf_result" >&6
15164 if test $cf_result = yes ; then
15166 cf_result=`echo "have_type_attr_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15168 cat >>confdefs.h <<EOF
15169 #define $cf_result 1
15173 cat >>confdefs.h <<EOF
15174 #define attr_t long
15179 if test "$cf_enable_widec" = yes; then
15181 # This is needed on Tru64 5.0 to declare mbstate_t
15182 echo "$as_me:15182: checking if we must include wchar.h to declare mbstate_t" >&5
15183 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
15184 if test "${cf_cv_mbstate_t+set}" = set; then
15185 echo $ECHO_N "(cached) $ECHO_C" >&6
15188 cat >conftest.$ac_ext <<_ACEOF
15189 #line 15189 "configure"
15190 #include "confdefs.h"
15192 #include <stdlib.h>
15193 #include <stdarg.h>
15195 #ifdef HAVE_LIBUTF8_H
15196 #include <libutf8.h>
15206 rm -f conftest.$ac_objext
15207 if { (eval echo "$as_me:15207: \"$ac_compile\"") >&5
15208 (eval $ac_compile) 2>&5
15210 echo "$as_me:15210: \$? = $ac_status" >&5
15211 (exit $ac_status); } &&
15212 { ac_try='test -s conftest.$ac_objext'
15213 { (eval echo "$as_me:15213: \"$ac_try\"") >&5
15214 (eval $ac_try) 2>&5
15216 echo "$as_me:15216: \$? = $ac_status" >&5
15217 (exit $ac_status); }; }; then
15220 echo "$as_me: failed program was:" >&5
15221 cat conftest.$ac_ext >&5
15222 cat >conftest.$ac_ext <<_ACEOF
15223 #line 15223 "configure"
15224 #include "confdefs.h"
15226 #include <stdlib.h>
15227 #include <stdarg.h>
15230 #ifdef HAVE_LIBUTF8_H
15231 #include <libutf8.h>
15241 rm -f conftest.$ac_objext
15242 if { (eval echo "$as_me:15242: \"$ac_compile\"") >&5
15243 (eval $ac_compile) 2>&5
15245 echo "$as_me:15245: \$? = $ac_status" >&5
15246 (exit $ac_status); } &&
15247 { ac_try='test -s conftest.$ac_objext'
15248 { (eval echo "$as_me:15248: \"$ac_try\"") >&5
15249 (eval $ac_try) 2>&5
15251 echo "$as_me:15251: \$? = $ac_status" >&5
15252 (exit $ac_status); }; }; then
15253 cf_cv_mbstate_t=yes
15255 echo "$as_me: failed program was:" >&5
15256 cat conftest.$ac_ext >&5
15257 cf_cv_mbstate_t=unknown
15259 rm -f conftest.$ac_objext conftest.$ac_ext
15261 rm -f conftest.$ac_objext conftest.$ac_ext
15263 echo "$as_me:15263: result: $cf_cv_mbstate_t" >&5
15264 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
15266 if test "$cf_cv_mbstate_t" = yes ; then
15267 cat >>confdefs.h <<\EOF
15268 #define NEED_WCHAR_H 1
15274 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
15275 if test "$cf_cv_mbstate_t" = unknown ; then
15276 NCURSES_MBSTATE_T=1
15279 # if we find mbstate_t in either place, use substitution to provide a fallback.
15280 if test "$cf_cv_mbstate_t" != unknown ; then
15281 NCURSES_OK_MBSTATE_T=1
15284 # This is needed on Tru64 5.0 to declare wchar_t
15285 echo "$as_me:15285: checking if we must include wchar.h to declare wchar_t" >&5
15286 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
15287 if test "${cf_cv_wchar_t+set}" = set; then
15288 echo $ECHO_N "(cached) $ECHO_C" >&6
15291 cat >conftest.$ac_ext <<_ACEOF
15292 #line 15292 "configure"
15293 #include "confdefs.h"
15295 #include <stdlib.h>
15296 #include <stdarg.h>
15298 #ifdef HAVE_LIBUTF8_H
15299 #include <libutf8.h>
15309 rm -f conftest.$ac_objext
15310 if { (eval echo "$as_me:15310: \"$ac_compile\"") >&5
15311 (eval $ac_compile) 2>&5
15313 echo "$as_me:15313: \$? = $ac_status" >&5
15314 (exit $ac_status); } &&
15315 { ac_try='test -s conftest.$ac_objext'
15316 { (eval echo "$as_me:15316: \"$ac_try\"") >&5
15317 (eval $ac_try) 2>&5
15319 echo "$as_me:15319: \$? = $ac_status" >&5
15320 (exit $ac_status); }; }; then
15323 echo "$as_me: failed program was:" >&5
15324 cat conftest.$ac_ext >&5
15325 cat >conftest.$ac_ext <<_ACEOF
15326 #line 15326 "configure"
15327 #include "confdefs.h"
15329 #include <stdlib.h>
15330 #include <stdarg.h>
15333 #ifdef HAVE_LIBUTF8_H
15334 #include <libutf8.h>
15344 rm -f conftest.$ac_objext
15345 if { (eval echo "$as_me:15345: \"$ac_compile\"") >&5
15346 (eval $ac_compile) 2>&5
15348 echo "$as_me:15348: \$? = $ac_status" >&5
15349 (exit $ac_status); } &&
15350 { ac_try='test -s conftest.$ac_objext'
15351 { (eval echo "$as_me:15351: \"$ac_try\"") >&5
15352 (eval $ac_try) 2>&5
15354 echo "$as_me:15354: \$? = $ac_status" >&5
15355 (exit $ac_status); }; }; then
15358 echo "$as_me: failed program was:" >&5
15359 cat conftest.$ac_ext >&5
15360 cf_cv_wchar_t=unknown
15362 rm -f conftest.$ac_objext conftest.$ac_ext
15364 rm -f conftest.$ac_objext conftest.$ac_ext
15366 echo "$as_me:15366: result: $cf_cv_wchar_t" >&5
15367 echo "${ECHO_T}$cf_cv_wchar_t" >&6
15369 if test "$cf_cv_wchar_t" = yes ; then
15370 cat >>confdefs.h <<\EOF
15371 #define NEED_WCHAR_H 1
15377 # if we do not find wchar_t in either place, use substitution to provide a fallback.
15378 if test "$cf_cv_wchar_t" = unknown ; then
15382 # if we find wchar_t in either place, use substitution to provide a fallback.
15383 if test "$cf_cv_wchar_t" != unknown ; then
15384 NCURSES_OK_WCHAR_T=1
15387 # This is needed on Tru64 5.0 to declare wint_t
15388 echo "$as_me:15388: checking if we must include wchar.h to declare wint_t" >&5
15389 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
15390 if test "${cf_cv_wint_t+set}" = set; then
15391 echo $ECHO_N "(cached) $ECHO_C" >&6
15394 cat >conftest.$ac_ext <<_ACEOF
15395 #line 15395 "configure"
15396 #include "confdefs.h"
15398 #include <stdlib.h>
15399 #include <stdarg.h>
15401 #ifdef HAVE_LIBUTF8_H
15402 #include <libutf8.h>
15412 rm -f conftest.$ac_objext
15413 if { (eval echo "$as_me:15413: \"$ac_compile\"") >&5
15414 (eval $ac_compile) 2>&5
15416 echo "$as_me:15416: \$? = $ac_status" >&5
15417 (exit $ac_status); } &&
15418 { ac_try='test -s conftest.$ac_objext'
15419 { (eval echo "$as_me:15419: \"$ac_try\"") >&5
15420 (eval $ac_try) 2>&5
15422 echo "$as_me:15422: \$? = $ac_status" >&5
15423 (exit $ac_status); }; }; then
15426 echo "$as_me: failed program was:" >&5
15427 cat conftest.$ac_ext >&5
15428 cat >conftest.$ac_ext <<_ACEOF
15429 #line 15429 "configure"
15430 #include "confdefs.h"
15432 #include <stdlib.h>
15433 #include <stdarg.h>
15436 #ifdef HAVE_LIBUTF8_H
15437 #include <libutf8.h>
15447 rm -f conftest.$ac_objext
15448 if { (eval echo "$as_me:15448: \"$ac_compile\"") >&5
15449 (eval $ac_compile) 2>&5
15451 echo "$as_me:15451: \$? = $ac_status" >&5
15452 (exit $ac_status); } &&
15453 { ac_try='test -s conftest.$ac_objext'
15454 { (eval echo "$as_me:15454: \"$ac_try\"") >&5
15455 (eval $ac_try) 2>&5
15457 echo "$as_me:15457: \$? = $ac_status" >&5
15458 (exit $ac_status); }; }; then
15461 echo "$as_me: failed program was:" >&5
15462 cat conftest.$ac_ext >&5
15463 cf_cv_wint_t=unknown
15465 rm -f conftest.$ac_objext conftest.$ac_ext
15467 rm -f conftest.$ac_objext conftest.$ac_ext
15469 echo "$as_me:15469: result: $cf_cv_wint_t" >&5
15470 echo "${ECHO_T}$cf_cv_wint_t" >&6
15472 if test "$cf_cv_wint_t" = yes ; then
15473 cat >>confdefs.h <<\EOF
15474 #define NEED_WCHAR_H 1
15480 # if we do not find wint_t in either place, use substitution to provide a fallback.
15481 if test "$cf_cv_wint_t" = unknown ; then
15485 # if we find wint_t in either place, use substitution to provide a fallback.
15486 if test "$cf_cv_wint_t" != unknown ; then
15487 NCURSES_OK_WINT_T=1
15490 if test "$NCURSES_OK_MBSTATE_T" = 0 ; then
15492 echo "$as_me:15492: checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15493 echo $ECHO_N "checking for type mbstate_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15494 cat >conftest.$ac_ext <<_ACEOF
15495 #line 15495 "configure"
15496 #include "confdefs.h"
15498 #ifndef _XOPEN_SOURCE_EXTENDED
15499 #define _XOPEN_SOURCE_EXTENDED
15501 #include <${cf_cv_ncurses_header:-curses.h}>
15512 rm -f conftest.$ac_objext
15513 if { (eval echo "$as_me:15513: \"$ac_compile\"") >&5
15514 (eval $ac_compile) 2>&5
15516 echo "$as_me:15516: \$? = $ac_status" >&5
15517 (exit $ac_status); } &&
15518 { ac_try='test -s conftest.$ac_objext'
15519 { (eval echo "$as_me:15519: \"$ac_try\"") >&5
15520 (eval $ac_try) 2>&5
15522 echo "$as_me:15522: \$? = $ac_status" >&5
15523 (exit $ac_status); }; }; then
15526 echo "$as_me: failed program was:" >&5
15527 cat conftest.$ac_ext >&5
15530 rm -f conftest.$ac_objext conftest.$ac_ext
15531 echo "$as_me:15531: result: $cf_result" >&5
15532 echo "${ECHO_T}$cf_result" >&6
15533 if test $cf_result = yes ; then
15535 cf_result=`echo "have_type_mbstate_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15537 cat >>confdefs.h <<EOF
15538 #define $cf_result 1
15542 cat >>confdefs.h <<EOF
15543 #define mbstate_t long
15550 if test "$NCURSES_OK_WCHAR_T" = 0 ; then
15552 echo "$as_me:15552: checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15553 echo $ECHO_N "checking for type wchar_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15554 cat >conftest.$ac_ext <<_ACEOF
15555 #line 15555 "configure"
15556 #include "confdefs.h"
15558 #ifndef _XOPEN_SOURCE_EXTENDED
15559 #define _XOPEN_SOURCE_EXTENDED
15561 #include <${cf_cv_ncurses_header:-curses.h}>
15572 rm -f conftest.$ac_objext
15573 if { (eval echo "$as_me:15573: \"$ac_compile\"") >&5
15574 (eval $ac_compile) 2>&5
15576 echo "$as_me:15576: \$? = $ac_status" >&5
15577 (exit $ac_status); } &&
15578 { ac_try='test -s conftest.$ac_objext'
15579 { (eval echo "$as_me:15579: \"$ac_try\"") >&5
15580 (eval $ac_try) 2>&5
15582 echo "$as_me:15582: \$? = $ac_status" >&5
15583 (exit $ac_status); }; }; then
15586 echo "$as_me: failed program was:" >&5
15587 cat conftest.$ac_ext >&5
15590 rm -f conftest.$ac_objext conftest.$ac_ext
15591 echo "$as_me:15591: result: $cf_result" >&5
15592 echo "${ECHO_T}$cf_result" >&6
15593 if test $cf_result = yes ; then
15595 cf_result=`echo "have_type_wchar_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15597 cat >>confdefs.h <<EOF
15598 #define $cf_result 1
15602 cat >>confdefs.h <<EOF
15603 #define wchar_t long
15610 if test "$NCURSES_OK_WINT_T" = 0 ; then
15612 echo "$as_me:15612: checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}" >&5
15613 echo $ECHO_N "checking for type wint_t in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15614 cat >conftest.$ac_ext <<_ACEOF
15615 #line 15615 "configure"
15616 #include "confdefs.h"
15618 #ifndef _XOPEN_SOURCE_EXTENDED
15619 #define _XOPEN_SOURCE_EXTENDED
15621 #include <${cf_cv_ncurses_header:-curses.h}>
15632 rm -f conftest.$ac_objext
15633 if { (eval echo "$as_me:15633: \"$ac_compile\"") >&5
15634 (eval $ac_compile) 2>&5
15636 echo "$as_me:15636: \$? = $ac_status" >&5
15637 (exit $ac_status); } &&
15638 { ac_try='test -s conftest.$ac_objext'
15639 { (eval echo "$as_me:15639: \"$ac_try\"") >&5
15640 (eval $ac_try) 2>&5
15642 echo "$as_me:15642: \$? = $ac_status" >&5
15643 (exit $ac_status); }; }; then
15646 echo "$as_me: failed program was:" >&5
15647 cat conftest.$ac_ext >&5
15650 rm -f conftest.$ac_objext conftest.$ac_ext
15651 echo "$as_me:15651: result: $cf_result" >&5
15652 echo "${ECHO_T}$cf_result" >&6
15653 if test $cf_result = yes ; then
15655 cf_result=`echo "have_type_wint_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15657 cat >>confdefs.h <<EOF
15658 #define $cf_result 1
15662 cat >>confdefs.h <<EOF
15663 #define wint_t long
15671 echo "$as_me:15671: checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
15672 echo $ECHO_N "checking for data boolnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15674 cat >conftest.$ac_ext <<_ACEOF
15675 #line 15675 "configure"
15676 #include "confdefs.h"
15678 #ifdef HAVE_XCURSES
15679 #include <xcurses.h>
15680 char * XCursesProgramName = "test";
15682 #include <${cf_cv_ncurses_header:-curses.h}>
15683 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15684 #include <ncursesw/term.h>
15685 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15686 #include <ncurses/term.h>
15687 #elif defined(HAVE_TERM_H)
15696 void *foo = &(boolnames)
15702 rm -f conftest.$ac_objext
15703 if { (eval echo "$as_me:15703: \"$ac_compile\"") >&5
15704 (eval $ac_compile) 2>&5
15706 echo "$as_me:15706: \$? = $ac_status" >&5
15707 (exit $ac_status); } &&
15708 { ac_try='test -s conftest.$ac_objext'
15709 { (eval echo "$as_me:15709: \"$ac_try\"") >&5
15710 (eval $ac_try) 2>&5
15712 echo "$as_me:15712: \$? = $ac_status" >&5
15713 (exit $ac_status); }; }; then
15716 echo "$as_me: failed program was:" >&5
15717 cat conftest.$ac_ext >&5
15720 rm -f conftest.$ac_objext conftest.$ac_ext
15721 echo "$as_me:15721: result: $cf_result" >&5
15722 echo "${ECHO_T}$cf_result" >&6
15724 if test $cf_result = yes ; then
15726 cf_result=`echo "have_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15728 cat >>confdefs.h <<EOF
15729 #define $cf_result 1
15733 echo "$as_me:15733: checking for data boolnames in library" >&5
15734 echo $ECHO_N "checking for data boolnames in library... $ECHO_C" >&6
15735 # BSD linkers insist on making weak linkage, but resolve at runtime.
15736 if test "$cross_compiling" = yes; then
15739 cat >conftest.$ac_ext <<_ACEOF
15740 #line 15740 "configure"
15741 #include "confdefs.h"
15743 #ifdef HAVE_XCURSES
15744 #include <xcurses.h>
15745 char * XCursesProgramName = "test";
15747 #include <${cf_cv_ncurses_header:-curses.h}>
15748 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15749 #include <ncursesw/term.h>
15750 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15751 #include <ncurses/term.h>
15752 #elif defined(HAVE_TERM_H)
15757 extern char boolnames;
15763 void *foo = &(boolnames);
15764 ${cf_cv_main_return:-return}(foo == 0);
15771 rm -f conftest.$ac_objext conftest$ac_exeext
15772 if { (eval echo "$as_me:15772: \"$ac_link\"") >&5
15773 (eval $ac_link) 2>&5
15775 echo "$as_me:15775: \$? = $ac_status" >&5
15776 (exit $ac_status); } &&
15777 { ac_try='test -s conftest$ac_exeext'
15778 { (eval echo "$as_me:15778: \"$ac_try\"") >&5
15779 (eval $ac_try) 2>&5
15781 echo "$as_me:15781: \$? = $ac_status" >&5
15782 (exit $ac_status); }; }; then
15785 echo "$as_me: failed program was:" >&5
15786 cat conftest.$ac_ext >&5
15789 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15792 cat >conftest.$ac_ext <<_ACEOF
15793 #line 15793 "configure"
15794 #include "confdefs.h"
15796 #ifdef HAVE_XCURSES
15797 #include <xcurses.h>
15798 char * XCursesProgramName = "test";
15800 #include <${cf_cv_ncurses_header:-curses.h}>
15801 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15802 #include <ncursesw/term.h>
15803 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15804 #include <ncurses/term.h>
15805 #elif defined(HAVE_TERM_H)
15810 extern char boolnames;
15813 void *foo = &(boolnames);
15814 ${cf_cv_main_return:-return}(foo == 0);
15817 rm -f conftest$ac_exeext
15818 if { (eval echo "$as_me:15818: \"$ac_link\"") >&5
15819 (eval $ac_link) 2>&5
15821 echo "$as_me:15821: \$? = $ac_status" >&5
15822 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15823 { (eval echo "$as_me:15823: \"$ac_try\"") >&5
15824 (eval $ac_try) 2>&5
15826 echo "$as_me:15826: \$? = $ac_status" >&5
15827 (exit $ac_status); }; }; then
15830 echo "$as_me: program exited with status $ac_status" >&5
15831 echo "$as_me: failed program was:" >&5
15832 cat conftest.$ac_ext >&5
15835 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15837 echo "$as_me:15837: result: $cf_result" >&5
15838 echo "${ECHO_T}$cf_result" >&6
15839 if test $cf_result = yes ; then
15841 cf_result=`echo "decl_curses_data_boolnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15843 cat >>confdefs.h <<EOF
15844 #define $cf_result 1
15850 echo "$as_me:15850: checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}" >&5
15851 echo $ECHO_N "checking for data boolfnames declaration in ${cf_cv_ncurses_header:-curses.h}... $ECHO_C" >&6
15853 cat >conftest.$ac_ext <<_ACEOF
15854 #line 15854 "configure"
15855 #include "confdefs.h"
15857 #ifdef HAVE_XCURSES
15858 #include <xcurses.h>
15859 char * XCursesProgramName = "test";
15861 #include <${cf_cv_ncurses_header:-curses.h}>
15862 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15863 #include <ncursesw/term.h>
15864 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15865 #include <ncurses/term.h>
15866 #elif defined(HAVE_TERM_H)
15875 void *foo = &(boolfnames)
15881 rm -f conftest.$ac_objext
15882 if { (eval echo "$as_me:15882: \"$ac_compile\"") >&5
15883 (eval $ac_compile) 2>&5
15885 echo "$as_me:15885: \$? = $ac_status" >&5
15886 (exit $ac_status); } &&
15887 { ac_try='test -s conftest.$ac_objext'
15888 { (eval echo "$as_me:15888: \"$ac_try\"") >&5
15889 (eval $ac_try) 2>&5
15891 echo "$as_me:15891: \$? = $ac_status" >&5
15892 (exit $ac_status); }; }; then
15895 echo "$as_me: failed program was:" >&5
15896 cat conftest.$ac_ext >&5
15899 rm -f conftest.$ac_objext conftest.$ac_ext
15900 echo "$as_me:15900: result: $cf_result" >&5
15901 echo "${ECHO_T}$cf_result" >&6
15903 if test $cf_result = yes ; then
15905 cf_result=`echo "have_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15907 cat >>confdefs.h <<EOF
15908 #define $cf_result 1
15912 echo "$as_me:15912: checking for data boolfnames in library" >&5
15913 echo $ECHO_N "checking for data boolfnames in library... $ECHO_C" >&6
15914 # BSD linkers insist on making weak linkage, but resolve at runtime.
15915 if test "$cross_compiling" = yes; then
15918 cat >conftest.$ac_ext <<_ACEOF
15919 #line 15919 "configure"
15920 #include "confdefs.h"
15922 #ifdef HAVE_XCURSES
15923 #include <xcurses.h>
15924 char * XCursesProgramName = "test";
15926 #include <${cf_cv_ncurses_header:-curses.h}>
15927 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15928 #include <ncursesw/term.h>
15929 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15930 #include <ncurses/term.h>
15931 #elif defined(HAVE_TERM_H)
15936 extern char boolfnames;
15942 void *foo = &(boolfnames);
15943 ${cf_cv_main_return:-return}(foo == 0);
15950 rm -f conftest.$ac_objext conftest$ac_exeext
15951 if { (eval echo "$as_me:15951: \"$ac_link\"") >&5
15952 (eval $ac_link) 2>&5
15954 echo "$as_me:15954: \$? = $ac_status" >&5
15955 (exit $ac_status); } &&
15956 { ac_try='test -s conftest$ac_exeext'
15957 { (eval echo "$as_me:15957: \"$ac_try\"") >&5
15958 (eval $ac_try) 2>&5
15960 echo "$as_me:15960: \$? = $ac_status" >&5
15961 (exit $ac_status); }; }; then
15964 echo "$as_me: failed program was:" >&5
15965 cat conftest.$ac_ext >&5
15968 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15971 cat >conftest.$ac_ext <<_ACEOF
15972 #line 15972 "configure"
15973 #include "confdefs.h"
15975 #ifdef HAVE_XCURSES
15976 #include <xcurses.h>
15977 char * XCursesProgramName = "test";
15979 #include <${cf_cv_ncurses_header:-curses.h}>
15980 #if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
15981 #include <ncursesw/term.h>
15982 #elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
15983 #include <ncurses/term.h>
15984 #elif defined(HAVE_TERM_H)
15989 extern char boolfnames;
15992 void *foo = &(boolfnames);
15993 ${cf_cv_main_return:-return}(foo == 0);
15996 rm -f conftest$ac_exeext
15997 if { (eval echo "$as_me:15997: \"$ac_link\"") >&5
15998 (eval $ac_link) 2>&5
16000 echo "$as_me:16000: \$? = $ac_status" >&5
16001 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16002 { (eval echo "$as_me:16002: \"$ac_try\"") >&5
16003 (eval $ac_try) 2>&5
16005 echo "$as_me:16005: \$? = $ac_status" >&5
16006 (exit $ac_status); }; }; then
16009 echo "$as_me: program exited with status $ac_status" >&5
16010 echo "$as_me: failed program was:" >&5
16011 cat conftest.$ac_ext >&5
16014 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16016 echo "$as_me:16016: result: $cf_result" >&5
16017 echo "${ECHO_T}$cf_result" >&6
16018 if test $cf_result = yes ; then
16020 cf_result=`echo "decl_curses_data_boolfnames" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16022 cat >>confdefs.h <<EOF
16023 #define $cf_result 1
16030 echo "$as_me:16030: checking for an rpath option" >&5
16031 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
16032 case $cf_cv_system_name in #(vi
16034 if test "$GCC" = yes; then
16035 LD_RPATH_OPT="-Wl,-rpath,"
16037 LD_RPATH_OPT="-rpath "
16040 linux*|gnu*|k*bsd*-gnu) #(vi
16041 LD_RPATH_OPT="-Wl,-rpath,"
16043 openbsd[2-9].*|mirbsd*) #(vi
16044 LD_RPATH_OPT="-Wl,-rpath,"
16046 dragonfly*|freebsd*) #(vi
16047 LD_RPATH_OPT="-rpath "
16050 LD_RPATH_OPT="-Wl,-rpath,"
16053 LD_RPATH_OPT="-rpath "
16061 echo "$as_me:16061: result: $LD_RPATH_OPT" >&5
16062 echo "${ECHO_T}$LD_RPATH_OPT" >&6
16064 case "x$LD_RPATH_OPT" in #(vi
16066 echo "$as_me:16066: checking if we need a space after rpath option" >&5
16067 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
16068 cf_save_LIBS="$LIBS"
16069 LIBS="${LD_RPATH_OPT}$libdir $LIBS"
16070 cat >conftest.$ac_ext <<_ACEOF
16071 #line 16071 "configure"
16072 #include "confdefs.h"
16082 rm -f conftest.$ac_objext conftest$ac_exeext
16083 if { (eval echo "$as_me:16083: \"$ac_link\"") >&5
16084 (eval $ac_link) 2>&5
16086 echo "$as_me:16086: \$? = $ac_status" >&5
16087 (exit $ac_status); } &&
16088 { ac_try='test -s conftest$ac_exeext'
16089 { (eval echo "$as_me:16089: \"$ac_try\"") >&5
16090 (eval $ac_try) 2>&5
16092 echo "$as_me:16092: \$? = $ac_status" >&5
16093 (exit $ac_status); }; }; then
16096 echo "$as_me: failed program was:" >&5
16097 cat conftest.$ac_ext >&5
16100 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16101 LIBS="$cf_save_LIBS"
16102 echo "$as_me:16102: result: $cf_rpath_space" >&5
16103 echo "${ECHO_T}$cf_rpath_space" >&6
16104 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
16108 echo "$as_me:16108: checking if rpath-hack should be disabled" >&5
16109 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
16111 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
16112 if test "${enable_rpath_hack+set}" = set; then
16113 enableval="$enable_rpath_hack"
16114 test "$enableval" != no && enableval=yes
16115 if test "$enableval" != "yes" ; then
16116 cf_disable_rpath_hack=yes
16118 cf_disable_rpath_hack=no
16122 cf_disable_rpath_hack=no
16125 echo "$as_me:16125: result: $cf_disable_rpath_hack" >&5
16126 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
16127 if test "$cf_disable_rpath_hack" = no ; then
16129 echo "$as_me:16129: checking for updated LDFLAGS" >&5
16130 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
16131 if test -n "$LD_RPATH_OPT" ; then
16132 echo "$as_me:16132: result: maybe" >&5
16133 echo "${ECHO_T}maybe" >&6
16137 # Extract the first word of "$ac_prog", so it can be a program name with args.
16138 set dummy $ac_prog; ac_word=$2
16139 echo "$as_me:16139: checking for $ac_word" >&5
16140 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16141 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
16142 echo $ECHO_N "(cached) $ECHO_C" >&6
16144 if test -n "$cf_ldd_prog"; then
16145 ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
16147 ac_save_IFS=$IFS; IFS=$ac_path_separator
16149 for ac_dir in $ac_dummy; do
16151 test -z "$ac_dir" && ac_dir=.
16152 $as_executable_p "$ac_dir/$ac_word" || continue
16153 ac_cv_prog_cf_ldd_prog="$ac_prog"
16154 echo "$as_me:16154: found $ac_dir/$ac_word" >&5
16160 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
16161 if test -n "$cf_ldd_prog"; then
16162 echo "$as_me:16162: result: $cf_ldd_prog" >&5
16163 echo "${ECHO_T}$cf_ldd_prog" >&6
16165 echo "$as_me:16165: result: no" >&5
16166 echo "${ECHO_T}no" >&6
16169 test -n "$cf_ldd_prog" && break
16171 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
16173 cf_rpath_list="/usr/lib /lib"
16174 if test "$cf_ldd_prog" != no
16178 cat >conftest.$ac_ext <<_ACEOF
16179 #line 16179 "configure"
16180 #include "confdefs.h"
16190 rm -f conftest.$ac_objext conftest$ac_exeext
16191 if { (eval echo "$as_me:16191: \"$ac_link\"") >&5
16192 (eval $ac_link) 2>&5
16194 echo "$as_me:16194: \$? = $ac_status" >&5
16195 (exit $ac_status); } &&
16196 { ac_try='test -s conftest$ac_exeext'
16197 { (eval echo "$as_me:16197: \"$ac_try\"") >&5
16198 (eval $ac_try) 2>&5
16200 echo "$as_me:16200: \$? = $ac_status" >&5
16201 (exit $ac_status); }; }; then
16202 cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
16203 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
16205 echo "$as_me: failed program was:" >&5
16206 cat conftest.$ac_ext >&5
16208 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16210 # If we passed the link-test, but get a "not found" on a given library,
16211 # this could be due to inept reconfiguration of gcc to make it only
16212 # partly honor /usr/local/lib (or whatever). Sometimes this behavior
16213 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
16214 # /usr/local libraries.
16215 if test -n "$cf_rpath_oops"
16217 for cf_rpath_src in $cf_rpath_oops
16219 for cf_rpath_dir in \
16224 if test -f $cf_rpath_dir/lib/$cf_rpath_src
16226 test -n "$verbose" && echo " ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
16228 echo "${as_me:-configure}:16228: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
16230 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
16238 test -n "$verbose" && echo " ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16240 echo "${as_me:-configure}:16240: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16242 test -n "$verbose" && echo " ...checking LDFLAGS $LDFLAGS" 1>&6
16244 echo "${as_me:-configure}:16244: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
16247 for cf_rpath_src in $LDFLAGS
16249 case $cf_rpath_src in #(vi
16252 # check if this refers to a directory which we will ignore
16254 if test -n "$cf_rpath_list"
16256 for cf_rpath_item in $cf_rpath_list
16258 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
16266 if test "$cf_rpath_skip" = no
16268 # transform the option
16269 if test "$LD_RPATH_OPT" = "-R " ; then
16270 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
16272 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
16275 # if we have not already added this, add it now
16276 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
16277 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
16279 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
16281 echo "${as_me:-configure}:16281: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
16283 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
16288 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
16290 LDFLAGS=$cf_rpath_dst
16292 test -n "$verbose" && echo " ...checked LDFLAGS $LDFLAGS" 1>&6
16294 echo "${as_me:-configure}:16294: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
16296 test -n "$verbose" && echo " ...checking LIBS $LIBS" 1>&6
16298 echo "${as_me:-configure}:16298: testing ...checking LIBS $LIBS ..." 1>&5
16301 for cf_rpath_src in $LIBS
16303 case $cf_rpath_src in #(vi
16306 # check if this refers to a directory which we will ignore
16308 if test -n "$cf_rpath_list"
16310 for cf_rpath_item in $cf_rpath_list
16312 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
16320 if test "$cf_rpath_skip" = no
16322 # transform the option
16323 if test "$LD_RPATH_OPT" = "-R " ; then
16324 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
16326 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
16329 # if we have not already added this, add it now
16330 cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
16331 if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
16333 test -n "$verbose" && echo " ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
16335 echo "${as_me:-configure}:16335: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
16337 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
16342 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
16346 test -n "$verbose" && echo " ...checked LIBS $LIBS" 1>&6
16348 echo "${as_me:-configure}:16348: testing ...checked LIBS $LIBS ..." 1>&5
16350 test -n "$verbose" && echo " ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
16352 echo "${as_me:-configure}:16352: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
16361 ac_config_files="$ac_config_files Makefile"
16362 ac_config_commands="$ac_config_commands default"
16363 cat >confcache <<\_ACEOF
16364 # This file is a shell script that caches the results of configure
16365 # tests run on this system so they can be shared between configure
16366 # scripts and configure runs, see configure's option --config-cache.
16367 # It is not useful on other systems. If it contains results you don't
16368 # want to keep, you may remove or edit it.
16370 # config.status only pays attention to the cache file if you give it
16371 # the --recheck option to rerun configure.
16373 # `ac_cv_env_foo' variables (set or unset) will be overriden when
16374 # loading this file, other *unset* `ac_cv_foo' will be assigned the
16375 # following values.
16379 # The following way of writing the cache mishandles newlines in values,
16380 # but we know of no workaround that is simple, portable, and efficient.
16381 # So, don't put newlines in cache variables' values.
16382 # Ultrix sh set writes to stderr and can't be redirected directly,
16383 # and sets the high bit in the cache file unless we assign to the vars.
16386 case `(ac_space=' '; set | grep ac_space) 2>&1` in
16388 # `set' does not quote correctly, so add quotes (double-quote
16389 # substitution turns \\\\ into \\, and sed turns \\ into \).
16392 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
16395 # `set' quotes correctly as required by POSIX, so do not add quotes.
16397 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
16404 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
16406 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
16408 if cmp -s $cache_file confcache; then :; else
16409 if test -w $cache_file; then
16410 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
16411 cat confcache >$cache_file
16413 echo "not updating unwritable cache $cache_file"
16418 test "x$prefix" = xNONE && prefix=$ac_default_prefix
16419 # Let make expand exec_prefix.
16420 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16422 # VPATH may cause trouble with some makes, so we remove $(srcdir),
16423 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
16424 # trailing colons and then remove the whole line if VPATH becomes empty
16425 # (actually we leave an empty line to preserve line numbers).
16426 if test "x$srcdir" = x.; then
16427 ac_vpsub='/^[ ]*VPATH[ ]*=/{
16428 s/:*\$(srcdir):*/:/;
16429 s/:*\${srcdir}:*/:/;
16431 s/^\([^=]*=[ ]*\):*/\1/;
16437 DEFS=-DHAVE_CONFIG_H
16439 : ${CONFIG_STATUS=./config.status}
16440 ac_clean_files_save=$ac_clean_files
16441 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
16442 { echo "$as_me:16442: creating $CONFIG_STATUS" >&5
16443 echo "$as_me: creating $CONFIG_STATUS" >&6;}
16444 cat >$CONFIG_STATUS <<_ACEOF
16446 # Generated automatically by configure.
16447 # Run this file to recreate the current configuration.
16448 # Compiler output produced by configure, useful for debugging
16449 # configure, is in config.log if it exists.
16452 SHELL=\${CONFIG_SHELL-$SHELL}
16453 ac_cs_invocation="\$0 \$@"
16457 cat >>$CONFIG_STATUS <<\_ACEOF
16458 # Be Bourne compatible
16459 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16462 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
16466 # Name of the executable.
16467 as_me=`echo "$0" |sed 's,.*[\\/],,'`
16469 if expr a : '\(a\)' >/dev/null 2>&1; then
16475 rm -f conf$$ conf$$.exe conf$$.file
16477 if ln -s conf$$.file conf$$ 2>/dev/null; then
16478 # We could just check for DJGPP; but this test a) works b) is more generic
16479 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
16480 if test -f conf$$.exe; then
16481 # Don't use ln at all; we don't have any links
16486 elif ln conf$$.file conf$$ 2>/dev/null; then
16491 rm -f conf$$ conf$$.exe conf$$.file
16493 as_executable_p="test -f"
16495 # Support unset when possible.
16496 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
16503 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
16504 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
16505 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
16506 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
16507 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
16508 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
16509 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
16510 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
16513 # We need space, tab and new line, in precisely that order.
16519 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
16525 # Files that config.status was made for.
16526 if test -n "$ac_config_files"; then
16527 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
16530 if test -n "$ac_config_headers"; then
16531 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
16534 if test -n "$ac_config_links"; then
16535 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
16538 if test -n "$ac_config_commands"; then
16539 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
16542 cat >>$CONFIG_STATUS <<\EOF
16545 \`$as_me' instantiates files from templates according to the
16546 current configuration.
16548 Usage: $0 [OPTIONS] [FILE]...
16550 -h, --help print this help, then exit
16551 -V, --version print version number, then exit
16552 -d, --debug don't remove temporary files
16553 --recheck update $as_me by reconfiguring in the same conditions
16554 --file=FILE[:TEMPLATE]
16555 instantiate the configuration file FILE
16556 --header=FILE[:TEMPLATE]
16557 instantiate the configuration header FILE
16559 Configuration files:
16562 Configuration headers:
16565 Configuration commands:
16568 Report bugs to <dickey@invisible-island.net>."
16571 cat >>$CONFIG_STATUS <<EOF
16574 configured by $0, generated by GNU Autoconf 2.52.20120310,
16575 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
16577 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
16578 Free Software Foundation, Inc.
16579 This config.status script is free software; the Free Software Foundation
16580 gives unlimited permission to copy, distribute and modify it."
16585 cat >>$CONFIG_STATUS <<\EOF
16586 # If no file are specified by the user, then we need to provide default
16587 # value. By we need to know if files were specified by the user.
16593 ac_option=`expr "x$1" : 'x\([^=]*\)='`
16594 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
16596 set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
16600 *) # This is not an option, so the user has probably given explicit
16602 ac_need_defaults=false;;
16606 # Handling of the options.
16608 cat >>$CONFIG_STATUS <<EOF
16609 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
16610 echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
16611 exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
16613 cat >>$CONFIG_STATUS <<\EOF
16614 --version | --vers* | -V )
16615 echo "$ac_cs_version"; exit 0 ;;
16617 # Conflict between --help and --header
16618 { { echo "$as_me:16618: error: ambiguous option: $1
16619 Try \`$0 --help' for more information." >&5
16620 echo "$as_me: error: ambiguous option: $1
16621 Try \`$0 --help' for more information." >&2;}
16622 { (exit 1); exit 1; }; };;
16623 --help | --hel | -h )
16624 echo "$ac_cs_usage"; exit 0 ;;
16625 --debug | --d* | -d )
16627 --file | --fil | --fi | --f )
16629 CONFIG_FILES="$CONFIG_FILES $1"
16630 ac_need_defaults=false;;
16631 --header | --heade | --head | --hea )
16633 CONFIG_HEADERS="$CONFIG_HEADERS $1"
16634 ac_need_defaults=false;;
16636 # This is an error.
16637 -*) { { echo "$as_me:16637: error: unrecognized option: $1
16638 Try \`$0 --help' for more information." >&5
16639 echo "$as_me: error: unrecognized option: $1
16640 Try \`$0 --help' for more information." >&2;}
16641 { (exit 1); exit 1; }; } ;;
16643 *) ac_config_targets="$ac_config_targets $1" ;;
16652 ## ----------------------- ##
16653 ## Running config.status. ##
16654 ## ----------------------- ##
16656 This file was extended by $as_me 2.52.20120310, executed with
16657 CONFIG_FILES = $CONFIG_FILES
16658 CONFIG_HEADERS = $CONFIG_HEADERS
16659 CONFIG_LINKS = $CONFIG_LINKS
16660 CONFIG_COMMANDS = $CONFIG_COMMANDS
16661 > $ac_cs_invocation
16662 on `(hostname || uname -n) 2>/dev/null | sed 1q`
16667 cat >>$CONFIG_STATUS <<EOF
16669 # INIT-COMMANDS section.
16679 cat >>$CONFIG_STATUS <<\EOF
16680 for ac_config_target in $ac_config_targets
16682 case "$ac_config_target" in
16683 # Handling of arguments.
16684 "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
16685 "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
16686 "ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ncurses_cfg.h:ncurses_tst.hin" ;;
16687 *) { { echo "$as_me:16687: error: invalid argument: $ac_config_target" >&5
16688 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
16689 { (exit 1); exit 1; }; };;
16693 # If the user did not use the arguments to specify the items to instantiate,
16694 # then the envvar interface is used. Set only those that are not.
16695 # We use the long form for the default assignment because of an extremely
16696 # bizarre bug on SunOS 4.1.3.
16697 if $ac_need_defaults; then
16698 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
16699 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
16700 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
16703 # Create a temporary directory, and hook for its removal unless debugging.
16706 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
16707 trap '{ (exit 1); exit 1; }' 1 2 13 15
16710 # Create a (secure) tmp directory for tmp files.
16713 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
16714 test -n "$tmp" && test -d "$tmp"
16717 tmp=$TMPDIR/cs$$-$RANDOM
16718 (umask 077 && mkdir $tmp)
16721 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
16722 { (exit 1); exit 1; }
16727 cat >>$CONFIG_STATUS <<EOF
16730 # CONFIG_FILES section.
16733 # No need to generate the scripts if there are no CONFIG_FILES.
16734 # This happens for instance when ./config.status config.h
16735 if test -n "\$CONFIG_FILES"; then
16736 # Protect against being on the right side of a sed subst in config.status.
16737 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
16738 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
16739 s,@SHELL@,$SHELL,;t t
16740 s,@exec_prefix@,$exec_prefix,;t t
16741 s,@prefix@,$prefix,;t t
16742 s,@program_transform_name@,$program_transform_name,;t t
16743 s,@bindir@,$bindir,;t t
16744 s,@sbindir@,$sbindir,;t t
16745 s,@libexecdir@,$libexecdir,;t t
16746 s,@datadir@,$datadir,;t t
16747 s,@sysconfdir@,$sysconfdir,;t t
16748 s,@sharedstatedir@,$sharedstatedir,;t t
16749 s,@localstatedir@,$localstatedir,;t t
16750 s,@libdir@,$libdir,;t t
16751 s,@includedir@,$includedir,;t t
16752 s,@oldincludedir@,$oldincludedir,;t t
16753 s,@infodir@,$infodir,;t t
16754 s,@mandir@,$mandir,;t t
16755 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
16756 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
16757 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
16758 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
16759 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
16760 s,@build_alias@,$build_alias,;t t
16761 s,@host_alias@,$host_alias,;t t
16762 s,@target_alias@,$target_alias,;t t
16763 s,@ECHO_C@,$ECHO_C,;t t
16764 s,@ECHO_N@,$ECHO_N,;t t
16765 s,@ECHO_T@,$ECHO_T,;t t
16766 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
16767 s,@DEFS@,$DEFS,;t t
16768 s,@LIBS@,$LIBS,;t t
16769 s,@build@,$build,;t t
16770 s,@build_cpu@,$build_cpu,;t t
16771 s,@build_vendor@,$build_vendor,;t t
16772 s,@build_os@,$build_os,;t t
16773 s,@host@,$host,;t t
16774 s,@host_cpu@,$host_cpu,;t t
16775 s,@host_vendor@,$host_vendor,;t t
16776 s,@host_os@,$host_os,;t t
16777 s,@SET_MAKE@,$SET_MAKE,;t t
16779 s,@CFLAGS@,$CFLAGS,;t t
16780 s,@LDFLAGS@,$LDFLAGS,;t t
16781 s,@CPPFLAGS@,$CPPFLAGS,;t t
16782 s,@ac_ct_CC@,$ac_ct_CC,;t t
16783 s,@EXEEXT@,$EXEEXT,;t t
16784 s,@OBJEXT@,$OBJEXT,;t t
16787 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
16788 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
16789 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
16790 s,@LINT@,$LINT,;t t
16791 s,@LINT_OPTS@,$LINT_OPTS,;t t
16792 s,@CTAGS@,$CTAGS,;t t
16793 s,@ETAGS@,$ETAGS,;t t
16794 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
16795 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
16796 s,@MATH_LIB@,$MATH_LIB,;t t
16797 s,@top_builddir@,$top_builddir,;t t
16798 s,@CC_G_OPT@,$CC_G_OPT,;t t
16799 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
16800 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
16801 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
16802 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
16804 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
16805 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
16806 s,@LD_MODEL@,$LD_MODEL,;t t
16807 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
16808 s,@LIBTOOL@,$LIBTOOL,;t t
16809 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
16810 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
16811 s,@LIB_LINK@,$LIB_LINK,;t t
16812 s,@LINK_TESTS@,$LINK_TESTS,;t t
16813 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
16814 s,@PTHREAD@,$PTHREAD,;t t
16815 s,@TEST_ARGS@,$TEST_ARGS,;t t
16816 s,@TEST_DEPS@,$TEST_DEPS,;t t
16817 s,@TEST_LIBS@,$TEST_LIBS,;t t
16818 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
16819 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
16820 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
16821 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
16822 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
16823 s,@ECHO_LT@,$ECHO_LT,;t t
16824 s,@ECHO_LD@,$ECHO_LD,;t t
16825 s,@RULE_CC@,$RULE_CC,;t t
16826 s,@SHOW_CC@,$SHOW_CC,;t t
16827 s,@ECHO_CC@,$ECHO_CC,;t t
16828 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
16829 s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
16830 s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
16831 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
16832 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
16833 s,@X_CFLAGS@,$X_CFLAGS,;t t
16834 s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
16835 s,@X_LIBS@,$X_LIBS,;t t
16836 s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
16837 s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
16838 s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
16839 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
16840 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
16841 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
16846 cat >>$CONFIG_STATUS <<\EOF
16847 # Split the substitutions into bite-sized pieces for seds with
16848 # small command number limits, like on Digital OSF/1 and HP-UX.
16849 ac_max_sed_lines=48
16850 ac_sed_frag=1 # Number of current file.
16851 ac_beg=1 # First line for current file.
16852 ac_end=$ac_max_sed_lines # Line after last line for current file.
16855 while $ac_more_lines; do
16856 if test $ac_beg -gt 1; then
16857 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16859 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
16861 if test ! -s $tmp/subs.frag; then
16862 ac_more_lines=false
16864 # The purpose of the label and of the branching condition is to
16865 # speed up the sed processing (if there are no `@' at all, there
16866 # is no need to browse any of the substitutions).
16867 # These are the two extra sed commands mentioned above.
16869 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
16870 if test -z "$ac_sed_cmds"; then
16871 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
16873 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
16875 ac_sed_frag=`expr $ac_sed_frag + 1`
16877 ac_end=`expr $ac_end + $ac_max_sed_lines`
16880 if test -z "$ac_sed_cmds"; then
16883 fi # test -n "$CONFIG_FILES"
16886 cat >>$CONFIG_STATUS <<\EOF
16887 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
16888 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
16890 - | *:- | *:-:* ) # input from stdin
16892 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16893 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16894 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
16895 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
16896 * ) ac_file_in=$ac_file.in ;;
16899 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
16900 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16901 X"$ac_file" : 'X\(//\)[^/]' \| \
16902 X"$ac_file" : 'X\(//\)$' \| \
16903 X"$ac_file" : 'X\(/\)' \| \
16904 . : '\(.\)' 2>/dev/null ||
16906 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
16907 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
16908 /^X\(\/\/\)$/{ s//\1/; q; }
16909 /^X\(\/\).*/{ s//\1/; q; }
16911 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
16912 { case "$ac_dir" in
16913 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
16917 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
16918 case $as_mkdir_dir in
16919 # Skip DOS drivespec
16920 ?:) as_incr_dir=$as_mkdir_dir ;;
16922 as_incr_dir=$as_incr_dir/$as_mkdir_dir
16923 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
16928 ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
16929 # A "../" for each directory in $ac_dir_suffix.
16930 ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
16932 ac_dir_suffix= ac_dots=
16937 if test -z "$ac_dots"; then
16940 ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
16942 [\\/]* | ?:[\\/]* )
16943 ac_srcdir=$srcdir$ac_dir_suffix;
16944 ac_top_srcdir=$srcdir ;;
16945 *) # Relative path.
16946 ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
16947 ac_top_srcdir=$ac_dots$srcdir ;;
16951 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
16952 *) ac_INSTALL=$ac_dots$INSTALL ;;
16955 if test x"$ac_file" != x-; then
16956 { echo "$as_me:16956: creating $ac_file" >&5
16957 echo "$as_me: creating $ac_file" >&6;}
16960 # Let's still pretend it is `configure' which instantiates (i.e., don't
16961 # use $as_me), people would be surprised to read:
16962 # /* config.h. Generated automatically by config.status. */
16963 configure_input="Generated automatically from `echo $ac_file_in |
16964 sed 's,.*/,,'` by configure."
16966 # First look for the input files in the build tree, otherwise in the
16968 ac_file_inputs=`IFS=:
16969 for f in $ac_file_in; do
16971 -) echo $tmp/stdin ;;
16973 # Absolute (can't be DOS-style, as IFS=:)
16974 test -f "$f" || { { echo "$as_me:16974: error: cannot find input file: $f" >&5
16975 echo "$as_me: error: cannot find input file: $f" >&2;}
16976 { (exit 1); exit 1; }; }
16979 if test -f "$f"; then
16982 elif test -f "$srcdir/$f"; then
16987 { { echo "$as_me:16987: error: cannot find input file: $f" >&5
16988 echo "$as_me: error: cannot find input file: $f" >&2;}
16989 { (exit 1); exit 1; }; }
16992 done` || { (exit 1); exit 1; }
16994 cat >>$CONFIG_STATUS <<EOF
16998 cat >>$CONFIG_STATUS <<\EOF
17000 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
17001 s,@configure_input@,$configure_input,;t t
17002 s,@srcdir@,$ac_srcdir,;t t
17003 s,@top_srcdir@,$ac_top_srcdir,;t t
17004 s,@INSTALL@,$ac_INSTALL,;t t
17005 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
17007 if test x"$ac_file" != x-; then
17008 mv $tmp/out $ac_file
17016 cat >>$CONFIG_STATUS <<\EOF
17019 # CONFIG_HEADER section.
17022 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
17023 # NAME is the cpp macro being defined and VALUE is the value it is being given.
17025 # ac_d sets the value in "#define NAME VALUE" lines.
17026 ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
17027 ac_dB='[ ].*$,\1#\2'
17030 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
17031 ac_iA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17032 ac_iB='\([ ]\),\1#\2define\3'
17035 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
17036 ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
17037 ac_uB='$,\1#\2define\3'
17041 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
17042 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17044 - | *:- | *:-:* ) # input from stdin
17046 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17047 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17048 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17049 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17050 * ) ac_file_in=$ac_file.in ;;
17053 test x"$ac_file" != x- && { echo "$as_me:17053: creating $ac_file" >&5
17054 echo "$as_me: creating $ac_file" >&6;}
17056 # First look for the input files in the build tree, otherwise in the
17058 ac_file_inputs=`IFS=:
17059 for f in $ac_file_in; do
17061 -) echo $tmp/stdin ;;
17063 # Absolute (can't be DOS-style, as IFS=:)
17064 test -f "$f" || { { echo "$as_me:17064: error: cannot find input file: $f" >&5
17065 echo "$as_me: error: cannot find input file: $f" >&2;}
17066 { (exit 1); exit 1; }; }
17069 if test -f "$f"; then
17072 elif test -f "$srcdir/$f"; then
17077 { { echo "$as_me:17077: error: cannot find input file: $f" >&5
17078 echo "$as_me: error: cannot find input file: $f" >&2;}
17079 { (exit 1); exit 1; }; }
17082 done` || { (exit 1); exit 1; }
17083 # Remove the trailing spaces.
17084 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
17088 # Transform confdefs.h into a list of #define's. We won't use it as a sed
17089 # script, but as data to insert where we see @DEFS@. We expect AC_SAVE_DEFS to
17090 # be either 'cat' or 'sort'.
17091 cat confdefs.h | uniq >conftest.vals
17093 # Break up conftest.vals because some shells have a limit on
17094 # the size of here documents, and old seds have small limits too.
17096 rm -f conftest.tail
17097 echo ' rm -f conftest.frag' >> $CONFIG_STATUS
17098 while grep . conftest.vals >/dev/null
17100 # Write chunks of a limited-size here document to conftest.frag.
17101 echo ' cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
17102 sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
17103 echo 'CEOF' >> $CONFIG_STATUS
17104 sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
17105 rm -f conftest.vals
17106 mv conftest.tail conftest.vals
17108 rm -f conftest.vals
17110 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
17112 echo ' cat >> conftest.edit <<CEOF
17113 /@DEFS@/r conftest.frag
17116 sed -f conftest.edit $tmp/in > $tmp/out
17118 mv $tmp/out $tmp/in
17119 rm -f conftest.edit conftest.frag
17120 ' >> $CONFIG_STATUS
17122 cat >>$CONFIG_STATUS <<\EOF
17123 # Let's still pretend it is `configure' which instantiates (i.e., don't
17124 # use $as_me), people would be surprised to read:
17125 # /* config.h. Generated automatically by config.status. */
17126 if test x"$ac_file" = x-; then
17127 echo "/* Generated automatically by configure. */" >$tmp/config.h
17129 echo "/* $ac_file. Generated automatically by configure. */" >$tmp/config.h
17131 cat $tmp/in >>$tmp/config.h
17133 if test x"$ac_file" != x-; then
17134 if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
17135 { echo "$as_me:17135: $ac_file is unchanged" >&5
17136 echo "$as_me: $ac_file is unchanged" >&6;}
17138 ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17139 X"$ac_file" : 'X\(//\)[^/]' \| \
17140 X"$ac_file" : 'X\(//\)$' \| \
17141 X"$ac_file" : 'X\(/\)' \| \
17142 . : '\(.\)' 2>/dev/null ||
17144 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17145 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17146 /^X\(\/\/\)$/{ s//\1/; q; }
17147 /^X\(\/\).*/{ s//\1/; q; }
17149 if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17150 { case "$ac_dir" in
17151 [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17155 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17156 case $as_mkdir_dir in
17157 # Skip DOS drivespec
17158 ?:) as_incr_dir=$as_mkdir_dir ;;
17160 as_incr_dir=$as_incr_dir/$as_mkdir_dir
17161 test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17168 mv $tmp/config.h $ac_file
17172 rm -f $tmp/config.h
17176 cat >>$CONFIG_STATUS <<\EOF
17178 # CONFIG_COMMANDS section.
17180 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
17181 ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
17182 ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
17189 if test ! -d $srcdir/$cf_dir; then
17191 elif test -f $srcdir/$cf_dir/programs; then
17192 $AWK -f $srcdir/mk-test.awk INSTALL=yes ECHO_LINK="$ECHO_LD" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
17196 cat >>Makefile <<TEST_EOF
17198 # These rules are generated so we do not rely on suffix rules, which do not
17199 # work consistently for different make-programs (the '\$(MODEL)/' confuses
17200 # some, and the '\$x' confuses others).
17203 LIST=`sed -e 's/[ ].*//' -e '/^[#@]/d' $srcdir/modules`
17206 cat >>Makefile <<TEST_EOF
17208 \$(MODEL)/$N.o : \$(srcdir)/$N.c \\
17209 \$(srcdir)/test.priv.h \\
17212 $ECHO_CC\$(CC) -c \$(CFLAGS_DEFAULT) \$(srcdir)/$N.c
17216 if test -f ../config.guess && test -f ../config.sub
17218 cat >>Makefile <<TEST_EOF
17220 # if we used CF_INHERIT for getting these files, we can remove them
17222 rm -f config.guess config.sub
17230 cat >>$CONFIG_STATUS <<\EOF
17232 { (exit 0); exit 0; }
17234 chmod +x $CONFIG_STATUS
17235 ac_clean_files=$ac_clean_files_save
17237 # configure is writing to config.log, and then calls config.status.
17238 # config.status does its own redirection, appending to config.log.
17239 # Unfortunately, on DOS this fails, as config.log is still kept open
17240 # by configure, so config.status won't be able to write to it; its
17241 # output is simply discarded. So we exec the FD to /dev/null,
17242 # effectively closing config.log, so it can be properly (re)opened and
17243 # appended to by config.status. When coming back to configure, we
17244 # need to make the FD available again.
17245 if test "$no_create" != yes; then
17248 $SHELL $CONFIG_STATUS || ac_cs_success=false
17250 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
17251 # would make configure fail if this is the last instruction.
17252 $ac_cs_success || { (exit 1); exit 1; }